|
|
@@ -90,7 +90,10 @@
|
|
|
<el-button @click.stop="changePrice(scope.row)" size="small" type="primary" v-else>改价入库</el-button>
|
|
|
|
|
|
<el-button @click.stop="detailShowFn(scope.row)" size="small" type="success">详情</el-button>
|
|
|
-
|
|
|
+
|
|
|
+ <el-button size="small" v-if="scope.row.status == 5 || scope.row.status == 1">打多联</el-button>
|
|
|
+ <el-button @click.stop="printPaper(scope.row)" size="small" type="primary" v-else>打多联</el-button>
|
|
|
+
|
|
|
<el-button size="small" v-if="scope.row.status == 5 || scope.row.status == 1">打小票</el-button>
|
|
|
<el-button @click.stop="printOrder(scope.row)" size="small" type="primary" v-else>打小票</el-button>
|
|
|
|
|
|
@@ -99,8 +102,6 @@
|
|
|
</template>
|
|
|
|
|
|
<template #slot-new-cg>
|
|
|
- <el-button type="primary" size="mini" style="margin-left:50px;" @click="addGhs()">添加供货商</el-button>
|
|
|
- <el-button type="primary" size="mini" style="margin-left:50px;" @click="billing()">开单</el-button>
|
|
|
<el-button type="primary" size="mini" style="margin-left:50px;" @click="newCg()">新增采购</el-button>
|
|
|
</template>
|
|
|
|
|
|
@@ -137,6 +138,7 @@
|
|
|
|
|
|
<script>
|
|
|
import OrderDetail from './components/order-detail';
|
|
|
+import {hiprint, defaultElementTypeProvider} from 'vue-plugin-hiprint'
|
|
|
export default {
|
|
|
components: {
|
|
|
OrderDetail
|
|
|
@@ -147,7 +149,7 @@ export default {
|
|
|
tabIndex: '0',
|
|
|
tabsData: [
|
|
|
{
|
|
|
- text: '全部采购',
|
|
|
+ text: '全部',
|
|
|
key: '0',
|
|
|
val: 0
|
|
|
},
|
|
|
@@ -249,6 +251,16 @@ export default {
|
|
|
query.backType = 'list'
|
|
|
this.$router.push({path:'/in/change',query})
|
|
|
},
|
|
|
+ printPaper(info){
|
|
|
+ this.$service.purchaseOrder.printPaper({ 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)
|
|
|
+ })
|
|
|
+ },
|
|
|
printOrder(item){
|
|
|
this.$service.purchaseOrder.printBill({id:item.id}).then(data => {
|
|
|
this.$notify({ title: '已打印', message: '操作成功', type: 'success'})
|
|
|
@@ -375,7 +387,7 @@ export default {
|
|
|
op: {
|
|
|
visible: true,
|
|
|
props: {
|
|
|
- width: 320,
|
|
|
+ width: 410,
|
|
|
align: 'center',
|
|
|
fixed: 'right',
|
|
|
label: '操作'
|