纸管绑定
This commit is contained in:
@@ -127,6 +127,9 @@
|
|||||||
if (this.dataList.length >= 2) {
|
if (this.dataList.length >= 2) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (this.index1 === this.dataList[0].site) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.dataList.push({site: this.index1})
|
this.dataList.push({site: this.index1})
|
||||||
},
|
},
|
||||||
handleDelete (index) {
|
handleDelete (index) {
|
||||||
|
|||||||
@@ -32,18 +32,12 @@
|
|||||||
<uni-data-select v-model="index2" :placeholder="$t('uni.dataSelect.placeholder')" :localdata="options2" @change="selectChange2"></uni-data-select>
|
<uni-data-select v-model="index2" :placeholder="$t('uni.dataSelect.placeholder')" :localdata="options2" @change="selectChange2"></uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="filter_item">
|
|
||||||
<view class="filter_label">{{$t('filter.material')}}</view>
|
|
||||||
<view class="filter_input_wraper">
|
|
||||||
<uni-data-select v-model="index" :placeholder="$t('uni.dataSelect.placeholder')" :searchInput="true" :localdata="newoptions" @change="selectChange" @handleChange="handleChange" @showSelector="showSelector"></uni-data-select>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row submitbar">
|
<view class="zd-row submitbar">
|
||||||
<button class="zd-col-5 btn-submit btn-default" @tap="clearUp">{{$t('button.clear')}}</button>
|
<button class="zd-col-5 btn-submit btn-default" @tap="clearUp">{{$t('button.clear')}}</button>
|
||||||
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !index || !index1 || !index2 || !val3}" :disabled="disabled" @tap="_operateIvt('1')">{{$t('button.bind')}}</button>
|
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !index1 || !index2 || !val3}" :disabled="disabled" @tap="_operateIvt('1')">{{$t('button.bind')}}</button>
|
||||||
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !index || !index1 || !index2 || !val3}" :disabled="disabled" @tap="_operateIvt('2')">{{$t('button.cleanup')}}</button>
|
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !index1 || !index2 || !val3}" :disabled="disabled" @tap="_operateIvt('2')">{{$t('button.cleanup')}}</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -68,7 +62,6 @@
|
|||||||
options2: [{value: '1', text: '1'}, {value: '2', text: '2'}, {value: '3', text: '3'}, {value: '4', text: '4'}, {value: '5', text: '5'}],
|
options2: [{value: '1', text: '1'}, {value: '2', text: '2'}, {value: '3', text: '3'}, {value: '4', text: '4'}, {value: '5', text: '5'}],
|
||||||
index2: '',
|
index2: '',
|
||||||
options: [],
|
options: [],
|
||||||
index: '',
|
|
||||||
newoptions: [],
|
newoptions: [],
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
@@ -93,38 +86,17 @@
|
|||||||
selectChange2 (e) {
|
selectChange2 (e) {
|
||||||
this.index2 = e
|
this.index2 = e
|
||||||
},
|
},
|
||||||
selectChange (e) {
|
|
||||||
this.index = e
|
|
||||||
},
|
|
||||||
/** 模糊匹配 */
|
|
||||||
selectMatchItem (lists, keyWord) {
|
|
||||||
let resArr = []
|
|
||||||
lists.filter((item) => {
|
|
||||||
if (item.text.indexOf(keyWord) > -1) {
|
|
||||||
resArr.push(item)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return resArr
|
|
||||||
},
|
|
||||||
handleChange (e) {
|
|
||||||
if (e){
|
|
||||||
this.index = ''
|
|
||||||
this.newoptions = this.selectMatchItem(this.options, e)
|
|
||||||
} else {
|
|
||||||
this.newoptions = this.options
|
|
||||||
}
|
|
||||||
},
|
|
||||||
showSelector () {
|
showSelector () {
|
||||||
this.newoptions = this.options
|
this.newoptions = this.options
|
||||||
},
|
},
|
||||||
async _operateIvt (type) {
|
async _operateIvt (type) {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.val1 || !this.index || !this.index1 || !this.index2 || !this.val3) {
|
if (!this.val1 || !this.index1 || !this.index2 || !this.val3) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await operateIvt(type, this.val1, this.index1, this.index2, this.index, this.val3)
|
let res = await operateIvt(type, this.val1, this.index1, this.index2, this.val3)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -137,7 +109,6 @@
|
|||||||
clearUp () {
|
clearUp () {
|
||||||
this.val1 = ''
|
this.val1 = ''
|
||||||
this.val3 = ''
|
this.val3 = ''
|
||||||
this.index = ''
|
|
||||||
this.index1 = ''
|
this.index1 = ''
|
||||||
this.index2 = ''
|
this.index2 = ''
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,9 +155,9 @@ export const updatePackageInfo = (ivt, cn, code) => request({
|
|||||||
/**
|
/**
|
||||||
* 纸管绑定
|
* 纸管绑定
|
||||||
*/
|
*/
|
||||||
export const operateIvt = (type, vcode, rnum, cnum, code, pcode) => request({
|
export const operateIvt = (type, vcode, rnum, cnum, pcode) => request({
|
||||||
url:'api/pda/stockingivt/operateIvt',
|
url:'api/pda/stockingivt/operateIvt',
|
||||||
data: {type: type, vehicle_code: vcode, row_num: rnum, col_num: cnum, material_code: code, paper_code: pcode}
|
data: {type: type, vehicle_code: vcode, row_num: rnum, col_num: cnum, paper_code: pcode}
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* 分切暂存下料纸管绑定
|
* 分切暂存下料纸管绑定
|
||||||
|
|||||||
Reference in New Issue
Block a user