|
@@ -236,6 +236,7 @@ import productMins from "@/mixins/product";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
import ModalModule from "@/components/plugin/modal"
|
|
import ModalModule from "@/components/plugin/modal"
|
|
|
import { print } from '@/api/product';
|
|
import { print } from '@/api/product';
|
|
|
|
|
+import { getPrint } from "@/api/shop";
|
|
|
export default {
|
|
export default {
|
|
|
name: "info",
|
|
name: "info",
|
|
|
components: {
|
|
components: {
|
|
@@ -256,7 +257,8 @@ export default {
|
|
|
printItemId:0,
|
|
printItemId:0,
|
|
|
printType:0,
|
|
printType:0,
|
|
|
printLabelShow:false,
|
|
printLabelShow:false,
|
|
|
- printNum:''
|
|
|
|
|
|
|
+ printNum:'',
|
|
|
|
|
+ wcPrintNum:1
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
@@ -266,11 +268,36 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
printBillFn(info){
|
|
printBillFn(info){
|
|
|
- uni.showLoading({mask:true})
|
|
|
|
|
- printBill({id:info.id}).then((res) => {
|
|
|
|
|
- info.printNum++
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if(this.wcPrintNum > 1){
|
|
|
|
|
+ let arr = ['请选择','机器1']
|
|
|
|
|
+ if(this.wcPrintNum == 2){
|
|
|
|
|
+ arr = ['请选择','机器1','机器2']
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.wcPrintNum == 3){
|
|
|
|
|
+ arr = ['请选择','机器1','机器2','机器3']
|
|
|
|
|
+ }
|
|
|
|
|
+ uni.showActionSheet({
|
|
|
|
|
+ itemList: arr,
|
|
|
|
|
+ success: function (res) {
|
|
|
|
|
+ if(res.tapIndex == 0){
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ let order = res.tapIndex
|
|
|
|
|
+ uni.showLoading({mask:true})
|
|
|
|
|
+ printBill({id:info.id,order:order}).then((res) => {
|
|
|
|
|
+ info.printNum++
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ }else{
|
|
|
|
|
+ uni.showLoading({mask:true})
|
|
|
|
|
+ printBill({id:info.id}).then((res) => {
|
|
|
|
|
+ info.printNum++
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
dialogInputConfirm(val) {
|
|
dialogInputConfirm(val) {
|
|
|
let that=this;
|
|
let that=this;
|
|
@@ -384,6 +411,14 @@ export default {
|
|
|
}
|
|
}
|
|
|
const { data } = await getPurchaseDetailApi(orderSn);
|
|
const { data } = await getPurchaseDetailApi(orderSn);
|
|
|
this.detailInfo = data;
|
|
this.detailInfo = data;
|
|
|
|
|
+
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ getPrint().then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.wcPrintNum = res.data.wcPrintNum ? Number(res.data.wcPrintNum) : 1
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|