no message
This commit is contained in:
@@ -5,17 +5,18 @@
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">大小卷</span>
|
||||
<span class="filter_label">大/小卷</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
<view class="zd-col-17 filter_picker">
|
||||
<picker @change="pickerChange" :value="index1" :range="options1" range-key="text">
|
||||
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<uni-icons type="right" size="14" color="#999"></uni-icons>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">设备</span>
|
||||
<span class="filter_label">缓存架</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<zxz-uni-data-select v-model="index" :localdata="options"></zxz-uni-data-select>
|
||||
@@ -25,7 +26,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-8 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !index || !val1}" :disabled="disabled" @tap="_temporaryStorage">确认暂存</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !index || index1 === ''}" :disabled="disabled" @tap="_temporaryStorage">确认暂存</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -33,7 +34,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getSlitterDeviceBox, temporaryStorage} from '@/utils/getData2.js'
|
||||
import {queryOrderInfo, temporaryStorage} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -42,7 +43,8 @@
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
options1: [{value: '1', text: '大卷'}, {value: '2', text: '小卷'}],
|
||||
index1: '',
|
||||
index: '',
|
||||
options: [],
|
||||
disabled: false
|
||||
@@ -50,26 +52,33 @@
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._getSlitterDeviceBox()
|
||||
this._queryOrderInfo()
|
||||
},
|
||||
methods: {
|
||||
async _getSlitterDeviceBox () {
|
||||
let res = await getSlitterDeviceBox()
|
||||
this.options = [...res]
|
||||
pickerChange (e) {
|
||||
this.index1 = e.detail.value
|
||||
},
|
||||
async _queryOrderInfo () {
|
||||
let res = await queryOrderInfo()
|
||||
this.options = [...res.data]
|
||||
this.options.map(el => {
|
||||
this.$set(el, 'text', el.zc_point)
|
||||
this.$set(el, 'value', el.zc_point)
|
||||
})
|
||||
},
|
||||
clearUp () {
|
||||
this.index = ''
|
||||
this.val1 = ''
|
||||
this.index1 = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _temporaryStorage () {
|
||||
this.disabled = true
|
||||
if (!this.index || !this.val1) {
|
||||
if (!this.index || this.index1 === '') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await temporaryStorage(this.val1, this.index)
|
||||
let res = await temporaryStorage(this.index1, this.index)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
Reference in New Issue
Block a user