Эх сурвалжийг харах

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!100
黄梓星 2 жил өмнө
parent
commit
a7ace74e7e

+ 10 - 4
src/components/popover-select/components/SUPPLIERCONTACTS_PARAM.js

@@ -6,15 +6,21 @@ export default [
   //   type: "Input",
   //   search: true,
   // },
+  // {
+  //   key: "code",
+  //   title: "编码",
+  //   type: "Input",
+  //   search: true,
+  // },
   {
-    key: "code",
-    title: "编码",
+    key: "name",
+    title: "名称",
     type: "Input",
     search: true,
   },
   {
-    key: "name",
-    title: "供应商联系人名称",
+    key: "cell",
+    title: "电话",
     type: "Input",
     search: true,
   },

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

@@ -201,7 +201,7 @@
           <el-table-column show-overflow-tooltip label="预留比例" align="center" prop="reservedProportion" width="150px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-select clearable :disabled="sonDisable" size="small" v-model="scope.row.reservedProportion">
+                <el-select clearable :disabled="sonDisable" size="small" v-model="scope.row.reservedProportion" @change="getYLSL(scope.$index,scope.row.reservedProportion)">
                   <el-option v-for=" dict in dict.type.sys_reserve_ratio" :key="dict.value" :label="dict.label" :value="dict.value">
                   </el-option>
                 </el-select>
@@ -263,7 +263,7 @@
           <el-table-column show-overflow-tooltip label="实际(业务)需求量" align="center"  prop="qty" width="120px">
             <template slot-scope="scope">
               <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'qty'" :rules="{ required: true, message: '请填写实际(业务)需求量', trigger: 'blur' }">
-                <el-input clearable :readonly="sonDisable" size="small" v-model="scope.row.qty"/>
+                <el-input clearable :readonly="sonDisable" size="small" v-model="scope.row.qty" @change="getYL(scope.$index, scope.row.qty)"/>
               </el-form-item>
             </template>
           </el-table-column>
@@ -598,6 +598,26 @@ export default {
           return '总供应可满足'
       }
     },
+    // 获取预留数量
+    getYLSL(index,val) {
+      if (val) {
+      let newVal = val.replace('%', '')
+      newVal = newVal/100
+      this.basicForm.puDemandItemList[index].reservedQty = newVal * this.basicForm.puDemandItemList[index].qty
+      } else {
+        this.basicForm.puDemandItemList[index].reservedQty = null
+      }
+    },
+    // 实际业务需求量获取
+    getYL(index, val) {
+      if (val && this.basicForm.puDemandItemList[index].reservedProportion) {
+        let newVal = this.basicForm.puDemandItemList[index].reservedProportion.replace('%', '')
+        newVal = newVal/100
+        this.basicForm.puDemandItemList[index].reservedQty = val * newVal
+      } else {
+        this.basicForm.puDemandItemList[index].reservedQty = null
+      }
+    },
     copy() {
       this.$modal.msgSuccess("复制成功");
       this.sonPageStu = 'add'

+ 5 - 1
src/views/purchase/purchase-order/column.js

@@ -42,7 +42,11 @@ export const TableColumns = [
   { key: "puDeptName", title: "采购部门" },
   // { key: "customer", title: "收货客户" },
   { key: "customerName", title: "收货客户" },
-  { key: "isDeliver", title: "是否发货" },
+  { 
+    key: "isDeliver", 
+    title: "是否发货",
+    inputType: 'Checkbox',
+   },
   {
     key: "isArrival",
     title: "到货超期",

+ 2 - 1
src/views/purchase/purchase-order/edit/index.vue

@@ -164,7 +164,8 @@ export default {
       this.$refs['orderEditForm'].validate(async (valid) => {
         if (valid) {
 
-          if(!this.params['puOrderItemList'].length || !this.params['puOrderExecuteList'].length){
+          // 执行结果在审批之后出现 !this.params['puOrderExecuteList'].length
+          if(!this.params['puOrderItemList'].length ){
 
             this.$message.error('请填写订单行!');
             return false;