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