Browse Source

修改采购退货记录

wms3.0_pda
niexiting 11 months ago
parent
commit
de262f8cbe
  1. 2
      mycomponents/record/recordComDetailCard.vue
  2. 60
      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)" <uni-swipe-action-item @click="swipeClick($event,detail,index)"
:right-options="detail.scaned?scanOptions:detailOptions"> :right-options="detail.scaned?scanOptions:detailOptions">
<balance :dataContent="detail" :isShowStdPack="false" <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" <!-- <purchase-label :dataContent="detail" :packageContent="detail.package" :isShowStdPack="false"
:isShowPack="true" :isShowLocation="true"></purchase-label> --> :isShowPack="true" :isShowLocation="true"></purchase-label> -->
</uni-swipe-action-item> </uni-swipe-action-item>

60
pages/purchaseReturn/record/returnRecord.vue

@ -223,21 +223,7 @@
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
console.log("提交参数", JSON.stringify(params)); 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) var params = this.setRecordParams(true)
@ -254,8 +240,6 @@
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
}
} else { } else {
this.showErrorMessage("没有要提交的数据") this.showErrorMessage("没有要提交的数据")
} }
@ -272,50 +256,30 @@
if (detail.scaned) { if (detail.scaned) {
detail.itemCode = detail.itemCode; detail.itemCode = detail.itemCode;
detail.inventoryStatus = detail.inventoryStatus; detail.inventoryStatus = detail.inventoryStatus;
detail.packingNumber = detail.packingNumber;
detail.containerNumber = detail.containerNumber; detail.fromPackingNumber = detail.packingNumber;
detail.batch = detail.batch; 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.fromLocationCode = this.fromLocationCode;
detail.toLocationCode = ''; //退 detail.toLocationCode = ''; //退
detail.package = null;
subList.push(detail) subList.push(detail)
} }
}) })
}) })
this.dataContent.subList = subList this.dataContent.subList = subList
// this.dataContent.jobNumber = ''; // this.dataContent.jobNumber = '';
return this.dataContent; 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) { showMessage(message) {
setTimeout(r => { setTimeout(r => {

15
pages/purchaseReturn/request/returnRequestCreate.vue

@ -254,13 +254,14 @@
this.transferMode =""; this.transferMode ="";
this.dataContent.supplierCode = supplierCode this.dataContent.supplierCode = supplierCode
this.dataContent.dueTime =getCurrDateOneMonthsTimes() this.dataContent.dueTime =getCurrDateOneMonthsTimes()
this.dataContent.businessType = "PurchasePutaway" //
this.dataContent.departmentCode = "研发部门"; // this.dataContent.businessType = "PurchasePutaway"
this.dataContent.status= 1 ; // this.dataContent.departmentCode = "";
this.dataContent.autoCommit = "FALSE"; // this.dataContent.status= 1 ;
this.dataContent.autoAgree = "FALSE"; // this.dataContent.autoCommit = "FALSE";
this.dataContent.autoExecute = "FALSE"; // this.dataContent.autoAgree = "FALSE";
this.dataContent.directCreateRecord = "FALSE"; // this.dataContent.autoExecute = "FALSE";
// this.dataContent.directCreateRecord = "FALSE";
return this.dataContent; return this.dataContent;
}, },

Loading…
Cancel
Save