|
@@ -44,8 +44,7 @@
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
:value="item.value"
|
|
|
- >
|
|
|
|
|
- </el-option>
|
|
|
|
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -73,8 +72,7 @@
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
:value="item.value"
|
|
|
- >
|
|
|
|
|
- </el-option>
|
|
|
|
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -233,8 +231,7 @@
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
:value="item.value"
|
|
|
- >
|
|
|
|
|
- </el-option>
|
|
|
|
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -258,8 +255,7 @@
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
:value="item.value"
|
|
|
- >
|
|
|
|
|
- </el-option>
|
|
|
|
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -283,8 +279,7 @@
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
:value="item.value"
|
|
|
- >
|
|
|
|
|
- </el-option>
|
|
|
|
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -308,8 +303,7 @@
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
:value="item.value"
|
|
|
- >
|
|
|
|
|
- </el-option>
|
|
|
|
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -335,8 +329,7 @@
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
:value="item.value"
|
|
|
- >
|
|
|
|
|
- </el-option>
|
|
|
|
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -745,7 +738,6 @@
|
|
|
@selection-change="handleSelectionChange"
|
|
@selection-change="handleSelectionChange"
|
|
|
v-if="source != '报工信息'"
|
|
v-if="source != '报工信息'"
|
|
|
>
|
|
>
|
|
|
- <!-- 表头工具栏 -->
|
|
|
|
|
<template v-slot:toolbar>
|
|
<template v-slot:toolbar>
|
|
|
<el-button type="primary" v-if="tableOperate" @click="addBank"
|
|
<el-button type="primary" v-if="tableOperate" @click="addBank"
|
|
|
>添加</el-button
|
|
>添加</el-button
|
|
@@ -761,7 +753,6 @@
|
|
|
<span class="is-required">{{ column.label }}</span>
|
|
<span class="is-required">{{ column.label }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-slot:action="{ row, $index }">
|
|
<template v-slot:action="{ row, $index }">
|
|
|
- <!-- v-if="type != 'view'" -->
|
|
|
|
|
<el-link
|
|
<el-link
|
|
|
type="danger"
|
|
type="danger"
|
|
|
:underline="false"
|
|
:underline="false"
|
|
@@ -936,7 +927,6 @@ export default {
|
|
|
slot: 'telephone',
|
|
slot: 'telephone',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
{
|
|
{
|
|
|
label: '微信号',
|
|
label: '微信号',
|
|
|
prop: 'wechat',
|
|
prop: 'wechat',
|
|
@@ -974,7 +964,6 @@ export default {
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
fixed: 'right',
|
|
fixed: 'right',
|
|
|
showOverflowTooltip: true
|
|
showOverflowTooltip: true
|
|
|
- // show: this.type != 'view'
|
|
|
|
|
}
|
|
}
|
|
|
];
|
|
];
|
|
|
},
|
|
},
|
|
@@ -1007,7 +996,6 @@ export default {
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
showOverflowTooltip: true
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
{
|
|
{
|
|
|
prop: 'categoryName',
|
|
prop: 'categoryName',
|
|
|
label: '名称',
|
|
label: '名称',
|
|
@@ -1076,13 +1064,10 @@ export default {
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
resizable: false,
|
|
resizable: false,
|
|
|
slot: 'action',
|
|
slot: 'action',
|
|
|
- // fixed: 'right',
|
|
|
|
|
showOverflowTooltip: true
|
|
showOverflowTooltip: true
|
|
|
- // show: this.type != 'view'
|
|
|
|
|
}
|
|
}
|
|
|
];
|
|
];
|
|
|
},
|
|
},
|
|
|
- // 故障描述 ***
|
|
|
|
|
faultList() {
|
|
faultList() {
|
|
|
return [
|
|
return [
|
|
|
{
|
|
{
|
|
@@ -1146,12 +1131,10 @@ export default {
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
resizable: false,
|
|
resizable: false,
|
|
|
slot: 'action',
|
|
slot: 'action',
|
|
|
- // fixed: 'right',
|
|
|
|
|
showOverflowTooltip: true
|
|
showOverflowTooltip: true
|
|
|
}
|
|
}
|
|
|
];
|
|
];
|
|
|
},
|
|
},
|
|
|
- // 需求表格修改权限 ***
|
|
|
|
|
tableOperate() {
|
|
tableOperate() {
|
|
|
if (this.isReportDetails) {
|
|
if (this.isReportDetails) {
|
|
|
return false;
|
|
return false;
|
|
@@ -1159,16 +1142,12 @@ export default {
|
|
|
let flag = this.type != 'view' || this.state == '可操作';
|
|
let flag = this.type != 'view' || this.state == '可操作';
|
|
|
return flag;
|
|
return flag;
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- // 故障列表删除权限
|
|
|
|
|
faultOperate() {
|
|
faultOperate() {
|
|
|
return (row) => {
|
|
return (row) => {
|
|
|
let flag = (this.state == '可操作' && !row.id) || this.type != 'view';
|
|
let flag = (this.state == '可操作' && !row.id) || this.type != 'view';
|
|
|
return flag;
|
|
return flag;
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- // 故障/联系人列表更改权限 ***
|
|
|
|
|
change_permission() {
|
|
change_permission() {
|
|
|
let flag = this.type === 'view';
|
|
let flag = this.type === 'view';
|
|
|
if (this.source) {
|
|
if (this.source) {
|
|
@@ -1176,8 +1155,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
return flag;
|
|
return flag;
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- // 附件上传 更改设置
|
|
|
|
|
fileStr() {
|
|
fileStr() {
|
|
|
let str;
|
|
let str;
|
|
|
if (this.isReportDetails) {
|
|
if (this.isReportDetails) {
|
|
@@ -1189,7 +1166,6 @@ export default {
|
|
|
str = this.type == 'view' ? 'view' : 'add';
|
|
str = this.type == 'view' ? 'view' : 'add';
|
|
|
return str;
|
|
return str;
|
|
|
},
|
|
},
|
|
|
- // 图片
|
|
|
|
|
imageUrleng() {
|
|
imageUrleng() {
|
|
|
return (row) => {
|
|
return (row) => {
|
|
|
if (!row.imageUrl) {
|
|
if (!row.imageUrl) {
|
|
@@ -1205,24 +1181,18 @@ export default {
|
|
|
default: true,
|
|
default: true,
|
|
|
type: Boolean
|
|
type: Boolean
|
|
|
},
|
|
},
|
|
|
- // 来源页面 ***
|
|
|
|
|
source: {
|
|
source: {
|
|
|
default: '',
|
|
default: '',
|
|
|
type: String
|
|
type: String
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- // 表格数据 更改状态
|
|
|
|
|
state: {
|
|
state: {
|
|
|
default: '',
|
|
default: '',
|
|
|
type: String
|
|
type: String
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- // 是否是报工售后工单详情进入
|
|
|
|
|
isReportDetails: {
|
|
isReportDetails: {
|
|
|
default: false,
|
|
default: false,
|
|
|
type: Boolean
|
|
type: Boolean
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
demandList: {
|
|
demandList: {
|
|
|
type: Array,
|
|
type: Array,
|
|
|
default: () => []
|
|
default: () => []
|
|
@@ -1237,13 +1207,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
- detailList: {
|
|
|
|
|
- handler(newVal) {
|
|
|
|
|
- this.tableList = newVal;
|
|
|
|
|
- console.log('配件数据更新:', newVal); // 实时打印最新配件数据
|
|
|
|
|
- },
|
|
|
|
|
- immediate: true
|
|
|
|
|
- },
|
|
|
|
|
demandList: {
|
|
demandList: {
|
|
|
handler(val) {
|
|
handler(val) {
|
|
|
this.demandList = val;
|
|
this.demandList = val;
|
|
@@ -1270,26 +1233,24 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
tableList: [],
|
|
tableList: [],
|
|
|
selection: [],
|
|
selection: [],
|
|
|
- // 日期选择器配置
|
|
|
|
|
pickerOptions: {
|
|
pickerOptions: {
|
|
|
disabledDate(time) {
|
|
disabledDate(time) {
|
|
|
- // 禁用今天之前的日期
|
|
|
|
|
return time.getTime() < new Date().setHours(0, 0, 0, 0);
|
|
return time.getTime() < new Date().setHours(0, 0, 0, 0);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- detailList: [],
|
|
|
|
|
|
|
+ detailList: [], // 配件数据列表(用于回显)
|
|
|
chargeList: [
|
|
chargeList: [
|
|
|
{ label: '是', value: 1 },
|
|
{ label: '是', value: 1 },
|
|
|
{ label: '否', value: 0 }
|
|
{ label: '否', value: 0 }
|
|
|
- ], //是否收费 下拉
|
|
|
|
|
|
|
+ ],
|
|
|
partList: [
|
|
partList: [
|
|
|
{ label: '是', value: 1 },
|
|
{ label: '是', value: 1 },
|
|
|
{ label: '否', value: 0 }
|
|
{ label: '否', value: 0 }
|
|
|
- ], //是否带配件 下拉
|
|
|
|
|
|
|
+ ],
|
|
|
carList: [
|
|
carList: [
|
|
|
{ label: '是', value: 1 },
|
|
{ label: '是', value: 1 },
|
|
|
{ label: '否', value: 0 }
|
|
{ label: '否', value: 0 }
|
|
|
- ], //是否派车 下拉
|
|
|
|
|
|
|
+ ],
|
|
|
typeOptions: [
|
|
typeOptions: [
|
|
|
{ label: '维修', value: '1' },
|
|
{ label: '维修', value: '1' },
|
|
|
{ label: '保养', value: '2' },
|
|
{ label: '保养', value: '2' },
|
|
@@ -1301,31 +1262,22 @@ export default {
|
|
|
contactInfoVOS: [],
|
|
contactInfoVOS: [],
|
|
|
faultDetailList: [],
|
|
faultDetailList: [],
|
|
|
associationType: '1',
|
|
associationType: '1',
|
|
|
- aftertype: [], //售后类型
|
|
|
|
|
- charge: '', //是否收费
|
|
|
|
|
- part: '', //是否带配件
|
|
|
|
|
- car: '', //是否派车
|
|
|
|
|
- pietype: '' //派车类型
|
|
|
|
|
|
|
+ aftertype: '',
|
|
|
|
|
+ charge: '',
|
|
|
|
|
+ part: '',
|
|
|
|
|
+ car: '',
|
|
|
|
|
+ pietype: ''
|
|
|
},
|
|
},
|
|
|
rules: {},
|
|
rules: {},
|
|
|
radio: null,
|
|
radio: null,
|
|
|
phoneList: [],
|
|
phoneList: [],
|
|
|
phoneVisible: false,
|
|
phoneVisible: false,
|
|
|
associationTypeList: [
|
|
associationTypeList: [
|
|
|
- {
|
|
|
|
|
- value: '1',
|
|
|
|
|
- label: '发货单'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- value: '2',
|
|
|
|
|
- label: '销售订单'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- value: '3',
|
|
|
|
|
- label: '客户'
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ { value: '1', label: '发货单' },
|
|
|
|
|
+ { value: '2', label: '销售订单' },
|
|
|
|
|
+ { value: '3', label: '客户' }
|
|
|
],
|
|
],
|
|
|
- isOrder: false, // 是否为销售订单数据
|
|
|
|
|
|
|
+ isOrder: false,
|
|
|
defaultTemplateList: [],
|
|
defaultTemplateList: [],
|
|
|
jsonData: {},
|
|
jsonData: {},
|
|
|
carByTemplate: {},
|
|
carByTemplate: {},
|
|
@@ -1343,14 +1295,13 @@ export default {
|
|
|
return [];
|
|
return [];
|
|
|
},
|
|
},
|
|
|
async init(res) {
|
|
async init(res) {
|
|
|
|
|
+ // 原有字段初始化
|
|
|
let productDetail = res.productDetail ? res.productDetail : [];
|
|
let productDetail = res.productDetail ? res.productDetail : [];
|
|
|
this.$set(this.form, 'tableList', productDetail);
|
|
this.$set(this.form, 'tableList', productDetail);
|
|
|
this.$set(this.form, 'orderCode', res.orderCode);
|
|
this.$set(this.form, 'orderCode', res.orderCode);
|
|
|
this.$set(this.form, 'orderId', res.orderId);
|
|
this.$set(this.form, 'orderId', res.orderId);
|
|
|
this.$set(this.form, 'contactInfoVOS', res.contactInfoVOS);
|
|
this.$set(this.form, 'contactInfoVOS', res.contactInfoVOS);
|
|
|
this.$set(this.form, 'name', res.name);
|
|
this.$set(this.form, 'name', res.name);
|
|
|
- console.log(this.form);
|
|
|
|
|
- console.log(res);
|
|
|
|
|
let faultLevel = res.faultLevel ? String(res.faultLevel) : '';
|
|
let faultLevel = res.faultLevel ? String(res.faultLevel) : '';
|
|
|
this.$set(this.form, 'faultLevel', faultLevel);
|
|
this.$set(this.form, 'faultLevel', faultLevel);
|
|
|
this.$set(this.form, 'code', res.code);
|
|
this.$set(this.form, 'code', res.code);
|
|
@@ -1367,6 +1318,16 @@ export default {
|
|
|
if (faultDetailList.length > 0) {
|
|
if (faultDetailList.length > 0) {
|
|
|
this.isOrder = true;
|
|
this.isOrder = true;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 核心修复:回显字段赋值
|
|
|
|
|
+ this.$set(this.form, 'aftertype', res.afterSalesType ?? '');
|
|
|
|
|
+ this.$set(this.form, 'charge', res.isFee ?? '');
|
|
|
|
|
+ this.$set(this.form, 'part', res.isWithAccessories ?? '');
|
|
|
|
|
+ this.$set(this.form, 'car', res.isPieCar ?? '');
|
|
|
|
|
+ this.$set(this.form, 'pietype', res.pieCarType ?? '');
|
|
|
|
|
+
|
|
|
|
|
+ // 配件数据回显:从后端res.costListVOS获取并赋值给detailList
|
|
|
|
|
+ this.$set(this, 'detailList', res.costListVOS || []);
|
|
|
},
|
|
},
|
|
|
getValue() {
|
|
getValue() {
|
|
|
return this.form;
|
|
return this.form;
|
|
@@ -1379,7 +1340,6 @@ export default {
|
|
|
this.phoneList = [];
|
|
this.phoneList = [];
|
|
|
this.phoneVisible = false;
|
|
this.phoneVisible = false;
|
|
|
},
|
|
},
|
|
|
- //客户选择
|
|
|
|
|
handHead() {
|
|
handHead() {
|
|
|
if (this.type != 'view') {
|
|
if (this.type != 'view') {
|
|
|
this.$refs.parentRef.open();
|
|
this.$refs.parentRef.open();
|
|
@@ -1388,7 +1348,6 @@ export default {
|
|
|
changeParent(res) {
|
|
changeParent(res) {
|
|
|
this.contactDetail(res.id);
|
|
this.contactDetail(res.id);
|
|
|
},
|
|
},
|
|
|
- //客户回调
|
|
|
|
|
async contactDetail(id, type) {
|
|
async contactDetail(id, type) {
|
|
|
if (!id) {
|
|
if (!id) {
|
|
|
this.contractInfo = {};
|
|
this.contractInfo = {};
|
|
@@ -1417,26 +1376,22 @@ export default {
|
|
|
})
|
|
})
|
|
|
);
|
|
);
|
|
|
if (this.form.associationType != '3') {
|
|
if (this.form.associationType != '3') {
|
|
|
- // 清空发货单的数据 *** 初次进来不清空
|
|
|
|
|
this.$set(this.form, 'orderCode', '');
|
|
this.$set(this.form, 'orderCode', '');
|
|
|
this.$set(this.form, 'orderId', '');
|
|
this.$set(this.form, 'orderId', '');
|
|
|
this.$set(this.form, 'tableList', []);
|
|
this.$set(this.form, 'tableList', []);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- //发货单回调
|
|
|
|
|
invoiceChange(data) {
|
|
invoiceChange(data) {
|
|
|
this.$set(this.form, 'orderCode', data.orderCode);
|
|
this.$set(this.form, 'orderCode', data.orderCode);
|
|
|
this.$set(this.form, 'orderId', data.orderId);
|
|
this.$set(this.form, 'orderId', data.orderId);
|
|
|
let list = JSON.parse(JSON.stringify(data.tableList));
|
|
let list = JSON.parse(JSON.stringify(data.tableList));
|
|
|
- // 如果计量数量没有的话默认是 1
|
|
|
|
|
list.map(
|
|
list.map(
|
|
|
(el) =>
|
|
(el) =>
|
|
|
(el.measureQuantity = el.measureQuantity ? el.measureQuantity : 1)
|
|
(el.measureQuantity = el.measureQuantity ? el.measureQuantity : 1)
|
|
|
);
|
|
);
|
|
|
this.$set(this.form, 'tableList', list);
|
|
this.$set(this.form, 'tableList', list);
|
|
|
},
|
|
},
|
|
|
- //发货单选择
|
|
|
|
|
invoiceDialogOpen() {
|
|
invoiceDialogOpen() {
|
|
|
if (!this.form?.contractInfo?.id) {
|
|
if (!this.form?.contractInfo?.id) {
|
|
|
this.$message.warning('请先选择客户名称!');
|
|
this.$message.warning('请先选择客户名称!');
|
|
@@ -1462,7 +1417,6 @@ export default {
|
|
|
remark: ''
|
|
remark: ''
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- // *** 添加问题
|
|
|
|
|
addProblem(row) {
|
|
addProblem(row) {
|
|
|
if (!row.faultDetails) this.$set(row, 'faultDetails', []);
|
|
if (!row.faultDetails) this.$set(row, 'faultDetails', []);
|
|
|
let len = row.faultDetails.length;
|
|
let len = row.faultDetails.length;
|
|
@@ -1472,16 +1426,13 @@ export default {
|
|
|
faultPhenomenon: ''
|
|
faultPhenomenon: ''
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- // *** 删除问题
|
|
|
|
|
delSon(row, idx) {
|
|
delSon(row, idx) {
|
|
|
row.faultDetails.splice(idx, 1);
|
|
row.faultDetails.splice(idx, 1);
|
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
|
},
|
|
},
|
|
|
- //
|
|
|
|
|
handleSelectionChange(rows) {
|
|
handleSelectionChange(rows) {
|
|
|
this.selection = rows;
|
|
this.selection = rows;
|
|
|
},
|
|
},
|
|
|
- // *** 删除联系人
|
|
|
|
|
delContact() {
|
|
delContact() {
|
|
|
if (this.selection.length == 0) {
|
|
if (this.selection.length == 0) {
|
|
|
this.$message.warning('请至少选择一条联系人信息');
|
|
this.$message.warning('请至少选择一条联系人信息');
|
|
@@ -1497,7 +1448,6 @@ export default {
|
|
|
del(row, index) {
|
|
del(row, index) {
|
|
|
this.form.tableList.splice(index, 1);
|
|
this.form.tableList.splice(index, 1);
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
getValidate() {
|
|
getValidate() {
|
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
|
this.$refs.form.validate((valid, obj) => {
|
|
this.$refs.form.validate((valid, obj) => {
|
|
@@ -1522,12 +1472,16 @@ export default {
|
|
|
contactInfoVOS: [],
|
|
contactInfoVOS: [],
|
|
|
faultDetailList: [],
|
|
faultDetailList: [],
|
|
|
orderCode: '',
|
|
orderCode: '',
|
|
|
- orderId: ''
|
|
|
|
|
|
|
+ orderId: '',
|
|
|
|
|
+ associationType: '1',
|
|
|
|
|
+ aftertype: '',
|
|
|
|
|
+ charge: '',
|
|
|
|
|
+ part: '',
|
|
|
|
|
+ car: '',
|
|
|
|
|
+ pietype: ''
|
|
|
};
|
|
};
|
|
|
this.$refs.form.resetFields();
|
|
this.$refs.form.resetFields();
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- // 销售订单选择
|
|
|
|
|
saleorderDialogOpen() {
|
|
saleorderDialogOpen() {
|
|
|
if (!this.form?.contractInfo?.id) {
|
|
if (!this.form?.contractInfo?.id) {
|
|
|
this.$message.warning('请先选择客户名称!');
|
|
this.$message.warning('请先选择客户名称!');
|
|
@@ -1536,7 +1490,6 @@ export default {
|
|
|
this.form.tableList = [];
|
|
this.form.tableList = [];
|
|
|
if (this.type != 'view') {
|
|
if (this.type != 'view') {
|
|
|
let obj = {
|
|
let obj = {
|
|
|
- // tableList: this.form.tableList || [],
|
|
|
|
|
tableList: [],
|
|
tableList: [],
|
|
|
orderCode: this.form.orderCode || '',
|
|
orderCode: this.form.orderCode || '',
|
|
|
orderId: this.form.orderId || ''
|
|
orderId: this.form.orderId || ''
|
|
@@ -1544,12 +1497,10 @@ export default {
|
|
|
this.$refs.saleorderDialogRef.open(this.form.contractInfo.id, obj);
|
|
this.$refs.saleorderDialogRef.open(this.form.contractInfo.id, obj);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- // 销售订单回调
|
|
|
|
|
saleorderChange(data) {
|
|
saleorderChange(data) {
|
|
|
this.$set(this.form, 'orderCode', data.orderCode);
|
|
this.$set(this.form, 'orderCode', data.orderCode);
|
|
|
this.$set(this.form, 'orderId', data.orderId);
|
|
this.$set(this.form, 'orderId', data.orderId);
|
|
|
let list = JSON.parse(JSON.stringify(data.tableList));
|
|
let list = JSON.parse(JSON.stringify(data.tableList));
|
|
|
- // 如果计量数量没有的话默认是 1
|
|
|
|
|
list.map(
|
|
list.map(
|
|
|
(el) =>
|
|
(el) =>
|
|
|
(el.measureQuantity = el.measureQuantity ? el.measureQuantity : 1)
|
|
(el.measureQuantity = el.measureQuantity ? el.measureQuantity : 1)
|
|
@@ -1561,24 +1512,20 @@ export default {
|
|
|
this.$set(this.form, 'faultDetailList', []);
|
|
this.$set(this.form, 'faultDetailList', []);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- // 产品选择
|
|
|
|
|
customersDialogOpen() {
|
|
customersDialogOpen() {
|
|
|
this.$refs.productDialogRef.open();
|
|
this.$refs.productDialogRef.open();
|
|
|
},
|
|
},
|
|
|
- // 产品选择回调
|
|
|
|
|
productChange(data) {
|
|
productChange(data) {
|
|
|
this.$set(this.form, 'faultDetailList', []);
|
|
this.$set(this.form, 'faultDetailList', []);
|
|
|
this.$set(this.form, 'orderCode', data.orderCode);
|
|
this.$set(this.form, 'orderCode', data.orderCode);
|
|
|
this.$set(this.form, 'orderId', data.orderId);
|
|
this.$set(this.form, 'orderId', data.orderId);
|
|
|
let list = JSON.parse(JSON.stringify(data.tableList));
|
|
let list = JSON.parse(JSON.stringify(data.tableList));
|
|
|
- // 如果计量数量没有的话默认是 1
|
|
|
|
|
list.map(
|
|
list.map(
|
|
|
(el) =>
|
|
(el) =>
|
|
|
(el.measureQuantity = el.measureQuantity ? el.measureQuantity : 1)
|
|
(el.measureQuantity = el.measureQuantity ? el.measureQuantity : 1)
|
|
|
);
|
|
);
|
|
|
this.$set(this.form, 'tableList', list);
|
|
this.$set(this.form, 'tableList', list);
|
|
|
},
|
|
},
|
|
|
- // 新增故障 一级( 没有售后对象 )
|
|
|
|
|
addFaults() {
|
|
addFaults() {
|
|
|
this.form.faultDetailList.push({
|
|
this.form.faultDetailList.push({
|
|
|
maintenanceProcess: '',
|
|
maintenanceProcess: '',
|
|
@@ -1586,7 +1533,6 @@ export default {
|
|
|
faultPhenomenon: ''
|
|
faultPhenomenon: ''
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
faultDel(index) {
|
|
faultDel(index) {
|
|
|
this.form.faultDetailList.splice(index, 1);
|
|
this.form.faultDetailList.splice(index, 1);
|
|
|
},
|
|
},
|
|
@@ -1607,25 +1553,19 @@ export default {
|
|
|
);
|
|
);
|
|
|
if (this.carByTemplate && this.carByTemplate.formJson?.makingJson) {
|
|
if (this.carByTemplate && this.carByTemplate.formJson?.makingJson) {
|
|
|
this.formSchema = JSON.parse(this.carByTemplate.formJson.makingJson);
|
|
this.formSchema = JSON.parse(this.carByTemplate.formJson.makingJson);
|
|
|
-
|
|
|
|
|
this.formSchema.config.dataSource &&
|
|
this.formSchema.config.dataSource &&
|
|
|
this.formSchema.config.dataSource.forEach((item) => {
|
|
this.formSchema.config.dataSource.forEach((item) => {
|
|
|
item.headers = {
|
|
item.headers = {
|
|
|
Authorization: getToken()
|
|
Authorization: getToken()
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
- console.log('表单配置', this.formSchema);
|
|
|
|
|
} else {
|
|
} else {
|
|
|
this.formSchema = {};
|
|
this.formSchema = {};
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- // 打开弹窗
|
|
|
|
|
this.processSubmitDialogFlag = true;
|
|
this.processSubmitDialogFlag = true;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
handleFormSubmit(data) {
|
|
handleFormSubmit(data) {
|
|
|
- console.log('表单数据:', data);
|
|
|
|
|
this.carFormData = data;
|
|
this.carFormData = data;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1643,4 +1583,4 @@ export default {
|
|
|
margin-left: 16px;
|
|
margin-left: 16px;
|
|
|
color: #e6a23c;
|
|
color: #e6a23c;
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|