From 72643a116ae04a397d5a73731e00840fc24ab294 Mon Sep 17 00:00:00 2001 From: guoxing <1369478551@qq.com> Date: Mon, 29 Jul 2024 13:36:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=87=87=E8=B4=AD=E8=AE=A2?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/Common/dictcommons.js | 25 +- src/api/purchase/purchaseOrder.js | 25 +- src/api/purchase/purchaseReview.js | 58 ++++ src/views/purchase/purchaseOrder/index.vue | 138 +++++--- .../purchaseOrder/purchaseOrderAdd.vue | 146 ++++---- .../purchaseOrder/purchaseOrderInfo.vue | 26 +- src/views/purchase/purchaseReview/index.vue | 315 ++++++++++-------- .../purchaseReview/purchaseOrderInfo.vue | 61 ++-- src/views/system/menuManage/menuManage.vue | 36 +- 9 files changed, 495 insertions(+), 335 deletions(-) create mode 100644 src/api/purchase/purchaseReview.js diff --git a/src/api/Common/dictcommons.js b/src/api/Common/dictcommons.js index 55e4512..2e4147b 100644 --- a/src/api/Common/dictcommons.js +++ b/src/api/Common/dictcommons.js @@ -21,8 +21,9 @@ export function getTypeValueList(data) { export function selAllByOrgSidPath(data) { return request({ url: '/oms/apiadmin/sysstafforg/selAllByOrgSidPath', - method: 'post', - params: data + method: 'get', + params: data, + }) } @@ -68,7 +69,10 @@ export function choiceSupplierInfo(data) { return request({ url: '/oms/apiadmin/supplierinfo/choiceSupplierInfo', method: 'get', - params: data + params: data, + headers: { + 'Content-Type': 'application/json' + } }) } @@ -84,7 +88,7 @@ export function getWareHouse(params) { // 查询所有仓库 export function getWarehouses(params) { return request({ - url: '/oms/apiadmin/base/wmswarehouseinfo/listAll', + url: '/oms/apiadmin/warehouseinfo/listAll', method: 'post', data: params, headers: { @@ -103,4 +107,17 @@ export function getWarehouseareas(data) { 'Content-Type': 'application/json' } }) + +} + +// 查询商品分页列表 +export function getGoodsListAllByOrg(params) { + return request({ + url: '/oms/apiadmin/basegoodssku/listAllByOrg', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json' + } + }) } diff --git a/src/api/purchase/purchaseOrder.js b/src/api/purchase/purchaseOrder.js index 2d7615b..b85b432 100644 --- a/src/api/purchase/purchaseOrder.js +++ b/src/api/purchase/purchaseOrder.js @@ -5,7 +5,7 @@ export default { // 查询分页列表 listPage: function(params) { return request({ - url: '/oms/apiadmin/pmspurchasebill/listPage', + url: '/oms/apiadmin/purchasebill/listPage', method: 'post', data: params, headers: { @@ -18,7 +18,7 @@ export default { // 获取添加商品列表 chooseproducts: function(params) { return request({ - url: '/oms/apiadmin/pmspurchasebill/purGoodsListPage', + url: '/oms/apiadmin/purchasebill/purGoodsListPage', method: 'post', data: params, headers: { @@ -30,7 +30,7 @@ export default { // 新增采购订单 save: function(data) { return request({ - url: '/oms/apiadmin/pmspurchasebill/save', + url: '/oms/apiadmin/purchasebill/save', method: 'POST', data: data, headers: { @@ -42,7 +42,7 @@ export default { // 详情 fetchDetailsBySid: function(data) { return request({ - url: '/oms/apiadmin/pmspurchasebill/fetchDetailsBySid/' + data, + url: '/oms/apiadmin/purchasebill/fetchDetailsBySid/' + data, method: 'get', data: data, headers: { @@ -55,7 +55,7 @@ export default { // 采购订单- 删除 deleteBySids: function(data) { return request({ - url: '/oms/apiadmin/pmspurchasebill/delBySids', + url: '/oms/apiadmin/purchasebill/delBySids', method: 'DELETE', data: data, headers: { @@ -65,4 +65,19 @@ export default { }) }, + // 采购订单- 提交 + submit: function(data) { + return request({ + url: '/oms/apiadmin/purchasebill/submit', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json', + 'token': tokens + } + }) + }, + + + } diff --git a/src/api/purchase/purchaseReview.js b/src/api/purchase/purchaseReview.js new file mode 100644 index 0000000..1471c4f --- /dev/null +++ b/src/api/purchase/purchaseReview.js @@ -0,0 +1,58 @@ +import request from '@/utils/request' +let tokens = window.sessionStorage.getItem('token'); +export default { + + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/oms/apiadmin/purchasebill/exlistPage', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json', + 'token': tokens + } + }) + }, + + // 采购明细 + fetchDetailsBySid: function(data) { + return request({ + url: '/oms/apiadmin/purchasebill/fetchDetailsBySid/' + data, + method: 'get', + data: data, + headers: { + 'Content-Type': 'application/json', + 'token': tokens + } + }) + }, + + // 查询操作记录信息 + operationrecordDetails: function(data) { + return request({ + url: '/oms/apiadmin/purchaseflownode/listPage', + method: 'post', + params: data, + headers: { + 'Content-Type': 'application/json' + } + }); + }, + + // 采购订单- 审核 + examine: function(data) { + return request({ + url: '/oms/apiadmin/purchasebill/examine', + method: 'post', + params: data, + headers: { + 'Content-Type': 'application/json', + 'token': tokens + } + }) + }, + + + +} diff --git a/src/views/purchase/purchaseOrder/index.vue b/src/views/purchase/purchaseOrder/index.vue index 18e6862..cb70117 100644 --- a/src/views/purchase/purchaseOrder/index.vue +++ b/src/views/purchase/purchaseOrder/index.vue @@ -51,7 +51,7 @@ - + @@ -101,7 +101,7 @@ - + @@ -113,15 +113,15 @@ - + - - - + + + @@ -131,7 +131,7 @@ - + @@ -227,10 +240,10 @@ import divAdd from './purchaseOrderAdd.vue' import divInfo from './purchaseOrderInfo.vue' import { - getOrgSidByPath, - getTypeValueList, + typeValues, choiceSupplierInfo, - getWarehouses + getWarehouses, + getGoodsListAllByOrg } from '@/api/Common/dictcommons' export default { components: { @@ -322,7 +335,6 @@ warehouseList: [], supplierList: [], goodsList: [], - createOrgSid: "", rowItemData: [], } }, @@ -330,23 +342,14 @@ this.$refs['btnbar'].setButtonList(this.btnList) }, created() { - - getOrgSidByPath({ - orgPath: window.sessionStorage.getItem('orgSid') - }).then((res) => { - if (res.success) { - this.createOrgSid = res.data - this.init() - } - }) + this.init() this.loadList() - }, methods: { init() { - getTypeValueList({ + typeValues({ type: 'receiveState' }).then((res) => { if (res.success) { @@ -354,7 +357,7 @@ } }) - getTypeValueList({ + typeValues({ type: 'deliveryState' }).then((res) => { if (res.success) { @@ -363,7 +366,7 @@ }) choiceSupplierInfo({ - createOrgSid: this.createOrgSid + createOrgSid: window.sessionStorage.getItem('orgSid') }).then((resp) => { if (resp.success) { this.supplierList = resp.data @@ -371,7 +374,7 @@ } }) getWarehouses({ - orgPath: window.sessionStorage.getItem('orgSid'), + orgPath: window.sessionStorage.getItem('orgSidPath'), }).then((res) => { if (res.success) { this.warehouseList = res.data @@ -380,6 +383,17 @@ } }) + getGoodsListAllByOrg({ + orgPath: window.sessionStorage.getItem('orgSidPath'), + }).then((res) => { + if (res.success) { + this.goodsList = res.data + + console.log("aaaaaa", this.goodsList); + + } + }) + }, // 合计 @@ -484,25 +498,25 @@ rowItemClick(row) { console.log("row", row); - this.rowItemData = [row]; - - req.fetchDetailsBySid(row.sid).then((resp) => { - if (resp.success) { - this.formobj = resp.data - } else { - this.$message({ - type: 'warning', - message: "数据异常。", - showClose: true - }) - } - }).catch(() => { - this.$message({ - type: 'warning', - message: "数据异常。", - showClose: true - }) - }) + // this.rowItemData = [row]; + + // req.fetchDetailsBySid(row.sid).then((resp) => { + // if (resp.success) { + // this.formobj = resp.data + // } else { + // this.$message({ + // type: 'warning', + // message: "数据异常。", + // showClose: true + // }) + // } + // }).catch(() => { + // this.$message({ + // type: 'warning', + // message: "数据异常。", + // showClose: true + // }) + // }) }, handleSelect(val) { @@ -630,6 +644,22 @@ toSubmit() { if (this.sids.length > 0) { + req.submit(this.sids).then((resp) => { + loading.close() + if (resp.success) { + this.$message({ + type: 'success', + message: resp.msg, + showClose: true + }) + this.loadList() + } else { + // 根据resp.code进行异常情况处理 + } + }).catch(e => { + loading.close() + }) + } else { this.$message({ type: 'warning', diff --git a/src/views/purchase/purchaseOrder/purchaseOrderAdd.vue b/src/views/purchase/purchaseOrder/purchaseOrderAdd.vue index db44cba..978ae14 100644 --- a/src/views/purchase/purchaseOrder/purchaseOrderAdd.vue +++ b/src/views/purchase/purchaseOrder/purchaseOrderAdd.vue @@ -114,7 +114,7 @@ - + @@ -123,9 +123,9 @@ oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" @input="calculation(scope.row,'count',$event)" /> - + @@ -157,13 +157,13 @@ oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" /> - - - - + + + + @@ -176,13 +176,13 @@ - + - +