回收站恢复

This commit is contained in:
zmj 2024-05-16 11:57:36 +08:00
parent c4e545d92d
commit 31cce22ba3
2 changed files with 27 additions and 17 deletions

View File

@ -298,7 +298,7 @@
choseCity() {
this.positionType = 1;
getCity({
code: this.address.province_code
province_code: this.address.province_code
}).then(res => {
this.cityList = res.data
this.positionList = this.cityList

View File

@ -6,7 +6,15 @@
:actionStyle="{color: '#20B128'}" @search="keywordSearch" @custom="keywordSearch"
:clearabled="false" @clickIcon="scanQRcodes"></u-search>
</view>
<u-tabs :current='current' :list="tabList" @click="selectMenu" type='primary' lineColor='#32BB3B'></u-tabs>
<u-tabs @touchend.stop :current='current' :list="tabList" @click="selectMenu" type='primary'
lineColor='#32BB3B'></u-tabs>
<view class="wrapper" style="background-color: #F1F1F1;">
<view class='product_list' v-if="productList && productList.length > 0">
<view v-for="(item,index) in productList" :key="index" class="card">
@ -54,7 +62,8 @@
@click="Fline(item)">
修改库存
</view>
<view v-if="where.type!=2 && where.type != 5" style="border-right: 1px solid #CECECE;flex: 1;text-align: center;"
<view v-if="where.type!=2 && where.type != 5"
style="border-right: 1px solid #CECECE;flex: 1;text-align: center;"
@click="Fline(item)">
修改库存
</view>
@ -71,7 +80,8 @@
<view v-if="where.type != 5" style="flex: 1;text-align: center;" @click="editGoods(item)">
编辑商品
</view>
<view v-if="where.type == 5" style="flex: 1;text-align: center;" @click="handleRestore(item)">
<view v-if="where.type == 5" style="flex: 1;text-align: center;"
@click="handleRestore(item)">
恢复
</view>
</view>
@ -834,7 +844,6 @@
// this.$set(this, 'num', -1);
})
.catch(rej => {
this.$set(this, 'num', -1);
Toast(`${rej}, 删除失败`);
}) :
@ -845,6 +854,7 @@
icon: 'success'
}, () => {
that.productList.splice(index, 1);
that.getProductTitle()
});
this.$set(this, 'num', -1);
})
@ -861,19 +871,19 @@
let index = this.productList.findIndex(items => items.product_id == item.product_id)
let that = this
productRestore(that.mer_id, item.product_id)
.then(res => {
that.$util.Tips({
title: res.message,
icon: 'success'
});
that.getList(this.mer_id, true)
// this.$set(this, 'num', -1);
})
.catch(rej => {
.then(res => {
that.$util.Tips({
title: res.message,
icon: 'success'
});
that.productList.splice(index, 1);
that.getProductTitle()
})
.catch(rej => {
this.$set(this, 'num', -1);
Toast(`${rej}, 删除失败`);
})
this.$set(this, 'num', -1);
Toast(`${rej}, 删除失败`);
})
this.showOverly = false
},