|
|
|
@ -188,25 +188,9 @@ export default { |
|
|
|
// 初始化 |
|
|
|
this.formData.set('doctor_id', this.$route.query.doctor_id) |
|
|
|
this.formData.set('depart_id', this.$route.query.depart_id) |
|
|
|
this.getPayment(); |
|
|
|
console.log('apiclient_cert' in this.payInfo,'apiclient_key'); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getPayment() { |
|
|
|
// 初始化数据、证书文件列表??? |
|
|
|
|
|
|
|
// this.$http('POST', '/agentnew/ajax_get_payinfo', { |
|
|
|
// doctor_id : this.doctor_id, |
|
|
|
// depart_id : this.depart_id |
|
|
|
// }).then(response => { |
|
|
|
// this.$nextTick(() => { |
|
|
|
// this.payinfo = response.data |
|
|
|
// this.formData1 = response.data |
|
|
|
// }) |
|
|
|
// }).catch(error => { |
|
|
|
// console.error(error, 'error') |
|
|
|
// }) |
|
|
|
}, |
|
|
|
handRemove() { |
|
|
|
this.formData.delete('apiclient_cert'); |
|
|
|
this.payInfo.delete('apiclient_cert'); |
|
|
|
@ -259,53 +243,53 @@ export default { |
|
|
|
// console.log('键 (Key):', key); |
|
|
|
// console.log('值 (Value):', value); |
|
|
|
// } |
|
|
|
// if(!this.formData.has('apiclient_key') ){ |
|
|
|
// this.noFileFlag1 = true; |
|
|
|
// if( !this.formData.has('apiclient_cert')){ |
|
|
|
// this.noFileFlag = true; |
|
|
|
// this.$positionMessage({ |
|
|
|
// type: 'error', |
|
|
|
// message: '请先上传证书', |
|
|
|
// target: this.$refs['saveRef'], // 可以是DOM元素或选择器 |
|
|
|
// position: 'top' |
|
|
|
// }) |
|
|
|
// return false; |
|
|
|
// } |
|
|
|
// this.$positionMessage({ |
|
|
|
// type: 'error', |
|
|
|
// message: '请先上传证书', |
|
|
|
// target: this.$refs['saveRef'], // 可以是DOM元素或选择器 |
|
|
|
// position: 'top' |
|
|
|
// }) |
|
|
|
// return false; |
|
|
|
// } |
|
|
|
if(!this.formData.has('apiclient_key') ){ |
|
|
|
this.noFileFlag1 = true; |
|
|
|
if( !this.formData.has('apiclient_cert')){ |
|
|
|
this.noFileFlag = true; |
|
|
|
this.$positionMessage({ |
|
|
|
type: 'error', |
|
|
|
message: '请先上传证书', |
|
|
|
target: this.$refs['saveRef'], // 可以是DOM元素或选择器 |
|
|
|
position: 'top' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.$positionMessage({ |
|
|
|
type: 'error', |
|
|
|
message: '请先上传证书', |
|
|
|
target: this.$refs['saveRef'], // 可以是DOM元素或选择器 |
|
|
|
position: 'top' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
this.$refs.wxform.validate((valid) => { |
|
|
|
console.log(valid, 'valid'); |
|
|
|
// if (valid) { |
|
|
|
// for (let key in this.formData1) { |
|
|
|
// this.formData.set(key, this.formData1[key]) |
|
|
|
// } |
|
|
|
// this.formData.set('doctor_id', this.$route.query.doctor_id) |
|
|
|
// this.formData.set('depart_id', this.$route.query.depart_id) |
|
|
|
// this.formData.set('type',this.payTypeWeixin)//这个参数 待定 2 微信支付 \ 3 支付宝 |
|
|
|
// this.formData.set('is_pay_public','0') |
|
|
|
// const that = this; |
|
|
|
// this.$http('POST', '/api/admin/set_pay_method', this.formData).then(response => { |
|
|
|
// if(response.code == 0){ |
|
|
|
// that.$message.success('保存成功'); |
|
|
|
// // that.payList = response.data.paylist |
|
|
|
// // that.$emit('saveEvent', that.payList) |
|
|
|
// this.$router.go(-1); |
|
|
|
// return true; |
|
|
|
// } |
|
|
|
// that.$message.error(response.msg); |
|
|
|
// }).catch(error => { |
|
|
|
// console.error(error, 'error') |
|
|
|
// }) |
|
|
|
// } else { |
|
|
|
// return false; |
|
|
|
// } |
|
|
|
if (valid) { |
|
|
|
for (let key in this.formData1) { |
|
|
|
this.formData.set(key, this.formData1[key]) |
|
|
|
} |
|
|
|
this.formData.set('doctor_id', this.$route.query.doctor_id) |
|
|
|
this.formData.set('depart_id', this.$route.query.depart_id) |
|
|
|
this.formData.set('type',this.payTypeWeixin)//这个参数 待定 2 微信支付 \ 3 支付宝 |
|
|
|
this.formData.set('is_pay_public','0') |
|
|
|
const that = this; |
|
|
|
this.$http('POST', '/api/admin/set_pay_method', this.formData).then(response => { |
|
|
|
if(response.code == 0){ |
|
|
|
that.$message.success('保存成功'); |
|
|
|
// that.payList = response.data.paylist |
|
|
|
// that.$emit('saveEvent', that.payList) |
|
|
|
this.$router.go(-1); |
|
|
|
return true; |
|
|
|
} |
|
|
|
that.$message.error(response.msg); |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
} else { |
|
|
|
return false; |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|
|