|
|
@ -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> |
|
|
|