|
@@ -77,7 +77,7 @@ export default {
|
|
|
bankAccount: '',
|
|
|
bankAccountName: '',
|
|
|
bankAddr: '',
|
|
|
- companyName: '',
|
|
|
+ companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
|
|
|
companyWechatId: '',
|
|
|
depositBank: '',
|
|
|
idcard: '',
|
|
@@ -101,6 +101,7 @@ export default {
|
|
|
[
|
|
|
this.optionsEvensAuth('add', {
|
|
|
click: () => {
|
|
|
+ this.close()
|
|
|
this.$refs.tabPage.addTab({
|
|
|
// 对应显示的模块
|
|
|
activeKey: 'add',
|
|
@@ -178,7 +179,7 @@ export default {
|
|
|
formItemAttributes: {
|
|
|
label: '联系电话',
|
|
|
prop: 'mobile',
|
|
|
- rules: [...required]
|
|
|
+ rules: [...mobileRequired]
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -269,7 +270,24 @@ export default {
|
|
|
operation() {
|
|
|
return this.operationBtn({
|
|
|
edit: {
|
|
|
- click: ({ row, index, column }) => {}
|
|
|
+ click: ({ row, index, column }) => {
|
|
|
+ this.close()
|
|
|
+ dailyBankDetail({ id: row.id }).then(res => {
|
|
|
+ this.formData = res.data
|
|
|
+ this.$refs.tabPage.addTab({
|
|
|
+ // 对应显示的模块
|
|
|
+ activeKey: 'edit',
|
|
|
+ // 唯一标识
|
|
|
+ key: 'edit',
|
|
|
+ // 页签名称
|
|
|
+ label: '编辑',
|
|
|
+ // 打开时事件
|
|
|
+ triggerEvent: () => {},
|
|
|
+ // 关闭时事件
|
|
|
+ closeEvent: () => {}
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
del: {
|
|
|
prompt: '确定删除吗?',
|
|
@@ -286,7 +304,20 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
formConfirm(removeTab) {
|
|
|
- removeTab()
|
|
|
+ this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
|
|
|
+ if (valid) {
|
|
|
+ ;(this.formData.id ? dailyBankUpdate : dailyBankAdd)({
|
|
|
+ ...this.formData
|
|
|
+ }).then(res => {
|
|
|
+ this.$message({ type: 'success', message: `设置成功!` })
|
|
|
+ this.$refs?.pageRef?.refreshList()
|
|
|
+ removeTab()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ close() {
|
|
|
+ this.$data.formData = this.$options.data().formData
|
|
|
}
|
|
|
}
|
|
|
}
|