Browse Source

fix all

voice
刘嘉炜 4 years ago
parent
commit
525b8e76a3
  1. 14
      src/pages/employee/manage/manage.vue
  2. 9
      src/subpackage/device/pages/coffee_test/coffee_test.vue
  3. 6
      src/subpackage/device/pages/device_manage/device_manage.vue
  4. 48
      src/subpackage/device/pages/locker_manage/locker_manage.vue

14
src/pages/employee/manage/manage.vue

@ -113,8 +113,10 @@ export default {
}
},
onLoad(){
this.getEmployeeList({});
},
onShow(){
this.refreshEmployList();
},
methods: {
//
employeeDelete: util.debounce(function(){
@ -160,9 +162,7 @@ export default {
//
confirmSearch(){
let { searchTxt } = this;
this.getEmployeeList({
key: searchTxt,
})
this.$nextTick(_=>this.refreshEmployList())
},
//
cleanIpt(){
@ -213,7 +213,7 @@ export default {
menu='',
key='',
}){
util.showLoad();
// util.showLoad();
servers.get({
url: API.employee.employeeList,
data: {
@ -224,7 +224,7 @@ export default {
isDefaultGet: false,
})
.then(res=>{
util.hideLoad();
// util.hideLoad();
let _data = res.data;
if(_data.code == 0){
this.employeeInfo = _data.data;
@ -232,7 +232,7 @@ export default {
util.showNone(_data.message || '加载失败!');
}
})
.catch(util.hideLoad)
// .catch(util.hideLoad)
},
//
addEmployee(){

9
src/subpackage/device/pages/coffee_test/coffee_test.vue

@ -84,16 +84,17 @@ export default {
let { curTestInfo, temperatureType, curStoreInfo } = this;
util.showLoad();
let deviceInfo = await deviceServer.get({
url: deviceApi.hardwareInfo + curTestInfo.outlet,
url: deviceApi.hardwareInfo + curTestInfo.stadium_hardware_id,
data: {},
failMsg: '获取设备信息失败!'
})
if(!deviceInfo)return console.warn('获取设备信息失败!deviceInfo--->',deviceInfo);
if(
deviceInfo.hardware_connect_method !=='Tcp' ||
deviceInfo.hardware_model !=='MIAOQUE'
util.changeLowerCase(deviceInfo.hardware_connect_method) !=='tcp' ||
util.changeLowerCase(deviceInfo.hardware_model) !=='miaoque'
){
let _errorStr = `connect error: connect method ${deviceInfo.hardware_connect_method}, model: ${deviceInfo.hardware_model}`
let _errorStr = `connect error: connect method: ${deviceInfo.hardware_connect_method}, model: ${deviceInfo.hardware_model}`
console.warn(_errorStr);
return util.showNone(_errorStr);
}

6
src/subpackage/device/pages/device_manage/device_manage.vue

@ -257,7 +257,8 @@ export default {
let _query = {
id: e.id,
name: e.hardware_name,
page_id: pageInfo.id
page_id: pageInfo.id,
stadium_id: e.stadium_id
}
if(pageInfo.id == 7)return util.routeTo(`/subpackage/device/pages/sell_box_manage/sell_box_manage?query=${util.jsonStr(_query)}`, 'nT');
if(pageInfo.id == 8)return util.routeTo(`/subpackage/device/pages/locker_manage/locker_manage?query=${util.jsonStr(_query)}`, 'nT');
@ -269,7 +270,8 @@ export default {
let _query = {
id: e.id,
name: e.hardware_name,
page_id: pageInfo.id
page_id: pageInfo.id,
stadium_id: e.stadium_id
}
if(pageInfo.id == 7)return util.routeTo(`/subpackage/device/pages/sell_box_test/sell_box_test?query=${util.jsonStr(_query)}`, 'nT');
// if(pageInfo.id == 8)return util.routeTo(`/subpackage/device/pages/locker_manage/locker_manage`, 'nT');

48
src/subpackage/device/pages/locker_manage/locker_manage.vue

@ -4,8 +4,7 @@
<view class="lm-list">
<view class="ll-item" v-for="(e,i) in boxList" :key="i" @click="itemClick(i)">
<view class="li-left">
<view class="ll-box">{{e.id || '-'}}</view>
<view class="ll-box"><view>{{e.cabinet_name || '-'}}</view></view>
<view
v-if="getleaseBoxType(e)"
class="ll-tag"
@ -16,14 +15,14 @@
<view class="li-content">
<!-- 储物柜 -->
<view v-if="optionsQuery.page_id == 9">
<view class="lc-name">{{e.cabinet_name || '-'}}</view>
<view class="lc-name">{{e.locker_price_name || '-'}}</view>
<view class="lc-price">
<view>{{e.price || 0}}<text>{{e.dimensions[0] || '-'}}</text></view>
</view>
</view>
<!-- 租售柜 -->
<view v-if="optionsQuery.page_id == 8">
<view class="lc-name">{{isRent(e)?e.cabinet_name || '-':e.goods_name || '-'}}</view>
<view class="lc-name">{{e.goods_name || '-'}}</view>
<view class="lc-price">
<view>{{e.price || '0'}}<text>{{e.unit || '-'}}</text></view>
<view v-if="optionsQuery.page_id == 8&&isRent(e)">押金{{e.deposit || '0'}}</view>
@ -96,6 +95,9 @@ export default {
this.optionsQuery = _query;
console.log(_query);
this.getBoxList();
uni.setNavigationBarTitle({
title: _query.page_id == 8?'租售柜管理':_query.page_id == 9?'储物柜管理':''
})
},
methods: {
selectAll(){
@ -128,8 +130,11 @@ export default {
deviceServer.get({
url: this.getListApi(),
data: {
cabine_ids: optionsQuery.id,
brand_id: curStoreInfo.brand_id
// cabine_ids: optionsQuery.id,
// brand_id: curStoreInfo.brand_id,
'filter[stadium_hardware_id]': optionsQuery.id,
'filter[brand_id]': curStoreInfo.brand_id,
'filter[stadium_id]': optionsQuery.stadium_id,
},
failMsg: '加载失败!'
})
@ -171,7 +176,10 @@ export default {
content: _tipStr,
showCancel: true,
success: async modalRes=>{
if(modalRes.confirm)this.leaseReset(_selledList.map(el=>el.id).join(','));
if(modalRes.confirm){
this.leaseReset(_selledList.map(el=>el.id).join(','))
.then(this.getBoxList);
}
}
})
}
@ -185,7 +193,7 @@ export default {
leaseReset(ids){
let { curStoreInfo } = this;
util.showLoad();
deviceServer.get({
return deviceServer.get({
url: deviceApi.leaseReset,
data: {
brand_id: curStoreInfo.brand_id,
@ -274,17 +282,27 @@ export default {
padding: 10upx;
width: 120upx;
height: 120upx;
line-height: 100upx;
text-align: center;
border-radius: 10upx;
font-size: 32upx;
color: #9a9a9d;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
border: 2upx solid #ededf5;
>view{
position: absolute;
left: 50%;
top: 50%;
z-index: 2;
transform: translate(-50%, -50%);
width: 100%;
height: 120upx;
text-align: center;
line-height: 120upx;
font-size: 32upx;
color: #9a9a9d;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&::before{
content: '';
z-index: 0;
position: absolute;
left: 10upx;
top: 50%;

Loading…
Cancel
Save