diff --git a/.DS_Store b/.DS_Store index 76bb5ce..452424f 100644 --- a/.DS_Store +++ b/.DS_Store diff --git a/.cursor/.DS_Store b/.cursor/.DS_Store new file mode 100644 index 0000000..686d99a --- /dev/null +++ b/.cursor/.DS_Store diff --git a/.cursor/mcp.json b/.cursor/mcp.json new file mode 100644 index 0000000..3d55742 --- /dev/null +++ b/.cursor/mcp.json @@ -0,0 +1,30 @@ +{ + "mcpServers": { + "my-sql-db": { + "command": "npx", + "args": [ + "--yes", + "@davewind/mysql-mcp-server", + "mysql://devuser:WrdDevMySql!123@rm-bp198425456ln4lu6uo.mysql.rds.aliyuncs.com:3306/antis_net_wurenji" + ] + }, + "my-api-spec": { + "command": "npx", + "args": [ + "--yes", + "@ivotoby/openapi-mcp-server", + "--openapi-spec", + "http://localhost:2011/swagger/Default/swagger.json", + "--api-base-url", + "http://localhost:2011" + ] + }, + "filesystem": { + "command": "npx", + "args": [ + "@modelcontextprotocol/server-filesystem", + "." + ] + } + } +} \ No newline at end of file diff --git a/antis-ncc-admin/.nvmrc b/antis-ncc-admin/.nvmrc new file mode 100644 index 0000000..b6a7d89 --- /dev/null +++ b/antis-ncc-admin/.nvmrc @@ -0,0 +1 @@ +16 diff --git a/antis-ncc-admin/src/views/uavRefundApplication/Form.vue b/antis-ncc-admin/src/views/uavRefundApplication/Form.vue index 2299ea2..fa9fa75 100644 --- a/antis-ncc-admin/src/views/uavRefundApplication/Form.vue +++ b/antis-ncc-admin/src/views/uavRefundApplication/Form.vue @@ -1,59 +1,178 @@  @@ -67,6 +186,7 @@ export default { data() { return { loading: false, + submitLoading: false, visible: false, isDetail: false, dataForm: { @@ -76,6 +196,20 @@ export default { applyAmount: undefined, userId: undefined, userPhone: undefined, + refundReason: '', + remark: '', + refundStatus: 0, + handleTime: undefined, + handleUser: '', + handleResult: '' + }, + handleForm: { + handleResult: '' + }, + handleRules: { + handleResult: [ + { required: true, message: '请填写处理结果', trigger: 'blur' } + ] }, rules: { }, @@ -95,63 +229,293 @@ export default { this.dataForm.id = id || 0; this.visible = true; this.isDetail = isDetail || false; + this.loading = true; this.$nextTick(() => { - this.$refs['elForm'].resetFields(); if (this.dataForm.id) { request({ url: '/api/Extend/UavRefundApplication/' + this.dataForm.id, method: 'get' }).then(res => { this.dataForm = res.data; + this.handleForm.handleResult = res.data.handleResult || ''; + this.loading = false; + }).catch(() => { + this.loading = false; }) + } else { + this.loading = false; } }) }, + formatDateTime(dateTime) { + if (!dateTime) return '-' + const date = new Date(dateTime) + return date.toLocaleString('zh-CN', { + year: 'numeric', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit', + second: '2-digit' + }) + }, RejectRefund() { - request({ - url: `/api/Extend/UavRefundApplication/RejectRefund`, - method: 'post', - data: this.dataForm, - }).then((res) => { - this.$message({ - message: res.msg, - type: 'success', - duration: 1000, - onClose: () => { - this.visible = false, - this.$emit('refresh', true) - } - }) + this.$refs['handleForm'].validate((valid) => { + if (valid) { + this.$confirm('确认拒绝此退款申请吗?', '提示', { + type: 'warning' + }).then(() => { + this.submitLoading = true; + const submitData = { + ...this.dataForm, + handleResult: this.handleForm.handleResult + }; + request({ + url: `/api/Extend/UavRefundApplication/RejectRefund`, + method: 'post', + data: submitData, + }).then((res) => { + this.$message({ + message: res.msg, + type: 'success', + duration: 1000, + onClose: () => { + this.visible = false; + this.$emit('refresh', true); + } + }) + }).catch(() => { + this.submitLoading = false; + }) + }) + } }) }, dataFormSubmit() { - //提示是否确认退款 - this.$confirm('是否确认退款, 是否继续?', '提示', { - type: 'warning' - }).then(() => { - request({ - url: `/api/Extend/AliPay/RefundPay`, - method: 'post', - data: { - OutOrderNo: this.dataForm.orderNo, - } - }).then((res) => { - this.$message({ - message: res.data, - type: 'success', - duration: 1000, - onClose: () => { - this.visible = false, - this.$emit('refresh', true) - } + this.$refs['handleForm'].validate((valid) => { + if (valid) { + this.$confirm('确认同意此退款申请并执行退款吗?', '提示', { + type: 'warning' + }).then(() => { + this.submitLoading = true; + request({ + url: `/api/Extend/AliPay/RefundPay`, + method: 'post', + data: { + OutOrderNo: this.dataForm.orderNo, + handleResult: this.handleForm.handleResult + } + }).then((res) => { + this.$message({ + message: res.data, + type: 'success', + duration: 1000, + onClose: () => { + this.visible = false; + this.$emit('refresh', true); + } + }) + }).catch(() => { + this.submitLoading = false; + }) }) - }) + } }) }, } } - diff --git a/antis-ncc-admin/src/views/uavRefundApplication/index.vue b/antis-ncc-admin/src/views/uavRefundApplication/index.vue index 4df2349..3b11e96 100644 --- a/antis-ncc-admin/src/views/uavRefundApplication/index.vue +++ b/antis-ncc-admin/src/views/uavRefundApplication/index.vue @@ -1,64 +1,100 @@