Browse Source

发料

intex
zhang_li 2 weeks ago
parent
commit
cf2f9b3798
  1. 2
      src/mycomponents/scan/winScanPackAndLocation.vue
  2. 11
      src/pages/issue/job/issueDetailBatch.vue
  3. 7
      src/pages/productionReturn/job/okToReturnDetail.vue

2
src/mycomponents/scan/winScanPackAndLocation.vue

@ -27,7 +27,7 @@
placeholder-style="font-size:12px" style="padding: 5px;" @confirm="scanLocation" /> --> placeholder-style="font-size:12px" style="padding: 5px;" @confirm="scanLocation" /> -->
<view v-if='allowModifyLocation'> <view v-if='allowModifyLocation'>
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位" <uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位" disabled
@confirm="handleConfirm" style='height: 30rpx;border:1px solid #fff ;'></uni-combox> @confirm="handleConfirm" style='height: 30rpx;border:1px solid #fff ;'></uni-combox>
</view> </view>
<view v-else> <view v-else>

11
src/pages/issue/job/issueDetailBatch.vue

@ -217,6 +217,7 @@
that.showMessage('未获取到详情'); that.showMessage('未获取到详情');
} else { } else {
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
res.data.allowModifyLocation = 'FALSE'
that.jobContent = res.data; that.jobContent = res.data;
that.jobStatus = res.data.status that.jobStatus = res.data.status
that.subList = res.data.subList; that.subList = res.data.subList;
@ -260,10 +261,20 @@
}, },
getScanResult(result, managementTypeParams) { getScanResult(result, managementTypeParams) {
console.log(this.jobContent.allowModifyLocation)
// if(this.jobContent.allowModifyLocation == 'TRUE'){
// this.managementType = managementTypeParams
// if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
// this.setDataBatch(result)
// }
// }else{
// this.showErrorMessage(`${this.fromLocationCode}`)
// }
this.managementType = managementTypeParams this.managementType = managementTypeParams
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
this.setDataBatch(result) this.setDataBatch(result)
} }
}, },
setDataBatch(result) { setDataBatch(result) {
try { try {

7
src/pages/productionReturn/job/okToReturnDetail.vue

@ -207,7 +207,6 @@
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
this.managementType = this.managementList&&this.managementList[0]&&this.managementList[0].ManagementPrecision this.managementType = this.managementList&&this.managementList[0]&&this.managementList[0].ManagementPrecision
this.managementType = 'BY_QUANTITY'
if(this.managementType == 'BY_BATCH'){ if(this.managementType == 'BY_BATCH'){
that.detailSource.forEach(item=>{ that.detailSource.forEach(item=>{
item.subList.forEach(cur=>{ item.subList.forEach(cur=>{
@ -308,8 +307,9 @@
var qty = result.label.qty; var qty = result.label.qty;
var itemCode = result.label.itemCode; var itemCode = result.label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode); var detail = this.detailSource.find(r => r.itemCode == itemCode);
let itemcodes = this.detailSource.map(item=>item.itemCode).join(',')
if (detail == undefined) { if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中") this.showErrorMessage(`扫描的物料【 ${ result.label.itemCode} 】与任务明细中的物料【 ${itemcodes} 】不一致`)
} else { } else {
var itemDetail = detail.subList.find(r => { var itemDetail = detail.subList.find(r => {
return r.batch == batch return r.batch == batch
@ -489,8 +489,7 @@
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
var params = this.setParams() var params = this.setParams()
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", params);
productionReturnJobSubmit(params).then(res => { productionReturnJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {

Loading…
Cancel
Save