Browse Source

0823更新

master
ruanqi 4 years ago
parent
commit
41abcbdbf1
  1. 3
      src/api/base.js
  2. 16
      src/assets/scss/global.scss
  3. 204
      src/views/modules/base/calendar.vue
  4. 19
      src/views/modules/production/dailyPlan.vue

3
src/api/base.js

@ -32,5 +32,6 @@ export const getCalendarExceptionData = data => createAPI(`/base/getCalendarExce
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)

16
src/assets/scss/global.scss

@ -351,10 +351,13 @@ a:hover{
margin-left: 0px;
}
.bigTable1 .el-table .cell {
height: 24px;
.inputTable input.el-input__inner {
height: 14px !important;
}
.inputTable .el-input--medium .el-input__icon {
line-height: 14px;
}
.mainTable .el-table .customer-row-gray{
background: #7e819e;
}
@ -381,3 +384,12 @@ a:hover{
.mainTable .el-table .customer-row-3 {
background: #0000CD;
}
.sl-input {
background-color: transparent;
border: 1px !important;
font-size: 12px !important;
height: 14px !important;
line-height: 14px !important;
background-color: transparent !important;
}

204
src/views/modules/base/calendar.vue

@ -120,6 +120,15 @@
:data="dataList2"
border
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
v-for="(item,index) in columnList2" :key="index"
:sortable="item.columnSortable"
@ -180,7 +189,7 @@
</el-form-item>
</el-form>
<div class="calendar">
<div class="inputTable">
<el-table
height="400"
:data="dataList3"
@ -317,6 +326,74 @@
<el-button type="primary" @click="maintainCalendarFlag = false">关闭</el-button>
</el-footer>
</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>
</template>
@ -328,11 +405,99 @@
getCalendarExceptionData,
calendarDatetypeInfo,
batchSaveCDData,
getCalendarExceptionShiftData,
updateCESShift
}from "@/api/base.js"
export default {
name: "calendar",
data () {
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
exportData: [],
exportName: "工厂日历"+this.dayjs().format('YYYYMMDDHHmmss'),
@ -1161,6 +1326,43 @@
return s
},
// 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() {
this.getData()

19
src/views/modules/production/dailyPlan.vue

@ -295,13 +295,13 @@
min-width="80"
label="单位产出">
</el-table-column>
<el-table-column
prop="timeRequired"
header-align="center"
align="right"
min-width="80"
label="待排产时间">
</el-table-column>
<!-- <el-table-column-->
<!-- prop="timeRequired"-->
<!-- header-align="center"-->
<!-- align="right"-->
<!-- min-width="80"-->
<!-- label="待排产时间">-->
<!-- </el-table-column>-->
<el-table-column
prop="efficiency"
header-align="center"
@ -575,7 +575,7 @@
<el-button type="primary" @click="scheduledModalFlag = false">关闭</el-button>
</el-form-item>
</el-form>
<div class="bigTable1">
<div class="inputTable">
<el-table
height="200"
:data="schedulingModalTableData"
@ -590,6 +590,7 @@
<template slot-scope="scope">
<el-date-picker
style="width: 95%"
class="sl-input"
v-model="scope.row.scheduleDate"
type="date"
value-format="yyyy-MM-dd"
@ -691,7 +692,7 @@
</el-table>
</el-dialog>
<el-dialog title="修改顺序" :close-on-click-modal="false" v-drag :visible.sync="changeModalFlag" width="700px">
<div class="bigTable1">
<div class="inputTable">
<el-table
height="200"
:data="changeTableData"

Loading…
Cancel
Save