廖井涛
2024-07-17 3fe2d018ee29675c724feedf1fed2c8c5f5e38b2
north-glass-erp/northglass-erp/src/views/pp/rework/PrintReworkFlowCard.vue
@@ -189,7 +189,7 @@
  let startTime = form.date1[0]
  let endTime = form.date1[1]
// 第一次加载查询
  request.post(`/Replenish/selectPrint/${startTime}/${endTime}`, filterData.value).then((res) => {
  request.post(`/rework/selectPrint/${startTime}/${endTime}`, filterData.value).then((res) => {
    if (res.code == 200) {
      xGrid.value.loadData(res.data.data)
@@ -283,16 +283,23 @@
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
    },
    {
      field: 'order_number',
      title:  t('order.OrderNum'),
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
    },
    {field: 'technology_number', title: t('processCard.technologyNumber'), showOverflow: "ellipsis"},
    {field: 'glass_address', title: t('processCard.glassAddress'),},
    {field: 'patch_num', title:  t('order.quantity'),},
    {field: 'patch_area', title:  t('order.area'),},
    {field: 'responsible_team', title:  t('reportingWorks.responsibleTeam'),},
    {field: 'rework_num', title:  t('order.quantity'),},
    {field: 'rework_area', title:  t('order.area'),},
    {field: 'rework_team', title:  t('reportingWorks.responsibleTeam'),},
    {field: 'responsible_equipment', title:  t('reportingWorks.responsibleEquipment'),},
    {field: 'responsible_personnel', title:  t('reportingWorks.responsiblePersonnel'),},
    {field: 'patch_type', title:  t('reportingWorks.breakageType'),},
    {field: 'patch_reason', title:  t('reportingWorks.breakageReason'),},
    {field: 'patch_processes', title:  t('reportingWorks.responsibleProcess'),},
    {field: 'rework_type', title:  t('reportingWorks.breakageType'),},
    {field: 'rework_reason', title:  t('reportingWorks.breakageReason'),},
    {field: 'rework_processes', title:  t('reportingWorks.responsibleProcess'),},
    {field: 'product_name', title: t('order.product'),},
    {field: 'glass_child', title: t('reportingWorks.glassChild'),},
  ],//表头按钮
@@ -301,6 +308,8 @@
    buttons: [
      {code: 'print', name: t('processCard.print'), status: 'primary'},
      {code: 'customLabel', name: t('processCard.customLabelPrinting'), status: 'primary'},
      {code: 'printLabel', name: t('processCard.labelPrinting'), status: 'primary'},
      {code: 'printLabel2', name: t('processCard.labelPrinting2'), status: 'primary'},
    ],
    // import: false,
@@ -434,6 +443,31 @@
          break
        }
        case 'printLike': {
          if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
            return
          }
          if(printMerge.value===null ||printMerge.value===''){
            ElMessage.warning('请填入需要合并的层')
            return
          }
          let id = ""
          for (let i = 0; i < selectRecords.length; i++) {
            if (i + 1 === selectRecords.length) {
              id += selectRecords[i].id
            } else {
              id += selectRecords[i].id + "|"
            }
          }
          printRow.value.list = JSON.stringify(selectRecords)
          printRow.value.printMergeVal=printMerge.value
          printRow.value.like="1"
          // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}})
          dialogTableVisible.value=true
          break
        }
      }
    }
  },
@@ -539,7 +573,11 @@
  toolbarConfig: {
    buttons: [
      {code: 'sort', name: t('processCard.sorting'), status: 'primary'},
      {code: 'print', name: t('processCard.print'), status: 'primary'},
      {code: 'customLabel', name: t('processCard.customLabelPrinting'), status: 'primary'},
      {code: 'printLabel', name: t('processCard.labelPrinting'), status: 'primary'},
      {code: 'printLabel2', name: t('processCard.labelPrinting2'), status: 'primary'},
      {code: 'printLike', name: "同配置打印", status: 'primary'},
    ],
    // import: false,
    // export: true,
@@ -575,9 +613,9 @@
  gridOptions.toolbarConfig.buttons = gridOptions.toolbarConfig.buttons.filter(button => {
    // 这里根据 hidePrintLabels 的值决定是否隐藏 printLabel 和 printLabel2
    if (hidePrintLabels=='true') {
      return button.code !== 'printLabel' && button.code !== 'printLabel2';
      return button.code !== 'printLabel' && button.code !== 'printLabel2' ;
    } else {
      return true; // 不隐藏任何按钮
      return true && button.code !=='printLike'; // 显示该按钮
    }
  })
}
@@ -603,7 +641,6 @@
  <div class="main-div-customer">
    <el-date-picker
        v-model="form.date1"
        :default-time="defaultTime"
        :end-placeholder="$t('basicData.endDate')"
        :start-placeholder="$t('basicData.startDate')"
        format="YYYY/MM/DD"
@@ -703,7 +740,7 @@
      <template #header="{ close, titleId, titleClass }">
        <el-button v-print="printContent" @click="printNumber"  :icon="Printer" circle />
      </template>
      <print-process id="child" :printList="printRow.list" :printMerge="printRow.printMergeVal"
      <print-process id="child" :printList="printRow.list" :printMerge="printRow.printMergeVal" :printLike="printRow.like"
                     style="width: 100%;height: 100%" />
    </el-dialog>