bug修复

cmt1.0
liujun 2023-12-12 19:16:03 +08:00
parent fc70b9772f
commit ef3d7da288
2 changed files with 188 additions and 76 deletions

View File

@ -3,9 +3,51 @@
<div class="reform-warp"> <div class="reform-warp">
<div class="reform-content" style="padding: 20px"> <div class="reform-content" style="padding: 20px">
<el-form ref="form" :model="form" :rules="rules" label-width="200px"> <el-form ref="form" :model="form" :rules="rules" label-width="200px">
<el-row> <el-row :gutter="24">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="主管部门" prop="MAIN_DEPARTMENT"> <el-form-item label="相关方单位名称" prop="RELEVANT_UNIT_NAME">
<el-input id="RELEVANT_UNIT_NAME" ref="RELEVANT_UNIT_NAME" v-model="form.RELEVANT_UNIT_NAME" maxlength="255" placeholder="这里输入相关方单位名称..." title="相关方单位名称"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="股份监管部门" prop="MANAGER_DEPARTMENT_ID">
<Treeselect
:options="treeData"
:normalizer="normalizergfjg"
:flat="true"
:default-expand-level="0"
:props="defaultProps"
v-model="form.MANAGER_DEPARTMENT_ID"
multiple
placeholder="请选择部门"
no-options-text="暂无数据"
no-children-text="暂无数据"
style="width: 100%;"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="基层单位监管部门" prop="COMPETENT_DEPT_ID">
<Treeselect
:options="treeDataSupervise"
:normalizer="normalizergfjg"
:flat="true"
:default-expand-level="0"
:props="defaultProps"
v-model="form.COMPETENT_DEPT_ID"
multiple
placeholder="请选择基层单位监管部门"
no-options-text="暂无数据"
no-children-text="暂无数据"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="股份主管部门" prop="MAIN_DEPARTMENT">
<Treeselect <Treeselect
:options="treeData" :options="treeData"
:normalizer="normalizer" :normalizer="normalizer"
@ -17,25 +59,28 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="基层单位主管部门" prop="SUPERVISE_DEPARTMENT_ID">
<Treeselect
:options="treeDataSupervise"
:normalizer="normalizer"
v-model="form.SUPERVISE_DEPARTMENT_ID"
placeholder="请选择基层单位主管部门"
no-options-text="暂无数据"
no-children-text="暂无数据"
@select="selectValue"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="开户人" prop="CREATOR"> <el-form-item label="开户人" prop="CREATOR">
<el-input id="CREATOR" ref="CREATOR" v-model="CREATOR_NAME" maxlength="50" placeholder="开户人" title="开户人" disabled/> <el-input id="CREATOR" ref="CREATOR" v-model="CREATOR_NAME" maxlength="50" placeholder="开户人" title="开户人" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row :gutter="24">
<el-col :span="12">
<el-form-item label="相关方单位名称" prop="RELEVANT_UNIT_NAME">
<el-input id="RELEVANT_UNIT_NAME" ref="RELEVANT_UNIT_NAME" v-model="form.RELEVANT_UNIT_NAME" maxlength="255" placeholder="这里输入相关方单位名称..." title="相关方单位名称"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="统一社会信用代码" prop="SOCIAL_CODE">
<el-input id="SOCIAL_CODE" ref="SOCIAL_CODE" v-model="form.SOCIAL_CODE" maxlength="255" placeholder="这里输入统一社会信用代码..." title="统一社会信用代码"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="属地" prop="POSSESSION"> <el-form-item label="属地" prop="POSSESSION">
<el-cascader id="POSSESSION" ref="POSSESSION" v-model="form.POSSESSION" :options="areaList" :props="areaProps" :placeholder="form.COMPANY_AREA" style="width: 100%" @change="cascaderChange"/> <el-cascader id="POSSESSION" ref="POSSESSION" v-model="form.POSSESSION" :options="areaList" :props="areaProps" :placeholder="form.COMPANY_AREA" style="width: 100%" @change="cascaderChange"/>
@ -49,16 +94,21 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="24">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="集团单位" prop="INDUSTRY"> <el-form-item label="集团单位" prop="CORP_TYPE">
<el-select v-model="form.CORP_TYPE" style="width: 100%"> <el-select v-model="form.CORP_TYPE" style="width: 100%">
<el-option v-for="item in corpTypeList" :key="item.BIANMA" :label="item.NAME" :value="item.BIANMA"/> <el-option v-for="item in corpTypeList" :key="item.BIANMA" :label="item.NAME" :value="item.BIANMA"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="统一社会信用代码" prop="SOCIAL_CODE">
<el-input id="SOCIAL_CODE" ref="SOCIAL_CODE" v-model="form.SOCIAL_CODE" maxlength="255" placeholder="这里输入统一社会信用代码..." title="统一社会信用代码"/>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="24">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="经度" prop="LONGITUDE"> <el-form-item label="经度" prop="LONGITUDE">
<el-input v-model="form.LONGITUDE" placeholder="请输入内容" disabled @focus="handleMap" /> <el-input v-model="form.LONGITUDE" placeholder="请输入内容" disabled @focus="handleMap" />
@ -77,7 +127,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="24">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="企事业单位经营地址" prop="BUSINESS_ADDRESS"> <el-form-item label="企事业单位经营地址" prop="BUSINESS_ADDRESS">
<el-input id="BUSINESS_ADDRESS" ref="BUSINESS_ADDRESS" v-model="form.BUSINESS_ADDRESS" maxlength="255" placeholder="这里输入企事业单位经营地址..." title="企事业单位经营地址"/> <el-input id="BUSINESS_ADDRESS" ref="BUSINESS_ADDRESS" v-model="form.BUSINESS_ADDRESS" maxlength="255" placeholder="这里输入企事业单位经营地址..." title="企事业单位经营地址"/>
@ -89,7 +139,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="24">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系人" prop="CONTACT_PERSON"> <el-form-item label="联系人" prop="CONTACT_PERSON">
<el-input id="CONTACT_PERSON" ref="CONTACT_PERSON" v-model="form.CONTACT_PERSON" maxlength="255" placeholder="这里输入联系人..." title="联系人"/> <el-input id="CONTACT_PERSON" ref="CONTACT_PERSON" v-model="form.CONTACT_PERSON" maxlength="255" placeholder="这里输入联系人..." title="联系人"/>
@ -101,25 +151,33 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="24">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="用工形式" prop="EMPLOYMENT_FORM"> <el-form-item label="用工形式" prop="EMPLOYMENT_FORM">
<el-select v-model="form.EMPLOYMENT_FORM" style="width: 100%;"> <!-- <el-select v-model="form.EMPLOYMENT_FORM" style="width: 100%;">-->
<el-option v-for="item in employmentTypeList" :key="item.BIANMA" :label="item.NAME" :value="item.BIANMA" /> <!-- <el-option v-for="item in employmentTypeList" :key="item.BIANMA" :label="item.NAME" :value="item.BIANMA" />-->
</el-select> <!-- </el-select>-->
<Treeselect
:options="employmentTypeList"
:normalizer="normalizer"
v-model="form.EMPLOYMENT_FORM"
placeholder="请选择用工形式"
no-options-text="暂无数据"
no-children-text="暂无数据"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="选取形式" prop="SELECT_FORM"> <el-form-item label="选取形式" prop="SELECT_FORMS">
<el-select v-model="form.SELECT_FORM" style="width: 100%;"> <el-select v-model="form.SELECT_FORMS" multiple style="width: 100%;">
<el-option v-for="item in selectFormList" :key="item.BIANMA" :label="item.NAME" :value="item.BIANMA" /> <el-option v-for="item in selectFormList" :key="item.BIANMA" :label="item.NAME" :value="item.BIANMA" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="流动人员比例(%)" prop="FLOATING_PERCENT"> <!--<el-form-item label="流动人员比例(%)" prop="FLOATING_PERCENT">
<el-input id="FLOATING_PERCENT" ref="FLOATING_PERCENT" v-model="form.FLOATING_PERCENT" maxlength="255" placeholder="这里输入流动人员比例..." title="流动人员比例"/> <el-input id="FLOATING_PERCENT" ref="FLOATING_PERCENT" v-model="form.FLOATING_PERCENT" maxlength="255" placeholder="这里输入流动人员比例..." title="流动人员比例"/>
</el-form-item> </el-form-item>-->
</el-form> </el-form>
<div style="text-align: center"> <div style="text-align: center">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"></el-button> <el-button :loading="buttonLoading" type="primary" @click="submitForm"></el-button>
@ -252,6 +310,14 @@ export default {
children: 'nodes', children: 'nodes',
label: 'name' label: 'name'
}, },
normalizergfjg(node) {
return {
id: node.id,
label: node.name,
children: node.nodes,
isDisabled: node.pId === '0'
}
},
areaProps: { areaProps: {
lazy: true, lazy: true,
lazyLoad: async(node, resolve) => { lazyLoad: async(node, resolve) => {
@ -277,9 +343,14 @@ export default {
checkStrictly: true checkStrictly: true
}, },
CREATOR_NAME: JSON.parse(sessionStorage.getItem('user')).NAME, CREATOR_NAME: JSON.parse(sessionStorage.getItem('user')).NAME,
treeDataSupervise: [],
form: { form: {
CREATOR: JSON.parse(sessionStorage.getItem('user')).USER_ID, CREATOR: JSON.parse(sessionStorage.getItem('user')).USER_ID,
OPERATOR: JSON.parse(sessionStorage.getItem('user')).USER_ID, OPERATOR: JSON.parse(sessionStorage.getItem('user')).USER_ID,
SUPERVISE_DEPARTMENT_ID: null,
COMPETENT_DEPT_ID: null,
MANAGER_DEPARTMENT_ID: null,
SUPERVISE_CORPINFO_ID: '',
MAIN_DEPARTMENT: '', MAIN_DEPARTMENT: '',
RELEVANT_UNIT_NAME: '', RELEVANT_UNIT_NAME: '',
SOCIAL_CODE: '', SOCIAL_CODE: '',
@ -291,8 +362,10 @@ export default {
LEGAL_PERSON: '', LEGAL_PERSON: '',
CONTACT_PERSON: '', CONTACT_PERSON: '',
CONTACT_TEL: '', CONTACT_TEL: '',
EMPLOYMENT_FORM: '', EMPLOYMENT_FORM: null,
CORP_TYPE: '',
SELECT_FORM: '', SELECT_FORM: '',
SELECT_FORMS: [],
FLOATING_PERCENT: '', FLOATING_PERCENT: '',
COMPANY_AREA: '', COMPANY_AREA: '',
POSSESSION: [], POSSESSION: [],
@ -312,6 +385,7 @@ export default {
corpTypeList: [], // corpTypeList: [], //
rules: { rules: {
MAIN_DEPARTMENT: [{ required: true, message: '请选择主管部门', trigger: 'blur' }], MAIN_DEPARTMENT: [{ required: true, message: '请选择主管部门', trigger: 'blur' }],
CORP_TYPE: [{ required: true, message: '请选择集团单位', trigger: 'blur' }],
RELEVANT_UNIT_NAME: [ RELEVANT_UNIT_NAME: [
{ required: true, message: '相关方单位名称不能为空', trigger: 'blur' }, { required: true, message: '相关方单位名称不能为空', trigger: 'blur' },
{ validator: hasName, trigger: 'blur' } { validator: hasName, trigger: 'blur' }
@ -340,7 +414,6 @@ export default {
} }
], ],
EMPLOYMENT_FORM: [{ required: false, message: '用工形式不能为空', trigger: 'blur' }], EMPLOYMENT_FORM: [{ required: false, message: '用工形式不能为空', trigger: 'blur' }],
SELECT_FORM: [{ required: false, message: '选取形式不能为空', trigger: 'blur' }],
POSSESSION: [{ required: false, message: '属地不能为空', trigger: 'blur' }], POSSESSION: [{ required: false, message: '属地不能为空', trigger: 'blur' }],
FLOATING_PERCENT: [ FLOATING_PERCENT: [
{ required: false, message: '流动人员比例不能为空', trigger: 'blur' }, { required: false, message: '流动人员比例不能为空', trigger: 'blur' },
@ -353,17 +426,18 @@ export default {
} }
} }
}, },
created() { async created() {
// this.listLoading = false await this.getDict()
// this.getList() await this.getTreeList()
this.getData() await this.getData()
this.getDict()
this.getTreeList()
}, },
mounted() { mounted() {
// this.getNextTickData() // this.getNextTickData()
}, },
methods: { methods: {
selectValue(value, node, extra) {
this.form.SUPERVISE_CORPINFO_ID = value.CORPINFO_ID
},
async getAreaDict(DICTIONARIES_ID) { async getAreaDict(DICTIONARIES_ID) {
const { list } = await requestFN( const { list } = await requestFN(
'/xgf/dictionaries/getAreaLevels', '/xgf/dictionaries/getAreaLevels',
@ -399,13 +473,26 @@ export default {
getData() { getData() {
return new Promise((resolve) => { return new Promise((resolve) => {
requestFN( requestFN(
'/xgf/corp/getCorpInfoDetail', '/relevantunits/getCorpInfoDetail',
{ {
CORPINFO_ID: this.$parent.CORPINFO_ID, CORPINFO_ID: this.$parent.CORPINFO_ID,
tm: new Date().getTime() tm: new Date().getTime()
} }
).then((data) => { ).then((data) => {
this.form = Object.assign(this.form, data.pd) this.form = Object.assign(this.form, data.pd)
var sz = this.form.SELECT_FORM
var cdi = this.form.COMPETENT_DEPT_ID
var mdi = this.form.MANAGER_DEPARTMENT_ID
this.form.SELECT_FORMS = sz.split(',')
if (cdi) {
this.form.COMPETENT_DEPT_ID = cdi.split(',')
}
if (mdi) {
this.form.MANAGER_DEPARTMENT_ID = mdi.split(',')
}
if (!this.form.EMPLOYMENT_FORM) this.form.EMPLOYMENT_FORM = null
if (!this.form.SUPERVISE_DEPARTMENT_ID) this.form.SUPERVISE_DEPARTMENT_ID = null
this.form.POSSESSION = [] this.form.POSSESSION = []
if (data.pd.PROVINCE != '') this.form.POSSESSION.push(data.pd.PROVINCE) if (data.pd.PROVINCE != '') this.form.POSSESSION.push(data.pd.PROVINCE)
if (data.pd.CITY != '') this.form.POSSESSION.push(data.pd.CITY) if (data.pd.CITY != '') this.form.POSSESSION.push(data.pd.CITY)
@ -433,12 +520,15 @@ export default {
this.LONGITUDE = this.form.LONGITUDE this.LONGITUDE = this.form.LONGITUDE
}, },
getTreeList() { getTreeList() {
requestFN( return new Promise((resolve, reject) => {
'/department/listTree/', requestFN(
{} '/department/listTreeManageAndCorp1/',
).then((data) => { {}
this.treeData = JSON.parse(data.zTreeNodes) ).then((data) => {
}).catch((e) => { this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
})
resolve()
}) })
}, },
filterNode(value, data) { filterNode(value, data) {
@ -459,6 +549,14 @@ export default {
// this.form.STREET = this.form.POSSESSION[4] || '' // this.form.STREET = this.form.POSSESSION[4] || ''
// this.form.COMPANY_AREA = this.$refs.POSSESSION.getCheckedNodes()[0].pathLabels ? this.$refs.POSSESSION.getCheckedNodes()[0].pathLabels.join(',') : '' // this.form.COMPANY_AREA = this.$refs.POSSESSION.getCheckedNodes()[0].pathLabels ? this.$refs.POSSESSION.getCheckedNodes()[0].pathLabels.join(',') : ''
} }
// 2023-08-31
this.form.SELECT_FORM = this.form.SELECT_FORMS.join(',')
if (this.form.COMPETENT_DEPT_ID) {
this.form.COMPETENT_DEPT_ID = this.form.COMPETENT_DEPT_ID.join(',')
}
if (this.form.MANAGER_DEPARTMENT_ID) {
this.form.MANAGER_DEPARTMENT_ID = this.form.MANAGER_DEPARTMENT_ID.join(',')
}
/* if (this.form.INDUSTRYALL && this.form.INDUSTRYALL.length > 0) { /* if (this.form.INDUSTRYALL && this.form.INDUSTRYALL.length > 0) {
this.form.CORP_TYPE = this.form.INDUSTRYALL[0] || '' this.form.CORP_TYPE = this.form.INDUSTRYALL[0] || ''
this.form.CORP_TYPE2 = this.form.INDUSTRYALL[1] || '' this.form.CORP_TYPE2 = this.form.INDUSTRYALL[1] || ''
@ -498,38 +596,50 @@ export default {
this.$parent.activeName = 'CorpInfoList' this.$parent.activeName = 'CorpInfoList'
}, },
// //
getDict: function() { getDict() {
requestFN( return new Promise((resolve, reject) => {
'/xgf/dictionaries/getLevels', requestFN(
{ '/corpinfo/listTreeManageAndCorpHasOrder',
DICTIONARIES_ID: '720992d898bf4fd7b44bf0ba1f1bbb88' {}
} ).then((data) => {
).then((data) => { const treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
this.employmentTypeList = data.list this.treeDataSupervise = this.removeEmptyChildren(treeData)
}) }).catch((e) => {
requestFN( })
'/xgf/dictionaries/getLevels', requestFN(
{ '/xgf/dictionaries/listSelectTree',
DICTIONARIES_ID: '9ce2e9a4636b4d41b460ce16c346d497' {
} DICTIONARIES_ID: '720992d898bf4fd7b44bf0ba1f1bbb88'
).then((data) => { }
this.selectFormList = data.list ).then((data) => {
}) const employmentTypeList = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
requestFN( this.employmentTypeList = this.removeEmptyChildren(employmentTypeList)
'/xgf/dictionaries/getLevels', })
{ requestFN(
DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9' '/xgf/dictionaries/getLevels',
} {
).then((data) => { DICTIONARIES_ID: '9ce2e9a4636b4d41b460ce16c346d497'
this.industryList = data.list }
}) ).then((data) => {
requestFN( this.selectFormList = data.list
'/xgf/dictionaries/getLevels', })
{ requestFN(
DICTIONARIES_ID: '37d8385931f14bb0b962082cf6bb3395' '/xgf/dictionaries/getLevels',
} {
).then((data) => { DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9'
this.corpTypeList = data.list }
).then((data) => {
this.industryList = data.list
})
requestFN(
'/xgf/dictionaries/getLevels',
{
DICTIONARIES_ID: '37d8385931f14bb0b962082cf6bb3395'
}
).then((data) => {
this.corpTypeList = data.list
})
resolve()
}) })
}, },
// //

View File

@ -96,9 +96,11 @@
<el-table-column prop="COMPETENT_DEPT_NAME" label="基层单位监管部门" show-overflow-tooltip/> <el-table-column prop="COMPETENT_DEPT_NAME" label="基层单位监管部门" show-overflow-tooltip/>
<el-table-column prop="CREATOR_NAME" label="开户人员" /> <el-table-column prop="CREATOR_NAME" label="开户人员" />
<el-table-column :formatter="(row) => formatStateLabel(row)" prop="STATE" label="状态" /> <el-table-column :formatter="(row) => formatStateLabel(row)" prop="STATE" label="状态" />
<el-table-column label="操作" align="center" width="120"> <el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button type="warning" icon="el-icon-refresh" size="mini" @click="resetPassword(row)"></el-button> <el-button type="warning" icon="el-icon-refresh" size="mini" @click="resetPassword(row)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="deleteCorpInfo(row)"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>