|
|
@ -120,6 +120,15 @@ |
|
|
:data="dataList2" |
|
|
:data="dataList2" |
|
|
border |
|
|
border |
|
|
style="width: 100%;"> |
|
|
style="width: 100%;"> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="50" |
|
|
|
|
|
label="操作"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<a type="text" size="small" @click="shiftModal(scope.row)">班次</a> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
v-for="(item,index) in columnList2" :key="index" |
|
|
v-for="(item,index) in columnList2" :key="index" |
|
|
:sortable="item.columnSortable" |
|
|
:sortable="item.columnSortable" |
|
|
@ -180,7 +189,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
</el-form> |
|
|
</el-form> |
|
|
<div class="calendar"> |
|
|
|
|
|
|
|
|
<div class="inputTable"> |
|
|
<el-table |
|
|
<el-table |
|
|
height="400" |
|
|
height="400" |
|
|
:data="dataList3" |
|
|
:data="dataList3" |
|
|
@ -317,6 +326,74 @@ |
|
|
<el-button type="primary" @click="maintainCalendarFlag = false">关闭</el-button> |
|
|
<el-button type="primary" @click="maintainCalendarFlag = false">关闭</el-button> |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
<el-dialog title="班次信息" :close-on-click-modal="false" v-drag :visible.sync="shiftFlag" width="600px" > |
|
|
|
|
|
<el-table |
|
|
|
|
|
height="300" |
|
|
|
|
|
:data="dataList4" |
|
|
|
|
|
border |
|
|
|
|
|
style="width: 100%"> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
v-for="(item,index) in columnList4" :key="index" |
|
|
|
|
|
:sortable="item.columnSortable" |
|
|
|
|
|
:prop="item.columnProp" |
|
|
|
|
|
:header-align="item.headerAlign" |
|
|
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
|
|
:align="item.align" |
|
|
|
|
|
:fixed="item.fixed" |
|
|
|
|
|
:min-width="item.columnWidth" |
|
|
|
|
|
:label="item.columnLabel"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> |
|
|
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="50" |
|
|
|
|
|
label="操作"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<a type="text" size="small" @click="editShift(scope.row)">编辑</a> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center" > |
|
|
|
|
|
<el-button type="primary" @click="shiftFlag = false">关闭</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
<el-dialog title="维护班次" :close-on-click-modal="false" v-drag :visible.sync="updateShiftFlag" width="341px" > |
|
|
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
|
|
<el-form-item :label="'班次编码:'"> |
|
|
|
|
|
<el-input v-model="newShiftData.shiftno" disabled style="width: 130px" onblur="this.value=this.value.toUpperCase()"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'班次名称:'"> |
|
|
|
|
|
<el-input v-model="newShiftData.shiftdesc" disabled style="width: 130px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'上班时间:'"> |
|
|
|
|
|
<el-time-picker |
|
|
|
|
|
format="HH:mm" |
|
|
|
|
|
style="width: 130px" |
|
|
|
|
|
v-model="newShiftData.startexacttime" |
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
value-format="HH:mm"> |
|
|
|
|
|
</el-time-picker> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'下班时间:'" > |
|
|
|
|
|
<el-time-picker |
|
|
|
|
|
format="HH:mm" |
|
|
|
|
|
style="width: 130px" |
|
|
|
|
|
v-model="newShiftData.endexacttime" |
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
value-format="HH:mm"> |
|
|
|
|
|
</el-time-picker> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center" > |
|
|
|
|
|
<el-button type="primary" @click="updateCESShift()">保存</el-button> |
|
|
|
|
|
<el-button type="primary" @click="updateShiftFlag = false">关闭</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -328,11 +405,99 @@ |
|
|
getCalendarExceptionData, |
|
|
getCalendarExceptionData, |
|
|
calendarDatetypeInfo, |
|
|
calendarDatetypeInfo, |
|
|
batchSaveCDData, |
|
|
batchSaveCDData, |
|
|
|
|
|
getCalendarExceptionShiftData, |
|
|
|
|
|
updateCESShift |
|
|
}from "@/api/base.js" |
|
|
}from "@/api/base.js" |
|
|
export default { |
|
|
export default { |
|
|
name: "calendar", |
|
|
name: "calendar", |
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
|
|
|
newShiftData:{ |
|
|
|
|
|
shiftno:'', |
|
|
|
|
|
shiftdesc:'', |
|
|
|
|
|
startexacttime:'', |
|
|
|
|
|
endexacttime:'', |
|
|
|
|
|
datetype:'', |
|
|
|
|
|
id:'', |
|
|
|
|
|
site:'', |
|
|
|
|
|
}, |
|
|
|
|
|
updateShiftFlag:false, |
|
|
|
|
|
shiftFlag:false, |
|
|
|
|
|
dataList4:[], |
|
|
|
|
|
columnList4: [ |
|
|
|
|
|
{ |
|
|
|
|
|
userId: this.$store.state.user.name, |
|
|
|
|
|
functionId: 6038, |
|
|
|
|
|
serialNumber: '6038Table2Shiftno', |
|
|
|
|
|
tableId: "6038Table2", |
|
|
|
|
|
tableName: "班次表", |
|
|
|
|
|
columnProp: "shiftno", |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: "班次编码", |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: false, |
|
|
|
|
|
columnWidth: 100 |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
userId: this.$store.state.user.name, |
|
|
|
|
|
functionId: 6038, |
|
|
|
|
|
serialNumber: '6038Table2Shiftdesc', |
|
|
|
|
|
tableId: "6038Table2", |
|
|
|
|
|
tableName: "班次表", |
|
|
|
|
|
columnProp: "shiftdesc", |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: "班次名称", |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: false, |
|
|
|
|
|
columnWidth: 100 |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
userId: this.$store.state.user.name, |
|
|
|
|
|
functionId: 6038, |
|
|
|
|
|
serialNumber: '6038Table2Startexacttime', |
|
|
|
|
|
tableId: "6038Table2", |
|
|
|
|
|
tableName: "班次表", |
|
|
|
|
|
columnProp: "startexacttime", |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: "上班时间", |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: false, |
|
|
|
|
|
columnWidth: 100 |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
userId: this.$store.state.user.name, |
|
|
|
|
|
functionId: 6038, |
|
|
|
|
|
serialNumber: '6038Table2Endexacttime', |
|
|
|
|
|
tableId: "6038Table2", |
|
|
|
|
|
tableName: "班次表", |
|
|
|
|
|
columnProp: "endexacttime", |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: "下班时间", |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: false, |
|
|
|
|
|
columnWidth: 100 |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
// 导出 start |
|
|
// 导出 start |
|
|
exportData: [], |
|
|
exportData: [], |
|
|
exportName: "工厂日历"+this.dayjs().format('YYYYMMDDHHmmss'), |
|
|
exportName: "工厂日历"+this.dayjs().format('YYYYMMDDHHmmss'), |
|
|
@ -1161,6 +1326,43 @@ |
|
|
return s |
|
|
return s |
|
|
}, |
|
|
}, |
|
|
// 导出 end |
|
|
// 导出 end |
|
|
|
|
|
shiftModal(row){ |
|
|
|
|
|
let inData={ |
|
|
|
|
|
site:row.site, |
|
|
|
|
|
scheduledate:row.scheduledate, |
|
|
|
|
|
calendarId:row.calendarId |
|
|
|
|
|
} |
|
|
|
|
|
getCalendarExceptionShiftData(inData).then(({data}) => { |
|
|
|
|
|
this.dataList4=data.rows; |
|
|
|
|
|
this.shiftFlag=true; |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
editShift(row){ |
|
|
|
|
|
this.newShiftData=row; |
|
|
|
|
|
this.updateShiftFlag=true; |
|
|
|
|
|
}, |
|
|
|
|
|
updateCESShift(){ |
|
|
|
|
|
updateCESShift(this.newShiftData).then(({data}) => { |
|
|
|
|
|
if(data.code===0){ |
|
|
|
|
|
getCalendarExceptionData(this.CESearchData).then(({data}) => { |
|
|
|
|
|
this.dataList2 = data.rows |
|
|
|
|
|
}) |
|
|
|
|
|
this.updateShiftFlag=false; |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '保存成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
|
|
|
|
|
|
onClose: () => { |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.getData() |
|
|
this.getData() |
|
|
|