#
whycq
2023-11-22 3913b3c5c8cde03f8c92d1c738d28c4a9bae7e55
pages/business/plan/planDetails.vue
@@ -10,8 +10,14 @@
         </view>
         <!-- 步骤条 -->
         <view style="background-color: #FFF;margin-top: 10px;padding-top: 20px;padding-bottom: 20px;">
            <uni-steps :options="list1" :active="active" />
            <uni-steps :options="list1" :active="current" />
         </view>
         <!-- <view style="background-color: #FFF;margin-top: 10px;padding-top: 20px;padding-bottom: 20px;">
            <u-steps :current="current">
               <u-steps-item :title="`${item.title}`" :desc="item.username" v-for="item in list1" />
            </u-steps>
         </view> -->
         <!-- 基本信息 -->
         <view class="container">
            <view><y-title title="基本信息"></y-title></view><view></view>
@@ -36,7 +42,7 @@
         <!-- 售前规划 -->
         <view class="container">
            <view><y-title title="售前规划"></y-title></view><view></view>
            <view class="list-item1">规划员</view><view class="list-item2">{{detl.uuid}}</view>
            <view class="list-item1">规划员</view><view class="list-item2">{{detl.planner$}}</view>
            <view class="list-item1">完成时间</view><view class="list-item2">{{detl.finishTime$}}</view>
            <view class="list-item1">更改方案</view><view class="list-item2">{{detl.change}}</view>
            <view class="list-item1">更改次数</view><view class="list-item2">{{detl.changeTime}}</view>
@@ -64,6 +70,11 @@
            </uni-popup-dialog>
         </uni-popup>
      </view>
      <view class="foot">
         <button  size="mini" type="primary" @click="edite(id)">修改</button>
         <button  size="mini" type="warn" @click="del(id)">删除</button>
      </view>
   </view>
</template>
@@ -71,6 +82,7 @@
   export default {
      data() {
         return {
            current: 1,
            id: 0,
            detl: {
               id: '',
@@ -87,9 +99,10 @@
            followers: [],
            cstmrId: '',
            active: 0,
            steps: [],
            list1: [{
               title: '开始',
               desc: ''
               desc: '123'
            }, {
               title: '组长审核',
               desc: ''
@@ -107,7 +120,7 @@
         }
      },
      onLoad(option) { 
         if (option == '') {
         if (option != '') {
            this.id = option.id
            this.init()
            this.autoLoad('follower','')
@@ -119,9 +132,9 @@
            const eventChannel = this.getOpenerEventChannel();
            eventChannel.on('saleManage', function(data) {
               _this.id = data.data
               console.log(data.data);
               _this.init()
            })
            this.init()
            this.autoLoad('follower','')
            setTimeout(()=>{
               this.getFollowers()
@@ -137,10 +150,28 @@
               header: {'token' : uni.getStorageSync('token')},
               method: 'GET',
               success(res) {
                  console.log(res);
                  res = res.data
                  that.detl = res.data
                  that.active = res.data.settle
                  that.list1 = JSON.parse(res.data.settleMsg)
                  for (let key of that.list1) {
                     key.desc = key.username
                  }
                  that.current = res.data.settle-1
                  switch(res.data.select_3) {
                     case 'value1':
                        res.data.select_3 = '牛腿式'
                        break;
                     case 'value2':
                        res.data.select_3 = '横梁式'
                        break;
                     case 'value3':
                        res.data.select_3 = '新能源'
                        break;
                     case 'value4':
                        res.data.select_3 = '其他'
                        break;
                  }
                  if (res.data.planType == 4) {
                     that.info.push(
                     {name:'货物规格',val:res.data.input_1},
@@ -191,9 +222,7 @@
               header: {'token' : uni.getStorageSync('token'),
               },
               method: 'GET',
               success(res) {
                  console.log(res);
                  res = res.data
                  if (res.code === 200) {
                     uni.navigateBack()
@@ -295,7 +324,13 @@
                  that.getFollowers()
               }
            })
         }
         },
         edite(id) {
            let _this = this
            uni.navigateTo({
               url: '/pages/business/plan/modiPlan?id=' + id
            })
         },
      }
   }
</script>