Browse Source

修复部分干线bug

dev-xx
qb 11 months ago
parent
commit
3b1ae6fb54
  1. 11
      src/api/distribution/arteryDistrilbutionBillLadingList.js
  2. 35
      src/api/waybill/WaybillOrderList.js
  3. 14
      src/components/tablecmt/tablecmt.vue
  4. 8
      src/option/waybill/WarehousingByTrainNumber.js
  5. 72
      src/option/waybill/WaybillOrderList.js
  6. 148
      src/utils/util.js
  7. 4
      src/views/distribution/artery/AddVehicleStowage.vue
  8. 2
      src/views/distribution/artery/VehicleArrivalManagement.vue
  9. 2
      src/views/distribution/artery/VehicleStowage.vue
  10. 6
      src/views/distribution/artery/VehicleStowageDetails.vue
  11. 2
      src/views/distribution/artery/handleLoadingDestination.vue
  12. 2
      src/views/distribution/artery/zeroAdditionalRecording.vue
  13. 2
      src/views/distribution/inventory/BookingNote.vue
  14. 5
      src/views/distribution/inventory/CreateOrder.vue
  15. 3011
      src/views/distribution/inventory/CreateOrder2.vue
  16. 2
      src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue
  17. 87
      src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue
  18. 4
      src/views/distribution/reservation/reservationAddFrom copy.vue
  19. 257
      src/views/distribution/reservation/reservationAddFrom.vue
  20. 26
      src/views/distribution/signfor/distributionSignforedt.vue
  21. 7
      src/views/waybill/CreateZeroOrder.vue
  22. 25
      src/views/waybill/TemporaryStorageList.vue
  23. 131
      src/views/waybill/WarehousingByTrainNumber.vue
  24. 134
      src/views/waybill/WaybillOrderList.vue
  25. 2
      src/views/waybill/orderDetails.vue
  26. 35
      src/views/waybill/orderPackageList.vue
  27. 2
      src/views/waybill/orderPackageListDetails.vue

11
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,
});
};

35
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,
});
};

14
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"
/>
<el-select
v-if="column.type == 3 || column.type == 14"
@ -75,10 +75,9 @@
<el-date-picker
v-model="column.values"
v-if="column.type == 4"
type="date"
clearable
style="width: auto;height:23px !important"
style="width: auto; height: 23px !important"
:placeholder="`请选择${column.label}`"
@change="timechange($event, column)"
/>
@ -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<Function>,
type: (Boolean as PropType<boolean>) || (Function as PropType<Function>),
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 {

8
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: [],

72
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: '审核状态',

148
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;
};

4
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;

2
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;

2
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;

6
src/views/distribution/artery/VehicleStowageDetails.vue

@ -233,12 +233,12 @@
<span>{{ item.updateTime }}</span>
</div>
<div class="flex-c-c mr10">
<el-icon color="#172e60" size="20px"><Location /></el-icon>
<el-icon class="mr10" color="#172e60" size="20px"><Location /></el-icon>
<span>操作网点</span>
<span>{{ item.nodeName }}</span>
</div>
<div class="flex-c-c mr10">
<el-icon color="#172e60" size="20px"><User /></el-icon>
<el-icon class="mr10" color="#172e60" size="20px"><User /></el-icon>
<span>操作人</span>
<span>{{ item.createUserName }}</span>
</div>
@ -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;

2
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;

2
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;

2
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;

5
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 =

3011
src/views/distribution/inventory/CreateOrder2.vue

File diff suppressed because it is too large Load Diff

2
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;

87
src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue

@ -1,7 +1,7 @@
<template>
<basic-container v-loading="loadingObj.pageLoading">
<div class="avue-crud">
<el-tabs v-model="activeTab">
<el-tabs v-model="activeTab" @tab-click="handleCheckTab">
<el-tab-pane label="详 情 信 息" name="tab1">
<el-divider>提货基本信息</el-divider>
<el-row :gutter="24" class="rows">
@ -141,15 +141,33 @@
<el-tab-pane label="操 作 日 志" name="tab2">
<div style="min-height: 300px">
<el-steps direction="vertical" space="80px">
<el-step title="32131">
<template #description> {{ new Date() }} </template>
<template #icon>
<el-icon color="#172e60" size="20px"><HelpFilled /></el-icon>
<el-steps direction="vertical" space="120px" :active="loadLogsList.length">
<el-step :title="item.abstText" v-for="item in loadLogsList" :key="item">
<template #description>
<div class="fz-0-9">
<el-row>
<div class="flex-c-c mr10">
<el-icon color="#172e60" class="mr10" size="20px"><Clock /></el-icon>
<span>操作时间</span>
<span>{{ item.createTime }}</span>
</div>
<!-- <div class="flex-c-c mr10">
<el-icon color="#172e60" size="20px"><Location /></el-icon>
<span>操作网点</span>
<span>{{ item.nodeName }}</span>
</div> -->
<div class="flex-c-c mr10">
<el-icon class="mr10" color="#172e60" size="20px"><User /></el-icon>
<span>操作人</span>
<span>{{ item.createUserName }}</span>
</div>
</el-row>
<div class="word-break-break-all mt10">
{{ item.content }}
</div>
</div>
</template>
</el-step>
<el-step title="32131">
<template #description> {{ new Date() }} </template>
<template #icon>
<el-icon color="#172e60" size="20px"><HelpFilled /></el-icon>
</template>
@ -259,6 +277,7 @@ import {
postBillladingDetail,
postFindChargeTypeList,
postUpdateBillladingWaybillNum,
postFindBillladingLogList,
} from '@/api/distribution/arteryDistrilbutionBillLadingList';
import { ElMessage } from 'element-plus';
import { getToken } from '@/utils/auth';
@ -534,6 +553,8 @@ export default {
/** 查询所有计费模式 */
chargeTypeList: [],
options: [],
/** 提货日志 */
loadLogsList: [],
};
},
watch: {
@ -614,7 +635,7 @@ export default {
inputsc(value, row) {
try {
//
const reg = new RegExp(value, 'i');
const reg = new RegExp('^' + value);
this.query[row.prop] = reg;
@ -803,6 +824,36 @@ export default {
this.loadingObj.pageLoading = false;
}
},
/** 请求日志跟踪 */
async handleSignLoadScanLogs() {
try {
this.loadingObj.pageLoading = true;
const submitData = { billladingId: this.$route.query.id };
const res = await postFindBillladingLogList(submitData);
const { code, data } = res.data;
if (code !== 200) return;
this.loadLogsList = data;
} catch (error) {
console.log('error :>> ', error);
} finally {
this.loadingObj.pageLoading = false;
}
},
handleCheckTab(e) {
console.log('e :>> ', e);
switch (e.props.name) {
//
case 'tab2':
this.handleSignLoadScanLogs();
break;
default:
break;
}
},
},
};
</script>
@ -856,4 +907,20 @@ export default {
margin-top: 20px;
text-align: center;
}
// tab
:deep(.el-tabs__item.is-active) {
color: var(--el-color-primary);
font-weight: bold;
}
:deep(.el-tabs__item:hover) {
color: var(--el-color-primary);
font-weight: bold;
}
:deep(.el-tabs__item) {
color: #959a9e;
transition: all 0.3s;
}
</style>

4
src/views/distribution/reservation/reservationAddFrom copy.vue

@ -2450,7 +2450,7 @@ export default {
//
if (type === 1) {
//
const reg = new RegExp(value, 'i');
const reg = new RegExp('^' + value);
this.orderQuery[row.prop] = reg;
@ -2477,7 +2477,7 @@ export default {
//
if (type === 1) {
//
const reg = new RegExp(value, 'i');
const reg = new RegExp('^' + value);
this.stockQuery[row.prop] = reg;

257
src/views/distribution/reservation/reservationAddFrom.vue

@ -125,7 +125,7 @@
</el-form>
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
<el-tab-pane name='orderTab' label="订单">
<el-tab-pane name="orderTab" label="订单">
<el-button class="el-btn-xz" type="primary" link @click="handleAddOrder"> </el-button>
<tablecmt
class="tablesc"
@ -174,7 +174,7 @@
</tablecmt>
</el-tab-pane>
<el-tab-pane name='InventoryTab' label="库存品">
<el-tab-pane name="InventoryTab" label="库存品">
<el-button class="el-btn-xz" link @click="handleAddInventory"> </el-button>
<tablecmt
class="tablesc"
@ -513,13 +513,13 @@ import { getDictionaryBiz } from '@/api/system/dict';
import dayjs from 'dayjs';
import { entryNum, updateEntryNum } from '@/api/distribution/distributionParcelNumber';
import { setNodeHeight, removeZeroWidth } from '@/utils/util.js';
import { ElMessage, ElMessageBox } from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus';
import error from '@/error';
export default {
name: '/distribution/reservation/reservationAddFrom',
data() {
return {
activeName:'orderTab',
activeName: 'orderTab',
Inventoryloading: true, //
packageQuery: {},
reservationloading: false,
@ -2022,7 +2022,7 @@ export default {
},
mounted() {
this.init();
this.Copyfrom= JSON.parse(JSON.stringify(this.form))
this.Copyfrom = JSON.parse(JSON.stringify(this.form));
this.onLoad(this.page);
this.getDictionary();
@ -2542,8 +2542,8 @@ export default {
this.$store.commit('DEL_TAG_CURRENT');
},
//
async onSubmit(formEl) {
this.$refs.ruleForm.validate(async valid => {
async onSubmit(formEl) {
this.$refs.ruleForm.validate(async valid => {
if (valid) {
console.log('submit!');
try {
@ -2645,72 +2645,76 @@ this.$refs.ruleForm.validate(async valid => {
// this.form.stockArticleList = this.packageList;
console.log('>>>>>>>>', this.form);
if (this.reservationId) {
//
const checkInfoValues = this.form.stockArticleList.every(item => !item.packageListInfo || !item.packageListInfo.length);
if(checkInfoValues){
ElMessageBox.prompt('当前所有订单都没有选择包件是否确认"取消本次计划"?', '请填写取消原因', {
confirmButtonText: '确认',
cancelButtonText: '关闭',
inputPattern: /^\S+$/,
inputErrorMessage: '请填写取消原因',
})
.then((value) => {
let data={
cancelReason:value.value,
id:this.$route.query.reservationId
}
this.reservationloading=true
cancelReservation(data).then(res=>{
console.log(res);
if(res.data.code ==200){
ElMessage({
message: res.data.msg,
type: 'success',
})
this.$router.push('/distribution/reservation/reservation');
this.$store.commit('DEL_TAG_CURRENT');
}
}).catch((error)=>{
this.reservationloading=false
console.log(error);
})
console.log(data,'要提交的数据');
})
.catch(() => {
})
}else{
for(let i=0;i< this.form.stockArticleList.length;i++){
if(!this.form.stockArticleList[i].packageListInfo || !this.form.stockArticleList[i].packageListInfo.length ){
ElMessageBox.confirm(
`订单自编号:${this.form.stockArticleList[i].orderCode}没有选择包件是否移除!`,
'提示',
{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
this.renderOrderData.splice(i, 1);
this.form.stockArticleList.splice(i,1)
})
.catch(() => {
})
return
}
}
//
const checkInfoValues = this.form.stockArticleList.every(
item => !item.packageListInfo || !item.packageListInfo.length
);
if (checkInfoValues) {
ElMessageBox.prompt(
'当前所有订单都没有选择包件是否确认"取消本次计划"?',
'请填写取消原因',
{
confirmButtonText: '确认',
cancelButtonText: '关闭',
inputPattern: /^\S+$/,
inputErrorMessage: '请填写取消原因',
}
)
.then(value => {
let data = {
cancelReason: value.value,
id: this.$route.query.reservationId,
};
this.reservationloading = true;
cancelReservation(data)
.then(res => {
console.log(res);
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
type: 'success',
});
this.$router.push('/distribution/reservation/reservation');
this.$store.commit('DEL_TAG_CURRENT');
}
})
.catch(error => {
this.reservationloading = false;
console.log(error);
});
console.log(data, '要提交的数据');
})
.catch(() => {});
} else {
for (let i = 0; i < this.form.stockArticleList.length; i++) {
if (
!this.form.stockArticleList[i].packageListInfo ||
!this.form.stockArticleList[i].packageListInfo.length
) {
ElMessageBox.confirm(
`订单自编号:${this.form.stockArticleList[i].orderCode}没有选择包件是否移除!`,
'提示',
{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
this.renderOrderData.splice(i, 1);
this.form.stockArticleList.splice(i, 1);
})
.catch(() => {});
return;
}
}
}
// loading
this.loadingObj.submitBtnLoading = true;
this.reservationloading = true; //
this.form.id = this.reservationId;
}
// loading
this.loadingObj.submitBtnLoading = true;
this.reservationloading = true; //
this.form.id = this.reservationId;
const res = await update(this.form);
const res = await update(this.form);
console.log('res :>> ', res);
if (res.data.code !== 200) return;
this.$message({
@ -2718,49 +2722,44 @@ ElMessageBox.prompt('当前所有订单都没有选择包件是否确认"取消
message: '操作成功!',
});
this.back();
} else {
// loading
this.loadingObj.submitBtnLoading = true;
this.reservationloading = true; //
this.form.reservationStatus = '20';
} else {
// loading
this.loadingObj.submitBtnLoading = true;
this.reservationloading = true; //
this.form.reservationStatus = '20';
const res = await autonomouslySave(this.form);
console.log('res :>> ', res);
if (res.data.code !== 200) return;
ElMessageBox.confirm(
'当前预约已完成,是否继续添加预约?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
this.form=this.Copyfrom
this.Copyfrom= JSON.parse(JSON.stringify(this.form))
this.$refs.ruleForm.resetFields(); //
this.renderOrderData=[]//
this.serveType=[];//
this.renderInventoryData=[]//
this.orderList=[]
this.orderData = []
this.packageListInfo=[]
this.stockArticleInfo=[]
this.inventoryDat= []
this.inventoryData=[]
this.inventoryList=[]
delete this.query.marketName
this.marketName=''
this.activeName='orderTab',
console.log(this.orderList,'');
})
.catch(() => {
this.$message({
type: 'success',
message: '操作成功!',
});
this.back();
})
ElMessageBox.confirm('当前预约已完成,是否继续添加预约?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.form = this.Copyfrom;
this.Copyfrom = JSON.parse(JSON.stringify(this.form));
this.$refs.ruleForm.resetFields(); //
this.renderOrderData = []; //
this.serveType = []; //
this.renderInventoryData = []; //
this.orderList = [];
this.orderData = [];
this.packageListInfo = [];
this.stockArticleInfo = [];
this.inventoryDat = [];
this.inventoryData = [];
this.inventoryList = [];
delete this.query.marketName;
this.marketName = '';
(this.activeName = 'orderTab'), console.log(this.orderList, '');
})
.catch(() => {
this.$message({
type: 'success',
message: '操作成功!',
});
this.back();
});
// this.$message({
// type: 'success',
@ -2926,7 +2925,7 @@ console.log(this.orderList,'');
//
if (type === 1) {
//
const reg = new RegExp(value, 'i');
const reg = new RegExp('^' + value);
this.orderQuery[row.prop] = reg;
@ -2953,7 +2952,7 @@ console.log(this.orderList,'');
//
if (type === 1) {
//
const reg = new RegExp(value, 'i');
const reg = new RegExp('^' + value);
this.stockQuery[row.prop] = reg;
@ -3384,7 +3383,7 @@ console.log(this.orderList,'');
if (code !== 200) return;
console.log('this.orderList',this.orderList)
console.log('this.orderList', this.orderList);
const _chooseArr = [...this.orderList];
this.stockArticleInfo = records;
@ -3441,13 +3440,12 @@ console.log(this.orderList,'');
this.form.isUrgent = '1';
// this.form.reservationDate = new Date();
if (this.orderIds) {
this.reservationloading=true
if(res.data.code !==200){
this.reservationloading=false
return
}
this.reservationloading = true;
if (res.data.code !== 200) {
this.reservationloading = false;
return;
}
getStockArticleList(this.orderIds).then(res => {
console.log(res.data.data);
const data = res.data.data;
@ -3471,17 +3469,16 @@ console.log(this.orderList,'');
this.form.deliveryAddress = address;
this.orderData = data;
this.renderOrderData = [...this.orderData];
this.reservationloading=false
})
this.reservationloading = false;
});
}
if (this.reservationId) {
this.reservationloading=true
this.reservationloading = true;
this.inventoryShow = true;
getReservationInfo(this.reservationId).then(res => {
if(res.data.code !==200){
this.reservationloading=false
return
if (res.data.code !== 200) {
this.reservationloading = false;
return;
}
const reservation = res.data.data;
const stockArticleListInfo = res.data.data.stockArticleList;
@ -3508,8 +3505,8 @@ console.log(this.orderList,'');
});
}
this.form = reservation;
this.reservationloading=false
})
this.reservationloading = false;
});
} else {
this.form.deliveryType = '2';
}

26
src/views/distribution/signfor/distributionSignforedt.vue

@ -792,8 +792,6 @@ const TabTitle = ref([
]);
//
const menuData1 = ref([
{
prop: 'waybillNumber',
label: '运单号',
@ -965,7 +963,6 @@ const menuData1 = ref([
sortable: true,
head: false,
},
{
prop: 'consigneeMobile',
@ -1012,7 +1009,6 @@ const menuData1 = ref([
head: false,
},
{
prop: 'descriptionGoods',
label: '货物名称',
type: 2,
@ -1035,9 +1031,6 @@ const menuData1 = ref([
isshowSummary: true,
head: false,
},
]);
//
//
@ -1236,7 +1229,7 @@ const menuData2 = ref([
sortable: true,
head: false,
},
// {
// {
// prop: 'orderPackageGroundingStatusName',
// label: '',
// type: 1,
@ -1350,11 +1343,6 @@ const menuData2 = ref([
// head: false,
// },
{
prop: 'scanStatus',
label: '装车方式',
@ -2188,12 +2176,12 @@ const tabClick = val => {
//
const Signforexport = () => {
if(SignforMenu.value.label == '库存品列表'){
if (SignforMenu.value.label == '库存品列表') {
ElMessage({
message: '库存品导出维护中',
type: 'warning',
})
return
message: '库存品导出维护中',
type: 'warning',
});
return;
}
console.log(SignforMenu.value);
ElMessageBox.confirm(`是否导出${SignforMenu.value.label}`, '提示', {
@ -2404,7 +2392,7 @@ const inputsc = (value, row, type) => {
const _item = Tabs.value.find(val => val.type === type);
//
const reg = new RegExp(value, 'i');
const reg = new RegExp('^' + value);
_item.query[row.prop] = reg;

7
src/views/waybill/CreateZeroOrder.vue

@ -1666,13 +1666,18 @@ const initPageInfo = async () => {
});
console.log('$route :>> ', $route);
//
if ($route.query.type !== 'edit') await onLoad();
//
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 };
details.query.trainNumber = details.query.customerTrain;
details.info = data;
details.query.openOrderUserName = data.warehouseWaybill.agent;
delete details.query.warehouseWaybill;

25
src/views/waybill/TemporaryStorageList.vue

@ -362,12 +362,9 @@
<P>请确认传入的文件为Excel文件格式</P>
<a
href="http://47.108.51.143:9000/bladex/upload/20240118/65c977fe6ac575ebb17803400a7abbc7.xlsx"
style="text-decoration: none"
>
<el-button type="primary" icon="Download"> 模版下载 </el-button>
</a>
<el-button type="primary" icon="Download" @click="handleDownLoadFile">
{{ details.ouPaiChooseType === 1 ? '包条码导入模板' : '无包条码导入模板' }}
</el-button>
<div v-loading="details.loadingObj.UploadLoadong" class="mt10">
<el-upload
@ -479,7 +476,7 @@ import {
} from '@/api/waybill/TemporaryStorageList';
import { getLazyTreeAll } from '@/api/base/region';
import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle';
import { downloadXls, setNodeHeight, getHtmls, deepClone } from '@/utils/util';
import { downloadXls, setNodeHeight, deepClone, downloadFileBase64 } from '@/utils/util';
import { columnList } from '@/option/waybill/TemporaryStorageList';
import { useRouter } from 'vue-router';
import print from '@/utils/print';
@ -1309,6 +1306,20 @@ const handleOpenAddTagDlog = () => {
ruleFormRef.value.resetFields();
};
/** 下载导入模板 */
const handleDownLoadFile = () => {
const url =
details.ouPaiChooseType === 1
? 'http://47.108.51.143:9000/bladex/upload/20240118/65c977fe6ac575ebb17803400a7abbc7.xlsx'
: 'http://47.108.51.143:9000/bladex/upload/20240508/%E6%97%A0%E5%8C%85%E6%9D%A1%E7%A0%81%E5%AF%BC%E5%85%A5%E6%A8%A1%E7%89%88%28%E8%B4%A7%E6%97%A0%E5%BF%A7%29.xlsx?Content-Disposition=attachment%3B%20filename%3D%22upload%2F20240508%2F%E6%97%A0%E5%8C%85%E6%9D%A1%E7%A0%81%E5%AF%BC%E5%85%A5%E6%A8%A1%E7%89%88%28%E8%B4%A7%E6%97%A0%E5%BF%A7%29.xlsx%22&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio%2F20240508%2F%2Fs3%2Faws4_request&X-Amz-Date=20240508T024854Z&X-Amz-Expires=432000&X-Amz-SignedHeaders=host&X-Amz-Signature=cebd92541903249d5c5fdf1a2dfa03bdb5d56beba7b73c97ac419c209cd1f2fa';
const name =
details.ouPaiChooseType === 1
? '包条导入模版(货无忧-生成包条).xlsx'
: '无包条导入模版(货无忧-生成包条).xlsx';
downloadFileBase64(url, name);
};
onActivated(() => {
console.log('activated');
console.log('this.$store :>> ', $store);

131
src/views/waybill/WarehousingByTrainNumber.vue

@ -46,33 +46,29 @@
</el-row>
<!-- 表格 -->
<el-row>
<!-- 列表模块 -->
<tablecmt
ref="tableNodeRef"
:columnList="details.columnList"
:tableData="details.data"
:loading="loadingObj.list"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
:isselectfun="handleIsSelect"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<el-text
v-if="Number(slotProps.scope.row.isIncoming) === 1"
@click="handlePutInStorage(slotProps.scope)"
>
入库
</el-text>
<el-text @click="handleGoDetails(slotProps.scope)">包明细</el-text>
</template>
<tablecmt
ref="tableNodeRef"
:columnList="details.columnList"
:tableData="renderData"
:loading="loadingObj.list"
@inputTxt="inputsc"
@timeCheck="timesc"
@selectCheck="selectsc"
@selection="selectionChange"
:isselectfun="handleIsSelect"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<el-text
v-if="Number(slotProps.scope.row.isIncoming) === 1"
@click="handlePutInStorage(slotProps.scope)"
>
入库
</el-text>
<el-text @click="handleGoDetails(slotProps.scope)">包明细</el-text>
</template>
</tablecmt>
</el-row>
</template>
</tablecmt>
<!-- 分页模块 -->
<el-row class="el-fy">
@ -93,9 +89,9 @@
</template>
<script setup lang="ts">
import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue';
import { ref, reactive, toRefs, computed, shallowRef, onMounted, nextTick } from 'vue';
import functions from '@/utils/functions.js';
import dayjs from 'dayjs';
import { mapGetters } from 'vuex';
/** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict';
@ -103,12 +99,18 @@ import {
postFindIncomingOrderList,
postIncomingBatchOrder,
} from '@/api/distribution/WarehousingByTrainNumber';
import { downloadXls, setNodeHeight, getHtmls, deepClone } from '@/utils/util';
import {
setNodeHeight,
deepClone,
handleTranslationDataSeclect,
handleFilterData,
handleInputQuery,
handleSelectQuery,
handleTimeQuery,
} from '@/utils/util';
import { columnList } from '@/option/waybill/WarehousingByTrainNumber';
import { useRouter } from 'vue-router';
import print from '@/utils/print';
import { ElMessage, ElMessageBox } from 'element-plus';
import { submit } from '@/api/base/region';
//
const $router = useRouter();
@ -121,8 +123,13 @@ const details = reactive<any>({
searchType: 'orderCode',
/** 是否开启搜索 */
search: false,
/** 表格搜索条件 */
query: {},
/** 表格搜索条件 -- 输入框 */
inputQuery: {},
/** 表格搜索条件 -- 下拉框 */
selectQuery: {},
/** 表格搜索条件 -- 时间选择 */
timeQuery: {},
/** 时间快捷选择设置 */
shortcuts: [
{
@ -189,6 +196,8 @@ const details = reactive<any>({
listNode: '',
form: {},
});
/** 渲染数据 */
const renderData = shallowRef([]);
const { search, query, loadingObj, selectionList, drawerShow } = toRefs(details);
@ -215,6 +224,15 @@ const onLoad = async (params = {}) => {
const { code, data } = res.data;
if (code !== 200) return;
details.data = data;
handleTranslationDataSeclect(details.data, details.columnList);
handleFilterData(details.data, renderData, {
inputQuery: details.inputQuery,
selectQuery: details.selectQuery,
timeQuery: details.timeQuery,
});
console.log('details.renderData :>> ', details.renderData);
} catch (error) {
console.log('error :>> ', error);
} finally {
@ -229,6 +247,9 @@ const searchChange = () => {
for (let i = 0; i < details.columnList.length; i++) {
details.columnList[i].values = '';
}
details.timeQuery = {};
details.inputQuery = {};
details.selectQuery = {};
onLoad();
};
@ -255,36 +276,36 @@ const searchHide = () => {
};
/** 表格表头输入框搜索 */
const inputsc = (index, row) => {
details.query[row.prop] = index;
if (!index && index !== 0) delete details.query[row.prop];
onLoad();
const inputsc = (index, col) => {
handleInputQuery(index, col, details.inputQuery, true);
handleFilterData(details.data, renderData, {
inputQuery: details.inputQuery,
selectQuery: details.selectQuery,
timeQuery: details.timeQuery,
});
};
/** 表格表头时间选择 */
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 timesc = (index, col) => {
handleTimeQuery(index, col, details.timeQuery);
/** 表格表头输入框搜索 */
const btnsc = () => {};
handleFilterData(details.data, renderData, {
inputQuery: details.inputQuery,
selectQuery: details.selectQuery,
timeQuery: details.timeQuery,
});
};
/** 表格表头下拉框选择 */
const selectsc = (index, row) => {
const _prop = row.prop.replace('Name', '');
details.query[_prop] = index;
if (!index) delete details.query[_prop];
const selectsc = (index, col) => {
handleSelectQuery(index, col, details.selectQuery);
onLoad();
handleFilterData(details.data, renderData, {
inputQuery: details.inputQuery,
selectQuery: details.selectQuery,
timeQuery: details.timeQuery,
});
};
/** 表格表头复选框选择 */

134
src/views/waybill/WaybillOrderList.vue

@ -80,6 +80,13 @@
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
:isselectfun="row => row.abolishStatus + '' !== '1'"
:tableRowClassName="
(row, index) => {
if (row.abolishStatus + '' === '1') return 'abolish';
else return '';
}
"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '运单号'">
@ -88,7 +95,15 @@
</el-text>
</template>
<template v-else-if="slotProps.scope.column.label === '操作'">
<template
v-else-if="
slotProps.scope.column.label === '操作' &&
//
slotProps.scope.row.abolishStatus + '' !== '1' &&
//
slotProps.scope.row.freezeStatus + '' !== '1'
"
>
<el-text @click="handleUploadReceipt(slotProps.scope)"> 上传回单 </el-text>
<el-text @click="handleViewOrderDetails(slotProps.scope)"> 查看订单 </el-text>
</template>
@ -257,8 +272,10 @@ import {
postWarehouseWaybillPageWaybillList,
postSaveWaybillReturn,
postPrintBatch,
postAbolishWaybill,
postFreezeWaybill,
postUnFreezeWaybill,
} from '@/api/waybill/WaybillOrderList.js';
import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle';
import {
downloadXls,
setNodeHeight,
@ -270,7 +287,7 @@ import {
import { columnList } from '@/option/waybill/WaybillOrderList';
import { useRouter } from 'vue-router';
import print from '@/utils/print';
import { ElMessage } from 'element-plus';
import { ElMessage, ElMessageBox } from 'element-plus';
import { getToken } from '@/utils/auth';
import type { UploadProps, UploadUserFile } from 'element-plus';
import { utils } from 'sortablejs';
@ -680,6 +697,36 @@ const handleBatchDelete = () => {
message: '最少选择一条数据',
});
}
ElMessageBox.confirm('确定要批量作废吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
try {
details.loadingObj.pageLoading = true;
const res = await postAbolishWaybill({
waybillIds: details.selectionList.map(val => val.id),
});
console.log('res :>> ', res);
if (res.data.code !== 200) return;
ElMessage({
type: 'success',
message: '批量作废成功',
});
details.selectionList = [];
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
});
};
/** 批量冻结 */
@ -690,6 +737,36 @@ const handleBatchFreeze = () => {
message: '最少选择一条数据',
});
}
ElMessageBox.confirm('确定要批量冻结吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
try {
details.loadingObj.pageLoading = true;
const res = await postFreezeWaybill({
waybillIds: details.selectionList.map(val => val.id),
});
console.log('res :>> ', res);
if (res.data.code !== 200) return;
ElMessage({
type: 'success',
message: '批量冻结成功',
});
details.selectionList = [];
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
});
};
/** 批量恢复 */
@ -700,6 +777,36 @@ const handleBatchRecover = () => {
message: '最少选择一条数据',
});
}
ElMessageBox.confirm('确定要批量恢复吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
try {
details.loadingObj.pageLoading = true;
const res = await postUnFreezeWaybill({
waybillIds: details.selectionList.map(val => val.id),
});
console.log('res :>> ', res);
if (res.data.code !== 200) return;
ElMessage({
type: 'success',
message: '批量恢复成功',
});
details.selectionList = [];
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
});
};
/** 查看运单 */
@ -792,6 +899,27 @@ const handleUploadReceiptSubmit = async () => {
padding: 5px 10px;
}
}
:deep(.el-table tr) {
//
&.abolish {
.tabculconte,
.el-tooltip,
.el-button--text,
.el-text {
// color: #e54b4b !important;
color: #f00 !important;
}
}
// &.hover-row {
// .tabculconte,
// .el-tooltip,
// .el-button--text {
// color: var(--el-color-primary) !important;
// }
// }
}
</style>
<style>

2
src/views/waybill/orderDetails.vue

@ -270,7 +270,7 @@ const handleFilterData = debounce(() => {
for (const key in details.query) {
const value = details.query[key];
if (value) _regArr[key] = new RegExp(value, 'i');
if (value) _regArr[key] = new RegExp('^' + value);
}
if (Object.keys(_regArr).length === 0 && Object.keys(details.timeQuery).length === 0)

35
src/views/waybill/orderPackageList.vue

@ -291,7 +291,14 @@ import {
getShowAdvancePackgeCode,
} from '@/api/waybill/orderPackageListDetails.js';
import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle';
import { downloadXls, setNodeHeight, getHtmls, deepClone, getObjType } from '@/utils/util';
import {
downloadXls,
setNodeHeight,
getHtmls,
deepClone,
getObjType,
handleTranslationDataSeclect,
} from '@/utils/util';
import { packageListColumnList, packageDetailColumnList } from '@/option/waybill/orderPackageList';
import { flowNodeColumnList } from '@/option/waybill/orderPackageListDetails.js';
import { useRouter } from 'vue-router';
@ -423,16 +430,6 @@ onMounted(() => {
}, 100);
});
//
const translationArr = [];
for (let i = 0; i < details.packageListColumnList.length; i++) {
const element = details.packageListColumnList[i];
if (getObjType(element.checkarr) !== 'array' || element.checkarr.length === 0) continue;
translationArr.push(element);
}
/** 请求页面数据 */
const onLoad = async (params = {}) => {
try {
@ -458,21 +455,7 @@ const onLoad = async (params = {}) => {
details.packageListData = data.records;
details.page.total = data.total;
for (let i = 0; i < details.packageListData.length; i++) {
const value = details.packageListData[i];
for (let j = 0; j < translationArr.length; j++) {
const element = translationArr[j];
for (let index = 0; index < element.checkarr.length; index++) {
const val = element.checkarr[index];
if (Number(value[element.prop.replace('Name', '')] || 0) === val.value) {
value[element.prop] = val.label;
}
}
}
}
handleTranslationDataSeclect(details.packageListData, details.packageListColumnList);
} catch (error) {
console.log('error :>> ', error);
} finally {

2
src/views/waybill/orderPackageListDetails.vue

@ -476,7 +476,7 @@ const handleFilterPackageData = debounce(() => {
for (const key in details.query) {
const value = details.query[key];
if (value) _regArr[key] = new RegExp(value, 'i');
if (value) _regArr[key] = new RegExp('^' + value);
}
if (Object.keys(_regArr).length === 0 && Object.keys(details.timeQuery).length === 0)

Loading…
Cancel
Save