cz há 1 ano atrás
pai
commit
9a550ad49e

+ 1 - 1
src/views/JXSK/processConfig/handleBtn.vue

@@ -53,7 +53,7 @@ title.value = node.store.data.label;
       height: 20px;
       width: 20px;
       border-radius: 10px;
-      background: #ff9315;
+      background: #409eff;
       color: #fff;
       i {
         color: #fff;

+ 68 - 60
src/views/JXSK/production/forward/index.vue

@@ -273,11 +273,11 @@ const formConfig = computed(() => {
         width: "50%",
       },
     },
-    {
-      type: "slot",
-      slotName: "fileOne",
-      label: "前道工序完工拍摄",
-    },
+    // {
+    //   type: "slot",
+    //   slotName: "fileOne",
+    //   label: "前道工序完工拍摄",
+    // },
     {
       type: "slot",
       slotName: "fileTwo",
@@ -421,7 +421,6 @@ const submitType = ref("");
 const submitText = ref("");
 const printData = ref({});
 const getDtl = (row) => {
-  console.log(row, "asdasd");
   if (
     row.nextProductionProcessesId == "" ||
     row.nextProductionProcessesId == "-1"
@@ -454,62 +453,71 @@ const getDtl = (row) => {
   //   });
   // }
 
-  proxy.post("/productionTaskDetail/detail", { id: row.id }).then((res) => {
-    if (
-      res.productionTaskDetailRecordList &&
-      res.productionTaskDetailRecordList.length > 0
-    ) {
-      let id = res.previousProcessesRecordId;
-      proxy.post("/fileInfo/getList", { businessIdList: [id] }).then((res) => {
-        if (res[id] && res[id].length > 0) {
-          formData.data.fileListOne = res[id].map((item) => {
-            return {
-              raw: item,
-              name: item.fileName,
-              url: item.fileUrl,
-            };
-          });
-        }
-      });
-    }
-    proxy
-      .post("/fileInfo/getList", {
-        businessIdList: [res.productionProcessesId],
-      })
-      .then((resOne) => {
-        if (
-          resOne[res.productionProcessesId] &&
-          resOne[res.productionProcessesId].length > 0
-        ) {
-          formData.data.fileListTwo = resOne[res.productionProcessesId].map(
-            (item) => {
-              return {
-                raw: item,
-                name: item.fileName,
-                url: item.fileUrl,
-              };
+  proxy
+    .post("/productionTaskDetail/detail", {
+      id: row.id,
+      taskProgressId: row.taskProgressId,
+    })
+    .then((res) => {
+      if (
+        res.productionTaskDetailRecordList &&
+        res.productionTaskDetailRecordList.length > 0
+      ) {
+        let id = res.previousProcessesRecordId;
+        proxy
+          .post("/fileInfo/getList", { businessIdList: [id] })
+          .then((res) => {
+            if (res[id] && res[id].length > 0) {
+              formData.data.fileListOne = res[id].map((item) => {
+                return {
+                  raw: item,
+                  name: item.fileName,
+                  url: item.fileUrl,
+                };
+              });
             }
-          );
-        }
-      });
-
-    proxy
-      .post("/fileInfo/getList", {
-        businessIdList: [res.workOrderId],
-        fileType: 1,
-      })
-      .then((resOne) => {
-        if (resOne[res.workOrderId] && resOne[res.workOrderId].length > 0) {
-          formData.data.fileListThree = resOne[res.workOrderId].map((item) => {
-            return {
-              raw: item,
-              name: item.fileName,
-              url: item.fileUrl,
-            };
           });
-        }
-      });
-  });
+      }
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: [res.productionProcessesId],
+        })
+        .then((resOne) => {
+          if (
+            resOne[res.productionProcessesId] &&
+            resOne[res.productionProcessesId].length > 0
+          ) {
+            formData.data.fileListTwo = resOne[res.productionProcessesId].map(
+              (item) => {
+                return {
+                  raw: item,
+                  name: item.fileName,
+                  url: item.fileUrl,
+                };
+              }
+            );
+          }
+        });
+
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: [res.workOrderId],
+          fileType: 1,
+        })
+        .then((resOne) => {
+          if (resOne[res.workOrderId] && resOne[res.workOrderId].length > 0) {
+            formData.data.fileListThree = resOne[res.workOrderId].map(
+              (item) => {
+                return {
+                  raw: item,
+                  name: item.fileName,
+                  url: item.fileUrl,
+                };
+              }
+            );
+          }
+        });
+    });
 };
 
 getList();

+ 2 - 3
src/views/JXSK/production/processConfig/handleBtn.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="handle-btn">
     <div class="icon-box">
-      <div class="icon">
+      <div class="icon" style="background:#409eff">
         <i class="iconfont icon-iconm_xitonggl"></i>
       </div>
       <div class="icon-text">工序</div>
@@ -20,7 +20,7 @@ title.value = node.store.data.label;
 //   title.value = current.label;
 // });
 </script>
-<style lang="scss">
+<style lang="scss" >
 .handle-btn {
   height: 90px;
   width: 150px;
@@ -53,7 +53,6 @@ title.value = node.store.data.label;
       height: 20px;
       width: 20px;
       border-radius: 10px;
-      background: #ff9315;
       color: #fff;
       i {
         color: #fff;

+ 1 - 1
src/views/JXSK/production/processConfig/handleBtnOne.vue

@@ -19,7 +19,7 @@ node.on("change:data", ({ current }) => {
   title.value = current.title;
 });
 </script>
-<style lang="scss">
+<style lang="scss" >
 .handle-btn {
   height: 90px;
   width: 150px;

+ 82 - 72
src/views/JXSK/production/receive/index.vue

@@ -13,8 +13,9 @@
         @get-list="getList"
       >
       </byTable> -->
-      <div style="display:flex;flex-wrap:wrap;justify-content:space-between;padding:0 30px" v-if="sourceList.data && sourceList.data.length>0">
-        <el-card class="box-card" v-for="item in sourceList.data" :key="item.id" style="width:31%;margin-top:20px;">
+      <div style="display:flex;flex-wrap:wrap;padding:0 30px" v-if="sourceList.data && sourceList.data.length>0">
+        <el-card class="box-card" v-for="(item,index) in sourceList.data" :key="item.id" style="width:32%;margin-top:20px;"
+                 :style="{marginLeft:(index+1) % 3==1?'':'2%'}">
           <div style="display:flex;flex-wrap:wrap;justify-content:space-between;padding-left: 10px;align-items:center">
             <div style="flex:1">
               <div>
@@ -180,12 +181,12 @@ const config = computed(() => {
         prop: "productionProcessesName",
       },
     },
-    {
-      attrs: {
-        label: "前道工序",
-        prop: "previousProcessesName",
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "前道工序",
+    //     prop: "previousProcessesName",
+    //   },
+    // },
 
     {
       attrs: {
@@ -272,16 +273,16 @@ const formConfig = computed(() => {
         width: "50%",
       },
     },
-    {
-      type: "input",
-      itemType: "text",
-      prop: "previousProcessesName",
-      label: "前道工序",
-      disabled: true,
-      style: {
-        width: "50%",
-      },
-    },
+    // {
+    //   type: "input",
+    //   itemType: "text",
+    //   prop: "previousProcessesName",
+    //   label: "前道工序",
+    //   disabled: true,
+    //   style: {
+    //     width: "50%",
+    //   },
+    // },
     {
       type: "date",
       itemType: "date",
@@ -423,62 +424,71 @@ const getDtl = (row) => {
   }
   formOption.disabled = true;
   formData.data = { ...row };
-  proxy.post("/productionTaskDetail/detail", { id: row.id }).then((res) => {
-    if (
-      res.productionTaskDetailRecordList &&
-      res.productionTaskDetailRecordList.length > 0
-    ) {
-      let id = res.previousProcessesRecordId;
-      proxy.post("/fileInfo/getList", { businessIdList: [id] }).then((res) => {
-        if (res[id] && res[id].length > 0) {
-          formData.data.fileList = res[id].map((item) => {
-            return {
-              raw: item,
-              name: item.fileName,
-              url: item.fileUrl,
-            };
-          });
-        }
-      });
-    }
-    proxy
-      .post("/fileInfo/getList", {
-        businessIdList: [res.productionProcessesId],
-      })
-      .then((resOne) => {
-        if (
-          resOne[res.productionProcessesId] &&
-          resOne[res.productionProcessesId].length > 0
-        ) {
-          formData.data.fileListTwo = resOne[res.productionProcessesId].map(
-            (item) => {
-              return {
-                raw: item,
-                name: item.fileName,
-                url: item.fileUrl,
-              };
+  proxy
+    .post("/productionTaskDetail/detail", {
+      id: row.id,
+      taskProgressId: row.taskProgressId,
+    })
+    .then((res) => {
+      if (
+        res.productionTaskDetailRecordList &&
+        res.productionTaskDetailRecordList.length > 0
+      ) {
+        let id = res.previousProcessesRecordId;
+        proxy
+          .post("/fileInfo/getList", { businessIdList: [id] })
+          .then((res) => {
+            if (res[id] && res[id].length > 0) {
+              formData.data.fileList = res[id].map((item) => {
+                return {
+                  raw: item,
+                  name: item.fileName,
+                  url: item.fileUrl,
+                };
+              });
             }
-          );
-        }
-      });
-
-    proxy
-      .post("/fileInfo/getList", {
-        businessIdList: [res.workOrderId],
-        fileType: 1,
-      })
-      .then((resOne) => {
-        if (resOne[res.workOrderId] && resOne[res.workOrderId].length > 0) {
-          formData.data.fileListThree = resOne[res.workOrderId].map((item) => {
-            return {
-              raw: item,
-              name: item.fileName,
-              url: item.fileUrl,
-            };
           });
-        }
-      });
-  });
+      }
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: [res.productionProcessesId],
+        })
+        .then((resOne) => {
+          if (
+            resOne[res.productionProcessesId] &&
+            resOne[res.productionProcessesId].length > 0
+          ) {
+            formData.data.fileListTwo = resOne[res.productionProcessesId].map(
+              (item) => {
+                return {
+                  raw: item,
+                  name: item.fileName,
+                  url: item.fileUrl,
+                };
+              }
+            );
+          }
+        });
+
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: [res.workOrderId],
+          fileType: 1,
+        })
+        .then((resOne) => {
+          if (resOne[res.workOrderId] && resOne[res.workOrderId].length > 0) {
+            formData.data.fileListThree = resOne[res.workOrderId].map(
+              (item) => {
+                return {
+                  raw: item,
+                  name: item.fileName,
+                  url: item.fileUrl,
+                };
+              }
+            );
+          }
+        });
+    });
 
   dialogVisible.value = true;
 };

+ 44 - 13
src/views/JXSK/production/schedule/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
-               :selectConfig="selectConfig" :table-events="{}" :action-list="[]" :onMoreSearch="true" @moreSearch="clickMoreSearch"
-               @get-list="getList">
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :tableHeight="tableHeight"
+               highlight-current-row :selectConfig="selectConfig" :table-events="{}" :action-list="[]" :onMoreSearch="true"
+               @moreSearch="clickMoreSearch" @get-list="getList">
         <template #finishStatus="{ item }">
           <div>
             <span style="padding: 4px; color: #fff" :class="[item.finishStatus == 1 ? 'active' : 'disActive']">
@@ -12,6 +12,16 @@
               }}</span>
           </div>
         </template>
+        <template #productionProcessesName="{item}">
+          <div style="width:100%">
+            <span v-for="(x, i) in item.taskProgressList" :key="i">
+              {{ x.processesName }}
+              <span v-if="x.personLiableName">({{x.personLiableName}})</span>
+              <span v-if="i + 1 < item.taskProgressList.length">,
+              </span>
+            </span>
+          </div>
+        </template>
       </byTable>
     </div>
     <el-dialog :title="'高级检索'" v-model="dialogVisible" width="700" v-loading="loading" destroy-on-close>
@@ -118,6 +128,19 @@ import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import TitleInfo from "@/components/TitleInfo/index.vue";
 
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  if (window.innerHeight >= 920) {
+    tableHeight.value = 650;
+  } else {
+    tableHeight.value = 550;
+  }
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
+
 const { proxy } = getCurrentInstance();
 const loading = ref(false);
 const submitLoading = ref(false);
@@ -268,18 +291,25 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "当前工序名称",
-        prop: "productionProcessesName",
-        width: 120,
-      },
-    },
-    {
-      attrs: {
-        label: "当前工序负责人",
-        prop: "personLiableName",
-        width: 130,
+        label: "当前工序",
+        slot: "productionProcessesName",
+        width: 200,
       },
     },
+    // {
+    //   attrs: {
+    //     label: "当前工序名称",
+    //     prop: "productionProcessesName",
+    //     width: 120,
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     label: "当前工序负责人",
+    //     prop: "personLiableName",
+    //     width: 130,
+    //   },
+    // },
     {
       attrs: {
         label: "完成状态",
@@ -303,6 +333,7 @@ const config = computed(() => {
         label: "操作",
         width: "80",
         align: "center",
+        fixed: "right",
       },
       renderHTML(row) {
         return [

+ 1 - 1
src/views/JXSK/production/task/index.vue

@@ -570,7 +570,7 @@ const handlePrint = (row) => {
     key = key.padStart(3, "0");
     let obj = {
       productSn: code + "-" + key,
-      url: "139.9.102.170:10020/jxst/pro/qr?sn=" + code + "-" + key,
+      url: "139.9.102.170:10021/jxst/pro/qr?sn=" + code + "-" + key,
     };
     arr.push(obj);
   }

+ 18 - 17
src/views/JXSK/production/workOrder/index.vue

@@ -123,7 +123,7 @@
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #slot>
           <div style="width: 100%;display:flex">
-            <div style="width:50%;padding-right:10px" v-if="submitType==1 || submitType=='all'">
+            <div style="padding-right:10px" v-if="submitType==1 || submitType=='all'" :style="{ width: submitType=='all'  ? '50%' : '100%' }">
               <div style="color: red; font-size: 14px">
                 注意:这是单个产品的物料
               </div>
@@ -149,7 +149,7 @@
                 </el-table-column>
               </el-table>
             </div>
-            <div style="width:50%;padding-left:10px" v-if="submitType==2 || submitType=='all'">
+            <div style="padding-left:10px" v-if="submitType==2 || submitType=='all'" :style="{ width: submitType=='all'  ? '50%' : '100%' }">
               <div style="color: red; font-size: 14px">
                 注意:这是单个产品的物料
               </div>
@@ -424,11 +424,11 @@ const isComplete = ref([
   },
 ]);
 const selectConfig = computed(() => [
-  {
-    label: "工单来源",
-    prop: "source",
-    data: workOrderSource.value,
-  },
+  // {
+  //   label: "工单来源",
+  //   prop: "source",
+  //   data: workOrderSource.value,
+  // },
   {
     label: "是否定制",
     prop: "isCustomized",
@@ -443,16 +443,16 @@ const selectConfig = computed(() => [
 
 const config = computed(() => {
   return [
-    {
-      attrs: {
-        label: "工单来源",
-        prop: "source",
-        width: 100,
-      },
-      render(source) {
-        return proxy.dictValueLabel(source, workOrderSource.value);
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "工单来源",
+    //     prop: "source",
+    //     width: 100,
+    //   },
+    //   render(source) {
+    //     return proxy.dictValueLabel(source, workOrderSource.value);
+    //   },
+    // },
     {
       attrs: {
         label: "销售单号",
@@ -533,6 +533,7 @@ const config = computed(() => {
         label: "工作",
         slot: "work",
         width: 300,
+        fixed: "right",
       },
     },
     {

+ 2 - 1
src/views/JXSK/salesMange/contract/index.vue

@@ -941,11 +941,12 @@ const clickOutBound = () => {
     const iele = outBoundData.value.list[i];
     if (iele.checkList && iele.checkList.length > 0) {
       for (let j = 0; j < iele.checkList.length; j++) {
-        const jele = iele.checkList[i];
+        const jele = iele.checkList[j];
         productionTaskDetailList.push(iele.obj[jele]);
       }
     }
   }
+  return;
 
   ElMessageBox.confirm(`你确定提交出库吗?`, "提示", {
     confirmButtonText: "确定",

+ 98 - 50
src/views/production/project/technology/index.vue

@@ -13,23 +13,28 @@
           },
         ]" @get-list="getList">
         <template #line="{ item }">
-          <span v-for="(x, i) in item.processRouteNameList" :key="i">
-            {{ x }}
-            <span style="margin: 0 3px" v-if="i + 1 < item.processRouteNameList.length"> ,
+          <div style="width:100%">
+            <span v-for="(x, i) in item.processRouteNameList" :key="i">
+              {{ x }}
+              <span style="margin: 0 3px" v-if="i + 1 < item.processRouteNameList.length"> ,
+              </span>
             </span>
-          </span>
+          </div>
         </template>
         <template #product="{ item }">
-          <span v-for="(x, i) in item.applicableProductsNameList" :key="i">
-            {{ x }}
-            <span v-if="i + 1 < item.applicableProductsNameList.length">,
+          <div style="width:100%">
+            <span v-for="(x, i) in item.applicableProductsNameList" :key="i">
+              {{ x }}
+              <span v-if="i + 1 < item.applicableProductsNameList.length">,
+              </span>
             </span>
-          </span>
+          </div>
+
         </template>
       </byTable>
     </div>
-    <el-dialog :title="modalType == 'add' ? '添加工艺' : '编辑工艺'" v-model="dialogVisible" width="90%" v-loading="loading" destroy-on-close>
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
+    <el-dialog :title="modalType == 'add' ? '添加工艺' : '编辑工艺'" v-model="dialogVisible" width="90%" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform" v-loading="submitLoading">
         <!-- <template #lineSlot>
           <el-transfer v-model="selectLine" filterable filter-placeholder="搜索" :data="lineData" :titles="['可选', '已选']" target-order="push">
             <template #default="{ option }">
@@ -62,6 +67,27 @@
           </div>
 
         </template>
+
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog v-model="openProduct" title="选择产品" width="70%" append-to-body>
+      <SelectProduct @handleSelect="handleSelect" :isTechnology="'0'"></SelectProduct>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="openProduct = false">取消</el-button>
+        </span>
+      </template>
+    </el-dialog>
+
+    <el-dialog :title=" '工艺适用产品'" v-model="dialogVisibleOne" width="50%" destroy-on-close>
+      <byForm :formConfig="formConfigOne" :formOption="formOption" v-model="formData.dataOne" ref="byformOne" v-loading="submitLoading">
         <template #productSlot>
           <div>
             <el-button type="primary" @click="openProduct = true">
@@ -73,22 +99,16 @@
             </div>
           </div>
         </template>
+
       </byForm>
       <template #footer>
-        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
+        <el-button @click="dialogVisibleOne = false" size="large">取 消</el-button>
+        <el-button type="primary" v-no-double-click="submitFormOne" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
-    <el-dialog v-model="openProduct" title="选择产品" width="70%" append-to-body>
-      <SelectProduct @handleSelect="handleSelect" :isTechnology="'0'"></SelectProduct>
-      <template #footer>
-        <span class="dialog-footer">
-          <el-button @click="openProduct = false">取消</el-button>
-        </span>
-      </template>
-    </el-dialog>
+
   </div>
 </template>
   
@@ -174,14 +194,12 @@ const config = computed(() => {
     {
       attrs: {
         label: "工艺路线",
-
         slot: "line",
       },
     },
     {
       attrs: {
         label: "适用产品",
-
         slot: "product",
       },
     },
@@ -194,21 +212,21 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: "200",
-        align: "right",
+        width: "160",
+        align: "center",
       },
       // 渲染 el-button,一般用在最后一列。
       renderHTML(row) {
         return [
           {
             attrs: {
-              label: "修改",
+              label: "产品",
               type: "primary",
               text: true,
             },
             el: "button",
             click() {
-              getDtl(row);
+              updateProduct(row);
             },
           },
           {
@@ -255,8 +273,8 @@ let formData = reactive({
     name: "",
     processRouteList: [],
     remarks: "",
-    productList: [],
   },
+  dataOne: {},
 });
 const formOption = reactive({
   inline: true,
@@ -278,11 +296,11 @@ const formConfig = computed(() => {
       slotName: "lineSlot",
       label: "工艺路线",
     },
-    {
-      type: "slot",
-      slotName: "productSlot",
-      label: "适用产品",
-    },
+    // {
+    //   type: "slot",
+    //   slotName: "productSlot",
+    //   label: "适用产品",
+    // },
     {
       type: "input",
       prop: "remarks",
@@ -291,6 +309,15 @@ const formConfig = computed(() => {
     },
   ];
 });
+const formConfigOne = computed(() => {
+  return [
+    {
+      type: "slot",
+      slotName: "productSlot",
+      label: "适用产品",
+    },
+  ];
+});
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
@@ -323,33 +350,17 @@ const openModal = () => {
   modalType.value = "add";
   formData.data = {};
   selectLine.value = [];
-  productList.value = [];
 };
 const vueFlowDom = ref(null);
 const nodeObject = ref("");
 const submitForm = () => {
   byform.value.handleSubmit((valid) => {
-    // if (!selectLine.value.length > 0)
-    //   return ElMessage({
-    //     message: "请添加工艺路线",
-    //     type: "info",
-    //   });
-
-    if (!productList.value.length > 0)
-      return ElMessage({
-        message: "请添加适用产品",
-        type: "info",
-      });
     const data = vueFlowDom.value.submitAll();
     if (!data) {
       return;
     }
     formData.data.nodeObject = data.nodeObject;
     submitLoading.value = true;
-    // formData.data.processRouteList = selectLine.value; //选择的工序数据
-    formData.data.productList = productList.value.map((x) => ({
-      productId: x.id,
-    })); //选择的产品数据
     proxy.post("/technology/" + modalType.value, formData.data).then(
       (res) => {
         ElMessage({
@@ -358,17 +369,42 @@ const submitForm = () => {
         });
         dialogVisible.value = false;
         submitLoading.value = false;
-
         getList();
       },
       (err) => {
-        console.log(err, "aswwwww");
         submitLoading.value = false;
       }
     );
   });
 };
 
+const submitFormOne = () => {
+  if (!productList.value.length > 0)
+    return ElMessage({
+      message: "请添加适用产品",
+      type: "info",
+    });
+  formData.dataOne.productList = productList.value.map((x) => ({
+    productId: x.id,
+  }));
+  //选择的产品数据
+  submitLoading.value = true;
+  proxy.post("/technology/editProduct", formData.dataOne).then(
+    (res) => {
+      ElMessage({
+        message: "操作成功",
+        type: "success",
+      });
+      dialogVisibleOne.value = false;
+      submitLoading.value = false;
+      getList();
+    },
+    (err) => {
+      submitLoading.value = false;
+    }
+  );
+};
+
 const getDtl = (row) => {
   modalType.value = "edit";
   proxy.post("/technology/detail", { id: row.id }).then((res) => {
@@ -380,6 +416,18 @@ const getDtl = (row) => {
   });
 };
 
+const dialogVisibleOne = ref(false);
+const updateProduct = (row) => {
+  proxy.post("/technology/detail", { id: row.id }).then((res) => {
+    productList.value = res.applicableProductsList;
+    formData.dataOne = {
+      id: row.id,
+      productList: [],
+    };
+    dialogVisibleOne.value = true;
+  });
+};
+
 const productList = ref([]);
 
 const handleSelect = (row) => {

+ 1 - 1
src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue

@@ -72,7 +72,7 @@
                 {{btnTitle}}
               </div>
               <el-input v-model="scanValue" type="password" :disabled="!isScan" ref="scanInput" @change="handleScanValueChange" @blur="handleScanBlur"
-                        class="input" />
+                        class="input" autocomplete="off" />
             </div>
           </el-card>
         </div>

+ 1 - 1
src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue

@@ -75,7 +75,7 @@
                 {{btnTitle}}
               </div>
               <el-input v-model="scanValue" type="password" :disabled="!isScan" ref="scanInput" @change="handleScanValueChange" @blur="handleScanBlur"
-                        class="input" />
+                        class="input" autocomplete="off" />
             </div>
           </el-card>
         </div>

+ 70 - 27
src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue

@@ -89,7 +89,7 @@
                 {{btnTitle}}
               </div>
               <el-input v-model="scanValue" type="password" :disabled="!isScan" ref="scanInput" @change="handleScanValueChange" @blur="handleScanBlur"
-                        class="input" />
+                        class="input" autocomplete="off" />
             </div>
           </el-card>
         </div>
@@ -532,7 +532,9 @@ const submitForm = () => {
   });
 };
 const rowData = ref({});
+const showType = ref(-1);
 const clickOperation = (row) => {
+  showType.value = row.businessType;
   rowData.value = row;
   formData.data = row;
   formData.data.stockWaitDetailsList = [];
@@ -575,16 +577,27 @@ const handleScanValueChange = (val) => {
   if (val) {
     let value = val;
     let arr = [];
+    let productSn = "";
     if (value.includes("sn")) {
       arr = value.split("=");
     }
+    if (arr && arr.length > 1) {
+      productSn = arr[arr.length - 1];
+    }
     scanValue.value = "";
     timer.value && clearTimeout(timer.value);
     timer.value = setTimeout(() => {
-      if (arr.length > 1) {
+      // 销售合同出库
+      if (showType.value == 12) {
+        if (!value.includes("sn") || productSn != rowData.value.productSn) {
+          return ElMessage({
+            message: "请扫正确的二维码",
+            type: "info",
+          });
+        }
         return proxy
           .post("/productionTaskDetail/snInfo", {
-            productSn: arr[arr.length - 1],
+            productSn: productSn,
           })
           .then(
             (res) => {
@@ -609,31 +622,61 @@ const handleScanValueChange = (val) => {
             },
             (err) => {}
           );
+      } else {
+        if (value.includes("sn")) {
+          proxy
+            .post("/productionTaskDetail/snInfo", {
+              productSn: productSn,
+            })
+            .then(
+              (res) => {
+                if (res.productId != rowData.value.productId) {
+                  ElMessage({
+                    message: "请扫正确的产品",
+                    type: "info",
+                  });
+                } else {
+                  formData.data.stockWaitDetailsList.push({
+                    id: rowData.value.id,
+                    isScan: "1",
+                    productCode: res.productCode,
+                    productId: res.productId,
+                    productName: res.productName,
+                    productSpec: res.productSpec,
+                    productUnit: res.productUnit,
+                    quantity: 1,
+                    purchaseDetailId: "",
+                  });
+                }
+              },
+              (err) => {}
+            );
+        } else {
+          proxy.post("/purchaseDetail/detail", { id: value }).then(
+            (res) => {
+              if (res.bussinessId != rowData.value.productId) {
+                ElMessage({
+                  message: "请扫正确的产品",
+                  type: "info",
+                });
+              } else {
+                formData.data.stockWaitDetailsList.push({
+                  id: rowData.value.id,
+                  isScan: "1",
+                  productCode: res.productCode,
+                  productId: res.bussinessId,
+                  productName: res.productName,
+                  productSpec: res.productSpec,
+                  productUnit: res.productUnit,
+                  quantity: 1,
+                  purchaseDetailId: val,
+                });
+              }
+            },
+            (err) => {}
+          );
+        }
       }
-
-      proxy.post("/purchaseDetail/detail", { id: value }).then(
-        (res) => {
-          if (res.bussinessId != rowData.value.productId) {
-            ElMessage({
-              message: "请扫正确的产品",
-              type: "info",
-            });
-          } else {
-            formData.data.stockWaitDetailsList.push({
-              id: rowData.value.id,
-              isScan: "1",
-              productCode: res.productCode,
-              productId: res.bussinessId,
-              productName: res.productName,
-              productSpec: res.productSpec,
-              productUnit: res.productUnit,
-              quantity: 1,
-              purchaseDetailId: val,
-            });
-          }
-        },
-        (err) => {}
-      );
     }, 301);
   }
 };

+ 46 - 27
src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue

@@ -78,7 +78,7 @@
                 {{btnTitle}}
               </div>
               <el-input v-model="scanValue" type="password" :disabled="!isScan" ref="scanInput" style="ime-mode:active"
-                        @change="handleScanValueChange" @blur="handleScanBlur" class="input" />
+                        @change="handleScanValueChange" @blur="handleScanBlur" class="input" autocomplete="off" />
 
             </div>
           </el-card>
@@ -701,16 +701,28 @@ const handleScanValueChange = (val) => {
   if (val) {
     let value = val;
     let arr = [];
+    let productSn = "";
     if (value.includes("sn")) {
       arr = value.split("=");
     }
+    if (arr && arr.length > 1) {
+      productSn = arr[arr.length - 1];
+    }
     scanValue.value = "";
     timer.value && clearTimeout(timer.value);
     timer.value = setTimeout(() => {
-      if (arr.length > 1) {
+      // 完工入库
+      if (showType.value == 2) {
+        // 扫的是采购明细的码
+        if (!value.includes("sn") || productSn != rowDataOne.value.productSn) {
+          return ElMessage({
+            message: "请扫正确的二维码",
+            type: "info",
+          });
+        }
         return proxy
           .post("/productionTaskDetail/snInfo", {
-            productSn: arr[arr.length - 1],
+            productSn: productSn,
           })
           .then(
             (res) => {
@@ -735,31 +747,38 @@ const handleScanValueChange = (val) => {
             },
             (err) => {}
           );
+      } else {
+        // 扫的是sn码
+        if (value.includes("sn")) {
+          return ElMessage({
+            message: "请扫正确的二维码",
+            type: "info",
+          });
+        }
+        proxy.post("/purchaseDetail/detail", { id: value }).then(
+          (res) => {
+            if (res.bussinessId != rowDataOne.value.productId) {
+              ElMessage({
+                message: "请扫正确的产品",
+                type: "info",
+              });
+            } else {
+              formData.data.stockWaitDetailsList.push({
+                id: rowDataOne.value.id,
+                isScan: "1",
+                productCode: res.productCode,
+                productId: res.bussinessId,
+                productName: res.productName,
+                productSpec: res.productSpec,
+                productUnit: res.productUnit,
+                quantity: 1,
+                purchaseDetailId: val,
+              });
+            }
+          },
+          (err) => {}
+        );
       }
-
-      proxy.post("/purchaseDetail/detail", { id: value }).then(
-        (res) => {
-          if (res.bussinessId != rowDataOne.value.productId) {
-            ElMessage({
-              message: "请扫正确的产品",
-              type: "info",
-            });
-          } else {
-            formData.data.stockWaitDetailsList.push({
-              id: rowDataOne.value.id,
-              isScan: "1",
-              productCode: res.productCode,
-              productId: res.bussinessId,
-              productName: res.productName,
-              productSpec: res.productSpec,
-              productUnit: res.productUnit,
-              quantity: 1,
-              purchaseDetailId: val,
-            });
-          }
-        },
-        (err) => {}
-      );
     }, 301);
   }
 };