Browse Source

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!430
黄梓星 1 year ago
parent
commit
722cf43c07

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

@@ -974,7 +974,7 @@
       },
       // 切换副表信息
       handleViceTabClick(e) {
-        console.log(this.basicMessage[e.index], '切换标签');
+        // console.log(this.basicMessage[e.index], '切换标签');
         this.activeViceTab = this.basicMessage[e.index].code;
 
         switch (this.activeViceTab) {

+ 1 - 1
src/views/material/basicFile/index.vue

@@ -464,7 +464,7 @@
 
       // 删除文件
       handleFileRemove(file, fileList) {
-        console.log('删除文件', file, 'file', fileList, 'fileList');
+        // console.log('删除文件', file, 'file', fileList, 'fileList');
         this.importData.list = fileList;
       },
       // 文件发生改变

+ 11 - 5
src/views/material/requisition/add.vue

@@ -769,7 +769,7 @@
           // 四级分类/物料分类
           classifyId: '',
           // 是否医药物料
-          isMedicine: '2',
+          isMedicine: '0',
           // DI
           diCode: '',
           // 物料名称
@@ -1047,7 +1047,7 @@
           this.getInnerPackingUnitDetails(this.row.innerPackingUnit)
         }
       } else if (this.pageStu == 'add') {
-        // alert('新增页面')
+        this.controlMedic('0');
         console.log('页面状态', this.pageStu)
       } else if (this.pageStu === 'copy') {
         this.getDetails(this.row)
@@ -1374,7 +1374,10 @@
           })
 
           // Promise.all([form1, form2]).then(() => {
-            if (this.basicForm.isMedicine == '0' && this.sysMaterialMedcineItemApply.length == 0) {
+            if (this.basicForm.isMedicine == '0' 
+                && this.sysMaterialMedcineItemApply.length == 0 
+                // && this.basicForm.oneClass !== "资产费用&7"
+                ) {
               this.$modal.notifyWarning("医药物料需要维护物料类别!");
 
             } else {
@@ -1419,7 +1422,10 @@
           })
 
           // Promise.all([form1, form2]).then(() => {
-            if (this.basicForm.isMedicine == '0' && this.sysMaterialMedcineItemApply.length == 0) {
+            if (this.basicForm.isMedicine == '0' 
+                && this.sysMaterialMedcineItemApply.length == 0 
+                // && this.basicForm.oneClass !== "资产费用&7"
+              ) {
               this.$modal.notifyWarning("医药物料需要维护物料类别!");
             } else {
               this.$modal.loading("保存中...");
@@ -1700,7 +1706,7 @@
           console.log('内包装单位回显', res)
           if (res.code === 200) {
             this.innerPackingUnitOptions = res.data.tableBody
-            console.log('1111', this.innerPackingUnitOptions)
+            // console.log('1111', this.innerPackingUnitOptions)
           }
         })
       },

+ 38 - 25
src/views/material/requisition/index.vue

@@ -26,10 +26,16 @@
           </el-button>
         </el-col>
         <el-col :span="1.5">
-          <el-button :size="size" @click="handleImport">批量导入</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button :size="size" @click="handleBatchSubmit">批量提交</el-button>
+          
+          <el-button-group >
+            <el-button :size="size" @click="handleImport">批量导入</el-button>
+            <el-button  
+            :size="size"
+              @click="handleDownload" 
+              v-hasPermi="['system:apply:export']"
+            >批量导出</el-button>
+            <el-button :size="size" @click="handleBatchSubmit">批量提交</el-button>
+          </el-button-group>
         </el-col>
         <!-- 导入弹窗 -->
         <el-dialog 
@@ -143,10 +149,10 @@
     name: 'requisition',
     dicts:[...initDicts([...SearchColumns,...TableColumns])],
     components: {
-      addReq,
-      ElSuperTable: () => import("@/components/super-table/index.vue"),
-      ElSuperSearch: () => import("@/components/super-search/index.vue"),
-    },
+    addReq,
+    ElSuperTable: () => import("@/components/super-table/index.vue"),
+    ElSuperSearch: () => import("@/components/super-search/index.vue"),
+},
     data() {
       const params = this.$init.params(SearchColumns);
       return {
@@ -301,9 +307,16 @@
       handleImport() {
         this.importData.show = true
       },
+      // 导出
+      handleDownload(){
+        let params = {
+          ...this.params
+        };
+        this.download('/system/apply/material/export', {...params}, `物料申请单${new Date().getTime()}.xlsx`);
+      },
       // 删除文件
       handleFileRemove(file, fileList) {
-        console.log('删除文件', file, 'file', fileList, 'fileList');
+        // console.log('删除文件', file, 'file', fileList, 'fileList');
         this.importData.list = fileList;
       },
       // 文件发生改变
@@ -331,7 +344,7 @@
                   this.importData.list = [];
                   if (res.data.flag) {
                     this.failLoad = true;
-                    console.log(res.data.datas)
+                    // console.log(res.data.datas)
                     let param = {failDatas: res.data.datas}
                     if (null != param) {
 
@@ -376,11 +389,11 @@
 
         this.checkedList = selection;
 
-        console.log(this.checkedList, 'this.checkedList');
+        // console.log(this.checkedList, 'this.checkedList');
 
       },
       getList(val) {
-        console.log('val', val)
+        // console.log('val', val)
         this.failLoad = true;
         
         getReqList({...this.params,...this.pageStatus}).then(res => {
@@ -410,7 +423,7 @@
         this.checkedList = selection;
       },
       check(row) {
-        console.log('查看详情', row)
+        // console.log('查看详情', row)
         this.isList = false
         this.isComponent = 'addReq'
         this.page = 'check'
@@ -418,7 +431,7 @@
         this.disable = true
       },
       edit(row) {
-        console.log('修改先加载详情', row)
+        // console.log('修改先加载详情', row)
         this.isList = false
         this.isComponent = 'addReq'
         this.page = 'edit'
@@ -426,7 +439,7 @@
         this.disable = false
       },
       commit(row) {
-        console.log('row', row)
+        // console.log('row', row)
       },
       deleteRow(row) {
         this.$confirm('是否删除此条数据?', '提示', {
@@ -446,16 +459,16 @@
         }).catch(() => {
         })
       },
-      handleSizeChange(val) {
-        console.log(`每页 ${val} 条`);
-        this.queryParams.pageSize = val
-        this.getList(this.queryParams)
-      },
-      handleCurrentChange(val) {
-        console.log(`当前页: ${val}`);
-        this.queryParams.pageNum = val
-        this.getList(this.queryParams)
-      }
+      // handleSizeChange(val) {
+      //   console.log(`每页 ${val} 条`);
+      //   this.queryParams.pageSize = val
+      //   this.getList(this.queryParams)
+      // },
+      // handleCurrentChange(val) {
+      //   console.log(`当前页: ${val}`);
+      //   this.queryParams.pageNum = val
+      //   this.getList(this.queryParams)
+      // }
     }
   }
 </script>

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

@@ -388,37 +388,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 {
+      //       }
+      //     }
         
 
-      }
+      // }
     },
 
     // 下拉框选择改变
@@ -715,6 +715,7 @@ export default {
                 :clearable="column.clearable"
                 :placeholder="column.placeholder"
                 style="width: 100%"
+                filterable
                 @change="handleSelectChange(column.key,column.referName)"
               >
                 <el-option
@@ -865,7 +866,7 @@ export default {
                     <el-select
                       v-if="cColumn.inputType === 'Select'"
                       v-model="scope.row[cColumn.key]"
-                      
+                      filterable
                       size="mini"
                       :disabled="cColumn.disabled"
                       :clearable="cColumn.clearable"

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

@@ -63,7 +63,7 @@ export default {
     },
   },
   created() {
-    this.params.orderCode = this.$route.query.billCode
+    if(this.$route.query.billCode) this.params.orderCode = this.$route.query.billCode 
     this.fetchList(this.params, this.page);
     // this.handleRefreshList();
   },