guoyuji
2024-09-19 9b52218c49caaf38fa986516eae04c0e2acda7b4
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
@@ -13,10 +13,12 @@
import PrintLabel from '@/views/pp/processCard/PrintLabel.vue'
import PrintCustomLabel from '@/components/pp/PrintCustomLabelDetails.vue'
import PrintCustomLabelSemi from '@/components/pp/PrintCustomLabelSemi.vue'
import PrintCustomLabelXJ from '@/components/pp/PrintCustomLabelTwo.vue'
import SortDetail from '@/components/pp/SelectSortDetailProcessCard.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";
const company = companyInfo()
@@ -27,8 +29,10 @@
const dialogTableVisible = ref(false)
const dialogTableVisibleLabel = ref(false)
const dialogTableVisibleCustomLabel = ref(false)
const dialogTableVisibleLabelXJ = ref(false)
const printVisible = ref(false)
let selectRecords = ref(null)
let titleStyleVisible = ref(false)
const selectRecordsData = ref({
  printList: []
@@ -315,6 +319,8 @@
      {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: 'printLabel3', name: '标签打印2', status: 'primary'},
      {code: 'printTest', name: "测试打印", status: 'primary'},
      // {code: 'printLike', name: "同配置打印", status: 'primary'},
    ],
    // import: false,
@@ -542,6 +548,58 @@
          dialogTableVisible.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
        }
        case 'printLabel3': {
          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
          dialogTableVisibleLabelXJ.value = true
          break
        }
      }
    }
  },
@@ -728,7 +786,40 @@
      <sort-detail id="child" :processId="editRow.processId" :technologyNumber="editRow.technologyNumber" :process="editRow.process"/>
    </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"
        destroy-on-close
        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>
    <!--    成品标签两列-->
    <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>
  </div>
</template>
@@ -742,6 +833,7 @@
:deep(#sizeCheck .el-dialog__body) {
  height: 90%;
  width: 100%;
  overflow-y: auto;
}
:deep(#sizePrintCalrd .el-dialog__body) {
@@ -762,4 +854,10 @@
  overflow-y: auto;
}
:deep(#titleStyle .el-dialog__body) {
  height: 85%;
  width: 100%;
  overflow-y: auto;
}
</style>