分切暂存清除
This commit is contained in:
@@ -22,9 +22,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submitbar">
|
||||
<button class="zd-col-5 btn-submit btn-default letter-30" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-8 btn-submit btn-success letter-30" :class="{'btn-info': !val1}" :disabled="disabled" @tap="_toCleanCutCacheInventory">清除</button>
|
||||
<button class="zd-col-8 btn-submit btn-success letter-30" :class="{'btn-info': !val1 || !val2}" :disabled="disabled1" @tap="_toSubvolumeBinding">绑定</button>
|
||||
<button class="zd-col-4 btn-submit btn-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-4 btn-submit btn-success" :class="{'btn-info': !val1}" :disabled="disabled" @tap="_toCleanCutCacheInventory">清除</button>
|
||||
<button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !val1 || !val2}" :disabled="disabled1" @tap="_toSubvolumeBinding">子卷绑定</button>
|
||||
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !val2}" :disabled="disabled2" @tap="_toShaftBinding">气胀轴绑定</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -32,7 +33,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {toCleanCutCacheInventory, toSubvolumeBinding} from '@/utils/getData3.js'
|
||||
import {toCleanCutCacheInventory, toSubvolumeBinding, toShaftBinding} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -43,7 +44,8 @@
|
||||
val1: '',
|
||||
val2: '',
|
||||
disabled: false,
|
||||
disabled1: false
|
||||
disabled1: false,
|
||||
disabled2: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -81,11 +83,29 @@
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
async _toShaftBinding () {
|
||||
this.disabled2 = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await toShaftBinding(this.val1, this.val2)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled2= false
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.disabled = false
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user