|
|
@@ -198,17 +198,32 @@
|
|
|
|
|
|
<tui-list-cell class="line-cell" :arrow="true">
|
|
|
<div class="tui-title">开单人</div>
|
|
|
- <picker mode="selector" :value="form.getStaffId" :range="staffList" range-key="name" @change="kdChange" class="tui-input" >
|
|
|
- <input v-model="form.getStaffId" name="getStaffId" type="text" hidden />
|
|
|
- <div style="padding:6upx 0 6upx 0;" v-if="form.getStaffName!=''">{{form.getStaffName}}</div>
|
|
|
- <div v-else style="padding:6upx 0 6upx 0;color:#CCCCCC;">请选择</div>
|
|
|
- </picker>
|
|
|
+ <view class="uni-input" v-if="form.getStaffId==0" style="color:#CCCCCC;width:400upx;" @click="changeStaff()">请选择</view>
|
|
|
+ <view class="uni-input" v-else @click="changeStaff()" style="width:400upx;">{{ form.getStaffName ? form.getStaffName : '请选择' }}</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
+ <uni-popup ref="staffRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
+ <view style="max-height:80vh;overflow: scroll;">
|
|
|
+ <view style="margin-left:30upx;margin-top:19upx;font-size:27upx;font-weight:bold;">请选择:</view>
|
|
|
+ <view style="display:flex;padding:20upx;height:auto;justify-content: flex-start;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
|
+ <view v-for="(item, index) in staffList" :key="index" style="margin-bottom:20upx;margin-left:3upx;">
|
|
|
+ <button
|
|
|
+ class="admin-button-com staff-btn"
|
|
|
+ @click.stop="getCurrentStaff(item)"
|
|
|
+ :class="{'selected': form.getStaffId === item.id}"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view style="text-align:center;padding:10upx 0 10upx 0;"><button class="admin-button-com big blue" @click="cancelCurrentStaff()">取消选择</button></view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
<view class="tui-title">账单日期</view>
|
|
|
- <view class="uni-input" v-if="form.historyDate==''" style="color:#CCCCCC;" @click="bindHistoryDateChange">请选择,默认当天</view>
|
|
|
- <view class="uni-input" @click="bindHistoryDateChange">{{form.historyDate}}</view>
|
|
|
+ <view class="uni-input" v-if="form.historyDate==''" style="color:#CCCCCC;width:400upx;" @click="bindHistoryDateChange">请选择,默认当天</view>
|
|
|
+ <view class="uni-input" @click="bindHistoryDateChange" v-else style="width:400upx;">{{form.historyDate}}</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
@@ -339,6 +354,7 @@ export default {
|
|
|
payWay:0,
|
|
|
needPrint:1,//订单生成时打印订单1需要2不需要
|
|
|
hasPay:0,
|
|
|
+ getStaffId:0,
|
|
|
getStaffName:'',
|
|
|
dealPrice:0,
|
|
|
wlName:''
|
|
|
@@ -355,7 +371,8 @@ export default {
|
|
|
calc:'add',
|
|
|
diffPriceList:[],
|
|
|
currentShop:{default:0},
|
|
|
- book:0
|
|
|
+ book:0,
|
|
|
+ selectStaff: { id: '', name: '' },
|
|
|
};
|
|
|
},
|
|
|
onLoad (option) {
|
|
|
@@ -420,6 +437,12 @@ export default {
|
|
|
this.form.needPrint = 2
|
|
|
}
|
|
|
|
|
|
+ // 同步selectStaff和form
|
|
|
+ if(this.form.getStaffId && this.form.getStaffName) {
|
|
|
+ this.selectStaff.id = this.form.getStaffId
|
|
|
+ this.selectStaff.name = this.form.getStaffName
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
onUnload(){
|
|
|
uni.removeStorageSync('newClient')
|
|
|
@@ -671,7 +694,24 @@ export default {
|
|
|
},
|
|
|
pageToItemList() {
|
|
|
this.$util.pageTo({url: '/admin/billing/index2?customId='+this.option.customId,type:2})
|
|
|
- }
|
|
|
+ },
|
|
|
+ changeStaff() {
|
|
|
+ this.$refs.staffRef.open('center')
|
|
|
+ },
|
|
|
+ getCurrentStaff(item) {
|
|
|
+ this.form.getStaffId = item.id
|
|
|
+ this.form.getStaffName = item.name
|
|
|
+ this.selectStaff.id = item.id
|
|
|
+ this.selectStaff.name = item.name
|
|
|
+ this.$refs.staffRef.close()
|
|
|
+ },
|
|
|
+ cancelCurrentStaff() {
|
|
|
+ this.form.getStaffId = 0
|
|
|
+ this.form.getStaffName = ''
|
|
|
+ this.selectStaff.id = ''
|
|
|
+ this.selectStaff.name = ''
|
|
|
+ this.$refs.staffRef.close()
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
@@ -944,4 +984,26 @@ export default {
|
|
|
.normal-price{
|
|
|
color:#c1acac;
|
|
|
}
|
|
|
+.staff-btn {
|
|
|
+ min-width: 160upx;
|
|
|
+ padding: 0 27upx;
|
|
|
+ height: 80upx;
|
|
|
+ font-size: 40upx;
|
|
|
+ font-weight: bold;
|
|
|
+ margin: 8upx 8upx 0 0;
|
|
|
+ border-radius: 16upx;
|
|
|
+ background: #f0f2f6;
|
|
|
+ color: #333;
|
|
|
+ border: 2upx solid #e0e0e0;
|
|
|
+ transition: none;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+.staff-btn.selected,
|
|
|
+.staff-btn:active {
|
|
|
+ background: #f0f2f6;
|
|
|
+ color: #333;
|
|
|
+ border-color: #e0e0e0;
|
|
|
+}
|
|
|
</style>
|