diff --git a/project/fengdu/app/AppIntegratingOrder/components/GirdDetail.vue b/project/fengdu/app/AppIntegratingOrder/components/GirdDetail.vue index e3a89d94..bc83278e 100644 --- a/project/fengdu/app/AppIntegratingOrder/components/GirdDetail.vue +++ b/project/fengdu/app/AppIntegratingOrder/components/GirdDetail.vue @@ -6,6 +6,10 @@ @@ -70,7 +87,11 @@ data () { return { info: {}, + isShow: false, id: '', + form: { + verificationCode: '' + }, colConfigs: [ { prop: 'goodsSerialNumber', label: '商品ID', align: 'left' }, { slot: 'goods' }, @@ -101,6 +122,36 @@ }) }, + cancelOrder () { + this.$confirm('确定取消该订单吗?').then(() => { + this.instance.post(`/app/appintegralsupermarketorder/cancel?id=${this.params.id}`).then(res => { + if (res.code == 0) { + this.$message.success('取消成功!') + this.getInfo(this.params.id) + } + }) + }) + }, + + onConfirm () { + this.$refs.form.validate((valid)=> { + if(valid) { + this.instance.post(`/app/appintegralsupermarketorder/examine`, null, { + params: { + ...this.form, + id: this.params.id + } + }).then(res => { + if(res.code == 0) { + this.isShow = false + this.getInfo(this.params.id) + this.$message.success('核销成功') + } + }) + } + }) + }, + cancel (isRefresh) { this.$emit('change', { type: 'GirdList', diff --git a/project/fengdu/app/AppIntegratingOrder/components/GirdList.vue b/project/fengdu/app/AppIntegratingOrder/components/GirdList.vue index c5cf369b..e0ddf59f 100644 --- a/project/fengdu/app/AppIntegratingOrder/components/GirdList.vue +++ b/project/fengdu/app/AppIntegratingOrder/components/GirdList.vue @@ -57,7 +57,7 @@ label="商品" slot="goods" align="left" - width="450"> + width="350"> + + + + + + + @@ -106,17 +119,22 @@ startTime: '', endTime: '' }, + isShow: false, + form: { + verificationCode: '' + }, + id: '', total: 0, tableData: [], colConfigs: [ { prop: 'goodsSerialNumber', label: '商品ID', align: 'left' }, { slot: 'goods', align: 'center' }, { prop: 'type', label: '商品类型', align: 'center', format: v => this.dict.getLabel('integralSGType', v) }, - { prop: 'quantity', label: '数量', align: 'center', format: v => `X${v}` }, + { prop: 'quantity', label: '数量', align: 'center', format: v => `x${v}` }, { prop: 'usedIntegral', label: '消耗积分', align: 'center' }, { prop: 'payMoney', label: '兑换后再付', align: 'center' }, { prop: 'integralUserName', label: '兑换人', align: 'center' }, - { prop: 'createTime', label: '创建时间', align: 'center' }, + { prop: 'createTime', width: 150, label: '创建时间', align: 'center' }, { prop: 'status', label: '状态', align: 'center', format: v => this.dict.getLabel('integralSGOStatus', v) } ] } @@ -145,6 +163,25 @@ }) }, + onConfirm () { + this.$refs.form.validate((valid)=> { + if(valid) { + this.instance.post(`/app/appintegralsupermarketorder/examine`, null, { + params: { + ...this.form, + id: this.id + } + }).then(res => { + if(res.code == 0) { + this.isShow = false + this.getList() + this.$message.success('核销成功') + } + }) + } + }) + }, + toDetail (id) { this.$emit('change', { type: 'GirdDetail',