diff --git a/src/api/distribution/truckLoadingDetails.js b/src/api/distribution/truckLoadingDetails.js index 61ece70d..77d3296b 100644 --- a/src/api/distribution/truckLoadingDetails.js +++ b/src/api/distribution/truckLoadingDetails.js @@ -88,3 +88,14 @@ export const postLoadingDetailExport = (data = {}) => { responseType: 'blob', }); }; + +/** + * 零担二维码 + */ +export const postShowOrderCodeByCode = params => { + return request({ + url: '/api/logpm-distribution/distributionStockArticle/showOrderCodeByCode', + method: 'get', + params, + }); +}; diff --git a/src/option/distribution/TripartiteTransfer.js b/src/option/distribution/TripartiteTransfer.js index e3db9336..dfb5694a 100644 --- a/src/option/distribution/TripartiteTransfer.js +++ b/src/option/distribution/TripartiteTransfer.js @@ -468,6 +468,16 @@ export const detailsColumnList = [ fixed: false, sortable: true, }, + { + prop: 'unloadNum', + label: '卸车数', + type: 1, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + }, { prop: 'isDataName', label: '有无数据', diff --git a/src/option/distribution/addVehicleStowage.js b/src/option/distribution/addVehicleStowage.js index 02c5bb92..0369fee7 100644 --- a/src/option/distribution/addVehicleStowage.js +++ b/src/option/distribution/addVehicleStowage.js @@ -1046,18 +1046,21 @@ export const detailsColumnList = [ isColumnMerge: true, sortable: true, }, - // { - // prop: 'totalFee', - // label: '审核状态', - // type: 2, - // values: '', - // width: '130', - // checkarr: [], - // fixed: false, - // isshowSummary: true, - // isColumnMerge: true, - // sortable: true, - // }, + { + prop: 'checkStatusName', + label: '审核状态', + type: 3, + values: '', + width: '130', + checkarr: [ + { label: '未审核', value: '0' }, + { label: '已审核', value: '1' }, + ], + fixed: false, + isshowSummary: true, + isColumnMerge: true, + sortable: true, + }, // { // prop: 'freight', // label: '作废运单号', diff --git a/src/views/distribution/artery/VehicleArrivalManagement.vue b/src/views/distribution/artery/VehicleArrivalManagement.vue index e8bcfea0..611a6640 100644 --- a/src/views/distribution/artery/VehicleArrivalManagement.vue +++ b/src/views/distribution/artery/VehicleArrivalManagement.vue @@ -592,6 +592,7 @@ import { debounce, handleClearTableQuery, handleTranslationDataSeclect, + computeNumber, } from '@/utils/util'; import { columnList } from '@/option/distribution/VehicleArrivalManagement'; import { packageColumnList } from '@/option/distribution/VehicleStowage'; @@ -824,14 +825,20 @@ const onLoad = debounce(async (params = {}) => { const { code, data } = res.data; if (code !== 200) return; details.data = data.records; - // 装车状态 - // const codes = details.carsStatus.map(val => val.value); - // for (let item of details.data) { - // const _index = codes.indexOf(Number(item.loadStatus)); - // item.loadStatusName = _index !== -1 ? details.carsStatus[_index].label : '未知'; - // item.NumberOfPiecesInTheCar = item.realLoadingNumber - item.unloadNumber; - // } + + // 映射下拉框值 handleTranslationDataSeclect(details.data, details.columnList); + + // 计算在车件数 + for (let i = 0; i < details.data.length; i++) { + const value = details.data[i]; + + value.NumberOfPiecesInTheCar = computeNumber( + value.realLoadingNumber || 0, + '-', + value.unloadNumber || 0 + ).result; + } details.page.total = data.total; } catch (error) { console.log('error :>> ', error); diff --git a/src/views/distribution/artery/VehicleStowage.vue b/src/views/distribution/artery/VehicleStowage.vue index 26b8cda7..b16df01e 100644 --- a/src/views/distribution/artery/VehicleStowage.vue +++ b/src/views/distribution/artery/VehicleStowage.vue @@ -539,6 +539,7 @@ import { deepClone, handleClearTableQuery, handleTranslationDataSeclect, + computeNumber, } from '@/utils/util'; import { columnList, packageColumnList } from '@/option/distribution/VehicleStowage'; import { @@ -767,23 +768,19 @@ const onLoad = debounce(async (params = {}) => { if (code !== 200) return; details.data = data.records; + // 映射下拉框值 handleTranslationDataSeclect(details.data, details.columnList); - // for (let item of details.data) { - // item.loadStatusName = item.loadStatusName = carStateDictionaries.find( - // val => Number(item.loadStatus) === val.value - // ).label; - // item.NumberOfPiecesInTheCar = item.realLoadingNumber - item.unloadNumber; - - // for (let index = 0; index < details.selectionList.length; index++) { - // const element = details.selectionList[index]; - - // if (element.id === item.id) { - // details.selectionList.splice(index, 1, element); - // break; - // } - // } - // } + // 计算在车件数 + for (let i = 0; i < details.data.length; i++) { + const value = details.data[i]; + + value.NumberOfPiecesInTheCar = computeNumber( + value.realLoadingNumber || 0, + '-', + value.unloadNumber || 0 + ).result; + } details.page.total = data.total; } catch (error) { diff --git a/src/views/distribution/artery/VehicleStowageDetails.vue b/src/views/distribution/artery/VehicleStowageDetails.vue index 0f3a5303..cba1f1b0 100644 --- a/src/views/distribution/artery/VehicleStowageDetails.vue +++ b/src/views/distribution/artery/VehicleStowageDetails.vue @@ -465,6 +465,7 @@ import { handleSelectQuery, handleTimeQuery, handleFilterData, + handleTranslationDataSeclect, } from '@/utils/util'; import { detailsColumnList, nodeInfoColumnList } from '@/option/distribution/addVehicleStowage'; import { detailsColumnList as abnormalColumn } from '@/option/distribution/TripartiteTransfer'; @@ -913,6 +914,7 @@ const handleData = async () => { console.log('_data :>> ', _data); details.renderData = _data; + handleTranslationDataSeclect(details.renderData, details.detailsColumnList); console.log('details.renderData :>> ', details.renderData); }; diff --git a/src/views/distribution/artery/abnormalList.vue b/src/views/distribution/artery/abnormalList.vue index 031909b0..13dc46a8 100644 --- a/src/views/distribution/artery/abnormalList.vue +++ b/src/views/distribution/artery/abnormalList.vue @@ -15,37 +15,18 @@ - - - - - + + placeholder="请输入仓库名称" + > - + - + + 搜 索 @@ -146,9 +128,9 @@
取 消 无效包条 - 同步数据 + + 同步数据 +
@@ -175,6 +157,7 @@ import { getHtmls, deepClone, handleClearTableQuery, + getObjType, } from '@/utils/util'; import { columnList } from '@/option/distribution/abnormalList'; import { useRouter } from 'vue-router'; @@ -292,7 +275,23 @@ const onLoad = async (page?: any, params = {}) => { let _page = details.page; if (page) _page = page; // 获取暂存单列表 - const res = await postFindPageList({ ..._page, ...details.query, ...params }); + + const submitData = { ..._page, ...details.query, ...params }; + + const { createDateArr, dealDateArr } = details.query; + + if (getObjType(createDateArr) === 'array' && createDateArr.length > 0) { + submitData.createDateStartStr = details.query.createDateArr[0]; + submitData.createDateEndStr = details.query.createDateArr[1]; + } + if (getObjType(dealDateArr) === 'array' && dealDateArr.length > 0) { + submitData.dealDateStartStr = details.query.dealDateArr[0]; + submitData.dealDateEndStr = details.query.dealDateArr[1]; + } + delete submitData.createDateArr; + delete submitData.dealDateArr; + + const res = await postFindPageList(submitData); console.log('res :>> ', res); const { code, data } = res.data; if (code !== 200) return; @@ -314,6 +313,7 @@ const onLoad = async (page?: any, params = {}) => { details.page.total = data.total; } catch (error) { + console.log('error :>> ', error); } finally { details.loadingObj.list = false; } diff --git a/src/views/distribution/artery/truckLoadingDetails.vue b/src/views/distribution/artery/truckLoadingDetails.vue index 9510d5d3..1529a9fd 100644 --- a/src/views/distribution/artery/truckLoadingDetails.vue +++ b/src/views/distribution/artery/truckLoadingDetails.vue @@ -135,11 +135,11 @@