yusheng 1 rok temu
rodzic
commit
f16455b780

+ 5 - 4
src/views/purchasingManage/inquiryManage/components/inquiryTable.vue

@@ -205,7 +205,7 @@
           style="margin-bottom: 20px"
           :prop="'resultList.' + scope.$index + '.deliveryDays'"
         >
-          <el-input v-model="scope.row.deliveryDays" disabled></el-input>
+          <el-input v-model="scope.row.deliveryDays" ></el-input>
         </el-form-item>
       </template>
       <template v-slot:guaranteePeriod="scope" v-if="status !== 'Detail'">
@@ -675,7 +675,8 @@
     methods: {
       //计算交期
       setDeliveryDays() {
-        this.form.resultList.forEach((item) => {
+        console.log(this.form.resultList)
+        this.form.resultList.forEach((item,index) => {
           let day =
             this.form.deliveryDate &&
             (new Date(this.form.deliveryDate).getTime() -
@@ -684,8 +685,8 @@
               60 /
               60 /
               24;
-
-          item.deliveryDays = Math.ceil(day) || 1;
+          this.$set(this.form.resultList[index],'deliveryDays', Math.ceil(day) || 1)
+          // item.deliveryDays =
         });
         this.$forceUpdate();
       },