#
whycq
2023-11-22 35b8f2e7b34875efebed526a7394ff50e65f8e90
pages/business/plan/modiPlan.vue
@@ -103,7 +103,7 @@
               <uni-easyinput v-model="baseFormData.planLeaderBonus" placeholder="请输入规格组长奖金" />
            </uni-forms-item>
            <uni-forms-item label="完成时间" name="finishTime">
               <uni-datetime-picker type="date" return-type="string" v-model="baseFormData.datetimesingle"/>
               <uni-datetime-picker type="date" return-type="string" v-model="baseFormData.finishTime"/>
               </uni-data-picker>
            </uni-forms-item>
            <uni-forms-item label="更改次数" name="changeTime">
@@ -142,8 +142,10 @@
               changeTime: '',
               planBonus: '',
               planLeaderBonus: '',
               userXmlSelPhone: ''
               userXmlSelPhone: '',
               beItem: null
            },
            beItem: 0,
            selList: ['横梁式','驶入式','悬梁式','流利式','重力式','其他'],
            rules: {
               name: {
@@ -291,35 +293,35 @@
            changeValue: [
               {
                  text: '是',
                  value: '1'
                  value: 1
               },
               {
                  text: '否',
                  value: '0'
                  value: 0
               }
            ],
            // 单选数据源
            beItem$: [{
               text: '是',
               value: '1'
               value: 1
            }, {
               text: '否(需售前技术跟进项目,与客户直接沟通等)',
               value: '0'
               value: 0
            }],
            citysData: [],
            citysDataTemp: '',
            planNeeds: [
               {
                  text: '系统 方案规划设计',
                  value: 1
                  value: '1'
               }, 
               {
                  text: '提供选材清单',
                  value: 2
                  value: '2'
               },
               {
                  text: '立体库设计方案',
                  value: 3
                  value: '3'
               }
            ]
            
@@ -336,19 +338,20 @@
         this.getDetail()
      },
      onLoad(option) {
         if (JSON.stringify(option) != "{}") {
            this.id = option.id
            this.init()
            this.autoLoad('follower','')
         } else {
            let _this = this
            const eventChannel = this.getOpenerEventChannel();
            eventChannel.on('cstmr', function(data) {
               _this.id = data.data
               _this.init()
            })
            this.autoLoad('follower','')
         }
         this.$nextTick(() => {
            if (JSON.stringify(option) != "{}") {
               this.id = option.id
               this.init()
            } else {
               let _this = this
               const eventChannel = this.getOpenerEventChannel();
               eventChannel.on('cstmr', function(data) {
                  _this.id = data.data
                  _this.init()
               })
            }
         })
         
      },
      methods: {
@@ -360,7 +363,34 @@
               method: 'GET',
               success(res) {
                  res = res.data
                  console.log(res);
                  if (res.code === 200) {
                     let planNeed = res.data.planNeed.split('-')
                     res.data.planNeed = []
                     for (let k of planNeed) {
                        res.data.planNeed.push(k)
                     }
                     switch(res.data.select_2) {
                        case 'value1':
                           res.data.select_2 = '横梁式'
                           break;
                        case 'value2':
                           res.data.select_2 = '驶入式'
                           break;
                        case 'value3':
                           res.data.select_2 = '悬梁式'
                           break;
                        case 'value4':
                           res.data.select_2 = '流利式'
                           break;
                        case 'value5':
                           res.data.select_2 = '重力式'
                           break;
                        case 'value6':
                           res.data.select_2 = '其他'
                           break;
                     }
                     // planNeed.push()
                     that.baseFormData = res.data
                  }
                  // that.saleManage = res.data
@@ -477,7 +507,6 @@
                  }
               }
               res['id'] = that.baseFormData.id
               // return
               uni.request({
                  url: that.baseUrl + '/plan/update/auth',
                  header:{
@@ -489,7 +518,7 @@
                  success(result) {
                     var res = result.data
                     if (res.code === 200) {
                        uni.navigateBack()
                        uni.navigateBack({delta:2})
                     } else if (res.code === 403) {
                        uni.showToast({title: res.msg, icon: "none", position: 'top'})
                        setTimeout(() => {