|
|
@@ -1,55 +1,59 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
+ <!--<el-card class="box-card" style="margin-top: 10px;">-->
|
|
|
+ <!--<div slot="header" class="clearfix">-->
|
|
|
+ <!--<span style="font-weight: bold">准入范围</span>-->
|
|
|
+ <!--<el-button type="primary" size="mini" style="float: right;margin-right: 3px" @click="nextStep()"-->
|
|
|
+ <!--v-if="canadd && IsCompanyUser == 0">-->
|
|
|
+ <!--提交审批-->
|
|
|
+ <!--</el-button>-->
|
|
|
+ <!--<!– <el-button type="primary" size="mini" style="float: right;margin-right: 3px" @click="nextStep()"-->
|
|
|
+ <!--v-if="canadd && IsCompanyUser == 1">-->
|
|
|
+ <!--提交-->
|
|
|
+ <!--</el-button> –>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--<el-table :data="businessList" size="mini" border bordertooltip-effect="dark" height="calc(100vh - 435px)" @selection-change="handleSelectionChange">-->
|
|
|
+ <!--<el-table-column type="selection" width="55"></el-table-column>-->
|
|
|
+ <!--<el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>-->
|
|
|
+ <!--<el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>-->
|
|
|
+ <!--<el-table-column prop="GoodsLevel" label="级别" width="80px" show-overflow-tooltip>-->
|
|
|
+ <!--<template slot-scope="scope">-->
|
|
|
+ <!--<span v-if="scope.row.GoodsLevel=='1'">一级</span>-->
|
|
|
+ <!--<span v-if="scope.row.GoodsLevel=='2'">二级</span>-->
|
|
|
+ <!--</template>-->
|
|
|
+ <!--</el-table-column>-->
|
|
|
+ <!--<el-table-column-->
|
|
|
+ <!--label="是否为制造商" width="100" v-if="SupplierTypeCode == '01'">-->
|
|
|
+ <!--<template slot-scope="scope">-->
|
|
|
+ <!--<el-tag type="info" v-if="scope.row.IsManufacturer == 2">非制造商</el-tag>-->
|
|
|
+ <!--<el-tag type="success" v-else-if="scope.row.IsManufacturer == 1">制造商</el-tag>-->
|
|
|
+ <!--<span v-else>——</span>-->
|
|
|
+ <!--</template>-->
|
|
|
+ <!--</el-table-column>-->
|
|
|
+ <!--<el-table-column prop="CertSubStatus" label="状态" show-overflow-tooltip>-->
|
|
|
+ <!--<template slot-scope="scope">-->
|
|
|
+ <!--<span v-if="scope.row.CertSubStatus=='1'"-->
|
|
|
+ <!--style="color:#67C23A">准入</span>-->
|
|
|
+ <!--<span v-else-if="scope.row.CertSubStatus>'1'"-->
|
|
|
+ <!--style="color:#E6A23C">暂停</span>-->
|
|
|
+ <!--<span v-else>——</span>-->
|
|
|
+ <!--</template>-->
|
|
|
+ <!--</el-table-column>-->
|
|
|
+ <!--<el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>-->
|
|
|
+ <!--</el-table>-->
|
|
|
+ <!--<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"-->
|
|
|
+ <!--:page-sizes="[10, 50, 100, 200, 400]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"-->
|
|
|
+ <!--:total="currentItem_Count">-->
|
|
|
+ <!--</el-pagination>-->
|
|
|
+ <!--</el-card>-->
|
|
|
+
|
|
|
<el-card class="box-card" style="margin-top: 10px;">
|
|
|
<div slot="header" class="clearfix">
|
|
|
- <span style="font-weight: bold">准入范围</span>
|
|
|
+ <span style="font-weight: bold"> 企业资质</span>
|
|
|
<el-button type="primary" size="mini" style="float: right;margin-right: 3px" @click="nextStep()"
|
|
|
- v-if="canadd && IsCompanyUser == 0">
|
|
|
+ v-if="canadd && IsCompanyUser == 0">
|
|
|
提交审批
|
|
|
</el-button>
|
|
|
- <!-- <el-button type="primary" size="mini" style="float: right;margin-right: 3px" @click="nextStep()"
|
|
|
- v-if="canadd && IsCompanyUser == 1">
|
|
|
- 提交
|
|
|
- </el-button> -->
|
|
|
- </div>
|
|
|
- <el-table :data="businessList" size="mini" border bordertooltip-effect="dark" height="calc(100vh - 435px)" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55"></el-table-column>
|
|
|
- <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="GoodsLevel" label="级别" width="80px" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.GoodsLevel=='1'">一级</span>
|
|
|
- <span v-if="scope.row.GoodsLevel=='2'">二级</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="是否为制造商" width="100" v-if="SupplierTypeCode == '01'">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag type="info" v-if="scope.row.IsManufacturer == 2">非制造商</el-tag>
|
|
|
- <el-tag type="success" v-else-if="scope.row.IsManufacturer == 1">制造商</el-tag>
|
|
|
- <span v-else>——</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="CertSubStatus" label="状态" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.CertSubStatus=='1'"
|
|
|
- style="color:#67C23A">准入</span>
|
|
|
- <span v-else-if="scope.row.CertSubStatus>'1'"
|
|
|
- style="color:#E6A23C">暂停</span>
|
|
|
- <span v-else>——</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
|
|
|
- </el-table>
|
|
|
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
- :page-sizes="[10, 50, 100, 200, 400]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="currentItem_Count">
|
|
|
- </el-pagination>
|
|
|
- </el-card>
|
|
|
-
|
|
|
- <el-card class="box-card" style="margin-top: 10px;">
|
|
|
- <div slot="header" class="clearfix">
|
|
|
- <span style="font-weight: bold"> 企业资质</span>
|
|
|
<el-button style="float: right; padding: 3px 0" type="text" @click="showDialog" v-if="canadd || newcanadd">添加</el-button>
|
|
|
</div>
|
|
|
<el-table :data="subfileList" border size="mini">
|
|
|
@@ -87,7 +91,7 @@
|
|
|
</el-card>
|
|
|
|
|
|
<el-dialog :title="Title" :visible.sync="visible" top="5vh" width="900px">
|
|
|
- <el-form :model="SubfileForm" label-width="100px">
|
|
|
+ <el-form ref="subfileForm" :model="SubfileForm" label-width="100px">
|
|
|
<el-row>
|
|
|
<!-- <el-col :span="12">
|
|
|
<el-form-item label="资质名称" required>
|
|
|
@@ -108,7 +112,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="有效日期" required>
|
|
|
+ <el-form-item label="有效日期" prop="EffectDate" required :rules="{ type: 'date', required: true, message: '请选择有效日期', trigger: 'change' }">
|
|
|
<el-date-picker style="width: 100%" v-model="SubfileForm.EffectDate" type="date" placeholder="请选择有效日期">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
@@ -349,37 +353,41 @@
|
|
|
})
|
|
|
},
|
|
|
makesure () {
|
|
|
- if (this.Title == '新增文件') {
|
|
|
- if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
- // 上传附件是否完成判断
|
|
|
- if (!this.attachissuccess()) {
|
|
|
- this.$message.error('有附件未成功上传!不能保存数据')
|
|
|
- return
|
|
|
- }
|
|
|
- this.getattachissuccess()
|
|
|
- this.addSubfile()
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '请上传文件!'
|
|
|
- })
|
|
|
- }
|
|
|
- } else if (this.Title == '上传文件') {
|
|
|
- if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
- // 上传附件是否完成判断
|
|
|
- if (!this.attachissuccess()) {
|
|
|
- this.$message.error('有附件未成功上传!不能保存数据')
|
|
|
- return
|
|
|
+ this.$refs['subfileForm'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.Title == '新增文件') {
|
|
|
+ if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
+ // 上传附件是否完成判断
|
|
|
+ if (!this.attachissuccess()) {
|
|
|
+ this.$message.error('有附件未成功上传!不能保存数据')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.getattachissuccess()
|
|
|
+ this.addSubfile()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请上传文件!'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else if (this.Title == '上传文件') {
|
|
|
+ if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
+ // 上传附件是否完成判断
|
|
|
+ if (!this.attachissuccess()) {
|
|
|
+ this.$message.error('有附件未成功上传!不能保存数据')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.getattachissuccess()
|
|
|
+ this.editSubfile()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请上传文件!'
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
- this.getattachissuccess()
|
|
|
- this.editSubfile()
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '请上传文件!'
|
|
|
- })
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
},
|
|
|
addSubfile () {
|
|
|
let _this = this
|
|
|
@@ -524,7 +532,7 @@
|
|
|
this.SubfileForm.FileExt = ''
|
|
|
this.SubfileForm.FileType = ''
|
|
|
this.SubfileForm.FileName = ''
|
|
|
- this.SubfileForm.EffectDate = new Date()
|
|
|
+ this.SubfileForm.EffectDate = null
|
|
|
this.SubfileForm.FileUrl = ''
|
|
|
this.SubfileForm.OtherRemark = ''
|
|
|
this.SubfileForm.Remark = ''
|
|
|
@@ -532,6 +540,7 @@
|
|
|
this.visible = true
|
|
|
},
|
|
|
openDialog (val) {
|
|
|
+ console.log(val, '==========')
|
|
|
this.IsMust = true
|
|
|
this.Title = '上传文件'
|
|
|
this.SubfileForm.Id = val.Id
|
|
|
@@ -548,7 +557,7 @@
|
|
|
this.SubfileForm.FileExt = val.FileExt
|
|
|
this.SubfileForm.FileType = val.FileType
|
|
|
this.SubfileForm.FileName = val.FileName
|
|
|
- this.SubfileForm.EffectDate = new Date(val.EffectDate)
|
|
|
+ this.SubfileForm.EffectDate = (this.jsEffectDate(val.EffectDate))
|
|
|
this.SubfileForm.FileUrl = val.FileUrl
|
|
|
this.getwendanginfo(val.FileUrl)
|
|
|
this.SubfileForm.OtherRemark = val.OtherRemark
|
|
|
@@ -689,6 +698,19 @@
|
|
|
return val.substring(0, 10)
|
|
|
}
|
|
|
},
|
|
|
+ jsEffectDate (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') {
|
|
|
+ return ''
|
|
|
+ } else {
|
|
|
+ return val
|
|
|
+ }
|
|
|
+ },
|
|
|
handleCurrentChange (value) {
|
|
|
this.currentPage = value
|
|
|
this.getbusList()
|