Browse Source

修改部分干线, 新增搜索

dev-xx
qb 1 year ago
parent
commit
c8ee8cf18f
  1. 11
      src/api/distribution/addTripartiteTransfer.js
  2. 66
      src/option/distribution/addVehicleStowage.js
  3. 38
      src/views/distribution/artery/TripartiteTransfer.vue
  4. 143
      src/views/distribution/artery/TripartiteTransferDetails.vue
  5. 211
      src/views/distribution/artery/VehicleStowageDetails.vue
  6. 451
      src/views/distribution/artery/addTripartiteTransfer.vue
  7. 3
      src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue
  8. 2
      src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue
  9. 2
      src/views/distribution/reservation/reservation.vue
  10. 33
      src/views/distribution/reservation/reservationAddFrom.vue

11
src/api/distribution/addTripartiteTransfer.js

@ -66,6 +66,17 @@ export const postSaveNewTripartiteTransfer = data => {
}); });
}; };
/**
* 新增配载计划
*/
export const postUpdateTripartiteTransfer = data => {
return request({
url: '/api/logpm-trunkline/tripartiteTransfer/updateTripartiteTransfer',
method: 'post',
data,
});
};
/** /**
* 通过名称查询承运商 * 通过名称查询承运商
*/ */

66
src/option/distribution/addVehicleStowage.js

@ -597,7 +597,7 @@ export const detailsColumnList = [
{ {
prop: 'waybillNo', prop: 'waybillNo',
label: '运单号', label: '运单号',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -609,7 +609,7 @@ export const detailsColumnList = [
{ {
prop: 'orderCode', prop: 'orderCode',
label: '订单自编号', label: '订单自编号',
type: 1, type: 2,
values: '', values: '',
width: '150', width: '150',
checkarr: [], checkarr: [],
@ -631,7 +631,7 @@ export const detailsColumnList = [
{ {
prop: 'destination', prop: 'destination',
label: '到站', label: '到站',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -643,7 +643,7 @@ export const detailsColumnList = [
{ {
prop: 'destinationWarehouseName', prop: 'destinationWarehouseName',
label: '目的站', label: '目的站',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -655,7 +655,7 @@ export const detailsColumnList = [
{ {
prop: 'shipper', prop: 'shipper',
label: '发货单位', label: '发货单位',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -667,7 +667,7 @@ export const detailsColumnList = [
{ {
prop: 'consignee', prop: 'consignee',
label: '收货单位', label: '收货单位',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -678,7 +678,7 @@ export const detailsColumnList = [
{ {
prop: 'consigneeName', prop: 'consigneeName',
label: '收货人', label: '收货人',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -689,7 +689,7 @@ export const detailsColumnList = [
{ {
prop: 'waybillNum', prop: 'waybillNum',
label: '运单总件数', label: '运单总件数',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -701,7 +701,7 @@ export const detailsColumnList = [
{ {
prop: 'orderNum', prop: 'orderNum',
label: '件数', label: '件数',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -712,7 +712,7 @@ export const detailsColumnList = [
{ {
prop: 'planNum', prop: 'planNum',
label: '计划件数', label: '计划件数',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -723,7 +723,7 @@ export const detailsColumnList = [
{ {
prop: 'loadingNum', prop: 'loadingNum',
label: '订单装车件数', label: '订单装车件数',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -734,7 +734,7 @@ export const detailsColumnList = [
{ {
prop: 'unloadNum', prop: 'unloadNum',
label: '卸车件数', label: '卸车件数',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -745,7 +745,7 @@ export const detailsColumnList = [
{ {
prop: 'unloadIncome', prop: 'unloadIncome',
label: '卸车收入', label: '卸车收入',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -756,7 +756,7 @@ export const detailsColumnList = [
{ {
prop: 'orderLineCost', prop: 'orderLineCost',
label: '订单干线成本', label: '订单干线成本',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -767,7 +767,7 @@ export const detailsColumnList = [
// { // {
// prop: 'totalNum', // prop: 'totalNum',
// label: '开单单价', // label: '开单单价',
// type: 1, // type: 2,
// values: '', // values: '',
// width: '130', // width: '130',
// checkarr: [], // checkarr: [],
@ -779,7 +779,7 @@ export const detailsColumnList = [
// { // {
// prop: 'totalNum', // prop: 'totalNum',
// label: '开单名称', // label: '开单名称',
// type: 1, // type: 2,
// values: '', // values: '',
// width: '130', // width: '130',
// checkarr: [], // checkarr: [],
@ -791,7 +791,7 @@ export const detailsColumnList = [
// { // {
// prop: 'totalNum', // prop: 'totalNum',
// label: '订单开单名称', // label: '订单开单名称',
// type: 1, // type: 2,
// values: '', // values: '',
// width: '130', // width: '130',
// checkarr: [], // checkarr: [],
@ -802,7 +802,7 @@ export const detailsColumnList = [
// { // {
// prop: 'productName', // prop: 'productName',
// label: '品类名称', // label: '品类名称',
// type: 1, // type: 2,
// values: '', // values: '',
// width: '130', // width: '130',
// checkarr: [], // checkarr: [],
@ -813,7 +813,7 @@ export const detailsColumnList = [
// { // {
// prop: 'price', // prop: 'price',
// label: '单价', // label: '单价',
// type: 1, // type: 2,
// values: '', // values: '',
// width: '150', // width: '150',
// checkarr: [], // checkarr: [],
@ -824,7 +824,7 @@ export const detailsColumnList = [
{ {
prop: 'weight', prop: 'weight',
label: '重量(KG)', label: '重量(KG)',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -835,7 +835,7 @@ export const detailsColumnList = [
{ {
prop: 'volume', prop: 'volume',
label: '体积', label: '体积',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -846,7 +846,7 @@ export const detailsColumnList = [
{ {
prop: 'totalFreight', prop: 'totalFreight',
label: '运单运费', label: '运单运费',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -857,7 +857,7 @@ export const detailsColumnList = [
{ {
prop: 'orderFreight', prop: 'orderFreight',
label: '订单运费', label: '订单运费',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -869,7 +869,7 @@ export const detailsColumnList = [
{ {
prop: 'deliveryFee', prop: 'deliveryFee',
label: '送货费', label: '送货费',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -881,7 +881,7 @@ export const detailsColumnList = [
{ {
prop: 'pickupFee', prop: 'pickupFee',
label: '提货费', label: '提货费',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -893,7 +893,7 @@ export const detailsColumnList = [
{ {
prop: 'warehouseManagementFee', prop: 'warehouseManagementFee',
label: '仓库管理费', label: '仓库管理费',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -905,7 +905,7 @@ export const detailsColumnList = [
{ {
prop: 'storageFee', prop: 'storageFee',
label: '仓储费', label: '仓储费',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -917,7 +917,7 @@ export const detailsColumnList = [
{ {
prop: 'handlingFee', prop: 'handlingFee',
label: '装卸费', label: '装卸费',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -929,7 +929,7 @@ export const detailsColumnList = [
{ {
prop: 'otherFee', prop: 'otherFee',
label: '其他费用', label: '其他费用',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -941,7 +941,7 @@ export const detailsColumnList = [
{ {
prop: 'insuranceFee', prop: 'insuranceFee',
label: '保价费', label: '保价费',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -953,7 +953,7 @@ export const detailsColumnList = [
{ {
prop: 'totalFee', prop: 'totalFee',
label: '总费用', label: '总费用',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -965,7 +965,7 @@ export const detailsColumnList = [
// { // {
// prop: 'freight', // prop: 'freight',
// label: '作废运单号', // label: '作废运单号',
// type: 1, // type: 2,
// values: '', // values: '',
// width: '130', // width: '130',
// checkarr: [], // checkarr: [],
@ -976,7 +976,7 @@ export const detailsColumnList = [
{ {
prop: 'remark', prop: 'remark',
label: '运单备注', label: '运单备注',
type: 1, type: 2,
values: '', values: '',
width: '180', width: '180',
checkarr: [], checkarr: [],

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

@ -78,9 +78,7 @@
<div class="avue-crud__header"> <div class="avue-crud__header">
<!-- 头部左侧按钮模块 --> <!-- 头部左侧按钮模块 -->
<div class="avue-crud__left"> <div class="avue-crud__left">
<el-button type="primary" icon="Plus" @click="handleShowTransfer('add')" <el-button type="primary" icon="Plus" @click="addTransfer">新增中转 </el-button>
>新增中转
</el-button>
<el-button type="primary" icon="Printer" @click="searchReset()">装载清单</el-button> <el-button type="primary" icon="Printer" @click="searchReset()">装载清单</el-button>
<el-button type="primary" icon="Printer" @click="searchReset()" <el-button type="primary" icon="Printer" @click="searchReset()"
>装载卸车清单(财务)</el-button >装载卸车清单(财务)</el-button
@ -93,7 +91,7 @@
<el-button type="primary" icon="CircleCheck" @click="handleShowConfirm"> <el-button type="primary" icon="CircleCheck" @click="handleShowConfirm">
</el-button> </el-button>
<el-button type="primary" icon="Edit" @click="searchReset()"> </el-button> <el-button type="primary" icon="Edit" @click="editTransfer"> </el-button>
</div> </div>
<!-- 头部右侧按钮模块 --> <!-- 头部右侧按钮模块 -->
<div class="avue-crud__right"> <div class="avue-crud__right">
@ -689,32 +687,28 @@ const handleShowzeroAdditionalRecording = ({ row }) => {
const addTransfer = async () => { const addTransfer = async () => {
$router.push({ $router.push({
path: '/distribution/artery/addTripartiteTransfer', path: '/distribution/artery/addTripartiteTransfer',
name: '新增中转', query: { name: '新增中转', type: 'add' },
}); });
return null;
}; };
/** 修改中转 */ /** 修改中转 */
const editTransfer = async () => { const editTransfer = async () => {
return null; const _length = details.selectionList.length;
};
/** 显示新增或修改中转弹窗 */ if (_length === 0) return ElMessage.warning('请选择一条修改数据');
const handleShowTransfer = async (_type: string) => {
switch (_type) {
//
case 'add':
await addTransfer();
break;
// if (_length > 1) return ElMessage.warning('只能选择一条数据修改');
case 'edit':
await editTransfer();
break;
default: const _item = details.selectionList[0];
break;
} $router.push({
path: '/distribution/artery/addTripartiteTransfer',
query: {
name: '编辑中转',
type: 'edit',
loadId: _item.id,
},
});
}; };
/** 开启到达弹窗 */ /** 开启到达弹窗 */

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

@ -1,5 +1,5 @@
<template> <template>
<basic-container> <basic-container v-loading="details.loadingObj.pageLoading">
<div class="avue-crud"> <div class="avue-crud">
<el-tabs type="border-card" v-model="details.activeTab"> <el-tabs type="border-card" v-model="details.activeTab">
<el-tab-pane label="详 情 信 息" name="tab1"> <el-tab-pane label="详 情 信 息" name="tab1">
@ -35,7 +35,7 @@
<el-form-item label="经办人" prop="operator"> <el-form-item label="经办人" prop="operator">
<el-input v-model="form.operator" /> <el-input v-model="form.operator" />
</el-form-item> </el-form-item>
<el-form-item label="送货方式"> <el-form-item label="送货方式" prop="deliveryType">
<el-select <el-select
:teleported="false" :teleported="false"
v-model="form.deliveryType" v-model="form.deliveryType"
@ -51,7 +51,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="付款方式"> <el-form-item label="付款方式" prop="payMethod">
<el-select <el-select
:teleported="false" :teleported="false"
v-model="form.payMethod" v-model="form.payMethod"
@ -67,7 +67,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="运费分摊方式"> <el-form-item label="运费分摊方式" prop="chargeType">
<el-select <el-select
:teleported="false" :teleported="false"
v-model="form.chargeType" v-model="form.chargeType"
@ -83,7 +83,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="送货司机"> <el-form-item label="送货司机" prop="driverName">
<el-select <el-select
v-model="form.driverName" v-model="form.driverName"
filterable filterable
@ -108,6 +108,7 @@
:teleported="false" :teleported="false"
v-model="form.customerType" v-model="form.customerType"
class="m-2" class="m-2"
multiple
placeholder="客户类型" placeholder="客户类型"
size="default" size="default"
> >
@ -119,10 +120,10 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否结算"> <el-form-item label="是否结算" prop="isSettlement">
<el-select <el-select
:teleported="false" :teleported="false"
v-model="form.settlementStatus" v-model="form.isSettlement"
class="m-2" class="m-2"
placeholder="是否结算" placeholder="是否结算"
size="default" size="default"
@ -135,8 +136,9 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="代收贷款"> <el-form-item label="代收贷款" prop="replacePrice">
<el-input-number <el-input-number
v-model="form.replacePrice"
placeholder="代收贷款" placeholder="代收贷款"
:precision="2" :precision="2"
:min="0" :min="0"
@ -147,27 +149,27 @@
<el-form-item label="承运单号" prop="carrierOrderCode"> <el-form-item label="承运单号" prop="carrierOrderCode">
<el-input v-model="form.carrierOrderCode" placeholder="承运单号" /> <el-input v-model="form.carrierOrderCode" placeholder="承运单号" />
</el-form-item> </el-form-item>
<el-form-item label="承运时间" prop="carrierTime"> <el-form-item label="承运时间" prop="carrierTimeStr">
<el-date-picker <el-date-picker
v-model="form.carrierTime" v-model="form.carrierTimeStr"
type="date" type="date"
placeholder="承运时间" placeholder="承运时间"
size="default" size="default"
:teleported="false" :teleported="false"
/> />
</el-form-item> </el-form-item>
<el-form-item label="客户收货时间"> <el-form-item label="客户收货时间" prop="receivingTimeStr">
<el-date-picker <el-date-picker
v-model="form.value1" v-model="form.receivingTimeStr"
type="date" type="date"
placeholder="客户收货时间" placeholder="客户收货时间"
size="default" size="default"
:teleported="false" :teleported="false"
/> />
</el-form-item> </el-form-item>
<el-form-item label="运费" prop="num"> <el-form-item label="运费" prop="countTransportCost">
<el-input-number <el-input-number
v-model="form.num" v-model="form.countTransportCost"
:precision="2" :precision="2"
placeholder="运费" placeholder="运费"
:min="0" :min="0"
@ -175,8 +177,9 @@
controls-position="right" controls-position="right"
/> />
</el-form-item> </el-form-item>
<el-form-item label="司机结算费"> <el-form-item label="司机结算费" prop="settlementValue">
<el-input-number <el-input-number
v-model="form.settlementValue"
:precision="2" :precision="2"
:min="0" :min="0"
placeholder="司机结算费" placeholder="司机结算费"
@ -207,7 +210,7 @@
<!-- 运单池 && 调度池 --> <!-- 运单池 && 调度池 -->
<!-- 列表模块 --> <!-- 列表模块 -->
<div v-if="!search"> <div v-h5uShow="!search">
<el-form :inline="true" label-width="80px" :model="details.oldQuery" class="el-fr-d"> <el-form :inline="true" label-width="80px" :model="details.oldQuery" class="el-fr-d">
<div class="fo-fl"> <div class="fo-fl">
<el-form-item class="el-times" label="开单时间"> <el-form-item class="el-times" label="开单时间">
@ -220,7 +223,6 @@
end-placeholder="开单日期" end-placeholder="开单日期"
:shortcuts="shortcuts" :shortcuts="shortcuts"
clearable clearable
:teleported="false"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -306,7 +308,7 @@
> >
</edittablehead> </edittablehead>
</template> </template>
<!-- activeTab: 'tab1' -->
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue'; import { ref, reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue';
import functions from '@/utils/functions'; import functions from '@/utils/functions';
@ -323,6 +325,8 @@ import {
postFindCarListByName, postFindCarListByName,
postFindDriverListByName, postFindDriverListByName,
postFindCarrierByName, postFindCarrierByName,
postFindUseOrderList,
postSelectEditDetailByLoadId,
} from '@/api/distribution/AddVehicleStowage'; } from '@/api/distribution/AddVehicleStowage';
import { postSaveNewTripartiteTransfer } from '@/api/distribution/addTripartiteTransfer.js'; import { postSaveNewTripartiteTransfer } from '@/api/distribution/addTripartiteTransfer.js';
import type { FormInstance, FormRules } from 'element-plus'; import type { FormInstance, FormRules } from 'element-plus';
@ -388,8 +392,9 @@ const details = reactive<any>({
/** 调度池 */ /** 调度池 */
newColumnList, newColumnList,
/** 列表数据 */ /** 列表数据 */
newData: [],
oldData: [], oldData: [],
/** 渲染数据 */
renderData: [],
rules: { rules: {
/** 中转承运商 */ /** 中转承运商 */
carrierName: [ carrierName: [
@ -445,6 +450,7 @@ const details = reactive<any>({
/** 列表加载loading */ /** 列表加载loading */
list: false, list: false,
oldListLoading: false, oldListLoading: false,
pageLoading: false,
}, },
/** 列表复选框选中的数据 */ /** 列表复选框选中的数据 */
selectionList: [], selectionList: [],
@ -588,19 +594,56 @@ onMounted(() => {
/** 请求页面数据 */ /** 请求页面数据 */
const onLoad = async () => { const onLoad = async () => {
const res = await postloadFindLoadInitData(); try {
const { code, data } = res.data; details.loadingObj.pageLoading = true;
if (code !== 200) return;
details.pageInfo = data;
details.customerType = data.customerType;
console.log('data :>> ', data);
details.form.startWarehouseName = data.startWarehouseInfo.warehouseName; //
details.form.startWarehouseId = data.startWarehouseInfo.warehouseId; const promiseAll = await Promise.all([
details.form.endWarehouseName = data.startWarehouseInfo.warehouseName; //
details.form.endWarehouseId = data.startWarehouseInfo.warehouseId; postloadFindLoadInitData(),
//
postSelectEditDetailByLoadId({ loadId: $route.query.loadId }),
]);
initOriginWarehouseOrder(); console.log('promiseAll :>> ', promiseAll);
const [
{
data: { code, data },
},
{
data: { code: code1, data: data1 },
},
] = promiseAll;
console.log('code :>> ', code);
console.log('code1 :>> ', code1);
if (code !== 200 && code1 !== 200) return;
details.pageInfo = data;
details.customerType = data.customerType;
console.log('data :>> ', data);
details.form = data1.carsLoadEntity;
details.form.customerType = data1.carsLoadEntity.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();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
}; };
onLoad(); onLoad();
@ -608,21 +651,16 @@ onLoad();
/** 请求运单数据 */ /** 请求运单数据 */
const initOriginWarehouseOrder = async (params = {}) => { const initOriginWarehouseOrder = async (params = {}) => {
try { try {
details.loadingObj.oldListLoading = true; //
const submitData = { const submitData = {
...details.page, loadId: $route.query.loadId,
loadId: details.pageInfo.startWarehouseInfo.warehouseId, finalNodeId: details.form.startWarehouseId,
orderCodes: details.orderCodeList,
...details.query,
...params,
}; };
if (submitData.orderCodes.length === 0) delete submitData.orderCodes; const res = await postFindUseOrderList(submitData);
const res = await postFindAllOrderList(submitData);
console.log('res :>> ', res);
const { code, data } = res.data; const { code, data } = res.data;
if (code !== 200) return; if (code !== 200) return;
details.oldData = data.records; details.oldData = data;
details.page.total = data.total; details.renderData = data;
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);
} finally { } finally {
@ -630,6 +668,27 @@ 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 = () => { const searchChange = () => {
onLoad(); onLoad();
@ -669,7 +728,7 @@ const showdrawer = (_flag?: boolean, _type?: number) => {
const searchHide = async () => { const searchHide = async () => {
details.search = !details.search; details.search = !details.search;
await nextTick(); await nextTick();
setNodeHeight(details.listNode); setNodeHeight(details.listNode, '50vh');
}; };
/** 远程搜索承运商 */ /** 远程搜索承运商 */

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

@ -131,29 +131,31 @@
<!-- 运单池 && 调度池 --> <!-- 运单池 && 调度池 -->
<!-- 列表模块 --> <!-- 列表模块 -->
<div v-if="!search"> <div v-h5uShow="!search">
<el-form :inline="true" label-width="80px" :model="details.oldQuery" class="el-fr-d"> <el-form
<div class="fo-fl"> :inline="true"
<el-form-item class="el-times" label="开单时间"> label-width="80px"
<el-date-picker :model="details.oldQuery"
v-model="stockupDate" class="header_search"
type="daterange" >
unlink-panels <el-form-item class="el-times" label="开单时间">
range-separator="-" <el-date-picker
start-placeholder="开单日期" v-model="stockupDate"
end-placeholder="开单日期" type="daterange"
:shortcuts="shortcuts" unlink-panels
clearable range-separator="-"
:teleported="false" start-placeholder="开单日期"
/> end-placeholder="开单日期"
</el-form-item> :shortcuts="shortcuts"
<el-form-item> clearable
<el-button type="primary" icon="el-icon-search" @click="searchReset()" />
> </el-button </el-form-item>
> <el-form-item>
<el-button icon="el-icon-delete" @click="searchReset()">重置</el-button> <el-button type="primary" icon="el-icon-search" @click="searchReset()"
</el-form-item> > </el-button
</div> >
<el-button icon="el-icon-delete" @click="searchReset()">重置</el-button>
</el-form-item>
</el-form> </el-form>
</div> </div>
@ -174,7 +176,7 @@
<tablecmt <tablecmt
ref="oldColumnListNode" ref="oldColumnListNode"
:columnList="details.detailsColumnList" :columnList="details.detailsColumnList"
:tableData="details.oldData" :tableData="details.renderData"
:loading="loadingObj.oldListLoading" :loading="loadingObj.oldListLoading"
@inputTxt="inputsc" @inputTxt="inputsc"
@timeCheck="timesc" @timeCheck="timesc"
@ -408,58 +410,8 @@ const details = reactive<any>({
nodeInfoColumnList, nodeInfoColumnList,
nodeInfoData: [], nodeInfoData: [],
/** 列表数据 */ /** 列表数据 */
newData: [],
oldData: [], oldData: [],
rules: { renderData: [],
/** 中转承运商 */
carrierName: [
{
required: true,
message: '请选择承运商',
trigger: ['change', 'blur'],
},
],
/** 经办人 */
operator: [
{
required: true,
message: '请选择经办人',
trigger: ['change'],
},
],
/** 客户类型 */
customerType: [
{
required: true,
message: '请选择客户类型',
trigger: ['change'],
},
],
/** 承运单号 */
carrierOrderCode: [
{
required: true,
message: '请选择承运单号',
trigger: ['change', 'blur'],
},
],
/** 承运时间 */
carrierTime: [
{
required: true,
message: '请选择承运时间',
trigger: ['change'],
},
],
/** 运费 */
num: [
{
required: true,
message: '请填写运费',
trigger: ['change'],
},
],
},
/** 页面loading */ /** 页面loading */
loadingObj: { loadingObj: {
/** 列表加载loading */ /** 列表加载loading */
@ -468,20 +420,8 @@ const details = reactive<any>({
}, },
/** 列表复选框选中的数据 */ /** 列表复选框选中的数据 */
selectionList: [], selectionList: [],
newSelectionList: [],
/** 是否显示设置表格 */ /** 是否显示设置表格 */
drawerShow: false, drawerShow: false,
/** 分页参数 */
page: {
pageNum: 1,
pageSize: 30,
total: 0,
},
oldPage: {
pageNum: 1,
pageSize: 30,
total: 0,
},
/** 弹出层显示 */ /** 弹出层显示 */
popUpShow: { popUpShow: {
/** 装车详情 */ /** 装车详情 */
@ -498,6 +438,24 @@ const details = reactive<any>({
pageInfo: { pageInfo: {
// //
startWarehouseInfo: {}, startWarehouseInfo: {},
loadType: [
{ dictValue: '手动装车(后台)', dictKey: '1' },
{ dictValue: '扫描装车', dictKey: '2' },
],
chargeType: [
{
dictKey: '1',
dictValue: '按件数分摊',
},
{
dictKey: '2',
dictValue: '按体积分摊',
},
{
dictKey: '3',
dictValue: '按重量分摊',
},
],
}, },
/** 承运商 */ /** 承运商 */
carrierNameOptions: [], carrierNameOptions: [],
@ -505,8 +463,6 @@ const details = reactive<any>({
customerType: [], customerType: [],
/** 送货司机 */ /** 送货司机 */
driverListByName: [], driverListByName: [],
/** 被选中在调度池的订单列表 */
orderCodeList: [],
}); });
const { const {
@ -518,10 +474,8 @@ const {
loadingObj, loadingObj,
selectionList, selectionList,
drawerShow, drawerShow,
page,
popUpShow, popUpShow,
form, form,
oldPage,
} = toRefs(details); } = toRefs(details);
/** vuex */ /** vuex */
@ -533,19 +487,10 @@ const setTabelHeight = async () => {
// //
await nextTick(); await nextTick();
const _listNode = document.querySelectorAll('.columnList.maboxhi');
console.log('nodeInfoRef.value.$el :>> ', nodeInfoRef.value.$el);
// //
setNodeHeight(nodeInfoRef.value.$el, 'auto'); setNodeHeight(nodeInfoRef.value.$el, 'auto');
setNodeHeight(oldColumnListNode.value.$el, '500px'); setNodeHeight(oldColumnListNode.value.$el, '500px');
console.log('_listNode :>> ', _listNode);
if (_listNode.length === 0) return;
setNodeHeight(_listNode, '600px');
}; };
onMounted(() => { onMounted(() => {
@ -629,7 +574,6 @@ const initOriginWarehouseOrder = async (params = {}) => {
try { try {
details.loadingObj.oldListLoading = true; details.loadingObj.oldListLoading = true;
const submitData = { const submitData = {
...details.page,
loadId: details.loadId, loadId: details.loadId,
...details.query, ...details.query,
...params, ...params,
@ -659,12 +603,12 @@ const initOriginWarehouseOrder = async (params = {}) => {
); );
}); });
inputsc('', { prop: 'aaa' });
details.form = data; details.form = data;
details.form.driverNameAndMobile = details.form.driverName + '/' + details.form.driverMobile; details.form.driverNameAndMobile = details.form.driverName + '/' + details.form.driverMobile;
details.form.assistantNameAndMobile = details.form.assistantNameAndMobile =
details.form.assistantName + '/' + details.form.assistantMobile; details.form.assistantName + '/' + details.form.assistantMobile;
details.page.total = data.total;
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);
} finally { } finally {
@ -680,19 +624,15 @@ const onLoad = async () => {
// //
initOriginWarehouseOrder(); initOriginWarehouseOrder();
// // //
postSelectEditDetailByLoadId({ loadId: details.loadId }).then(res => { // postSelectEditDetailByLoadId({ loadId: details.loadId }).then(res => {
const { code, data } = res.data; // const { code, data } = res.data;
if (code !== 200) return;
details.pageInfo.loadType = data.loadType; // if (code !== 200) return;
details.pageInfo.chargeType = data.chargeType;
});
// details.pageInfo.startWarehouseInfo.warehouseId = data.carsLoadEntity.startWarehouseId; // details.pageInfo.loadType = data.loadType;
// details.pageInfo.startWarehouseInfo.warehouseName = data.carsLoadEntity.startWarehouseName; // details.pageInfo.chargeType = data.chargeType;
// // });
// //
setTabelHeight(); setTabelHeight();
@ -709,7 +649,6 @@ const searchChange = () => {
const searchReset = () => { const searchReset = () => {
details.query = {}; details.query = {};
details.stockupDate = []; details.stockupDate = [];
details.page.pageNum = 1;
initOriginWarehouseOrder(); initOriginWarehouseOrder();
}; };
@ -733,9 +672,32 @@ const searchHide = async () => {
}; };
/** 表格表头输入框搜索 */ /** 表格表头输入框搜索 */
const inputsc = (index, row) => { const inputsc = (value, row) => {
details.query[row.prop] = index; try {
initOriginWarehouseOrder(); //
const reg = new RegExp(value, 'i');
details.query[row.prop] = reg;
if (value === '') delete details.query[row.prop];
if (Object.keys(details.query).length === 0) return (details.renderData = details.oldData);
const _data = details.oldData.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;
});
details.renderData = _data;
} catch (error) {
console.log('error :>> ', error);
} finally {
}
}; };
/** 表格表头时间选择 */ /** 表格表头时间选择 */
@ -785,19 +747,6 @@ const setnewcolum = (newarr, headarr, type) => {
} }
}; };
/** 选择承运商 */
const carrierNameChange = () => {};
/** 司机改变时 */
const handleNameChange = () => {
const findValue = form.value.driverName;
const _value = details.driverListByName.find(value => value.driverId === findValue);
form.value.driverName = _value.driverName;
form.value.driverId = _value.driverId;
form.value.driverMobile = _value.driverPhone;
};
const arraySpanMethod = (row: any) => { const arraySpanMethod = (row: any) => {
const { column } = row; const { column } = row;
if (mergeColumn.indexOf(column.property) !== -1) { if (mergeColumn.indexOf(column.property) !== -1) {

451
src/views/distribution/artery/addTripartiteTransfer.vue

@ -1,5 +1,5 @@
<template> <template>
<basic-container> <basic-container v-loading="details.loadingObj.submitLoading">
<div class="avue-crud"> <div class="avue-crud">
<!-- 标题 基础信息 --> <!-- 标题 基础信息 -->
<el-divider content-position="left"> <el-divider content-position="left">
@ -28,7 +28,7 @@
reserve-keyword reserve-keyword
placeholder="中转承运商" placeholder="中转承运商"
@change="carrierNameChange" @change="carrierNameChange"
:remote-method="remoteMethod" :remote-method="value => debounce(remoteMethod(value), 500)"
:loading="details.loadingObj.carrierName" :loading="details.loadingObj.carrierName"
> >
<el-option <el-option
@ -63,7 +63,7 @@
</el-select> --> </el-select> -->
<el-input v-model="form.operator" /> <el-input v-model="form.operator" />
</el-form-item> </el-form-item>
<el-form-item label="送货方式"> <el-form-item label="送货方式" prop="deliveryType">
<el-select <el-select
:teleported="false" :teleported="false"
v-model="form.deliveryType" v-model="form.deliveryType"
@ -79,7 +79,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="付款方式"> <el-form-item label="付款方式" prop="payMethod">
<el-select <el-select
:teleported="false" :teleported="false"
v-model="form.payMethod" v-model="form.payMethod"
@ -95,7 +95,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="运费分摊方式"> <el-form-item label="运费分摊方式" prop="chargeType">
<el-select <el-select
:teleported="false" :teleported="false"
v-model="form.chargeType" v-model="form.chargeType"
@ -111,7 +111,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="送货司机"> <el-form-item label="送货司机" prop="driverName">
<el-select <el-select
v-model="form.driverName" v-model="form.driverName"
filterable filterable
@ -148,7 +148,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否结算"> <el-form-item label="是否结算" prop="isSettlement">
<el-select <el-select
:teleported="false" :teleported="false"
v-model="form.isSettlement" v-model="form.isSettlement"
@ -164,7 +164,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="代收贷款"> <el-form-item label="代收贷款" prop="replacePrice">
<el-input-number <el-input-number
placeholder="代收贷款" placeholder="代收贷款"
v-model="form.replacePrice" v-model="form.replacePrice"
@ -184,6 +184,7 @@
placeholder="承运时间" placeholder="承运时间"
size="default" size="default"
:teleported="false" :teleported="false"
value-format="YYYY-MM-DD"
/> />
</el-form-item> </el-form-item>
<el-form-item label="客户收货时间" prop="receivingTimeStr"> <el-form-item label="客户收货时间" prop="receivingTimeStr">
@ -193,6 +194,7 @@
placeholder="客户收货时间" placeholder="客户收货时间"
size="default" size="default"
:teleported="false" :teleported="false"
value-format="YYYY-MM-DD"
/> />
</el-form-item> </el-form-item>
<el-form-item label="运费" prop="countTransportCost"> <el-form-item label="运费" prop="countTransportCost">
@ -205,7 +207,7 @@
controls-position="right" controls-position="right"
/> />
</el-form-item> </el-form-item>
<el-form-item label="司机结算费"> <el-form-item label="司机结算费" prop="settlementValue">
<el-input-number <el-input-number
v-model="form.settlementValue" v-model="form.settlementValue"
:precision="2" :precision="2"
@ -235,37 +237,39 @@
<!-- 列表模块 --> <!-- 列表模块 -->
<div style="width: 49%"> <div style="width: 49%">
<div class="add_row_title">运单池</div> <div class="add_row_title">运单池</div>
<div v-if="!search"> <div v-h5uShow="!search">
<el-form :inline="true" label-width="80px" :model="details.oldQuery" class="el-fr-d"> <el-form
<div class="fo-fl"> :inline="true"
<el-form-item label="备注" class="el-times"> label-width="80px"
<el-input></el-input> :model="details.oldQuery"
</el-form-item> class="header_search"
>
<el-form-item label="托盘码" class="el-times"> <el-form-item label="备注">
<el-input></el-input> <el-input></el-input>
</el-form-item> </el-form-item>
<el-form-item class="el-times"> <el-form-item label="托盘码">
<el-date-picker <el-input></el-input>
v-model="stockupDate" </el-form-item>
type="daterange"
unlink-panels <el-form-item>
range-separator="-" <el-date-picker
start-placeholder="开单日期" v-model="stockupDate"
end-placeholder="开单日期" type="daterange"
:shortcuts="shortcuts" unlink-panels
clearable range-separator="-"
:teleported="false" start-placeholder="开单日期"
/> end-placeholder="开单日期"
</el-form-item> :shortcuts="shortcuts"
<el-form-item> clearable
<el-button type="primary" icon="el-icon-search" @click="searchReset()" />
> </el-button </el-form-item>
> <el-form-item>
<el-button icon="el-icon-delete" @click="searchReset()">重置</el-button> <el-button type="primary" icon="el-icon-search" @click="searchReset()"
</el-form-item> > </el-button
</div> >
<el-button icon="el-icon-delete" @click="searchReset()">重置</el-button>
</el-form-item>
</el-form> </el-form>
</div> </div>
@ -273,7 +277,7 @@
<div style="margin-bottom: 10px" class="flex-c-sb"> <div style="margin-bottom: 10px" class="flex-c-sb">
<div class="avue-crud__right"> <div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button> <el-button icon="el-icon-refresh" @click="searchChange" circle></el-button>
<el-button icon="Operation" @click="showdrawer(true, 1)" circle></el-button> <el-button icon="Operation" @click="showdrawer(true, '1')" circle></el-button>
<el-button icon="el-icon-search" @click="searchHide" circle></el-button> <el-button icon="el-icon-search" @click="searchHide" circle></el-button>
</div> </div>
@ -314,35 +318,38 @@
<!-- 列表模块 --> <!-- 列表模块 -->
<div style="width: 49%"> <div style="width: 49%">
<div class="add_row_title">调度池</div> <div class="add_row_title">调度池</div>
<div v-if="!search"> <div v-h5uShow="!search">
<el-form :inline="true" label-width="80px" :model="details.newQuery" class="el-fr-d"> <el-form
<div class="fo-fl"> :inline="true"
<el-form-item label="备注" class="el-times"> label-width="80px"
<el-input></el-input> :model="details.newQuery"
</el-form-item> class="header_search"
>
<el-form-item label="托盘码" class="el-times"> <el-form-item label="备注">
<el-input></el-input> <el-input></el-input>
</el-form-item> </el-form-item>
<el-form-item class="el-times">
<el-date-picker <el-form-item label="托盘码">
v-model="stockupDate" <el-input></el-input>
type="daterange" </el-form-item>
unlink-panels <el-form-item>
range-separator="-" <el-date-picker
start-placeholder="开单日期" v-model="stockupDate"
end-placeholder="开单日期" type="daterange"
:shortcuts="shortcuts" unlink-panels
clearable range-separator="-"
/> start-placeholder="开单日期"
</el-form-item> end-placeholder="开单日期"
<el-form-item> :shortcuts="shortcuts"
<el-button type="primary" icon="el-icon-search" @click="searchReset()" clearable
> </el-button />
> </el-form-item>
<el-button icon="el-icon-delete" @click="searchReset()">重置</el-button> <el-form-item>
</el-form-item> <el-button type="primary" icon="el-icon-search" @click="searchReset()"
</div> > </el-button
>
<el-button icon="el-icon-delete" @click="searchReset()">重置</el-button>
</el-form-item>
</el-form> </el-form>
</div> </div>
@ -419,13 +426,13 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue'; import { ref, reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue';
import functions from '@/utils/functions'; import functions from '@/utils/functions';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
/** 获取字典 */ /** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict'; import { getDictionaryBiz } from '@/api/system/dict';
import { downloadXls, computeNumber, setNodeHeight, getWinHight, debounce } from '@/utils/util'; import { downloadXls, computeNumber, setNodeHeight, debounce } from '@/utils/util';
import { columnList, newColumnList } from '@/option/distribution/addVehicleStowage'; import { columnList, newColumnList } from '@/option/distribution/addVehicleStowage';
import { import {
postloadFindLoadInitData, postloadFindLoadInitData,
@ -434,11 +441,16 @@ import {
postFindCarListByName, postFindCarListByName,
postFindDriverListByName, postFindDriverListByName,
postFindCarrierByName, postFindCarrierByName,
postFindUseOrderList,
} from '@/api/distribution/AddVehicleStowage'; } from '@/api/distribution/AddVehicleStowage';
import { postSaveNewTripartiteTransfer } from '@/api/distribution/addTripartiteTransfer.js'; import { postSelectEditDetailByLoadId } from '@/api/distribution/AddVehicleStowage';
import {
postSaveNewTripartiteTransfer,
postUpdateTripartiteTransfer,
} from '@/api/distribution/addTripartiteTransfer.js';
import type { FormInstance, FormRules } from 'element-plus'; import type { FormInstance, FormRules } from 'element-plus';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
import { useRouter } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
// vuex // vuex
@ -446,6 +458,7 @@ const $store = useStore();
// //
const $router = useRouter(); const $router = useRouter();
const $route = useRoute();
// //
const ruleFormRef = ref(); const ruleFormRef = ref();
@ -499,6 +512,7 @@ const details = reactive<any>({
newColumnList, newColumnList,
/** 列表数据 */ /** 列表数据 */
newData: [], newData: [],
newRenderData: [],
oldData: [], oldData: [],
rules: { rules: {
/** 中转承运商 */ /** 中转承运商 */
@ -593,8 +607,6 @@ const details = reactive<any>({
/** 零担补录 */ /** 零担补录 */
transferVisited: false, transferVisited: false,
}, },
/** 列表Dom节点 */
listNode: '',
form: { form: {
customerType: '', customerType: '',
}, },
@ -608,6 +620,8 @@ const details = reactive<any>({
driverListByName: [], driverListByName: [],
/** 被选中在调度池的订单列表 */ /** 被选中在调度池的订单列表 */
orderCodeList: [], orderCodeList: [],
/** 修改时, 已存在调度池中的运单数据 */
MappingData: [],
}); });
const { const {
@ -629,34 +643,124 @@ const {
const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList'])); const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList']));
console.log('permission :>> ', permission); console.log('permission :>> ', permission);
onMounted(() => { onMounted(async () => {
const timer = setTimeout(() => { await nextTick();
details.listNode = document.querySelector('.maboxhi'); setNodeHeight(document.querySelectorAll('.maboxhi'), '50vh', true);
details.listNode.style.transition = 'all .5s ease-out';
console.log('details.listNode :>> ', details.listNode);
clearTimeout(timer);
}, 100);
}); });
/** 请求页面数据 */ /** 请求页面数据 */
const onLoad = async () => { const onLoad = async () => {
const res = await postloadFindLoadInitData(); const res = await postloadFindLoadInitData();
details.form = {};
await nextTick();
ruleFormRef.value.resetFields();
const { code, data } = res.data; const { code, data } = res.data;
if (code !== 200) return; if (code !== 200) return;
details.pageInfo = data; details.pageInfo = data;
details.customerType = data.customerType; details.customerType = data.customerType;
console.log('data :>> ', data); console.log('data :>> ', data);
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;
return await initOriginWarehouseOrder();
};
const onLoadEidt = async () => {
//
const promiseAll = await Promise.all([
//
postloadFindLoadInitData(),
//
postSelectEditDetailByLoadId({ loadId: $route.query.loadId }),
]);
console.log('promiseAll :>> ', promiseAll);
const [
{
data: { code, data },
},
{
data: { code: code1, data: data1 },
},
] = promiseAll;
console.log('code :>> ', code);
console.log('code1 :>> ', code1);
if (code !== 200 && code1 !== 200) return;
details.pageInfo = data;
details.customerType = data.customerType;
console.log('data :>> ', data);
details.form = data1.carsLoadEntity;
details.form.customerType = data1.carsLoadEntity.customerType.split(',');
details.form.startWarehouseName = data.startWarehouseInfo.warehouseName; details.form.startWarehouseName = data.startWarehouseInfo.warehouseName;
details.form.startWarehouseId = data.startWarehouseInfo.warehouseId; details.form.startWarehouseId = data.startWarehouseInfo.warehouseId;
details.form.endWarehouseNames = data.startWarehouseInfo.warehouseName; details.form.endWarehouseNames = data.startWarehouseInfo.warehouseName;
details.form.endWarehouseIds = data.startWarehouseInfo.warehouseId; details.form.endWarehouseIds = data.startWarehouseInfo.warehouseId;
details.form.carsLineName = data.startWarehouseInfo.warehouseName; details.form.carsLineName = data.startWarehouseInfo.warehouseName;
details.form.carrierTimeStr = details.form.carrierTime;
details.form.receivingTimeStr = details.form.receivingTime;
initOriginWarehouseOrder(); delete details.form.carrierTime;
delete details.form.receivingTime;
//
await initDispatchOrder();
//
return await initOriginWarehouseOrder();
};
const initPageInfo = async () => {
details.loadingObj.submitLoading = true;
try {
const { type } = $route.query;
if (type === 'add') await onLoad();
else if (type === 'edit') await onLoadEidt();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.submitLoading = false;
}
};
/** 请求添加在调度池中的数据 */
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)]),
];
}; };
onLoad(); watch(
$route,
() => {
initPageInfo();
},
{ immediate: true }
);
/** 请求运单数据 */ /** 请求运单数据 */
const initOriginWarehouseOrder = async (params = {}) => { const initOriginWarehouseOrder = async (params = {}) => {
@ -722,20 +826,20 @@ const showdrawer = (_flag?: boolean, _type?: string) => {
const searchHide = async () => { const searchHide = async () => {
details.search = !details.search; details.search = !details.search;
await nextTick(); await nextTick();
setNodeHeight(details.listNode); setNodeHeight(document.querySelectorAll('.maboxhi'), '50vh', true);
}; };
/** 远程搜索承运商 */ /** 远程搜索承运商 */
const remoteMethod = value => { const remoteMethod = async value => {
try { try {
console.log('value :>> ', value);
details.loadingObj.carrierName = true; details.loadingObj.carrierName = true;
// if (!value) return; // if (!value) return;
const res = debounce(async () => {
const res = await postFindCarrierByName({ carrierName: value }); const res = await postFindCarrierByName({ carrierName: value });
const { code, data } = res.data; const { code, data } = res.data;
if (code !== 200) return; if (code !== 200) return;
details.carrierNameOptions = data; details.carrierNameOptions = data;
}, 500);
} catch (error) { } catch (error) {
} finally { } finally {
details.loadingObj.carrierName = false; details.loadingObj.carrierName = false;
@ -923,6 +1027,119 @@ const back = () => {
$router.push({ path: '/distribution/artery/TripartiteTransfer' }); $router.push({ path: '/distribution/artery/TripartiteTransfer' });
}; };
const addSubmit = async () => {
const submitData = {
...form.value,
addCarsLoadLineList: [
{
nodeType: '1',
nodeName: details.pageInfo.startWarehouseInfo.warehouseName,
nodeId: details.pageInfo.startWarehouseInfo.warehouseId,
linkAddress: details.pageInfo.startWarehouseInfo.linkAddress,
linkMan: details.pageInfo.startWarehouseInfo.linkMan,
linkMobile: details.pageInfo.startWarehouseInfo.linkMobile,
sort: '1',
addList: JSON.parse(JSON.stringify(details.newData)).map(value => {
value.nodeId = details.pageInfo.startWarehouseInfo.warehouseId;
value.nodeName = details.pageInfo.startWarehouseInfo.warehouseName;
value.finalNodeId = details.pageInfo.startWarehouseInfo.warehouseId;
value.totalNum = 20;
return value;
}),
removeList: [],
},
],
removeCarsLoadLineList: [],
};
submitData.customerType = submitData.customerType.join(',');
if (submitData.carrierTimeStr)
submitData.carrierTimeStr = dayjs(submitData.carrierTimeStr).format('YYYY-MM-DD');
if (submitData.receivingTimeStr)
submitData.receivingTimeStr = dayjs(submitData.receivingTimeStr).format('YYYY-MM-DD');
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);
};
const editSubmit = async () => {
const submitData = {
...form.value,
addCarsLoadLineList: [
{
nodeType: '1',
nodeName: details.pageInfo.startWarehouseInfo.warehouseName,
nodeId: details.pageInfo.startWarehouseInfo.warehouseId,
linkAddress: details.pageInfo.startWarehouseInfo.linkAddress,
linkMan: details.pageInfo.startWarehouseInfo.linkMan,
linkMobile: details.pageInfo.startWarehouseInfo.linkMobile,
sort: '1',
addList: [],
removeList: [],
},
],
removeCarsLoadLineList: [],
};
const _deepCloneArr = JSON.parse(JSON.stringify(details.MappingData));
for (const iterator of details.newData) {
// updateType 1: 2:
if (iterator.carsOrderId) {
for (let index = 0; index < _deepCloneArr.length; index++) {
const element = _deepCloneArr[index];
if (element.carsOrderId === iterator.carsOrderId) {
if (element.planNum !== iterator.planNum) {
iterator.updateType = 1;
submitData.addCarsLoadLineList[0].addList.push(iterator);
}
_deepCloneArr.splice(index, 1);
// 退
break;
}
}
} else {
iterator.nodeId = details.pageInfo.startWarehouseInfo.warehouseId;
iterator.nodeName = details.pageInfo.startWarehouseInfo.warehouseName;
iterator.finalNodeId = details.pageInfo.startWarehouseInfo.warehouseId;
iterator.updateType = 2;
iterator.totalNum = 20;
submitData.addCarsLoadLineList[0].addList.push(iterator);
}
}
submitData.addCarsLoadLineList[0].removeList = _deepCloneArr;
for (const iterator of submitData.addCarsLoadLineList[0].removeList) {
iterator.id = iterator.carsOrderId;
}
submitData.customerType = submitData.customerType.join(',');
console.log('submitData :>> ', submitData);
const res = await postUpdateTripartiteTransfer(submitData);
const { code, msg } = res.data;
if (code !== 200) return;
ElMessage({
message: msg,
type: 'success',
});
back();
};
/** 提交 */ /** 提交 */
const handleSubmit = (formEl: FormInstance | undefined) => { const handleSubmit = (formEl: FormInstance | undefined) => {
if (!formEl) return; if (!formEl) return;
@ -933,48 +1150,8 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
details.loadingObj.submitLoading = true; details.loadingObj.submitLoading = true;
try { try {
const submitData = { if ($route.query.type === 'add') await addSubmit();
...form.value, else if ($route.query.type === 'edit') await editSubmit();
addCarsLoadLineList: [
{
nodeType: '1',
nodeName: details.pageInfo.startWarehouseInfo.warehouseName,
nodeId: details.pageInfo.startWarehouseInfo.warehouseId,
linkAddress: details.pageInfo.startWarehouseInfo.linkAddress,
linkMan: details.pageInfo.startWarehouseInfo.linkMan,
linkMobile: details.pageInfo.startWarehouseInfo.linkMobile,
sort: '1',
addList: JSON.parse(JSON.stringify(details.newData)).map(value => {
value.nodeId = details.pageInfo.startWarehouseInfo.warehouseId;
value.nodeName = details.pageInfo.startWarehouseInfo.warehouseName;
value.finalNodeId = details.pageInfo.startWarehouseInfo.warehouseId;
value.totalNum = 20;
return value;
}),
removeList: [],
},
],
removeCarsLoadLineList: [],
};
submitData.customerType = submitData.customerType.join(',');
if (submitData.carrierTimeStr)
submitData.carrierTimeStr = dayjs(submitData.carrierTimeStr).format('YYYY-MM-DD');
if (submitData.receivingTimeStr)
submitData.receivingTimeStr = dayjs(submitData.receivingTimeStr).format('YYYY-MM-DD');
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);
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);
} finally { } finally {
@ -1140,4 +1317,8 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
) { ) {
--el-color-danger: #f00; --el-color-danger: #f00;
} }
.header_search > div {
width: 40%;
}
</style> </style>

3
src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue

@ -661,6 +661,9 @@ const initPage = async () => {
// //
details.addInfo.newData = data.waybillList || []; details.addInfo.newData = data.waybillList || [];
details.waybillNosList = data.waybillList.map(item => item.waybillNo); details.waybillNosList = data.waybillList.map(item => item.waybillNo);
newInputsc('', { prop: 'aaa' });
// //
data.lineList.forEach(val => { data.lineList.forEach(val => {
nodeInfoData.splice(nodeInfoData.length - 1, 0, { nodeInfoData.splice(nodeInfoData.length - 1, 0, {

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

@ -701,7 +701,7 @@ export default {
this.$router.push({ this.$router.push({
path: '/distribution/inventory/BookingNote', path: '/distribution/inventory/BookingNote',
query: { name: `查看 -- 【${row.waybillNo}`, waybillNo: row.waybillNo }, query: { name: `查看 -- 【${row.waybillNo}`, waybillNo: row.waybillNo, id: row.id },
}); });
}, },

2
src/views/distribution/reservation/reservation.vue

@ -157,7 +157,7 @@
icon="Plus" icon="Plus"
@click="handleAddPickerClipData" @click="handleAddPickerClipData"
v-if="orderStatus === 'all'" v-if="orderStatus === 'all'"
>加入单夹 >加入单夹
</el-button> </el-button>
<el-button <el-button
v-else v-else

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

@ -471,7 +471,7 @@ import {
} from '@/api/distribution/distributionStockArticle'; } from '@/api/distribution/distributionStockArticle';
import { getDetailDelivery } from '@/api/distribution/distributionDelivery'; import { getDetailDelivery } from '@/api/distribution/distributionDelivery';
import { getInventoryList, selectInventoryDetail } from '@/api/distribution/distributionStockList'; import { getInventoryList, selectInventoryDetail } from '@/api/distribution/distributionStockList';
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus';
import option from '@/option/distribution/distributionStockArticle'; import option from '@/option/distribution/distributionStockArticle';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict'; import { getDictionaryBiz } from '@/api/system/dict';
@ -1439,7 +1439,7 @@ export default {
sortable: true, sortable: true,
}, },
{ {
prop: 'positionCode',// prop: 'positionCode', //
label: '货位信息', label: '货位信息',
type: 2, type: 2,
values: '', values: '',
@ -2395,17 +2395,19 @@ export default {
// //
async onSubmit() { async onSubmit() {
try { try {
if(this.renderInventoryData.length){ if (this.renderInventoryData.length) {
const allQuantitiesAreFalsy = this.renderInventoryData.every(item => item.reservationNum !='0') const allQuantitiesAreFalsy = this.renderInventoryData.every(
if(!allQuantitiesAreFalsy){ item => item.reservationNum != '0'
ElMessage({ );
message: '请移预约加数量为0的订单', if (!allQuantitiesAreFalsy) {
type: 'warning', ElMessage({
}) message: '请移预约加数量为0的订单',
return type: 'warning',
} });
return;
}
} }
// loading // loading
this.loadingObj.submitBtnLoading = true; this.loadingObj.submitBtnLoading = true;
this.reservationloading = true; // this.reservationloading = true; //
// //
@ -2417,13 +2419,6 @@ export default {
return; return;
} }
// //
// //
let orderIds = []; let orderIds = [];

Loading…
Cancel
Save