Browse Source

修改采购退货记录

wms3.0_pda
niexiting 9 months ago
parent
commit
de262f8cbe
  1. 2
      mycomponents/record/recordComDetailCard.vue
  2. 90
      pages/purchaseReturn/record/returnRecord.vue
  3. 15
      pages/purchaseReturn/request/returnRequestCreate.vue

2
mycomponents/record/recordComDetailCard.vue

@ -16,7 +16,7 @@
<uni-swipe-action-item @click="swipeClick($event,detail,index)"
:right-options="detail.scaned?scanOptions:detailOptions">
<balance :dataContent="detail" :isShowStdPack="false"
:isShowStatus="false" :isShowPack="true" :isShowLocation="isShowLocation"></balance>
:isShowStatus="true" :isShowPack="true" :isShowLocation="isShowLocation"></balance>
<!-- <purchase-label :dataContent="detail" :packageContent="detail.package" :isShowStdPack="false"
:isShowPack="true" :isShowLocation="true"></purchase-label> -->
</uni-swipe-action-item>

90
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("提交成功<br>生成采购退货申请" + 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("提交成功<br>生成采购退货记录" + 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("提交成功<br>生成采购退货记录" + 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 => {

15
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;
},

Loading…
Cancel
Save