|
|
@@ -56,9 +56,10 @@
|
|
|
<div class="ordered-panel" v-loading="orderLoading">
|
|
|
<div class="ordered-title">
|
|
|
<span>已点菜</span>
|
|
|
- <!-- <span class="ordered-count">{{ orderedList.length }} 项</span> -->
|
|
|
- <el-button v-if="hasCurrentOrder" type="danger" plain :loading="submitting"
|
|
|
- @click="confirmCancelOrder()">取消订单</el-button>
|
|
|
+ <div v-if="hasCurrentOrder" class="ordered-title-actions">
|
|
|
+ <el-button type="primary" plain @click="viewCurrentOrder()">订单详情</el-button>
|
|
|
+ <el-button type="danger" plain :loading="submitting" @click="confirmCancelOrder()">取消订单</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<div v-if="orderedList.length === 0" class="ordered-empty">
|
|
|
@@ -171,6 +172,7 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <DishOrderInfoDialog ref="dishOrderInfoDialog"></DishOrderInfoDialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -178,8 +180,12 @@
|
|
|
import DishRoomService from '@/api/psi/DishRoomService'
|
|
|
import DishOrderService from '@/api/psi/DishOrderService'
|
|
|
import OSSSerivce from '@/api/sys/OSSService'
|
|
|
+import DishOrderInfoDialog from './DishOrderInfoDialog'
|
|
|
import Sortable from 'sortablejs'
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ DishOrderInfoDialog
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
currentRoom: {},
|
|
|
@@ -432,6 +438,13 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ viewCurrentOrder() {
|
|
|
+ if (!this.hasCurrentOrder) {
|
|
|
+ this.$message.warning('暂无订单详情')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$refs.dishOrderInfoDialog.init(this.currentOrder.id)
|
|
|
+ },
|
|
|
submitOrder(settleFlag, settleInfo = {}, requireChanged = false) {
|
|
|
const changedList = this.changedDetailList
|
|
|
const detailList = settleFlag === '1' && changedList.length === 0 ? [] : this.submitDetailList
|
|
|
@@ -749,6 +762,16 @@ export default {
|
|
|
border-bottom: 1px solid #ebeef5;
|
|
|
}
|
|
|
|
|
|
+.ordered-title-actions {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 8px;
|
|
|
+}
|
|
|
+
|
|
|
+.ordered-title-actions .el-button + .el-button {
|
|
|
+ margin-left: 0;
|
|
|
+}
|
|
|
+
|
|
|
.ordered-count {
|
|
|
font-size: 12px;
|
|
|
font-weight: 400;
|