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

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

@ -78,9 +78,7 @@
<div class="avue-crud__header">
<!-- 头部左侧按钮模块 -->
<div class="avue-crud__left">
<el-button type="primary" icon="Plus" @click="handleShowTransfer('add')"
>新增中转
</el-button>
<el-button type="primary" icon="Plus" @click="addTransfer">新增中转 </el-button>
<el-button type="primary" icon="Printer" @click="searchReset()">装载清单</el-button>
<el-button type="primary" icon="Printer" @click="searchReset()"
>装载卸车清单(财务)</el-button
@ -93,7 +91,7 @@
<el-button type="primary" icon="CircleCheck" @click="handleShowConfirm">
</el-button>
<el-button type="primary" icon="Edit" @click="searchReset()"> </el-button>
<el-button type="primary" icon="Edit" @click="editTransfer"> </el-button>
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
@ -689,32 +687,28 @@ const handleShowzeroAdditionalRecording = ({ row }) => {
const addTransfer = async () => {
$router.push({
path: '/distribution/artery/addTripartiteTransfer',
name: '新增中转',
query: { name: '新增中转', type: 'add' },
});
return null;
};
/** 修改中转 */
const editTransfer = async () => {
return null;
};
const _length = details.selectionList.length;
/** 显示新增或修改中转弹窗 */
const handleShowTransfer = async (_type: string) => {
switch (_type) {
//
case 'add':
await addTransfer();
break;
if (_length === 0) return ElMessage.warning('请选择一条修改数据');
//
case 'edit':
await editTransfer();
break;
if (_length > 1) return ElMessage.warning('只能选择一条数据修改');
default:
break;
}
const _item = details.selectionList[0];
$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>
<basic-container>
<basic-container v-loading="details.loadingObj.pageLoading">
<div class="avue-crud">
<el-tabs type="border-card" v-model="details.activeTab">
<el-tab-pane label="详 情 信 息" name="tab1">
@ -35,7 +35,7 @@
<el-form-item label="经办人" prop="operator">
<el-input v-model="form.operator" />
</el-form-item>
<el-form-item label="送货方式">
<el-form-item label="送货方式" prop="deliveryType">
<el-select
:teleported="false"
v-model="form.deliveryType"
@ -51,7 +51,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="付款方式">
<el-form-item label="付款方式" prop="payMethod">
<el-select
:teleported="false"
v-model="form.payMethod"
@ -67,7 +67,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="运费分摊方式">
<el-form-item label="运费分摊方式" prop="chargeType">
<el-select
:teleported="false"
v-model="form.chargeType"
@ -83,7 +83,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="送货司机">
<el-form-item label="送货司机" prop="driverName">
<el-select
v-model="form.driverName"
filterable
@ -108,6 +108,7 @@
:teleported="false"
v-model="form.customerType"
class="m-2"
multiple
placeholder="客户类型"
size="default"
>
@ -119,10 +120,10 @@
/>
</el-select>
</el-form-item>
<el-form-item label="是否结算">
<el-form-item label="是否结算" prop="isSettlement">
<el-select
:teleported="false"
v-model="form.settlementStatus"
v-model="form.isSettlement"
class="m-2"
placeholder="是否结算"
size="default"
@ -135,8 +136,9 @@
/>
</el-select>
</el-form-item>
<el-form-item label="代收贷款">
<el-form-item label="代收贷款" prop="replacePrice">
<el-input-number
v-model="form.replacePrice"
placeholder="代收贷款"
:precision="2"
:min="0"
@ -147,27 +149,27 @@
<el-form-item label="承运单号" prop="carrierOrderCode">
<el-input v-model="form.carrierOrderCode" placeholder="承运单号" />
</el-form-item>
<el-form-item label="承运时间" prop="carrierTime">
<el-form-item label="承运时间" prop="carrierTimeStr">
<el-date-picker
v-model="form.carrierTime"
v-model="form.carrierTimeStr"
type="date"
placeholder="承运时间"
size="default"
:teleported="false"
/>
</el-form-item>
<el-form-item label="客户收货时间">
<el-form-item label="客户收货时间" prop="receivingTimeStr">
<el-date-picker
v-model="form.value1"
v-model="form.receivingTimeStr"
type="date"
placeholder="客户收货时间"
size="default"
:teleported="false"
/>
</el-form-item>
<el-form-item label="运费" prop="num">
<el-form-item label="运费" prop="countTransportCost">
<el-input-number
v-model="form.num"
v-model="form.countTransportCost"
:precision="2"
placeholder="运费"
:min="0"
@ -175,8 +177,9 @@
controls-position="right"
/>
</el-form-item>
<el-form-item label="司机结算费">
<el-form-item label="司机结算费" prop="settlementValue">
<el-input-number
v-model="form.settlementValue"
:precision="2"
:min="0"
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">
<div class="fo-fl">
<el-form-item class="el-times" label="开单时间">
@ -220,7 +223,6 @@
end-placeholder="开单日期"
:shortcuts="shortcuts"
clearable
:teleported="false"
/>
</el-form-item>
<el-form-item>
@ -306,7 +308,7 @@
>
</edittablehead>
</template>
<!-- activeTab: 'tab1' -->
<script setup lang="ts">
import { ref, reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue';
import functions from '@/utils/functions';
@ -323,6 +325,8 @@ import {
postFindCarListByName,
postFindDriverListByName,
postFindCarrierByName,
postFindUseOrderList,
postSelectEditDetailByLoadId,
} from '@/api/distribution/AddVehicleStowage';
import { postSaveNewTripartiteTransfer } from '@/api/distribution/addTripartiteTransfer.js';
import type { FormInstance, FormRules } from 'element-plus';
@ -388,8 +392,9 @@ const details = reactive<any>({
/** 调度池 */
newColumnList,
/** 列表数据 */
newData: [],
oldData: [],
/** 渲染数据 */
renderData: [],
rules: {
/** 中转承运商 */
carrierName: [
@ -445,6 +450,7 @@ const details = reactive<any>({
/** 列表加载loading */
list: false,
oldListLoading: false,
pageLoading: false,
},
/** 列表复选框选中的数据 */
selectionList: [],
@ -588,19 +594,56 @@ onMounted(() => {
/** 请求页面数据 */
const onLoad = async () => {
const res = await postloadFindLoadInitData();
const { code, data } = res.data;
if (code !== 200) return;
details.pageInfo = data;
details.customerType = data.customerType;
console.log('data :>> ', data);
try {
details.loadingObj.pageLoading = true;
details.form.startWarehouseName = data.startWarehouseInfo.warehouseName;
details.form.startWarehouseId = data.startWarehouseInfo.warehouseId;
details.form.endWarehouseName = data.startWarehouseInfo.warehouseName;
details.form.endWarehouseId = data.startWarehouseInfo.warehouseId;
//
const promiseAll = await Promise.all([
//
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();
@ -608,21 +651,16 @@ onLoad();
/** 请求运单数据 */
const initOriginWarehouseOrder = async (params = {}) => {
try {
details.loadingObj.oldListLoading = true;
//
const submitData = {
...details.page,
loadId: details.pageInfo.startWarehouseInfo.warehouseId,
orderCodes: details.orderCodeList,
...details.query,
...params,
loadId: $route.query.loadId,
finalNodeId: details.form.startWarehouseId,
};
if (submitData.orderCodes.length === 0) delete submitData.orderCodes;
const res = await postFindAllOrderList(submitData);
console.log('res :>> ', res);
const res = await postFindUseOrderList(submitData);
const { code, data } = res.data;
if (code !== 200) return;
details.oldData = data.records;
details.page.total = data.total;
details.oldData = data;
details.renderData = data;
} catch (error) {
console.log('error :>> ', error);
} 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 = () => {
onLoad();
@ -669,7 +728,7 @@ const showdrawer = (_flag?: boolean, _type?: number) => {
const searchHide = async () => {
details.search = !details.search;
await nextTick();
setNodeHeight(details.listNode);
setNodeHeight(details.listNode, '50vh');
};
/** 远程搜索承运商 */

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

@ -131,29 +131,31 @@
<!-- 运单池 && 调度池 -->
<!-- 列表模块 -->
<div v-if="!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
:teleported="false"
/>
</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>
<div v-h5uShow="!search">
<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>
@ -174,7 +176,7 @@
<tablecmt
ref="oldColumnListNode"
:columnList="details.detailsColumnList"
:tableData="details.oldData"
:tableData="details.renderData"
:loading="loadingObj.oldListLoading"
@inputTxt="inputsc"
@timeCheck="timesc"
@ -408,58 +410,8 @@ const details = reactive<any>({
nodeInfoColumnList,
nodeInfoData: [],
/** 列表数据 */
newData: [],
oldData: [],
rules: {
/** 中转承运商 */
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'],
},
],
},
renderData: [],
/** 页面loading */
loadingObj: {
/** 列表加载loading */
@ -468,20 +420,8 @@ const details = reactive<any>({
},
/** 列表复选框选中的数据 */
selectionList: [],
newSelectionList: [],
/** 是否显示设置表格 */
drawerShow: false,
/** 分页参数 */
page: {
pageNum: 1,
pageSize: 30,
total: 0,
},
oldPage: {
pageNum: 1,
pageSize: 30,
total: 0,
},
/** 弹出层显示 */
popUpShow: {
/** 装车详情 */
@ -498,6 +438,24 @@ const details = reactive<any>({
pageInfo: {
//
startWarehouseInfo: {},
loadType: [
{ dictValue: '手动装车(后台)', dictKey: '1' },
{ dictValue: '扫描装车', dictKey: '2' },
],
chargeType: [
{
dictKey: '1',
dictValue: '按件数分摊',
},
{
dictKey: '2',
dictValue: '按体积分摊',
},
{
dictKey: '3',
dictValue: '按重量分摊',
},
],
},
/** 承运商 */
carrierNameOptions: [],
@ -505,8 +463,6 @@ const details = reactive<any>({
customerType: [],
/** 送货司机 */
driverListByName: [],
/** 被选中在调度池的订单列表 */
orderCodeList: [],
});
const {
@ -518,10 +474,8 @@ const {
loadingObj,
selectionList,
drawerShow,
page,
popUpShow,
form,
oldPage,
} = toRefs(details);
/** vuex */
@ -533,19 +487,10 @@ const setTabelHeight = async () => {
//
await nextTick();
const _listNode = document.querySelectorAll('.columnList.maboxhi');
console.log('nodeInfoRef.value.$el :>> ', nodeInfoRef.value.$el);
//
setNodeHeight(nodeInfoRef.value.$el, 'auto');
setNodeHeight(oldColumnListNode.value.$el, '500px');
console.log('_listNode :>> ', _listNode);
if (_listNode.length === 0) return;
setNodeHeight(_listNode, '600px');
};
onMounted(() => {
@ -629,7 +574,6 @@ const initOriginWarehouseOrder = async (params = {}) => {
try {
details.loadingObj.oldListLoading = true;
const submitData = {
...details.page,
loadId: details.loadId,
...details.query,
...params,
@ -659,12 +603,12 @@ const initOriginWarehouseOrder = async (params = {}) => {
);
});
inputsc('', { prop: 'aaa' });
details.form = data;
details.form.driverNameAndMobile = details.form.driverName + '/' + details.form.driverMobile;
details.form.assistantNameAndMobile =
details.form.assistantName + '/' + details.form.assistantMobile;
details.page.total = data.total;
} catch (error) {
console.log('error :>> ', error);
} finally {
@ -680,19 +624,15 @@ const onLoad = async () => {
//
initOriginWarehouseOrder();
//
postSelectEditDetailByLoadId({ loadId: details.loadId }).then(res => {
const { code, data } = res.data;
if (code !== 200) return;
// //
// postSelectEditDetailByLoadId({ loadId: details.loadId }).then(res => {
// const { code, data } = res.data;
details.pageInfo.loadType = data.loadType;
details.pageInfo.chargeType = data.chargeType;
});
// if (code !== 200) return;
// details.pageInfo.startWarehouseInfo.warehouseId = data.carsLoadEntity.startWarehouseId;
// details.pageInfo.startWarehouseInfo.warehouseName = data.carsLoadEntity.startWarehouseName;
//
// details.pageInfo.loadType = data.loadType;
// details.pageInfo.chargeType = data.chargeType;
// });
//
setTabelHeight();
@ -709,7 +649,6 @@ const searchChange = () => {
const searchReset = () => {
details.query = {};
details.stockupDate = [];
details.page.pageNum = 1;
initOriginWarehouseOrder();
};
@ -733,9 +672,32 @@ const searchHide = async () => {
};
/** 表格表头输入框搜索 */
const inputsc = (index, row) => {
details.query[row.prop] = index;
initOriginWarehouseOrder();
const inputsc = (value, row) => {
try {
//
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 { column } = row;
if (mergeColumn.indexOf(column.property) !== -1) {

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

@ -1,5 +1,5 @@
<template>
<basic-container>
<basic-container v-loading="details.loadingObj.submitLoading">
<div class="avue-crud">
<!-- 标题 基础信息 -->
<el-divider content-position="left">
@ -28,7 +28,7 @@
reserve-keyword
placeholder="中转承运商"
@change="carrierNameChange"
:remote-method="remoteMethod"
:remote-method="value => debounce(remoteMethod(value), 500)"
:loading="details.loadingObj.carrierName"
>
<el-option
@ -63,7 +63,7 @@
</el-select> -->
<el-input v-model="form.operator" />
</el-form-item>
<el-form-item label="送货方式">
<el-form-item label="送货方式" prop="deliveryType">
<el-select
:teleported="false"
v-model="form.deliveryType"
@ -79,7 +79,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="付款方式">
<el-form-item label="付款方式" prop="payMethod">
<el-select
:teleported="false"
v-model="form.payMethod"
@ -95,7 +95,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="运费分摊方式">
<el-form-item label="运费分摊方式" prop="chargeType">
<el-select
:teleported="false"
v-model="form.chargeType"
@ -111,7 +111,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="送货司机">
<el-form-item label="送货司机" prop="driverName">
<el-select
v-model="form.driverName"
filterable
@ -148,7 +148,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="是否结算">
<el-form-item label="是否结算" prop="isSettlement">
<el-select
:teleported="false"
v-model="form.isSettlement"
@ -164,7 +164,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="代收贷款">
<el-form-item label="代收贷款" prop="replacePrice">
<el-input-number
placeholder="代收贷款"
v-model="form.replacePrice"
@ -184,6 +184,7 @@
placeholder="承运时间"
size="default"
:teleported="false"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item label="客户收货时间" prop="receivingTimeStr">
@ -193,6 +194,7 @@
placeholder="客户收货时间"
size="default"
:teleported="false"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item label="运费" prop="countTransportCost">
@ -205,7 +207,7 @@
controls-position="right"
/>
</el-form-item>
<el-form-item label="司机结算费">
<el-form-item label="司机结算费" prop="settlementValue">
<el-input-number
v-model="form.settlementValue"
:precision="2"
@ -235,37 +237,39 @@
<!-- 列表模块 -->
<div style="width: 49%">
<div class="add_row_title">运单池</div>
<div v-if="!search">
<el-form :inline="true" label-width="80px" :model="details.oldQuery" class="el-fr-d">
<div class="fo-fl">
<el-form-item label="备注" class="el-times">
<el-input></el-input>
</el-form-item>
<el-form-item label="托盘码" class="el-times">
<el-input></el-input>
</el-form-item>
<el-form-item class="el-times">
<el-date-picker
v-model="stockupDate"
type="daterange"
unlink-panels
range-separator="-"
start-placeholder="开单日期"
end-placeholder="开单日期"
:shortcuts="shortcuts"
clearable
:teleported="false"
/>
</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>
<div v-h5uShow="!search">
<el-form
:inline="true"
label-width="80px"
:model="details.oldQuery"
class="header_search"
>
<el-form-item label="备注">
<el-input></el-input>
</el-form-item>
<el-form-item label="托盘码">
<el-input></el-input>
</el-form-item>
<el-form-item>
<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>
@ -273,7 +277,7 @@
<div style="margin-bottom: 10px" class="flex-c-sb">
<div class="avue-crud__right">
<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>
</div>
@ -314,35 +318,38 @@
<!-- 列表模块 -->
<div style="width: 49%">
<div class="add_row_title">调度池</div>
<div v-if="!search">
<el-form :inline="true" label-width="80px" :model="details.newQuery" class="el-fr-d">
<div class="fo-fl">
<el-form-item label="备注" class="el-times">
<el-input></el-input>
</el-form-item>
<el-form-item label="托盘码" class="el-times">
<el-input></el-input>
</el-form-item>
<el-form-item 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>
<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>
<div v-h5uShow="!search">
<el-form
:inline="true"
label-width="80px"
:model="details.newQuery"
class="header_search"
>
<el-form-item label="备注">
<el-input></el-input>
</el-form-item>
<el-form-item label="托盘码">
<el-input></el-input>
</el-form-item>
<el-form-item>
<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>
@ -419,13 +426,13 @@
</template>
<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 dayjs from 'dayjs';
import { mapGetters } from 'vuex';
/** 获取字典 */
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 {
postloadFindLoadInitData,
@ -434,11 +441,16 @@ import {
postFindCarListByName,
postFindDriverListByName,
postFindCarrierByName,
postFindUseOrderList,
} 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 { ElMessage } from 'element-plus';
import { useRouter } from 'vue-router';
import { useRouter, useRoute } from 'vue-router';
import { useStore } from 'vuex';
// vuex
@ -446,6 +458,7 @@ const $store = useStore();
//
const $router = useRouter();
const $route = useRoute();
//
const ruleFormRef = ref();
@ -499,6 +512,7 @@ const details = reactive<any>({
newColumnList,
/** 列表数据 */
newData: [],
newRenderData: [],
oldData: [],
rules: {
/** 中转承运商 */
@ -593,8 +607,6 @@ const details = reactive<any>({
/** 零担补录 */
transferVisited: false,
},
/** 列表Dom节点 */
listNode: '',
form: {
customerType: '',
},
@ -608,6 +620,8 @@ const details = reactive<any>({
driverListByName: [],
/** 被选中在调度池的订单列表 */
orderCodeList: [],
/** 修改时, 已存在调度池中的运单数据 */
MappingData: [],
});
const {
@ -629,34 +643,124 @@ const {
const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList']));
console.log('permission :>> ', permission);
onMounted(() => {
const timer = setTimeout(() => {
details.listNode = document.querySelector('.maboxhi');
details.listNode.style.transition = 'all .5s ease-out';
console.log('details.listNode :>> ', details.listNode);
clearTimeout(timer);
}, 100);
onMounted(async () => {
await nextTick();
setNodeHeight(document.querySelectorAll('.maboxhi'), '50vh', true);
});
/** 请求页面数据 */
const onLoad = async () => {
const res = await postloadFindLoadInitData();
details.form = {};
await nextTick();
ruleFormRef.value.resetFields();
const { code, data } = res.data;
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;
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.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;
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 = {}) => {
@ -722,20 +826,20 @@ const showdrawer = (_flag?: boolean, _type?: string) => {
const searchHide = async () => {
details.search = !details.search;
await nextTick();
setNodeHeight(details.listNode);
setNodeHeight(document.querySelectorAll('.maboxhi'), '50vh', true);
};
/** 远程搜索承运商 */
const remoteMethod = value => {
const remoteMethod = async value => {
try {
console.log('value :>> ', value);
details.loadingObj.carrierName = true;
// if (!value) return;
const res = debounce(async () => {
const res = await postFindCarrierByName({ carrierName: value });
const { code, data } = res.data;
if (code !== 200) return;
details.carrierNameOptions = data;
}, 500);
const res = await postFindCarrierByName({ carrierName: value });
const { code, data } = res.data;
if (code !== 200) return;
details.carrierNameOptions = data;
} catch (error) {
} finally {
details.loadingObj.carrierName = false;
@ -923,6 +1027,119 @@ const back = () => {
$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) => {
if (!formEl) return;
@ -933,48 +1150,8 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
details.loadingObj.submitLoading = true;
try {
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);
if ($route.query.type === 'add') await addSubmit();
else if ($route.query.type === 'edit') await editSubmit();
} catch (error) {
console.log('error :>> ', error);
} finally {
@ -1140,4 +1317,8 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
) {
--el-color-danger: #f00;
}
.header_search > div {
width: 40%;
}
</style>

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

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

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

@ -701,7 +701,7 @@ export default {
this.$router.push({
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"
@click="handleAddPickerClipData"
v-if="orderStatus === 'all'"
>加入单夹
>加入单夹
</el-button>
<el-button
v-else

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

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

Loading…
Cancel
Save