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>
<com-message ref="comMessageRef" />
<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>
</template>
@ -93,6 +95,7 @@ const fromInventoryStatuses = ref('')
const packageInfo = ref({})
const label = ref({})
const toLocationCombox = ref()
const comscansimulate = ref()
const comMessageRef = ref()
const detailOptions = ref([])
const comscan = ref()
@ -102,10 +105,26 @@ onMounted(() => {
detailOptions.value = getDetailOption()
scanOptions.value = getDetailEditRemoveOption()
})
const openScanPopup = (content, jobcontent) => {
const openScanPopupForJobSimulate = (content, jobcontentParams) => {
issueRecord.value = []
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()
// this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
// "-" + this.jobContent.subList[0].workStationCode

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

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

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

@ -12,6 +12,9 @@
<u-loadmore :status="loadingType" v-if="jobList.length > 0" />
</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" />
</view>
</template>
@ -30,6 +33,10 @@ import comIssueJobCard from '@/pages/issue/coms/comIssueJobCard.vue'
import jobListPopup from '@/pages/issue/coms/jobListPopup.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 jobList = ref([])
const pageNo = ref(1)
@ -46,6 +53,8 @@ const filter = ref()
const comMessageRef = ref()
const jobInfoPopupRef = ref()
const jobListPopupRef = ref()
const scanPopup = ref()
const jobListRef = ref()
onShow(() => {
nextTick(() => {
getList('refresh')
@ -157,12 +166,16 @@ const getList = (type, fromLocationCode = '', productionLineCode = '') => {
})
}
const openJobDetail = (item) => {
proxy.$tab.navigateTo(`./issueDetail?id=${item.masterId}&status=${item.status}`)
const openJobDetail = (item, packingNumber = '') => {
proxy.$tab.navigateTo(`./issueDetail?id=${item.masterId}&status=${item.status}&scaned=${packingNumber}`)
}
const selectedItem = (item) => {
openJobDetail(item)
}
const selectItem = (item) => {
scanPopup.value.closeScanPopup()
openJobDetail(item, item.packingNumber)
}
const swipeClick = (index, index1) => {
// var text = clearTirmAndWrap(requestList.value[index].options[index].text)
let text = ''
@ -258,9 +271,7 @@ const getDataListByType = (code) => {
const params = {
filters,
pageNo: 1,
pageSize: 100,
sort: 'fromLocationCode',
by: 'asc'
pageSize: 100
}
getIssueJobList(params)
.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>
<style scoped lang="scss"></style>

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

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

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

@ -177,22 +177,22 @@ const submit = () => {
itemCodes.push(item.itemCode)
})
})
// 使
if (jobContent.value.useOnTheWayLocation == 'TRUE') {
checkSubmit()
} else {
//
getManagementPrecisions(itemCodes, locationCode, (res) => {
if (res.success) {
managementList.value = res.list
checkSubmit()
} else {
uni.hideLoading()
showErrorMessage(res.message)
}
})
}
checkSubmit()
// // 使
// if (jobContent.value.useOnTheWayLocation == 'TRUE') {
// checkSubmit()
// } else {
// //
// getManagementPrecisions(itemCodes, locationCode, (res) => {
// if (res.success) {
// managementList.value = res.list
// checkSubmit()
// } else {
// uni.hideLoading()
// showErrorMessage(res.message)
// }
// })
// }
}
const checkSubmit = () => {
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',
action: '==',
value: props.type
},
{
column: 'status',
action: 'in',
value: '1,2'
}
// {
// column: 'fromLocationCode',

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

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

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

@ -75,6 +75,7 @@ const toLocationAreaTypeList = ref([])
const jobStatus = ref('')
const jobToLocationCode = ref('')
const isCheckLocation = ref(false)
const scanedPackingNumber = ref('')
const scanPopup = ref()
const comScanIssuePackRef = ref()
const detailInfoPopupRef = ref()
@ -82,6 +83,7 @@ const comMessageRef = ref()
const comScanLocation = ref()
onLoad((option) => {
id.value = option.id
scanedPackingNumber.value = option.scaned
if (id.value != undefined) {
//
if (option.status == '1') {
@ -151,7 +153,17 @@ const getDetail = () => {
} else {
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 {
showMessage('列表数据为0')
}
@ -203,6 +215,28 @@ const openScanPopup = () => {
const 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) => {
try {
// var supplierCode = result.label.supplierCode;
@ -226,7 +260,7 @@ const getScanResult = (result) => {
})
if (itemDetail == undefined) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]不在列表中`)
} else if (itemDetail.scaned) {
} else if (!itemDetail.cancleScanedHiht && itemDetail.scaned) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]已经扫描`)
} else {
const balanceStatus = getInventoryStatusName(result.balance.inventoryStatus)

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

@ -12,6 +12,9 @@
<u-loadmore :status="loadingType" />
</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" />
</view>
</template>
@ -31,6 +34,9 @@ import jobFilter from '@/mycomponents/job/jobFilter.vue'
import comProductionJobCard from '@/pages/productionReceipt/coms/comProductionJobCard.vue'
import jobListPopup from '@/pages/productionReceipt/coms/jobListPopup.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 jobList = ref([])
@ -48,6 +54,7 @@ const filter = ref()
const comMessageRef = ref()
const jobInfoPopupRef = ref()
const jobListPopupRef = ref()
const jobListRef = ref()
onShow(() => {
nextTick(() => {
getList('refresh')
@ -139,8 +146,8 @@ const getList = (type) => {
showErrorMessage(error)
})
}
const openJobDetail = (item) => {
proxy.$tab.navigateTo(`./productionReceiptDetail?id=${item.masterId}&status=${item.status}`)
const openJobDetail = (item, packingNumber = '') => {
proxy.$tab.navigateTo(`./productionReceiptDetail?id=${item.masterId}&status=${item.status}&scaned=${packingNumber}`)
}
const selectedItem = (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>
<style scoped lang="scss"></style>

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

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

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

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

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

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

Loading…
Cancel
Save