瀏覽代碼

bug解决

cz 1 年之前
父節點
當前提交
9bbd37a793

+ 1 - 0
src/views/JXSK/production/plan/index.vue

@@ -312,6 +312,7 @@ const submitForm = () => {
         dialogVisible.value = false;
         submitLoading.value = false;
         getList();
+        getDict();
       },
       (err) => {
         console.log(err);

+ 23 - 10
src/views/JXSK/production/task/index.vue

@@ -27,6 +27,7 @@
       width="700"
       v-loading="loading"
       destroy-on-close
+      :before-close="handleClose"
     >
       <byForm
         :formConfig="formConfig"
@@ -86,7 +87,7 @@
       </byForm>
 
       <template #footer>
-        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button @click="handleClose" size="large">取 消</el-button>
         <el-button
           type="primary"
           @click="submitForm()"
@@ -261,7 +262,7 @@ const formConfig = computed(() => {
       prop: "quantity",
       label: "任务数量",
       precision: 0,
-      min: 0,
+      min: 1,
       controls: false,
     },
     {
@@ -312,7 +313,7 @@ const formConfigOne = computed(() => {
       prop: "quantity",
       label: "任务数量",
       precision: 0,
-      min: 0,
+      min: 1,
       controls: false,
     },
     {
@@ -380,11 +381,10 @@ const submitForm = () => {
           message: "添加成功",
           type: "success",
         });
-        productionProcessesList.value = [];
-        productionObj.value = {};
-        dialogVisible.value = false;
+        handleClose();
         submitLoading.value = false;
         getList();
+        getDict();
       },
       (err) => {
         console.log(err);
@@ -466,7 +466,7 @@ const getDict = () => {
 };
 getDict();
 getList();
-
+const changeId = ref("");
 const changeFn = (val) => {
   const current =
     modalType.value == "add"
@@ -480,9 +480,11 @@ const changeFn = (val) => {
     productionProcessesList.value &&
     productionProcessesList.value.length > 0
   ) {
-    let id = productionProcessesList.value[0].id;
-    const index = formConfig.value.findIndex((x) => x.slotName === id);
-    formConfig.value.splice(index, productionProcessesList.value.length);
+    // changeId.value = productionProcessesList.value[0].id;
+    // const index = formConfig.value.findIndex(
+    //   (x) => x.slotName === changeId.value
+    // );
+    formConfig.value.splice(5, productionProcessesList.value.length);
     productionProcessesList.value = [];
     productionObj.value = {};
   }
@@ -505,6 +507,17 @@ const getProductionDetails = (id) => {
     }
   });
 };
+const handleClose = () => {
+  if (
+    productionProcessesList.value &&
+    productionProcessesList.value.length > 0
+  ) {
+    formConfig.value.splice(5, productionProcessesList.value.length);
+  }
+  productionProcessesList.value = [];
+  productionObj.value = {};
+  dialogVisible.value = false;
+};
 </script>
 
 <style lang="scss" scoped>

+ 9 - 1
src/views/purchaseSales/outAndInWarehouse/record/index.vue

@@ -169,6 +169,10 @@ const typeList = ref([
     value: "15",
   },
   {
+    label: "完工入库",
+    value: "17",
+  },
+  {
     label: "采购到货",
     value: "18",
   },
@@ -180,6 +184,10 @@ const typeList = ref([
     label: "生产任务出库",
     value: "20",
   },
+  {
+    label: "工单出库",
+    value: "21",
+  },
 ]);
 const warehouseList = ref([]);
 const productUnit = ref([]);
@@ -193,7 +201,7 @@ const sourceList = ref({
     keyword: "",
     opType: "",
     productId: "",
-    warehouseId: ""
+    warehouseId: "",
   },
 });
 const loading = ref(false);

+ 4 - 0
src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue

@@ -95,6 +95,10 @@ const businessType = ref([
     label: "销售换货",
     value: 10,
   },
+  {
+    label: "工单出库",
+    value: 11,
+  },
 ]);
 const sourceList = ref({
   data: [],