Forráskód Böngészése

【采购需求单】详情-交货日期改为不可修改,交货日期=需求日期+采购周期+2由后端校验

002390 1 éve
szülő
commit
0d68b6187a

+ 22 - 1
src/views/purchase/PurchaseDemandList/add.vue

@@ -679,8 +679,8 @@
             align="center"
             field="deliveryDate"
             width="230px"
-            edit-render
           >
+            <!-- edit-render -->
             <template v-slot:edit="scope">
               <el-date-picker
                 v-model="scope.row.deliveryDate"
@@ -1611,6 +1611,27 @@ export default {
       },
     };
   },
+  watch: {
+    // "basicForm.demandDate": {
+    //   handler(nVal, oVal) {
+    //     if (nVal && nVal !== "") {
+    //       交货日期=需求日期+采购周期+2    且不允许修改
+    //       let { puDemandItemList } = this.basicForm;
+    //       this.basicForm.puDemandItemList = puDemandItemList.map((item) => {
+    //         let deliveryDate = new Date(
+    //           new Date(nVal).setDate(
+    //             new Date(nVal).getDate() + Number(item.puPeriod) + 2
+    //           )
+    //         ).Format("yyyy-MM-dd");
+    //         return {
+    //           ...item,
+    //           deliveryDate,
+    //         };
+    //       });
+    //     }
+    //   },
+    // },
+  },
   created() {
     if (this.pageStu == "check") {
       this.getDetails(this.row);

+ 0 - 2
src/views/purchase/PurchaseDemandList/index.vue

@@ -791,11 +791,9 @@ export default {
       this.referCondition.type = type;
       this.referCondition.isPage = isPage;
       this.referCondition.title = title;
-      console.log(this.referCondition, "this.referCondition");
       this.$refs.tree.init(this.referCondition);
     },
     selectionsToInput2(selection) {
-      console.log(selection, "selection");
       this.classOptions.push(selection);
       this.download.category = selection.code;
     },