订单
This commit is contained in:
@@ -6,6 +6,10 @@
|
|||||||
</template>
|
</template>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<ai-card title="基本信息">
|
<ai-card title="基本信息">
|
||||||
|
<template #right>
|
||||||
|
<el-button type="primary" v-if="info.status === '0'" @click="isShow = true">订单核销</el-button>
|
||||||
|
<el-button type="danger" v-if="info.status === '0' || info.status === '1'" @click="cancelOrder">取消订单</el-button>
|
||||||
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<ai-wrapper
|
<ai-wrapper
|
||||||
label-width="120px">
|
label-width="120px">
|
||||||
@@ -32,7 +36,7 @@
|
|||||||
:isShowPagination="false"
|
:isShowPagination="false"
|
||||||
:tableData="[info]"
|
:tableData="[info]"
|
||||||
:col-configs="colConfigs"
|
:col-configs="colConfigs"
|
||||||
@getList="getList">
|
@getList="() => {}">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="商品"
|
label="商品"
|
||||||
slot="goods"
|
slot="goods"
|
||||||
@@ -53,6 +57,19 @@
|
|||||||
</ai-table>
|
</ai-table>
|
||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
|
<ai-dialog
|
||||||
|
title="订单核销"
|
||||||
|
:visible.sync="isShow"
|
||||||
|
:destroyOnClose="true"
|
||||||
|
width="650px"
|
||||||
|
@onConfirm="onConfirm"
|
||||||
|
@close="form.verificationCode = '', id = ''">
|
||||||
|
<el-form style="height: 200px" class="ai-form" ref="form" :model="form" label-width="120px">
|
||||||
|
<el-form-item label="核销码" style="width: 100%" prop="verificationCode" :rules="[{required: true, message: '请输入核销码', trigger: 'blur'}]">
|
||||||
|
<el-input v-model="form.verificationCode" placeholder="请输入核销码" size="small"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</ai-dialog>
|
||||||
</template>
|
</template>
|
||||||
</ai-detail>
|
</ai-detail>
|
||||||
</template>
|
</template>
|
||||||
@@ -70,7 +87,11 @@
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
info: {},
|
info: {},
|
||||||
|
isShow: false,
|
||||||
id: '',
|
id: '',
|
||||||
|
form: {
|
||||||
|
verificationCode: ''
|
||||||
|
},
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
{ prop: 'goodsSerialNumber', label: '商品ID', align: 'left' },
|
{ prop: 'goodsSerialNumber', label: '商品ID', align: 'left' },
|
||||||
{ slot: 'goods' },
|
{ 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) {
|
cancel (isRefresh) {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'GirdList',
|
type: 'GirdList',
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
label="商品"
|
label="商品"
|
||||||
slot="goods"
|
slot="goods"
|
||||||
align="left"
|
align="left"
|
||||||
width="450">
|
width="350">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<div class="goods">
|
<div class="goods">
|
||||||
<ai-uploader
|
<ai-uploader
|
||||||
@@ -74,12 +74,25 @@
|
|||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<div class="table-options">
|
<div class="table-options">
|
||||||
<el-button type="text" title="取消订单" v-if="row.status === '0' || row.status === '1'" @click="cancel(row.id)">取消订单</el-button>
|
<el-button type="text" title="取消订单" v-if="row.status === '0' || row.status === '1'" @click="cancel(row.id)">取消订单</el-button>
|
||||||
<el-button type="text" title="订单核销" v-if="row.status === '0'" @click="remove(row.id)">订单核销</el-button>
|
<el-button type="text" title="订单核销" v-if="row.status === '0'" @click="id = row.id, isShow = true">订单核销</el-button>
|
||||||
<el-button type="text" title="详情" @click="toDetail(row.id)">详情</el-button>
|
<el-button type="text" title="详情" @click="toDetail(row.id)">详情</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</ai-table>
|
</ai-table>
|
||||||
|
<ai-dialog
|
||||||
|
title="订单核销"
|
||||||
|
:visible.sync="isShow"
|
||||||
|
:destroyOnClose="true"
|
||||||
|
width="650px"
|
||||||
|
@onConfirm="onConfirm"
|
||||||
|
@close="form.verificationCode = '', id = ''">
|
||||||
|
<el-form style="height: 200px" class="ai-form" ref="form" :model="form" label-width="120px">
|
||||||
|
<el-form-item label="核销码" style="width: 100%" prop="verificationCode" :rules="[{required: true, message: '请输入核销码', trigger: 'blur'}]">
|
||||||
|
<el-input v-model="form.verificationCode" placeholder="请输入核销码" size="small"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</ai-dialog>
|
||||||
</template>
|
</template>
|
||||||
</ai-list>
|
</ai-list>
|
||||||
</template>
|
</template>
|
||||||
@@ -106,17 +119,22 @@
|
|||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: ''
|
endTime: ''
|
||||||
},
|
},
|
||||||
|
isShow: false,
|
||||||
|
form: {
|
||||||
|
verificationCode: ''
|
||||||
|
},
|
||||||
|
id: '',
|
||||||
total: 0,
|
total: 0,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
{ prop: 'goodsSerialNumber', label: '商品ID', align: 'left' },
|
{ prop: 'goodsSerialNumber', label: '商品ID', align: 'left' },
|
||||||
{ slot: 'goods', align: 'center' },
|
{ slot: 'goods', align: 'center' },
|
||||||
{ prop: 'type', label: '商品类型', align: 'center', format: v => this.dict.getLabel('integralSGType', v) },
|
{ 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: 'usedIntegral', label: '消耗积分', align: 'center' },
|
||||||
{ prop: 'payMoney', label: '兑换后再付', align: 'center' },
|
{ prop: 'payMoney', label: '兑换后再付', align: 'center' },
|
||||||
{ prop: 'integralUserName', 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) }
|
{ 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) {
|
toDetail (id) {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'GirdDetail',
|
type: 'GirdDetail',
|
||||||
|
|||||||
Reference in New Issue
Block a user