Browse Source

修复干线部分bug

dev-xx
qb 11 months ago
parent
commit
c56b766190
  1. 4
      src/api/distribution/TripartiteTransfer.js
  2. 2
      src/option/distribution/BookingNote.js
  3. 103
      src/option/distribution/addVehicleStowage.js
  4. 88
      src/option/waybill/WaybillOrderList.js
  5. 4
      src/styles/common.scss
  6. 32
      src/views/Pricesystem/Price/PriceBill.vue
  7. 28
      src/views/Pricesystem/Price/PriceTrunkLine.vue
  8. 9
      src/views/distribution/artery/AddVehicleStowage.vue
  9. 3
      src/views/distribution/artery/TripartiteTransfer.vue
  10. 489
      src/views/distribution/artery/TripartiteTransferDetails.vue
  11. 3
      src/views/distribution/artery/VehicleStowageDetails.vue
  12. 31
      src/views/distribution/inventory/BookingNote.vue
  13. 3454
      src/views/distribution/inventory/CreateOrder - 副本.vue
  14. 29
      src/views/waybill/WaybillOrderList.vue

4
src/api/distribution/TripartiteTransfer.js

@ -78,7 +78,7 @@ export const postFindCarrierByName = data => {
};
/**
* 通过名称查询承运商
* 文员签收
*/
export const postSignCars = data => {
return request({
@ -89,7 +89,7 @@ export const postSignCars = data => {
};
/**
* 通过名称查询承运商
* 结算提交
*/
export const postSettlementCars = data => {
return request({

2
src/option/distribution/BookingNote.js

@ -20,7 +20,7 @@ export const WaybillTrackingColumnList = [
head: false,
},
{
prop: 'trackType',
prop: 'trackTypeName',
label: '批次状态',
type: 1,
values: '',

103
src/option/distribution/addVehicleStowage.js

@ -158,7 +158,6 @@ export const columnList = [
values: '',
width: 55,
fixed: true,
isshowSummary: true,
},
{
prop: 'createTime',
@ -190,6 +189,7 @@ export const columnList = [
checkarr: [],
fixed: false,
sortable: true,
isColumnMerge: true,
isshowSummary: false,
},
{
@ -201,6 +201,7 @@ export const columnList = [
checkarr: [],
fixed: false,
sortable: true,
isColumnMerge: true,
isshowSummary: false,
},
{
@ -212,6 +213,7 @@ export const columnList = [
checkarr: [],
fixed: false,
sortable: true,
isColumnMerge: true,
isshowSummary: false,
},
{
@ -233,6 +235,7 @@ export const columnList = [
width: '130',
checkarr: [],
fixed: false,
isColumnMerge: true,
sortable: true,
},
{
@ -243,6 +246,7 @@ export const columnList = [
width: '130',
checkarr: [],
fixed: false,
isColumnMerge: true,
sortable: true,
},
{
@ -255,6 +259,18 @@ export const columnList = [
fixed: false,
sortable: true,
},
{
prop: 'waybillNum',
label: '运单总件数',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
isColumnMerge: true,
isshowSummary: true,
sortable: true,
},
{
prop: 'totalNum',
label: '件数',
@ -278,17 +294,40 @@ export const columnList = [
sortable: true,
},
{
prop: 'price',
label: '单价',
prop: 'loadingNum',
label: '装车数',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
isshowSummary: true,
sortable: true,
},
{
prop: 'totalWeight',
prop: 'unloadNum',
label: '卸车数',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
isshowSummary: true,
sortable: true,
},
{
prop: 'openPrice',
label: '运单开单价格',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
isColumnMerge: true,
sortable: true,
},
{
prop: 'weight',
label: '重量(KG)',
type: 1,
values: '',
@ -299,7 +338,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'totalVolume',
prop: 'volume',
label: '体积',
type: 1,
values: '',
@ -310,14 +349,37 @@ export const columnList = [
sortable: true,
},
{
prop: 'freight',
label: '运费',
prop: 'unloadIncome',
label: '卸车收入',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
isshowSummary: true,
isColumnMerge: true,
sortable: true,
},
{
prop: 'orderFreight',
label: '订单运费',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
isshowSummary: true,
sortable: true,
},
{
prop: 'orderFreight',
label: '订单运费',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
isshowSummary: true,
sortable: true,
},
{
@ -339,6 +401,7 @@ export const columnList = [
checkarr: [],
fixed: false,
sortable: true,
isColumnMerge: true,
isshowSummary: false,
},
];
@ -863,6 +926,7 @@ export const detailsColumnList = [
checkarr: [],
fixed: false,
isshowSummary: true,
isColumnMerge: true,
sortable: true,
},
{
@ -874,7 +938,6 @@ export const detailsColumnList = [
checkarr: [],
fixed: false,
isshowSummary: true,
isColumnMerge: true,
sortable: true,
},
{
@ -973,18 +1036,18 @@ export const detailsColumnList = [
isColumnMerge: true,
sortable: true,
},
{
prop: 'totalFee',
label: '审核状态',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
isshowSummary: true,
isColumnMerge: true,
sortable: true,
},
// {
// prop: 'totalFee',
// label: '审核状态',
// type: 2,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// isshowSummary: true,
// isColumnMerge: true,
// sortable: true,
// },
// {
// prop: 'freight',
// label: '作废运单号',

88
src/option/waybill/WaybillOrderList.js

@ -360,12 +360,35 @@ export const columnList = [
sortable: true,
},
{
prop: 'payWay',
prop: 'payTypeName',
label: '支付方式',
type: 3,
values: '',
width: '130',
checkarr: [
{ label: '现金', value: 1 },
{ label: '银行卡', value: 2 },
{ label: '微信', value: 3 },
{ label: '支付宝', value: 4 },
{ label: '支票', value: 5 },
{ label: '账本', value: 6 },
],
fixed: false,
sortable: false,
},
{
prop: 'payWayName',
label: '付款方式',
type: 1,
type: 3,
values: '',
width: '130',
checkarr: [],
checkarr: [
{ label: '现付', value: 1 },
{ label: '到付', value: 2 },
{ label: '月结', value: 3 },
{ label: '回付', value: 4 },
{ label: '内部结算', value: 5 },
],
fixed: false,
sortable: false,
},
@ -414,22 +437,35 @@ export const columnList = [
sortable: true,
},
{
prop: 'deliveryWay',
prop: 'deliveryWayName',
label: '送货方式',
type: 1,
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 },
],
fixed: false,
sortable: false,
},
{
prop: 'urgency',
prop: 'urgencyName',
label: '紧急度',
type: 1,
type: 3,
values: '',
width: '130',
checkarr: [],
checkarr: [
{ label: '正常', value: 1 },
{ label: '急', value: 2 },
{ label: '加急', value: 3 },
{ label: '特急', value: 4 },
],
fixed: false,
isshowSummary: false,
sortable: true,
@ -446,23 +482,41 @@ export const columnList = [
sortable: true,
},
{
prop: 'receipt',
prop: 'receiptName',
label: '回单要求',
type: 1,
values: '',
width: '130',
checkarr: [],
type: 3,
values: '',
width: '130',
checkarr: [
{ label: '签回单', value: 1 },
{ label: '签原单', value: 2 },
{ label: '打收条', value: 3 },
{ label: '签信封', value: 4 },
{ label: '签回单盖章', value: 5 },
{ label: '1份回单', value: 6 },
{ label: '2份回单', value: 7 },
{ label: '3份回单', value: 8 },
{ label: '4份回单', value: 9 },
{ label: '5份回单', value: 10 },
],
fixed: false,
isshowSummary: false,
sortable: true,
},
{
prop: 'transportType',
prop: 'transportTypeName',
label: '运输方式',
type: 1,
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 },
],
fixed: false,
sortable: true,
},

4
src/styles/common.scss

@ -231,6 +231,10 @@ a {
}
}
.text-left {
text-align: left;
}
// 二维码弹窗
.el-dialog-QRCode-container {
max-height: 80vh;

32
src/views/Pricesystem/Price/PriceBill.vue

@ -171,9 +171,11 @@
<el-divider content-position="left">最低计费</el-divider>
<el-form label-width="130px" :model="details.form" inline>
<el-form-item
label="最低计费价格"
:label="
details.minCostType.find(val => val.value === Number(details.form.pickupMinCostType))
.label
"
prop="minCost"
:rules="[{ required: true, validator: validatePrice, trigger: ['blur', 'change'] }]"
>
<el-input-number
v-model="details.form.minCost"
@ -185,11 +187,7 @@
/>
</el-form-item>
<el-form-item
label="加算价格"
prop="additionalCost"
:rules="[{ required: true, validator: validatePrice, trigger: ['blur', 'change'] }]"
>
<el-form-item label="加算价格" prop="additionalCost">
<el-input-number
v-model="details.form.additionalCost"
style="width: 13vw"
@ -487,15 +485,16 @@
<el-divider content-position="left">最低计费</el-divider>
<el-form label-width="130px" :model="details.form" inline>
<el-form-item
label="最低计费价格"
:label="
details.minCostType.find(val => val.value === Number(details.form.pickupMinCostType))
.label
"
prop="minCost"
:rules="[{ required: true, validator: validatePrice, trigger: ['blur', 'change'] }]"
>
<el-input-number
v-model="details.form.minCost"
style="width: 13vw"
:controls="false"
:precision="2"
:value-on-clear="0"
:min="0"
/>
@ -504,7 +503,7 @@
<el-form-item
label="加算价格"
prop="additionalCost"
:rules="[{ required: true, validator: validatePrice, trigger: ['blur', 'change'] }]"
v-if="Number(details.form.pickupMinCostType) !== 1"
>
<el-input-number
v-model="details.form.additionalCost"
@ -706,6 +705,12 @@ const details = reactive({
regionOptione: [],
/** 提货路线type */
lineType: 'add' as 'add' | 'edit',
minCostType: [
{ label: '按价格最低计费', value: 1 },
{ label: '按件最低计费', value: 2 },
{ label: '按方数最低计费', value: 3 },
{ label: '按重量最低计费', value: 4 },
],
});
const tableNode = ref();
@ -834,7 +839,7 @@ const handleVehicleTypeArr = response => {
if (code !== 200) return;
details.vehicleTypeArr = data || [];
details.vehicleTypeArr = deepClone(data) || [];
};
/** 获取业务字典 */
@ -1119,6 +1124,9 @@ const handleAdd = () => {
}
}
details.form.minCost = 0;
details.form.additionalCost = 0;
details.popUpShow.addVsitied = true;
};

28
src/views/Pricesystem/Price/PriceTrunkLine.vue

@ -175,9 +175,11 @@
<el-divider content-position="left">最低计费</el-divider>
<el-form label-width="130px" :model="details.form" inline>
<el-form-item
label="最低计费价格"
:label="
details.minCostType.find(val => val.value === Number(details.form.pickupMinCostType))
.label
"
prop="minCost"
:rules="[{ required: true, validator: validatePrice, trigger: ['blur', 'change'] }]"
>
<el-input-number
v-model="details.form.minCost"
@ -192,7 +194,7 @@
<el-form-item
label="加算价格"
prop="additionalCost"
:rules="[{ required: true, validator: validatePrice, trigger: ['blur', 'change'] }]"
v-if="Number(details.form.pickupMinCostType) !== 1"
>
<el-input-number
v-model="details.form.additionalCost"
@ -495,9 +497,11 @@
<el-divider content-position="left">最低计费</el-divider>
<el-form label-width="130px" :model="details.form" inline>
<el-form-item
label="最低计费价格"
:label="
details.minCostType.find(val => val.value === Number(details.form.pickupMinCostType))
.label
"
prop="minCost"
:rules="[{ required: true, validator: validatePrice, trigger: ['blur', 'change'] }]"
>
<el-input-number
v-model="details.form.minCost"
@ -512,7 +516,7 @@
<el-form-item
label="加算价格"
prop="additionalCost"
:rules="[{ required: true, validator: validatePrice, trigger: ['blur', 'change'] }]"
v-if="Number(details.form.pickupMinCostType) !== 1"
>
<el-input-number
v-model="details.form.additionalCost"
@ -714,6 +718,12 @@ const details = reactive({
regionOptione: [],
/** 提货路线type */
lineType: 'add' as 'add' | 'edit',
minCostType: [
{ label: '按价格最低计费', value: 1 },
{ label: '按件最低计费', value: 2 },
{ label: '按方数最低计费', value: 3 },
{ label: '按重量最低计费', value: 4 },
],
});
const tableNode = ref();
@ -807,7 +817,7 @@ const handleVehicleTypeArr = response => {
if (code !== 200) return;
details.vehicleTypeArr = data || [];
details.vehicleTypeArr = deepClone(data) || [];
};
/** 获取业务字典 */
@ -1093,6 +1103,10 @@ const handleAdd = () => {
item.price = 0;
}
}
details.form.minCost = 0;
details.form.additionalCost = 0;
details.popUpShow.addVsitied = true;
};

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

@ -1697,10 +1697,9 @@ const editSubmit = async () => {
//
val.updateType = 2;
//
} else if (_index !== i) {
} else {
val.updateType = 1;
//
} else val.updateType = 0;
}
delete val.blackList;
if (i === 0) return;
//
@ -1743,8 +1742,8 @@ const editSubmit = async () => {
}
// ,
if ((val.updateType !== 2 && _addArr.length > 0) || val.MappingData.length > 0)
val.updateType = 1;
// if ((val.updateType !== 2 && _addArr.length > 0) || val.MappingData.length > 0)
// val.updateType = 1;
_lineCarsOrderList = [..._lineCarsOrderList, ..._addArr];
_removeList = [..._removeList, ...val.MappingData];

3
src/views/distribution/artery/TripartiteTransfer.vue

@ -912,6 +912,9 @@ const editTransfer = async () => {
if (_length > 1) return ElMessage.warning('只能选择一条数据修改');
if (Number(details.selectionList[0].isSettlement) === 1)
return ElMessage.warning('已结算, 无法修改');
const _item = details.selectionList[0];
$router.push({

489
src/views/distribution/artery/TripartiteTransferDetails.vue

@ -1,7 +1,7 @@
<template>
<basic-container v-loading="details.loadingObj.pageLoading">
<div class="avue-crud">
<el-tabs type="border-card" v-model="details.activeTab">
<el-tabs @tab-click="handleCheckTab" type="border-card" v-model="details.activeTab">
<el-tab-pane label="详 情 信 息" name="tab1">
<!-- 标题 基础信息 -->
<el-divider content-position="left">
@ -13,34 +13,18 @@
<el-form disabled :inline="true" label-width="100px" :model="form" class="el-fr-d">
<div class="fo-fl">
<el-form-item label="中转承运商" prop="carrierName" style="flex: 1">
<el-select
v-model="form.carrierName"
filterable
:teleported="false"
remote
reserve-keyword
placeholder="中转承运商"
@change="val => carrierNameChange()"
:remote-method="remoteMethod"
:loading="details.loadingObj.loading"
>
<el-option
v-for="val in details.carrierNameOptions"
:key="val.carrierName"
:label="val.carrierName"
:value="val.carrierId"
/>
</el-select>
<el-input v-model="form.carrierName"> </el-input>
</el-form-item>
<el-form-item label="经办人" prop="operator">
<el-input v-model="form.operator" />
</el-form-item>
<el-form-item label="送货方式" prop="deliveryType">
<el-select
:teleported="false"
v-model="form.deliveryType"
class="m-2"
placeholder="运费分摊方式"
size="default"
>
<el-option
@ -51,14 +35,9 @@
/>
</el-select>
</el-form-item>
<el-form-item label="付款方式" prop="payMethod">
<el-select
:teleported="false"
v-model="form.payMethod"
class="m-2"
placeholder="运费分摊方式"
size="default"
>
<el-select :teleported="false" v-model="form.payMethod" class="m-2" size="default">
<el-option
v-for="item in details.pageInfo.payMethod || []"
:key="item.dictValue"
@ -67,14 +46,9 @@
/>
</el-select>
</el-form-item>
<el-form-item label="运费分摊方式" prop="chargeType">
<el-select
:teleported="false"
v-model="form.chargeType"
class="m-2"
placeholder="运费分摊方式"
size="default"
>
<el-select :teleported="false" v-model="form.chargeType" class="m-2" size="default">
<el-option
v-for="item in details.pageInfo.chargeType || []"
:key="item.dictValue"
@ -83,6 +57,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="送货司机" prop="driverName">
<el-select
v-model="form.driverName"
@ -91,7 +66,6 @@
remote
@change="handleNameChange"
reserve-keyword
placeholder="输入司机名称"
:remote-method="remoteMethodDriver"
:loading="details.loadingObj.loading"
>
@ -103,13 +77,13 @@
/>
</el-select>
</el-form-item>
<el-form-item label="客户类型" prop="customerType">
<el-select
:teleported="false"
v-model="form.customerType"
class="m-2"
multiple
placeholder="客户类型"
size="default"
>
<el-option
@ -120,12 +94,12 @@
/>
</el-select>
</el-form-item>
<el-form-item label="是否结算" prop="isSettlement">
<el-select
:teleported="false"
v-model="form.isSettlement"
class="m-2"
placeholder="是否结算"
size="default"
>
<el-option
@ -136,57 +110,59 @@
/>
</el-select>
</el-form-item>
<el-form-item label="代收贷款" prop="replacePrice">
<el-input-number
v-model="form.replacePrice"
placeholder="代收贷款"
:precision="2"
:min="0"
:step="1"
controls-position="right"
:controls="false"
/>
</el-form-item>
<el-form-item label="承运单号" prop="carrierOrderCode">
<el-input v-model="form.carrierOrderCode" placeholder="承运单号" />
<el-input v-model="form.carrierOrderCode" />
</el-form-item>
<el-form-item label="承运时间" prop="carrierTimeStr">
<el-date-picker
v-model="form.carrierTimeStr"
type="date"
placeholder="承运时间"
size="default"
:teleported="false"
/>
</el-form-item>
<el-form-item label="客户收货时间" prop="receivingTimeStr">
<el-date-picker
v-model="form.receivingTimeStr"
type="date"
placeholder="客户收货时间"
size="default"
:teleported="false"
/>
</el-form-item>
<el-form-item label="运费" prop="countTransportCost">
<el-input-number
v-model="form.countTransportCost"
:precision="2"
placeholder="运费"
:min="0"
:step="1"
controls-position="right"
:controls="false"
/>
</el-form-item>
<el-form-item label="司机结算费" prop="settlementValue">
<el-input-number
v-model="form.settlementValue"
:precision="2"
:min="0"
placeholder="司机结算费"
:step="1"
controls-position="right"
:controls="false"
/>
</el-form-item>
<div style="flex: 1; padding-right: 0">
<el-form-item
style="width: 100%; margin: 0"
@ -194,8 +170,8 @@
label-width="100px"
:inline="false"
>
<el-input type="textarea" v-model="form.remark" placeholder="备注"
/></el-form-item>
<el-input type="textarea" v-model="form.remark" />
</el-form-item>
</div>
</div>
</el-form>
@ -211,27 +187,30 @@
<!-- 列表模块 -->
<div v-h5uShow="!search">
<el-form :inline="true" label-width="80px" :model="details.oldQuery" class="el-fr-d">
<div class="fo-fl">
<el-form-item class="el-times" label="开单时间">
<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>
<el-button type="primary" icon="el-icon-search" @click="searchReset()"
> </el-button
>
<el-button icon="el-icon-delete" @click="searchReset()">重置</el-button>
</el-form-item>
</div>
<el-form
:inline="true"
label-width="80px"
:model="details.oldQuery"
class="header_search"
>
<el-form-item class="el-times" label="开单时间">
<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>
<el-button type="primary" icon="el-icon-search" @click="searchReset()"
> </el-button
>
<el-button icon="el-icon-delete" @click="searchReset()">重置</el-button>
</el-form-item>
</el-form>
</div>
@ -259,36 +238,45 @@
@selectCheck="selectsc"
@selection="selectionChange"
>
</tablecmt>
<!-- 分页模块 -->
<div class="avue-crud__pagination flex-c-sb" style="width: 100%">
<el-pagination
style="zoom: 0.9"
align="right"
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="oldPage.pageNum"
:page-sizes="[30, 50, 80, 120]"
:page-size="oldPage.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="oldPage.total"
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '运单号'">
<el-text @click="handleGoWaybillDetails(slotProps.scope)">
{{ slotProps.scope.row.waybillNo }}
</el-text>
</template></template
>
</el-pagination>
</div>
</tablecmt>
</el-tab-pane>
<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="details.loadLogsList.length">
<el-step :title="item.abstText" v-for="item in details.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.updateTime }}</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 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>
@ -317,7 +305,7 @@ import { mapGetters } from 'vuex';
/** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict';
import { downloadXls, computeNumber, setNodeHeight, debounce, deepClone } from '@/utils/util';
import { columnList, newColumnList } from '@/option/distribution/addVehicleStowage';
import { columnList } from '@/option/distribution/addVehicleStowage';
import {
postloadFindLoadInitData,
postFindWarehouseListByName,
@ -327,7 +315,9 @@ import {
postFindUseOrderList,
postSelectEditDetailByLoadId,
} from '@/api/distribution/AddVehicleStowage';
import { postCarsLoadDetailInfo } from '@/api/distribution/VehicleStowageDetails.js';
import { postSaveNewTripartiteTransfer } from '@/api/distribution/addTripartiteTransfer.js';
import { postFindCarsLoadLogs } from '@/api/distribution/VehicleStowageDetails.js';
import type { FormInstance, FormRules } from 'element-plus';
import { useRouter, useRoute } from 'vue-router';
import { useStore } from 'vuex';
@ -344,7 +334,6 @@ const ruleFormRef = ref();
//
const oldColumnListNode = ref();
const newColumnListNode = ref();
const details = reactive<any>({
activeTab: 'tab1',
@ -388,8 +377,6 @@ const details = reactive<any>({
editColumnList: [],
/** 运单池 */
columnList: deepClone(columnList),
/** 调度池 */
newColumnList: deepClone(newColumnList),
/** 列表数据 */
oldData: [],
/** 渲染数据 */
@ -489,8 +476,19 @@ const details = reactive<any>({
driverListByName: [],
/** 被选中在调度池的订单列表 */
orderCodeList: [],
/** 配载日志 */
loadLogsList: [],
});
for (let i = 0; i < details.columnList.length; i++) {
const value = details.columnList[i];
if (value.prop === 'waybillNo') {
value.type = 13;
break;
}
}
const {
search,
query,
@ -601,7 +599,8 @@ const onLoad = debounce(async () => {
//
postloadFindLoadInitData(),
//
postSelectEditDetailByLoadId({ loadId: $route.query.loadId }),
// postSelectEditDetailByLoadId({ loadId: $route.query.loadId }),
postCarsLoadDetailInfo({ loadId: $route.query.loadId }),
]);
console.log('promiseAll :>> ', promiseAll);
@ -624,20 +623,37 @@ const onLoad = debounce(async () => {
details.customerType = data.customerType;
console.log('data :>> ', data);
details.form = data1.carsLoadEntity;
details.form.customerType = data1.carsLoadEntity.customerType.split(',');
details.form = data1;
details.form.customerType = data1.customerType.split(',');
details.form.startWarehouseName = data.startWarehouseInfo.warehouseName;
details.form.startWarehouseId = data.startWarehouseInfo.warehouseId;
details.form.endWarehouseNames = data.startWarehouseInfo.warehouseName;
details.form.endWarehouseIds = data.startWarehouseInfo.warehouseId;
details.form.carsLineName = data.startWarehouseInfo.warehouseName;
details.form.carrierTimeStr = details.form.carrierTime;
details.form.receivingTimeStr = details.form.receivingTime;
delete details.form.carrierTime;
delete details.form.receivingTime;
await initOriginWarehouseOrder();
data1.carsLoadWaybillInfoList.forEach(val => {
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] = '';
}
}
return item;
})
);
});
// await initOriginWarehouseOrder();
} catch (error) {
console.log('error :>> ', error);
} finally {
@ -667,27 +683,6 @@ const initOriginWarehouseOrder = async (params = {}) => {
}
};
/** 请求添加在调度池中的数据 */
const initDispatchOrder = async () => {
//
const submitData = {
loadId: $route.query.loadId,
finalNodeId: details.form.startWarehouseId,
};
const res = await postFindUseOrderList(submitData);
const { code, data } = res.data;
if (code !== 200) return;
details.newData = data;
details.newRenderData = data;
details.MappingData = JSON.parse(JSON.stringify(data));
details.orderCodeList = [];
details.orderCodeList = [
...new Set([...details.orderCodeList, ...data.map(val => val.orderCode + ',' + val.waybillNo)]),
];
};
/** 搜索 */
const searchChange = () => {
onLoad();
@ -705,9 +700,6 @@ const searchReset = () => {
const clearSelectionList = () => {
details.selectionList = [];
details.newSelectionList = [];
console.log('newColumnListNode :>> ', newColumnListNode);
console.log('oldColumnListNode :>> ', oldColumnListNode);
newColumnListNode.value.handleCheckSelect([]);
oldColumnListNode.value.handleCheckSelect([]);
};
@ -730,17 +722,6 @@ const searchHide = async () => {
setNodeHeight(details.listNode, '50vh');
};
/** 远程搜索承运商 */
const remoteMethod = value => {
if (!value) return;
debounce(async () => {
const res = await postFindCarrierByName({ carrierName: value });
const { code, data } = res.data;
if (code !== 200) return;
details.carrierNameOptions = data;
}, 500)();
};
/** 查询司机信息 */
const remoteMethodDriver = async val => {
const res = await postFindDriverListByName({ driverName: val });
@ -851,50 +832,6 @@ const setnewcolum = (newarr, headarr, type) => {
}
};
/** 加入调度池 */
const handleAddWaybill = () => {
details.newData = details.selectionList.map(val => {
val.planNum = val.stockNum;
val.loadingNum = 0;
return val;
});
details.orderCodeList = [
...new Set([
...details.orderCodeList,
...details.selectionList.map(val => val.orderCode + ',' + val.waybillNo),
]),
];
console.log('details.orderCodeList :>> ', details.orderCodeList);
const orderCodes = details.selectionList.map(val => val.orderCode);
clearSelectionList();
details.page.pageNum = 1;
initOriginWarehouseOrder();
};
/** 移除调度池 */
const handleRemoveWaybill = () => {
//
details.newData = details.newData.filter((val, index) => {
const _flag = !details.newSelectionList.includes(val);
if (!_flag) {
const _code = val.orderCode + ',' + val.waybillNo;
const _index = details.orderCodeList.indexOf(_code);
// +
details.orderCodeList.splice(_index, 1);
}
return _flag;
});
clearSelectionList();
initOriginWarehouseOrder();
};
/** 新增承运商 */
const handleAddCarrier = () => {
$router.push({ path: '/basicdata/carrier/basicdataCarrier' });
};
/** 选择承运商 */
const carrierNameChange = () => {};
@ -908,70 +845,57 @@ const handleNameChange = () => {
form.value.driverMobile = _value.driverPhone;
};
/** 请求日志跟踪 */
const handleSignLoadScanLogs = async () => {
try {
details.loadingObj.pageLoading = true;
const submitData = { loadId: $route.query.loadId };
const res = await postFindCarsLoadLogs(submitData);
const { code, data } = res.data;
if (code !== 200) return;
details.loadLogsList = data;
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
};
const handleCheckTab = e => {
console.log('e :>> ', e);
switch (e.props.name) {
//
case 'tab2':
handleSignLoadScanLogs();
break;
default:
break;
}
};
/** 查看运单 */
const handleGoWaybillDetails = ({ row }) => {
console.log('row :>> ', row);
$router.push({
path: '/distribution/inventory/BookingNote',
query: {
name: `查看 -- 【${row.waybillNo}`,
waybillNo: row.waybillNo,
id: row.waybillId,
waybillType: row.waybillType,
},
});
};
/** 关闭页面 */
const back = () => {
$store.commit('DEL_TAG_CURRENT');
$router.push({ path: '/distribution/artery/TripartiteTransfer' });
};
/** 提交 */
const handleSubmit = (formEl: FormInstance | undefined) => {
if (!formEl) return;
console.log('111 :>> ', 111);
formEl.validate(async (valid, fields) => {
if (valid) {
const submitData = {
...form.value,
carsLoadLineList: JSON.parse(JSON.stringify(details.newData)),
};
console.log('submitData :>> ', submitData);
//
// let _lineCarsOrderList = [];
// submitData.carsLoadLineList.forEach((val, i) => {
// val.nodeType = '1';
// val.sort = i + 1;
// delete val.blackList;
// if (i === 0) return;
// //
// delete val.query;
// delete val.selectionList;
// delete val.loading;
// delete val.data;
// delete val.filterData;
// _lineCarsOrderList = [
// ..._lineCarsOrderList,
// ...val.lineCarsOrderList.map(value => {
// value.nodeId = submitData.startWarehouseId;
// value.nodeName = submitData.startWarehouseName;
// value.finalNodeId = val.nodeId;
// value.totalNum = 20;
// return value;
// }),
// ];
// delete val.lineCarsOrderList;
// });
// submitData.carsLoadLineList[0].lineCarsOrderList = _lineCarsOrderList;
// console.log('submitData :>> ', submitData);
// const res = await postSaveNewTripartiteTransfer(submitData);
// const { code, msg } = res.data;
// if (code !== 200) return;
// ElMessage({
// message: msg,
// type: 'success',
// });
// back();
// console.log('res :>> ', res);
} else {
console.log('error submit!', fields);
}
});
};
watch($route, () => {
if ($route.path !== '/distribution/artery/TripartiteTransferDetails') return;
onLoad();
@ -1013,59 +937,6 @@ watch($route, () => {
width: 100%;
}
//
.add_row {
display: flex;
justify-content: space-between;
}
.add_row_title {
text-align: center;
margin-bottom: 10px;
font-size: 18px;
font-weight: bold;
}
//
.statistics_row {
margin: 10px 0;
font-size: 14px;
zoom: 0.9;
display: flex;
> div {
margin-right: 20px;
}
}
//
.crad_container {
display: flex;
.card_container_item {
flex: 1;
// padding: 10px;
border-radius: 5px;
box-shadow: 0 0 5px #ccc;
&:first-child {
margin-right: 20px;
}
.card_container_item_title {
padding: 10px;
border-bottom: 1px solid #ccc;
display: flex;
justify-content: space-between;
align-items: center;
}
.card_container_item_box {
padding: 10px;
}
}
}
.pointer {
cursor: pointer;
}
@ -1099,11 +970,6 @@ watch($route, () => {
height: 30px;
}
//
:deep(.nodeInfo .el-table .cell) {
overflow: initial;
}
:deep(.slotbuts) {
height: 30px;
@ -1112,22 +978,21 @@ watch($route, () => {
}
}
//
:deep(.el-form-item__error) {
z-index: 99;
--el-color-danger: #f00;
//
:deep(.el-input.is-disabled .el-input__wrapper) {
background-color: #fff;
color: #000 !important;
-webkit-text-fill-color: #000 !important;
}
:deep(.el-form-item.is-error .el-input__wrapper) {
--el-color-danger: #f00;
:deep(.el-input.is-disabled .el-input__inner) {
color: #000 !important;
-webkit-text-fill-color: #000 !important;
text-align: left;
}
:deep(
.el-form-item.is-required:not(.is-no-asterisk).asterisk-left > .el-form-item__label:before,
.el-form-item.is-required:not(.is-no-asterisk).asterisk-left
> .el-form-item__label-wrap
> .el-form-item__label:before
) {
--el-color-danger: #f00;
:deep(.el-textarea.is-disabled .el-textarea__inner) {
background-color: #fff;
color: #000 !important;
}
</style>

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

@ -68,7 +68,7 @@
</el-select>
</el-form-item>
<el-form-item label="经办人">
<el-input readonly v-model="form.userName" />
<el-input readonly v-model="form.operator" />
</el-form-item>
<el-form-item label="合计运输费" prop="customerType">
<el-input readonly v-model="form.countTransportCost" />
@ -1002,6 +1002,7 @@ const handleGoWayBillDetail = ({ row }) => {
name: `查看 -- 【${row.waybillNo}`,
waybillNo: row.waybillNo,
id: row.waybillId,
waybillType: row.waybillType,
},
});
};

31
src/views/distribution/inventory/BookingNote.vue

@ -1530,6 +1530,7 @@ const onLoad = async () => {
}
};
/** 查看运单跟踪 */
const handleFindInfo = async type => {
try {
details.loadingObj.pageLaoding = true;
@ -1543,6 +1544,31 @@ const handleFindInfo = async type => {
if (code !== 200) return;
details.data = data || [];
//
const _batchStatus = [
{ 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: 888 },
{ label: '审核运单', value: 999 },
];
for (let i = 0; i < details.data.length; i++) {
const value = details.data[i];
for (let i = 0; i < _batchStatus.length; i++) {
const item = _batchStatus[i];
if (item.value === Number(value.trackType)) continue;
value.trackTypeName = item.label;
break;
}
}
} catch (error) {
console.log('error :>> ', error);
} finally {
@ -1712,7 +1738,7 @@ const back = () => {
/** 前往修改页面 */
const handleEdit = () => {
if (Number($route.query.waybillType) === 1) {
if (Number(details.query.waybillType) === 1 || details.query.orderCode) {
//
$store.commit('DEL_ONCE_TAG', '/distribution/inventory/CreateOrder');
@ -1724,9 +1750,10 @@ const handleEdit = () => {
id: $route.query.id,
type: 'edit',
backPath: '/waybill/WaybillOrderList',
orderStatus: Number(details.query.waybillType) === 1 ? 'haveData' : 'notHaveData',
},
});
} else if (Number($route.query.waybillType) === 2) {
} else if (Number(details.query.waybillType) === 2 && !details.query.orderCode) {
//
$router.push({

3454
src/views/distribution/inventory/CreateOrder - 副本.vue

File diff suppressed because it is too large Load Diff

29
src/views/waybill/WaybillOrderList.vue

@ -427,9 +427,38 @@ const onLoad = async (page?: any, 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);
}
details.data = data.records;
for (let i = 0; i < details.data.length; i++) {
const value = details.data[i];
for (let index = 0; index < _translationArr.length; index++) {
const item = _translationArr[index];
for (let j = 0; j < item.checkarr.length; j++) {
const val = item.checkarr[j];
if (Number(value[item.prop.replace('Name', '')]) !== val.value) continue;
value[item.prop] = val.label;
break;
}
}
}
console.log('details.data :>> ', details.data);
details.page.total = data.total;
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.list = false;
}

Loading…
Cancel
Save