This commit is contained in:
2025-07-08 17:54:02 +08:00
parent 95f2fed261
commit 9e02823637
15 changed files with 487 additions and 181 deletions

View File

@@ -11,7 +11,6 @@
<view class="zd-col-17">
<search-box
v-model="val1"
@handleChange="handleChange"
/>
</view>
</view>
@@ -31,19 +30,19 @@
<input type="text" class="filter_input" v-model="val2">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-row border-bottom" v-show="index == '2'">
<view class="zd-col-7">
<span class="filter_label">目标区域</span>
</view>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_pdaPalletIostorinvIn">确认</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_transferConfirm">确认</button>
</view>
</view>
</template>
@@ -51,7 +50,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getStructCount, pdaPalletIostorinvIn} from '@/utils/getData2.js'
import {getSect, getRegion, transferConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -62,53 +61,55 @@
title: '',
val1: '',
val2: '',
options: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
options: [{text:'站点', value:'1'},{text:'区域',value: '2'}],
index: '',
// options2: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
options2: [],
index2: '',
disabled: false,
currentData: {},
kwData: {}
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._getRegion()
},
methods: {
handleChange (e) {
if (e) {
this._getStructCount(e)
}
},
async _getStructCount (e) {
async _getRegion () {
try {
let res = await getStructCount(e)
let res = await getRegion()
if (res) {
this.kwData = res
this.options2 = res
} else {
this.kwData = {}
this.options2 =[]
}
} catch (e) {
this.kwData = {}
this.options2 = []
}
},
selectChange (e) {
this.index = e
},
selectChange2 (e) {
this.index2 = e
},
clearUp () {
this.val1 = ''
this.index = ''
this.index2 = ''
this.disabled = false
this.kwData = {}
},
async _pdaPalletIostorinvIn () {
async _transferConfirm () {
this.disabled = true
if (!this.val1 || !this.index) {
this.disabled = false
return
}
try {
let res = await pdaPalletIostorinvIn(this.val1, this.index)
let res = await transferConfirm(this.val1, this.val2, this.index2)
if (res.code === '200') {
uni.showToast({
title: res.msg,