From 3a55c93d2f6405f834cc2832c0dc2f24913bef97 Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Sat, 26 Oct 2024 21:30:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=91=E9=80=9A=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/repair/stockOperate/stockOperate.js | 9 + src/views/repair/Components/StaffChoose.vue | 22 ++- .../stockOperate/Components/SoIndex.vue | 172 +++++++++++++++++- .../stockOperate/Components/WaresItem.vue | 4 +- .../tickets/Components/TicketSearch.vue | 45 +++-- .../repair/tickets/Components/TicketTable.vue | 2 +- .../repair/tickets/form/UserAndCarForm.vue | 60 +++--- 7 files changed, 260 insertions(+), 54 deletions(-) diff --git a/src/api/repair/stockOperate/stockOperate.js b/src/api/repair/stockOperate/stockOperate.js index 1571dcb..e7e4d83 100644 --- a/src/api/repair/stockOperate/stockOperate.js +++ b/src/api/repair/stockOperate/stockOperate.js @@ -52,3 +52,12 @@ export function confirmBack(id){ method: 'get' }) } + +// 采购入库 +export function inWare(data){ + return request({ + url: preUrl + "/inWare", + method: 'post', + data + }) +} diff --git a/src/views/repair/Components/StaffChoose.vue b/src/views/repair/Components/StaffChoose.vue index fee0d3b..d6408ea 100644 --- a/src/views/repair/Components/StaffChoose.vue +++ b/src/views/repair/Components/StaffChoose.vue @@ -8,6 +8,7 @@ diff --git a/src/views/repair/stockOperate/Components/WaresItem.vue b/src/views/repair/stockOperate/Components/WaresItem.vue index 46c48a6..5008948 100644 --- a/src/views/repair/stockOperate/Components/WaresItem.vue +++ b/src/views/repair/stockOperate/Components/WaresItem.vue @@ -388,7 +388,9 @@ export default { /** 保存数据 */ save(row) { // 更新表格的数据 - row.isStock = this.type ? row.waresCount <= row.wares.stock : row.waresCount <= row.waresAlreadyCount + if (row.wares) { + row.isStock = this.type ? row.waresCount <= row.wares.stock : row.waresCount <= row.waresAlreadyCount + } if (!this.type && !row.isStock) { this.$modal.msgWarning("退料数量不能超过领取数量") row.waresCount = row.waresAlreadyCount diff --git a/src/views/repair/tickets/Components/TicketSearch.vue b/src/views/repair/tickets/Components/TicketSearch.vue index 05d5032..7aa780e 100644 --- a/src/views/repair/tickets/Components/TicketSearch.vue +++ b/src/views/repair/tickets/Components/TicketSearch.vue @@ -14,16 +14,17 @@ end-placeholder="结束日期"> - - + + - + - + @@ -41,8 +42,9 @@ - - + @@ -63,8 +65,8 @@ export default { RepairTypeChoose, CorpChoose }, - props:{ - TicketType:{ + props: { + TicketType: { type: String, defaultValue: 'tp', required: true @@ -72,7 +74,7 @@ export default { }, data() { return { - queryParams:{ + queryParams: { pageNo: 1, pageSize: 10, ticketsStatus: null, @@ -85,25 +87,30 @@ export default { showSearch: true, total: 0, list: [], - isWXCW: false + isCW: false } }, mounted() { this.getPage() - this.getIsWXCW() + this.getIsCW() }, methods: { // 是否是财务 - async getIsWXCW(){ - const res = await checkRole("wxcw") - this.isWXCW = res.data + async getIsCW() { + const kjRes = await checkRole("kj") + if (kjRes.data) { + this.isCW = kjRes.data + } else { + const cnRes = await checkRole("cn") + this.isCW = cnRes.data + } }, // 类型选择 - getRepairType(data){ + getRepairType(data) { console.log(data) }, - async getPage(){ - switch (this.TicketType){ + async getPage() { + switch (this.TicketType) { case "tu": this.queryParams.ticketsStatus = "01" break @@ -121,11 +128,11 @@ export default { this.list = res.data.records this.total = res.data.total }, - handleQuery(){ + handleQuery() { this.queryParams.pageNo = 1 this.getPage() }, - handleReset(){ + handleReset() { this.resetForm("queryForm") this.queryParams.corp = null this.handleQuery() diff --git a/src/views/repair/tickets/Components/TicketTable.vue b/src/views/repair/tickets/Components/TicketTable.vue index 6de6f60..cc8e2f7 100644 --- a/src/views/repair/tickets/Components/TicketTable.vue +++ b/src/views/repair/tickets/Components/TicketTable.vue @@ -104,7 +104,7 @@ 查看 - 结算 diff --git a/src/views/repair/tickets/form/UserAndCarForm.vue b/src/views/repair/tickets/form/UserAndCarForm.vue index d9738f4..bb4b429 100644 --- a/src/views/repair/tickets/form/UserAndCarForm.vue +++ b/src/views/repair/tickets/form/UserAndCarForm.vue @@ -1,6 +1,6 @@