|
|
@@ -7,33 +7,50 @@
|
|
|
<view :key="item.id" @tap="changeHasPay(item.id)" v-for="item in hasPayList" :class="[form.hasPay===item.id?'active':'']"> {{item.name}} </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
+ <view class="select-item_box" style="margin-bottom:10upx;" v-if="form.hasPay == 3">
|
|
|
+ <view class="title" style="padding-left:60upx;" @click.stop="changeCheck(3)">
|
|
|
+ 金额:<text :class="{selected:checkType == 3}">{{form.cash}}</text>
|
|
|
+ <text style="margin-left:20upx;color:green;" v-if="Number(zl)>0">找零 {{zl}}</text>
|
|
|
+ <text style="margin-left:20upx;color:red;" v-if="Number(zl)<0">还差 {{-zl}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="select-item_box" v-if="form.hasPay == 1">
|
|
|
- <view class="title">选项</view>
|
|
|
+ <view class="title">类型</view>
|
|
|
<view class="item-list_box">
|
|
|
<view :key="item.id" @tap="changePayWay(item.id)" v-for="item in payWayList" :class="[form.payWay===item.id?'active':'']"> {{item.name}} </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="select-item_box" v-if="form.hasPay == 1 && form.payWay == 0">
|
|
|
- <view class="title">客服</view>
|
|
|
+ <view class="title">收款人</view>
|
|
|
<view class="item-list_box">
|
|
|
<view :key="item.id" @tap="changeGetStaff(item)" v-for="item in getStaffList" :class="[form.getStaffId===item.id?'active':'']"> {{item.name}} </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <view class="select-item_box">
|
|
|
+ <view class="title">开单人</view>
|
|
|
+ <view class="item-list_box">
|
|
|
+ <view :key="item.id" @tap="changeShopAdminId(item)" v-for="item in shopAdminIdList" :class="[form.shopAdminId===item.id?'active':'']"> {{item.name}} </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="select-item_box">
|
|
|
<view class="title">打印小票</view>
|
|
|
<view class="item-list_box">
|
|
|
<view :key="item.id" @tap="changeNeedPrint(item.id)" v-for="item in needPrintList" :class="[form.needPrint===item.id?'active':'']"> {{item.name}} </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <!--
|
|
|
<view class="select-item_box" v-if="$util.isEmpty(groupInfo)">
|
|
|
<view class="title">如需保存此组合,请输入名称:</view>
|
|
|
<view class="inpup_box">
|
|
|
<view><input type="text" v-model="form.groupName" name="groupName" /></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ -->
|
|
|
<view class="select-item_box">
|
|
|
<view class="title">备注:</view>
|
|
|
<view class="inpup_box">
|
|
|
@@ -68,21 +85,6 @@
|
|
|
<text><text :class="{selected:checkType == 0}">{{form.modifyPrice}}</text></text>
|
|
|
</view>
|
|
|
|
|
|
- <view class="input-list" @click.stop="changeCheck(3)">
|
|
|
- <text style="color:green;">收现金</text>
|
|
|
- <text><text :class="{selected:checkType == 3}">{{form.cash}}</text></text>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="input-list" v-if="Number(zl)>0">
|
|
|
- <text>找零</text>
|
|
|
- <text><text>{{zl}}</text></text>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="input-list" v-if="Number(zl)<0">
|
|
|
- <text>还差</text>
|
|
|
- <text><text>{{-zl}}</text></text>
|
|
|
- </view>
|
|
|
-
|
|
|
<view class="keyboard-body_box"> <VKeyboard ref="keyboard" :digital="true" :disorderly="false" @typing="typing" @enter="enter" @cancel="cancel"> </VKeyboard> </view>
|
|
|
|
|
|
</view>
|
|
|
@@ -113,15 +115,18 @@ export default {
|
|
|
modifyPrice:0,
|
|
|
getStaffId:0,
|
|
|
getStaffName:'',
|
|
|
+ shopAdminId:0,
|
|
|
+ shopAdminName:'',
|
|
|
cash:0
|
|
|
},
|
|
|
proceeds: '0',
|
|
|
- hasPayList:[ { name:'扫码', id:0, },{ name:'欠款', id:2, }, { name:'其它', id:1, }],
|
|
|
+ hasPayList:[ { name:'扫码', id:0, },{ name:'欠款', id:2, },{ name:'现金', id:3, }, { name:'其它', id:1, }],
|
|
|
payWayList:[ { name:'客服微信', id:0 }, { name:'支付宝', id:1 },{name:'其它',id:9} ],
|
|
|
currentInputType:'proceeds',
|
|
|
totalMoney: 0,
|
|
|
needPrintList:[ { name:'不需要', id:2 },{ name:'需要', id:1 } ],
|
|
|
- getStaffList:[]
|
|
|
+ getStaffList:[],
|
|
|
+ shopAdminIdList:[]
|
|
|
};
|
|
|
},
|
|
|
props:{
|
|
|
@@ -188,15 +193,24 @@ export default {
|
|
|
getAllStaff().then(res=>{
|
|
|
if(res.code == 1){
|
|
|
this.getStaffList = res.data.list
|
|
|
+ this.shopAdminIdList = res.data.list
|
|
|
if(!this.$util.isEmpty(this.getStaffList)){
|
|
|
this.form.getStaffId = this.getStaffList[0].id
|
|
|
this.form.getStaffName = this.getStaffList[0].name
|
|
|
+
|
|
|
+ this.form.shopAdminId = this.getStaffList[0].id
|
|
|
+ this.form.shopAdminName = this.getStaffList[0].name
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeShopAdminId(item){
|
|
|
+ this.form.shopAdminId = item.id
|
|
|
+ this.form.shopAdminName = item.name
|
|
|
+ },
|
|
|
changeGetStaff(item){
|
|
|
this.form.getStaffId = item.id
|
|
|
this.form.getStaffName = item.name
|
|
|
@@ -212,6 +226,11 @@ export default {
|
|
|
changeHasPay(val){
|
|
|
this.$util.hitVoice()
|
|
|
this.form.hasPay = val
|
|
|
+ if(val == 3){
|
|
|
+ this.changeCheck(3)
|
|
|
+ }else{
|
|
|
+ this.form.cash = 0
|
|
|
+ }
|
|
|
},
|
|
|
changeCheck(val){
|
|
|
this.$util.hitVoice()
|
|
|
@@ -320,6 +339,12 @@ export default {
|
|
|
& > .title {
|
|
|
font-size: 12upx;
|
|
|
text-align:left;
|
|
|
+
|
|
|
+ .selected{
|
|
|
+ background:blue;
|
|
|
+ color:white;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
& .inpup_box{
|
|
|
display: flex;
|