二次确认

This commit is contained in:
2025-06-30 17:13:34 +08:00
parent f368f15a99
commit 20378b1b6e
10 changed files with 131 additions and 63 deletions

View File

@@ -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('filter.box-no')}}</span>
</view>
@@ -12,7 +12,7 @@
<link-scan ref="scanChild" @getScanlist="getScanlist"/>
</view>
</view>
<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>
@@ -30,7 +30,7 @@
</view>
<view class="zd-row submitbar">
<button class="zd-col-6 btn-submit btn-default letter-30" @tap="clearUp">{{$t('button.clear')}}</button>
<button class="zd-col-15 btn-submit btn-success letter-30" :class="{'btn-info': !val2 || !val3}" :disabled="disabled" @tap="_twoPdaBoxIn">{{$t('button.storage-confirm')}}</button>
<button class="zd-col-15 btn-submit btn-success letter-30" :class="{'btn-info': !val2 || !val3}" :disabled="disabled" @tap="handleConfirm">{{$t('button.storage-confirm')}}</button>
</view>
</view>
</template>
@@ -39,6 +39,7 @@
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import LinkScan from '@/components/LinkScan.vue'
import { confirmAction } from '@/utils/utils.js'
import {twoPdaBoxIn} from '@/utils/getData3.js'
export default {
components: {
@@ -66,12 +67,17 @@
selectChange (e) {
this.index = e
},
async _twoPdaBoxIn () {
this.disabled = true
async handleConfirm() {
if (!this.val2 || !this.val3) {
this.disabled = false
return
}
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
if (isConfirmed) {
this._twoPdaBoxIn()
}
},
async _twoPdaBoxIn () {
this.disabled = true
try {
let res = await twoPdaBoxIn(this.val2, this.val3, this.index)
uni.showToast({