Browse Source

财务修复bug

dev-xx
马远东 10 months ago
parent
commit
a600ffac5d
  1. 5
      src/components/pric/tablePric.vue
  2. 21
      src/views/Pricesystem/Price/PriceDelivery.vue
  3. 2
      src/views/Pricesystem/PricesyHome.vue
  4. 58
      src/views/financialsector/FinanceHome.vue
  5. 251
      src/views/financialsector/Financialse/FinancialDelivery.vue
  6. 63
      src/views/financialsector/Financialse/FinancialWarehousing.vue

5
src/components/pric/tablePric.vue

@ -33,12 +33,14 @@
loading-text='正在查询中...'
@focus="categoriesSearchfocus(column, scope.row)"
:disabled=column.show
@change='selectChange'
>
<el-option
v-for="item in scope.row.options"
:key="item.value"
:label="item.label"
:value="item.value"
:disabled="item.disabled"
/>
</el-select>
<!-- 操作栏 -->
@ -66,6 +68,9 @@ function categoriesearch(data) {
emit('search', data);
}
function selectChange(data){
emit('change', data);
}
const props = defineProps({
SurchargeData: {
type: Array,

21
src/views/Pricesystem/Price/PriceDelivery.vue

@ -822,6 +822,7 @@ const onLoad = async () => {
? request.value.dispatchPricingType.split(',').map(Number)
: []; //
billing(); //
//
if (form.value.dispatchPricingType.includes(4)) {
addItemAfterId(form.value.fullVehicleData);
}
@ -854,7 +855,7 @@ const onLoad = async () => {
});
}
//
if (form.value.dispatchPricingType.includes(3)) {
if (form.value.dispatchPricingType.includes(2)) {
request.value.dispatchWeightCategorys.forEach((item, index) => {
form.value.weightCategoryData.push({
index: index + 1,
@ -1044,7 +1045,8 @@ const onLoad = async () => {
//
if (form.value.dispatchPricingType.includes(4)) {
form.value.fullVehicleData = [];
requestInfo.value.fullVehicle.forEach((item, index) => {
if(requestInfo.value.fullVehicle && requestInfo.value.fullVehicle.length){
requestInfo.value.fullVehicle.forEach((item, index) => {
form.value.fullVehicleData.push({
index: index + 1,
loading: false,
@ -1054,11 +1056,14 @@ const onLoad = async () => {
vehicleType: item.vehicleType,
});
});
}
}
//
if (request.value.dispatchIsCategorySubjoin) {
requestInfo.value.additionalCategory.forEach(item => {
if( requestInfo.value.additionalCategory && requestInfo.value.additionalCategory.length){
requestInfo.value.additionalCategory.forEach(item => {
let data = form.value.additionalCategoryData.find(
res => res.categoryId == item.categoryId
);
@ -1069,6 +1074,8 @@ const onLoad = async () => {
data.upstairsDeliveryPrice = item.upstairsDeliveryPrice || 0;
}
});
}
} else {
const data = requestInfo.value.additionalCategory[0];
console.log(data, 'data===>');
@ -1115,7 +1122,7 @@ let setTime = setTimeout(()=>{
onLoad();
//
const handleSubmit = () => {
loading.value = true;
let data = {
checkType: '4',
id: $route.query.id,
@ -1205,7 +1212,8 @@ const handleSubmit = () => {
});
}
//
let fullVehicleDataState = form.value.fullVehicleData.every(res => res.vehicleType);
if(form.value.dispatchPricingType.includes(4)){
let fullVehicleDataState = form.value.fullVehicleData.every(res => res.vehicleType);
if (fullVehicleDataState && form.value.fullVehicleData.length) {
form.value.fullVehicleData.forEach(item => {
data.dispatch['fullVehicle'].push({
@ -1221,6 +1229,8 @@ const handleSubmit = () => {
return;
}
}
//
if (request.value.dispatchIsCategorySubjoin && form.value.additionalCategoryData.length) {
form.value.additionalCategoryData.forEach(res => {
@ -1269,6 +1279,7 @@ const handleSubmit = () => {
data.dispatch.dispatchUpwardJudgmentCost = form.value.dispatchUpwardJudgmentCost; //
}
console.log(data, '要提交的数据');
loading.value = true;
putBasicdataPrice(data).then(res => {
console.log(res, '处理好的值');
if (res.data.code == 200) {

2
src/views/Pricesystem/PricesyHome.vue

@ -1,5 +1,5 @@
<template>
<basic-container v-loading="pageLoading" element-loading-text="页面正在拼命加载中...">
<basic-container v-loading="pageLoading" element-loading-text="页面正在加载中...">
<!-- 模板内容 -->
<div class="content">
<el-tabs type="border-card" @tab-click="handleClick" v-model="Tabmenu">

58
src/views/financialsector/FinanceHome.vue

@ -1,5 +1,5 @@
<template>
<div class="content_box" v-loading="pageLoading">
<div class="content_box" v-loading="pageLoading" element-loading-text="页面正在加载中...">
<div class="header">
<!-- 模板名称 -->
<div class="el_Template">
@ -263,12 +263,56 @@ const isChecked = async (val, isChecked = false, msg = false) => {
};
//
const removeTag = value => {
ServiceList.value.find(res => res.value == value).check = false;
ServiceList.value.find(res => res.value == value).state = false;
//
if (form.value.ServiceType.length) {
Tabmenu.value = ServiceList.value.find(res => res.state).label;
}
form.value.ServiceType.push(value);//
console.log(value,'value');
ElMessageBox.confirm('关闭当前模板会重置数据!是否关闭?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then( async () => {
let indexToRemove = await form.value.ServiceType.findIndex(item => item == value);
if (indexToRemove !== -1) {
form.value.ServiceType.splice(indexToRemove, 1);
}
if (form.value.ServiceType.length) {
Tabmenu.value = ServiceList.value.find(res => res.state).label;
}
if ($route.query.id || templateInfo.value.code) {
let data = {
checkType:value,
templateId: $route.query.id,
};
$_tempDelpriceTemplate(data).then(res => {
console.log(res, '删除成功返回值');
if (res.data.code == 200) {
ElMessage({
type: 'success',
message: res.data.msg,
});
//
if (form.value.ServiceType.length) {
Tabmenu.value = ServiceList.value.find(res => res.state).label;
}
}
});
} else {
ElMessage({
type: 'success',
message: '操作成功',
});
}
ServiceList.value.find(res => res.value == value).check = false;
ServiceList.value.find(res => res.value == value).state = false;
})
};
//
const provideData = data => {

251
src/views/financialsector/Financialse/FinancialDelivery.vue

@ -92,6 +92,7 @@
:Surcharge="dispatchPieceCategory"
@focus="handleRowFocus"
@search="search"
@change="selectChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
@ -123,6 +124,7 @@
:Surcharge="dispatchWeightCategory"
@focus="handleRowFocus"
@search="search"
@change="selectChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
@ -153,6 +155,7 @@
:Surcharge="dispatchCubeCategory"
@focus="handleRowFocus"
@search="search"
@change="selectChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
@ -480,7 +483,7 @@ const AdditionalcategoriesList = ref([
id: 1,
plus: true,
reduce: false,
StateName: 'additional', //
StateName: 'Commercialcial', //
Warehousecategory: '', //
Additionalcategories: [],
},
@ -529,7 +532,7 @@ const Timedelive = () => {
let timerId = setTimeout(() => {
Deliveryloading.value = false;
clearTimeout(timerId); //
}, 300);
}, 200);
};
//
@ -547,72 +550,80 @@ const MinimumChange = val => {
console.log(val);
if (val) {
form.value.dispatchMinCostMode = 1;
form.value.dispatchMinCostType=1
form.value.dispatchIsUpwardJudgment = 0;
} else {
form.value.dispatchMinCostMode = 0;
form.value.dispatchIsUpwardJudgment = 0; //
form.value.dispatchMinCostType=null
}
};
//
const CommercialcialDisplay = () => {
ServiceList.value.forEach(res => {
if (form.value.dispatchPricingType.includes(res.value)) {
if (res.value == 1) {
form.value.dispatchPieceCategoryState = true; //
form.value.dispatchPieceCategoryData = [
{
index: 1,
Warehousecategory: '',
options: [],
plus: true,
reduce: false,
StateName: 'storage', //
loading: false,
},
];
} else if (res.value == 2) {
form.value.dispatchWeightCategoryState = true; //
form.value.dispatchWeightCategoryData = [
{
index: 1,
Warehousecategory: '',
options: [],
plus: true,
reduce: false,
StateName: 'storage', //
loading: false,
},
];
} else if (res.value == 3) {
form.value.dispatchCubeCategoryState = true; //
form.value.dispatchCubeCategoryData = [
{
index: 1,
Warehousecategory: '',
options: [],
plus: true,
reduce: false,
StateName: 'storage', //
loading: false,
},
];
}
res.check = true;
const CommercialcialDisplay = id => {
let data = ServiceList.value.find(res => res.value == id);
console.log(ServiceList.value, 'ServiceList.value');
if (data.value == 1) {
form.value.dispatchPieceCategoryState = true; //
form.value.dispatchPieceCategoryData = [
{
index: 1,
Warehousecategory: '',
options: [],
plus: true,
reduce: false,
StateName: 'storage', //
loading: false,
},
];
if (data.check) {
form.value.dispatchPieceCategoryState = true; //
} else {
res.check = false;
if (res.value == 1) {
form.value.dispatchPieceCategoryState = false; //
} else if (res.value == 2) {
form.value.dispatchWeightCategoryState = false; //
} else if (res.value == 3) {
form.value.dispatchCubeCategoryState = false; //
}
form.value.dispatchPieceCategoryState = false; //
}
});
} else if (data.value == 2) {
form.value.dispatchWeightCategoryData = [
{
index: 1,
Warehousecategory: '',
options: [],
plus: true,
reduce: false,
StateName: 'storage', //
loading: false,
},
];
if (data.check) {
form.value.dispatchWeightCategoryState = true; //
} else {
form.value.dispatchWeightCategoryState = false; //
}
} else if (data.value == 3) {
form.value.dispatchCubeCategoryData = [
{
index: 1,
Warehousecategory: '',
options: [],
plus: true,
reduce: false,
StateName: 'storage', //
loading: false,
},
];
if (data.check) {
form.value.dispatchCubeCategoryState = true; //
} else {
form.value.dispatchCubeCategoryState = false; //
}
}
};
//
const isChecked = value => {
const isChecked = item => {
console.log(item.value, '点击菜单value');
if (!form.value.WarehousebillingmodeTitle) {
ElMessage({
message: '请先选择仓储计费类型',
@ -620,17 +631,22 @@ const isChecked = value => {
});
form.value.dispatchPricingType = []; //
value.check = false; //
item.check = false; //
return;
}
CommercialcialDisplay(); //
CommercialcialDisplay(item.value); //
Timedelive(); //
};
//
const removeTag = value => {
console.log(value, '点击移除value');
Deliveryloading.value = true;
//
CommercialcialDisplay(); //
let data = ServiceList.value.find(res => res.value == value);
data.check = false;
data.state = false;
CommercialcialDisplay(value); //
Timedelive(); //
};
@ -665,7 +681,7 @@ const storagereduce = id => {
};
//
const storageplus = () => {
addItemAfterId(form.value.dispatchPieceCategoryData, 'Commercialcial');
addItemAfterId(form.value.dispatchPieceCategoryData, 'storage');
};
//
@ -674,7 +690,7 @@ const categoriesduceweight = id => {
};
//
const categoriesplusweight = () => {
addItemAfterId(form.value.dispatchWeightCategoryData, 'Commercialcial');
addItemAfterId(form.value.dispatchWeightCategoryData, 'storage');
};
//
@ -683,7 +699,7 @@ const categoriesducesquare = id => {
};
//
const categoriesplussquare = () => {
addItemAfterId(form.value.dispatchCubeCategoryData, 'Commercialcial');
addItemAfterId(form.value.dispatchCubeCategoryData, 'storage');
};
//
const categoriesduceSurcharge = id => {
@ -761,10 +777,16 @@ async function updateDictionary(targetArray, dictionaryType) {
...data,
});
});
console.log(Commercialcial.value, 'Commercialcial.value===>>>>????');
CommercialcialCopy.value = deepClone(Commercialcial.value);
//
console.log(form.value.dispatchServiceType,'服务类型aa');
}
console.log(form.value, '服务类型');
//
if (dictionaryType == 'price_yes_no') {
Leftoverparts.value = { ...Distinguishcategories.value }; //
@ -800,11 +822,29 @@ const search = val => {
console.log(res, '附加费品类计费');
if (res.data.code == 200) {
if (res.data.data.length) {
let concatdata = null;
let data = null;
SelectData.value.options = []; //
console.log(SelectData.value.StateName, 'SelectData.value.StateName');
res.data.data.forEach(item => {
if (SelectData.value.StateName == 'storage') {
//
concatdata = form.value.dispatchCubeCategoryData.concat(
form.value.dispatchWeightCategoryData,
form.value.dispatchPieceCategoryData
);
data = concatdata.find(res => res.Warehousecategory == item.goodsId);
} else if (SelectData.value.StateName == 'Commercialcial') {
//
data = form.value.dispatchSubjoinCategoryData.find(
res => res.Warehousecategory == item.goodsId
);
console.log(data, '213123');
}
SelectData.value.options.push({
label: item.goodsName,
value: item.goodsId,
disabled: data ? true : false,
});
});
}
@ -817,6 +857,49 @@ const search = val => {
}
};
function updateOptions(allDropdowns) {
//
let dropdowns = [].concat(...allDropdowns);
//
dropdowns.forEach((dropdown, index, self) => {
//
let selectedValue = dropdown.Warehousecategory;
// options
self.forEach(otherDropdown => {
if (dropdown !== otherDropdown) { //
otherDropdown.options.forEach(option => {
//
if (option.value === selectedValue) {
option.disabled = true;
} else {
//
let isSelectedSomewhereElse = self.some(d => d !== otherDropdown && d.Warehousecategory === option.value);
option.disabled = isSelectedSomewhereElse;
}
});
}
});
});
}
//
//
const selectChange = data => {
// console.log(data, 'data');
// console.log(form.value.dispatchCubeCategoryData,'dispatchCubeCategoryData111');
// console.log(form.value.dispatchWeightCategoryData,'dispatchWeightCategoryData222');
// console.log(form.value.dispatchPieceCategoryData,'dispatchPieceCategoryData333');
let allDropdowns = [form.value.dispatchCubeCategoryData, form.value.dispatchWeightCategoryData, form.value.dispatchPieceCategoryData];
//
updateOptions(allDropdowns);
};
const categoriesSearchfocus = item => {
console.log(item, 'item');
SelectOpin.value = item; //
@ -824,16 +907,17 @@ const categoriesSearchfocus = item => {
//
const SurchargeChange = val => {
if (val) {
AdditionalcategoriesList.value = [
{
id: 1,
plus: true,
reduce: false,
StateName: 'additional', //
Warehousecategory: '', //
Additionalcategories: [],
},
];
form.value.dispatchSubjoinCategoryData = [
{
index: 1,
Warehousecategory: '',
options: [],
plus: true,
reduce: false,
StateName: 'Commercialcial',
loading: false,
},
];
}
};
//
@ -935,10 +1019,6 @@ const onLoad = async () => {
}
});
//
form.value.WarehousebillingmodeTitle = Warehousebillingmode.value.find(
res => res.value == form.value.dispatchServiceType
).label;
StateDelivery.value = true; //
form.value.dispatchPieceCategoryData = [];
if (request.value.dispatchPieceCategory) {
@ -1052,7 +1132,7 @@ const onLoad = async () => {
],
plus: true,
reduce: false,
StateName: 'additional',
StateName: 'Commercialcial',
loading: false,
});
});
@ -1064,16 +1144,18 @@ const onLoad = async () => {
options: [],
plus: true,
reduce: false,
StateName: 'additional',
StateName: 'Commercialcial',
loading: false,
},
];
console.log(
form.value.dispatchSubjoinCategoryData,
' console.log( form.value.dispatchSubjoinCategoryData);'
);
}
}
if (form.value.dispatchServiceType) {
form.value.WarehousebillingmodeTitle = Warehousebillingmode.value.find(
res => res.value == form.value.dispatchServiceType
).label;
}
}
formedit.value = await deepClone(form.value);
pageLoading.value = false;
@ -1501,6 +1583,7 @@ const handleSubmit = async () => {
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
}
</style>

63
src/views/financialsector/Financialse/FinancialWarehousing.vue

@ -78,6 +78,7 @@
:Surcharge="Storagecategory"
@focus="handleRowFocus"
@search="search"
@change="selectChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
@ -193,6 +194,7 @@
:Surcharge="Additionalcategories"
@focus="handleRowFocus"
@search="search"
@change="wxselectChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
@ -238,6 +240,7 @@ import { postFindCategoryInfo } from '@/api/distribution/CreateOrder.js';
import { deepClone } from '@/utils/util';
import { useRoute } from 'vue-router';
import SurchargeTable from '@/components/pric/tablePric.vue';
import { disable } from '@/api/basicdata/basicdataGoodsShelfView';
const pageLoading = ref(true); //
const ruleFormRef = ref();
const SelectData = ref({});
@ -317,10 +320,25 @@ const search = val => {
if (res.data.code == 200) {
if (res.data.data.length) {
SelectData.value.options = []; //
console.log(SelectData.value, 'SelectData.value');
res.data.data.forEach(item => {
let data = null;
if (SelectData.value.StateName == 'storage') {
//
data = form.value.StoragecategoryData.find(
res => res.warehousePieceCategory == item.goodsId
);
} else if (SelectData.value.StateName == 'additional') {
//
data = form.value.AdditionalcategoriesData.find(
res => res.warehousePieceCategory == item.goodsId
);
}
SelectData.value.options.push({
label: item.goodsName,
value: item.goodsId,
disabled: data ? true : false,
});
});
}
@ -332,7 +350,51 @@ const search = val => {
});
}
};
function updateOptions(allDropdowns) {
//
let dropdowns = [].concat(...allDropdowns);
//
dropdowns.forEach((dropdown, index, self) => {
//
let selectedValue = dropdown.Warehousecategory;
// options
self.forEach(otherDropdown => {
if (dropdown !== otherDropdown) { //
otherDropdown.options.forEach(option => {
//
if (option.value === selectedValue) {
option.disabled = true;
} else {
//
let isSelectedSomewhereElse = self.some(d => d !== otherDropdown && d.Warehousecategory === option.value);
option.disabled = isSelectedSomewhereElse;
}
});
}
});
});
}
//
const selectChange = data => {
// console.log(data, 'data');
// console.log(form.value.dispatchCubeCategoryData,'dispatchCubeCategoryData111');
// console.log(form.value.dispatchWeightCategoryData,'dispatchWeightCategoryData222');
// console.log(form.value.dispatchPieceCategoryData,'dispatchPieceCategoryData333');
let allDropdowns = [form.value.StoragecategoryData];
//
updateOptions(allDropdowns);
};
const wxselectChange=()=>{
let allDropdowns = [form.value.AdditionalcategoriesData];
//
updateOptions(allDropdowns);
}
const formCopy = ref({}); //
const SelectOpin = ref(null); //
const $route = useRoute(); //
@ -845,6 +907,7 @@ const AdditionalDisplayChange = val => {
font-size: 14px;
display: flex;
align-items: center;
cursor: pointer;
.el-icon {
font-size: 14px;
}

Loading…
Cancel
Save