廖井涛
2024-09-05 8b2c74fb6842e8af60f70e7df6eef8837d74be07
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -12,24 +12,30 @@
import PrintProcess from '@/components/pp/PrintProcess.vue'
import PrintLabel from '@/views/pp/processCard/PrintLabel.vue'
import PrintCustomLabel from '@/components/pp/PrintCustomLabel.vue'
import PrintCustomLabelXJ from '@/components/pp/PrintCustomLabelXJ.vue'
import PrintCustomLabelSemi from '@/components/pp/PrintCustomLabelSemi.vue'
import SortDetail from '@/components/pp/SelectSortDetailProcessCard.vue'
import SelectSortTable from '@/components/pp/SelectSortTable.vue'
import footSum from "@/hook/footSum"
import companyInfo from "@/stores/sd/companyInfo"
import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global";
import TagStyleDesigner from "@/components/pp/TagStyleDesigner.vue";
import useUserInfoStore from "@/stores/userInfo";
const company = companyInfo()
const userStore = useUserInfoStore()
const userId = userStore.user.userId
//语言获取
const {t} = useI18n()
let router = useRouter()
const dialogSortTable = ref(false)
const dialogTableVisible = ref(false)
const dialogTableVisibleLabel = ref(false)
const dialogTableVisibleLabelXJ = ref(false)
const dialogTableVisibleCustomLabel = ref(false)
const printVisible = ref(false)
let selectRecords = ref(null)
let titleStyleVisible = ref(false)
const selectRecordsData = ref({
  printList: []
})
@@ -38,9 +44,15 @@
const xGridDetail = ref(null)
//排序
let tableRow = ref({
  orderId: null,
})
//排序
let editRow = ref({
  processId: null,
  technologyNumber: null
  technologyNumber: null,
  process:null
})
//打印
@@ -64,6 +76,7 @@
    case 'edit' : {
      editRow.value.processId = row.process_id
      editRow.value.technologyNumber = row.technology_number
      editRow.value.process = row.process
      printVisible.value = true
      // router.push({path: '/sort-detail', query: {processId: row.process_id,technologyNumber:row.technology_number}})
@@ -189,6 +202,8 @@
    titleSelectJson.value.dataType = res.data.type
    xGrid.value.reloadData(newDataCollection)
    gridOptions.loading = false
    hideButton()
  } else {
    ElMessage.warning(res.msg)
@@ -320,7 +335,9 @@
      {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'},
      {code: 'sortTable', name: "排序汇总", status: 'primary'},
      // {code: 'printTest', name: "测试打印", status: 'primary'},
      // {code: 'printLike', name: "同配置打印", status: 'primary'},
    ],
    // import: false,
    // export: true,
@@ -475,10 +492,16 @@
            labelRow.value.type = type
            labelRow.value.lableType = lableTypes
            if (company.label === 1) {
              dialogTableVisibleLabel.value = true
              if (company.printLabel.columnsLabel===1){
                dialogTableVisibleLabelXJ.value = true
              }
              else{
                dialogTableVisibleLabel.value = true
              }
            } else if (company.label === 2) {
              router.push({
                path: '/main/processCard/PrintCustomLabel',
                path: '/main/processCard/PrintCustomLabelCZ',
                query: {
                  type: type,
                  faceOrientation: faceOrientation,
@@ -497,7 +520,7 @@
              dialogTableVisibleCustomLabel.value = true
            } else if (company.label === 2) {
              router.push({
                path: '/main/processCard/PrintCustomLabelSemi',
                path: '/main/processCard/PrintCustomLabelSemiCZ',
                query: {
                  type: type,
                  faceOrientation: faceOrientation,
@@ -547,6 +570,39 @@
          dialogTableVisible.value = true
          break
        }
        case 'sortTable': {
          tableRow.value.orderId=JSON.stringify(data.value.printList)
          // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}})
          dialogSortTable.value = true
          break
        }
        case 'printTest': {
          if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
            return
          }
          // if (type === null || type === '' || type === undefined) {
          //   ElMessage.warning(t('processCard.pleaseSelectCustomPrintLabelStyle'))
          //   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 + "|"
            }
          }
            labelRow.value.list = JSON.stringify(selectRecords)
            labelRow.value.faceOrientation = faceOrientation
            labelRow.value.type = type
            labelRow.value.lableType = lableTypes
          titleStyleVisible.value = true
          break
        }
      }
    }
  },
@@ -591,7 +647,7 @@
<template>
  <div class="main-div-customer">
    <el-input v-model="printMerge" :placeholder="$t('processCard.mergePrinting')" clearable
    <el-input v-show="isVisible" v-model="printMerge" :placeholder="$t('processCard.mergePrinting')" clearable
              style="width: 90px"></el-input>
    &nbsp;
    <label>{{ $t('processCard.labelStyle') }}:</label>
@@ -705,6 +761,24 @@
                          style="width: 100%;height: 100%"/>
    </el-dialog>
    <!--    成品标签两列-->
    <el-dialog
        id="sizeCustom"
        v-model="dialogTableVisibleLabelXJ"
        :title="$t('processCard.printLabel')"
        destroy-on-close
        style="width: 80%;height:75% ">
      <template #header="{ close, titleId, titleClass }">
        <el-button v-print="printContentLabel" :icon="Printer" circle/>
      </template>
      <print-custom-label-x-j id="childLabel"
                          :faceOrientation="labelRow.faceOrientation"
                          :lableType="labelRow.lableType"
                          :list="labelRow.list"
                          :type="labelRow.type"
                          style="width: 100%;height: 100%"/>
    </el-dialog>
    <!--   小片标签 -->
    <el-dialog
        id="sizeCustomSemi"
@@ -730,10 +804,34 @@
        :title="$t('processCard.processCardDetails')"
        destroy-on-close
        style="width: 80%;height:75% ">
      <sort-detail id="child" :processId="editRow.processId" :technologyNumber="editRow.technologyNumber"/>
      <sort-detail id="child" :processId="editRow.processId" :technologyNumber="editRow.technologyNumber" :process="editRow.process"/>
    </el-dialog>
    <!--    排序汇总查询-->
    <el-dialog
        id="sizeCheck"
        v-model="dialogSortTable"
        title="排序汇总"
        destroy-on-close
        style="width: 80%;height:75% ">
      <select-sort-table id="child" :orderId="tableRow.orderId"/>
    </el-dialog>
<!--   标签样式    -->
    <el-dialog
        id="titleStyle"
        :title="$t('processCard.labelStyle')"
        style="width: 90%;height:93%;margin-top: 3vh "
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        v-model="titleStyleVisible">
      <!--      <tag-style style="width: 100%;height: 100%"/>-->
      <tag-style-designer style="width: 100%;height: 100%"
                          :faceOrientation="labelRow.faceOrientation"
                          :lableType="labelRow.lableType"
                          :list="labelRow.list"
                          :type="labelRow.type"/>
    </el-dialog>
  </div>
</template>
@@ -767,4 +865,9 @@
  overflow-y: auto;
}
:deep(#titleStyle .el-dialog__body){
  height: 93%;
  width: 100%;
}
</style>