人员考勤:导出日期选择调整&不合格处理展示供应商编码字段
| | |
| | | { label: '批号', prop: 'updateBatchNo',width:'160' }, |
| | | { label: '零件号', prop: 'partNo',width:'140' }, |
| | | { label: '零件描述', prop: 'partDesc' }, |
| | | { label: '供应商名称', prop: 'supplierName' }, |
| | | { label: '供应商编码', prop: 'supplierId',width:'140' }, |
| | | { label: '供应商名称', prop: 'supplierName',width:'140' }, |
| | | { label: '不合格描述', prop: 'unqualifiedDesc',width:'160' }, |
| | | { |
| | | dataType: 'tag', |
| | |
| | | { label: '物料名称', prop: 'materialName',width: "160px" }, |
| | | { label: '生产批次', prop: 'productionBatch',width: "160px" }, |
| | | { label: '到货数量', prop: 'cargoQuantity' }, |
| | | { label: '规格型号', prop: 'specsModels' }, |
| | | { label: '报检日期', prop: 'inspectTime' }, |
| | | { label: '规格型号', prop: 'specsModels',width:'140' }, |
| | | { label: '报检日期', prop: 'inspectTime',width:'120' }, |
| | | { label: '状态', prop: 'statusDB' }, |
| | | { label: '反馈人', prop: 'feedbackUser' }, |
| | | { label: '要检验的采购数量', prop: 'qtyToInspect',width: "140px" }, |
| | |
| | | } |
| | | }, |
| | | }, |
| | | { label: '供应商名称', prop: 'supplierName' }, |
| | | { label: '供应商编码', prop: 'supplierId',width:'140' }, |
| | | { label: '供应商名称', prop: 'supplierName',width:'140' }, |
| | | { |
| | | label: "不合格归属", |
| | | prop: "offGradeAscription", |
| | |
| | | <label>统计维度:</label> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <el-radio-group v-model="reportType" size="mini" disabled> |
| | | <el-radio-group @change="()=>{this.reportDate = null}" v-model="reportType" size="mini"> |
| | | <el-radio label="YEAR">年度</el-radio> |
| | | <el-radio label="MONTH">月度</el-radio> |
| | | </el-radio-group> |
| | |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <el-date-picker |
| | | v-if="reportType==='YEAR'" |
| | | size="small" |
| | | v-model="reportDateRange" |
| | | v-model="reportDate" |
| | | style="width:100%" |
| | | @change="changeReportDateRange" |
| | | type="datetimerange" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | :default-time="['00:00:00','23:59:59']" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | type="year" |
| | | format="yyyy" |
| | | value-format="yyyy" |
| | | placeholder="请选择年份"> |
| | | </el-date-picker> |
| | | <el-date-picker |
| | | v-if="reportType==='MONTH'" |
| | | size="small" |
| | | v-model="reportDate" |
| | | style="width:100%" |
| | | type="month" |
| | | format="yyyy-MM" |
| | | value-format="yyyy-MM" |
| | | placeholder="请选择月份"> |
| | | </el-date-picker> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | reportDateRange:[], |
| | | reportDate: null, |
| | | reportType:"MONTH", |
| | | attendanceRecordVisible:false, |
| | | syncDateRange:[], |
| | |
| | | window.removeEventListener("resize",this.resizeHandler) |
| | | }, |
| | | methods: { |
| | | changeReportDateRange(val){ |
| | | //判断时间区间是否超过一个月 |
| | | if(val && val.length===2){ |
| | | const flag = isOverOneMonth(val[0],val[1]); |
| | | this.reportType = flag?'YEAR':'MONTH' |
| | | } |
| | | }, |
| | | openAttendanceRecordDialog (){ |
| | | this.reportDateRange = getTimeRange() |
| | | this.$nextTick(()=>{ |
| | | this.attendanceRecordVisible = true |
| | | }) |
| | | this.attendanceRecordVisible = true |
| | | }, |
| | | //导出考勤记录 |
| | | exportStaffAttendanceRecords(){ |
| | | this.exportLoading = true |
| | | let params = { |
| | | attendanceReportType:this.reportType, |
| | | } |
| | | if (this.reportDateRange && this.reportDateRange.length === 2) { |
| | | params.startDate = this.reportDateRange[0]; |
| | | params.endDate = this.reportDateRange[1]; |
| | | } else { |
| | | params.startDate = ""; |
| | | params.endDate = ""; |
| | | reportDate: this.reportDate, |
| | | keyword: this.queryParams.keyword |
| | | } |
| | | exportStaffAttendanceRecords({...params}).then(res=>{ |
| | | transformExcel(res, "中天耐丝质量考勤汇总.xlsx") |