chenlu
2024-12-02 e50fa16b6dbc4e7c50d5fbdbc04d2a556ca01c4e
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintProject.vue
@@ -59,6 +59,10 @@
      router.push({path: '/main/processCard/PrintLabel', query: { projectNo: row.project_no,type:2 }})
      break
    }
    case 'edit2' :{
      router.push({path: '/main/processCard/PrintLabel', query: { projectNo: row.project_no,type:3 }})
      break
    }
  }
}
@@ -83,11 +87,11 @@
//获取七天前到当前时间
function getNowTime() {
  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 15)
  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 14)
      .toISOString()
      .replace('T', ' ')
      .slice(0, 10) //默认开始时间7天前
  const end = new Date(new Date().getTime() + 3600 * 1000 * 24)
  const end = new Date(new Date().getTime())
      .toISOString()
      .replace('T', ' ')
      .slice(0, 10)//默认结束时间当前时间
@@ -111,12 +115,17 @@
      remove(gridOptions.toolbarConfig.slots)
      const button = {'code': 'printLabel',
        status: 'primary',
        'name': "成品打印2"}
      gridOptions.toolbarConfig.buttons.push(button)
        'name': t('processCard.finishedProductPrinting2')}
      let name=company.companyName
      if (name != '金华福喜天成玻璃有限公司') {
        gridOptions.toolbarConfig.buttons.push(button)
      }
      const button2 = {'code': 'detailPrinting',
        status: 'primary',
        'name': "明细打印"}
        'name': t('processCard.detailPrinting')}
      gridOptions.toolbarConfig.buttons.push(button2)
    }
@@ -165,7 +174,7 @@
    useKey: true
  },
  filterConfig: {   //筛选配置项
                    // remote: true
    // remote: true
  },
  customConfig: {
    storage: true
@@ -179,7 +188,7 @@
  //表头参数
  columns: [
    {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50},
    {title: t('basicData.operate'), width: 120, slots: { default: 'button_slot' },fixed:"left"},
    {title: t('basicData.operate'), width: 140, slots: { default: 'button_slot' },fixed:"left"},
    {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
    {
      field: 'project_no',
@@ -243,7 +252,7 @@
        }
        case 'printLabel': {
          if(rowClickIndex.value===null){
            ElMessage.warning(t('请选择工程'))
            ElMessage.warning(t('processCard.pleaseSelectProject'))
            return
          }
          labelRow.value.type = '恒鑫'
@@ -256,7 +265,7 @@
        }
        case 'detailPrinting': {
          if(rowClickIndex.value===null){
            ElMessage.warning(t('请选择工程'))
            ElMessage.warning(t('processCard.pleaseSelectProject'))
            return
          }
          router.push({path: '/main/processCard/PrintProjectDetails', query: {projectNo: rowClickIndex.value.project_no}})
@@ -276,7 +285,16 @@
  id: 'childLabel',
})
const hideButton = () => {
  let name=company.companyName
  // 根据条件值 hidePrintLabels 过滤按钮数组
  gridOptions.toolbarConfig.buttons = gridOptions.toolbarConfig.buttons.filter(button => {
    // 这里根据 hidePrintLabels 的值决定是否隐藏 printLabel 和 printLabel2
    if (name == '金华福喜天成玻璃有限公司') {
      return button.code !== 'printLabel';
    }
  })
}
</script>
<template>
@@ -324,6 +342,7 @@
      <template #button_slot="{ row }">
        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('machine.cutting')}}</el-button>
        <el-button @click="getTableRow(row,'edit1')" link type="primary" size="small">{{$t('machine.tempering')}}</el-button>
        <el-button @click="getTableRow(row,'edit2')" link type="primary" size="small">{{$t('components.finishedProduct')}}</el-button>
      </template>
      <template #num1_filter="{ column, $panel }">