lijuncheng
8 months ago
5 changed files with 170 additions and 16 deletions
@ -0,0 +1,144 @@ |
|||||
|
<template> |
||||
|
<view class="page-wraper"> |
||||
|
<view class="" > |
||||
|
<com-blank-view @goScan='goScan()'></com-blank-view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<win-scan-pack ref="scanPopup" @getResult='getScanResult' headerType="HCMQ" title="叫料标签"></win-scan-pack> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
issueRequestSubmit, |
||||
|
} from '@/api/request2.js'; |
||||
|
|
||||
|
import { |
||||
|
calc |
||||
|
} from '@/common/calc.js'; |
||||
|
|
||||
|
import { |
||||
|
getBusinessType, |
||||
|
} from '@/common/record.js'; |
||||
|
|
||||
|
import { |
||||
|
goHome, |
||||
|
updateTitle, |
||||
|
getRemoveOption, |
||||
|
navigateBack, |
||||
|
getCurrDateOneMonthsTimes |
||||
|
} from '@/common/basic.js'; |
||||
|
|
||||
|
import { |
||||
|
getDataSource |
||||
|
} from '@/pages/issue/js/issue.js'; |
||||
|
|
||||
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
||||
|
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' |
||||
|
import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue' |
||||
|
import comIssueRequestCreator from '@/pages/issue/coms/comIssueRequestCreator.vue' |
||||
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
||||
|
|
||||
|
export default { |
||||
|
name: 'issueRequestSubmit', |
||||
|
components: { |
||||
|
comBlankView, |
||||
|
jobDetailPopup, |
||||
|
comScanIssuePack, |
||||
|
comIssueRequestCreator, |
||||
|
winScanPack |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
jobContent: {}, //任务内容 |
||||
|
subList: [], //接口返回的任务subList |
||||
|
detailSource: { |
||||
|
subList: [] |
||||
|
}, //绑定在页面上的数据源 |
||||
|
detailOptions: [], |
||||
|
scanOptions: [], |
||||
|
requestList: [], //需求信息 |
||||
|
itemCodeTypeList:[], |
||||
|
useOnTheWay:"FALSE" |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
}, |
||||
|
onLoad(option) { |
||||
|
var typeCode = "Issue" |
||||
|
getBusinessType(typeCode, res => { |
||||
|
if (res.success) { |
||||
|
this.itemCodeTypeList = res.itemCodeTypeList; |
||||
|
this.tolocationTypeList = res.tolocationTypeList; |
||||
|
this.useOnTheWay = res.useOnTheWay; |
||||
|
this.fromInventoryStatuses = res.fromInventoryStatuses |
||||
|
this.toInventoryStatuses = res.toInventoryStatuses |
||||
|
this.goScan() |
||||
|
} else { |
||||
|
this.showErrorMessage(res.message) |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
}, |
||||
|
methods: { |
||||
|
goScan() { |
||||
|
this.$refs.scanPopup.openScanPopup(); |
||||
|
}, |
||||
|
getScanResult(data){ |
||||
|
this.detailSource.subList = []; |
||||
|
var labelInfo = data.label; |
||||
|
var warehouseCode = labelInfo.warehouseCode; |
||||
|
var workshopCode =labelInfo.workshopCode; |
||||
|
var productionLineCode =labelInfo.productionLineCode; |
||||
|
var workStationCode = labelInfo.workStationCode; |
||||
|
|
||||
|
var itemCode = labelInfo.itemCode; |
||||
|
var location = labelInfo.location; |
||||
|
var qty = labelInfo.qty; |
||||
|
var uom = labelInfo.uom; |
||||
|
var packUnit = labelInfo.packUnit; |
||||
|
var data = {}; |
||||
|
this.detailSource.subList.push() |
||||
|
|
||||
|
|
||||
|
}, |
||||
|
|
||||
|
setParams() { |
||||
|
this.detailSource.dueTime = getCurrDateOneMonthsTimes(); |
||||
|
return this.detailSource |
||||
|
}, |
||||
|
submit() { |
||||
|
uni.showLoading({ |
||||
|
title: "提交中....", |
||||
|
mask: true |
||||
|
}); |
||||
|
var params = this.setParams() |
||||
|
console.log("提交参数", JSON.stringify(params)); |
||||
|
issueRequestSubmit(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) |
||||
|
}) |
||||
|
}, |
||||
|
showCommitSuccessMessage(hint) { |
||||
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
||||
|
navigateBack(1) |
||||
|
}) |
||||
|
}, |
||||
|
showErrorMessage(message) { |
||||
|
this.$refs.comMessage.showErrorMessage(message, res => { |
||||
|
if (res) {} |
||||
|
}); |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
</style> |
Loading…
Reference in new issue