diff --git a/pages/modules/carry-task.vue b/pages/modules/carry-task.vue index 7d64d2c..ff9291a 100644 --- a/pages/modules/carry-task.vue +++ b/pages/modules/carry-task.vue @@ -6,20 +6,20 @@ 起始点位 - + 目标点位 - + - + @@ -35,8 +35,10 @@ return { dataList: [], disabled: false, - val1: '', - val2: '' + options1: [], + index1: '', + options2: [], + index2: '', }; }, created () { @@ -44,28 +46,42 @@ this._pointSearch2('YL') }, methods: { + selectChange1 (e) { + this.index1 = e + }, + selectChange2 (e) { + this.index2 = e + }, /** 点位查询1 */ async _pointSearch1 (a) { let res = await pointSearch(a) - this.val1 = res[0].point_code + this.options1 = [...res] + this.options1.map(el => { + this.$set(el, 'value', el.point_code) + this.$set(el, 'text', el.point_name) + }) }, /** 点位查询2 */ async _pointSearch2 (a) { let res = await pointSearch(a) - this.val2 = res[0].point_code + this.options2 = [...res] + this.options2.map(el => { + this.$set(el, 'value', el.point_code) + this.$set(el, 'text', el.point_name) + }) }, toClear () { - this.val1 = '' - this.val2 = '' + this.index1 = '' + this.index2 = '' }, async _taskCarry () { this.disabled = true - if (!this.val1 || !this.val2) { + if (!this.index1 || !this.index2) { this.disabled = false return } try { - let res = await taskCarry(this.val1, this.val2) + let res = await taskCarry(this.index1, this.index2) this.disabled = false uni.showToast({ title: res.message, diff --git a/pages/modules/rawmater-instore.vue b/pages/modules/rawmater-instore.vue index 1b497f0..646aa38 100644 --- a/pages/modules/rawmater-instore.vue +++ b/pages/modules/rawmater-instore.vue @@ -6,7 +6,7 @@ 起始点位 - + @@ -35,7 +35,7 @@ - + @@ -53,7 +53,8 @@ return { dataList: [], disabled: false, - val1: '', + options1: [], + index1: '', val2: '', val3: '', val4: '' @@ -63,25 +64,32 @@ this._pointSearch('SSX') }, methods: { - /** 点位查询 */ + selectChange1 (e) { + this.index1 = e + }, + /** 点位查询 下拉框显示 */ async _pointSearch (a) { let res = await pointSearch(a) - this.val1 = res[0].point_code + this.options1 = [...res] + this.options1.map(el => { + this.$set(el, 'value', el.point_code) + this.$set(el, 'text', el.point_name) + }) }, toClear () { - this.val1 = '' + this.index1 = '' this.val2 = '' this.val3 = '' this.val4 = '' }, async _yclrk () { this.disabled = true - if (!this.val1 || !this.val2 || !this.val3 || !this.val4) { + if (!this.index1 || !this.val2 || !this.val3 || !this.val4) { this.disabled = false return } try { - let res = await yclrk(this.val1, this.val2, this.val3, this.val4) + let res = await yclrk(this.index1, this.val2, this.val3, this.val4) this.disabled = false uni.showToast({ title: res.message, diff --git a/pages/modules/rawmater-outstore.vue b/pages/modules/rawmater-outstore.vue index cbe4c5e..5d29af8 100644 --- a/pages/modules/rawmater-outstore.vue +++ b/pages/modules/rawmater-outstore.vue @@ -6,13 +6,13 @@ 起始点位 - + 回温模式 - + @@ -25,7 +25,7 @@ - + @@ -41,9 +41,10 @@ return { dataList: [], disabled: false, - options1: [{value: '0',text: '普通'}, {value: '1',text: '快速'}], + options1: [], index1: '', - val1: '', + options2: [{value: '0',text: '普通'}, {value: '1',text: '快速'}], + index2: '', val2: '' }; }, @@ -54,23 +55,30 @@ selectChange1 (e) { this.index1 = e }, - /** 点位查询 */ + selectChange2 (e) { + this.index2 = e + }, + /** 点位查询 下拉框显示 */ async _pointSearch (a) { let res = await pointSearch(a) - this.val1 = res[0].point_code + this.options1 = [...res] + this.options1.map(el => { + this.$set(el, 'value', el.point_code) + this.$set(el, 'text', el.point_name) + }) }, toClear () { - this.val1 = '' + this.index1 = '' this.val2 = '' }, async _yclck () { this.disabled = true - if (!this.val1 || this.index1 || !this.val2) { + if (!this.index1 || this.index2 || !this.val2) { this.disabled = false return } try { - let res = await yclck(this.val1, this.index1, this.val2) + let res = await yclck(this.index1, this.index2, this.val2) this.disabled = false uni.showToast({ title: res.message,