Browse Source

修改发料不使用在途库

2024/6/20 08:35:42
hella_vue3
zhang_li 3 months ago
parent
commit
bc919bf89e
  1. 23
      src/pages/issue/coms/comScanIssuePack.vue
  2. 34
      src/pages/issue/job/issueDetail.vue
  3. 79
      src/pages/issue/job/issueJob.vue
  4. 1
      src/pages/issue/js/issue.js
  5. 32
      src/pages/package/job/overPackageJobDetail.vue
  6. 5
      src/pages/productPutaway/job/productPutawayJob.vue
  7. 5
      src/pages/productReceipt/job/productReceiptJob.vue
  8. 38
      src/pages/productionReceipt/job/productionReceiptDetail.vue
  9. 74
      src/pages/productionReceipt/job/productionReceiptJob.vue
  10. 5
      src/pages/purchaseReceipt/job/receiptJob.vue
  11. 5
      src/pages/putaway/job/putawayJob.vue
  12. 32
      src/pages/repleinsh/job/repleinshDetail.vue

23
src/pages/issue/coms/comScanIssuePack.vue

@ -47,6 +47,8 @@
<balance-select ref="balanceSelectRef" @onSelectItem="selectBalanceItem"></balance-select> <balance-select ref="balanceSelectRef" @onSelectItem="selectBalanceItem"></balance-select>
<com-message ref="comMessageRef" /> <com-message ref="comMessageRef" />
<balance-qty-edit ref="balanceQtyEditRef" @confirm="confirm" :isShowStatus="true"></balance-qty-edit> <balance-qty-edit ref="balanceQtyEditRef" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
<!-- 模拟扫描功能 -->
<win-com-scan v-show="false" ref="comscansimulate" placeholder="箱标签" @getResult="onScan" :clearResult="true" headerType="HPQ,HMQ" :isShowHistory="false"> </win-com-scan>
</view> </view>
</template> </template>
@ -93,6 +95,7 @@ const fromInventoryStatuses = ref('')
const packageInfo = ref({}) const packageInfo = ref({})
const label = ref({}) const label = ref({})
const toLocationCombox = ref() const toLocationCombox = ref()
const comscansimulate = ref()
const comMessageRef = ref() const comMessageRef = ref()
const detailOptions = ref([]) const detailOptions = ref([])
const comscan = ref() const comscan = ref()
@ -102,10 +105,26 @@ onMounted(() => {
detailOptions.value = getDetailOption() detailOptions.value = getDetailOption()
scanOptions.value = getDetailEditRemoveOption() scanOptions.value = getDetailEditRemoveOption()
}) })
const openScanPopup = (content, jobcontent) => { const openScanPopupForJobSimulate = (content, jobcontentParams) => {
issueRecord.value = [] issueRecord.value = []
dataContent.value = content dataContent.value = content
jobContent.value = jobcontent jobContent.value = jobcontentParams
initData()
if (comscansimulate.value.vlaue != undefined) {
comscansimulate.value.vlaue.getfocus()
}
const timer = setTimeout((res) => {
if (timer) {
clearTimeout(timer)
}
comscansimulate.value.vlaue.setItemCodeSimulate(item.copyContent)
comscansimulate.value.vlaue.clickScanMsg()
}, 500)
}
const openScanPopup = (content, jobcontentParams) => {
issueRecord.value = []
dataContent.value = content
jobContent.value = jobcontentParams
initData() initData()
// this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode + // this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
// "-" + this.jobContent.subList[0].workStationCode // "-" + this.jobContent.subList[0].workStationCode

34
src/pages/issue/job/issueDetail.vue

@ -64,6 +64,7 @@ const detailSource = ref([]) // 绑定在页面上的数据源
const detailOptions = ref([]) const detailOptions = ref([])
const scanOptions = ref([]) const scanOptions = ref([])
const jobStatus = ref('') const jobStatus = ref('')
const scanedPackingNumber = ref('')
const scanPopup = ref() const scanPopup = ref()
const comScanIssuePackRef = ref() const comScanIssuePackRef = ref()
const comMessageRef = ref() const comMessageRef = ref()
@ -72,6 +73,7 @@ const managementList = ref([])
const comIssueDetailCardRef = ref() const comIssueDetailCardRef = ref()
onLoad((option) => { onLoad((option) => {
id.value = option.id id.value = option.id
scanedPackingNumber.value = option.scaned
if (id.value != undefined) { if (id.value != undefined) {
// //
if (option.status == '1') { if (option.status == '1') {
@ -158,11 +160,6 @@ const closeScan = () => {
resizeCollapse() resizeCollapse()
} }
const submit = () => { const submit = () => {
const params = setParams()
if (!params.subList || params.subList.length == 0) {
showErrorMessage('请扫描您需要提交的发料任务')
return
}
proxy.$modal.loading('提交中....') proxy.$modal.loading('提交中....')
// //
@ -174,21 +171,16 @@ const submit = () => {
}) })
}) })
// 使 //
if (jobContent.value.useOnTheWayLocation == 'TRUE') { getManagementPrecisions(itemCodes, locationCode, (res) => {
submitJob() if (res.success) {
} else { managementList.value = res.list
// submitJob()
getManagementPrecisions(itemCodes, locationCode, (res) => { } else {
if (res.success) { uni.hideLoading()
managementList.value = res.list showErrorMessage(res.message)
submitJob() }
} else { })
uni.hideLoading()
showErrorMessage(res.message)
}
})
}
} }
const submitJob = () => { const submitJob = () => {
@ -244,7 +236,7 @@ const setParams = () => {
record.amount = single_price * r.qty record.amount = single_price * r.qty
// 使 // 使
if (jobContent.value.useOnTheWayLocation == 'TRUE') { if (item.onTheWayLocationCode) {
record.toPackingNumber = r.packingNumber record.toPackingNumber = r.packingNumber
record.toBatch = r.batch record.toBatch = r.batch
} else { } else {

79
src/pages/issue/job/issueJob.vue

@ -12,6 +12,9 @@
<u-loadmore :status="loadingType" v-if="jobList.length > 0" /> <u-loadmore :status="loadingType" v-if="jobList.length > 0" />
</view> </view>
<win-scan-button @goScan="openScanPopup" v-if="false"></win-scan-button>
<winScanPackJob ref="scanPopup" @getResult="getScanResult"></winScanPackJob>
<jobList ref="jobListRef" @selectItem="selectItem"></jobList>
<com-message ref="comMessageRef" /> <com-message ref="comMessageRef" />
</view> </view>
</template> </template>
@ -30,6 +33,10 @@ import comIssueJobCard from '@/pages/issue/coms/comIssueJobCard.vue'
import jobListPopup from '@/pages/issue/coms/jobListPopup.vue' import jobListPopup from '@/pages/issue/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue' import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackJob from '@/mycomponents/scan/winScanPackJob.vue'
import jobList from '@/mycomponents/jobList/jobList.vue'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const jobList = ref([]) const jobList = ref([])
const pageNo = ref(1) const pageNo = ref(1)
@ -46,6 +53,8 @@ const filter = ref()
const comMessageRef = ref() const comMessageRef = ref()
const jobInfoPopupRef = ref() const jobInfoPopupRef = ref()
const jobListPopupRef = ref() const jobListPopupRef = ref()
const scanPopup = ref()
const jobListRef = ref()
onShow(() => { onShow(() => {
nextTick(() => { nextTick(() => {
getList('refresh') getList('refresh')
@ -157,12 +166,16 @@ const getList = (type, fromLocationCode = '', productionLineCode = '') => {
}) })
} }
const openJobDetail = (item) => { const openJobDetail = (item, packingNumber = '') => {
proxy.$tab.navigateTo(`./issueDetail?id=${item.masterId}&status=${item.status}`) proxy.$tab.navigateTo(`./issueDetail?id=${item.masterId}&status=${item.status}&scaned=${packingNumber}`)
} }
const selectedItem = (item) => { const selectedItem = (item) => {
openJobDetail(item) openJobDetail(item)
} }
const selectItem = (item) => {
scanPopup.value.closeScanPopup()
openJobDetail(item, item.packingNumber)
}
const swipeClick = (index, index1) => { const swipeClick = (index, index1) => {
// var text = clearTirmAndWrap(requestList.value[index].options[index].text) // var text = clearTirmAndWrap(requestList.value[index].options[index].text)
let text = '' let text = ''
@ -258,9 +271,7 @@ const getDataListByType = (code) => {
const params = { const params = {
filters, filters,
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100
sort: 'fromLocationCode',
by: 'asc'
} }
getIssueJobList(params) getIssueJobList(params)
.then((res) => { .then((res) => {
@ -282,6 +293,64 @@ const showMessage = (message) => {
} }
}) })
} }
const openScanPopup = () => {
scanPopup.value.openScanPopup()
}
const getScanResult = (result) => {
try {
const filters = [
{
column: 'status',
action: 'in',
value: '1,2'
},
{
column: 'batch',
action: '==',
value: result.label.batch
},
{
column: 'itemCode',
action: '==',
value: result.label.itemCode
}
]
getIssueJobList({
filters,
pageNo: 1,
pageSize: 100,
sort: 'createTime',
by: 'asc'
})
.then((res) => {
const resultList = res.data.list
if (resultList.length > 0) {
resultList.forEach((item) => {
item.title = item.number
item.selected = false
})
const list = []
resultList.forEach((item) => {
if (!list.find((subItem) => subItem.title == item.title)) {
list.push(item)
}
})
if (list.length > 1) {
jobListRef.value.openList(list)
} else {
selectItem(list[0])
}
} else {
showMessage('未查找到任务')
}
})
.catch((error) => {
showMessage(error)
})
} catch (e) {
showMessage(e.message)
}
}
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>

1
src/pages/issue/js/issue.js

@ -53,6 +53,7 @@ export function createItemInfo(detail) {
let item = { let item = {
itemCode: detail.itemCode, itemCode: detail.itemCode,
itemName: detail.itemName, itemName: detail.itemName,
onTheWayLocationCode:detail.onTheWayLocationCode,
productionLineCode: detail.productionLineCode, productionLineCode: detail.productionLineCode,
workStationCode: detail.workStationCode, workStationCode: detail.workStationCode,
packQty: detail.packQty, packQty: detail.packQty,

32
src/pages/package/job/overPackageJobDetail.vue

@ -177,22 +177,22 @@ const submit = () => {
itemCodes.push(item.itemCode) itemCodes.push(item.itemCode)
}) })
}) })
checkSubmit()
// 使 // // 使
if (jobContent.value.useOnTheWayLocation == 'TRUE') { // if (jobContent.value.useOnTheWayLocation == 'TRUE') {
checkSubmit() // checkSubmit()
} else { // } else {
// // //
getManagementPrecisions(itemCodes, locationCode, (res) => { // getManagementPrecisions(itemCodes, locationCode, (res) => {
if (res.success) { // if (res.success) {
managementList.value = res.list // managementList.value = res.list
checkSubmit() // checkSubmit()
} else { // } else {
uni.hideLoading() // uni.hideLoading()
showErrorMessage(res.message) // showErrorMessage(res.message)
} // }
}) // })
} // }
} }
const checkSubmit = () => { const checkSubmit = () => {
const tempHandleQty = detailSource.value[0].Items[0].Locations[0].Batchs[0].handleQty const tempHandleQty = detailSource.value[0].Items[0].Locations[0].Batchs[0].handleQty

5
src/pages/productPutaway/job/productPutawayJob.vue

@ -287,6 +287,11 @@ const getScanResult = (result) => {
column: 'type', column: 'type',
action: '==', action: '==',
value: props.type value: props.type
},
{
column: 'status',
action: 'in',
value: '1,2'
} }
// { // {
// column: 'fromLocationCode', // column: 'fromLocationCode',

5
src/pages/productReceipt/job/productReceiptJob.vue

@ -306,6 +306,11 @@ const getScanResult = (result) => {
column: 'type', column: 'type',
action: '==', action: '==',
value: props.type value: props.type
},
{
column: 'status',
action: 'in',
value: '1,2'
} }
// { // {
// column: 'fromLocationCode', // column: 'fromLocationCode',

38
src/pages/productionReceipt/job/productionReceiptDetail.vue

@ -75,6 +75,7 @@ const toLocationAreaTypeList = ref([])
const jobStatus = ref('') const jobStatus = ref('')
const jobToLocationCode = ref('') const jobToLocationCode = ref('')
const isCheckLocation = ref(false) const isCheckLocation = ref(false)
const scanedPackingNumber = ref('')
const scanPopup = ref() const scanPopup = ref()
const comScanIssuePackRef = ref() const comScanIssuePackRef = ref()
const detailInfoPopupRef = ref() const detailInfoPopupRef = ref()
@ -82,6 +83,7 @@ const comMessageRef = ref()
const comScanLocation = ref() const comScanLocation = ref()
onLoad((option) => { onLoad((option) => {
id.value = option.id id.value = option.id
scanedPackingNumber.value = option.scaned
if (id.value != undefined) { if (id.value != undefined) {
// //
if (option.status == '1') { if (option.status == '1') {
@ -151,7 +153,17 @@ const getDetail = () => {
} else { } else {
toLocationCode.value = jobToLocationCode.value toLocationCode.value = jobToLocationCode.value
} }
uni.hideLoading() detailSource.value.forEach((r) => {
r.subList.forEach((s) => {
if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) {
s.scaned = true
s.cancleScanedHiht = true
//
openScanPopupSimulate(s)
scanedPackingNumber.value = ''
}
})
})
} else { } else {
showMessage('列表数据为0') showMessage('列表数据为0')
} }
@ -203,6 +215,28 @@ const openScanPopup = () => {
const closeScanPopup = () => { const closeScanPopup = () => {
scanPopup.value.closeScanPopup() scanPopup.value.closeScanPopup()
} }
//
const openScanPopupSimulate = (item) => {
let fromlocationCode = ''
const fromlocationList = []
for (let i = 0; i < detailSource.value.length; i++) {
const item = detailSource.value[i]
item.subList.forEach((l) => {
//
const location = fromlocationList.find((res) => res == l.fromLocationCode)
if (location == undefined) {
fromlocationList.push(l.fromLocationCode)
}
//
if (fromlocationCode == '') {
if (!l.scaned) {
fromlocationCode = l.fromLocationCode
}
}
})
}
scanPopup.value.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, jobContent.value, item)
}
const getScanResult = (result) => { const getScanResult = (result) => {
try { try {
// var supplierCode = result.label.supplierCode; // var supplierCode = result.label.supplierCode;
@ -226,7 +260,7 @@ const getScanResult = (result) => {
}) })
if (itemDetail == undefined) { if (itemDetail == undefined) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]不在列表中`) showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]不在列表中`)
} else if (itemDetail.scaned) { } else if (!itemDetail.cancleScanedHiht && itemDetail.scaned) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]已经扫描`) showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]已经扫描`)
} else { } else {
const balanceStatus = getInventoryStatusName(result.balance.inventoryStatus) const balanceStatus = getInventoryStatusName(result.balance.inventoryStatus)

74
src/pages/productionReceipt/job/productionReceiptJob.vue

@ -12,6 +12,9 @@
<u-loadmore :status="loadingType" /> <u-loadmore :status="loadingType" />
</view> </view>
<win-scan-button @goScan="openScanPopup" v-if="jobList.length > 0"></win-scan-button>
<winScanPackJob ref="scanPopup" @getResult="getScanResult"></winScanPackJob>
<jobList ref="jobListRef" @selectItem="selectItem"></jobList>
<com-message ref="comMessageRef" /> <com-message ref="comMessageRef" />
</view> </view>
</template> </template>
@ -31,6 +34,9 @@ import jobFilter from '@/mycomponents/job/jobFilter.vue'
import comProductionJobCard from '@/pages/productionReceipt/coms/comProductionJobCard.vue' import comProductionJobCard from '@/pages/productionReceipt/coms/comProductionJobCard.vue'
import jobListPopup from '@/pages/productionReceipt/coms/jobListPopup.vue' import jobListPopup from '@/pages/productionReceipt/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/productionReceipt/coms/jobInfoPopup.vue' import jobInfoPopup from '@/pages/productionReceipt/coms/jobInfoPopup.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackJob from '@/mycomponents/scan/winScanPackJob.vue'
import jobList from '@/mycomponents/jobList/jobList.vue'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const jobList = ref([]) const jobList = ref([])
@ -48,6 +54,7 @@ const filter = ref()
const comMessageRef = ref() const comMessageRef = ref()
const jobInfoPopupRef = ref() const jobInfoPopupRef = ref()
const jobListPopupRef = ref() const jobListPopupRef = ref()
const jobListRef = ref()
onShow(() => { onShow(() => {
nextTick(() => { nextTick(() => {
getList('refresh') getList('refresh')
@ -139,8 +146,8 @@ const getList = (type) => {
showErrorMessage(error) showErrorMessage(error)
}) })
} }
const openJobDetail = (item) => { const openJobDetail = (item, packingNumber = '') => {
proxy.$tab.navigateTo(`./productionReceiptDetail?id=${item.masterId}&status=${item.status}`) proxy.$tab.navigateTo(`./productionReceiptDetail?id=${item.masterId}&status=${item.status}&scaned=${packingNumber}`)
} }
const selectedItem = (item) => { const selectedItem = (item) => {
openJobDetail(item) openJobDetail(item)
@ -239,6 +246,69 @@ const showMessage = (message) => {
} }
}) })
} }
const openScanPopup = () => {
scanPopup.value.openScanPopup()
}
const selectItem = (item) => {
scanPopup.value.closeScanPopup()
openJobDetail(item, item.packingNumber)
}
const getScanResult = (result) => {
try {
const filters = [
{
column: 'packingNumber',
action: '==',
value: result.label.packingNumber
},
{
column: 'batch',
action: '==',
value: result.label.batch
},
{
column: 'itemCode',
action: '==',
value: result.label.itemCode
}
]
getProductionReceiptJobList({
filters,
pageNo: 1,
pageSize: 100
})
.then((res) => {
const resultList = res.data.list
if (resultList.length > 0) {
resultList.forEach((item) => {
item.title = item.number
item.selected = false
})
const list = []
resultList.forEach((item) => {
if (!list.find((subItem) => subItem.title == item.title)) {
list.push(item)
}
})
if (list.length > 1) {
jobListRef.value.openList(list)
} else {
selectItem(list[0])
}
} else {
showMessage('未查找到任务')
}
})
.catch((error) => {
showMessage(error)
})
} catch (e) {
showMessage(e.message)
}
}
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>

5
src/pages/purchaseReceipt/job/receiptJob.vue

@ -307,6 +307,11 @@ const getScanResult = (result) => {
column: 'itemCode', column: 'itemCode',
action: '==', action: '==',
value: result.label.itemCode value: result.label.itemCode
},
{
column: 'status',
action: 'in',
value: '1,2'
} }
// { // {
// column: 'fromLocationCode', // column: 'fromLocationCode',

5
src/pages/putaway/job/putawayJob.vue

@ -282,6 +282,11 @@ const getScanResult = (result) => {
column: 'itemCode', column: 'itemCode',
action: '==', action: '==',
value: result.label.itemCode value: result.label.itemCode
},
{
column: 'status',
action: 'in',
value: '1,2'
} }
// { // {
// column: 'fromLocationCode', // column: 'fromLocationCode',

32
src/pages/repleinsh/job/repleinshDetail.vue

@ -216,22 +216,22 @@ const setSubmitParamsAndSubmit = () => {
itemCodes.push(item.itemCode) itemCodes.push(item.itemCode)
}) })
}) })
submitJob()
// 使 // // 使
if (jobContent.value.useOnTheWayLocation == 'TRUE') { // if (jobContent.value.useOnTheWayLocation == 'TRUE') {
submitJob() // submitJob()
} else { // } else {
// // //
getManagementPrecisions(itemCodes, locationCode, (res) => { // getManagementPrecisions(itemCodes, locationCode, (res) => {
if (res.success) { // if (res.success) {
managementList.value = res.list // managementList.value = res.list
submitJob() // submitJob()
} else { // } else {
uni.hideLoading() // uni.hideLoading()
showErrorMessage(res.message) // showErrorMessage(res.message)
} // }
}) // })
} // }
} }
const submitJob = () => { const submitJob = () => {

Loading…
Cancel
Save