diff --git a/project/fengdu/app/AppIntegratingOrder/AppIntegratingOrder.vue b/project/fengdu/app/AppIntegratingOrder/AppIntegratingOrder.vue index 8fbeebfa..081eb3b5 100644 --- a/project/fengdu/app/AppIntegratingOrder/AppIntegratingOrder.vue +++ b/project/fengdu/app/AppIntegratingOrder/AppIntegratingOrder.vue @@ -1,7 +1,7 @@ @@ -38,14 +81,26 @@ props: { instance: Function, dict: Object, - params: Object, - moduleId: String + params: Object }, data () { return { info: {}, - id: '' + isShow: false, + id: '', + form: { + verificationCode: '' + }, + colConfigs: [ + { prop: 'goodsSerialNumber', label: '商品ID', align: 'left' }, + { slot: 'goods' }, + { prop: 'goodsType', label: '商品类型', align: 'center', format: v => this.dict.getLabel('integralSGType', v) }, + { prop: 'integralPrice', label: '兑换所需积分', align: 'center' }, + { prop: 'payMoney', label: '兑换后补差价金额', align: 'center' }, + { prop: 'quantity', label: '数量', align: 'center' }, + { prop: 'usedIntegral', label: '消耗积分', align: 'center' } + ] } }, @@ -58,29 +113,48 @@ methods: { getInfo (id) { - this.instance.post(`/app/appcontentinfo/queryDetailById?id=${id}`).then(res => { + this.instance.post(`/app/appintegralsupermarketorder/queryDetailById?id=${id}`).then(res => { if (res.code === 0) { - this.info = res.data - this this.info = { - ...res.data, - pictureUrl: res.data.pictureUrl ? [{ - url: res.data.pictureUrl - }] : [], - files: res.data.files.map(v => { - return { - ...v, - postfix: v.postfix.toLowerCase() - } - }) + ...res.data } } }) }, + 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: 'List', + type: 'ResidentList', isRefresh: !!isRefresh }) } diff --git a/project/fengdu/app/AppIntegratingOrder/components/ResidentList.vue b/project/fengdu/app/AppIntegratingOrder/components/ResidentList.vue index 50fe7561..0facea45 100644 --- a/project/fengdu/app/AppIntegratingOrder/components/ResidentList.vue +++ b/project/fengdu/app/AppIntegratingOrder/components/ResidentList.vue @@ -1,21 +1,36 @@