| | |
| | | <view class="buttons"> |
| | | <view class="button" @click.stop="toDetail(item)">编辑</view> |
| | | |
| | | <view class="button" @click.stop="buttonStatus(item,'OFF')" |
| | | v-if="item.status=='UP'">下架</view> |
| | | <view class="button" @click.stop="buttonStatus(item,'UP')" |
| | | v-if="item.status=='OFF'||item.status=='FORCE_OFF'">上架</view> |
| | | <view class="button" @click.stop="buttonStatus(item,'off')" |
| | | v-if="item.status=='UP'||item.status=='up'">下架</view> |
| | | <view class="button" @click.stop="buttonStatus(item,'up')" |
| | | v-if="item.status=='OFF'||item.status=='off'||item.status=='FORCE_OFF'">上架</view> |
| | | <view class="button" @click.stop="openValue(item,'price')">价格</view> |
| | | <view class="button" @click.stop="openValue(item,'stock')">库存</view> |
| | | <view class="button" @click.stop="toDetailAdd(item)">复制</view> |
| | |
| | | inputplaceholder: '', |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | onShow(){ |
| | | if (this.sign['flower']) { |
| | | this.$store.dispatch('sign_clear', 'flower'); |
| | | this.refreshList() |
| | | } |
| | | }, |
| | | async onLoad(options) { |
| | | this.type = options.type || 'all' |
| | | var title = '' |
| | | //todo 根据type切换查询条件 |
| | |
| | | title: title |
| | | }) |
| | | } |
| | | await this.$store.dispatch('sign_clear', 'flower'); |
| | | this.getList() |
| | | }, |
| | | onReachBottom() { |
| | |
| | | }) |
| | | }, |
| | | async buttonStatus(item, status) { |
| | | await this.$message.confirm(`确定${status==='OFF'?'下降':'上架'}此商品吗`) |
| | | await this.$message.confirm(`确定${status==='off'?'下降':'上架'}此商品吗`) |
| | | this.$message.showLoading() |
| | | this.$http.request('get', '/api/supplier/flower/list/' + status, { |
| | | params: { |
| | |
| | | if (res.code == 0) { |
| | | this.$message.showToast('操作成功') |
| | | item.status = status |
| | | item.statusStr = (status == 'OFF' ? '下架' : '上架') |
| | | item.statusStr = (status == 'off' ? '下架' : '上架') |
| | | } |
| | | }).finally(() => { |
| | | this.$message.hideLoading() |