master
xhj 8 months ago
parent f709fdd96c
commit 990ab840f9

@ -39,3 +39,31 @@ export function getBzryList(data) {
data, data,
}); });
} }
export function getBzryUpdate(data) {
return request({
url: "/dmBzry/getBzryUpdate",
method: "post",
data,
});
}
export function getBzryDel(data) {
return request({
url: "/dmBzry/getBzryDel",
method: "post",
data,
});
}
export function getBzryInsert(data) {
return request({
url: "/dmBzry/getBzryInsert",
method: "post",
data,
});
}
export function getryBase(data) {
return request({
url: "/dmBzry/getryBase",
method: "post",
data,
});
}

@ -403,10 +403,10 @@ export default {
}, },
initList() { initList() {
if (this.queryParam.dcch === '') { // if (this.queryParam.dcch === '') {
this.$message.warning('选择船只编号') // this.$message.warning('')
return // return
} // }
getDhPgd(this.queryParam).then((res) => { getDhPgd(this.queryParam).then((res) => {
this.list = res.data this.list = res.data
if (this.$refs.xGrid) { if (this.$refs.xGrid) {

@ -91,20 +91,31 @@
<span style="width:6%" >班组:</span> <span style="width:6%" >班组:</span>
<el-select v-model="inParam.scdw" placeholder="班组" clearable style="width: 15%" @change="bzClick"> <el-select v-model="inParam.scdw" placeholder="班组" clearable style="width: 15%" @change="bzClick">
<el-option <el-option
v-for="item in this.dictData.bmbm" v-for="item in this.dictData.resourcesCodes"
:key="item.bm" :key="item.resourcesCode"
:label="item.bmsm" :label="item.resourcesCode"
:value="item.bm" :value="item.resourcesCode"
> >
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="inParam.scry" placeholder="人员" clearable style="width: 15%" > <span style="width:6%" >作业区:</span>
<el-select v-model="inParam.zyq" placeholder="作业区" clearable style="width: 15%" @change="bzClick1">
<el-option <el-option
v-for="item in this.dictData.gxry" v-for="item in this.dictData.zyqs"
:key="item.dlzh" :key="item.resourcesCode+item.zyq"
:label="item.dlzh" :label="item.resourcesCode+item.zyq"
:value="item.dlzh" :value="item.zyq"
>
</el-option>
</el-select>
<el-select v-model="inParam.scry" placeholder="人员" clearable style="width: 15%" filterable >
<el-option
v-for="item in this.dictData.zyrys"
:key="item.id"
:label="item.resourcesCode+item.zyq+item.userName"
:value="item.userName"
> >
</el-option> </el-option>
</el-select> </el-select>
@ -190,6 +201,8 @@ export default {
zt:'21', zt:'21',
qgkw:'' qgkw:''
}, },
zyqs:[],
zyrys:[],
statusOptions: [ statusOptions: [
{ {
value: "21", value: "21",
@ -389,7 +402,13 @@ export default {
bzClick(){ bzClick(){
console.log(this.dictData.gxry) console.log(this.dictData.gxry)
console.log(this.inParam.scdw) console.log(this.inParam.scdw)
this.dictData.gxry= this.dictData.gxry.filter(fst=>fst.szcs===this.inParam.scdw) this.dictData.zyqs= this.zyqs.filter(fst=>fst.resourcesCode===this.inParam.scdw)
console.log(this.dictData.zyqs)
},
bzClick1(){
console.log(this.dictData.zyrys)
console.log(this.zyrys)
this.dictData.zyrys= this.zyrys.filter(fst=>fst.resourcesCode+fst.zyq===this.inParam.scdw+this.inParam.zyq)
console.log(this.dictData.gxry) console.log(this.dictData.gxry)
}, },
updates2(){ updates2(){
@ -443,6 +462,8 @@ export default {
initBase(){ initBase(){
getPgdBase({}).then(res=>{ getPgdBase({}).then(res=>{
console.log(res.data) console.log(res.data)
this.zyqs=res.data.zyqs
this.zyrys=res.data.zyrys
this.dictData = res.data this.dictData = res.data
this.projectData=res.data.cbbm this.projectData=res.data.cbbm
this.projectData1=res.data.cbbm this.projectData1=res.data.cbbm

@ -231,7 +231,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<el-date-picker v-model="inParam.jhrq" value-format="yyyy/MM/dd" type="date" placeholder="计划日期"/> <!-- <el-date-picker v-model="inParam.jhrq" value-format="yyyy/MM/dd" type="date" placeholder="计划日期"/>-->
<el-input v-model="inParam.bz" type="search" placeholder="备注" ></el-input> <el-input v-model="inParam.bz" type="search" placeholder="备注" ></el-input>
<el-button type="info" @click="updates2()" >批量</el-button> <el-button type="info" @click="updates2()" >批量</el-button>
<el-button type="success" @click="hdClick()"></el-button> <el-button type="success" @click="hdClick()"></el-button>

@ -399,10 +399,10 @@ export default {
}, },
initList() { initList() {
if (this.queryParam.dcch === '') { // if (this.queryParam.dcch === '') {
this.$message.warning('选择船只编号') // this.$message.warning('')
return // return
} // }
getTzjhPgd(this.queryParam).then((res) => { getTzjhPgd(this.queryParam).then((res) => {
this.list = res.data this.list = res.data
if (this.$refs.xGrid) { if (this.$refs.xGrid) {

@ -659,6 +659,8 @@ export default {
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
}, },
{ field: 'bclq.dcChZ', title: '船号', width: 100, { field: 'bclq.dcChZ', title: '船号', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
@ -809,7 +811,10 @@ export default {
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
}, },
{ field: 'tjb.hxfl', title: '类型', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'tjb.dcZl', title: '组立', width: 100,formatter: ['dictFormat','ZLLB'], { field: 'tjb.dcZl', title: '组立', width: 100,formatter: ['dictFormat','ZLLB'],

@ -1,448 +1,445 @@
<template> <template>
<el-container style="height: 100%;position: absolute;width: 100%;"> <!-- <el-dialog title="收货地址" :visible.sync="dialogFormVisible">-->
<el-col :span="16" style="height:100%;"> <el-container>
<div style="color:#909399;font-size: 12px;height: 9%"> <el-header style="width: 100%; height: 80px;font-size: 12px">
班组名称
<el-input v-model="query.resourcesName" placeholder="班组名称" style="width: 100px" clearable /> <el-form :inline="true" label-width="65px" label-position="left">
班组分类 <el-row>
<el-select v-model="query.classification" clearable placeholder="班组分类" style="width: 100px">
<el-option <el-col :span="22">
v-for="item in dm_depart" <el-form-item label="班组:">
:key="item.depart_code" <!-- <el-input v-model="request.resourcesCode" type="search" placeholder="班组" ></el-input>-->
:label="item.depart_name" <el-select v-model="request.resourcesCode" placeholder="班组" clearable >
:value="item.depart_code" <el-option
/> v-for="item in this.dictData.resourcesCodes"
</el-select> :key="item.resourcesCode"
班组状态 :label="item.resourcesCode"
<el-select v-model="query.flagStatus" clearable placeholder="班组状态" style="width: 100px"> :value="item.resourcesCode"
<el-option >
v-for="item in dm_depart" </el-option>
:key="item.depart_code" </el-select>
:label="item.depart_name" </el-form-item>
:value="item.depart_code" <el-form-item label="作业区:">
/> <!-- <el-input v-model="request.zyq" type="search" placeholder="作业区" ></el-input>-->
</el-select> <el-select v-model="request.zyq" placeholder="作业区" clearable >
<el-option
<div style="float: right;"> v-for="item in this.dictData.zyqs"
<el-button style="margin: 1px;" type="primary" icon="el-icon-search">查询</el-button> :key="item.zyq"
<el-button style="margin: 1px" type="success" @click="handleAddYhxx"></el-button> :label="item.zyq"
<el-button style="margin: 1px" type="warning" @click="handleUpdateYhxx"></el-button> :value="item.zyq"
<el-button style="margin: 1px" type="danger" @click="handleDeleteYhxx"></el-button> >
</div> </el-option>
</div> </el-select>
<el-table </el-form-item>
ref="bzxxTable" <el-form-item label="名称:">
:show-overflow-tooltip="true" <el-input v-model="request.userName" type="search" placeholder="名称" ></el-input>
:data="c_yhxxTableData.slice((currentPage-1)*pageSize,currentPage*pageSize)" </el-form-item>
height="calc(100% - 80px - 35px)"
:header-cell-style="{ textAlign: 'center' }" </el-col>
:cell-style="{ textAlign: 'center' }" <el-col :span="2">
width="100%" <el-form-item style="float: right" >
:border="true" <el-button type="success" @click="initList"></el-button>
highlight-current-row </el-form-item>
@current-change="handleYhxxCurrentChange" </el-col>
@header-click="showFilter" </el-row>
>
<!-- <el-table-column label="" property="checked" min-width="40">-->
<!-- <template slot-scope="scope">-->
<!-- <el-checkbox v-model="scope.row.checked" />-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="序号" type="index" />
<el-table-column label="班组编码" property="resourcesCode" />
<el-table-column label="班组名称" property="resourcesName" />
<el-table-column label="所属跨位" width="100px">
<template slot-scope="scope">
{{ getKwName(scope.row.kw) }}
</template>
</el-table-column>
<el-table-column label="状态" property="flagStatus" />
<el-table-column label="操作" fixed="right">
<template #default="{row}">
<el-button @click="(event)=>bzPersonAdd(event,row)" type="text" style="text-align: center;color: blue">编辑</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="currentPage"
:page-sizes="[20, 50, 100, 10000]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="c_yhxxTableData.length"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
<el-dialog class="YhxxDialog" :title="dialogTitle" :visible.sync="dialogVisible" width="450px" center="">
<el-row> <el-row>
<el-row> <el-col :span="14">
<span style="width: 110px;display:inline-block;">班组编码</span> <el-select v-model="inParam.zt" placeholder="状态" clearable >
<el-input v-model="updateData.resourcesCode" placeholder="" style="width: 250px;" :disabled="inputDisabled"/>
</el-row>
<el-row>
<span style="width: 110px;display:inline-block;">班组名称</span>
<el-input v-model="updateData.resourcesName" placeholder="" style="width: 250px;" />
</el-row>
<el-row>
<span style="width: 110px;display:inline-block;">是否资源</span>
<el-input v-model="updateData.resource" placeholder="" style="width: 250px;" />
</el-row>
<el-row>
<span style="width: 110px;display:inline-block;">所属工厂</span>
<el-input v-model="updateData.factoryName" placeholder="" style="width: 250px;" />
</el-row>
<el-row>
<span style="width: 110px;display:inline-block;">所属车间</span>
<el-input v-model="updateData.workshopName" placeholder="" style="width: 250px;" />
</el-row>
<el-row>
<span style="width: 110px;display:inline-block;">所属跨位</span>
<el-select v-model="updateData.kw" clearable placeholder="跨位" style="width: 250px;">
<el-option <el-option
v-for="item in kwList" v-for="item in this.dictData.kwxxs"
:key="item.bm" :key="item.bm"
:label="item.bmsm" :label="item.bmsm"
:value="item.bm" :value="item.bm"
/> >
</el-option>
</el-select> </el-select>
</el-row> <el-input v-model="inParam.rqfw" placeholder="日期范围" clearable style="width: 200px" />
<el-row> <el-button type="info" @click="plClick"></el-button>
<span style="width: 110px;display:inline-block;">所属产线</span> </el-col>
<el-input v-model="updateData.productionLineName" placeholder="" style="width: 250px;" /> <el-col :span="10" >
</el-row> <el-form-item style="float: right" >
<el-row>
<span style="width: 110px;display:inline-block;">组织类型</span> <el-button
<el-input v-model="updateData.resourcesType" placeholder="" style="width: 250px;" /> type="success"
</el-row> @click="toolbarButtonClickEvent('save')"
<el-row> >保存</el-button>
<span style="width: 110px;display:inline-block;">外部对照码</span> <el-button type="success" @click="toolbarButtonClickEvent('insert')"></el-button>
<el-input v-model="updateData.comparisonCode" placeholder="" style="width: 250px;" /> <el-button
</el-row> type="danger"
<el-row> @click="toolbarButtonClickEvent('delete')"
<span style="width: 110px;display:inline-block;">班组分类</span> >删除
<el-input v-model="updateData.classification" placeholder="" style="width: 250px;" /> </el-button>
</el-row> </el-form-item>
<el-row> </el-col>
<span style="width: 110px;display:inline-block;">状态</span>
<el-input v-model="updateData.flagStatus" placeholder="" style="width: 250px;" />
</el-row>
<el-row>
<el-button
v-if="dialogTitle =='添加班组信息'?true :false"
style="float: right;"
type="primary"
@click="handleAddYhxxComplated"
>添加
</el-button>
<el-button
v-if="dialogTitle =='修改班组信息'?true :false"
style="float: right;"
type="primary"
@click="handleUpdateYhxxComplated"
>修改
</el-button>
</el-row>
</el-row>
</el-dialog>
</el-col>
<el-col :span="8" style="border-left:1px solid rgb(230, 230, 230);height:100%;" >
<div style="color:#909399;font-size: 15px;height: 9%">
<div style="width: 100%;height: 50%;line-height: 200%;text-align: right;padding-right:3%" >
当前组织生效人员
</div>
<!-- <div style="float: right;">-->
<!-- <el-button style="margin: 1px;" type="primary" @click="changeTeam"></el-button>-->
<!-- </div>-->
</div>
<el-table
ref="bzryTable"
class="bzryTable"
:show-overflow-tooltip="true"
:data="bzryTableData"
height="calc(100% - 80px - 35px)"
width="100%"
:border="true"
highlight-current-row
>
<el-table-column label="" property="isselect" min-width="40">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.isselect" />
</template>
</el-table-column>
<el-table-column label="序号" type="index" />
<el-table-column label="人员编码" property="userCode" />
<el-table-column label="人员姓名" property="userName" />
<el-table-column label="是否资源" property="resource" />
<el-table-column label="班组长" property="foreman" />
<el-table-column label="所属资源组" property="resourcesCode" />
<el-table-column label="人员职务" property="position" />
<el-table-column label="人员属性" property="attribute" />
<el-table-column label="状态" property="flagStatus" />
</el-table>
</el-col>
<tbfilter ref="tbFilter" :list="c_yhxxTableData" :filter="columnFilter" @execFilter="execFilter" />
<el-dialog class="YhxxDialog" title="增加人员" :visible.sync="addPersonVisible" width="450px" center="">
<el-row>
<el-row>
<span style="width: 110px;display:inline-block;">所属班组</span>
<el-input v-model="selectedPerson.resourcesCode" style="width: 250px;display: none" />
<el-input v-model="selectedPerson.resourcesName" disabled placeholder="" style="width: 250px;" />
</el-row>
<el-row>
<span style="width: 110px;display:inline-block;">人员编码</span>
<el-input v-model="selectedPerson.userCode" placeholder="" style="width: 250px;" />
</el-row>
<el-row>
<span style="width: 110px;display:inline-block;">人员姓名</span>
<el-input v-model="selectedPerson.userName" placeholder="" style="width: 250px;" />
</el-row> </el-row>
</el-row> </el-form>
</el-dialog> </el-header>
</el-container> <el-container style="padding-top: 0px">
<el-container>
<el-main>
<div class="mytable">
<vxe-grid
id="id"
ref="xGrid"
border
resizable
keep-source
:align="'center'"
:height="height"
:auto-resize="true"
:columns="tableColumn"
highlight-current-row
:data="list"
:custom-config="{ storage: true }"
:edit-config="{ trigger: 'click', mode: 'cell', showStatus: true}"
highlight-hover-row
:scroll-y="{enabled: true}"
show-overflow
show-header-overflow
/>
</div>
</el-main>
</el-container>
</el-container>
</el-container>
</template> </template>
<script> <script>
import {
addRoleForUser,
deleteRoleForUser
} from '@/api/sy/yhgl'
import {
getList,
update,
save,
del,
getBzryList
} from '@/api/sjzx/bzzGL'
import tbfilter from '@/components/TableColumnFilter'
import {
getTpBase
} from '@/api/fd/base'
import { mapGetters } from 'vuex'
import XEUtils from 'xe-utils'
import {null2str} from "@/utils/rpkj";
import {del, getBzryDel, getBzryInsert, getBzryList, getBzryUpdate, getryBase} from "@/api/sjzx/bzzGL";
export default { export default {
name: 'Bzzzgl', name:'xqdwcjcd',
components: { tbfilter },
data() { data() {
return { return {
selectedPerson:{}, request: {
addPersonVisible:false, resourcesCode:'',
defaultHeight: { zrq:'',
height: '100%' userName:''
},inParam:{
rqfw:'',
zt:""
}, },
kwList:[], list: [],
inputDisabled:true, deptList: [],
activeGzzxxTabName: 'gzzxx', clickList: [],
dm_depart: [],
query: {resourcesCode:''}, dictData:{},
yhxxTableData: [], height: '500px',
isYhxxTableLoading: true,
bzryTableData: [], tableColumn: [
currentPage: 1, { type: 'checkbox', width: 50 ,
pageSize: 100, },
selectYhxx: {}, { type: 'seq', width: 40, title: '序号' },
dialogVisible: false, {
dialogTitle: '', field: 'userCode',
updateData: {}, title: '人员编码',editRender: { name: 'input' },
columnFilter: {}, width: 120,
loginType:[{ filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
value: 1, filterRender: { name: 'FilterCombination' }
label: '指纹登录' },
}, { {
value: 2, field: 'userName',
label: 'findTxTl' title: '人员姓名',editRender: { name: 'input' },
}, ], width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'resourcesCode',editRender: { name: 'input' },
title: '班组',
width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'zyq',
title: '作业区',editRender: { name: 'input' },
width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'position',
title: '人员职务',editRender: { name: 'input' },
width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'yzt',
title: '原状态',
width: 120, formatter: ['dictFormat','PBBM'],
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'zt',
title: '状态',
width: 120,formatter: ['dictFormat','PBBM'],
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
// editRender: {
// name: '$select', options: [],
// optionProps: {value: 'bm', label: 'bmsm'},
// props: {clearable: true}
// , events: {change: this.selectChange}
// },
{
field: 'rqfw',
title: '日期范围',editRender: { name: 'input' },
width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'xgry',
title: '修改人员',
width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'xgrq',
title: '修改日期',
width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
]
} }
}, },
computed: { computed: {
c_yhxxTableData: function() { ...mapGetters(['name', 'bmbm','apbm'])
const search = this.query
let resultList = this.yhxxTableData
if (search && search.resourcesCode) {
resultList = resultList.filter(data => {
return Object.keys(data).some(key => {
return String(data[key]).indexOf(search.resourcesCode) > -1
})
})
}
if (search && search.resourcesName) {
resultList = resultList.filter(data => {
return Object.keys(data).some(key => {
return String(data[key]).indexOf(search.resourcesName) > -1
})
})
}
if (this.$refs.tbFilter) {
return this.$refs.tbFilter.doFilter(this.columnFilter, resultList)
}
return resultList
}
}, },
created() { created() {
window.addEventListener('resize', this.getHeight) window.addEventListener('resize', this.getHeight)
this.getHeight() this.getHeight()
getList({}).then(response => { this.initBase()
this.yhxxTableData = response.data if(this.apbm==='P30000'){
this.$refs.bzxxTable.setCurrentRow(this.yhxxTableData[0]) this.request.dwbm='P30000'
getBzryList({resourcesCode:this.yhxxTableData[0].resourcesCode}).then(response => { this.flag=true;
this.bzryTableData = response.data }else{
}) this.flag=false;
}) }
const dict= window.localStorage.getItem("QGKW");
this.kwList=JSON.parse(dict);
this.kwList=this.kwList.filter(item => {
if (item.bm >4)
return true
})
}, },
methods: { methods: {
bzPersonAdd(e,row){
this.selectedPerson=row
this.addPersonVisible=true
e.preventDefault()
},
showFilter(column) {
this.$refs.tbFilter.showFilter(column) initBase(){
}, getryBase({}).then(res=>{
execFilter(property, vals) { this.dictData = res.data
this.currentPage = 1 console.log(this.dictData)
this.$set(this.columnFilter, property, vals) const xGrid = this.$refs.xGrid
},
getHeight() { const zt = xGrid.getColumnByField('zt')
this.defaultHeight.height = window.innerHeight - 170 + 'px' const yzt = xGrid.getColumnByField('yzt')
}, zt.editRender.options = res.data.kwxxs
handleSizeChange(val) { yzt.editRender.options = res.data.kwxxs
this.pageSize = val
},
handleCurrentChange(val) {
this.currentPage = val
},
handleYhxxCurrentChange(currentRow) {
if (!currentRow || !currentRow.resourcesCode) return
this.selectYhxx = currentRow
getBzryList({resourcesCode:currentRow.resourcesCode}).then(response => {
this.bzryTableData = response.data
}) })
}, },
handleGzzSelect(row) { initList() {
if (!this.selectYhxx || !this.selectYhxx.yhdm) { getBzryList(this.request).then((res) => {
this.$message({ message: '请先选择一个用户!', type: 'error' }) this.list = res.data
return if (this.$refs.xGrid) {
} this.$refs.xGrid.loadData(this.list)
const relation = { 'yhdm': this.selectYhxx.yhdm, }
'role_code': row.role_code,
'yhms': this.selectYhxx.yhms
}
if (row.isselect) {
addRoleForUser([relation]).then(response => {
this.$message({ message: '添加角色成功!', type: 'success' })
})
} else {
deleteRoleForUser([relation]).then(response => {
this.$message({ message: '删除角色成功!', type: 'success' })
})
}
},
handleAddYhxx() {
this.dialogVisible = true
this.inputDisabled=false;
this.dialogTitle = '添加班组信息'
this.updateData = {}
},
handleAddYhxxComplated() {
var uuid = guid();
this.updateData.id = uuid;
save(this.updateData).then(response => {
this.updateData = JSON.parse(JSON.stringify(this.updateData))
this.yhxxTableData.push(this.updateData)
this.dialogVisible = false
this.$message({ message: '添加班组信息成功!', type: 'success' })
}) })
}, },
handleUpdateYhxx() {
if (!this.selectYhxx.resourcesCode) { plClick(){
this.$message({ message: '请选择要修改的班组!', type: 'error' }) let selectRecords = this.$refs.xGrid.getCheckboxRecords()
return if(selectRecords.length>0){
for(let i = 0; i < selectRecords.length; i++) {
if(this.inParam.zt !==''){
selectRecords[i]. yzt= selectRecords[i]. zt
selectRecords[i]. zt= this.inParam.zt
}
if(this.inParam.rqfw !==''){
selectRecords[i].rqfw = this.inParam.rqfw
}
}
this.$refs.xGrid.updateData(this.list)
} }
this.dialogVisible = true
this.dialogTitle = '修改班组信息'
this.updateData = JSON.parse(JSON.stringify(this.selectYhxx))
this.inputDisabled=true;
}, },
handleUpdateYhxxComplated() {
update(this.updateData).then(response => {
for (const key in this.updateData) { selectChange(row) {
this.selectYhxx[key] = this.updateData[key] this.$refs.xGrid.clearActived() //
} this.$refs.xGrid.setActiveCell(row.row, row.column.property) //
this.dialogVisible = false null2str(row.row)
this.$message({ message: '修改班组信息成功!', type: 'success' })
})
}, },
handleDeleteYhxx() { getHeight() {
if (!this.selectYhxx.resourcesCode) { this.height = window.innerHeight - 190
this.$message({ message: '请选择要删除的班组!', type: 'error' })
return
}
let resultList = JSON.parse(JSON.stringify(this.selectYhxx))
this.$confirm('此操作将删除该班组, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
del([resultList]).then(response => {
this.yhxxTableData = this.yhxxTableData.filter(t => !(t.resourcesCode === this.selectYhxx.resourcesCode))
this.$message({ message: '删除班组信息成功!', type: 'success' })
})
})
}, },
handleDeleteYhxx1() { toolbarButtonClickEvent(code) {
let resultList = this.yhxxTableData.filter(data => { const {
return data.checked insertRecords,
}) removeRecords,
if (!resultList.length>0){ updateRecords
this.$message({ message: '请选择要删除的班组!', type: 'error' }) } = this.$refs.xGrid.getRecordset()
return switch (code) {
} case 'insert':
this.$confirm('此操作将删除该班组, 是否继续?', '提示', { if(this.request.dwbm==='' ||this.request.dwbm===null){
confirmButtonText: '确定', this.$message({ message: '请选择需求单位!', type: 'warning' })
cancelButtonText: '取消', return
type: 'warning' }
}).then(() => { this.$refs.xGrid.insertAt({
del(resultList).then(response => {
this.yhxxTableData = this.yhxxTableData.filter( }, -1).then(({ row }) => {
t => !t.checked this.$refs.xGrid.setActiveRow(row)
})
break
case 'delete':
this.$confirm('删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then((type) => {
this.$refs.xGrid.removeCheckboxRow()
})
break
case 'save':
if (removeRecords.length !== 0) {
getBzryDel(removeRecords).then((response) => {
if (response.success) {
for (let i = 0; i < this.list.length; i++) {
if (removeRecords.indexOf(this.list[i]) !== -1) {
this.list.splice(i, 1)
i--
}
}
this.$message({ message: '保存成功!', type: 'success' })
const xTable = this.$refs.xGrid
xTable.loadData(this.initList())
}
})
}
if (updateRecords.length !== 0) {
getBzryUpdate(updateRecords).then((response) => {
if (response.success) {
const xTable = this.$refs.xGrid
xTable.loadData(this.initList())
this.$message({message: '保存成功!', type: 'success'})
}
})
}
if (insertRecords.length !== 0) {
getBzryInsert(insertRecords).then((response) => {
if (response.success) {
this.list = this.list.concat(insertRecords)
const xTable = this.$refs.xGrid
xTable.loadData(this.initList())
this.$message({ message: '保存成功!', type: 'success' })
}
})
}
this.$message(
`新增 ${insertRecords.length} 条,删除 ${removeRecords.length} 条,更新 ${updateRecords.length}`
) )
this.$message({ message: '删除班组信息成功!', type: 'success' }) this.clickList = []
}) break
})
},
changeTeam(){
let resultList = this.bzryTableData.filter(data => {
return data.isselect
})
if (!resultList.length>0){
this.$message({ message: '请选择要转组织的人员!', type: 'error' })
return
} }
}
}
}
</script>
<style lang="scss" scoped >
}, .el-header{margin:0;padding: 5px;height:auto;
getKwName(bm) { .el-input{
for (const i in this.kwList) { width: 140px;
if (this.kwList[i].bm === bm) {
return this.kwList[i].bmsm
}
}
return ''
},
} }
.el-select{
width: 140px;
}
}
.el-container{padding: 0;margin:0;}
.el-main{padding: 0;}
.el-col{padding: 0;height: 32px;}
.el-aside{background: #fff;padding: 0}
.el-container{padding: 0}
.el-row {}
.el-row:last-child {margin-bottom: 0; }
.tableStyles{
background: #0a76a4;
}
.my-dropdown {
width: 400px;
height: 400px;
background-color: #fff;
border: 1px solid #dcdfe6;
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
font-size: 12px;
} }
//uuid .mytable1{
function S4() {
return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
} }
function guid() { .borderClass{
return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
}
.vxe-input {
display: inline-block !important;
position: relative !important;
width: auto;
}
.el-input {
display: inline-block !important;
position: relative !important;
width: auto;
}
.keyword-lighten {
color: #000;
background-color: #FFFF00;
} }
</script>
<style scoped> .vxe-textarea--inner {
.YhxxDialog .el-row { line-height: inherit;
margin-bottom: 5px; }
} .el-form-item__label-wrap {
margin-left: 0px !important;
float: left;
}
.fontClass{
font-size: 12px;
font-weight: bold;
}
</style> </style>

Loading…
Cancel
Save