|
|
@@ -550,7 +550,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- label="是否为制造商" width="100">
|
|
|
+ label="是否为制造商" width="110">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="primary" plain size="mini" v-if="scope.row.IsManufacturer == 2" :disabled="isDisabledBtn()" @click="type_change(scope)">非制造商</el-button>
|
|
|
<el-button type="primary" plain size="mini" v-if="scope.row.IsManufacturer == 1" :disabled="isDisabledBtn()" @click="type_change(scope)">制造商</el-button>
|
|
|
@@ -568,40 +568,84 @@
|
|
|
<el-card class="box-card" style="margin-top: 10px;">
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span><i class="icon icon-table2"></i> 企业资质</span>
|
|
|
- <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog" >添加</el-button>
|
|
|
+ <!--<el-button style="float: right; padding: 3px 0" type="text" @click="showDialog" >添加</el-button>-->
|
|
|
</div>
|
|
|
- <el-table :data="subfileList" size="mini" border>
|
|
|
+ <!--<el-table :data="subfileList" size="mini" border>-->
|
|
|
+ <!--<el-table-column label="操作" width="150" align="center" fixed>-->
|
|
|
+ <!--<template slot-scope="scope">-->
|
|
|
+ <!--<el-button type="primary" plain size="mini" title="上传" @click="openDialog(scope.row)"-->
|
|
|
+ <!--:disabled="formData.Status > 0">上传-->
|
|
|
+ <!--</el-button>-->
|
|
|
+ <!--<el-button type="primary" plain size="mini" title="删除" style="margin-left:3px"-->
|
|
|
+ <!--v-if="scope.row.FileType == '66'" @click="newdeletedata(scope.row)">删除</el-button>-->
|
|
|
+ <!--</template>-->
|
|
|
+ <!--</el-table-column>-->
|
|
|
+ <!--<el-table-column prop="NeedFileType" label="资质名称" show-overflow-tooltip></el-table-column>-->
|
|
|
+ <!--<el-table-column label="贸易/制造" v-if="SupplierTypeCode == '01'" show-overflow-tooltip>-->
|
|
|
+ <!--<template slot-scope="scope">-->
|
|
|
+ <!--<span v-if="scope.row.IsManuf=='1'">制造商</span>-->
|
|
|
+ <!--<span v-else-if="scope.row.IsManuf=='2'">贸易商</span>-->
|
|
|
+ <!--<span v-else>通用</span>-->
|
|
|
+ <!--</template>-->
|
|
|
+ <!--</el-table-column>-->
|
|
|
+ <!--<el-table-column prop="FileUrlList" label="资质文件" show-overflow-tooltip>-->
|
|
|
+ <!--<template slot-scope="scope">-->
|
|
|
+ <!--<div v-for="(tmpUrl, index) in scope.row.FileUrlList">-->
|
|
|
+ <!--<a :href="fileurlcut(scope.row.FileUrl, index)" target="_blank"-->
|
|
|
+ <!--class="buttonText">{{scope.row.FileName.split('$')[index]}}</a>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--</template>-->
|
|
|
+ <!--</el-table-column>-->
|
|
|
+ <!--<el-table-column prop="EffectDate" label="有效日期" show-overflow-tooltip>-->
|
|
|
+ <!--<template slot-scope="scope">-->
|
|
|
+ <!--{{ jstimehandle(scope.row.EffectDate+'') }}-->
|
|
|
+ <!--</template>-->
|
|
|
+ <!--</el-table-column>-->
|
|
|
+ <!--<el-table-column prop="OtherRemark" label="描述" show-overflow-tooltip></el-table-column>-->
|
|
|
+ <!--</el-table>-->
|
|
|
+ <el-table :data="subfileList1" border>
|
|
|
<el-table-column label="操作" width="150" align="center" fixed>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="primary" plain size="mini" title="上传" @click="openDialog(scope.row)"
|
|
|
- :disabled="scope.row.SupType != 2||formData.Status > 0">上传
|
|
|
- </el-button>
|
|
|
- <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px"
|
|
|
- v-if="scope.row.FileType == '66'" @click="newdeletedata(scope.row)">删除</el-button>
|
|
|
+ <el-button type="primary" plain size="mini" title="文件变更" :disabled="formData.Status > 0" @click="openDialog(scope.row)">
|
|
|
+ 变更</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="NeedFileType" label="资质名称" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column label="贸易/制造" v-if="SupplierTypeCode == '01'" show-overflow-tooltip>
|
|
|
+ <el-table-column prop="NeedFileType" label="文件分类" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column prop="OldFileUrlList" label="原文件" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.IsManuf=='1'">制造商</span>
|
|
|
- <span v-else-if="scope.row.IsManuf=='2'">贸易商</span>
|
|
|
- <span v-else>通用</span>
|
|
|
+ <div v-for="(tmpUrl, index) in scope.row.OldFileUrlList">
|
|
|
+ <a :href="'http://'+fileurlcut(scope.row.OldFileUrl, index)" target="_blank"
|
|
|
+ class="buttonText">{{scope.row.OldFileName.split('$')[index]}}</a>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="FileUrlList" label="资质文件" show-overflow-tooltip>
|
|
|
+ <el-table-column prop="OldEffectDate" label="原有效日期" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <div v-for="(tmpUrl, index) in scope.row.FileUrlList">
|
|
|
- <a :href="fileurlcut(scope.row.FileUrl, index)" target="_blank"
|
|
|
- class="buttonText">{{scope.row.FileName.split('$')[index]}}</a>
|
|
|
- </div>
|
|
|
+ {{ jstimehandle(scope.row.OldEffectDate+'') }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="FileUrlList" label="变更后文件" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-row align="middle">
|
|
|
+ <el-col :span="20">
|
|
|
+ <div v-for="(tmpUrl, index) in scope.row.FileUrlList">
|
|
|
+ <a :href="'http://'+fileurlcut(scope.row.FileUrl, index)" target="_blank"
|
|
|
+ class="buttonText">{{scope.row.FileName.split('$')[index]}}
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4" v-if="scope.row.FileUrl != '' && formData.Status <= 0 && formData.Status != -5">
|
|
|
+ <i class="el-icon-close" :style="{'float': 'right', 'height': '100%','line-height': lineheight(scope.row.FileUrlList.length) + 'px',}" @click="iconclear(scope.row)"></i>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="EffectDate" label="有效日期" show-overflow-tooltip>
|
|
|
+ <el-table-column prop="EffectDate" label="变更后有效日期" show-overflow-tooltip >
|
|
|
<template slot-scope="scope">
|
|
|
{{ jstimehandle(scope.row.EffectDate+'') }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="OtherRemark" label="描述" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column prop="Remark" label="描述" show-overflow-tooltip></el-table-column>
|
|
|
</el-table>
|
|
|
<div style="float: right; margin: 20px;">
|
|
|
<el-button type="primary" size="mini" style="margin-right: 8px" @click="commitaudit"
|
|
|
@@ -617,7 +661,7 @@
|
|
|
</div>
|
|
|
</el-card>
|
|
|
<el-dialog title="上传文件" :visible.sync="visible" top="5vh">
|
|
|
- <el-form :model="SubfileForm" size="mini" label-width="100px">
|
|
|
+ <el-form ref="subfileForm" :model="SubfileForm" :rules="rules" label-width="100px">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="资质名称" required>
|
|
|
@@ -1198,6 +1242,7 @@
|
|
|
SupplierTypeCode: '',
|
|
|
SupplierCertId: 0,
|
|
|
subfileList: [],
|
|
|
+ subfileList1: [],
|
|
|
visible: false,
|
|
|
dynamicTableColumns: [],
|
|
|
flag: '',
|
|
|
@@ -1334,6 +1379,7 @@
|
|
|
trigger: 'blur'
|
|
|
}]
|
|
|
},
|
|
|
+ supplierId: '',
|
|
|
Id: '', // 传的参数
|
|
|
editFlag: '', // 编辑操作标记
|
|
|
waituploads: [], // 等待上传的附件列表
|
|
|
@@ -1618,6 +1664,13 @@
|
|
|
message: '用户名',
|
|
|
trigger: 'blur'
|
|
|
}]
|
|
|
+ },
|
|
|
+ rules: {
|
|
|
+ NeedFileType: [
|
|
|
+ {required: true, message: '资质名称不能为空', trigger: 'blur'}
|
|
|
+ ],
|
|
|
+ EffectDate:
|
|
|
+ [{ required: true, message: '请选择有效日期', trigger: 'change' }]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -1625,6 +1678,7 @@
|
|
|
this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
|
|
|
// this.serviceType = this.$route.params.opera //获取服务类型
|
|
|
this.Id = this.$route.query.Id
|
|
|
+ this.supplierId = this.$route.query.sId
|
|
|
this.editFlag = this.$route.query.editFlag
|
|
|
if (this.editFlag == '1' && this.Id !== '') {
|
|
|
this.getEntityById()
|
|
|
@@ -1637,8 +1691,60 @@
|
|
|
this.changeOrgUnit(this.selectDept)
|
|
|
this.initTableHeader()
|
|
|
this.initData2019()
|
|
|
+ this.getsubfile()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // =======================================
|
|
|
+ getsubfile () {
|
|
|
+ let _this = this
|
|
|
+ const params = {
|
|
|
+ SupplierId: this.supplierId,
|
|
|
+ SupplierTypeCode: '01',
|
|
|
+ MInfoId: this.Id
|
|
|
+ }
|
|
|
+ _this.$axios.get('suppliercertappendsub/filelist', {
|
|
|
+ params
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ _this.subfileList1 = res.data.items
|
|
|
+ _this.currentItemCountProject = res.data.currentItemCount
|
|
|
+ for (let idx in _this.subfileList1) {
|
|
|
+ _this.subfileList1[idx].FileUrlList = _this.subfileList1[idx].FileUrl.split('$')
|
|
|
+ }
|
|
|
+ for (let idx1 in _this.subfileList1) {
|
|
|
+ _this.subfileList1[idx1].OldFileUrlList = _this.subfileList1[idx1].OldFileUrl.split('$')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ iconclear (row) {
|
|
|
+ this.$confirm('该操作将删除新上传的资质,是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ api.deleteNewFile(row.Id, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.getsubfile()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ lineheight (list) {
|
|
|
+ return list * 23 + ''
|
|
|
+ },
|
|
|
changeOrgUnit (val) {
|
|
|
let auditstepcode = 'PROF_RECE'
|
|
|
suppapi.getAuditerByDept(val, auditstepcode, this.$axios).then(res => {
|
|
|
@@ -1678,7 +1784,7 @@
|
|
|
type: 'success',
|
|
|
message: response.data.message
|
|
|
})
|
|
|
- _this.getFileList()
|
|
|
+ _this.getsubfile()
|
|
|
} else {
|
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
|
@@ -1719,7 +1825,7 @@
|
|
|
message: res.data.message
|
|
|
})
|
|
|
this.newVisible = false
|
|
|
- this.getFileList()
|
|
|
+ this.getsubfile()
|
|
|
this.$refs.newrefuploadattach.uploadFiles = []
|
|
|
} else {
|
|
|
_this.$message({
|
|
|
@@ -1858,7 +1964,7 @@
|
|
|
})
|
|
|
this.getSortList()
|
|
|
this.getMySortList()
|
|
|
- this.getFileList()
|
|
|
+ this.getsubfile()
|
|
|
this.tableloading = false
|
|
|
}
|
|
|
})
|
|
|
@@ -1876,7 +1982,7 @@
|
|
|
})
|
|
|
this.getMySortList()
|
|
|
this.getSortList()
|
|
|
- this.getFileList()
|
|
|
+ this.getsubfile()
|
|
|
this.tableloading = false
|
|
|
}
|
|
|
})
|
|
|
@@ -1971,7 +2077,7 @@
|
|
|
if (this.formData.InStyle == '2' || this.formData.InStyle == '6' || this.formData.InStyle == '4') {
|
|
|
this.allowpre = false
|
|
|
}
|
|
|
- this.getFileList()
|
|
|
+ this.getsubfile()
|
|
|
// 显示公司名
|
|
|
_this.supplierOptions = _this.formData.SupplierId.toString()
|
|
|
_this.getSortList()
|
|
|
@@ -2269,49 +2375,69 @@
|
|
|
})
|
|
|
},
|
|
|
// 获取资质文件
|
|
|
- getFileList () {
|
|
|
- this.SupplierId = this.formData.SupplierId
|
|
|
- this.SupplierTypeCode = this.formData.AppendType
|
|
|
+ // getFileList () {
|
|
|
+ // this.SupplierId = this.formData.SupplierId
|
|
|
+ // this.SupplierTypeCode = this.formData.AppendType
|
|
|
+ // let _this = this
|
|
|
+ // const params = {
|
|
|
+ // AppendId: this.formData.Id,
|
|
|
+ // SupplierId: this.SupplierId,
|
|
|
+ // SupplierTypeCode: this.SupplierTypeCode,
|
|
|
+ // _currentPage: 1,
|
|
|
+ // _size: 1000
|
|
|
+ // }
|
|
|
+ // _this.$axios.get('supplierfile/filelistall', {
|
|
|
+ // params
|
|
|
+ // })
|
|
|
+ // .then(res => {
|
|
|
+ // _this.subfileList = res.data.items
|
|
|
+ // _this.currentItemCount = res.data.currentItemCount
|
|
|
+ // for (let idx in _this.subfileList) {
|
|
|
+ // _this.subfileList[idx].FileUrlList = _this.subfileList[idx].FileUrl.split('$')
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .catch(err => {
|
|
|
+ // console.error(err)
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ makesure () {
|
|
|
+ // if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
+ // // 上传附件是否完成判断
|
|
|
+ // if (!this.attachissuccess()) {
|
|
|
+ // this.$message.error('有附件未成功上传!不能保存数据')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // this.getattachissuccess()
|
|
|
+ // this.editSubfile()
|
|
|
+ // } else {
|
|
|
+ // this.editSubfile()
|
|
|
+ // }
|
|
|
let _this = this
|
|
|
- const params = {
|
|
|
- AppendId: this.formData.Id,
|
|
|
- SupplierId: this.SupplierId,
|
|
|
- SupplierTypeCode: this.SupplierTypeCode,
|
|
|
- _currentPage: 1,
|
|
|
- _size: 1000
|
|
|
- }
|
|
|
- _this.$axios.get('supplierfile/filelistall', {
|
|
|
- params
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- _this.subfileList = res.data.items
|
|
|
- _this.currentItemCount = res.data.currentItemCount
|
|
|
- for (let idx in _this.subfileList) {
|
|
|
- _this.subfileList[idx].FileUrlList = _this.subfileList[idx].FileUrl.split('$')
|
|
|
+ _this.$refs['subfileForm'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ if (_this.$refs.refuploadattach.uploadFiles && _this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
+ // 上传附件是否完成判断
|
|
|
+ if (!_this.attachissuccess()) {
|
|
|
+ _this.$message.error('有附件未成功上传!不能保存数据')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ _this.getattachissuccess()
|
|
|
+ _this.editqualchange()
|
|
|
+ } else {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请上传文件!'
|
|
|
+ })
|
|
|
}
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- },
|
|
|
- makesure () {
|
|
|
- if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
- // 上传附件是否完成判断
|
|
|
- if (!this.attachissuccess()) {
|
|
|
- this.$message.error('有附件未成功上传!不能保存数据')
|
|
|
- return
|
|
|
}
|
|
|
- this.getattachissuccess()
|
|
|
- this.editSubfile()
|
|
|
- } else {
|
|
|
- this.editSubfile()
|
|
|
- }
|
|
|
+ })
|
|
|
},
|
|
|
- editSubfile () {
|
|
|
+ editqualchange () {
|
|
|
let _this = this
|
|
|
_this.SubfileForm.SupplierId = parseInt(_this.SubfileForm.SupplierId)
|
|
|
_this.SubfileForm.SupplierCertSubId = parseInt(_this.SubfileForm.SupplierCertSubId)
|
|
|
- _this.$axios.put('/supplierfile/editsubfile/' + _this.SubfileForm.Id, _this.SubfileForm)
|
|
|
+ _this.SubfileForm.SupplierCertId = parseInt(_this.SupplierCertId)
|
|
|
+ _this.$axios.put('/suppliercertappendsub/editqualchange/' + _this.Id, _this.SubfileForm)
|
|
|
.then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
_this.$message({
|
|
|
@@ -2319,8 +2445,7 @@
|
|
|
message: res.data.message
|
|
|
})
|
|
|
this.visible = false
|
|
|
- // this.initData()
|
|
|
- this.getFileList()
|
|
|
+ this.getsubfile()
|
|
|
this.$refs.refuploadattach.uploadFiles = []
|
|
|
} else {
|
|
|
_this.$message({
|
|
|
@@ -2333,6 +2458,32 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
+ // editSubfile () {
|
|
|
+ // let _this = this
|
|
|
+ // _this.SubfileForm.SupplierId = parseInt(_this.SubfileForm.SupplierId)
|
|
|
+ // _this.SubfileForm.SupplierCertSubId = parseInt(_this.SubfileForm.SupplierCertSubId)
|
|
|
+ // _this.$axios.put('/supplierfile/editsubfile/' + _this.SubfileForm.Id, _this.SubfileForm)
|
|
|
+ // .then(res => {
|
|
|
+ // if (res.data.code === 0) {
|
|
|
+ // _this.$message({
|
|
|
+ // type: 'success',
|
|
|
+ // message: res.data.message
|
|
|
+ // })
|
|
|
+ // this.visible = false
|
|
|
+ // // this.initData()
|
|
|
+ // this.getFileList()
|
|
|
+ // this.$refs.refuploadattach.uploadFiles = []
|
|
|
+ // } else {
|
|
|
+ // _this.$message({
|
|
|
+ // type: 'warning',
|
|
|
+ // message: res.data.message
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .catch(err => {
|
|
|
+ // console.error(err)
|
|
|
+ // })
|
|
|
+ // },
|
|
|
fileurlcut (val, index) {
|
|
|
let fileurlall = val.split('$')[index]
|
|
|
let fileurl = fileurlall.split('|')
|
|
|
@@ -2361,7 +2512,9 @@
|
|
|
this.SubfileForm.FileExt = val.FileExt
|
|
|
this.SubfileForm.FileType = val.FileType
|
|
|
this.SubfileForm.FileName = val.FileName
|
|
|
- this.SubfileForm.EffectDate = new Date(val.EffectDate)
|
|
|
+ this.SubfileForm.OldFileName = val.OldFileName
|
|
|
+ this.SubfileForm.OldEffectDate = new Date(val.OldEffectDate)
|
|
|
+ this.SubfileForm.OldFileUrl = val.OldFileUrl
|
|
|
this.SubfileForm.FileUrl = val.FileUrl
|
|
|
this.getwendanginfo(val.FileUrl)
|
|
|
this.SubfileForm.OtherRemark = val.OtherRemark
|
|
|
@@ -2761,7 +2914,7 @@
|
|
|
this.loading = false
|
|
|
this.getSortList()
|
|
|
this.getMySortList()
|
|
|
- this.getFileList()
|
|
|
+ this.getsubfile()
|
|
|
} else {
|
|
|
this.loading = false
|
|
|
this.$message({
|
|
|
@@ -3054,6 +3207,8 @@
|
|
|
jstimehandle (val) {
|
|
|
if (val === '') {
|
|
|
return '----'
|
|
|
+ } else if (val === '0001-01-01T00:00:00Z') {
|
|
|
+ return '----'
|
|
|
} else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
return '----'
|
|
|
} else if (val === '5000-01-01T23:59:59+08:00') {
|
|
|
@@ -3100,7 +3255,7 @@
|
|
|
this.Remark1 = ''
|
|
|
this.getSortList()
|
|
|
this.getMySortList()
|
|
|
- this.getFileList()
|
|
|
+ this.getsubfile()
|
|
|
this.initData2019()
|
|
|
} else {
|
|
|
this.loading = false
|
|
|
@@ -3147,6 +3302,11 @@
|
|
|
}
|
|
|
</script>
|
|
|
<style lang='scss'>
|
|
|
+ .el-icon-close:hover
|
|
|
+ {
|
|
|
+ color:red;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
.attach-uploader .el-upload {
|
|
|
border: 1px dashed #63B8FF;
|
|
|
cursor: pointer;
|