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-content" style="padding: 20px">
<el-form ref="form" :model="form" :rules="rules" label-width="200px">
<el-row>
<el-row :gutter="24">
<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
:options="treeData"
:normalizer="normalizer"
@ -17,25 +59,28 @@
/>
</el-form-item>
</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-form-item label="开户人" prop="CREATOR">
<el-input id="CREATOR" ref="CREATOR" v-model="CREATOR_NAME" maxlength="50" placeholder="开户人" title="开户人" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<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-row :gutter="24">
<el-col :span="12">
<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"/>
@ -49,16 +94,21 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-row :gutter="24">
<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-option v-for="item in corpTypeList" :key="item.BIANMA" :label="item.NAME" :value="item.BIANMA"/>
</el-select>
</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-row :gutter="24">
<el-col :span="12">
<el-form-item label="经度" prop="LONGITUDE">
<el-input v-model="form.LONGITUDE" placeholder="请输入内容" disabled @focus="handleMap" />
@ -77,7 +127,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="企事业单位经营地址" prop="BUSINESS_ADDRESS">
<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-col>
</el-row>
<el-row :gutter="20">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="联系人" prop="CONTACT_PERSON">
<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-col>
</el-row>
<el-row :gutter="20">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="用工形式" prop="EMPLOYMENT_FORM">
<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-select>
<!-- <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-select>-->
<Treeselect
:options="employmentTypeList"
:normalizer="normalizer"
v-model="form.EMPLOYMENT_FORM"
placeholder="请选择用工形式"
no-options-text="暂无数据"
no-children-text="暂无数据"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="选取形式" prop="SELECT_FORM">
<el-select v-model="form.SELECT_FORM" style="width: 100%;">
<el-form-item label="选取形式" prop="SELECT_FORMS">
<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-select>
</el-form-item>
</el-col>
</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-form-item>
</el-form-item>-->
</el-form>
<div style="text-align: center">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"></el-button>
@ -252,6 +310,14 @@ export default {
children: 'nodes',
label: 'name'
},
normalizergfjg(node) {
return {
id: node.id,
label: node.name,
children: node.nodes,
isDisabled: node.pId === '0'
}
},
areaProps: {
lazy: true,
lazyLoad: async(node, resolve) => {
@ -277,9 +343,14 @@ export default {
checkStrictly: true
},
CREATOR_NAME: JSON.parse(sessionStorage.getItem('user')).NAME,
treeDataSupervise: [],
form: {
CREATOR: 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: '',
RELEVANT_UNIT_NAME: '',
SOCIAL_CODE: '',
@ -291,8 +362,10 @@ export default {
LEGAL_PERSON: '',
CONTACT_PERSON: '',
CONTACT_TEL: '',
EMPLOYMENT_FORM: '',
EMPLOYMENT_FORM: null,
CORP_TYPE: '',
SELECT_FORM: '',
SELECT_FORMS: [],
FLOATING_PERCENT: '',
COMPANY_AREA: '',
POSSESSION: [],
@ -312,6 +385,7 @@ export default {
corpTypeList: [], //
rules: {
MAIN_DEPARTMENT: [{ required: true, message: '请选择主管部门', trigger: 'blur' }],
CORP_TYPE: [{ required: true, message: '请选择集团单位', trigger: 'blur' }],
RELEVANT_UNIT_NAME: [
{ required: true, message: '相关方单位名称不能为空', trigger: 'blur' },
{ validator: hasName, trigger: 'blur' }
@ -340,7 +414,6 @@ export default {
}
],
EMPLOYMENT_FORM: [{ required: false, message: '用工形式不能为空', trigger: 'blur' }],
SELECT_FORM: [{ required: false, message: '选取形式不能为空', trigger: 'blur' }],
POSSESSION: [{ required: false, message: '属地不能为空', trigger: 'blur' }],
FLOATING_PERCENT: [
{ required: false, message: '流动人员比例不能为空', trigger: 'blur' },
@ -353,17 +426,18 @@ export default {
}
}
},
created() {
// this.listLoading = false
// this.getList()
this.getData()
this.getDict()
this.getTreeList()
async created() {
await this.getDict()
await this.getTreeList()
await this.getData()
},
mounted() {
// this.getNextTickData()
},
methods: {
selectValue(value, node, extra) {
this.form.SUPERVISE_CORPINFO_ID = value.CORPINFO_ID
},
async getAreaDict(DICTIONARIES_ID) {
const { list } = await requestFN(
'/xgf/dictionaries/getAreaLevels',
@ -399,13 +473,26 @@ export default {
getData() {
return new Promise((resolve) => {
requestFN(
'/xgf/corp/getCorpInfoDetail',
'/relevantunits/getCorpInfoDetail',
{
CORPINFO_ID: this.$parent.CORPINFO_ID,
tm: new Date().getTime()
}
).then((data) => {
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 = []
if (data.pd.PROVINCE != '') this.form.POSSESSION.push(data.pd.PROVINCE)
if (data.pd.CITY != '') this.form.POSSESSION.push(data.pd.CITY)
@ -433,13 +520,16 @@ export default {
this.LONGITUDE = this.form.LONGITUDE
},
getTreeList() {
return new Promise((resolve, reject) => {
requestFN(
'/department/listTree/',
'/department/listTreeManageAndCorp1/',
{}
).then((data) => {
this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
})
resolve()
})
},
filterNode(value, data) {
if (!value) return true
@ -459,6 +549,14 @@ export default {
// this.form.STREET = this.form.POSSESSION[4] || ''
// 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) {
this.form.CORP_TYPE = this.form.INDUSTRYALL[0] || ''
this.form.CORP_TYPE2 = this.form.INDUSTRYALL[1] || ''
@ -498,14 +596,24 @@ export default {
this.$parent.activeName = 'CorpInfoList'
},
//
getDict: function() {
getDict() {
return new Promise((resolve, reject) => {
requestFN(
'/xgf/dictionaries/getLevels',
'/corpinfo/listTreeManageAndCorpHasOrder',
{}
).then((data) => {
const treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
this.treeDataSupervise = this.removeEmptyChildren(treeData)
}).catch((e) => {
})
requestFN(
'/xgf/dictionaries/listSelectTree',
{
DICTIONARIES_ID: '720992d898bf4fd7b44bf0ba1f1bbb88'
}
).then((data) => {
this.employmentTypeList = data.list
const employmentTypeList = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
this.employmentTypeList = this.removeEmptyChildren(employmentTypeList)
})
requestFN(
'/xgf/dictionaries/getLevels',
@ -531,6 +639,8 @@ export default {
).then((data) => {
this.corpTypeList = data.list
})
resolve()
})
},
//
mapOpen() {

View File

@ -96,9 +96,11 @@
<el-table-column prop="COMPETENT_DEPT_NAME" label="基层单位监管部门" show-overflow-tooltip/>
<el-table-column prop="CREATOR_NAME" 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}">
<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="danger" icon="el-icon-delete" size="mini" @click="deleteCorpInfo(row)"></el-button>
</template>
</el-table-column>
</el-table>