|
@@ -36,6 +36,7 @@
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
v-model="form.associationType"
|
|
v-model="form.associationType"
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
|
|
+ :disabled="type == 'view'"
|
|
|
@change="selectType"
|
|
@change="selectType"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
@@ -95,7 +96,7 @@
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6" v-show="form.associationType == '1'">
|
|
|
|
|
|
|
+ <el-col :span="6" v-if="form.associationType == '1'">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label="发货单:"
|
|
label="发货单:"
|
|
|
prop="orderCode"
|
|
prop="orderCode"
|
|
@@ -108,12 +109,13 @@
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="form.orderCode"
|
|
v-model="form.orderCode"
|
|
|
readonly
|
|
readonly
|
|
|
|
|
+ :disabled="type == 'view'"
|
|
|
@click.native="invoiceDialogOpen"
|
|
@click.native="invoiceDialogOpen"
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6" v-show="form.associationType == '2'">
|
|
|
|
|
|
|
+ <el-col :span="6" v-if="form.associationType == '2'">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label="销售订单:"
|
|
label="销售订单:"
|
|
|
prop="orderCode"
|
|
prop="orderCode"
|
|
@@ -126,24 +128,48 @@
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="form.orderCode"
|
|
v-model="form.orderCode"
|
|
|
readonly
|
|
readonly
|
|
|
|
|
+ :disabled="type == 'view'"
|
|
|
@click.native="saleorderDialogOpen"
|
|
@click.native="saleorderDialogOpen"
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <el-col :span="6" v-if="form.associationType == '3'">
|
|
|
|
|
+ <el-form-item label="产品:">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.orderCode"
|
|
|
|
|
+ readonly
|
|
|
|
|
+ :disabled="type == 'view'"
|
|
|
|
|
+ @click.native="customersDialogOpen"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<el-form-item label="客户编码:" prop="code">
|
|
<el-form-item label="客户编码:" prop="code">
|
|
|
- <el-input v-model="form.contractInfo.code" readonly />
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.contractInfo.code"
|
|
|
|
|
+ readonly
|
|
|
|
|
+ :disabled="type == 'view'"
|
|
|
|
|
+ />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<el-form-item label="客户代号:" prop="serialNo">
|
|
<el-form-item label="客户代号:" prop="serialNo">
|
|
|
- <el-input v-model="form.contractInfo.serialNo" readonly />
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.contractInfo.serialNo"
|
|
|
|
|
+ readonly
|
|
|
|
|
+ :disabled="type == 'view'"
|
|
|
|
|
+ />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<el-form-item label="业务员:" prop="salesmanName">
|
|
<el-form-item label="业务员:" prop="salesmanName">
|
|
|
- <el-input v-model="form.contractInfo.salesmanName" readonly />
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.contractInfo.salesmanName"
|
|
|
|
|
+ readonly
|
|
|
|
|
+ :disabled="type == 'view'"
|
|
|
|
|
+ />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
@@ -156,19 +182,15 @@
|
|
|
trigger: 'change'
|
|
trigger: 'change'
|
|
|
}"
|
|
}"
|
|
|
>
|
|
>
|
|
|
- <el-input v-model="form.contactAddress" :readonly="type == 'view'" />
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ :disabled="type == 'view'"
|
|
|
|
|
+ v-model="form.contactAddress"
|
|
|
|
|
+ :readonly="type == 'view'"
|
|
|
|
|
+ />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
- <el-form-item
|
|
|
|
|
- label="故障等级:"
|
|
|
|
|
- prop="faultLevel"
|
|
|
|
|
- :rules="{
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: '请选择故障等级',
|
|
|
|
|
- trigger: 'change'
|
|
|
|
|
- }"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-form-item label="故障等级:" prop="faultLevel">
|
|
|
<DictSelection
|
|
<DictSelection
|
|
|
dictName="故障等级"
|
|
dictName="故障等级"
|
|
|
:disabled="type == 'view'"
|
|
:disabled="type == 'view'"
|
|
@@ -180,7 +202,7 @@
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<el-form-item label="期望解决时间:" prop="expectedTime">
|
|
<el-form-item label="期望解决时间:" prop="expectedTime">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
- :readonly="type == 'view'"
|
|
|
|
|
|
|
+ :disabled="type == 'view'"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
v-model="form.expectedTime"
|
|
v-model="form.expectedTime"
|
|
|
type="date"
|
|
type="date"
|
|
@@ -692,6 +714,7 @@
|
|
|
@changeParent="invoiceChange"
|
|
@changeParent="invoiceChange"
|
|
|
></invoiceDialog>
|
|
></invoiceDialog>
|
|
|
<SaleorderDialog ref="saleorderDialogRef" @changeParent="saleorderChange" />
|
|
<SaleorderDialog ref="saleorderDialogRef" @changeParent="saleorderChange" />
|
|
|
|
|
+ <ProductDialog ref="productDialogRef" @changeParent="productChange" />
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -704,6 +727,7 @@
|
|
|
import parentList from '@/views/saleManage/contact/components/parentList.vue';
|
|
import parentList from '@/views/saleManage/contact/components/parentList.vue';
|
|
|
import invoiceDialog from './invoiceDialog.vue';
|
|
import invoiceDialog from './invoiceDialog.vue';
|
|
|
import SaleorderDialog from './saleorderDialog.vue';
|
|
import SaleorderDialog from './saleorderDialog.vue';
|
|
|
|
|
+ import ProductDialog from './productDialog.vue';
|
|
|
export default {
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
mixins: [dictMixins],
|
|
|
components: {
|
|
components: {
|
|
@@ -711,7 +735,8 @@
|
|
|
invoiceDialog,
|
|
invoiceDialog,
|
|
|
PhotoList,
|
|
PhotoList,
|
|
|
SaleorderDialog,
|
|
SaleorderDialog,
|
|
|
- fileMain
|
|
|
|
|
|
|
+ fileMain,
|
|
|
|
|
+ ProductDialog
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
...mapGetters(['getDictValue']),
|
|
...mapGetters(['getDictValue']),
|
|
@@ -1097,6 +1122,10 @@
|
|
|
{
|
|
{
|
|
|
value: '2',
|
|
value: '2',
|
|
|
label: '销售订单'
|
|
label: '销售订单'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: '3',
|
|
|
|
|
+ label: '客户'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
isOrder: false // 是否为销售订单数据
|
|
isOrder: false // 是否为销售订单数据
|
|
@@ -1176,11 +1205,12 @@
|
|
|
return item;
|
|
return item;
|
|
|
})
|
|
})
|
|
|
);
|
|
);
|
|
|
-
|
|
|
|
|
- // 清空发货单的数据 *** 初次进来不清空
|
|
|
|
|
- this.$set(this.form, 'orderCode', '');
|
|
|
|
|
- this.$set(this.form, 'orderId', '');
|
|
|
|
|
- this.$set(this.form, 'tableList', []);
|
|
|
|
|
|
|
+ if (this.form.associationType != '3') {
|
|
|
|
|
+ // 清空发货单的数据 *** 初次进来不清空
|
|
|
|
|
+ this.$set(this.form, 'orderCode', '');
|
|
|
|
|
+ this.$set(this.form, 'orderId', '');
|
|
|
|
|
+ this.$set(this.form, 'tableList', []);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
//发货单回调
|
|
//发货单回调
|
|
@@ -1198,9 +1228,10 @@
|
|
|
//发货单选择
|
|
//发货单选择
|
|
|
invoiceDialogOpen() {
|
|
invoiceDialogOpen() {
|
|
|
if (!this.form?.contractInfo?.id) {
|
|
if (!this.form?.contractInfo?.id) {
|
|
|
- this.$message.warning('请先选择客户!');
|
|
|
|
|
|
|
+ this.$message.warning('请先选择客户名称!');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ this.form.tableList = [];
|
|
|
if (this.type != 'view') {
|
|
if (this.type != 'view') {
|
|
|
let obj = {
|
|
let obj = {
|
|
|
tableList: this.form.tableList || [],
|
|
tableList: this.form.tableList || [],
|
|
@@ -1278,6 +1309,7 @@
|
|
|
tableList: [],
|
|
tableList: [],
|
|
|
contractInfo: {},
|
|
contractInfo: {},
|
|
|
contactInfoVOS: [],
|
|
contactInfoVOS: [],
|
|
|
|
|
+ faultDetailList: [],
|
|
|
orderCode: '',
|
|
orderCode: '',
|
|
|
orderId: ''
|
|
orderId: ''
|
|
|
};
|
|
};
|
|
@@ -1287,12 +1319,14 @@
|
|
|
// 销售订单选择
|
|
// 销售订单选择
|
|
|
saleorderDialogOpen() {
|
|
saleorderDialogOpen() {
|
|
|
if (!this.form?.contractInfo?.id) {
|
|
if (!this.form?.contractInfo?.id) {
|
|
|
- this.$message.warning('请先选择客户!');
|
|
|
|
|
|
|
+ this.$message.warning('请先选择客户名称!');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ this.form.tableList = [];
|
|
|
if (this.type != 'view') {
|
|
if (this.type != 'view') {
|
|
|
let obj = {
|
|
let obj = {
|
|
|
- tableList: this.form.tableList || [],
|
|
|
|
|
|
|
+ // tableList: this.form.tableList || [],
|
|
|
|
|
+ tableList: [],
|
|
|
orderCode: this.form.orderCode || '',
|
|
orderCode: this.form.orderCode || '',
|
|
|
orderId: this.form.orderId || ''
|
|
orderId: this.form.orderId || ''
|
|
|
};
|
|
};
|
|
@@ -1316,6 +1350,23 @@
|
|
|
this.$set(this.form, 'faultDetailList', []);
|
|
this.$set(this.form, 'faultDetailList', []);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ // 产品选择
|
|
|
|
|
+ customersDialogOpen() {
|
|
|
|
|
+ this.$refs.productDialogRef.open();
|
|
|
|
|
+ },
|
|
|
|
|
+ // 产品选择回调
|
|
|
|
|
+ productChange(data) {
|
|
|
|
|
+ this.$set(this.form, 'faultDetailList', []);
|
|
|
|
|
+ this.$set(this.form, 'orderCode', data.orderCode);
|
|
|
|
|
+ this.$set(this.form, 'orderId', data.orderId);
|
|
|
|
|
+ let list = JSON.parse(JSON.stringify(data.tableList));
|
|
|
|
|
+ // 如果计量数量没有的话默认是 1
|
|
|
|
|
+ list.map(
|
|
|
|
|
+ (el) =>
|
|
|
|
|
+ (el.measureQuantity = el.measureQuantity ? el.measureQuantity : 1)
|
|
|
|
|
+ );
|
|
|
|
|
+ this.$set(this.form, 'tableList', list);
|
|
|
|
|
+ },
|
|
|
// 新增故障 一级( 没有售后对象 )
|
|
// 新增故障 一级( 没有售后对象 )
|
|
|
addFaults() {
|
|
addFaults() {
|
|
|
this.form.faultDetailList.push({
|
|
this.form.faultDetailList.push({
|