二次确认
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="filter_item">
|
||||
<view class="filter_item is-required">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">{{$t('grid.point-code')}}</span>
|
||||
</view>
|
||||
@@ -12,7 +12,7 @@
|
||||
<search-box v-model="val1" @handleChange="handleChange1"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_item is-required">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">{{$t('filter.empty-shaft')}}/{{$t('filter.mother-roll')}}</span>
|
||||
</view>
|
||||
@@ -31,8 +31,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submitbar">
|
||||
<button class="zd-col-11 btn-submit btn-success letter-30" :class="{'btn-info': !val1 || !val2}" :disabled="disabled" @tap="_pointOperate('1')">绑定</button>
|
||||
<button class="zd-col-11 btn-submit btn-success letter-30" :class="{'btn-info': !val1 || !val2}" :disabled="disabled" @tap="_pointOperate('2')">解绑</button>
|
||||
<button class="zd-col-11 btn-submit btn-success letter-30" :class="{'btn-info': !val1 || !val2}" :disabled="disabled" @tap="handleConfirm('1')">绑定</button>
|
||||
<button class="zd-col-11 btn-submit btn-success letter-30" :class="{'btn-info': !val1 || !val2}" :disabled="disabled" @tap="handleConfirm('2')">解绑</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -40,6 +40,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import { confirmAction } from '@/utils/utils.js'
|
||||
import {pointOperate, pointStatusQuery} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -72,12 +73,17 @@
|
||||
this.val2 = res.data.container_name
|
||||
this.val3 = res.data.have_goods
|
||||
},
|
||||
async _pointOperate (type) {
|
||||
this.disabled = true
|
||||
async handleConfirm(type) {
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._pointOperate(type)
|
||||
}
|
||||
},
|
||||
async _pointOperate (type) {
|
||||
this.disabled = true
|
||||
try {
|
||||
let res = await pointOperate(this.val1, this.val2, type)
|
||||
uni.showToast({
|
||||
|
||||
Reference in New Issue
Block a user