<template> 
 | 
  <GlobalWindow 
 | 
    title="计划详情" 
 | 
    width="500px" 
 | 
    :visible.sync="visible" 
 | 
    :confirm-working="isWorking" 
 | 
    @confirm="confirm" 
 | 
  > 
 | 
    <div style="min-width:450px;width:100%"> 
 | 
      <div class="desc_info"> 
 | 
        <div class="desc_info_title"> 
 | 
          <span>{{ info.title }}</span> 
 | 
          <span class="unvalid-style" v-if="info.status === 0">待审核</span> 
 | 
          <span class="valid-style" v-else-if="info.status === 1">审批通过</span> 
 | 
          <span class="scrap-style" v-else-if="info.status === 2">审批未通过</span> 
 | 
          <span class="scrap-style" v-else-if="info.status === 3">审批终止</span> 
 | 
        </div> 
 | 
        <div class="desc_info_company">{{ userInfo.rootDepartment.name }}</div> 
 | 
        <div class="desc_info_box"> 
 | 
          <div class="desc_info_box_item"> 
 | 
            <span>申请编号:</span> 
 | 
            <span>{{ info.code }}</span> 
 | 
          </div> 
 | 
          <div class="desc_info_box_item"> 
 | 
            <span>申请日期:</span> 
 | 
            <span>{{ info.createTime }}</span> 
 | 
          </div> 
 | 
          <div class="desc_info_box_item"> 
 | 
            <span>申请类型:</span> 
 | 
            <span v-if="info.type === 0">不良返工</span> 
 | 
            <span v-if="info.type === 1">客退</span> 
 | 
            <span v-if="info.type === 2">客返</span> 
 | 
            <span v-if="info.type === 3">报废申请</span> 
 | 
          </div> 
 | 
          <template v-if="info.type != 3"> 
 | 
            <div class="desc_info_box_item"> 
 | 
              <span>返修工序:</span> 
 | 
              <span>{{ info.backProcedureName }}</span> 
 | 
            </div> 
 | 
            <div class="desc_info_box_item"> 
 | 
              <span>返工原因:</span> 
 | 
              <span>{{ info.content }}</span> 
 | 
            </div> 
 | 
          </template> 
 | 
          <template v-if="info.type == 3"> 
 | 
            <div class="desc_info_box_item"> 
 | 
              <span>当前工厂:</span> 
 | 
              <span>{{info.factoryName}}</span> 
 | 
            </div> 
 | 
            <div class="desc_info_box_item"> 
 | 
              <span>出库仓库:</span> 
 | 
              <span>{{info.warehouseOutName}}</span> 
 | 
            </div> 
 | 
            <div class="desc_info_box_item"> 
 | 
              <span>入库仓库:</span> 
 | 
              <span>{{info.warehouseName}}</span> 
 | 
            </div> 
 | 
            <div class="desc_info_box_item"> 
 | 
              <span>报废原因:</span> 
 | 
              <span>{{ info.content }}</span> 
 | 
            </div> 
 | 
          </template> 
 | 
          <div class="desc_info_box_item"> 
 | 
            <span>申请人:</span> 
 | 
            <span>{{ info.createUserName }}/{{ info.departmentName }}</span> 
 | 
          </div> 
 | 
        </div> 
 | 
      </div> 
 | 
      <div class="desc_qd"> 
 | 
        <div class="desc_qd_header"> 
 | 
          <div class="desc_qd_header_x"></div> 
 | 
          <span>返工工装清单({{info.detailList ? info.detailList.length : '0'}})</span> 
 | 
        </div> 
 | 
        <template v-if="info && info.detailList && info.detailList.length > 0"> 
 | 
          <div class="desc_qd_info" v-for="(item, index) in info.detailList" :key="index"> 
 | 
            <div class="desc_qd_info_item"> 
 | 
              <span class="black">{{ item.applianceCode }}:</span> 
 | 
              <span class="black">{{ item.num }}{{ item.unitName }}</span> 
 | 
            </div> 
 | 
            <div class="desc_qd_info_item"> 
 | 
              <span>物料编码:</span> 
 | 
              <span>{{ item.materialName }}</span> 
 | 
            </div> 
 | 
            <div class="desc_qd_info_item"> 
 | 
              <span>物料名称:</span> 
 | 
              <span>{{ item.materialName }}</span> 
 | 
            </div> 
 | 
            <div class="desc_qd_info_item"> 
 | 
              <span>批次号:</span> 
 | 
              <span>{{ item.batch }}</span> 
 | 
            </div> 
 | 
            <div class="desc_qd_info_item"> 
 | 
              <span>生产工序:</span> 
 | 
              <span>{{ item.procedureName }}</span> 
 | 
            </div> 
 | 
          </div> 
 | 
        </template> 
 | 
        <div class="desc_qd_not" v-else>暂无工装</div> 
 | 
      </div> 
 | 
      <div class="desc_process"> 
 | 
        <div class="desc_process_title"> 
 | 
          <div class="desc_process_title_x"></div> 
 | 
          <span>流程</span> 
 | 
        </div> 
 | 
        <div class="desc_process_content"> 
 | 
          <div v-for="(item, index) in info.recordList" :key="index" class="desc_process_content_inner"> 
 | 
            <div v-if="index != info.recordList.length-1" class="item_x"></div> 
 | 
            <div class="item"> 
 | 
                <div class="item_left"> 
 | 
                <div style="height:100%"> 
 | 
                  <div class="item_left_img"> 
 | 
                    <p>{{ nameToSub(item) }}</p> 
 | 
                    <img :src="index==0?agreeImg:operationResult(item)" alt="" /> 
 | 
                  </div> 
 | 
                </div> 
 | 
                <div class="item_left_text"> 
 | 
                  <span>{{ index == 0 ? '发起申请' : '审批人' }}</span> 
 | 
                  <span>{{ item.userModel ? item.userModel.name : '未绑定钉钉' }}</span> 
 | 
                  <span v-if="item.remark">{{ item.remark }}</span> 
 | 
                </div> 
 | 
              </div> 
 | 
              <div class="item_right">{{ item.date }}</div> 
 | 
            </div> 
 | 
            <div style="height:1px"></div> 
 | 
          </div> 
 | 
        </div> 
 | 
        <!-- <div style="height:40px"></div> --> 
 | 
      </div> 
 | 
    </div> 
 | 
    <div slot="footer" class="window__header"> 
 | 
      <el-button type="primary" @click="cancel">返回</el-button> 
 | 
    </div> 
 | 
  </GlobalWindow> 
 | 
</template> 
 | 
  
 | 
<script> 
 | 
import BaseOpera from '@/components/base/BaseOpera' 
 | 
import GlobalWindow from '@/components/common/GlobalWindow' 
 | 
export default { 
 | 
  name: 'BackorderDetailExtWindow', 
 | 
  extends: BaseOpera, 
 | 
  components: { GlobalWindow }, 
 | 
  data () { 
 | 
    return { 
 | 
      info: {}, 
 | 
      userInfo: {}, 
 | 
      waitImg: require('../../assets/images/ic_shenhe@2x.png'), 
 | 
      agreeImg: require('../../assets/images/ic_pass@2x.png'), 
 | 
      refuseImg: require('../../assets/images/ic_notpass@2x.png'), 
 | 
    } 
 | 
  }, 
 | 
  created () { 
 | 
    this.config({ 
 | 
      api: '/ext/plansExt', 
 | 
      'field.id': 'id' 
 | 
    }) 
 | 
    this.userInfo = this.$store.state.userInfo 
 | 
  }, 
 | 
  methods: { 
 | 
    open (title, target) { 
 | 
      this.title = title 
 | 
      this.visible = true 
 | 
      // 编辑 
 | 
      this.$nextTick(() => { 
 | 
        this.info = target 
 | 
      }) 
 | 
    }, 
 | 
    cancel () { 
 | 
      this.visible = false 
 | 
    }, 
 | 
    nameToSub (row) { 
 | 
      if (!row.userModel) { 
 | 
        return '-' 
 | 
      } 
 | 
      return row.userModel.name.substr(row.userModel.name.length-1, 1) 
 | 
    }, 
 | 
    operationResult    (item) { 
 | 
      switch (item.operationResult) { 
 | 
        case 'AGREE': return this.agreeImg 
 | 
        case 'NONE': return this.waitImg 
 | 
        case 'REFUSE': return this.refuseImg 
 | 
      } 
 | 
    } 
 | 
  } 
 | 
} 
 | 
  
 | 
</script> 
 | 
  
 | 
<style lang="scss" scoped> 
 | 
// ::v-deep .window__body { 
 | 
//   padding: 12px 0px !important; 
 | 
// } 
 | 
.desc { 
 | 
    position: absolute; 
 | 
    top: 0; 
 | 
    width: 100%; 
 | 
    height: 100%; 
 | 
} 
 | 
.desc_info { 
 | 
         
 | 
        background: #ffffff; 
 | 
        .desc_info_title { 
 | 
            display: flex; 
 | 
            align-items: center; 
 | 
            justify-content: space-between; 
 | 
            span { 
 | 
                &:first-child { 
 | 
                    font-size: 16px; 
 | 
                    font-weight: 500; 
 | 
                    color: #333333; 
 | 
                } 
 | 
                &:last-child { 
 | 
                    font-size: 13px; 
 | 
                    font-weight: 400; 
 | 
                    // color: #F5A400; 
 | 
                } 
 | 
            } 
 | 
        } 
 | 
        .desc_info_company { 
 | 
            font-size: 12px; 
 | 
            font-weight: 400; 
 | 
            color: #666666; 
 | 
            margin: 12px 0; 
 | 
        } 
 | 
        .desc_info_box { 
 | 
            padding: 12px 15px; 
 | 
            background: #F7F7F7; 
 | 
            border-radius: 8px; 
 | 
            display: flex; 
 | 
            flex-direction: column; 
 | 
            .desc_info_box_item { 
 | 
                display: flex; 
 | 
                align-items: center; 
 | 
                margin-bottom: 12px; 
 | 
                &:last-child { 
 | 
                    margin-bottom: 0 !important; 
 | 
                } 
 | 
                span { 
 | 
                    font-size: 13px; 
 | 
                    font-weight: 400; 
 | 
                    &:first-child { 
 | 
                        color: #666666; 
 | 
                    } 
 | 
                    &:last-child { 
 | 
                        color: #222222; 
 | 
                    } 
 | 
                } 
 | 
            } 
 | 
        } 
 | 
    } 
 | 
    .desc_qd { 
 | 
       
 | 
        margin-top: 20px; 
 | 
        .desc_qd_not { 
 | 
            width: 100%; 
 | 
            height: 75px; 
 | 
            background: white; 
 | 
            display: flex; 
 | 
            align-items: center; 
 | 
            justify-content: center; 
 | 
            font-size: 14px; 
 | 
            color: black; 
 | 
            margin-top:150px; 
 | 
        } 
 | 
        .desc_qd_header { 
 | 
            display: flex; 
 | 
            align-items: center; 
 | 
            padding: 0 15px; 
 | 
            .desc_qd_header_x { 
 | 
                width: 4px; 
 | 
                height: 15px; 
 | 
                background: #4275FC; 
 | 
                border-radius: 1px; 
 | 
                margin-right: 6px; 
 | 
            } 
 | 
            span { 
 | 
                font-size: 16px; 
 | 
                font-weight: 500; 
 | 
                color: #222222; 
 | 
            } 
 | 
        } 
 | 
        .desc_qd_info { 
 | 
          border-radius: 4px; 
 | 
            background: #f7f7f7; 
 | 
            padding: 15px; 
 | 
            margin-top: 15px; 
 | 
            .desc_qd_info_item { 
 | 
                display: flex; 
 | 
                align-items: center; 
 | 
                margin-bottom: 12px; 
 | 
                &:last-child { 
 | 
                    margin-bottom: 0; 
 | 
                } 
 | 
                .black { 
 | 
                    font-size: 14px !important; 
 | 
                    font-weight: 400 !important; 
 | 
                    color: #222222 !important; 
 | 
                } 
 | 
                span { 
 | 
                    font-size: 13px; 
 | 
                    font-weight: 400; 
 | 
                    &:first-child { 
 | 
                        color: #666666; 
 | 
                    } 
 | 
                    &:last-child { 
 | 
                        color: #333333; 
 | 
                    } 
 | 
                } 
 | 
            } 
 | 
        } 
 | 
    } 
 | 
    .desc_process { 
 | 
        margin-top: 20px; 
 | 
        .desc_process_title { 
 | 
            display: flex; 
 | 
            align-items: center; 
 | 
            padding: 0 15px; 
 | 
            span { 
 | 
                font-size: 16px; 
 | 
                font-weight: 500; 
 | 
                color: #222222; 
 | 
            } 
 | 
            .desc_process_title_x { 
 | 
                margin-right: 6px; 
 | 
                width: 4px; 
 | 
                height: 15px; 
 | 
                background: #4275FC; 
 | 
                border-radius: 2px; 
 | 
            } 
 | 
        } 
 | 
        .desc_process_content { 
 | 
            padding: 15px; 
 | 
            background: white; 
 | 
            margin-top: 15px; 
 | 
          .desc_process_content_inner{ 
 | 
            position: relative; 
 | 
            .item_x { 
 | 
                position: absolute; 
 | 
                left: 19px; 
 | 
                // left: 35px; 
 | 
                height: 100%; 
 | 
                border-right: 1PX solid #E5E5E5; 
 | 
                overflow: hidden; 
 | 
            } 
 | 
            .item { 
 | 
                display: flex; 
 | 
                justify-content: space-between; 
 | 
                margin-bottom: 20px; 
 | 
                 
 | 
                &:last-child { 
 | 
                    margin-bottom: 0 !important; 
 | 
                } 
 | 
                .item_left { 
 | 
                    display: flex; 
 | 
                    align-items: center; 
 | 
                    position: relative; 
 | 
                    .item_left_img { 
 | 
                        width: 38px; 
 | 
                        height: 38px; 
 | 
                        background: #4275FC; 
 | 
                        border: 2px solid #FFFFFF; 
 | 
                        position: relative; 
 | 
                        border-radius: 50%; 
 | 
                        display: flex; 
 | 
                        align-content: center; 
 | 
                        justify-content: center; 
 | 
                        white-space: nowrap; 
 | 
                        p { 
 | 
                            font-size: 11px; 
 | 
                            font-weight: 400; 
 | 
                            color: #FFFFFF; 
 | 
                        } 
 | 
                        img { 
 | 
                            position: absolute; 
 | 
                            bottom: 0; 
 | 
                            right: 0; 
 | 
                            width: 14px; 
 | 
                            height: 14px; 
 | 
                        } 
 | 
                    } 
 | 
                    .item_left_text { 
 | 
                        display: flex; 
 | 
                        flex-direction: column; 
 | 
                        span { 
 | 
                            margin-left: 10px; 
 | 
                            &:first-child { 
 | 
                                font-size: 14px; 
 | 
                                font-weight: 400; 
 | 
                                color: #111111; 
 | 
                            } 
 | 
                            &:nth-child(2) { 
 | 
                                font-size: 12px; 
 | 
                                font-weight: 400; 
 | 
                                color: #999999; 
 | 
                                margin-top: 5px; 
 | 
                            } 
 | 
                            &:nth-child(3) { 
 | 
                              margin-top: 5px; 
 | 
                              font-size: 12px; 
 | 
                              padding: 5px; 
 | 
                              background-color: #f7f7f7; 
 | 
                              color: #666; 
 | 
                              border-radius: 4px; 
 | 
                            } 
 | 
                        } 
 | 
                    } 
 | 
                } 
 | 
                .item_right { 
 | 
                    font-size: 12px; 
 | 
                    font-weight: 400; 
 | 
                    color: #999999; 
 | 
                } 
 | 
            } 
 | 
          } 
 | 
             
 | 
        } 
 | 
    } 
 | 
</style> 
 |