This commit is contained in:
2022-11-16 17:07:37 +08:00
parent 93c25b7b22
commit b4585ccc70
28 changed files with 1330 additions and 12 deletions

View File

@@ -107,7 +107,7 @@
return
}
try {
let res = await stConfirm(this.dataList, this.val2, '2', this.isV)
let res = await stConfirm(this.dataList, this.val2, '2', this.isV, '', this.val1)
this.disabled = false
this._boxQuery(this.val1)
uni.showToast({

View File

@@ -68,6 +68,7 @@
</table>
</view>
</view>
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !val1 || !pkId || !index}" :disabled="disabled" @tap="_confirmInstor">确认入库</button>
@@ -89,12 +90,22 @@
return {
val1: '',
val2: '',
options: [{value: '0', label: '否'}, {value: '1', label: '是'}],
options: [{value: '0', text: '否'}, {value: '1', text: '是'}],
index: '',
dataList: [],
pkId: '',
pkObj: {},
disabled: false
disabled: false,
reload: false,
status: 'more',
contentText: {
contentdown: '查看更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
},
totalCount: 0,
pageNum: 0,
pageSize: 10
};
},
created () {
@@ -108,7 +119,31 @@
/** 初始化查询 */
async _coolIOQuery () {
let res = await coolIOQuery(this.val2)
this.dataList = [...res.data]
// this.dataList = [...res.data]
this.totalCount = res.total
if (res.total > 0) {
const dataMap = res.data
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
this.reload = false
} else {
this.dataList = []
}
if (this.totalCount == this.dataList.length) {
this.reload = false
this.status = 'noMore'
}
},
onReachBottom () {
if (this.totalCount > this.dataList.length) {
this.status = 'loading'
setTimeout(() => {
this.pageNum++
this._coolIOQuery()
}, 1000)
} else { //停止加载
this.status = 'noMore'
}
},
/** 确认 */
async _confirmInstor () {

View File

@@ -91,6 +91,7 @@
},
created () {
this._outcoolIOQuery()
this._queryProductArea()
},
methods: {
/** 选择器 */