二次sure

This commit is contained in:
2025-07-01 11:18:01 +08:00
parent f432ec99d9
commit f50619c104
13 changed files with 182 additions and 94 deletions

View File

@@ -10,7 +10,7 @@
<uni-data-select v-model="index1" :placeholder="$t('uni.dataSelect.placeholder')" :localdata="options1" @change="selectChange1"></uni-data-select>
</view>
</view>
<view class="filter_item">
<view class="filter_item is-required">
<view class="filter_label_wraper">
<span class="filter_label">{{$t('filter.corespecifications')}}</span>
</view>
@@ -52,7 +52,7 @@
</view>
<view class="zd-row submitbar">
<button class="zd-col-5 btn-submit btn-default letter-30" @tap="clearUp">{{$t('button.clear')}}</button>
<button class="zd-col-8 btn-submit btn-success letter-30" :class="{'btn-info': !index2}" :disabled="disabled" @tap="_moveStock">{{$t('button.stockup')}}</button>
<button class="zd-col-8 btn-submit btn-success letter-30" :class="{'btn-info': !index2}" :disabled="disabled" @tap="handleConfirm">{{$t('button.stockup')}}</button>
<button class="zd-col-8 btn-submit btn-success" @tap="_showPapervehicleView">{{$t('button.refresh')}}</button>
</view>
<up-top ref="UT" :scrollTop="top"></up-top>
@@ -63,6 +63,7 @@
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import NumberInput from '@/components/NumberInput.vue'
import { confirmAction } from '@/utils/utils.js'
import {showPapervehicleView, moveStock, queryProductArea, queryPaperMaterial} from '@/utils/getData4.js'
export default {
components: {
@@ -124,12 +125,17 @@
let res = await paperQueryPaperMaterial()
this.dataList = [...res.rows]
},
async _moveStock () {
this.disabled = true
async handleConfirm() {
if (!this.index1 || !this.index2) {
this.disabled = false
return
}
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
if (isConfirmed) {
this._moveStock()
}
},
async _moveStock () {
this.disabled = true
try {
let res = await moveStock(this.pkObj)
uni.showToast({