Browse Source

完善提货模版

dev-xx
qb 1 year ago
parent
commit
b0ccf05acc
  1. 80
      src/option/distribution/TripartiteTransfer.js
  2. 1
      src/router/views/index.js
  3. 15
      src/views/distribution/artery/AddVehicleStowage.vue
  4. 6
      src/views/distribution/artery/VehicleArrivalManagement.vue
  5. 6
      src/views/distribution/artery/VehicleStowage.vue
  6. 78
      src/views/distribution/signdetail/packageNodeSearch.vue
  7. 1
      src/views/distribution/signfor/distributionSignfor.vue
  8. 328
      src/views/financialsector/Financialse/FinancialBill.vue

80
src/option/distribution/TripartiteTransfer.js

@ -288,26 +288,36 @@ export const detailsColumnList = [
fixed: false,
sortable: true,
},
// {
// prop: 'driverName',
// label: '计划目的地',
// type: 1,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
// {
// prop: 'driverPhone',
// label: '目的地',
// type: 1,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
{
prop: 'loadingUserName',
label: '装车人',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'warehouseName',
label: '装车仓库',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'finalNodeName',
label: '计划目的仓库',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'scanStatusName',
label: '装卸状态',
@ -368,16 +378,26 @@ export const detailsColumnList = [
// fixed: false,
// sortable: true,
// },
// {
// prop: 'endTime',
// label: '装卸仓库',
// type: 1,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
{
prop: 'unloadNodeName',
label: '卸车仓库',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'unloadUserName',
label: '卸车人',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
// {
// prop: 'planVolume',
// label: '卸车时间',

1
src/router/views/index.js

@ -195,6 +195,7 @@ export default [
name: '新增配载',
meta: {
i18n: 'data',
keepAlive: true,
},
component: () =>
import(

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

@ -257,10 +257,7 @@
:precision="2"
:min="0"
:step="1"
:disabled="
Number(details.pageType) === 2 ||
slotProps.scope.row.blackList.includes(slotProps.scope.column.property)
"
:disabled="slotProps.scope.row.blackList.includes(slotProps.scope.column.property)"
:value-on-clear="0"
@change="handleComputedNum"
v-model.lazy="slotProps.scope.row[slotProps.scope.column.property]"
@ -577,7 +574,7 @@
<script lang="ts">
export default {
name: 'AddVehicleStowage',
name: '/distribution/artery/AddVehicleStowage',
};
</script>
@ -1802,10 +1799,10 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
});
};
watch($route, () => {
if ($route.path !== '/distribution/artery/AddVehicleStowage') return;
onLoad();
});
// watch($route, () => {
// if ($route.path !== '/distribution/artery/AddVehicleStowage') return;
// onLoad();
// });
</script>
<style scoped lang="scss">

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

@ -441,7 +441,7 @@
import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue';
import functions from '@/utils/functions';
import dayjs from 'dayjs';
import { mapGetters } from 'vuex';
import { mapGetters, useStore } from 'vuex';
/** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict';
import { downloadXls, deepClone, setNodeHeight, debounce } from '@/utils/util';
@ -469,6 +469,8 @@ import { ElMessage, ElMessageBox } from 'element-plus';
//
const $router = useRouter();
const $store = useStore();
const Mydata = ref<any>({});
Mydata.value = JSON.parse(localStorage.getItem('my_data')); //
@ -901,6 +903,8 @@ const handleCloseArrive = async () => {
/** 编辑配载信息 */
const handleEditStowage = ({ row }) => {
$store.commit('DEL_ONCE_TAG', '/distribution/artery/AddVehicleStowage');
$router.push({
path: '/distribution/artery/AddVehicleStowage',
query: { name: `${row.carsNo} - 编辑配载`, type: 2, loadId: row.id },

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

@ -904,6 +904,8 @@ const handleFullScrean = (_type: 'open' | 'close', _name: string) => {
/** 新增配载 */
const handleAdd = () => {
$store.commit('DEL_ONCE_TAG', '/distribution/artery/AddVehicleStowage');
$router.push({
path: '/distribution/artery/AddVehicleStowage',
query: { name: '新增配载', type: 1 },
@ -912,6 +914,8 @@ const handleAdd = () => {
/** 编辑配载信息 */
const handleEditStowage = ({ row }) => {
$store.commit('DEL_ONCE_TAG', '/distribution/artery/AddVehicleStowage');
$router.push({
path: '/distribution/artery/AddVehicleStowage',
query: { name: `${row.carsNo} - 编辑配载`, type: 2, loadId: row.id },
@ -920,6 +924,8 @@ const handleEditStowage = ({ row }) => {
/** 节点费用 */
const handleNodeCost = ({ row }) => {
$store.commit('DEL_ONCE_TAG', '/distribution/artery/AddVehicleStowage');
$router.push({
path: '/distribution/artery/AddVehicleStowage',
query: { name: '节点费用更改', type: 3, loadId: row.id },

78
src/views/distribution/signdetail/packageNodeSearch.vue

@ -22,9 +22,7 @@
<el-form-item :label="title + ':'" v-show="show">
<el-input v-model="query.packageCode" :placeholder="'请输入' + title"></el-input>
</el-form-item>
<el-form-item>
</el-form-item>
<el-form-item> </el-form-item>
</div>
<!-- 查询按钮 -->
<el-form-item class="el-btn">
@ -99,7 +97,7 @@ import {
import functions from '@/utils/functions.js';
import { useRoute } from 'vue-router';
const $route = useRoute();
const show=ref(false)
const show = ref(false);
const title = ref('包条码');
const searchType = ref('');
@ -180,76 +178,59 @@ const details = reactive({
},
});
const {
search,
query,
shortcuts,
stockupDate,
data,
loadingObj,
selectionList,
drawerShow,
page,
trickleLoadingPage,
zeroAdditionalRecordingInfo,
popUpShow,
recorddata,
} = toRefs(details);
const onLoad = () => {
details.columnList = columnList;
};
const { search, query, loadingObj, drawerShow } = toRefs(details);
// const onLoad = () => {
// details.columnList = columnList;
// };
/** 展开列表控件 */
const showdrawer = _flag => {
details.drawerShow = _flag;
};
const onload = () => {
if(!details.query.packageCode){
return
if (!details.query.packageCode) {
return;
}
details.loadingObj.list=true
details.loadingObj.list = true;
console.log(details.query);
let data = {
searchType: '1',
...details.query,
};
$_searchNode(data).then(res => {
console.log(res, 'res');
if (res.data.data) {
details.data = res.data.data;
}
}).catch(res=>{
}).finally(()=>{
details.loadingObj.list=false
});
$_searchNode(data)
.then(res => {
console.log(res, 'res');
if (res.data && res.data.data) {
details.data = res.data.data;
}
})
.catch(res => {})
.finally(() => {
details.loadingObj.list = false;
});
};
onLoad();
// onLoad();
const searchChange = () => {
onload();
};
const searchHide = () => {
details.search = !details.search;
};
console.log($route.query.orderPackageCode,'路由参数');
console.log($route.query.orderPackageCode, '路由参数');
//
details.query.packageCode = $route.query.orderPackageCode
searchChange()
details.query.packageCode = $route.query.orderPackageCode;
searchChange();
watch($route, (newValue, oldValue) => {
// ID
details.query.packageCode = $route.query.orderPackageCode
if(!details.query.packageCode){
return
details.query.packageCode = $route.query.orderPackageCode;
if (!details.query.packageCode) {
return;
}
searchChange()
searchChange();
});
/**
* 设置列表 -- 固定函数
* 弹窗的勾选回调用于更改头部数组
@ -291,7 +272,6 @@ const selectionChange = () => {};
align-items: center;
}
:deep(.el-card__body) {
height: 100%;
display: flex;
@ -301,7 +281,7 @@ const selectionChange = () => {};
display: flex;
flex-direction: column;
}
:deep(.is-always-shadow){
:deep(.is-always-shadow) {
box-shadow: none;
}
</style>

1
src/views/distribution/signfor/distributionSignfor.vue

@ -756,6 +756,7 @@ export default {
type: 'warning',
message: '请选择签收记录!',
});
return;
}
const idList = this.selectionList.map(item => {

328
src/views/financialsector/Financialse/FinancialBill.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>
@ -50,54 +54,68 @@
<template v-if="details.form.isDistinguish === '1'">
<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>
<!-- 是否最低计费 -->
@ -115,12 +133,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>
@ -128,30 +148,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[];
}
@ -200,19 +236,19 @@ const details = reactive({
{
label: '件',
value: '1',
mapValue: '0',
mapValue: '1',
MappingOrNot: true,
},
{
label: '方数(m³)',
value: '2',
mapValue: '2',
mapValue: '3',
MappingOrNot: true,
},
{
label: '重量(kg)',
value: '3',
mapValue: '3',
mapValue: '4',
MappingOrNot: true,
},
],
@ -227,22 +263,9 @@ const details = reactive({
/** 是否最低计费 */
isLowest: '1',
/** 最低计费类型 */
lowestMethod: '0',
lowestMethod: '1',
/** 计费模版详情 */
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: {},
@ -252,8 +275,6 @@ const details = reactive({
},
});
const AdditionalcategoriesList = ref([{ reduce: true, plus: true }]);
const Additionalcategories = ref([{}]);
const goriesloading = ref(false);
/** 计价方式改变时 */
@ -272,13 +293,146 @@ 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 || [];
};
/** 获取业务字典 */
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();
/** 复制form初始数据 */
const initFormData = () => {
details.initForm = deepClone(details.form);
};
// form
initFormData();
/** 新增品类 */
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) => {
console.log('value :>> ', value);
console.log('item :>> ', 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 = () => {
@ -287,6 +441,8 @@ const resetFormData = () => {
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
formRef.value.resetFields();
details.loadingObj.pageLoading = true;
details.form = deepClone(details.initForm);
setTimeout(() => {
@ -295,15 +451,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) return 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>

Loading…
Cancel
Save