Browse Source

修改返回列表

wms3.0_pda
lijuncheng 12 months ago
parent
commit
7169af26b3
  1. 6
      api/request2.js
  2. 1
      common/basic.js
  3. 2
      mycomponents/scan/winScanPackAndLocation.vue
  4. 6
      pages/inspect/job/inspectDetail.vue
  5. 4
      pages/inspect/job/inspectResult.vue
  6. 18
      pages/productionReturn/coms/comReturnJobCard.vue
  7. 100
      pages/productionReturn/job/returnDetail.vue
  8. 17
      pages/purchaseReceipt/job/receiptDetail.vue
  9. 5
      pages/purchaseReturn/job/returnDetail.vue
  10. 7
      pages/purchaseReturn/record/returnRecord.vue
  11. 5
      pages/putaway/job/putawayDetail.vue
  12. 2
      static/config.json

6
api/request2.js

@ -2234,7 +2234,7 @@ export function getProductionReturnJobDetail(id) {
*/
export function takeProductionReturnJob(id) {
return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id,
url: baseApi + "/wms/productionreturn-job-main/accept?id=" + id,
method: "put",
data: {},
});
@ -2247,7 +2247,7 @@ export function takeProductionReturnJob(id) {
*/
export function cancleTakeProductionReturnJob(id) {
return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id,
url: baseApi + "/wms/productionreturn-job-main/abandon?id=" + id,
method: "put",
data: {},
});
@ -2260,7 +2260,7 @@ export function cancleTakeProductionReturnJob(id) {
*/
export function productionReturnJobSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit",
url: baseApi + "/wms/productionreturn-job-main/execute",
method: "put",
data: params,
});

1
common/basic.js

@ -882,7 +882,6 @@ export function clearTirmAndWrap(content) {
export function navigateBack(backIndex) {
let canNavBack = getCurrentPages()
console.log("返回",canNavBack.length )
if (canNavBack && canNavBack.length - 1 > backIndex) {
uni.navigateBack({
delta: backIndex

2
mycomponents/scan/winScanPackAndLocation.vue

@ -136,7 +136,7 @@
this.fromLocationCode = this.fromLocationList[0];
}
}
this.$refs.popup.open('bottom');
this.$refs.popup.open('bottom');
this.fromInventoryStatuses = jobContent.outInventoryStatuses
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); //

6
pages/inspect/job/inspectDetail.vue

@ -313,12 +313,8 @@
this.showErrorMessage(e.message);
}
},
commit(){
this.showCommitSuccessMessage("提交成功")
},
commits() {
commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")

4
pages/inspect/job/inspectResult.vue

@ -383,7 +383,7 @@
} else {
//0
//
uni.redirectTo({
uni.navigateTo({
url: './inspectDetail?id=' + this.id +
'&status=' + this.status +
'&failedQty=' + this.jobContent.failedQty +
@ -420,7 +420,7 @@
//
} else if (this.nextAction == "PARTIAL_OK") {
//
uni.redirectTo({
uni.navigateTo({
url: './inspectDetail?id=' + this.id +
'&status=' + this.status +
'&failedQty=' + this.jobContent.failedQty +

18
pages/productionReturn/coms/comReturnJobCard.vue

@ -9,15 +9,10 @@
<view class="task_text">
<view class="">
物品代码 : {{dataContent.itemCode}}
业务类型 : {{getBusinessTypeName(dataContent.businessType)}}
</view>
</view>
<view class="task_text">
<view class="">
目标库位 : {{dataContent.toLocationCode}}
</view>
</view>
</view>
</job-com-main-card>
</template>
@ -40,7 +35,16 @@
},
methods: {
getBusinessTypeName(value) {
var name = "";
if (value == 'ReturnToStore') {
name = "合格退料"
} else if (value == 'ReturnToHold') {
name = "隔离退料"
}
return name;
}
}
}
</script>

100
pages/productionReturn/job/returnDetail.vue

@ -14,14 +14,14 @@
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<requiredLocation title="目标库位" :locationCode="toLocationCode" :isShowEdit="jobContent.allowModifyLocation==1"
@getLocation='scanLocationCode' :locationTypeList="tolocationTypeList"></requiredLocation>
<requiredLocation title="目标库位" :locationCode="toLocationCode"
:isShowEdit="jobContent.allowModifyLocation==1" @getLocation='scanLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -37,7 +37,6 @@
</template>
<script>
import {
getProductionReturnJobDetail,
productionReturnJobSubmit,
@ -53,12 +52,12 @@
getDirectoryItemArray,
getInventoryStatusName
} from '@/common/directory.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
import {
getDataSource,
createRecordInfo,
@ -105,15 +104,14 @@
this.id = option.id;
if (this.id != undefined) {
// //
// if (option.status == "JOB_PENDING") {
// this.receive((callback => {
// this.received = true;
// this.getDetail();
// }));
// } else {
// this.getDetail();
// }
this.getDetail();
if (option.status == "1") {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
this.getDetail();
}
}
},
//
@ -268,11 +266,11 @@
']不一致,是否继续上架?', res => {
if (res) {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty)>Number(result.balance.qty)?Number(result.balance.qty):Number(result.label.qty);
itemDetail.handleQty = Number(result.balance.qty)
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty =result.package.stdPackQty
itemDetail.balance.stdPackUnit =result.package.stdPackUnit
itemDetail.balance.stdPackQty = result.package.stdPackQty
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty();
} else {
this.scanPopupGetFocus();
@ -280,11 +278,11 @@
});
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty)>Number(result.balance.qty)?Number(result.balance.qty):Number(result.label.qty);
itemDetail.handleQty = Number(result.balance.qty)
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty =result.package.stdPackQty
itemDetail.balance.stdPackUnit =result.package.stdPackUnit
itemDetail.balance.stdPackQty = result.package.stdPackQty
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty();
}
}
@ -337,7 +335,7 @@
}
},
async submitJob() {
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
@ -347,7 +345,7 @@
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
var param = {
itemCode: itemCodes,
locationCode: this.toLocationCode
@ -355,22 +353,20 @@
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交参数",JSON.stringify(params));
// productionReturnJobSubmit(this.id, params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint)
// } else {
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
productionReturnJobSubmit(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 {
uni.hideLoading();
this.showErrorMessage(res.message);
@ -381,30 +377,33 @@
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber =info.packingNumber;
detail.toBatch =info.batch;
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber;
detail.toBatch = detail.batch;
detail.toLocationCode = detail.toLocationCode;
subList.push(detail)
}
})
})
this.jobContent.subList = subList
this.jobContent.creator =creator;
this.jobContent.creator = creator;
return this.jobContent;
},
checkLocation() {
var isPass = true;
if (this.toLocationCode == ""||this.toLocationCode == null) {
if (this.toLocationCode == "" || this.toLocationCode == null) {
this.showMessageHint('请扫描收货库位', callback => {
this.$refs.comScanLocation.showLocation();
})
return isPass = false;
}
return isPass;
@ -448,7 +447,7 @@
scanPopupLoseFocus() {
this.$refs.scanPopup.packLoseFocus();
},
showQuestionMessage(message, callback) {
setTimeout(r => {
this.scanPopupLoseFocus();
@ -463,13 +462,10 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
})
setTimeout(() => {
uni.navigateTo({
url: './returnJob'
})
}, 3000)
})
},
}
}

17
pages/purchaseReceipt/job/receiptDetail.vue

@ -46,7 +46,8 @@
getCurrDateTime,
getPackingNumberAndBatch,
updateTitle,
compareAsc
compareAsc,
navigateBack
} from '@/common/basic.js';
import {
@ -417,21 +418,9 @@
},
closeCommitMessage() {
setTimeout(() => {
uni.navigateTo({
url: './receipt'
})
})
//
uni.hideLoading();
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
uni.navigateTo({
url: './receiptJob'
})
navigateBack(1)
})
},
}

5
pages/purchaseReturn/job/returnDetail.vue

@ -53,6 +53,7 @@
goHome,
getCurrDateTime,
getPackingNumberAndBatch,
navigateBack
} from '@/common/basic.js';
import {
getInventoryStatusName
@ -419,9 +420,7 @@
showCommitSuccessMessage(number) {
this.$refs.comMessage.showSuccessMessage('提交成功<br>生成退货记录:' + number, res => {
uni.navigateTo({
url: './returnJob'
})
navigateBack()
})
}
}

7
pages/purchaseReturn/record/returnRecord.vue

@ -44,7 +44,8 @@
} from '@/api/request2.js';
import {
goHome,
updateTitle
updateTitle,
navigateBack
} from '@/common/basic.js';
import {
@ -381,9 +382,7 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
if (this.fromType == "requestType") {
uni.navigateTo({
url: '../request/issueRequest'
})
navigateBack(1)
}else {
//
this.subList = [];

5
pages/putaway/job/putawayDetail.vue

@ -54,6 +54,7 @@
goHome,
getCurrDateTime,
getPackingNumberAndBatch,
navigateBack
} from '@/common/basic.js';
import {
@ -499,9 +500,7 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
uni.navigateTo({
url: './putawayJob'
})
navigateBack(1)
})
},
}

2
static/config.json

@ -18,7 +18,7 @@
"request_url": {
"name": "request_url",
"value": "http://dev.ccwin-in.com:25100/api/admin-api",
"value": "http://192.168.0.230:12080/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.178:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save