样式
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>点位</th>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
@@ -45,6 +46,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.point_code === pkId}">
|
||||
<td>{{Number(i) + 1}}</td>
|
||||
<td>{{e.point_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
@@ -65,7 +67,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryProductArea, queryMaterialInfo, emptyConfirm} from '@/utils/getData2.js'
|
||||
import {queryProductArea, queryMaterialInfo1, emptyConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -80,16 +82,14 @@
|
||||
qty: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
created () {
|
||||
// this._queryProductArea()
|
||||
this._queryProductArea()
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
console.log(e)
|
||||
},
|
||||
/** 选择器 */
|
||||
selectChange(e) {
|
||||
this.index = e
|
||||
@@ -104,18 +104,18 @@
|
||||
if (!this.val1 || !this.val2 || !this.index) {
|
||||
return
|
||||
}
|
||||
let res = await queryMaterialInfo(this.val1, this.val2, this.options[this.index].value)
|
||||
this.dataList = [...res.rows]
|
||||
let res = await queryMaterialInfo1(this.val1, this.val2, this.options[this.index].value)
|
||||
this.dataList = [...res.rows]
|
||||
},
|
||||
/** 确认 */
|
||||
async _emptyConfirm () {
|
||||
this.disabled = true
|
||||
if (!pkId) {
|
||||
if (!this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await emptyConfirm()
|
||||
let res = await emptyConfirm(this.pkObj, this.qty, this.val1)
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
@@ -127,10 +127,17 @@
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === point_code ? '' : e.point_code
|
||||
this.pkObj = this.pkId === point_code ? e : {}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
.slide_new table td:first-child, .slide_new table th:first-child
|
||||
width 92rpx
|
||||
.slide_new table td:nth-child(2), .slide_new table th:nth-child(2)
|
||||
position sticky
|
||||
left 92rpx
|
||||
z-index 102
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user