Commit 8ae8ba28 by duanguohui

优化

parent 0936c2e9
......@@ -117,11 +117,7 @@
width="120"
align="center"
label="操作">
<template slot-scope="scope" v-if="scope.row.type == 'CS'">
<a href="javascript:;" v-if="scope.row.status == 'DQR'" @click="orderConfirm(scope.row.id, $event)" class="btn_edit">确认订单</a>
<a href="javascript:;" v-if="scope.row.status == 'YQR'" @click="orderComplete(scope.row.id, $event)" class="btn_delete">完成</a>
</template>
<template slot-scope="scope" v-if="scope.row.type == 'WM'">
<template slot-scope="scope" v-if="scope.row.type == 'CS' || scope.row.type == 'WM'">
<a href="javascript:;" v-if="scope.row.status == 'DQR'" @click="orderConfirm(scope.row.id, $event)" class="btn_edit">确认订单</a>
<a href="javascript:;" v-if="scope.row.status == 'YQR'" @click="orderComplete(scope.row.id, $event)" class="btn_delete">完成</a>
</template>
......@@ -167,7 +163,7 @@
<el-col :sm="8" :offset="1">
<el-form-item label="类型" style="margin-left: 30px">
<el-select v-model="formInline.type">
<el-option label="全部" value=""></el-option>
<!-- <el-option label="全部" value=""></el-option> -->
<el-option label="外卖" value="WM"></el-option>
<el-option label="家政" value="JZ"></el-option>
<el-option label="超市" value="CS"></el-option>
......@@ -199,13 +195,13 @@
>
</el-table-column>
<el-table-column
prop="tradeNo"
prop="titleName"
label="名称"
align="center"
>
</el-table-column>
<el-table-column
prop="userNo"
prop="num"
label="数量"
align="center"
>
......@@ -292,6 +288,15 @@ export default {
url: '/pc/trade/get/list?p=' + this.allPage + '&c=' + this.currentPage,
data: parms
}).then((res) => {
res.data.data.resultList.forEach((item)=>{
if (item.type == 'WM' || item.type == 'CS') {
item.titleName = ''
item.detail.forEach((info)=>{
item.titleName += info.foodName + ','
})
item.titleName = item.titleName.slice(0, item.titleName.length - 1)
}
})
this.orderListData = res.data.data.resultList
this.countPage = res.data.data.countPage
this.page = res.data.data.page
......@@ -312,7 +317,9 @@ export default {
this.getOrderList()
},
statistical () {
this.formInline.type = 'WM'
this.dialogVisible = true
this.getOrderList()
},
},
computed: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment