diff --git a/src/api/distribution/arteryDistrilbutionBillLadingList.js b/src/api/distribution/arteryDistrilbutionBillLadingList.js index d5d6a502..13dc43dc 100644 --- a/src/api/distribution/arteryDistrilbutionBillLadingList.js +++ b/src/api/distribution/arteryDistrilbutionBillLadingList.js @@ -153,3 +153,14 @@ export const postFindWaybillBillladingList = data => { data, }); }; + +/** + * 查询提货日志 + */ +export const postFindBillladingLogList = data => { + return request({ + url: '/api/logpm-trunkline/billlading/findBillladingLogList', + method: 'post', + data, + }); +}; diff --git a/src/api/waybill/WaybillOrderList.js b/src/api/waybill/WaybillOrderList.js index 264d4985..c740037b 100644 --- a/src/api/waybill/WaybillOrderList.js +++ b/src/api/waybill/WaybillOrderList.js @@ -27,7 +27,7 @@ export const postSaveWaybillReturn = data => { }; /** - * 上传回单 + * 打印运单 */ export const postPrintBatch = params => { return request({ @@ -36,3 +36,36 @@ export const postPrintBatch = params => { params, }); }; + +/** + * 批量作废 + */ +export const postAbolishWaybill = data => { + return request({ + url: '/api/logpm-trunkline/openOrder/abolishWaybill', + method: 'post', + data, + }); +}; + +/** + * 批量冻结 + */ +export const postFreezeWaybill = data => { + return request({ + url: '/api/logpm-trunkline/openOrder/freezeWaybill', + method: 'post', + data, + }); +}; + +/** + * 批量恢复 + */ +export const postUnFreezeWaybill = data => { + return request({ + url: '/api/logpm-trunkline/openOrder/unFreezeWaybill', + method: 'post', + data, + }); +}; diff --git a/src/components/tablecmt/tablecmt.vue b/src/components/tablecmt/tablecmt.vue index 35dee326..b5ea54d2 100644 --- a/src/components/tablecmt/tablecmt.vue +++ b/src/components/tablecmt/tablecmt.vue @@ -54,7 +54,7 @@ clearable :placeholder="`请输入${column.label}`" @change="inputchange($event, column)" - @keyup.enter="handleInput($event, column)" + @keyup.enter="handleInput" /> @@ -87,7 +86,7 @@ v-if="column.type == 5" type="datetime" clearable - style="width: auto;" + style="width: auto" size="default" :placeholder="`请选择${column.label}`" format="YYYY/MM/DD HH:mm:ss" @@ -358,7 +357,7 @@ let props = defineProps({ default: false, }, initFn: { - type: Function as PropType, + type: (Boolean as PropType) || (Function as PropType), required: false, default: false, }, @@ -555,7 +554,6 @@ const handleSelectionChange = (param: TableDataType[]) => { } catch (error) { console.log('error :>> ', error); } finally { - console.log('123 :>> ', param); emit('selection', param); } }, 50); @@ -571,7 +569,6 @@ const handleUserSelcet = list => { for (const item of props.tableData) { if (item === iterator) _flag = true; - console.log('_flag :>> ', _flag); if (_flag) break; } } @@ -855,8 +852,7 @@ defineExpose({ handleCheckSelect, handleClearSelect }); .el-table__body tr.hover-row > td { background-color: #d3d8e1 !important; } -:deep(.el-date-editor.el-input, -.el-date-editor.el-input__wrapper) { +:deep(.el-date-editor.el-input, .el-date-editor.el-input__wrapper) { height: 23px; } .copys { diff --git a/src/option/waybill/WarehousingByTrainNumber.js b/src/option/waybill/WarehousingByTrainNumber.js index 835d06d6..340c1dbd 100644 --- a/src/option/waybill/WarehousingByTrainNumber.js +++ b/src/option/waybill/WarehousingByTrainNumber.js @@ -18,7 +18,7 @@ export const columnList = [ { prop: 'orderCode', label: '订单自编号', - type: 2, + type: 1, values: '', width: '150', checkarr: [], @@ -90,7 +90,7 @@ export const columnList = [ sortable: true, }, { - prop: 'legacyStatus', + prop: 'legacyStatusName', label: '是否遗留', type: 3, values: '', @@ -153,7 +153,7 @@ export const columnList = [ sortable: true, }, { - prop: 'matingType', + prop: 'matingTypeName', label: '是否齐套', type: 3, values: '', @@ -218,7 +218,7 @@ export const columnList = [ { prop: 'createTime', label: '创建时间', - type: 1, + type: 4, values: '', width: '130', checkarr: [], diff --git a/src/option/waybill/WaybillOrderList.js b/src/option/waybill/WaybillOrderList.js index 6066bfbb..e10fc3f8 100644 --- a/src/option/waybill/WaybillOrderList.js +++ b/src/option/waybill/WaybillOrderList.js @@ -635,6 +635,78 @@ export const columnList = [ isshowSummary: false, sortable: true, }, + { + prop: 'freezeStatusName', + label: '是否冻结', + type: 3, + values: '', + width: '150', + checkarr: [ + { label: '是', value: '1' }, + { label: '否', value: '0' }, + ], + fixed: false, + isshowSummary: false, + sortable: true, + }, + { + prop: 'freezeUserName', + label: '冻结人', + type: 3, + values: '', + width: '150', + checkarr: [], + fixed: false, + isshowSummary: false, + sortable: true, + }, + { + prop: 'freezeTime', + label: '冻结时间', + type: 3, + values: '', + width: '150', + checkarr: [], + fixed: false, + isshowSummary: false, + sortable: true, + }, + { + prop: 'abolishStatusName', + label: '是否作废', + type: 3, + values: '', + width: '150', + checkarr: [ + { label: '是', value: '1' }, + { label: '否', value: '0' }, + ], + fixed: false, + isshowSummary: false, + sortable: true, + }, + { + prop: 'abolishUserName', + label: '作废人', + type: 3, + values: '', + width: '150', + checkarr: [], + fixed: false, + isshowSummary: false, + sortable: true, + }, + { + prop: 'abolishTime', + label: '作废时间', + type: 3, + values: '', + width: '150', + checkarr: [], + fixed: false, + isshowSummary: false, + sortable: true, + }, /* { prop: 'carrierName', label: '审核状态', diff --git a/src/utils/util.js b/src/utils/util.js index 07b4a9f3..5f9eb052 100644 --- a/src/utils/util.js +++ b/src/utils/util.js @@ -3,6 +3,7 @@ import sha256 from 'crypto-js/sha256'; import Base64 from 'crypto-js/enc-base64'; import store from '@/store/index'; import { nextTick } from 'vue'; +import dayjs from 'dayjs'; //表单序列化 export const serialize = data => { let list = []; @@ -674,8 +675,7 @@ export function checkParams(data, targetParam) { } } -/** - * 去除表格表头搜索框的值 +/** 去除表格表头搜索框的值 * @param {Array} tableColumnList * @returns */ @@ -688,8 +688,7 @@ export function handleClearTableQuery(tableColumnList) { } } -/** - * 文本换行 +/** 文本换行 * @param {string} className 类名 * @param {number} num 多少字进行换行 * @returns @@ -716,8 +715,7 @@ export function hanleTextLineFeed(className, num) { } } -/** - * 转译数据中下拉框的值 +/** 转译数据中下拉框的值 * @param {Array} data * @param {Array} columnList * @param {Function} fn 执行的函数 @@ -727,7 +725,9 @@ export function handleTranslationDataSeclect(data, columnList, fn = (value, item return console.log('columnList 参数类型错误 >>>', columnList); if (getObjType(data) !== 'array') return console.log('data 参数类型错误 >>>', data); - const filterArr = columnList.filter(val => val.type === 3); + const filterArr = columnList.filter( + val => getObjType(val.checkarr) === 'array' && val.checkarr.length > 0 + ); for (let i = 0; i < data.length; i++) { const value = data[i]; @@ -749,3 +749,137 @@ export function handleTranslationDataSeclect(data, columnList, fn = (value, item } } } +/** 处理表格输入框查询条件 + * @param {*} value 输入的值 + * @param {object} col 每列的配置 + * @param {object} query 存储查询条件的对象 + * @param {Boolean} isRegExp 是否将输入的值转换为正则表达式 + * @returns + */ +export const handleInputQuery = (value, col, query, isRegExp = false) => { + if (getObjType(query) !== 'object') return; + if (getObjType(col) !== 'object') return; + if (!value && value !== 0) { + delete query[col.prop]; + return; + } + + const _value = isRegExp ? new RegExp('^' + value) : value; + query[col.prop] = _value; +}; + +/** 处理表格下拉框查询条件 + * @param {*} value 下拉框选择的值 + * @param {object} col 每列的配置 + * @param {object} query 存储查询条件的对象 + * @returns + */ +export const handleSelectQuery = (value, col, query) => { + if (getObjType(query) !== 'object') return; + if (getObjType(col) !== 'object') return; + + const _key = col.prop.replace('Name', ''); + + if (!value && value !== 0) { + delete query[_key]; + return; + } + + query[_key] = value; +}; + +/** 处理表格下拉框查询条件 + * @param {*} value 下拉框选择的值 + * @param {object} col 每列的配置 + * @param {object} query 存储查询条件的对象 + * @returns + */ +export const handleTimeQuery = (value, col, query) => { + if (getObjType(query) !== 'object') return; + if (getObjType(col) !== 'object') return; + + if (!value && value !== 0) { + delete query[col.prop]; + return; + } + + query[col.prop] = dayjs(value).format('YYYY-MM-DD'); +}; + +/** 前端筛选数据 + * @param {Array} data 所有数据 + * @param {any} renderData 渲染数据 + * @param {Object} option inputQuery -- 输入框查询条件, selectQuery -- 下拉框查询条件, timeQuery -- 时间查询条件 + * @returns + */ +export const handleFilterData = (data, renderData, { inputQuery, selectQuery, timeQuery }) => { + const newData = []; + + let isReturn = true; + + if (getObjType(inputQuery) === 'object' && Object.keys(inputQuery).length > 0) isReturn = false; + + if (isReturn && getObjType(selectQuery) === 'object' && Object.keys(selectQuery).length > 0) + isReturn = false; + + if (isReturn && getObjType(timeQuery) === 'object' && Object.keys(timeQuery).length > 0) + isReturn = false; + + if (isReturn) return (renderData.value = data); + + for (let i = 0; i < data.length; i++) { + const element = data[i]; + + let _flag = true; + + // 筛选输入框 + for (const key in inputQuery) { + if (!_flag) break; + if (!inputQuery[key].test(element[key])) { + _flag = false; + break; + } + } + + // 筛选下拉框 + for (const key in selectQuery) { + if (!_flag) break; + if (element[key] + '' !== selectQuery[key] + '') { + _flag = false; + break; + } + } + + // 筛选时间 + for (const key in timeQuery) { + if (!_flag) break; + + const value = timeQuery[key]; + if (!value) continue; + + const type = getObjType(value); + + let _startTime = 0; + let _endTime = 0; + + if (type === 'string') { + _startTime = Date.parse(value); + _endTime = Date.parse(value) + 1000 * 60 * 60 * 24 - 1; + } else if (type === 'array') { + _startTime = Date.parse(value[0]); + _endTime = Date.parse(value[1]) + 1000 * 60 * 60 * 24 - 1; + } else continue; + + const _time = Date.parse(element[key.replace('Arr', '')]); + + if (_time !== _time) _flag = false; + else if (_time < _startTime || _time > _endTime) _flag = false; + + if (!_flag) break; + } + + if (_flag) newData.push(element); + } + + renderData.value = newData; +}; diff --git a/src/views/distribution/artery/AddVehicleStowage.vue b/src/views/distribution/artery/AddVehicleStowage.vue index b8d5ad8d..1b7ff261 100644 --- a/src/views/distribution/artery/AddVehicleStowage.vue +++ b/src/views/distribution/artery/AddVehicleStowage.vue @@ -1035,7 +1035,7 @@ const onLoad = async () => { console.log('this :>> ', this); // 动态设置正则 - const reg = new RegExp(value, 'i'); + const reg = new RegExp('^' + value); this.query[prop] = reg; @@ -1379,7 +1379,7 @@ const handleAddNode = async (index: number) => { console.log('this :>> ', this); // 动态设置正则 - const reg = new RegExp(value, 'i'); + const reg = new RegExp('^' + value); this.query[prop] = reg; diff --git a/src/views/distribution/artery/VehicleArrivalManagement.vue b/src/views/distribution/artery/VehicleArrivalManagement.vue index 63314df3..53cb37e6 100644 --- a/src/views/distribution/artery/VehicleArrivalManagement.vue +++ b/src/views/distribution/artery/VehicleArrivalManagement.vue @@ -1214,7 +1214,7 @@ const handleSubmit = async () => { /** 输入筛选 */ const packageInputsc = (value, row) => { // 动态设置正则 - const reg = new RegExp(value, 'i'); + const reg = new RegExp('^' + value); details.packageQuery[row.prop] = reg; diff --git a/src/views/distribution/artery/VehicleStowage.vue b/src/views/distribution/artery/VehicleStowage.vue index e409211c..636c4ad1 100644 --- a/src/views/distribution/artery/VehicleStowage.vue +++ b/src/views/distribution/artery/VehicleStowage.vue @@ -1128,7 +1128,7 @@ const handleSubmit = async () => { /** 输入筛选 */ const packageInputsc = (value, row) => { // 动态设置正则 - const reg = new RegExp(value, 'i'); + const reg = new RegExp('^' + value); details.packageQuery[row.prop] = reg; diff --git a/src/views/distribution/artery/VehicleStowageDetails.vue b/src/views/distribution/artery/VehicleStowageDetails.vue index 84592671..91a9c761 100644 --- a/src/views/distribution/artery/VehicleStowageDetails.vue +++ b/src/views/distribution/artery/VehicleStowageDetails.vue @@ -233,12 +233,12 @@ {{ item.updateTime }}
- + 操作网点: {{ item.nodeName }}
- + 操作人: {{ item.createUserName }}
@@ -884,7 +884,7 @@ const inputsc = async (value, row) => { try { // 动态设置正则 - const reg = new RegExp(value, 'i'); + const reg = new RegExp('^' + value); details.query[row.prop] = reg; diff --git a/src/views/distribution/artery/handleLoadingDestination.vue b/src/views/distribution/artery/handleLoadingDestination.vue index 520daf34..668e64a1 100644 --- a/src/views/distribution/artery/handleLoadingDestination.vue +++ b/src/views/distribution/artery/handleLoadingDestination.vue @@ -219,7 +219,7 @@ const searchHide = () => { /** 表格表头输入框搜索 */ const inputsc = (value, row) => { // 动态设置正则 - const reg = new RegExp(value, 'i'); + const reg = new RegExp('^' + value); details.query[row.prop] = reg; diff --git a/src/views/distribution/artery/zeroAdditionalRecording.vue b/src/views/distribution/artery/zeroAdditionalRecording.vue index a7bab771..6baf5a8d 100644 --- a/src/views/distribution/artery/zeroAdditionalRecording.vue +++ b/src/views/distribution/artery/zeroAdditionalRecording.vue @@ -537,7 +537,7 @@ const handleFilterData = () => { /** 表格表头输入框搜索 */ const newInputsc = (value, { prop }) => { // 动态设置正则 - const reg = new RegExp(value, 'i'); + const reg = new RegExp('^' + value); details.newQuery[prop] = reg; diff --git a/src/views/distribution/inventory/BookingNote.vue b/src/views/distribution/inventory/BookingNote.vue index ffd5ea56..b17ce96e 100644 --- a/src/views/distribution/inventory/BookingNote.vue +++ b/src/views/distribution/inventory/BookingNote.vue @@ -1438,7 +1438,7 @@ const onLoad = async () => { details.pageInfo = { ...$route.query }; - const res = await postFindWaybillDetail({ waybillId: details.pageInfo.id }); + const res = await postFindWaybillDetail({ waybillId: details.pageInfo.id, isEdit: 0 }); const { code, data } = res.data; if (code !== 200) return; diff --git a/src/views/distribution/inventory/CreateOrder.vue b/src/views/distribution/inventory/CreateOrder.vue index 847a74cb..56b713f4 100644 --- a/src/views/distribution/inventory/CreateOrder.vue +++ b/src/views/distribution/inventory/CreateOrder.vue @@ -2046,14 +2046,17 @@ const initPageInfo = async (idsArr = []) => { }); details.pageInfo = { ...$route.query }; + // 新增 if (details.pageInfo.type !== 'edit') await onLoad(idsArr); + // 改单 else { - const res = await postFindWaybillDetail({ waybillId: details.pageInfo.id }); + const res = await postFindWaybillDetail({ waybillId: details.pageInfo.id, isEdit: 1 }); const { code, data } = res.data; if (code !== 200) return; details.query = { ...data, ...data.warehouseWaybill }; delete details.query.warehouseWaybill; + details.query.trainNumber = details.query.customerTrain; // 是否提货 details.query.isPickUp = diff --git a/src/views/distribution/inventory/CreateOrder2.vue b/src/views/distribution/inventory/CreateOrder2.vue deleted file mode 100644 index 14cf3724..00000000 --- a/src/views/distribution/inventory/CreateOrder2.vue +++ /dev/null @@ -1,3011 +0,0 @@ - - - - - - - diff --git a/src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue b/src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue index 9c5368cf..26326ab8 100644 --- a/src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue +++ b/src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue @@ -771,7 +771,7 @@ const newInputsc = (value, row) => { // newRenderData try { // 动态设置正则 - const reg = new RegExp(value, 'i'); + const reg = new RegExp('^' + value); details.addInfo.newQuery[row.prop] = reg; diff --git a/src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue b/src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue index bcedc3da..ce1b9ce4 100644 --- a/src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue +++ b/src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue @@ -1,7 +1,7 @@