|
|
@@ -1,128 +1,146 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-table :data="subfileList" border>
|
|
|
- <el-table-column label="操作" width="70" align="center" fixed>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="openDialog(scope.row)"></el-button>
|
|
|
- <el-button size="small" type="text" style="margin-left:3px" icon="el-icon-delete" title="删除"
|
|
|
- @click="deletedata(scope.row)"></el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="NeedFileType" label="文件分类" show-overflow-tooltip></el-table-column>
|
|
|
- <!-- <el-table-column prop="NeedFileCode" label="分类编码" show-overflow-tooltip></el-table-column> -->
|
|
|
- <el-table-column prop="FileName" label="文件名称" show-overflow-tooltip></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-column prop="Remark" label="备注信息" show-overflow-tooltip></el-table-column>
|
|
|
- </el-table>
|
|
|
+ <el-card class="box-card">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span style="font-weight: bold">分类</span>
|
|
|
+ <!-- <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog">添加</el-button> -->
|
|
|
+ </div>
|
|
|
+ <el-table :data="businessList" border>
|
|
|
+ <el-table-column label="操作" width="70" align="center" fixed>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" title="查看" size="small" icon="el-icon-edit" @click="openDialog(scope.row)">
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </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="Remark" label="备注" show-overflow-tooltip></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
+ :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="currentItemCount">
|
|
|
+ </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="subfiledialog">添加</el-button>
|
|
|
+ </div>
|
|
|
+ <subfile-list ref="subfileList" :data="subfileList" :SupplierId="SupplierId" :SupplierCertId="SupplierCertId"
|
|
|
+ :SupplierTypeCode="SupplierTypeCode" :businessList="businessList" :BusinessForm="BusinessForm" height="360px"
|
|
|
+ style="margin-top: 20px">
|
|
|
+ </subfile-list>
|
|
|
+ </el-card>
|
|
|
|
|
|
<el-dialog :title="Title" :visible.sync="visible" top="5vh">
|
|
|
- <el-form :model="SubfileForm" label-width="100px">
|
|
|
+ <el-form :model="BusinessForm" label-width="100px">
|
|
|
<el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="分类名称" required>
|
|
|
- <el-select ref="refSupplierCertSub" v-model="SubfileForm.SupplierCertSubId" style="width:100%"
|
|
|
- placeholder="请选择分类名称" @change="getCode()">
|
|
|
- <el-option v-for="item in businessList" :label="item.Name" :value="item.Id" :key="item.Id">
|
|
|
+ <el-col :span="12" v-if="SupplierTypeCode == '01' && Title == '新增准入范围'">
|
|
|
+ <el-form-item label="名称" required>
|
|
|
+ <el-select filterable default-first-option v-model="OneCode" placeholder="请选择" style="width: 100%"
|
|
|
+ @change="getChild()">
|
|
|
+ <el-option v-for="item in oneList" :key="item.Id" :label="item.Name" :value="item.Id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="文件分类" required>
|
|
|
- <el-input v-model="SubfileForm.NeedFileType" placeholder="请输文件分类"></el-input>
|
|
|
+ <el-col :span="12" v-if="SupplierTypeCode == '02' && Title == '新增准入范围'">
|
|
|
+ <el-form-item label="名称" required>
|
|
|
+ <el-input placeholder="请选择名称" v-model="BusinessForm.Name" style="width:100%">
|
|
|
+ <el-button type="primary" style="width:30%" @click="basicDialog = true" slot="append">选择
|
|
|
+ </el-button>
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <!-- <el-col :span="12">
|
|
|
- <el-form-item label="分类编码" required>
|
|
|
- <el-input v-model="SubfileForm.NeedFileCode" placeholder="请输入编码"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col> -->
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="有效日期" required>
|
|
|
- <el-date-picker style="width: 100%" v-model="SubfileForm.EffectDate" type="date" placeholder="请选择有效日期">
|
|
|
- </el-date-picker>
|
|
|
+ <el-col :span="12" v-if="SupplierTypeCode != '02' && Title == '新增准入范围'">
|
|
|
+ <el-form-item label="名称" required>
|
|
|
+ <el-cascader :options="techTreeList" :props="orgtreeprops" change-on-select :show-all-levels="false"
|
|
|
+ v-model="selectedorg" placeholder="请选择菜单" @change="getCode()" style="width:100%"></el-cascader>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="其他信息">
|
|
|
- <el-input v-model="SubfileForm.OtherRemark" type="textarea" :rows=3 placeholder="请输入备注信息"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="备注信息">
|
|
|
- <el-input v-model="SubfileForm.Remark" type="textarea" :rows=3 placeholder="请输入备注信息"></el-input>
|
|
|
+ <el-col :span="12" v-if="Title == '编辑准入范围'">
|
|
|
+ <el-form-item label="名称">
|
|
|
+ <el-input v-model="BusinessForm.Name" placeholder="请输入名称" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="文档上传">
|
|
|
- <el-upload style="margin-top: 10px;" multiple action="" :limit="1" ref="refuploadattach"
|
|
|
- :http-request="uploadrequest" class="attach-uploader" :show-file-list="true"
|
|
|
- :before-upload="beforeAvatarUpload">
|
|
|
- <i class="el-icon-plus attach-uploader-icon"></i>
|
|
|
- </el-upload>
|
|
|
+ <el-form-item label="编码" required>
|
|
|
+ <el-input v-model="BusinessForm.Code" placeholder="请输入编码" :disabled="Title == '编辑准入范围'"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item class="maintainlog" label="" label-width="120px">
|
|
|
- <div style="overflow: auto;">
|
|
|
- <template>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24" v-for="(v,K) in doclist" :key="v">
|
|
|
- <span>
|
|
|
- <el-button size="small" type="text" icon="el-icon-delete" title="删除" @click="deletefile(K)">
|
|
|
- </el-button>
|
|
|
- </span>
|
|
|
- <a style="margin-left:10px" @click="clickachment(v.url)">{{ v.name }}</a>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
+ <el-form-item label="备注信息">
|
|
|
+ <el-input v-model="BusinessForm.Remark" type="textarea" :rows=3 placeholder="请输入备注信息"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer" style="margin-top:-30px;">
|
|
|
<el-button @click="visible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="makesure()">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="savedata()">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- </div>
|
|
|
|
|
|
+ <el-dialog title="基建类业务列表" :visible.sync="basicDialog" top="5vh" style="width:1000px">
|
|
|
+ <span style="float: right;">
|
|
|
+ <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="seachdata()">查询
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="basicDialog = false">
|
|
|
+ 取消</el-button>
|
|
|
+ </span>
|
|
|
+ <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
|
|
|
+ <el-form-item label="业务名称">
|
|
|
+ <el-input size="mini" style="width: 165px;" v-model="keyword" placeholder="请输入业务名称"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-table :data="techList" border>
|
|
|
+ <el-table-column label="操作" width="70" align="center" fixed>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" size="small" @click="getChooseCode(scope.row)">选择</el-button>
|
|
|
+ </template>
|
|
|
+ </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="Remark" label="备注" show-overflow-tooltip></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination @size-change="HandleSizeChange" @current-change="HandleCurrentChange" :current-page="CurrentPage"
|
|
|
+ :page-sizes="[10, 15, 20, 25]" :page-size="Size" layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="CurrentItemCount">
|
|
|
+ </el-pagination>
|
|
|
+
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
mapGetters
|
|
|
} from 'vuex'
|
|
|
- import axios from 'axios'
|
|
|
- import uploadajax from '../../assets/js/uploadajax.js'
|
|
|
+ import SubfileList from '../../components/oilsupplier/subfilelist'
|
|
|
+
|
|
|
export default {
|
|
|
- name: 'SubfileList',
|
|
|
+ name: 'EquipmentList',
|
|
|
+ components: {
|
|
|
+ SubfileList, //文档
|
|
|
+ },
|
|
|
props: {
|
|
|
- SupplierId: {
|
|
|
+ SupplierCertId: {
|
|
|
type: String,
|
|
|
default: '0'
|
|
|
},
|
|
|
- SupplierCertId: {
|
|
|
+ SupplierId: {
|
|
|
type: String,
|
|
|
default: '0'
|
|
|
},
|
|
|
SupplierTypeCode: {
|
|
|
type: String,
|
|
|
default: '0'
|
|
|
- },
|
|
|
- businessList: {
|
|
|
- type: Array,
|
|
|
- default: []
|
|
|
- },
|
|
|
- BusinessForm: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.initData()
|
|
|
},
|
|
|
- created() {},
|
|
|
computed: {
|
|
|
...mapGetters({
|
|
|
session: 'session'
|
|
|
@@ -130,7 +148,9 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- subfileList: [],
|
|
|
+ oneList: [],
|
|
|
+ OneCode: '',
|
|
|
+ businessList: [],
|
|
|
techList: [],
|
|
|
techTreeList: [],
|
|
|
orgtreeprops: {
|
|
|
@@ -139,106 +159,79 @@
|
|
|
children: 'children'
|
|
|
},
|
|
|
selectedorg: [],
|
|
|
+ ClassId: '',
|
|
|
|
|
|
Title: '',
|
|
|
- SubfileForm: {
|
|
|
+ BusinessForm: {
|
|
|
Id: '',
|
|
|
SupplierId: '',
|
|
|
+ SupplierCertId: '',
|
|
|
SupplierTypeCode: '',
|
|
|
- SupplierCertSubId: '',
|
|
|
- CertSubName: '',
|
|
|
- NeedFileType: '',
|
|
|
- NeedFileCode: '',
|
|
|
- FileExt: '',
|
|
|
- FileSize: '',
|
|
|
- FileName: '',
|
|
|
- EffectDate: new Date(),
|
|
|
- FileUrl: '',
|
|
|
- OtherRemark: '',
|
|
|
+ SubClassId: '',
|
|
|
+ Code: '',
|
|
|
+ Name: '',
|
|
|
Remark: '',
|
|
|
IsDelete: 0
|
|
|
},
|
|
|
visible: false,
|
|
|
selfVisible: this.visible, // 避免vue双向绑定警告
|
|
|
+ currentPage: 1, // 分页
|
|
|
+ size: 10,
|
|
|
+ currentItemCount: 0,
|
|
|
+ basicDialog: false,
|
|
|
+ keyword: '',
|
|
|
+ CurrentPage: 1, // 分页
|
|
|
+ Size: 10,
|
|
|
+ CurrentItemCount: 0,
|
|
|
|
|
|
- waituploads: [], // 等待上传的附件列表
|
|
|
- doclist: [],
|
|
|
+ subfileList: [], //文档
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
initData() {
|
|
|
let _this = this
|
|
|
const params = {
|
|
|
- SupplierId: this.SupplierId,
|
|
|
+ SupplierCertId: this.SupplierCertId,
|
|
|
SupplierTypeCode: this.SupplierTypeCode,
|
|
|
- _currentPage: 1,
|
|
|
- _size: 1000,
|
|
|
+ _currentPage: this.currentPage,
|
|
|
+ _size: this.size,
|
|
|
}
|
|
|
- this.$axios.get('supplierfile/filelist', {
|
|
|
+ this.$axios.get('suppliercertsub/list', {
|
|
|
params
|
|
|
})
|
|
|
.then(res => {
|
|
|
- _this.subfileList = res.data.items
|
|
|
+ _this.businessList = res.data.items
|
|
|
_this.currentItemCount = res.data.currentItemCount
|
|
|
+ _this.$refs["subfileList"].initData()
|
|
|
})
|
|
|
.catch(err => {
|
|
|
// handle error
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- getCode() {
|
|
|
- if (this.businessList && this.businessList.length > 0) {
|
|
|
- for (var i = 0; i < this.businessList.length; i++) {
|
|
|
- if (this.SubfileForm.SupplierCertSubId == this.businessList[i].Id) {
|
|
|
- this.SubfileForm.CertSubName = this.businessList[i].Name
|
|
|
- }
|
|
|
- }
|
|
|
+ savedata() {
|
|
|
+ if (this.Title == '新增准入范围') {
|
|
|
+ this.addBusiness()
|
|
|
+ } else if (this.Title == '编辑准入范围') {
|
|
|
+ this.editBusiness()
|
|
|
}
|
|
|
},
|
|
|
- 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.getattachissuccess()
|
|
|
- this.editSubfile()
|
|
|
- } else {
|
|
|
- this.editSubfile()
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- addSubfile() {
|
|
|
+ addBusiness() {
|
|
|
let _this = this
|
|
|
- _this.SubfileForm.SupplierId = parseInt(_this.SubfileForm.SupplierId)
|
|
|
- _this.SubfileForm.SupplierCertSubId = parseInt(_this.SubfileForm.SupplierCertSubId)
|
|
|
- _this.$axios.post('/supplierfile/addsubfile/', _this.SubfileForm)
|
|
|
+ _this.BusinessForm.SupplierId = parseInt(_this.BusinessForm.SupplierId)
|
|
|
+ _this.BusinessForm.SupplierCertId = parseInt(_this.BusinessForm.SupplierCertId)
|
|
|
+ _this.BusinessForm.SubClassId = parseInt(_this.BusinessForm.SubClassId)
|
|
|
+ _this.$axios.post('/suppliercertsub/addbusiness/', _this.BusinessForm)
|
|
|
.then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
_this.$message({
|
|
|
type: 'success',
|
|
|
message: res.data.message,
|
|
|
})
|
|
|
- this.visible = false
|
|
|
- this.initData()
|
|
|
- this.$refs.refuploadattach = ''
|
|
|
+ _this.BusinessForm.Id = res.data.item + ''
|
|
|
+ _this.visible = false
|
|
|
+ _this.initData()
|
|
|
+ _this.$refs["subfileList"].initData()
|
|
|
} else {
|
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
|
@@ -250,11 +243,12 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- editSubfile() {
|
|
|
+ editBusiness() {
|
|
|
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.BusinessForm.SupplierId = parseInt(_this.BusinessForm.SupplierId)
|
|
|
+ _this.BusinessForm.SupplierCertId = parseInt(_this.BusinessForm.SupplierCertId)
|
|
|
+ _this.BusinessForm.SubClassId = parseInt(_this.BusinessForm.SubClassId)
|
|
|
+ _this.$axios.put('/suppliercertsub/editbusiness/' + _this.BusinessForm.Id, _this.BusinessForm)
|
|
|
.then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
_this.$message({
|
|
|
@@ -263,7 +257,6 @@
|
|
|
})
|
|
|
this.visible = false
|
|
|
this.initData()
|
|
|
- this.$refs.refuploadattach = ''
|
|
|
} else {
|
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
|
@@ -275,178 +268,156 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- deletedata(val) {
|
|
|
- let _this = this;
|
|
|
- _this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- _this.$axios.delete('supplierfile/subfiledelete/' + val.Id, {})
|
|
|
- .then(function (response) {
|
|
|
- // response
|
|
|
- if (response.data.code === 0) {
|
|
|
- _this.$message({
|
|
|
- type: "success",
|
|
|
- message: response.data.message
|
|
|
- });
|
|
|
- _this.initData();
|
|
|
- } else {
|
|
|
- _this.$message({
|
|
|
- type: "warning",
|
|
|
- message: response.data.message
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(function (error) {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- },
|
|
|
- showDialog() {
|
|
|
- this.Title = '新增文件'
|
|
|
- this.SubfileForm.Id = ''
|
|
|
- this.SubfileForm.SupplierId = this.SupplierId
|
|
|
- this.SubfileForm.SupplierTypeCode = this.SupplierTypeCode
|
|
|
- this.SubfileForm.SupplierCertSubId = ''
|
|
|
- this.SubfileForm.CertSubName = ''
|
|
|
- this.SubfileForm.NeedFileType = ''
|
|
|
- this.SubfileForm.NeedFileCode = ''
|
|
|
- this.SubfileForm.FileExt = ''
|
|
|
- this.SubfileForm.FileSize = ''
|
|
|
- this.SubfileForm.FileName = ''
|
|
|
- this.SubfileForm.EffectDate = new Date()
|
|
|
- this.SubfileForm.FileUrl = ''
|
|
|
- this.SubfileForm.OtherRemark = ''
|
|
|
- this.SubfileForm.Remark = ''
|
|
|
- this.SubfileForm.IsDelete = 0
|
|
|
- this.visible = true
|
|
|
- },
|
|
|
+ // showDialog() {
|
|
|
+ // this.Title = '新增准入范围'
|
|
|
+ // this.BusinessForm.Id = ''
|
|
|
+ // this.BusinessForm.SupplierId = this.SupplierId
|
|
|
+ // this.BusinessForm.SupplierCertId = this.SupplierCertId
|
|
|
+ // this.BusinessForm.SupplierTypeCode = this.SupplierTypeCode
|
|
|
+ // this.BusinessForm.SubClassId = ''
|
|
|
+ // this.BusinessForm.Code = ''
|
|
|
+ // this.BusinessForm.Name = ''
|
|
|
+ // this.BusinessForm.Remark = ''
|
|
|
+ // this.BusinessForm.IsDelete = 0
|
|
|
+ // this.getbusiness()
|
|
|
+ // this.visible = true
|
|
|
+ // },
|
|
|
openDialog(val) {
|
|
|
- this.Title = '编辑文件'
|
|
|
- this.SubfileForm.Id = val.Id
|
|
|
- this.SubfileForm.SupplierId = val.SupplierId
|
|
|
- this.SubfileForm.SupplierTypeCode = val.SupplierTypeCode
|
|
|
- if (val.SupplierCertSubId == 0) {
|
|
|
- this.SubfileForm.SupplierCertSubId = ''
|
|
|
- } else {
|
|
|
- this.SubfileForm.SupplierCertSubId = val.SupplierCertSubId
|
|
|
- }
|
|
|
- this.SubfileForm.CertSubName = val.CertSubName
|
|
|
- this.SubfileForm.NeedFileType = val.NeedFileType
|
|
|
- this.SubfileForm.NeedFileCode = val.NeedFileCode
|
|
|
- this.SubfileForm.FileExt = val.FileExt
|
|
|
- this.SubfileForm.FileSize = val.FileSize
|
|
|
- this.SubfileForm.FileName = val.FileName
|
|
|
- this.SubfileForm.EffectDate = new Date(val.EffectDate)
|
|
|
- this.SubfileForm.FileUrl = val.FileUrl
|
|
|
- this.SubfileForm.OtherRemark = val.OtherRemark
|
|
|
- if (val.FileUrl != '') {
|
|
|
- this.getwendanginfo(val.FileUrl)
|
|
|
- }
|
|
|
- this.SubfileForm.Remark = val.Remark
|
|
|
- this.SubfileForm.IsDelete = val.IsDelete
|
|
|
+ this.Title = '编辑准入范围'
|
|
|
+ this.BusinessForm.Id = val.Id
|
|
|
+ this.BusinessForm.SupplierId = val.SupplierId
|
|
|
+ this.BusinessForm.SupplierCertId = val.SupplierCertId
|
|
|
+ this.BusinessForm.SupplierTypeCode = val.SupplierTypeCode
|
|
|
+ this.BusinessForm.SubClassId = val.SubClassId
|
|
|
+ this.BusinessForm.Code = val.Code
|
|
|
+ this.BusinessForm.Name = val.Name
|
|
|
+ this.BusinessForm.Remark = val.Remark
|
|
|
+ this.BusinessForm.IsDelete = val.IsDelete
|
|
|
+ this.getbusiness()
|
|
|
this.visible = true
|
|
|
},
|
|
|
- //文档列表
|
|
|
- getwendanginfo(iUrl) {
|
|
|
+ getbusiness() {
|
|
|
let _this = this
|
|
|
- _this.doclist = []
|
|
|
- let exArr = iUrl.split('|')
|
|
|
- let params = {
|
|
|
- name: exArr[1],
|
|
|
- url: exArr[0]
|
|
|
+ if (_this.SupplierTypeCode == '01') { //获取物资类业务列表
|
|
|
+ this.$axios.get('goodsaptitude/goodsparentlist', {})
|
|
|
+ .then(res => {
|
|
|
+ _this.oneList = res.data.items
|
|
|
+ if (_this.Title == '编辑准入范围') {
|
|
|
+ for (var i = 0; i < _this.oneList.length; i++) {
|
|
|
+ if (_this.BusinessForm.Code == _this.oneList[i].Code) {
|
|
|
+ _this.OneCode = _this.oneList[i].Id
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ } else if (_this.SupplierTypeCode == '02') { //获取基建类业务列表
|
|
|
+ const params = {
|
|
|
+ keyword: this.keyword,
|
|
|
+ _currentPage: this.CurrentPage,
|
|
|
+ _size: this.Size,
|
|
|
+ }
|
|
|
+ this.$axios.get('basisbuild/basiclist', {
|
|
|
+ params
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ _this.techList = res.data.items
|
|
|
+ _this.CurrentItemCount = res.data.currentItemCount
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ // handle error
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ } else if (_this.SupplierTypeCode == '03') { //获取技术服务类业务列表
|
|
|
+ this.$axios.get('technologyservice/businesslist', {})
|
|
|
+ .then(res => {
|
|
|
+ _this.techList = res.data.items
|
|
|
+ _this.techTreeList = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId', 'Id,Name')
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ // handle error
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
}
|
|
|
- _this.doclist.push(params)
|
|
|
},
|
|
|
-
|
|
|
- beforeAvatarUpload(file) {
|
|
|
- let isLt50m = file.size / 1024 / 1024 / 50 < 1
|
|
|
- if (!isLt50m) {
|
|
|
- this.$message.error('上传文件大小不能超过 50MB!')
|
|
|
- return false
|
|
|
+ getCode() {
|
|
|
+ this.ClassId = this.selectedorg[this.selectedorg.length - 1]
|
|
|
+ for (var i = 0; i < this.techList.length; i++) {
|
|
|
+ if (this.selectedorg[this.selectedorg.length - 1] == this.techList[i].Id) {
|
|
|
+ this.BusinessForm.SubClassId = this.techList[i].Id
|
|
|
+ this.BusinessForm.Name = this.techList[i].Name
|
|
|
+ this.BusinessForm.Code = this.techList[i].Code
|
|
|
+ }
|
|
|
}
|
|
|
- return true
|
|
|
},
|
|
|
- uploadrequest(option) {
|
|
|
- let _this = this
|
|
|
- axios.post(process.env.upfilehost, {})
|
|
|
- .then(function (res) {
|
|
|
- if (res.data && res.data.fid && res.data.fid !== '') {
|
|
|
- option.action = `http://${res.data.url}/${res.data.fid}`
|
|
|
- _this.waituploads.push({
|
|
|
- uid: option.file.uid,
|
|
|
- url: res.data.publicUrl,
|
|
|
- fid: res.data.fid
|
|
|
- })
|
|
|
- uploadajax(option)
|
|
|
+ getChild() {
|
|
|
+ const params = {
|
|
|
+ ParentId: this.OneCode
|
|
|
+ }
|
|
|
+ this.$axios.get('goodsaptitude/goodschildlist', {
|
|
|
+ params
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.techList = res.data.items
|
|
|
+ if (this.techList && this.techList.length > 0) {
|
|
|
+ this.techTreeList = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId', 'Id,Name')
|
|
|
} else {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '未上传成功!请刷新界面重新上传!'
|
|
|
- })
|
|
|
+ this.getParentCode()
|
|
|
}
|
|
|
})
|
|
|
- .catch(function (error) {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '未上传成功!请重新上传!'
|
|
|
- })
|
|
|
+ .catch(err => {
|
|
|
+ // handle error
|
|
|
+ console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- // 判断附件是否上传成功
|
|
|
- attachissuccess() {
|
|
|
- if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
- for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
|
|
|
- if (this.$refs.refuploadattach.uploadFiles[i].status !== 'success') {
|
|
|
- return false
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return true
|
|
|
- },
|
|
|
- getattachissuccess() {
|
|
|
- this.SubfileForm.FileUrl = ''
|
|
|
- if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
- for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
|
|
|
- if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {
|
|
|
- for (let j = 0; j < this.waituploads.length; j++) {
|
|
|
- if (this.waituploads[j].uid === this.$refs.refuploadattach.uploadFiles[i].uid) {
|
|
|
- this.SubfileForm.FileUrl =
|
|
|
- `${this.waituploads[j].url}/${this.waituploads[j].fid}|${this.$refs.refuploadattach.uploadFiles[i].name}`
|
|
|
- this.SubfileForm.FileName = `${this.$refs.refuploadattach.uploadFiles[i].name}`
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ getParentCode() {
|
|
|
+ this.ClassId = this.OneCode
|
|
|
+ for (var i = 0; i < this.oneList.length; i++) {
|
|
|
+ if (this.OneCode == this.oneList[i].Id) {
|
|
|
+ this.BusinessForm.SubClassId = this.techList[i].Id
|
|
|
+ this.BusinessForm.Name = this.oneList[i].Name
|
|
|
+ this.BusinessForm.Code = this.oneList[i].Code
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- clickachment(url, uid) {
|
|
|
- window.open(`http://${url}`)
|
|
|
+ getChooseCode(val) {
|
|
|
+ this.ClassId = val.Id
|
|
|
+ this.BusinessForm.Code = val.Code
|
|
|
+ this.BusinessForm.Name = val.Name
|
|
|
+ this.basicDialog = false
|
|
|
},
|
|
|
- deletefile() {
|
|
|
- let _this = this
|
|
|
- _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- _this.doclist = []
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+
|
|
|
+ subfiledialog() {
|
|
|
+ this.$refs["subfileList"].showDialog()
|
|
|
},
|
|
|
|
|
|
- seachdata() {
|
|
|
+ handleSizeChange(value) {
|
|
|
+ this.size = value
|
|
|
+ this.currentPage = 1
|
|
|
this.initData()
|
|
|
},
|
|
|
+ handleCurrentChange(value) {
|
|
|
+ this.currentPage = value
|
|
|
+ this.initData()
|
|
|
+ },
|
|
|
+ HandleSizeChange(value) {
|
|
|
+ this.Size = value
|
|
|
+ this.CurrentPage = 1
|
|
|
+ this.getbusiness()
|
|
|
+ },
|
|
|
+ HandleCurrentChange(value) {
|
|
|
+ this.CurrentPage = value
|
|
|
+ this.getbusiness()
|
|
|
+ },
|
|
|
+ seachdata() {
|
|
|
+ this.CurrentPage = -1
|
|
|
+ this.getbusiness()
|
|
|
+ },
|
|
|
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') {
|
|
|
@@ -461,32 +432,7 @@
|
|
|
|
|
|
</script>
|
|
|
|
|
|
-<style lang='scss'>
|
|
|
- .attach-uploader .el-upload {
|
|
|
- border: 1px dashed #63B8FF;
|
|
|
- cursor: pointer;
|
|
|
- position: relative;
|
|
|
- overflow: hidden;
|
|
|
- // margin-bottom: -17px;
|
|
|
- margin-top: -15px;
|
|
|
- margin-left: 20px
|
|
|
- }
|
|
|
-
|
|
|
- .attach-uploader .el-upload:hover {
|
|
|
- border-color: #228B22;
|
|
|
- }
|
|
|
+<style>
|
|
|
|
|
|
- .attach-uploader-icon {
|
|
|
- font-size: 25px;
|
|
|
- color: #63B8FF;
|
|
|
- width: 50px;
|
|
|
- height: 50px;
|
|
|
- line-height: 50px;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
-
|
|
|
- .attach-uploader-icon:hover {
|
|
|
- color: #228B22;
|
|
|
- }
|
|
|
|
|
|
</style>
|