|
@@ -224,27 +224,32 @@ export default {
|
|
// 客户 change
|
|
// 客户 change
|
|
custChange (obj) {
|
|
custChange (obj) {
|
|
const _this = this
|
|
const _this = this
|
|
- const cust = obj.row
|
|
|
|
- this.form.buyerSn = cust.customerSn
|
|
|
|
- // 编辑
|
|
|
|
- if (this.isEdit) {
|
|
|
|
- this.$confirm({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '更换客户后信息需要重新完善,确认要更换吗?',
|
|
|
|
- centered: true,
|
|
|
|
- onOk () {
|
|
|
|
- _this.custId = cust.id
|
|
|
|
- _this.form.buyerName = cust.customerName
|
|
|
|
- _this.getDetail()
|
|
|
|
- },
|
|
|
|
- onCancel () {
|
|
|
|
- _this.form.buyerSn = _this.buyerSnBak
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ if (obj && obj.key) {
|
|
|
|
+ const cust = obj.row
|
|
|
|
+ this.form.buyerSn = cust.customerSn
|
|
|
|
+ // 编辑
|
|
|
|
+ if (this.isEdit) {
|
|
|
|
+ this.$confirm({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '更换客户后信息需要重新完善,确认要更换吗?',
|
|
|
|
+ centered: true,
|
|
|
|
+ onOk () {
|
|
|
|
+ _this.custId = cust.id
|
|
|
|
+ _this.form.buyerName = cust.customerName
|
|
|
|
+ _this.getDetail()
|
|
|
|
+ },
|
|
|
|
+ onCancel () {
|
|
|
|
+ _this.form.buyerSn = _this.buyerSnBak
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ _this.custId = cust.id
|
|
|
|
+ _this.form.buyerName = cust.customerName
|
|
|
|
+ _this.getDetail()
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- _this.custId = cust.id
|
|
|
|
- _this.form.buyerName = cust.customerName
|
|
|
|
- _this.getDetail()
|
|
|
|
|
|
+ this.$refs.ruleForm.resetFields()
|
|
|
|
+ this.$refs.custList.resetForm()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 编辑客户信息
|
|
// 编辑客户信息
|
|
@@ -349,6 +354,7 @@ export default {
|
|
cancel () {
|
|
cancel () {
|
|
this.opened = false
|
|
this.opened = false
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
|
|
+ this.$refs.custList.resetForm()
|
|
this.$emit('cancel')
|
|
this.$emit('cancel')
|
|
},
|
|
},
|
|
// 获取城市列表
|
|
// 获取城市列表
|