|
@@ -127,6 +127,7 @@
|
|
|
<el-card class="box-card" style="margin-top: 10px;">
|
|
<el-card class="box-card" style="margin-top: 10px;">
|
|
|
<div slot="header" class="clearfix">
|
|
<div slot="header" class="clearfix">
|
|
|
<span><i class="icon icon-table2"></i> 企业资质</span>
|
|
<span><i class="icon icon-table2"></i> 企业资质</span>
|
|
|
|
|
+ <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog" >添加</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<el-table :data="subfileList" size="mini" border>
|
|
<el-table :data="subfileList" size="mini" border>
|
|
|
<el-table-column label="操作" width="150" align="center" fixed>
|
|
<el-table-column label="操作" width="150" align="center" fixed>
|
|
@@ -134,6 +135,8 @@
|
|
|
<el-button type="primary" plain size="mini" title="上传" @click="openDialog(scope.row)"
|
|
<el-button type="primary" plain size="mini" title="上传" @click="openDialog(scope.row)"
|
|
|
:disabled="scope.row.SupType != 2||formData.Status > 0">上传
|
|
:disabled="scope.row.SupType != 2||formData.Status > 0">上传
|
|
|
</el-button>
|
|
</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>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="NeedFileType" label="资质名称" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="NeedFileType" label="资质名称" show-overflow-tooltip></el-table-column>
|
|
@@ -302,7 +305,47 @@
|
|
|
:visible="chooseAuditorVisible"></choose-auditor>
|
|
:visible="chooseAuditorVisible"></choose-auditor>
|
|
|
<choose-auditor-fen ref="chooseAuditorFen" @close="setAuditerFen" @hideChooseAuditer="chooseAuditorVisibleFen=false"
|
|
<choose-auditor-fen ref="chooseAuditorFen" @close="setAuditerFen" @hideChooseAuditer="chooseAuditorVisibleFen=false"
|
|
|
:visible="chooseAuditorVisibleFen"></choose-auditor-fen>
|
|
:visible="chooseAuditorVisibleFen"></choose-auditor-fen>
|
|
|
- </div>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog title="新增文件" :visible.sync="newVisible" top="5vh">
|
|
|
|
|
+ <el-form :model="newSubfileForm" label-width="100px">
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="资质名称" required>
|
|
|
|
|
+ <el-select v-model="newSubfileForm.NeedFileType" placeholder="请输文件类型" size="medium">
|
|
|
|
|
+ <el-option v-for="item in dynamicTableColumns" :key="item.prop" :label="item.label" :value="item.label">
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="有效日期" required>
|
|
|
|
|
+ <el-date-picker style="width: 100%" v-model="newSubfileForm.EffectDate" type="date" placeholder="请选择有效日期">
|
|
|
|
|
+ </el-date-picker>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <el-form-item label="描述">
|
|
|
|
|
+ <el-input v-model="newSubfileForm.OtherRemark" type="textarea" :rows=3 placeholder="请输入备注信息"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="资质文件">
|
|
|
|
|
+ <el-upload multiple style="margin-top: 10px;" action="" ref="newrefuploadattach"
|
|
|
|
|
+ :http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload">
|
|
|
|
|
+ <i class="el-icon-plus attach-uploader-icon"></i>
|
|
|
|
|
+ <div slot="tip" class="el-upload__tip">大小为512KB-5MB
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-upload>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer" style="margin-top:-30px;">
|
|
|
|
|
+ <el-button @click="newVisible = false">取 消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="makeNewSure()">确 定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
@@ -317,6 +360,7 @@
|
|
|
import api2 from '@/api/oilsupplier/supplierappend'
|
|
import api2 from '@/api/oilsupplier/supplierappend'
|
|
|
import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
|
|
import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
|
|
|
import ChooseAuditorFen from '@/components/oilsupplier/chooseauditorfenban'
|
|
import ChooseAuditorFen from '@/components/oilsupplier/chooseauditorfenban'
|
|
|
|
|
+ import setapi from '@/api/oilsupplier/oilclassorgset'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -359,6 +403,7 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return {
|
|
return {
|
|
|
|
|
+ newVisible:false,
|
|
|
filterText: '',
|
|
filterText: '',
|
|
|
searchText: '',
|
|
searchText: '',
|
|
|
switchstatus: false,
|
|
switchstatus: false,
|
|
@@ -434,6 +479,25 @@
|
|
|
IsDelete: 0,
|
|
IsDelete: 0,
|
|
|
FileUrlList: [],
|
|
FileUrlList: [],
|
|
|
},
|
|
},
|
|
|
|
|
+ newSubfileForm:{
|
|
|
|
|
+ Id: '',
|
|
|
|
|
+ SupplierId: '',
|
|
|
|
|
+ SupplierTypeCode: '01',
|
|
|
|
|
+ SupplierCertSubId: '',
|
|
|
|
|
+ CertSubName: '',
|
|
|
|
|
+ SupType: 2,
|
|
|
|
|
+ NeedFileType: '',
|
|
|
|
|
+ NeedFileCode: '',
|
|
|
|
|
+ FileType: 66,
|
|
|
|
|
+ FileExt: '',
|
|
|
|
|
+ FileName: '',
|
|
|
|
|
+ EffectDate: new Date(),
|
|
|
|
|
+ FileUrl: '',
|
|
|
|
|
+ OtherRemark: '',
|
|
|
|
|
+ Remark: '',
|
|
|
|
|
+ IsDelete: 0,
|
|
|
|
|
+ FileUrlList: [],
|
|
|
|
|
+ },
|
|
|
checkList: [],
|
|
checkList: [],
|
|
|
auditer: '',
|
|
auditer: '',
|
|
|
auditerName: '',
|
|
auditerName: '',
|
|
@@ -543,8 +607,84 @@
|
|
|
this.getDictOptions()
|
|
this.getDictOptions()
|
|
|
this.getorgtreelist()
|
|
this.getorgtreelist()
|
|
|
this.orgtreeChange(this.majorDept)
|
|
this.orgtreeChange(this.majorDept)
|
|
|
|
|
+ this.initTableHeader()
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ newdeletedata(val) {
|
|
|
|
|
+ let _this = this;
|
|
|
|
|
+ _this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning"
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ _this.$axios.delete('supplierfile/subfiledelete/' + val.Id, {})
|
|
|
|
|
+ .then(function (response) {
|
|
|
|
|
+ if (response.data.code === 0) {
|
|
|
|
|
+ _this.$message({
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ message: response.data.message
|
|
|
|
|
+ });
|
|
|
|
|
+ _this.getFileList();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ _this.$message({
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ message: response.data.message
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(function (error) {
|
|
|
|
|
+ console.log(error);
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ },
|
|
|
|
|
+ makeNewSure(){
|
|
|
|
|
+ if (this.$refs.newrefuploadattach.uploadFiles && this.$refs.newrefuploadattach.uploadFiles.length > 0) {
|
|
|
|
|
+ // 上传附件是否完成判断
|
|
|
|
|
+ if (!this.newattachissuccess()) {
|
|
|
|
|
+ this.$message.error('有附件未成功上传!不能保存数据')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.newgetattachissuccess()
|
|
|
|
|
+ this.addSubfile()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: '请上传文件!'
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ addSubfile() {
|
|
|
|
|
+ let _this = this
|
|
|
|
|
+ _this.newSubfileForm.SupplierId = parseInt(this.SupplierId)
|
|
|
|
|
+ _this.$axios.post('/supplierfile/addsubfile/', _this.newSubfileForm)
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
|
+ _this.$message({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: res.data.message,
|
|
|
|
|
+ })
|
|
|
|
|
+ this.newVisible = false
|
|
|
|
|
+ this.getFileList()
|
|
|
|
|
+ this.$refs.newrefuploadattach.uploadFiles = []
|
|
|
|
|
+ } else {
|
|
|
|
|
+ _this.$message({
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: res.data.message
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(err => {
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ initTableHeader() {
|
|
|
|
|
+ setapi.initGoodTableHeader(this.$axios).then(res => {
|
|
|
|
|
+ this.dynamicTableColumns = res.data.items
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
orgtreeChange(val) {
|
|
orgtreeChange(val) {
|
|
|
this.userOptions = []
|
|
this.userOptions = []
|
|
|
let deptid = val[val.length - 1]
|
|
let deptid = val[val.length - 1]
|
|
@@ -788,6 +928,9 @@
|
|
|
this.SubfileForm.IsDelete = val.IsDelete
|
|
this.SubfileForm.IsDelete = val.IsDelete
|
|
|
this.visible = true
|
|
this.visible = true
|
|
|
},
|
|
},
|
|
|
|
|
+ showDialog(){
|
|
|
|
|
+ this.newVisible = true
|
|
|
|
|
+ },
|
|
|
//文档列表
|
|
//文档列表
|
|
|
getwendanginfo(iUrl) {
|
|
getwendanginfo(iUrl) {
|
|
|
let _this = this
|
|
let _this = this
|
|
@@ -865,6 +1008,16 @@
|
|
|
}
|
|
}
|
|
|
return true
|
|
return true
|
|
|
},
|
|
},
|
|
|
|
|
+ newattachissuccess() {
|
|
|
|
|
+ if (this.$refs.newrefuploadattach.uploadFiles && this.$refs.newrefuploadattach.uploadFiles.length > 0) {
|
|
|
|
|
+ for (let i = 0; i < this.$refs.newrefuploadattach.uploadFiles.length; i++) {
|
|
|
|
|
+ if (this.$refs.newrefuploadattach.uploadFiles[i].status !== 'success') {
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return true
|
|
|
|
|
+ },
|
|
|
getattachissuccess() {
|
|
getattachissuccess() {
|
|
|
this.SubfileForm.FileUrl = ''
|
|
this.SubfileForm.FileUrl = ''
|
|
|
this.SubfileForm.FileName = ''
|
|
this.SubfileForm.FileName = ''
|
|
@@ -882,6 +1035,23 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ newgetattachissuccess() {
|
|
|
|
|
+ this.newSubfileForm.FileUrl = ''
|
|
|
|
|
+ this.newSubfileForm.FileName = ''
|
|
|
|
|
+ if (this.$refs.newrefuploadattach.uploadFiles && this.$refs.newrefuploadattach.uploadFiles.length > 0) {
|
|
|
|
|
+ for (let i = 0; i < this.$refs.newrefuploadattach.uploadFiles.length; i++) {
|
|
|
|
|
+ if (this.$refs.newrefuploadattach.uploadFiles[i].status === 'success') {
|
|
|
|
|
+ for (let j = 0; j < this.waituploads.length; j++) {
|
|
|
|
|
+ if (this.waituploads[j].uid === this.$refs.newrefuploadattach.uploadFiles[i].uid) {
|
|
|
|
|
+ this.newSubfileForm.FileUrl +=
|
|
|
|
|
+ `${this.waituploads[j].url}/${this.waituploads[j].fid}|${this.$refs.newrefuploadattach.uploadFiles[i].name}$`
|
|
|
|
|
+ this.newSubfileForm.FileName += `${this.$refs.newrefuploadattach.uploadFiles[i].name}$`
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
clickachment(url, uid) {
|
|
clickachment(url, uid) {
|
|
|
window.open(`http://${url}`)
|
|
window.open(`http://${url}`)
|
|
|
},
|
|
},
|