Merge remote-tracking branch 'origin/master'
# Conflicts:
# src/assets/api/controller.js
# src/components/do/b1-ins-order/add.vue
| | |
| | | companies, |
| | | auxiliaryOutputWorkingHours, |
| | | auxiliaryWorkingHoursDay, |
| | | auxiliaryCorrectionHours, |
| | | insBushing |
| | | } |
| | | } |
| | |
| | | approve: "/auxiliaryWorkingHoursDay/approve", //批准 |
| | | } |
| | | |
| | | const auxiliaryCorrectionHours = { |
| | | selectAuxiliaryCorrectionHours: "/auxiliaryCorrectionHours/selectAuxiliaryCorrectionHours", //查询修正工时 |
| | | } |
| | | |
| | | const insBushing = { |
| | | selectBushingBySampleId: "/insBushing/selectBushingBySampleId", //通过样品id获取样品下光纤配置内容 |
| | | } |
| | |
| | | <el-table-column prop="section" label="区间" width="120" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="ask" label="要求值" min-width="220px"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" placeholder="要求值" v-model="scope.row.ask" clearable type="textarea" readonly |
| | | :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row)" :readonly="active>1"></el-input> |
| | | <el-input size="small" placeholder="要求值" v-model="scope.row.ask" clearable type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row)" v-if="active==1&&isAskOnlyRead"></el-input> |
| | | <span v-else>{{ scope.row.ask }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | filters: [], |
| | | formType: [], |
| | | configShow: false, |
| | | currentMethod: null, |
| | | isAskOnlyRead:false, |
| | | sampleId: null |
| | | } |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | rowClick(row, column, event) { |
| | | this.currentMethod = row |
| | | let obj = this.methods.find(a=>a.id==this.currentMethod.standardMethodListId) |
| | | if(obj&&obj.code=='委托要求'){ |
| | | this.isAskOnlyRead = true |
| | | }else{ |
| | | this.isAskOnlyRead = false |
| | | } |
| | | this.sampleId = row.id |
| | | if(this.active!==1){ |
| | | this.sampleIds = [] |
| | |
| | | }, |
| | | methodChange(val, row) { |
| | | if(val===null||val==='')return |
| | | this.currentMethod = row |
| | | let obj = this.methods.find(a=>a.id==this.currentMethod.standardMethodListId) |
| | | if(obj&&obj.code=='委托要求'){ |
| | | this.isAskOnlyRead = true |
| | | }else{ |
| | | this.isAskOnlyRead = false |
| | | } |
| | | this.getProductLoad = true |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | model: row.model + '-' + row.modelNum, |
| | |
| | | <el-input v-model="formData0.number" size="small" :disabled="title=='批准'"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="数量:" required> |
| | | <el-input v-model="formData0.amount" size="small" :disabled="title=='批准'"></el-input> |
| | | <el-input v-model="formData0.reviewerNumber" size="small" :disabled="title=='批准'"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="核准工时:"> |
| | | <el-input v-model="formData0.approvedWorkingHour" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="辅助工时:"> |
| | | <el-input v-model="formData0.nonproductiveTime" size="small" disabled></el-input> |
| | | <el-form-item label="复核工时:"> |
| | | <el-input v-model="formData0.reviewerNonproductiveTime" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="辅助项目:"> |
| | | <el-input v-model="formData0.auxiliaryProject" size="small" disabled></el-input> |
| | |
| | | tagField: { |
| | | shift:{ |
| | | select:[] |
| | | }, |
| | | state:{ |
| | | select:[ |
| | | { |
| | | label:'已提交', |
| | | value:'已提交', |
| | | type:'primary' |
| | | }, |
| | | { |
| | | label:'已审核', |
| | | value:'已审核', |
| | | type:'warning' |
| | | }, |
| | | { |
| | | label:'已批准', |
| | | value:'已批准', |
| | | type:'success' |
| | | }, |
| | | ] |
| | | }, |
| | | weekDay:{ |
| | | select:[] |
| | | } |
| | | }, |
| | | linkEvent: {}, |
| | | selectField: { |
| | | shift:{ |
| | | select:[] |
| | | }, |
| | | state:{ |
| | | select:[ |
| | | { |
| | | label:'已提交', |
| | | value:'已提交', |
| | | type:'primary' |
| | | }, |
| | | { |
| | | label:'已审核', |
| | | value:'已审核', |
| | | type:'warning' |
| | | }, |
| | | { |
| | | label:'已批准', |
| | | value:'已批准', |
| | | type:'success' |
| | | }, |
| | | ] |
| | | }, |
| | | weekDay:{ |
| | | select:[] |
| | | } |
| | | }, |
| | |
| | | entityCopy1: {}, |
| | | upIndex1:100, |
| | | weekList:[ |
| | | {label: '星期一', value: '1'}, |
| | | {label: '星期二', value: '2'}, |
| | | {label: '星期三', value: '3'}, |
| | | {label: '星期四', value: '4'}, |
| | | {label: '星期五', value: '5'}, |
| | | {label: '星期六', value: '6'}, |
| | | {label: '星期日', value: '7'} |
| | | {label: '星期一', value: '1',type:'primary'}, |
| | | {label: '星期二', value: '2',type:'primary'}, |
| | | {label: '星期三', value: '3',type:'primary'}, |
| | | {label: '星期四', value: '4',type:'primary'}, |
| | | {label: '星期五', value: '5',type:'primary'}, |
| | | {label: '星期六', value: '6',type:'primary'}, |
| | | {label: '星期日', value: '7',type:'primary'} |
| | | ], |
| | | currentTable:'ValueTable0', |
| | | addVisible:false, |
| | |
| | | createUser:'', |
| | | shift:'', |
| | | number:'', |
| | | amount:'', |
| | | reviewerNumber:'', |
| | | approvedWorkingHour:'', |
| | | nonproductiveTime:'', |
| | | reviewerNonproductiveTime:'', |
| | | auxiliaryProject:'', |
| | | reviewerRemark:'', |
| | | }, |
| | |
| | | this.formData.nonproductiveTime = this.formData.amount*val |
| | | } |
| | | }, |
| | | 'formData0.amount'(val){ |
| | | 'formData0.reviewerNumber'(val){ |
| | | if(val){ |
| | | if(!isNaN(val)){ |
| | | if(this.formData0.approvedWorkingHour){ |
| | | this.formData0.nonproductiveTime = this.formData0.approvedWorkingHour*val |
| | | this.formData0.reviewerNonproductiveTime = this.formData0.approvedWorkingHour*val |
| | | } |
| | | }else{ |
| | | this.$message.error('请输入数字') |
| | | this.formData0.amount = '' |
| | | this.formData0.reviewerNumber = '' |
| | | } |
| | | } |
| | | }, |
| | | 'formData0.approvedWorkingHour'(val){ |
| | | if(val&&this.formData0.amount){ |
| | | this.formData0.nonproductiveTime = this.formData0.amount*val |
| | | if(val&&this.formData0.reviewerNumber){ |
| | | this.formData0.reviewerNonproductiveTime = this.formData0.reviewerNumber*val |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.selectshiftByUser() |
| | | this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.entityCopy1 = this.HaveJson(this.componentData1.entity); |
| | | this.componentData.tagField.weekDay.select = this.weekList |
| | | this.componentData.selectField.weekDay.select = this.weekList |
| | | }, |
| | | methods:{ |
| | | getYearAndMonthAndDays(date){ |
| | |
| | | let entity = {} |
| | | if(this.entity.week1&&this.entity.week2){ |
| | | entity.week = JSON.stringify([this.entity.week1,this.entity.week2]) |
| | | }else{ |
| | | entity.week = '' |
| | | } |
| | | if(this.entity.dateTime){ |
| | | entity.dateTime = JSON.stringify(this.entity.dateTime) |
| | | }else{ |
| | | entity.dateTime = '' |
| | | } |
| | | entity.weekDay = this.entity.weekDay |
| | | entity.name = this.entity.name |
| | |
| | | this.$message.error('请输入数量') |
| | | return |
| | | } |
| | | this.checkLoadY = true |
| | | |
| | | if(this.title == '审核'){ |
| | | // if(e==0){ |
| | | // // 审核不通过 |
| | | // }else{ |
| | | // // 审核通过 |
| | | // } |
| | | this.formData0.state = e==0?'审核不通过':'审核通过' |
| | | if(e==0){ |
| | | // 审核不通过 |
| | | this.checkLoadN = true |
| | | }else{ |
| | | // 审核通过 |
| | | this.checkLoadY = true |
| | | } |
| | | this.formData0.state = e==0?this.formData0.state:'已审核' |
| | | this.$axios.post(this.$api.auxiliaryWorkingHoursDay.check, { |
| | | ...this.formData0 |
| | | }, { |
| | |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.checkLoadY = false |
| | | if(e==0){ |
| | | // 审核不通过 |
| | | this.checkLoadN = false |
| | | }else{ |
| | | // 审核通过 |
| | | this.checkLoadY = false |
| | | } |
| | | if (res.code == 201) return |
| | | this.$message.success('操作成功') |
| | | this.checkVisible = false |
| | |
| | | this.collectWorkingHours() |
| | | }) |
| | | }else{ |
| | | // if(e==0){ |
| | | // // 审核不通过 |
| | | // }else{ |
| | | // // 审核通过 |
| | | // } |
| | | if(e==0){ |
| | | this.checkLoadN = true |
| | | }else{ |
| | | this.checkLoadY = true |
| | | } |
| | | this.$axios.post(this.$api.auxiliaryWorkingHoursDay.approve, { |
| | | id:this.formData0.id, |
| | | state:e==0?'批准不通过':'批准通过' |
| | | state:e==0?'已提交':'已批准' |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.checkLoadY = false |
| | | if(e==0){ |
| | | this.checkLoadN = false |
| | | }else{ |
| | | this.checkLoadY = false |
| | | } |
| | | if (res.code == 201) return |
| | | this.$message.success('操作成功') |
| | | this.checkVisible = false |
| | |
| | | if(this.formData.number){ |
| | | this.$axios.post(this.$api.auxiliaryWorkingHoursDay.selectAuxiliaryWorkingHoursByNumber+'?number='+this.formData.number).then(res => { |
| | | this.auxiliaryWorking = res.data |
| | | this.formData.approvedWorkingHour = this.auxiliaryWorking.approvedWorkingHour |
| | | this.formData.auxiliaryProject = this.auxiliaryWorking.auxiliaryProject |
| | | if(this.addVisible){ |
| | | this.formData.approvedWorkingHour = this.auxiliaryWorking.approvedWorkingHour |
| | | this.formData.auxiliaryProject = this.auxiliaryWorking.auxiliaryProject |
| | | }else if(this.title=='审核'&&this.checkVisible){ |
| | | this.formData0.approvedWorkingHour = this.auxiliaryWorking.approvedWorkingHour |
| | | this.formData0.auxiliaryProject = this.auxiliaryWorking.auxiliaryProject |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | handleOut(){ |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.auxiliaryOutputWorkingHours.exportWorkingHours,{responseType: 'blob'}).then(res => { |
| | | this.$axios.post(this.$api.auxiliaryOutputWorkingHours.exportWorkingHours,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('导出成功') |
| | | // let fileName="日工时汇总表"; |
| | | // const blob = new Blob([res], { |
| | | // type: 'application/force-download' |
| | | // }) |
| | | // const filename = decodeURI(fileName+'.xlsx') |
| | | // // 创建一个超链接,将文件流赋进去,然后实现这个超链接的单击事件 |
| | | // const elink = document.createElement('a') |
| | | // elink.download = filename |
| | | // elink.style.display = 'none' |
| | | // elink.href = URL.createObjectURL(blob) |
| | | // document.body.appendChild(elink) |
| | | // elink.click() |
| | | // URL.revokeObjectURL(elink.href) // 释放URL 对象 |
| | | // document.body.removeChild(elink) |
| | | const blob = new Blob([res], { |
| | | type: 'application/force-download' |
| | | }) |
| | | const link = document.createElement('a') |
| | | link.href = URL.createObjectURL(blob) |
| | | link.download = decodeURI('日工时汇总表'+'.xlsx') |
| | | document.body.appendChild(link) |
| | | link.click() |
| | | window.setTimeout(function () { |
| | | URL.revokeObjectURL(blob) |
| | | document.body.removeChild(link) |
| | | }, 0) |
| | | const blob = new Blob([res.data]); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '日工时汇总表.xlsx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | } |
| | |
| | | <div class="search_label">日期:</div> |
| | | <div class="search_input" style="display: flex;align-items: center;"> |
| | | <el-date-picker |
| | | v-model="componentData.entity.laboratory" |
| | | v-model="componentData.entity.month" |
| | | type="month" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | format="yyyy-MM" |
| | | value-format="yyyy" |
| | | placeholder="选择月" size="small" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">员工:</div> |
| | | <el-select v-model="componentData.entity.laboratory" placeholder="全部" size="small" @change="refreshTable()"> |
| | | <el-select v-model="componentData.entity.name" placeholder="全部" size="small" @change="refreshTable()"> |
| | | <el-option v-for="item in personList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | </el-option> |
| | | </el-select> --> |
| | | <el-input size="small" placeholder="请输入" clearable |
| | | v-model="componentData.entity.department" @keyup.enter.native="refreshTable()"></el-input> |
| | | v-model="componentData.entity.departLims" @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;width: 100px;"> |
| | |
| | | :url="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" |
| | | :componentData="componentData" :inputUrl="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :downUrl="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :key="upIndex" /> |
| | | <ValueTable ref="ValueTable1" |
| | | v-show="currentTable == 'value1'" |
| | | :url="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" |
| | | v-if="currentTable == 'value1'" |
| | | :url="$api.auxiliaryCorrectionHours.selectAuxiliaryCorrectionHours" |
| | | :componentData="componentData0" :key="upIndex" /> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | import ValueTable from '../../tool/value-table.vue' |
| | | import { |
| | | getYearAndMonthAndDays |
| | | } from '../../../util/date' |
| | | export default { |
| | | components: { |
| | | ValueTable |
| | |
| | | return{ |
| | | componentData: { |
| | | entity: { |
| | | number: null, |
| | | department: null, |
| | | laboratory: null, |
| | | month: null, |
| | | name: null, |
| | | departLims: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | |
| | | }, |
| | | componentData0: { |
| | | entity: { |
| | | number: null, |
| | | department: null, |
| | | laboratory: null, |
| | | month: getYearAndMonthAndDays().split('-')[0]+'-'+getYearAndMonthAndDays().split('-')[1], |
| | | name: null, |
| | | departLims: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | |
| | | requiredAdd: [], |
| | | requiredUp: [] |
| | | }, |
| | | entity:{}, |
| | | upIndex:0, |
| | | weekList:[], |
| | | personList:[], |
| | |
| | | this.getUsers() |
| | | }, |
| | | methods: { |
| | | getYearAndMonthAndDays(date){ |
| | | return getYearAndMonthAndDays(date) |
| | | }, |
| | | refresh(){}, |
| | | refreshTable(){}, |
| | | getUsers(){ |
| | |
| | | } |
| | | this.selectTree = data2.replace(' - ', '') |
| | | this.addOb.fatherId = val.id; |
| | | this.componentData.entity.departLimsId = val.id+','; |
| | | this.componentData.entity.departLimsId = val.id; |
| | | this.refreshTable() |
| | | }, |
| | | getNodeParent(val) { |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="scroll-right" id="nav" style="cursor: move;"> |
| | | <div class="scroll-right"> |
| | | <div class="content"> |
| | | <div class="content-title content-title-right" style="border-bottom: 0;"> |
| | | <div class="content-title-item" v-for="(item,index) in weeks" :key="'b'+index"> |
| | |
| | | } |
| | | this.monthList.reverse() |
| | | // this.getPower() |
| | | this.scrollInit() |
| | | }, |
| | | methods: { |
| | | refresh(){ |
| | | this.list = []; |
| | | this.yearList = [] |
| | | this.keyMap = {}; |
| | | this.finishLoding = false; |
| | | this.currentPage = 1 |
| | | this.query = { |
| | | userName:'', |
| | |
| | | refreshTable(){ |
| | | this.keyMap = {}; |
| | | this.currentPage = 1 |
| | | this.finishLoding = false; |
| | | if(this.query.month){ |
| | | this.list = []; |
| | | this.init() |
| | |
| | | margin-left: 220px; |
| | | overflow-x: scroll; |
| | | /* overflow-x: hidden; */ |
| | | cursor: move; |
| | | } |
| | | |
| | | .content { |