|
@@ -8,8 +8,8 @@
|
|
|
<view class="top">
|
|
|
<view class="title omit">{{ item.goodsName }}</view>
|
|
|
<view class="state" v-if="item.isRelease == 0" @click.stop="del(item)" style="color: #f44336">删除</view>
|
|
|
- <view class="state" style="color: #4581fb" v-if="item.isRelease == 1">发布中</view>
|
|
|
- <view class="state" style="color: #4CAF50" v-if="item.isOrders == 1">已接单</view>
|
|
|
+ <view class="state" style="color: #4581fb" v-if="item.isRelease == 1 && item.isOrders == 0">发布中</view>
|
|
|
+ <view class="state" style="color: #4caf50" v-if="item.isRelease == 1 && item.isOrders == 1">已接单</view>
|
|
|
</view>
|
|
|
<view class="con">
|
|
|
<view class="flex fs">
|
|
@@ -23,9 +23,10 @@
|
|
|
</view>
|
|
|
<view class="op">
|
|
|
<view class="flex">
|
|
|
- <view class="f rline" v-if="item.isRelease == 0" @click.stop="edit(item)">编辑</view>
|
|
|
- <view class="f" v-if="item.isRelease == 0" style="color: #4581fb" @click.stop="op(item, 1)">发布</view>
|
|
|
- <view class="f" v-if="item.isRelease == 1" style="color: #f44336" @click.stop="op(item, 0)">取消发布</view>
|
|
|
+ <view class="f rline" v-if="item.isRelease == 0 && item.isOrders == 0" @click.stop="edit(item)">编辑</view>
|
|
|
+ <view class="f" v-if="item.isRelease == 0 && item.isOrders == 0" style="color: #4581fb" @click.stop="op(item, 1)">发布</view>
|
|
|
+ <view class="f" v-if="item.isRelease == 1 && item.isOrders == 0" style="color: #f44336" @click.stop="op(item, 0)">取消发布</view>
|
|
|
+ <view class="f" v-if="item.isRelease == 1 && item.isOrders == 1" style="color: #4581fb" @click.stop="confirm(item, 0)">前往确认</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -80,9 +81,15 @@ export default {
|
|
|
detail(item) {
|
|
|
uni.navigateTo({ url: '/pages/market/two/purchaser/buy/detail?id=' + item.id });
|
|
|
},
|
|
|
+ //编辑
|
|
|
edit(item) {
|
|
|
uni.navigateTo({ url: '/pages/market/two/purchaser/buy/add?id=' + item.id });
|
|
|
},
|
|
|
+ //前往确认
|
|
|
+ confirm(item) {
|
|
|
+ uni.navigateTo({ url: '/pages/market/two/purchaser/buy/detail?id=' + item.id });
|
|
|
+ },
|
|
|
+ //取消发布或发布
|
|
|
op(item, isRelease) {
|
|
|
uni.showModal({
|
|
|
title: '提示',
|