Browse Source

修复干线部分bug

dev-xx
qb 11 months ago
parent
commit
b2f9f1ed54
  1. 7
      src/api/waybill/WaybillOrderList.js
  2. 2
      src/components/MyPrint/MyPrint.vue
  3. 6
      src/option/distribution/TripartiteTransfer.js
  4. 36
      src/option/distribution/arteryDistrilbutionBillLadingList.js
  5. 10
      src/option/waybill/ChangeOrder.js
  6. 68
      src/option/waybill/WaybillOrderList.js
  7. 51
      src/views/distribution/artery/AddVehicleStowage.vue
  8. 122
      src/views/distribution/artery/VehicleStowageDetails.vue
  9. 11
      src/views/distribution/artery/truckLoadingDetails.vue
  10. 79
      src/views/distribution/inventory/CreateOrder.vue
  11. 24
      src/views/distribution/inventory/arteryDistrilbutionBillLadingList.vue
  12. 32
      src/views/waybill/ChangeOrder.vue
  13. 12
      src/views/waybill/CreateZeroOrder.vue
  14. 5
      src/views/waybill/WarehousingByTrainNumber.vue
  15. 107
      src/views/waybill/WaybillOrderList.vue
  16. 189
      src/views/waybill/orderPackageList.vue

7
src/api/waybill/WaybillOrderList.js

@ -7,14 +7,11 @@ import request from '@/axios';
* @param {*} params
* @returns
*/
export const postWarehouseWaybillPageWaybillList = (page, params) => {
export const postWarehouseWaybillPageWaybillList = data => {
return request({
url: '/api/logpm-warehouse/warehouseWaybill/pageWaybillList',
method: 'post',
data: {
...params,
...page,
},
data,
});
};

2
src/components/MyPrint/MyPrint.vue

@ -1,6 +1,6 @@
<template>
<div>
<el-dialog v-model="visible" :title="props.title" :width="props.width">
<el-dialog v-model="visible" align-center :title="props.title" :width="props.width">
<template v-if="visible">
<div class="printCode" ref="printNodeRef">
<div v-html="props.html"></div>

6
src/option/distribution/TripartiteTransfer.js

@ -559,8 +559,8 @@ export const detailsColumnList = [
// sortable: true,
// },
{
prop: '装车时间',
label: '同步状态',
prop: 'createTime',
label: '装车时间',
type: 1,
values: '',
width: '130',
@ -569,7 +569,7 @@ export const detailsColumnList = [
sortable: true,
},
{
prop: 'totalWeight',
prop: 'unloadTime',
label: '卸车时间',
type: 1,
values: '',

36
src/option/distribution/arteryDistrilbutionBillLadingList.js

@ -355,25 +355,35 @@ export const columnDetailList = [
sortable: true,
},
{
prop: 'incomingType',
prop: 'incomingTypeName',
label: '入库类型',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: '',
label: '是否齐套',
type: 2,
type: 3,
values: '',
width: '130',
checkarr: [],
checkarr: [
{ label: '码板打托', value: '1' },
{ label: '扫码入库', value: '2' },
{ label: '直接入库', value: '3' },
{ label: '按车次号入库', value: '4' },
{ label: '按订单入库', value: '5' },
{ label: '扫描入库', value: '6' },
{ label: '批量卸车入库', value: '7' },
{ label: '卸车托盘', value: '8' },
{ label: '卸分一体', value: '9' },
],
fixed: false,
sortable: true,
},
// {
// prop: '',
// label: '是否齐套',
// type: 2,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
{
prop: 'trayCode',
label: '托盘码',

10
src/option/waybill/ChangeOrder.js

@ -28,7 +28,7 @@ export const columnList = [
{
prop: 'openWarehouseName',
label: '开单网点',
type: 1,
type: 2,
values: '',
width: '150',
checkarr: [],
@ -80,7 +80,7 @@ export const columnList = [
{
prop: 'agent',
label: '制单员',
type: 1,
type: 2,
values: '',
width: '130',
checkarr: [],
@ -110,7 +110,7 @@ export const columnList = [
{
prop: 'applyWarehouseName',
label: '申请网点',
type: 1,
type: 2,
values: '',
width: '130',
checkarr: [],
@ -120,7 +120,7 @@ export const columnList = [
{
prop: 'createUserName',
label: '申请人',
type: 1,
type: 2,
values: '',
width: '130',
checkarr: [],
@ -130,7 +130,7 @@ export const columnList = [
{
prop: 'refer',
label: '修改原因',
type: 1,
type: 2,
values: '',
width: '130',
checkarr: [],

68
src/option/waybill/WaybillOrderList.js

@ -108,7 +108,7 @@ export const columnList = [
{
prop: 'shipperAddress',
label: '发货方地址',
type: 2,
type: 1,
values: '',
width: '180',
checkarr: [],
@ -148,7 +148,7 @@ export const columnList = [
{
prop: 'consigneeAddress',
label: '收货方地址',
type: 2,
type: 1,
values: '',
width: '130',
checkarr: [],
@ -564,7 +564,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'documentMakingTime',
prop: 'createTime',
label: '创建时间',
type: 1,
values: '',
@ -573,6 +573,68 @@ export const columnList = [
fixed: false,
sortable: true,
},
{
prop: 'documentMakingTime',
label: '制单时间',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
isshowSummary: false,
sortable: true,
},
{
prop: 'pickupCompleteOrNotName',
label: '提货是否整车',
type: 3,
values: '',
width: '150',
checkarr: [
{ label: '是', value: '1' },
{ label: '否', value: '0' },
],
fixed: false,
isshowSummary: false,
sortable: true,
},
{
prop: 'trunklineCompleteOrNotName',
label: '干线是否整车',
type: 3,
values: '',
width: '150',
checkarr: [
{ label: '是', value: '1' },
{ label: '否', value: '0' },
],
fixed: false,
isshowSummary: false,
sortable: true,
},
{
prop: 'waybillStatusName',
label: '运单状态',
type: 3,
values: '',
width: '130',
checkarr: [
{ label: '未入库', value: '0' },
{ label: '部分入库', value: '10' },
{ label: '入库', value: '20' },
{ label: '部分中转', value: '30' },
{ label: '中转', value: '40' },
{ label: '目的仓部分到达', value: '50' },
{ label: '目的仓到达', value: '60' },
{ label: '配送部分装车', value: '70' },
{ label: '配送装车', value: '80' },
{ label: '部分签收', value: '90' },
{ label: '已签收', value: '100' },
],
fixed: false,
isshowSummary: false,
sortable: true,
},
/* {
prop: 'carrierName',
label: '审核状态',

51
src/views/distribution/artery/AddVehicleStowage.vue

@ -92,7 +92,7 @@
filterable
remote
reserve-keyword
placeholder="输入车牌号"
placeholder="输入并选择车牌号"
@change="handleCarChange"
:remote-method="remoteMethodCar"
:loading="details.loadingObj.loading"
@ -117,7 +117,7 @@
remote
@change="handleNameChange(1)"
reserve-keyword
placeholder="输入司机名称"
placeholder="输入并选择司机名称"
:remote-method="remoteMethodDriver"
:loading="details.loadingObj.loading"
>
@ -132,6 +132,34 @@
<el-button type="primary" @click="handleAddDriver" icon="Plus"></el-button>
</div>
<!-- 外请人 -->
<div
class="form_row_item"
v-if="Number(form.driverType) === 3 || Number(form.driverType) === 4"
>
<el-form-item inline label="外请人">
<!-- <el-select
v-model="form.assistantName"
filterable
remote
reserve-keyword
@change="handleNameChange(2)"
placeholder="请输入并选择外请人"
:remote-method="remoteMethodDriver"
:loading="details.loadingObj.loading"
>
<el-option
v-for="val in details.driverListByName"
:key="val.driverName"
:label="val.driverName"
:value="val.driverId"
/>
</el-select> -->
<el-input v-model="form.outDriverPerson" placeholder="请输入外请人" />
</el-form-item>
</div>
<!-- 副驾司机 -->
<div class="form_row_item">
<el-form-item inline label="副驾司机">
@ -141,7 +169,7 @@
remote
reserve-keyword
@change="handleNameChange(2)"
placeholder="输入司机名称"
placeholder="输入并选择司机名称"
:remote-method="remoteMethodDriver"
:loading="details.loadingObj.loading"
>
@ -1260,6 +1288,7 @@ const handleNameChange = (type: number) => {
form.value.driverName = _value.driverName;
form.value.driverId = _value.driverId;
form.value.driverMobile = _value.driverPhone;
form.value.driverType = _value.driverType;
} else {
form.value.assistantName = _value.driverName;
form.value.assistantMobile = _value.driverPhone;
@ -1281,7 +1310,16 @@ const handleAddCar = () => {
/** 新增司机 */
const handleAddDriver = () => {
$router.push('/basicdata/driverArtery/basicdataDriverArtery');
$store.commit('DEL_ONCE_TAG', 'basicdataDriverArteryAdd');
$router.push({
path: '/basicdata/driverArtery/basicdataDriverArteryAdd',
query: {
name: '司机信息新增',
type: 'add',
backPatch: '/basicdata/driverArtery/basicdataDriverArtery',
},
});
};
/** 计算合计 */
@ -1807,6 +1845,11 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
if (!formEl) return;
formEl.validate((valid, fields) => {
if (valid) {
const _driverType = Number(details.form.driverType);
if ((_driverType === 3 || _driverType === 4) && !details.form.outDriverPerson)
return ElMessage.warning('请输入外请人');
ElMessageBox.confirm('是否确认提交?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',

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

@ -96,6 +96,14 @@
<el-form-item label="主驾电话">
<el-input readonly v-model="form.driverMobile" placeholder="主驾电话" />
</el-form-item>
<!-- 外请人 -->
<el-form-item
label="外请人"
v-if="Number(form.driverType) === 3 || Number(form.driverType) === 4"
>
<el-input readonly v-model="form.outDriverPerson" />
</el-form-item>
<div style="flex: 1; padding-right: 0">
<el-form-item style="width: 100%; margin: 0" label="备注" :inline="false">
<el-input readonly type="textarea" v-model="form.remark" placeholder="备注"
@ -698,17 +706,16 @@ const initOriginWarehouseOrder = async (params = {}) => {
details.oldData.push(
...val.carsLoadOrderInfoList.map((item, index) => {
item = { ...val, ...item };
const _planArr: any = { ...val, ...item };
delete item.carsLoadOrderInfoList;
delete item.carsLoadOrderInfoListPlan;
if (index === 0) item.mergeColumnIndex = val.carsLoadOrderInfoList.length;
else {
item.mergeColumnIndex = 0;
for (let value of mergeColumn) {
item[value] = '';
}
}
// if (index === 0) item.mergeColumnIndex = val.carsLoadOrderInfoList.length;
// else {
// item.mergeColumnIndex = 0;
// for (let value of mergeColumn) {
// item[value] = '';
// }
// }
return item;
})
);
@ -719,13 +726,13 @@ const initOriginWarehouseOrder = async (params = {}) => {
delete item.carsLoadOrderInfoList;
delete item.carsLoadOrderInfoListPlan;
if (index === 0) item.mergeColumnIndex = val.carsLoadOrderInfoListPlan.length;
else {
item.mergeColumnIndex = 0;
for (let value of mergeColumn) {
item[value] = '';
}
}
// if (index === 0) item.mergeColumnIndex = val.carsLoadOrderInfoListPlan.length;
// else {
// item.mergeColumnIndex = 0;
// for (let value of mergeColumn) {
// item[value] = '';
// }
// }
return item;
})
);
@ -853,8 +860,28 @@ const searchHide = async () => {
// setNodeHeight(details.listNode);
};
const handleMerge = (startIndex: number, endIndex: number, data: {}) => {
for (let index = startIndex; index <= endIndex; index++) {
const value = data[index];
if (index === startIndex) value.mergeColumnIndex = endIndex + 1 - startIndex;
else {
value.mergeColumnIndex = 0;
for (let key of mergeColumn) {
value[key] = '';
}
}
}
console.log('data :>> ', data);
};
let timer;
/** 表格表头输入框搜索 */
const inputsc = (value, row) => {
const inputsc = async (value, row) => {
details.loadingObj.oldListLoading = true;
await nextTick();
try {
//
const reg = new RegExp(value, 'i');
@ -865,22 +892,51 @@ const inputsc = (value, row) => {
if (value === '') delete details.query[row.prop];
if (Object.keys(details.query).length === 0) return (details.renderData = nowData);
let _data = [];
if (Object.keys(details.query).length === 0) _data = deepClone(nowData);
// ,
else
_data = deepClone(
nowData.filter(value => {
let _flag = true;
for (let key in details.query) {
if (!details.query[key].test(value[key])) _flag = false;
if (!_flag) break;
}
const _data = nowData.filter(value => {
let _flag = true;
for (let key in details.query) {
if (!details.query[key].test(value[key])) _flag = false;
if (!_flag) break;
}
return _flag;
})
);
return _flag;
});
//
let mergeStartIndex = 0;
//
let comparisonValue = '';
for (let index = 0; index < _data.length; index++) {
const value = _data[index];
console.log('value :>> ', value);
//
if (value.waybillNo !== comparisonValue) {
comparisonValue = value.waybillNo;
mergeStartIndex = index;
handleMerge(mergeStartIndex, index, _data);
//
} else if (index === _data.length - 1) handleMerge(mergeStartIndex, index, _data);
}
details.renderData = _data;
} catch (error) {
console.log('error :>> ', error);
} finally {
timer = setTimeout(() => {
details.loadingObj.oldListLoading = false;
clearTimeout(timer);
timer = null;
}, 500);
}
};
@ -1196,4 +1252,20 @@ watch(
.overflow {
overflow: hidden;
}
// 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>

11
src/views/distribution/artery/truckLoadingDetails.vue

@ -557,12 +557,11 @@ const btnsc = () => {};
/** 表格表头下拉框选择 */
const selectsc = (index, row) => {
details.query[row.prop] = index;
if (!index && index !== 0) delete details.query[row.prop];
if (row.prop === 'certificateTypeName') {
details.query['certificateType'] = index;
if (!index) delete details.query['certificateType'];
}
const _key = row.prop.replace('Name', '');
details.query[_key] = index;
if (!index && index !== 0) delete details.query[_key];
onLoad();
};

79
src/views/distribution/inventory/CreateOrder.vue

@ -31,7 +31,7 @@
<div>
<el-input
v-model.trim="query.waybillNo"
disabled="$route.query && $route.query.type === 'edit'"
:disabled="$route.query && $route.query.type === 'edit'"
placeholder="运单号"
clearable
/>
@ -1108,7 +1108,9 @@
<div class="flex-c-c mt20">
<el-button icon="CircleClose" @click="back"> </el-button>
<el-button type="primary" icon="CircleCheck" @click="handleRepetition"> </el-button>
<!-- <el-button type="primary" icon="Printer" @click="handlePrint"> </el-button> -->
<el-button type="primary" icon="Printer" v-if="details.waybillId" @click="handlePrint"
> </el-button
>
</div>
</el-dialog>
@ -1147,7 +1149,7 @@
</el-form-item>
<el-form-item label="备注:" style="margin-right: 0">
<el-input type="textarea" v-model="details.causeForm.remark" placeholder="请输入描述" />
<el-input type="textarea" v-model="details.causeForm.refer" placeholder="请输入描述" />
</el-form-item>
</el-form>
@ -1168,6 +1170,13 @@
<el-button type="primary" icon="CircleCheck" @click="handleSubmitCause"> </el-button>
</div>
</el-dialog>
<!-- 运单打印 -->
<WaybillPrintTemplate
v-model="details.popUpShow.WaybillPrintTemplate"
:html="details.html"
width="70%"
/>
</div>
</template>
@ -1220,6 +1229,7 @@ import {
postFindCategoryInfo,
postFindArrPrice,
} from '@/api/distribution/CreateOrder.js';
import { postPrintBatch } from '@/api/waybill/WaybillOrderList.js';
// vue
const instance = getCurrentInstance();
@ -1747,6 +1757,8 @@ const details = reactive<any>({
titleVisited: false,
/** 改单原因 */
causeVisited: false,
/** 运单打印 */
WaybillPrintTemplate: false,
},
/** 列表Dom节点 */
listNode: '',
@ -1810,6 +1822,10 @@ const details = reactive<any>({
],
/** 修改数据 */
changeData: [],
/** 提交后后台返回的waybillId */
waybillId: '',
/** 打印html */
html: '',
});
/** 是否禁用 */
@ -2001,7 +2017,7 @@ const onLoad = async (idsArr = []) => {
details.query.goodsCode = '-' + data.totalNum;
if (data.defaultPayWay) {
data.payWay = data.defaultPayWay;
details.query.payWay = data.defaultPayWay;
} else {
details.query.payWay = data.payWayList.find(val => val.dictValue === '到付').dictKey || '2';
}
@ -2321,6 +2337,7 @@ const handleChoose = () => {
/** 表格表头输入框搜索 */
const inputsc = (index, row) => {
details.tableQuery[row.prop] = index;
if (!index && index !== 0) delete details.tableQuery[row.prop];
init();
};
@ -2341,12 +2358,9 @@ const btnsc = () => {};
/** 表格表头下拉框选择 */
const selectsc = (index, row) => {
details.tableQuery[row.prop] = index;
if (!index) delete details.tableQuery[row.prop];
if (row.prop === 'certificateTypeName') {
details.query['certificateType'] = index;
if (!index) delete details.query['certificateType'];
}
const _key = row.prop.replace('Name', '');
details.tableQuery[_key] = index;
if (!index && index !== 0) delete details.tableQuery[_key];
init();
};
@ -2835,10 +2849,12 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
res = await postOpenOrderOpenZeroWaybill(submitData);
}
const { code, msg } = res.data;
const { code, data, msg } = res.data;
if (code !== 200) return;
if (msg) ElMessage.success(msg);
details.waybillId = getObjType(data) === 'object' ? data.waybillId || '' : '';
// ,
if (details.pageInfo.type === 'add') details.popUpShow.titleVisited = true;
} else {
@ -2905,6 +2921,13 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
/** 重复开单 */
const handleRepetition = () => {
//
details.tableQuery = {};
for (let index = 0; index < details.columnList.length; index++) {
details.columnList[index].values = '';
}
handleChooseOrder();
resetForm(ruleFormRef.value);
};
@ -3269,6 +3292,40 @@ const handleSubmitCause = () => {
});
};
/** 打印 */
const handlePrint = async () => {
try {
details.loadingObj.pageLoading = true;
const res = await postPrintBatch({
ids: details.waybillId,
tempId: 15,
});
const { code, data } = res.data;
if (code !== 200 || !data || data.length === 0) return;
let _html = '';
for (let i = 0; i < data.length; i++) {
const value = data[i];
_html += JSON.parse(JSON.stringify(value.templateHtml));
}
console.log('res :>> ', res);
details.html = _html;
details.popUpShow.WaybillPrintTemplate = true;
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
};
// watch(
// $route,
// async () => {

24
src/views/distribution/inventory/arteryDistrilbutionBillLadingList.vue

@ -227,10 +227,22 @@
:columnList="columnDetailList"
:tableData="detailsData"
:loading="loadingObj.detailsLoding"
@inputTxt="inputsc"
@timeCheck="timesc"
@selectCheck="selectsc"
@selection="selectionChange"
@inputTxt="
(value, row) => {
detailQuery[row.prop] = value;
if (!value && value !== 0) delete detailQuery[row.prop];
onLoadDetails();
}
"
@selectCheck="
(value, row) => {
const _key = row.prop.replace('Name', '');
detailQuery[_key] = value;
if (!value && value !== 0) delete detailQuery[_key];
onLoadDetails();
}
"
@selection="() => {}"
>
</tablecmt>
<div class="avue-crud__pagination flex-c-sb" style="width: 100%">
@ -287,7 +299,9 @@ import {
debounce,
handleClearTableQuery,
deepClone,
handleTranslationDataSeclect,
} from '@/utils/util';
import { detail } from '@/api/flow/flow';
export default {
data() {
@ -848,6 +862,7 @@ export default {
let formattedDate = formatter.format(date);
return formattedDate.replace(/\//g, '-');
},
/** 获取明细详情 */
async onLoadDetails(params = {}) {
try {
this.loadingObj.detailsLoding = true;
@ -863,6 +878,7 @@ export default {
if (code !== 200) return;
this.detailsData = data.records;
handleTranslationDataSeclect(this.detailsData, this.columnDetailList);
this.detailPage.total = data.total;
} catch (error) {
console.log('error :>> ', error);

32
src/views/waybill/ChangeOrder.vue

@ -7,37 +7,40 @@
<el-form :inline="true" :model="query" class="header_search">
<el-form-item label="开单时间:" class="el-times">
<el-date-picker
v-model="stockupDate"
v-model="details.query.openTime"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
value-format="YYYY-MM-DD"
clearable
/>
</el-form-item>
<el-form-item label="申请时间:" class="el-times">
<el-date-picker
v-model="stockupDate"
v-model="details.query.applyTime"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
value-format="YYYY-MM-DD"
clearable
/>
</el-form-item>
<el-form-item label="审核时间:" class="el-times">
<el-date-picker
v-model="stockupDate"
v-model="details.query.checkTime"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
value-format="YYYY-MM-DD"
clearable
/>
</el-form-item>
@ -200,6 +203,7 @@ import {
getHtmls,
deepClone,
handleTranslationDataSeclect,
getObjType,
} from '@/utils/util';
import { columnList, viewColumnList } from '@/option/waybill/ChangeOrder';
import { postFindUpdateWaybillList } from '@/api/waybill/ChangeOrder';
@ -315,7 +319,27 @@ const onLoad = async (params = {}) => {
try {
details.loadingObj.list = true;
const res = await postFindUpdateWaybillList({ ...details.page, ...details.query, ...params });
const submitData = { ...details.page, ...details.query, ...params };
//
if (getObjType(details.query.openTime) === 'array' && details.query.openTime.length > 0) {
submitData.openTimeStartStr = details.query.openTime[0];
submitData.openTimeEndStr = details.query.openTime[1];
}
//
if (getObjType(details.query.applyTime) === 'array' && details.query.applyTime.length > 0) {
submitData.applyTimeStartStr = details.query.applyTime[0];
submitData.applyTimeEndStr = details.query.applyTime[1];
}
//
if (getObjType(details.query.checkTime) === 'array' && details.query.checkTime.length > 0) {
submitData.checkTimeStartStr = details.query.checkTime[0];
submitData.checkTimeEndStr = details.query.checkTime[1];
}
const res = await postFindUpdateWaybillList(submitData);
const { code, data } = res.data;
if (code !== 200) return;

12
src/views/waybill/CreateZeroOrder.vue

@ -14,7 +14,14 @@
<div class="flex-c-sb form_top">
<div>
<el-form-item class="mt10 mr10" label="运单号: " prop="waybillNo" label-width="80px">
<div><el-input v-model.trim="query.waybillNo" placeholder="运单号" clearable /></div>
<div>
<el-input
v-model.trim="query.waybillNo"
:disabled="$route.query && $route.query.type === 'edit'"
placeholder="运单号"
clearable
/>
</div>
</el-form-item>
<el-form-item class="mt10" label="品牌: " prop="waybillNo" label-width="80px">
@ -1033,7 +1040,7 @@
</el-form-item>
<el-form-item label="备注:" style="margin-right: 0">
<el-input type="textarea" v-model="details.causeForm.remark" placeholder="请输入描述" />
<el-input type="textarea" v-model="details.causeForm.refer" placeholder="请输入描述" />
</el-form-item>
</el-form>
@ -1746,6 +1753,7 @@ const initPageInfo = async () => {
val.subtotalFreight = Number(val.subtotalFreight);
val.goodsName = val.productName;
val.goodsId = val.productId;
/** 货物名称list */
val.goodsListOptions = [];

5
src/views/waybill/WarehousingByTrainNumber.vue

@ -15,7 +15,7 @@
<el-form-item :label="details.searchType === 'orderCode' ? '订单号' : '车次号'">
<el-input
v-model="query.incomingCode"
:placeholder="'请输入' + details.searchType === 'orderCode' ? '订单号' : '车次号'"
:placeholder="`请输入${details.searchType === 'orderCode' ? '订单号' : '车次号'}`"
clearable
></el-input>
</el-form-item>
@ -226,6 +226,9 @@ const onLoad = async (params = {}) => {
const searchChange = () => {
if (!details.searchType) return ElMessage.error('请选择搜索模式');
if (!details.query.incomingCode) return ElMessage.error('请输入搜索内容');
for (let i = 0; i < details.columnList.length; i++) {
details.columnList[i].values = '';
}
onLoad();
};

107
src/views/waybill/WaybillOrderList.vue

@ -5,64 +5,40 @@
<div v-h5uShow="!search">
<!-- 查询模块 -->
<el-form :inline="true" :model="query" class="header_search">
<el-form-item label="有效状态">
<!-- <el-form-item label="有效状态">
<el-select v-model="query.value" clearable placeholder="有效状态">
<el-option label="有效" value="item.value" />
<el-option label="作废" value="item.value" />
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="运单号:" class="el-times">
<el-input v-model="query.stockupArea" clearable placeholder="请输入运单号"></el-input>
</el-form-item>
<el-form-item label="制单时间:" class="el-times">
<el-date-picker
v-model="stockupDate"
v-model="details.query.documentMakingTime"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
value-format="YYYY-MM-DD"
clearable
/>
</el-form-item>
<el-form-item label="创建时间:" class="el-times">
<el-date-picker
v-model="stockupDate"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
clearable
/>
</el-form-item>
<el-form-item label="送货时间:" class="el-times">
<el-date-picker
v-model="stockupDate"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
clearable
/>
</el-form-item>
<el-form-item label="签收时间:" class="el-times">
<el-date-picker
v-model="stockupDate"
v-model="details.query.createTime"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
value-format="YYYY-MM-DD"
clearable
/>
</el-form-item>
@ -283,13 +259,21 @@ import {
postPrintBatch,
} from '@/api/waybill/WaybillOrderList.js';
import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle';
import { downloadXls, setNodeHeight, getHtmls, deepClone } from '@/utils/util';
import {
downloadXls,
setNodeHeight,
getHtmls,
deepClone,
handleTranslationDataSeclect,
getObjType,
} from '@/utils/util';
import { columnList } from '@/option/waybill/WaybillOrderList';
import { useRouter } from 'vue-router';
import print from '@/utils/print';
import { ElMessage } from 'element-plus';
import { getToken } from '@/utils/auth';
import type { UploadProps, UploadUserFile } from 'element-plus';
import { utils } from 'sortablejs';
const $store = useStore();
@ -418,41 +402,40 @@ const onLoad = async (page?: any, params = {}) => {
details.loadingObj.list = true;
let _page = details.page;
if (page) _page = page;
//
const res = await postWarehouseWaybillPageWaybillList(details.page, {
const submitData = {
..._page,
...details.query,
...params,
});
console.log('res :>> ', res);
const { code, data } = res.data;
if (code !== 200) return;
//
const _translationArr = [];
for (let i = 0; i < details.columnList.length; i++) {
const value = details.columnList[i];
};
if (value.type === 3) _translationArr.push(value);
//
if (getObjType(details.query.createTime) === 'array' && details.query.createTime.length > 0) {
submitData.createTimeStartStr = details.query.createTime[0];
submitData.createTimeEndStr = details.query.createTime[1];
}
details.data = data.records;
//
if (
getObjType(details.query.documentMakingTime) === 'array' &&
details.query.documentMakingTime.length > 0
) {
submitData.documentMakingTimeStartStr = details.query.documentMakingTime[0];
submitData.documentMakingTimeEndStr = details.query.documentMakingTime[1];
}
for (let i = 0; i < details.data.length; i++) {
const value = details.data[i];
delete submitData.createTime;
delete submitData.documentMakingTime;
for (let index = 0; index < _translationArr.length; index++) {
const item = _translationArr[index];
//
const res = await postWarehouseWaybillPageWaybillList(submitData);
console.log('res :>> ', res);
const { code, data } = res.data;
if (code !== 200) return;
for (let j = 0; j < item.checkarr.length; j++) {
const val = item.checkarr[j];
details.data = data.records;
if (Number(value[item.prop.replace('Name', '')]) !== val.value) continue;
value[item.prop] = val.label;
break;
}
}
}
handleTranslationDataSeclect(details.data, details.columnList);
console.log('details.data :>> ', details.data);
details.page.total = data.total;
@ -517,12 +500,10 @@ const btnsc = () => {};
/** 表格表头下拉框选择 */
const selectsc = (index, row) => {
details.query[row.prop] = index;
if (!index && index !== 0) delete details.query[row.prop];
if (row.prop === 'certificateTypeName') {
details.query['certificateType'] = index;
if (!index) delete details.query['certificateType'];
}
const _key = row.prop.replace('Name', '');
details.query[_key] = index;
if (!index && index !== 0) delete details.query[_key];
onLoad(details.page);
};

189
src/views/waybill/orderPackageList.vue

@ -1,5 +1,5 @@
<template>
<basic-container>
<basic-container v-loading="details.loadingObj.pageLoading">
<div class="avue-crud">
<!-- 搜索模块 -->
<div v-h5uShow="search">
@ -54,6 +54,7 @@
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
value-format="YYYY-MM-DD"
clearable
/>
</el-form-item>
@ -80,11 +81,6 @@
<el-button type="primary" icon="Position" @click="handleBatchPutInStorage">
批量入库
</el-button>
<!-- <el-button type="primary" icon="Upload" @click="editClientInfo">定制品导入</el-button>
<el-button type="primary" icon="Upload" @click="editClientInfo">标准品导入</el-button>
<el-button type="primary" icon="Upload" @click="editClientInfo">
家配体积更新
</el-button> -->
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
@ -132,7 +128,7 @@
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="page.currentPage"
:current-page="page.pageNum"
:page-sizes="[30, 50, 80, 120]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
@ -144,43 +140,6 @@
</div>
</basic-container>
<!-- 修改客户信息 -->
<el-dialog
class="el-dialog-QRCode"
title="修改客户信息"
:visible.sync="details.popUpShow.editClientInfoVisible"
width="780px"
v-model="details.popUpShow.editClientInfoVisible"
>
<div>
<el-divider style="font-size: 28px">修改订单自编号客户信息</el-divider>
</div>
<el-form>
<el-form-item label="客户姓名">
<el-input />
</el-form-item>
<el-form-item label="联系电话">
<el-input />
</el-form-item>
<el-form-item label="用户地址">
<el-input />
</el-form-item>
</el-form>
<template #footer>
<div class="flex-c-c dialog-footer">
<el-button icon="Position" type="primary" @click="printTemplate"> </el-button>
<el-button icon="Refresh" type="primary" @click="printTemplate"> </el-button>
<el-button icon="Close" @click="details.popUpShow.editClientInfoVisible = false">
</el-button>
</div>
</template>
</el-dialog>
<!-- 包内产品 -->
<el-dialog
title="包内产品"
@ -234,7 +193,7 @@
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="details.packageListPage.currentPage"
:current-page="details.packageListPage.pageNum"
:page-sizes="[30, 50, 80, 120]"
:page-size="details.packageListPage.pageSize"
layout="total, sizes, prev, pager, next, jumper"
@ -296,7 +255,7 @@
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="details.packageListPage.currentPage"
:current-page="details.packageListPage.pageNum"
:page-sizes="[30, 50, 80, 120]"
:page-size="details.packageListPage.pageSize"
layout="total, sizes, prev, pager, next, jumper"
@ -329,6 +288,7 @@ import {
postFindOrderDetails,
postFinaPackageTrackLogList,
getopenOrderIncomingPackage,
getShowAdvancePackgeCode,
} from '@/api/waybill/orderPackageListDetails.js';
import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle';
import { downloadXls, setNodeHeight, getHtmls, deepClone, getObjType } from '@/utils/util';
@ -402,13 +362,13 @@ const details = reactive<any>({
drawerShow: false,
/** 分页参数 */
page: {
currentPage: 1,
pageNum: 1,
pageSize: 30,
total: 0,
},
/** 包明细分页参数 */
packageListPage: {
currentPage: 1,
pageNum: 1,
pageSize: 30,
total: 0,
},
@ -474,17 +434,28 @@ for (let i = 0; i < details.packageListColumnList.length; i++) {
}
/** 请求页面数据 */
const onLoad = async (page: any, params = {}) => {
const onLoad = async (params = {}) => {
try {
if (Object.keys(details.query).length === 0) return (details.packageListData = []);
details.loadingObj.list = true;
const res = await postFindOrderDetails({ ...page, ...details.query, ...params });
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 postFindOrderDetails(submitData);
const { code, data } = res.data;
if (code !== 200) return;
details.packageListData = data.records;
details.page.currentPage = data.currentPage;
details.page.pageSize = data.pageSize;
details.page.total = data.total;
for (let i = 0; i < details.packageListData.length; i++) {
@ -509,22 +480,22 @@ const onLoad = async (page: any, params = {}) => {
}
};
onLoad(details.page);
onLoad();
/** 搜索 */
const searchChange = () => {
onLoad(details.page);
onLoad();
};
/** 清空表单 */
const searchReset = () => {
details.query = {};
details.stockupDate = [];
details.page.currentPage = 1;
details.page.pageNum = 1;
for (let index = 0; index < details.packageListColumnList.length; index++) {
details.packageListColumnList[index].values = '';
}
onLoad(details.page);
onLoad();
};
/** 展开列表控件 */
@ -543,7 +514,7 @@ const searchHide = () => {
const inputsc = (index, row) => {
details.query[row.prop] = index;
if (index == '') delete details.query[row.prop];
onLoad(details.page);
onLoad();
};
/** 表格表头时间选择 */
@ -556,7 +527,7 @@ const timesc = (index, row) => {
if (!index) {
delete details.query[row.prop];
}
onLoad(details.page);
onLoad();
};
/** 表格表头输入框搜索 */
@ -570,7 +541,7 @@ const selectsc = (index, row) => {
details.query['certificateType'] = index;
if (!index) delete details.query['certificateType'];
}
onLoad(details.page);
onLoad();
};
/** 表格表头复选框选择 */
@ -581,11 +552,14 @@ const selectionChange = (list: any) => {
/** 每页数量改变执行的回调 */
const sizeChange = (pageSize: number) => {
details.page.pageSize = pageSize;
onLoad(details.page);
onLoad();
};
/** 页码改变执行的回调 */
const currentChange = () => {};
const currentChange = pageNum => {
details.page.pageNum = pageNum;
onLoad();
};
/**
* 设置列表 -- 固定函数
@ -615,57 +589,17 @@ const beforeClose = done => {
/** 查看包内产品 */
const handleShowPackageOrderList = ({ row }) => {
details.popUpShow.packageDetailColumnListVisited = true;
nextTick(() => {
// ,
const _node: any = document.querySelector('.packageDetailColumnListVisited .maboxhi');
if (!_node) return;
_node.style.height = '550px';
console.log('_node :>> ', _node);
});
};
// details.popUpShow.packageDetailColumnListVisited = true;
/** 修改客户信息 */
const editClientInfo = () => {
if (details.selectionList.length !== 0) {
return ElMessage({
type: 'warning',
message: '最少选择一条数据',
});
}
// editClientInfoVisible;
details.popUpShow.editClientInfoVisible = true;
};
/** 批量删除 */
const handleDelete = () => {
if (details.selectionList.length === 0) {
return ElMessage({
type: 'warning',
message: '最少选择一条数据',
});
}
};
// nextTick(() => {
// // ,
// const _node: any = document.querySelector('.packageDetailColumnListVisited .maboxhi');
// if (!_node) return;
// _node.style.height = '550px';
// console.log('_node :>> ', _node);
// });
/** 批量发车 */
const handleDepart = () => {
if (details.selectionList.length === 0) {
return ElMessage({
type: 'warning',
message: '最少选择一条数据',
});
}
};
/** 批量冻结 */
const handleFreeze = () => {
if (details.selectionList.length === 0) {
return ElMessage({
type: 'warning',
message: '最少选择一条数据',
});
}
ElMessage.warning('暂未开放');
};
/**
@ -700,20 +634,6 @@ const handleFullScrean = (_type: 'open' | 'close', _name: string) => {
}
};
/** 单列查看包条码 */
const printOrder = ({ row }) => {
let qr = {
ids: row.id,
};
details.html = '';
showOrderPackgeCode(qr).then(res => {
// this.orderPackageCode = res.data
if (res.data.code !== 200) return;
console.log(res.data);
details.html = getHtmls(res.data.data.dataList, res.data.data.templateHtml);
});
};
/** 单列查看包条码 */
const batchPrintOrder = ({ row }) => {
let qr = {
@ -834,6 +754,27 @@ const handleBatchBarcode = async () => {
}
};
/** 单列查看包条码 */
const printOrder = async ({ row }) => {
try {
details.loadingObj.pageLoading = true;
details.html = '';
let qr = {
orderPackageCodes: row.orderPackageCode,
};
const res = await getShowAdvancePackgeCode(qr);
const { code, data } = res.data;
if (code !== 200) return;
details.popUpShow.QRCodeVisible = true;
details.html = getHtmls(data.dataList, data.templateHtml);
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
};
/** 显示流转节点 */
const handleShowFlowNode = async ({ row }) => {
try {

Loading…
Cancel
Save