|
@@ -17,7 +17,7 @@
|
|
|
<!-- 在这里放置可滚动的内容 -->
|
|
|
<view v-if="list.length > 0">
|
|
|
<u-swipe-action>
|
|
|
- <u-swipe-action-item :name="index" :options="options" 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">
|
|
|
<view class="card_dinay">
|
|
|
<view style="display: flex;align-items: center;">
|
|
@@ -77,6 +77,7 @@
|
|
|
loadingMore: true,
|
|
|
allotFlag: true,
|
|
|
disqualification: true,
|
|
|
+ optionsList: [],
|
|
|
options: [{
|
|
|
text: '删除',
|
|
|
style: {
|
|
@@ -102,6 +103,7 @@
|
|
|
this.allotFlag = true
|
|
|
this.disqualification = true
|
|
|
}
|
|
|
+ this.optionsList = this.options
|
|
|
this.getList()
|
|
|
},
|
|
|
methods: {
|
|
@@ -129,7 +131,13 @@
|
|
|
} else if (this.current == 1) {
|
|
|
this.delSteelCylinder(value.id, event.name)
|
|
|
} else if (this.current == 3) {
|
|
|
- this.delSteelCylinder(value.id, event.name)
|
|
|
+ let arr = []
|
|
|
+ if (event.index == 0) {
|
|
|
+ arr.push(value.inner_code)
|
|
|
+ this.editSteelCylinder('2', arr, event.name)
|
|
|
+ } else {
|
|
|
+ this.delSteelCylinder(value.id, event.name)
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
// 修改钢瓶状态
|
|
@@ -187,27 +195,38 @@
|
|
|
this.disqualification = true
|
|
|
}
|
|
|
if (value.index == 1) {
|
|
|
- let arr = {
|
|
|
+ let arr = [{
|
|
|
text: '超期',
|
|
|
style: {
|
|
|
backgroundColor: '#ff9900'
|
|
|
}
|
|
|
- }
|
|
|
- let arr1 = {
|
|
|
+ }, {
|
|
|
text: '报废',
|
|
|
style: {
|
|
|
backgroundColor: '#fab6b6'
|
|
|
}
|
|
|
- }
|
|
|
- this.options.unshift(arr1)
|
|
|
- this.options.unshift(arr)
|
|
|
+ }, {
|
|
|
+ text: '删除',
|
|
|
+ style: {
|
|
|
+ backgroundColor: '#f56c6c'
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ this.optionsList = arr
|
|
|
+ } else if (value.index == 2) {
|
|
|
+ let arr1 = [{
|
|
|
+ text: '空瓶',
|
|
|
+ style: {
|
|
|
+ backgroundColor: '#ff9900'
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '删除',
|
|
|
+ style: {
|
|
|
+ backgroundColor: '#f56c6c'
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ this.optionsList = arr1
|
|
|
} else {
|
|
|
- if (this.options[0].text == '超期') {
|
|
|
- this.options.splice(0, 1)
|
|
|
- }
|
|
|
- if (this.options[0].text == '报废') {
|
|
|
- this.options.splice(0, 1)
|
|
|
- }
|
|
|
+ this.optionsList = this.options
|
|
|
}
|
|
|
this.current = value.index + 1
|
|
|
this.Pagination.PageIndex = 1
|
|
@@ -217,7 +236,22 @@
|
|
|
// 超期/报废
|
|
|
standardClick(event) {
|
|
|
this.belowStandard = event.index
|
|
|
-
|
|
|
+ if (event.index == 0) {
|
|
|
+ let arr1 = [{
|
|
|
+ text: '空瓶',
|
|
|
+ style: {
|
|
|
+ backgroundColor: '#ff9900'
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '删除',
|
|
|
+ style: {
|
|
|
+ backgroundColor: '#f56c6c'
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ this.optionsList = arr1
|
|
|
+ } else {
|
|
|
+ this.optionsList = this.options
|
|
|
+ }
|
|
|
this.Pagination.PageIndex = 1
|
|
|
this.list = []
|
|
|
this.getList()
|