Răsfoiți Sursa

Merge branch 'dev/v4.8.39_tsz' of qmx/jy into feature/v4.8.39

汤世哲 2 ani în urmă
părinte
comite
c770ff1531

+ 57 - 1
src/web/staticres/common-module/bidstatus-update/js/bid-status-update.js

@@ -240,6 +240,7 @@ var bidStatusNode = {
       handler (newval) {
         this.resetUpdate()
         this.getProDetail()
+        this.getBidContent()
       },
       immediate: true
     },
@@ -306,7 +307,7 @@ var bidStatusNode = {
           type: 'POST',
           url: '/bigmember/follow/project/detail',
           data: {
-              sid: _this.projectCellInfo.sid || _this.projectCellInfo._id,
+              sid: _this.projectCellInfo.sid || _this.projectCellInfo.id || _this.projectCellInfo._id,
               // fid: _this.fid
           },
           success: function (res) {
@@ -494,6 +495,61 @@ var bidStatusNode = {
         this.bidParams.isWin = ''
       }
     },
+    // 获取投标状态信息
+    getBidContent: function () {
+      const _this = this
+      const params = {
+        sid: _this.projectCellInfo.sid || _this.projectCellInfo.id || _this.projectCellInfo._id,
+      }
+      $.ajax({
+        type: 'POST',
+        url: '/jyapi/jybx/core/participate/content',
+        contentType: 'application/json',
+        data: JSON.stringify(params),
+        success: function(res) {
+          if(res.error_code === 0 && res.data) {
+            if (Object.keys(res.data).length > 0) {
+              _this.editBtnStatus.show = true
+              _this.editBtnStatus.status = 1
+              const { bidStage, bidType, channelName, channelPerson, channelPhone, isWin, winner} = res.data
+              let getParams = {
+                bidType: '',
+                bidStage: '',
+                isWin: '',
+                channelName: channelName,
+                channelPerson: channelPerson,
+                channelPhone: channelPhone,
+                winner: winner
+              }
+              if (bidStage && bidStage.length > 0) {
+                _this.checkedList = bidStage
+                getParams.bidStage = bidStage.join('、')
+              }
+              if (isWin == 1) {
+                getParams.isWin = '是'
+              } else if(isWin == 2) {
+                getParams.isWin = '否'
+              } else {
+                getParams.isWin = ''
+              }
+              if(bidType == 1) {
+                getParams.bidType = '直接投标'
+                _this.showChannel = false
+                _this.formSchemaOptions.checkedListMap[1] = [].concat(bidStage || [])
+              } else {
+                getParams.bidType = '渠道投标'
+                _this.showChannel = true
+                _this.formSchemaOptions.checkedListMap[2] = [].concat(bidStage || [])
+              }
+              if (res.data) {
+                Object.assign(_this.copyBidParams, res.data)
+              }
+              _this.bidParams = getParams
+            }
+          }
+        }
+      })
+    },
     // 获取参标状态
     getCanBiaoInfo: function() {
       const _this = this