Browse Source

批量维护工作日历增加一个勾选 是否包含 2023年3月7日 sxm

master
[li_she] 3 years ago
parent
commit
80356deaca
  1. 288
      src/views/modules/base/calendar.vue

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

@ -13,11 +13,14 @@
<el-option :label="labels.useing" value="使用中"></el-option> <el-option :label="labels.useing" value="使用中"></el-option>
<el-option :label="labels.stopUse" value="停用"></el-option> <el-option :label="labels.stopUse" value="停用"></el-option>
</el-select> </el-select>
<el-button @click="getData()" type="primary" style="margin-left: 2px;margin-top: 0px">{{ buttons.search }}</el-button>
<el-button @click="getData()" type="primary" style="margin-left: 2px;margin-top: 0px">{{
buttons.search
}}
</el-button>
<el-button @click="newCalendarModel()" :disabled="authAdd" type="primary" style="margin-top: 0px"> <el-button @click="newCalendarModel()" :disabled="authAdd" type="primary" style="margin-top: 0px">
{{ buttons.newCalendarModel}}
{{ buttons.newCalendarModel }}
</el-button> </el-button>
<el-button @click="maintainCalendar()" type="primary" style="margin-top: 0px">{{buttons.maintainCalendar}}
<el-button @click="maintainCalendar()" type="primary" style="margin-top: 0px">{{ buttons.maintainCalendar }}
</el-button> </el-button>
<download-excel <download-excel
:fields="fields()" :fields="fields()"
@ -47,9 +50,9 @@
width="150" width="150"
:label="labels.do"> :label="labels.do">
<template slot-scope="scope"> <template slot-scope="scope">
<a type="text" size="small" v-if="!authEdit" @click="editData(scope.row)"> {{ buttons.update }}</a>
<a type="text" size="small" v-if="!authEdit" @click="editData(scope.row)"> {{ buttons.update }}</a>
<a type="text" size="small" @click="getCEModel(scope.row)">{{ buttons.getCEModel }}</a> <a type="text" size="small" @click="getCEModel(scope.row)">{{ buttons.getCEModel }}</a>
<a type="text" size="small" v-if="!authDelete" @click="delData(scope.row)"> {{ buttons.delete }}</a>
<a type="text" size="small" v-if="!authDelete" @click="delData(scope.row)"> {{ buttons.delete }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -90,8 +93,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="calendarSave()">{{buttons.save}}</el-button>
<el-button type="primary" @click="calendarModelFlag = false">{{buttons.close}}</el-button>
<el-button type="primary" @click="calendarSave()">{{ buttons.save }}</el-button>
<el-button type="primary" @click="calendarModelFlag = false">{{ buttons.close }}</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<el-dialog :title="labels.calendarOut" :close-on-click-modal="false" v-drag :visible.sync="CEFlag" width="1200px"> <el-dialog :title="labels.calendarOut" :close-on-click-modal="false" v-drag :visible.sync="CEFlag" width="1200px">
@ -131,8 +134,8 @@
width="80" width="80"
:label="labels.do"> :label="labels.do">
<template slot-scope="scope"> <template slot-scope="scope">
<a type="text" size="small" @click="shiftModal(scope.row)">{{buttons.shift}}</a>
<a type="text" size="small" v-if="!authEdit" @click="editShiftModal(scope.row)"> {{buttons.update2}}</a>
<a type="text" size="small" @click="shiftModal(scope.row)">{{ buttons.shift }}</a>
<a type="text" size="small" v-if="!authEdit" @click="editShiftModal(scope.row)"> {{ buttons.update2 }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -153,55 +156,64 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="CEFlag = false">{{buttons.close}}</el-button>
<el-button type="primary" @click="CEFlag = false">{{ buttons.close }}</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<el-dialog :title="labels.calendars" :close-on-click-modal="false" v-drag :visible.sync="maintainCalendarFlag" <el-dialog :title="labels.calendars" :close-on-click-modal="false" v-drag :visible.sync="maintainCalendarFlag"
width="1200px"> width="1200px">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -5px;"> <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -5px;">
<el-form-item :label="labels.calendarId4">
<el-input v-model="maintainCalendarSearchData.calendarId" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="labels.calendarDesc4">
<el-input v-model="maintainCalendarSearchData.calendarDesc" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="labels.startDate|| '日期'">
<el-date-picker
style="width: 130px"
v-model="maintainCalendarSearchData.startDate"
value-format="yyyy-MM-dd"
:placeholder="labels.chooseDate">
</el-date-picker>
-
<el-date-picker
style="width: 130px"
v-model="maintainCalendarSearchData.endDate "
value-format="yyyy-MM-dd"
:placeholder="labels.chooseDate">
</el-date-picker>
</el-form-item>
<!-- <el-form-item :label="'至:'">-->
<!-- <el-date-picker-->
<!-- style="width: 130px"-->
<!-- v-model="maintainCalendarSearchData.endDate"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="选择日期">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<el-form-item :label="labels.datetype">
<el-select v-model="maintainCalendarSearchData.datetype" style="width: 130px"
:placeholder="labels.choose">
<el-option
v-for="(item,index) in selectList"
:key="index"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-button @click="refreshModel()" type="primary" style="margin-top: 0px">{{buttons.search}}</el-button>
<el-button @click="saveList()" type="primary" style="margin-top: 0px">{{buttons.saveCalendar}}</el-button>
</el-form-item>
<el-row>
<el-col :span="24">
<el-form-item :label="labels.startDate|| '日期'">
<el-date-picker
style="width: 130px"
v-model="maintainCalendarSearchData.startDate"
value-format="yyyy-MM-dd"
:placeholder="labels.chooseDate">
</el-date-picker>
-
<el-date-picker
style="width: 130px"
v-model="maintainCalendarSearchData.endDate "
value-format="yyyy-MM-dd"
:placeholder="labels.chooseDate">
</el-date-picker>
</el-form-item>
<el-form-item :label="labels.datetype">
<el-select v-model="maintainCalendarSearchData.datetype" style="width: 130px"
:placeholder="labels.choose">
<el-option
v-for="(item,index) in selectList"
:key="index"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label=" ">
<el-button @click="refreshModel()" type="primary" style="margin-top: 0px">{{ buttons.search }}</el-button>
<el-button @click="saveList()" type="primary" style="margin-top: 0px">{{ buttons.saveCalendar }}
</el-button>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="labels.calendarId4">
<el-input v-model="maintainCalendarSearchData.calendarId" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="labels.calendarDesc4">
<el-input v-model="maintainCalendarSearchData.calendarDesc" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'是否包含(日历编号/日历描述)'">
<el-radio-group v-model="maintainCalendarSearchData.isIncluding">
<el-radio :label="true" >包含</el-radio>
<el-radio :label="false" >不包含</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<div class="calendar"> <div class="calendar">
<el-table <el-table
@ -243,7 +255,8 @@
:label="item.columnLabel" :label="item.columnLabel"
:formatter="getSelections"> :formatter="getSelections">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row[item.columnProp]" :placeholder="labels.choose" style="height: 12px;padding: 0px "
<el-select v-model="scope.row[item.columnProp]" :placeholder="labels.choose"
style="height: 12px;padding: 0px "
filterable filterable
allow-create> allow-create>
<el-option v-for="(item,index) in selectList " :key="index" :label="item.label" :value="item.value"> <el-option v-for="(item,index) in selectList " :key="index" :label="item.label" :value="item.value">
@ -256,7 +269,7 @@
</el-table> </el-table>
</div> </div>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="maintainCalendarFlag = false">{{buttons.close}}</el-button>
<el-button type="primary" @click="maintainCalendarFlag = false">{{ buttons.close }}</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<el-dialog :title="labels.shiftInfo" :close-on-click-modal="false" v-drag :visible.sync="shiftFlag" width="600px"> <el-dialog :title="labels.shiftInfo" :close-on-click-modal="false" v-drag :visible.sync="shiftFlag" width="600px">
@ -287,12 +300,12 @@
width="50" width="50"
:label="labels.do"> :label="labels.do">
<template slot-scope="scope"> <template slot-scope="scope">
<a type="text" size="small" v-if="!authEdit" @click="editShift(scope.row)">{{buttons.update3}}</a>
<a type="text" size="small" v-if="!authEdit" @click="editShift(scope.row)">{{ buttons.update3 }}</a>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="shiftFlag = false">{{buttons.close}}</el-button>
<el-button type="primary" @click="shiftFlag = false">{{ buttons.close }}</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<el-dialog title="维护班次" :close-on-click-modal="false" v-drag :visible.sync="updateShiftFlag" width="341px"> <el-dialog title="维护班次" :close-on-click-modal="false" v-drag :visible.sync="updateShiftFlag" width="341px">
@ -324,8 +337,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="updateCESShift()">{{buttons.save}}</el-button>
<el-button type="primary" @click="updateShiftFlag = false">{{buttons.close}}</el-button>
<el-button type="primary" @click="updateCESShift()">{{ buttons.save }}</el-button>
<el-button type="primary" @click="updateShiftFlag = false">{{ buttons.close }}</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -427,8 +440,8 @@
</el-form> </el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="updateWorkingCalendar()">{{buttons.save}}</el-button>
<el-button type="primary" @click="workDateDialog = false">{{buttons.close}}</el-button>
<el-button type="primary" @click="updateWorkingCalendar()">{{ buttons.save }}</el-button>
<el-button type="primary" @click="workDateDialog = false">{{ buttons.close }}</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
</div> </div>
@ -459,7 +472,8 @@ import {
searchFunctionButtonList, searchFunctionButtonList,
} from "@/api/sysLanguage.js" } from "@/api/sysLanguage.js"
var functionId='103002';
var functionId = '103002';
export default { export default {
name: "calendar", name: "calendar",
@ -481,78 +495,78 @@ export default {
languageCode: this.$i18n.locale languageCode: this.$i18n.locale
}, },
labels: { labels: {
site:'工厂编号:',
calendarId:'日历编码:',
status:'状态:',
all:'全部',
useing:'使用中',
stopUse:'停用',
do:'操作',
error:'错误',
true:'确定',
point:'提示',
cancel:'取消',
doYes:'操作成功',
calendar:'维护工作日历',
site2:'工厂编号:',
calendarId2:'日历编号:',
calendarDesc2:'日历描述:',
site3:'工厂编号:',
calendarId3:'日历编号:',
calendarDesc3:'日历描述:',
status2:'状态:',
calendarOut:'工作日历例外',
choose:'请选择',
calendars:'批量维护工作日历',
calendarId4:'日历编号:',
calendarDesc4:'日历描述:',
chooseDate:'选择日期',
datetype:'工作日类型:',
shiftInfo:'班次信息',
shiftNo:'班次编码:',
shiftDesc:'班次名称:',
startexacttime:'上班时间:',
endexacttime:'下班时间:',
calendarId5:'日历编码:',
scheduledate:'日期:',
site5:'工厂编号:',
datetype5:'工作日类型:',
chooseTime:'请选择时间',
exceptexacttime1:'休息时间点1:',
exceptduration1:'休息时长1:',
exceptexacttime2:'休息时间点2:',
exceptduration2:'休息时长2:',
exceptexacttime3:'休息时间点3:',
exceptduration3:'休息时长3:',
exceptexacttime4:'休息时间点4:',
exceptduration4:'休息时长4:',
exceptexacttime5:'休息时间点5:',
exceptduration5:'休息时长5:',
exceptexacttime6:'休息时间点6:',
exceptduration6:'休息时长6:',
worktime:'累计工作时间:',
calendarDeleteAsk:'是否删除此条工作日历?',
warning:'批量维护工作日历天数为 [1-31] 天,且开始日期不能晚于结束日期!',
endWaring:'结束时间不能在开始时间之前',
timeWaring:'时间不得相差10天!',
site: '工厂编号:',
calendarId: '日历编码:',
status: '状态:',
all: '全部',
useing: '使用中',
stopUse: '停用',
do: '操作',
error: '错误',
true: '确定',
point: '提示',
cancel: '取消',
doYes: '操作成功',
calendar: '维护工作日历',
site2: '工厂编号:',
calendarId2: '日历编号:',
calendarDesc2: '日历描述:',
site3: '工厂编号:',
calendarId3: '日历编号:',
calendarDesc3: '日历描述:',
status2: '状态:',
calendarOut: '工作日历例外',
choose: '请选择',
calendars: '批量维护工作日历',
calendarId4: '日历编号:',
calendarDesc4: '日历描述:',
chooseDate: '选择日期',
datetype: '工作日类型:',
shiftInfo: '班次信息',
shiftNo: '班次编码:',
shiftDesc: '班次名称:',
startexacttime: '上班时间:',
endexacttime: '下班时间:',
calendarId5: '日历编码:',
scheduledate: '日期:',
site5: '工厂编号:',
datetype5: '工作日类型:',
chooseTime: '请选择时间',
exceptexacttime1: '休息时间点1:',
exceptduration1: '休息时长1:',
exceptexacttime2: '休息时间点2:',
exceptduration2: '休息时长2:',
exceptexacttime3: '休息时间点3:',
exceptduration3: '休息时长3:',
exceptexacttime4: '休息时间点4:',
exceptduration4: '休息时长4:',
exceptexacttime5: '休息时间点5:',
exceptduration5: '休息时长5:',
exceptexacttime6: '休息时间点6:',
exceptduration6: '休息时长6:',
worktime: '累计工作时间:',
calendarDeleteAsk: '是否删除此条工作日历?',
warning: '批量维护工作日历天数为 [1-31] 天,且开始日期不能晚于结束日期!',
endWaring: '结束时间不能在开始时间之前',
timeWaring: '时间不得相差10天!',
startDate: '日期' startDate: '日期'
}, },
buttons:{
search:'查询',
buttons: {
search: '查询',
download: '导出', download: '导出',
download2: '导出', download2: '导出',
newCalendarModel:'新增工作日历',
maintainCalendar:'批量维护工作日历',
update:'编辑',
update3:'编辑',
delete:'删除',
add:'新增',
close:'关闭',
save:'保存',
getCEModel:'工作日历例外',
shift:'班次',
update2:' | 编辑',
saveCalendar:'保存日历',
newCalendarModel: '新增工作日历',
maintainCalendar: '批量维护工作日历',
update: '编辑',
update3: '编辑',
delete: '删除',
add: '新增',
close: '关闭',
save: '保存',
getCEModel: '工作日历例外',
shift: '班次',
update2: ' | 编辑',
saveCalendar: '保存日历',
}, },
queryButton: { queryButton: {
functionId: functionId, functionId: functionId,
@ -1103,6 +1117,7 @@ export default {
startDate: '', startDate: '',
endDate: '', endDate: '',
datetype: '', datetype: '',
isIncluding: true,
}, },
dataList: [], dataList: [],
dataList2: [], dataList2: [],
@ -1210,7 +1225,7 @@ export default {
this.getData() this.getData()
this.$message.success(this.labels.doYes) this.$message.success(this.labels.doYes)
} else { } else {
this.$alert(data.msg, this.labels.error, {
this.$alert(data.msg, this.labels.error, {
confirmButtonText: this.labels.true confirmButtonText: this.labels.true
}) })
} }
@ -1241,6 +1256,7 @@ export default {
site: this.$store.state.user.site.toString(), site: this.$store.state.user.site.toString(),
calendarId: this.maintainCalendarSearchData.calendarId, calendarId: this.maintainCalendarSearchData.calendarId,
calendarDesc: this.maintainCalendarSearchData.calendarDesc, calendarDesc: this.maintainCalendarSearchData.calendarDesc,
isIncluding: this.maintainCalendarSearchData.isIncluding?' Like ':' Not Like ',
} }
await getCalendarData(mainData).then(({data}) => { await getCalendarData(mainData).then(({data}) => {
let list = data.rows; let list = data.rows;
@ -1326,7 +1342,7 @@ export default {
var endNum = parseInt(end.replace(/-/g, ''), 10); var endNum = parseInt(end.replace(/-/g, ''), 10);
if (startNum > endNum) { if (startNum > endNum) {
this.$alert(this.labels.endWaring, this.labels.point, { this.$alert(this.labels.endWaring, this.labels.point, {
confirmButtonText: this.labels.true
confirmButtonText: this.labels.true
}) })
return false; return false;
} }
@ -1630,7 +1646,7 @@ export default {
// tableDefault // tableDefault
async getColumnList(tableId, columnId) { async getColumnList(tableId, columnId) {
this.queryTable.tableId = tableId this.queryTable.tableId = tableId
let queryTable= {
let queryTable = {
functionId: this.$route.meta.menuId, functionId: this.$route.meta.menuId,
tableId: tableId, tableId: tableId,
languageCode: this.$i18n.locale languageCode: this.$i18n.locale
@ -1666,13 +1682,13 @@ export default {
this.getMultiLanguageList()// this.getMultiLanguageList()//
this.getTableUserColumn('103002Table',1)
this.getTableUserColumn('103002Table', 1)
this.getTableUserColumn('103002Table2',2)
this.getTableUserColumn('103002Table2', 2)
this.getTableUserColumn('103002Table3',3)
this.getTableUserColumn('103002Table3', 3)
this.getTableUserColumn('103002Table4',4)
this.getTableUserColumn('103002Table4', 4)
} }
} }
</script> </script>

Loading…
Cancel
Save