diff --git a/src/subpackage/device/pages/coffee_manage/coffee_manage.vue b/src/subpackage/device/pages/coffee_manage/coffee_manage.vue
index b00c603..62abb9c 100644
--- a/src/subpackage/device/pages/coffee_manage/coffee_manage.vue
+++ b/src/subpackage/device/pages/coffee_manage/coffee_manage.vue
@@ -8,7 +8,12 @@
{{e.name || '-'}}
-
-
+
+
¥{{e.price || 0}}
@@ -17,11 +22,12 @@
Tips:一包标准粉如若大概能冲40杯左右,建议一包填38杯库存。
-
+
+
确认补粉
@@ -50,8 +56,14 @@ export default {
this.coffeeList(_query.id);
},
methods:{
+ stockInputChange(e,i){
+ let _typeList = this.typeList.slice();
+ _typeList[i].stock = e.detail.value;
+ this.typeList = _typeList;
+ },
confirmSave: util.debounce(function(){
let { typeList, isFillAll } = this;
+ if(!typeList.length)return;
util.showModal({
title: '是否确认补粉?',
content: isFillAll?'请确认全部补满':'',
@@ -59,7 +71,7 @@ export default {
success: res=>{
if(res.confirm){
this.confirmReq(
- typeList.map(e=>({id: e.id, stock: isFillAll? e.depth || 38 : e.stock}))
+ typeList.map(e=>({id: e.id, stock: isFillAll? e.depth : e.stock}))
);
}
}
@@ -92,7 +104,7 @@ export default {
},
addStock(index){
let _typeList = this.typeList.slice();
- _typeList[index].stock++;
+ _typeList[index].stock++
this.typeList = _typeList;
},
coffeeList(hardware_id){
@@ -205,7 +217,7 @@ export default {
padding-bottom: calc( 10upx + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */
padding-top: 10upx;
background-color: #fff;
- @include centerFlex(space-between);
+ @include centerFlex(flex-end);
.cfb-select-all{
font-size: 28upx;
line-height: 40upx;
diff --git a/src/subpackage/device/pages/device_manage/device_manage.vue b/src/subpackage/device/pages/device_manage/device_manage.vue
index 48269ed..1dcb571 100644
--- a/src/subpackage/device/pages/device_manage/device_manage.vue
+++ b/src/subpackage/device/pages/device_manage/device_manage.vue
@@ -162,12 +162,12 @@ export default {
}
}else if(util.changeLowerCase(hardware_type) === 'vendingmachine'){
// 售货机
- _query = [{
+ _query = {
"name": "yunyin-mac",
"value": {
"tcp": hardware_net_addr + '',
}
- }]
+ }
}else{
util.showNone(`config error -> type:${hardware_type || '-'} / connect method:${hardware_connect_method || '-'}`)
return 'configError';
diff --git a/src/subpackage/device/pages/index/index.vue b/src/subpackage/device/pages/index/index.vue
index 70b0867..c9aedc2 100644
--- a/src/subpackage/device/pages/index/index.vue
+++ b/src/subpackage/device/pages/index/index.vue
@@ -69,6 +69,7 @@ export default {
e.id == 3 || // 风扇
e.id == 4 || // 门禁
e.id == 5 || // 门闸
+ // e.id == 6 || // 平板
e.id == 8 || // 租售柜
e.id == 9 || // 储物柜
e.id == 10 || // 咖啡机
diff --git a/src/subpackage/device/pages/switch_manage/switch_manage.vue b/src/subpackage/device/pages/switch_manage/switch_manage.vue
index 066dc0c..283cc1d 100644
--- a/src/subpackage/device/pages/switch_manage/switch_manage.vue
+++ b/src/subpackage/device/pages/switch_manage/switch_manage.vue
@@ -272,7 +272,7 @@ export default {
const _query = {
- name: this.getQueryName(switchInfo),
+ name: this.getStatusQueryName(switchInfo),
value: { id: hardware_id + '', } // value 内值全为String
};
@@ -354,7 +354,19 @@ export default {
return [ 'off', 'on' ][status] || ''
},
- // 非空调获取name
+ // 非空调获取状态name
+ getStatusQueryName(switchInfo){
+ let { hardware_connect_method } = switchInfo;
+ let _obj = {
+ 'Gpio': 'get-rpio', // 全设备
+ 'SerialPort485': 'zzio404d-gpio-status',
+ 'Tcp': 'zzio404d-gpio-status-tcp',
+ };
+
+ return _obj[hardware_connect_method] || ''
+ },
+
+ // 非空调获取设置name
getQueryName(switchInfo){
let { hardware_connect_method } = switchInfo;
let _obj = {