Browse Source

新增节点费用设置

master
qb 1 year ago
parent
commit
e654271c00
  1. 11
      src/api/distribution/AddVehicleStowage.js
  2. 2
      src/components/tablecmt/tablecmt.vue
  3. 10
      src/option/distribution/VehicleStowage.js
  4. 4
      src/page/index/top/index.vue
  5. 56
      src/views/distribution/artery/AddVehicleStowage.vue
  6. 39
      src/views/distribution/artery/VehicleArrivalManagement.vue
  7. 39
      src/views/distribution/artery/VehicleStowage.vue
  8. 6
      vite.config.js

11
src/api/distribution/AddVehicleStowage.js

@ -142,4 +142,15 @@ export const postUpdateCarsLoadBasicData = data => {
data, data,
}); });
}; };
/**
* 修改配载节点费用
*/
export const postUpdateLoadFeeByNodeId = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/updateLoadFeeByNodeId',
method: 'post',
data,
});
};
// //

2
src/components/tablecmt/tablecmt.vue

@ -39,7 +39,7 @@
<template #header> <template #header>
<!-- <el-text class="mx-1">{{ column.label }}</el-text> --> <!-- <el-text class="mx-1">{{ column.label }}</el-text> -->
<el-input <el-input
v-if="column.type == 2 || column.type == 13" v-if="column.type == 2"
v-model.trim="column.values" v-model.trim="column.values"
clearable clearable
:placeholder="`请输入${column.label}`" :placeholder="`请输入${column.label}`"

10
src/option/distribution/VehicleStowage.js

@ -17,7 +17,7 @@ export const columnList = [
{ {
prop: 'waybillNo', prop: 'waybillNo',
label: '批次号', label: '批次号',
type: 6, type: 13,
values: '', values: '',
width: '150', width: '150',
checkarr: [], checkarr: [],
@ -28,7 +28,7 @@ export const columnList = [
{ {
prop: 'carsLineName', prop: 'carsLineName',
label: '路线', label: '路线',
type: 6, type: 13,
values: '', values: '',
width: '250', width: '250',
checkarr: [], checkarr: [],
@ -405,7 +405,7 @@ export const detailsColumnList = [
{ {
prop: 'orderCode', prop: 'orderCode',
label: '运单号', label: '运单号',
type: 6, type: 13,
values: '', values: '',
width: '150', width: '150',
checkarr: [], checkarr: [],
@ -416,7 +416,7 @@ export const detailsColumnList = [
{ {
prop: 'orderCode', prop: 'orderCode',
label: '合同号', label: '合同号',
type: 6, type: 13,
values: '', values: '',
width: '150', width: '150',
checkarr: [], checkarr: [],
@ -427,7 +427,7 @@ export const detailsColumnList = [
{ {
prop: 'orderPackageCode', prop: 'orderPackageCode',
label: '包条码', label: '包条码',
type: 6, type: 13,
values: '', values: '',
width: '200', width: '200',
checkarr: [], checkarr: [],

4
src/page/index/top/index.vue

@ -67,7 +67,7 @@
</div> </div>
<el-dialog v-model="isshow" title="切换仓库" width="30%"> <el-dialog v-model="isshow" title="切换仓库" width="30%">
<div style="display: flex; flex-direction: column; align-items: center"> <div style="display: flex; flex-direction: column; align-items: center">
<el-select class="selecin" v-model="warehousevalue" filterable placeholder="请选择切换的仓库"> <el-select class="selecin" v-model="warehousevalue" filterable placeholder="请选择切换的仓库">
<el-option <el-option
v-for="(item, index) in datalist" v-for="(item, index) in datalist"
:key="item.id" :key="item.id"
@ -178,7 +178,7 @@ export default {
} }
} else { } else {
let res = await preserveCurrentWarehouse(this.datalist[this.warehousevalue]); let res = await preserveCurrentWarehouse(this.datalist[this.warehousevalue]);
if (res.data.code == 200) { if (res.data.code == 200) {
this.$message({ message: '切换成功', type: 'success' }); this.$message({ message: '切换成功', type: 'success' });
localStorage.setItem('checkwarehousevalue', this.warehousevalue); localStorage.setItem('checkwarehousevalue', this.warehousevalue);
this.$router.push({ this.$router.push({

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

@ -242,13 +242,15 @@
</div> </div>
<!-- 订单池和调度池 --> <!-- 订单池和调度池 -->
<template v-if="details.nodeInfoData.length > 1"> <template v-if="Number(details.pageType) !== 3 && details.nodeInfoData.length > 1">
<div class="add_row" v-for="(item, index) in details.nodeInfoData"> <div class="add_row" v-for="(item, index) in details.nodeInfoData">
<template v-if="index !== 0"> <template v-if="index > details.warehouseIndex">
<div style="width: 49%"> <div style="width: 49%">
<!-- 头部 --> <!-- 头部 -->
<el-divider content-position="left"> <el-divider content-position="left">
<span style="margin-right: 20px">{{ details.nodeInfoData[0].nodeName }}</span> <span style="margin-right: 20px">{{
details.nodeInfoData[details.warehouseIndex].nodeName
}}</span>
<span>运单池</span> <span>运单池</span>
</el-divider> </el-divider>
@ -556,6 +558,7 @@ import {
postUpdatePlanNumByCarsOrderId, postUpdatePlanNumByCarsOrderId,
postAddOrderToFinalNodeId, postAddOrderToFinalNodeId,
postUpdateCarsLoadBasicData, postUpdateCarsLoadBasicData,
postUpdateLoadFeeByNodeId,
} from '@/api/distribution/AddVehicleStowage'; } from '@/api/distribution/AddVehicleStowage';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import { ElMessage, ElMessageBox } from 'element-plus'; import { ElMessage, ElMessageBox } from 'element-plus';
@ -803,7 +806,7 @@ const clearSelectionList = () => {
}; };
/** 设置节点费用禁用 */ /** 设置节点费用禁用 */
const handleEditForbidden = (_arr: []) => { const handleEditForbidden = (_arr: any[]) => {
if (_arr.length === 0) return; if (_arr.length === 0) return;
// (, ) // (, )
@ -830,11 +833,11 @@ const initOriginWarehouseOrder = async (params = {}) => {
details.loadingObj.oldListLoading = true; details.loadingObj.oldListLoading = true;
const submitData = { const submitData = {
...details.page, ...details.page,
loadId: details.pageInfo.startWarehouseInfo.warehouseId,
orderCodes: details.orderCodeList, orderCodes: details.orderCodeList,
...details.query, ...details.query,
...params, ...params,
}; };
if (Number(details.pageType) === 2) submitData.loadId = details.loadId;
if (submitData.orderCodes.length === 0) delete submitData.orderCodes; if (submitData.orderCodes.length === 0) delete submitData.orderCodes;
const res = await postFindAllOrderList(submitData); const res = await postFindAllOrderList(submitData);
console.log('res :>> ', res); console.log('res :>> ', res);
@ -898,7 +901,7 @@ const onLoad = async () => {
details.form.startWarehouseId = data.startWarehouseInfo.warehouseId; details.form.startWarehouseId = data.startWarehouseInfo.warehouseId;
} }
// //
else if (Number(details.pageType) === 2) { else {
console.log('222 :>> ', 222); console.log('222 :>> ', 222);
const res = await postSelectEditDetailByLoadId({ loadId: details.loadId }); const res = await postSelectEditDetailByLoadId({ loadId: details.loadId });
console.log('res :>> ', res); console.log('res :>> ', res);
@ -922,7 +925,7 @@ const onLoad = async () => {
details.nodeInfoData[index].selectionList = list; details.nodeInfoData[index].selectionList = list;
console.log('list :>> ', list); console.log('list :>> ', list);
}; };
initDispatchOrder(val); if (Number(details.pageType) === 2) initDispatchOrder(val);
return val; return val;
}) })
); );
@ -932,7 +935,7 @@ const onLoad = async () => {
details.pageInfo.startWarehouseInfo.warehouseId = data.carsLoadEntity.startWarehouseId; details.pageInfo.startWarehouseInfo.warehouseId = data.carsLoadEntity.startWarehouseId;
details.pageInfo.startWarehouseInfo.warehouseName = data.carsLoadEntity.startWarehouseName; details.pageInfo.startWarehouseInfo.warehouseName = data.carsLoadEntity.startWarehouseName;
// //
initOriginWarehouseOrder(); if (Number(details.pageType) === 2) initOriginWarehouseOrder();
// //
setTabelHeight(); setTabelHeight();
@ -1271,6 +1274,9 @@ const remoteMethodDriver = async val => {
details.driverListByName = data; details.driverListByName = data;
}; };
//
remoteMethodDriver('');
/** 查询车辆信息 */ /** 查询车辆信息 */
const remoteMethodCar = async val => { const remoteMethodCar = async val => {
// if (!val) return; // if (!val) return;
@ -1281,6 +1287,7 @@ const remoteMethodCar = async val => {
if (code !== 200) return; if (code !== 200) return;
details.carListByName = data; details.carListByName = data;
}; };
remoteMethodCar('')
/** 修改计划数 */ /** 修改计划数 */
const handleEditplanNum = ({ row }, item) => { const handleEditplanNum = ({ row }, item) => {
@ -1424,6 +1431,37 @@ const editSubmit = async () => {
} }
}; };
/** 节点费用修改提交 */
const nodeCostSubmit = async () => {
try {
btnLoadingObj.submitBtn = false;
const submitData = {
loadId: details.loadId,
...details.form,
carsLoadLineList: details.nodeInfoData,
};
console.log('details.nodeInfoData :>> ', details.nodeInfoData);
console.log('details.form :>> ', details.form);
console.log('submitData :>> ', submitData);
const res = await postUpdateLoadFeeByNodeId(submitData);
const { code, msg } = res.data;
if (code !== 200) return;
ElMessage({
message: msg,
type: 'success',
});
back();
} catch (error) {
console.log('error :>> ', error);
} finally {
btnLoadingObj.submitBtn = false;
}
};
/** 提交 */ /** 提交 */
const handleSubmit = (formEl: FormInstance | undefined) => { const handleSubmit = (formEl: FormInstance | undefined) => {
if (btnLoadingObj.submitBtn) return; if (btnLoadingObj.submitBtn) return;
@ -1435,6 +1473,7 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
if (Number(details.pageType) === 1) addSubmit(); if (Number(details.pageType) === 1) addSubmit();
// //
else if (Number(details.pageType) === 2) editSubmit(); else if (Number(details.pageType) === 2) editSubmit();
else if (Number(details.pageType) === 3) nodeCostSubmit();
} else { } else {
console.log('error submit!', fields); console.log('error submit!', fields);
} }
@ -1442,6 +1481,7 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
}; };
watch($route, () => { watch($route, () => {
if ($route.path !== '/distribution/artery/AddVehicleStowage') return;
onLoad(); onLoad();
}); });
</script> </script>

39
src/views/distribution/artery/VehicleArrivalManagement.vue

@ -170,12 +170,12 @@
<span>{{ item.nodeName }}</span> <span>{{ item.nodeName }}</span>
</div> </div>
</template> </template>
<el-text>{{ item.nodeName }}</el-text> <el-text style="margin: 0 !important">{{ item.nodeName }}</el-text>
</el-tooltip> </el-tooltip>
<!-- <el-text @click="handleGoWaybill(slotProps.scope)"> <!-- <el-text @click="handleGoWaybill(slotProps.scope)">
{{ item.nodeName }} {{ item.nodeName }}
</el-text> --> </el-text> -->
<el-icon v-if="index !== slotProps.scope.row.carsLoadLineList.length - 1" <el-icon class="ml" v-if="index !== slotProps.scope.row.carsLoadLineList.length - 1"
><Right ><Right
/></el-icon> /></el-icon>
</span> </span>
@ -183,18 +183,20 @@
<template v-if="slotProps.scope.column.label === '操作'"> <template v-if="slotProps.scope.column.label === '操作'">
<el-text @click="handleShowTruckLoadingDetails(slotProps.scope)">装车明细</el-text> <el-text @click="handleShowTruckLoadingDetails(slotProps.scope)">装车明细</el-text>
<el-text>编辑</el-text> <el-button
type="text"
:disabled="
Mydata.id !== slotProps.scope.row.nowWarehouseId ||
Number(slotProps.scope.row.loadStatus) === 40
"
@click="handleEditStowage(slotProps.scope)"
>编辑</el-button
>
</template> </template>
</template> </template>
</tablecmt> </tablecmt>
</el-row> </el-row>
<!-- 统计 -->
<el-row>
<div>选择数: , 运单数: , 件数: , 重量: , 体积: , 提货费: ,</div>
<div>总计: 总数: , 运单数: , 件数: , 重量: , 体积: , 提货费: ,</div>
</el-row>
<!-- 分页模块 --> <!-- 分页模块 -->
<el-row class="el-fy"> <el-row class="el-fy">
<div class="avue-crud__pagination flex-c-sb" style="width: 100%"> <div class="avue-crud__pagination flex-c-sb" style="width: 100%">
@ -328,6 +330,10 @@ import { ElMessage, ElMessageBox } from 'element-plus';
// //
const $router = useRouter(); const $router = useRouter();
const Mydata = ref<any>({});
Mydata.value = JSON.parse(localStorage.getItem('my_data')); //
const details = reactive({ const details = reactive({
/** 是否开启搜索 */ /** 是否开启搜索 */
search: false, search: false,
@ -612,7 +618,7 @@ const handleArrive = async () => {
onLoad(); onLoad();
}; };
/** 到车 */ /** 取消到车 */
const handleCloseArrive = async () => { const handleCloseArrive = async () => {
console.log( console.log(
'details.selectionList.map(val => val.id) :>> ', 'details.selectionList.map(val => val.id) :>> ',
@ -635,6 +641,14 @@ const handleCloseArrive = async () => {
onLoad(); onLoad();
}; };
/** 编辑配载信息 */
const handleEditStowage = ({ row }) => {
$router.push({
path: '/distribution/artery/AddVehicleStowage',
query: { name: '编辑配载', type: 2, loadId: row.id },
});
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -651,4 +665,9 @@ const handleCloseArrive = async () => {
:deep(.el-range-editor.el-input__wrapper) { :deep(.el-range-editor.el-input__wrapper) {
height: 100% !important; height: 100% !important;
} }
.ml {
margin: 5px;
color: var(--el-color-primary);
}
</style> </style>

39
src/views/distribution/artery/VehicleStowage.vue

@ -152,7 +152,9 @@
<!-- <el-text @click="handleGoWaybill(slotProps.scope)"> <!-- <el-text @click="handleGoWaybill(slotProps.scope)">
{{ item.nodeName }} {{ item.nodeName }}
</el-text> --> </el-text> -->
<el-icon v-if="index !== slotProps.scope.row.carsLoadLineList.length - 1" <el-icon
style="margin: 5px"
v-if="index !== slotProps.scope.row.carsLoadLineList.length - 1"
><Right ><Right
/></el-icon> /></el-icon>
</span> </span>
@ -165,11 +167,21 @@
<el-button type="text" @click="handleShowTruckLoadingDetails(slotProps.scope)" <el-button type="text" @click="handleShowTruckLoadingDetails(slotProps.scope)"
>装车明细</el-button >装车明细</el-button
> >
<el-button type="text" :disabled="false" @click="handleEditStowage(slotProps.scope)">编辑</el-button> <el-button
type="text"
:disabled="Mydata.id !== slotProps.scope.row.nowWarehouseId"
@click="handleEditStowage(slotProps.scope)"
>编辑</el-button
>
<!-- <el-button type="text">数据同步</el-button> --> <!-- <el-button type="text">数据同步</el-button> -->
<el-button type="text">批量装车</el-button> <!-- <el-button type="text">批量装车</el-button>
<el-button type="text">手动装车</el-button> <el-button type="text">手动装车</el-button> -->
<el-button type="text">节点费用</el-button> <el-button
type="text"
:disabled="Mydata.id !== slotProps.scope.row.nowWarehouseId"
@click="handleNodeCost(slotProps.scope)"
>节点费用</el-button
>
</template> </template>
</template> </template>
</tablecmt> </tablecmt>
@ -436,12 +448,21 @@ import {
postCancelStartCarByLoadId, postCancelStartCarByLoadId,
postCancelCarsLoadByLoadId, postCancelCarsLoadByLoadId,
} from '@/api/distribution/VehicleStowage'; } from '@/api/distribution/VehicleStowage';
import { useStore } from 'vuex';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { ElMessage, ElMessageBox } from 'element-plus'; import { ElMessage, ElMessageBox } from 'element-plus';
// //
const $router = useRouter(); const $router = useRouter();
const $store = useStore();
const Mydata = ref<any>({});
Mydata.value = JSON.parse(localStorage.getItem('my_data')); //
console.log('Mydata :>> ', Mydata);
const details = reactive<any>({ const details = reactive<any>({
/** 是否开启搜索 */ /** 是否开启搜索 */
search: true, search: true,
@ -862,6 +883,14 @@ const handleEditStowage = ({ row }) => {
}); });
}; };
/** 节点费用 */
const handleNodeCost = ({ row }) => {
$router.push({
path: '/distribution/artery/AddVehicleStowage',
query: { name: '节点费用更改', type: 3, loadId: row.id },
});
};
/** 前往配载详情 */ /** 前往配载详情 */
const handleGoWaybill = ({ row }) => { const handleGoWaybill = ({ row }) => {
console.log('row :>> ', row); console.log('row :>> ', row);

6
vite.config.js

@ -13,8 +13,10 @@ export default ({ mode, command }) => {
proxy: { proxy: {
'/api': { '/api': {
// target: 'http://192.168.10.126:8889', // target: 'http://192.168.10.126:8889',
// hy
target: 'http://test.api.huitongys.com', target: 'http://192.168.10.48:13000',
// target: 'http://test.api.huitongys.com',
changeOrigin: true, changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''), rewrite: path => path.replace(/^\/api/, ''),
}, },

Loading…
Cancel
Save