zouyu
2026-05-07 5d187bac9e3d6521fee19d2655255a5e7e8c4e0b
人员考勤:导出日期选择调整&不合格处理展示供应商编码字段
已修改2个文件
59 ■■■■ 文件已修改
src/views/business/unpass/index-manage.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/performance/attendance/index.vue 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/index-manage.vue
@@ -221,7 +221,8 @@
        { 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',
@@ -372,8 +373,8 @@
        { 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" },
@@ -402,7 +403,8 @@
            }
          },
        },
        { label: '供应商名称', prop: 'supplierName' },
        { label: '供应商编码', prop: 'supplierId',width:'140' },
        { label: '供应商名称', prop: 'supplierName',width:'140' },
        {
          label: "不合格归属",
          prop: "offGradeAscription",
src/views/performance/attendance/index.vue
@@ -220,7 +220,7 @@
          <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>
@@ -232,16 +232,24 @@
        </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>
@@ -274,7 +282,7 @@
  },
  data() {
    return {
      reportDateRange:[],
      reportDate: null,
      reportType:"MONTH",
      attendanceRecordVisible:false,
      syncDateRange:[],
@@ -358,31 +366,16 @@
    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")