From c28fcbab24e720fca99d6430b3b862652c6e4e8a Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Wed, 6 Nov 2024 17:13:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E8=B4=AD=E5=88=B0=E8=B4=A7=E6=96=B0?= =?UTF-8?q?=E5=A2=9E2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/purchase/goodsArrived.js | 11 ++++++-- .../goodsArrived/component/addTools.vue | 26 +++++++------------ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/api/purchase/goodsArrived.js b/src/api/purchase/goodsArrived.js index bfbd1ea4..bd69985a 100644 --- a/src/api/purchase/goodsArrived.js +++ b/src/api/purchase/goodsArrived.js @@ -27,6 +27,15 @@ export function addPurchaseCheckInfo(data) { }) } +// 新购到货-编辑 +export function updatePurchaseCheckInfo(data) { + return request({ + url: '/material/purchase_check_info', + method: 'put', + data: data, + }) +} + //通知人员列表 export function getNoticePeople(query) { return request({ @@ -44,8 +53,6 @@ export function delPeople(ids) { }) } - - // 人员管理--新增 export function addNoticeUser(data) { return request({ diff --git a/src/views/material/purchase/goodsArrived/component/addTools.vue b/src/views/material/purchase/goodsArrived/component/addTools.vue index 73936a24..0a66bc2e 100644 --- a/src/views/material/purchase/goodsArrived/component/addTools.vue +++ b/src/views/material/purchase/goodsArrived/component/addTools.vue @@ -40,7 +40,7 @@ @@ -630,7 +629,7 @@ export default { this.maForm.remark = response.data.purchaseCheckInfo.remark this.maForm.taxRate = response.data.purchaseCheckInfo.taxRate // this.maForm.purchaseNumber = response.data.purchaseNumber - this.maForm.productionTime = response.data.purchaseCheckInfo.productionTime + // this.maForm.productionTime = response.data.purchaseCheckInfo.productionTime this.equipmentList = response.data.purchaseCheckDetailsList console.log(this.equipmentList) // this.loading = false; @@ -730,11 +729,8 @@ export default { if (this.equipmentList.length > 0) { this.$refs['maForm'].validate((valid) => { if (valid) { - this.maForm.taskId = this.taskId - this.maForm.checkDetailsList = this.equipmentList - // console.log(this.maForm) - if (this.equipmentList.length > 0) { + // this.maForm.checkDetailsList = this.equipmentList this.$modal .confirm('是否确认保存当前页面') .then(function () {}) @@ -743,7 +739,7 @@ export default { console.log('编辑') this.loading = true updatePurchaseCheckInfo( - this.maForm, + {purchaseCheckDetailsList: this.equipmentList,purchaseCheckInfo:this.maForm} ).then((response) => { if (response.code == 200) { this.$modal.msgSuccess( @@ -763,7 +759,7 @@ export default { console.log('新增') this.loading = true addPurchaseCheckInfo( - {purchaseCheckDetailsList: this.maForm.checkDetailsList,purchaseCheckInfo:this.maForm} + {purchaseCheckDetailsList: this.equipmentList,purchaseCheckInfo:this.maForm} ).then((response) => { if (response.code == 200) { this.$modal.msgSuccess( @@ -782,14 +778,12 @@ export default { } }) .catch(() => {}) - } else { - this.$modal.msgError( - '请先选择并添加机具类型!!!', - ) - } + } }) + } else { + this.$modal.msgError('请先添加机具类型') } },