Browse Source

修复部分价格bug

dev-xx
qb 12 months ago
parent
commit
cda266117e
  1. 261
      src/views/Pricesystem/Price/PriceBill.vue
  2. 1730
      src/views/Pricesystem/Price/PriceTrunkLine.vue
  3. 59
      src/views/Pricesystem/PricesyHome.vue
  4. 9
      src/views/distribution/artery/AddVehicleStowage.vue
  5. 23
      src/views/financialsector/Financialse/FinancialBill.vue
  6. 243
      src/views/financialsector/Financialse/FinancialTrunkLine.vue

261
src/views/Pricesystem/Price/PriceBill.vue

@ -268,10 +268,14 @@
width="70%" width="70%"
v-model="details.popUpShow.addVsitied" v-model="details.popUpShow.addVsitied"
> >
<el-form inline label-width="130px"> <el-form inline :model="details.form" ref="lineFormRef" label-width="130px">
<el-form-item label="始发地"> <el-form-item
label="始发地"
prop="startCity"
:rules="[{ required: true, message: '请选择始发地', trigger: ['blur', 'change'] }]"
>
<el-cascader <el-cascader
pleceholder="请选择到站地址" pleceholder="请选择始发地"
:options="details.regionOptione" :options="details.regionOptione"
style="width: 100%" style="width: 100%"
v-model="details.form.startCity" v-model="details.form.startCity"
@ -286,9 +290,13 @@
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="目的地"> <el-form-item
label="目的地"
prop="endCity"
:rules="[{ required: true, message: '请选择目的地', trigger: ['blur', 'change'] }]"
>
<el-cascader <el-cascader
pleceholder="请选择到站地址" pleceholder="请选择目的地"
:options="details.regionOptione" :options="details.regionOptione"
style="width: 100%" style="width: 100%"
v-model="details.form.endCity" v-model="details.form.endCity"
@ -303,7 +311,11 @@
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="发货单位"> <el-form-item
label="发货单位"
prop="sendOrg"
:rules="[{ required: true, message: '请选择发货单位', trigger: ['blur', 'change'] }]"
>
<el-select <el-select
class="w100" class="w100"
v-model="details.form.sendOrg" v-model="details.form.sendOrg"
@ -541,6 +553,9 @@ console.log('props :>> ', props);
/** 表单实例 */ /** 表单实例 */
const formRef = ref(); const formRef = ref();
/** 提货路径表单 */
const lineFormRef = ref();
const VehicleBillingFormRef = ref(); const VehicleBillingFormRef = ref();
// //
@ -565,7 +580,7 @@ interface BillTemplateDetail {
/** 整车计费 */ /** 整车计费 */
interface VehicleBilling { interface VehicleBilling {
/** 车型 */ /** 车型 */
pickupPricingType: string; vehicleType: string;
/** 车型计费(元/车) */ /** 车型计费(元/车) */
price: number; price: number;
} }
@ -604,7 +619,7 @@ const details = reactive({
VehicleBillingDetal: [ VehicleBillingDetal: [
{ {
/** 车型 */ /** 车型 */
pickupPricingType: '', vehicleType: '',
/** 车型计费(元/车) */ /** 车型计费(元/车) */
price: 0, price: 0,
}, },
@ -824,16 +839,18 @@ const handleVehicleTypeArr = response => {
/** 获取业务字典 */ /** 获取业务字典 */
const initDictionaryBiz = async () => { const initDictionaryBiz = async () => {
console.log('123213213 :>> ', 123213213);
try { try {
// 线 const { trunkLineResult, priceVehicleResult, regionOptione } = props.templateData;
const trunkLinePromise = getDictionaryBiz('trunk_line_pricing_type'); // // 线
// // const trunkLinePromise = getDictionaryBiz('trunk_line_pricing_type');
const priceVehiclePromise = getDictionaryBiz('price_vehicle_type'); // //
// const priceVehiclePromise = getDictionaryBiz('price_vehicle_type');
const [trunkLineResult, priceVehicleResult] = await Promise.all([ // const [trunkLineResult, priceVehicleResult] = await Promise.all([
trunkLinePromise, // trunkLinePromise,
priceVehiclePromise, // priceVehiclePromise,
]); // ]);
await nextTick(); await nextTick();
@ -853,12 +870,15 @@ const initDictionaryBiz = async () => {
// , // ,
if (details.form.pickupIsUnifyAreaBill === '0') { if (details.form.pickupIsUnifyAreaBill === '0') {
console.log('123 :>> ', 123);
// //
const res = await getLazyTreeAll(); if (regionOptione.data.success) {
if (res.data.success) { details.regionOptione = regionOptione.data.data || [];
details.regionOptione = res.data.data || [];
} }
console.log('123321 :>> ', 123321);
initLineData(); initLineData();
} }
} }
@ -867,6 +887,7 @@ const initDictionaryBiz = async () => {
handleTrunkLinePricingType(trunkLineResult); handleTrunkLinePricingType(trunkLineResult);
handleVehicleTypeArr(priceVehicleResult); handleVehicleTypeArr(priceVehicleResult);
initAssignmentForm(props.templateData.requestInfo.pickup, false);
// form // form
initFormData(); initFormData();
} catch (error) { } catch (error) {
@ -894,7 +915,7 @@ const handlePlusVehicle = async (index: number) => {
details.VehicleBillingDetal.splice(index + 1, 0, { details.VehicleBillingDetal.splice(index + 1, 0, {
/** 车型 */ /** 车型 */
pickupPricingType: '', vehicleType: '',
/** 车型计费(元/车) */ /** 车型计费(元/车) */
price: 0, price: 0,
}); });
@ -972,7 +993,7 @@ const initLineData = async () => {
try { try {
details.loadingObj.list = true; details.loadingObj.list = true;
const res = await getPage({ ...details.page, priceId: $route.query.id }); const res = await getPage({ ...details.page, priceId: $route.query.id, serviceType: '1' });
const { code, data } = res.data; const { code, data } = res.data;
if (code !== 200) return; if (code !== 200) return;
@ -1081,7 +1102,7 @@ const handleAdd = () => {
details.VehicleBillingDetal = [ details.VehicleBillingDetal = [
{ {
/** 车型 */ /** 车型 */
pickupPricingType: '', vehicleType: '',
/** 车型计费(元/车) */ /** 车型计费(元/车) */
price: 0, price: 0,
}, },
@ -1091,22 +1112,31 @@ const handleAdd = () => {
}; };
/** 给form赋值 */ /** 给form赋值 */
const initAssignmentForm = data => { const initAssignmentForm = (data, isLine = true) => {
details.form.startCity = [ if (isLine) {
...new Set([data.startProvinceId + '', data.startCityId + '', data.startCountyId + '']), details.form.startCity = [
]; ...new Set([data.startProvinceId + '', data.startCityId + '', data.startCountyId + '']),
details.form.endCity = [ ];
...new Set([data.endProvinceId + '', data.endCityId + '', data.endCountyId + '']), details.form.endCity = [
]; ...new Set([data.endProvinceId + '', data.endCityId + '', data.endCountyId + '']),
details.form.sendOrgId = data.sendOrgId; ];
details.form.sendOrg = data.sendOrgName; details.form.sendOrgId = data.sendOrgId;
details.form.priceId = data.priceId; details.form.sendOrg = data.sendOrgName;
details.form.priceId = data.priceId;
}
details.form.minCost = data.minCost || 0; details.form.minCost = data.minCost || 0;
details.form.additionalCost = data.additionalCost || 0; details.form.additionalCost = data.additionalCost || 0;
// //
details.VehicleBillingDetal = data.fullVehicle || []; details.VehicleBillingDetal = data.fullVehicle || [
{
/** 车型 */
vehicleType: '',
/** 车型计费(元/车) */
price: 0,
},
];
for (let i = 0; i < details.VehicleBillingDetal.length; i++) { for (let i = 0; i < details.VehicleBillingDetal.length; i++) {
const value = details.VehicleBillingDetal[i]; const value = details.VehicleBillingDetal[i];
@ -1169,7 +1199,7 @@ const handleEdit = async ({ row }) => {
details.VehicleBillingDetal = [ details.VehicleBillingDetal = [
{ {
/** 车型 */ /** 车型 */
pickupPricingType: '', vehicleType: '',
/** 车型计费(元/车) */ /** 车型计费(元/车) */
price: 0, price: 0,
}, },
@ -1240,17 +1270,51 @@ const resetFormData = () => {
/** 提交 */ /** 提交 */
const handleSubmit = async () => { const handleSubmit = async () => {
if (details.form.pickupPricingType.length === 0) ElMessage.error('请选择计价方式');
let isRetrun = false; let isRetrun = false;
await formRef.value.validate(valid => { await formRef.value.validate(valid => {
// if (!valid) return; // if (!valid) return;
console.log('222 :>> ', 222);
isRetrun = !valid; isRetrun = !valid;
}); });
if (isRetrun) return; if (isRetrun) return;
const submitData: any = {
checkType: '1',
id: $route.query.id,
pickup: {},
};
//
if (details.form.pickupIsMinCost === '1') {
submitData.pickup.minCost = details.form.minCost;
submitData.pickup.additionalCost = details.form.additionalCost;
}
for (let i = 0; i < details.form.billTemplateDetail.length; i++) {
const item = details.form.billTemplateDetail[i];
if (!details.form.pickupPricingType.includes(item.code)) continue;
//
if (item.code === '1') submitData.pickup.pieceCategory = item.categories;
//
else if (item.code === '3') submitData.pickup.cubeCategory = item.categories;
//
else if (item.code === '4') submitData.pickup.weightCategory = item.categories;
}
//
if (details.form.pickupPricingType.includes('2')) {
for (let i = 0; i < details.VehicleBillingDetal.length; i++) {
const value = details.VehicleBillingDetal[i];
if (!value.vehicleType) return ElMessage.warning('存在未选车型, 请选择车型');
}
submitData.pickup.fullVehicle = details.VehicleBillingDetal;
}
ElMessageBox.confirm('确认提交', '', { ElMessageBox.confirm('确认提交', '', {
confirmButtonText: '确认', confirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -1259,34 +1323,6 @@ const handleSubmit = async () => {
try { try {
details.loadingObj.pageLoading = true; details.loadingObj.pageLoading = true;
const submitData: any = {
checkType: '1',
id: $route.query.id,
pickup: {},
};
//
if (details.form.pickupIsMinCost === '1') {
submitData.pickup.minCost = details.form.minCost;
submitData.pickup.additionalCost = details.form.additionalCost;
}
for (let i = 0; i < details.form.billTemplateDetail.length; i++) {
const item = details.form.billTemplateDetail[i];
if (!details.form.pickupPricingType.includes(item.code)) continue;
//
if (item.code === '1') submitData.pickup.pieceCategory = item.categories;
//
else if (item.code === '3') submitData.pickup.cubeCategory = item.categories;
//
else if (item.code === '4') submitData.pickup.weightCategory = item.categories;
}
//
if (details.form.pickupPricingType.includes('2'))
submitData.pickup.fullVehicle = details.VehicleBillingDetal;
const res = await putBasicdataPrice(submitData); const res = await putBasicdataPrice(submitData);
const { code, msg } = res.data; const { code, msg } = res.data;
@ -1304,7 +1340,62 @@ const handleSubmit = async () => {
}; };
/** 提货线路提交 */ /** 提货线路提交 */
const handleSubmitLine = () => { const handleSubmitLine = async () => {
let isRetrun = false;
await lineFormRef.value.validate(valid => {
// if (!valid) return;
isRetrun = !valid;
});
if (isRetrun) return;
const submitData: any = {
startProvinceId: details.form.startProvinceId, //
startCityId: details.form.startCityId, //
startCountyId: details.form.startCountyId, // ,
endProvinceId: details.form.endProvinceId, //
endCityId: details.form.endCityId, //
endCountyId: details.form.endCountyId, // ,
/** 提货 */
serviceType: '1',
priceId: $route.query.id,
sendOrgId: details.form.sendOrgId,
};
//
if (details.lineType === 'edit') submitData.id = details.form.id;
//
if (details.form.pickupIsMinCost === '1') {
submitData.minCost = details.form.minCost;
submitData.additionalCost = details.form.additionalCost;
}
for (let i = 0; i < details.form.billTemplateDetail.length; i++) {
const item = details.form.billTemplateDetail[i];
if (!details.form.pickupPricingType.includes(item.code)) continue;
//
if (item.code === '1') submitData.pieceCategory = item.categories;
//
else if (item.code === '3') submitData.cubeCategory = item.categories;
//
else if (item.code === '4') submitData.weightCategory = item.categories;
}
//
if (details.form.pickupPricingType.includes('2')) {
for (let i = 0; i < details.VehicleBillingDetal.length; i++) {
const value = details.VehicleBillingDetal[i];
if (!value.vehicleType) return ElMessage.warning('存在未选车型, 请选择车型');
}
submitData.fullVehicle = details.VehicleBillingDetal;
}
ElMessageBox.confirm('确认提交', '', { ElMessageBox.confirm('确认提交', '', {
confirmButtonText: '确认', confirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -1316,44 +1407,6 @@ const handleSubmitLine = () => {
console.log('details.form :>> ', details.form); console.log('details.form :>> ', details.form);
const submitData: any = {
startProvinceId: details.form.startProvinceId, //
startCityId: details.form.startCityId, //
startCountyId: details.form.startCountyId, // ,
endProvinceId: details.form.endProvinceId, //
endCityId: details.form.endCityId, //
endCountyId: details.form.endCountyId, // ,
/** 提货 */
serviceType: '1',
priceId: $route.query.id,
sendOrgId: details.form.sendOrgId,
};
//
if (details.lineType === 'edit') submitData.id = details.form.id;
//
if (details.form.pickupIsMinCost === '1') {
submitData.minCost = details.form.minCost;
submitData.additionalCost = details.form.additionalCost;
}
for (let i = 0; i < details.form.billTemplateDetail.length; i++) {
const item = details.form.billTemplateDetail[i];
if (!details.form.pickupPricingType.includes(item.code)) continue;
//
if (item.code === '1') submitData.pieceCategory = item.categories;
//
else if (item.code === '3') submitData.cubeCategory = item.categories;
//
else if (item.code === '4') submitData.weightCategory = item.categories;
}
//
if (details.form.pickupPricingType.includes('2'))
submitData.fullVehicle = details.VehicleBillingDetal;
const res = await postSubmit(submitData); const res = await postSubmit(submitData);
const { code, msg } = res.data; const { code, msg } = res.data;

1730
src/views/Pricesystem/Price/PriceTrunkLine.vue

File diff suppressed because it is too large Load Diff

59
src/views/Pricesystem/PricesyHome.vue

@ -2,14 +2,20 @@
<basic-container v-loading="pageLoading"> <basic-container v-loading="pageLoading">
<!-- 模板内容 --> <!-- 模板内容 -->
<div class="content"> <div class="content">
<el-tabs type="border-card" v-model="Tabmenu"> <el-tabs type="border-card" @tab-click="handleClick" v-model="Tabmenu">
<template v-for="item in ServiceList" :key="item.label"> <template v-for="item in ServiceList" :key="item.label">
<el-tab-pane :name="item.label" v-if="item.state" :label="item.label"> <el-tab-pane :name="item.label" v-if="item.state" :label="item.label">
<span v-if="item.label == '提货'" <span v-if="item.label == '提货'"
><FinancialBill ref="financialBill" :templateData="templateInfo" ><FinancialBill
@request-data="provideData"
ref="financialBill"
:templateData="templateInfo"
/></span> /></span>
<span v-if="item.label == '干线'" <span v-if="item.label == '干线'"
><FinancialTrunkLine @request-data="provideData" :templateData="templateInfo" ><FinancialTrunkLine
ref="financialTrunkLine"
@request-data="provideData"
:templateData="templateInfo"
/></span> /></span>
<span v-if="item.label == '仓储'" <span v-if="item.label == '仓储'"
><FinancialWarehousing @request-data="provideData" :templateData="templateInfo" ><FinancialWarehousing @request-data="provideData" :templateData="templateInfo"
@ -29,7 +35,8 @@
import { ref, defineAsyncComponent } from 'vue'; import { ref, defineAsyncComponent } from 'vue';
import { getDictionaryBiz } from '@/api/system/dict'; // import { getDictionaryBiz } from '@/api/system/dict'; //
import { $_basicdataBrande } from '@/api/financialsector/index'; // import { $_basicdataBrande } from '@/api/financialsector/index'; //
import { $_InfopriceTemplate as getInfo,getBasicdataPrice } from '@/api/Pricesystem/index.js'; import { $_InfopriceTemplate as getInfo, getBasicdataPrice } from '@/api/Pricesystem/index.js';
import { getLazyTreeAll } from '@/api/base/region';
import { $_InfopriceTemplate } from '@/api/financialsector/index.js'; import { $_InfopriceTemplate } from '@/api/financialsector/index.js';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { nextTick } from 'vue'; import { nextTick } from 'vue';
@ -61,6 +68,8 @@ const VehicleTypeList = ref([]);
const financialBill = ref(); const financialBill = ref();
const financialTrunkLine = ref();
// //
function updateDictionary(targetArray, dictionaryType) { function updateDictionary(targetArray, dictionaryType) {
getDictionaryBiz(dictionaryType) getDictionaryBiz(dictionaryType)
@ -100,7 +109,7 @@ const initData = async () => {
const { code, data } = res.data; const { code, data } = res.data;
if (code !== 200) return; if (code !== 200) return;
form.value.requestInfo=data;// form.value.requestInfo = data; //
// form.value = data; // form.value = data;
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);
@ -111,17 +120,32 @@ const initData = async () => {
const onLoad = async () => { const onLoad = async () => {
try { try {
pageLoading.value = true; pageLoading.value = true;
const PromiseAll = [ // const PromiseAll = [
// /** */
// updateDictionary(VehicleTypeList.value, 'price_vehicle_type'),
// ];
// await Promise.all(PromiseAll);
// 线
const trunkLinePromise = getDictionaryBiz('trunk_line_pricing_type');
//
const priceVehiclePromise = getDictionaryBiz('price_vehicle_type');
const regionOptionePromise = await getLazyTreeAll();
const [trunkLineResult, priceVehicleResult, regionOptione] = await Promise.all([
trunkLinePromise,
priceVehiclePromise,
regionOptionePromise,
/** 服务类型 */ /** 服务类型 */
updateDictionary(ServiceList.value, 'service_type'), updateDictionary(ServiceList.value, 'service_type'),
/** 车辆类型 */ ]);
updateDictionary(VehicleTypeList.value, 'price_vehicle_type'),
];
await Promise.all(PromiseAll); form.value.trunkLineResult = trunkLineResult;
form.value.priceVehicleResult = priceVehicleResult;
form.value.regionOptione = regionOptione;
console.log('VehicleTypeList :>> ', VehicleTypeList); console.log('VehicleTypeList :>> ', VehicleTypeList);
let data = { let data = {
@ -135,18 +159,19 @@ const onLoad = async () => {
console.log(res, '获取详情'); console.log(res, '获取详情');
form.value.TemplateName = data.name || ''; // form.value.TemplateName = data.name || ''; //
form.value.ServiceType = data.serviceType.split(',') || []; // form.value.ServiceType = data.serviceType.split(',') || []; //
form.value.request=data form.value.request = data;
form.value.request = data; form.value.request = data;
console.log('form.value.ServiceType :>> ', form.value.ServiceType); console.log('form.value.ServiceType :>> ', form.value.ServiceType);
const result = ServiceList.value.filter(item => form.value.ServiceType.includes(item.value)); const result = ServiceList.value.filter(item => form.value.ServiceType.includes(item.value));
await initData(); await initData();
// //
executeCheckedResults(result); executeCheckedResults(result);
await nextTick(); await nextTick();
setTimeout(() => { setTimeout(() => {
console.log('financialBill :>> ', financialBill); console.log('financialBill :>> ', financialBill);
financialBill.value[0].initDictionaryBiz(); financialBill.value[0].initDictionaryBiz();
financialTrunkLine.value[0].initDictionaryBiz();
}, 1000); }, 1000);
}); });
} catch (error) { } catch (error) {
@ -188,6 +213,10 @@ const provideData = data => {
templateInfo.value.code = data; // templateInfo.value.code = data; //
} }
}; };
const handleClick = (tab, event) => {
console.log(tab, event);
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

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

@ -158,11 +158,7 @@
<!-- 装车方式 --> <!-- 装车方式 -->
<div class="form_row_item"> <div class="form_row_item">
<el-form-item inline label="装车方式" prop="loadingType"> <el-form-item inline label="装车方式" prop="loadingType">
<el-radio-group <el-radio-group v-model="form.loadingType" class="ml-4">
v-model="form.loadingType"
:disabled="Number(details.pageType) !== 1"
class="ml-4"
>
<el-radio label="1" size="large">手动装车(后台)</el-radio> <el-radio label="1" size="large">手动装车(后台)</el-radio>
<el-radio label="2" size="large">扫描装车</el-radio> <el-radio label="2" size="large">扫描装车</el-radio>
</el-radio-group> </el-radio-group>
@ -175,7 +171,7 @@
<!-- 经办人 --> <!-- 经办人 -->
<div class="form_row_item"> <div class="form_row_item">
<el-form-item inline label="经办人"> <el-form-item inline label="经办人">
<el-input v-model="userInfo.user_name" readonly /> <el-input v-model="form.operator" readonly />
</el-form-item> </el-form-item>
</div> </div>
@ -962,6 +958,7 @@ const onLoad = async () => {
details.nodeInfoData = handleEditForbidden(details.nodeInfoData); details.nodeInfoData = handleEditForbidden(details.nodeInfoData);
details.form.startWarehouseName = data.startWarehouseInfo.warehouseName; details.form.startWarehouseName = data.startWarehouseInfo.warehouseName;
details.form.startWarehouseId = data.startWarehouseInfo.warehouseId; details.form.startWarehouseId = data.startWarehouseInfo.warehouseId;
details.form.operator = userInfo.value.nick_name;
} }
// //
else { else {

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

@ -25,7 +25,13 @@
</el-form-item> </el-form-item>
<!-- 是否统一区域计费 --> <!-- 是否统一区域计费 -->
<el-form-item label="是否统一区域计费"> <el-form-item
label="是否统一区域计费"
prop="pickupIsUnifyAreaBill"
:rules="[
{ required: true, message: '请选择是否统一区域计费', trigger: ['blur', 'change'] },
]"
>
<el-radio-group v-model="details.form.pickupIsUnifyAreaBill" class="ml-4"> <el-radio-group v-model="details.form.pickupIsUnifyAreaBill" class="ml-4">
<el-radio <el-radio
v-for="item in details.isType" v-for="item in details.isType"
@ -38,7 +44,11 @@
</el-form-item> </el-form-item>
<!-- 是否区分品类 --> <!-- 是否区分品类 -->
<el-form-item label="是否区分品类"> <el-form-item
label="是否区分品类"
prop="pickupIsByCategory"
:rules="[{ required: true, message: '请选择是否区分品类', trigger: ['blur', 'change'] }]"
>
<el-radio-group v-model="details.form.pickupIsByCategory" class="ml-4"> <el-radio-group v-model="details.form.pickupIsByCategory" class="ml-4">
<el-radio <el-radio
v-for="item in details.isType" v-for="item in details.isType"
@ -120,7 +130,12 @@
</template> </template>
<!-- 是否最低计费 --> <!-- 是否最低计费 -->
<el-form-item label-width="150px" label="是否最低计费"> <el-form-item
label-width="150px"
label="是否最低计费"
prop="pickupIsMinCost"
:rules="[{ required: true, message: '请选择是否最低计费', trigger: ['blur', 'change'] }]"
>
<el-radio-group v-model="details.form.pickupIsMinCost" class="ml-4"> <el-radio-group v-model="details.form.pickupIsMinCost" class="ml-4">
<el-radio v-for="item in details.isType" :key="item.value" :label="item.value" size="large" <el-radio v-for="item in details.isType" :key="item.value" :label="item.value" size="large"
>{{ item.label }} >{{ item.label }}
@ -133,6 +148,8 @@
v-if="details.form.pickupIsMinCost === '1'" v-if="details.form.pickupIsMinCost === '1'"
label-width="150px" label-width="150px"
label="最低计费类型" label="最低计费类型"
prop="pickupMinCostType"
:rules="[{ required: true, message: '请选择最低计费类型', trigger: ['blur', 'change'] }]"
> >
<el-radio-group v-model="details.form.pickupMinCostType" class="ml-4"> <el-radio-group v-model="details.form.pickupMinCostType" class="ml-4">
<template v-for="item in details.lowestType" :key="item.value"> <template v-for="item in details.lowestType" :key="item.value">

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

@ -25,7 +25,13 @@
</el-form-item> </el-form-item>
<!-- 是否统一区域计费 --> <!-- 是否统一区域计费 -->
<el-form-item label="是否统一区域计费"> <el-form-item
label="是否统一区域计费"
prop="trunklineIsUnifyAreaBill"
:rules="[
{ required: true, message: '请选择是否统一区域计费', trigger: ['blur', 'change'] },
]"
>
<el-radio-group v-model="details.form.trunklineIsUnifyAreaBill" class="ml-4"> <el-radio-group v-model="details.form.trunklineIsUnifyAreaBill" class="ml-4">
<el-radio <el-radio
v-for="item in details.isType" v-for="item in details.isType"
@ -38,7 +44,11 @@
</el-form-item> </el-form-item>
<!-- 是否区分品类 --> <!-- 是否区分品类 -->
<el-form-item label="是否区分品类"> <el-form-item
label="是否区分品类"
prop="trunklineIsByCategory"
:rules="[{ required: true, message: '请选择是否区分品类', trigger: ['blur', 'change'] }]"
>
<el-radio-group v-model="details.form.trunklineIsByCategory" class="ml-4"> <el-radio-group v-model="details.form.trunklineIsByCategory" class="ml-4">
<el-radio <el-radio
v-for="item in details.isType" v-for="item in details.isType"
@ -49,118 +59,141 @@
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-form> <template v-if="details.form.trunklineIsByCategory === '1'">
<el-divider content-position="left">品类管理</el-divider>
<template v-if="details.form.trunklineIsByCategory === '1'">
<el-divider content-position="left">品类管理</el-divider> <template v-for="value in details.form.billTemplateDetail" :key="value.title">
<!-- 附加费品类 -->
<template v-for="value in details.form.billTemplateDetail" :key="value.title"> <el-form-item
<!-- 附加费品类 --> label-width="150px"
<el-form-item v-if="details.form.trunklinePricingType.includes(value.code)"
label-width="150px" :label="value.title"
v-if="details.form.trunklinePricingType.includes(value.code)"
:label="value.title"
>
<div
class="el_Storagecategory"
v-loading="goriesloading"
element-loading-text="Loading..."
> >
<div class="el_table_span"> <div
<div class="el_table_id">序号</div> class="el_Storagecategory"
<div class="el_table_title">产品品类</div> v-loading="goriesloading"
</div> 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_td" v-for="(item, index) in value.categories">
<div class="el_table_idNumber">{{ index + 1 }}</div> <div class="el_table_idNumber">{{ index + 1 }}</div>
<el-select <el-select
:ref="value.title + index" :ref="value.title + index"
class="el_Cselect" class="el_Cselect"
v-model="item.goods" v-model="item.goods"
filterable filterable
clearable clearable
placeholder="请选择品类" placeholder="请选择品类"
style="width: 240px" style="width: 240px"
:loading="item.loading" :loading="item.loading"
@change="handleChangeCategory(item)" @change="handleChangeCategory(item)"
remote remote
reserve-keyword reserve-keyword
default-first-option default-first-option
:remote-method="value => debounce(remoteMethod(value, item), 500)" :remote-method="value => debounce(remoteMethod(value, item), 500)"
> >
<el-option <el-option
v-for="val in item.goodsArr" v-for="val in item.goodsArr"
:key="val.goodsId" :key="val.goodsId"
:label="val.goodsName" :label="val.goodsName"
:value="val.goodsId" :value="val.goodsId"
/> />
</el-select> </el-select>
<div class="el_table_operation"> <div class="el_table_operation">
<!-- 新增 --> <!-- 新增 -->
<span <span
v-if="item.plus" v-if="item.plus"
@click="handlePlus(value, index)" @click="handlePlus(value, index)"
class="el_table_operation_span_b" class="el_table_operation_span_b"
>+ >+
</span> </span>
<!-- 删除 --> <!-- 删除 -->
<span <span
v-if="item.reduce" v-if="item.reduce"
@click="handleReduce(value, index)" @click="handleReduce(value, index)"
class="el_table_operation_span_a" class="el_table_operation_span_a"
>- >-
</span> </span>
</div>
</div> </div>
</div> </div>
</div> </el-form-item>
</el-form-item> </template>
</template> </template>
</template>
<el-divider content-position="left">特殊计费</el-divider>
<el-divider content-position="left">特殊计费</el-divider>
<!-- 是否特殊配置 -->
<!-- 是否特殊配置 --> <el-form-item
<el-form-item label-width="150px" label="是否特殊配置"> label-width="150px"
<el-radio-group v-model="details.form.trunklineIsPeculiarSetup" class="ml-4"> label="是否特殊配置"
<el-radio v-for="item in details.isType" :key="item.value" :label="item.value" size="large" prop="trunklineIsPeculiarSetup"
>{{ item.label }} :rules="[{ required: true, message: '请选择是否特殊配置', trigger: ['blur', 'change'] }]"
</el-radio> >
</el-radio-group> <el-radio-group v-model="details.form.trunklineIsPeculiarSetup" class="ml-4">
</el-form-item>
<el-divider content-position="left">一般计费</el-divider>
<!-- 是否最低计费 -->
<el-form-item label-width="150px" label="是否最低计费">
<el-radio-group v-model="details.form.trunklineIsMinCost" class="ml-4">
<el-radio v-for="item in details.isType" :key="item.value" :label="item.value" size="large"
>{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- 最低计费类型 -->
<el-form-item
v-if="details.form.trunklineIsMinCost === '1'"
label-width="150px"
label="最低计费类型"
>
<el-radio-group v-model="details.form.trunklineMinCostType" class="ml-4">
<template v-for="item in details.lowestType" :key="item.value">
<el-radio <el-radio
v-if="!item.MappingOrNot || details.form.trunklinePricingType.includes(item.mapValue)" v-for="item in details.isType"
:label="item.dictKey" :key="item.value"
:label="item.value"
size="large" size="large"
>{{ item.dictValue }} >{{ item.label }}
</el-radio> </el-radio>
</el-radio-group>
</el-form-item>
<el-radio v-else :label="item.dictKey" size="large" disabled>{{ <template v-if="details.form.trunklineIsPeculiarSetup === '0'">
item.dictValue <el-divider content-position="left">一般计费</el-divider>
}}</el-radio>
</template> <!-- 是否最低计费 -->
</el-radio-group> <el-form-item
</el-form-item> label-width="150px"
label="是否最低计费"
prop="trunklineIsMinCost"
:rules="[{ required: true, message: '请选择是否最低计费', trigger: ['blur', 'change'] }]"
>
<el-radio-group v-model="details.form.trunklineIsMinCost" class="ml-4">
<el-radio
v-for="item in details.isType"
:key="item.value"
:label="item.value"
size="large"
>{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- 最低计费类型 -->
<el-form-item
v-if="details.form.trunklineIsMinCost === '1'"
label-width="150px"
label="最低计费类型"
prop="trunklineMinCostType"
:rules="[{ required: true, message: '请选择最低计费类型', trigger: ['blur', 'change'] }]"
>
<el-radio-group v-model="details.form.trunklineMinCostType" class="ml-4">
<template v-for="item in details.lowestType" :key="item.value">
<el-radio
v-if="
!item.MappingOrNot || details.form.trunklinePricingType.includes(item.mapValue)
"
:label="item.dictKey"
size="large"
>{{ item.dictValue }}
</el-radio>
<el-radio v-else :label="item.dictKey" size="large" disabled>{{
item.dictValue
}}</el-radio>
</template>
</el-radio-group>
</el-form-item>
</template>
</el-form>
<!-- 操作按钮 --> <!-- 操作按钮 -->
<div class="flex-c-c"> <div class="flex-c-c">

Loading…
Cancel
Save