8 changed files with 5041 additions and 2 deletions
-
44src/api/base.js
-
25src/api/base/site.js
-
19src/api/production.js
-
4src/views/common/home.vue
-
1700src/views/modules/base/calendar.vue
-
1213src/views/modules/base/calendarDatetype.vue
-
436src/views/modules/base/operator.vue
-
1602src/views/modules/base/workCenter.vue
@ -0,0 +1,44 @@ |
|||||
|
import { createAPI } from "@/utils/httpRequest.js"; |
||||
|
|
||||
|
|
||||
|
// 获取工作日类型列表
|
||||
|
export const calendarDatetypeInfo = data => createAPI(`/base/calendarDatetypeInfo`,'post',data) |
||||
|
|
||||
|
|
||||
|
|
||||
|
export const saveCalendarDatetypeData = data => createAPI(`/base/saveCalendarDatetypeData`,'post',data) |
||||
|
|
||||
|
|
||||
|
export const delCalendarType = data => createAPI(`/base/delCalendarType`,'post',data) |
||||
|
|
||||
|
export const getShiftData = data => createAPI(`/base/getShiftData`,'post',data) |
||||
|
|
||||
|
export const saveShift = data => createAPI(`/base/saveShift`,'post',data) |
||||
|
|
||||
|
export const updateShift = data => createAPI(`/base/updateShift`,'post',data) |
||||
|
|
||||
|
|
||||
|
export const delShift = data => createAPI(`/base/delShift`,'post',data) |
||||
|
|
||||
|
|
||||
|
export const getCalendarData = data => createAPI(`/base/getCalendarData`,'post',data) |
||||
|
|
||||
|
|
||||
|
export const saveCalendar = data => createAPI(`/base/saveCalendar`,'post',data) |
||||
|
|
||||
|
export const delCalendar = data => createAPI(`/base/delCalendar`,'post',data) |
||||
|
|
||||
|
export const getCalendarExceptionData = data => createAPI(`/base/getCalendarExceptionData`,'post',data) |
||||
|
|
||||
|
export const batchSaveCDData = data => createAPI(`/base/batchSaveCDData`,'post',data) |
||||
|
|
||||
|
export const getCalendarExceptionShiftData = data => createAPI(`/base/getCalendarExceptionShiftData`,'post',data) |
||||
|
|
||||
|
export const updateCESShift = data => createAPI(`/base/updateCESShift`,'post',data) |
||||
|
|
||||
|
export const getCalendarDatetypeInfo = data => createAPI(`/base/getCalendarDatetypeInfo`,'post',data) |
||||
|
|
||||
|
export const updateWorkingCalendar = data => createAPI(`/base/updateWorkingCalendar`,'post',data) |
||||
|
|
||||
|
|
||||
|
|
||||
@ -0,0 +1,19 @@ |
|||||
|
import { createAPI } from "@/utils/httpRequest.js"; |
||||
|
|
||||
|
|
||||
|
|
||||
|
export const getOperatorData=data => createAPI(`schedule/getOperatorData`, 'post', data); |
||||
|
|
||||
|
export const getWorkCenterData=data => createAPI(`schedule/getWorkCenterData`, 'post', data); |
||||
|
|
||||
|
export const getWorkCenterOperatorData=data => createAPI(`schedule/getWorkCenterOperatorData`, 'post', data); |
||||
|
|
||||
|
export const addSkill=data => createAPI(`schedule/addSkill`, 'post', data); |
||||
|
|
||||
|
export const deleteSkill=data => createAPI(`schedule/deleteSkill`, 'post', data); |
||||
|
|
||||
|
|
||||
|
|
||||
|
export const getAllDepartment= data => createAPI(`schedule/getAllDepartment`, 'post', data); |
||||
|
export const updateTV=data => createAPI(`schedule/updateTV`, 'post', data); |
||||
|
|
||||
1700
src/views/modules/base/calendar.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1213
src/views/modules/base/calendarDatetype.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,436 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-form :inline="true" label-position="top" label-width="100px" > |
||||
|
<el-form-item :label="'工厂编码:'"> |
||||
|
<el-input v-model="searchData.site" style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'操作员编号:'"> |
||||
|
<el-input v-model="searchData.operatorID" style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'操作员名称:'"> |
||||
|
<el-input v-model="searchData.operatorName" style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="部门:" > |
||||
|
<el-select v-model="searchData.department" style="width: 120px"> |
||||
|
<el-option label="全部" value="all" ></el-option> |
||||
|
<el-option |
||||
|
v-for="(item,index) in departmentList" |
||||
|
:key="index" |
||||
|
:label="item.department" |
||||
|
:value="item.department" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否在用:" > |
||||
|
<el-select v-model="searchData.active" style="width: 120px"> |
||||
|
<el-option label="全部" value=""></el-option> |
||||
|
<el-option label="在用" value="Y"></el-option> |
||||
|
<el-option label="不在用" value="N"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=" " > |
||||
|
<el-button @click="search()" style="margin-left: 0px;margin-top: 0px" type="primary">查询</el-button> |
||||
|
<download-excel |
||||
|
:fields="exportDataStandard" |
||||
|
:data="tableData" |
||||
|
type="xlsx" |
||||
|
:name="exportName" |
||||
|
:header="exportHeader" |
||||
|
:footer="exportFooter" |
||||
|
:defaultValue="exportDefaultValue" |
||||
|
:fetch="createExportData" |
||||
|
:before-generate="startDownload" |
||||
|
:before-finish="finishDownload" |
||||
|
worksheet="导出信息" |
||||
|
class="el-button el-button--primary el-button--medium"> |
||||
|
{{'导出'}} |
||||
|
</download-excel> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-table |
||||
|
:height="height" |
||||
|
:data="tableData" |
||||
|
border |
||||
|
style="width: 100%"> |
||||
|
<el-table-column |
||||
|
prop="site" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
min-width="80" |
||||
|
label="工厂编码"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="operatorID" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
min-width="70" |
||||
|
label="操作员编码"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="operatorName" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
min-width="90" |
||||
|
label="操作员姓名"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="active" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
min-width="70" |
||||
|
label="是否在用"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="department" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
min-width="100" |
||||
|
label="部门"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="createdDate" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
min-width="130" |
||||
|
label="录入时间"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
fixed="right" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="150" |
||||
|
label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<a type="text" size="small" @click="skillMatrix(scope.row)">技能矩阵</a> |
||||
|
|
||||
|
<!-- <a type="text" size="small" @click="tvModel(scope.row)">电视机</a>--> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<el-dialog title="技能矩阵" :close-on-click-modal="false" v-drag :visible.sync="skillFlag" width="800px"> |
||||
|
<div style="font-size: 12px"> |
||||
|
操作员编码:<el-input v-model="operatorData.operatorID" readonly style="width: 120px"></el-input> |
||||
|
操作员姓名:<el-input v-model="operatorData.operatorName" readonly style="width: 120px"></el-input> |
||||
|
</div> |
||||
|
<el-container style="margin-top: -12px;"> |
||||
|
<el-main style="width: 300px"> |
||||
|
<span style="font-size: 12px" >可选技能:</span> |
||||
|
<el-table |
||||
|
height="300px" |
||||
|
:data="skillList1" |
||||
|
border |
||||
|
@row-click="clickSkill1" |
||||
|
highlight-current-row |
||||
|
v-loading="dataListLoading" |
||||
|
style="width: 100%"> |
||||
|
<el-table-column |
||||
|
prop="workCenterNo" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
min-width="110" |
||||
|
label="加工中心编码"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="workCenterDesc" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
min-width="170" |
||||
|
label="加工中心名称"> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-main> |
||||
|
<el-main style="width: 100px"> |
||||
|
<div style="margin-top: 100px"> |
||||
|
<el-button type="primary" @click="addSkill()">添加>></el-button> |
||||
|
</div> |
||||
|
<div style="margin-top: 20px"> |
||||
|
<el-button type="primary" @click="deleteSkill()">删除<<</el-button> |
||||
|
</div> |
||||
|
</el-main> |
||||
|
<el-main style="width: 300px"> |
||||
|
<span style="font-size: 12px" >已选技能:</span> |
||||
|
<el-table |
||||
|
height="300px" |
||||
|
:data="skillList2" |
||||
|
border |
||||
|
@row-click="clickSkill2" |
||||
|
highlight-current-row |
||||
|
v-loading="dataListLoading" |
||||
|
style="width: 100%"> |
||||
|
<el-table-column |
||||
|
prop="workCenterNo" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
min-width="110" |
||||
|
label="加工中心编码"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="workCenterDesc" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
min-width="170" |
||||
|
label="加工中心名称"> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-main> |
||||
|
</el-container> |
||||
|
<!-- <el-footer style="height:40px;margin-top: 20px;text-align:center">--> |
||||
|
<!-- <el-button type="primary" @click="routingModelFlag = false">关闭</el-button>--> |
||||
|
<!-- </el-footer>--> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<el-dialog title="维护SOP电视机" :close-on-click-modal="false" v-drag :visible.sync="tvModalFlag" width="215px"> |
||||
|
<el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;" @submit.native.prevent> |
||||
|
<el-form-item > |
||||
|
<span slot="label" style="" @click="getBaseList(1006)"><a herf="#">电视机ID</a></span> |
||||
|
<el-input v-model="tvData.tvId" style="width: 130px;" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
||||
|
<el-button type="primary" @click="updateTV()">确定</el-button> |
||||
|
<el-button type="primary" @click="tvModalFlag = false">取消</el-button> |
||||
|
</el-footer> |
||||
|
</el-dialog> |
||||
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
getOperatorData, |
||||
|
getWorkCenterData, |
||||
|
getWorkCenterOperatorData, |
||||
|
addSkill, |
||||
|
deleteSkill, |
||||
|
getAllDepartment, |
||||
|
updateTV, |
||||
|
} from "@/api/production.js" |
||||
|
import Chooselist from '@/views/modules/common/Chooselist' |
||||
|
export default { |
||||
|
name: 'operator', |
||||
|
components: { |
||||
|
Chooselist |
||||
|
}, |
||||
|
watch: { |
||||
|
tvData: { |
||||
|
deep: true, |
||||
|
handler: function (newV, oldV) { |
||||
|
this.tvData.tvId = this.tvData.tvId.toUpperCase(); |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
data () { |
||||
|
return { |
||||
|
// 导出 start |
||||
|
tvData:{ |
||||
|
tvId:'', |
||||
|
site:'', |
||||
|
operatorID:'', |
||||
|
}, |
||||
|
tvModalFlag:false, |
||||
|
exportData: [], |
||||
|
exportDataStandard: { |
||||
|
"工厂编码": "site", |
||||
|
"操作员编码": "operatorID", |
||||
|
"操作员姓名": "operatorName", |
||||
|
"是否在用": "active", |
||||
|
"部门": "department", |
||||
|
"录入时间": "createdDate", |
||||
|
}, |
||||
|
exportName: "操作员列表"+this.getStrDate(), |
||||
|
exportHeader: ["操作员列表"], |
||||
|
exportFooter: [], |
||||
|
exportDefaultValue: "这一行这一列没有数据", |
||||
|
dataListLoading:false, |
||||
|
// 导出 end |
||||
|
height:200, |
||||
|
departmentList:[], |
||||
|
tableData:[], |
||||
|
date1:'', |
||||
|
searchData:{ |
||||
|
operatorID:'', |
||||
|
operatorName:'', |
||||
|
status:'all', |
||||
|
site:'', |
||||
|
department:'', |
||||
|
}, |
||||
|
operatorData:{ |
||||
|
operatorID:'', |
||||
|
operatorName:'', |
||||
|
site:'', |
||||
|
}, |
||||
|
skillFlag:false, |
||||
|
skillList1:[], |
||||
|
skillList2:[], |
||||
|
skillRow1:null, |
||||
|
skillRow2:null, |
||||
|
tagNo:'', |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$nextTick(()=>{ |
||||
|
this.height = window.innerHeight - 210; |
||||
|
}) |
||||
|
}, |
||||
|
methods: { |
||||
|
getBaseList (val,type) { |
||||
|
this.tagNo = val |
||||
|
this.$nextTick(() => { |
||||
|
let strVal = '' |
||||
|
if (val === 1006) { |
||||
|
strVal = this.tvData.tvId==null?'':this.tvData.tvId |
||||
|
} |
||||
|
this.$refs.baseList.init(val, strVal) |
||||
|
}) |
||||
|
}, |
||||
|
/* 列表方法的回调 */ |
||||
|
getBaseData (val) { |
||||
|
if (this.tagNo === 1006) { |
||||
|
this.tvData.tvId = val.tv_id |
||||
|
} |
||||
|
}, |
||||
|
searchDepartment(){ |
||||
|
getAllDepartment().then(({data}) => { |
||||
|
this.departmentList = data.rows; |
||||
|
}) |
||||
|
}, |
||||
|
search(){ |
||||
|
getOperatorData(this.searchData).then(({data}) => { |
||||
|
this.tableData = data.rows; |
||||
|
}) |
||||
|
}, |
||||
|
createExportData() { |
||||
|
|
||||
|
return this.tableData; |
||||
|
}, |
||||
|
startDownload() { |
||||
|
// this.exportData = this.dataList |
||||
|
|
||||
|
}, |
||||
|
finishDownload() { |
||||
|
|
||||
|
}, |
||||
|
getStrDate() { |
||||
|
let dd = new Date(); |
||||
|
let Y = dd.getFullYear(); |
||||
|
let M = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1);//获取当前月份的日期,不足10补0 |
||||
|
let D = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();//获取当前几号,不足10补0 |
||||
|
let H = dd.getHours() < 10 ? "0" + dd.getHours() : dd.getHours(); |
||||
|
let MM = dd.getMinutes() < 10 ? "0" + dd.getMinutes() : dd.getMinutes(); |
||||
|
let S = dd.getSeconds() < 10 ? "0" + dd.getSeconds() : dd.getSeconds(); |
||||
|
return Y + M + D + H + MM + S; |
||||
|
|
||||
|
}, |
||||
|
clickSkill1(row){ |
||||
|
this.skillRow1 = JSON.parse(JSON.stringify(row)); |
||||
|
}, |
||||
|
clickSkill2(row){ |
||||
|
this.skillRow2 = JSON.parse(JSON.stringify(row)); |
||||
|
}, |
||||
|
skillMatrix(row){ |
||||
|
let inData={ |
||||
|
site:row.site, |
||||
|
operatorID:row.operatorID, |
||||
|
} |
||||
|
this.operatorData.site=row.site; |
||||
|
this.operatorData.operatorID=row.operatorID; |
||||
|
this.operatorData.operatorName=row.operatorName; |
||||
|
getWorkCenterData(inData).then(({data}) => { |
||||
|
this.skillList1 = data.rows; |
||||
|
}) |
||||
|
getWorkCenterOperatorData(inData).then(({data}) => { |
||||
|
this.skillList2 = data.rows; |
||||
|
}) |
||||
|
this.skillFlag=true; |
||||
|
}, |
||||
|
addSkill(){ |
||||
|
if(this.skillRow1==null){ |
||||
|
this.$alert("请选择可选加工中心技能!", '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false; |
||||
|
} |
||||
|
let inSkillData={ |
||||
|
site:this.operatorData.site, |
||||
|
operatorID:this.operatorData.operatorID, |
||||
|
workCenterNo:this.skillRow1.workCenterNo, |
||||
|
user:this.$store.state.user.name, |
||||
|
} |
||||
|
addSkill(inSkillData).then(({data}) => { |
||||
|
let inData={ |
||||
|
site:this.operatorData.site, |
||||
|
operatorID:this.operatorData.operatorID, |
||||
|
} |
||||
|
getWorkCenterData(inData).then(({data}) => { |
||||
|
this.skillList1 = data.rows; |
||||
|
}) |
||||
|
getWorkCenterOperatorData(inData).then(({data}) => { |
||||
|
this.skillList2 = data.rows; |
||||
|
}) |
||||
|
this.skillRow1=null; |
||||
|
}) |
||||
|
}, |
||||
|
deleteSkill(){ |
||||
|
if(this.skillRow2==null){ |
||||
|
this.$alert("请选择已选加工中心技能!", '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false; |
||||
|
} |
||||
|
let inSkillData={ |
||||
|
site:this.operatorData.site, |
||||
|
operatorID:this.operatorData.operatorID, |
||||
|
workCenterNo:this.skillRow2.workCenterNo, |
||||
|
} |
||||
|
deleteSkill(inSkillData).then(({data}) => { |
||||
|
let inData={ |
||||
|
site:this.operatorData.site, |
||||
|
operatorID:this.operatorData.operatorID, |
||||
|
} |
||||
|
getWorkCenterData(inData).then(({data}) => { |
||||
|
this.skillList1 = data.rows; |
||||
|
}) |
||||
|
getWorkCenterOperatorData(inData).then(({data}) => { |
||||
|
this.skillList2 = data.rows; |
||||
|
}) |
||||
|
this.skillRow2=null; |
||||
|
}) |
||||
|
}, |
||||
|
tvModel(row){ |
||||
|
this.tvData.tvId=row.tvId; |
||||
|
this.tvData.operatorID=row.operatorID; |
||||
|
this.tvData.site=row.site; |
||||
|
this.tvModalFlag=true; |
||||
|
}, |
||||
|
updateTV(){ |
||||
|
updateTV(this.tvData).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.search(); |
||||
|
this.tvModalFlag = false |
||||
|
this.$message({ |
||||
|
message: '操作成功', |
||||
|
type: 'success', |
||||
|
duration: 1500, |
||||
|
|
||||
|
onClose: () => { |
||||
|
} |
||||
|
}) |
||||
|
} else { |
||||
|
this.$alert(data.msg, '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
}, |
||||
|
created() { |
||||
|
this.searchDepartment(); |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
||||
1602
src/views/modules/base/workCenter.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue