From c418e8daecbc7e0a2592aae6eb1f3cef56f24750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E4=BA=9A=E7=94=B7?= Date: Fri, 17 Sep 2021 17:10:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E6=8E=A5=E5=8F=A3=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mailManagement/BillMail.vue | 4 ++-- src/views/mailManagement/modules/MailModal.vue | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/views/mailManagement/BillMail.vue b/src/views/mailManagement/BillMail.vue index f7e8802..cf177bb 100644 --- a/src/views/mailManagement/BillMail.vue +++ b/src/views/mailManagement/BillMail.vue @@ -207,12 +207,12 @@ export default { window.open(`https://www.kuaidi100.com/chaxun?com=${com}&nu=${record.postNo}`) }, handleAdd: function (id) { - this.$refs.modalForm.add(id) + this.$refs.modalForm.add(id, 1) this.$refs.modalForm.title = '邮寄' this.$refs.modalForm.disableSubmit = false }, handleEdit: function (record) { - this.$refs.modalForm.edit(record) + this.$refs.modalForm.edit(record, 0) console.log(record) this.$refs.modalForm.title = '修改' this.$refs.modalForm.disableSubmit = false diff --git a/src/views/mailManagement/modules/MailModal.vue b/src/views/mailManagement/modules/MailModal.vue index 2377b5b..d805c71 100644 --- a/src/views/mailManagement/modules/MailModal.vue +++ b/src/views/mailManagement/modules/MailModal.vue @@ -102,17 +102,19 @@ export default { validateTrigger: 'blur' }, }, + addData: '', url: { add: 'mail/payMailBill/edit', - edit: 'mail/payMailBill/edit2' + edit: 'mail/payMailBill/editTwo' } } }, methods: { - add(id) { - this.edit({id}) + add(id,add) { + this.edit({id}, add) }, - edit(record) { + edit(record, add) { + this.addData = add this.form.resetFields() this.model = Object.assign({}, record) this.visible = true @@ -135,7 +137,7 @@ export default { that.confirmLoading = true let httpurl = '' let method = '' - if (!this.model.id) { + if (this.addData) { httpurl += this.url.add method = 'post' } else {