浏览代码

提交增加状态更新弹窗

wenmenghao321 2 年之前
父节点
当前提交
03631a95f0

+ 3 - 1
src/web/staticres/frontRouter/pc/collection/js/index-pc.js

@@ -813,7 +813,9 @@ var vm = new Vue({
           success: function(r){
             if (r && r.data && r.error_code == 0) {
               item.joinBid = true
-              _this.showToast('已参标,请前往我的参标项目列表查看。')
+              // _this.showToast('已参标,请前往我的参标项目列表查看。')
+              window.$BidrenewalDialog.open()
+              Bidrenewal_Dialog.sendId(item._id)
             } else if(r.error_code == -1) {
               var msg = r.error_msg || '参标错误,请稍后重试'
               _this.showToast(msg)

+ 6 - 3
src/web/staticres/js/superSearch.js

@@ -376,7 +376,7 @@ function appendDatas(datas,flag,isNew,onlyUpdateTable){
                 listHtml+='</div>'
                 listHtml+='<div>'
                 // 是否参标(2022/05/12)
-                 listHtml += '<i class="icon-canbiao" dataid="'+datas[i]._id+'" style="display:none"></i>'
+                 listHtml += '<i class="icon-canbiao" style="display:none" dataid="'+datas[i]._id+'" ></i>'
 
                 // // 是否收藏
                 listHtml += '<i class="icon-collect" dataid="'+datas[i]._id+'"></i>'
@@ -1693,13 +1693,16 @@ function joinBidsClick() {
     e.stopPropagation()
     var $that = $(this)
     var checked = $(this).hasClass('checked')
-    var checkedId =  $(this).attr('dataid')
+    var checkedId =  $(this).attr('dataid')   
     if (checked) {
       toastFn('如需终止参标,需要在详情页进行操作。', 800)
     } else {
       joinBidAction('in', checkedId, function(res) {
         if (res.data && res.error_code == 0) {
-          toastFn('已参标,请前往我的参标项目列表查看', 1500)
+          // toastFn('已参标,请前往我的参标项目列表查看', 1500)
+          // 调起参标更新弹窗
+          window.$BidrenewalDialog.open()
+          Bidrenewal_Dialog.sendId(checkedId)
           $that.addClass('checked')
         } else if(res.error_code == -1){
           var msg = res.error_msg || '操作错误,请稍后重试'

+ 86 - 0
src/web/templates/common/BidrenewalDialog.html

@@ -0,0 +1,86 @@
+<div id="BidrenewalDialog" v-if="showNewuserDialog">
+  <iframe :src="url" marginwidth="0" marginheight="0" frameborder="0" allowtransparency="allowtransparency"
+    class="iframe" style="display: none" onload="this.style.display='block'"></iframe>
+</div>
+<script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.7.14/vue.min.js></script>
+<script>
+  var Bidrenewal_Dialog = new Vue({
+    el: "#BidrenewalDialog",
+    delimiters: ["@@", "@@"],
+    // template: temp,
+    data: function () {
+      return {
+        url: location.origin + '/swordfish/page_big_pc/BidrenewalDialog?iframe=BidrenewalDialog',
+        // url: 'http://localhost:8081/swordfish/page_big_pc/BidrenewalDialog?iframe=BidrenewalDialog',
+        showNewuserDialog: false,
+        _scrollTop:''
+      };
+    },
+    computed: {
+    },
+    watch: {
+    },
+    created: function () {
+      this.init()
+    },
+    mounted: function () {
+    },
+    beforeDestroy: function () {
+
+    },
+    methods: {
+      sendId (val) {
+        window.$BidrenewalDialog.id = val
+      },
+      init () {
+        const this_ = this;
+        window.$BidrenewalDialog = {};
+        window.$BidrenewalDialog.open = function () {
+          this_.showNewuserDialog = true
+          this_.afterOpen()
+        }
+        window.$BidrenewalDialog.close = function () {
+          this_.beforeClose()
+          document.getElementsByClassName('iframe')[0].style.display = 'none'
+          this_.showNewuserDialog = false
+        }
+      },
+      afterOpen () {
+        this._scrollTop = document.scrollingElement.scrollTop
+        document.body.style.position = 'fixed'
+        document.body.style.width = '100%'
+        document.body.style.top = -this._scrollTop + 'px'
+      },
+
+      // popup 关闭时调用
+      beforeClose () {
+        document.body.style.position = ''
+        document.body.style.top = ''
+        // 使 scrollTop 恢复原状
+        document.scrollingElement.scrollTop = this._scrollTop
+      }
+    }
+  });
+</script>
+<style>
+  #BidrenewalDialog {
+    position: fixed;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    z-index: 999;
+    background-color: transparent;
+  }
+
+  #BidrenewalDialog .iframe {
+    width: 100%;
+    height: 100%;
+    background-color: transparent;
+  }
+
+  #BidrenewalDialog .iframe body {
+    background-color: transparent !important;
+
+  }
+</style>

+ 2 - 1
src/web/templates/frontRouter/pc/collection/sess/index.html

@@ -307,7 +307,8 @@
         </div>
         <div class="search-footer w"></div>
     </section>
-
+    <!-- 参标更新状态组件 -->
+    {{include "/common/BidrenewalDialog.html"}}
     {{include "/common/pcbottom.html"}}
     {{include "/common/baiducc.html"}}
 

+ 6 - 1
src/web/templates/pc/biddetail_rec.html

@@ -146,6 +146,8 @@
 {{include "/common/shareboxDialog.html"}}
 <!-- 分发弹窗 -->
 {{include "/common/personDialog.html"}}
+<!-- 参标更新状态组件 -->
+{{include "/common/BidrenewalDialog.html"}}
 <script type="text/javascript">
   var _loop = false;
   var refer = document.referrer;
@@ -585,7 +587,10 @@
                        $('#bidJoined').hide()
                        toastFn('终止参标操作成功!')
                      } else {
-                       toastFn('已参标,请前往我的参标项目列表查看。')
+                      //  toastFn('已参标,请前往我的参标项目列表查看。')
+                      // 调起参标更新弹窗
+                      window.$BidrenewalDialog.open()
+                      Bidrenewal_Dialog.sendId(_id)
                        $('#bidJoin').hide()
                        $('#bidJoined').show()
                      }

+ 2 - 0
src/web/templates/pc/supsearch.html

@@ -708,6 +708,8 @@
 {{include "/common/pchead.html"}}
 <!-- 选择人员组件 -->
 {{include "/common/personDialog.html"}}
+<!-- 参标更新状态组件 -->
+{{include "/common/BidrenewalDialog.html"}}
 <div class="modal fade" id="labModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
   <div class="modal-dialog">
     <div class="modal-content" id="labmodalcont">