|
@@ -1,7 +1,7 @@
|
|
|
<!-- 新增供应商 -->
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div class="my-title">{{ !id?'新增':'修改' }}</div>
|
|
|
+ <div class="my-title">{{ title }}</div>
|
|
|
<!-- 表单 -->
|
|
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
|
|
|
<el-row>
|
|
@@ -10,7 +10,7 @@
|
|
|
<el-row class="my-row">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="公司名称" prop="supplierName">
|
|
|
- <el-input v-model="dataForm.supplierName" placeholder="公司名称"/>
|
|
|
+ <el-input v-model="dataForm.supplierName" :disabled="type === 3" placeholder="公司名称"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
@@ -18,6 +18,7 @@
|
|
|
<el-select
|
|
|
v-model="dataForm.level"
|
|
|
remote
|
|
|
+ :disabled="type === 3"
|
|
|
placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in optionsLevel"
|
|
@@ -30,42 +31,42 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="详细地址" prop="addrDetail">
|
|
|
- <el-input v-model="dataForm.addrDetail" placeholder="详细地址"/>
|
|
|
+ <el-input v-model="dataForm.addrDetail" :disabled="type === 3" placeholder="详细地址"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row class="my-row">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="邮编" prop="zipCode">
|
|
|
- <el-input v-model="dataForm.zipCode" placeholder="邮编"/>
|
|
|
+ <el-input v-model="dataForm.zipCode" :disabled="type === 3" placeholder="邮编"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="电话" prop="tel">
|
|
|
- <el-input v-model="dataForm.tel" placeholder="电话"/>
|
|
|
+ <el-input v-model="dataForm.tel" :disabled="type === 3" placeholder="电话"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="传真" prop="fax">
|
|
|
- <el-input v-model="dataForm.fax" placeholder="传真"/>
|
|
|
+ <el-input v-model="dataForm.fax" :disabled="type === 3" placeholder="传真"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row class="my-row">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="网址" prop="url">
|
|
|
- <el-input v-model="dataForm.url" placeholder="网址"/>
|
|
|
+ <el-input v-model="dataForm.url" :disabled="type === 3" placeholder="网址"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="邮箱" prop="supplierEmail">
|
|
|
- <el-input v-model="dataForm.supplierEmail" placeholder="邮箱"/>
|
|
|
+ <el-input v-model="dataForm.supplierEmail" :disabled="type === 3" placeholder="邮箱"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row class="my-row" style="margin-top: 20px">
|
|
|
<el-form-item label="公司产品介绍" prop="prodIntroduce">
|
|
|
- <el-input type="textarea" v-model="dataForm.prodIntroduce"></el-input>
|
|
|
+ <el-input type="textarea" v-model="dataForm.prodIntroduce" :disabled="type === 3" placeholder="公司产品介绍"/>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
@@ -74,29 +75,29 @@
|
|
|
<el-row class="my-row">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="企业税号" prop="taxNumber">
|
|
|
- <el-input v-model="dataForm.taxNumber" placeholder="企业税号"/>
|
|
|
+ <el-input v-model="dataForm.taxNumber" :disabled="type === 3" placeholder="企业税号"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="发票抬头" prop="invoiceTitle">
|
|
|
- <el-input v-model="dataForm.invoiceTitle" placeholder="发票抬头"/>
|
|
|
+ <el-input v-model="dataForm.invoiceTitle" :disabled="type === 3" placeholder="发票抬头"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="开户银行" prop="bank">
|
|
|
- <el-input v-model="dataForm.bank" placeholder="开户银行"/>
|
|
|
+ <el-input v-model="dataForm.bank" :disabled="type === 3" placeholder="开户银行"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row class="my-row">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="银行账号" prop="account">
|
|
|
- <el-input v-model="dataForm.account" placeholder="银行账号"/>
|
|
|
+ <el-input v-model="dataForm.account" :disabled="type === 3" placeholder="银行账号"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="单位地址" prop="addressWork">
|
|
|
- <el-input v-model="dataForm.addressWork" placeholder="单位地址"/>
|
|
|
+ <el-input v-model="dataForm.addressWork" :disabled="type === 3" placeholder="单位地址"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -106,36 +107,45 @@
|
|
|
<el-row class="my-row">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="联系人" prop="contact">
|
|
|
- <el-input v-model="dataForm.contact" placeholder="联系人"/>
|
|
|
+ <el-input v-model="dataForm.contact" :disabled="type === 3" placeholder="联系人"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="手机号码" prop="contactTel">
|
|
|
- <el-input v-model="dataForm.contactTel" placeholder="手机号码"/>
|
|
|
+ <el-input v-model="dataForm.contactTel" :disabled="type === 3" placeholder="手机号码"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="职位" prop="contactPosition">
|
|
|
- <el-input v-model="dataForm.contactPosition" placeholder="职位"/>
|
|
|
+ <el-input v-model="dataForm.contactPosition" :disabled="type === 3" placeholder="职位"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row class="my-row">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="联系人邮箱" prop="contactEmail">
|
|
|
- <el-input v-model="dataForm.contactEmail" placeholder="联系人邮箱"/>
|
|
|
+ <el-input v-model="dataForm.contactEmail" :disabled="type === 3" placeholder="联系人邮箱"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<h4>附件</h4>
|
|
|
</el-row>
|
|
|
- <el-row class="my-row">
|
|
|
+ <el-row v-show="type !== 3" class="my-row">
|
|
|
<upload-component :title="'合格供方基本信息调查表'" :accept="'*'" :file-obj-list="fileList1" @uploadSuccess="uploadSuccess1"/>
|
|
|
</el-row>
|
|
|
- <el-row class="my-row" style="margin-top: 10px">
|
|
|
+ <el-row v-show="type !== 3" class="my-row" style="margin-top: 10px">
|
|
|
<upload-component :title="'供方风险评价表'" :accept="'*'" :file-obj-list="fileList2" @uploadSuccess="uploadSuccess2"/>
|
|
|
</el-row>
|
|
|
+ <el-row v-show="type === 2" class="my-row" style="margin-top: 10px">
|
|
|
+ <upload-component :title="'合格供方(含外包)评审(复审)表'" :accept="'*'" :file-obj-list="fileList3" @uploadSuccess="uploadSuccess3"/>
|
|
|
+ </el-row>
|
|
|
+ <el-row v-show="type === 2" class="my-row" style="margin-top: 10px">
|
|
|
+ <upload-component :title="'合格供方改善通知单'" :accept="'*'" :file-obj-list="fileList4" @uploadSuccess="uploadSuccess4"/>
|
|
|
+ </el-row>
|
|
|
+ <el-row v-show="type === 3" class="my-row" style="margin-top: 10px">
|
|
|
+ <upload-component :title="'合格供方(含外包方)资格取消申请单'" :accept="'*'" :file-obj-list="fileList5" @uploadSuccess="uploadSuccess5"/>
|
|
|
+ </el-row>
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="onChose">取消</el-button>
|
|
@@ -162,6 +172,14 @@
|
|
|
get () { return this.$store.state.user.orgId }
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ type (val) {
|
|
|
+ if (val === 0) this.title = '新增'
|
|
|
+ else if (val === 1) this.title = '修改'
|
|
|
+ else if (val === 2) this.title = '重新评审'
|
|
|
+ else if (val === 3) this.title = '取消供应商'
|
|
|
+ }
|
|
|
+ },
|
|
|
data () {
|
|
|
let validateEmail = (rule, value, callback) => {
|
|
|
if (value !== null && value !== '' && !isEmail(value)) {
|
|
@@ -206,7 +224,12 @@
|
|
|
},
|
|
|
optionsLevel: [], // 供应商级别
|
|
|
fileList1: [],
|
|
|
- fileList2: []
|
|
|
+ fileList2: [],
|
|
|
+ fileList3: [],
|
|
|
+ fileList4: [],
|
|
|
+ fileList5: [],
|
|
|
+ type: 0, // 操作类型:0 新增,1 编辑,2 重新评审,3 取消供应商
|
|
|
+ title: ''
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -220,11 +243,15 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- async init (id) {
|
|
|
+ async init (id, type) {
|
|
|
this.fileList1 = []
|
|
|
this.fileList2 = []
|
|
|
+ this.fileList3 = []
|
|
|
+ this.fileList4 = []
|
|
|
+ this.fileList5 = []
|
|
|
this.dataForm = {}
|
|
|
this.id = id || 0
|
|
|
+ this.type = type || 0
|
|
|
// 获取级别List
|
|
|
this.getLevelList()
|
|
|
// 详情
|
|
@@ -265,13 +292,18 @@
|
|
|
url: fList1[i].url
|
|
|
})
|
|
|
}
|
|
|
- } else {
|
|
|
+ } else if (this.type === 0) { // 新增时判断
|
|
|
this.$message.error('请上传文件')
|
|
|
return
|
|
|
}
|
|
|
// save or update
|
|
|
+ let path = ''
|
|
|
+ if (this.type === 0) path = 'save'
|
|
|
+ else if (this.type === 1) path = 'update'
|
|
|
+ else if (this.type === 2) path = 'review'
|
|
|
+ else if (this.type === 3) path = 'disqualification'
|
|
|
this.$http({
|
|
|
- url: this.$http.adornUrl(`/biz-service/supplier/${!this.id ? 'save' : 'update'}`),
|
|
|
+ url: this.$http.adornUrl(`/biz-service/supplier/${path}`),
|
|
|
method: 'post',
|
|
|
data: this.$http.adornData({...this.dataForm, orgId: this.orgId})
|
|
|
}).then(({data}) => {
|
|
@@ -292,11 +324,25 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 合格供方基本信息调查表
|
|
|
uploadSuccess1 (fileList) {
|
|
|
this.fileList1 = fileList
|
|
|
},
|
|
|
+ // 供方风险评价表
|
|
|
uploadSuccess2 (fileList) {
|
|
|
this.fileList2 = fileList
|
|
|
+ },
|
|
|
+ // 合格供方(含外包)评审(复审)表
|
|
|
+ uploadSuccess3 (fileList) {
|
|
|
+ this.fileList3 = fileList
|
|
|
+ },
|
|
|
+ // 合格供方改善通知单
|
|
|
+ uploadSuccess4 (fileList) {
|
|
|
+ this.fileList4 = fileList
|
|
|
+ },
|
|
|
+ // 合格供方(含外包方)资格取消申请单
|
|
|
+ uploadSuccess5 (fileList) {
|
|
|
+ this.fileList5 = fileList
|
|
|
}
|
|
|
}
|
|
|
}
|