#
zjj
2024-04-07 e6a02c8b09a796e436a501e9b87d19e25c34c9d1
pages/business/plan/modiPlan.vue
@@ -63,26 +63,27 @@
                  <uni-combox :candidates="selList" placeholder="请选择平库货架类型"
                  v-model="baseFormData.select_2"></uni-combox>
            </uni-forms-item>
            <uni-forms-item label="是否需要跨梁" name="radio_1">
               <uni-data-checkbox v-model="baseFormData.radio_1" :localdata="radio_1" />
            </uni-forms-item>
            <uni-forms-item label="是否需要网层板" name="radio_2">
               <uni-data-checkbox v-model="baseFormData.radio_2" :localdata="radio_2" />
            </uni-forms-item>
            <uni-forms-item label="布局区域是否提供CAD场地图纸/场地" name="radio_7">
               <uni-data-checkbox v-model="baseFormData.radio_7" :localdata="radio_7" />
            </uni-forms-item>
            <uni-forms-item label="地面有无电缆沟" name="radio_3">
               <uni-data-checkbox v-model="baseFormData.radio_3" :localdata="radio_3" />
            </uni-forms-item>
            <uni-forms-item label="是否需要层板" name="radio_8">
               <uni-data-checkbox v-model="baseFormData.radio_8" :localdata="radio_8" />
            </uni-forms-item>
            <uni-forms-item label="地面平整度和地面沉降是否满足标准" name="radio_5">
            <uni-forms-item label="布局区域是否提供CAD场地图纸/场地" name="radio_5">
               <uni-data-checkbox v-model="baseFormData.radio_5" :localdata="radio_5" />
            </uni-forms-item>
            <uni-forms-item label="地面有无电缆沟" name="radio_4">
               <uni-data-checkbox v-model="baseFormData.radio_4" :localdata="radio_4" />
            </uni-forms-item>
            <uni-forms-item label="是否需要层板" name="radio_9">
               <uni-data-checkbox v-model="baseFormData.radio_9" :localdata="radio_9" />
            </uni-forms-item>
            <uni-forms-item label="地面平整度和地面沉降是否满足标准" name="radio_3">
               <uni-data-checkbox v-model="baseFormData.radio_3" :localdata="radio_3" />
            </uni-forms-item>
            
            <uni-forms-item label="其他要求及注意点" required name="textarea_2">
@@ -103,7 +104,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 +143,10 @@
               changeTime: '',
               planBonus: '',
               planLeaderBonus: '',
               userXmlSelPhone: ''
               userXmlSelPhone: '',
               beItem: null
            },
            beItem: 0,
            selList: ['横梁式','驶入式','悬梁式','流利式','重力式','其他'],
            rules: {
               name: {
@@ -248,7 +251,27 @@
                  value: 'value2'
               }
            ],
            radio_8: [
            radio_5: [
               {
                  text: '是',
                  value: 'value1'
               },
               {
                  text: '否',
                  value: 'value2'
               }
            ],
            radio_4: [
               {
                  text: '是',
                  value: 'value1'
               },
               {
                  text: '否',
                  value: 'value2'
               }
            ],
            radio_9: [
               {
                  text: '是',
                  value: 'value1'
@@ -268,58 +291,38 @@
                  value: 'value2'
               }
            ],
            radio_5: [
               {
                  text: '是',
                  value: 'value1'
               },
               {
                  text: '否',
                  value: 'value2'
               }
            ],
            radio_7: [
               {
                  text: '是',
                  value: 'value1'
               },
               {
                  text: '否',
                  value: 'value2'
               }
            ],
            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,20 +339,19 @@
         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: {
         init() {
@@ -360,12 +362,35 @@
               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;
                     }
                     that.baseFormData = res.data
                  }
                  // that.saleManage = res.data
                  // that.cstmr = res.data
                  // that.cstmrId = that.cstmr.id
               }
            })
         },
@@ -449,14 +474,11 @@
                  that.baseFormData.orderId = element.id
               }
            }
            // for (element of that.userList) {
            //    if(element.value == that.baseFormData.userId) {
            //       that.baseFormData.userId = element.id
            //    }
            // }
            for(var i = 1;i <= that.selList.length; i++) {
            for(let i = 0; i < that.selList.length;i++) {
               if (that.selList[i] == that.baseFormData.select_2) {
                  that.baseFormData.select_2 = 'value' + i
                  let index =  i + 1
                  console.log(index);
                  that.baseFormData.select_2 = 'value' + index
               }
            }
            that.baseFormData.planType = 4
@@ -477,7 +499,6 @@
                  }
               }
               res['id'] = that.baseFormData.id
               // return
               uni.request({
                  url: that.baseUrl + '/plan/update/auth',
                  header:{
@@ -489,7 +510,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(() => {