|
@@ -1,27 +1,19 @@
|
|
|
<template>
|
|
|
<view class="center">
|
|
|
<view class="introduce-section">
|
|
|
- <view class="informations" @click="details(item)" v-for="(item , index) in procurementPlanInfos" :Key="index">
|
|
|
+ <view class="informations" v-for="(item , index) in procurementPlanInfos" :Key="index">
|
|
|
+ <view @click="details(item)">
|
|
|
<view class="labels">{{item.goodsName}}</view>
|
|
|
<view class="labels">{{item.weight}}</view>
|
|
|
<view class="labels">{{item.unitPrice}}</view>
|
|
|
<view class="title">{{item.receivePrivate}}{{item.receiveCity}}{{item.receiveArea}}</view>
|
|
|
- <view class='cu-tag radius line-pink'>删除</view>
|
|
|
+ </view>
|
|
|
+ <view class='cu-tag radius line-pink'>编辑</view>
|
|
|
+ <view class='cu-tag radius line-pink' @click="switch1(item)">显示/隐藏</view>
|
|
|
+ <view class='cu-tag radius line-pink' @click="deleteRelease(item)">删除</view>
|
|
|
<view class='cu-tag radius line-pink put'>{{item.status}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- <button type="default" class="fabuBut" @change="releaseChange">发布 -->
|
|
|
- <!-- <view class="c-row b-b">
|
|
|
- <text class="tit" >发布</text>
|
|
|
-
|
|
|
- <picker @change="releaseChange" :value="releaseIndex" :range="releaseType" class="con-list">
|
|
|
- <view class="picker " >
|
|
|
- {{releaseIndex>-1?releaseType[releaseIndex]:'请选择发布内容'}}
|
|
|
- </view>
|
|
|
- </picker>
|
|
|
-
|
|
|
- </view> -->
|
|
|
- <!-- </button> -->
|
|
|
<view class="page-bottom">
|
|
|
<view class="action-btn-group">
|
|
|
<picker style='display:inline-block;' @change="releaseChange" :value="releases" :range="releaseType">
|
|
@@ -57,6 +49,66 @@
|
|
|
this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ switch1(item){
|
|
|
+ if (!this.hasLogin) {
|
|
|
+ uni.showModal({
|
|
|
+ // title: '登录提示',
|
|
|
+ content: '隐藏后该信息不再展示给其他用户,是否确定隐藏?',
|
|
|
+ showCancel: true,
|
|
|
+ confirmText: '确定',
|
|
|
+ success: (e) => {
|
|
|
+ this.$api.doRequest('post','/procurementPlanInfo/api/editStatus',{id:item.id,flag:0}).then(res => {
|
|
|
+ this.procurementPlanInfos = res.data.data.records
|
|
|
+ if (res.errmsg == "Success") {
|
|
|
+ this.$api.msg('隐藏成功!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.errmsg,
|
|
|
+ icon:'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ deleteRelease(item){
|
|
|
+ if (!this.hasLogin) {
|
|
|
+ uni.showModal({
|
|
|
+ // title: '登录提示',
|
|
|
+ content: '确定删除该信息?',
|
|
|
+ showCancel: true,
|
|
|
+ confirmText: '确定',
|
|
|
+ success: (e) => {
|
|
|
+ this.$api.doRequest('post','/procurementPlanInfo/api/deleteProcurementPlan',{id:item.id}).then(res => {
|
|
|
+ this.procurementPlanInfos = res.data.data.records
|
|
|
+ if (res.errmsg == "Success") {
|
|
|
+ this.$api.msg('删除成功!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.errmsg,
|
|
|
+ icon:'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
releaseChange(e){
|
|
|
this.receivePrivate = e.detail.value
|
|
|
this.release = this.releaseType[this.receivePrivate];
|