Compare commits

..

9 Commits

Author SHA1 Message Date
XingCheng3
79d5b0f426 更新最新程序 2026-06-26 13:45:55 +08:00
XingCheng3
3ed5f66667 fix: 优化人员管理和三码校验记录页面业务逻辑 2026-06-16 14:48:03 +08:00
XingCheng3
f06d02e95d 增加特殊工位定义 2026-06-10 18:55:11 +08:00
XingCheng3
343e67fd69 修改导出 2026-06-01 15:35:51 +08:00
XingCheng3
16aa2bd60d fix: 一次合格率导出复用状态字段 2026-05-31 17:03:52 +08:00
XingCheng3
57220a4b29 feat: 一次合格率导出增加合格状态列 2026-05-31 16:47:17 +08:00
XingCheng3
df8c0da645 feat: 增加一次合格率表格导出 2026-05-31 16:36:14 +08:00
XingCheng3
a7ed5f86ac 添加排除文件 修改日志查询模块 2026-05-31 16:13:51 +08:00
XingCheng3
65412b7f1a 修复过站导出问题 2026-05-25 13:22:49 +08:00
10 changed files with 1101 additions and 226 deletions

1
.gitignore vendored
View File

@@ -13,3 +13,4 @@ package-lock.json
*.ntvs*
*.njsproj
*.sln
dist.zip

BIN
m.zip

Binary file not shown.

View File

@@ -1,18 +1,13 @@
import request from '@/utils/request'
import state from '@/store'
import router from '@/router'
import Vue from 'vue'
export function getTree(pid) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: 1,
name: '人事档案管理_部门关系_查询节点',
param: '子节点=' + pid + '=int'
}
})
const param = []
param[0] = ['子节点', pid]
const Data = Vue.prototype.CreateData('1', '人事档案管理_部门关系_查询节点', param)
return Vue.prototype.ExecDatabase(Data)
}
export function tree(data, pid) {
const result = []
@@ -64,7 +59,7 @@ export function addDepartmentName(num1, num2, num3) {
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: 2,
type: '11',
name: '人事档案管理_部门关系_增加节点',
param: '父节点=' + num1 + '=int&节点名称=' + num2 + '=string&子节点=' + num3
}
@@ -78,7 +73,7 @@ export function delList(num1) {
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: 2,
type: '11',
name: '人事档案管理_部门关系_删除节点',
param: '子节点=' + num1 + '=int'
}
@@ -92,7 +87,7 @@ export function editList(num1, num2) {
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: 2,
type: '11',
name: '人事档案管理_部门关系_修改节点',
param: '子节点=' + num1 + '=int&节点名称=' + num2 + '=string'
}
@@ -105,7 +100,7 @@ export function delPeopleList(num1) {
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: 2,
type: '11',
name: '人事档案管理_人员名单_删除数据_MESWORK',
param: '人员编号=' + num1 + '=int'
}
@@ -202,7 +197,7 @@ export function addPeople(id, Sex, Education, Address, Nation, Post, AccountNumb
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: 2,
type: '11',
name: '人事档案管理_人员名单_增加数据_MESWORK',
param: '考核部门编号=' + id + '=int&性别编号=' + Sex + '=int&学历编号=' + Education + '=int&家庭住址=' + Address + '&民族=' + Nation + '&岗位编号=' + Post + '=int&考勤编号=' + AccountNumber + '=string&密码=' + Password + '=string&姓名=' + Name + '=string&身份证号=' + IDcard + '=string&入公司时间=' + TimeOfEntry + '=string&出生日期=' + Birthday + '=string&联系电话=' + ContactInformation + '=string&班组=' + TeamValue
}
@@ -215,7 +210,7 @@ export function editPeople(id, Sex, Education, Address, Nation, Post, AccountNum
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: 2,
type: '11',
name: '人事档案管理_人员名单_修改数据_MESWORK',
param: '人员编号=' + id + '=int&性别编号=' + Sex + '=int&学历编号=' + Education + '=int&家庭住址=' + Address + '&民族=' + Nation + '&岗位编号=' + Post + '=int&考勤编号=' + AccountNumber + '=string&密码=' + Password + '=string&姓名=' + Name + '=string&身份证号=' + IDcard + '=string&入公司时间=' + TimeOfEntry + '=string&出生日期=' + Birthday + '=string&联系电话=' + ContactInformation + '=string&班组=' + TeamValue
}
@@ -228,7 +223,7 @@ export function moveGroups(num1, num2) {
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: 2,
type: '11',
name: '人事档案管理_人员名单_移动数据_MESWORK',
param: '人员编号=' + num1 + '=int&考核部门编号=' + num2 + '=int'
}
@@ -397,12 +392,25 @@ export function quit(num1) {
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: 2,
type: '11',
name: '人事档案管理_人员_离职操作',
param: '人员编号=' + num1 + '=int'
}
})
}
export function reinstate(num1) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '11',
name: '人事档案管理_人员_复职操作',
param: '人员编号=' + num1 + '=int'
}
})
}
export function searchLeavingList(pageCurrent, pageSize) {
return request({
url: '',

View File

@@ -380,9 +380,17 @@
<!-- {{ scope.row.家庭住址 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" align="center" width="100">
<el-table-column label="操作" align="center" width="170">
<template slot-scope="scope">
<el-button size="mini" type="danger" icon="el-icon-circle-close-outline"
<el-button
size="mini"
type="primary"
icon="el-icon-refresh-left"
@click="reinstatePeople(scope.row)">复职</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-circle-close-outline"
@click="deletePeople(scope.row)">删除</el-button>
</template>
</el-table-column>
@@ -408,7 +416,7 @@
</template>
<script>
import { fetchteamviwer, moveGroups, getTree, tree, getTablePeople, getTablePeopleForName, addDepartmentName, delList, editList, fetchEducationData, fetchPostData, addPeople, editPeople, quit, searchLeavingList } from '@/api/BasicData/PersonnelManagement'
import { tree } from '@/api/BasicData/PersonnelManagement'
import { uploadPerson } from '@/utils/request'
import { readFile } from '@/utils/request'
import request from '@/utils/request'
@@ -554,9 +562,18 @@ export default {
this.fetchTeamViwer()
},
methods: {
getBusinessResult(response) {
const result = response && response.data && response.data[0] ? response.data[0] : {}
return {
success: result.result === 1 || result.result === '1',
message: result.msg || result.message
}
},
// 获取班组信息
fetchTeamViwer() {
fetchteamviwer().then(response => {
const param = []
const Data = this.CreateData('11', '班组管理_班组查询', param)
this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Team.push({
label: response.data[i].班组名称,
@@ -574,13 +591,14 @@ export default {
}).then(() => {
var param = []
param[0] = ['考勤编号', row.考勤编号]
var Data = this.CreateData('12', '人事档案管理_离职人员_删除数据', param)
var Data = this.CreateData('11', '人事档案管理_离职人员_删除数据', param)
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
const result = this.getBusinessResult(response)
if (result.success) {
this.$message.success(result.message || '删除成功')
this.searchLeavingList()
} else {
this.$message.error('删除失败')
this.$message.error(result.message || '删除失败')
}
})
}).catch(() => {
@@ -638,16 +656,37 @@ export default {
})
},
fetchEducationData() {
this.getSelect(fetchEducationData, ['学历名称', '学历编号'], 'EducationDate')
const param = []
const Data = this.CreateData('11', '人事档案管理_基础表_学历_查询数据', param)
this.ExecDatabase(Data).then(response => {
this.EducationDate = []
for (let i = 0; i < response.data.length; i++) {
this.EducationDate.push({
label: response.data[i]['学历名称'],
value: response.data[i]['学历编号']
})
}
})
},
fetchPostData() {
this.people_form.Post = ''
this.PostData = []
this.getSelect(fetchPostData, ['岗位名称', '岗位编号'], 'PostData')
const param = []
const Data = this.CreateData('11', '人事档案管理_基础表_人员岗位_查询数据', param)
this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.PostData.push({
label: response.data[i]['岗位名称'],
value: response.data[i]['岗位编号']
})
}
})
},
getTreeData() {
getTree(0).then(response => {
// getTree(this.departmentId).then(response => {
const param = []
param[0] = ['子节点', 0]
const Data = this.CreateData('11', '人事档案管理_部门关系_查询节点', param)
this.ExecDatabase(Data).then(response => {
const data = response.data
this.departmentData = tree(data, 0)
})
@@ -659,7 +698,13 @@ export default {
}
},
handleNodeClick() {
this.getTable(getTablePeople, [this.id, this.PageCurrent, this.PageSize], ['List', 'total'])
const param = []
param[0] = ['考核部门编号', this.id]
const Data = this.CreateData('11', '人事档案管理_人员_部门与人员_查询数据_根据部门编号', param, this.PageSize, this.PageCurrent)
this.ExecDatabase(Data).then(response => {
this.List = response.data.rows
this.total = response.data.total
})
},
handleClick(data, checked) {
if (this.$refs.treeForm.getCheckedKeys().length !== 0 && this.$refs.treeForm.getCheckedNodes().length !== 0) {
@@ -735,27 +780,24 @@ export default {
if (valid) {
this.handleAdd_disable = true
this.department_DFV = false
if (this.id) {
addDepartmentName(this.id, this.department_Form.DepartmentName, 0).then(response => {
if (response.data[0].result === '1') {
this.getTreeData()
this.$message.success('添加成功')
this.i = 0
} else {
this.$message.error('添加失败')
}
})
} else {
addDepartmentName(0, this.department_Form.DepartmentName, 0).then(response => {
if (response.data[0].result === '1') {
this.getTreeData()
this.$message.success('添加成功')
this.i = 1
} else {
this.$message.error('添加失败')
}
})
}
const param = []
param[0] = ['父节点', this.id || 0]
param[1] = ['节点名称', this.department_Form.DepartmentName]
param[2] = ['子节点', 0]
const Data = this.CreateData('11', '人事档案管理_部门关系_增加节点', param)
this.ExecDatabase(Data).then(response => {
const result = this.getBusinessResult(response)
if (result.success) {
this.getTreeData()
this.$message.success(result.message || '添加成功')
this.i = this.id ? 0 : 1
} else {
this.$message.error(result.message || '添加失败')
}
}).catch(() => {
this.handleAdd_disable = false
this.$message.error('添加异常')
})
} else {
return false
}
@@ -766,13 +808,21 @@ export default {
if (valid) {
this.handleAdd_disable = true
this.department_DFV = false
editList(this.id, this.department_Form.DepartmentName).then(response => {
if (response.data[0].result === '1') {
const param = []
param[0] = ['子节点', this.id]
param[1] = ['节点名称', this.department_Form.DepartmentName]
const Data = this.CreateData('11', '人事档案管理_部门关系_修改节点', param)
this.ExecDatabase(Data).then(response => {
const result = this.getBusinessResult(response)
if (result.success) {
this.getTreeData()
this.$message.success('编辑成功')
this.$message.success(result.message || '编辑成功')
} else {
this.$message.error('编辑失败')
this.$message.error(result.message || '编辑失败')
}
}).catch(() => {
this.handleAdd_disable = false
this.$message.error('编辑异常')
})
} else {
return false
@@ -786,16 +836,24 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delList(this.id).then(response => {
if (response.data[0].result === '1') {
const param = []
param[0] = ['子节点', this.id]
const Data = this.CreateData('11', '人事档案管理_部门关系_删除节点', param)
this.ExecDatabase(Data).then(response => {
const result = this.getBusinessResult(response)
if (result.success) {
this.getTreeData()
this.i = 1
this.id = ''
this.$message({
message: '已被成功删除',
message: result.message || '已被成功删除',
type: 'success'
})
} else {
this.$message.error(result.message || '删除失败')
}
}).catch(() => {
this.$message.error('删除异常')
})
}).catch(() => {
this.$message({
@@ -813,9 +871,11 @@ export default {
},
fetchPeopleForName() {
if (this.Name) {
getTablePeopleForName(this.Name).then(response => {
const param = []
param[0] = ['姓名', this.Name]
const Data = this.CreateData('11', '人事档案管理_人员名单_查询数据_根据姓名_MESWORK', param)
this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) {
// let Data = response.data
if (response.data[i].入公司时间) {
response.data[i].入公司时间 = response.data[i].入公司时间.split(' ')[0]
}
@@ -845,17 +905,38 @@ export default {
if (valid) {
this.addPeople_disable = true
this.btnLoading = true
addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation, this.people_form.TeamValue).then(response => {
const param = []
param[0] = ['考核部门编号', this.id]
param[1] = ['性别编号', this.people_form.Sex]
param[2] = ['学历编号', this.people_form.Education]
param[3] = ['家庭住址', this.people_form.Address]
param[4] = ['民族', this.people_form.Nation]
param[5] = ['岗位编号', this.people_form.Post]
param[6] = ['考勤编号', this.people_form.AccountNumber]
param[7] = ['密码', this.people_form.Password]
param[8] = ['姓名', this.people_form.Name]
param[9] = ['身份证号', this.people_form.IDcard]
param[10] = ['入公司时间', this.people_form.TimeOfEntry]
param[11] = ['出生日期', this.people_form.Birthday]
param[12] = ['联系电话', this.people_form.ContactInformation]
param[13] = ['班组', this.people_form.TeamValue]
const Data = this.CreateData('11', '人事档案管理_人员名单_增加数据_MESWORK', param)
this.ExecDatabase(Data).then(response => {
this.btnLoading = false
if (response.data[0].result === '1') {
const result = this.getBusinessResult(response)
if (result.success) {
this.people_DFV = false
this.i = 0
this.handleNodeClick()
this.$message.success('添加成功')
this.$message.success(result.message || '添加成功')
} else {
this.$message.error('添加失败')
this.$message.error(result.message || '添加失败')
this.addPeople_disable = false
}
}).catch(() => {
this.btnLoading = false
this.addPeople_disable = false
this.$message.error('添加异常')
})
} else {
return false
@@ -896,20 +977,41 @@ export default {
if (valid) {
this.addPeople_disable = true
this.btnLoading = true
editPeople(this.people_form.PeopleID, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation, this.people_form.TeamValue).then(response => {
const param = []
param[0] = ['人员编号', this.people_form.PeopleID]
param[1] = ['性别编号', this.people_form.Sex]
param[2] = ['学历编号', this.people_form.Education]
param[3] = ['家庭住址', this.people_form.Address]
param[4] = ['民族', this.people_form.Nation]
param[5] = ['岗位编号', this.people_form.Post]
param[6] = ['考勤编号', this.people_form.AccountNumber]
param[7] = ['密码', this.people_form.Password]
param[8] = ['姓名', this.people_form.Name]
param[9] = ['身份证号', this.people_form.IDcard]
param[10] = ['入公司时间', this.people_form.TimeOfEntry]
param[11] = ['出生日期', this.people_form.Birthday]
param[12] = ['联系电话', this.people_form.ContactInformation]
param[13] = ['班组', this.people_form.TeamValue]
const Data = this.CreateData('11', '人事档案管理_人员名单_修改数据_MESWORK', param)
this.ExecDatabase(Data).then(response => {
this.btnLoading = false
if (response.data[0].result === '1') {
const result = this.getBusinessResult(response)
if (result.success) {
if (this.id !== '' && this.Name === '') {
this.handleNodeClick()
} else {
this.feathPeopleForName()
this.fetchPeopleForName()
}
this.$message.success('编辑成功')
this.$message.success(result.message || '编辑成功')
this.people_DFV = false
} else {
this.$message.error('编辑失败')
this.$message.error(result.message || '编辑失败')
this.addPeople_disable = false
}
}).catch(() => {
this.btnLoading = false
this.addPeople_disable = false
this.$message.error('编辑异常')
})
} else {
return false
@@ -919,14 +1021,20 @@ export default {
handleSizeChange(val) {
this.PageSize = val
this.PageCurrent = 1
getTablePeople(this.id, this.PageCurrent, this.PageSize).then(response => {
const param = []
param[0] = ['考核部门编号', this.id]
const Data = this.CreateData('11', '人事档案管理_人员_部门与人员_查询数据_根据部门编号', param, this.PageSize, this.PageCurrent)
this.ExecDatabase(Data).then(response => {
this.List = response.data.rows
this.total = response.data.total
})
},
handleCurrentChange(val) {
this.PageCurrent = val
getTablePeople(this.id, this.PageCurrent, this.PageSize).then(response => {
const param = []
param[0] = ['考核部门编号', this.id]
const Data = this.CreateData('11', '人事档案管理_人员_部门与人员_查询数据_根据部门编号', param, this.PageSize, this.PageCurrent)
this.ExecDatabase(Data).then(response => {
this.List = response.data.rows
this.total = response.data.total
})
@@ -934,11 +1042,11 @@ export default {
handleSizeChangeN(val) {
this.PageSizeN = val
this.PageCurrentN = 1
this.getTable(searchLeavingList, [this.PageCurrentN, this.PageSizeN], ['LeavingList', 'totalN'])
this.searchLeavingList()
},
handleCurrentChangeN(val) {
this.PageCurrentN = val
this.getTable(searchLeavingList, [this.PageCurrentN, this.PageSizeN], ['LeavingList', 'totalN'])
this.searchLeavingList()
},
handleSelectionChange(val) {
this.multipleSelection = val
@@ -954,14 +1062,17 @@ export default {
type: 'warning'
}).then(() => {
for (let i = 0; i < this.multipleSelection.length; i++) {
quit(this.multipleSelection[i].人员编号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('离职成功')
getTablePeople(this.id, this.PageCurrent, this.PageSize).then(response => {
this.List = response.data.rows
this.total = response.data.total
})
} else { this.$message.error('离职失败') }
const param = []
param[0] = ['人员编号', this.multipleSelection[i].人员编号]
const Data = this.CreateData('11', '人事档案管理_人员_离职操作', param)
this.ExecDatabase(Data).then(response => {
const result = this.getBusinessResult(response)
if (result.success) {
this.$message.success(result.message || '离职成功')
this.handleNodeClick()
} else {
this.$message.error(result.message || '离职失败')
}
})
}
}).catch(() => {
@@ -974,19 +1085,57 @@ export default {
},
searchLeavingList() {
this.LeavingListVisiable = true
this.getTable(searchLeavingList, [this.PageCurrentN, this.PageSizeN], ['LeavingList', 'totalN'])
const param = []
const Data = this.CreateData('11', '人事档案管理_人员_离职人员查询', param, this.PageSizeN, this.PageCurrentN)
this.ExecDatabase(Data).then(response => {
this.LeavingList = response.data.rows
this.totalN = response.data.total
})
},
reinstatePeople(row) {
this.$confirm('确认将该员工复职?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const param = []
param[0] = ['人员编号', row.人员编号]
const Data = this.CreateData('11', '人事档案管理_人员_复职操作', param)
this.ExecDatabase(Data).then(response => {
const result = this.getBusinessResult(response)
if (result.success) {
this.$message.success(result.message || '复职成功')
this.searchLeavingList()
if (this.id) {
this.handleNodeClick()
}
} else {
this.$message.error(result.message || '复职失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消复职操作'
})
})
},
moveGroupConfim() {
this.id = this.node
for (let i = 0; i < this.multipleSelection.length; i++) {
moveGroups(this.multipleSelection[i].人员编号, this.node).then(response => {
if (response.data[0].result === '1') {
const param = []
param[0] = ['人员编号', this.multipleSelection[i].人员编号]
param[1] = ['考核部门编号', this.node]
const Data = this.CreateData('11', '人事档案管理_人员名单_移动数据_MESWORK', param)
this.ExecDatabase(Data).then(response => {
const result = this.getBusinessResult(response)
if (result.success) {
if (i === this.multipleSelection.length - 1) {
this.$message.success('移组成功')
this.$message.success(result.message || '移组成功')
this.handleNodeClick()
}
} else {
this.$message.error('更新失败')
this.$message.error(result.message || '更新失败')
}
})
}

View File

@@ -3,7 +3,7 @@
<el-card class="topCard">
<div class="topDiv">
<span style="margin-left: 10px">工位号</span>
<el-select v-model="stationNumberValue" placeholder="工位号" filterable size="small" style="width:240px">
<el-select v-model="stationNumberValue" placeholder="工位号" filterable clearable size="small" style="width:240px">
<el-option v-for="item in stationNumber" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<span style="margin-left: 10px">消息来源</span>
@@ -90,7 +90,7 @@ export default {
}
},
created() {
this.dateTime = [getBeforeOrAfterTime(-3), getNowShotTime()]
this.dateTime = [getBeforeOrAfterTime(-2), getNowShotTime()]
this.getStationNumber()
},
methods: {
@@ -120,23 +120,13 @@ export default {
param[4] = ['PageCount', '1111', 'int', '1']
param[5] = ['ItemCount', '1111', 'int', '1']
param[6] = ['开始日期', this.dateTime[0] + ' ' + '00:00:00']
param[7] = ['结束日期', this.dateTime[1] + ' ' + '23:59:59']
param[7] = ['结束日期', this.dateTime[1] + ' ' + '00:00:00']
param[8] = ['内容', this.contentSearchValue]
param[9] = ['消息来源', this.msgSourceNotLike]
param[10] = ['消息类型', this.msgTypeValue]
return param
},
validateSearch() {
if (this.stationNumberValue === '') {
this.$message.error('请选择工位号')
return false
}
return true
},
searchTable() {
if (!this.validateSearch()) {
return
}
this.loading = true
this.tableData = []
var Data = this.CreateData('11', '日志_工位操作_查询', this.getParam(this.pageCurrent, this.pageSize))
@@ -151,9 +141,6 @@ export default {
})
},
exportExcel() {
if (!this.validateSearch()) {
return
}
if (this.tableData.length === 0) {
this.$message.warning('暂无数据')
return

View File

@@ -210,6 +210,13 @@ export default {
this.fetchData()
},
methods: {
getBusinessResult(response) {
const result = response && response.data && response.data[0] ? response.data[0] : {}
return {
success: result.result === 1 || result.result === '1',
message: result.msg || result.message
}
},
handelAdd() {
this.department = ''
this.attendanceNumber = ''
@@ -290,16 +297,23 @@ export default {
param[1] = ['角色编号', this.form1.roleName]
param[2] = ['项目编号', 10]
console.log('param', param)
var Data = this.CreateData('12', '菜单系统模块_项目角色员工综合_增加数据', param)
var Data = this.CreateData('11', '菜单系统模块_项目角色员工综合_增加数据', param)
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
const result = this.getBusinessResult(response)
if (result.success) {
this.$message.success(result.message || '增加成功')
this.department = ''
this.form1.staffName = ''
this.form1.roleName = ''
this.searchData()
this.dialogFormVisible1 = false
} else { this.$message.error('增加失败') }
} else {
this.$message.error(result.message || '增加失败')
this.handelAdd_disable = false
}
}).catch(() => {
this.handelAdd_disable = false
this.$message.error('增加异常')
})
} else {
console.log('error submit!!')
@@ -315,14 +329,21 @@ export default {
param[0] = ['人员角色流水号', this.personnelStream]
param[1] = ['人员编号', this.personnelNumber]
param[2] = ['角色编号', this.form2.roleName]
var Data = this.CreateData('12', '菜单系统模块_项目角色员工综合_修改数据', param)
var Data = this.CreateData('11', '菜单系统模块_项目角色员工综合_修改数据', param)
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
const result = this.getBusinessResult(response)
if (result.success) {
this.$message.success(result.message || '修改成功')
this.department = ''
this.searchData()
this.dialogFormVisible2 = false
} else { this.$message.error('修改失败') }
} else {
this.$message.error(result.message || '修改失败')
this.handelAdd_disable = false
}
}).catch(() => {
this.handelAdd_disable = false
this.$message.error('修改异常')
})
} else {
console.log('error submit!!')
@@ -347,11 +368,12 @@ export default {
}).then(() => {
var param = []
param[0] = ['人员角色流水号', row.人员角色流水号]
var Data = this.CreateData('12', '菜单系统模块_项目角色员工综合_删除数据', param)
var Data = this.CreateData('11', '菜单系统模块_项目角色员工综合_删除数据', param)
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
} else { this.$message.error('删除失败') }
const result = this.getBusinessResult(response)
if (result.success) {
this.$message.success(result.message || '删除成功')
} else { this.$message.error(result.message || '删除失败') }
this.searchData()
})
}).catch(() => {
@@ -385,4 +407,3 @@ export default {
margin: 5px;
}
</style>

View File

@@ -0,0 +1,482 @@
<template>
<div class="app-container">
<el-card class="topCard">
<el-tabs v-model="activeTab" type="border-card">
<el-tab-pane label="特殊工位定义维护" name="definition">
<div class="topDiv">
<span>类型</span>
<el-input v-model="definitionSearch.type" placeholder="模糊搜索" clearable size="small" style="width: 180px" @keyup.enter.native="handleDefinitionSearch" />
<span style="margin-left: 10px">工位列表</span>
<el-input v-model="definitionSearch.opList" placeholder="模糊搜索" clearable size="small" style="width: 220px" @keyup.enter.native="handleDefinitionSearch" />
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="handleDefinitionSearch">查询</el-button>
<el-button type="success" plain size="small" icon="el-icon-plus" @click="handleDefinitionAdd">新增</el-button>
<el-button :loading="definitionExportLoading" :disabled="definitionExportLoading" type="warning" plain size="small" icon="el-icon-download" @click="exportDefinitionExcel">导出</el-button>
</div>
<el-table
v-loading="definitionLoading"
:data="definitionTableData"
:header-cell-style="{ background: '#eef1f6', color: '#606266' }"
element-loading-text="数据加载中"
style="width: 100%"
max-height="650px"
border
size="mini">
<el-table-column align="center" type="index" width="60" label="序号" />
<el-table-column align="center" prop="type" label="类型" width="220" show-overflow-tooltip />
<el-table-column align="center" prop="opList" label="工位列表" show-overflow-tooltip />
<el-table-column align="center" label="操作" width="160" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleDefinitionEdit(scope.row)">编辑</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" style="color: #F56C6C" @click="handleDefinitionDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
v-if="!definitionLoading"
:current-page="definitionPageCurrent"
:page-sizes="[50, 100, 200]"
:page-size="definitionPageSize"
:total="definitionTotal"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleDefinitionSizeChange"
@current-change="handleDefinitionCurrentChange" />
</div>
</el-tab-pane>
<el-tab-pane label="特殊工位规则配置维护" name="rule">
<div class="topDiv">
<span>类型</span>
<el-select v-model="ruleSearch.type" placeholder="全部" filterable clearable size="small" style="width: 180px">
<el-option v-for="item in definitionTypeOptions" :key="item" :label="item" :value="item" />
</el-select>
<span style="margin-left: 10px">工位</span>
<el-input v-model="ruleSearch.opName" placeholder="模糊搜索" clearable size="small" style="width: 140px" @keyup.enter.native="handleRuleSearch" />
<span style="margin-left: 10px">规则键</span>
<el-input v-model="ruleSearch.ruleKey" placeholder="模糊搜索" clearable size="small" style="width: 140px" @keyup.enter.native="handleRuleSearch" />
<span style="margin-left: 10px">启用</span>
<el-select v-model="ruleSearch.enable" placeholder="全部" clearable size="small" style="width: 100px">
<el-option label="启用" value="1" />
<el-option label="禁用" value="0" />
</el-select>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="handleRuleSearch">查询</el-button>
<el-button type="success" plain size="small" icon="el-icon-plus" @click="handleRuleAdd">新增</el-button>
<el-button :loading="ruleExportLoading" :disabled="ruleExportLoading" type="warning" plain size="small" icon="el-icon-download" @click="exportRuleExcel">导出</el-button>
</div>
<el-table
v-loading="ruleLoading"
:data="ruleTableData"
:header-cell-style="{ background: '#eef1f6', color: '#606266' }"
element-loading-text="数据加载中"
style="width: 100%"
max-height="650px"
border
size="mini">
<el-table-column align="center" type="index" width="60" label="序号" />
<el-table-column align="center" prop="id" label="ID" width="80" />
<el-table-column align="center" prop="type" label="类型" width="190" show-overflow-tooltip />
<el-table-column align="center" prop="opName" label="工位" width="120" />
<el-table-column align="center" prop="ruleKey" label="规则键" width="140" show-overflow-tooltip />
<el-table-column align="center" prop="ruleValue" label="规则值" min-width="180" show-overflow-tooltip />
<el-table-column align="center" label="启用" width="80">
<template slot-scope="scope">
<el-tag :type="scope.row.enable ? 'success' : 'danger'" size="mini">
{{ scope.row.enable ? '启用' : '禁用' }}
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="remark" label="备注" min-width="180" show-overflow-tooltip />
<el-table-column align="center" label="操作" width="160" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleRuleEdit(scope.row)">编辑</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" style="color: #F56C6C" @click="handleRuleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
v-if="!ruleLoading"
:current-page="rulePageCurrent"
:page-sizes="[50, 100, 200]"
:page-size="rulePageSize"
:total="ruleTotal"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleRuleSizeChange"
@current-change="handleRuleCurrentChange" />
</div>
</el-tab-pane>
</el-tabs>
</el-card>
<el-dialog :visible.sync="definitionDialogVisible" :title="definitionDialogTitle" center width="520px" :close-on-click-modal="false">
<el-form ref="definitionForm" :model="definitionForm" :rules="definitionRules" label-position="right" label-width="90px" size="small">
<el-form-item label="类型:" prop="type">
<el-input v-model="definitionForm.type" :disabled="definitionDialogType === 'edit'" placeholder="请输入类型" clearable />
</el-form-item>
<el-form-item label="工位列表:" prop="opList">
<el-input v-model="definitionForm.opList" type="textarea" :rows="4" placeholder="多个工位用英文逗号分隔,如 OP100,OP120" clearable />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="definitionDialogVisible = false">取消</el-button>
<el-button type="primary" size="small" :loading="definitionSubmitLoading" @click="submitDefinitionForm">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="ruleDialogVisible" :title="ruleDialogTitle" center width="620px" :close-on-click-modal="false">
<el-form ref="ruleForm" :model="ruleForm" :rules="ruleRules" label-position="right" label-width="90px" size="small">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="类型:" prop="type">
<el-select v-model="ruleForm.type" placeholder="请选择类型" filterable allow-create default-first-option style="width: 100%">
<el-option v-for="item in definitionTypeOptions" :key="item" :label="item" :value="item" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工位:" prop="opName">
<el-input v-model="ruleForm.opName" placeholder="请输入工位" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="规则键:" prop="ruleKey">
<el-input v-model="ruleForm.ruleKey" placeholder="请输入规则键" clearable />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="启用:" prop="enable">
<el-switch v-model="ruleForm.enable" :active-value="1" :inactive-value="0" active-text="启用" inactive-text="禁用" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="规则值:" prop="ruleValue">
<el-input v-model="ruleForm.ruleValue" placeholder="请输入规则值" clearable />
</el-form-item>
<el-form-item label="备注:" prop="remark">
<el-input v-model="ruleForm.remark" type="textarea" :rows="3" placeholder="请输入备注" clearable />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="ruleDialogVisible = false">取消</el-button>
<el-button type="primary" size="small" :loading="ruleSubmitLoading" @click="submitRuleForm">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
activeTab: 'definition',
definitionLoading: false,
definitionExportLoading: false,
definitionSubmitLoading: false,
definitionTableData: [],
definitionTypeOptions: [],
definitionSearch: {
type: '',
opList: ''
},
definitionTotal: 0,
definitionPageSize: 50,
definitionPageCurrent: 1,
definitionDialogVisible: false,
definitionDialogType: 'add',
definitionForm: this.getEmptyDefinitionForm(),
definitionRules: {
type: [{ required: true, message: '请输入类型', trigger: 'blur' }]
},
ruleLoading: false,
ruleExportLoading: false,
ruleSubmitLoading: false,
ruleTableData: [],
ruleSearch: {
type: '',
opName: '',
ruleKey: '',
enable: ''
},
ruleTotal: 0,
rulePageSize: 50,
rulePageCurrent: 1,
ruleDialogVisible: false,
ruleDialogType: 'add',
ruleForm: this.getEmptyRuleForm(),
ruleRules: {
type: [{ required: true, message: '请选择类型', trigger: 'change' }],
opName: [{ required: true, message: '请输入工位', trigger: 'blur' }],
ruleKey: [{ required: true, message: '请输入规则键', trigger: 'blur' }],
enable: [{ required: true, message: '请选择启用状态', trigger: 'change' }]
}
}
},
computed: {
definitionDialogTitle() {
return this.definitionDialogType === 'add' ? '新增特殊工位定义' : '编辑特殊工位定义'
},
ruleDialogTitle() {
return this.ruleDialogType === 'add' ? '新增特殊工位规则' : '编辑特殊工位规则'
}
},
created() {
this.getDefinitionData()
this.getRuleData()
},
methods: {
getEmptyDefinitionForm() {
return {
type: '',
opList: ''
}
},
getEmptyRuleForm() {
return {
id: '',
type: '',
opName: '',
ruleKey: '',
ruleValue: '',
enable: 1,
remark: ''
}
},
getDefinitionParam(pageCurrent, pageSize) {
var param = []
param[0] = ['类型', this.definitionSearch.type]
param[1] = ['工位列表', this.definitionSearch.opList]
param[2] = ['PageCurrent', pageCurrent]
param[3] = ['PageSize', pageSize]
param[4] = ['PageCount', '1111', 'int', '1']
param[5] = ['ItemCount', '1111', 'int', '1']
return param
},
getRuleParam(pageCurrent, pageSize) {
var param = []
param[0] = ['类型', this.ruleSearch.type]
param[1] = ['工位', this.ruleSearch.opName]
param[2] = ['规则键', this.ruleSearch.ruleKey]
param[3] = ['启用', this.ruleSearch.enable]
param[4] = ['PageCurrent', pageCurrent]
param[5] = ['PageSize', pageSize]
param[6] = ['PageCount', '1111', 'int', '1']
param[7] = ['ItemCount', '1111', 'int', '1']
return param
},
getDefinitionData() {
this.definitionLoading = true
var Data = this.CreateData('11', '中控参数维护_特殊工位定义_分页查询', this.getDefinitionParam(this.definitionPageCurrent, this.definitionPageSize))
this.ExecDatabase(Data).then(response => {
this.definitionTableData = response.data && response.data.result ? response.data.result : []
this.definitionTotal = response.data && response.data.output && response.data.output[0] ? parseInt(response.data.output[0].ItemCount) || 0 : 0
this.definitionTypeOptions = this.definitionTableData.map(item => item.type)
this.definitionLoading = false
}).catch(error => {
console.error('查询特殊工位定义失败:', error)
this.$message.error('查询特殊工位定义失败')
this.definitionLoading = false
})
},
getRuleData() {
this.ruleLoading = true
var Data = this.CreateData('11', '中控参数维护_特殊工位规则_分页查询', this.getRuleParam(this.rulePageCurrent, this.rulePageSize))
this.ExecDatabase(Data).then(response => {
this.ruleTableData = response.data && response.data.result ? response.data.result : []
this.ruleTotal = response.data && response.data.output && response.data.output[0] ? parseInt(response.data.output[0].ItemCount) || 0 : 0
this.ruleLoading = false
}).catch(error => {
console.error('查询特殊工位规则失败:', error)
this.$message.error('查询特殊工位规则失败')
this.ruleLoading = false
})
},
handleDefinitionSearch() {
this.definitionPageCurrent = 1
this.getDefinitionData()
},
handleRuleSearch() {
this.rulePageCurrent = 1
this.getRuleData()
},
handleDefinitionAdd() {
this.definitionDialogType = 'add'
this.definitionForm = this.getEmptyDefinitionForm()
this.definitionDialogVisible = true
this.$nextTick(() => {
this.$refs.definitionForm && this.$refs.definitionForm.clearValidate()
})
},
handleDefinitionEdit(row) {
this.definitionDialogType = 'edit'
this.definitionForm = {
type: row.type,
opList: row.opList
}
this.definitionDialogVisible = true
this.$nextTick(() => {
this.$refs.definitionForm && this.$refs.definitionForm.clearValidate()
})
},
handleRuleAdd() {
this.ruleDialogType = 'add'
this.ruleForm = this.getEmptyRuleForm()
this.ruleDialogVisible = true
this.$nextTick(() => {
this.$refs.ruleForm && this.$refs.ruleForm.clearValidate()
})
},
handleRuleEdit(row) {
this.ruleDialogType = 'edit'
this.ruleForm = {
id: row.id,
type: row.type,
opName: row.opName,
ruleKey: row.ruleKey,
ruleValue: row.ruleValue,
enable: row.enable ? 1 : 0,
remark: row.remark
}
this.ruleDialogVisible = true
this.$nextTick(() => {
this.$refs.ruleForm && this.$refs.ruleForm.clearValidate()
})
},
submitDefinitionForm() {
this.$refs.definitionForm.validate(valid => {
if (!valid) return
this.definitionSubmitLoading = true
var param = []
param[0] = ['类型', this.definitionForm.type]
param[1] = ['工位列表', this.definitionForm.opList]
var procedureName = this.definitionDialogType === 'add' ? '中控参数维护_特殊工位定义_增加' : '中控参数维护_特殊工位定义_编辑'
var Data = this.CreateData('11', procedureName, param)
this.ExecDatabase(Data).then(response => {
this.handleSubmitResult(response, () => {
this.definitionDialogVisible = false
this.getDefinitionData()
})
this.definitionSubmitLoading = false
}).catch(error => {
console.error('保存特殊工位定义失败:', error)
this.$message.error('保存特殊工位定义失败')
this.definitionSubmitLoading = false
})
})
},
submitRuleForm() {
this.$refs.ruleForm.validate(valid => {
if (!valid) return
this.ruleSubmitLoading = true
var param = []
param[0] = ['ID', this.ruleForm.id]
param[1] = ['类型', this.ruleForm.type]
param[2] = ['工位', this.ruleForm.opName]
param[3] = ['规则键', this.ruleForm.ruleKey]
param[4] = ['规则值', this.ruleForm.ruleValue]
param[5] = ['启用', this.ruleForm.enable]
param[6] = ['备注', this.ruleForm.remark]
var procedureName = this.ruleDialogType === 'add' ? '中控参数维护_特殊工位规则_增加' : '中控参数维护_特殊工位规则_编辑'
var Data = this.CreateData('11', procedureName, param)
this.ExecDatabase(Data).then(response => {
this.handleSubmitResult(response, () => {
this.ruleDialogVisible = false
this.getRuleData()
})
this.ruleSubmitLoading = false
}).catch(error => {
console.error('保存特殊工位规则失败:', error)
this.$message.error('保存特殊工位规则失败')
this.ruleSubmitLoading = false
})
})
},
handleDefinitionDelete(row) {
this.$confirm('确认删除该特殊工位定义吗?', '提示', { type: 'warning' }).then(() => {
var param = []
param[0] = ['类型', row.type]
var Data = this.CreateData('11', '中控参数维护_特殊工位定义_删除', param)
this.ExecDatabase(Data).then(response => {
this.handleSubmitResult(response, () => {
this.getDefinitionData()
})
})
}).catch(() => {})
},
handleRuleDelete(row) {
this.$confirm('确认删除该特殊工位规则吗?', '提示', { type: 'warning' }).then(() => {
var param = []
param[0] = ['ID', row.id]
var Data = this.CreateData('11', '中控参数维护_特殊工位规则_删除', param)
this.ExecDatabase(Data).then(response => {
this.handleSubmitResult(response, () => {
this.getRuleData()
})
})
}).catch(() => {})
},
handleSubmitResult(response, callback) {
var result = response.data && response.data[0] ? response.data[0] : {}
if (result.result === 1) {
this.$message.success(result.msg || '操作成功')
callback && callback()
} else {
this.$message.error(result.msg || '操作失败')
}
},
exportDefinitionExcel() {
if (this.definitionTableData.length === 0) {
this.$message.warning('暂无数据')
return
}
var exportData = JSON.parse(this.CreateData('2005', '中控参数维护_特殊工位定义_分页查询', this.getDefinitionParam(1, 99999999)))
exportData.exportFileName = '特殊工位定义维护'
exportData.exportColumns = 'type=类型,opList=工位列表'
this.runExcelExport(JSON.stringify(exportData), 'definitionExportLoading')
},
exportRuleExcel() {
if (this.ruleTableData.length === 0) {
this.$message.warning('暂无数据')
return
}
var exportData = JSON.parse(this.CreateData('2005', '中控参数维护_特殊工位规则_分页查询', this.getRuleParam(1, 99999999)))
exportData.exportFileName = '特殊工位规则配置维护'
exportData.exportColumns = 'id=ID,type=类型,opName=工位,ruleKey=规则键,ruleValue=规则值,enable=启用,remark=备注'
this.runExcelExport(JSON.stringify(exportData), 'ruleExportLoading')
},
handleDefinitionSizeChange(val) {
this.definitionPageCurrent = 1
this.definitionPageSize = val
this.getDefinitionData()
},
handleDefinitionCurrentChange(val) {
this.definitionPageCurrent = val
this.getDefinitionData()
},
handleRuleSizeChange(val) {
this.rulePageCurrent = 1
this.rulePageSize = val
this.getRuleData()
},
handleRuleCurrentChange(val) {
this.rulePageCurrent = val
this.getRuleData()
}
}
}
</script>
<style scoped>
.topCard {
margin: 5px;
}
.topDiv {
margin-bottom: 10px;
}
</style>

View File

@@ -60,7 +60,10 @@
<div class="panel table-panel">
<div class="panel-title-row">
<div class="panel-title">今日产品列表</div>
<el-checkbox v-model="lineDataMap[line.key].onlyNG" size="mini" @change="$forceUpdate()">只看不合格</el-checkbox>
<div class="panel-actions">
<el-button :loading="exportLoading" :disabled="exportLoading" type="warning" plain size="mini" icon="el-icon-download" @click="exportLineProductList(line)">导出</el-button>
<el-checkbox v-model="lineDataMap[line.key].onlyNG" size="mini" @change="$forceUpdate()">只看不合格</el-checkbox>
</div>
</div>
<div class="panel-subtitle">
合格 <span class="count-ok">{{ getPassCount(line.key) }}</span>
@@ -90,7 +93,7 @@
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column prop="发动机号" label="产品编号" min-width="200" show-overflow-tooltip />
<el-table-column prop="产品型号" label="型号" width="70" align="center" />
<el-table-column prop="产品型号" label="型号" width="80" align="center" />
<el-table-column prop="当前工位" label="当前工位" width="90" align="center" />
<el-table-column label="创建时间" width="150" align="center">
<template slot-scope="scope">{{ formatTime(scope.row.创建时间) }}</template>
@@ -151,7 +154,10 @@
<div class="panel table-panel">
<div class="panel-title-row">
<div class="panel-title">产品明细</div>
<el-checkbox v-model="stationOnlyNG" size="mini">只看不合格</el-checkbox>
<div class="panel-actions">
<el-button :loading="exportLoading" :disabled="exportLoading" type="warning" plain size="mini" icon="el-icon-download" @click="exportStationProductList">导出</el-button>
<el-checkbox v-model="stationOnlyNG" size="mini">只看不合格</el-checkbox>
</div>
</div>
<el-table
:data="filteredStationProductList"
@@ -200,6 +206,7 @@ export default {
activeTab: 'line',
queryDate: '',
loading: false,
exportLoading: false,
pendingCount: 0,
// 整线Tab
lineConfigs: [
@@ -361,6 +368,18 @@ export default {
}
return list
},
exportLineProductList(line) {
if (this.getFilteredProductList(line.key).length === 0) {
this.$message.warning('暂无数据')
return
}
const param = [['查询日期', this.queryDate], ['SearchType', line.searchType]]
const exportData = JSON.parse(this.CreateData('2005', '一次合格率_产品列表', param))
exportData.exportFileName = `${line.title}一次合格率产品列表_`
exportData.exportColumns = '发动机号=产品编号,产品型号=型号,上线时间,下线时间,是否一次合格=一次合格状态'
const Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
},
formatTime(val) {
if (!val) return ''
const d = new Date(val)
@@ -405,6 +424,23 @@ export default {
this.stationData = { total: 0, pass: 0, fail: 0, rate: 0, productList: [] }
}).finally(() => { this.loading = false })
},
exportStationProductList() {
const stationList = this.buildStationList()
if (!this.startStation || !this.endStation || !stationList) {
this.$message.warning('请选择有效的工位范围')
return
}
if (this.filteredStationProductList.length === 0) {
this.$message.warning('暂无数据')
return
}
const param = [['查询日期', this.queryDate], ['工位号列表', stationList]]
const exportData = JSON.parse(this.CreateData('2005', '一次合格率_工位合格率', param))
exportData.exportFileName = '工位一次合格率产品明细_'
exportData.exportColumns = '发动机号=产品编号,产品型号=型号,上线时间,下线时间,是否一次合格=一次合格状态'
const Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
},
// ========== 不合格详情 ==========
handleExpandChange(row, expandedRows) {
@@ -707,6 +743,7 @@ export default {
}
.panel-title { font-size: 15px; font-weight: 700; color: #233445; }
.panel-title-row { display: flex; justify-content: space-between; align-items: center; }
.panel-actions { display: flex; align-items: center; gap: 10px; }
.panel-subtitle { margin-top: 4px; margin-bottom: 10px; font-size: 12px; color: #6f7f8f; }
.bar-canvas { width: 100%; min-height: 250px; }

View File

@@ -286,9 +286,7 @@ export default {
}
})
},
selectDate() {
this.tableData = []
this.loading = true
getParam(pageCurrent, pageSize) {
let orderNumberValue_check, stationNumberValue_check, stationNumberValueN_check, assemblyNumberValue_check, engineTypeValue_check
this.assemblyNumberValue ? assemblyNumberValue_check = 1 : (assemblyNumberValue_check = 0, this.assemblyNumberValue = '')
this.stationNumberValue ? stationNumberValue_check = 1 : (stationNumberValue_check = 0, this.stationNumberValue = '')
@@ -308,10 +306,16 @@ export default {
param[9] = ['订单号', this.orderNumberValue]
param[10] = ['机型_ischeck', engineTypeValue_check]
param[11] = ['机型', this.engineTypeValue]
param[12] = ['PageCurrent', this.pageCurrent]
param[13] = ['PageSize', this.pageSize]
param[12] = ['PageCurrent', pageCurrent]
param[13] = ['PageSize', pageSize]
param[14] = ['PageCount', '1111', 'int', '1']
param[15] = ['ItemCount', '1111', 'int', '1']
return param
},
selectDate() {
this.tableData = []
this.loading = true
var param = this.getParam(this.pageCurrent, this.pageSize)
var Data = this.CreateData('11', '质量数据查询_测量数据发动机在线状态_查询_NEW', param)
this.ExecDatabase(Data).then(response => {
if (response.data.result.length !== 0) {
@@ -323,29 +327,7 @@ export default {
},
exportExcel() {
if (this.tableData.length !== 0) {
let orderNumberValue_check, stationNumberValue_check, stationNumberValueN_check, assemblyNumberValue_check, engineTypeValue_check
this.assemblyNumberValue ? assemblyNumberValue_check = 1 : (assemblyNumberValue_check = 0, this.assemblyNumberValue = '')
this.stationNumberValue ? stationNumberValue_check = 1 : (stationNumberValue_check = 0, this.stationNumberValue = '')
this.stationNumberValueN ? stationNumberValueN_check = 1 : (stationNumberValueN_check = 0, this.stationNumberValueN = '')
this.orderNumberValue ? orderNumberValue_check = 1 : (orderNumberValue_check = 0, this.orderNumberValue = '')
this.engineTypeValue ? engineTypeValue_check = 1 : (engineTypeValue_check = 0, this.engineTypeValue = '')
var param = []
param[0] = ['开始时间', this.dateTime[0]]
param[1] = ['结束时间', this.dateTime[1]]
param[2] = ['工位号N_ischeck', stationNumberValueN_check]
param[3] = ['工位号N', this.stationNumberValueN]
param[4] = ['发动机号_check', assemblyNumberValue_check]
param[5] = ['发动机号', this.assemblyNumberValue]
param[6] = ['工位号_check', stationNumberValue_check]
param[7] = ['工位号', this.stationNumberValue]
param[8] = ['订单号_ischeck', orderNumberValue_check]
param[9] = ['订单号', this.orderNumberValue]
param[10] = ['机型_ischeck', engineTypeValue_check]
param[11] = ['机型', this.engineTypeValue]
param[12] = ['PageCurrent', 1]
param[13] = ['PageSize', 99999999]
param[14] = ['PageCount', '1111', 'int', '1']
param[15] = ['ItemCount', '1111', 'int', '1']
var param = this.getParam(1, 99999999)
var exportData = JSON.parse(this.CreateData('2005', '质量数据查询_测量数据发动机在线状态_查询_NEW', param))
exportData.exportFileName = '过站信息查询'
exportData.exportColumns = '机型=产品型号,发动机号=产品编号,工位号,托盘编号,到达时间,离开时间,在线时间=生产节拍(m),是否合格'

View File

@@ -1,89 +1,194 @@
<template>
<div class="app-container">
<el-card class="topCard">
<div class="topDiv">
<span style="margin-left: 10px">产品编号</span>
<el-input v-model="productNoValue" placeholder="请输入产品编号" clearable size="small" style="width: 190px" @keyup.enter.native="handleSearch" />
<el-tabs v-model="activeTab" @tab-click="handleTabClick">
<el-tab-pane label="校验记录" name="verifyRecord">
<div class="topDiv">
<span style="margin-left: 10px">产品编号</span>
<el-input v-model="productNoValue" placeholder="请输入产品编号" clearable size="small" style="width: 190px" @keyup.enter.native="handleSearch" />
<span style="margin-left: 10px">产品型号</span>
<el-input v-model="productTypeValue" placeholder="请输入产品型号" clearable size="small" style="width: 150px" @keyup.enter.native="handleSearch" />
<span style="margin-left: 10px">产品型号</span>
<el-input v-model="productTypeValue" placeholder="请输入产品型号" clearable size="small" style="width: 150px" @keyup.enter.native="handleSearch" />
<span style="margin-left: 10px">操作人</span>
<el-input v-model="operatorValue" placeholder="请输入操作人" clearable size="small" style="width: 120px" @keyup.enter.native="handleSearch" />
<span style="margin-left: 10px">操作人</span>
<el-input v-model="operatorValue" placeholder="请输入操作人" clearable size="small" style="width: 120px" @keyup.enter.native="handleSearch" />
<span style="margin-left: 10px">校验状态</span>
<el-select v-model="verifyStatusValue" placeholder="请选择" clearable size="small" style="width: 120px">
<el-option label="全部" value="" />
<el-option label="进行中" value="0" />
<el-option label="成功" value="1" />
<el-option label="失败" value="2" />
</el-select>
<span style="margin-left: 10px">校验状态</span>
<el-select v-model="verifyStatusValue" placeholder="请选择" clearable size="small" style="width: 120px">
<el-option label="全部" value="" />
<el-option label="进行中" value="0" />
<el-option label="成功" value="1" />
<el-option label="失败" value="2" />
</el-select>
<span style="margin-left: 10px">记录时间</span>
<el-date-picker
v-model="dateTime"
:clearable="false"
size="small"
type="datetimerange"
align="center"
style="width: 360px"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
range-separator=""
start-placeholder="开始时间"
end-placeholder="结束时间" />
<span style="margin-left: 10px">记录时间</span>
<el-date-picker
v-model="dateTime"
:clearable="false"
size="small"
type="datetimerange"
align="center"
style="width: 360px"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
range-separator=""
start-placeholder="开始时间"
end-placeholder="结束时间" />
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 5px" @click="handleSearch">查询</el-button>
<el-button :loading="exportLoading" :disabled="exportLoading" type="info" size="small" icon="el-icon-download" style="margin-left: 5px" @click="exportExcel">Excel</el-button>
</div>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 5px" @click="handleSearch">查询</el-button>
<el-button :loading="exportLoading" :disabled="exportLoading" type="info" size="small" icon="el-icon-download" style="margin-left: 5px" @click="exportExcel">Excel</el-button>
</div>
<el-table
v-loading="loading"
:data="tableData"
:header-cell-style="{ background: '#eef1f6', color: '#606266' }"
element-loading-text="数据加载中"
highlight-current-row
border
size="mini"
height="620px"
style="width: 100%">
<el-table-column width="60" label="序号" type="index" align="center" />
<el-table-column label="产品编号" width="200" align="center" prop="产品编号" show-overflow-tooltip />
<el-table-column label="产品型号" width="120" align="center" prop="产品型号" show-overflow-tooltip />
<el-table-column label="机型代码" width="90" align="center" prop="机型代码" show-overflow-tooltip />
<el-table-column label="扫描箱体码" width="250" align="center" prop="扫描箱体码" show-overflow-tooltip />
<el-table-column label="扫描客户标签码" min-width="200" align="center" prop="扫描客户标签码" show-overflow-tooltip />
<el-table-column label="箱体码结果" width="100" align="center">
<template slot-scope="scope">
<el-tag :type="getResultType(scope.row.箱体码校验结果)" size="mini">{{ getResultText(scope.row.箱体码校验结果) }}</el-tag>
</template>
</el-table-column>
<el-table-column label="客户标签结果" width="110" align="center">
<template slot-scope="scope">
<el-tag :type="getResultType(scope.row.客户标签码校验结果)" size="mini">{{ getResultText(scope.row.客户标签码校验结果) }}</el-tag>
</template>
</el-table-column>
<el-table-column label="校验状态" width="100" align="center">
<template slot-scope="scope">
<el-tag :type="getStatusType(scope.row.校验状态)" size="mini">{{ getStatusText(scope.row.校验状态) }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作人" width="110" align="center" prop="操作人" show-overflow-tooltip />
<el-table-column label="创建时间" width="160" align="center" prop="创建时间" show-overflow-tooltip />
<el-table-column label="完成时间" width="160" align="center" prop="完成时间" show-overflow-tooltip />
</el-table>
<el-table
v-loading="loading"
:data="tableData"
:header-cell-style="{ background: '#eef1f6', color: '#606266' }"
element-loading-text="数据加载中"
highlight-current-row
border
size="mini"
height="620px"
style="width: 100%">
<el-table-column width="60" label="序号" type="index" align="center" />
<el-table-column label="产品编号" width="200" align="center" prop="产品编号" show-overflow-tooltip />
<el-table-column label="产品型号" width="120" align="center" prop="产品型号" show-overflow-tooltip />
<el-table-column label="机型代码" width="90" align="center" prop="机型代码" show-overflow-tooltip />
<el-table-column label="扫描箱体码" width="250" align="center" prop="扫描箱体码" show-overflow-tooltip />
<el-table-column label="扫描客户标签码" min-width="200" align="center" prop="扫描客户标签码" show-overflow-tooltip />
<el-table-column label="箱体码结果" width="100" align="center">
<template slot-scope="scope">
<el-tag :type="getResultType(scope.row.箱体码校验结果)" size="mini">{{ getResultText(scope.row.箱体码校验结果) }}</el-tag>
</template>
</el-table-column>
<el-table-column label="客户标签结果" width="110" align="center">
<template slot-scope="scope">
<el-tag :type="getResultType(scope.row.客户标签码校验结果)" size="mini">{{ getResultText(scope.row.客户标签码校验结果) }}</el-tag>
</template>
</el-table-column>
<el-table-column label="校验状态" width="100" align="center">
<template slot-scope="scope">
<el-tag :type="getStatusType(scope.row.校验状态)" size="mini">{{ getStatusText(scope.row.校验状态) }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作人" width="110" align="center" prop="操作人" show-overflow-tooltip />
<el-table-column label="创建时间" width="160" align="center" prop="创建时间" show-overflow-tooltip />
<el-table-column label="完成时间" width="160" align="center" prop="完成时间" show-overflow-tooltip />
</el-table>
<div class="block" style="margin-top: 10px">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-sizes="[50, 100, 200]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange" />
</div>
<div class="block" style="margin-top: 10px">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-sizes="[50, 100, 200]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange" />
</div>
</el-tab-pane>
<el-tab-pane label="下线产品校验核对" name="offlineProduct">
<div class="topDiv">
<div class="filter-line">
<span style="margin-left: 10px">下线时间</span>
<el-date-picker
v-model="offlineDateTime"
:clearable="false"
size="small"
type="datetimerange"
align="center"
style="width: 360px"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
range-separator=""
start-placeholder="开始时间"
end-placeholder="结束时间" />
<span style="margin-left: 10px">产品编号</span>
<el-input v-model="offlineProductNoValue" placeholder="请输入产品编号" clearable size="small" style="width: 180px" @keyup.enter.native="handleOfflineSearch" />
<span style="margin-left: 10px">产品型号</span>
<el-input v-model="offlineProductTypeValue" placeholder="请输入产品型号" clearable size="small" style="width: 140px" @keyup.enter.native="handleOfflineSearch" />
<span style="margin-left: 10px">校验情况</span>
<el-select v-model="offlineVerifyStatusValue" placeholder="请选择" clearable size="small" style="width: 120px">
<el-option label="全部" value="" />
<el-option label="已完成" value="done" />
<el-option label="未完成" value="undone" />
</el-select>
</div>
<div class="filter-line">
<span style="margin-left: 10px">PACK码</span>
<el-input v-model="offlinePackCodeValue" placeholder="请输入PACK码" clearable size="small" style="width: 180px" @keyup.enter.native="handleOfflineSearch" />
<span style="margin-left: 10px">模组码</span>
<el-input v-model="offlineModuleCodeValue" placeholder="请输入模组码" clearable size="small" style="width: 180px" @keyup.enter.native="handleOfflineSearch" />
<span style="margin-left: 10px">箱体码</span>
<el-input v-model="offlineBoxCodeValue" placeholder="请输入箱体码" clearable size="small" style="width: 180px" @keyup.enter.native="handleOfflineSearch" />
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 5px" @click="handleOfflineSearch">查询</el-button>
<el-button :loading="offlineExportLoading" :disabled="offlineExportLoading" type="info" size="small" icon="el-icon-download" style="margin-left: 5px" @click="exportOfflineExcel">Excel</el-button>
</div>
</div>
<el-table
v-loading="offlineLoading"
:data="offlineTableData"
:header-cell-style="{ background: '#eef1f6', color: '#606266' }"
element-loading-text="数据加载中"
highlight-current-row
border
size="mini"
height="620px"
style="width: 100%">
<el-table-column width="60" label="序号" type="index" align="center" />
<el-table-column label="校验情况" width="100" align="center">
<template slot-scope="scope">
<el-tag :type="getOfflineVerifyType(scope.row)" size="mini">{{ getOfflineVerifyText(scope.row) }}</el-tag>
</template>
</el-table-column>
<el-table-column label="产品编号" width="200" align="center" prop="产品编号" show-overflow-tooltip />
<el-table-column label="产品型号" width="120" align="center" prop="产品型号" show-overflow-tooltip />
<el-table-column label="机型代码" width="90" align="center" prop="机型代码" show-overflow-tooltip />
<el-table-column label="下线时间" width="160" align="center" prop="下线时间" show-overflow-tooltip />
<el-table-column label="PACK码" width="200" align="center" prop="PACK码" show-overflow-tooltip />
<el-table-column label="模组码" width="200" align="center" prop="模组码" show-overflow-tooltip />
<el-table-column label="计划箱体码" width="220" align="center" prop="计划箱体码" show-overflow-tooltip />
<el-table-column label="扫描箱体码" width="220" align="center" prop="扫描箱体码" show-overflow-tooltip />
<el-table-column label="扫描客户标签码" width="220" align="center" prop="扫描客户标签码" show-overflow-tooltip />
<el-table-column label="箱体码结果" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="hasVerifyRecord(scope.row)" :type="getResultType(scope.row.箱体码校验结果)" size="mini">{{ getResultText(scope.row.箱体码校验结果) }}</el-tag>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="客户标签结果" width="110" align="center">
<template slot-scope="scope">
<el-tag v-if="hasVerifyRecord(scope.row)" :type="getResultType(scope.row.客户标签码校验结果)" size="mini">{{ getResultText(scope.row.客户标签码校验结果) }}</el-tag>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="操作人" width="110" align="center" prop="操作人" show-overflow-tooltip />
<el-table-column label="记录创建时间" width="160" align="center" prop="记录创建时间" show-overflow-tooltip />
<el-table-column label="完成时间" width="160" align="center" prop="完成时间" show-overflow-tooltip />
</el-table>
<div class="block" style="margin-top: 10px">
<el-pagination
v-if="!offlineLoading"
:current-page="offlinePageCurrent"
:page-sizes="[50, 100, 200]"
:page-size="offlinePageSize"
:total="offlineTotal"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleOfflineSizeChange"
@current-change="handleOfflineCurrentChange" />
</div>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</template>
@@ -92,6 +197,7 @@
export default {
data() {
return {
activeTab: 'verifyRecord',
loading: false,
tableData: [],
productNoValue: '',
@@ -102,11 +208,26 @@ export default {
total: 0,
pageSize: 50,
pageCurrent: 1,
exportLoading: false
exportLoading: false,
offlineLoaded: false,
offlineLoading: false,
offlineTableData: [],
offlineDateTime: [],
offlineProductNoValue: '',
offlineProductTypeValue: '',
offlinePackCodeValue: '',
offlineModuleCodeValue: '',
offlineBoxCodeValue: '',
offlineVerifyStatusValue: '',
offlineTotal: 0,
offlinePageSize: 50,
offlinePageCurrent: 1,
offlineExportLoading: false
}
},
created() {
this.initDateTime()
this.initOfflineDateTime()
this.searchTable()
},
methods: {
@@ -115,11 +236,18 @@ export default {
const start = new Date(end.getTime() - 7 * 24 * 60 * 60 * 1000)
this.dateTime = [this.formatDateTime(start, '00:00:00'), this.formatDateTime(end, '23:59:59')]
},
initOfflineDateTime() {
const today = new Date()
this.offlineDateTime = [this.formatDateTime(today, '00:00:00'), this.formatDateTime(today, '23:59:59')]
},
formatDateTime(date, timeText) {
return `${this.formatDate(date)} ${timeText}`
},
formatDate(date) {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
return `${year}-${month}-${day} ${timeText}`
return `${year}-${month}-${day}`
},
getParam(pageCurrent, pageSize) {
const param = []
@@ -135,6 +263,22 @@ export default {
param[9] = ['ItemCount', '1111', 'int', '1']
return param
},
getOfflineParam(pageCurrent, pageSize) {
const param = []
param[0] = ['开始时间', this.offlineDateTime && this.offlineDateTime[0] ? this.offlineDateTime[0] : '']
param[1] = ['结束时间', this.offlineDateTime && this.offlineDateTime[1] ? this.offlineDateTime[1] : '']
param[2] = ['产品编号', this.offlineProductNoValue || '']
param[3] = ['产品型号', this.offlineProductTypeValue || '']
param[4] = ['PACK码', this.offlinePackCodeValue || '']
param[5] = ['模组码', this.offlineModuleCodeValue || '']
param[6] = ['箱体码', this.offlineBoxCodeValue || '']
param[7] = ['校验情况', this.offlineVerifyStatusValue || '']
param[8] = ['PageCurrent', pageCurrent]
param[9] = ['PageSize', pageSize]
param[10] = ['PageCount', '1111', 'int', '1']
param[11] = ['ItemCount', '1111', 'int', '1']
return param
},
searchTable() {
this.loading = true
this.tableData = []
@@ -149,11 +293,42 @@ export default {
this.loading = false
})
},
searchOfflineTable() {
if (!Array.isArray(this.offlineDateTime) || this.offlineDateTime.length !== 2) {
this.$message.warning('请选择下线时间')
this.offlineTableData = []
this.offlineTotal = 0
return
}
this.offlineLoading = true
this.offlineLoaded = true
this.offlineTableData = []
const Data = this.CreateData('11', 'PACK下线三码校验_下线产品覆盖_分页查询', this.getOfflineParam(this.offlinePageCurrent, this.offlinePageSize))
this.ExecDatabase(Data).then(response => {
this.offlineTableData = response.data && response.data.result ? response.data.result : []
this.offlineTotal = response.data && response.data.output && response.data.output[0] ? parseInt(response.data.output[0].ItemCount) || 0 : 0
this.offlineLoading = false
}).catch(error => {
console.error('查询下线产品三码校验核对失败:', error)
this.$message.error('查询下线产品三码校验核对失败')
this.offlineLoading = false
})
},
handleTabClick(tab) {
if (tab.name === 'offlineProduct' && !this.offlineLoaded) {
this.searchOfflineTable()
}
},
handleSearch() {
this.pageCurrent = 1
this.pageSize = 50
this.searchTable()
},
handleOfflineSearch() {
this.offlinePageCurrent = 1
this.offlinePageSize = 50
this.searchOfflineTable()
},
exportExcel() {
if (this.tableData.length === 0) {
this.$message.warning('暂无数据')
@@ -165,6 +340,26 @@ export default {
const Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
},
exportOfflineExcel() {
if (this.offlineTableData.length === 0) {
this.$message.warning('暂无数据')
return
}
const exportData = JSON.parse(this.CreateData('2005', 'PACK下线三码校验_下线产品覆盖_分页查询', this.getOfflineParam(1, 99999999)))
exportData.exportFileName = '下线产品三码校验核对'
exportData.exportColumns = '校验情况,产品编号,产品型号,机型代码,上线时间,下线时间,PACK码,模组码,计划箱体码,扫描箱体码,扫描客户标签码,箱体码校验结果=箱体码结果,客户标签码校验结果=客户标签结果,操作人,记录创建时间,完成时间'
const Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'offlineExportLoading')
},
hasVerifyRecord(row) {
return row.校验记录ID !== null && row.校验记录ID !== undefined && row.校验记录ID !== ''
},
getOfflineVerifyType(row) {
return row.校验情况 === '已完成' ? 'success' : 'danger'
},
getOfflineVerifyText(row) {
return row.校验情况 || '未完成'
},
getResultType(value) {
const status = Number(value)
if (status === 1) return 'success'
@@ -191,6 +386,15 @@ export default {
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
},
handleOfflineSizeChange(val) {
this.offlinePageCurrent = 1
this.offlinePageSize = val
this.searchOfflineTable()
},
handleOfflineCurrentChange(val) {
this.offlinePageCurrent = val
this.searchOfflineTable()
}
}
}
@@ -205,6 +409,10 @@ export default {
margin-bottom: 10px;
}
.filter-line {
margin-bottom: 10px;
}
.block {
text-align: left;
}