纸管绑定
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
<button class="zd-col-5 btn-submit btn-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !val2}" :disabled="disabled" @tap="_doStockAreaBinding">绑定</button>
|
||||
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1}" :disabled="disabled" @tap="_doStockAreaUnbinding">解绑</button>
|
||||
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !val2}" :disabled="disabled" @tap="_instorStock">管芯入库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -33,7 +34,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {doStockAreaBinding, doStockAreaUnbinding} from '@/utils/getData3.js'
|
||||
import {doStockAreaBinding, doStockAreaUnbinding, instorStock} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -85,6 +86,23 @@
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _instorStock () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await instorStock(this.val1, this.val2, '1')
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
|
||||
Reference in New Issue
Block a user