diff --git a/package.json b/package.json index be77a5b6..5760b524 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "axios": "^0.21.1", "crypto-js": "^4.1.1", "dayjs": "^1.10.6", + "echarts": "^5.5.1", "element-plus": "^2.3.1", "file-saver": "^2.0.5", "html2canvas": "^1.4.1", @@ -50,4 +51,4 @@ "vite-plugin-vue-setup-extend": "^0.4.0", "xlsx": "^0.18.5" } -} \ No newline at end of file +} diff --git a/src/api/wel/index.js b/src/api/wel/index.js index 7c26ff01..25d115ac 100644 --- a/src/api/wel/index.js +++ b/src/api/wel/index.js @@ -18,9 +18,9 @@ export const postAllocationData = data => { * @param {Object} data * @returns */ -export const postOpenOrderDataByWarehouseId = data => { +export const postAllocationDataByWarehouseId = data => { return request({ - url: '/api/logpm-report/warehouseIndex/openOrderDataByWarehouseId', + url: '/api/logpm-report/warehouseIndex/allocationDataByWarehouseId', method: 'post', data, }); @@ -39,6 +39,19 @@ export const postHandOrderData = data => { }); }; +/** + * 当前在库数据 -- 对比数据 + * @param {Object} data + * @returns + */ +export const postHandOrderDataByWarehouseId = data => { + return request({ + url: '/api/logpm-report/warehouseIndex/handOrderDataByWarehouseId', + method: 'post', + data, + }); +}; + /** * 开单数据 * @param {Object} data @@ -52,6 +65,19 @@ export const postOpenOrderData = data => { }); }; +/** + * 开单数据 -- 对比数据 + * @param {Object} data + * @returns + */ +export const postOpenOrderDataByWarehouseId = data => { + return request({ + url: '/api/logpm-report/warehouseIndex/openOrderDataByWarehouseId', + method: 'post', + data, + }); +}; + /** * 开单收入数据 * @param {Object} data @@ -78,6 +104,19 @@ export const postTrunklineCarsData = data => { }); }; +/** + * 干线车次数据 -- 对比数据 + * @param {Object} data + * @returns + */ +export const postTrunklineCarsDataByWarehouseId = data => { + return request({ + url: '/api/logpm-report/warehouseIndex/trunklineCarsDataByWarehouseId', + method: 'post', + data, + }); +}; + /** * 干线发运数据 * @param {Object} data diff --git a/src/option/distribution/distributionStockArticleSelf.js b/src/option/distribution/distributionStockArticleSelf.js index 6abeab29..67f20e13 100644 --- a/src/option/distribution/distributionStockArticleSelf.js +++ b/src/option/distribution/distributionStockArticleSelf.js @@ -201,6 +201,25 @@ export const columnList = [ fixed: false, sortable: true, }, + { + prop: 'isTimeOutName', + label: '超时状态', + type: 3, + values: '', + width: '100', + checkarr: [ + { + value: '0', + label: '未超时', + }, + { + value: '1', + label: '超时', + }, + ], + fixed: false, + sortable: true, + }, { prop: 'warehouse', label: '所在仓库', diff --git a/src/option/waybill/TemporaryStorageList.js b/src/option/waybill/TemporaryStorageList.js index d67e314a..35d0d365 100644 --- a/src/option/waybill/TemporaryStorageList.js +++ b/src/option/waybill/TemporaryStorageList.js @@ -105,6 +105,25 @@ export const columnList = [ fixed: false, sortable: true, }, + { + prop: 'isTimeOutName', + label: '超时状态', + type: 14, + values: '', + width: '130', + checkarr: [ + { + label: '超时', + value: 1, + }, + { + label: '未超时', + value: 0, + }, + ], + fixed: false, + sortable: true, + }, { prop: 'totalNum', label: '数量', diff --git a/src/views/desk/DataBoard.vue b/src/views/desk/DataBoard.vue new file mode 100644 index 00000000..81700c18 --- /dev/null +++ b/src/views/desk/DataBoard.vue @@ -0,0 +1,2104 @@ + + + + + diff --git a/src/views/distribution/artery/TripartiteTransfer.vue b/src/views/distribution/artery/TripartiteTransfer.vue index 7d783353..91189c97 100644 --- a/src/views/distribution/artery/TripartiteTransfer.vue +++ b/src/views/distribution/artery/TripartiteTransfer.vue @@ -164,6 +164,11 @@ > 修 改 + + +
@@ -490,6 +495,7 @@ import { } from '@/api/distribution/TripartiteTransfer.js'; import { postFindLoadingListData, + postCancelCarsLoadByLoadId, postRemoveCarsLoadScan, postUpdateLoadScanFinalNodeIdById, } from '@/api/distribution/VehicleStowage'; @@ -1258,6 +1264,66 @@ const handleSubmitCloseAnAccount = async () => { } }; +/** 取消配载 */ +const handleCancelCarsLoad = () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + + if (details.selectionList.length === 0) { + return ElMessage({ + message: '请选择需要取消的数据', + type: 'warning', + }); + } else if (details.selectionList.length !== 1) { + return ElMessage({ + message: '仅支持单条数据操作', + type: 'warning', + }); + } + ElMessageBox.confirm('确认取消配载吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(async () => { + const ids = []; + const _flag = details.selectionList.every(val => { + ids.push(val.id); + console.log('val :>> ', val); + return Number(val.loadStatus) === 0; + }); + + if (!_flag) + return ElMessage({ + message: '车辆已发车, 无法取消配载计划', + type: 'warning', + }); + + try { + details.loadingObj.pageLoading = true; + + const submitData = { + loadId: ids.join(','), + startCarType: '1', + }; + + const res = await postCancelCarsLoadByLoadId(submitData); + const { code } = res.data; + if (code !== 200) { + return; + } + ElMessage({ + type: 'success', + message: '取消配载成功', + }); + initOnload(); + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.pageLoading = false; + } + }); +}; + /** * 是否开启床车明细全屏 * @params(_type) 开启或关闭 diff --git a/src/views/distribution/artery/VehicleStowageDetails.vue b/src/views/distribution/artery/VehicleStowageDetails.vue index d29eaf94..1ba4280b 100644 --- a/src/views/distribution/artery/VehicleStowageDetails.vue +++ b/src/views/distribution/artery/VehicleStowageDetails.vue @@ -1061,7 +1061,7 @@ const handleCostApportionments = async () => { for (let i = 0; i < details.oldData.length; i++) { const value = details.oldData[i]; - if (!value.checkUserName) { + if (Number(value.checkStatus) === 0) { _flag = true; break; } diff --git a/src/views/distribution/inventory/delivery/distributionStockArticle.vue b/src/views/distribution/inventory/delivery/distributionStockArticle.vue index bfb56f17..8454fd90 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticle.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticle.vue @@ -733,7 +733,13 @@ import { deepClone, setNodeHeight, hanleTextLineFeed } from '@/utils/util.js'; import { ElMessage, ElMessageBox } from 'element-plus'; import MultiConditionSearch from '@/components/MultiConditionSearch/MultiConditionSearch.vue'; const _newCol = deepClone(columnList); +for (let i = 0; i < _newCol.length; i++) { + const val = _newCol[i]; + if (val.label !== '超时状态') continue; + _newCol.splice(i, 1); + break; +} export default { components: { MultiConditionSearch, diff --git a/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue b/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue index a778474e..232d73f7 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue @@ -471,6 +471,13 @@ import { columnList } from '@/option/distribution/distributionStockArticleSelf'; import { deepClone, hanleTextLineFeed } from '@/utils/util.js'; import { ElMessage, ElMessageBox } from 'element-plus'; const _newCol = deepClone(columnList); +for (let i = 0; i < _newCol.length; i++) { + const val = _newCol[i]; + + if (val.label !== '超时状态') continue; + _newCol.splice(i, 1); + break; +} export default { data() { return { diff --git a/src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue b/src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue index 5d533fcf..4f40241d 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue @@ -464,6 +464,13 @@ import { handleSelectQuery, } from '@/utils/util.js'; const _newCol = deepClone(columnList); +for (let i = 0; i < _newCol.length; i++) { + const val = _newCol[i]; + + if (val.label !== '超时状态') continue; + _newCol.splice(i, 1); + break; +} export default { data() { diff --git a/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue b/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue index 6525784e..a51a065a 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue @@ -121,6 +121,7 @@ :columnList="columnList" :tableData="data" :loading="loading" + :tableRowClassName="handleSetRowClassName" @inputTxt="inputsc" @timeCheck="timesc" @btnCheck="btnsc" @@ -783,6 +784,25 @@ export default { downloadXls(res.data, '自提订单数据.xlsx'); }); }, + handleSetRowClassName(row, rowIndex) { + console.log('row.warehouseEntryTime :>> ', row.warehouseEntryTime); + if (!row.warehouseEntryTime) return 'timeOut'; + + // 设置预警 -- 以创建时间为基准, 24小时后为超期, 临近2小时为临期 + + // 当前时间 - 创建时间 + const time = Date.now() - new Date(row.warehouseEntryTime).getTime(); + console.log('time :>> ', time); + // 预警时间 + const WarningTime = 1000 * 60 * 60 * 24 * 2 - 1000 * 60 * 60 * 2; + console.log('WarningTime :>> ', WarningTime); + // 超时 + const timeOut = 1000 * 60 * 60 * 24 * 2; + console.log('timeOut :>> ', timeOut); + + if (time > timeOut) return 'timeOut'; + else if (time > WarningTime && time < timeOut) return 'WarningTime'; + }, /*getMethodName(row,num){ console.log("名称选择事件",row); switch (num) { @@ -1619,6 +1639,7 @@ export default { item.availableQuantity = nuMap[item.availableQuantity] || item.availableQuantity; item.notReceived = parseInt(item.totalNumber) - parseInt(item.incomingNum); item.isZeroName = Number(item.isZero) === 0 ? '否' : '是'; + item.isTimeOutName = Number(item.isTimeOut) === 0 ? '未超时' : '超时'; item.completeSetName = Number(item.completeSet) === 2 ? '已齐套' : '未齐套'; } @@ -1825,4 +1846,25 @@ export default { .el_textBtn { font-weight: bold; } + +// 表格行样式 +:deep(.el-table) { + tr { + &.WarningTime { + color: #e6a23c !important; + + .el-text { + color: #e6a23c !important; + } + } + + &.timeOut { + color: #f56c6c !important; + + .el-text { + color: #f56c6c !important; + } + } + } +} diff --git a/src/views/waybill/TemporaryStorageList.vue b/src/views/waybill/TemporaryStorageList.vue index 359d386d..058858cb 100644 --- a/src/views/waybill/TemporaryStorageList.vue +++ b/src/views/waybill/TemporaryStorageList.vue @@ -143,6 +143,7 @@ ? loadingObj.haveDataList : loadingObj.notHaveDataList " + :tableRowClassName="handleSetRowClassName" @inputTxt="inputsc" @timeCheck="timesc" @btnCheck="btnsc" @@ -150,7 +151,13 @@ @selection="selectionChange" >