|
@@ -12,7 +12,7 @@
|
|
|
提交
|
|
提交
|
|
|
</el-button> -->
|
|
</el-button> -->
|
|
|
</div>
|
|
</div>
|
|
|
- <el-table :data="businessList" border bordertooltip-effect="dark" @selection-change="handleSelectionChange">
|
|
|
|
|
|
|
+ <el-table :data="businessList" border bordertooltip-effect="dark" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
<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="Code" label="分类编码" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
|
|
@@ -144,7 +144,7 @@
|
|
|
},
|
|
},
|
|
|
flag: {
|
|
flag: {
|
|
|
type: String
|
|
type: String
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
...mapGetters({
|
|
...mapGetters({
|
|
@@ -152,12 +152,12 @@
|
|
|
authUser: 'authUser'
|
|
authUser: 'authUser'
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- data() {
|
|
|
|
|
|
|
+ data () {
|
|
|
return {
|
|
return {
|
|
|
yasuoname: '',
|
|
yasuoname: '',
|
|
|
SupplierId: 0,
|
|
SupplierId: 0,
|
|
|
SupplierTypeCode: '',
|
|
SupplierTypeCode: '',
|
|
|
- SubClassIds:[],
|
|
|
|
|
|
|
+ SubClassIds: [],
|
|
|
SupplierCertId: 0,
|
|
SupplierCertId: 0,
|
|
|
InStyle: '1',
|
|
InStyle: '1',
|
|
|
|
|
|
|
@@ -189,7 +189,7 @@
|
|
|
OtherRemark: '',
|
|
OtherRemark: '',
|
|
|
Remark: '',
|
|
Remark: '',
|
|
|
IsDelete: 0,
|
|
IsDelete: 0,
|
|
|
- FileUrlList: [],
|
|
|
|
|
|
|
+ FileUrlList: []
|
|
|
},
|
|
},
|
|
|
visible: false,
|
|
visible: false,
|
|
|
selfVisible: this.visible, // 避免vue双向绑定警告
|
|
selfVisible: this.visible, // 避免vue双向绑定警告
|
|
@@ -197,24 +197,23 @@
|
|
|
waituploads: [], // 等待上传的附件列表
|
|
waituploads: [], // 等待上传的附件列表
|
|
|
doclist: [],
|
|
doclist: [],
|
|
|
dynamicTableColumns: [],
|
|
dynamicTableColumns: [],
|
|
|
- IsCompanyUser: '',
|
|
|
|
|
|
|
+ IsCompanyUser: ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- created() {
|
|
|
|
|
|
|
+ created () {
|
|
|
this.getDictOptions()
|
|
this.getDictOptions()
|
|
|
this.initTableHeader()
|
|
this.initTableHeader()
|
|
|
this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
|
|
this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- handleSelectionChange(val) {
|
|
|
|
|
- this.SubClassIds=[]
|
|
|
|
|
- for (var i=0;i<val.length;i++)
|
|
|
|
|
- {
|
|
|
|
|
- this.SubClassIds.push(val[i].SubClassId)
|
|
|
|
|
- }
|
|
|
|
|
- this.initData()
|
|
|
|
|
|
|
+ handleSelectionChange (val) {
|
|
|
|
|
+ this.SubClassIds = []
|
|
|
|
|
+ for (var i = 0; i < val.length; i++) {
|
|
|
|
|
+ this.SubClassIds.push(val[i].SubClassId)
|
|
|
|
|
+ }
|
|
|
|
|
+ this.initData()
|
|
|
},
|
|
},
|
|
|
- initTableHeader() {
|
|
|
|
|
|
|
+ initTableHeader () {
|
|
|
if (this.flag == '01') {
|
|
if (this.flag == '01') {
|
|
|
setapi.initGoodTableHeader(this.$axios).then(res => {
|
|
setapi.initGoodTableHeader(this.$axios).then(res => {
|
|
|
this.dynamicTableColumns = res.data.items
|
|
this.dynamicTableColumns = res.data.items
|
|
@@ -228,9 +227,8 @@
|
|
|
this.dynamicTableColumns = res.data.items
|
|
this.dynamicTableColumns = res.data.items
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
- getvalue(SupplierId, SupplierTypeCode, certId, inStyle) {
|
|
|
|
|
|
|
+ getvalue (SupplierId, SupplierTypeCode, certId, inStyle) {
|
|
|
this.SupplierId = SupplierId
|
|
this.SupplierId = SupplierId
|
|
|
this.SupplierTypeCode = SupplierTypeCode
|
|
this.SupplierTypeCode = SupplierTypeCode
|
|
|
this.SupplierCertId = certId
|
|
this.SupplierCertId = certId
|
|
@@ -238,32 +236,31 @@
|
|
|
this.initData()
|
|
this.initData()
|
|
|
this.getbusList()
|
|
this.getbusList()
|
|
|
},
|
|
},
|
|
|
- initData() {
|
|
|
|
|
|
|
+ initData () {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
const params = {
|
|
const params = {
|
|
|
InStyle: this.InStyle,
|
|
InStyle: this.InStyle,
|
|
|
SupplierId: this.SupplierId,
|
|
SupplierId: this.SupplierId,
|
|
|
SupplierTypeCode: this.SupplierTypeCode,
|
|
SupplierTypeCode: this.SupplierTypeCode,
|
|
|
- SubClassIds:this.SubClassIds.join(),
|
|
|
|
|
|
|
+ SubClassIds: this.SubClassIds.join(),
|
|
|
_currentPage: 1,
|
|
_currentPage: 1,
|
|
|
- _size: 1000,
|
|
|
|
|
|
|
+ _size: 1000
|
|
|
}
|
|
}
|
|
|
_this.$axios.get('supplierfile/filelist', {
|
|
_this.$axios.get('supplierfile/filelist', {
|
|
|
- params
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ params
|
|
|
|
|
+ })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
_this.subfileList = res.data.items
|
|
_this.subfileList = res.data.items
|
|
|
_this.currentItemCount = res.data.currentItemCount
|
|
_this.currentItemCount = res.data.currentItemCount
|
|
|
for (let idx in _this.subfileList) {
|
|
for (let idx in _this.subfileList) {
|
|
|
_this.subfileList[idx].FileUrlList = _this.subfileList[idx].FileUrl.split('$')
|
|
_this.subfileList[idx].FileUrlList = _this.subfileList[idx].FileUrl.split('$')
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- getbusList() {
|
|
|
|
|
|
|
+ getbusList () {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
const params = {
|
|
const params = {
|
|
|
SupplierCertId: this.SupplierCertId,
|
|
SupplierCertId: this.SupplierCertId,
|
|
@@ -272,8 +269,8 @@
|
|
|
_size: 1000
|
|
_size: 1000
|
|
|
}
|
|
}
|
|
|
this.$axios.get('suppliercertsub/list', {
|
|
this.$axios.get('suppliercertsub/list', {
|
|
|
- params
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ params
|
|
|
|
|
+ })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
_this.businessList = res.data.items
|
|
_this.businessList = res.data.items
|
|
|
})
|
|
})
|
|
@@ -281,7 +278,7 @@
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- makesure() {
|
|
|
|
|
|
|
+ makesure () {
|
|
|
if (this.Title == '新增文件') {
|
|
if (this.Title == '新增文件') {
|
|
|
if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
// 上传附件是否完成判断
|
|
// 上传附件是否完成判断
|
|
@@ -314,7 +311,7 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- addSubfile() {
|
|
|
|
|
|
|
+ addSubfile () {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
_this.SubfileForm.SupplierId = parseInt(_this.SubfileForm.SupplierId)
|
|
_this.SubfileForm.SupplierId = parseInt(_this.SubfileForm.SupplierId)
|
|
|
_this.SubfileForm.SupplierCertSubId = parseInt(_this.SubfileForm.SupplierCertSubId)
|
|
_this.SubfileForm.SupplierCertSubId = parseInt(_this.SubfileForm.SupplierCertSubId)
|
|
@@ -323,7 +320,7 @@
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
_this.$message({
|
|
_this.$message({
|
|
|
type: 'success',
|
|
type: 'success',
|
|
|
- message: res.data.message,
|
|
|
|
|
|
|
+ message: res.data.message
|
|
|
})
|
|
})
|
|
|
this.visible = false
|
|
this.visible = false
|
|
|
this.initData()
|
|
this.initData()
|
|
@@ -339,7 +336,7 @@
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- editSubfile() {
|
|
|
|
|
|
|
+ editSubfile () {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
_this.SubfileForm.SupplierId = parseInt(_this.SubfileForm.SupplierId)
|
|
_this.SubfileForm.SupplierId = parseInt(_this.SubfileForm.SupplierId)
|
|
|
_this.SubfileForm.SupplierCertSubId = parseInt(_this.SubfileForm.SupplierCertSubId)
|
|
_this.SubfileForm.SupplierCertSubId = parseInt(_this.SubfileForm.SupplierCertSubId)
|
|
@@ -348,7 +345,7 @@
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
_this.$message({
|
|
_this.$message({
|
|
|
type: 'success',
|
|
type: 'success',
|
|
|
- message: res.data.message,
|
|
|
|
|
|
|
+ message: res.data.message
|
|
|
})
|
|
})
|
|
|
this.visible = false
|
|
this.visible = false
|
|
|
this.initData()
|
|
this.initData()
|
|
@@ -364,36 +361,36 @@
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- deletedata(val) {
|
|
|
|
|
- let _this = this;
|
|
|
|
|
- _this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
|
- type: "warning"
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ deletedata (val) {
|
|
|
|
|
+ let _this = this
|
|
|
|
|
+ _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ })
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
_this.$axios.delete('supplierfile/subfiledelete/' + val.Id, {})
|
|
_this.$axios.delete('supplierfile/subfiledelete/' + val.Id, {})
|
|
|
.then(function (response) {
|
|
.then(function (response) {
|
|
|
if (response.data.code === 0) {
|
|
if (response.data.code === 0) {
|
|
|
_this.$message({
|
|
_this.$message({
|
|
|
- type: "success",
|
|
|
|
|
|
|
+ type: 'success',
|
|
|
message: response.data.message
|
|
message: response.data.message
|
|
|
- });
|
|
|
|
|
- _this.initData();
|
|
|
|
|
- } else {
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ _this.initData()
|
|
|
|
|
+ } else {
|
|
|
_this.$message({
|
|
_this.$message({
|
|
|
- type: "warning",
|
|
|
|
|
|
|
+ type: 'warning',
|
|
|
message: response.data.message
|
|
message: response.data.message
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
.catch(function (error) {
|
|
.catch(function (error) {
|
|
|
- console.log(error);
|
|
|
|
|
- });
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {});
|
|
|
|
|
- },
|
|
|
|
|
- nextStep() {
|
|
|
|
|
|
|
+ console.log(error)
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {})
|
|
|
|
|
+ },
|
|
|
|
|
+ nextStep () {
|
|
|
if (this.businessList && this.businessList.length > 0) {
|
|
if (this.businessList && this.businessList.length > 0) {
|
|
|
if (this.subfileList && this.subfileList.length > 0) {
|
|
if (this.subfileList && this.subfileList.length > 0) {
|
|
|
for (var i = 0; i < this.subfileList.length; i++) {
|
|
for (var i = 0; i < this.subfileList.length; i++) {
|
|
@@ -416,15 +413,15 @@
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- getDictOptions() {
|
|
|
|
|
|
|
+ getDictOptions () {
|
|
|
api.getDictList(this.$axios).then(res => {
|
|
api.getDictList(this.$axios).then(res => {
|
|
|
this.yasuoname = res.data.items['YaSuoName']
|
|
this.yasuoname = res.data.items['YaSuoName']
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- showDialog() {
|
|
|
|
|
- //this.doclist = []
|
|
|
|
|
|
|
+ showDialog () {
|
|
|
|
|
+ // this.doclist = []
|
|
|
this.Title = '新增文件'
|
|
this.Title = '新增文件'
|
|
|
this.SubfileForm.Id = ''
|
|
this.SubfileForm.Id = ''
|
|
|
this.SubfileForm.SupplierId = this.SupplierId
|
|
this.SubfileForm.SupplierId = this.SupplierId
|
|
@@ -443,7 +440,7 @@
|
|
|
this.SubfileForm.IsDelete = 0
|
|
this.SubfileForm.IsDelete = 0
|
|
|
this.visible = true
|
|
this.visible = true
|
|
|
},
|
|
},
|
|
|
- openDialog(val) {
|
|
|
|
|
|
|
+ openDialog (val) {
|
|
|
this.Title = '上传文件'
|
|
this.Title = '上传文件'
|
|
|
this.SubfileForm.Id = val.Id
|
|
this.SubfileForm.Id = val.Id
|
|
|
this.SubfileForm.SupplierId = val.SupplierId
|
|
this.SubfileForm.SupplierId = val.SupplierId
|
|
@@ -467,8 +464,8 @@
|
|
|
this.SubfileForm.IsDelete = val.IsDelete
|
|
this.SubfileForm.IsDelete = val.IsDelete
|
|
|
this.visible = true
|
|
this.visible = true
|
|
|
},
|
|
},
|
|
|
- //文档列表
|
|
|
|
|
- getwendanginfo(iUrl) {
|
|
|
|
|
|
|
+ // 文档列表
|
|
|
|
|
+ getwendanginfo (iUrl) {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
_this.doclist = []
|
|
_this.doclist = []
|
|
|
let exArr = iUrl.split('|')
|
|
let exArr = iUrl.split('|')
|
|
@@ -479,8 +476,8 @@
|
|
|
_this.doclist.push(params)
|
|
_this.doclist.push(params)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- beforeAvatarUpload(file) {
|
|
|
|
|
- /*let isLt512K = file.size / 1024 < 512
|
|
|
|
|
|
|
+ beforeAvatarUpload (file) {
|
|
|
|
|
+ /* let isLt512K = file.size / 1024 < 512
|
|
|
if (isLt512K) {
|
|
if (isLt512K) {
|
|
|
this.$message.error('上传文件大小不能小于 512KB!')
|
|
this.$message.error('上传文件大小不能小于 512KB!')
|
|
|
return false
|
|
return false
|
|
@@ -493,9 +490,8 @@
|
|
|
}
|
|
}
|
|
|
return true
|
|
return true
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
- uploadrequest(option) {
|
|
|
|
|
|
|
+ uploadrequest (option) {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
if (process.client) {
|
|
if (process.client) {
|
|
|
const myDomain = window.location.host
|
|
const myDomain = window.location.host
|
|
@@ -530,7 +526,7 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 判断附件是否上传成功
|
|
// 判断附件是否上传成功
|
|
|
- attachissuccess() {
|
|
|
|
|
|
|
+ attachissuccess () {
|
|
|
if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
|
|
for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
|
|
|
if (this.$refs.refuploadattach.uploadFiles[i].status !== 'success') {
|
|
if (this.$refs.refuploadattach.uploadFiles[i].status !== 'success') {
|
|
@@ -540,7 +536,7 @@
|
|
|
}
|
|
}
|
|
|
return true
|
|
return true
|
|
|
},
|
|
},
|
|
|
- getattachissuccess() {
|
|
|
|
|
|
|
+ getattachissuccess () {
|
|
|
this.SubfileForm.FileUrl = ''
|
|
this.SubfileForm.FileUrl = ''
|
|
|
this.SubfileForm.FileName = ''
|
|
this.SubfileForm.FileName = ''
|
|
|
if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
@@ -557,37 +553,37 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- clickachment(url, uid) {
|
|
|
|
|
|
|
+ clickachment (url, uid) {
|
|
|
window.open(`http://${url}`)
|
|
window.open(`http://${url}`)
|
|
|
},
|
|
},
|
|
|
- deletefile() {
|
|
|
|
|
|
|
+ deletefile () {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
_this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
_this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
|
- type: 'warning'
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ })
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
_this.doclist = []
|
|
_this.doclist = []
|
|
|
})
|
|
})
|
|
|
.catch(() => {})
|
|
.catch(() => {})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- seachdata() {
|
|
|
|
|
|
|
+ seachdata () {
|
|
|
this.initData()
|
|
this.initData()
|
|
|
},
|
|
},
|
|
|
- fileurlcut(val, index) {
|
|
|
|
|
|
|
+ fileurlcut (val, index) {
|
|
|
let fileurlall = val.split('$')[index]
|
|
let fileurlall = val.split('$')[index]
|
|
|
- let fileurl = fileurlall.split("|")
|
|
|
|
|
|
|
+ let fileurl = fileurlall.split('|')
|
|
|
let retUrl = fileurl[0]
|
|
let retUrl = fileurl[0]
|
|
|
- //内网服务器专用
|
|
|
|
|
|
|
+ // 内网服务器专用
|
|
|
if (process.client && retUrl.indexOf('/upfile') === 0) {
|
|
if (process.client && retUrl.indexOf('/upfile') === 0) {
|
|
|
const myDomain = window.location.host
|
|
const myDomain = window.location.host
|
|
|
retUrl = myDomain + '/' + retUrl
|
|
retUrl = myDomain + '/' + retUrl
|
|
|
}
|
|
}
|
|
|
return retUrl
|
|
return retUrl
|
|
|
},
|
|
},
|
|
|
- jstimehandle(val) {
|
|
|
|
|
|
|
+ jstimehandle (val) {
|
|
|
if (val === '') {
|
|
if (val === '') {
|
|
|
return '----'
|
|
return '----'
|
|
|
} else if (val === '0001-01-01T00:00:00Z') {
|
|
} else if (val === '0001-01-01T00:00:00Z') {
|
|
@@ -600,10 +596,9 @@
|
|
|
val = val.replace('T', ' ')
|
|
val = val.replace('T', ' ')
|
|
|
return val.substring(0, 10)
|
|
return val.substring(0, 10)
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang='scss'>
|
|
<style lang='scss'>
|