master
xhj 8 months ago
parent f709fdd96c
commit 990ab840f9

@ -39,3 +39,31 @@ export function getBzryList(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() {
if (this.queryParam.dcch === '') {
this.$message.warning('选择船只编号')
return
}
// if (this.queryParam.dcch === '') {
// this.$message.warning('')
// return
// }
getDhPgd(this.queryParam).then((res) => {
this.list = res.data
if (this.$refs.xGrid) {

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

@ -231,7 +231,7 @@
</el-row>
<el-row>
<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-button type="info" @click="updates2()" >批量</el-button>
<el-button type="success" @click="hdClick()"></el-button>

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

@ -659,6 +659,8 @@ export default {
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'bclq.dcChZ', title: '船号', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
@ -809,7 +811,10 @@ export default {
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'],

@ -1,448 +1,445 @@
<template>
<el-container style="height: 100%;position: absolute;width: 100%;">
<el-col :span="16" style="height:100%;">
<div style="color:#909399;font-size: 12px;height: 9%">
班组名称
<el-input v-model="query.resourcesName" placeholder="班组名称" style="width: 100px" clearable />
班组分类
<el-select v-model="query.classification" clearable placeholder="班组分类" style="width: 100px">
<el-option
v-for="item in dm_depart"
:key="item.depart_code"
:label="item.depart_name"
:value="item.depart_code"
/>
</el-select>
班组状态
<el-select v-model="query.flagStatus" clearable placeholder="班组状态" style="width: 100px">
<el-option
v-for="item in dm_depart"
:key="item.depart_code"
:label="item.depart_name"
:value="item.depart_code"
/>
</el-select>
<div style="float: right;">
<el-button style="margin: 1px;" type="primary" icon="el-icon-search">查询</el-button>
<el-button style="margin: 1px" type="success" @click="handleAddYhxx"></el-button>
<el-button style="margin: 1px" type="warning" @click="handleUpdateYhxx"></el-button>
<el-button style="margin: 1px" type="danger" @click="handleDeleteYhxx"></el-button>
</div>
</div>
<el-table
ref="bzxxTable"
:show-overflow-tooltip="true"
:data="c_yhxxTableData.slice((currentPage-1)*pageSize,currentPage*pageSize)"
height="calc(100% - 80px - 35px)"
:header-cell-style="{ textAlign: 'center' }"
:cell-style="{ textAlign: 'center' }"
width="100%"
:border="true"
highlight-current-row
@current-change="handleYhxxCurrentChange"
@header-click="showFilter"
>
<!-- <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-dialog title="收货地址" :visible.sync="dialogFormVisible">-->
<el-container>
<el-header style="width: 100%; height: 80px;font-size: 12px">
<el-form :inline="true" label-width="65px" label-position="left">
<el-row>
<el-col :span="22">
<el-form-item label="班组:">
<!-- <el-input v-model="request.resourcesCode" type="search" placeholder="班组" ></el-input>-->
<el-select v-model="request.resourcesCode" placeholder="班组" clearable >
<el-option
v-for="item in this.dictData.resourcesCodes"
:key="item.resourcesCode"
:label="item.resourcesCode"
:value="item.resourcesCode"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="作业区:">
<!-- <el-input v-model="request.zyq" type="search" placeholder="作业区" ></el-input>-->
<el-select v-model="request.zyq" placeholder="作业区" clearable >
<el-option
v-for="item in this.dictData.zyqs"
:key="item.zyq"
:label="item.zyq"
:value="item.zyq"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="名称:">
<el-input v-model="request.userName" type="search" placeholder="名称" ></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item style="float: right" >
<el-button type="success" @click="initList"></el-button>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row>
<span style="width: 110px;display:inline-block;">班组编码</span>
<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-col :span="14">
<el-select v-model="inParam.zt" placeholder="状态" clearable >
<el-option
v-for="item in kwList"
v-for="item in this.dictData.kwxxs"
:key="item.bm"
:label="item.bmsm"
:value="item.bm"
/>
>
</el-option>
</el-select>
</el-row>
<el-row>
<span style="width: 110px;display:inline-block;">所属产线</span>
<el-input v-model="updateData.productionLineName" placeholder="" style="width: 250px;" />
</el-row>
<el-row>
<span style="width: 110px;display:inline-block;">组织类型</span>
<el-input v-model="updateData.resourcesType" placeholder="" style="width: 250px;" />
</el-row>
<el-row>
<span style="width: 110px;display:inline-block;">外部对照码</span>
<el-input v-model="updateData.comparisonCode" placeholder="" style="width: 250px;" />
</el-row>
<el-row>
<span style="width: 110px;display:inline-block;">班组分类</span>
<el-input v-model="updateData.classification" placeholder="" style="width: 250px;" />
</el-row>
<el-row>
<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-input v-model="inParam.rqfw" placeholder="日期范围" clearable style="width: 200px" />
<el-button type="info" @click="plClick"></el-button>
</el-col>
<el-col :span="10" >
<el-form-item style="float: right" >
<el-button
type="success"
@click="toolbarButtonClickEvent('save')"
>保存</el-button>
<el-button type="success" @click="toolbarButtonClickEvent('insert')"></el-button>
<el-button
type="danger"
@click="toolbarButtonClickEvent('delete')"
>删除
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-row>
</el-dialog>
</el-container>
</el-form>
</el-header>
<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>
<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 {
name: 'Bzzzgl',
components: { tbfilter },
name:'xqdwcjcd',
data() {
return {
selectedPerson:{},
addPersonVisible:false,
defaultHeight: {
height: '100%'
request: {
resourcesCode:'',
zrq:'',
userName:''
},inParam:{
rqfw:'',
zt:""
},
kwList:[],
inputDisabled:true,
activeGzzxxTabName: 'gzzxx',
dm_depart: [],
query: {resourcesCode:''},
yhxxTableData: [],
isYhxxTableLoading: true,
bzryTableData: [],
currentPage: 1,
pageSize: 100,
selectYhxx: {},
dialogVisible: false,
dialogTitle: '',
updateData: {},
columnFilter: {},
loginType:[{
value: 1,
label: '指纹登录'
}, {
value: 2,
label: 'findTxTl'
}, ],
list: [],
deptList: [],
clickList: [],
dictData:{},
height: '500px',
tableColumn: [
{ type: 'checkbox', width: 50 ,
},
{ type: 'seq', width: 40, title: '序号' },
{
field: 'userCode',
title: '人员编码',editRender: { name: 'input' },
width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'userName',
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: {
c_yhxxTableData: function() {
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
}
...mapGetters(['name', 'bmbm','apbm'])
},
created() {
window.addEventListener('resize', this.getHeight)
this.getHeight()
getList({}).then(response => {
this.yhxxTableData = response.data
this.$refs.bzxxTable.setCurrentRow(this.yhxxTableData[0])
getBzryList({resourcesCode:this.yhxxTableData[0].resourcesCode}).then(response => {
this.bzryTableData = response.data
})
})
const dict= window.localStorage.getItem("QGKW");
this.kwList=JSON.parse(dict);
this.kwList=this.kwList.filter(item => {
if (item.bm >4)
return true
})
this.initBase()
if(this.apbm==='P30000'){
this.request.dwbm='P30000'
this.flag=true;
}else{
this.flag=false;
}
},
methods: {
bzPersonAdd(e,row){
this.selectedPerson=row
this.addPersonVisible=true
e.preventDefault()
},
showFilter(column) {
this.$refs.tbFilter.showFilter(column)
},
execFilter(property, vals) {
this.currentPage = 1
this.$set(this.columnFilter, property, vals)
},
getHeight() {
this.defaultHeight.height = window.innerHeight - 170 + 'px'
},
handleSizeChange(val) {
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
initBase(){
getryBase({}).then(res=>{
this.dictData = res.data
console.log(this.dictData)
const xGrid = this.$refs.xGrid
const zt = xGrid.getColumnByField('zt')
const yzt = xGrid.getColumnByField('yzt')
zt.editRender.options = res.data.kwxxs
yzt.editRender.options = res.data.kwxxs
})
},
handleGzzSelect(row) {
if (!this.selectYhxx || !this.selectYhxx.yhdm) {
this.$message({ message: '请先选择一个用户!', type: 'error' })
return
}
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' })
initList() {
getBzryList(this.request).then((res) => {
this.list = res.data
if (this.$refs.xGrid) {
this.$refs.xGrid.loadData(this.list)
}
})
},
handleUpdateYhxx() {
if (!this.selectYhxx.resourcesCode) {
this.$message({ message: '请选择要修改的班组!', type: 'error' })
return
plClick(){
let selectRecords = this.$refs.xGrid.getCheckboxRecords()
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) {
this.selectYhxx[key] = this.updateData[key]
}
this.dialogVisible = false
this.$message({ message: '修改班组信息成功!', type: 'success' })
})
selectChange(row) {
this.$refs.xGrid.clearActived() //
this.$refs.xGrid.setActiveCell(row.row, row.column.property) //
null2str(row.row)
},
handleDeleteYhxx() {
if (!this.selectYhxx.resourcesCode) {
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' })
})
})
getHeight() {
this.height = window.innerHeight - 190
},
handleDeleteYhxx1() {
let resultList = this.yhxxTableData.filter(data => {
return data.checked
})
if (!resultList.length>0){
this.$message({ message: '请选择要删除的班组!', type: 'error' })
return
}
this.$confirm('此操作将删除该班组, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
del(resultList).then(response => {
this.yhxxTableData = this.yhxxTableData.filter(
t => !t.checked
toolbarButtonClickEvent(code) {
const {
insertRecords,
removeRecords,
updateRecords
} = this.$refs.xGrid.getRecordset()
switch (code) {
case 'insert':
if(this.request.dwbm==='' ||this.request.dwbm===null){
this.$message({ message: '请选择需求单位!', type: 'warning' })
return
}
this.$refs.xGrid.insertAt({
}, -1).then(({ row }) => {
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' })
})
})
},
changeTeam(){
let resultList = this.bzryTableData.filter(data => {
return data.isselect
})
if (!resultList.length>0){
this.$message({ message: '请选择要转组织的人员!', type: 'error' })
return
this.clickList = []
break
}
}
}
}
</script>
<style lang="scss" scoped >
},
getKwName(bm) {
for (const i in this.kwList) {
if (this.kwList[i].bm === bm) {
return this.kwList[i].bmsm
}
}
return ''
},
.el-header{margin:0;padding: 5px;height:auto;
.el-input{
width: 140px;
}
.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
function S4() {
return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
.mytable1{
}
function guid() {
return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
.borderClass{
}
.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>
.YhxxDialog .el-row {
margin-bottom: 5px;
}
.vxe-textarea--inner {
line-height: inherit;
}
.el-form-item__label-wrap {
margin-left: 0px !important;
float: left;
}
.fontClass{
font-size: 12px;
font-weight: bold;
}
</style>

Loading…
Cancel
Save