|
|
@@ -25,12 +25,24 @@
|
|
|
<i class="el-icon-success" style="color:green;font-size:18px;"></i>
|
|
|
</span>
|
|
|
</template>
|
|
|
+
|
|
|
+ <template #table-column-printOrder="{scope}">
|
|
|
+ <span v-if="scope.row.printOrder==0" @click="printA4(scope.row)" style="cursor: pointer;">
|
|
|
+ 打印
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ <i class="el-icon-success" style="color:green;font-size:18px;"></i>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
|
|
|
- <template #slot-column-option="{scope}">
|
|
|
+ <template #table-column-addTime="{scope}">
|
|
|
+ <i class="el-icon-remove-outline" style="font-size:15px;cursor: pointer;" @click="changeDate(scope.row,0)"></i>
|
|
|
+ <span style="margin-left:10px;margin-right:10px;">{{ scope.row.addTime }}</span>
|
|
|
+ <i class="el-icon-circle-plus-outline" style="font-size:15px;cursor: pointer;" @click="changeDate(scope.row,1)"></i>
|
|
|
+ </template>
|
|
|
|
|
|
+ <template #slot-column-option="{scope}">
|
|
|
<el-button @click.stop="showDetail(scope.row)" size="small" type="success">详情</el-button>
|
|
|
- <el-button @click.stop="printOrder(scope.row)" size="small" type="primary" style="margin-left:40px;">打A4</el-button>
|
|
|
-
|
|
|
</template>
|
|
|
|
|
|
<template #slot-search-option="{scope}">
|
|
|
@@ -45,7 +57,7 @@
|
|
|
</template>
|
|
|
|
|
|
<template #slot-export-order>
|
|
|
- <el-button type="primary" size="mini" style="margin-left:10px;" @click="exportData()">导出数据</el-button>
|
|
|
+ <el-button type="primary" size="mini" style="margin-left:50px;" @click="toOrder()">转订单</el-button>
|
|
|
</template>
|
|
|
|
|
|
</x-crud>
|
|
|
@@ -141,6 +153,11 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeDate(info,flag){
|
|
|
+ this.$service.liveOrder.changeDate({ id: info.id,flag:flag }).then(res => {
|
|
|
+ this.refreshData()
|
|
|
+ })
|
|
|
+ },
|
|
|
renewAddCustom(data){
|
|
|
this.showDetail(data)
|
|
|
},
|
|
|
@@ -193,17 +210,15 @@ export default {
|
|
|
init() {
|
|
|
this.$store.dispatch('getUsage');
|
|
|
},
|
|
|
- printOrder(info){
|
|
|
- this.$service.order.info({ id: info.id }).then(res => {
|
|
|
+ printA4(info){
|
|
|
+ this.$service.liveOrder.printOrder({ id: info.id }).then(res => {
|
|
|
let printData = res.printData ? res.printData : ''
|
|
|
let str = res.template ? res.template:''
|
|
|
let template = JSON.parse(str)
|
|
|
hiprint.init();
|
|
|
var hiprintTemplate = new hiprint.PrintTemplate({template:template});
|
|
|
hiprintTemplate.print(printData)
|
|
|
- this.$service.order.addPrintNum({id:info.id}).then(data => {
|
|
|
- this.refreshData()
|
|
|
- })
|
|
|
+ info.printOrder = 1
|
|
|
})
|
|
|
},
|
|
|
getStaff(e){
|
|
|
@@ -222,8 +237,10 @@ export default {
|
|
|
}
|
|
|
this.refreshData()
|
|
|
},
|
|
|
- exportData(){
|
|
|
- this.$message.error('开发中')
|
|
|
+ toOrder(){
|
|
|
+ this.$service.liveOrder.convertOrder().then(res => {
|
|
|
+ this.$message.success('提交成功,3分钟后查看订单');
|
|
|
+ })
|
|
|
},
|
|
|
onLoad({ ctx, app }) {
|
|
|
this.app = app;
|
|
|
@@ -271,6 +288,12 @@ export default {
|
|
|
align: 'center',
|
|
|
width: '100'
|
|
|
},
|
|
|
+ {
|
|
|
+ prop: 'switchOrder',
|
|
|
+ label: '已转订单',
|
|
|
+ align: 'center',
|
|
|
+ width: '100'
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'staffName',
|
|
|
label: '开单人',
|
|
|
@@ -278,16 +301,16 @@ export default {
|
|
|
width: '120'
|
|
|
},
|
|
|
{
|
|
|
- prop: 'switchOrder',
|
|
|
- label: '已转订单',
|
|
|
+ prop: 'printOrder',
|
|
|
+ label: '打印',
|
|
|
align: 'center',
|
|
|
- width: '100'
|
|
|
+ width: '90'
|
|
|
},
|
|
|
{
|
|
|
prop: 'addTime',
|
|
|
label: '创建时间',
|
|
|
align: 'center',
|
|
|
- width: 180
|
|
|
+ width: 210
|
|
|
},
|
|
|
{
|
|
|
prop: 'updateTime',
|
|
|
@@ -312,7 +335,7 @@ export default {
|
|
|
op: {
|
|
|
visible: true,
|
|
|
props: {
|
|
|
- width: 350,
|
|
|
+ width: 240,
|
|
|
align: 'center',
|
|
|
fixed: 'right',
|
|
|
label: '操作'
|