Browse Source

优化配送价格流程优化

dev
马远东 4 days ago
parent
commit
e0cf2c715d
  1. 2
      src/option/storagecost/Warehousedaily.js
  2. 2
      src/option/storagecost/Warehouserentalmanagement.js
  3. 17
      src/views/cost/Deliverycostmanagement/Basicconfiguration.vue
  4. 65
      src/views/cost/Deliverycostmanagement/Categorypricingunit.vue
  5. 117
      src/views/cost/Deliverycostmanagement/DeliveryCostPricingTemplate.vue
  6. 60
      src/views/cost/Deliverycostmanagement/Deliverymaintenancecosts.vue
  7. 35
      src/views/cost/Deliverycostmanagement/WarehouseTemplateHome.vue
  8. 34
      src/views/cost/storagecost/Warehouserentalmanagement.vue
  9. 2
      src/views/distribution/deliverylist/distributionDeliveryListdis.vue
  10. 18
      src/views/distribution/deliverylist/distributionDeliveryListedt.vue

2
src/option/storagecost/Warehousedaily.js

@ -26,7 +26,7 @@ export const columnList = [
head: false,
},
{
prop: 'costSettlementTime',
prop: 'costSettlement',
label: '成本结算时间',
type: 1,
values: '',

2
src/option/storagecost/Warehouserentalmanagement.js

@ -57,7 +57,7 @@ export const columnList = [
head: false,
},
{
prop: 'type',
prop: 'typeName',
label: '租用类型',
type: 1,
values: '',

17
src/views/cost/Deliverycostmanagement/Basicconfiguration.vue

@ -20,7 +20,7 @@
</div>
<div class="footer">
<el-button type="primary" @click="preservation"
>保存<el-icon><Promotion /></el-icon
>下一步<el-icon><Promotion /></el-icon
></el-button>
<!-- <el-button type="primary" @click="nextstep"
>下一步<el-icon><ArrowRightBold /></el-icon
@ -144,6 +144,11 @@ const preservation = () => {
message: res.data.msg,
type: 'success',
});
let data = {
id:props.templateData.id,
active: 2,
};
emit('request-data', data);
}
})
.catch(error => {
@ -158,7 +163,11 @@ const preservation = () => {
.then(res => {
console.log(res, '新增成功');
if (res.data.code == 200) {
emit('request-data', { id: res.data.data }); //
let data={
id: res.data.data,
active:2,
}
emit('request-data', data); //
console.log(props, '最新参数');
localStorage.setItem('_TemplateId', res.data.data);
ElMessage({
@ -175,10 +184,6 @@ const preservation = () => {
});
}
};
//
const nextstep = () => {
return;
};
</script>
<style scoped lang="scss">

65
src/views/cost/Deliverycostmanagement/Categorypricingunit.vue

@ -118,6 +118,11 @@
</div>
</template>
</el-dialog>
<div class="footer">
<el-button type="primary" @click="nextstep"
>下一步<el-icon><Promotion /></el-icon
></el-button>
</div>
</basic-container>
<!-- 列表配置显示 -->
<edittablehead
@ -355,6 +360,15 @@ const onLoad = value => {
.then(res => {
if (res.data.code == 200) {
details.data = res.data.data.records || [];
if(details.data.length){
let _pageData={
id: props.templateData.id,
TabPageState:true
}
emit('request-data', _pageData);
}
details.page.total = res.data.data.total; //
}
})
@ -366,8 +380,8 @@ const onLoad = value => {
});
}
};
const PageOnload = () => {
updateDictionary(Pricingunit.value, 'expense_pricing_unit');
const PageOnload =async () => {
await updateDictionary(Pricingunit.value, 'expense_pricing_unit');
onLoad(); //
};
//
@ -426,6 +440,18 @@ const handledelete = row => {
};
//
const addCategory = () => {
if (!$route.query.id && !props.templateData.id) {
ElMessage({
message: '请先新增模板',
type: 'error',
});
console.log(emit);
let data = {
active: 1,
};
emit('request-data', data);
return;
}
dialogedit.value = true;
categorytitle.value = '新增';
form.value.categoryId = '';
@ -454,14 +480,6 @@ const remoteMethod = goodsName => {
//
const Categoryaddition = async () => {
if (!$route.query.id && !props.templateData.id) {
ElMessage({
message: '请先新增模板',
type: 'error',
});
return;
}
ruleFormRef.value.validate(valid => {
if (valid) {
const categoryMap = new Map(details.data.map(item => [item.categoryId, item]));
@ -536,6 +554,20 @@ const Categoryaddition = async () => {
}
});
};
const nextstep = () => {
if (details.data.length) {
let data = {
id: props.templateData.id || $route.query.id,
active: 3,
};
emit('request-data', data);
}else{
ElMessage({
message: '请先添加品类',
type: 'warning',
})
}
};
</script>
<style scoped lang="scss">
@ -572,4 +604,17 @@ const Categoryaddition = async () => {
flex-direction: column;
}
}
.footer {
position: fixed;
bottom: 10px;
left: 4%;
width: 100%;
display: flex;
justify-content: center;
.el-button {
width: 120px;
height: 40px;
font-size: 16px;
}
}
</style>

117
src/views/cost/Deliverycostmanagement/DeliveryCostPricingTemplate.vue

@ -1,6 +1,5 @@
<template>
<div class="content" v-loading="loading"
element-loading-text="Loading...">
<div class="content" v-loading="loading" element-loading-text="Loading...">
<!-- 配置计价规则 -->
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="商配" :name="1"></el-tab-pane>
@ -82,20 +81,20 @@
<el-form-item label="超区点位计费模式">
<el-radio-group v-model="form.overZoneSiteMode">
<el-radio :label="1">统一计费</el-radio>
<el-radio :label="2" v-if="form.overZoneKilometerRule!=1">区域计费</el-radio>
<el-radio :label="2" v-if="form.overZoneKilometerRule != 1">区域计费</el-radio>
</el-radio-group>
</el-form-item>
</template>
</div>
<div class="el_row">
<!-- <div class="el_row">
<el-form-item label="超区点位是否计算返程">
<el-radio-group v-model="form.ynOverZoneKilometerReturn">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</div>
</div> -->
<div class="el_row">
<el-form-item label="是否点位补贴计费">
@ -142,9 +141,9 @@
<el-button type="primary" @click="preservation"
>保存<el-icon><Promotion /></el-icon
></el-button>
<!-- <el-button type="primary" @click="nextstep"
<el-button type="primary" v-if="tabactive.label1 && tabactive.label2" @click="nextstep"
>下一步<el-icon><ArrowRightBold /></el-icon
></el-button> -->
></el-button>
</div>
</template>
@ -173,9 +172,13 @@ const props = defineProps({
});
console.log(props, '来自父页面参数');
const $route = useRoute(); //
const tabactive = ref({
label1: false,
label2: false,
});
const copyform = ref({});
const State = ref(false); //
const loading=ref(false)
const loading = ref(false);
const form = ref({
ynSurcharge: 0, //
ynChargedKilometer: 0, //
@ -202,7 +205,20 @@ const handleClick = () => {
clearTimeout(time);
}, 50);
};
const preservation = () => {
const preservation = async () => {
if (!$route.query.id && !props.templateData.id) {
ElMessage({
message: '请先新增模板',
type: 'error',
});
console.log(emit);
let data = {
active: 1,
};
emit('request-data', data);
return;
}
let data = {
type: activeName.value,
...form.value,
@ -211,10 +227,10 @@ const preservation = () => {
if (!State.value) {
//
//
$_expenseDispatchPriceRulesave(data).then(res => {
await $_expenseDispatchPriceRulesave(data).then(async res => {
console.log(res, '新增成');
if (res.data.code == 200) {
State.value = true;//
State.value = true; //
ElMessage({
message: res.data.msg,
type: 'success',
@ -224,7 +240,7 @@ const preservation = () => {
} else {
//
if ($route.query.id || props.templateData.id) {
$_expenseDispatchPriceRuleupdate(data).then(res => {
await $_expenseDispatchPriceRuleupdate(data).then(async res => {
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
@ -234,38 +250,62 @@ const preservation = () => {
});
}
}
await onLoad();
};
const Reset = () => {
copyform.value = deepClone(form.value);
};
const onLoad = () => {
const onLoad = async () => {
let _pageData = {
id: props.templateData.id || $route.query.id,
TabPageState: false,
};
emit('request-data', _pageData);
if ($route.query.id || props.templateData.id) {
let data = {
type: activeName.value,
templateId: $route.query.id || props.templateData.id,
};
// if ($route.query.id) {
// data.id = $route.query.id;
// } else {
// data.templateId = '1821740515451240449';
// }
loading.value=true;
$_expenseDispatchPriceRuledetail(data).then(res => {
console.log(res, '详情');
if (res.data.code == 200) {
if (res.data.data) {
form.value = res.data.data;
State.value = true;
} else {
State.value = false;
loading.value = true;
await $_expenseDispatchPriceRuledetail(data)
.then(res => {
console.log(res, '详情');
if (res.data.code == 200) {
if (res.data.data) {
form.value = res.data.data;
activeName.value = res.data.data.type;
//
if (res.data.data) {
if (activeName.value == 1) {
tabactive.value.label1 = true;
} else {
tabactive.value.label2 = true;
}
if (tabactive.value.label1 && tabactive.value.label2) {
let _pageData = {
id: props.templateData.id,
TabPageState: true,
};
emit('request-data', _pageData);
}
console.log(tabactive.value, 'tabactive.value');
}
State.value = true;
} else {
State.value = false;
}
console.log(State.value, '状态');
}
console.log(State.value,'状态');
}
}).catch((error)=>{
console.log(error);
}).finally(()=>{
loading.value=false;
});
})
.catch(error => {
console.log(error);
})
.finally(() => {
loading.value = false;
});
}
};
const onLoadPage = async () => {
@ -273,6 +313,15 @@ const onLoadPage = async () => {
onLoad();
};
onLoadPage();
//
const nextstep = () => {
let _pageData = {
id: props.templateData.id,
TabPageState: true,
active: 4,
};
emit('request-data', _pageData);
};
</script>
<style scoped lang="scss">

60
src/views/cost/Deliverycostmanagement/Deliverymaintenancecosts.vue

@ -52,7 +52,7 @@
</div>
</div>
<div class="el_category">
<div class="el_category" v-if="form.Categorybyitembilling.length">
<span class="title"> 品类按件计费 </span>
<SurchargeTable
:SurchargeData="form.Categorybyitembilling"
@ -67,7 +67,7 @@
</SurchargeTable>
</div>
<div class="el_category">
<div class="el_category" v-if="form.Categorybasedbillingbyparty.length">
<span class="title">品类按方计费</span>
<SurchargeTable
:SurchargeData="form.Categorybasedbillingbyparty"
@ -82,7 +82,7 @@
</SurchargeTable>
</div>
<div class="el_category">
<div class="el_category" v-if="form.Categorychargesbyweight.length">
<span class="title">品类按重量计费</span>
<SurchargeTable
:SurchargeData="form.Categorychargesbyweight"
@ -97,7 +97,7 @@
</SurchargeTable>
</div>
<div class="el_category">
<div class="el_category" v-if="form.Categorybilledbyton.length">
<span class="title">品类按吨计费</span>
<SurchargeTable
:SurchargeData="form.Categorybilledbyton"
@ -114,7 +114,10 @@
</div>
<div class="asurcharge">
<!-- 附加费表格 -->
<div class="el_category asurcharge_box" v-if="Template.ynSurcharge">
<div
class="el_category asurcharge_box"
v-if="Template.ynSurcharge && form.asurcharge.length"
>
<span class="title">是否附加费</span>
<SurchargeTable
:SurchargeData="form.asurcharge"
@ -129,6 +132,19 @@
</SurchargeTable>
</div>
</div>
<div class="el_Kilometers">
<div class="el_Kilometers_box">
<span class="title">整车计费单价</span>
<el-input-number
v-model="form.kilometerCost"
:min="0"
:controls="false"
:precision="2"
:value-on-clear="0"
/>
</div>
</div>
<div class="el_Kilometers">
<div class="el_Kilometers_box" v-if="Template.ynChargedKilometer">
<span class="title">公里数单价</span>
@ -495,7 +511,7 @@ const asurcharge = ref([
]);
//
const dispatchSubjoinCategory = ref([
{ label: '序号', prop: 'index', type: 'string', width: '50', disabled: true },
{ label: '序号', prop: 'index', type: 'string', width: '60', disabled: true },
{
label: '车型1',
prop: 'carModel',
@ -548,6 +564,10 @@ const categoriesduceSurcharge = row => {
};
//
const grouping = data => {
console.log(data, 'const key = keyMap[curr.unit]');
if (!data) {
return;
}
// id
const keyMap = {
1: 'piece', //
@ -604,11 +624,14 @@ const GetCategory = async () => {
templateId: $route.query.id || props.templateData.id,
};
await $_expenseDispatchPriceUnit(data).then(async res => {
console.log(res, '品类');
console.log(res, '品类11');
if (res.data.code == 200) {
// 使 reduce
let groupingData = await grouping(res.data.data.records);
console.log(groupingData, '分好组的数据');
if (!groupingData) {
return;
}
//
form.value.Categorybyitembilling = [];
form.value.Categorybasedbillingbyparty = [];
@ -680,6 +703,9 @@ const configurationdetails = async row => {
// 使 reduce
let groupingData = await grouping(scope.priceList);
console.log(groupingData, '分好组的数据');
if (!groupingData) {
return;
}
//
form.value.Categorybyitembilling = [];
form.value.Categorybasedbillingbyparty = [];
@ -722,6 +748,19 @@ const EditRules = async row => {
};
//
const newlyadded = async row => {
if (!$route.query.id && !props.templateData.id) {
ElMessage({
message: '请先新增模板',
type: 'error',
});
console.log(emit);
let data = {
active: 1,
};
emit('request-data', data);
return;
}
loading.value = true;
dialogtitle.value = '新增';
// let _dispatchSubjoinCategoryDatacopy = deepClone(dispatchSubjoinCategoryData.value) ;
@ -1100,7 +1139,6 @@ const Obtainvehiclemodel = async () => {
value: item.id,
};
});
initData();
}
} catch (e) {
console.log(e, 'error');
@ -1109,9 +1147,9 @@ const Obtainvehiclemodel = async () => {
};
//
const onLoadPage = async () => {
await onLoad();
Obtainvehiclemodel(); //
GetRegion(); //
await GetRegion(); //
await Obtainvehiclemodel(); //
onLoad();
};
onLoadPage();
</script>

35
src/views/cost/Deliverycostmanagement/WarehouseTemplateHome.vue

@ -14,10 +14,10 @@
</div> -->
<div class="el_steps">
<el-steps :active="active" finish-status="success" simple>
<el-step title="基础配置" @click="active = 1" />
<el-step title="品牌品类计价单位" @click="active = 2" />
<el-step title="配送成本计价模板" @click="active = 3" />
<el-step title="车型计费配置" @click="active = 4" />
<el-step title="基础配置(步骤一)" @click="tabactive(1)" />
<el-step title="品牌品类计价单位(步骤二)" @click="tabactive(2)" />
<el-step title="配送成本计价模板(步骤三)" @click="tabactive(3)" />
<el-step title="车型计费配置(步骤四)" @click="tabactive(4)" />
</el-steps>
<div class="el_tabes">
<Basicconfiguration
@ -53,8 +53,10 @@ export default {
import { ref, defineAsyncComponent } from 'vue';
import { ElMessage } from 'element-plus';
import { $_getMyWarehouseList } from '@/api/storagecost/index.js';
const $route = useRoute(); //
const templateInfo = ref({}); //
const active = ref(1);
const TabPageState=ref(false)
//
// const WarehouseTemplate = defineAsyncComponent(() =>
// import('@/views/cost/Deliverycostmanagement/WarehouseTemplate.vue')
@ -80,14 +82,35 @@ const Deliverymaintenancecosts = defineAsyncComponent(() =>
);
const input = ref('');
const handleClick = (tab, event) => {
console.log(tab, event);
const tabactive = (tab, event) => {
console.log(tab, 'tab');
if (!$route.query.id && !templateInfo.value.id) {
ElMessage({
message: '请先配置仓库模板',
type: 'error',
});
active.value=1;
return;
}
if(!TabPageState.value && active.value < tab){
console.log(TabPageState.value,'TabPageState.value');
console.log(active.value > tab,'active.value > tab');
return;//
}
active.value=tab;//
};
const onLoad = () => {};
onLoad();
const provideData = data => {
console.log(data,'接受参数====');
templateInfo.value = { ...data };
TabPageState.value=data.TabPageState
if(data.active){
active.value=data.active;
}
};
</script>

34
src/views/cost/storagecost/Warehouserentalmanagement.vue

@ -7,7 +7,7 @@
<!-- 查询模块 -->
<el-form :inline="true" :model="queryTop" class="el-fr-d">
<div>
<el-form-item label="客户名称">
<!-- <el-form-item label="客户名称">
<el-select
filterable
v-model="queryTop.clientId"
@ -22,13 +22,14 @@
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="租用仓库">
<el-select
filterable
v-model="queryTop.warehouse"
multiple
placeholder="请选择仓库"
:max-collapse-tags="2"
style="min-width: 340px"
>
<el-option
@ -54,9 +55,7 @@
<div class="avue-crud__header">
<!-- 头部左侧按钮模块 -->
<div class="avue-crud__left">
<el-button type="primary"
><el-icon><Plus /></el-icon></el-button
>
<el-button type="primary" @click="AddInfo"
><el-icon><Plus /></el-icon></el-button
>
@ -162,7 +161,7 @@
<!-- 虚拟字段 -->
<el-form-item label="剩余可租用面积(m²)">
<el-input-number v-model="form.residualArea" :min="0" :controls="false" :precision="2" />
<el-input-number v-model="form.residualArea" :min="0" :controls="false" :precision="2" disabled/>
</el-form-item>
<el-form-item label="客户租用类型">
@ -175,17 +174,19 @@
/>
</el-select>
</el-form-item>
<el-form-item label="客户租用库位数" v-if="form.type == 2">
<el-form-item label="客户租用库位数" v-if="form.type == 2" prop="storageLocationCount">
<el-input-number
v-model="form.storageLocationCount"
:min="0"
:controls="false"
@change="changestorageLocationCount"
:value-on-clear="0"
:precision="2"
/>
</el-form-item>
<el-form-item label="客户租用面积(m²)">
<el-input v-model="form.leasedArea" :disabled="form.type == 2" />
<el-form-item label="客户租用面积(m²)" prop="leasedArea">
<el-input-number v-model="form.leasedArea" :disabled="form.type == 2" :min="0" :value-on-clear="0" :controls="false" :precision="2"/>
</el-form-item>
<el-form-item label="月租金(元/月)" prop="monthlyRent">
@ -358,6 +359,8 @@ const rules = reactive({
warehouseId: [{ required: true, message: '请选择租用仓库', trigger: 'change' }],
monthlyRent: [{ required: true, message: '请选填写月租金', trigger: 'change' }],
LeasecontractDate: [{ required: true, message: '请选择租赁合同时间', trigger: 'change' }],
storageLocationCount: [{ required: true, message: '请输入客户租用数', trigger: 'change' }],
leasedArea: [{ required: true, message: '请输入客户租用面积(m²)', trigger: 'change' }],
});
/** 展开列表控件 */
const showdrawer = _flag => {
@ -367,7 +370,7 @@ const showdrawer = _flag => {
const inputsc = (index, row) => {
details.query[row.prop] = index;
processRowProperty(index, row, details);
test(details.query);
onLoad();
};
//
const test = val => {};
@ -390,6 +393,7 @@ const btnsc = val => {
/** 表格表头下拉框选择 */
const selectsc = (index, row) => {
processRowProperty(index, row, details);
onLoad();
};
/** 表格表头复选框选择 */
const selectionChange = list => {
@ -398,7 +402,13 @@ const selectionChange = list => {
};
//
const searchChange = () => {
details.search = false; //
let data={
warehouseIds: queryTop.value.warehouse.join(','),
}
if(queryTop.value.warehouse?.length){
onLoad(data);
}
};
//
const sizeChange = val => {
@ -484,7 +494,7 @@ const onLoad = value => {
current: details.page.currentPage,
size: details.page.pageSize,
...details.query,
...value,
...value,
};
details.loadingObj.list = true;
$_Warehouserentalmanagement(data)

2
src/views/distribution/deliverylist/distributionDeliveryListdis.vue

@ -95,7 +95,7 @@
<div style="height: 100%">
<div class="flex-c-sb">
<div class="flex1">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="全部列表" name="first"> </el-tab-pane>
<el-tab-pane label="待配送" name="second"> </el-tab-pane>
<el-tab-pane label="配送中" name="third"> </el-tab-pane>

18
src/views/distribution/deliverylist/distributionDeliveryListedt.vue

@ -809,8 +809,17 @@
@close="Abnormalshutdown"
class="el_abnormalBox"
>
<div class="abnormalBox_flex">
<div>
<el-button type="primary" @click="BatchcancellationAll">批量取消</el-button>
<el-button type="primary" @click="abnormalViewQRcode(1)">批量查看二维码</el-button>
</div>
<div>
<el-button icon="el-icon-refresh" @click="abnormalBoxsearchChange" circle></el-button>
</div>
</div>
<tablecmt
:columnList="AbnormalReview"
:tableData="AbnormalReviewData"
@ -872,7 +881,7 @@
<el-dialog v-model="dialogViReject" title="驳回" width="500">
<div>
<span>请联系司机将货物带回仓库并由文员进行回库扫描</span>
<span>请联系司机将货物带回仓库并由<strong style="color: red">文员或库管</strong>进行回库扫描</span>
<!-- <el-select
v-model="yesOrNo"
placeholder="请选择货物是否在库"
@ -4173,6 +4182,9 @@ export default {
})
.catch(() => {});
},
abnormalBoxsearchChange(){
this.viewAbnormalLoading(this.toexamineID); //
},
signingReservationPackage(row) {
ElMessageBox.confirm('是否确认签收?', '提示', {
confirmButtonText: '确认',
@ -5473,4 +5485,8 @@ export default {
align-items: center;
justify-content: center;
}
.abnormalBox_flex{
display: flex;
justify-content: space-between;
}
</style>

Loading…
Cancel
Save