confirm-detail.vue 11.8 KB
Newer Older
1 2
<template>
  <h-view id="addCar">
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
    <transition name="trans">
      <div v-show="downNum" class="modal-show">
        <div class="down">
          <div class="top">
            录入产品信息
            <img src="@/assets/intoApproval/close.png" @click="downNum=false" >
          </div>
          <div class="down-content">
            <span>请上传照片</span>
            <div class="photo">
              <!-- <img src=""> -->
            </div>
            <list-item :item-height="44">
              <item>
                <div slot="name">车架号</div>
                <input
                  slot="content"
                  v-model="rentInfo.frame_number"
                  readonly
                  placeholder="自动识别车架号"
                >
              </item>
              <item>
                <div slot="name">发动机号</div>
                <input slot="content" v-model="rentInfo.engine" readonly placeholder="自动识别发动机号" >
              </item>
linxin's avatar
linxin committed
29 30
              <item>
                <div slot="name">车辆型号 </div>
linxin's avatar
linxin committed
31
                <input slot="content" v-model="rentInfo.type" readonly placeholder="自动识别车辆型号" >
linxin's avatar
linxin committed
32 33 34
              </item>
              <item>
                <div slot="name">合格证编号 </div>
linxin's avatar
linxin committed
35
                <input slot="content" v-model="rentInfo.number" readonly placeholder="自动识别合格证编号" >
linxin's avatar
linxin committed
36
              </item>
37 38 39 40
              <item>
                <div slot="name">厂商型号</div>
                <input
                  slot="content"
41
                  v-model="rentInfo.vehicle_model"
42 43
                  readonly
                  class="write"
linxin's avatar
linxin committed
44
                  placeholder="暂无数据"
45 46 47 48 49 50
                >
              </item>
              <item>
                <div slot="name">车牌号</div>
                <input
                  slot="content"
51
                  v-model="rentInfo.certificate_number"
52
                  readonly
linxin's avatar
linxin committed
53
                  placeholder="暂无数据"
54 55
                >
              </item>
linxin's avatar
linxin committed
56 57 58 59
              <item>
                <div slot="name">发车日期</div>
                <input
                  slot="content"
60
                  v-model="rentInfo.departure_date"
linxin's avatar
linxin committed
61
                  readonly
linxin's avatar
linxin committed
62 63 64 65 66 67 68 69 70 71
                  placeholder="暂无数据"
                >
              </item>
              <item>
                <div slot="name">开票日期</div>
                <input
                  slot="content"
                  v-model="rentInfo.invoice_date"
                  readonly
                  placeholder="暂无数据"
linxin's avatar
linxin committed
72 73
                >
              </item>
74
            </list-item>
75
          </div>
76
        </div>
77
      </div>
78
    </transition>
79 80 81
    <h-header :proportion="[5,1,1]" class="bar-custom">
      <div slot="left" class="h-header-btn">
        <img src="@/assets/userBind/arrow.png" @click="$routeGo()" >
82
        <span>合同明细</span>
83 84 85 86 87
      </div>
    </h-header>
    <h-content>
      <div class="userInfo">承租人信息</div>
      <list-item :item-height="44">
88
        <item>
89
          <div slot="name">合同号</div>
linxin's avatar
linxin committed
90
          <input slot="content" v-model="info.project_number" readonly placeholder="暂无数据" >
91
        </item>
92
        <item>
93
          <div slot="name">经销商</div>
linxin's avatar
linxin committed
94
          <input slot="content" v-model="info.bp_agent_name" readonly placeholder="暂无数据" >
95 96 97
        </item>
        <item>
          <div slot="name">承租人</div>
linxin's avatar
linxin committed
98
          <input slot="content" v-model="info.bp_name" readonly placeholder="暂无数据" >
99
        </item>
100
        <item>
101
          <div slot="name">产品线</div>
linxin's avatar
linxin committed
102
          <input slot="content" v-model="info.division_n" readonly placeholder="暂无数据" >
103 104 105
        </item>
        <item>
          <div slot="name">合同金额</div>
linxin's avatar
linxin committed
106
          <input slot="content" v-model="info.total_price" readonly placeholder="暂无数据" >
107
        </item>
108
        <item>
109
          <div slot="name">商务政策</div>
linxin's avatar
linxin committed
110
          <input slot="content" v-model="info.product_plan_id_n" readonly placeholder="暂无数据" >
111 112 113
        </item>
        <item>
          <div slot="name">租赁物数量</div>
114
          <input slot="content" v-model="info.product_num" readonly placeholder="请输入租赁物数量" >
115 116 117
        </item>
      </list-item>
      <div class="userInfo">设备清单</div>
118
      <div
linxin's avatar
linxin committed
119
        v-for="(item,index) in equip"
120 121
        :key="index"
        class="equipment"
linxin's avatar
linxin committed
122
        @click="downNum=true;getRent(item.contract_id)"
123
      >
124 125 126 127 128 129 130 131 132 133
        <div class="left">
          <span>
            <img src="@/assets/contractStart/list.png" >
          </span>
        </div>
        <div class="center">
          <span>租赁物信息</span>
          <span class="status">已维护</span>
          <p>
            参数项
linxin's avatar
linxin committed
134
            <span>{{ item.product_code }}</span>
135 136
          </p>
        </div>
137
        <div class="right">
138 139 140 141 142
          <img src="@/assets/contractStart/into.png" >
        </div>
      </div>
    </h-content>
    <bottom-tab>
143
      <tab-button class="approve" @click.native="isConfirm">确定</tab-button>
144 145 146 147 148 149 150 151 152
    </bottom-tab>
  </h-view>
</template>
<script>
export default {
  data () {
    return {
      num: null,
      downNum: false,
153
      show: false,
linxin's avatar
linxin committed
154
      info: {
linxin's avatar
linxin committed
155 156 157 158 159 160 161 162 163
        product_plan_id: '',
        product_num: '',
        first_pay: '',
        division_n: '',
        gps_fee: '',
        bp_name: '',
        project_number: '',
        bp_agent_name: ' ',
        product_plan_id_n: '',
linxin's avatar
linxin committed
164
      },
linxin's avatar
linxin committed
165
      rentInfo: {
166 167 168 169
        frame_number: '',
        engine: '',
        manufacturer: '',
        license_plate_number: '',
170 171 172
        vehicle_model: '',
        certificate_number: '',
        departure_date: '',
linxin's avatar
linxin committed
173
        invoice_date: '',
linxin's avatar
linxin committed
174
      },
175
      products: [],
176 177 178 179 180 181 182
      equip: [
        {
          product_id: '3',
          product_code: 'GTC389',
          contract_id: '231',
        },
      ],
183 184 185 186
    }
  },
  computed: {
  },
linxin's avatar
linxin committed
187 188
  beforeRouteEnter (to, from, next) {
    next(vm => {
linxin's avatar
linxin committed
189 190
      vm.getDetail()
      vm.getEquipment()
linxin's avatar
linxin committed
191 192
    })
  },
193
  methods: {
194 195 196 197 198 199 200 201 202 203 204
    isConfirm () {
      this.hlsPopup.showConfirm({
        title: '提示',
        content: '您确定同意发车吗?',
        onConfirm: data => {
          if (data === 1) {
            this.confirm()
          }
        },
      })
    },
linxin's avatar
linxin committed
205 206 207 208
    confirm () {
      let vm = this
      let url = process.env.basePath + 'do_car_confirm'
      let param = {
209
        master: {
linxin's avatar
linxin committed
210
          project_id: this.$route.params.project_id,
211 212 213
          confirm_status: 'APPROVED',
        },
      }
linxin's avatar
linxin committed
214 215 216 217 218
      hlsPopup.showLoading('请稍候')
      vm.$post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          vm.equip = res.lists
219
          vm.hlsPopup.showSuccess('发车成功')
linxin's avatar
linxin committed
220 221 222 223 224
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
linxin's avatar
linxin committed
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
    getEquipment () {
      let vm = this
      let url = process.env.basePath + 'car_equip_list_query'
      let param = {
        project_id: this.$route.params.project_id,
      }
      hlsPopup.showLoading('请稍候')
      vm.$post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          vm.equip = res.lists
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
linxin's avatar
linxin committed
241
    getRent (e) {
linxin's avatar
linxin committed
242 243 244
      let vm = this
      let url = process.env.basePath + 'leases_info_query'
      let param = {
linxin's avatar
linxin committed
245
        contract_id: e,
linxin's avatar
linxin committed
246 247 248 249 250 251 252 253 254 255 256 257
      }
      hlsPopup.showLoading('请稍候')
      vm.$post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          Object.assign(vm.rentInfo, res.info)
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },

linxin's avatar
linxin committed
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
    getDetail () {
      let vm = this
      let url = process.env.basePath + 'con_contract_detial'
      let param = {
        project_id: this.$route.params.project_id,
      }
      hlsPopup.showLoading('请稍候')
      vm.$post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          vm.info = res.info
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
274
  },
275 276 277 278 279 280 281
}
</script>
<style lang="less" scoped>
#addCar {
  input::placeholder {
    color: #888c8f;
  }
282 283 284 285 286 287 288 289 290
  .trans-enter-active,
  .trans-leave-active {
    transition: opacity 0.5s;
  }
  .trans-enter,
  .trans-leave-active {
    opacity: 0;
  }
  .hide {
291 292 293
    display: flex;
    justify-content: flex-start;
    align-items: center;
294 295 296 297
    img {
      width: 30px;
      height: 30px;
      margin-left: 65%;
298 299
    }
  }
300 301
  .wrap {
    padding-top: 92px;
302
  }
303 304 305 306
  .modal-show {
    width: 100%;
    height: 100%;
    position: absolute;
307
    z-index: 900;
308 309 310 311 312 313 314
    background-color: rgba(56, 63, 69, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    .down {
      position: relative;
      width: 314px;
linxin's avatar
linxin committed
315
      height: 526px;
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352
      background-size: 301px 24.7px;
      background-color: #fff;
    }
    .top {
      width: 100%;
      height: 44px;
      font-family: PingFangSC-Semibold;
      font-size: 16px;
      letter-spacing: 0;
      text-align: center;
      line-height: 44px;
      color: #fff;
      background: #0041c4;
      img {
        width: 16px;
        height: 16px;
        float: right;
        margin-top: 13px;
        margin-right: 20px;
      }
    }
    .down-content {
      margin-top: 8px;
      span:first-child {
        font-family: PingFangSC-Regular;
        font-size: 13px;
        color: #656464;
        letter-spacing: 0;
        margin-left: 15px;
      }
      .photo {
        width: 172px;
        height: 120px;
        border: 1px solid #dcdcdd;
        border-radius: 2px;
        margin: 0 auto;
        margin-top: 12px;
353 354 355 356 357
        background: url("../../assets/contractStart/photo.png") 70px no-repeat;
        background-size: 24px 20px;
        img {
          width: 100%;
          height: 100%;
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461
        }
      }
    }
  }
  .userInfo {
    height: 45px;
    line-height: 45px;
    color: #0041c4;
    font-size: 15px;
    margin-left: 16px;
    position: relative;
  }
  .userInfo::before {
    content: "";
    display: block;
    width: 4px;
    height: 20px;
    background-color: #0041c4;
    position: absolute;
    left: -15px;
    top: 12px;
  }
  .equipment:not(:first-child) {
    margin-top: 2px;
  }
  .equipment {
    width: 359px;
    height: 72px;
    background-color: #fff;
    margin: 0 auto;
    display: flex;
    .left {
      flex: 1;
      span {
        display: block;
        width: 30px;
        height: 30px;
        background-color: #e8e9ed;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: 10px;
        margin-top: 8px;
        img {
          width: 11px;
          height: 14px;
        }
      }
    }
    .center {
      flex: 6;
      span:first-child {
        font-family: PingFangSC-Regular;
        font-size: 14px;
        color: #383f45;
        letter-spacing: 0.43px;
        margin-left: 10px;
        margin-top: 12px;
      }
      .status {
        display: inline-block;
        width: 46px;
        height: 16px;
        text-align: center;
        line-height: 16px;
        font-family: PingFangSC-Medium;
        font-size: 12px;
        color: #ffffff;
        letter-spacing: 0;
        background-color: #1d3fff;
        margin-left: 21px;
        margin-top: 12px;
      }
      p {
        font-family: PingFangSC-Regular;
        font-size: 13px;
        color: rgba(56, 63, 69, 0.6);
        letter-spacing: 0.4px;
        margin-left: 10px;
        margin-top: 10px;
        span {
          font-family: Helvetica;
          font-size: 13px;
          color: rgba(56, 63, 69, 0.6);
        }
      }
    }
    .right {
      flex: 1;
      display: flex;
      align-items: center;
      img {
        width: 13px;
        height: 13px;
      }
    }
  }
  .approve {
    color: #fff;
    background-color: #0041c4;
  }
}
</style>