|
|
@@ -89,7 +89,7 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog title="基建类业务列表" :visible.sync="basicDialog" top="5vh" style="width:1000px">
|
|
|
+ <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>
|
|
|
@@ -129,7 +129,7 @@
|
|
|
export default {
|
|
|
name: 'EquipmentList',
|
|
|
components: {
|
|
|
- SubfileList, //文档
|
|
|
+ SubfileList // 文档
|
|
|
},
|
|
|
props: {
|
|
|
SupplierCertId: {
|
|
|
@@ -147,9 +147,9 @@
|
|
|
canadd: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
this.initData()
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -157,7 +157,7 @@
|
|
|
session: 'session'
|
|
|
})
|
|
|
},
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
oneList: [],
|
|
|
OneCode: '',
|
|
|
@@ -195,45 +195,45 @@
|
|
|
Size: 10,
|
|
|
CurrentItemCount: 0,
|
|
|
|
|
|
- subfileList: [], //文档
|
|
|
+ subfileList: [] // 文档
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- getvalue(SupplierId, SupplierTypeCode, certId) {
|
|
|
+ getvalue (SupplierId, SupplierTypeCode, certId) {
|
|
|
this.SupplierId = SupplierId
|
|
|
this.SupplierTypeCode = SupplierTypeCode
|
|
|
this.SupplierCertId = certId
|
|
|
this.initData()
|
|
|
},
|
|
|
- initData() {
|
|
|
+ initData () {
|
|
|
let _this = this
|
|
|
const params = {
|
|
|
SupplierCertId: this.SupplierCertId,
|
|
|
SupplierTypeCode: this.SupplierTypeCode,
|
|
|
_currentPage: this.currentPage,
|
|
|
- _size: this.size,
|
|
|
+ _size: this.size
|
|
|
}
|
|
|
this.$axios.get('suppliercertsub/list', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.businessList = res.data.items
|
|
|
_this.currentItemCount = res.data.currentItemCount
|
|
|
- _this.$refs["subfileList"].getvalue(this.SupplierId, this.SupplierTypeCode, this.SupplierCertId)
|
|
|
+ _this.$refs['subfileList'].getvalue(this.SupplierId, this.SupplierTypeCode, this.SupplierCertId)
|
|
|
})
|
|
|
.catch(err => {
|
|
|
// handle error
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- savedata() {
|
|
|
- if (this.Title == '新增准入范围') {
|
|
|
+ savedata () {
|
|
|
+ if (this.Title === '新增准入范围') {
|
|
|
this.addBusiness()
|
|
|
- } else if (this.Title == '编辑准入范围') {
|
|
|
+ } else if (this.Title === '编辑准入范围') {
|
|
|
this.editBusiness()
|
|
|
}
|
|
|
},
|
|
|
- addBusiness() {
|
|
|
+ addBusiness () {
|
|
|
let _this = this
|
|
|
_this.BusinessForm.SupplierId = parseInt(_this.BusinessForm.SupplierId)
|
|
|
_this.BusinessForm.SupplierCertId = parseInt(_this.BusinessForm.SupplierCertId)
|
|
|
@@ -243,7 +243,7 @@
|
|
|
if (res.data.code === 0) {
|
|
|
_this.$message({
|
|
|
type: 'success',
|
|
|
- message: res.data.message,
|
|
|
+ message: res.data.message
|
|
|
})
|
|
|
_this.BusinessForm.Id = res.data.item + ''
|
|
|
_this.visible = false
|
|
|
@@ -259,7 +259,7 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- editBusiness() {
|
|
|
+ editBusiness () {
|
|
|
let _this = this
|
|
|
_this.BusinessForm.SupplierId = parseInt(_this.BusinessForm.SupplierId)
|
|
|
_this.BusinessForm.SupplierCertId = parseInt(_this.BusinessForm.SupplierCertId)
|
|
|
@@ -269,7 +269,7 @@
|
|
|
if (res.data.code === 0) {
|
|
|
_this.$message({
|
|
|
type: 'success',
|
|
|
- message: res.data.message,
|
|
|
+ message: res.data.message
|
|
|
})
|
|
|
this.visible = false
|
|
|
this.initData()
|
|
|
@@ -284,36 +284,36 @@
|
|
|
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(() => {
|
|
|
_this.$axios.delete('suppliercertsub/businessdelete/' + val.Id, {})
|
|
|
.then(function (response) {
|
|
|
if (response.data.code === 0) {
|
|
|
_this.$message({
|
|
|
- type: "success",
|
|
|
+ type: 'success',
|
|
|
message: response.data.message
|
|
|
- });
|
|
|
- _this.initData();
|
|
|
+ })
|
|
|
+ _this.initData()
|
|
|
} else {
|
|
|
_this.$message({
|
|
|
- type: "warning",
|
|
|
+ type: 'warning',
|
|
|
message: response.data.message
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
.catch(function (error) {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
})
|
|
|
- .catch(() => {});
|
|
|
+ .catch(() => {})
|
|
|
},
|
|
|
- showDialog() {
|
|
|
+ showDialog () {
|
|
|
this.OneCode = ''
|
|
|
this.selectedorg = []
|
|
|
this.keyword = ''
|
|
|
@@ -331,7 +331,7 @@
|
|
|
this.getbusiness()
|
|
|
this.visible = true
|
|
|
},
|
|
|
- openDialog(val) {
|
|
|
+ openDialog (val) {
|
|
|
this.Title = '编辑准入范围'
|
|
|
this.BusinessForm.Id = val.Id
|
|
|
this.BusinessForm.SupplierId = val.SupplierId
|
|
|
@@ -345,15 +345,15 @@
|
|
|
this.getbusiness()
|
|
|
this.visible = true
|
|
|
},
|
|
|
- getbusiness() {
|
|
|
+ getbusiness () {
|
|
|
let _this = this
|
|
|
- if (_this.SupplierTypeCode == '01') { //获取物资类业务列表
|
|
|
+ if (_this.SupplierTypeCode === '01') { // 获取物资类业务列表
|
|
|
this.$axios.get('goodsaptitude/goodsparentlist', {})
|
|
|
.then(res => {
|
|
|
_this.oneList = res.data.items
|
|
|
- if (_this.Title == '编辑准入范围') {
|
|
|
+ if (_this.Title === '编辑准入范围') {
|
|
|
for (var i = 0; i < _this.oneList.length; i++) {
|
|
|
- if (_this.BusinessForm.Code == _this.oneList[i].Code) {
|
|
|
+ if (_this.BusinessForm.Code === _this.oneList[i].Code) {
|
|
|
_this.OneCode = _this.oneList[i].Id
|
|
|
}
|
|
|
}
|
|
|
@@ -362,15 +362,15 @@
|
|
|
.catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
- } else if (_this.SupplierTypeCode == '02') { //获取基建类业务列表
|
|
|
+ } else if (_this.SupplierTypeCode === '02') { // 获取基建类业务列表
|
|
|
const params = {
|
|
|
keyword: this.keyword,
|
|
|
_currentPage: this.CurrentPage,
|
|
|
- _size: this.Size,
|
|
|
+ _size: this.Size
|
|
|
}
|
|
|
this.$axios.get('basisbuild/basiclist', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.techList = res.data.items
|
|
|
_this.CurrentItemCount = res.data.currentItemCount
|
|
|
@@ -378,7 +378,7 @@
|
|
|
.catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
- } else if (_this.SupplierTypeCode == '03') { //获取技术服务类业务列表
|
|
|
+ } else if (_this.SupplierTypeCode === '03') { // 获取技术服务类业务列表
|
|
|
this.$axios.get('technologyservice/businesslist', {})
|
|
|
.then(res => {
|
|
|
_this.techList = res.data.items
|
|
|
@@ -389,23 +389,23 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- getCode() {
|
|
|
+ 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) {
|
|
|
+ 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
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- getChild() {
|
|
|
+ getChild () {
|
|
|
const params = {
|
|
|
ParentId: this.OneCode
|
|
|
}
|
|
|
this.$axios.get('goodsaptitude/goodschildlist', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
this.techList = res.data.items
|
|
|
if (this.techList && this.techList.length > 0) {
|
|
|
@@ -418,28 +418,28 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- getParentCode() {
|
|
|
+ getParentCode () {
|
|
|
this.ClassId = this.OneCode
|
|
|
for (var i = 0; i < this.oneList.length; i++) {
|
|
|
- if (this.OneCode == this.oneList[i].Id) {
|
|
|
+ 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
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- getChooseCode(val) {
|
|
|
+ getChooseCode (val) {
|
|
|
this.ClassId = val.Id
|
|
|
this.BusinessForm.SubClassId = val.Id
|
|
|
this.BusinessForm.Code = val.Code
|
|
|
this.BusinessForm.Name = val.Name
|
|
|
this.basicDialog = false
|
|
|
},
|
|
|
- nextStep() {
|
|
|
- this.subfileList = this.$refs["subfileList"].subfileList
|
|
|
+ nextStep () {
|
|
|
+ this.subfileList = this.$refs['subfileList'].subfileList
|
|
|
if (this.subfileList && this.subfileList.length > 0) {
|
|
|
for (var i = 0; i < this.subfileList.length; i++) {
|
|
|
- if (this.subfileList[i].FileType == '1' && this.subfileList[i].FileUrl == '') {
|
|
|
+ if (this.subfileList[i].FileType === '1' && this.subfileList[i].FileUrl === '') {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
message: '请上传文件' + this.subfileList[i].NeedFileType + '!'
|
|
|
@@ -453,33 +453,33 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- subfiledialog() {
|
|
|
- this.$refs["subfileList"].showDialog()
|
|
|
+ subfiledialog () {
|
|
|
+ this.$refs['subfileList'].showDialog()
|
|
|
},
|
|
|
|
|
|
- handleSizeChange(value) {
|
|
|
+ handleSizeChange (value) {
|
|
|
this.size = value
|
|
|
this.currentPage = 1
|
|
|
this.initData()
|
|
|
},
|
|
|
- handleCurrentChange(value) {
|
|
|
+ handleCurrentChange (value) {
|
|
|
this.currentPage = value
|
|
|
this.initData()
|
|
|
},
|
|
|
- HandleSizeChange(value) {
|
|
|
+ HandleSizeChange (value) {
|
|
|
this.Size = value
|
|
|
this.CurrentPage = 1
|
|
|
this.getbusiness()
|
|
|
},
|
|
|
- HandleCurrentChange(value) {
|
|
|
+ HandleCurrentChange (value) {
|
|
|
this.CurrentPage = value
|
|
|
this.getbusiness()
|
|
|
},
|
|
|
- seachdata() {
|
|
|
+ seachdata () {
|
|
|
this.CurrentPage = -1
|
|
|
this.getbusiness()
|
|
|
},
|
|
|
- jstimehandle(val) {
|
|
|
+ jstimehandle (val) {
|
|
|
if (val === '') {
|
|
|
return '----'
|
|
|
} else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
@@ -490,10 +490,9 @@
|
|
|
val = val.replace('T', ' ')
|
|
|
return val.substring(0, 10)
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style>
|