Web/src/views/device/wcsOderTask/component/editDialog.vue
@@ -42,8 +42,8 @@
               </el-col>
               <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                  <el-form-item label="物料名称" prop="skuName">
                     <el-input v-model="ruleForm.skuName" placeholder="请输入物料名称" maxlength="50" show-word-limit clearable />
                     <el-input v-model="ruleForm.skuName" placeholder="请输入物料名称" maxlength="50" show-word-limit clearable/>
                     <el-button type="primary" icon="el-icon-search" @click="openBindDialog()">搜索物料</el-button>
                  </el-form-item>
                  
               </el-col>
@@ -81,7 +81,7 @@
                  </el-form-item>
                  
               </el-col>
               <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
               <!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                  <el-form-item label="是否回馈成功" prop="isSuccess">
                     <el-select clearable v-model="ruleForm.isSuccess" placeholder="请选择是否回馈成功">
                        <el-option v-for="(item,index) in dl('TaskSuccessEnum')" :key="index" :value="Number(item.value)" :label="`${item.name} (${item.code}) [${item.value}]`"></el-option>
@@ -104,7 +104,7 @@
                     
                  </el-form-item>
                  
               </el-col>
               </el-col> -->
            </el-row>
         </el-form>
         <template #footer>
@@ -114,6 +114,32 @@
            </span>
         </template>
      </el-dialog>
      <!-- 绑定任务弹框 -->
      <el-dialog v-model="bindDialogVisible" title="选择数据">
            <el-table
                :data="bindBoxData"
                highlight-current-row
                @row-click="handleRowClick"
                >
                <el-table-column prop="skuNo" label="物料编码"  show-overflow-tooltip="" />
                <el-table-column prop="skuName" label="物料名称"  show-overflow-tooltip="" />
                <el-table-column prop="lotNo" label="批次号"  show-overflow-tooltip="" />
                <el-table-column prop="lotText" label="批次描述"  show-overflow-tooltip="" />
                <el-table-column prop="custom" label="供应商代码"  show-overflow-tooltip="" />
                <el-table-column prop="customName" label="供应商名称"  show-overflow-tooltip="" />
                <el-table-column prop="productionTime" label="生产日期"  show-overflow-tooltip="" />
            <el-table-column prop="expirationTime" label="过期日期"  show-overflow-tooltip="" />
            <el-table-column prop="standard" label="物料规格"  show-overflow-tooltip="" />
            <el-table-column prop="packageStandard" label="包装规格"  show-overflow-tooltip="" />
            <el-table-column prop="packUnit" label="包装单位"  show-overflow-tooltip="" />
            <el-table-column prop="storeTime" label="存储期至"  show-overflow-tooltip="" />
            </el-table>
            <div slot="footer" class="dialog-footer">
                <el-button @click="bindDialogVisible = false">取消</el-button>
                <el-button type="primary" @click="confirmBinding">确认</el-button>
            </div>
        </el-dialog>
   </div>
</template>
<style lang="scss" scoped>
@@ -129,7 +155,7 @@
   import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
   import { getDictLabelByVal as dv } from '/@/utils/dict-utils';
     import { formatDate } from '/@/utils/formatTime';
   import { addWcsOderTask, updateWcsOderTask, detailWcsOderTask } from "/@/api/device/wcsOderTask";
   import { addWcsOderTask, updateWcsOderTask, detailWcsOderTask,GetGroupSkuList } from "/@/api/device/wcsOderTask";
   import { getAPI } from '/@/utils/axios-utils';
   import { SysEnumApi } from '/@/api-services/api';
@@ -153,6 +179,10 @@
   onMounted(() => {
   });
   const bindDialogVisible = ref(false);
   const bindBoxData = ref<any>([]);
   const selectedRow = ref<any>(null);
   // 打开弹窗
   const openDialog = async (row: any) => {
@@ -198,10 +228,37 @@
   };
   const handleQuery = async () => {
      var res = await GetGroupSkuList();
      console.log('res:'+res)
      bindBoxData.value = res.data.result;
   };
   //打开绑定弹框
   function openBindDialog() {
      selectedRow.value=null;
      bindDialogVisible.value = true;
      handleQuery();
   }
   //点击行时设置选中行
   function handleRowClick(row) {
      selectedRow.value = row;
   }
   //确认选择物料操作
   function confirmBinding() {
      if (selectedRow.value) {
         ruleForm.value.skuNo=selectedRow.value.skuNo;
         ruleForm.value.skuName=selectedRow.value.skuName;
         ruleForm.value.lotNo=selectedRow.value.lotNo;
         ruleForm.value.Standard=selectedRow.value.Standard;
         bindDialogVisible.value = false;
      } else {
         ElMessage.error('请选择物料!');
      }
   }
   //将属性或者函数暴露给父组件
   defineExpose({ openDialog });
</script>