| | |
| | | data |
| | | }) |
| | | } |
| | | // 产è½è§åæ¥è¯¢ |
| | | export function CapacityPlanningSearch(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/CapacityPlanningSearch', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | // 产è½è§åé»è®¤æ¹æ¡ä¿åæäº¤ |
| | | export function CapacityPlanSubmit(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/CapacityPlanSubmit', |
| | | method: 'post', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | // 产è½è§åç¹å»æ¥åç»ä»¶æ¥æ¾å·²å
³èçæ¥ææ¹æ¡ |
| | | export function CapacityPlanningCalendar(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/CapacityPlanningCalendar', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | // 产è½è§åæ¥åå廿¶å¸¦åºå¯¹åºçæ¹æ¡ |
| | | export function CapacityPlanningOnclickSelect(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/CapacityPlanningOnclickSelect', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | // 产è½è§åæ¹æ¡è®¾ç½®æ¥è¯¢ |
| | | export function CapacityPlanningSetupSearch(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/CapacityPlanningSetupSearch', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | // 产è½è§åæ¹æ¡è®¾ç½®æ°å¢ |
| | | export function CapacityPlanningSetupAddUpdate(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/CapacityPlanningSetupAddUpdate', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 产è½è§åæ¹æ¡è®¾ç½®å é¤ |
| | | export function CapacityPlanningSetupDelete(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/CapacityPlanningSetupDelete', |
| | | method: 'post', |
| | | params: data |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div v-click-outside onselectstart="return false" style="-moz-user-select : none"> |
| | | <input type="text" :value="value" :rowData="rowData" class="input__inner"> |
| | | <div v-if="isVisible" :class="[{pannel:true},{top_yes:topStyle}]"> |
| | | <div class="pannel-nav"> |
| | | <span class="fl" @click="prevYear"><i class="el-icon-d-arrow-left" /></span> |
| | | <span class="fl" @click="prevMonth"><i class="el-icon-arrow-left" /></span> |
| | | <span class="yearStyle">{{ time.year }}å¹´</span> |
| | | <span class="yearStyle">{{ time.month + 1 }}æ</span> |
| | | <span class="fr" @click="nextYear"><i class="el-icon-d-arrow-right" /></span> |
| | | <span class="fr" @click="nextMonth"><i class="el-icon-arrow-right" /></span> |
| | | </div> |
| | | <div class="pannel-content"> |
| | | <div class="days"> |
| | | <span |
| | | v-for="k in 7" |
| | | :key="k" |
| | | class="cell" |
| | | style="border-bottom: solid 1px #E7E7EA;padding-bottom: 10px;margin-bottom: 10px;" |
| | | > |
| | | {{ weekDays[k - 1] }} |
| | | </span> |
| | | <div v-for="i in 6" :key="i"> |
| | | <div |
| | | v-for="j in 7" |
| | | :key="j" |
| | | :class="[ |
| | | {notCurrentMonth:!isCurrentMonth(visibleDays[(i-1)*7+(j-1)] |
| | | ),cellDays:true,cell:true,mb3:true}, |
| | | {today:isToday(visibleDays[(i-1)*7+(j-1)])}, |
| | | {pastDue:isPastDue(visibleDays[(i-1)*7+(j-1)])} |
| | | ]" |
| | | @click="chooseDate(visibleDays[(i-1)*7+(j-1)])" |
| | | @dblclick="dblChooseDate(visibleDays[(i-1)*7+(j-1)])" |
| | | > |
| | | |
| | | <el-popover |
| | | placement="top" |
| | | title="" |
| | | width="50" |
| | | trigger="hover" |
| | | |
| | | :disabled="!isDblDate(visibleDays[(i-1)*7+(j-1)])" |
| | | > |
| | | <div class="pop_style">{{ callbackTxt(visibleDays[(i - 1) * 7 + (j - 1)]) }}</div> |
| | | <span |
| | | slot="reference" |
| | | :class="[{select:isSelect(visibleDays[(i-1)*7+(j-1)])}, |
| | | {dblDateStyle:isDblDate(visibleDays[(i-1)*7+(j-1)])}]" |
| | | >{{ visibleDays[(i - 1) * 7 + (j - 1)].getDate() }}</span> |
| | | </el-popover> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="pannel-footer"> |
| | | <el-button v-if="!isDbl" size="mini" class="fr mt4" @click="CapacityPlanningGivePlanSubmit">ç¡® å®</el-button> |
| | | </div> |
| | | <div v-if="isVisible && isDbl" class="pannelTo"> |
| | | <div class="pannelTo_title mt5"><span class="bigText mr5">{{ dblTime.day }}æ¥</span> <span class="samllText mr5">{{ |
| | | dblTime.year |
| | | }}å¹´{{ dblTime.month + 1 }}æ</span><span class="samllText">ææ{{ getweekday(handleDatetime(dblDate)) }}</span> |
| | | </div> |
| | | <div class="pannelTo_nav"> |
| | | <el-select v-model="schemeDate" size="small" style="width:240px;" @change="changeScheme"> |
| | | <el-option v-for="item in projectList" :key="item.CapCode" :value="item.CapCode" :label="item.CapName" /> |
| | | </el-select> |
| | | </div> |
| | | <div class="pannelTo_conent"> |
| | | <ul> |
| | | <li style="margin-bottom: 12px;"> |
| | | <span class="fl fl_ml li_text">å¼å§æ¶é´</span> |
| | | <span class="fr fr_mr li_text">ç»ææ¶é´</span> |
| | | </li> |
| | | |
| | | <li v-for="item in timeList" :key="item"> |
| | | <!-- <span class='fl'>{{item.start}}</span> --> |
| | | <el-time-select |
| | | v-model="item.start" |
| | | :disabled="true" |
| | | :picker-options="{ |
| | | start: '00:00', |
| | | step: '00:01', |
| | | end: '23:59' |
| | | }" |
| | | placeholder="å¼å§" |
| | | size="small" |
| | | style="width:100px;" |
| | | class="fl" |
| | | /> |
| | | <span class="li_text_color">~</span> |
| | | <el-time-select |
| | | v-model="item.end" |
| | | :disabled="true" |
| | | :picker-options="{ |
| | | start: '00:00', |
| | | step: '00:01', |
| | | end: '23:59' |
| | | }" |
| | | placeholder="ç»æ" |
| | | size="small" |
| | | style="width:100px;" |
| | | class="fr" |
| | | /> |
| | | <!-- <span class='fr'>{{item.end}}</span> --> |
| | | </li> |
| | | |
| | | </ul> |
| | | </div> |
| | | <div class="pannelTo_footer"> |
| | | <el-button size="mini" class="fr bt_style" @click="CapacityPlanningGivePlanSubmit">ç¡® å®</el-button> |
| | | <el-button size="mini" class="fr" @click="close">å æ¶</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import * as funsdates from '@/utils/funsdate' |
| | | // import capacityPlanning from '@/api/capacityPlanning' |
| | | var time = null |
| | | export default { |
| | | directives: { |
| | | clickOutside: { |
| | | bind(el, bindings, vnode) { |
| | | const handler = (e) => { |
| | | if (el.contains(e.target)) { |
| | | if (!vnode.context.isVisible) { |
| | | vnode.context.focus() |
| | | } |
| | | } else { |
| | | if (vnode.context.isVisible) { |
| | | vnode.context.blur() |
| | | } |
| | | } |
| | | } |
| | | el.handler = handler |
| | | document.addEventListener('click', handler) |
| | | }, |
| | | unbind(el) { |
| | | document.removeEventListener('click', el.handler) |
| | | } |
| | | } |
| | | }, |
| | | props: { |
| | | value: { |
| | | // type:Date, |
| | | // default:()=> new Date |
| | | type: String, |
| | | default: null |
| | | }, |
| | | rowData: { |
| | | type: String, |
| | | default: null |
| | | }, |
| | | CapacityPlanningSearch: { |
| | | type: Function, |
| | | default: null |
| | | } |
| | | }, |
| | | data() { |
| | | const { year, month } = funsdates.getYearMonthDay(new Date()) |
| | | return { |
| | | dblTime: { |
| | | year: '', |
| | | month: '', |
| | | day: '' |
| | | }, |
| | | schemeDate: '', |
| | | dblDate: '', |
| | | projectList: [], |
| | | timeList: [], |
| | | timeArr: [], |
| | | isDbl: false, |
| | | dateNow: new Date(), |
| | | isVisible: false, |
| | | time: { year, month }, |
| | | weekDays: ['æ¥', 'ä¸', 'äº', 'ä¸', 'å', 'äº', 'å
'], |
| | | changeTime: '', |
| | | changeTimeArr: [], |
| | | defArr: [], |
| | | dm_top: '', |
| | | topStyle: false, |
| | | form: { |
| | | rows: 100, |
| | | page: 1 |
| | | }, |
| | | projectDef: [] |
| | | } |
| | | }, |
| | | computed: { |
| | | visibleDays() { |
| | | const { year, month } = funsdates.getYearMonthDay(new Date(this.time.year, this.time.month, 1)) |
| | | const currentFirstDay = funsdates.getDay(year, month, 1)// 第ä¸å¤© |
| | | const week = currentFirstDay.getDay() |
| | | const satrtDay = currentFirstDay - week * 60 * 60 * 1000 * 24 |
| | | const arr = [] |
| | | for (let i = 0; i < 42; i++) { |
| | | arr.push(new Date(satrtDay + i * 60 * 60 * 1000 * 24)) |
| | | } |
| | | return arr |
| | | }, |
| | | |
| | | formatDate() { |
| | | const { year, month, day } = funsdates.getYearMonthDay(this.dateNow) |
| | | return `${year}-${month + 1}-${day}` |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | methods: { |
| | | getDblTime() { |
| | | const { year, month, day } = funsdates.getYearMonthDay(this.dblDate) |
| | | this.dblTime = { year, month, day } |
| | | }, |
| | | getweekday(date) { |
| | | var weekArray = new Array('æ¥', 'ä¸', 'äº', 'ä¸', 'å', 'äº', 'å
') |
| | | var week = weekArray[new Date(date).getDay()]// æ³¨ææ¤å¤å¿
é¡»æ¯å
newä¸ä¸ªDate |
| | | return week |
| | | }, |
| | | callbackTxt(date) { |
| | | let code = '' |
| | | let name = '' |
| | | if (this.isDblDate(date)) { |
| | | for (const i in this.defArr) { |
| | | if (this.defArr[i].name == this.handleDatetime(date)) { |
| | | code = this.defArr[i].key |
| | | } |
| | | } |
| | | } |
| | | for (const i in this.projectDef) { |
| | | if (this.projectDef[i].CapSetupCode == code) { |
| | | name = this.projectDef[i].CapSetupName |
| | | } |
| | | } |
| | | |
| | | return name |
| | | }, |
| | | getHeight() { |
| | | let winHeight // å±å¹æ»é«åº¦ |
| | | if (window.innerHeight) { |
| | | winHeight = window.innerHeight |
| | | } else if ((document.body) && (document.body.clientHeight)) { |
| | | winHeight = document.body.clientHeight |
| | | } |
| | | |
| | | const e = event || window.event |
| | | const nowHeigth = e.clientY |
| | | if (nowHeigth >= 500) { |
| | | this.topStyle = true |
| | | } |
| | | }, |
| | | // æ¹åæ¶é´æ ¼å¼ |
| | | formatScheme(val) { |
| | | const arr = [] |
| | | for (const i in val) { |
| | | const object = { |
| | | start: '', |
| | | end: '' |
| | | } |
| | | const s = val[i].split('~') |
| | | object.start = s[0] |
| | | object.end = s[1] |
| | | arr.push(object) |
| | | } |
| | | return arr |
| | | }, |
| | | // æ¹åæ¹æ¡ |
| | | changeScheme() { |
| | | let toList = [] |
| | | for (const i in this.projectList) { |
| | | if (this.schemeDate == this.projectList[i].CapCode) { |
| | | toList = this.projectList[i].list |
| | | } |
| | | } |
| | | |
| | | for (const i in this.defArr) { |
| | | if (this.defArr[i].name == this.changeTime) { |
| | | this.defArr[i].key = this.schemeDate |
| | | } |
| | | } |
| | | |
| | | this.timeList = this.formatScheme(toList) |
| | | }, |
| | | focus() { |
| | | this.isVisible = true |
| | | this.CapacityPlanningCalendar() |
| | | this.getHeight() |
| | | this.CapacityPlanningSetupSearch() |
| | | this.CapacityPlanningSearch() |
| | | }, |
| | | blur() { |
| | | this.isVisible = false |
| | | }, |
| | | isCurrentMonth(date) { |
| | | const { year, month } = funsdates.getYearMonthDay(new Date(this.time.year, |
| | | this.time.month, 1)) |
| | | const { year: y, month: m } = funsdates.getYearMonthDay(date) |
| | | return year === y && month === m |
| | | }, |
| | | isToday(date) { |
| | | const { year, month, day } = funsdates.getYearMonthDay(this.dateNow) |
| | | const { year: y, month: m, day: d } = funsdates.getYearMonthDay(date) |
| | | return year === y && month === m && day === d |
| | | }, |
| | | // è¿ææ¶é´ |
| | | isPastDue(date) { |
| | | const newDate = this.handleDatetime(new Date()) |
| | | if (new Date(newDate) > date && this.handleDatetime(date) != newDate) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | chooseDate(date) { |
| | | clearTimeout(time) // é¦å
æ¸
é¤è®¡æ¶å¨ |
| | | time = setTimeout(() => { |
| | | this.time = funsdates.getYearMonthDay(date) |
| | | const timeDate = '' |
| | | this.isDbl = false |
| | | // å¯ä»¥ç¹å»çæ¥æ |
| | | if (!this.isPastDue(date)) { |
| | | if ((this.value.indexOf(this.handleDatetime(date)) < 0 && this.value != '') || this.value == '') { // æ°ç»æ·»å |
| | | this.value.push(this.handleDatetime(date)) // æ°å¢å°inputé |
| | | const data = { |
| | | name: this.handleDatetime(date), |
| | | key: this.rowData.CaptPlanWorkShiftCode |
| | | } |
| | | |
| | | this.defArr.push(data) // æ°å¢å° é»è®¤æ°ç»é |
| | | } else if (this.value.indexOf(this.handleDatetime(date)) >= 0) { // æ°ç»åå» |
| | | const indexV = this.value.indexOf(this.handleDatetime(date)) |
| | | this.value.splice(indexV, 1) |
| | | for (const i in this.defArr) { |
| | | if (this.defArr[i].name == this.handleDatetime(date)) { |
| | | this.defArr.splice(i, 1) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | this.$emit('input', this.value) |
| | | }, 300) |
| | | }, |
| | | dblChooseDate(date) { |
| | | if (!this.isPastDue(date)) { |
| | | clearTimeout(time) |
| | | this.dblDate = date |
| | | this.isDbl = true |
| | | this.changeTime = this.handleDatetime(date) |
| | | this.CapacityPlanningOnclickSelect({ CaptPlanId: this.rowData.CaptPlanId, DateTime: this.handleDatetime(date) }) |
| | | this.getDblTime() |
| | | } |
| | | }, |
| | | isDblDate(date) { |
| | | for (const i in this.defArr) { |
| | | if (this.defArr[i].key != '') { |
| | | if (this.defArr[i].name == this.handleDatetime(date) && this.defArr[i].key != this.rowData.CaptPlanWorkShiftCode) { |
| | | return true |
| | | } |
| | | } |
| | | } |
| | | // if(this.dblDate){ |
| | | // let {year,month,day} = funsdates.getYearMonthDay(this.dblDate) |
| | | // let {year:y,month:m,day:d} = funsdates.getYearMonthDay(date) |
| | | // return year === y && month === m && day === d; |
| | | // } |
| | | }, |
| | | isSelect(date) { |
| | | if (this.value.indexOf(this.handleDatetime(date)) >= 0) { |
| | | return true |
| | | } |
| | | }, |
| | | prevMonth() { |
| | | const d = funsdates.getDay(this.time.year, this.time.month, 1) |
| | | d.setMonth(d.getMonth() - 1) |
| | | this.time = funsdates.getYearMonthDay(d) |
| | | }, |
| | | nextMonth() { |
| | | const d = funsdates.getDay(this.time.year, this.time.month, 1) |
| | | d.setMonth(d.getMonth() + 1) |
| | | this.time = funsdates.getYearMonthDay(d) |
| | | }, |
| | | prevYear() { |
| | | const d = funsdates.getDay(this.time.year, this.time.month, 1) |
| | | d.setYear(d.getFullYear() - 1) |
| | | this.time = funsdates.getYearMonthDay(d) |
| | | }, |
| | | nextYear() { |
| | | const d = funsdates.getDay(this.time.year, this.time.month, 1) |
| | | d.setYear(d.getFullYear() + 1) |
| | | this.time = funsdates.getYearMonthDay(d) |
| | | }, |
| | | handleDatetime(date) { |
| | | const { year, month, day } = funsdates.getYearMonthDay(date) |
| | | const res = `${year}-${this.add_zero(month + 1)}-${this.add_zero(day)}` |
| | | return res |
| | | }, |
| | | add_zero(date) { |
| | | if (date < 10) { |
| | | return '0' + date |
| | | } else { |
| | | return date |
| | | } |
| | | }, |
| | | // éä¸çæ¹æ¡ |
| | | // selectDate(){ |
| | | // for(let i in this.defArr){ |
| | | // if(this.projectList[i].CapStus != 'N'){ |
| | | // this.schemeDate = this.projectList[i].CapStus |
| | | // }else{ |
| | | // this.schemeDate = this.rowData.CaptPlanWorkShiftCode |
| | | // } |
| | | // } |
| | | // }, |
| | | // åå»è¯·æ±æ°æ® |
| | | CapacityPlanningOnclickSelect(data) { |
| | | // capacityPlanning.CapacityPlanningOnclickSelect(data).then((res) =>{ |
| | | // this.projectList = res.List |
| | | // for(let i in this.defArr){ |
| | | // if(this.defArr[i].name == data.DateTime){ |
| | | // this.schemeDate = this.defArr[i].key |
| | | // } |
| | | // } |
| | | // this.changeScheme() |
| | | // }) |
| | | }, |
| | | CapacityPlanningGivePlanSubmit() { |
| | | const data = { |
| | | CaptPlanId: this.rowData.CaptPlanId, |
| | | WkshopCode: this.rowData.CaptPlanWorkShopid, |
| | | CapUnitCode: this.rowData.CaptPlanDeviceTypeid, |
| | | CapSetupCode: this.rowData.CaptPlanWorkShiftCode, |
| | | CaptPlanType: this.rowData.CaptPlanType, |
| | | WorkList: JSON.stringify(this.defArr) |
| | | } |
| | | // capacityPlanning.CapacityPlanningGivePlanSubmit(data).then((res) =>{ |
| | | // if (res.statusCode == 300) { |
| | | // this.$message({ |
| | | // showClose:true, |
| | | // message: res.message, |
| | | // type: "error" |
| | | // }); |
| | | // } else { |
| | | // this.$message({ |
| | | // showClose:true, |
| | | // message: res.message, |
| | | // type: "success" |
| | | // }); |
| | | // this.blur() |
| | | // this.CapacityPlanningSearch() |
| | | // } |
| | | // }) |
| | | }, |
| | | CapacityPlanningCalendar() { |
| | | // capacityPlanning.CapacityPlanningCalendar({CaptPlanId:this.rowData.CaptPlanId}).then((res) =>{ |
| | | // |
| | | // for(let i in res.List){ |
| | | // |
| | | // if(res.List[i].key == ''){ |
| | | // res.List[i].key = this.rowData.CaptPlanWorkShiftCode |
| | | // } |
| | | // } |
| | | // this.defArr = res.List |
| | | // }) |
| | | }, |
| | | closeCapacityPlanningCalendar() { |
| | | // capacityPlanning.CapacityPlanningCalendar({CaptPlanId:this.rowData.CaptPlanId}).then((res) =>{ |
| | | // let nameList = [] |
| | | // for(let i in res.List){ |
| | | // nameList.push(res.List[i].name) |
| | | // if(res.List[i].key == ''){ |
| | | // res.List[i].key = this.rowData.CaptPlanWorkShiftCode |
| | | // } |
| | | // } |
| | | // for(let i in this.defArr){ |
| | | // for(let j in res.List){ |
| | | // if(this.defArr[i].name == this.changeTime && res.List[j].name == this.changeTime){ |
| | | // this.defArr[i].key = res.List[j].key |
| | | // } else if(this.defArr[i].name == this.changeTime && nameList.indexOf(this.changeTime)==-1){ |
| | | // this.defArr[i].key = this.rowData.CaptPlanWorkShiftCode |
| | | // } |
| | | // } |
| | | // |
| | | // } |
| | | // }) |
| | | }, |
| | | close() { |
| | | setTimeout(() => { |
| | | this.isDbl = false |
| | | this.closeCapacityPlanningCalendar() |
| | | }, 300) |
| | | }, |
| | | CapacityPlanningSetupSearch() { |
| | | // capacityPlanning.CapacityPlanningSetupSearch(this.form).then((res) => { |
| | | // this.projectDef = res.rows |
| | | // }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | .pannelTo { |
| | | position: absolute; |
| | | z-index: 1000; |
| | | left: 44.8*7px; |
| | | top: -5px; |
| | | width: 45*7px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | background: #FFFFFF; |
| | | margin: 5px 0; |
| | | border: 1px solid #E4E7ED; |
| | | -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | background: #FFFFFF; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .pannelTo_conent { |
| | | padding: 0 37px 0 37px; |
| | | height: 276px;; |
| | | } |
| | | |
| | | .pannelTo_footer { |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .pannelTo_conent ul li { |
| | | overflow: hidden; |
| | | text-align: center; |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .fr { |
| | | float: right; |
| | | } |
| | | |
| | | .fr_mr { |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .fl_ml { |
| | | margin-left: 20px; |
| | | } |
| | | |
| | | .fl { |
| | | float: left; |
| | | } |
| | | |
| | | .bt_style { |
| | | margin-bottom: 10px; |
| | | margin-left: 10px; |
| | | margin-right: 15px; |
| | | } |
| | | |
| | | .pannel { |
| | | width: 45*7px; |
| | | z-index: 1000; |
| | | position: absolute; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | background: #FFFFFF; |
| | | color: #606266; |
| | | border: 1px solid #E4E7ED; |
| | | -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | background: #FFFFFF; |
| | | border-radius: 4px; |
| | | line-height: 30px; |
| | | margin: 5px 0; |
| | | |
| | | .pannel-nav { |
| | | position: relative; |
| | | text-align: center; |
| | | // height: 28px; |
| | | overflow: hidden; |
| | | margin: 0 13px 0 13px; |
| | | padding: 25px 0px 10px 0px; |
| | | |
| | | span { |
| | | cursor: pointer; |
| | | user-select: none; |
| | | padding: 5px; |
| | | color: #606266; |
| | | font-weight: 500; |
| | | vertical-align: top; |
| | | height: 26px; |
| | | |
| | | i { |
| | | vertical-align: top; |
| | | font-size: 12px; |
| | | color: #303133; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .pannel-content { |
| | | .days { |
| | | margin-left: 6px; |
| | | } |
| | | |
| | | .cell { |
| | | display: inline-flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | width: 42.3px; |
| | | height: 30px; |
| | | padding: 4px 0; |
| | | -webkit-box-sizing: border-box; |
| | | box-sizing: border-box; |
| | | text-align: center; |
| | | cursor: pointer; |
| | | position: relative; |
| | | |
| | | span { |
| | | width: 24px; |
| | | height: 24px; |
| | | display: block; |
| | | margin: 0 auto; |
| | | line-height: 24px; |
| | | position: absolute; |
| | | left: 50%; |
| | | -webkit-transform: translateX(-50%); |
| | | transform: translateX(-50%); |
| | | border-radius: 50%; |
| | | -webkit-tap-highlight-color: transparent; |
| | | outline: none; |
| | | } |
| | | |
| | | } |
| | | |
| | | .cellDays:hover { |
| | | color: $main_color; |
| | | } |
| | | } |
| | | |
| | | .pannel-footer { |
| | | // height: 32px; |
| | | border-top: 1px solid #E7E7EA; |
| | | padding: 10px; |
| | | overflow: hidden; |
| | | height: 58px;; |
| | | } |
| | | } |
| | | |
| | | .notCurrentMonth { |
| | | color: #C0C4CC |
| | | } |
| | | |
| | | .today { |
| | | color: $main_color; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .select { |
| | | background-color: $main_color; |
| | | border-radius: 50%; |
| | | color: #FFFFFF !important; |
| | | } |
| | | |
| | | .dblDateStyle { |
| | | background-color: #FFCA00 !important; |
| | | border-radius: 50%; |
| | | color: #FFFFFF !important; |
| | | } |
| | | |
| | | .pannelTo_nav { |
| | | padding: 10px 20px 18px 20px; |
| | | text-align: center |
| | | } |
| | | |
| | | .pannelTo_conent ul { |
| | | margin: 0; |
| | | padding: 0; |
| | | list-style: none; |
| | | } |
| | | |
| | | .yearStyle { |
| | | |
| | | font-weight: 500; |
| | | padding: 0 5px; |
| | | font-size: 14px; |
| | | line-height: 22px; |
| | | text-align: center; |
| | | cursor: pointer; |
| | | color: #444444; |
| | | } |
| | | |
| | | .input__inner { |
| | | |
| | | -webkit-appearance: none; |
| | | background-color: #FFFFFF; |
| | | background-image: none; |
| | | border-radius: 4px; |
| | | border: 1px solid #DCDFE6; |
| | | -webkit-box-sizing: border-box; |
| | | box-sizing: border-box; |
| | | color: #606266; |
| | | display: inline-block; |
| | | font-size: inherit; |
| | | height: 40px; |
| | | line-height: 40px; |
| | | outline: none; |
| | | padding: 0 15px; |
| | | -webkit-transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); |
| | | transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); |
| | | width: 100%; |
| | | } |
| | | |
| | | .li_text { |
| | | font-size: 12px; |
| | | font-weight: 400; |
| | | line-height: 17px |
| | | } |
| | | |
| | | .li_text_color { |
| | | color: #C7C7CB; |
| | | margin-top: 3px; |
| | | } |
| | | |
| | | .pastDue { |
| | | background-color: #F5F7FA; |
| | | opacity: 1; |
| | | cursor: not-allowed !important; |
| | | color: #C0C4CC !important; |
| | | } |
| | | |
| | | .top_yes { |
| | | top: -420px; |
| | | } |
| | | |
| | | .pop_style { |
| | | font-size: 14px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .bigText { |
| | | font-size: 18px; |
| | | color: #606266; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .samllText { |
| | | color: #C0C4CC; |
| | | font-size: 13px; |
| | | vertical-align: bottom; |
| | | } |
| | | |
| | | .pannelTo_title { |
| | | padding-left: 37px; |
| | | } |
| | | |
| | | .mr5 { |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | .mt5 { |
| | | margin-top: 18px; |
| | | } |
| | | |
| | | .mb3 { |
| | | margin-bottom: 3px; |
| | | } |
| | | |
| | | .mt4 { |
| | | margin-top: 4px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | const getYearMonthDay = (date) => { |
| | | const year = date.getFullYear() |
| | | const month = date.getMonth() |
| | | const day = date.getDate() |
| | | |
| | | return { year, month, day } |
| | | } |
| | | const getDay = (year, month, day) => { |
| | | return new Date(year, month, day) |
| | | } |
| | | |
| | | export { |
| | | getYearMonthDay, |
| | | getDay |
| | | } |
| | |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | <el-button type="primary" icon="el-icon-setting" @click="setting('setting')">设置</el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢</el-button>--> |
| | | <!-- <el-button icon="el-icon-download" @click="upload">导å
¥</el-button>--> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | |
| | | > |
| | | <div class="elForm" style="justify-content: flex-start"> |
| | | <el-form-item label-width="70px" label="ç产车é´" style=" display: flex;"> |
| | | <el-select v-model="form.OrgType" style="width: 200px" placeholder="è¯·éæ©"> |
| | | <el-select |
| | | v-model="form.workshop" |
| | | style="width: 200px" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in OrgTypeArr" |
| | | v-for="item in workshopArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç产åå
" style=" display: flex;"> |
| | | <el-input v-model="form.OrgName" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | <el-select |
| | | v-model="form.devicetype" |
| | | style="width: 200px" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in devicetypeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ææç¶æ" style=" display: flex;"> |
| | | <el-select v-model="form.OrgType" style="width: 200px" placeholder="è¯·éæ©"> |
| | | <el-select v-model="form.stustype" style="width: 200px" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in OrgTypeArr" |
| | | v-for="item in stustypeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | |
| | | </el-form> |
| | | <div |
| | | class="bodyTopFormExpand" |
| | | > |
| | | <!-- <svg-icon--> |
| | | <!-- v-show="mouseHoverType==='mouseout'"--> |
| | | <!-- style="cursor: pointer"--> |
| | | <!-- :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"--> |
| | | <!-- @mouseenter="mouseHoverType=$event.type"--> |
| | | <!-- />--> |
| | | <!-- <svg-icon--> |
| | | <!-- v-show="mouseHoverType==='mouseenter'"--> |
| | | <!-- style="cursor: pointer"--> |
| | | <!-- :icon-class="!isExpandForm?'doubleDown':'doubleUp'"--> |
| | | <!-- @click="isExpandForm=!isExpandForm"--> |
| | | <!-- @mouseout="mouseHoverType=$event.type"--> |
| | | <!-- />--> |
| | | </div> |
| | | /> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | |
| | | @sort-change="sortChange" |
| | | > |
| | | <el-table-column |
| | | prop="xh" |
| | | prop="RowNum" |
| | | width="50" |
| | | fixed |
| | | label="åºå·" |
| | | /> |
| | | <el-table-column |
| | | prop="sccj" |
| | | prop="CaptPlanWorkShop" |
| | | label="ç产车é´" |
| | | sortable="custom" |
| | | width="160" |
| | | /> |
| | | <el-table-column |
| | | prop="scdy" |
| | | prop="CaptPlanDeviceType" |
| | | label="ç产åå
" |
| | | width="160" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="mrfa" |
| | | prop="CaptPlanWorkShift" |
| | | label="é»è®¤æ¹æ¡" |
| | | sortable="custom" |
| | | width="240" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div style="display: flex;" @click="mrfaSearch(row)"> |
| | | <div style="display: flex;" @click="mrfaSearch(row,'mrfaSearch')"> |
| | | <el-input |
| | | v-model="row.mrfa" |
| | | v-model="row.CaptPlanWorkShift" |
| | | readonly |
| | | /> |
| | | <el-button |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="gzrl" |
| | | prop="CaptPlanShopCalendarList" |
| | | label="工使¥å" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <!-- <div style="width: 100%;" @click="gzrlClick(row)">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="row.gzrl"--> |
| | | <!-- readonly--> |
| | | <!-- />--> |
| | | <!-- </div>--> |
| | | <!-- <div style="width: 100%;" @click="gzrlClick(row)">--> |
| | | <!-- <el-date-picker--> |
| | | <!-- :ref="'datePicker'+row.xh"--> |
| | | <!-- v-model="row.gzrl"--> |
| | | <!-- :class="'datePicker'+row.xh"--> |
| | | <!-- style="width: 100%;"--> |
| | | <!-- type="dates"--> |
| | | <!-- placeholder="è¯·éæ©ä¸ä¸ªæå¤ä¸ªæ¥æ"--> |
| | | <!-- align="left"--> |
| | | <!-- format="yyyy-MM-dd"--> |
| | | <!-- value-format="yyyy-MM-dd"--> |
| | | <!-- :clearable="false"--> |
| | | <!-- :picker-options="pickerOptions"--> |
| | | <!-- @focus="val=>datePickerFocus(val,row)"--> |
| | | <!-- @blur="val=>datePickerBlur(val,row)"--> |
| | | <!-- @change="val=>datePickerChange(val,row)"--> |
| | | <!-- />--> |
| | | <!-- </div>--> |
| | | <!-- <date-picker v-model="row.gzrl"--> |
| | | <!-- :rowData='row'--> |
| | | <!-- :CapacityPlanningSearch='CapacityPlanningSearch'></date-picker>--> |
| | | |
| | | <date-picker |
| | | v-model="row.CaptPlanShopCalendarList" |
| | | :row-data="row" |
| | | style="width: 100%;" |
| | | :capacity-planning-search="CapacityPlanningSearch" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="czry" |
| | | prop="CaptPlanUser" |
| | | label="å建人å" |
| | | sortable="custom" |
| | | width="160" |
| | | /> |
| | | <el-table-column |
| | | prop="czsj" |
| | | prop="CaptPlanDate" |
| | | width="160" |
| | | label="å建æ¶é´" |
| | | sortable="custom" |
| | | /> |
| | | |
| | | <el-table-column |
| | | prop="yxzt" |
| | | prop="CaptPlanStus" |
| | | width="160" |
| | | label="ææç¶æ" |
| | | sortable="custom" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.CaptPlanStus==='Y'"> |
| | | <svg-icon icon-class="circleYes" style="margin-right: 2px" /> |
| | | ææ |
| | | </div> |
| | | <div v-else-if="row.CaptPlanStus==='N'"> |
| | | <svg-icon icon-class="circleNo" style="margin-right: 2px" /> |
| | | æ æ |
| | | </div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <!-- <el-table-column--> |
| | | <!-- label="æä½"--> |
| | |
| | | align="right" |
| | | layout="total,prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getOrganizationSearch" |
| | | @pagination="getCapacityPlanningSearch" |
| | | /> |
| | | </div> |
| | | |
| | | <!-- :title="operation==='add'?'æ°å¢':'ç¼è¾'"--> |
| | | <el-dialog |
| | | title="设置" |
| | | :title="operation==='setting'?'设置':'é»è®¤æ¹æ¡'" |
| | | :visible.sync="dialogVisible" |
| | | width="800px" |
| | | width="1280px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | top="10vh" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="ç»ç»ç¼ç " prop="OrgCode"> |
| | | <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç»ç»åç§°" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-button v-if="operation==='setting'" type="primary" @click="addRow">æ°å¢</el-button> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="tableDataDialogRef" |
| | | class="tableFixedDialog" |
| | | :data="tableDataDialog" |
| | | :style="{width: 100+'%',height:(tableHeight-200)+'px'}" |
| | | border |
| | | :height="(tableHeight-200)+'px'" |
| | | :row-class-name="tableRowClassName" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | |
| | | </el-form> |
| | | <el-table-column |
| | | v-if="operation!=='setting'" |
| | | width="50" |
| | | fixed |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-radio |
| | | v-model="radioSelectedId" |
| | | :label="row.hx" |
| | | style="padding-left: 10px;" |
| | | @change.native="getCurrentRowSource(row.hx)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="famc" |
| | | label="æ¹æ¡åç§°" |
| | | width="150" |
| | | fixed |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.famc" :disabled="row.isVisible===0" type="text" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="gzsc" |
| | | label="工使¶é¿" |
| | | width="100" |
| | | show-tooltip-when-overflow |
| | | /> |
| | | |
| | | <el-table-column |
| | | prop="time1" |
| | | label="工使¶é´ä¸" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-time-picker |
| | | v-model="row.time1" |
| | | is-range |
| | | :disabled="row.isVisible===0" |
| | | :editable="false" |
| | | :clearable="false" |
| | | range-separator="~" |
| | | start-placeholder="å¼å§" |
| | | end-placeholder="ç»æ" |
| | | format="HH:mm" |
| | | @focus="val=>getTime(val,row,'time1')" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="time2" |
| | | label="工使¶é´äº" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-time-picker |
| | | v-model="row.time2" |
| | | is-range |
| | | :disabled="row.isVisible===0" |
| | | :editable="false" |
| | | :clearable="false" |
| | | range-separator="~" |
| | | start-placeholder="å¼å§" |
| | | end-placeholder="ç»æ" |
| | | format="HH:mm" |
| | | @focus="val=>getTime(val,row,'time2')" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="time3" |
| | | label="工使¶é´ä¸" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-time-picker |
| | | v-model="row.time3" |
| | | is-range |
| | | :editable="false" |
| | | :disabled="row.isVisible===0" |
| | | :clearable="false" |
| | | format="HH:mm" |
| | | range-separator="~" |
| | | start-placeholder="å¼å§" |
| | | end-placeholder="ç»æ" |
| | | @focus="val=>getTime(val,row,'time3')" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="time4" |
| | | label="工使¶é´å" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-time-picker |
| | | v-model="row.time4" |
| | | is-range |
| | | format="HH:mm" |
| | | :editable="false" |
| | | :disabled="row.isVisible===0" |
| | | :clearable="false" |
| | | range-separator="~" |
| | | start-placeholder="å¼å§" |
| | | end-placeholder="ç»æ" |
| | | @focus="val=>getTime(val,row,'time4')" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="time5" |
| | | label="工使¶é´äº" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-time-picker |
| | | v-model="row.time5" |
| | | :disabled="row.isVisible===0" |
| | | is-range |
| | | :editable="false" |
| | | format="HH:mm" |
| | | :clearable="false" |
| | | range-separator="~" |
| | | start-placeholder="å¼å§" |
| | | end-placeholder="ç»æ" |
| | | @focus="val=>getTime(val,row,'time5')" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="operation==='setting'" |
| | | width="100" |
| | | fixed="right" |
| | | label="æä½" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="editRow(row)">ç¼è¾</el-button> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="delRow(row)">å é¤</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="saveRow(row)">ä¿å</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">å æ¶</el-button> |
| | | <el-button type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button> |
| | | <el-button @click="dialogVisibleCancel">è¿ å</el-button> |
| | | <el-button v-if="operation!=='setting'" type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | import ImportPicker from '@/components/ImportPicker' |
| | | import { validateCode } from '@/utils/global' |
| | | import $ from 'jquery' |
| | | import DatePicker from '@/components/DatePicker' |
| | | import { CapacityPlanningSearch } from '@/api/scgl' |
| | | import { DeviceTypeSelect, WorkShopSelect } from '@/api/sbgl' |
| | | |
| | | export default { |
| | | name: 'Zzjg', |
| | | components: { |
| | | Pagination, ImportPicker |
| | | Pagination, ImportPicker, DatePicker |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | | OrgCode: '', // ç»ç»æ¶æä»£ç |
| | | OrgName: '', // ç»ç»æ¶æåç§° |
| | | OrgType: '', // ç»ç»ç±»å |
| | | UserName: '', // å建人å |
| | | createdate: '', |
| | | prop: 'lm_date', // æåºå段 |
| | | workshop: '', // 车é´ç¼ç |
| | | devicetype: '', // ç产åå
|
| | | stustype: '', // ææç¶æ |
| | | prop: 'CaptPlanDate', // æåºå段 |
| | | order: 'desc', // æåºå段 |
| | | page: 1, // 第å 页 |
| | | rows: 20 // æ¯é¡µå¤å°æ¡ |
| | | }, |
| | | OrgTypeArr: [ |
| | | { label: 'æ¯', value: 'Y' }, |
| | | { label: 'å¦', value: 'N' } |
| | | stustypeArr: [ |
| | | { name: 'ææ', code: 'Y' }, |
| | | { name: 'æ æ', code: 'N' } |
| | | ], |
| | | |
| | | workshopArr: [], |
| | | devicetypeArr: [], |
| | | total: 10, |
| | | tableData: [ |
| | | { |
| | | xh: 1, |
| | | sccj: 'æºå 001', |
| | | scdy: 'æºå 产线C01-L01', |
| | | mrfa: '', |
| | | gzrl: '', |
| | | czry: 'Admin', |
| | | czsj: '2022-10-12 10:00:00', |
| | | yxzt: 'ææ' |
| | | }, { |
| | | xh: 2, |
| | | sccj: 'æºå 001', |
| | | scdy: 'æºå 产线C01-L01', |
| | | mrfa: '', |
| | | gzrl: '', |
| | | czry: 'Admin', |
| | | czsj: '2022-10-12 10:00:00', |
| | | yxzt: 'ææ' |
| | | }, { |
| | | xh: 3, |
| | | sccj: 'æºå 001', |
| | | scdy: 'æºå 产线C01-L01', |
| | | mrfa: '', |
| | | gzrl: '', |
| | | czry: 'Admin', |
| | | czsj: '2022-10-12 10:00:00', |
| | | yxzt: 'ææ' |
| | | } |
| | | ], |
| | | tableData: [], |
| | | |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | OrgType: '', |
| | | OrgCode: '', |
| | | OrgName: '', |
| | | SupUnit: ''// ä¸çº§åä½ |
| | | // OrgType: '', |
| | | // OrgCode: '', |
| | | // OrgName: '', |
| | | // SupUnit: ''// ä¸çº§åä½ |
| | | }, |
| | | operation: '', |
| | | dialogFormRules: { |
| | | OrgType: [ |
| | | { required: true, message: '请è¾å
¥éæ©ç±»å', trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgCode: [ |
| | | { required: true, validator: validateCode, trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgName: [ |
| | | { required: true, message: '请è¾å
¥åç§°', trigger: ['blur', 'change'] } |
| | | ] |
| | | |
| | | }, |
| | | |
| | | pickerOptions: { |
| | | disabledDate(time) { |
| | | // return time.getTime() > Date.now(); // å¯éåå²å¤©ãå¯éå½å天ãä¸å¯éæªæ¥å¤© |
| | |
| | | } |
| | | }, |
| | | popoverVisible: false, |
| | | available: null, |
| | | nextMonth: null, |
| | | |
| | | tableDataDialog: [ |
| | | // { |
| | | // famc: 'æ¹æ¡ä¸', |
| | | // gzsc: '8å°æ¶', |
| | | // time1: [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)], |
| | | // time2: '', |
| | | // time3: '', |
| | | // time4: '', |
| | | // time5: '' |
| | | // } |
| | | ], |
| | | radioSelectedId: '', |
| | | |
| | | title_value: 'æ°æ®å¯¼å
¥ / ç¹æ£é¨ä½', |
| | | code: '4', |
| | |
| | | watch: { |
| | | shows() { |
| | | if (!this.shows) { |
| | | this.getOrganizationSearch() |
| | | this.getCapacityPlanningSearch() |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.getOrganizationSearch() |
| | | |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | |
| | | this.handleRequest() |
| | | // this.getDialogData() |
| | | }, |
| | | methods: { |
| | | async getOrganizationSearch() { |
| | | getCurrentRowSource() { |
| | | |
| | | }, |
| | | mrfaSearch(row) { |
| | | getDialogData() { |
| | | let number = Math.random() * Math.random()// ä½ä¸ºå 餿¶çæ è¯ç¬¦ |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | this.tableDataDialog.push( |
| | | { |
| | | hx: 1, |
| | | famc: 'æ¹æ¡ä¸', |
| | | gzsc: '8å°æ¶', |
| | | time1: [], |
| | | time2: [], |
| | | time3: [], |
| | | time4: [], |
| | | time5: [], |
| | | number, |
| | | isVisible: 0 |
| | | } |
| | | ) |
| | | }, |
| | | getTime(val, row, belong) { |
| | | const res = this.getDt() |
| | | if (belong === 'time1') { |
| | | // row.time1.push(new Date(res.yyyy, res.MM, res.dd, '00', '00')) |
| | | row.time1 = row.time1.length > 0 ? row.time1 : row.time1.push(new Date()) |
| | | } else if (belong === 'time2') { |
| | | row.time2 = row.time2.length > 0 ? row.time2 : row.time2.push(new Date()) |
| | | } else if (belong === 'time3') { |
| | | row.time3 = row.time3.length > 0 ? row.time3 : row.time3.push(new Date()) |
| | | } else if (belong === 'time4') { |
| | | row.time4 = row.time4.length > 0 ? row.time4 : row.time4.push(new Date()) |
| | | } else if (belong === 'time5') { |
| | | row.time5 = row.time5.length > 0 ? row.time5 : row.time5.push(new Date()) |
| | | } |
| | | }, |
| | | getDt() { |
| | | const dt = new Date() |
| | | |
| | | const y = dt.getFullYear() |
| | | const m = (dt.getMonth() + 1 + '').padStart(2, '0') |
| | | const d = (dt.getDate() + '').padStart(2, '0') |
| | | |
| | | const hh = (dt.getHours() + '').padStart(2, '0') |
| | | const mm = (dt.getMinutes() + '').padStart(2, '0') |
| | | const ss = (dt.getSeconds() + '').padStart(2, '0') |
| | | |
| | | return { yyyy: y, MM: m, dd: d, hh, mm } |
| | | }, |
| | | addRow() { |
| | | this.tableDataDialog.push( |
| | | { |
| | | hx: 2, |
| | | famc: 'æ¹æ¡xxx', |
| | | gzsc: '8å°æ¶', |
| | | time1: [], |
| | | time2: [], |
| | | time3: [], |
| | | time4: [], |
| | | time5: [], |
| | | isVisible: 1 |
| | | } |
| | | ) |
| | | }, |
| | | editRow(row) { |
| | | console.log(row) |
| | | this.setting() |
| | | row.isVisible = 1 |
| | | }, |
| | | gzrlClick(row) { |
| | | console.log(row, 1) |
| | | // console.log($('1')) |
| | | saveRow(row) { |
| | | row.isVisible = 0 |
| | | }, |
| | | datePickerChange(val, row) { |
| | | // console.log(this.$refs.datePicker, 8) |
| | | // console.log(val, 2) |
| | | delRow(row) { |
| | | |
| | | }, |
| | | datePickerFocus(val, row) { |
| | | const that = this |
| | | // console.log(val, 3) |
| | | // console.log(this.$refs['datePicker' + row.xh], 3333) |
| | | // console.log(val.pickerVisible, 3) |
| | | this.$nextTick(() => { |
| | | // console.log($('.el-date-table'), 9) |
| | | // console.log($('.el-date-table')[0], 9) |
| | | // console.log($('.el-date-table')[0].querySelectorAll('.available'), 9) |
| | | // console.log($('.el-date-table')[0].querySelectorAll('.next-month'), 10) |
| | | CapacityPlanningSearch() { |
| | | |
| | | // console.log($('div').wrap($('.el-picker-panel'))) |
| | | |
| | | const available = $('.el-date-table')[0].querySelectorAll('.available') |
| | | const nextMonth = $('.el-date-table')[0].querySelectorAll('.next-month') |
| | | |
| | | available.forEach(item => { |
| | | const date = item.querySelectorAll('div>span')[0].innerText |
| | | $(item).bind('dblclick', { date }, function(event) { |
| | | // 黿¢é»è®¤äºä»¶ |
| | | event.preventDefault() |
| | | // 黿¢äºä»¶å泡 |
| | | event.stopPropagation() |
| | | console.log(event) |
| | | console.log(event.data.date) |
| | | console.log(that.$message.info('åå»äº')) |
| | | // that.setting() |
| | | }, { |
| | | 'mouseenter': function() { |
| | | }, |
| | | 'mouseleave': function() { |
| | | } |
| | | }) |
| | | |
| | | // $(item).unbind('dblclick').dblclick(e => { |
| | | // // console.log(i, 'i-index', index) |
| | | // console.log(e, 1) |
| | | // }) |
| | | }) |
| | | |
| | | // this.$refs['datePicker' + row.xh] |
| | | // console.log(this.$refs['datePicker' + row.xh].$children[0], 88) |
| | | // console.log(this.$refs['datePicker' + row.xh].$children[0].nativeInputValue = '2022-10-20', 88) |
| | | // console.log(this.$refs['datePicker' + row.xh].$children[0].nativeInputValue = '2022-10-20', 88) |
| | | // console.log(this.$refs['datePicker' + row.xh].$children[0].value = '2022-10-20', 88) |
| | | }, |
| | | handleRequest() { |
| | | this.getCapacityPlanningSearch().then(res => { |
| | | if (res.code === '200') { |
| | | this.getWorkShopSelect() |
| | | this.getDeviceTypeSelect() |
| | | } |
| | | }) |
| | | }, |
| | | datePickerBlur(val, row) { |
| | | console.log(val, 4) |
| | | console.log(val.pickerVisible, 4) |
| | | // val.pickerVisible = true |
| | | async getCapacityPlanningSearch() { |
| | | const res = await CapacityPlanningSearch(this.form) |
| | | this.total = res.count |
| | | this.tableData = res.data |
| | | this.tableData.forEach(item => { |
| | | item.CaptPlanShopCalendarList = item.CaiptPlanShopCalendarList ? item.CaptPlanShopCalendarList : [] |
| | | }) |
| | | |
| | | return { code: res.code } |
| | | }, |
| | | async getWorkShopSelect() { |
| | | const { data: res } = await WorkShopSelect() |
| | | this.workshopArr = res |
| | | }, |
| | | async getDeviceTypeSelect() { |
| | | const { data: res } = await DeviceTypeSelect() |
| | | this.devicetypeArr = res |
| | | }, |
| | | mrfaSearch(row, operation) { |
| | | console.log(row) |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.tableDataDialogRef.doLayout() |
| | | }) |
| | | }, |
| | | // æåºæ¹åæ¶ |
| | | sortChange({ column, prop, order }) { |
| | |
| | | } |
| | | this.form.order = order |
| | | this.form.prop = prop |
| | | this.getOrganizationSearch() |
| | | this.getCapacityPlanningSearch() |
| | | }, |
| | | // æ¥è¯¢ |
| | | search() { |
| | | this.getOrganizationSearch() |
| | | this.getCapacityPlanningSearch() |
| | | }, |
| | | // 导å
¥æé® |
| | | upload() { |
| | |
| | | }, |
| | | // éç½® |
| | | reset() { |
| | | this.form.OrgCode = '' |
| | | this.form.OrgName = '' |
| | | this.form.OrgType = '' |
| | | this.form.UserName = '' |
| | | this.getOrganizationSearch() |
| | | this.form.workshop = '' |
| | | this.form.devicetype = '' |
| | | this.form.stustype = '' |
| | | this.getCapacityPlanningSearch() |
| | | }, |
| | | setting(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.tableDataDialogRef.doLayout() |
| | | }) |
| | | }, |
| | | // æ°å¢æé® |
| | | add(operation) { |
| | |
| | | if (this.form.page > 1 && this.tableData.length === 1) { |
| | | this.form.page-- |
| | | } |
| | | this.getOrganizationSearch() |
| | | this.getCapacityPlanningSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | |
| | | }, |
| | | // å¯¹è¯æ¡ç¡®è®¤ |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const data = { |
| | | OrganCode: this.dialogForm.OrgCode, |
| | | OrganName: this.dialogForm.OrgName, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update', |
| | | Operator: getCookie('admin') |
| | | } |
| | | AddUpdateOrganization(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? 'æ·»å æåï¼' : 'ä¿®æ¹æåï¼') |
| | | this.dialogVisible = false |
| | | this.getOrganizationSearch() |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? 'æ·»å 失败ï¼' : 'ä¿®æ¹å¤±è´¥ï¼') |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | this.dialogVisible = false |
| | | }, |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | |
| | | } |
| | | |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | //padding: 20px 100px !important; |
| | | padding: 20px !important; |
| | | } |
| | | |
| | | ::v-deep .dialogVisibleRoles .el-dialog__body { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | .tableFixedDialog { |
| | | ::v-deep .el-input__icon { |
| | | line-height: 27px; |
| | | } |
| | | |
| | | ::v-deep .el-range-separator { |
| | | line-height: 27px; |
| | | } |
| | | |
| | | ::v-deep .el-radio__label { |
| | | display: none; |
| | | } |
| | | } |
| | | </style> |
| | | <style> |
| | | |
| | |
| | | handleRequest() { |
| | | this.getBoIventorySelect().then(res => { |
| | | if (res.code === '200') { |
| | | // this.getPartSelect() |
| | | this.getStockTypeSelect() |
| | | } |
| | | }) |