From f571f17447f9971a61af5315410e269706948ac4 Mon Sep 17 00:00:00 2001 From: 15820893422 <1978476055@qq.com> Date: Mon, 8 Apr 2024 17:44:09 +0800 Subject: [PATCH] add --- .env.development | 4 +- src/api/order.js | 4 +- src/views/order/orderRefund/index.vue | 71 +++++++++++++++++++++++++- src/views/product/addProduct/index.vue | 15 +++--- 4 files changed, 82 insertions(+), 12 deletions(-) diff --git a/.env.development b/.env.development index fdce1e0..fb66c88 100644 --- a/.env.development +++ b/.env.development @@ -2,11 +2,11 @@ ENV = 'development' # base api -VUE_APP_BASE_API = 'http://192.168.1.32:8080' +VUE_APP_BASE_API = 'http://192.168.1.199:8080' # VUE_APP_BASE_API = 'https://plus.hwms.shop' # socket 连接地址 -VUE_APP_WS_URL = 'ws://192.168.1.32:8080' +VUE_APP_WS_URL = 'ws://192.168.1.199:8080' # VUE_APP_WS_URL = 'ws://plus.hwms.shop' # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable, diff --git a/src/api/order.js b/src/api/order.js index ad5c070..4d14e40 100644 --- a/src/api/order.js +++ b/src/api/order.js @@ -120,8 +120,8 @@ export function refundorderDeleteApi(id) { /** * @description 退款订单 -- 确认收货 */ -export function confirmReceiptApi(id) { - return request.post(`store/refundorder/refund/${id}`) +export function confirmReceiptApi(id, data) { + return request.post(`store/refundorder/refund/${id}`, data) } /** * @description 获取物流信息 diff --git a/src/views/order/orderRefund/index.vue b/src/views/order/orderRefund/index.vue index 1395eac..3040421 100644 --- a/src/views/order/orderRefund/index.vue +++ b/src/views/order/orderRefund/index.vue @@ -420,19 +420,85 @@ export default { // 确认收货 confirmReceipt(row) { const that = this + let fApi const h = this.$createElement + let data = { + rule: [ + { + type:"radio", + title:"是否确定收货", + field:"status", + value:1, + options:[ + {value:1,label:"同意",disabled:false}, + {value:-1,label:"拒绝",disabled:false}, + ], + control:[ + { + handle(val){ + return val == -1 + }, + rule:[ + { + type:"input", + title:"拒绝原因", + field:"fail_message", + value:"", + // col:{ + // span:12, + // labelWidth:150 + // }, + open: '1', + props: { + type: 'textarea', + rows: 10, + autosize: {minRows: 4, maxRows: 8}, + }, + validate:[ + { required: true, message: '请输入拒绝原因', trigger: 'blur' }, + ], + }, + ] + } + ] + } + ], + config: { + form: { + 'labelWidth':'90px', + 'size': "small" + }, + 'submitBtn':false, + 'resetBtn':false, + } + } this.$msgbox({ title: '是否确认收货?', + customClass:'modal-form', message: h('div', null, [ h('p', null, '退货物流公司:' + row.delivery_type), - h('p', null, '退货快递单号:' + row.delivery_id) + h('p', null, '退货快递单号:' + row.delivery_id), + h('formCreate', { + props: { + rule: data.rule, + option: data.config + }, + on: { + mounted: ($f) => { + fApi = $f + } + } + }) ]), showCancelButton: true, confirmButtonText: '确定', cancelButtonText: '取消', beforeClose: (action, instance, done) => { if (action === 'confirm') { - confirmReceiptApi(row.refund_order_id) + fApi.submit((formData) => { + console.log(formData); + console.log(row.refund_order_id); + confirmReceiptApi(row.refund_order_id,formData) .then(res => { that.$message.success(res.message) done() @@ -441,6 +507,7 @@ export default { .catch(({ res }) => { that.$message.error(res.message) }) + }) } else { done() } diff --git a/src/views/product/addProduct/index.vue b/src/views/product/addProduct/index.vue index 47b0e5f..febcafc 100644 --- a/src/views/product/addProduct/index.vue +++ b/src/views/product/addProduct/index.vue @@ -30,7 +30,7 @@ :key="index" class="virtual" :class=" - formValidate.type == item.id + formValidate.audit_type == item.id ? 'virtual_boder' : 'virtual_boder2' " @@ -38,8 +38,8 @@ >
{{ item.tit }}
({{ item.tit2 }})
-
-
+
+
@@ -2086,6 +2086,7 @@ const defaultObj = { qualification_type: 0, remark: '', is_huimei:1, + audit_type:0, qualification: { production_name: '', businessList: [], @@ -3278,8 +3279,8 @@ export default { if (this.$route.params.id) { return this.$message.warning('商品类型不能切换!') } - this.formValidate.type = id - this.productCon() + this.formValidate.audit_type = id + // this.productCon() }, customMessBtn(e) { if (!e) { @@ -3591,9 +3592,11 @@ export default { ? info.mer_labels.map(Number) : [], type: info.type || 0, + audit_type:info.audit_type, extend: info.extend || [], svip_price_type: info.svip_price_type || 0, - qualification:info.qualification + qualification:info.qualification, + is_huimei:info.is_huimei }; console.log(info.qualification); if (info.svip_price_type != 0 && info.mer_svip_status)