Browse Source

修复已知bug

dev-xx
马远东 5 months ago
parent
commit
8daa977937
  1. 12
      src/views/aftersales/aftersalesWorkOrderAdd.vue
  2. 59
      src/views/aftersales/aftersalesWorkOrdermodify.vue

12
src/views/aftersales/aftersalesWorkOrderAdd.vue

@ -490,6 +490,7 @@
:min="0" :min="0"
:max="item.ProportionMax" :max="item.ProportionMax"
:controls="false" :controls="false"
:precision="2"
:value-on-clear="0" :value-on-clear="0"
/> />
</el-form-item> </el-form-item>
@ -786,7 +787,7 @@ const form = ref({
responsibilityRatio: 0, // responsibilityRatio: 0, //
description: '', // description: '', //
tripartite: '', // tripartite: '', //
ProportionMax: 100, // ProportionMax: 99999999999999999, //
Processingoptions: [ Processingoptions: [
// //
], ],
@ -925,7 +926,7 @@ const responsibilities = async () => {
responsibilityRatio: 0, // responsibilityRatio: 0, //
description: '', // description: '', //
tripartite: '', // tripartite: '', //
ProportionMax: 100, // ProportionMax: 99999999999999999, //
Processingoptions: [ Processingoptions: [
// //
...ResponsibleParty.value, ...ResponsibleParty.value,
@ -1095,7 +1096,7 @@ const AddResponsible = () => {
responsibilityRatio: 0, // responsibilityRatio: 0, //
description: '', // description: '', //
tripartite: '', // tripartite: '', //
ProportionMax: 100, // ProportionMax: 99999999999999999, //
Processingoptions: [ Processingoptions: [
// //
...ResponsibleParty.value, ...ResponsibleParty.value,
@ -1110,7 +1111,7 @@ const AddResponsible = () => {
id: form.value.responsibilitiesList.length + 1, id: form.value.responsibilitiesList.length + 1,
}; };
form.value.responsibilitiesList.push(data); form.value.responsibilitiesList.push(data);
calculateMaxValues(); // calculateMaxValues();
}; };
// //
const Responsemoval = index => { const Responsemoval = index => {
@ -1124,7 +1125,7 @@ const Responsemoval = index => {
form.value.responsibilitiesList.forEach((item, index) => { form.value.responsibilitiesList.forEach((item, index) => {
item.id = index + 1; item.id = index + 1;
}); });
calculateMaxValues(); // // calculateMaxValues(); //
ElMessage({ ElMessage({
message: '移除成功.', message: '移除成功.',
type: 'success', type: 'success',
@ -1134,6 +1135,7 @@ const Responsemoval = index => {
}; };
const calculateMaxValues = () => { const calculateMaxValues = () => {
return
// //
let data = form.value.responsibilitiesList; let data = form.value.responsibilitiesList;
let totalUsed = data.reduce((acc, item) => acc + item.responsibilityRatio, 0); let totalUsed = data.reduce((acc, item) => acc + item.responsibilityRatio, 0);

59
src/views/aftersales/aftersalesWorkOrdermodify.vue

@ -8,8 +8,16 @@
type="border-card" type="border-card"
@tab-click="TabactiveClick" @tab-click="TabactiveClick"
> >
<el-tab-pane label="订单填写" :name="1"></el-tab-pane> <el-tab-pane
<el-tab-pane label="零担填写" :name="2"> </el-tab-pane> label="订单信息"
:name="1"
:disabled="form.basis.TabactiveName == 2"
></el-tab-pane>
<el-tab-pane
label="零担信息"
:name="2"
:disabled="form.basis.TabactiveName == 1"
></el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<!-- 主体内容 --> <!-- 主体内容 -->
@ -490,16 +498,16 @@
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="占比(%)" label="金额(元)"
:prop="`responsibilitiesList[${index}.responsibilityRatio]`" :prop="`responsibilitiesList[${index}.responsibilityRatio]`"
:rules="ruleForm.responsibilityRatio" :rules="ruleForm.responsibilityRatio"
@change="CompanyProportionInput"
> >
<el-input-number <el-input-number
v-model="item.responsibilityRatio" v-model="item.responsibilityRatio"
:min="0" :min="0"
:max="item.ProportionMax" :max="item.ProportionMax"
:controls="false" :controls="false"
:precision="2"
:value-on-clear="0" :value-on-clear="0"
/> />
</el-form-item> </el-form-item>
@ -553,11 +561,11 @@
<div></div> <div></div>
</template> </template>
</div> </div>
<div class="el_top"> <!-- <div class="el_top">
<div class="el_Package_num"> <div class="el_Package_num">
<span>公司占比:{{ form.Proportion }}(%)</span> <span>公司占比:{{ form.Proportion }}(%)</span>
</div> </div>
</div> </div> -->
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -931,7 +939,7 @@ const form = ref({
responsibilityRatio: 0, // responsibilityRatio: 0, //
description: '', // description: '', //
tripartite: '', // tripartite: '', //
ProportionMax: 100, // ProportionMax: 99999999999999999, //
Processingoptions: [ Processingoptions: [
// //
], ],
@ -1014,7 +1022,7 @@ const Modificationsubmission = () => {
if (['10', '90'].includes($route.query.workOrderStatus)) { if (['10', '90'].includes($route.query.workOrderStatus)) {
return true; return true;
} }
return false return false;
}; };
// //
const Appealestablished = () => { const Appealestablished = () => {
@ -1023,14 +1031,14 @@ const Appealestablished = () => {
return true; return true;
} }
} }
return false return false;
}; };
// //
const resultmodification = () => { const resultmodification = () => {
if ($route.query.workOrderStatus == '21') { if ($route.query.workOrderStatus == '21') {
return true; return true;
} }
return false return false;
}; };
// //
const NumberState = computed(() => { const NumberState = computed(() => {
@ -1084,7 +1092,7 @@ const responsibilities = async () => {
responsibilityRatio: 0, // responsibilityRatio: 0, //
description: '', // description: '', //
tripartite: '', // tripartite: '', //
ProportionMax: 100, // ProportionMax: 99999999999999999, //
Processingoptions: [ Processingoptions: [
// //
...ResponsibleParty.value, ...ResponsibleParty.value,
@ -1128,11 +1136,10 @@ const PageState = () => {
// ); // );
// form.value.UserPermissions = matchingItem.dictValue; // form.value.UserPermissions = matchingItem.dictValue;
// //
const roleNames = await JSON.parse(localStorage.getItem('TWMS-userInfo')).content.role_name.split( const roleNames = await JSON.parse(
',' localStorage.getItem('TWMS-userInfo')
); ).content.role_name.split(',');
// //
const matchingItem = res.data.data.find(item => roleNames.includes(item.dictValue)); const matchingItem = res.data.data.find(item => roleNames.includes(item.dictValue));
if (matchingItem) { if (matchingItem) {
@ -1140,10 +1147,6 @@ const PageState = () => {
} else { } else {
form.value.UserPermissions = '仓库客服'; form.value.UserPermissions = '仓库客服';
} }
}); });
// //
responsibilities(); responsibilities();
@ -1184,6 +1187,9 @@ const getPageData = async () => {
}); });
}); });
} }
form.value.PackageList[0].packageCode
? (form.value.basis.TabactiveName = 1)
: (form.value.basis.TabactiveName = 2);
// //
// trainNumber: ['3', '5', '6', '7'].includes(form.value.groundlineType), // // trainNumber: ['3', '5', '6', '7'].includes(form.value.groundlineType), //
// deliveryTime: ['5', '6', '7'].includes(form.value.groundlineType), // // deliveryTime: ['5', '6', '7'].includes(form.value.groundlineType), //
@ -1252,7 +1258,7 @@ const getPageData = async () => {
responsibilityRatio: Number(item.responsibilityRatio), // responsibilityRatio: Number(item.responsibilityRatio), //
description: item.description, // description: item.description, //
tripartite: item.tripartite, // tripartite: item.tripartite, //
ProportionMax: 100, // ProportionMax: 999999999999999999, //
inputDisplay: true, inputDisplay: true,
valueId: item.id, valueId: item.id,
Processingoptions: [ Processingoptions: [
@ -1273,7 +1279,7 @@ const getPageData = async () => {
id: form.value.responsibilitiesList.length + 1, id: form.value.responsibilitiesList.length + 1,
}; };
form.value.responsibilitiesList.push(data); form.value.responsibilitiesList.push(data);
calculateMaxValues(); // calculateMaxValues();
}); });
} }
// //
@ -1498,7 +1504,7 @@ const AddResponsible = () => {
responsibilityRatio: 0, // responsibilityRatio: 0, //
description: '', // description: '', //
tripartite: '', // tripartite: '', //
ProportionMax: 100, // ProportionMax: 999999999999999999999999999999, //
inputDisplay: false, // inputDisplay: false, //
Processingoptions: [ Processingoptions: [
// //
@ -1514,7 +1520,7 @@ const AddResponsible = () => {
id: form.value.responsibilitiesList.length + 1, id: form.value.responsibilitiesList.length + 1,
}; };
form.value.responsibilitiesList.push(data); form.value.responsibilitiesList.push(data);
calculateMaxValues(); // calculateMaxValues();
}; };
// //
const Responsemoval = index => { const Responsemoval = index => {
@ -1528,7 +1534,7 @@ const Responsemoval = index => {
form.value.responsibilitiesList.forEach((item, index) => { form.value.responsibilitiesList.forEach((item, index) => {
item.id = index + 1; item.id = index + 1;
}); });
calculateMaxValues(); // // calculateMaxValues(); //
ElMessage({ ElMessage({
message: '移除成功.', message: '移除成功.',
type: 'success', type: 'success',
@ -1538,6 +1544,7 @@ const Responsemoval = index => {
}; };
const calculateMaxValues = () => { const calculateMaxValues = () => {
return
// //
let data = form.value.responsibilitiesList; let data = form.value.responsibilitiesList;
let totalUsed = data.reduce((acc, item) => acc + item.responsibilityRatio, 0); let totalUsed = data.reduce((acc, item) => acc + item.responsibilityRatio, 0);
@ -2072,7 +2079,9 @@ const onSubmit = () => {
data.businessId = item.businessId; //id data.businessId = item.businessId; //id
} else { } else {
data.personResponsibleId = Responsibleperson ? Responsibleperson.id : null; //id data.personResponsibleId = Responsibleperson ? Responsibleperson.id : null; //id
data.personResponsibleName = item.ResponsibleoNameptions.find(res => res.id == item.personResponsibleId)?.name || item.personResponsibleId; // data.personResponsibleName =
item.ResponsibleoNameptions.find(res => res.id == item.personResponsibleId)?.name ||
item.personResponsibleId; //
data.businessName = item.Responsibleoptions.find( data.businessName = item.Responsibleoptions.find(
res => res.value == item.businessId res => res.value == item.businessId
).label; // ).label; //

Loading…
Cancel
Save