|
@@ -49,6 +49,21 @@
|
|
|
<div style="margin-top: 50px">
|
|
|
<trade-card title="基础信息">
|
|
|
<avue-form :option="optionForm" v-model="form" ref="form">
|
|
|
+ <tempalte slot="customerName" slot-scope="{ row }">
|
|
|
+ <search-query :datalist="customerData"
|
|
|
+ :selectValue="form.customerName"
|
|
|
+ :clearable="true"
|
|
|
+ :buttonIf="false"
|
|
|
+ :filterable="true"
|
|
|
+ :remote="true"
|
|
|
+ :disabled="findObject(optionForm.column, 'customerName').disabled"
|
|
|
+ placeholder="请选择客户"
|
|
|
+ :forParameter="{key:'id',label:'cname',value:'cname'}"
|
|
|
+ @corpFocus="KHgetListfun"
|
|
|
+ @remoteMethod="KHgetListfun"
|
|
|
+ @corpChange="KHcorpChange">
|
|
|
+ </search-query>
|
|
|
+ </tempalte>
|
|
|
<template slot-scope="{row,index}" slot="contacts">
|
|
|
<el-select v-model="form.contacts" placeholder="请选择" size="small"
|
|
|
style="width:60%" clearable filterable allow-create default-first-option
|
|
@@ -297,6 +312,10 @@ import { number } from "echarts";
|
|
|
import {getCorpTypes} from "@/api/tirePartsMall/basicData/commodityInformation";
|
|
|
import {getWorkDicts} from "../../../../api/system/dictbiz";
|
|
|
import losbfeestemplate from "@/views/iosBasicData/losbfeestemplate/index.vue";
|
|
|
+import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
|
|
|
+import {
|
|
|
+ getList as KHgetList
|
|
|
+} from "@/api/tirePartsMall/basicData/customerInformation";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
|
|
@@ -391,65 +410,80 @@ export default {
|
|
|
paymentRecordsList: [],
|
|
|
outboundRecordsList: []
|
|
|
},
|
|
|
+ customerData:[], // 客户数据
|
|
|
optionForm: {
|
|
|
menuBtn: false,
|
|
|
span: 8,
|
|
|
disabled: false,
|
|
|
column: [{
|
|
|
- label: '客户',
|
|
|
- prop: "customerId",
|
|
|
+ label: '客户1',
|
|
|
+ prop: "customerName",
|
|
|
disabled: false,
|
|
|
- remote: true,
|
|
|
- type: 'select',
|
|
|
- props: {
|
|
|
- label: 'cname',
|
|
|
- value: 'id'
|
|
|
- },
|
|
|
- cascader: ['recAddress'],
|
|
|
- click: () => {
|
|
|
- this.$refs.form.dicInit()
|
|
|
- },
|
|
|
- change: (data) => {
|
|
|
- if (!this.onLoad.id) {
|
|
|
- // this.$set(this.optionContactsBack, "addBtn", true)
|
|
|
- // this['optionContacts'] = this['optionContactsBack'];
|
|
|
- // this.delColumnData(this.getColumnName('269.1'), this['optionContactsBack']);
|
|
|
- }
|
|
|
- if (this.$refs.form.DIC.customerId || !this.onLoad.id) {
|
|
|
- getCustom({ id: data.value }).then(res => {
|
|
|
- if (res.data.data) {
|
|
|
- this.dicUrlWithCustomId = res.data.data.id ? res.data.data.id : ''
|
|
|
- // this.form.storageId ? this.form.storageId : res.data.data.deliveryWarehouseId
|
|
|
- // this.form.storageId = res.data.data.deliveryWarehouseId
|
|
|
- this.form.storageId = this.form.storageId ? this.form.storageId : res.data.data.deliveryWarehouseId
|
|
|
- this.form.contacts = res.data.data.corpsAttnList[0].cname
|
|
|
- this.form.phone = res.data.data.corpsAttnList[0].tel
|
|
|
- this.contactsOption = res.data.data.corpsAddrList
|
|
|
- this.form.recAddress = res.data.data.corpsAddrList[0].belongtoarea + res.data.data.corpsAddrList[0].detailedAddress
|
|
|
- this.form.salerId = res.data.data.salesmanId?res.data.data.salesmanId:''
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- // if (this.$refs.form.DIC.customerId || data.value) {
|
|
|
- // for (let item of this.$refs.form.DIC.customerId) {
|
|
|
- // if (item.id == data.value) {
|
|
|
- // console.log(data);
|
|
|
- // console.log(this.$refs.form);
|
|
|
- // console.log(item);
|
|
|
- // // 后端返回数据暂无联系人、地址等数据,无法下拉默认
|
|
|
- // this.form.phone = item.tel
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- },
|
|
|
- dicUrl: '/api/blade-sales-part/corpsDesc/listAll?cname={{key}}&corpType=KH&enableOrNot=1',
|
|
|
+ formslot:true,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: " ",
|
|
|
trigger: "blur"
|
|
|
}]
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: '客户',
|
|
|
+ // prop: "customerId",
|
|
|
+ // disabled: false,
|
|
|
+ // remote: true,
|
|
|
+ // type: 'select',
|
|
|
+ // props: {
|
|
|
+ // label: 'cname',
|
|
|
+ // value: 'id',
|
|
|
+ // res:'data.records'
|
|
|
+ // },
|
|
|
+ // cascader: ['recAddress'],
|
|
|
+ // click: () => {
|
|
|
+ // this.$refs.form.dicInit()
|
|
|
+ // },
|
|
|
+ // change: (data) => {
|
|
|
+ // if (!this.onLoad.id) {
|
|
|
+ // // this.$set(this.optionContactsBack, "addBtn", true)
|
|
|
+ // // this['optionContacts'] = this['optionContactsBack'];
|
|
|
+ // // this.delColumnData(this.getColumnName('269.1'), this['optionContactsBack']);
|
|
|
+ // }
|
|
|
+ // if (this.$refs.form.DIC.customerId || !this.onLoad.id) {
|
|
|
+ // getCustom({ id: data.value }).then(res => {
|
|
|
+ // if (res.data.data) {
|
|
|
+ // this.dicUrlWithCustomId = res.data.data.id ? res.data.data.id : ''
|
|
|
+ // // this.form.storageId ? this.form.storageId : res.data.data.deliveryWarehouseId
|
|
|
+ // // this.form.storageId = res.data.data.deliveryWarehouseId
|
|
|
+ // this.form.storageId = this.form.storageId ? this.form.storageId : res.data.data.deliveryWarehouseId
|
|
|
+ // this.form.contacts = res.data.data.corpsAttnList[0].cname
|
|
|
+ // this.form.phone = res.data.data.corpsAttnList[0].tel
|
|
|
+ // this.contactsOption = res.data.data.corpsAddrList
|
|
|
+ // this.form.recAddress = res.data.data.corpsAddrList[0].belongtoarea + res.data.data.corpsAddrList[0].detailedAddress
|
|
|
+ // this.form.salerId = res.data.data.salesmanId?res.data.data.salesmanId:''
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // // if (this.$refs.form.DIC.customerId || data.value) {
|
|
|
+ // // for (let item of this.$refs.form.DIC.customerId) {
|
|
|
+ // // if (item.id == data.value) {
|
|
|
+ // // console.log(data);
|
|
|
+ // // console.log(this.$refs.form);
|
|
|
+ // // console.log(item);
|
|
|
+ // // // 后端返回数据暂无联系人、地址等数据,无法下拉默认
|
|
|
+ // // this.form.phone = item.tel
|
|
|
+ // // }
|
|
|
+ // // }
|
|
|
+ // // }
|
|
|
+ // },
|
|
|
+ // // dicUrl: '/api/blade-sales-part/corpsDesc/listAll?cname={{key}}&corpType=KH&enableOrNot=1',
|
|
|
+ // dicUrl: '/api/blade-sales-part/corpsDesc/list?cname={{key}}&corpType=KH',
|
|
|
+ // rules: [{
|
|
|
+ // required: true,
|
|
|
+ // message: " ",
|
|
|
+ // trigger: "blur"
|
|
|
+ // }]
|
|
|
+ // },
|
|
|
+ {
|
|
|
label: '业务员',
|
|
|
disabled:false,
|
|
|
prop: "salerId",
|
|
@@ -953,7 +987,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- components: { reportDialog, check, checkSchedule },
|
|
|
+ components: {SearchQuery, reportDialog, check, checkSchedule },
|
|
|
props: {
|
|
|
onLoad: Object,
|
|
|
detailData: Object
|
|
@@ -1210,6 +1244,41 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 客户监听
|
|
|
+ KHcorpChange(value){
|
|
|
+ for (let item of this.customerData) {
|
|
|
+ if (item.cname == value) {
|
|
|
+ this.$set(this.form,'customerId',item.id)
|
|
|
+ this.$set(this.form,'customerName',item.cname)
|
|
|
+
|
|
|
+ if (this.$refs.form.DIC.customerId || !this.onLoad.id) {
|
|
|
+ getCustom({ id: item.id }).then(res => {
|
|
|
+ if (res.data.data) {
|
|
|
+ this.dicUrlWithCustomId = res.data.data.id ? res.data.data.id : ''
|
|
|
+ this.form.storageId = this.form.storageId ? this.form.storageId : res.data.data.deliveryWarehouseId
|
|
|
+ this.form.contacts = res.data.data.corpsAttnList[0].cname
|
|
|
+ this.form.phone = res.data.data.corpsAttnList[0].tel
|
|
|
+ this.contactsOption = res.data.data.corpsAddrList
|
|
|
+ this.form.recAddress = res.data.data.corpsAddrList[0].belongtoarea + res.data.data.corpsAddrList[0].detailedAddress
|
|
|
+ this.form.salerId = res.data.data.salesmanId?res.data.data.salesmanId:''
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取客户数据
|
|
|
+ KHgetListfun(cname){
|
|
|
+ KHgetList({
|
|
|
+ current:1,
|
|
|
+ size:10,
|
|
|
+ corpType:'KH',
|
|
|
+ cname:cname?cname:null,
|
|
|
+ }).then(res=>{
|
|
|
+ this.customerData = res.data.data.records
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取详细明细信息
|
|
|
getDetailsfun(){
|
|
|
getDetails({
|
|
@@ -1542,7 +1611,7 @@ export default {
|
|
|
this.isDisabledTask = false;
|
|
|
this.viewDisabled = false;
|
|
|
this.optionForm.column.forEach(its => {
|
|
|
- if (its.prop == 'customerId') {
|
|
|
+ if (its.prop == 'customerName') {
|
|
|
this.$set(its, 'disabled', true)
|
|
|
}
|
|
|
if (its.prop == 'storageId') {
|