bug
This commit is contained in:
@@ -3,19 +3,6 @@
|
|||||||
<nav-bar :title="title"></nav-bar>
|
<nav-bar :title="title"></nav-bar>
|
||||||
<view class="zd_content">
|
<view class="zd_content">
|
||||||
<view class="zd_wrapper">
|
<view class="zd_wrapper">
|
||||||
<view class="zd-row border-bottom">
|
|
||||||
<view class="zd-col-5">
|
|
||||||
<span class="filter_label">区域</span>
|
|
||||||
</view>
|
|
||||||
<view class="zd-col-19 filter_select">
|
|
||||||
<zxz-uni-data-select
|
|
||||||
v-model="index"
|
|
||||||
:localdata="options"
|
|
||||||
:multiple="true"
|
|
||||||
:collapseTags="true"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="zd-row">
|
<view class="zd-row">
|
||||||
<view class="zd-col-5">
|
<view class="zd-col-5">
|
||||||
<span class="filter_label">类型</span>
|
<span class="filter_label">类型</span>
|
||||||
@@ -31,8 +18,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-5 button-default" @tap="clearUp">清空</button>
|
<button class="zd-col-5 button-default" @tap="clearUp">清空</button>
|
||||||
<button class="zd-col-8 button-primary" :class="{'button-info': index.length === 0 || !index1}" :disabled="disabled" @tap="_updateRouteStatus('1')">锁定</button>
|
<button class="zd-col-8 button-primary" :class="{'button-info': !index1}" :disabled="disabled" @tap="_updateRouteStatus('1')">锁定</button>
|
||||||
<button class="zd-col-8 button-primary" :class="{'button-info': index.length === 0 || !index1}" :disabled="disabled" @tap="_updateRouteStatus('0')">释放</button>
|
<button class="zd-col-8 button-primary" :class="{'button-info': !index1}" :disabled="disabled" @tap="_updateRouteStatus('0')">释放</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -40,8 +27,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
// import {regionList} from '@/utils/mork2.js'
|
import {updateRouteStatus} from '@/utils/getData2.js'
|
||||||
import {regionList, updateRouteStatus} from '@/utils/getData2.js'
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -50,34 +36,23 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
options: [],
|
|
||||||
index: [],
|
|
||||||
options1: [{value: '1', text: '外协到冲床一'}, {value: '2', text: '外协到冲床二'}, {value: '3', text: '外协到冲床三'}, {value: '4', text: '外协到激光'}],
|
options1: [{value: '1', text: '外协到冲床一'}, {value: '2', text: '外协到冲床二'}, {value: '3', text: '外协到冲床三'}, {value: '4', text: '外协到激光'}],
|
||||||
index1: [],
|
index1: '',
|
||||||
multiple: true,
|
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
this._regionList()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async _regionList () {
|
|
||||||
let res = await regionList()
|
|
||||||
this.options = [...res.content]
|
|
||||||
this.options.map(el => {
|
|
||||||
this.$set(el, 'text', el.label)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
async _updateRouteStatus (type) {
|
async _updateRouteStatus (type) {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (this.index.length === 0 || !this.index1) {
|
if (!this.index1) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await updateRouteStatus(this.index, this.index1, type)
|
let res = await updateRouteStatus(this.index1, type)
|
||||||
this.clearUp()
|
this.clearUp()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
@@ -88,7 +63,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
clearUp () {
|
clearUp () {
|
||||||
this.index = []
|
|
||||||
this.index1 = ''
|
this.index1 = ''
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export const updateOrder = (data) => request({
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
// 路线锁定
|
// 路线锁定
|
||||||
export const updateRouteStatus = (code, type, status) => request({
|
export const updateRouteStatus = (type, status) => request({
|
||||||
url:'api/handheld/updateRouteStatus',
|
url:'api/handheld/updateRouteStatus',
|
||||||
data: {region_code: code, type: type, status: status}
|
data: {type: type, status: status}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user