jiangping
2024-05-07 541c8aa8d08e4bb758adad33167d1e84943cbfec
company/src/components/business/OperaSolutionsDescWindow.vue
@@ -64,6 +64,27 @@
                    <div class="info_list_item_label">接收文件邮箱:</div>
                    <div class="info_list_item_val">{{form.email}}</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">批增生效:</div>
                    <div class="info_list_item_val">{{form.addValidDays||0}}天</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">批减生效:</div>
                    <div class="info_list_item_val">{{form.delValidDays||0}}天</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">批改支持:</div>
                    <div class="info_list_item_val">
                      <span style="margin-right: 50px">加保 <i  :class="form.canAdd ==1?'el-icon-circle-check':'el-icon-circle-close'" :style="form.canAdd ==1?'color:green;font-weight:bold':'color:red;font-weight:bold'"></i></span>
                      <span  style="margin-right: 50px">减保  <i   :class="form.canReduce ==1?'el-icon-circle-check':'el-icon-circle-close'" :style="form.canReduce ==1?'color:green;font-weight:bold':'color:red;font-weight:bold'"></i></span>
                      <span>更换派遣单位 <i   :class="form.canChangeUnit ==1?'el-icon-circle-check':'el-icon-circle-close'" :style="form.canChangeUnit ==1?'color:green;font-weight:bold':'color:red;font-weight:bold'"></i></span>
                    </div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">批改仅支持替换:</div>
                    <div class="info_list_item_val" v-if="form.delOnlyReplace == 1">是</div>
                    <div class="info_list_item_val" v-else>否</div>
                </div>
              <div class="info_list_item" style="width: 100%" v-if="form.type==1">
                <div class="info_list_item_label">方案确认书:</div>
                <div class="info_list_item_val" ><a v-if="form.fanganFile && form.fanganFile.fileurlFull" style="cursor: pointer;color: #2E68EC" title="点击查看" @click="openFile(form.fanganFile.fileurlFull)">{{ form.fanganFile.name || '点击查看' }}</a></div>
@@ -99,114 +120,126 @@
</template>
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import OperaSolutionsWindow from '@/components/business/OperaSolutionsWindow'
    import { solutionsId } from '@/api/business/solutions'
    import {mapState} from "vuex";
    export default {
        name: 'OperaSolutionsDescWindow',
        extends: BaseOpera,
        components: { GlobalWindow, OperaSolutionsWindow },
        data () {
            return {
                // 表单数据
                form: {
                    id: null,
                    name: '',
                    companyName: '',
                    insuranceId: '',
                    validType: 0,
                    type: 0,
                    minAge: '',
                    maxAge: '',
                    price: '',
                    timeUnit: '',
                    insureCycle: '',
                    shopName:'',
                    insureCycleUnit: '',
                    validTypeNum: '',
                    email: '',
                    specialAgreement: '',
                    specialInfo: '',
                    ortherInfo: '',
                    insuranceName: '',
                    signKeyword: '',
                    worktypeList: [],
                    worktypeIdList: []
                }
            }
        },
        computed: {
            ...mapState(['userInfo'])
        },
        created () {
            this.config({
                api: '/business/solutions',
                'field.id': 'id'
            })
        },
        methods: {
            open (title, target) {
                this.title = title
                this.visible = true
              this.form = {
                    id: null,
                    name: '',
                    companyName: '',
                    insuranceId: '',
                    validType: 0,
                    type: 0,
                    minAge: '',
                    maxAge: '',
                    price: '',
                    timeUnit: '',
                    insureCycle: '',
                    shopName:'',
                    insureCycleUnit: '',
                    validTypeNum: '',
                    email: '',
                    specialAgreement: '',
                    specialInfo: '',
                    ortherInfo: '',
                    fanganFile:null,
                    insuranceName: '',
                    signKeyword: '',
                    worktypeList: [],
                    worktypeIdList: []
              }
                this.$nextTick(() => {
                    for (const key in this.form) {
                        this.form[key] = target[key]
                    }
                    this.getDetails()
                })
            },
          openFile (url) {
            setTimeout(() => {
              window.open(url)
            }, 500)
          },
            getDetails() {
                solutionsId(this.form.id)
                    .then(res => {
                        for (const key in this.form) {
                            this.form[key] = res[key]
                        }
                        this.form.worktypeIdList = res.worktypeList.map(item => {
                            return {
                                worktypeId: item.worktypeId
                            }
                        })
                    })
            },
            callback() {
                this.$emit('success')
                this.visible = false
            }
        }
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import OperaSolutionsWindow from '@/components/business/OperaSolutionsWindow'
import { solutionsId } from '@/api/business/solutions'
import { mapState } from 'vuex'
export default {
  name: 'OperaSolutionsDescWindow',
  extends: BaseOpera,
  components: { GlobalWindow, OperaSolutionsWindow },
  data () {
    return {
      // 表单数据
      form: {
        id: null,
        name: '',
        companyName: '',
        insuranceId: '',
        validType: 0,
        type: 0,
        minAge: '',
        maxAge: '',
        price: '',
        timeUnit: '',
        insureCycle: '',
        shopName: '',
        insureCycleUnit: '',
        validTypeNum: '',
        email: '',
        canReduce: 0,
        canChangeUnit: 0,
        addValidDays: 0,
        delValidDays: 0,
        delOnlyReplace: 0,
        canAdd: 0,
        specialAgreement: '',
        specialInfo: '',
        ortherInfo: '',
        insuranceName: '',
        signKeyword: '',
        worktypeList: [],
        worktypeIdList: []
      }
    }
  },
  computed: {
    ...mapState(['userInfo'])
  },
  created () {
    this.config({
      api: '/business/solutions',
      'field.id': 'id'
    })
  },
  methods: {
    open (title, target) {
      this.title = title
      this.visible = true
      this.form = {
        id: null,
        name: '',
        companyName: '',
        insuranceId: '',
        validType: 0,
        type: 0,
        minAge: '',
        maxAge: '',
        price: '',
        timeUnit: '',
        insureCycle: '',
        shopName: '',
        insureCycleUnit: '',
        validTypeNum: '',
        email: '',
        specialAgreement: '',
        specialInfo: '',
        ortherInfo: '',
        fanganFile: null,
        canReduce: 0,
        canChangeUnit: 0,
        addValidDays: 0,
        delValidDays: 0,
        delOnlyReplace: 0,
        canAdd: 0,
        insuranceName: '',
        signKeyword: '',
        worktypeList: [],
        worktypeIdList: []
      }
      this.$nextTick(() => {
        for (const key in this.form) {
          this.form[key] = target[key]
        }
        this.getDetails()
      })
    },
    openFile (url) {
      setTimeout(() => {
        window.open(url)
      }, 500)
    },
    getDetails () {
      solutionsId(this.form.id)
        .then(res => {
          for (const key in this.form) {
            this.form[key] = res[key]
          }
          this.form.worktypeIdList = res.worktypeList.map(item => {
            return {
              worktypeId: item.worktypeId
            }
          })
        })
    },
    callback () {
      this.$emit('success')
      this.visible = false
    }
  }
}
</script>
<style lang="scss" scoped>