|
|
@@ -178,7 +178,7 @@
|
|
|
|
|
|
<el-tab-pane label="企业资质" :disabled="!certId">
|
|
|
<business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId" :SupplierId="formData.Id"
|
|
|
- :SupplierTypeCode="classId" :canadd="add_flat" @close="AuditEntity" height="360px" style="margin-top: 20px">
|
|
|
+ :SupplierTypeCode="classId" :canadd="add_flat" @close="selectAuditOrg" height="360px" style="margin-top: 20px">
|
|
|
</business-list>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
@@ -200,6 +200,29 @@
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-card>
|
|
|
+ <el-dialog title="选择审批单位" :visible.sync="dialogVisible" width="520px">
|
|
|
+ <el-form ref="searchForm" label-width="110px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="单位名称">
|
|
|
+ <el-select ref="selectauditOrg" v-model="firstAudit" placeholder="请选择"
|
|
|
+ style="width: 90%" filterable allow-create default-first-option>
|
|
|
+ <el-option
|
|
|
+ v-for="item in organizeOption"
|
|
|
+ :key="item.Id"
|
|
|
+ :label="item.Fullname"
|
|
|
+ :value="item.Id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="AuditEntity">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -227,12 +250,12 @@
|
|
|
WfHistory,
|
|
|
SupplierCertEdit,
|
|
|
|
|
|
- EquipmentList, //企业主要装备情况
|
|
|
- PerformanceList, //近三年主要工程业绩列表
|
|
|
- PatentList, //拥有专利、专有技术及工法列表
|
|
|
- WinningList, //近三年获得省部级及以上主要技术、管理成果、获奖项目列表
|
|
|
- BusinessList, //选择准入范围
|
|
|
- BasisInfo,
|
|
|
+ EquipmentList, // 企业主要装备情况
|
|
|
+ PerformanceList, // 近三年主要工程业绩列表
|
|
|
+ PatentList, // 拥有专利、专有技术及工法列表
|
|
|
+ WinningList, // 近三年获得省部级及以上主要技术、管理成果、获奖项目列表
|
|
|
+ BusinessList, // 选择准入范围
|
|
|
+ BasisInfo
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters({
|
|
|
@@ -241,16 +264,19 @@
|
|
|
},
|
|
|
name: 'oilsupplierEdit',
|
|
|
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
+ dialogVisible: false,
|
|
|
canUpdateSupplier: true,
|
|
|
dictData: null,
|
|
|
applyLoading: false,
|
|
|
- equipmentList: [], //企业主要装备情况
|
|
|
- performanceList: [], //近三年主要工程业绩
|
|
|
- patentList: [], //拥有专利、专有技术及工法
|
|
|
- winningList: [], //近三年获得省部级及以上主要技术、管理成果、获奖项目
|
|
|
- businessList: [], //准入业务
|
|
|
+ equipmentList: [], // 企业主要装备情况
|
|
|
+ performanceList: [], // 近三年主要工程业绩
|
|
|
+ patentList: [], // 拥有专利、专有技术及工法
|
|
|
+ winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
|
|
|
+ businessList: [], // 准入业务
|
|
|
+ organizeOption: [], // 审批部门
|
|
|
+ firstAudit: '',
|
|
|
serviceId: '',
|
|
|
certId: '',
|
|
|
classId: '02',
|
|
|
@@ -333,7 +359,7 @@
|
|
|
SupplierTypeCode: '02',
|
|
|
SupplierTypeName: '基建类',
|
|
|
Step: 0,
|
|
|
- HseTraining: 0,
|
|
|
+ HseTraining: 0
|
|
|
},
|
|
|
|
|
|
formDataCert: {
|
|
|
@@ -352,10 +378,10 @@
|
|
|
},
|
|
|
add_flat: true,
|
|
|
entrydetail: {
|
|
|
- process: 'oil_supplier_apply',
|
|
|
+ process: 'oil_supplier_apply_1',
|
|
|
business: '',
|
|
|
instance: ''
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
@@ -364,7 +390,7 @@
|
|
|
this.certId = this.$route.query.certid + ''
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
this.serviceId = this.$route.params.opera + ''
|
|
|
if (this.$route.query.certid) {
|
|
|
this.certId = this.$route.query.certid + ''
|
|
|
@@ -378,8 +404,8 @@
|
|
|
this.initDatas()
|
|
|
},
|
|
|
methods: {
|
|
|
- inputCompany(val) {
|
|
|
- if (!this.certId) { //已经关联到子表了,就不能再切换主表ID了
|
|
|
+ inputCompany (val) {
|
|
|
+ if (!this.certId) { // 已经关联到子表了,就不能再切换主表ID了
|
|
|
api.getEntityByName(val, this.$axios).then(res => {
|
|
|
if (res.data && res.data.Id) {
|
|
|
this.SetFormData(res.data)
|
|
|
@@ -389,12 +415,12 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- changeFormData(fdata) {
|
|
|
- if (!this.certId) { //已经关联到子表了,就不能再切换主表ID了
|
|
|
+ changeFormData (fdata) {
|
|
|
+ if (!this.certId) { // 已经关联到子表了,就不能再切换主表ID了
|
|
|
this.SetFormData(fdata)
|
|
|
}
|
|
|
},
|
|
|
- SetFormData(fdata) {
|
|
|
+ SetFormData (fdata) {
|
|
|
this.isCanUpdateSupplier(fdata.Id)
|
|
|
this.formData.Id = fdata.Id
|
|
|
this.formData.SupplierName = fdata.SupplierName
|
|
|
@@ -452,31 +478,31 @@
|
|
|
this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkStreet)
|
|
|
/*this.$refs["BasisInfo"].UnitRelationAry = []
|
|
|
if (this.formData.SpecTypeCode.length > 0) {
|
|
|
- this.$refs["BasisInfo"].UnitRelationAry = this.formData.SpecTypeCode.split(',')
|
|
|
+ this.$refs['BasisInfo'].UnitRelationAry = this.formData.SpecTypeCode.split(',')
|
|
|
}*/
|
|
|
},
|
|
|
|
|
|
- isCanUpdateSupplier(supplierId) {
|
|
|
+ isCanUpdateSupplier (supplierId) {
|
|
|
api.isCanUpdateSupplier(supplierId, this.$axios).then(res => {
|
|
|
this.canUpdateSupplier = (res.data.code === 0)
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- equipmentdialog() {
|
|
|
- this.$refs["equipmentList"].showDialog()
|
|
|
+ equipmentdialog () {
|
|
|
+ this.$refs['equipmentList'].showDialog()
|
|
|
},
|
|
|
- performancedialog() {
|
|
|
- this.$refs["performanceList"].showDialog()
|
|
|
+ performancedialog () {
|
|
|
+ this.$refs['performanceList'].showDialog()
|
|
|
},
|
|
|
- patentdialog() {
|
|
|
- this.$refs["patentList"].showDialog()
|
|
|
+ patentdialog () {
|
|
|
+ this.$refs['patentList'].showDialog()
|
|
|
},
|
|
|
- winningdialog() {
|
|
|
- this.$refs["winningList"].showDialog()
|
|
|
+ winningdialog () {
|
|
|
+ this.$refs['winningList'].showDialog()
|
|
|
},
|
|
|
|
|
|
- initDatas() {
|
|
|
+ initDatas () {
|
|
|
this.isCanUpdateSupplier(this.formData.Id)
|
|
|
if (this.formData.Id) {
|
|
|
api.getEntityAndCert(this.certId, this.$axios).then(res => {
|
|
|
@@ -503,44 +529,45 @@
|
|
|
this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkStreet)
|
|
|
/*this.$refs["BasisInfo"].UnitRelationAry = []
|
|
|
if (this.formData.SpecTypeCode.length > 0) {
|
|
|
- this.$refs["BasisInfo"].UnitRelationAry = this.formData.SpecTypeCode.split(',')
|
|
|
+ this.$refs['BasisInfo'].UnitRelationAry = this.formData.SpecTypeCode.split(',')
|
|
|
}*/
|
|
|
|
|
|
this.entrydetail.business = this.certId
|
|
|
this.entrydetail.instance = this.formDataCert.WorkflowId
|
|
|
if (this.certId && this.formDataCert.WorkflowId) {
|
|
|
- this.$refs['WfHistory'].getHistoryTask() /*刷新工作流*/
|
|
|
+ this.$refs['WfHistory'].getHistoryTask() /* 刷新工作流 */
|
|
|
}
|
|
|
- this.$refs["equipmentList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
|
|
|
- this.$refs["performanceList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
|
|
|
- this.$refs["patentList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
|
|
|
- this.$refs["winningList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
|
|
|
- this.$refs["businessList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
|
|
|
+ this.$refs['equipmentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
|
|
|
+ this.$refs['performanceList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
|
|
|
+ this.$refs['patentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
|
|
|
+ this.$refs['winningList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
|
|
|
+ this.$refs['businessList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- getDictOptions() {
|
|
|
+ getDictOptions () {
|
|
|
api.getDictList(this.$axios).then(res => {
|
|
|
this.dictData = res.data.items
|
|
|
- /*this.UnitRelationOptions = res.data.items['UnitRelation']
|
|
|
+ this.organizeOption = res.data.items['Organizes']
|
|
|
+ /* this.UnitRelationOptions = res.data.items['UnitRelation']
|
|
|
this.getCityList(res.data.items['GaodeMapChinaAreas'])
|
|
|
- this.CompanyTypeOptions = res.data.items['CompanyType']*/
|
|
|
+ this.CompanyTypeOptions = res.data.items['CompanyType'] */
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- /*getCityList(val) {
|
|
|
+ /* getCityList(val) {
|
|
|
let resultData = JSON.parse(val)
|
|
|
let countstr = JSON.stringify(resultData.districts[0].districts)
|
|
|
countstr = countstr.replace(/\,\"districts\"\:\[\]/g, '')
|
|
|
this.countryoptions = JSON.parse(countstr)
|
|
|
- },*/
|
|
|
+ }, */
|
|
|
|
|
|
- //保存信息
|
|
|
- saveEntity() {
|
|
|
+ // 保存信息
|
|
|
+ saveEntity () {
|
|
|
this.$refs['BasisInfo'].$refs['EntityForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (!this.formData.SetupTime) {
|
|
|
@@ -548,71 +575,68 @@
|
|
|
} else {
|
|
|
this.formData.SetupTime = new Date(this.formData.SetupTime)
|
|
|
}
|
|
|
- //this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
|
|
|
+ // this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
|
|
|
if (!this.formData.Id || !this.certId) {
|
|
|
this.addEntity()
|
|
|
} else {
|
|
|
this.updateEntity()
|
|
|
}
|
|
|
-
|
|
|
} else {
|
|
|
return false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- //保存信息
|
|
|
- saveCertEntity() {
|
|
|
+ // 保存信息
|
|
|
+ saveCertEntity () {
|
|
|
this.$refs['SupplierCertEditCompoment'].saveEntity()
|
|
|
},
|
|
|
|
|
|
- addEntity() {
|
|
|
+ addEntity () {
|
|
|
this.formData.SupplierTypeCode = '02'
|
|
|
this.formData.SupplierTypeName = '基建类'
|
|
|
api.addEntity(this.formData, this.$axios).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
- //保存成功后,初始化数据,变成修改
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
this.formData.Id = res.data.item.split('_')[0]
|
|
|
this.certId = res.data.item.split('_')[1]
|
|
|
this.initDatas()
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
|
- });
|
|
|
-
|
|
|
+ })
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
message: res.data.message
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- updateEntity() {
|
|
|
+ updateEntity () {
|
|
|
api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
- //保存成功后,初始化数据,变成修改
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
this.initDatas()
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
|
- });
|
|
|
-
|
|
|
+ })
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
message: res.data.message
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- CheckCompanyBase() {
|
|
|
+ CheckCompanyBase () {
|
|
|
if (!this.formData.Id) {
|
|
|
this.$message({
|
|
|
type: 'error',
|
|
|
@@ -629,58 +653,61 @@
|
|
|
}
|
|
|
return true
|
|
|
},
|
|
|
- //企业人员结构情况
|
|
|
- updateNumberEntity() {
|
|
|
+ // 企业人员结构情况
|
|
|
+ updateNumberEntity () {
|
|
|
if (!this.CheckCompanyBase()) {
|
|
|
return false
|
|
|
}
|
|
|
api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
- //保存成功后,初始化数据,变成修改
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
this.initDatas()
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
|
- });
|
|
|
+ })
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
message: res.data.message
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- AuditEntity() {
|
|
|
+ selectAuditOrg () {
|
|
|
+ this.dialogVisible = true
|
|
|
+ },
|
|
|
+ AuditEntity () {
|
|
|
this.applyLoading = true
|
|
|
- apiCert.auditEntity(this.certId, this.$axios).then(res => {
|
|
|
+ apiCert.auditEntity(this.certId, this.firstAudit, this.$axios).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
- //保存成功后,初始化数据,变成修改
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
this.initDatas()
|
|
|
+ this.dialogVisible = false
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
|
- });
|
|
|
+ })
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
message: res.data.message
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
this.applyLoading = false
|
|
|
-
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- nexStepCB() {
|
|
|
+ nexStepCB () {
|
|
|
this.formData.Step += 1
|
|
|
},
|
|
|
|
|
|
- jstimehandle(val) {
|
|
|
+ jstimehandle (val) {
|
|
|
if (val === '') {
|
|
|
return '----'
|
|
|
} else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
@@ -693,20 +720,19 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- formatDateTime(date) {
|
|
|
- var y = date.getFullYear();
|
|
|
- var m = date.getMonth() + 1;
|
|
|
- m = m < 10 ? ('0' + m) : m;
|
|
|
- var d = date.getDate();
|
|
|
- d = d < 10 ? ('0' + d) : d;
|
|
|
- var h = date.getHours();
|
|
|
- var minute = date.getMinutes();
|
|
|
- minute = minute < 10 ? ('0' + minute) : minute;
|
|
|
- return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
|
|
|
+ formatDateTime (date) {
|
|
|
+ var y = date.getFullYear()
|
|
|
+ var m = date.getMonth() + 1
|
|
|
+ m = m < 10 ? ('0' + m) : m
|
|
|
+ var d = date.getDate()
|
|
|
+ d = d < 10 ? ('0' + d) : d
|
|
|
+ var h = date.getHours()
|
|
|
+ var minute = date.getMinutes()
|
|
|
+ minute = minute < 10 ? ('0' + minute) : minute
|
|
|
+ return y + '-' + m + '-' + d + ' ' + h + ':' + minute
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|