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 @@ - + @@ -43,6 +43,10 @@ computed: { ...mapState(['user']), + hideLevel () { + return this.user.info.areaList?.length || 0 + }, + tabs () { const tabList = [ {label: '网格积分订单', name: 'GirdList', comp: GirdList, permission: ''}, @@ -73,7 +77,7 @@ methods: { onAreaChange () { - if (this.currIndex === '0') { + if (this.currIndex === '1') { this.$nextTick(() => { this.$refs[this.currIndex][0].getList() }) diff --git a/project/fengdu/app/AppIntegratingOrder/components/GirdList.vue b/project/fengdu/app/AppIntegratingOrder/components/GirdList.vue index e0ddf59f..d1124479 100644 --- a/project/fengdu/app/AppIntegratingOrder/components/GirdList.vue +++ b/project/fengdu/app/AppIntegratingOrder/components/GirdList.vue @@ -104,8 +104,7 @@ props: { instance: Function, dict: Object, - permissions: Function, - areaId: String, + permissions: Function }, data() { @@ -153,7 +152,8 @@ getList () { this.instance.post(`/app/appintegralsupermarketorder/list`, null, { params: { - ...this.search + ...this.search, + type: 0 } }).then((res) => { if (res.code == 0) { diff --git a/project/fengdu/app/AppIntegratingOrder/components/ResidentDetail.vue b/project/fengdu/app/AppIntegratingOrder/components/ResidentDetail.vue index ffdace85..4f256e3f 100644 --- a/project/fengdu/app/AppIntegratingOrder/components/ResidentDetail.vue +++ b/project/fengdu/app/AppIntegratingOrder/components/ResidentDetail.vue @@ -6,27 +6,70 @@ + + 订单核销 + 取消订单 + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + {}"> + + + + + + {{ row.goodsTitle }} + + + + + + + + + + + + + @@ -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 @@ - + + placeholder="请选择商品类型" + :selectList="dict.getDict('integralSGType')"> + placeholder="请选择订单状态" + :selectList="dict.getDict('integralSGOStatus')"> - 添加 + + + + @@ -38,26 +53,46 @@ :current.sync="search.current" :size.sync="search.size" @getList="getList"> - + - {{ row.serviceType === '1' ? row.visibleNames || '-' : '-' }} + + + + {{ row.goodsTitle }} + - - - {{ row.serviceType === '0' ? row.visibleNames || '-' : '-' }} - - - + - 编辑 - {{ row.status === '0' ? '上架' : '下架' }} - 删除 + 取消订单 + 订单核销 + 详情 + + + + + + + @@ -80,19 +115,27 @@ title: '', current: 1, status: '', - size: 10 + size: 10, + startTime: '', + endTime: '' }, + isShow: false, + form: { + verificationCode: '' + }, + id: '', total: 0, tableData: [], - shopList: [], colConfigs: [ - { prop: 'serialNumber', label: '店铺ID', align: 'left' }, - { prop: 'title', label: '店铺名称', align: 'center' }, - { prop: 'type', label: '店铺类型', align: 'center', format: v => this.dict.getLabel('integralSSType', v) }, - { slot: 'grid', label: '网格店铺服务网格', align: 'center' }, - { slot: 'area', label: '居民店铺服务地区', align: 'center' }, - { prop: 'goodsCount', label: '店铺商品数', align: 'center' }, - { prop: 'status', label: '状态', align: 'center', format: v => this.dict.getLabel('integralSSStatus', v) } + { 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: 'usedIntegral', label: '消耗积分', align: 'center' }, + { prop: 'payMoney', label: '兑换后再付', align: 'center' }, + { prop: 'integralUserName', label: '兑换人', align: 'center' }, + { prop: 'createTime', width: 150, label: '创建时间', align: 'center' }, + { prop: 'status', label: '状态', align: 'center', format: v => this.dict.getLabel('integralSGOStatus', v) } ] } }, @@ -101,17 +144,18 @@ }, created () { - this.dict.load('integralSSType', 'integralSSStatus', 'integralSSSType').then(() => { + this.dict.load('integralSGType', 'integralSGOStatus').then(() => { this.getList() }) }, methods: { getList () { - this.instance.post(`/app/appintegralsupermarketshop/list`, null, { + this.instance.post(`/app/appintegralsupermarketorder/list`, null, { params: { ...this.search, - areaId: this.areaId, + type: 1, + areaId: this.areaId } }).then((res) => { if (res.code == 0) { @@ -121,31 +165,39 @@ }) }, - toAdd (id) { - this.$emit('change', { - type: 'AddStore', - params: { - id: id || '' + 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('核销成功') + } + }) } }) }, - remove (id) { - this.$confirm('确定删除该商品吗?').then(() => { - this.instance.post(`/app/appintegralsupermarketgoods/delete?id=${id}`).then(res => { - if (res.code == 0) { - this.$message.success('删除成功!') - this.getList() - } - }) + toDetail (id) { + this.$emit('change', { + type: 'ResidentDetail', + params: { + id + } }) }, - changeStatus (row) { - this.$confirm(`确定${row.status === '0' ? '上架' : '下架'}该商品?`).then(() => { - this.instance.post(`/app/appintegralsupermarketgoods/online?id=${id}`).then(res => { + cancel (id) { + this.$confirm('确定取消该订单吗?').then(() => { + this.instance.post(`/app/appintegralsupermarketorder/cancel?id=${id}`).then(res => { if (res.code == 0) { - this.$message.success(`${row.status === '0' ? '上架' : '下架'}成功`) + this.$message.success('取消成功!') this.getList() } }) @@ -156,6 +208,10 @@
{{ row.goodsTitle }}