BUG 29744
This commit is contained in:
		| @@ -195,14 +195,13 @@ | ||||
|               fixed="right"> | ||||
|             <template v-slot="{ row }"> | ||||
|               <div class="table-options"> | ||||
|                 <el-button | ||||
|                     v-if="row.orderCode" | ||||
|                     type="text" | ||||
|                     @click="goDetail(row)" | ||||
|                     title="详情" | ||||
|                     :disabled="!$permissions('app_appvillagerintegralshoporder_detail')"> | ||||
|                   详情 | ||||
|                 <el-button v-if="row.orderCode" type="text" @click="goDetail(row)" title="详情" | ||||
|                            :disabled="!$permissions('app_appvillagerintegralshoporder_detail')">详情 | ||||
|                 </el-button> | ||||
|                 <template v-if="row.orderStatus==0"> | ||||
|                   <el-button type="text" @click="handlePendingOrder(row.id,1)">确认兑换</el-button> | ||||
|                   <el-button type="text" @click="handlePendingOrder(row.id,0)">取消订单</el-button> | ||||
|                 </template> | ||||
|               </div> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
| @@ -325,14 +324,26 @@ export default { | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if (res.code == 0) { | ||||
|           this.$message.success(`批量${val == 1 ? '完成' : '取消'}成功`) | ||||
|           this.$message.success(`批量${val == 1 ? '兑换' : '取消'}成功`) | ||||
|           this.getList() | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     handlePendingOrder(ids, status) { | ||||
|       let text = status == 1 ? "确认兑换" : "取消订单" | ||||
|       this.$confirm(`是否${text}?`).then(() => { | ||||
|         this.instance.post(`/app/appvillagerintegralshoporder/changeOrderStatus`, null, { | ||||
|           params: {ids, status} | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.$message.success(`${text}成功`) | ||||
|             this.getList() | ||||
|           } | ||||
|         }) | ||||
|       }).catch(() => 0) | ||||
|     }, | ||||
|     getList() { | ||||
|       this.instance | ||||
|       .post(`/app/appvillagerintegralshoporder/list`, null, { | ||||
|       this.instance.post(`/app/appvillagerintegralshoporder/list`, null, { | ||||
|         params: { | ||||
|           ...this.searchObj, | ||||
|           ...this.page, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user