Преглед на файлове

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!440
黄梓星 преди 1 година
родител
ревизия
caa637946f

+ 9 - 0
src/components/popover-select/components/MATERIAL_PARAM.js

@@ -29,6 +29,15 @@ export default [
     },
   },
   {
+    item: { key: "isMedicineYN", title: "医药物料", width: "auto" },
+    attr: {
+      type:'ComputedInput',
+      formatter: (prop) => {
+        return prop.isMedicine == "0" ? "Y" : "N";
+      },
+    },
+  },
+  {
     item: { key: "isDrug", title: "物料药品属性", width: "auto" },
     attr: {
       type:'ComputedInput',

+ 0 - 1
src/views/material/basicFile/details.vue

@@ -2103,7 +2103,6 @@
             this.basicData.value['rateCode'] = this.MoreDataDialog.value.code
           }
 
-
         } else if (this.MoreDataDialog.target.name == 'medcineData') {
 
           //  医药信息

+ 7 - 6
src/views/material/requisition/add.vue

@@ -258,7 +258,7 @@
               </el-col>
               <el-col :span="6">
                 <el-form-item label="近效期预警天数" prop="recentWarningPeriod"
-                              :rules="{ required: !isExp, message: '请填写近效期预警天数', trigger: 'blur' }">
+                              :rules="{ required: (basicForm.expiryDateManagerment === '0' && basicForm.nearOnsetManagerment ==='0'), message: '请填写近效期预警天数', trigger: 'blur' }">
                   <el-input type="number" min="0" :disabled="disable || isExp"
                             v-model="basicForm.recentWarningPeriod"></el-input>
                 </el-form-item>
@@ -1127,11 +1127,12 @@
         if (val == 0) {
           this.isExp = false
         } else {
-          this.basicForm.usefulLife = ''
-          this.basicForm.expiryUnitId = ''
-          this.basicForm.usefulLifeUnitId = ''
-          this.basicForm.recentWarningPeriod = ''
-          this.isExp = true
+          this.basicForm.usefulLife = '';
+          this.basicForm.expiryUnitId = '';
+          this.basicForm.usefulLifeUnitId = '';
+          this.basicForm.recentWarningPeriod = '';
+          this.basicForm.nearOnsetManagerment = '2'
+          this.isExp = true;
         }
       },
       // 选择采购组织时控制业务部门

+ 13 - 0
src/views/material/requisition/columns.js

@@ -116,6 +116,19 @@
         clearable: true,
       },
     },
+    // { 
+    //   item: { key: "createName", title: "创建人" ,width:150, }, 
+    //   attr: {
+    //     is: "el-popover-select-v2",
+    //     referName: "CONTACTS_PARAM",
+    //     valueKey: "name",
+    //     dataMapping: {
+    //       create: "code",
+    //     },
+    //     clearable: true,
+    //   } 
+    // },
+    
     // {
     //   item: { key: "createTimeString", title: "申请时间" },
     //   attr: {

+ 2 - 2
src/views/material/requisition/index.vue

@@ -29,11 +29,11 @@
           
           <el-button-group >
             <el-button :size="size" @click="handleImport">批量导入</el-button>
-            <el-button  
+            <!-- <el-button  
             :size="size"
               @click="handleDownload" 
               v-hasPermi="['system:apply:export']"
-            >批量导出</el-button>
+            >批量导出</el-button> -->
             <el-button :size="size" @click="handleBatchSubmit">批量提交</el-button>
           </el-button-group>
         </el-col>

+ 23 - 0
src/views/purchase/purchase-order/add/column copy.js

@@ -0,0 +1,23 @@
+
+// 集采中心
+const PurColumns =[];
+const PurchaseTabColumns =[];
+
+// 事业发展部
+const CauseColumns =[];
+const CauseTabColumns =[];
+// export const initTabColumns = () => tabColumns;
+
+export const Columns = [];
+export const TabColumns = [];
+
+const judgeColumns = () =>{
+
+  const { deptName, deptId, name, nickName, roles } = this.$store.state.user;
+
+  if(roles.length && roles.find(role => role === '')){
+
+  }
+
+
+}

+ 18 - 1
src/views/purchase/purchase-order/add/column.js

@@ -557,7 +557,7 @@ export const TabColumns = [
           materialManufacturersCode:'manufacturersMaterialCode',
           specification:'specification',
           model:'model',
-          isMedcine:'isMedicine',
+          isMedcine:'isMedicineYN',
           manufacturer:'manufacturerId',
           manufacturerName:'manufacturerIdName',
           unit:'unitId',
@@ -709,6 +709,23 @@ export const TabColumns = [
         width: 180,
        },
       { 
+        key: "nitemdiscountrate", 
+        title: "折扣(%)", 
+        inputType: "Input",
+        // precision:2,
+        disabled:true,
+        width: 180,
+       },
+      { 
+        key: "ntaxnetprice", 
+        title: "含税净价", 
+        inputType: "Input",
+        controlsPosition: "right",
+        // precision:2,
+        disabled:true,
+        width: 180,
+       },
+      { 
         key: "arrivalQty",
         title: "已到货数量",
         inputType: "InputNumber",

+ 33 - 31
src/views/purchase/purchase-order/add/index.vue

@@ -70,8 +70,9 @@ export default {
     "params.billType":{
       handler(nVal, oVal){
 
-        if((nVal === '21-Cxx-02' || nVal === '21-Cxx-04'  || nVal === '21-Cxx-10' || nVal === '21-Cxx-14')){
-
+        let billList = ['21-Cxx-02','21-Cxx-04','21-Cxx-10','21-Cxx-14','21-Cxx-09','21-Cxx-17','21-Cxx-18'];
+        
+        if(billList.find(item => item === nVal)){
           this.rules.warehouseName = [
             { required: true, message: "WMS入库仓库不能为空", trigger: "change" },
           ];
@@ -83,6 +84,7 @@ export default {
           this.rules.warehouseName = null;
           this.rules.goodsAllocationName = null;
         }
+
         this.count++;
       }
     }
@@ -388,37 +390,37 @@ export default {
         
       }
 
-      // // 组织
-      // if(type === 'ORG_PARAM'){
-
-      //     for (const key in this.params) {
-
-      //       // if (Array.isArray(this.params[key])) {
-      //       if (key === 'puOrderItemList' || key === 'puOrderExecuteList') {
-
-      //         this.params[key] = [];
-
-      //       }
-      //       else if(key === 'sysFileRecordList'){
-      //         this.params[key] = [];
-      //       }
-      //        else if (
-      //         key != "puOrg" &&
-      //         key != "puOrgName" &&
-      //         key != "buyer" &&
-      //         key != "buyerName" &&
-      //         key != "puDept" &&
-      //         key != "puDeptName" &&
-      //         key != "status" &&
-      //         key != "billDate" 
-      //       ) {
-      //         this.params[key] = "";
-      //       } else {
-      //       }
-      //     }
+      // 组织
+      if(type === 'ORG_PARAM'){
+
+          for (const key in this.params) {
+
+            // if (Array.isArray(this.params[key])) {
+            if (key === 'puOrderItemList' || key === 'puOrderExecuteList') {
+
+              this.params[key] = [];
+
+            }
+            else if(key === 'sysFileRecordList'){
+              this.params[key] = [];
+            }
+             else if (
+              key != "puOrg" &&
+              key != "puOrgName" &&
+              key != "buyer" &&
+              key != "buyerName" &&
+              key != "puDept" &&
+              key != "puDeptName" &&
+              key != "status" &&
+              key != "billDate" 
+            ) {
+              this.params[key] = "";
+            } else {
+            }
+          }
         
 
-      // }
+      }
     },
 
     // 下拉框选择改变

+ 39 - 3
src/views/purchase/purchase-order/edit/index.vue

@@ -60,8 +60,9 @@ export default {
     "params.billType":{
       handler(nVal, oVal){
 
-        if((nVal === '21-Cxx-02' || nVal === '21-Cxx-04'  || nVal === '21-Cxx-10' || nVal === '21-Cxx-14')){
-
+        let billList = ['21-Cxx-02','21-Cxx-04','21-Cxx-10','21-Cxx-14','21-Cxx-09','21-Cxx-17','21-Cxx-18'];
+        
+        if(billList.find(item => item === nVal)){
           this.rules.warehouseName = [
             { required: true, message: "WMS入库仓库不能为空", trigger: "change" },
           ];
@@ -73,9 +74,10 @@ export default {
           this.rules.warehouseName = null;
           this.rules.goodsAllocationName = null;
         }
+
         this.count++;
       }
-    },
+    }
   },
   methods: {
     setVisible(prop) {
@@ -343,6 +345,40 @@ export default {
 
           await this.handleGetPrice();
         }
+
+      
+      }
+
+      // 组织
+      if(type === 'ORG_PARAM'){
+
+        for (const key in this.params) {
+
+          // if (Array.isArray(this.params[key])) {
+          if (key === 'puOrderItemList' || key === 'puOrderExecuteList') {
+
+            this.params[key] = [];
+
+          }
+          else if(key === 'sysFileRecordList'){
+            this.params[key] = [];
+          }
+          else if (
+            key != "puOrg" &&
+            key != "puOrgName" &&
+            key != "buyer" &&
+            key != "buyerName" &&
+            key != "puDept" &&
+            key != "puDeptName" &&
+            key != "status" &&
+            key != "billDate" 
+          ) {
+            this.params[key] = "";
+          } else {
+          }
+        }
+
+
       }
     },
     // 子表参照改变之后

+ 4 - 4
src/views/purchase/purchase-order/index.vue

@@ -368,9 +368,9 @@ export default {
               cancelButtonText: '取消',
               beforeClose: async(action, instance, done) => {
                 if (action === 'confirm') {
+                  instance.confirmButtonLoading = true;
+                  instance.confirmButtonText = '执行中...';
                   try {
-                    instance.confirmButtonLoading = true;
-                    instance.confirmButtonText = '执行中...';
                     let { code,msg } = await orderApi.submit({ puOrderIds,checkAmount:false});
                     if(code == 200){
                       done();
@@ -378,7 +378,7 @@ export default {
                     }
                     
                   } catch (error) {
-                    
+                    instance.confirmButtonText = "确认";
                   }finally{
                     instance.confirmButtonLoading = false;
                   }
@@ -395,7 +395,7 @@ export default {
         finally{
           this.loading = false;
         }
-        })
+      })
      
     },