|
|
@@ -174,7 +174,7 @@
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="企业资质" :disabled="!certId">
|
|
|
<business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId+''" :SupplierId="serviceId"
|
|
|
- :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>
|
|
|
|
|
|
@@ -196,6 +196,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>
|
|
|
|
|
|
@@ -223,12 +246,12 @@
|
|
|
WfHistory,
|
|
|
SupplierCertEdit,
|
|
|
|
|
|
- EquipmentList, //企业主要装备情况
|
|
|
- PerformanceList, //近三年主要工程业绩列表
|
|
|
- PatentList, //拥有专利、专有技术及工法列表
|
|
|
- WinningList, //近三年获得省部级及以上主要技术、管理成果、获奖项目列表
|
|
|
- BusinessList, //选择准入范围
|
|
|
- GoodsInfo,
|
|
|
+ EquipmentList, // 企业主要装备情况
|
|
|
+ PerformanceList, // 近三年主要工程业绩列表
|
|
|
+ PatentList, // 拥有专利、专有技术及工法列表
|
|
|
+ WinningList, // 近三年获得省部级及以上主要技术、管理成果、获奖项目列表
|
|
|
+ BusinessList, // 选择准入范围
|
|
|
+ GoodsInfo
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters({
|
|
|
@@ -237,19 +260,22 @@
|
|
|
},
|
|
|
name: 'goodsEdit',
|
|
|
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
+ dialogVisible: false,
|
|
|
canUpdateSupplier: true,
|
|
|
dictData: null,
|
|
|
applyLoading: false,
|
|
|
- equipmentList: [], //企业主要装备情况
|
|
|
- performanceList: [], //近三年主要工程业绩
|
|
|
- patentList: [], //拥有专利、专有技术及工法
|
|
|
- winningList: [], //近三年获得省部级及以上主要技术、管理成果、获奖项目
|
|
|
- businessList: [], //准入业务
|
|
|
+ equipmentList: [], // 企业主要装备情况
|
|
|
+ performanceList: [], // 近三年主要工程业绩
|
|
|
+ patentList: [], // 拥有专利、专有技术及工法
|
|
|
+ winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
|
|
|
+ businessList: [], // 准入业务
|
|
|
+ organizeOption: [], // 审批部门
|
|
|
serviceId: '',
|
|
|
certId: '',
|
|
|
classId: '01',
|
|
|
+ FirstAudit: '',
|
|
|
formData: {
|
|
|
Id: '',
|
|
|
SupplierName: '',
|
|
|
@@ -329,7 +355,7 @@
|
|
|
SupplierTypeCode: '01',
|
|
|
SupplierTypeName: '物资类',
|
|
|
Step: 0,
|
|
|
- HseTraining: 0,
|
|
|
+ HseTraining: 0
|
|
|
},
|
|
|
|
|
|
formDataCert: {
|
|
|
@@ -343,15 +369,14 @@
|
|
|
NationalCertTotal: 0,
|
|
|
DesignerTotal: 0,
|
|
|
SkillerTotal: 0,
|
|
|
- Status: 0,
|
|
|
- WorkflowId: ''
|
|
|
+ Status: 0
|
|
|
},
|
|
|
add_flat: true,
|
|
|
entrydetail: {
|
|
|
process: 'oil_supplier_apply',
|
|
|
business: '',
|
|
|
instance: ''
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
@@ -360,7 +385,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 + ''
|
|
|
@@ -374,7 +399,7 @@
|
|
|
this.initDatas()
|
|
|
},
|
|
|
methods: {
|
|
|
- inputCompany(val) {
|
|
|
+ inputCompany (val) {
|
|
|
if (!this.certId) {
|
|
|
api.getEntityByName(val, this.$axios).then(res => {
|
|
|
if (res.data && res.data.Id) {
|
|
|
@@ -385,12 +410,12 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- changeFormData(fdata) {
|
|
|
+ changeFormData (fdata) {
|
|
|
if (!this.certId) {
|
|
|
this.SetFormData(fdata)
|
|
|
}
|
|
|
},
|
|
|
- SetFormData(fdata) {
|
|
|
+ SetFormData (fdata) {
|
|
|
this.isCanUpdateSupplier(fdata.Id)
|
|
|
this.formData.Id = fdata.Id
|
|
|
this.formData.SupplierName = fdata.SupplierName
|
|
|
@@ -438,41 +463,41 @@
|
|
|
this.formData.HseTraining = fdata.HseTraining
|
|
|
this.formData.SpecTypeCode = fdata.SpecTypeCode
|
|
|
|
|
|
- this.$refs["GoodsInfo"].CityAry = []
|
|
|
- this.$refs["GoodsInfo"].CityAry.push(this.formData.Province)
|
|
|
- this.$refs["GoodsInfo"].CityAry.push(this.formData.City)
|
|
|
- this.$refs["GoodsInfo"].CityAry.push(this.formData.Street)
|
|
|
- this.$refs["GoodsInfo"].LinkCityAry = []
|
|
|
- this.$refs["GoodsInfo"].LinkCityAry.push(this.formData.LinkProvince)
|
|
|
- this.$refs["GoodsInfo"].LinkCityAry.push(this.formData.LinkCity)
|
|
|
- this.$refs["GoodsInfo"].LinkCityAry.push(this.formData.LinkStreet)
|
|
|
- this.$refs["GoodsInfo"].UnitRelationAry = []
|
|
|
+ this.$refs['GoodsInfo'].CityAry = []
|
|
|
+ this.$refs['GoodsInfo'].CityAry.push(this.formData.Province)
|
|
|
+ this.$refs['GoodsInfo'].CityAry.push(this.formData.City)
|
|
|
+ this.$refs['GoodsInfo'].CityAry.push(this.formData.Street)
|
|
|
+ this.$refs['GoodsInfo'].LinkCityAry = []
|
|
|
+ this.$refs['GoodsInfo'].LinkCityAry.push(this.formData.LinkProvince)
|
|
|
+ this.$refs['GoodsInfo'].LinkCityAry.push(this.formData.LinkCity)
|
|
|
+ this.$refs['GoodsInfo'].LinkCityAry.push(this.formData.LinkStreet)
|
|
|
+ this.$refs['GoodsInfo'].UnitRelationAry = []
|
|
|
if (this.formData.SpecTypeCode.length > 0) {
|
|
|
- this.$refs["GoodsInfo"].UnitRelationAry = this.formData.SpecTypeCode.split(',')
|
|
|
+ this.$refs['GoodsInfo'].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 => {
|
|
|
@@ -489,54 +514,55 @@
|
|
|
this.formDataCert.SkillerTotal = this.formData.SkillerTotal
|
|
|
this.formDataCert.Status = this.formData.Status
|
|
|
this.formDataCert.WorkflowId = this.formData.WorkflowId
|
|
|
- this.$refs["GoodsInfo"].CityAry = []
|
|
|
- this.$refs["GoodsInfo"].CityAry.push(this.formData.Province)
|
|
|
- this.$refs["GoodsInfo"].CityAry.push(this.formData.City)
|
|
|
- this.$refs["GoodsInfo"].CityAry.push(this.formData.Street)
|
|
|
- this.$refs["GoodsInfo"].LinkCityAry = []
|
|
|
- this.$refs["GoodsInfo"].LinkCityAry.push(this.formData.LinkProvince)
|
|
|
- this.$refs["GoodsInfo"].LinkCityAry.push(this.formData.LinkCity)
|
|
|
- this.$refs["GoodsInfo"].LinkCityAry.push(this.formData.LinkStreet)
|
|
|
- this.$refs["GoodsInfo"].UnitRelationAry = []
|
|
|
+ this.$refs['GoodsInfo'].CityAry = []
|
|
|
+ this.$refs['GoodsInfo'].CityAry.push(this.formData.Province)
|
|
|
+ this.$refs['GoodsInfo'].CityAry.push(this.formData.City)
|
|
|
+ this.$refs['GoodsInfo'].CityAry.push(this.formData.Street)
|
|
|
+ this.$refs['GoodsInfo'].LinkCityAry = []
|
|
|
+ this.$refs['GoodsInfo'].LinkCityAry.push(this.formData.LinkProvince)
|
|
|
+ this.$refs['GoodsInfo'].LinkCityAry.push(this.formData.LinkCity)
|
|
|
+ this.$refs['GoodsInfo'].LinkCityAry.push(this.formData.LinkStreet)
|
|
|
+ this.$refs['GoodsInfo'].UnitRelationAry = []
|
|
|
if (this.formData.SpecTypeCode.length > 0) {
|
|
|
- this.$refs["GoodsInfo"].UnitRelationAry = this.formData.SpecTypeCode.split(',')
|
|
|
+ this.$refs['GoodsInfo'].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['GoodsInfo'].$refs['EntityForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (!this.formData.SetupTime) {
|
|
|
@@ -544,71 +570,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 = '01'
|
|
|
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',
|
|
|
@@ -625,54 +648,56 @@
|
|
|
}
|
|
|
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)
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- jstimehandle(val) {
|
|
|
+ jstimehandle (val) {
|
|
|
if (val === '') {
|
|
|
return '----'
|
|
|
} else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
@@ -685,20 +710,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">
|