change
This commit is contained in:
@@ -71,7 +71,7 @@
|
|||||||
<view class="input-wrapper">
|
<view class="input-wrapper">
|
||||||
<input
|
<input
|
||||||
class="input-field"
|
class="input-field"
|
||||||
v-model="materialCode"
|
v-model="vehicleCode"
|
||||||
placeholder="请输入或选择料桶编码"
|
placeholder="请输入或选择料桶编码"
|
||||||
placeholder-class="placeholder"
|
placeholder-class="placeholder"
|
||||||
@input="onInput"
|
@input="onInput"
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
<picker
|
<picker
|
||||||
class="picker"
|
class="picker"
|
||||||
mode="selector"
|
mode="selector"
|
||||||
:range="materialOptions"
|
:range="vehicleOptions"
|
||||||
:value="selectedIndex"
|
:value="selectedIndex"
|
||||||
@change="onPickerChange"
|
@change="onPickerChange"
|
||||||
>
|
>
|
||||||
@@ -120,10 +120,10 @@
|
|||||||
index: '',
|
index: '',
|
||||||
// options1: [{text:'t1', value: 't1'}, {text:'t2', value: 't2'}],
|
// options1: [{text:'t1', value: 't1'}, {text:'t2', value: 't2'}],
|
||||||
// index1: '',
|
// index1: '',
|
||||||
materialCode: '',
|
vehicleCode: '',
|
||||||
selectedIndex: 0,
|
selectedIndex: 0,
|
||||||
materialOptions: [],
|
vehicleOptions: [],
|
||||||
// materialOptions: [
|
// vehicleOptions: [
|
||||||
// 'TB-001',
|
// 'TB-001',
|
||||||
// 'TB-002',
|
// 'TB-002',
|
||||||
// 'TB-003',
|
// 'TB-003',
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
onPickerChange(e) {
|
onPickerChange(e) {
|
||||||
const index = e.detail.value
|
const index = e.detail.value
|
||||||
this.selectedIndex = index
|
this.selectedIndex = index
|
||||||
this.materialCode = this.materialOptions[index]
|
this.vehicleCode = this.vehicleOptions[index]
|
||||||
},
|
},
|
||||||
selectChange (e) {
|
selectChange (e) {
|
||||||
this.index = e
|
this.index = e
|
||||||
@@ -179,12 +179,12 @@
|
|||||||
try {
|
try {
|
||||||
let res = await vehiclelist()
|
let res = await vehiclelist()
|
||||||
if (res) {
|
if (res) {
|
||||||
this.materialOptions = res.data.map(item => item.value);
|
this.vehicleOptions = res.data.map(item => item.value);
|
||||||
} else {
|
} else {
|
||||||
this.materialOptions = []
|
this.vehicleOptions = []
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.materialOptions = []
|
this.vehicleOptions = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toJump () {
|
toJump () {
|
||||||
@@ -235,7 +235,7 @@
|
|||||||
async _combination () {
|
async _combination () {
|
||||||
try {
|
try {
|
||||||
let selobj = this.options.find(item => item.value === this.index)
|
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({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
|
|||||||
@@ -155,6 +155,8 @@
|
|||||||
clearUp2 () {
|
clearUp2 () {
|
||||||
this.index = ''
|
this.index = ''
|
||||||
this.val2 = ''
|
this.val2 = ''
|
||||||
|
this.currentData = {}
|
||||||
|
this._structList()
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
},
|
},
|
||||||
clearUp3 () {
|
clearUp3 () {
|
||||||
|
|||||||
Reference in New Issue
Block a user