Browse Source

修复已知bug

pre-production
马远东 11 months ago
parent
commit
2572fc8076
  1. 5
      src/views/aftersales/aftersalesWorkOrder.vue
  2. 314
      src/views/aftersales/aftersalesWorkOrderAddTemp.vue
  3. 1329
      src/views/aftersales/aftersalesWorkOrderInfo.vue
  4. 2
      src/views/distribution/turndelivery/deliveryDiscuss.vue
  5. 10
      src/views/warehouse/updownGoods/warehouseUpdownGoodsLog.vue

5
src/views/aftersales/aftersalesWorkOrder.vue

@ -218,6 +218,7 @@
<el-row>
<!-- 列表模块 -->
<tablecmt
class="tableNode"
:columnList="publicColumnList"
:tableData="data"
:loading="loadingObj.list"
@ -1077,7 +1078,7 @@ import {
MallassignmentColumnList,
customerserviceColumnList,
} from '@/option/aftersales/vueTvemp.js';
import { processRowProperty, isNumber, computeNumber } from '@/utils/util';
import { processRowProperty, isNumber, computeNumber,setNodeHeight } from '@/utils/util';
import { useRouter } from 'vue-router';
import { downloadXls, deepClone } from '@/utils/util';
import dayjs from 'dayjs';
@ -1977,6 +1978,8 @@ const ConfirmForm = () => {
const searchHide = () => {
console.log(details);
details.search = !details.search;
const _node = document.querySelectorAll('.tableNode');
setNodeHeight(_node, '', true);
};
//

314
src/views/aftersales/aftersalesWorkOrderAddTemp.vue

@ -4,12 +4,12 @@
<div class="placeholder">
<el-tabs
class="tablemun"
v-model="form.TabactiveName"
v-model="form.basis.TabactiveName"
type="border-card"
@tab-click="TabactiveClick"
>
<el-tab-pane label="订单填写" name="0"></el-tab-pane>
<el-tab-pane label="零担填写" name="1"> </el-tab-pane>
<el-tab-pane label="订单填写" :name="1"></el-tab-pane>
<el-tab-pane label="零担填写" :name="2"> </el-tab-pane>
</el-tabs>
</div>
<!-- 主体内容 -->
@ -78,6 +78,7 @@
<div class="Package">
<span class="Number"> {{ index + 1 }}</span>
<el-form-item
v-if="form.basis.TabactiveName == 1"
:prop="`PackageList[${index}.packageCode]`"
:rules="ruleForm.packageCode"
label="包条码"
@ -134,27 +135,31 @@
clearable
/>
</el-form-item>
<el-button
v-if="!index"
type="primary"
class="el_addPackage"
@click="Addpackages"
style="margin-top: 2px"
>
<el-icon><Plus /></el-icon></el-button
>
<el-button
v-if="index"
type="primary"
class="el_addPackage"
style="margin-top: 2px"
@click="Removepackage(index)"
>
<el-icon><DeleteFilled /></el-icon></el-button
<div
v-if="['3', '5', '6'].includes(form.basis.discoveryNode)"
style="width: 20%; display: flex"
>
<div class="el_activPackage_btton" v-if="item.history">
<el-button @click="ViewhistoricalPackages(item)">查看历史包件</el-button>
<el-button
v-if="!index"
type="primary"
class="el_addPackage"
@click="Addpackages"
style="margin-top: 2px"
>
<el-icon><Plus /></el-icon></el-button
>
<el-button
v-if="index"
type="primary"
class="el_addPackage"
style="margin-top: 2px"
@click="Removepackage(index)"
>
<el-icon><DeleteFilled /></el-icon></el-button
>
<div class="el_activPackage_btton" v-if="item.history">
<el-button @click="ViewhistoricalPackages(item)">查看历史包件</el-button>
</div>
</div>
</div>
<!-- 按钮 -->
@ -191,14 +196,29 @@
placeholder="请选择车次号"
style="width: 100%"
clearable
@change="DeliveryTrainnumber(form.trainNumber)"
@change="DeliveryTrainnumber"
>
<el-option
v-for="item in form.Trainoptions"
:key="item.value"
:label="item.trainNumber"
:value="item.trainNumber"
/>
<template v-if="form.basis.discoveryNode == 3">
<el-option
v-for="(item, index) in form.Trainoptions"
:key="index"
:label="item.trainNumber"
:value="item.trainNumber"
/>
</template>
<!-- driverName: itemChid.driverName, //
taskTime: itemChid.taskTime, //
trainNumber: itemChid.trainNumber, // -->
<template v-else>
<el-option
v-for="(item, index) in form.deliver"
:key="index"
:label="item.trainNumber"
:value="item.trainNumber"
/>
</template>
</el-select>
</el-form-item>
@ -212,7 +232,7 @@
style="width: 100%"
type="datetime"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择配送时间"
/>
</el-form-item>
@ -251,7 +271,7 @@
style="width: 100%"
type="datetime"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择发货时间"
/>
</el-form-item>
@ -266,7 +286,7 @@
style="width: 100%"
type="datetime"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择入库时间"
/>
</el-form-item>
@ -281,7 +301,7 @@
style="width: 100%"
type="datetime"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择发现时间"
/>
</el-form-item>
@ -356,6 +376,7 @@
class="demo-tabs responsibilities"
@tab-click="handleClick"
v-loading="form.Packageloading"
v-if="form.basis.discoveryNode != 3"
>
<el-tab-pane label="内部责任划分" name="0">
<div class="el_responsibilities">
@ -610,6 +631,7 @@
class="demo-tabs responsibilities"
@tab-click="handleClick"
v-loading="form.Packageloading"
v-if="['1', '3'].includes(form.basis.discoveryNode)"
>
<el-form-item label="">
<el-tab-pane label="照片" name="0">
@ -619,6 +641,8 @@
:headers="headers"
:on-success="ImgSuccess"
:before-upload="beforeAvatarUpload"
drag
multiple
list-type="picture-card"
>
<el-icon><Plus /></el-icon>
@ -629,7 +653,10 @@
<!-- 操作按钮 -->
<div class="flex-c-c">
<el-button type="primary" icon="Refresh" @click="resetFormData">重置</el-button>
<el-button type="primary" icon="Position" @click="onSubmit">保存</el-button>
<el-button type="primary" icon="Position" @click="onSubmit">提交</el-button>
<el-button v-if="allFieldsFilled" type="primary" icon="Position" @click="onSubmit"
>处理完毕</el-button
>
</div>
</el-form>
</div>
@ -682,9 +709,10 @@ import error from '@/error';
const $router = useRouter();
const formCopy = ref({}); //
const form = ref({
basis: {}, //
basis: {
TabactiveName: 1, //
}, //
Totalamount: 0, //
TabactiveName: '0', //
activPackage: '0', //
responsibilities: '0', //
ProcessingTab: '0', //
@ -694,6 +722,7 @@ const form = ref({
groundlineType: 0, //
Proportion: 100, //
totalMax: 100, //
Processed: false, //
//
PackageList: [
{
@ -727,7 +756,8 @@ const form = ref({
],
},
],
Trainoptions: [], //
Trainoptions: [], //线
deliver: [], //
//
Claimamount: [],
fileList: [], //
@ -784,8 +814,6 @@ const Processingoptions = ref([]);
const Paymentmethodoptions = ref([]);
//
const Processingresultsoptions = ref([]);
//
const Trainoptions = ref([]);
//
async function updateDictionary(targetArray, dictionaryType) {
await getDictionaryBiz(dictionaryType).then(res => {
@ -815,9 +843,9 @@ const Handling = async () => {
});
};
//
const responsibilities = () => {
const responsibilities = async () => {
//
form.value.responsibilitiesList = [
form.value.responsibilitiesList = await [
{
businessId: '', //
personResponsibleId: '', //
@ -840,16 +868,10 @@ const responsibilities = () => {
},
];
};
//
const PageState = () => {
if (localStorage.getItem('my_data')) {
myData.value = JSON.parse(localStorage.getItem('my_data')); //
}
//
responsibilities();
//
const PackageListReset = async () => {
//
form.value.PackageList = [
form.value.PackageList = await [
{
packageCode: '', //
waybillNumber: '', //
@ -861,19 +883,17 @@ const PageState = () => {
id: 1,
},
];
};
//
const PageState = () => {
if (localStorage.getItem('my_data')) {
myData.value = JSON.parse(localStorage.getItem('my_data')); //
}
//
responsibilities();
//
PackageListReset();
formCopy.value = deepClone(form.value); //
//
// form.value.Claimamount = [
// {
// title: '', //
// money: 0, //
// paymentUnit: '', //
// compensationTime: '', //
// compensationMethod: '', //
// Paymentmethod: [...Paymentmethodoptions.value],
// },
// ];
};
//
const onLoad = async () => {
@ -906,28 +926,30 @@ const handleClick = (tab, event) => {
console.log(tab, event);
};
//
const DiscoveringNodesChange = value => {
console.log(value);
const DiscoveringNodesChange = async value => {
console.log(value, 'value');
form.value.groundlineType = value;
form.value.basis = {
workOrderType: form.value.basis.workOrderType,
discoveryNode: form.value.basis.discoveryNode,
workOrderNumber: form.value.basis.workOrderNumber,
typeServiceName: form.value.basis.typeServiceName,
waybillMall: form.value.basis.waybillMall,
workOrderType: form.value.basis.workOrderType, //
discoveryNode: form.value.basis.discoveryNode, //
typeServiceName: form.value.basis.typeServiceName, //
TabactiveName: 1, //
};
console.log(form.value.basis, 'form.value.basis');
//
form.value.Proportion = 0;
//
responsibilities();
await responsibilities();
//
await PackageListReset();
ruleFormRef.value.clearValidate();
};
//
const displaySettings = computed(() => {
return {
trainNumber: ['3', '5', '7', '6'].includes(form.value.groundlineType), //
deliveryTime: ['5', '7', '6'].includes(form.value.groundlineType), //
deliveryDriver: ['5', '7', '6'].includes(form.value.groundlineType), //
trainNumber: ['3', '5', '6', '7'].includes(form.value.groundlineType), //
deliveryTime: ['5', '6', '7'].includes(form.value.groundlineType), //
deliveryDriver: ['5', '6', '7'].includes(form.value.groundlineType), //
vehicleRoute: ['3'].includes(form.value.groundlineType), //线
deliverGoodsTime: ['2'].includes(form.value.groundlineType), //
warehousingTime: ['4'].includes(form.value.groundlineType), //
@ -1142,6 +1164,16 @@ const ChangePackageInfo = async item => {
form.value.basis.typeServiceName = ''; //
}
return;
} else if (item.packageCode) {
item.waybillNumber = ''; //
item.orderCode = ''; //
item.first = ''; //
item.secondary = ''; //
item.brandName = ''; //
if (form.value.PackageList == 1) {
form.value.basis.waybillMall = ''; //
form.value.basis.typeServiceName = ''; //
}
}
//
if (form.value.PackageList.length > 1) {
@ -1177,10 +1209,10 @@ const ChangePackageInfo = async item => {
if (state) {
if (
state.orderCode != packageData.orderCode ||
state.brandName != packageData.brandName
state.waybillNumber != packageData.waybillNumber
) {
ElMessage({
message: '请选择相同订单自编号和品牌!',
message: '请选择相同订单自编和运单号的包条码',
type: 'warning',
});
return;
@ -1208,9 +1240,9 @@ const ChangePackageInfo = async item => {
} else {
item.history = false;
}
console.log(form.value.basis.discoveryNode, 'form.value.discoveryNode');
// (线线)
if (form.value.discoveryNode == '3') {
if (['3'].includes(form.value.basis.discoveryNode)) {
let addedTrainNumbers = []; //
res.data.data.forEach(item => {
if (item.trunklines && item.trunklines.length) {
@ -1225,6 +1257,26 @@ const ChangePackageInfo = async item => {
});
}
});
console.log(form.value.Trainoptions, 'form.value.Trainoptions');
}
//
if (['5'].includes(form.value.basis.discoveryNode)) {
let addedTrainNumbers = []; //
res.data.data.forEach(item => {
if (item.deliver && item.deliver.length) {
item.deliver.forEach(itemChid => {
if (!addedTrainNumbers.includes(itemChid.trainNumber)) {
form.value.deliver.push({
driverName: itemChid.driverName, //
taskTime: itemChid.taskTime, //
trainNumber: itemChid.trainNumber, //
});
addedTrainNumbers.push(itemChid.trainNumber);
}
});
}
});
console.log(form.value.Trainoptions, 'form.value.Trainoptions');
}
} else {
form.value.Pageloading = false; //
@ -1290,13 +1342,41 @@ const ResponsiblePartychange = item => {
// 线
const DeliveryTrainnumber = value => {
console.log(value, '接收的参数值');
if (value) {
if (form.value.Trainoptions.length) {
let data = form.value.Trainoptions.find(res => res.trainNumber == value);
form.value.vehicleRoute = data.vehicleRoute;
if (form.value.basis.discoveryNode == '3') {
if (form.value.Trainoptions && form.value.Trainoptions.length) {
let data = form.value.Trainoptions.find(res => res.trainNumber == value);
if (data) {
form.value.basis.vehicleRoute = data.vehicleRoute; //线
}
}
} else if (['5', '6', '7'].includes(form.value.basis.discoveryNode)) {
if (form.value.deliver && form.value.deliver.length) {
let data = form.value.deliver.find(res => res.trainNumber == value);
if (data) {
form.value.basis.deliveryDriver = data.driverName; //
form.value.basis.deliveryTime = data.taskTime; //
}
}
}
}
};
//
const allFieldsFilled = computed(() => {
const claimAmount = form.value.Claimamount;
if (!claimAmount.length) {
form.value.Processed = false;
return false;
}
const allFilled = claimAmount.every(
item => item.compensationMethod && item.compensationTime && item.paymentUnit
);
form.value.Processed = allFilled;
return allFilled;
});
//
const onSubmit = () => {
console.log(form.value);
@ -1340,6 +1420,7 @@ const onSubmit = () => {
let submitData = {
...form.value.basis,
identifying: form.value.basis.TabactiveName, //123
};
//
if (form.value.PackageList.length) {
@ -1382,34 +1463,38 @@ const onSubmit = () => {
});
}
//
if (form.value.responsibilitiesList.length) {
submitData.personResponsibleDTO = [];
form.value.responsibilitiesList.forEach(item => {
console.log(item);
let data = {
responsibilityRatio: item.responsibilityRatio, //
tripartite: item.tripartite, //
description: item.description, //
};
if (form.value.groundlineType == '1') {
data.personResponsibleName = item.personResponsibleId; //
data.businessName = item.Processingoptions.find(
res => res.value == item.businessId
).label; //
data.businessId = item.businessId; //id
} else {
data.personResponsibleId = item.personResponsibleId; //id
(data.personResponsibleName = item.ResponsibleoNameptions.find(
res => res.id == item.personResponsibleId
).name), //
(data.businessName = item.Responsibleoptions.find(
if (form.value.basis.discoveryNode != 3) {
// 线
if (form.value.responsibilitiesList.length) {
submitData.personResponsibleDTO = [];
form.value.responsibilitiesList.forEach(item => {
console.log(item);
let data = {
responsibilityRatio: item.responsibilityRatio, //
tripartite: item.tripartite, //
description: item.description, //
};
if (form.value.groundlineType == '1') {
data.personResponsibleName = item.personResponsibleId; //
data.businessName = item.Processingoptions.find(
res => res.value == item.businessId
).label); //
data.businessId = item.businessId; //id
}
submitData['personResponsibleDTO'].push(data);
});
).label; //
data.businessId = item.businessId; //id
} else {
data.personResponsibleId = item.personResponsibleId; //id
(data.personResponsibleName = item.ResponsibleoNameptions.find(
res => res.id == item.personResponsibleId
).name), //
(data.businessName = item.Responsibleoptions.find(
res => res.value == item.businessId
).label); //
data.businessId = item.businessId; //id
}
submitData['personResponsibleDTO'].push(data);
});
}
}
//
if (
form.value.fileList.length &&
@ -1469,6 +1554,11 @@ const onSubmit = () => {
console.log(submitData, '处理好的参数');
form.value.Pageloading = true; //
//
if (form.value.Processed) {
submitData.workOrderStatus = 30;
}
$_submit(submitData)
.then(res => {
ElMessage({
@ -1486,6 +1576,7 @@ const onSubmit = () => {
form.value = await deepClone(formCopy.value); //
await PageState();
await ruleFormRef.value.resetFields();
form.value.Pageloading = false; //
})
.catch(() => {
$store.commit('DEL_TAG_CURRENT'); //
@ -1630,7 +1721,7 @@ const TabactiveClick = (a, b) => {
display: flex;
flex-wrap: wrap;
:deep(.el-form-item) {
width: 15%;
width: 10.5%;
margin-right: 6px;
.el-form-item__content {
.el-input {
@ -1647,7 +1738,7 @@ const TabactiveClick = (a, b) => {
.el_Basic {
flex: 1;
display: flex;
min-width: 38%;
min-width: 32%;
.el_Processing {
min-width: 50%;
}
@ -1664,6 +1755,11 @@ const TabactiveClick = (a, b) => {
}
}
.responsibilities {
:deep(.el-upload-dragger) {
display: flex;
align-items: center;
justify-content: center;
}
.el_responsibilities {
display: flex;
flex-wrap: wrap;

1329
src/views/aftersales/aftersalesWorkOrderInfo.vue

File diff suppressed because it is too large Load Diff

2
src/views/distribution/turndelivery/deliveryDiscuss.vue

@ -1176,7 +1176,7 @@ const menuData = ref([
label: '订单自编号',
type: 2,
values: '',
width: '200',
width: '230',
checkarr: [],
fixed: false,
sortable: true,

10
src/views/warehouse/updownGoods/warehouseUpdownGoodsLog.vue

@ -79,6 +79,7 @@
<el-row>
<!-- 列表模块 -->
<tablecmt
class="tableNode"
:columnList="columnList"
:tableData="data"
:loading="loading"
@ -116,6 +117,7 @@
<el-row>
<!-- 列表模块 -->
<tablecmt
class="tableNode"
:columnList="columnList1"
:tableData="data1"
:loading="loading"
@ -153,6 +155,7 @@
<el-row>
<!-- 列表模块 -->
<tablecmt
class="tableNode"
:columnList="columnList2"
:tableData="data2"
:loading="loading"
@ -213,6 +216,7 @@ import {
} from '@/api/warehouse/warehouseUpdownGoodsLog';
import option from '@/option/warehouse/warehouseUpdownGoodsLog';
import { mapGetters } from 'vuex';
import {setNodeHeight } from '@/utils/util';
import { downloadXls } from '@/utils/util';
export default {
data() {
@ -841,6 +845,8 @@ export default {
break;
}
}
const _node = document.querySelectorAll('.tableNode');
setNodeHeight(_node, '', true);
},
//
searchChange() {
@ -849,6 +855,8 @@ export default {
//
searchHide() {
this.search = !this.search;
const _node = document.querySelectorAll('.tableNode');
setNodeHeight(_node, '', true);
},
showdrawer(value) {
this.drawerShow = value;
@ -974,6 +982,8 @@ export default {
this.selectionClear();
});
}
const _node = document.querySelectorAll('.tableNode');
setNodeHeight(_node, '', true);
},
},
};

Loading…
Cancel
Save