From de262f8cbef5c1f668c139c4a1da7c3bdfec4e4c Mon Sep 17 00:00:00 2001
From: niexiting <85552560@qq.com>
Date: Wed, 20 Dec 2023 10:21:36 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=87=E8=B4=AD=E9=80=80?=
=?UTF-8?q?=E8=B4=A7=E8=AE=B0=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mycomponents/record/recordComDetailCard.vue | 2 +-
pages/purchaseReturn/record/returnRecord.vue | 90 ++++++-------------
.../request/returnRequestCreate.vue | 15 ++--
3 files changed, 36 insertions(+), 71 deletions(-)
diff --git a/mycomponents/record/recordComDetailCard.vue b/mycomponents/record/recordComDetailCard.vue
index 46780f13..5911709b 100644
--- a/mycomponents/record/recordComDetailCard.vue
+++ b/mycomponents/record/recordComDetailCard.vue
@@ -16,7 +16,7 @@
+ :isShowStatus="true" :isShowPack="true" :isShowLocation="isShowLocation">
diff --git a/pages/purchaseReturn/record/returnRecord.vue b/pages/purchaseReturn/record/returnRecord.vue
index 7275566d..88bdeb15 100644
--- a/pages/purchaseReturn/record/returnRecord.vue
+++ b/pages/purchaseReturn/record/returnRecord.vue
@@ -223,39 +223,23 @@
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
console.log("提交参数", JSON.stringify(params));
//直接创建申请
- if (this.fromType == "requestType") {
- var params = this.setRequestParams();
- console.log("提交" + JSON.stringify(params))
- purchaseReturnRequestCreate(params).then(res => {
- uni.hideLoading()
- if (res.data) {
- this.showCommitSuccessMessage("提交成功
生成采购退货申请" + res.data, )
- } else {
- this.showErrorMessage("提交失败" + res.msg)
- }
- }).catch(error => {
- uni.hideLoading()
- this.showErrorMessage(error)
- })
- } else {
- //直接创建记录
- //采购退货直接出库,不用查询管理模式
- var params = this.setRecordParams(true)
- console.log("提交参数", JSON.stringify(params));
-
- purchaseReturnRecordSubmit(params).then(res => {
- uni.hideLoading()
- if (res.data) {
- this.showCommitSuccessMessage("提交成功
生成采购退货记录" + res.data)
- } else {
- this.showErrorMessage("提交失败" + res.msg)
- }
- }).catch(error => {
- uni.hideLoading()
- this.showErrorMessage(error)
- })
- }
+ //直接创建记录
+ //采购退货直接出库,不用查询管理模式
+ var params = this.setRecordParams(true)
+ console.log("提交参数", JSON.stringify(params));
+
+ purchaseReturnRecordSubmit(params).then(res => {
+ uni.hideLoading()
+ if (res.data) {
+ this.showCommitSuccessMessage("提交成功
生成采购退货记录" + res.data)
+ } else {
+ this.showErrorMessage("提交失败" + res.msg)
+ }
+ }).catch(error => {
+ uni.hideLoading()
+ this.showErrorMessage(error)
+ })
} else {
this.showErrorMessage("没有要提交的数据")
}
@@ -272,50 +256,30 @@
if (detail.scaned) {
detail.itemCode = detail.itemCode;
detail.inventoryStatus = detail.inventoryStatus;
- detail.packingNumber = detail.packingNumber;
- detail.containerNumber = detail.containerNumber;
- detail.batch = detail.batch;
+
+ detail.fromPackingNumber = detail.packingNumber;
+ detail.toPackingNumber = detail.packingNumber;;
+
+ detail.fromContainerNumber = detail.containerNumber;
+ detail.toContainerNumber = detail.containerNumber
+
+ detail.fromBatch = detail.batch;
+ detail.toBatch = detail.batch;
detail.fromLocationCode = this.fromLocationCode;
detail.toLocationCode = ''; //采购退货直接出库,目标库位为空
+ detail.package = null;
subList.push(detail)
}
})
})
this.dataContent.subList = subList
+
// this.dataContent.jobNumber = '';
return this.dataContent;
},
- setRequestParams() {
- var subList = []
- var supplierCode = ""
- this.detailSource.forEach(item => {
- item.subList.forEach(detail => {
- if (detail.scaned) {
- if (supplierCode == "") {
- supplierCode = detail.package.supplierCode
- }
- subList.push(detail)
- }
- })
- })
-
- this.dataContent.subList = subList
- this.dataContent.purchaseReceiptRecordNumber = "";
- this.transferMode = "";
-
- this.dataContent.supplierCode = supplierCode
- this.dataContent.businessType = "PurchasePutaway"
- this.dataContent.departmentCode = "研发部门";
- this.dataContent.status = 1;
- this.dataContent.autoCommit = "FALSE";
- this.dataContent.autoAgree = "FALSE";
- this.dataContent.autoExecute = "FALSE";
- this.dataContent.directCreateRecord = "FALSE";
- return this.dataContent;
- },
showMessage(message) {
setTimeout(r => {
diff --git a/pages/purchaseReturn/request/returnRequestCreate.vue b/pages/purchaseReturn/request/returnRequestCreate.vue
index 3a562a40..8f37e68e 100644
--- a/pages/purchaseReturn/request/returnRequestCreate.vue
+++ b/pages/purchaseReturn/request/returnRequestCreate.vue
@@ -254,13 +254,14 @@
this.transferMode ="";
this.dataContent.supplierCode = supplierCode
this.dataContent.dueTime =getCurrDateOneMonthsTimes()
- this.dataContent.businessType = "PurchasePutaway"
- this.dataContent.departmentCode = "研发部门";
- this.dataContent.status= 1 ;
- this.dataContent.autoCommit = "FALSE";
- this.dataContent.autoAgree = "FALSE";
- this.dataContent.autoExecute = "FALSE";
- this.dataContent.directCreateRecord = "FALSE";
+ //这些都应该由接口赋值
+ // this.dataContent.businessType = "PurchasePutaway"
+ // this.dataContent.departmentCode = "研发部门";
+ // this.dataContent.status= 1 ;
+ // this.dataContent.autoCommit = "FALSE";
+ // this.dataContent.autoAgree = "FALSE";
+ // this.dataContent.autoExecute = "FALSE";
+ // this.dataContent.directCreateRecord = "FALSE";
return this.dataContent;
},