shish 4 lat temu
rodzic
commit
afc0811029
2 zmienionych plików z 10 dodań i 8 usunięć
  1. 6 5
      hdApp/src/admin/goods/list.vue
  2. 4 3
      hdApp/src/api/goods/index.js

+ 6 - 5
hdApp/src/admin/goods/list.vue

@@ -75,11 +75,8 @@ import AppSearchModule from "@/components/module/app-search"
 import OperateModule from "@/admin/home/components/module/operate"
 import AppWrapperEmpty from "@/components/app-wrapper-empty"
 import ModalModule from "@/components/plugin/modal"
-import {categoryListB,getCategoryGoodsB} from "@/api/goods"
+import {categoryListB,getCategoryGoodsB,print} from "@/api/goods"
 import { list } from "@/mixins"
-// #ifdef APP-PLUS
-const plug= uni.requireNativePlugin('Html5app-Gprinter')
-// #endif
 export default {
   name: "list",
   components: {
@@ -122,7 +119,11 @@ export default {
 				success: function (respond) {
 					let index = respond.tapIndex
           let currentNum = Number(doNum[index])
-
+          print({id:item.id,num:currentNum}).then(res=>{
+            if(res.code == 1){
+              that.$msg(res.msg)
+            }
+          })
 				}
 			})
 		},

+ 4 - 3
hdApp/src/api/goods/index.js

@@ -5,9 +5,6 @@ export const cgPlant = data => {
 	return https.post('/goods/cg-plant', data)
 }
 
-/** *
- * 商品详情 m
- */
 export const getDetail = data => {
 	return https.get('/goods/detail', data)
 }
@@ -17,6 +14,10 @@ export const getPlantCg = async data => {
 	return https.get("/plant-cg/list", data);
 };
 
+export const print = data => {
+	return https.get("/goods/print", data);
+};
+
 export const printAll = data => {
 	return https.get("/plant-cg/print-all", data);
 };