Browse Source

修复已知bug

dev-xx
马远东 5 months ago
parent
commit
8daa977937
  1. 12
      src/views/aftersales/aftersalesWorkOrderAdd.vue
  2. 105
      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);

105
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>
@ -533,7 +541,7 @@
</el-form-item> </el-form-item>
<el-button <el-button
v-if="!index && $route.query.typesOf !=0" v-if="!index && $route.query.typesOf != 0"
type="primary" type="primary"
class="el_addPackage" class="el_addPackage"
@click="AddResponsible" @click="AddResponsible"
@ -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: [
// //
], ],
@ -1011,10 +1019,10 @@ const workOrderStatus = computed(() => {
// //
const Modificationsubmission = () => { 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,22 +1136,17 @@ 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) {
form.value.UserPermissions = matchingItem.dictValue; form.value.UserPermissions = matchingItem.dictValue;
} 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);
@ -2058,12 +2065,12 @@ const onSubmit = () => {
tripartite: item.tripartite, // tripartite: item.tripartite, //
description: item.description, // description: item.description, //
}; };
// //
let Responsibleperson = item.ResponsibleoNameptions.find( let Responsibleperson = item.ResponsibleoNameptions.find(
res => res.id == item.personResponsibleId res => res.id == item.personResponsibleId
); );
console.log(Responsibleperson,'Responsibleperson'); console.log(Responsibleperson, 'Responsibleperson');
if (form.value.groundlineType == '1') { if (form.value.groundlineType == '1') {
data.personResponsibleName = item.personResponsibleId; // data.personResponsibleName = item.personResponsibleId; //
data.businessName = item.Processingoptions.find( data.businessName = item.Processingoptions.find(
@ -2071,8 +2078,10 @@ const onSubmit = () => {
).label; // ).label; //
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; //
@ -2094,8 +2103,8 @@ const onSubmit = () => {
) { ) {
submitData.decreaseImageEntityList = []; submitData.decreaseImageEntityList = [];
form.value.fileList.forEach(item => { form.value.fileList.forEach(item => {
console.log(item,'图片12'); console.log(item, '图片12');
if (item.response || item.url) { if (item.response || item.url) {
submitData['decreaseImageEntityList'].push({ submitData['decreaseImageEntityList'].push({
imageName: item.response?.data.originalName || item.name, // imageName: item.response?.data.originalName || item.name, //
@ -2154,9 +2163,9 @@ const onSubmit = () => {
// //
if (form.value.Processed) { if (form.value.Processed) {
submitData.workOrderStatus = 30; submitData.workOrderStatus = 30;
submitData.resultIdentification=1; submitData.resultIdentification = 1;
}else{ } else {
submitData.resultIdentification=2; submitData.resultIdentification = 2;
} }
$_modifyData(submitData) $_modifyData(submitData)
.then(res => { .then(res => {
@ -2698,8 +2707,8 @@ const TabactiveClick = (a, b) => {
} }
} }
} }
:deep(.el_foort_img){ :deep(.el_foort_img) {
.el-upload{ .el-upload {
display: none; display: none;
} }
} }

Loading…
Cancel
Save