Browse Source

晚上干线模板, 新增干线包件流转节点

dev-xx
qb 1 year ago
parent
commit
e9b88160fa
  1. 11
      src/api/waybill/orderPackageListDetails.js
  2. 11
      src/option/distribution/VehicleArrivalManagement.js
  3. 11
      src/option/distribution/VehicleStowage.js
  4. 226
      src/option/waybill/orderPackageListDetails.js
  5. 45
      src/views/basicdata/driverArtery/basicdataDriverArtery.vue
  6. 22
      src/views/distribution/artery/VehicleStowage.vue
  7. 5
      src/views/financialsector/Financialse/FinancialBill.vue
  8. 319
      src/views/financialsector/Financialse/FinancialTrunkLine.vue
  9. 46
      src/views/waybill/orderPackageListDetails.vue

11
src/api/waybill/orderPackageListDetails.js

@ -54,3 +54,14 @@ export const postDeleteAdvanceDetail = data => {
data,
});
};
/**
* 包件流转节点
*/
export const postFinaPackageTrackLogList = data => {
return request({
url: '/api/logpm-warehouse/packageTrackLog/finaPackageTrackLogList ',
method: 'post',
data,
});
};

11
src/option/distribution/VehicleArrivalManagement.js

@ -122,10 +122,17 @@ export const columnList = [
{
prop: 'loadStatusName',
label: '车辆状态',
type: 13,
type: 14,
values: '',
width: '130',
checkarr: [],
checkarr: [
{ value: 0, label: '未发车' },
{ value: 10, label: '已发车' },
{ value: 20, label: '网点到车' },
{ value: 30, label: '网点发车' },
{ value: 40, label: '终点到车' },
{ value: 100, label: '取消配载' },
],
fixed: false,
sortable: true,
},

11
src/option/distribution/VehicleStowage.js

@ -122,10 +122,17 @@ export const columnList = [
{
prop: 'loadStatusName',
label: '车辆状态',
type: 13,
type: 14,
values: '',
width: '130',
checkarr: [],
checkarr: [
{ label: '未发车', value: 0 },
{ label: '已发车', value: 10 },
{ label: '网点到车', value: 20 },
{ label: '网点发车', value: 30 },
{ label: '终点到车', value: 40 },
{ label: '取消配载', value: 100 },
],
fixed: false,
sortable: true,
},

226
src/option/waybill/orderPackageListDetails.js

@ -387,15 +387,15 @@ export const packageDetailColumnList = [
/** 流转节点 */
export const flowNodeColumnList = [
{
prop: 'createUserName',
label: '复选框',
type: 0,
values: '',
width: '55',
checkarr: [],
fixed: false,
},
// {
// prop: 'createUserName',
// label: '复选框',
// type: 0,
// values: '',
// width: '55',
// checkarr: [],
// fixed: false,
// },
{
prop: 'createUserName',
label: '序号',
@ -406,7 +406,7 @@ export const flowNodeColumnList = [
fixed: false,
},
{
prop: 'createUserName',
prop: 'warehouseName',
label: '仓库',
type: 1,
values: '',
@ -415,18 +415,18 @@ export const flowNodeColumnList = [
fixed: false,
sortable: true,
},
// {
// prop: 'createTime',
// label: '订单自编号',
// type: 1,
// values: '',
// width: '150',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
{
prop: 'createUserName',
label: '订单自编号',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'createUserName',
prop: 'orderPackageCode',
label: '包条码',
type: 1,
values: '',
@ -436,78 +436,8 @@ export const flowNodeColumnList = [
sortable: true,
},
{
prop: 'createUserName',
label: '是否干仓配',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'createUserName',
label: '服务类型',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'createUserName',
label: '流转节点',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'createUserName',
label: '库位',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'createUserName',
label: '托盘码',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'createUserName',
label: '一级品名称',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'createUserName',
label: '二级品名称',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'createUserName',
label: '三级品名称',
prop: 'operator',
label: '操作人',
type: 1,
values: '',
width: '130',
@ -516,18 +446,18 @@ export const flowNodeColumnList = [
sortable: true,
},
{
prop: 'createUserName',
label: '物料名称',
prop: 'content',
label: '描述',
type: 1,
values: '',
width: '130',
width: '250',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'createUserName',
label: '物料编码',
prop: 'workNodeName',
label: '节点',
type: 1,
values: '',
width: '130',
@ -535,4 +465,104 @@ export const flowNodeColumnList = [
fixed: false,
sortable: true,
},
// {
// prop: 'createUserName',
// label: '是否干仓配',
// type: 1,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
// {
// prop: 'createUserName',
// label: '服务类型',
// type: 1,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
// {
// prop: 'createUserName',
// label: '流转节点',
// type: 1,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
// {
// prop: 'createUserName',
// label: '库位',
// type: 1,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
// {
// prop: 'createUserName',
// label: '托盘码',
// type: 1,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
// {
// prop: 'createUserName',
// label: '一级品名称',
// type: 1,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
// {
// prop: 'createUserName',
// label: '二级品名称',
// type: 1,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
// {
// prop: 'createUserName',
// label: '三级品名称',
// type: 1,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
// {
// prop: 'createUserName',
// label: '物料名称',
// type: 1,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
// {
// prop: 'createUserName',
// label: '物料编码',
// type: 1,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
];

45
src/views/basicdata/driverArtery/basicdataDriverArtery.vue

@ -3,36 +3,30 @@
<div class="avue-crud">
<div v-h5uShow="search">
<!-- 查询模块 -->
<el-form :inline="true" :model="query" class="header_search">
<el-form-item label="订单自编号:">
<el-input
v-model="query.orderCodeNum"
placeholder="请输入订单自编号"
clearable
></el-input>
<el-form :inline="true" label-width="100px" :model="query" class="header_search">
<el-form-item label="姓名:">
<el-input v-model="query.orderCodeNum" placeholder="姓名" clearable></el-input>
</el-form-item>
<el-form-item label="运单:">
<el-input v-model="query.waybillNum" placeholder="请输入运单编号" clearable />
<el-form-item label="手机号码:">
<el-input v-model="query.waybillNum" placeholder="请输入手机号码" clearable />
</el-form-item>
<el-form-item label="入库时间:" class="el-times">
<el-date-picker
v-model="stockupDate"
type="datetimerange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
:default-time="defaultTime2"
/>
<!-- <el-form-item label="司机类型:">
<el-input v-model="query.waybillNum" placeholder="请输入司机类型" clearable />
</el-form-item>
<el-form-item label="职务类型:">
<el-input v-model="query.waybillNum" placeholder="请输入职务类型" clearable />
</el-form-item>
<el-form-item label="承运商:">
<el-input v-model="query.waybillNum" placeholder="请输入承运商" clearable />
</el-form-item> -->
<!-- 查询按钮 -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button>
<el-button icon="el-icon-delete" @click="searchReset()"> </el-button>
<el-button icon="el-icon-delete" @click="searchReset"> </el-button>
</el-form-item>
</el-form>
</div>
@ -612,6 +606,15 @@ export default {
this.loadingObj.UploadLoadong = false;
}
},
searchReset() {
this.query = {};
for (let i = 0; i < this.columnList.length; i++) {
const item = this.columnList[i];
item.values = '';
}
this.onLoad();
},
},
};
</script>

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

@ -139,7 +139,7 @@
<div>
<span class="mr-10">状态:</span>
<span>{{
loadStatus.find(val => val.code === Number(item.nodeStatus)).label
loadStatus.find(val => val.value === Number(item.nodeStatus)).label
}}</span>
</div>
</template>
@ -553,18 +553,18 @@ const details = reactive<any>({
/** 车辆状态字典 */
const carStateDictionaries = reactive([
{ label: '未发车', code: 0 },
{ label: '已发车', code: 10 },
{ label: '网点到车', code: 20 },
{ label: '网点发车', code: 30 },
{ label: '终点到车', code: 40 },
{ label: '取消配载', code: 100 },
{ label: '未发车', value: 0 },
{ label: '已发车', value: 10 },
{ label: '网点到车', value: 20 },
{ label: '网点发车', value: 30 },
{ label: '终点到车', value: 40 },
{ label: '取消配载', value: 100 },
]);
const loadStatus = reactive([
{ label: '未到达', code: 0 },
{ label: '已到车', code: 10 },
{ label: '已发车', code: 20 },
{ label: '未到达', value: 0 },
{ label: '已到车', value: 10 },
{ label: '已发车', value: 20 },
]);
const {
@ -679,7 +679,7 @@ const onLoad = debounce(async (params = {}) => {
for (let item of details.data) {
item.loadStatusName = item.loadStatusName = carStateDictionaries.find(
val => Number(item.loadStatus) === val.code
val => Number(item.loadStatus) === val.value
).label;
item.NumberOfPiecesInTheCar = item.realLoadingNumber - item.unloadNumber;

5
src/views/financialsector/Financialse/FinancialBill.vue

@ -413,9 +413,6 @@ const handleChangeCategory = item => {
/** 插混品类 */
const remoteMethod = async (value, item) => {
console.log('value :>> ', value);
console.log('item :>> ', item);
try {
if (!value) return;
item.loading = true;
@ -453,7 +450,7 @@ const resetFormData = () => {
/** 提交 */
const handleSubmit = () => {
// if (details.form.priceMethod.length === 0) return ElMessage.error('');
if (details.form.priceMethod.length === 0) ElMessage.error('请选择计价方式');
formRef.value.validate(async valid => {
if (!valid) return;

319
src/views/financialsector/Financialse/FinancialTrunkLine.vue

@ -1,8 +1,12 @@
<template>
<div v-loading="details.loadingObj.pageLoading">
<el-form label-width="150px">
<el-form label-width="150px" :model="details.form" ref="formRef">
<!-- 计价方式 -->
<el-form-item label="计价方式">
<el-form-item
label="计价方式"
prop="priceMethod"
:rules="[{ required: true, message: '请选择计价方式', trigger: ['blur', 'change'] }]"
>
<el-select
v-model="details.form.priceMethod"
clearable
@ -13,9 +17,9 @@
>
<el-option
v-for="item in details.priceMethodType"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
@ -48,56 +52,70 @@
</el-form>
<template v-if="details.form.isDistinguish === '1'">
<el-divider content-position="left">品类单价</el-divider>
<el-divider content-position="left">品类管理</el-divider>
<!-- 附加费品类 -->
<el-form-item
v-for="value in details.form.billTemplateDetail"
label-width="150px"
:label="value.title"
:key="value.title"
>
<div class="el_Storagecategory" v-loading="goriesloading" element-loading-text="Loading...">
<div class="el_table_span">
<div class="el_table_id">序号</div>
<div class="el_table_title">产品品类</div>
</div>
<template v-for="value in details.form.billTemplateDetail" :key="value.title">
<!-- 附加费品类 -->
<el-form-item
label-width="150px"
v-if="details.form.priceMethod.includes(value.code)"
:label="value.title"
>
<div
class="el_Storagecategory"
v-loading="goriesloading"
element-loading-text="Loading..."
>
<div class="el_table_span">
<div class="el_table_id">序号</div>
<div class="el_table_title">产品品类</div>
</div>
<!-- 表格循环 -->
<div class="el_table_td" v-for="(item, index) in value.categories">
<div class="el_table_idNumber">{{ index }}</div>
<el-select
class="el_Cselect"
v-model="item.Additionalcategories"
filterable
clearable
placeholder="请选择品类"
style="width: 240px"
>
<el-option
v-for="item in Additionalcategories"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div class="el_table_operation">
<span
v-if="item.reduce"
@click="handleReduce(value, index)"
class="el_table_operation_span_a"
>-</span
>
<span
v-if="item.plus"
@click="handlePlus(value, index)"
class="el_table_operation_span_b"
>+</span
<!-- 表格循环 -->
<div class="el_table_td" v-for="(item, index) in value.categories">
<div class="el_table_idNumber">{{ index }}</div>
<el-select
:ref="value.title + index"
class="el_Cselect"
v-model="item.goods"
filterable
clearable
placeholder="请选择品类"
style="width: 240px"
:loading="item.loading"
@change="handleChangeCategory(item)"
remote
reserve-keyword
default-first-option
:remote-method="value => debounce(remoteMethod(value, item), 500)"
>
<el-option
v-for="val in item.goodsArr"
:key="val.goodsId"
:label="val.goodsName"
:value="val.goodsId"
/>
</el-select>
<div class="el_table_operation">
<!-- 新增 -->
<span
v-if="item.plus"
@click="handlePlus(value, index)"
class="el_table_operation_span_b"
>+
</span>
<!-- 删除 -->
<span
v-if="item.reduce"
@click="handleReduce(value, index)"
class="el_table_operation_span_a"
>-
</span>
</div>
</div>
</div>
</div>
</el-form-item>
</el-form-item>
</template>
</template>
<el-divider content-position="left">特殊计费</el-divider>
@ -128,12 +146,14 @@
<template v-for="item in details.lowestType" :key="item.value">
<el-radio
v-if="!item.MappingOrNot || details.form.priceMethod.includes(item.mapValue)"
:label="item.value"
:label="item.dictKey"
size="large"
>{{ item.label }}
>{{ item.dictValue }}
</el-radio>
<el-radio v-else :label="item.value" size="large" disabled>{{ item.label }}</el-radio>
<el-radio v-else :label="item.dictKey" size="large" disabled>{{
item.dictValue
}}</el-radio>
</template>
</el-radio-group>
</el-form-item>
@ -141,30 +161,46 @@
<!-- 操作按钮 -->
<div class="flex-c-c">
<el-button type="primary" icon="Refresh" @click="resetFormData">重置</el-button>
<el-button type="primary" icon="Position" @click="resetFormData">保存</el-button>
<el-button type="primary" icon="Position" @click="handleSubmit">保存</el-button>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue';
import { deepClone } from '@/utils/util';
import { ref, reactive, getCurrentInstance, nextTick } from 'vue';
import { debounce, deepClone } from '@/utils/util';
import { ElMessage, ElMessageBox } from 'element-plus';
import { getDictionaryBiz } from '@/api/system/dict';
import { postFindCategoryInfo } from '@/api/distribution/CreateOrder.js';
const instance = getCurrentInstance();
//
const formRef = ref();
interface categories {
/** 品类名称 */
label: string;
goodsName: string;
/** 品类id */
value: string;
goodsId: string;
/** 显示新增 */
plus: boolean;
/** 显示删除 */
reduce: boolean;
/** 品类名映射 */
goods: string;
/** 模糊查询存放品类的数组 */
goodsArr: {}[];
/** loading */
loading: boolean;
}
interface BillTemplateDetail {
/** 标题 */
title: string;
/** 对应的code */
code: string;
/** 品类数组 */
categories: categories[];
}
@ -244,20 +280,7 @@ const details = reactive({
/** 最低计费类型 */
lowestMethod: '0',
/** 计费模版详情 */
billTemplateDetail: [
{
/** 标题 */
title: '计费模版详情',
/** 品类数组 */
categories: [{ reduce: false, plus: true, label: '12', value: '11' }],
},
{
/** 标题 */
title: '计费模版详情',
/** 品类数组 */
categories: [{ reduce: false, plus: true, label: '12', value: '11' }],
},
] as BillTemplateDetail[],
billTemplateDetail: [] as BillTemplateDetail[],
},
/** 初始化form数据 */
initForm: {},
@ -267,8 +290,6 @@ const details = reactive({
},
});
const AdditionalcategoriesList = ref([{ reduce: true, plus: true }]);
const Additionalcategories = ref([{}]);
const goriesloading = ref(false);
/** 计价方式改变时 */
@ -287,13 +308,143 @@ const handleChangePrcieMethod = value => {
if (!details.form.priceMethod.includes(activeItem.mapValue)) details.form.lowestMethod = '0';
};
/** 处理干线计费模式 */
const handleTrunkLinePricingType = response => {
const { code, data } = response.data;
if (code !== 200) return;
details.priceMethodType = data || [];
const _billTemplateDetailArr = [];
for (let i = 0; i < details.priceMethodType.length; i++) {
const value = details.priceMethodType[i];
_billTemplateDetailArr.push({
title: value.dictValue + '计费品类',
code: value.dictKey,
categories: [
{
reduce: false,
plus: true,
goodsName: '',
goodsId: '',
goods: '',
goodsArr: [],
loading: false,
},
],
});
}
details.form.billTemplateDetail = _billTemplateDetailArr;
};
/** 处理最低计费价格 */
const handleLowestPrice = response => {
console.log('response :>> ', response);
const { code, data } = response.data;
if (code !== 200) return;
const _dataArr = [];
if (!data) {
}
details.lowestType = data || [];
};
/** 复制form初始数据 */
const initFormData = () => {
details.initForm = deepClone(details.form);
};
// form
initFormData();
/** 获取业务字典 */
const initDictionaryBiz = async () => {
try {
// 线
const trunkLinePromise = getDictionaryBiz('trunk_line_pricing_type');
//
const minCostPromise = getDictionaryBiz('min_cost_type');
const [trunkLineResult, minCostResult] = await Promise.all([trunkLinePromise, minCostPromise]);
// 线
handleTrunkLinePricingType(trunkLineResult);
handleLowestPrice(minCostResult);
// form
initFormData();
} catch (error) {
console.log('error :>> ', error);
} finally {
}
};
initDictionaryBiz();
/** 新增品类 */
const handlePlus = async (value: any, index: number) => {
value.categories.splice(index + 1, 0, {
reduce: true,
plus: true,
goodsName: '',
goodsId: '',
goods: '',
goodsArr: [],
loading: false,
});
await nextTick();
instance.ctx.$refs[value.title + (index + 1)][0].focus();
console.log('instance :>> ', instance.ctx);
};
/** 删除品类 */
const handleReduce = (value: any, index: number) => {
if (index === 0) return;
value.categories.splice(index, 1);
};
/** 货物变化时 */
const handleChangeCategory = item => {
if (!item.goods) {
item.goodsId = '';
item.goodsName = '';
return;
}
for (let i = 0; i < item.goodsArr.length; i++) {
const value = item.goodsArr[i];
if (item.goods !== value.goodsId) continue;
item.goodsId = value.goodsId;
item.goodsName = value.goodsName;
break;
}
};
/** 插混品类 */
const remoteMethod = async (value, item) => {
try {
if (!value) return;
item.loading = true;
const response = await postFindCategoryInfo({ goodsName: value });
const { code, data } = response.data;
if (code !== 200) return;
item.goodsArr = data || [];
} catch (error) {
console.log('error :>> ', error);
} finally {
item.loading = false;
}
};
/** 重置数据 */
const resetFormData = () => {
@ -302,6 +453,8 @@ const resetFormData = () => {
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
formRef.value.resetFields();
details.loadingObj.pageLoading = true;
details.form = deepClone(details.initForm);
setTimeout(() => {
@ -310,15 +463,13 @@ const resetFormData = () => {
});
};
/** 新增品类 */
const handlePlus = (value: any, index: number) => {
value.categories.splice(index + 1, 0, { reduce: true, plus: true });
};
/** 提交 */
const handleSubmit = () => {
if (details.form.priceMethod.length === 0) ElMessage.error('请选择计价方式');
/** 删除品类 */
const handleReduce = (value: any, index: number) => {
if (index === 0) return;
value.categories.splice(index, 1);
formRef.value.validate(async valid => {
if (!valid) return;
});
};
</script>

46
src/views/waybill/orderPackageListDetails.vue

@ -236,20 +236,6 @@
>
<template #default="slotProps"> </template>
</tablecmt>
<!-- 分页模块 -->
<el-pagination
align="right"
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="details.packageListPage.pageNum"
:page-sizes="[30, 50, 80, 120]"
:page-size="details.packageListPage.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="details.packageListPage.total"
>
</el-pagination>
</el-dialog>
<!-- 打印二维码 -->
@ -292,6 +278,7 @@ import {
getopenOrderIncomingPackage,
getShowAdvancePackgeCode,
postDeleteAdvanceDetail,
postFinaPackageTrackLogList,
} from '@/api/waybill/orderPackageListDetails';
import { downloadXls, setNodeHeight, getHtmls, debounce } from '@/utils/util';
import {
@ -777,16 +764,29 @@ const handleBatchPutInStorage = () => {
};
/** 显示流转节点 */
const handleShowFlowNode = ({ row }) => {
details.popUpShow.flowNodeColumnListVisited = true;
const handleShowFlowNode = async ({ row }) => {
try {
details.loadingObj.pageLaoding = true;
nextTick(() => {
// ,
const _node: any = document.querySelector('.flowNodeColumnListVisited .maboxhi');
if (!_node) return;
_node.style.height = '550px';
console.log('_node :>> ', _node);
});
const response = await postFinaPackageTrackLogList({ orderPackageCode: row.orderPackageCode });
const { code, data } = response.data;
if (code !== 200) return;
details.flowNodeData = data;
details.popUpShow.flowNodeColumnListVisited = true;
nextTick(() => {
// ,
const _node: any = document.querySelector('.flowNodeColumnListVisited .maboxhi');
if (!_node) return;
_node.style.height = '550px';
console.log('_node :>> ', _node);
});
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLaoding = false;
}
};
/** 批量删除 */

Loading…
Cancel
Save