Prechádzať zdrojové kódy

加入参照统一接口,采购需求汇总审核接口

黄梓星 2 rokov pred
rodič
commit
ab1c2c1fbe

+ 7 - 0
src/api/purchase/DemandSummary.js

@@ -15,4 +15,11 @@ export function getSummaryDetail(data) {
     method: 'post',
     data: data
   })
+}
+// 采购需求汇总审核
+export function auditSummary(id) {
+  return request({
+    url: `/pu/demand/audit/${id}`,
+    method: 'get',
+  })
 }

+ 8 - 0
src/api/purchase/basic.js

@@ -37,4 +37,12 @@ export function delDivision(ids) {
     url: `/material/division/delete/${ids}`,
     method: 'DELETE',
   })
+}
+// 参照统一接口
+export function getRefer(data) {
+  return request({
+    url: '/refer/query',
+    method: 'post',
+    data: data
+  })
 }

+ 17 - 4
src/views/purchase/DemandSummary/index.vue

@@ -286,7 +286,7 @@
           <el-button type="primary" size="small">保存</el-button>
           <el-button type="primary" size="small">确认</el-button>
           <el-button type="primary" size="small">取消</el-button>
-          <el-button type="primary" size="small">审核</el-button>
+          <el-button type="primary" size="small" @click="audits">审核</el-button>
           <el-button type="primary" size="small">弃审</el-button>
 
           <el-dropdown size="small" @command="handleCommand">
@@ -391,7 +391,7 @@
 <script>
 import Add from './add.vue'
 import CollapseTransition from '@/components/MyCollapse/collapse.vue'
-import {getSummaryList} from '@/api/purchase/DemandSummary.js'
+import {getSummaryList, auditSummary} from '@/api/purchase/DemandSummary.js'
 export default {
   name: 'demandSummary',
   components: {
@@ -447,7 +447,7 @@ export default {
     },
     handleSelectionChange(selection) {
       console.log('选中', selection)
-      this.ids = selection.map(item => item.id)
+      this.ids = selection.map(item => item.demandItemId)
       console.log('选中数组', this.ids.join())
     },
     handleCommand(command) {
@@ -471,7 +471,20 @@ export default {
     },
     drop() {
       this.expanded = !this.expanded
-    }
+    },
+    audits() {
+      if(this.ids.length == 0) {
+        this.$modal.msgWarning("请选中至少一条数据");
+      } else {
+        let param = this.ids.join()
+        auditSummary(param).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("审核成功");
+            this.getList(this.queryParams)
+          }
+        })
+      }
+    },
   }
 }
 </script>

+ 20 - 17
src/views/purchase/PurchaseDemandList/add.vue

@@ -17,13 +17,9 @@
 
         <el-col :span="1.5">
             <el-form-item label="组织">
-              <el-input
-                v-model="basicForm.org"
-                size="small"
-                placeholder=""
-                clearable
-                style="width: 200px"
-              />
+              <el-input v-model="basicForm.org" size="small" style="width: 200px">
+               <el-button slot="append" icon="el-icon-more" @click="chooseOrg"></el-button>
+              </el-input>
             </el-form-item>
          </el-col>
 
@@ -181,7 +177,7 @@
           </el-col>
 
           <el-col :span="1.5">
-            <el-form-item label="是否特殊需求">
+            <el-form-item label="是否客户指定">
               <el-input
                 v-model="basicForm.isSpeical"
                 size="small"
@@ -192,7 +188,7 @@
             </el-form-item>
          </el-col>
 
-          <el-col :span="1.5">
+          <!-- <el-col :span="1.5">
             <el-form-item label="是否处理需求">
               <el-input
                 v-model="basicForm.isProcess"
@@ -202,7 +198,7 @@
                 style="width: 200px"
               />
             </el-form-item>
-         </el-col>
+         </el-col> -->
 
           <el-col :span="1.5">
             <el-form-item label="是否月销量计算">
@@ -305,10 +301,10 @@
           </el-table-column>
           <el-table-column label="采购员名称" align="center" prop="buyerName" />
           <el-table-column label="采购员" align="center" width="150" prop="buyer" />
-          <el-table-column label="物料编码" align="center" width="120" prop="material">
+          <el-table-column label="物料编码" align="center" width="120" prop="materialCode">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input v-model="scope.row.material"/>
+                <el-input v-model="scope.row.materialCode"/>
               </el-form-item>
             </template>
           </el-table-column>
@@ -376,7 +372,7 @@
             </template>
           </el-table-column> 
           <el-table-column label="采购备注" align="center" width="150" prop="puRemark" />
-          <el-table-column label="末级供应仓库存量" align="center" width="150" prop="lastWarehouseQty" />
+          <!-- <el-table-column label="末级供应仓库存量" align="center" width="150" prop="lastWarehouseQty" /> -->
           <!-- <el-table-column label="调拨占有量" align="center" width="150" prop="superiorAllotQty"></el-table-column> -->
           <el-table-column label="最终净需求量" align="center" width="150" prop="resDemandQty">
             <template slot-scope="scope">
@@ -423,13 +419,13 @@
           </el-table-column>
           <el-table-column label="默认采购组织" align="center" width="150" prop="purOrgName" />
           <el-table-column label="默认采购组织编码" align="center" width="150" prop="puOrg" />
-          <el-table-column label="末级供应调拨待入量" align="center" width="150" prop="lastStockQty">
+          <!-- <el-table-column label="末级供应调拨待入量" align="center" width="150" prop="lastStockQty">
             <template slot-scope="scope">
               <el-form-item class="hang">
                 <el-input v-model="scope.row.lastStockQty"/>
               </el-form-item>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column label="上级供应中心现存量" align="center" width="150" prop="superiorCenterQty" />
           <el-table-column label="上级库存被调拨占用量" align="center" width="150" prop="superiorAllotQty" />
           <el-table-column label="可用量" align="center" width="150" prop="availableQty" />
@@ -469,7 +465,7 @@
             </template>
           </el-table-column>
           <!-- <el-table-column label="末级供应库存组织" align="center" width="150" prop="updateTime"></el-table-column> -->
-          <!-- <el-table-column label="上级供应中心库存组织" align="center" width="150" prop="updateTime"></el-table-column> -->
+          <el-table-column label="中心仓可用量" align="center" width="150" prop="updateTime"></el-table-column>
           <!-- <el-table-column label="调拨单号" align="center" width="150" prop="updateTime"></el-table-column> -->
           <!-- <el-table-column label="收货地址" align="center" width="150" prop="updateTime"></el-table-column> -->
           <!-- <el-table-column label="收货地址编码" align="center" width="150" prop="updateTime" /> -->
@@ -510,6 +506,7 @@
 <script>
 import Reserved from './reserved.vue'
 import {addDemand,getDemandDetail, getDemandSonDetail, editDemand} from '@/api/purchase/purchaseDemand.js'
+import {getRefer} from '@/api/purchase/basic.js'
 export default {
   name: 'addDemandList',
   props: ['pageStu','row', 'disable'],
@@ -602,7 +599,7 @@ export default {
         materialClassifyThreeName: null,
         materialClassifyFour: null,
         materialClassifyFourName: null,
-        material: null,
+        materialCode: null,
         materialName: null,
         specification: null,
         unit: null,
@@ -723,6 +720,12 @@ export default {
 	  updateReserved (val) {
       this.dialog.config = val
     },
+    chooseOrg() {
+      getRefer({type:'ORG_PARAM', search:'BB国际'}).then(res => {
+        console.log("🚀 ~ file: add.vue:725 ~ getRefer ~ res:", res)
+        
+      })
+    },
   }
 }
 </script>

+ 6 - 6
src/views/purchase/PurchaseDemandList/index.vue

@@ -40,7 +40,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="1.5">
-            <el-form-item label="是否已处理需求">
+            <el-form-item label="是否客户指定">
               <el-select v-model="queryParams.isProcess" size="small" style="width: 200px" clearable placeholder="请选择">
                 <el-option
                   v-for="item in options"
@@ -194,21 +194,21 @@
         <el-table 
           :data="tableList" 
           fit
-          max-height="680"
+          max-height="350"
           @selection-change="handleSelectionChange"
         >
           <el-table-column type="selection" width="55" />
           <el-table-column label="编码" align="center" prop="code"/>
           <el-table-column label="需求日期" align="center" width="200" prop="demandDate" />
           <el-table-column label="单据状态" align="center" prop="status" />
-          <el-table-column label="是否已处理需求" align="center" width="150" prop="isProcess" />
+          <!-- <el-table-column label="是否已处理需求" align="center" width="150" prop="isProcess" /> -->
           <el-table-column label="业务类型" align="center" width="150" prop="billType"/>
-          <el-table-column label="是否特殊需求" align="center" width="150" prop="isSpeical" />
+          <!-- <el-table-column label="是否特殊需求" align="center" width="150" prop="isSpeical" /> -->
           <el-table-column label="需求人员" align="center" width="150" prop="demandPersonalName" />
           <el-table-column label="需求客户" align="center" prop="customerName" />
           <el-table-column label="需求部门" align="center" width="150" prop="demandDeptName" />
-          <el-table-column label="供应仓库" align="center" width="120" prop="warehouseName" />
-          <el-table-column label="供应货位" align="center" width="150" prop="goodsAllocationName" />
+          <!-- <el-table-column label="供应仓库" align="center" width="120" prop="warehouseName" /> -->
+          <!-- <el-table-column label="供应货位" align="center" width="150" prop="goodsAllocationName" /> -->
           <el-table-column label="单据来源" align="center" width="150" prop="source" />
           <el-table-column label="组织" align="center" width="150" prop="orgName" />
           <el-table-column label="备注" align="center" width="150" prop="remark" />