This commit is contained in:
2025-11-13 17:55:30 +08:00
parent d0ff76238e
commit a10a0543c7
2 changed files with 12 additions and 10 deletions

View File

@@ -71,7 +71,7 @@
<view class="input-wrapper">
<input
class="input-field"
v-model="materialCode"
v-model="vehicleCode"
placeholder="请输入或选择料桶编码"
placeholder-class="placeholder"
@input="onInput"
@@ -79,7 +79,7 @@
<picker
class="picker"
mode="selector"
:range="materialOptions"
:range="vehicleOptions"
:value="selectedIndex"
@change="onPickerChange"
>
@@ -120,10 +120,10 @@
index: '',
// options1: [{text:'t1', value: 't1'}, {text:'t2', value: 't2'}],
// index1: '',
materialCode: '',
vehicleCode: '',
selectedIndex: 0,
materialOptions: [],
// materialOptions: [
vehicleOptions: [],
// vehicleOptions: [
// 'TB-001',
// 'TB-002',
// 'TB-003',
@@ -154,7 +154,7 @@
onPickerChange(e) {
const index = e.detail.value
this.selectedIndex = index
this.materialCode = this.materialOptions[index]
this.vehicleCode = this.vehicleOptions[index]
},
selectChange (e) {
this.index = e
@@ -179,12 +179,12 @@
try {
let res = await vehiclelist()
if (res) {
this.materialOptions = res.data.map(item => item.value);
this.vehicleOptions = res.data.map(item => item.value);
} else {
this.materialOptions = []
this.vehicleOptions = []
}
} catch (e) {
this.materialOptions = []
this.vehicleOptions = []
}
},
toJump () {
@@ -235,7 +235,7 @@
async _combination () {
try {
let selobj = this.options.find(item => item.value === this.index)
let res = await combination(this.currentData.vehicle_code, this.currentData.pcsn, this.currentData.material_id, selobj.value, selobj.text, this.currentData.single_weight)
let res = await combination(this.vehicleCode, this.currentData.pcsn, this.currentData.material_id, selobj.value, selobj.text, this.currentData.single_weight)
uni.showToast({
title: res.message,
icon: 'none'

View File

@@ -155,6 +155,8 @@
clearUp2 () {
this.index = ''
this.val2 = ''
this.currentData = {}
this._structList()
this.disabled2 = false
},
clearUp3 () {