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,
});
};
/**
* 修改配载节点费用
*/
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>
<!-- <el-text class="mx-1">{{ column.label }}</el-text> -->
<el-input
v-if="column.type == 2 || column.type == 13"
v-if="column.type == 2"
v-model.trim="column.values"
clearable
:placeholder="`请输入${column.label}`"

10
src/option/distribution/VehicleStowage.js

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

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

@ -67,7 +67,7 @@
</div>
<el-dialog v-model="isshow" title="切换仓库" width="30%">
<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
v-for="(item, index) in datalist"
:key="item.id"
@ -178,7 +178,7 @@ export default {
}
} else {
let res = await preserveCurrentWarehouse(this.datalist[this.warehousevalue]);
if (res.data.code == 200) {
if (res.data.code == 200) {
this.$message({ message: '切换成功', type: 'success' });
localStorage.setItem('checkwarehousevalue', this.warehousevalue);
this.$router.push({

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

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

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

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

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

@ -152,7 +152,9 @@
<!-- <el-text @click="handleGoWaybill(slotProps.scope)">
{{ item.nodeName }}
</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
/></el-icon>
</span>
@ -165,11 +167,21 @@
<el-button type="text" @click="handleShowTruckLoadingDetails(slotProps.scope)"
>装车明细</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"
:disabled="Mydata.id !== slotProps.scope.row.nowWarehouseId"
@click="handleNodeCost(slotProps.scope)"
>节点费用</el-button
>
</template>
</template>
</tablecmt>
@ -436,12 +448,21 @@ import {
postCancelStartCarByLoadId,
postCancelCarsLoadByLoadId,
} from '@/api/distribution/VehicleStowage';
import { useStore } from 'vuex';
import { useRouter } from 'vue-router';
import { ElMessage, ElMessageBox } from 'element-plus';
//
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>({
/** 是否开启搜索 */
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 }) => {
console.log('row :>> ', row);

6
vite.config.js

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

Loading…
Cancel
Save