xiebaomin %!s(int64=2) %!d(string=hai) anos
pai
achega
a24fc91d48

+ 173 - 0
pages/goods/components/procurement-popup.vue

@@ -0,0 +1,173 @@
+<template>
+    <view>
+        <tui-bottom-popup :zIndex="1002" :maskZIndex="1001" :show.sync="popupShow" @close="$emit('handlerPopupClose', false)">
+            <view class="popup_content">
+                <view class="pro_popup_title">参与需求</view>
+                <view class="popup_form">
+                    <view class="popup_form_item">商品图片:</view>
+                    <view class="popup_img">
+                        <image style="width: 100%;height: 100%;" :src="isImageUrl(joinData.productImage) ? imageUrl : joinData.productImage" mode="aspectFill"></image>
+                    </view>
+                </view>
+                <view class="popup_form">
+                    <view class="popup_form_item">商品名称:</view>
+                    <view class="popup_form_name">{{ joinData.productName }}</view>
+                </view>
+                <form>
+                    <view class="uni-form-item uni-column">
+                        <view class="title">
+                            <text style="font-size: 26rpx;color: #F85050;">*</text>
+                            期望单价:
+                        </view>
+                        <view style="position: relative;">
+                            <view class="input_icon">¥</view>
+                            <input
+                                class="uni-input"
+                                type="number"
+                                maxlength="10"
+                                :always-embed="true"
+                                :adjust-position="true" 
+                                cursor-spacing="30"
+                                v-model="joinData.price"
+                                @input="fpNumInput($event, 'joinData', 'price')"
+                            />
+                        </view>
+                    </view>
+                    <view class="uni-form-item uni-column">
+                        <view class="title">
+                            <text style="font-size: 26rpx;color: #F85050;">*</text>
+                            采购数量:
+                        </view>
+                        <view style="position: relative;">
+                            <input
+                                class="uni-input"
+                                maxlength="10"
+                                type="number"
+                                :always-embed="true"
+                                :adjust-position="true" 
+                                cursor-spacing="30"
+                                v-model="joinData.number"
+                                @input="NumberInput($event, 'joinData', 'number')"
+                            />
+                        </view>
+                    </view>
+                    <view class="submit_btn">
+                        <button class="popup_btn cancel" @click="$emit('handlerPopupClose', false)">取消</button>
+                        <button class="popup_btn submit" @click="$emit('procurementParticipate', joinData)">确定</button>
+                    </view>
+                </form>
+            </view>
+        </tui-bottom-popup>
+    </view>
+</template>
+
+<script>
+    import procurementMixins from '../mixins/procurementMixins.js'
+    export default {
+        mixins: [procurementMixins],
+        props: {
+            dataObj: {
+                type: Object,
+                default: () => ({})
+            },
+            isShow: {
+                type: Boolean,
+                default: () => false
+            }
+        },
+        data() {
+            return {
+                popupShow: false, // 显示隐藏
+                joinData: {}, // 数据
+            }
+        },
+        watch: {
+            dataObj(val) {
+                if(JSON.stringify(val) != '{}') {
+                    this.joinData = val
+                }
+            },
+            isShow(val) {
+                this.popupShow = val
+            }
+        },
+        methods: {
+        },
+    }
+</script>
+
+<style scoped lang="scss">
+    .popup_content {
+        padding: 0 64rpx;
+    }
+    .pro_popup_title {
+        font-size: 32rpx;
+        font-weight: bold;
+        color: #333333;
+        margin: 40rpx auto;
+        text-align: center;
+    }
+    .popup_form {
+        margin-bottom: 32rpx;
+    }
+    .popup_form .popup_form_item {
+        color: #999999;
+        font-size: 26rpx;
+        margin-bottom: 16rpx;
+    }
+    .popup_form .popup_img {
+        width: 136rpx;
+        height: 136rpx;
+    }
+    .popup_form .popup_form_name {
+        color: #333333;
+        font-size: 26rpx;
+        font-weight: 400;
+        line-height: 44rpx;
+    }
+    .uni-form-item .title {
+        color: #999999;
+        font-size: 26rpx;
+        margin-bottom: 16rpx;
+    }
+    .input_icon {
+        position: absolute;
+        left: 15rpx;
+        top: 24rpx;
+        color: #b2b2b2;
+        font-size: 26rpx;
+    }
+    .uni-form-item .uni-input {
+        height: 80rpx;
+        border: 1px solid #b2b2b2;
+        border-radius: 6rpx 6rpx 6rpx 6rpx;
+        font-size: 26rpx;
+        padding-left: 47rpx;
+        margin-bottom: 32rpx;
+    }
+    .submit_btn {
+        margin-top: 56rpx;
+        height: 84rpx;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        margin-bottom: 50rpx;
+    }
+    .submit_btn .popup_btn {
+        width: 280rpx;
+        height: 100%;
+        border-radius: 45rpx 45rpx 45rpx 45rpx;
+        text-align: center;
+        line-height: 84rpx;
+    }
+    ::v-deep .submit_btn .cancel {
+        background-color: #fff4e6;
+        color: #f3b574;
+        font-size: 32rpx;
+    }
+    ::v-deep .submit_btn .submit {
+        background-color: #f3b574;
+        color: #ffffff;
+        font-size: 32rpx;
+    }
+</style>

+ 89 - 8
pages/goods/mixins/procurementMixins.js

@@ -17,27 +17,27 @@ export default {
     },
     methods: {
         // 校验 只能输入数字和小数点
-        fpNumInput(e, str) {
+        fpNumInput(e, str, name) {
             const o = e.target
             const inputRule = /[^\d.]/g //修改inputRule 的值
             this.$nextTick(() => {
-                this[str].price = o.value.replace(inputRule, '')
+                this[str][name] = o.value.replace(inputRule, '')
                 if (o.value[0] == '.') {
-                    this[str].price = ''
+                    this[str][name] = ''
                 } else if (o.value[0] == '0' && o.value[1] == '0') {
-                    this[str].price = '0'
+                    this[str][name] = '0'
                 }
-                this[str].price = this[str].price.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.') // 只能输入一个小数点
+                this[str][name] = this[str][name].replace('.', '$#$').replace(/\./g, '').replace('$#$', '.') // 只能输入一个小数点
             })
         },
         // 校验 只能输入数字
-        NumberInput(e, str) {
+        NumberInput(e, str, name) {
             const o = e.target
             const inputRule = /[^\d]/g //修改inputRule 的值
             this.$nextTick(() => {
-                this[str].number = o.value.replace(inputRule, '')
+                this[str][name] = o.value.replace(inputRule, '')
                 if (o.value[0] == '0') {
-                    this[str].number = ''
+                    this[str][name] = ''
                 }
             })
         },
@@ -58,5 +58,86 @@ export default {
             if (url) return url.indexOf('none.jpg') > 0
             else return true
         },
+        // 全部集采
+        async procurementAllAddList() {
+            const form = {
+                pageNo: 1,
+                userId: this.userInfo.userId,
+                pageSize: this.pageInfo.pageNo * this.pageInfo.pageSize,
+                status: this.currentTab
+            }
+            try {
+                const { data } = await this.ProcurementService.procurementAllList(form)
+                this.procurementList = data.list
+                this.isLastPage = data.total === this.procurementList.length
+                this.loadding = !this.isLastPage
+                this.pullUpOn = !this.isLastPage
+            } catch (error) {
+                console.log(error)
+            }
+        },
+        // 我要参与
+        async procurementParticipate($event, callback) {
+            if ($event.price === '') return this.$util.msg('请输入期望单价', 2000)
+            if ($event.number === '') return this.$util.msg('请输入采购数量', 2000)
+            const form = {
+                userId: this.userInfo.userId,
+                productImage: $event.productImage,
+                productName: $event.productName,
+                price: $event.price,
+                number: $event.number,
+                status: 0,
+                id: $event.id,
+                userName: this.userInfo.name
+            }
+            if ($event.isInvolved === 1) {
+                form.id = $event.id
+                form.status = 1 // 0参与 1 修改
+            }
+            try {
+                await this.ProcurementService.procurementParticipate(form)
+                callback && callback()
+                uni.showToast({
+                    title: `${$event.isInvolved === 0 ? '参与' : '修改'}成功`,
+                    icon: 'success'
+                })
+                this.popupShow=false
+            } catch (error) {
+                console.log(error)
+            }
+        },
+        // 参与集采详情
+        async procurementEditData() {
+            const form = {
+                id: `${this.procurement.sid}`,
+                userId: this.userInfo.userId,
+                procurementType: 0
+            }
+            try {
+                const { data } = await this.ProcurementService.procurementEditData(form)
+                this.joinData = data
+                this.popupShow = true
+            } catch (error) {
+                console.log(error)
+            }
+        },
+        // 删除 退出
+        async procurementUpdate(type, callback) {
+            const form = {
+                id: `${type === 0 ? this.procurement.id : this.procurement.sid}`,
+                userId: this.userInfo.userId,
+                procurementType: type
+            }
+            try {
+                await this.ProcurementService.procurementUpdate(form)
+                callback && callback()
+                uni.showToast({
+                    title: `${type === 0 ? '删除' : '退出'}成功`,
+                    icon: 'success'
+                })
+            } catch (error) {
+                console.log(error)
+            }
+        },
     }
 }

+ 30 - 224
pages/goods/procurement.vue

@@ -41,65 +41,19 @@
         <view class="add_btn" @click="procurementAdd">
             <image style="width: 100%;height: 100%;" src="@/static/procurement/add_pro.png"></image>
         </view>
-        <tui-bottom-popup :zIndex="1002" :maskZIndex="1001" :show="popupShow" @close="handlerPopupClose">
-            <view class="popup_content">
-                <view class="pro_popup_title">参与需求</view>
-                <view class="popup_form">
-                    <view class="popup_form_item">商品图片:</view>
-                    <view class="popup_img">
-                        <image style="width: 100%;height: 100%;" :src="isImageUrl(joinData.productImage) ? imageUrl : joinData.productImage" mode="aspectFill"></image>
-                    </view>
-                </view>
-                <view class="popup_form">
-                    <view class="popup_form_item">商品名称:</view>
-                    <view class="popup_form_name">{{ joinData.productName }}</view>
-                </view>
-                <form>
-                    <view class="uni-form-item uni-column">
-                        <view class="title">
-                            <text style="font-size: 26rpx;color: #F85050;">*</text>
-                            期望单价:
-                        </view>
-                        <view style="position: relative;">
-                            <view class="input_icon">¥</view>
-                            <input
-                                class="uni-input"
-                                type="number"
-                                focus
-                                v-model="joinData.price"
-                                @input="fpNumInput($event, 'joinData')"
-                            />
-                        </view>
-                    </view>
-                    <view class="uni-form-item uni-column">
-                        <view class="title">
-                            <text style="font-size: 26rpx;color: #F85050;">*</text>
-                            采购数量:
-                        </view>
-                        <view style="position: relative;">
-                            <input
-                                class="uni-input"
-                                type="number"
-                                focus
-                                v-model="joinData.number"
-                                @input="NumberInput($event, 'joinData')"
-                            />
-                        </view>
-                    </view>
-                    <view class="submit_btn">
-                        <button class="popup_btn cancel" @click="handlerPopupClose">取消</button>
-                        <button class="popup_btn submit" @click="procurementParticipate">确定</button>
-                    </view>
-                </form>
-            </view>
-        </tui-bottom-popup>
+        <pro-pupop
+            :dataObj="joinData"
+            :isShow="popupShow"
+            @handlerPopupClose="handlerPopupClose"
+            @procurementParticipate="procurementParticipate($event, proListCallback)"
+        />
         <view v-if="procurementList.length > 2" :style="{ marginTop: procurementList.length > 0 ? '0' : '88rpx' }">
             <!--加载loadding-->
             <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
             <tui-nomore :visible="!pullUpOn" :backgroundColor="'#F7F7F7'" :text="nomoreText"></tui-nomore>
             <!--加载loadding-->
         </view>
-        <proEmpty v-if="procurementList.length === 0"/>
+        <proEmpty v-if="procurementList.length === 0" />
     </view>
 </template>
 
@@ -108,10 +62,12 @@ import proCard from './components/procurement_card.vue'
 import { mapState } from 'vuex'
 import procurementMixins from './mixins/procurementMixins.js'
 import proEmpty from './components/procurement-empty.vue'
+import proPupop from './components/procurement-popup.vue'
 export default {
     components: {
         proCard,
-        proEmpty
+        proEmpty,
+        proPupop
     },
     mixins: [procurementMixins],
     data() {
@@ -170,6 +126,7 @@ export default {
             nomoreText: '已经没有了~',
             isLastPage: false, // 是否是最后一页
             joinData: {}, // 我要参与
+            procurement: {}
         }
     },
     computed: {
@@ -177,13 +134,13 @@ export default {
         ...mapState(['hasLogin'])
     },
     onShow() {
-        if(this.hasLogin){
-        	this.userInfo = uni.getStorageSync('userInfo')
-        	this.pageInfo.userId = this.userInfo.userId
-        	this.participate.userId = this.userInfo.userId
-        	this.procurementAllList()
-        }else{
-        	this.$api.redirectTo('/pages/login/login')
+        if (this.hasLogin) {
+         	  this.userInfo = uni.getStorageSync('userInfo')
+            this.pageInfo.userId = this.userInfo.userId
+          	 this.participate.userId = this.userInfo.userId
+            this.procurementAllList()
+        } else {
+            this.$api.redirectTo('/pages/login/login')
         }
     },
     onLoad() {
@@ -220,12 +177,12 @@ export default {
         // 弹窗确认或取消
         handleClick($event) {
             if ($event.index === 1) {
-                if (this.proDataInfo.isInvolved === 1) {
+                if (this.procurement.isInvolved === 1) {
                     // 退出参与
-                    this.procurementUpdate(1, this.proDataInfo.sid)
+                    this.procurementUpdate(1, () => this.procurementAllAddList())
                 } else {
                     // 删除
-                    this.procurementUpdate(0, this.proDataInfo.id)
+                    this.procurementUpdate(0, () => this.procurementAllAddList())
                 }
             }
             this.modal = false
@@ -238,18 +195,18 @@ export default {
             this.proDataInfo = proData
         },
         // 关闭底部
-        handlerPopupClose() {
-            this.popupShow = false
+        handlerPopupClose($event) {
+            this.popupShow = $event
         },
         // 我要参与
         popupAdd($event) {
-            this.joinData = Object.assign($event, { userId: this.userInfo.userId })
+            this.joinData = $event
             this.popupShow = true
         },
         // 修改
         popupChange($event) {
-            this.joinData = $event
-            if (this.joinData.isInvolved === 1) {
+            this.procurement = $event
+            if (this.procurement.isInvolved === 1) {
                 this.procurementEditData()
             } else {
                 uni.navigateTo({
@@ -267,7 +224,7 @@ export default {
         proDelete($event) {
             this.contentModalText = '确定删除该需求吗?'
             this.modal = true
-            this.proDataInfo = $event
+            this.procurement = $event
         },
         // 详情
         procureDetail($event) {
@@ -275,6 +232,9 @@ export default {
                 url: `/pages/goods/procurement_info?id=${$event.id}&proTabId=${this.currentTab}`
             })
         },
+        proListCallback() {
+            this.procurementAllAddList()
+        },
         /**
          * 网络请求
          */
@@ -293,87 +253,6 @@ export default {
                 }
             }
         },
-        // 全部集采
-        async procurementAllAddList() {
-            const form = {
-                pageNo: 1,
-                userId: this.userInfo.userId,
-                pageSize: this.pageInfo.pageNo * this.pageInfo.pageSize,
-                status: this.currentTab
-            }
-            try {
-                const { data } = await this.ProcurementService.procurementAllList(form)
-                this.procurementList = data.list
-                this.isLastPage = data.total === this.procurementList.length
-                this.loadding = !this.isLastPage
-                this.pullUpOn = !this.isLastPage
-            } catch (error) {
-                console.log(error)
-            }
-        },
-        // 我要参与
-        async procurementParticipate() {
-            if (this.joinData.price === '') return this.$util.msg('请输入期望单价', 2000)
-            if (this.joinData.number === '') return this.$util.msg('请输入期望数量', 2000)
-            const form = {
-                userId: this.userInfo.userId,
-                productImage: this.joinData.productImage,
-                productName: this.joinData.productName,
-                price: this.joinData.price,
-                number: this.joinData.number,
-                status: 0,
-                id: this.joinData.id,
-                userName: this.userInfo.name
-            }
-            if (this.joinData.isInvolved === 1) {
-                form.id = this.joinData.id
-                form.status = 1 // 0参与 1 修改
-            }
-            try {
-                const data = await this.ProcurementService.procurementParticipate(form)
-                this.procurementAllAddList()
-                this.popupShow = false
-                uni.showToast({
-                    title: `${this.joinData.isInvolved === 0 ? '参与' : '修改'}成功`,
-                    icon: 'success'
-                })
-            } catch (error) {
-                console.log(error)
-            }
-        },
-        // 删除 退出
-        async procurementUpdate(type, id) {
-            const form = {
-                id: `${type === 0 ? this.proDataInfo.id : this.proDataInfo.sid}`,
-                userId: this.userInfo.userId,
-                procurementType: type
-            }
-            try {
-                await this.ProcurementService.procurementUpdate(form)
-                this.procurementAllAddList()
-                uni.showToast({
-                    title: `${type === 0 ? '删除' : '退出'}成功`,
-                    icon: 'success'
-                })
-            } catch (error) {
-                console.log(error)
-            }
-        },
-        // 参与详情
-        async procurementEditData() {
-            const form = {
-                id: `${this.joinData.sid}`,
-                userId: this.userInfo.userId,
-                procurementType: 0
-            }
-            try {
-                const {data} = await this.ProcurementService.procurementEditData(form)
-                this.joinData = data
-                this.popupShow = true
-            } catch (error) {
-                console.log(error)
-            }
-        },
     }
 }
 </script>
@@ -411,77 +290,4 @@ page {
     bottom: 129rpx;
     right: 34rpx;
 }
-.popup_content {
-    padding: 0 64rpx;
-}
-.pro_popup_title {
-    font-size: 32rpx;
-    font-weight: bold;
-    color: #333333;
-    margin: 40rpx auto;
-    text-align: center;
-}
-.popup_form {
-    margin-bottom: 32rpx;
-}
-.popup_form .popup_form_item {
-    color: #999999;
-    font-size: 26rpx;
-    margin-bottom: 16rpx;
-}
-.popup_form .popup_img {
-    width: 136rpx;
-    height: 136rpx;
-}
-.popup_form .popup_form_name {
-    color: #333333;
-    font-size: 26rpx;
-    font-weight: 400;
-    line-height: 44rpx;
-}
-.uni-form-item .title {
-    color: #999999;
-    font-size: 26rpx;
-    margin-bottom: 16rpx;
-}
-.input_icon {
-    position: absolute;
-    left: 15rpx;
-    top: 24rpx;
-    color: #b2b2b2;
-    font-size: 26rpx;
-}
-.uni-form-item .uni-input {
-    height: 80rpx;
-    border: 1px solid #b2b2b2;
-    border-radius: 6rpx 6rpx 6rpx 6rpx;
-    font-size: 26rpx;
-    padding-left: 47rpx;
-    margin-bottom: 32rpx;
-}
-.submit_btn {
-    margin-top: 56rpx;
-    height: 84rpx;
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    margin-bottom: 50rpx;
-}
-.submit_btn .popup_btn {
-    width: 280rpx;
-    height: 100%;
-    border-radius: 45rpx 45rpx 45rpx 45rpx;
-    text-align: center;
-    line-height: 84rpx;
-}
-::v-deep .submit_btn .cancel {
-    background-color: #fff4e6;
-    color: #f3b574;
-    font-size: 32rpx;
-}
-::v-deep .submit_btn .submit {
-    background-color: #f3b574;
-    color: #ffffff;
-    font-size: 32rpx;
-}
 </style>

+ 2 - 5
pages/goods/procurementAdd.vue

@@ -15,7 +15,6 @@
                 <view>
                     <input
                         class="uni-input"
-                        focus
                         placeholder="请输入想要采购的商品名称"
                         v-model="formData.productName"
                         maxlength="30"
@@ -32,10 +31,9 @@
                     <input
                         class="uni-input"
                         type="number"
-                        focus
                         placeholder="请输入您对商品的期望单价"
                         v-model="formData.price"
-                        @input="fpNumInput($event, 'formData')"
+                        @input="fpNumInput($event, 'formData', 'price')"
                         maxlength="10"
                     />
                 </view>
@@ -49,10 +47,9 @@
                     <input
                         class="uni-input"
                         type="number"
-                        focus
                         placeholder="请输入您的采购数量"
                         v-model="formData.number"
-                        @input="NumberInput($event, 'formData')"
+                        @input="NumberInput($event, 'formData', 'number')"
                         maxlength="10"
                     />
                 </view>

+ 27 - 191
pages/goods/procurement_info.vue

@@ -12,7 +12,11 @@
                 <view class="card_title">采购商品</view>
                 <view class="card_line"></view>
                 <view class="card_store">
-                    <image class="img" :src="isImageUrl(procurement.productImage) ? imageUrl : procurement.productImage" mode="aspectFill"></image>
+                    <image
+                        class="img"
+                        :src="isImageUrl(procurement.productImage) ? imageUrl : procurement.productImage"
+                        mode="aspectFill"
+                    ></image>
                     <view class="store_title">{{ procurement.productName }}</view>
                 </view>
                 <view class="back-filter" v-if="procurementStatus('isDelFlag', procurement.delFlag)"></view>
@@ -111,46 +115,12 @@
                 </proBtn>
             </view>
         </view>
-        <tui-bottom-popup :zIndex="1002" :maskZIndex="1001" :show="popupShow" @close="handlerPopupClose">
-            <view class="popup_content">
-                <view class="pro_popup_title">参与需求</view>
-                <view class="popup_form">
-                    <view class="popup_form_item">商品图片:</view>
-                    <view class="popup_img">
-                        <image style="width: 100%;height: 100%;" :src="isImageUrl(joinData.productImage) ? imageUrl : joinData.productImage" mode="aspectFill"></image>
-                    </view>
-                </view>
-                <view class="popup_form">
-                    <view class="popup_form_item">商品名称:</view>
-                    <view class="popup_form_name">{{ joinData.productName }}</view>
-                </view>
-                <form>
-                    <view class="uni-form-item uni-column">
-                        <view class="title">
-                            <text style="font-size: 26rpx;color: #F85050;">*</text>
-                            期望单价:
-                        </view>
-                        <view style="position: relative;">
-                            <view class="input_icon">¥</view>
-                            <input class="uni-input" type="number" focus v-model="joinData.price" />
-                        </view>
-                    </view>
-                    <view class="uni-form-item uni-column">
-                        <view class="title">
-                            <text style="font-size: 26rpx;color: #F85050;">*</text>
-                            采购数量:
-                        </view>
-                        <view style="position: relative;">
-                            <input class="uni-input" type="number" focus v-model="joinData.number" />
-                        </view>
-                    </view>
-                    <view class="submit_btn">
-                        <button class="popup_btn cancel" @click="handlerPopupClose">取消</button>
-                        <button class="popup_btn submit" @click="procurementParticipate">确定</button>
-                    </view>
-                </form>
-            </view>
-        </tui-bottom-popup>
+        <pro-pupop
+            :dataObj="joinData"
+            :isShow="popupShow"
+            @handlerPopupClose="handlerPopupClose"
+            @procurementParticipate="procurementParticipate($event, proInfoCallback)"
+        />
         <!-- 弹窗提示 -->
         <tui-modal
             :show="modal"
@@ -169,10 +139,12 @@
 <script>
 import proBtn from './components/procurement-btn.vue'
 import procurementMixins from './mixins/procurementMixins.js'
+import proPupop from './components/procurement-popup.vue'
 export default {
     mixins: [procurementMixins],
     components: {
-        proBtn
+        proBtn,
+        proPupop
     },
     data() {
         return {
@@ -202,7 +174,7 @@ export default {
             popupShow: false, // 底部上移栏
             proTabId: '', // tab id
             detailId: '', // 详情id
-            refleshdata: {},
+            refleshdata: {}
         }
     },
     onLoad(options) {
@@ -226,24 +198,23 @@ export default {
         procurementDelete() {
             this.contentModalText = '确定删除该需求吗?'
             this.modal = true
-            this.joinData = $event
         },
         handleClick($event) {
             if ($event.index === 1) {
                 if (this.procurement.isInvolved === 1) {
                     // 退出参与
-                    this.procurementUpdate(1)
+                    this.procurementUpdate(1, () => this.proInfoCallback())
                 } else {
                     // 删除
-                    this.procurementUpdate(0)
+                    this.procurementUpdate(0, () => this.proInfoCallback())
                 }
             }
             this.modal = false
         },
         hideMobel() {},
         // 关闭底部
-        handlerPopupClose() {
-            this.popupShow = false
+        handlerPopupClose($event) {
+            this.popupShow = $event
         },
         // 我要参与
         popupAdd() {
@@ -265,10 +236,17 @@ export default {
                 this.procurementEditData()
             }
         },
+        proInfoCallback() {
+            this.procurementDetail(this.detailId)
+            uni.$emit('refreshAddData')
+        },
         // 详情
         async procurementDetail(id) {
             try {
-                const { data } = await this.ProcurementService.procurementDetail({ id: id, userId: this.userInfo.userId })
+                const { data } = await this.ProcurementService.procurementDetail({
+                    id: id,
+                    userId: this.userInfo.userId
+                })
                 this.procurement = data.procurement
                 this.procurementList = data.procurementList
                 this.skeletonShow = false
@@ -276,75 +254,6 @@ export default {
                 console.log(error)
             }
         },
-        // 删除 退出
-        async procurementUpdate(type) {
-            const form = {
-                id: type === 0 ? this.detailId : this.procurement.sid,
-                userId: this.userInfo.userId,
-                procurementType: type
-            }
-            try {
-                await this.ProcurementService.procurementUpdate(form)
-                this.procurementDetail(this.detailId)
-                uni.$emit('refreshAddData') // 刷新修改的数据
-                uni.showToast({
-                    title: `${type === 0 ? '删除' : '退出'}成功`,
-                    icon: 'success'
-                })
-            } catch (error) {
-                console.log(error)
-            }
-        },
-        // 我要参与
-        async procurementParticipate() {
-            if (this.joinData.price === '') {
-                return this.$util.msg('请输入期望单价', 2000)
-            }
-            if (this.joinData.number === '') {
-                return this.$util.msg('请输入采购数量', 2000)
-            }
-            const form = {
-                userId: this.userInfo.userId,
-                productImage: this.joinData.productImage,
-                productName: this.joinData.productName,
-                price: this.joinData.price,
-                number: this.joinData.number,
-                status: 0,
-                id: this.joinData.id,
-                userName: this.userInfo.name
-            }
-            if (this.joinData.isInvolved === 1) {
-                form.id = this.joinData.id
-                form.status = 1 // 0参与 1 修改
-            }
-            try {
-                await this.ProcurementService.procurementParticipate(form)
-                this.procurementDetail(this.detailId)
-                this.popupShow = false
-                uni.$emit('refreshAddData') // 刷新修改的数据
-                uni.showToast({
-                    title: `${this.procurement.isInvolved === 0 ? '参与' : '修改'}成功`,
-                    icon: 'success'
-                })
-            } catch (error) {
-                console.log(error)
-            }
-        },
-        // 参与集采详情
-        async procurementEditData() {
-            const form = {
-                id: `${this.procurement.sid}`,
-                userId: this.userInfo.userId,
-                procurementType: 0
-            }
-            try {
-                const {data} = await this.ProcurementService.procurementEditData(form)
-                this.joinData = data
-                this.popupShow = true
-            } catch (error) {
-                console.log(error)
-            }
-        }
     }
 }
 </script>
@@ -494,77 +403,4 @@ export default {
     height: 100%;
     width: 100%;
 }
-.popup_content {
-    padding: 0 64rpx;
-}
-.pro_popup_title {
-    font-size: 32rpx;
-    font-weight: bold;
-    color: #333333;
-    margin: 40rpx auto;
-    text-align: center;
-}
-.popup_form {
-    margin-bottom: 32rpx;
-}
-.popup_form .popup_form_item {
-    color: #999999;
-    font-size: 26rpx;
-    margin-bottom: 16rpx;
-}
-.popup_form .popup_img {
-    width: 136rpx;
-    height: 136rpx;
-}
-.popup_form .popup_form_name {
-    color: #333333;
-    font-size: 26rpx;
-    font-weight: 400;
-    line-height: 44rpx;
-}
-.uni-form-item .title {
-    color: #999999;
-    font-size: 26rpx;
-    margin-bottom: 16rpx;
-}
-.input_icon {
-    position: absolute;
-    left: 15rpx;
-    top: 24rpx;
-    color: #b2b2b2;
-    font-size: 26rpx;
-}
-.uni-form-item .uni-input {
-    height: 80rpx;
-    border: 1px solid #b2b2b2;
-    border-radius: 6rpx 6rpx 6rpx 6rpx;
-    font-size: 26rpx;
-    padding-left: 47rpx;
-    margin-bottom: 32rpx;
-}
-.submit_btn {
-    margin-top: 56rpx;
-    height: 84rpx;
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    margin-bottom: 50rpx;
-}
-.submit_btn .popup_btn {
-    width: 280rpx;
-    height: 100%;
-    border-radius: 45rpx 45rpx 45rpx 45rpx;
-    text-align: center;
-    line-height: 84rpx;
-}
-::v-deep .submit_btn .cancel {
-    background-color: #fff4e6;
-    color: #f3b574;
-    font-size: 32rpx;
-}
-::v-deep .submit_btn .submit {
-    background-color: #f3b574;
-    color: #ffffff;
-    font-size: 32rpx;
-}
 </style>