shish 2 лет назад
Родитель
Сommit
b12b905c85

+ 7 - 0
ghs/src/service/purchase-order/index.js

@@ -2,6 +2,13 @@ import { BaseService, Service } from '@/cool';
 @Service('purchase-order')
 export class PurchaseOrderService extends BaseService {
 
+	printPaper(data){
+		return this.request({
+			url: '/print-paper',
+			params: data
+		});		
+	}
+
 	modifySeatSn(data) {
 		return this.request({
 			url: '/modify-seat-sn',

+ 14 - 0
ghs/src/views/in/change.vue

@@ -63,12 +63,16 @@
 				<el-button type="primary" @click="printOrder()" style="margin-left:100px;" v-if="info.status != 5">打小票</el-button>
 				<el-button disabled v-else>打小票</el-button>
 
+				<el-button type="primary" @click="printPaper()" style="margin-left:100px;" v-if="info.status != 5">打多联</el-button>
+				<el-button disabled v-else>打多联</el-button>
+
             </div>
         </div>
 	</div>
 </template>
 <script>
 import { mapGetters } from 'vuex';
+import {hiprint, defaultElementTypeProvider} from 'vue-plugin-hiprint'
 export default {
     name: 'change',
     components: {
@@ -95,6 +99,16 @@ export default {
         }
     },
     methods: {
+		printPaper(){
+			this.$service.purchaseOrder.printPaper({ id: this.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(){
 			this.$service.purchaseOrder.printBill({id:this.id}).then(data => {
           		this.$notify({ title: '已打印', message: '操作成功', type: 'success'})

+ 17 - 5
ghs/src/views/in/list.vue

@@ -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: '操作'

Разница между файлами не показана из-за своего большого размера
+ 2 - 1
ghs/src/views/order/list.vue


Некоторые файлы не были показаны из-за большого количества измененных файлов