廖井涛
2024-06-14 fd596adc9e93e777d2dec6dacf8003c4b8dbf960
north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue
@@ -20,7 +20,7 @@
})
//工序
const value = ref('磨边')
const value = ref(t('machine.edgeGrinding'))
//表尾求和
const sumNum = (list, field) => {
@@ -223,51 +223,51 @@
  },//表头参数
  columns: [
    {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50},
    {type: 'seq', fixed: "left", title: '自序', width: 50},
    {field: 'create_time', width: 120, title: '下单时间'},
    {field: 'delivery_date', width: 120, title: '交货日期'},
    {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
    {field: 'create_time', width: 120, title:  t('report.orderTime')},
    {field: 'delivery_date', width: 120, title:  t('report.deliveryDate')},
    {
      field: 'order_id', width: 120, title: '销售单号', filters: [{data: ''}],
      field: 'order_id', width: 120, title: t('order.orderId'), filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
    },
    {
      field: 'process_id',
      width: 120,
      title: '流程卡号',
      title: t('processCard.processId'),
      showOverflow: "ellipsis",
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
    },
    {
      field: 'customer_name', width: 130, title: '客户名称', filters: [{data: ''}],
      field: 'customer_name', width: 130, title: t('customer.customerName'), filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
    },
    {
      field: 'project', width: 120, title: '项目名称', filters: [{data: ''}],
      field: 'project', width: 120, title: t('order.project'), filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
    },
    {
      field: 'batch', width: 100, title: '批次', filters: [{data: ''}],
      field: 'batch', width: 100, title: t('order.batch'), filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
    },
    {field: 'order_number', width: 100, title: '序号'},
    {field: 'technology_number', width: 120, title: '小片顺序', showOverflow: "ellipsis"},
    {field: 'glass_child', width: 100, title: '单片名称'},
    {field: 'child_width', width: 120, title: '宽'},
    {field: 'child_height', width: 120, title: '高'},
    {field: 'quantity', width: 120, title: '订单数量'},
    {field: 'childArea', width: 120, title: '单片面积'},
    {field: 'actualArea', width: 120, title: '实际面积'},
    {field: 'completeNum', width: 120, title: '已完成数量'},
    {field: 'completeArea', width: 120, title: '已完成面积'},
    {field: 'incompleteNum', width: 120, title: '未完成数量'},
    {field: 'incompleteArea', width: 120, title: '未完成面积'},
    {field: 'product_name', width: 120, title: '成品名称'},
    {field: 'order_number', width: 100, title: t('order.OrderNum')},
    {field: 'technology_number', width: 120, title: t('processCard.technologyNumber'), showOverflow: "ellipsis"},
    {field: 'glass_child', width: 100, title: t('reportingWorks.glassChild')},
    {field: 'child_width', width: 120, title: t('order.width')},
    {field: 'child_height', width: 120, title: t('order.height')},
    {field: 'quantity', width: 120, title: t('order.quantity')},
    {field: 'childArea', width: 120, title: t('order.trueArea')},
    {field: 'actualArea', width: 120, title: t('order.trueGrossArea')},
    {field: 'completeNum', width: 120, title: t('report.completedQuantity')},
    {field: 'completeArea', width: 120, title: t('report.completedArea')},
    {field: 'incompleteNum', width: 120, title: t('report.unfinishedQuantity')},
    {field: 'incompleteArea', width: 120, title: t('report.unfinishedArea')},
    {field: 'product_name', width: 120, title: t('order.product')},
  ],//表头按钮
  toolbarConfig: {
@@ -312,12 +312,12 @@
    inputProject = null
  }
  if(date===null){
    ElMessage.warning("请先选择日期")
    ElMessage.warning(t('report.pleaseSelectADateFirst'))
    return
  }
  if(processes===null){
    ElMessage.warning("请先选择工序")
    ElMessage.warning(t('report.pleaseSelectAProcessFirst'))
    return
  }
@@ -326,7 +326,7 @@
  const timeDiff = Math.abs(date2.getTime() - date1.getTime());
  const daysDiff = timeDiff / (1000 * 3600 * 24);
  if(Math.floor(daysDiff)>180){
    ElMessage.warning("导出的筛选时间不能超过180天")
    ElMessage.warning(t('report.theFilteringTimeForExportCannotExceed180Days'))
    return
  }
   let dataMp = ref({
@@ -364,9 +364,9 @@
        <el-date-picker
            v-model="form.date1"
            end-placeholder="结束时间"
            :start-placeholder="$t('basicData.startDate')"
            :end-placeholder="$t('basicData.endDate')"
            format="YYYY/MM/DD"
            start-placeholder="开始时间"
            style="width: 100px"
            type="daterange"
            value-format="YYYY-MM-DD"
@@ -374,7 +374,7 @@
        &nbsp;&nbsp;
        <el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 130px"></el-input>
        &nbsp;&nbsp;
        <el-input v-model="form.project" clearable placeholder="项目名称" style="width: 130px"></el-input>
        <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 130px"></el-input>
        &nbsp;
        <el-select v-model="value" clearable default-value="default_city" style="width: 120px">
          <el-option
@@ -384,7 +384,7 @@
              :value="item.basic_name"
          />
        </el-select>
        <el-button type="primary" @click="getWorkOrder">查询</el-button>
        <el-button type="primary" @click="getWorkOrder">{{$t('basicData.search')}}</el-button>
      </el-row>
    </div>
@@ -408,17 +408,17 @@
      <!--左边固定显示的插槽-->
      <template #button_slot="{ row }">
        <el-button link size="small" type="primary" @click="getTableRow(row,'edit')">编辑</el-button>
        <el-button link size="small" type="primary" @click="getTableRow(row,'setType')">反审</el-button>
        <el-button link size="small" type="primary" @click="getTableRow(row,'delete')">删除</el-button>
        <el-button link size="small" type="primary" @click="getTableRow(row,'edit')">{{$t('basicData.edit')}}</el-button>
        <el-button link size="small" type="primary" @click="getTableRow(row,'setType')">{{$t('basicData.cancelReview')}}</el-button>
        <el-button link size="small" type="primary" @click="getTableRow(row,'delete')">{{$t('basicData.delete')}}</el-button>
      </template>
      <template #toolbar_buttons>
        <vxe-button style="margin-right: 0.5rem"
                    @click="exportExcel('/report/exportProcessToBeCompleted',
                                          '工序待完成报表',
                                          t('report.processToBeCompleted'),
                                          form.date1)">
          导出</vxe-button>
          {{t('basicData.export')}}</vxe-button>
      </template>
      <template #num1_filter="{ column, $panel }">