扫码异常接口缓存线接口
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
</view>
|
||||
<view class="search-item search-item-btns">
|
||||
<button class="confirm-button" @tap="_materialQuery">查询</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !pkId}" :disabled="disabled" @tap="toSure">确认</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !pkId}" @tap="toSure">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -29,7 +29,7 @@
|
||||
<tbody>
|
||||
<tr v-for="e in dataList" :key="e.material_uuid" @click="toRadio(e)">
|
||||
<td>
|
||||
<view class="iconfont icon-check" :class="{'icon-checked': pkId === e.material_uuid}"></view>
|
||||
<view class="iconfont icon-check" :class="{'icon-checked': pkId === e.material_id}"></view>
|
||||
</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
@@ -53,7 +53,6 @@
|
||||
return {
|
||||
val1: '',
|
||||
dataList: [],
|
||||
disabled: false,
|
||||
pkId: '',
|
||||
pkObj: {}
|
||||
};
|
||||
@@ -66,13 +65,16 @@
|
||||
},
|
||||
async _materialQuery () {
|
||||
let res = await materialQuery(this.val1)
|
||||
this.dataList = [...res.result]
|
||||
this.dataList = [...res]
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.material_uuid ? '' : e.material_uuid
|
||||
this.pkObj = this.pkId === material_uuid ? e : {}
|
||||
this.pkId = this.pkId === e.material_id ? '' : e.material_id
|
||||
this.pkObj = this.pkId === e.material_id ? e : {}
|
||||
},
|
||||
toSure () {
|
||||
if (!this.pkId) {
|
||||
return
|
||||
}
|
||||
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user