|
|
@@ -47,6 +47,8 @@
|
|
|
<view v-else>{{ form.entryTime || "默认今天" }}</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
+<block v-if="location == 1">
|
|
|
+
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
<view class="tui-title">打印小票</view>
|
|
|
<button @click="form.needPrint = 1" class="admin-button-com middle" :class="form.needPrint == 1 ? 'blue' : 'default'">打印</button>
|
|
|
@@ -54,6 +56,19 @@
|
|
|
class="admin-button-com middle" :class="form.needPrint == 2? 'blue' : 'default'">不打</button>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
+<block v-if="!$util.isEmpty(wcPrintList)">
|
|
|
+<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
+<view class="tui-title">选小票机</view>
|
|
|
+<block v-for="(pItem, pIndex) in wcPrintList" :key="pIndex">
|
|
|
+<button @click="form.fistWcPrintNum = pItem.id" style="margin-right:30upx;" class="admin-button-com middle" :class="form.fistWcPrintNum == pItem.id ? 'blue' : 'default'">
|
|
|
+{{pItem.name}}
|
|
|
+</button>
|
|
|
+</block>
|
|
|
+</tui-list-cell>
|
|
|
+</block>
|
|
|
+
|
|
|
+</block>
|
|
|
+
|
|
|
<block v-if="location == 0">
|
|
|
<tui-list-cell v-if="myShopInfo.cgModel == 0" class="line-cell" :hover="false">
|
|
|
<view class="tui-title ">打包费</view>
|
|
|
@@ -155,6 +170,7 @@ import productMins from "@/mixins/product";
|
|
|
import {getPurchaseDetailApi,createPurchaseOrderApi} from "@/api/purchase";
|
|
|
import { PURCHASE_ORDER_STATUS } from "@/utils/declare";
|
|
|
import AppDatePicker from "@/components/app-date-picker";
|
|
|
+import { getPrint } from "@/api/shop";
|
|
|
export default {
|
|
|
components: {
|
|
|
TuiListCell,
|
|
|
@@ -179,7 +195,8 @@ export default {
|
|
|
yfPayWay:1,
|
|
|
remark:"",
|
|
|
avgKgWeight:'',
|
|
|
- needPrint:2
|
|
|
+ needPrint:2,
|
|
|
+ fistWcPrintNum:1
|
|
|
},
|
|
|
showCustomer: false,
|
|
|
detailsInfo: {},
|
|
|
@@ -187,10 +204,12 @@ export default {
|
|
|
modifyPrice:0,
|
|
|
totalFreight:0,
|
|
|
perKgFreight:0,
|
|
|
- location:0
|
|
|
+ location:0,
|
|
|
+ wcPrintList:[]
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
|
+ let that = this
|
|
|
if(this.myShopInfo.cgModel == 1){
|
|
|
this.form.avgKgWeight = this.myShopInfo.cgPerCost
|
|
|
}
|
|
|
@@ -199,6 +218,18 @@ export default {
|
|
|
if(this.location == 1){
|
|
|
this.form.needPrint = 1
|
|
|
}
|
|
|
+ getPrint().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ if(res.data.wcPrintNum && Number(res.data.wcPrintNum)>1){
|
|
|
+ if(Number(res.data.wcPrintNum)==2){
|
|
|
+ that.wcPrintList = [{name:"机1",id:1},{name:"机2",id:2}]
|
|
|
+ }
|
|
|
+ if(Number(res.data.wcPrintNum) ==3){
|
|
|
+ that.wcPrintList = [{name:"机1",id:1},{name:"机2",id:2},{name:"机3",id:3}]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
this.initData();
|
|
|
},
|