Commit bde8cb2b by duanguohui

3.0

parent f337c52a
......@@ -37,9 +37,9 @@
</el-col>
<el-col :span="15">
<el-form-item label="类型:" :rules="{required: true}">
<el-radio v-model="addForm.type" label="1">面点</el-radio>
<el-radio v-model="addForm.type" label="2">热炒</el-radio>
<el-radio v-model="addForm.type" label="3">冷菜</el-radio>
<el-radio v-model="addForm.type" label="面点">面点</el-radio>
<el-radio v-model="addForm.type" label="热炒">热炒</el-radio>
<el-radio v-model="addForm.type" label="冷菜">冷菜</el-radio>
</el-form-item>
</el-col>
<el-col :span="15">
......@@ -118,6 +118,7 @@ export default {
saveBtn () {
var param = this.addForm
if (this.$route.params.id) {
delete param.createDate
param.status ? param.status = 'Y' : param.status = 'N'
this.$axios.post('/pccook/update/cook', param).then(()=>{
this.$message.success('修改成功')
......
......@@ -74,13 +74,13 @@
prop="tradeNo"
label="订单号"
align="center"
width="180">
>
</el-table-column>
<el-table-column
prop="userNo"
label="工号"
align="center"
width="240">
>
</el-table-column>
<el-table-column
prop="userName"
......@@ -105,7 +105,7 @@
align="center"
label="状态">
<template slot-scope="scope">
<span>{{renderStatus(scope.row.status)}}</span>
<span>{{renderStatus(scope.row.status, scope.row.type)}}</span>
</template>
</el-table-column>
<el-table-column
......@@ -113,11 +113,19 @@
align="center"
label="下单时间">
</el-table-column>
<!-- <el-table-column
<el-table-column
width="120"
align="center"
label="操作">
<a href="javascript:;" class="btn_delete" style="color: #ff271c" @click="handleOrder">撤单</a>
</el-table-column>-->
<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'">
<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>
</el-table-column>
</el-table>
<div class="pagination_box" v-if="orderListData && orderListData.length">
<el-button icon="el-icon-arrow-left" size="mini" @click="goPage(-1)" v-if="allPage > 1"></el-button>
......@@ -239,6 +247,32 @@ export default {
this.getOrderList()
},
methods: {
orderConfirm (id, e) { // 确认
e.stopPropagation()
this.$axios({
method: 'post',
url: '/pc/trade/update/yqr',
data: {
id: id,
userName: JSON.parse(window.localStorage.getItem('userInfo')).data.userResponse.userName
}
}).then((res) => {
this.getOrderList()
})
},
orderComplete (id, e) { // 完成
e.stopPropagation()
this.$axios({
method: 'post',
url: '/pc/trade/update/ywc',
data: {
id: id,
userName: JSON.parse(window.localStorage.getItem('userInfo')).data.userResponse.userName
}
}).then((res) => {
this.getOrderList()
})
},
save () {
},
......@@ -282,7 +316,7 @@ export default {
},
},
computed: {
renderStatus (status) {
renderStatus (status, type) {
return function (status) {
if (status === 'DQR') {
return '待确认'
......@@ -290,6 +324,8 @@ export default {
return '已取消'
} else if (status === 'YWC') {
return '已完成'
} else if (status === 'YQR') {
return type == "CS" ? '待发货' : '待取餐'
}
}
},
......@@ -315,4 +351,6 @@ export default {
</script>
<style scoped lang="less">
.btn_edit {color: #03a4f1; margin-right: 10px}
.btn_delete {color: #ff271c}
</style>
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