|
|
|
@ -38,7 +38,7 @@
|
|
|
|
|
<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>
|
|
|
|
|
<el-button style="margin: 1px" type="danger" @click="handleDeleteYhxx">删除</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -47,23 +47,30 @@
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
:data="c_yhxxTableData.slice((currentPage-1)*pageSize,currentPage*pageSize)"
|
|
|
|
|
height="calc(100% - 60px - 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="" 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="是否资源" property="resource" />
|
|
|
|
|
<el-table-column label="所属工厂" property="factoryName" />
|
|
|
|
|
<el-table-column label="所属车间" property="workshopName" />
|
|
|
|
|
<el-table-column label="所属跨位" width="100px">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ getKwName(scope.row.kw) }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="所属产线" property="productionLineName" />
|
|
|
|
|
<el-table-column label="组织类型" property="resourcesType" />
|
|
|
|
|
<el-table-column label="外部对照码" property="comparisonCode" />
|
|
|
|
@ -106,6 +113,17 @@
|
|
|
|
|
<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
|
|
|
|
|
v-for="item in kwList"
|
|
|
|
|
:key="item.bm"
|
|
|
|
|
:label="item.bmsm"
|
|
|
|
|
:value="item.bm"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<span style="width: 110px;display:inline-block;">所属产线:</span>
|
|
|
|
|
<el-input v-model="updateData.productionLineName" placeholder="" style="width: 250px;" />
|
|
|
|
@ -207,6 +225,7 @@ export default {
|
|
|
|
|
defaultHeight: {
|
|
|
|
|
height: '100%'
|
|
|
|
|
},
|
|
|
|
|
kwList:[],
|
|
|
|
|
inputDisabled:true,
|
|
|
|
|
activeGzzxxTabName: 'gzzxx',
|
|
|
|
|
dm_depart: [],
|
|
|
|
@ -264,7 +283,12 @@ export default {
|
|
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
showFilter(column) {
|
|
|
|
@ -332,7 +356,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.dialogVisible = true
|
|
|
|
|
this.dialogTitle = '修改班组信息'
|
|
|
|
|
console.log(this.selectYhxx)
|
|
|
|
|
this.updateData = JSON.parse(JSON.stringify(this.selectYhxx))
|
|
|
|
|
this.inputDisabled=true;
|
|
|
|
|
},
|
|
|
|
@ -346,6 +369,23 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
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' })
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleDeleteYhxx1() {
|
|
|
|
|
let resultList = this.yhxxTableData.filter(data => {
|
|
|
|
|
return data.checked
|
|
|
|
|
})
|
|
|
|
@ -376,10 +416,10 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
getDepartName(depart_code) {
|
|
|
|
|
for (const i in this.dm_depart) {
|
|
|
|
|
if (this.dm_depart[i].depart_code === depart_code) {
|
|
|
|
|
return this.dm_depart[i].depart_name
|
|
|
|
|
getKwName(bm) {
|
|
|
|
|
for (const i in this.kwList) {
|
|
|
|
|
if (this.kwList[i].bm === bm) {
|
|
|
|
|
return this.kwList[i].bmsm
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return ''
|
|
|
|
|