|
@@ -4,7 +4,7 @@
|
|
|
<view class="head_sticky">
|
|
<view class="head_sticky">
|
|
|
<view class="head_mine_title">我的钢瓶</view>
|
|
<view class="head_mine_title">我的钢瓶</view>
|
|
|
<view style="width: 100%;">
|
|
<view style="width: 100%;">
|
|
|
- <u-tabs :current="tabNumber" :list="bottleList" lineWidth="40" :scrollable="false"
|
|
|
|
|
|
|
+ <u-tabs :current="cylinderNumber" :list="bottleList" lineWidth="40" :scrollable="false"
|
|
|
@click="bottleClick"></u-tabs>
|
|
@click="bottleClick"></u-tabs>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -19,7 +19,7 @@
|
|
|
<u-swipe-action>
|
|
<u-swipe-action>
|
|
|
<u-swipe-action-item :name="index" :options="optionsList" v-for="(item,index) in list" :key="index"
|
|
<u-swipe-action-item :name="index" :options="optionsList" v-for="(item,index) in list" :key="index"
|
|
|
@click="event=>slideDelete(event,item)" :ref="'swipeAction' + index">
|
|
@click="event=>slideDelete(event,item)" :ref="'swipeAction' + index">
|
|
|
- <view class="card_dinay">
|
|
|
|
|
|
|
+ <view class="card_dinay" @click="goCylinder(item)">
|
|
|
<view style="display: flex;align-items: center;">
|
|
<view style="display: flex;align-items: center;">
|
|
|
<view class="item_current">{{index + 1}}</view>
|
|
<view class="item_current">{{index + 1}}</view>
|
|
|
<view class="item_title1">{{item.inner_code}}</view>
|
|
<view class="item_title1">{{item.inner_code}}</view>
|
|
@@ -90,19 +90,22 @@
|
|
|
name: '报废'
|
|
name: '报废'
|
|
|
}],
|
|
}],
|
|
|
belowStandard: 0,
|
|
belowStandard: 0,
|
|
|
|
|
+ cylinderNumber: 0,
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ tabNumber: {
|
|
|
|
|
+ handler: function(newUser, oldUser) {
|
|
|
|
|
+ if (newUser) {
|
|
|
|
|
+ this.cylinderNumber = newUser
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ immediate: true,
|
|
|
|
|
+ deep: true
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
var userInfo = this.$cache.getCache('userInfo')
|
|
var userInfo = this.$cache.getCache('userInfo')
|
|
|
- if (userInfo.provUser && this.tabNumber == 1) {
|
|
|
|
|
- if (userInfo.provUser.userType == 5) {
|
|
|
|
|
- this.current = 2
|
|
|
|
|
- this.allotFlag = false
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- this.allotFlag = true
|
|
|
|
|
- this.disqualification = true
|
|
|
|
|
- }
|
|
|
|
|
this.optionsList = this.options
|
|
this.optionsList = this.options
|
|
|
this.getList()
|
|
this.getList()
|
|
|
},
|
|
},
|
|
@@ -115,7 +118,10 @@
|
|
|
},
|
|
},
|
|
|
// 删除钢瓶
|
|
// 删除钢瓶
|
|
|
slideDelete(event, value) {
|
|
slideDelete(event, value) {
|
|
|
- if (this.current == 2) {
|
|
|
|
|
|
|
+ console.log(event,value,24)
|
|
|
|
|
+ if (this.current == 1) {
|
|
|
|
|
+ this.delSteelCylinder(value.id, event.name)
|
|
|
|
|
+ } else if (this.current == 2) {
|
|
|
let arr = []
|
|
let arr = []
|
|
|
if (event.index == 0) {
|
|
if (event.index == 0) {
|
|
|
// 超期
|
|
// 超期
|
|
@@ -128,14 +134,16 @@
|
|
|
} else if (event.index == 2) {
|
|
} else if (event.index == 2) {
|
|
|
this.delSteelCylinder(value.id, event.name)
|
|
this.delSteelCylinder(value.id, event.name)
|
|
|
}
|
|
}
|
|
|
- } else if (this.current == 1) {
|
|
|
|
|
- this.delSteelCylinder(value.id, event.name)
|
|
|
|
|
} else if (this.current == 3) {
|
|
} else if (this.current == 3) {
|
|
|
- let arr = []
|
|
|
|
|
- if (event.index == 0) {
|
|
|
|
|
- arr.push(value.inner_code)
|
|
|
|
|
- this.editSteelCylinder('2', arr, event.name)
|
|
|
|
|
- } else {
|
|
|
|
|
|
|
+ if (this.belowStandard == 0) {
|
|
|
|
|
+ let arr = []
|
|
|
|
|
+ if (event.index == 0) {
|
|
|
|
|
+ arr.push(value.inner_code)
|
|
|
|
|
+ this.editSteelCylinder('2', arr, event.name)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.delSteelCylinder(value.id, event.name)
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (this.belowStandard == 1) {
|
|
|
this.delSteelCylinder(value.id, event.name)
|
|
this.delSteelCylinder(value.id, event.name)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -178,6 +186,7 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
bottleClick(value) {
|
|
bottleClick(value) {
|
|
|
|
|
+ this.cylinderNumber = value.index
|
|
|
var userInfo = this.$cache.getCache('userInfo')
|
|
var userInfo = this.$cache.getCache('userInfo')
|
|
|
if (userInfo.provUser && value.index == 1) {
|
|
if (userInfo.provUser && value.index == 1) {
|
|
|
if (userInfo.provUser.userType == 5) {
|
|
if (userInfo.provUser.userType == 5) {
|
|
@@ -189,7 +198,8 @@
|
|
|
}
|
|
}
|
|
|
if (userInfo.provUser && value.index == 2) {
|
|
if (userInfo.provUser && value.index == 2) {
|
|
|
if (userInfo.provUser.userType == 5) {
|
|
if (userInfo.provUser.userType == 5) {
|
|
|
- this.disqualification = false
|
|
|
|
|
|
|
+ this.disqualification = true
|
|
|
|
|
+ this.allotFlag = true
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
this.disqualification = true
|
|
this.disqualification = true
|
|
@@ -213,18 +223,22 @@
|
|
|
}]
|
|
}]
|
|
|
this.optionsList = arr
|
|
this.optionsList = arr
|
|
|
} else if (value.index == 2) {
|
|
} else if (value.index == 2) {
|
|
|
- let arr1 = [{
|
|
|
|
|
- text: '空瓶',
|
|
|
|
|
- style: {
|
|
|
|
|
- backgroundColor: '#ff9900'
|
|
|
|
|
- }
|
|
|
|
|
- }, {
|
|
|
|
|
- text: '删除',
|
|
|
|
|
- style: {
|
|
|
|
|
- backgroundColor: '#f56c6c'
|
|
|
|
|
- }
|
|
|
|
|
- }]
|
|
|
|
|
- this.optionsList = arr1
|
|
|
|
|
|
|
+ if (this.belowStandard == 0) {
|
|
|
|
|
+ let arr1 = [{
|
|
|
|
|
+ text: '空瓶',
|
|
|
|
|
+ style: {
|
|
|
|
|
+ backgroundColor: '#ff9900'
|
|
|
|
|
+ }
|
|
|
|
|
+ }, {
|
|
|
|
|
+ text: '删除',
|
|
|
|
|
+ style: {
|
|
|
|
|
+ backgroundColor: '#f56c6c'
|
|
|
|
|
+ }
|
|
|
|
|
+ }]
|
|
|
|
|
+ this.optionsList = arr1
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.optionsList = this.options
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
this.optionsList = this.options
|
|
this.optionsList = this.options
|
|
|
}
|
|
}
|
|
@@ -330,6 +344,12 @@
|
|
|
url: '/pages/information/cylinder?status=' + statuNum + '&title=' + hintTitle
|
|
url: '/pages/information/cylinder?status=' + statuNum + '&title=' + hintTitle
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ // 钢瓶详情
|
|
|
|
|
+ goCylinder(event){
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '/pages/information/cylinderDetails?inner_code=' + event.inner_code
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
// 调拨钢瓶
|
|
// 调拨钢瓶
|
|
|
transferCylinders() {
|
|
transferCylinders() {
|
|
|
let statuNum = ''
|
|
let statuNum = ''
|