This commit is contained in:
jia 2023-09-13 10:56:26 +08:00
parent 5937911cda
commit 817f410089
2 changed files with 16 additions and 7 deletions

View File

@ -187,7 +187,7 @@
// #endif // #endif
}, },
onLoad(options) { onLoad(options) {
console.log(options.type);
this.id = options.id; this.id = options.id;
this.order_id = options.order_id; this.order_id = options.order_id;
this.tabActive = options.type || 1; this.tabActive = options.type || 1;

View File

@ -249,14 +249,14 @@
}, },
onLoad(options) { onLoad(options) {
this.mer_id = options.mer_id; this.mer_id = options.mer_id;
this.getList(this.mer_id,true); this.getList(this.mer_id, true);
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.where.page = 1 this.where.page = 1
this.productList = [] this.productList = []
this.loading = false this.loading = false
this.loaded = false this.loaded = false
this.getList(this.mer_id,false); this.getList(this.mer_id, false);
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
onReachBottom() { onReachBottom() {
@ -264,7 +264,7 @@
if (this.status == 'nomore') return; if (this.status == 'nomore') return;
this.status = 'loading'; this.status = 'loading';
this.where.page = ++this.where.page; this.where.page = ++this.where.page;
this.getList(this.mer_id,true); this.getList(this.mer_id, true);
}, },
methods: { methods: {
@ -351,6 +351,7 @@
this.checkboxList1 = item.attrValue this.checkboxList1 = item.attrValue
// console.log(this.checkboxList1.length) // console.log(this.checkboxList1.length)
if (this.checkboxList1.length > 0) { if (this.checkboxList1.length > 0) {
this.show = true this.show = true
this.data.product_id = this.checkboxList1[0].product_id this.data.product_id = this.checkboxList1[0].product_id
this.data.unique = this.checkboxList1[0].unique this.data.unique = this.checkboxList1[0].unique
@ -378,7 +379,9 @@
}) })
} else { } else {
postImport(this.mer_id, this.data).then(res => { postImport(this.mer_id, this.data).then(res => {
// console.log(res); this.data.unique = ''
this.data.product_id=''
this.data.number=1
this.loading = false this.loading = false
this.loaded = false this.loaded = false
this.getList(this.mer_id, true); this.getList(this.mer_id, true);
@ -386,10 +389,16 @@
this.$util.Tips({ this.$util.Tips({
title: res.message title: res.message
}) })
this.data.unique = ''
this.data.product_id=''
this.data.number=1
}).catch(err => { }).catch(err => {
this.show = false this.show = false
this.data.unique = ''
this.data.product_id=''
this.data.number=1
this.$util.Tips({ this.$util.Tips({
title: '请选择规格后再次进行入库' title: '请选择规格后再次进行入库'
}) })
@ -457,7 +466,7 @@
if (that.loading || that.loaded) return; if (that.loading || that.loaded) return;
that.loading = true; that.loading = true;
if (ispage) { if (ispage) {
this.where.page=1 this.where.page = 1
that.productList = [] that.productList = []
} }
productLstApi(mer_id, that.where).then( productLstApi(mer_id, that.where).then(