Browse Source

打印

2024/6/20 13:22:38
hella_vue3
zhang_li 3 months ago
parent
commit
804cde655f
  1. 26
      src/hybrid/html/point.html
  2. 3
      src/mycomponents/jobList/jobList.vue
  3. 1
      src/mycomponents/scan/winComScan.vue
  4. 7
      src/pages/issue/coms/comScanIssuePack.vue
  5. 13
      src/pages/issue/job/issueDetail.vue
  6. 18
      src/pages/issue/job/issueJob.vue
  7. 2
      src/pages/point/index.vue
  8. 2
      src/pages/purchaseReceipt/job/receiptJob.vue

26
src/hybrid/html/point.html

@ -11,12 +11,12 @@
}); });
</script> </script>
<style> <style>
.box { .box {
font-size: 14px; font-size: 14px;
display: flex; display: flex;
margin-top: 60px;
} }
@ -35,38 +35,42 @@
border-right: 1px solid #b1b1b1; border-right: 1px solid #b1b1b1;
width: 60px; width: 60px;
padding: 0px 5px; padding: 0px 5px;
height: 67px; height: 58px;
line-height: 67px; line-height: 58px;
} }
.value { .value {
border-bottom: 1px solid #b1b1b1; border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1; border-right: 1px solid #b1b1b1;
padding: 0px 5px; padding: 0px 5px;
height: 67px; height: 58px;
flex: 1; flex: 1;
width: 0px; width: 0px;
display: flex; display: flex;
align-items: center; align-items: center;
word-wrap: break-word; word-break: break-all;
} }
.right { .right {
width: 200px; width: 300px;
} }
.image { .image {
width: 100%;
height: 202px; width: calc(100% - 1px);
height: 176px;
border-bottom: 1px solid #b1b1b1; border-bottom: 1px solid #b1b1b1;
border-top: 1px solid #b1b1b1; border-top: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1; border-right: 1px solid #b1b1b1;
} }
.image img { .image img {
width: calc(100% - 4px); width: 172px;
height: calc(100% - 4px); height: 172px;
margin: 2px; border: 1px solid #b1b1b1;
/* width: calc(100% - 4px);
height: calc(100% - 4px); */
margin: 1px;
} }
</style> </style>
</head> </head>

3
src/mycomponents/jobList/jobList.vue

@ -28,6 +28,7 @@ const openList = (listParmas) => {
show.value = true show.value = true
} }
const selectItem = (item, index) => { const selectItem = (item, index) => {
show.value = false
emit('selectItem', item) emit('selectItem', item)
} }
@ -46,7 +47,7 @@ defineExpose({
.list { .list {
width: 80%; width: 80%;
max-height: 80vh; max-height: 50vh;
overflow-y: auto; overflow-y: auto;
border-radius: 10px !important; border-radius: 10px !important;

1
src/mycomponents/scan/winComScan.vue

@ -154,6 +154,7 @@ const handelScanMsg = () => {
getLabelInfo(content, props.headerType, (callback) => { getLabelInfo(content, props.headerType, (callback) => {
// uni.hideLoading(); // uni.hideLoading();
const scanResult = callback const scanResult = callback
scanResult.scanMessage = content
if (scanResult.success) { if (scanResult.success) {
clear() clear()
// that.getfocus();// // that.getfocus();//

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

@ -105,7 +105,7 @@ onMounted(() => {
detailOptions.value = getDetailOption() detailOptions.value = getDetailOption()
scanOptions.value = getDetailEditRemoveOption() scanOptions.value = getDetailEditRemoveOption()
}) })
const openScanPopupForJobSimulate = (content, jobcontentParams) => { const openScanPopupForJobSimulate = (content, jobcontentParams, scanMessage) => {
issueRecord.value = [] issueRecord.value = []
dataContent.value = content dataContent.value = content
jobContent.value = jobcontentParams jobContent.value = jobcontentParams
@ -117,7 +117,7 @@ const openScanPopupForJobSimulate = (content, jobcontentParams) => {
if (timer) { if (timer) {
clearTimeout(timer) clearTimeout(timer)
} }
comscansimulate.value.vlaue.setItemCodeSimulate(item.copyContent) comscansimulate.value.vlaue.setItemCodeSimulate(scanMessage)
comscansimulate.value.vlaue.clickScanMsg() comscansimulate.value.vlaue.clickScanMsg()
}, 500) }, 500)
} }
@ -464,7 +464,8 @@ const cancle = () => {
const emit = defineEmits(['updateData', 'closeScan', 'afterScan']) const emit = defineEmits(['updateData', 'closeScan', 'afterScan'])
defineExpose({ defineExpose({
openScanPopup, openScanPopup,
closeScanPopup closeScanPopup,
openScanPopupForJobSimulate
}) })
</script> </script>

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

@ -64,7 +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 scanMessage = ref('')
const scanPopup = ref() const scanPopup = ref()
const comScanIssuePackRef = ref() const comScanIssuePackRef = ref()
const comMessageRef = ref() const comMessageRef = ref()
@ -73,7 +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 scanMessage.value = option.scanMessage
if (id.value != undefined) { if (id.value != undefined) {
// //
if (option.status == '1') { if (option.status == '1') {
@ -141,7 +141,10 @@ const getDetail = () => {
jobStatus.value = res.data.status jobStatus.value = res.data.status
subList.value = res.data.subList subList.value = res.data.subList
detailSource.value = getDataSource(detailSource.value, subList.value) detailSource.value = getDataSource(detailSource.value, subList.value)
//
if (scanMessage.value) {
openScanPopupSimulate(scanMessage.value)
}
setTimeout((r) => { setTimeout((r) => {
resizeCollapse() resizeCollapse()
}, 100) }, 100)
@ -305,6 +308,7 @@ const updateData = (record) => {
item.handleQty = itemHandleQty item.handleQty = itemHandleQty
} }
const afterScan = () => { const afterScan = () => {
resizeCollapse()
detailSource.value.forEach((detail) => { detailSource.value.forEach((detail) => {
const s = '' const s = ''
detail.Items.forEach((item) => { detail.Items.forEach((item) => {
@ -376,6 +380,9 @@ const openScanDetailPopup = () => {
// Object.assign(datacontent, this.detailSource); // Object.assign(datacontent, this.detailSource);
comScanIssuePackRef.value.openScanPopup(detailSource.value, jobContent.value) comScanIssuePackRef.value.openScanPopup(detailSource.value, jobContent.value)
} }
const openScanPopupSimulate = (scanMessage) => {
comScanIssuePackRef.value.openScanPopupForJobSimulate(detailSource.value, jobContent.value, scanMessage)
}
const closeScanPopup = () => { const closeScanPopup = () => {
updateCommitBtn() updateCommitBtn()
} }

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

@ -12,9 +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> <win-scan-button @goScan="openScanPopup" v-if="jobList.length > 0"></win-scan-button>
<winScanPackJob ref="scanPopup" @getResult="getScanResult"></winScanPackJob> <winScanPackJob ref="scanPopup" @getResult="getScanResult"></winScanPackJob>
<jobList ref="jobListRef" @selectItem="selectItem"></jobList> <jobListView ref="jobListRef" @selectItem="selectItem"></jobListView>
<com-message ref="comMessageRef" /> <com-message ref="comMessageRef" />
</view> </view>
</template> </template>
@ -35,7 +35,7 @@ import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackJob from '@/mycomponents/scan/winScanPackJob.vue' import winScanPackJob from '@/mycomponents/scan/winScanPackJob.vue'
import jobList from '@/mycomponents/jobList/jobList.vue' import jobListView from '@/mycomponents/jobList/jobList.vue'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const jobList = ref([]) const jobList = ref([])
@ -50,6 +50,7 @@ const status = ref('1,2') // 待处理 、进行中
const detailOptions = ref([]) const detailOptions = ref([])
const detailGiveupOptions = ref([]) const detailGiveupOptions = ref([])
const filter = ref() const filter = ref()
const scanMessage = ref('')
const comMessageRef = ref() const comMessageRef = ref()
const jobInfoPopupRef = ref() const jobInfoPopupRef = ref()
const jobListPopupRef = ref() const jobListPopupRef = ref()
@ -166,15 +167,15 @@ const getList = (type, fromLocationCode = '', productionLineCode = '') => {
}) })
} }
const openJobDetail = (item, packingNumber = '') => { const openJobDetail = (item, scanMessage = '') => {
proxy.$tab.navigateTo(`./issueDetail?id=${item.masterId}&status=${item.status}&scaned=${packingNumber}`) proxy.$tab.navigateTo(`./issueDetail?id=${item.masterId}&status=${item.status}&scanMessage=${scanMessage}`)
} }
const selectedItem = (item) => { const selectedItem = (item) => {
openJobDetail(item) openJobDetail(item)
} }
const selectItem = (item) => { const selectItem = (item) => {
scanPopup.value.closeScanPopup() scanPopup.value.closeScanPopup()
openJobDetail(item, item.packingNumber) openJobDetail(item, scanMessage.value)
} }
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)
@ -323,6 +324,7 @@ const getScanResult = (result) => {
by: 'asc' by: 'asc'
}) })
.then((res) => { .then((res) => {
scanMessage.value = result.scanMessage
const resultList = res.data.list const resultList = res.data.list
if (resultList.length > 0) { if (resultList.length > 0) {
resultList.forEach((item) => { resultList.forEach((item) => {
@ -338,10 +340,10 @@ const getScanResult = (result) => {
if (list.length > 1) { if (list.length > 1) {
jobListRef.value.openList(list) jobListRef.value.openList(list)
} else { } else {
selectItem(list[0]) selectItem(list[0], scanMessage)
} }
} else { } else {
showMessage('未查找到任务') showMessage(`物料号[${result.label.itemCode}]批次[${result.label.batch}]未查找到任务`)
} }
}) })
.catch((error) => { .catch((error) => {

2
src/pages/point/index.vue

@ -277,7 +277,7 @@
width: 0px; width: 0px;
display: flex; display: flex;
align-items: center; align-items: center;
word-wrap: break-word; word-break: break-all;
} }
.right { .right {

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

@ -11,7 +11,7 @@
<receipt-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></receipt-job-list-popup> <receipt-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></receipt-job-list-popup>
</view> </view>
<win-scan-button @goScan="openScanPopup" v-if="jobList.length > 0"></win-scan-button> <win-scan-button @goScan="openScanPopup" v-if="jobList.length > 0"></win-scan-button>
<winScanPackJob :title="scanTitle" ref="scanPopup" @getResult="getScanResult"> </winScanPackJob> <winScanPackJob title="箱标签" ref="scanPopup" @getResult="getScanResult"> </winScanPackJob>
<jobListCom ref="jobListRef" @selectItem="selectItem"></jobListCom> <jobListCom ref="jobListRef" @selectItem="selectItem"></jobListCom>
<com-message ref="comMessageRef" /> <com-message ref="comMessageRef" />
</view> </view>

Loading…
Cancel
Save