diff --git a/src/api/distribution/directMerchantSign.js b/src/api/distribution/directMerchantSign.js new file mode 100644 index 00000000..cbe6c6ee --- /dev/null +++ b/src/api/distribution/directMerchantSign.js @@ -0,0 +1,27 @@ +import request from '@/axios'; + +/** + * 直发商家签收列表 + * @param {*} data + * @returns + */ +export const postFindSignOrderPageList = data => { + return request({ + url: '/api/logpm-trunkline/carsLoad/findSignOrderPageList', + method: 'post', + data, + }); +}; + +/** + * 直发商家签收列表 + * @param {*} data + * @returns + */ +export const postFindSignPhotoList = data => { + return request({ + url: '/api/logpm-trunkline/carsLoad/findSignPhotoList', + method: 'post', + data, + }); +}; diff --git a/src/api/distribution/distributionStockArticle.js b/src/api/distribution/distributionStockArticle.js index 2c9d8895..a8b6dd82 100644 --- a/src/api/distribution/distributionStockArticle.js +++ b/src/api/distribution/distributionStockArticle.js @@ -365,7 +365,7 @@ export const $_Modifywaybillrecipient = data => { }); }; -// 修改运单收货人 +/** 查看零担二维码 */ export const postShowOrderCode = params => { return request({ url: '/api/logpm-distribution/distributionStockArticle/showOrderCode', @@ -394,8 +394,6 @@ export const getCollectt = params => { }); }; - - // 在库订单详情 export const $_signforListDetail = params => { return request({ @@ -403,4 +401,4 @@ export const $_signforListDetail = params => { method: 'get', params, }); -}; \ No newline at end of file +}; diff --git a/src/api/wel/index.js b/src/api/wel/index.js index 3cc81a38..d4112e05 100644 --- a/src/api/wel/index.js +++ b/src/api/wel/index.js @@ -7,7 +7,7 @@ import request from '@/axios'; */ export const postAllocationData = data => { return request({ - url: '/api/logpm-report-zhy/warehouseIndex/allocationData', + url: '/api/logpm-report/warehouseIndex/allocationData', method: 'post', data, }); @@ -20,7 +20,7 @@ export const postAllocationData = data => { */ export const postHandOrderData = data => { return request({ - url: '/api/logpm-report-zhy/warehouseIndex/handOrderData', + url: '/api/logpm-report/warehouseIndex/handOrderData', method: 'post', data, }); @@ -33,7 +33,7 @@ export const postHandOrderData = data => { */ export const postOpenOrderData = data => { return request({ - url: '/api/logpm-report-zhy/warehouseIndex/openOrderData', + url: '/api/logpm-report/warehouseIndex/openOrderData', method: 'post', data, }); @@ -46,7 +46,7 @@ export const postOpenOrderData = data => { */ export const postOpenOrderIncome = data => { return request({ - url: '/api/logpm-report-zhy/warehouseIndex/openOrderIncome', + url: '/api/logpm-report/warehouseIndex/openOrderIncome', method: 'post', data, }); @@ -59,7 +59,7 @@ export const postOpenOrderIncome = data => { */ export const postTrunklineCarsData = data => { return request({ - url: '/api/logpm-report-zhy/warehouseIndex/trunklineCarsData', + url: '/api/logpm-report/warehouseIndex/trunklineCarsData', method: 'post', data, }); @@ -72,7 +72,7 @@ export const postTrunklineCarsData = data => { */ export const postTrunklineHandOrderData = data => { return request({ - url: '/api/logpm-report-zhy/warehouseIndex/trunklineHandOrderData', + url: '/api/logpm-report/warehouseIndex/trunklineHandOrderData', method: 'post', data, }); @@ -85,7 +85,7 @@ export const postTrunklineHandOrderData = data => { */ export const postUnloadAbnormalData = data => { return request({ - url: '/api/logpm-report-zhy/warehouseIndex/unloadAbnormalData', + url: '/api/logpm-report/warehouseIndex/unloadAbnormalData', method: 'post', data, }); @@ -98,7 +98,7 @@ export const postUnloadAbnormalData = data => { */ export const postDeliveryData = data => { return request({ - url: '/api/logpm-report-tjj/warehouseIndex/deliveryData', + url: '/api/logpm-report/warehouseIndex/deliveryData', method: 'post', data, }); @@ -111,7 +111,7 @@ export const postDeliveryData = data => { */ export const postSignforData = data => { return request({ - url: '/api/logpm-report-tjj/warehouseIndex/signforData', + url: '/api/logpm-report/warehouseIndex/signforData', method: 'post', data, }); diff --git a/src/components/MyPrint/MyPrint.vue b/src/components/MyPrint/MyPrint.vue index f3017af4..f9d4face 100644 --- a/src/components/MyPrint/MyPrint.vue +++ b/src/components/MyPrint/MyPrint.vue @@ -50,6 +50,10 @@ const props = defineProps({ type: Function, default: null, }, + type: { + type: String, + default: 'deliveryPrint' + } }); const $emit = defineEmits(['update:modelValue']); @@ -150,7 +154,7 @@ const printTemplate = () => { const printNode = document.querySelectorAll('.printCode > div > div'); console.log('printNode :>> ', printNode); - print(printNode); + print(printNode, props.type); }; </script> diff --git a/src/components/tablecmt/tablecmt.vue b/src/components/tablecmt/tablecmt.vue index 0ea4d3af..3ac5c95b 100644 --- a/src/components/tablecmt/tablecmt.vue +++ b/src/components/tablecmt/tablecmt.vue @@ -380,18 +380,8 @@ const isHaveSelection = ref(false); let selectarr = ref([]); /** 设置每行颜色 */ const tableRowClassName = ({ row, rowIndex }: { row: TableDataType; rowIndex: number }) => { - // let sfcheck = false; - let item = ''; - - for (let value of selectarr.value) { - if (value == row) { - item = value; - break; - } - } - - if (item) { - return 'table-SelectedRow-bgcolor'; + for (let i = 0; i < selectarr.value.length; i++) { + if (selectarr.value[i] === row) return 'table-SelectedRow-bgcolor'; } if (props.tableRowClassName) return props.tableRowClassName(row, rowIndex); @@ -434,7 +424,7 @@ onMounted(() => { /** 勾选 */ function handleCheckSelect(select: any[]) { console.log('select :>> ', select); - console.log(props.isselectfun,'props.isselectfun'); + console.log(props.isselectfun, 'props.isselectfun'); if (select.length !== 0) { for (const item of select) { if (props.isselectfun) { diff --git a/src/option/distribution/TripartiteTransfer.js b/src/option/distribution/TripartiteTransfer.js index ee0efc9e..e3db9336 100644 --- a/src/option/distribution/TripartiteTransfer.js +++ b/src/option/distribution/TripartiteTransfer.js @@ -338,10 +338,20 @@ export const detailsColumnList = [ fixed: false, sortable: true, }, + { + prop: 'destinationWarehouseName', + label: '运单目的仓', + type: 2, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + }, { prop: 'scanStatusName', label: '装卸状态', - type: 3, + type: 14, values: '', width: '130', checkarr: [], diff --git a/src/option/distribution/VehicleArrivalManagement.js b/src/option/distribution/VehicleArrivalManagement.js index 34ad3cfb..1aa68d1d 100644 --- a/src/option/distribution/VehicleArrivalManagement.js +++ b/src/option/distribution/VehicleArrivalManagement.js @@ -99,16 +99,19 @@ export const columnList = [ // fixed: false, // sortable: true, // }, - // { - // prop: 'endTime', - // label: '直发商家', - // type: 1, - // values: '', - // width: '130', - // checkarr: [], - // fixed: false, - // sortable: true, - // }, + { + prop: 'isCustomerName', + label: '是否直发商家', + type: 6, + values: '', + width: '130', + checkarr: [ + { label: '是', value: '1' }, + { label: '否', value: '2' }, + ], + fixed: false, + sortable: true, + }, // { // prop: 'planVolume', // label: '类型', diff --git a/src/option/distribution/VehicleStowage.js b/src/option/distribution/VehicleStowage.js index dc850f17..9eac2c5b 100644 --- a/src/option/distribution/VehicleStowage.js +++ b/src/option/distribution/VehicleStowage.js @@ -99,19 +99,19 @@ export const columnList = [ // fixed: false, // sortable: true, // }, - // { - // prop: 'isCustomerName', - // label: '是否直发商家', - // type: 6, - // values: '', - // width: '130', - // checkarr: [ - // { label: '是', value: '1' }, - // { label: '否', value: '2' }, - // ], - // fixed: false, - // sortable: true, - // }, + { + prop: 'isCustomerName', + label: '是否直发商家', + type: 6, + values: '', + width: '130', + checkarr: [ + { label: '是', value: '1' }, + { label: '否', value: '2' }, + ], + fixed: false, + sortable: true, + }, // { // prop: 'planVolume', // label: '类型', diff --git a/src/option/distribution/directMerchantSign.js b/src/option/distribution/directMerchantSign.js new file mode 100644 index 00000000..565f7c26 --- /dev/null +++ b/src/option/distribution/directMerchantSign.js @@ -0,0 +1,154 @@ +/** 签收列表 */ +export const columnList = [ + { + prop: '', + label: '复选框', + type: 0, + width: 55, + fixed: true, + }, + { + prop: '', + label: '序号', + type: 12, + values: '', + width: 55, + fixed: true, + }, + { + prop: 'carsNo', + label: '车次号', + type: 2, + values: '', + width: '150', + checkarr: [], + fixed: false, + sortable: true, + head: false, + }, + { + prop: 'loadSignCode', + label: '签收号', + type: 2, + values: '', + width: '150', + checkarr: [], + fixed: false, + sortable: true, + head: false, + }, + { + prop: 'belongToWarehouseName', + label: '归属仓库', + type: 2, + values: '', + width: '180', + checkarr: [], + fixed: false, + sortable: true, + }, + { + prop: 'mallName', + label: '商场名称', + type: 2, + values: '', + width: '180', + checkarr: [], + fixed: false, + sortable: true, + }, + { + prop: 'mallPerson', + label: '商场联系人', + type: 2, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + }, + { + prop: 'mallMobile', + label: '商场电话', + type: 2, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + }, + { + prop: 'mallAddress', + label: '商场地址', + type: 2, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + }, + { + prop: 'driverName', + label: '司机名称', + type: 2, + values: '', + width: '180', + checkarr: [], + fixed: false, + sortable: true, + }, + { + prop: 'planNum', + label: '计划数', + type: 1, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + }, + { + prop: 'loadingNum', + label: '装车数', + type: 1, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + }, + { + prop: 'signNum', + label: '签收数', + type: 1, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + }, + { + prop: 'signStatusName', + label: '签收状态', + type: 14, + values: '', + width: '130', + checkarr: [ + { label: '未签收', value: '0' }, + { label: '部分签收', value: '10' }, + { label: '已签收', value: '20' }, + ], + fixed: false, + sortable: true, + }, + { + prop: 'createUserName', + label: '操作', + type: 6, + values: '', + width: '200', + checkarr: [], + fixed: 'right', + sortable: false, + }, +]; diff --git a/src/utils/print.js b/src/utils/print.js index 93b7c591..26f4bf5e 100644 --- a/src/utils/print.js +++ b/src/utils/print.js @@ -1,10 +1,41 @@ import { getLodop } from '@/utils/LodopFuncs'; import hwyPrintNew from '@/utils/print/index'; + +/** 处理标签打印 */ +const handleTitlePrint = (LODOP, templateData)=>{ + LODOP.PRINT_INITA(1, 1, 900, 660, '测试预览功能'); + LODOP.SET_PRINT_MODE('WINDOW_DEFPRINTER', 'Godex G500'); + LODOP.SET_PRINT_STYLEA(0, 'TextNeatRow', true); //允许标点溢出,且英文单词拆开 + // LODOP.SET_PRINT_STYLE('FontColor', '#000000'); + // // 设置打印整宽且不变形 + LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', 'Auto-Width'); + // // 设置打印后自动关闭 + LODOP.SET_PRINT_MODE('AUTO_CLOSE_PREWINDOW', 1); + // // data就是一段html文本 + LODOP.ADD_PRINT_HTM('30', '0%', '100%', '100%', templateData); +} + +/** 打印配送单 */ +const handleDeliveryPrint = (LODOP, templateData)=>{ + LODOP.PRINT_INITA(""); + // LODOP.SET_PRINT_MODE('WINDOW_DEFPRINTER', 'Godex G500'); + LODOP.SET_PRINT_STYLEA(0, 'TextNeatRow', true); //允许标点溢出,且英文单词拆开 + // LODOP.SET_PRINT_STYLE('FontColor', '#000000'); + // // 设置打印整宽且不变形 + LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', '98%'); + // // 设置打印后自动关闭 + LODOP.SET_PRINT_MODE('AUTO_CLOSE_PREWINDOW', 1); + + // // data就是一段html文本 + LODOP.ADD_PRINT_HTM('0', '0%', '100%%', "100%", templateData); +} + /** * 根据传入的元素列表进行打印 * @param nodeList 元素节点列表 + * @param type 打印类型: titlePrint -- 标签打印; deliveryPrint -- 配送单打印 */ -const print = nodeList => { +const print = (nodeList, type = 'deliveryPrint') => { // 直接调用时使用默认节点列表 if (!nodeList) nodeList = document.querySelectorAll('.el-dialog__body>div>div>div'); @@ -16,23 +47,17 @@ const print = nodeList => { // 循环列表内元素并打印 nodeList.forEach(orderNode => { - LODOP.PRINT_INITA(1, 1, 900, 660, '测试预览功能'); - LODOP.SET_PRINT_MODE('WINDOW_DEFPRINTER', 'Godex G500'); - LODOP.SET_PRINT_STYLEA(0, 'TextNeatRow', true); //允许标点溢出,且英文单词拆开 - // LODOP.SET_PRINT_STYLE('FontColor', '#000000'); - // // 设置打印整宽且不变形 - LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', 'Auto-Width'); - // // 设置打印后自动关闭 - LODOP.SET_PRINT_MODE('AUTO_CLOSE_PREWINDOW', 1); - console.log(orderNode, 'orderNode'); - let templateData = orderNode.innerHTML; - // // data就是一段html文本 - LODOP.ADD_PRINT_HTM('45', '0%', '100%', '100%', templateData); + // let templateData="<h1>1111</h1>" + + + + if (type === 'titlePrint') handleTitlePrint(LODOP, templateData) + else handleDeliveryPrint(LODOP, templateData) // LODOP.NewPage() - LODOP.PRINT(); //直接打印 + // LODOP.PRINT(); //直接打印 }); - // LODOP.PREVIEW(); //预览(预览打印无脚标) + LODOP.PREVIEW(); //预览(预览打印无脚标) }; const newPrint = nodeName => { @@ -48,4 +73,25 @@ const newPrint = nodeName => { hwyPrintNew('.el-dialog__body>div>div>div'); }; + +const hwyPrint2 = nodeList => { + // 直接调用时使用默认节点列表 + if (!nodeList) nodeList = document.querySelectorAll('.el-dialog__body>div>div>div'); + + // 初始化打印实例 + let LODOP = getLodop(); + + // 当列表内没有元素时, 退出函数 + if (nodeList.length === 0) return; + + // 循环列表内元素并打印 + nodeList.forEach(orderNode => { + + // LODOP.NewPage()100 + // LODOP.PRINT(); //直接打印 + LODOP.PRINT_DESIGN(); + }); + // LODOP.PREVIEW(); //预览(预览打印无脚标) +}; + export default print; diff --git a/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue b/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue index de43afd6..e4abd3fb 100644 --- a/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue +++ b/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue @@ -400,7 +400,7 @@ export default { printTemplate() { const printNode = document.querySelectorAll('.print_QRCode>div>div'); console.log('printNode :>> ', printNode); - print(printNode); + print(printNode, 'titlePrint'); }, async handleqr() { try { diff --git a/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue b/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue index b40bd644..51104815 100644 --- a/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue +++ b/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue @@ -1365,7 +1365,7 @@ export default { console.log('nodeList :>> ', nodeList); - print(nodeList); + print(nodeList, 'titlePrint'); }, rowDel(row) { this.$confirm('确定将选择数据删除?', { diff --git a/src/views/basicdata/warehouse/tray/basicdataTray.vue b/src/views/basicdata/warehouse/tray/basicdataTray.vue index fd3c5248..9ccebb73 100644 --- a/src/views/basicdata/warehouse/tray/basicdataTray.vue +++ b/src/views/basicdata/warehouse/tray/basicdataTray.vue @@ -346,7 +346,7 @@ export default { const printNode = document.querySelectorAll('.print_QRCode>div>div'); console.log('printNode :>> ', printNode); - print(printNode); + print(printNode, 'titlePrint'); }, async handleqr() { try { diff --git a/src/views/distribution/artery/AddVehicleStowage.vue b/src/views/distribution/artery/AddVehicleStowage.vue index 8756fd4a..4d98fe1e 100644 --- a/src/views/distribution/artery/AddVehicleStowage.vue +++ b/src/views/distribution/artery/AddVehicleStowage.vue @@ -27,7 +27,15 @@ </div> <!-- 控件 --> - <div v-if="Number(details.pageType) !== 3"> + <div + v-if=" + Number(details.pageType) === 3 + ? false + : Number(details.pageType) === 2 + ? index > details.active + : true + " + > <!-- 删除节点 --> <el-button icon="Delete" @@ -285,7 +293,12 @@ :precision="2" :min="0" :step="1" - :disabled="slotProps.scope.row.blackList.includes(slotProps.scope.column.property)" + :disabled=" + Number(details.pageType) === 1 + ? slotProps.scope.row.blackList.includes(slotProps.scope.column.property) + : slotProps.scope.row.index < details.active || + slotProps.scope.row.blackList.includes(slotProps.scope.column.property) + " :value-on-clear="0" @change="handleComputedNum" v-model.lazy="slotProps.scope.row[slotProps.scope.column.property]" @@ -1013,6 +1026,7 @@ const onLoad = async () => { details.pageInfo = data; details.nodeInfoData = [ { + index: 1, nodeName: data.startWarehouseInfo.warehouseName, nodeId: data.startWarehouseInfo.warehouseId, linkMan: data.startWarehouseInfo.linkMan, @@ -1038,6 +1052,7 @@ const onLoad = async () => { details.nodeInfoData = handleEditForbidden( data.allCarsLineList.map((val, index) => { const _node = { + index, ...val, // 筛选 query: {}, @@ -1388,6 +1403,7 @@ const handleAddNode = async (index: number) => { } details.nodeInfoData.splice(index + 1, 0, { + index: index + 1, // 筛选 query: {}, // 时间筛选 @@ -1877,6 +1893,8 @@ const nodeCostSubmit = async () => { /** 提交 */ const handleSubmit = (formEl: FormInstance | undefined) => { + if (details.nodeInfoData.length <= 1) return ElMessage.warning('最少存在一个目的仓'); + if (btnLoadingObj.submitBtn) return; if (!formEl) return; formEl.validate((valid, fields) => { diff --git a/src/views/distribution/artery/TripartiteTransfer.vue b/src/views/distribution/artery/TripartiteTransfer.vue index ba25c705..f4b0e01a 100644 --- a/src/views/distribution/artery/TripartiteTransfer.vue +++ b/src/views/distribution/artery/TripartiteTransfer.vue @@ -202,6 +202,7 @@ <!-- 结算 --> <el-text v-if=" + slotProps.scope.row.signTime && permissionObj.TripartiteTransfer_Account && Number(slotProps.scope.row.isSettlement) === 1 " diff --git a/src/views/distribution/artery/VehicleArrivalManagement.vue b/src/views/distribution/artery/VehicleArrivalManagement.vue index ce21d4a5..e8bcfea0 100644 --- a/src/views/distribution/artery/VehicleArrivalManagement.vue +++ b/src/views/distribution/artery/VehicleArrivalManagement.vue @@ -258,6 +258,14 @@ <el-tag type="danger">{{ slotProps.scope.row.loadStatusName }}</el-tag> </template> + <template v-else-if="slotProps.scope.column.label === '是否直发商家'"> + <el-tag + v-if="slotProps.scope.row.isCustomer" + :class="slotProps.scope.row.isCustomer === '1' ? 'green' : 'red'" + >{{ slotProps.scope.row.isCustomerName }}</el-tag + > + </template> + <template v-else-if=" slotProps.scope.column.label === '操作' && @@ -275,20 +283,14 @@ <el-text v-if=" permissionObj.VehicleArrivalManagement_edit && - (Mydata.id === slotProps.scope.row.nowWarehouseId || - Number(slotProps.scope.row.loadStatus) !== 40) + Mydata.id === slotProps.scope.row.nowWarehouseId && + Number(slotProps.scope.row.loadStatus) === 20 " @click="handleEditStowage(slotProps.scope)" >编辑 </el-text> - <el-dropdown - v-if=" - Mydata.id === slotProps.scope.row.nowWarehouseId && - Number(slotProps.scope.row.loadingType) === 1 && - Number(slotProps.scope.row.loadStatus) === 20 - " - > + <el-dropdown v-if="Number(slotProps.scope.row.loadStatus) !== 0"> <span class="el-dropdown-link"> <el-text> 更多 <el-icon class="el-icon--right"><arrow-down /></el-icon @@ -296,11 +298,21 @@ </span> <template #dropdown> <el-dropdown-menu> - <!-- <el-dropdown-item v-if="Mydata.id === slotProps.scope.row.nowWarehouseId"> + <el-dropdown-item + v-if=" + Mydata.id === slotProps.scope.row.nowWarehouseId && + Number(slotProps.scope.row.loadStatus) === 20 + " + > <el-text @click="handleNodeCost(slotProps.scope)"> 节点费用 </el-text> </el-dropdown-item> - <el-dropdown-item v-if="Mydata.id === slotProps.scope.row.nowWarehouseId"> + <el-dropdown-item + v-if=" + Mydata.id === slotProps.scope.row.nowWarehouseId && + Number(slotProps.scope.row.loadStatus) === 20 + " + > <el-text @click="handleDirectGoMarketVesited(slotProps.scope)"> 配置直发商家 </el-text> @@ -310,7 +322,7 @@ <el-text @click="handleDirectGoMarketDetails(slotProps.scope)"> 签收详情 </el-text> - </el-dropdown-item> --> + </el-dropdown-item> <!-- 手动装车 --> <el-dropdown-item @@ -579,6 +591,7 @@ import { setNodeHeight, debounce, handleClearTableQuery, + handleTranslationDataSeclect, } from '@/utils/util'; import { columnList } from '@/option/distribution/VehicleArrivalManagement'; import { packageColumnList } from '@/option/distribution/VehicleStowage'; @@ -599,11 +612,12 @@ import { postFindLoadingListData, postFindWarehouseUnloadReport, } from '@/api/distribution/VehicleStowage'; -import { useRouter } from 'vue-router'; +import { useRouter, useRoute } from 'vue-router'; import { ElMessage, ElMessageBox } from 'element-plus'; // 获取路由实例 const $router = useRouter(); +const $route = useRoute(); const $store = useStore(); @@ -811,12 +825,13 @@ const onLoad = debounce(async (params = {}) => { 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; - } + // 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); details.page.total = data.total; } catch (error) { console.log('error :>> ', error); @@ -1400,6 +1415,40 @@ const handleShowUnloadReport = async () => { details.loadingObj.pageLoading = false; } }; + +/** 节点费用 */ +const handleNodeCost = ({ row }) => { + $store.commit('DEL_ONCE_TAG', '/distribution/artery/AddVehicleStowage'); + + $router.push({ + path: '/distribution/artery/AddVehicleStowage', + query: { name: '节点费用更改', type: 3, loadId: row.id }, + }); +}; + +/** 配置直发商家弹窗显示 */ +const handleDirectGoMarketVesited = ({ row }) => { + $router.push({ + path: '/distribution/artery/directGoMarket', + query: { + loadId: row.id, + name: row.carsNo + '--' + '配置直发商家', + backPath: $route.fullPath, + }, + }); +}; + +/** 直发商家签收详情 */ +const handleDirectGoMarketDetails = ({ row }) => { + $router.push({ + path: '/distribution/artery/directGoMarketDetails', + query: { + loadId: row.id, + name: row.carsNo + '--' + '签收详情', + backPath: $route.fullPath, + }, + }); +}; </script> <style scoped lang="scss"> diff --git a/src/views/distribution/artery/VehicleStowage.vue b/src/views/distribution/artery/VehicleStowage.vue index 59a7d87f..26b8cda7 100644 --- a/src/views/distribution/artery/VehicleStowage.vue +++ b/src/views/distribution/artery/VehicleStowage.vue @@ -232,6 +232,7 @@ v-if=" permissionObj.VehicleStowage_zeroAdditionalRecording && Mydata.id === slotProps.scope.row.nowWarehouseId && + Number(slotProps.scope.row.loadStatus) === 0 && Number(slotProps.scope.row.loadingType) === 1 " @click="handleShowzeroAdditionalRecording(slotProps.scope)" @@ -269,7 +270,12 @@ <template #dropdown> <el-dropdown-menu> <!-- 节点费用 --> - <el-dropdown-item v-if="permissionObj.VehicleStowage_nodeCost"> + <el-dropdown-item + v-if=" + permissionObj.VehicleStowage_nodeCost && + Number(slotProps.scope.row.loadStatus) === 0 + " + > <el-text @click="handleNodeCost(slotProps.scope)"> 节点费用 </el-text> </el-dropdown-item> diff --git a/src/views/distribution/artery/directMerchantSign.vue b/src/views/distribution/artery/directMerchantSign.vue new file mode 100644 index 00000000..37aeeea6 --- /dev/null +++ b/src/views/distribution/artery/directMerchantSign.vue @@ -0,0 +1,438 @@ +<template> + <basic-container v-loading="details.loadingObj.pageLoading"> + <div class="avue-crud"> + <!-- 搜索模块 --> + <div v-h5uShow="search"> + <!-- 查询模块 --> + <el-form :inline="true" :model="query" class="header_search" label-width="100px"> + <!-- 查询按钮 --> + <el-form-item class="el-btn"> + <el-button type="primary" icon="el-icon-search" @click="searchChange">搜 索</el-button> + <el-button icon="el-icon-delete" @click="searchReset">清 空</el-button> + </el-form-item> + </el-form> + </div> + + <!-- 控件模块 --> + <el-row> + <div class="avue-crud__header"> + <!-- 头部左侧按钮模块 --> + <div></div> + <!-- 头部右侧按钮模块 --> + <div class="avue-crud__right"> + <el-button icon="el-icon-refresh" @click="searchChange" circle></el-button> + <el-button icon="Operation" @click="showdrawer(true)" circle></el-button> + <el-button icon="Search" @click="searchHide" circle></el-button> + </div> + </div> + </el-row> + + <!-- 表格 --> + <!-- 列表模块 --> + <tablecmt + :columnList="details.columnList" + :tableData="details.packageListData" + :loading="loadingObj.list" + @inputTxt="inputsc" + @timeCheck="timesc" + @btnCheck="btnsc" + @selectCheck="selectsc" + @selection="selectionChange" + > + <template #default="slotProps"> + <template v-if="slotProps.scope.column.label === '签收状态'"> + <el-tag + :class="{ + err: Number(slotProps.scope.row.signStatus) === 0, + sub: Number(slotProps.scope.row.signStatus) === 10, + primary: Number(slotProps.scope.row.signStatus) === 20, + }" + > + {{ slotProps.scope.row.signStatusName }} + </el-tag> + </template> + + <template v-else-if="slotProps.scope.column.label === '操作'"> + <el-text + v-if="Number(slotProps.scope.row.signStatus) !== 0" + @click="() => handleShowSignImg(slotProps.scope)" + > + 查看签收图片 + </el-text> + </template> + </template> + </tablecmt> + + <!-- 分页模块 --> + <el-row class="el-fy"> + <div class="avue-crud__pagination flex-c-sb" style="width: 100%"> + <div style="font-size: 14px">勾选数量: {{ selectionList.length }}</div> + <!-- 分页模块 --> + <el-pagination + align="right" + background + @size-change="sizeChange" + @current-change="currentChange" + :current-page="page.pageNum" + :page-sizes="[30, 50, 80, 120]" + :page-size="page.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="page.total" + > + </el-pagination> + </div> + </el-row> + </div> + </basic-container> + + <el-dialog + title="签收图片" + v-model="details.popUpShow.signImg" + width="50%" + append-to-body + :show-close="true" + class="signImg" + > + <div class="signImg_container"> + <el-image + v-for="(item, index) in details.signImgList" + :key="item" + style="width: 100px; height: 100px" + :src="item" + :zoom-rate="1.2" + :max-scale="7" + :min-scale="0.2" + :preview-src-list="details.signImgList" + :initial-index="index" + fit="cover" + /> + </div> + </el-dialog> + + <!-- 列表配置显示 --> + <edittablehead + @setcolum="setnewcolum" + @closce="showdrawer" + :drawerShow="drawerShow" + :columnList="details.columnList" + v-model="details.columnList" + ></edittablehead> +</template> + +<script setup lang="ts"> +import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue'; +import functions from '@/utils/functions.js'; +import dayjs from 'dayjs'; +import { mapGetters, useStore } from 'vuex'; +/** 获取字典 */ +import { getDictionaryBiz } from '@/api/system/dict'; +import { + postFindSignOrderPageList, + postFindSignPhotoList, +} from '@/api/distribution/directMerchantSign.js'; +import { + downloadXls, + setNodeHeight, + getHtmls, + deepClone, + getObjType, + handleTranslationDataSeclect, + handleClearTableQuery, + handleSelectQuery, + handleInputQuery, +} from '@/utils/util'; +import { columnList } from '@/option/distribution/directMerchantSign.js'; +import { flowNodeColumnList } from '@/option/waybill/orderPackageListDetails.js'; +import { useRouter } from 'vue-router'; +import print from '@/utils/print'; +import { ElMessage, ElMessageBox } from 'element-plus'; + +// 获取路由实例 +const $router = useRouter(); +const $store = useStore(); + +const details = reactive<any>({ + /** 是否开启搜索 */ + search: false, + /** 表格搜索条件 */ + query: {}, + /** 时间快捷选择设置 */ + shortcuts: [ + { + text: '最近一周', + value: () => { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); + return [start, end]; + }, + }, + { + text: '最近一个月', + value: () => { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); + return [start, end]; + }, + }, + { + text: '最近三个月', + value: () => { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); + return [start, end]; + }, + }, + ], + /** 时间选择器数据 */ + stockupDate: [], + /** 包明细表头 */ + columnList: deepClone(columnList), + /** 包明细数据 */ + packageListData: [], + /** 页面loading */ + loadingObj: { + /** 列表加载loading */ + list: false, + /** 页面loading */ + pageLoading: false, + }, + /** 列表复选框选中的数据 */ + selectionList: [], + /** 是否显示设置表格 */ + drawerShow: false, + /** 分页参数 */ + page: { + pageNum: 1, + pageSize: 30, + total: 0, + }, + /** 弹出层显示 */ + popUpShow: { + signImg: false, + }, + /** 列表Dom节点 */ + listNode: '', + html: '', + signImgList: [], +}); + +const { + search, + query, + shortcuts, + stockupDate, + data, + loadingObj, + selectionList, + drawerShow, + page, + trickleLoadingPage, + zeroAdditionalRecordingInfo, + popUpShow, +} = toRefs(details); + +/** vuex */ +const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList'])); +console.log('permission :>> ', permission); + +/** 权限按钮 */ +const permissionObj = reactive({}); + +onMounted(() => { + const timer = setTimeout(() => { + details.listNode = document.querySelector('.maboxhi'); + details.listNode.style.transition = 'all .5s ease-out'; + clearTimeout(timer); + }, 100); +}); + +/** 请求页面数据 */ +const onLoad = async (params = {}) => { + try { + // if (Object.keys(details.query).length === 0) return (details.packageListData = []); + + details.loadingObj.list = true; + + const submitData = { ...details.page, ...details.query, ...params }; + + // 创建时间 + if ( + getObjType(details.query.createTimeArr) === 'array' && + details.query.createTimeArr.length > 0 + ) { + submitData.createTimeStartStr = details.query.createTimeArr[0]; + submitData.createTimeEndStr = details.query.createTimeArr[1]; + } + + delete submitData.createTimeArr; + const res = await postFindSignOrderPageList(submitData); + const { code, data } = res.data; + if (code !== 200) return; + details.packageListData = data.records; + details.page.total = data.total; + + handleTranslationDataSeclect(details.packageListData, details.columnList); + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.list = false; + } +}; + +onLoad(); + +/** 搜索 */ +const searchChange = () => { + onLoad(); +}; + +/** 清空表单 */ +const searchReset = () => { + details.query = {}; + details.stockupDate = []; + details.page.pageNum = 1; + handleClearTableQuery(details.columnList); + onLoad(); +}; + +/** 展开列表控件 */ +const showdrawer = (_flag?: boolean) => { + details.drawerShow = _flag; +}; + +/** 是否开启搜索区 */ +const searchHide = () => { + details.search = !details.search; + + setNodeHeight(details.listNode, '', true); +}; + +/** 表格表头输入框搜索 */ +const inputsc = (index, row) => { + handleInputQuery(index, row, details.query); + onLoad(); +}; + +/** 表格表头时间选择 */ +const timesc = (index, row) => { + console.log(index, row); + if (!!index) { + index = dayjs(index).format('YYYY-MM-DD'); + } + details.query[row.prop] = index; + if (!index) { + delete details.query[row.prop]; + } + onLoad(); +}; + +/** 表格表头输入框搜索 */ +const btnsc = () => {}; + +/** 表格表头下拉框选择 */ +const selectsc = (index, row) => { + handleSelectQuery(index, row, details.query); + onLoad(); +}; + +/** 表格表头复选框选择 */ +const selectionChange = (list: any) => { + details.selectionList = list; +}; + +/** 每页数量改变执行的回调 */ +const sizeChange = (pageSize: number) => { + details.page.pageSize = pageSize; + onLoad(); +}; + +/** 页码改变执行的回调 */ +const currentChange = pageNum => { + details.page.pageNum = pageNum; + onLoad(); +}; + +/** + * 设置列表 -- 固定函数 + * 弹窗的勾选回调,用于更改头部数组 + * 固定搭配,只需要更换 columnList + * */ +const setnewcolum = (newarr, headarr, type) => { + if (type == 1) { + details.columnList = newarr; + functions.setStorage(window.location.pathname + 'checkList', headarr); + } else if (type == 2) { + details.columnList = newarr; + functions.setStorage(window.location.pathname + 'flexList', headarr); + } else if (type == 3) { + details.columnList = newarr; + functions.setStorage(window.location.pathname + 'sortlist', headarr); + } +}; + +/** 查看签收图片 */ +const handleShowSignImg = async ({ row }) => { + try { + details.loadingObj.pageLoading = true; + + const submitData = { + signOrderId: row.id, + }; + + const res = await postFindSignPhotoList(submitData); + + const { code, data } = res.data; + + if (code !== 200) return; + + details.signImgList = data || []; + if (details.signImgList.length === 0) return ElMessage.warning('暂无签收图片'); + details.popUpShow.signImg = true; + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.pageLoading = false; + } +}; +</script> + +<style scoped lang="scss"> +// 日期选择器 +:deep(.el-date-editor.el-input) { + height: 100% !important; + width: 100% !important; +} + +:deep(.el-range-editor.el-input__wrapper) { + height: 100% !important; +} + +:deep(.el-tag) { + &.err { + background-color: #f8544b; + border-color: #f8544b; + color: #fff; + } + + &.primary { + background-color: #0086f1; + border-color: #0086f1; + color: #fff; + } + + &.sub { + background-color: #d3832a; + border-color: #d3832a; + color: #fff; + } +} + +// 签收图片 +.signImg_container { + display: flex; + flex-wrap: wrap; +} +</style> diff --git a/src/views/distribution/artery/truckLoadingDetails.vue b/src/views/distribution/artery/truckLoadingDetails.vue index 0ca9dad8..2f8b8237 100644 --- a/src/views/distribution/artery/truckLoadingDetails.vue +++ b/src/views/distribution/artery/truckLoadingDetails.vue @@ -49,7 +49,7 @@ v-if="permissionObj.truckLoadingDetails_changePlanWarehouse" type="primary" icon="Edit" - @click="handleShowTransfer('add')" + @click="handleChooseWarehouse" > 计划仓更改 </el-button> @@ -116,36 +116,55 @@ " > <template #default="slotProps"> - <!-- 零担 --> - <template v-if="Number(slotProps.scope.row.type) === 2"> - <el-text - type="text" - @click="handleZeroUnLoad(slotProps.scope)" - v-if=" - permissionObj.truckLoadingDetails_zeroUnload && - details.pageInfo.type !== 'VehicleStowage' && - Number(slotProps.scope.row.scanStatus) === 1 - " + <!-- 装卸状态 --> + <template v-if="slotProps.scope.column.label === '装卸状态'"> + <el-tag + :class="{ + sub: Number(slotProps.scope.row.scanStatus) === 1, + err: Number(slotProps.scope.row.scanStatus) === 2, + primary: Number(slotProps.scope.row.scanStatus) === 3, + }" > - 零担卸车 - </el-text> + {{ slotProps.scope.row.scanStatusName }} + </el-tag> </template> - <!-- 包件 --> - <template v-else-if="Number(slotProps.scope.row.type) === 1"> - <el-text - type="text" - @click="handleOrderUnLoad(slotProps.scope)" - v-if=" - permissionObj.truckLoadingDetails_packageUnload && - details.pageInfo.type !== 'VehicleStowage' && - Number(slotProps.scope.row.scanStatus) === 1 - " - > - 包件卸车 - </el-text> - - <el-text @click="printOrder(slotProps.scope)"> 二维码 </el-text> + <!-- 操作 --> + <template v-else-if="slotProps.scope.column.label === '操作'"> + <!-- 零担 --> + <template v-if="Number(slotProps.scope.row.type) === 2"> + <el-text + type="text" + @click="handleZeroUnLoad(slotProps.scope)" + v-if=" + permissionObj.truckLoadingDetails_zeroUnload && + details.pageInfo.type !== 'VehicleStowage' && + Number(slotProps.scope.row.scanStatus) === 1 + " + > + 零担卸车 + </el-text> + + <!-- 零担二维码 --> + <el-text @click="() => printOrderByZero(slotProps.scope)">零担二维码</el-text> + </template> + + <!-- 包件 --> + <template v-else-if="Number(slotProps.scope.row.type) === 1"> + <el-text + type="text" + @click="handleOrderUnLoad(slotProps.scope)" + v-if=" + permissionObj.truckLoadingDetails_packageUnload && + details.pageInfo.type !== 'VehicleStowage' && + Number(slotProps.scope.row.scanStatus) === 1 + " + > + 包件卸车 + </el-text> + + <el-text @click="printOrder(slotProps.scope)"> 二维码 </el-text> + </template> </template> </template> </tablecmt> @@ -217,6 +236,40 @@ </span> </el-dialog> + <!-- 配置装车目的地 --> + <el-dialog + title="配置装车目的地" + v-model="details.popUpShow.chooseDestinationVisited" + width="30%" + append-to-body + class="truckLoadingDetailPopUp" + > + <el-form-item label="目的地" prop="region"> + <el-select v-model="details.chooseNodeId" placeholder="请选择目的地" class="w100"> + <el-option + v-for="item in details.nextNodeData" + :key="item" + :label="item.warehouseName" + :value="item.warehouseId" + /> + </el-select> + </el-form-item> + + <!-- 表单按钮 --> + <template #footer> + <div class="dialog-footer"> + <el-button + icon="el-icon-circle-close" + @click="details.popUpShow.chooseDestinationVisited = false" + >取 消</el-button + > + <el-button type="primary" icon="el-icon-circle-check" @click="handleEditSubmit"> + 确 认 + </el-button> + </div> + </template> + </el-dialog> + <!-- 列表配置显示 --> <edittablehead @setcolum="setnewcolum" @@ -245,7 +298,9 @@ import { postSignLoadScanByIds, postLoadingDetailExport, } from '@/api/distribution/truckLoadingDetails'; +import { postFindNextNodeList } from '@/api/distribution/VehicleStowage'; import { getShowAdvancePackgeCode } from '@/api/waybill/orderPackageListDetails'; +import { postShowOrderCode } from '@/api/distribution/distributionStockArticle'; /** 获取字典 */ import { getDictionaryBiz } from '@/api/system/dict'; import { @@ -327,6 +382,8 @@ const details = reactive<any>({ truckLoadingDetailVisited: false, /** 零担补录 */ transferVisited: false, + /** 计划仓更改 */ + chooseDestinationVisited: false, }, /** 列表Dom节点 */ listNode: '', @@ -379,6 +436,9 @@ const details = reactive<any>({ myWarehouseData: {}, /** 打印的二维码 */ html: '', + /** 后续节点仓库数据 */ + nextNodeData: [], + choosePackageList: [], }); const { @@ -598,6 +658,25 @@ const onLoad = debounce(async (params = {}) => { } }, 10); +/** 初始化请求数据 -- 之后节点数据 */ +const init = async () => { + const res = await postFindNextNodeList({ loadId: $route.query.loadId }); + + // 下一步节点数据 + const { code, data } = res.data; + if (code !== 200) return; + details.nextNodeData = data || []; + + if (details.nextNodeData.length !== 1) return; + + for (const iterator of details.packageData) { + iterator.nodeName = details.nextNodeData[0].warehouseName; + iterator.nodeId = details.nextNodeData[0].warehouseId; + } +}; + +init(); + /** 搜索 */ const searchChange = () => { onLoad(); @@ -1152,20 +1231,46 @@ const printOrder = async ({ row }) => { } }; +/** 查看零担零担码 */ +const printOrderByZero = async ({ row }) => { + try { + details.loadingObj.pageLoading = true; + + let ids = { + ids: row.id, + }; + + const res = await postShowOrderCode(ids); + + if (res.data.code !== 200) return; + details.popUpShow.QRCodeVisible = true; + console.log(res.data); + details.html = ''; + details.html = getHtmls(res.data.data.dataList, res.data.data.templateHtml); + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.pageLoading = false; + } +}; + /** 批量查看二维码 */ const handleBatchBarcode = async () => { if (details.selectionList.length === 0) return ElMessage.warning({ message: '请选择需要查看的数据' }); const _arr = []; + const _zeroArr = []; + for (const iterator of details.selectionList) { if (Number(iterator.type) === 1) _arr.push(iterator); + else _zeroArr.push(iterator); } - tableNodeRef.value.handleClearSelect(); - tableNodeRef.value.handleCheckSelect(_arr); + // tableNodeRef.value.handleClearSelect(); + // tableNodeRef.value.handleCheckSelect(_arr); - if (_arr.length === 0) return ElMessage.warning('零担无法查看二维码'); + // if (_arr.length === 0) return ElMessage.warning('零担无法查看二维码'); try { details.loadingObj.pageLoading = true; @@ -1174,13 +1279,19 @@ const handleBatchBarcode = async () => { orderPackageCodes: _arr.map(val => val.scanCode).join(','), }; - const res = await getShowAdvancePackgeCode(qr); + const [res, zeroRes] = await Promise.all([ + getShowAdvancePackgeCode(qr), + postShowOrderCode({ ids: _zeroArr.map(val => val.id).join(',') }), + ]); - if (res.data.code !== 200) return; + // const res = await getShowAdvancePackgeCode(qr); + + if (res.data.code !== 200 || zeroRes.data.code !== 200) return; details.popUpShow.QRCodeVisible = true; console.log(res.data); details.html = ''; details.html = getHtmls(res.data.data.dataList, res.data.data.templateHtml); + details.html += getHtmls(zeroRes.data.data.dataList, zeroRes.data.data.templateHtml); } catch (error) { console.log('error :>> ', error); } finally { @@ -1284,6 +1395,26 @@ const handleExport = async () => { } }; +/** 选择包件进行更改计划仓 */ +const handleChooseWarehouse = async () => { + if (details.selectionList.length === 0) return ElMessage.warning('请选择需要更改的数据'); + + const _arr = []; + + for (let i = 0; i < details.selectionList.length; i++) { + const item = details.selectionList[i]; + if (Number(item.scanStatus) === 1) _arr.push(item); + } + + tableNodeRef.value.handleClearSelect(); + tableNodeRef.value.handleCheckSelect(_arr); + + await nextTick(); + if (_arr.length === 0) return ElMessage.warning('请选择未卸车数据'); + + details.popUpShow.chooseDestinationVisited = true; +}; + watch( $route, (newVal, oldVal) => { @@ -1381,8 +1512,6 @@ watch( :deep(.el-table tr) { &.Abnormal { - // background: #e54b4b; - .tabculconte, .el-tooltip, .el-button--text, @@ -1391,13 +1520,25 @@ watch( color: #f00 !important; } } +} + +:deep(.el-tag) { + &.err { + background-color: #f8544b; + border-color: #f8544b; + color: #fff; + } + + &.primary { + background-color: #0086f1; + border-color: #0086f1; + color: #fff; + } - // &.hover-row { - // .tabculconte, - // .el-tooltip, - // .el-button--text { - // color: var(--el-color-primary) !important; - // } - // } + &.sub { + background-color: #d3832a; + border-color: #d3832a; + color: #fff; + } } </style> diff --git a/src/views/distribution/deliverylist/distributionDeliveryListedt.vue b/src/views/distribution/deliverylist/distributionDeliveryListedt.vue index c00dbc28..4c5a5335 100644 --- a/src/views/distribution/deliverylist/distributionDeliveryListedt.vue +++ b/src/views/distribution/deliverylist/distributionDeliveryListedt.vue @@ -4846,7 +4846,7 @@ if($useStore.getters && $useStore.getters.permission){ const orderNode = document.querySelectorAll('.BarCode>div>div'); console.log('orderNode :>> ', orderNode); - print(orderNode); + print(orderNode, 'titlePrint'); }, printTemplate() { const orderNode = document.querySelectorAll('.waybill>div>div'); diff --git a/src/views/distribution/inventory/BookingNote.vue b/src/views/distribution/inventory/BookingNote.vue index 0f1e308b..95f531fb 100644 --- a/src/views/distribution/inventory/BookingNote.vue +++ b/src/views/distribution/inventory/BookingNote.vue @@ -1840,7 +1840,7 @@ const handlePrint = async () => { const res = await postPrintBatch({ ids: $route.query.id, - tempId: 15, + tempId: 16, }); const { code, data } = res.data; diff --git a/src/views/distribution/inventory/CreateOrder.vue b/src/views/distribution/inventory/CreateOrder.vue index 7163c18c..79430a62 100644 --- a/src/views/distribution/inventory/CreateOrder.vue +++ b/src/views/distribution/inventory/CreateOrder.vue @@ -3561,7 +3561,7 @@ const handlePrint = async () => { const res = await postPrintBatch({ ids: details.waybillId, - tempId: 15, + tempId: 16, }); const { code, data } = res.data; diff --git a/src/views/distribution/inventory/distributionStockArticleDetails.vue b/src/views/distribution/inventory/distributionStockArticleDetails.vue index 1d3a289c..deca29bd 100644 --- a/src/views/distribution/inventory/distributionStockArticleDetails.vue +++ b/src/views/distribution/inventory/distributionStockArticleDetails.vue @@ -810,7 +810,7 @@ export default { }, printTemplate() { const orderNodeList = document.querySelectorAll('.print_QRCode>div>div'); - print(orderNodeList); + print(orderNodeList, 'titlePrint'); }, //提交物品数据 handleSubmitMethod() { diff --git a/src/views/distribution/inventory/distrilbutionBillLadingView.vue b/src/views/distribution/inventory/distrilbutionBillLadingView.vue index 6d2aa931..13e633ef 100644 --- a/src/views/distribution/inventory/distrilbutionBillLadingView.vue +++ b/src/views/distribution/inventory/distrilbutionBillLadingView.vue @@ -213,7 +213,7 @@ <el-button @click="dialogVisible = false">取 消</el-button> </span> </el-dialog> --> - <MyPrint :html="html" v-model="dialogVisible"></MyPrint> + <MyPrint :html="html" v-model="dialogVisible" type="titlePrint"></MyPrint> </template> <script> diff --git a/src/views/distribution/stockup/distributionStockupDetailsSelf.vue b/src/views/distribution/stockup/distributionStockupDetailsSelf.vue index 3293d5e5..1ecf4f61 100644 --- a/src/views/distribution/stockup/distributionStockupDetailsSelf.vue +++ b/src/views/distribution/stockup/distributionStockupDetailsSelf.vue @@ -1643,7 +1643,7 @@ setNodeHeight(_node, '', true); printTemplate() { // const orderNodeList = document.querySelectorAll('.el-dialog__body>div>div>div'); // 调用打印方法打印表单 - print(); + print('', 'titlePrint'); }, //查看包条码 handleQRCode(row) { diff --git a/src/views/warehouse/parcelList/distributionParcelList.vue b/src/views/warehouse/parcelList/distributionParcelList.vue index d9853a92..08f0320c 100644 --- a/src/views/warehouse/parcelList/distributionParcelList.vue +++ b/src/views/warehouse/parcelList/distributionParcelList.vue @@ -1079,7 +1079,7 @@ export default { /** 打印 */ printTemplate() { const orderNodeList = document.querySelectorAll('.el-dialog__body>div>div>div'); - print(orderNodeList); + print(orderNodeList, 'titlePrint'); }, }, }; diff --git a/src/views/waybill/CreateZeroOrder.vue b/src/views/waybill/CreateZeroOrder.vue index cfd28df9..ad9254c0 100644 --- a/src/views/waybill/CreateZeroOrder.vue +++ b/src/views/waybill/CreateZeroOrder.vue @@ -3081,7 +3081,7 @@ const handlePrint = async () => { const res = await postPrintBatch({ ids: details.waybillId, - tempId: 15, + tempId: 16, }); const { code, data } = res.data; diff --git a/src/views/waybill/WaybillOrderList.vue b/src/views/waybill/WaybillOrderList.vue index fe328ac9..bf2c90f7 100644 --- a/src/views/waybill/WaybillOrderList.vue +++ b/src/views/waybill/WaybillOrderList.vue @@ -655,7 +655,7 @@ const batchPrint = async () => { const res = await postPrintBatch({ ids: details.selectionList.map(val => val.id).join(','), - tempId: 15, + tempId: 16, }); const { code, data } = res.data; diff --git a/src/views/waybill/orderPackageList.vue b/src/views/waybill/orderPackageList.vue index 87ea0e82..052968b4 100644 --- a/src/views/waybill/orderPackageList.vue +++ b/src/views/waybill/orderPackageList.vue @@ -833,12 +833,6 @@ const handleShowFlowNode = async ({ row }) => { </script> <style scoped lang="scss"> -.fo-fl { - display: flex; - flex-wrap: wrap; - zoom: 0.9; -} - // 日期选择器 :deep(.el-date-editor.el-input) { height: 100% !important; @@ -848,57 +842,4 @@ const handleShowFlowNode = async ({ row }) => { :deep(.el-range-editor.el-input__wrapper) { height: 100% !important; } - -// 新增行 -.add_row { - display: flex; - justify-content: space-between; -} - -.add_row_title { - text-align: center; - margin-bottom: 10px; - font-size: 18px; - font-weight: bold; -} - -// 统计行 -.statistics_row { - margin: 10px 0; - font-size: 14px; - zoom: 0.9; - display: flex; - - > div { - margin-right: 20px; - } -} - -// 卡片容器 -.crad_container { - display: flex; - - .card_container_item { - flex: 1; - // padding: 10px; - border-radius: 5px; - box-shadow: 0 0 5px #ccc; - - &:first-child { - margin-right: 20px; - } - - .card_container_item_title { - padding: 10px; - border-bottom: 1px solid #ccc; - display: flex; - justify-content: space-between; - align-items: center; - } - - .card_container_item_box { - padding: 10px; - } - } -} </style> diff --git a/src/views/wel/index.vue b/src/views/wel/index.vue index 80394da6..ab6bd1e0 100644 --- a/src/views/wel/index.vue +++ b/src/views/wel/index.vue @@ -1,222 +1,1600 @@ <template> - <div class="bx" v-if="indexState"> - <div class="left"> - <div class="tptitl"> - <img src="./static/topicon.png" /> - <span>发货操作</span> + <div class="main_container"> + <!-- <el-button @click="handleRefresh">刷新</el-button> --> + + <!-- 开单数据 && 开单收入 --> + <div class="flex mb10 row_first"> + <!-- 开单数据 --> + <div class="mr10 box1 view_box" v-loading="details.loadingObj.openOrderData"> + <!-- 标题 --> + <div class="align_center mb20"> + <img class="mr10 img_13pt" src="@/static/icon_data.png" alt="" /> + + <div class="title">开单数据</div> + </div> + + <!-- 数据 --> + <div class="border pd10"> + <div class="height40pt flex-c-sb border-bottom"> + <div class="align_center"> + <img class="mr10 img_16pt" src="@/static/icon_storage.png" alt="" /> + + <div>总计</div> + </div> + + <div class="align_center"> + <span class="data mr10">{{ details.openOrderDataInfo.totalNum || 0 }}</span> + <span>单</span> + </div> + </div> + + <div class="height40pt flex-c-sb border-bottom"> + <div class="align_center"> + <img class="mr10 img_16pt" src="@/static/icon_month.png" alt="" /> + + <div>当月</div> + </div> + + <div class="align_center"> + <span class="data mr10">{{ details.openOrderDataInfo.monthNum || 0 }}</span> + <span>单</span> + </div> + </div> + + <div class="height40pt flex-c-sb"> + <div class="align_center"> + <img class="mr10 img_16pt" src="@/static/icon_day.png" alt="" /> + + <div>当日</div> + </div> + + <div class="align_center"> + <span class="data mr10">{{ details.openOrderDataInfo.dayNum || 0 }}</span> + + <span>单</span> + </div> + </div> + </div> </div> - <div class="onebx1"> - <div class="item1"> - <img src="./static/1.png" /> - <span>提货</span> - </div> - <div class="item2"> - <img src="./static/2.png" /> - <span>预开单</span> - </div> - <div class="item3"> - <img src="./static/3.png" /> - <span>创建运单</span> - </div> - <div class="item4"> - <img src="./static/4.png" /> - <span>补录运单</span> - </div> - <div class="item5"> - <img src="./static/5.png" /> - <span>短驳发车</span> - </div> - <div class="item6"> - <img src="./static/6.png" /> - <span>外部中转</span> - </div> - <div class="item7"> - <img src="./static/7.png" /> - <span>库存管理</span> - </div> - <div class="item8"> - <img src="./static/8.png" /> - <span>车辆配载</span> - </div> - <img class="upimg" src="./static/up.png" /> - <img class="rigth1" src="./static/rigth.png" /> - <img class="rigth2" src="./static/rigth.png" /> - <img class="rigth3" src="./static/rigth.png" /> - <img class="rigth4" src="./static/rigth.png" /> - <img class="rigthall" src="./static/rigthall.png" /> + + <!-- 开单收入 --> + <div class="flex1 box2 view_box" v-loading="details.loadingObj.openOrderIncome"> + <!-- 标题 --> + <div class="align_center mb20"> + <img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" /> + + <div class="title">开单收入</div> + </div> + + <div class="flex"> + <!-- 统计数据 --> + <div class="border flexnone totol pd10"> + <!-- 总计 --> + <div class="height40pt flex-c-sb border-bottom"> + <div class="align_center"> + <img class="mr10 img_16pt" src="@/static/icon_storage.png" alt="" /> + + <div>总计</div> + </div> + + <div class="align_center"> + <span class="data mr10">{{ details.openOrderIncomeInfo.totalFee || 0 }}</span> + <span>元</span> + </div> + </div> + + <div class="monthData flex-c-sb"> + <!-- 当月 --> + <div class="flex1"> + <div class="align_center"> + <img class="mr10 img_16pt" src="@/static/icon_month.png" alt="" /> + + <div>当月</div> + </div> + + <div class="align_center"> + <span class="data mr10">{{ details.openOrderIncomeInfo.monthFee || 0 }}</span> + <span>元</span> + </div> + </div> + + <!-- 当日 --> + <div class="flex1 border-left"> + <div class="align_center"> + <img class="mr10 img_16pt" src="@/static/icon_day.png" alt="" /> + + <div>当日</div> + </div> + + <div class="align_center"> + <span class="data mr10">{{ details.openOrderIncomeInfo.dayFee || 0 }}</span> + <span>元</span> + </div> + </div> + </div> + </div> + + <!-- 详情数据 --> + <div class="detailsData flex1 ml10"> + <!-- 月 --> + <div class="flex-c-sb"> + <!-- 干线 --> + <div class="item flex1 mr10"> + <div> + <span class="data mr5px">{{ + details.openOrderIncomeInfo.monthTrunklineFee || 0 + }}</span> + <span>元</span> + </div> + + <div>干线 - 月</div> + </div> + <!-- 仓储 --> + <div class="item flex1 mr10"> + <div> + <span class="data mr5px">{{ + details.openOrderIncomeInfo.monthWarehouseFee || 0 + }}</span> + <span>元</span> + </div> + + <div>仓储 - 月</div> + </div> + <!-- 配送 --> + <div class="item flex1 mr10"> + <div> + <span class="data mr5px">{{ + details.openOrderIncomeInfo.monthDistributionFee || 0 + }}</span> + <span>元</span> + </div> + + <div>配送 - 月</div> + </div> + <!-- 提货 --> + <div class="item flex1 mr10"> + <div> + <span class="data mr5px">{{ + details.openOrderIncomeInfo.monthBillladingFee || 0 + }}</span> + <span>元</span> + </div> + + <div>提货 - 月</div> + </div> + <!-- 安装 --> + <div class="item flex1"> + <div> + <span class="data mr5px">{{ + details.openOrderIncomeInfo.monthInstallFee || 0 + }}</span> + <span>元</span> + </div> + + <div>安装 - 月</div> + </div> + </div> + + <!-- 日 --> + <div class="flex-c-sb mt10"> + <!-- 干线 --> + <div class="item flex1 mr10"> + <div> + <span class="data mr5px">{{ + details.openOrderIncomeInfo.dayTrunklineFee || 0 + }}</span> + <span>元</span> + </div> + + <div>干线 - 日</div> + </div> + <!-- 仓储 --> + <div class="item flex1 mr10"> + <div> + <span class="data mr5px">{{ + details.openOrderIncomeInfo.dayWarehouseFee || 0 + }}</span> + <span>元</span> + </div> + + <div>仓储 - 日</div> + </div> + <!-- 配送 --> + <div class="item flex1 mr10"> + <div> + <span class="data mr5px">{{ + details.openOrderIncomeInfo.dayDistributionFee || 0 + }}</span> + <span>元</span> + </div> + + <div>配送 - 日</div> + </div> + <!-- 提货 --> + <div class="item flex1 mr10"> + <div> + <span class="data mr5px">{{ + details.openOrderIncomeInfo.dayBillladingFee || 0 + }}</span> + <span>元</span> + </div> + + <div>提货 - 日</div> + </div> + <!-- 安装 --> + <div class="item flex1"> + <div> + <span class="data mr5px">{{ + details.openOrderIncomeInfo.dayInstallFee || 0 + }}</span> + <span>元</span> + </div> + + <div>安装 - 日</div> + </div> + </div> + </div> + </div> </div> </div> - <div class="ztjk"> - <img src="./static/9.png" /> - <span>到货操作</span> - </div> - <div class="rigth"> - <div class="tptitl"> - <img src="./static/topicon.png" /> - <span>到货操作</span> + + <!-- 当前所在库位数据 && 库位数据 --> + <div class="flex mb10 row_second"> + <!-- 当前所在库位数据 --> + <div class="mr10 box1 view_box" v-loading="details.loadingObj.handOrderData"> + <!-- 标题 --> + <div class="align_center mb20"> + <img class="mr10 img_13pt" src="@/static/icon_data.png" alt="" /> + + <div class="title">当前在库数据</div> + </div> + + <!-- 数据 --> + <div class="border data_container pd10 flex"> + <div class="item"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>总数</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ details.handOrderDataInfo.totalNum || 0 }}</span> + <span class="">件</span> + </div> + </div> + + <div class="item border-left"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>零担</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ details.handOrderDataInfo.zeroNum || 0 }}</span> + <span class="">件</span> + </div> + </div> + + <div class="item border-left"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>三方中转</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ details.handOrderDataInfo.thirdTransferNum || 0 }}</span> + <span class="">件</span> + </div> + </div> + + <div class="item border-left"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>商配</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ details.handOrderDataInfo.mallNum || 0 }}</span> + <span class="">件</span> + </div> + </div> + + <div class="item border-left"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>市配</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ details.handOrderDataInfo.cityNum || 0 }}</span> + <span class="">件</span> + </div> + </div> + + <div class="item border-left"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>自提</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ details.handOrderDataInfo.billNum || 0 }}</span> + <span class="">件</span> + </div> + </div> + + <div class="item border-left"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>已打托</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ details.handOrderDataInfo.trayNum || 0 }}</span> + <span class="">件</span> + </div> + </div> + </div> </div> - <div class="onebx1"> - <div class="item1"> - <img src="./static/10.png" /> - <span>到站卸车</span> - </div> - <div class="item2"> - <img src="./static/11.png" /> - <span>库存管理</span> - </div> - <div class="item3"> - <img src="./static/12.png" /> - <span>短驳接收</span> - </div> - <div class="item4"> - <img src="./static/13.png" /> - <span>外部中转</span> - </div> - <div class="item5"> - <img src="./static/14.png" /> - <span>送货</span> - </div> - <div class="item6"> - <img src="./static/15.png" /> - <span>中转签收</span> - </div> - <div class="item7"> - <img src="./static/16.png" /> - <span>送货签收</span> - </div> - <div class="item8"> - <img src="./static/17.png" /> - <span>自提签收</span> - </div> - <img class="upimg" src="./static/down.png" /> - <img class="rigth1" src="./static/rigth.png" /> - <img class="rigth2" src="./static/rigth.png" /> - <img class="rigth3" src="./static/rigth.png" /> - <img class="rigth4" src="./static/rigth.png" /> - <img class="rigthall" src="./static/rigthall2.png" /> - <img class="leftall" src="./static/leftall.png" /> + + <!-- 库位数据 --> + <div class="flex1 box2 view_box" v-loading="details.loadingObj.allocationData"> + <!-- 标题 --> + <div class="align_center mb20"> + <img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" /> + + <div class="title">库位数据</div> + </div> + + <div class="border data_container pd10 flex"> + <div class="item"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>总数</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ details.allocationDataInfo.totalNum || 0 }}</span> + <span class="">个</span> + </div> + </div> + + <div class="item border-left"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>已上架</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ details.allocationDataInfo.useNum || 0 }}</span> + <span class="">个</span> + </div> + </div> + + <div class="item border-left"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>空闲库位</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ details.allocationDataInfo.nullNum || 0 }}</span> + <span class="">个</span> + </div> + </div> + + <div class="item border-left"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>已上架</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ details.allocationDataInfo.upshelfNum || 0 }}</span> + <span class="">件</span> + </div> + </div> + + <div class="item border-left"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>未上架</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ details.allocationDataInfo.noUpshelfNum || 0 }}</span> + <span class="">件</span> + </div> + </div> + </div> </div> </div> - <div class="buts"> - <div class="tptitl"> - <img src="./static/topicon.png" /> - <span>回单管理</span> + + <!-- 干线待发运在库数据 && 干线车次统计 && 异常数据 --> + <div class="flex mb10 row_third"> + <!-- 当前所在库位数据 --> + <div class="mr10 box1 flex1 view_box" v-loading="details.loadingObj.trunklineHandOrderData"> + <!-- 标题 --> + <div class="align_center mb20"> + <img class="mr10 img_13pt" src="@/static/icon_data.png" alt="" /> + + <div class="title">干线待发运在库数据</div> + </div> + + <!-- 数据 --> + <div class="border pd10 flex-c-sb"> + <div class="text_center"> + <div class="data_box orange mb10"> + <div class="data mr5px">{{ details.trunklineHandOrderDataInfo.waybillNum || 0 }}</div> + <div class="">单</div> + </div> + <div class=""> + <span>运单总数</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box orange mb10"> + <div class="data mr5px">{{ details.trunklineHandOrderDataInfo.handleNum || 0 }}</div> + <div class="">件</div> + </div> + <div class=""> + <span>在库总件数</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box orange mb10"> + <div class="data mr5px"> + {{ details.trunklineHandOrderDataInfo.handleWeight || 0 }} + </div> + <div class="">kg</div> + </div> + <div class=""> + <span>在库总重量</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box orange mb10"> + <div class="data mr5px"> + {{ details.trunklineHandOrderDataInfo.handleVolume || 0 }} + </div> + <div class="">m³</div> + </div> + <div class=""> + <span>在库总方数</span> + </div> + </div> + </div> + </div> + + <!-- 干线车次统计 --> + <div class="mr10 flex1 box2 view_box" v-loading="details.loadingObj.trunklineCarsData"> + <!-- 标题 --> + <div class="align_center mb20"> + <img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" /> + + <div class="title">干线车次统计</div> + </div> + + <div class="border pd10 flex-c-sb"> + <div class="text_center"> + <div class="data_box mb10"> + <div class="data mr5px">{{ details.trunklineCarsDataInfo.totalNum || 0 }}</div> + <div class="">车</div> + </div> + <div class=""> + <span>总车次</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box mb10"> + <div class="data mr5px">{{ details.trunklineCarsDataInfo.inTransitNum || 0 }}</div> + <div class="">车</div> + </div> + <div class=""> + <span>在途</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box mb10"> + <div class="data mr5px">{{ details.trunklineCarsDataInfo.workNum || 0 }}</div> + <div class="">车</div> + </div> + <div class=""> + <span>作业</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box mb10"> + <div class="data mr5px">{{ details.trunklineCarsDataInfo.unloadNum || 0 }}</div> + <div class="">车</div> + </div> + <div class=""> + <span>卸车完成</span> + </div> + </div> + </div> </div> - <div class="onebx1"> - <div class="item1"> - <img src="./static/18.png" /> - <span>回单回收</span> - </div> - <div class="item2"> - <img src="./static/19.png" /> - <span>回单寄出</span> - </div> - <div class="item3"> - <img src="./static/20.png" /> - <span>回单接收</span> - </div> - <div class="item4"> - <img src="./static/21.png" /> - <span>回单发放</span> - </div> - <img class="left1" src="./static/rigth.png" /> - <img class="left2" src="./static/rigth.png" /> - <img class="left3" src="./static/rigth.png" /> + + <!-- 异常数据 --> + <div class="flex1 box2 view_box" v-loading="details.loadingObj.unloadAbnormalData"> + <!-- 标题 --> + <div class="flex-c-sb mb20"> + <div class="align_center"> + <img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" /> + + <div class="title">异常数据</div> + </div> + + <div class="align_center"> + <div + :class="{ button: true, active: abnormal_status === 'day' }" + @click="() => (abnormal_status = 'day')" + > + 当天 + </div> + <div + :class="{ button: true, active: abnormal_status === 'month' }" + @click="() => (abnormal_status = 'month')" + > + 当月 + </div> + </div> + </div> + + <div class="abnormal_container flex-c-sb"> + <div class="abnormal_item green"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>发起数</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ abnormal_Info.sendNum }}</span> + <span class="">单</span> + </div> + </div> + + <div class="abnormal_item blue"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>待处理</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ abnormal_Info.noDealNum }}</span> + <span class="">单</span> + </div> + </div> + + <div class="abnormal_item red"> + <div class="align_center"> + <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> + <span>异常率</span> + </div> + <div class="mt10"> + <span class="data mr5px">{{ abnormal_Info.abnormalRate }}</span> + <span class="">%</span> + </div> + </div> + </div> </div> </div> - <div class="el-gl"> - <div>公告栏</div> + + <!-- 当前配送数据 && 签收数据 --> + <div class="flex mb10 row_fourthly"> + <!-- 当前配送数据 --> + <div + class="mr10 box1 view_box" + style="width: 40%" + v-loading="details.loadingObj.deliveryData" + > + <!-- 标题 --> + <div class="flex-c-sb mb20"> + <div class="align_center"> + <img class="mr10 img_13pt" src="@/static/icon_data.png" alt="" /> + + <div class="title">当前配送数据</div> + </div> + + <div class="align_center"> + <!-- 商配 --> + <div + :class="{ button: true, active: delivery_status === 1 }" + @click="delivery_status = 1" + > + 商配 + </div> + + <!-- 外协商配 --> + <div + :class="{ button: true, active: delivery_status === 4 }" + @click="delivery_status = 4" + > + 外协商配 + </div> + + <div + :class="{ button: true, active: delivery_status === 2 }" + @click="delivery_status = 2" + > + 市配 + </div> + + <div + :class="{ button: true, active: delivery_status === 5 }" + @click="delivery_status = 5" + > + 外协市配 + </div> + </div> + </div> + + <!-- 数据 --> + <div class="border pd10 flex-c-sb"> + <div class="text_center"> + <div class="data_box blue mb10"> + <div class="data mr5px">{{ delivery_info.totalNum || 0 }}</div> + <div class="">单</div> + </div> + <div class=""> + <span>配送计划总数</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box blue mb10"> + <div class="data mr5px">{{ delivery_info.totalDeliveryNum || 0 }}</div> + <div class="">件</div> + </div> + <div class=""> + <span>总作业</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box blue mb10"> + <div class="data mr5px">{{ delivery_info.totalWeight || 0 }}</div> + <div class="">kg</div> + </div> + <div class=""> + <span>总重量</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box blue mb10"> + <div class="data mr5px">{{ delivery_info.totalVolume || 0 }}</div> + <div class="">m³</div> + </div> + <div class=""> + <span>总方数</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box blue mb10"> + <div class="data mr5px">{{ delivery_info.totalRoadNum || 0 }}</div> + <div class="">件</div> + </div> + <div class=""> + <span>在途件数</span> + </div> + </div> + </div> + </div> + + <!-- 签收数据 --> + <div class="flex1 box2 view_box" v-loading="details.loadingObj.signforData"> + <!-- 标题 --> + <div class="align_center mb20 flex-c-sb"> + <div class="flex"> + <img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" /> + + <div class="title">签收数据</div> + </div> + + <div class="align_center"> + <div + :class="{ button: true, active: signforData_status === '1' }" + @click="() => (signforData_status = '1')" + > + 当天 + </div> + <div + :class="{ button: true, active: signforData_status === '2' }" + @click="() => (signforData_status = '2')" + > + 当月 + </div> + </div> + </div> + + <div class="border pd10 flex-c-sb"> + <div class="text_center"> + <div class="data_box mb10"> + <div class="data mr5px">{{ signforData.signNum || 0 }}</div> + <div class="">件</div> + </div> + <div class=""> + <span>已签收</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box orange mb10"> + <div class="data mr5px">{{ signforData.unSignNum || 0 }}</div> + <div class="">件</div> + </div> + <div class=""> + <span>未签收</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box blue mb10"> + <div class="data mr5px"> + {{ signforData.signScale || 0 }} + </div> + <div class="">%</div> + </div> + <div class=""> + <span>签收率</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box purple mb10"> + <div class="data mr5px">{{ signforData.clerkSignNum || 0 }}</div> + <div class="">件</div> + </div> + <div class=""> + <span>文员签收数</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box purple mb10"> + <div class="data mr5px"> + {{ signforData.clerkSignforScale || 0 }} + </div> + <div class="">%</div> + </div> + <div class=""> + <span>文员签收率</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box red mb10"> + <div class="data mr5px">{{ signforData.clerkOverTimeSignfoNum || 0 }}</div> + <div class="">件</div> + </div> + <div class=""> + <span>超时签收</span> + </div> + </div> + + <div class="text_center" v-if="signforData_status !== '1'"> + <div class="data_box red mb10"> + <div class="data mr5px"> + {{ + signforData.clerkOverTimeScale + ? Number(signforData.clerkOverTimeScale * 100).toFixed(2) + : 0 + }} + </div> + <div class="">%</div> + </div> + <div class=""> + <span>签收超时率</span> + </div> + </div> + </div> + </div> </div> - </div> - <div v-else class="el_Hwlogo"> - <div class="content"> - <img src="/public/img/p-logo.png" alt="" /> - <div class="info"> - <div class="name">{{ name }}</div> - <div class="slogan">您好!欢迎使用货无忧</div> - <div class="title">成都数联物科信息技术有限公司</div> - <div class="time">{{ currentTime }}</div> + + <!-- 当前配送数据 && 签收数据 -- 自提 --> + <div class="flex mb10 row_fourthly"> + <!-- 当前配送数据 --> + <div + class="mr10 box1 view_box" + style="width: 40%" + v-loading="details.loadingObj.deliveryData" + > + <!-- 标题 --> + <div class="flex-c-sb mb20"> + <div class="align_center"> + <img class="mr10 img_13pt" src="@/static/icon_data.png" alt="" /> + + <div class="title">当前配送数据 -- 自提</div> + </div> + </div> + + <!-- 数据 --> + <div class="border pd10 flex-c-sb"> + <div class="text_center"> + <div class="data_box blue mb10"> + <div class="data mr5px">{{ delivery_bill_info.totalNum || 0 }}</div> + <div class="">单</div> + </div> + <div class=""> + <span>配送计划总数</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box blue mb10"> + <div class="data mr5px">{{ delivery_bill_info.totalDeliveryNum || 0 }}</div> + <div class="">件</div> + </div> + <div class=""> + <span>总作业</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box blue mb10"> + <div class="data mr5px">{{ delivery_bill_info.totalWeight || 0 }}</div> + <div class="">kg</div> + </div> + <div class=""> + <span>总重量</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box blue mb10"> + <div class="data mr5px">{{ delivery_bill_info.totalVolume || 0 }}</div> + <div class="">m³</div> + </div> + <div class=""> + <span>总方数</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box blue mb10"> + <div class="data mr5px">{{ delivery_bill_info.totalRoadNum || 0 }}</div> + <div class="">件</div> + </div> + <div class=""> + <span>在途件数</span> + </div> + </div> + </div> + </div> + + <!-- 签收数据 --> + <div class="flex1 box2 view_box" v-loading="details.loadingObj.signforData"> + <!-- 标题 --> + <div class="align_center mb20 flex-c-sb"> + <div class="flex"> + <img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" /> + + <div class="title">签收数据 -- 自提</div> + </div> + + <div class="align_center"> + <div + :class="{ button: true, active: billSignforData_status === '3' }" + @click="() => (billSignforData_status = '3')" + > + 当天 + </div> + <div + :class="{ button: true, active: billSignforData_status === '4' }" + @click="() => (billSignforData_status = '4')" + > + 当月 + </div> + </div> + </div> + + <div class="border pd10 flex-c-sb"> + <div class="text_center"> + <div class="data_box mb10"> + <div class="data mr5px">{{ billSignforData.signNum || 0 }}</div> + <div class="">件</div> + </div> + <div class=""> + <span>已签收</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box orange mb10"> + <div class="data mr5px">{{ billSignforData.unSignNum || 0 }}</div> + <div class="">件</div> + </div> + <div class=""> + <span>未签收</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box blue mb10"> + <div class="data mr5px"> + {{ + billSignforData.signScale ? Number(billSignforData.signScale * 100).toFixed(2) : 0 + }} + </div> + <div class="">%</div> + </div> + <div class=""> + <span>签收率</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box purple mb10"> + <div class="data mr5px">{{ billSignforData.clerkSignNum || 0 }}</div> + <div class="">件</div> + </div> + <div class=""> + <span>文员签收数</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box purple mb10"> + <div class="data mr5px"> + {{ + billSignforData.clerkSignforScale + ? Number(billSignforData.clerkSignforScale * 100).toFixed(2) + : 0 + }} + </div> + <div class="">%</div> + </div> + <div class=""> + <span>文员签收率</span> + </div> + </div> + + <div class="text_center"> + <div class="data_box red mb10"> + <div class="data mr5px">{{ billSignforData.clerkOverTimeSignfoNum || 0 }}</div> + <div class="">件</div> + </div> + <div class=""> + <span>超时签收</span> + </div> + </div> + + <div class="text_center" v-if="billSignforData_status !== '3'"> + <div class="data_box red mb10"> + <div class="data mr5px"> + {{ + billSignforData.clerkOverTimeScale + ? Number(billSignforData.clerkOverTimeScale * 100).toFixed(2) + : 0 + }} + </div> + <div class="">%</div> + </div> + <div class=""> + <span>签收超时率</span> + </div> + </div> + </div> </div> </div> </div> </template> -<script setup> -import { ref, onMounted } from 'vue'; -const indexState = ref(false); -const currentTime = ref('0000年00月00日00时00分00秒'); -const name = ref(''); -name.value = JSON.parse(localStorage.getItem('TWMS-userInfo')).content.real_name; -setInterval(() => { - const now = new Date(); - const year = now.getFullYear(); - const month = String(now.getMonth() + 1).padStart(2, '0'); - const day = String(now.getDate()).padStart(2, '0'); - const hours = String(now.getHours()).padStart(2, '0'); - const minutes = String(now.getMinutes()).padStart(2, '0'); - const seconds = String(now.getSeconds()).padStart(2, '0'); - currentTime.value = `${year}年${month}月${day}日${hours}时${minutes}分${seconds}秒`; -}, 1000); -</script> -<style scoped lang="scss"> -.info { - display: flex; - display: flex; - flex-direction: column; - justify-content: center; - .name { - font-size: 40px; - color: #d3832a; - font-weight: bold; +<script setup lang="ts"> +import { ref, onMounted, computed, reactive } from 'vue'; +import { computeNumber } from '@/utils/util.js'; + +import { + postAllocationData, + postHandOrderData, + postOpenOrderData, + postOpenOrderIncome, + postTrunklineCarsData, + postTrunklineHandOrderData, + postUnloadAbnormalData, + postDeliveryData, + postSignforData, +} from '@/api/wel/index'; + +const details = reactive({ + /** 开单数据 */ + openOrderDataInfo: { + /** 开单 -- 总计 */ + dayNum: 0, + /** 开单 -- 当月 */ + monthNum: 0, + /** 开单 -- 当日 */ + totalNum: 0, + }, + /** 开单收入 */ + openOrderIncomeInfo: { + dayBillladingFee: '0.00', + dayDistributionFee: '0.00', + dayFee: '0.00', + dayInstallFee: '0.00', + dayTrunklineFee: '0.00', + dayWarehouseFee: '0.00', + monthBillladingFee: '0.00', + monthDistributionFee: '0.00', + monthFee: '0.00', + monthInstallFee: '0.00', + monthTrunklineFee: '0.00', + monthWarehouseFee: '0.00', + totalFee: '0', + }, + /** 当前在库数据 */ + handOrderDataInfo: { + billNum: 0, + cityNum: 0, + mallNum: 0, + thirdTransferNum: 0, + totalNum: 0, + trayNum: 0, + zeroNum: 0, + }, + /** 库位数据 */ + allocationDataInfo: { + noUpshelfNum: 0, + nullNum: 0, + totalNum: 0, + upshelfNum: 0, + useNum: 0, + }, + /** 干线发运数据 */ + trunklineHandOrderDataInfo: { + handleNum: 0, + handleVolume: '0.0000', + handleWeight: '0.0000', + waybillNum: 0, + }, + /** 干线车次数据 */ + trunklineCarsDataInfo: { + inTransitNum: 0, + totalNum: 0, + unloadNum: 0, + workNum: 0, + }, + /** 异常卸车数据 */ + unloadAbnormalDataInfo: { + abnormalDayRate: '0', + abnormalMonthRate: '0', + noDealDayNum: 0, + noDealMonthNum: 0, + sendDayNum: 0, + sendMonthNum: 0, + unloadDayNum: 0, + unloadMonthNum: 0, + }, + /** 配送数据 */ + deliveryDataInfo: [], + /** 签收数据 */ + signforDataInfo: [], + loadingObj: { + /** 开单数据 */ + openOrderData: false, + /** 开单收入 */ + openOrderIncome: false, + /** 当前在库数据 */ + handOrderData: false, + /** 库位数据 */ + allocationData: false, + /** 干线发运数据 */ + trunklineHandOrderData: false, + /** 干线车次数据 */ + trunklineCarsData: false, + /** 异常卸车数据 */ + unloadAbnormalData: false, + /** 配送数据 */ + deliveryData: false, + /** 签收数据 */ + signforData: false, + }, +}); + +const deliveryDataBill = computed(() => {}); + +/** + * 配送显示数据类型 + * 1 -- 商配 + * 2 -- 市配 + * 3 -- 自提 + * 4 -- 外协商配 + * 5 -- 外协市配 + */ +const delivery_status = ref<1 | 2 | 3 | 4 | 5>(1); + +/** 异常数据状态 */ +const abnormal_status = ref<'day' | 'month'>('day'); + +/** 签收数据状态 */ +const signforData_status = ref<'1' | '2'>('1'); + +/** 自提签收数据状态 */ +const billSignforData_status = ref<'3' | '4'>('3'); + +/** 请求开单数据 */ +const initOpenOrderData = async () => { + try { + details.loadingObj.openOrderData = true; + const res = await postOpenOrderData({}); + const { code, data } = res.data; + if (code !== 200) return; + details.openOrderDataInfo = data || {}; + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.openOrderData = false; + } +}; + +/** 请求开单收入 */ +const initOpenOrderIncome = async () => { + try { + details.loadingObj.openOrderIncome = true; + const res = await postOpenOrderIncome({}); + const { code, data } = res.data; + if (code !== 200) return; + details.openOrderIncomeInfo = data || {}; + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.openOrderIncome = false; + } +}; + +/** 请求库位数据 */ +const initAllocationData = async () => { + try { + details.loadingObj.allocationData = true; + const res = await postAllocationData({}); + const { code, data } = res.data; + if (code !== 200) return; + details.allocationDataInfo = data || {}; + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.allocationData = false; + } +}; + +/** 请求在库数据 */ +const initHandOrderData = async () => { + try { + details.loadingObj.handOrderData = true; + const res = await postHandOrderData({}); + const { code, data } = res.data; + if (code !== 200) return; + details.handOrderDataInfo = data || {}; + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.handOrderData = false; + } +}; + +/** 请求干线发运数据 */ +const initTrunklineHandOrderData = async () => { + try { + details.loadingObj.trunklineHandOrderData = true; + const res = await postTrunklineHandOrderData({}); + const { code, data } = res.data; + if (code !== 200) return; + details.trunklineHandOrderDataInfo = data || {}; + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.trunklineHandOrderData = false; + } +}; + +/** 请求干线车次数据 */ +const initTrunklineCarsData = async () => { + try { + details.loadingObj.trunklineCarsData = true; + const res = await postTrunklineCarsData({}); + const { code, data } = res.data; + if (code !== 200) return; + details.trunklineCarsDataInfo = data || {}; + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.trunklineCarsData = false; } - .slogan { - font-size: 3em; +}; + +/** 卸车异常数据 */ +const initUnloadAbnormalData = async () => { + try { + details.loadingObj.unloadAbnormalData = true; + const res = await postUnloadAbnormalData({}); + const { code, data } = res.data; + if (code !== 200) return; + details.unloadAbnormalDataInfo = data || {}; + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.unloadAbnormalData = false; } - .time { - display: flex; - margin-top: 10px; - justify-content: flex-end; +}; + +/** 配送数据 */ +const initDeliveryData = async () => { + try { + details.loadingObj.deliveryData = true; + const res = await postDeliveryData({}); + const { code, data } = res.data; + if (code !== 200) return; + details.deliveryDataInfo = data || []; + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.deliveryData = false; + } +}; + +/** 签收数据 */ +const initSignforData = async () => { + try { + details.loadingObj.signforData = true; + const res = await postSignforData({}); + const { code, data } = res.data; + if (code !== 200) return; + details.signforDataInfo = data || []; + } catch (error) { + console.log('error :>> ', error); + } finally { + details.loadingObj.signforData = false; } +}; + +const handleRefresh = () => { + initAllocationData(); + initHandOrderData(); + initOpenOrderData(); + initOpenOrderIncome(); + initTrunklineCarsData(); + initTrunklineHandOrderData(); + initUnloadAbnormalData(); + initDeliveryData(); + initSignforData(); +}; + +handleRefresh(); + +/** 异常数据 */ +const abnormal_Info = computed(() => { + const _obj = + abnormal_status.value === 'day' + ? { + sendNum: details.unloadAbnormalDataInfo.sendDayNum, + noDealNum: details.unloadAbnormalDataInfo.noDealDayNum, + abnormalRate: details.unloadAbnormalDataInfo.abnormalDayRate, + } + : { + sendNum: details.unloadAbnormalDataInfo.sendMonthNum, + noDealNum: details.unloadAbnormalDataInfo.noDealMonthNum, + abnormalRate: details.unloadAbnormalDataInfo.abnormalMonthRate, + }; + + return _obj; +}); + +/** 配送数据 */ +const delivery_info = computed(() => { + let _obj = {}; + + for (let i = 0; i < details.deliveryDataInfo.length; i++) { + const value = details.deliveryDataInfo[i]; + if (delivery_status.value + '' === value.type + '') _obj = value; + } + + return _obj; +}); + +/** 配送自提数据 */ +const delivery_bill_info = computed(() => { + let _obj = {}; + + for (let i = 0; i < details.deliveryDataInfo.length; i++) { + const value = details.deliveryDataInfo[i]; + if (value.type + '' === '3') _obj = value; + } + + return _obj; +}); + +/** 签收数据 */ +const signforData = computed(() => { + let _obj = {}; + + for (let i = 0; i < details.signforDataInfo.length; i++) { + const value = details.signforDataInfo[i]; + if (value.type + '' === signforData_status.value) _obj = value; + } + + _obj.signScaleNum ? _obj.signScaleNum : (_obj.signScaleNum = _obj.signScale || 0); + _obj.clerkSignforScaleNum + ? _obj.clerkSignforScaleNum + : (_obj.clerkSignforScaleNum = _obj.clerkSignforScale || 0); + _obj.clerkOverTimeScaleNum + ? _obj.clerkOverTimeScaleNum + : (_obj.clerkOverTimeScaleNum = _obj.clerkOverTimeScale || 0); + + _obj.signScale = computeNumber(_obj.signScaleNum || 0, '*', 100).result.toFixed(2); + _obj.clerkSignforScale = computeNumber(_obj.clerkSignforScaleNum || 0, '*', 100).result.toFixed( + 2 + ); + _obj.clerkOverTimeScale = computeNumber(_obj.clerkOverTimeScaleNum || 0, '*', 100).result.toFixed( + 2 + ); + + return _obj; +}); + +/** 签收数据 -- 自提 */ +const billSignforData = computed(() => { + let _obj = {}; + + for (let i = 0; i < details.signforDataInfo.length; i++) { + const value = details.signforDataInfo[i]; + if (value.type + '' === billSignforData_status.value) _obj = value; + } + + _obj.signScaleNum ? _obj.signScaleNum : (_obj.signScaleNum = _obj.signScale || 0); + _obj.clerkSignforScaleNum + ? _obj.clerkSignforScaleNum + : (_obj.clerkSignforScaleNum = _obj.clerkSignforScale || 0); + _obj.clerkOverTimeScaleNum + ? _obj.clerkOverTimeScaleNum + : (_obj.clerkOverTimeScaleNum = _obj.clerkOverTimeScale || 0); + + _obj.signScale = computeNumber(_obj.signScaleNum || 0, '*', 100).result.toFixed(2); + _obj.clerkSignforScale = computeNumber(_obj.clerkSignforScaleNum || 0, '*', 100).result.toFixed( + 2 + ); + _obj.clerkOverTimeScale = computeNumber(_obj.clerkOverTimeScaleNum || 0, '*', 100).result.toFixed( + 2 + ); + + return _obj; +}); +</script> + +<style scoped lang="scss"> +.main_container { + font-size: 14px; + background: #f5f5f6; + padding: 0 5px; +} + +.view_box { + padding: 10px; + padding-top: 8px; + background: #fff; + border-radius: 5px; + .title { - display: flex; - margin-top: 10px; - justify-content: flex-end; + font-weight: bold; + font-size: 18px; + line-height: 18px; + } + + .img_16pt { + width: 20px; + height: 20px; } } -.el_Hwlogo { - width: 100%; - height: 100%; + +.mb20 { + margin-bottom: 20px; +} + +.pd10 { + padding: 0 10px; +} + +.align_center { display: flex; align-items: center; - justify-content: center; - span { - color: #d3832a; +} + +// 开单数据 +.height40pt { + height: 60px; +} + +// 数据样式 +.data { + font-weight: bold; + color: #000; + font-family: DIN-Bold; + font-size: 20px; +} + +.border { + border: 1pt solid #f5f5f6; + border-radius: 5px; + box-sizing: border-box; +} + +.border-bottom { + border-bottom: 1pt solid #f5f5f6; + box-sizing: border-box; +} + +.border-left { + border-left: 1px solid #f5f5f6; + box-sizing: border-box; +} + +// 第一排 +.row_first { + & > div { + height: 100%; + } + + .box1 { + height: 100%; + width: 340px; + box-sizing: border-box; + flex: none; + } + + // 开单收入 + .box2 { + height: 100%; + + // 统计数据 + .totol { + width: 460px; + + .monthData { + height: 120px; + + & > div { + height: 80%; + flex-direction: column; + display: flex; + justify-content: space-around; + padding: 0 10px; + box-sizing: border-box; + } + } + } + + // 详情数据 + .detailsData { + .item { + background: #f2f7fb; + border-radius: 5px; + height: 85px; + box-sizing: border-box; + padding: 10px; + color: #a4b0c2; + display: flex; + justify-content: space-between; + flex-direction: column; + } + } + } +} + +// 第二排 +.row_second { + .dataIcon { + height: 14px; + width: 14px; + } + + .data_container { + height: 100px; + box-sizing: border-box; + padding: 20px 0; + } + + .item { + width: 137px; + height: 100%; + padding: 0 20px; + box-sizing: border-box; + flex: none; } - img { - width: 300px; - height: 300px; +} + +// 第三排 +.row_third { + @extend .row_second; + .abnormal_container { + height: 100px; + } + + .abnormal_item { + box-sizing: border-box; + padding: 20px; + width: 160px; + color: #7b8ba4; + + &.red { + background: #ffeeed; + + .data { + color: #ff5d52; + } + } + + &.blue { + background: #e9f4ff; + + .data { + color: #2693ff; + } + } + + &.green { + background: #e5f8f3; + + .data { + color: #00c090; + } + } } - .content { - display: flex; - flex-direction: row; - flex-wrap: wrap; - align-items: center; - justify-content: center; + + .button { + padding: 0px 10px; + height: 18px; + line-height: 18px; + background: #fff; + border: 1px solid #f5f5f6; + border-radius: 2px; + color: #000; + font-size: 12px; + transition: all 0.3s; + cursor: pointer; + &.active { + color: #fff; + background: #2693ff; + border-color: #2693ff; + } } } -.el-gl { - font-weight: 500; + +// 第四排 +.row_fourthly { + @extend .row_third; + + .item { + width: 150px; + } +} + +.data_box { + padding: 16px; + min-width: 80px; + word-break: break-all; + background-color: #e5f8f3; + border-radius: 4px; + border-bottom: 5px solid #00c090; + + &.orange { + background: #fff4ec; + border-color: #ff9545; + } + + &.blue { + background-color: #f2f7fb; + border-color: #2693ff; + } + + &.red { + background: #ffeeed; + border-color: #ff5d52; + } + + &.purple { + background: #f0eff8; + border-color: #6b60c2; + } +} + +.mr5px { + margin-right: 5px; +} + +.text_center { text-align: center; - position: absolute; - right: 10px; - top: 10px; - width: 15%; - background-color: #fff; - border-radius: 32px; - padding: 5px; - box-sizing: border-box; - border: 1px solid #f1eeee69; - box-shadow: 4px 6px 0 #d3dff6, 1px 1px 9px #d3dff6; - height: 762px; } </style> <style lang="scss" scope> @@ -226,23 +1604,3 @@ setInterval(() => { background-color: #fff; } </style> -<script> -import { mapGetters } from 'vuex'; -export default { - name: 'wel', - data() { - return { - activeNames: ['1', '2', '3', '5'], - logActiveNames: ['29'], - }; - }, - computed: { - ...mapGetters(['userInfo']), - }, - methods: { - handleChange(val) { - window.console.log(val); - }, - }, -}; -</script> diff --git a/src/views/wel/index1.vue b/src/views/wel/index1.vue new file mode 100644 index 00000000..80394da6 --- /dev/null +++ b/src/views/wel/index1.vue @@ -0,0 +1,248 @@ +<template> + <div class="bx" v-if="indexState"> + <div class="left"> + <div class="tptitl"> + <img src="./static/topicon.png" /> + <span>发货操作</span> + </div> + <div class="onebx1"> + <div class="item1"> + <img src="./static/1.png" /> + <span>提货</span> + </div> + <div class="item2"> + <img src="./static/2.png" /> + <span>预开单</span> + </div> + <div class="item3"> + <img src="./static/3.png" /> + <span>创建运单</span> + </div> + <div class="item4"> + <img src="./static/4.png" /> + <span>补录运单</span> + </div> + <div class="item5"> + <img src="./static/5.png" /> + <span>短驳发车</span> + </div> + <div class="item6"> + <img src="./static/6.png" /> + <span>外部中转</span> + </div> + <div class="item7"> + <img src="./static/7.png" /> + <span>库存管理</span> + </div> + <div class="item8"> + <img src="./static/8.png" /> + <span>车辆配载</span> + </div> + <img class="upimg" src="./static/up.png" /> + <img class="rigth1" src="./static/rigth.png" /> + <img class="rigth2" src="./static/rigth.png" /> + <img class="rigth3" src="./static/rigth.png" /> + <img class="rigth4" src="./static/rigth.png" /> + <img class="rigthall" src="./static/rigthall.png" /> + </div> + </div> + <div class="ztjk"> + <img src="./static/9.png" /> + <span>到货操作</span> + </div> + <div class="rigth"> + <div class="tptitl"> + <img src="./static/topicon.png" /> + <span>到货操作</span> + </div> + <div class="onebx1"> + <div class="item1"> + <img src="./static/10.png" /> + <span>到站卸车</span> + </div> + <div class="item2"> + <img src="./static/11.png" /> + <span>库存管理</span> + </div> + <div class="item3"> + <img src="./static/12.png" /> + <span>短驳接收</span> + </div> + <div class="item4"> + <img src="./static/13.png" /> + <span>外部中转</span> + </div> + <div class="item5"> + <img src="./static/14.png" /> + <span>送货</span> + </div> + <div class="item6"> + <img src="./static/15.png" /> + <span>中转签收</span> + </div> + <div class="item7"> + <img src="./static/16.png" /> + <span>送货签收</span> + </div> + <div class="item8"> + <img src="./static/17.png" /> + <span>自提签收</span> + </div> + <img class="upimg" src="./static/down.png" /> + <img class="rigth1" src="./static/rigth.png" /> + <img class="rigth2" src="./static/rigth.png" /> + <img class="rigth3" src="./static/rigth.png" /> + <img class="rigth4" src="./static/rigth.png" /> + <img class="rigthall" src="./static/rigthall2.png" /> + <img class="leftall" src="./static/leftall.png" /> + </div> + </div> + <div class="buts"> + <div class="tptitl"> + <img src="./static/topicon.png" /> + <span>回单管理</span> + </div> + <div class="onebx1"> + <div class="item1"> + <img src="./static/18.png" /> + <span>回单回收</span> + </div> + <div class="item2"> + <img src="./static/19.png" /> + <span>回单寄出</span> + </div> + <div class="item3"> + <img src="./static/20.png" /> + <span>回单接收</span> + </div> + <div class="item4"> + <img src="./static/21.png" /> + <span>回单发放</span> + </div> + <img class="left1" src="./static/rigth.png" /> + <img class="left2" src="./static/rigth.png" /> + <img class="left3" src="./static/rigth.png" /> + </div> + </div> + <div class="el-gl"> + <div>公告栏</div> + </div> + </div> + <div v-else class="el_Hwlogo"> + <div class="content"> + <img src="/public/img/p-logo.png" alt="" /> + <div class="info"> + <div class="name">{{ name }}</div> + <div class="slogan">您好!欢迎使用货无忧</div> + <div class="title">成都数联物科信息技术有限公司</div> + <div class="time">{{ currentTime }}</div> + </div> + </div> + </div> +</template> +<script setup> +import { ref, onMounted } from 'vue'; +const indexState = ref(false); +const currentTime = ref('0000年00月00日00时00分00秒'); +const name = ref(''); +name.value = JSON.parse(localStorage.getItem('TWMS-userInfo')).content.real_name; +setInterval(() => { + const now = new Date(); + const year = now.getFullYear(); + const month = String(now.getMonth() + 1).padStart(2, '0'); + const day = String(now.getDate()).padStart(2, '0'); + const hours = String(now.getHours()).padStart(2, '0'); + const minutes = String(now.getMinutes()).padStart(2, '0'); + const seconds = String(now.getSeconds()).padStart(2, '0'); + currentTime.value = `${year}年${month}月${day}日${hours}时${minutes}分${seconds}秒`; +}, 1000); +</script> +<style scoped lang="scss"> +.info { + display: flex; + display: flex; + flex-direction: column; + justify-content: center; + .name { + font-size: 40px; + color: #d3832a; + font-weight: bold; + } + .slogan { + font-size: 3em; + } + .time { + display: flex; + margin-top: 10px; + justify-content: flex-end; + } + .title { + display: flex; + margin-top: 10px; + justify-content: flex-end; + } +} +.el_Hwlogo { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + span { + color: #d3832a; + } + img { + width: 300px; + height: 300px; + } + .content { + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: center; + justify-content: center; + } +} +.el-gl { + font-weight: 500; + text-align: center; + position: absolute; + right: 10px; + top: 10px; + width: 15%; + background-color: #fff; + border-radius: 32px; + padding: 5px; + box-sizing: border-box; + border: 1px solid #f1eeee69; + box-shadow: 4px 6px 0 #d3dff6, 1px 1px 9px #d3dff6; + height: 762px; +} +</style> +<style lang="scss" scope> +@import '../../styles/flowStyle.scss'; + +#avue-view { + background-color: #fff; +} +</style> +<script> +import { mapGetters } from 'vuex'; +export default { + name: 'wel', + data() { + return { + activeNames: ['1', '2', '3', '5'], + logActiveNames: ['29'], + }; + }, + computed: { + ...mapGetters(['userInfo']), + }, + methods: { + handleChange(val) { + window.console.log(val); + }, + }, +}; +</script> diff --git a/src/views/wel/index2.vue b/src/views/wel/index2.vue deleted file mode 100644 index 4f3ab717..00000000 --- a/src/views/wel/index2.vue +++ /dev/null @@ -1,1459 +0,0 @@ -<template> - <div class="main_container"> - <el-button @click="handleRefresh">刷新</el-button> - - <!-- 开单数据 && 开单收入 --> - <div class="flex mb10 row_first"> - <!-- 开单数据 --> - <div class="mr10 box1 view_box" v-loading="details.loadingObj.openOrderData"> - <!-- 标题 --> - <div class="align_center mb20"> - <img class="mr10 img_13pt" src="@/static/icon_data.png" alt="" /> - - <div class="title">开单数据</div> - </div> - - <!-- 数据 --> - <div class="border pd10"> - <div class="height40pt flex-c-sb border-bottom"> - <div class="align_center"> - <img class="mr10 img_16pt" src="@/static/icon_storage.png" alt="" /> - - <div>总计</div> - </div> - - <div class="align_center"> - <span class="data mr10">{{ details.openOrderDataInfo.totalNum || 0 }}</span> - <span>单</span> - </div> - </div> - - <div class="height40pt flex-c-sb border-bottom"> - <div class="align_center"> - <img class="mr10 img_16pt" src="@/static/icon_month.png" alt="" /> - - <div>当月</div> - </div> - - <div class="align_center"> - <span class="data mr10">{{ details.openOrderDataInfo.monthNum || 0 }}</span> - <span>单</span> - </div> - </div> - - <div class="height40pt flex-c-sb"> - <div class="align_center"> - <img class="mr10 img_16pt" src="@/static/icon_day.png" alt="" /> - - <div>当日</div> - </div> - - <div class="align_center"> - <span class="data mr10">{{ details.openOrderDataInfo.dayNum || 0 }}</span> - - <span>单</span> - </div> - </div> - </div> - </div> - - <!-- 开单收入 --> - <div class="flex1 box2 view_box" v-loading="details.loadingObj.openOrderIncome"> - <!-- 标题 --> - <div class="align_center mb20"> - <img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" /> - - <div class="title">开单收入</div> - </div> - - <div class="flex"> - <!-- 统计数据 --> - <div class="border flexnone totol pd10"> - <!-- 总计 --> - <div class="height40pt flex-c-sb border-bottom"> - <div class="align_center"> - <img class="mr10 img_16pt" src="@/static/icon_storage.png" alt="" /> - - <div>总计</div> - </div> - - <div class="align_center"> - <span class="data mr10">{{ details.openOrderIncomeInfo.totalFee || 0 }}</span> - <span>元</span> - </div> - </div> - - <div class="monthData flex-c-sb"> - <!-- 当月 --> - <div class="flex1"> - <div class="align_center"> - <img class="mr10 img_16pt" src="@/static/icon_month.png" alt="" /> - - <div>当月</div> - </div> - - <div class="align_center"> - <span class="data mr10">{{ details.openOrderIncomeInfo.monthFee || 0 }}</span> - <span>元</span> - </div> - </div> - - <!-- 当日 --> - <div class="flex1 border-left"> - <div class="align_center"> - <img class="mr10 img_16pt" src="@/static/icon_day.png" alt="" /> - - <div>当日</div> - </div> - - <div class="align_center"> - <span class="data mr10">{{ details.openOrderIncomeInfo.dayFee || 0 }}</span> - <span>元</span> - </div> - </div> - </div> - </div> - - <!-- 详情数据 --> - <div class="detailsData flex1 ml10"> - <!-- 月 --> - <div class="flex-c-sb"> - <!-- 干线 --> - <div class="item flex1 mr10"> - <div> - <span class="data mr5px">{{ - details.openOrderIncomeInfo.monthTrunklineFee || 0 - }}</span> - <span>元</span> - </div> - - <div>干线 - 月</div> - </div> - <!-- 仓储 --> - <div class="item flex1 mr10"> - <div> - <span class="data mr5px">{{ - details.openOrderIncomeInfo.monthWarehouseFee || 0 - }}</span> - <span>元</span> - </div> - - <div>仓储 - 月</div> - </div> - <!-- 配送 --> - <div class="item flex1 mr10"> - <div> - <span class="data mr5px">{{ - details.openOrderIncomeInfo.monthDistributionFee || 0 - }}</span> - <span>元</span> - </div> - - <div>配送 - 月</div> - </div> - <!-- 提货 --> - <div class="item flex1 mr10"> - <div> - <span class="data mr5px">{{ - details.openOrderIncomeInfo.monthBillladingFee || 0 - }}</span> - <span>元</span> - </div> - - <div>提货 - 月</div> - </div> - <!-- 安装 --> - <div class="item flex1"> - <div> - <span class="data mr5px">{{ - details.openOrderIncomeInfo.monthInstallFee || 0 - }}</span> - <span>元</span> - </div> - - <div>安装 - 月</div> - </div> - </div> - - <!-- 日 --> - <div class="flex-c-sb mt10"> - <!-- 干线 --> - <div class="item flex1 mr10"> - <div> - <span class="data mr5px">{{ - details.openOrderIncomeInfo.dayTrunklineFee || 0 - }}</span> - <span>元</span> - </div> - - <div>干线 - 日</div> - </div> - <!-- 仓储 --> - <div class="item flex1 mr10"> - <div> - <span class="data mr5px">{{ - details.openOrderIncomeInfo.dayWarehouseFee || 0 - }}</span> - <span>元</span> - </div> - - <div>仓储 - 日</div> - </div> - <!-- 配送 --> - <div class="item flex1 mr10"> - <div> - <span class="data mr5px">{{ - details.openOrderIncomeInfo.dayDistributionFee || 0 - }}</span> - <span>元</span> - </div> - - <div>配送 - 日</div> - </div> - <!-- 提货 --> - <div class="item flex1 mr10"> - <div> - <span class="data mr5px">{{ - details.openOrderIncomeInfo.dayBillladingFee || 0 - }}</span> - <span>元</span> - </div> - - <div>提货 - 日</div> - </div> - <!-- 安装 --> - <div class="item flex1"> - <div> - <span class="data mr5px">{{ - details.openOrderIncomeInfo.dayInstallFee || 0 - }}</span> - <span>元</span> - </div> - - <div>安装 - 日</div> - </div> - </div> - </div> - </div> - </div> - </div> - - <!-- 当前所在库位数据 && 库位数据 --> - <div class="flex mb10 row_second"> - <!-- 当前所在库位数据 --> - <div class="mr10 box1 view_box" v-loading="details.loadingObj.handOrderData"> - <!-- 标题 --> - <div class="align_center mb20"> - <img class="mr10 img_13pt" src="@/static/icon_data.png" alt="" /> - - <div class="title">当前在库数据</div> - </div> - - <!-- 数据 --> - <div class="border data_container pd10 flex"> - <div class="item"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>总数</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ details.handOrderDataInfo.totalNum || 0 }}</span> - <span class="">件</span> - </div> - </div> - - <div class="item border-left"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>零担</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ details.handOrderDataInfo.zeroNum || 0 }}</span> - <span class="">件</span> - </div> - </div> - - <div class="item border-left"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>三方中转</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ details.handOrderDataInfo.thirdTransferNum || 0 }}</span> - <span class="">件</span> - </div> - </div> - - <div class="item border-left"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>商配</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ details.handOrderDataInfo.mallNum || 0 }}</span> - <span class="">件</span> - </div> - </div> - - <div class="item border-left"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>市配</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ details.handOrderDataInfo.cityNum || 0 }}</span> - <span class="">件</span> - </div> - </div> - - <div class="item border-left"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>自提</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ details.handOrderDataInfo.billNum || 0 }}</span> - <span class="">件</span> - </div> - </div> - - <div class="item border-left"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>已打托</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ details.handOrderDataInfo.trayNum || 0 }}</span> - <span class="">件</span> - </div> - </div> - </div> - </div> - - <!-- 库位数据 --> - <div class="flex1 box2 view_box" v-loading="details.loadingObj.allocationData"> - <!-- 标题 --> - <div class="align_center mb20"> - <img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" /> - - <div class="title">库位数据</div> - </div> - - <div class="border data_container pd10 flex"> - <div class="item"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>总数</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ details.allocationDataInfo.totalNum || 0 }}</span> - <span class="">个</span> - </div> - </div> - - <div class="item border-left"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>已上架</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ details.allocationDataInfo.useNum || 0 }}</span> - <span class="">个</span> - </div> - </div> - - <div class="item border-left"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>空置</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ details.allocationDataInfo.nullNum || 0 }}</span> - <span class="">个</span> - </div> - </div> - - <div class="item border-left"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>已上架</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ details.allocationDataInfo.upshelfNum || 0 }}</span> - <span class="">件</span> - </div> - </div> - - <div class="item border-left"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>未上架</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ details.allocationDataInfo.noUpshelfNum || 0 }}</span> - <span class="">件</span> - </div> - </div> - </div> - </div> - </div> - - <!-- 干线待发运在库数据 && 干线车次统计 && 异常数据 --> - <div class="flex mb10 row_third"> - <!-- 当前所在库位数据 --> - <div class="mr10 box1 flex1 view_box" v-loading="details.loadingObj.trunklineHandOrderData"> - <!-- 标题 --> - <div class="align_center mb20"> - <img class="mr10 img_13pt" src="@/static/icon_data.png" alt="" /> - - <div class="title">干线待发运在库数据</div> - </div> - - <!-- 数据 --> - <div class="border pd10 flex-c-sb"> - <div class="text_center"> - <div class="data_box orange mb10"> - <div class="data mr5px">{{ details.trunklineHandOrderDataInfo.waybillNum || 0 }}</div> - <div class="">单</div> - </div> - <div class=""> - <span>运单总数</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box orange mb10"> - <div class="data mr5px">{{ details.trunklineHandOrderDataInfo.handleNum || 0 }}</div> - <div class="">件</div> - </div> - <div class=""> - <span>在库总件数</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box orange mb10"> - <div class="data mr5px"> - {{ details.trunklineHandOrderDataInfo.handleWeight || 0 }} - </div> - <div class="">kg</div> - </div> - <div class=""> - <span>在库总重量</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box orange mb10"> - <div class="data mr5px"> - {{ details.trunklineHandOrderDataInfo.handleVolume || 0 }} - </div> - <div class="">m³</div> - </div> - <div class=""> - <span>在库总方数</span> - </div> - </div> - </div> - </div> - - <!-- 干线车次统计 --> - <div class="mr10 flex1 box2 view_box" v-loading="details.loadingObj.trunklineCarsData"> - <!-- 标题 --> - <div class="align_center mb20"> - <img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" /> - - <div class="title">干线车次统计</div> - </div> - - <div class="border pd10 flex-c-sb"> - <div class="text_center"> - <div class="data_box mb10"> - <div class="data mr5px">{{ details.trunklineCarsDataInfo.totalNum || 0 }}</div> - <div class="">车</div> - </div> - <div class=""> - <span>总车次</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box mb10"> - <div class="data mr5px">{{ details.trunklineCarsDataInfo.inTransitNum || 0 }}</div> - <div class="">车</div> - </div> - <div class=""> - <span>在途</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box mb10"> - <div class="data mr5px">{{ details.trunklineCarsDataInfo.workNum || 0 }}</div> - <div class="">车</div> - </div> - <div class=""> - <span>作业</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box mb10"> - <div class="data mr5px">{{ details.trunklineCarsDataInfo.unloadNum || 0 }}</div> - <div class="">车</div> - </div> - <div class=""> - <span>卸车完成</span> - </div> - </div> - </div> - </div> - - <!-- 异常数据 --> - <div class="flex1 box2 view_box" v-loading="details.loadingObj.unloadAbnormalData"> - <!-- 标题 --> - <div class="flex-c-sb mb20"> - <div class="align_center"> - <img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" /> - - <div class="title">异常数据</div> - </div> - - <div class="align_center"> - <div - :class="{ button: true, active: abnormal_status === 'day' }" - @click="() => (abnormal_status = 'day')" - > - 当天 - </div> - <div - :class="{ button: true, active: abnormal_status === 'month' }" - @click="() => (abnormal_status = 'month')" - > - 当月 - </div> - </div> - </div> - - <div class="abnormal_container flex-c-sb"> - <div class="abnormal_item green"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>发起数</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ abnormal_Info.sendNum }}</span> - <span class="">单</span> - </div> - </div> - - <div class="abnormal_item blue"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>待处理</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ abnormal_Info.noDealNum }}</span> - <span class="">单</span> - </div> - </div> - - <div class="abnormal_item red"> - <div class="align_center"> - <img class="dataIcon mr5px" src="@/static/icon_money_day.png" alt="" /> - <span>异常率</span> - </div> - <div class="mt10"> - <span class="data mr5px">{{ abnormal_Info.abnormalRate }}</span> - <span class="">%</span> - </div> - </div> - </div> - </div> - </div> - - <!-- 当前配送数据 && 签收数据 --> - <div class="flex mb10 row_fourthly"> - <!-- 当前配送数据 --> - <div - class="mr10 box1 view_box" - style="width: 40%" - v-loading="details.loadingObj.deliveryData" - > - <!-- 标题 --> - <div class="flex-c-sb mb20"> - <div class="align_center"> - <img class="mr10 img_13pt" src="@/static/icon_data.png" alt="" /> - - <div class="title">当前配送数据</div> - </div> - - <div class="align_center"> - <div :class="{ button: true, active: isActive }" @click="isActive = !isActive"> - 市配 - </div> - <div :class="{ button: true, active: !isActive }" @click="isActive = !isActive"> - 商配 - </div> - </div> - </div> - - <!-- 数据 --> - <div class="border pd10 flex-c-sb"> - <div class="text_center"> - <div class="data_box blue mb10"> - <div class="data mr5px">16899</div> - <div class="">单</div> - </div> - <div class=""> - <span>配送计划总数</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box blue mb10"> - <div class="data mr5px">16899</div> - <div class="">件</div> - </div> - <div class=""> - <span>总作业</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box blue mb10"> - <div class="data mr5px">16899</div> - <div class="">kg</div> - </div> - <div class=""> - <span>总重量</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box blue mb10"> - <div class="data mr5px">16899</div> - <div class="">m³</div> - </div> - <div class=""> - <span>总方数</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box blue mb10"> - <div class="data mr5px">16899</div> - <div class="">件</div> - </div> - <div class=""> - <span>在途件数</span> - </div> - </div> - </div> - </div> - - <!-- 签收数据 --> - <div class="flex1 box2 view_box" v-loading="details.loadingObj.signforData"> - <!-- 标题 --> - <div class="align_center mb20 flex-c-sb"> - <div class="flex"> - <img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" /> - - <div class="title">签收数据</div> - </div> - - <div class="align_center"> - <div - :class="{ button: true, active: abnormal_status === 'day' }" - @click="() => (abnormal_status = 'day')" - > - 当天 - </div> - <div - :class="{ button: true, active: abnormal_status === 'month' }" - @click="() => (abnormal_status = 'month')" - > - 当月 - </div> - </div> - </div> - - <div class="border pd10 flex-c-sb"> - <div class="text_center"> - <div class="data_box mb10"> - <div class="data mr5px">16899</div> - <div class="">件</div> - </div> - <div class=""> - <span>已签收</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box orange mb10"> - <div class="data mr5px">16899</div> - <div class="">件</div> - </div> - <div class=""> - <span>未签收</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box blue mb10"> - <div class="data mr5px">16899</div> - <div class="">%</div> - </div> - <div class=""> - <span>签收率</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box purple mb10"> - <div class="data mr5px">16899</div> - <div class="">件</div> - </div> - <div class=""> - <span>文员签收数</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box purple mb10"> - <div class="data mr5px">16899</div> - <div class="">%</div> - </div> - <div class=""> - <span>文员签收率</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box red mb10"> - <div class="data mr5px">16899</div> - <div class="">件</div> - </div> - <div class=""> - <span>超时签收</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box red mb10"> - <div class="data mr5px">168991</div> - <div class="">%</div> - </div> - <div class=""> - <span>签收超时率</span> - </div> - </div> - </div> - </div> - </div> - - <!-- 当前配送数据 && 签收数据 --> - <div class="flex mb10 row_fourthly"> - <!-- 当前配送数据 --> - <div - class="mr10 box1 view_box" - style="width: 40%" - v-loading="details.loadingObj.deliveryData" - > - <!-- 标题 --> - <div class="flex-c-sb mb20"> - <div class="align_center"> - <img class="mr10 img_13pt" src="@/static/icon_data.png" alt="" /> - - <div class="title">当前配送数据 -- 自提</div> - </div> - </div> - - <!-- 数据 --> - <div class="border pd10 flex-c-sb"> - <div class="text_center"> - <div class="data_box blue mb10"> - <div class="data mr5px">16899</div> - <div class="">单</div> - </div> - <div class=""> - <span>配送计划总数</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box blue mb10"> - <div class="data mr5px">{{ deliveryDataBill }}</div> - <div class="">件</div> - </div> - <div class=""> - <span>总作业</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box blue mb10"> - <div class="data mr5px">16899</div> - <div class="">kg</div> - </div> - <div class=""> - <span>总重量</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box blue mb10"> - <div class="data mr5px">16899</div> - <div class="">m³</div> - </div> - <div class=""> - <span>总方数</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box blue mb10"> - <div class="data mr5px">16899</div> - <div class="">件</div> - </div> - <div class=""> - <span>在途件数</span> - </div> - </div> - </div> - </div> - - <!-- 签收数据 --> - <div class="flex1 box2 view_box" v-loading="details.loadingObj.signforData"> - <!-- 标题 --> - <div class="align_center mb20 flex-c-sb"> - <div class="flex"> - <img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" /> - - <div class="title">签收数据 -- 自提</div> - </div> - - <div class="align_center"> - <div - :class="{ button: true, active: abnormal_status === 'day' }" - @click="() => (abnormal_status = 'day')" - > - 当天 - </div> - <div - :class="{ button: true, active: abnormal_status === 'month' }" - @click="() => (abnormal_status = 'month')" - > - 当月 - </div> - </div> - </div> - - <div class="border pd10 flex-c-sb"> - <div class="text_center"> - <div class="data_box mb10"> - <div class="data mr5px">16899</div> - <div class="">件</div> - </div> - <div class=""> - <span>已签收</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box orange mb10"> - <div class="data mr5px">16899</div> - <div class="">件</div> - </div> - <div class=""> - <span>未签收</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box blue mb10"> - <div class="data mr5px">16899</div> - <div class="">%</div> - </div> - <div class=""> - <span>签收率</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box purple mb10"> - <div class="data mr5px">16899</div> - <div class="">件</div> - </div> - <div class=""> - <span>文员签收数</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box purple mb10"> - <div class="data mr5px">16899</div> - <div class="">%</div> - </div> - <div class=""> - <span>文员签收率</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box red mb10"> - <div class="data mr5px">16899</div> - <div class="">件</div> - </div> - <div class=""> - <span>超时签收</span> - </div> - </div> - - <div class="text_center"> - <div class="data_box red mb10"> - <div class="data mr5px">168991</div> - <div class="">%</div> - </div> - <div class=""> - <span>签收超时率</span> - </div> - </div> - </div> - </div> - </div> - </div> -</template> -<script setup lang="ts"> -import { ref, onMounted } from 'vue'; - -import { - postAllocationData, - postHandOrderData, - postOpenOrderData, - postOpenOrderIncome, - postTrunklineCarsData, - postTrunklineHandOrderData, - postUnloadAbnormalData, - postDeliveryData, - postSignforData, -} from '@/api/wel/index'; - -const details = reactive({ - /** 开单数据 */ - openOrderDataInfo: { - /** 开单 -- 总计 */ - dayNum: 0, - /** 开单 -- 当月 */ - monthNum: 0, - /** 开单 -- 当日 */ - totalNum: 0, - }, - /** 开单收入 */ - openOrderIncomeInfo: { - dayBillladingFee: '0.00', - dayDistributionFee: '0.00', - dayFee: '0.00', - dayInstallFee: '0.00', - dayTrunklineFee: '0.00', - dayWarehouseFee: '0.00', - monthBillladingFee: '0.00', - monthDistributionFee: '0.00', - monthFee: '0.00', - monthInstallFee: '0.00', - monthTrunklineFee: '0.00', - monthWarehouseFee: '0.00', - totalFee: '0', - }, - /** 当前在库数据 */ - handOrderDataInfo: { - billNum: 0, - cityNum: 0, - mallNum: 0, - thirdTransferNum: 0, - totalNum: 0, - trayNum: 0, - zeroNum: 0, - }, - /** 库位数据 */ - allocationDataInfo: { - noUpshelfNum: 0, - nullNum: 0, - totalNum: 0, - upshelfNum: 0, - useNum: 0, - }, - /** 干线发运数据 */ - trunklineHandOrderDataInfo: { - handleNum: 0, - handleVolume: '0.0000', - handleWeight: '0.0000', - waybillNum: 0, - }, - /** 干线车次数据 */ - trunklineCarsDataInfo: { - inTransitNum: 1, - totalNum: 4, - unloadNum: 1, - workNum: 3, - }, - /** 异常卸车数据 */ - unloadAbnormalDataInfo: { - abnormalDayRate: '0', - abnormalMonthRate: '0', - noDealDayNum: 0, - noDealMonthNum: 0, - sendDayNum: 0, - sendMonthNum: 0, - unloadDayNum: 0, - unloadMonthNum: 0, - }, - /** 配送数据 */ - deliveryDataInfo: [], - loadingObj: { - /** 开单数据 */ - openOrderData: false, - /** 开单收入 */ - openOrderIncome: false, - /** 当前在库数据 */ - handOrderData: false, - /** 库位数据 */ - allocationData: false, - /** 干线发运数据 */ - trunklineHandOrderData: false, - /** 干线车次数据 */ - trunklineCarsData: false, - /** 异常卸车数据 */ - unloadAbnormalData: false, - /** 配送数据 */ - deliveryData: false, - /** 签收数据 */ - signforData: false, - }, -}); - -const deliveryDataBill = computed(() => {}); - -const isActive = ref(false); - -/** 异常数据状态 */ -const abnormal_status = ref<'day' | 'month'>('day'); - -/** 请求开单数据 */ -const initOpenOrderData = async () => { - try { - details.loadingObj.openOrderData = true; - const res = await postOpenOrderData({}); - const { code, data } = res.data; - if (code !== 200) return; - details.openOrderDataInfo = data; - } catch (error) { - console.log('error :>> ', error); - } finally { - details.loadingObj.openOrderData = false; - } -}; - -/** 请求开单收入 */ -const initOpenOrderIncome = async () => { - try { - details.loadingObj.openOrderIncome = true; - const res = await postOpenOrderIncome({}); - const { code, data } = res.data; - if (code !== 200) return; - details.openOrderIncomeInfo = data; - } catch (error) { - console.log('error :>> ', error); - } finally { - details.loadingObj.openOrderIncome = false; - } -}; - -/** 请求库位数据 */ -const initAllocationData = async () => { - try { - details.loadingObj.allocationData = true; - const res = await postAllocationData({}); - const { code, data } = res.data; - if (code !== 200) return; - details.allocationDataInfo = data; - } catch (error) { - console.log('error :>> ', error); - } finally { - details.loadingObj.allocationData = false; - } -}; - -/** 请求在库数据 */ -const initHandOrderData = async () => { - try { - details.loadingObj.handOrderData = true; - const res = await postHandOrderData({}); - const { code, data } = res.data; - if (code !== 200) return; - details.handOrderDataInfo = data; - } catch (error) { - console.log('error :>> ', error); - } finally { - details.loadingObj.handOrderData = false; - } -}; - -/** 请求干线发运数据 */ -const initTrunklineHandOrderData = async () => { - try { - details.loadingObj.trunklineHandOrderData = true; - const res = await postTrunklineHandOrderData({}); - const { code, data } = res.data; - if (code !== 200) return; - details.trunklineHandOrderDataInfo = data; - } catch (error) { - console.log('error :>> ', error); - } finally { - details.loadingObj.trunklineHandOrderData = false; - } -}; - -/** 请求干线车次数据 */ -const initTrunklineCarsData = async () => { - try { - details.loadingObj.trunklineCarsData = true; - const res = await postTrunklineCarsData({}); - const { code, data } = res.data; - if (code !== 200) return; - details.trunklineCarsDataInfo = data; - } catch (error) { - console.log('error :>> ', error); - } finally { - details.loadingObj.trunklineCarsData = false; - } -}; - -/** 卸车异常数据 */ -const initUnloadAbnormalData = async () => { - try { - details.loadingObj.unloadAbnormalData = true; - const res = await postUnloadAbnormalData({}); - const { code, data } = res.data; - if (code !== 200) return; - details.unloadAbnormalDataInfo = data; - } catch (error) { - console.log('error :>> ', error); - } finally { - details.loadingObj.unloadAbnormalData = false; - } -}; - -/** 配送数据 */ -const initDeliveryData = async () => { - try { - details.loadingObj.deliveryData = true; - const res = await postDeliveryData({}); - const { code, data } = res.data; - if (code !== 200) return; - details.deliveryDataInfo = data; - } catch (error) { - console.log('error :>> ', error); - } finally { - details.loadingObj.deliveryData = false; - } -}; - -/** 签收数据 */ -const initSignforData = async () => { - try { - details.loadingObj.signforData = true; - const res = await postSignforData({}); - const { code, data } = res.data; - if (code !== 200) return; - details.unloadAbnormalDataInfo = data; - } catch (error) { - console.log('error :>> ', error); - } finally { - details.loadingObj.signforData = false; - } -}; - -const handleRefresh = () => { - // initAllocationData(); - // initHandOrderData(); - // initOpenOrderData(); - // initOpenOrderIncome(); - // initTrunklineCarsData(); - // initTrunklineHandOrderData(); - // initUnloadAbnormalData(); - // initDeliveryData(); - initSignforData(); -}; - -handleRefresh(); - -const abnormal_Info = computed(() => { - const _obj = - abnormal_status.value === 'day' - ? { - sendNum: details.unloadAbnormalDataInfo.sendDayNum, - noDealNum: details.unloadAbnormalDataInfo.noDealDayNum, - abnormalRate: details.unloadAbnormalDataInfo.abnormalDayRate, - } - : { - sendNum: details.unloadAbnormalDataInfo.sendMonthNum, - noDealNum: details.unloadAbnormalDataInfo.noDealMonthNum, - abnormalRate: details.unloadAbnormalDataInfo.abnormalMonthRate, - }; - - return _obj; -}); -</script> - -<style scoped lang="scss"> -.main_container { - font-size: 14px; - background: #f5f5f6; - padding: 0 5px; -} - -.view_box { - padding: 10px; - padding-top: 8px; - background: #fff; - border-radius: 5px; - - .title { - font-weight: bold; - font-size: 18px; - line-height: 18px; - } - - .img_16pt { - width: 20px; - height: 20px; - } -} - -.mb20 { - margin-bottom: 20px; -} - -.pd10 { - padding: 0 10px; -} - -.align_center { - display: flex; - align-items: center; -} - -// 开单数据 -.height40pt { - height: 60px; -} - -// 数据样式 -.data { - font-weight: bold; - color: #000; - font-family: DIN-Bold; - font-size: 20px; -} - -.border { - border: 1pt solid #f5f5f6; - border-radius: 5px; - box-sizing: border-box; -} - -.border-bottom { - border-bottom: 1pt solid #f5f5f6; - box-sizing: border-box; -} - -.border-left { - border-left: 1px solid #f5f5f6; - box-sizing: border-box; -} - -// 第一排 -.row_first { - & > div { - height: 100%; - } - - .box1 { - height: 100%; - width: 340px; - box-sizing: border-box; - flex: none; - } - - // 开单收入 - .box2 { - height: 100%; - - // 统计数据 - .totol { - width: 460px; - - .monthData { - height: 120px; - - & > div { - height: 80%; - flex-direction: column; - display: flex; - justify-content: space-around; - padding: 0 10px; - box-sizing: border-box; - } - } - } - - // 详情数据 - .detailsData { - .item { - background: #f2f7fb; - border-radius: 5px; - height: 85px; - box-sizing: border-box; - padding: 10px; - color: #a4b0c2; - display: flex; - justify-content: space-between; - flex-direction: column; - } - } - } -} - -// 第二排 -.row_second { - .dataIcon { - height: 14px; - width: 14px; - } - - .data_container { - height: 100px; - box-sizing: border-box; - padding: 20px 0; - } - - .item { - width: 137px; - height: 100%; - padding: 0 20px; - box-sizing: border-box; - flex: none; - } -} - -// 第三排 -.row_third { - @extend .row_second; - .abnormal_container { - height: 100px; - } - - .abnormal_item { - box-sizing: border-box; - padding: 20px; - width: 160px; - color: #7b8ba4; - - &.red { - background: #ffeeed; - - .data { - color: #ff5d52; - } - } - - &.blue { - background: #e9f4ff; - - .data { - color: #2693ff; - } - } - - &.green { - background: #e5f8f3; - - .data { - color: #00c090; - } - } - } - - .button { - padding: 0px 10px; - height: 18px; - line-height: 18px; - background: #fff; - border: 1px solid #f5f5f6; - border-radius: 2px; - color: #000; - font-size: 12px; - transition: all 0.3s; - cursor: pointer; - &.active { - color: #fff; - background: #2693ff; - border-color: #2693ff; - } - } -} - -// 第四排 -.row_fourthly { - @extend .row_third; - - .item { - width: 150px; - } -} - -.data_box { - padding: 16px; - min-width: 80px; - word-break: break-all; - background-color: #e5f8f3; - border-radius: 4px; - border-bottom: 5px solid #00c090; - - &.orange { - background: #fff4ec; - border-color: #ff9545; - } - - &.blue { - background-color: #f2f7fb; - border-color: #2693ff; - } - - &.red { - background: #ffeeed; - border-color: #ff5d52; - } - - &.purple { - background: #f0eff8; - border-color: #6b60c2; - } -} - -.mr5px { - margin-right: 5px; -} - -.text_center { - text-align: center; -} -</style> -<style lang="scss" scope> -@import '../../styles/flowStyle.scss'; - -#avue-view { - background-color: #fff; -} -</style>