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

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

002201 2 жил өмнө
parent
commit
5248be87a7

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

@@ -528,7 +528,7 @@ export default {
         demandDept: '',
         demandDate: '',
         source: '4',
-        billType: '',
+        billType: 'ZQBH',
         isSpeical: '',
         isProcess: '',
         isMonthleyCalculate: '',
@@ -670,7 +670,12 @@ export default {
                 console.log(333)
                 if (res.code === 200) {
                   this.$modal.msgSuccess("保存成功");
-                  this.back()
+                  this.$emit('jugislist', true)
+                  let queryParams = {
+                    pageNum: 1,
+                    pageSize: 10
+                  }
+                  this.$emit('refresh', queryParams)
                 }
               })
             } else if (this.sonPageStu == 'edit') {

+ 9 - 9
src/views/purchase/PurchaseDemandList/reserved.vue

@@ -71,14 +71,14 @@
       <el-table style="margin-top: 50px" :data="tableList2">
         <el-table-column show-overflow-tooltip prop="material" label="物料编码" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="materialName" label="物料名称" width="150"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="unit" label="单位" width="150"></el-table-column>
+        <!-- <el-table-column show-overflow-tooltip prop="unit" label="单位" width="150"></el-table-column> -->
         <el-table-column show-overflow-tooltip prop="unitName" label="单位名称" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="reservedQty" label="预留数量" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="reservedProportion" label="预留比例" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="reservedPeriod" label="预留周期" width="150"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="warehouse" label="仓库" width="150"></el-table-column>
+        <!-- <el-table-column show-overflow-tooltip prop="warehouse" label="仓库" width="150"></el-table-column> -->
         <el-table-column show-overflow-tooltip prop="warehouseName" label="仓库名称" width="150"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="allocation" label="货位" width="150"></el-table-column>
+        <!-- <el-table-column show-overflow-tooltip prop="allocation" label="货位" width="150"></el-table-column> -->
         <el-table-column show-overflow-tooltip prop="allocationName" label="货位名称" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="qty" label="可用量" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="usedQty" label="已用量" width="150"></el-table-column>
@@ -86,20 +86,20 @@
       <el-table style="margin-top: 50px" :data="tableList3">
         <el-table-column show-overflow-tooltip prop="material" label="物料编码" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="materialName" label="物料名称" width="150"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="unit" label="单位" width="150"></el-table-column>
+        <!-- <el-table-column show-overflow-tooltip prop="unit" label="单位" width="150"></el-table-column> -->
         <el-table-column show-overflow-tooltip prop="unitName" label="单位名称" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="reservedQty" label="预留数量" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="reservedProportion" label="预留比例" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="reservedPeriod" label="预留周期" width="150"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="deliveryWarehouse" label="调出仓库" width="150"></el-table-column>
+        <!-- <el-table-column show-overflow-tooltip prop="deliveryWarehouse" label="调出仓库" width="150"></el-table-column> -->
         <el-table-column show-overflow-tooltip prop="deliveryWarehouseName" label="调出仓库名称" width="150"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="deliveryAllocation" label="调出货位" width="150"></el-table-column>
+        <!-- <el-table-column show-overflow-tooltip prop="deliveryAllocation" label="调出货位" width="150"></el-table-column> -->
         <el-table-column show-overflow-tooltip prop="deliveryAllocationName" label="调出货位名称" width="150"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="storageWarehouse" label="调入仓库" width="150"></el-table-column>
+        <!-- <el-table-column show-overflow-tooltip prop="storageWarehouse" label="调入仓库" width="150"></el-table-column> -->
         <el-table-column show-overflow-tooltip prop="storageWarehouseName" label="调入仓库名称" width="150"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="storageAllocation" label="调入货位" width="150"></el-table-column>
+        <!-- <el-table-column show-overflow-tooltip prop="storageAllocation" label="调入货位" width="150"></el-table-column> -->
         <el-table-column show-overflow-tooltip prop="storageAllocationName" label="调入货位名称" width="150"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="allotQty" label="调拨数量" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="allotQty" label="操作数量" width="150"></el-table-column>
       </el-table>
     </el-dialog>
   </div>

+ 17 - 44
src/views/purchase/purchase-order/index.vue

@@ -8,7 +8,6 @@ import {
   initColumns,
   initDicts,
 } from "@/utils/init";
-import { async } from "q";
 
 
 export default {
@@ -52,18 +51,23 @@ export default {
     },
   },
   created() {
-    this.fetchList(this.params, this.page);
+    // this.fetchList(this.params, this.page);
+    this.handleRefreshList();
   },
   methods: {
     async fetchList(data, params) {
+
       try {
         this.loading = true;
         params['isAsc'] = 'desc';
         params['orderByColumn'] = 'updateTime';
         
         const { code, msg, rows, total } = await orderApi.list(data, params);
+
         if (code === 200) {
+
           this.page.total = total;
+
           this.tableData = rows;
         }
       } catch (err) {
@@ -86,13 +90,18 @@ export default {
     // 刷新操作
     handleRefreshList() {
       this.page = initPage();
+      this.checkedList = [];
+              
+      this.checkedTabList = [];
+
+      this.primaryResource = {};
       this.fetchList(this.params, this.page);
     },
     // 查询操作
     handleQueryList() {
       let {date} = this.params;
-        this.params.startDate = date ? date[0] :'';
-        this.params.endDate = date ? date[1] : '';
+      this.params.startDate = date ? date[0] :'';
+      this.params.endDate = date ? date[1] : '';
       this.fetchList(this.params, this.page);
     },
     // 重置操作
@@ -187,7 +196,7 @@ export default {
 
           if (code === 200) {
 
-            this.fetchList(this.params, this.page);
+            this.handleRefreshList();
 
           }
         })
@@ -209,7 +218,7 @@ export default {
  
          if (code == 200) {
  
-           this.fetchList(this.params, this.page);
+          this.handleRefreshList();
  
          }
 
@@ -234,34 +243,6 @@ export default {
     handleAllReturn() {
 
       this.handleReturn(this.checkedList[0].id,[]);
-      // this.$prompt('请输入退回原因', '提示', {
-      //     confirmButtonText: '确定',
-      //     cancelButtonText: '取消',
-      //     inputPattern: /\s*\S+?/,
-      //     inputErrorMessage: '退回原因不能为空'
-      //   }).then(async ({ value }) => {
-
-      //     let data = {
-      //       id: this.checkedList[0].id,
-      //       documentIds: [],
-      //       baskCause: value,
-      //     };
-
-      //     console.log(data);
-
-      //     try {
-
-      //       let { code, msg } = await orderApi.documentsReturn(data);
-
-      //       if (code === 200) {
-
-      //         this.fetchList(this.params, this.page);
-
-      //       }
-      //     } catch (error) {
-      //       console.log(error,'error------------');
-      //     }
-      //   }).catch(() => {   });
       
     },
      // 判断“行退回”按钮
@@ -308,13 +289,7 @@ export default {
 
             if (code === 200) {
 
-              this.fetchList(this.params, this.page);
-
-              this.checkedList = [];
-              
-              this.checkedTabList = [];
-
-              this.primaryResource = {};
+              this.handleRefreshList();
 
             }
           } catch (error) {
@@ -353,7 +328,7 @@ export default {
 
           if (code === 200) {
 
-            this.fetchList(this.params, this.page);
+            this.handleRefreshList();
 
           }
         })
@@ -365,8 +340,6 @@ export default {
       try {
         // let {name} = this.$store.state.user;
 
-
-
         let {code,msg} = await orderApi.payRequest();
 
         if(code == 200){

+ 11 - 6
src/views/purchase/transferOrder/add.vue

@@ -789,7 +789,12 @@ export default {
         addOrder(this.basicForm).then(res => {
           if (res.code === 200) {
             this.$modal.msgSuccess("保存成功");
-            this.back()
+            this.$emit('jugislist', true)
+            let queryParams = {
+              pageNum: 1,
+              pageSize: 5
+            }
+            this.$emit('refresh', queryParams)
           }
         })
       } else if (this.pageStu == 'edit') {
@@ -807,11 +812,11 @@ export default {
     },
     back() {
       this.$emit('jugislist', true)
-      let queryParams = {
-        pageNum: 1,
-        pageSize: 5
-      }
-      this.$emit('refresh', queryParams)
+      // let queryParams = {
+      //   pageNum: 1,
+      //   pageSize: 5
+      // }
+      // this.$emit('refresh', queryParams)
     },
     // 如果需要回显则调用详情接口
     getDetails(row) {