jiangping
2024-12-27 5506edbe54883b31db3cc8e4a1d9d0795a18a3c9
company/src/components/business/OperaUnionChangeDetailWindow.vue
@@ -27,8 +27,9 @@
                            <el-button v-if="[1,2].includes(model.status)" type="primary" @click="viewApplyFile">查看申请单</el-button>
                            <el-button v-if="[0].includes(model.status)" type="primary" :disabled="loading" :loading="loading" @click="getSignLink(0)">签署申请单</el-button>
                            <el-button v-if="[2].includes(model.status)" type="primary" @click="viewPidan">查看批单</el-button>
                            <el-button v-if=" [1].includes(model.status)" type="primary" @click="$refs.OperaUnionChangeCheckWindow.open('上传批单',model,3)">上传批单</el-button>
                            <el-button  v-if="[0,1].includes(model.status)" type="danger" @click="$refs.OperaUnionChangeCheckWindow.open('退回申请',model,1)">退回申请</el-button>
                            <el-button v-if=" [1].includes(model.status) && userInfo.type === 0" type="primary" @click="$refs.OperaUnionChangeCheckWindow.open('上传批单',model,3)">上传批单</el-button>
                            <el-button  v-if="[0,1].includes(model.status)" type="danger" @click="$refs.OperaUnionChangeCheckWindow.open('关闭申请',model,1)">关闭申请</el-button>
                        </template>
                        <template  v-if="0">
                          <template  v-if="0">
@@ -136,6 +137,7 @@
                          label="被保险人">
                      </el-table-column>
                        <el-table-column
                            v-if="hasDispatchUnit !== 1"
                            prop="duName"
                            label="派遣单位">
                        </el-table-column>
@@ -235,21 +237,37 @@
            </span>
      </el-dialog>
      <el-dialog
          title="查看保险单"
          title="查看批单"
          :visible.sync="visibleFile"
          width="500px"
          :modal="true"
          width="700px"
          :modal="false"
          :show-close="true"
          :close-on-click-modal="false"
          append-to-body
          center>
        <div class="desc_item_from" v-for="(item, index) in pidanFileData" :key="index"  style="margin-bottom: 15px">
          <span v-if="index ==0">{{item.name}}:</span>
          <span v-if="index >0">被保险人({{item.name}})保险单:</span>
          <a  style="cursor: pointer;color: #2E68EC" v-if="item.file && item.file.fileurl && index ==0" @click="openFile(item.file.fileurlFull,item.name)">在线预览</a>
          <a   style="cursor: pointer;color: #2E68EC" v-if="item.file && item.file.fileurl && index !=0 " @click="openFile(item.file.fileurlFull,'被保险人('+item.name+')保险单')">在线预览</a>
          <span v-if="!item.file || !item.file.fileurl">未上传</span>
        </div>
          <el-table
              :data="model.pidanFileList"
              border
              style="width: 100%">
              <el-table-column
                  prop="name"
                  label="名称">
              </el-table-column>
              <el-table-column
                  width="90"
                  label="操作">
                  <template slot-scope="{ row }">
                      <el-button type="primary" @click="seePidan(row.name, row.fileurlFull)">查看</el-button>
                  </template>
              </el-table-column>
          </el-table>
<!--        <div class="desc_item_from" v-for="(item, index) in pidanFileData" :key="index"  style="margin-bottom: 15px">-->
<!--          <span v-if="index ==0">{{item.name}}:</span>-->
<!--          <span v-if="index >0">被保险人({{item.name}})保险单:</span>-->
<!--          <a  style="cursor: pointer;color: #2E68EC" v-if="item.file && item.file.fileurl && index ==0" @click="openFile(item.file.fileurlFull,item.name)">在线预览</a>-->
<!--          <a   style="cursor: pointer;color: #2E68EC" v-if="item.file && item.file.fileurl && index !=0 " @click="openFile(item.file.fileurlFull,'被保险人('+item.name+')保险单')">在线预览</a>-->
<!--          <span v-if="!item.file || !item.file.fileurl">未上传</span>-->
<!--        </div>-->
        <span slot="footer" class="dialog-footer">
                <el-button @click="visibleFile=false">关 闭</el-button>
            </span>
@@ -311,6 +329,7 @@
      model: {},
      visiblePhone: false,
      visibleFile:false,
      hasDispatchUnit: null,
      form: {
          businessId: null,
          phone: this.$store.state.userInfo.company? this.$store.state.userInfo.company.phone:null,
@@ -364,6 +383,9 @@
        this.getDetail()
        this.getList()
     },
    seePidan(name, url) {
       this.$refs.OperaPdfViewerWindow.open(name, url)
    },
    send () {
      sendSms({
        phone: this.form.phone
@@ -493,7 +515,6 @@
        this.model = res
        this.tableData = new Array()
        this.tableData.push(res)
          console.log(this.tableData)
        this.pidanFileData.push({ name: '商户保险单', file: this.model.pidanFile })
        this.getApplyList()
      }).catch(err => {
@@ -502,6 +523,7 @@
    getApplyList () {
      applyList({ unionChangeId: this.model.id, getFiles: 1 }).then(res => {
        this.model.applyList = res
        this.hasDispatchUnit = res[0].hasDispatchUnit
        if (res && res.length > 0) {
          res.forEach(item => {
            if (item.pidanFile) {