guoyuji
2024-07-04 1c13bd7a2cd2c8ba69a185da69344c8b59f4e561
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -13,6 +13,11 @@
import PrintLabel from '@/views/pp/processCard/PrintLabel.vue'
import PrintCustomLabel from '@/views/pp/processCard/PrintCustomLabel.vue'
import footSum from "@/hook/footSum"
import companyInfo from "@/stores/sd/companyInfo"
const company = companyInfo()
//语言获取
const {t} = useI18n()
let router = useRouter()
@@ -86,18 +91,26 @@
  },
]
//室内室外面
//标签类型
const lableType = ref('1')
const lableTypeOptions = [
  {
    value: '1',
    label: t('processCard.finishedProductLabel'),
  },
  {
/*  {
    value: '2',
    label: t('processCard.halfProductLabel'),
  },*/
  {
    value: `${company.printLabel.labelValue}`,
    label: `${company.printLabel.labelType}`,
  },
]
//合片流程卡打印下拉选项
const printMerge = ref('')
const printMergeOptions=[{}]
//打印类型
@@ -212,7 +225,7 @@
    {field: 'quantity', title:  t('order.quantity'),},
    {field: 'total_area', title:  t('order.area'),},
    {field: 'product_name', title: t('order.product'),},
    {field: 'glass_child', title: t('reportingWorks.glassChild'),},
    {field: 'glass_child', title: t('reportingWorks.glassChild'),filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod: filterChanged},
    {field: 'founder', title: t('processCard.founder'),},
    {field: 'splitFrame_time', title: t('processCard.splitFrameTime'),},
  ],//表头按钮
@@ -221,7 +234,7 @@
    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'},
    ],
    // import: false,
    // export: true,
@@ -254,6 +267,7 @@
    let type=printType.value
    let faceOrientation=stateValue.value
    let lableTypes=lableType.value
    let lableTitle=lableType.text
    if ($grid) {
      switch (code) {
        case 'print': {
@@ -270,7 +284,9 @@
              id += selectRecords[i].id + "|"
            }
          }
          router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords)}})
          let printMergeVal=printMerge.value
         router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}})
          break
        }
@@ -299,10 +315,16 @@
          let flowCardData = ref({
            flowCard: data,
          })
          for (let i = 0; i < flowCardData.value.flowCard.length; i++) {
            const regex = /^[1-9]\d*$/
            if (!regex.test(flowCardData.value.flowCard[i].sort)) {
              ElMessage.warning(t('basicData.msg.greater0'))
              return; // 如果有一个不是整数
            }
          }
          request.post("/processCard/printSort", flowCardData.value).then((res) => {
            if (res.code == 200) {
              ElMessage.success(t('processCard.sortingSuccessful'))
              //router.push('/main/processCard/SplittingDetails?orderId=${orderId}')
              router.push({
                path: '/main/processCard/PrintFlowCard',
                query: {orderId: orderId,random: Math.random()}
@@ -359,7 +381,7 @@
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮
  id: 'demo_1',
  id: 'demo_2',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
@@ -376,6 +398,15 @@
  },
  customConfig: {
    storage: true
  },
  mouseConfig:{selected: true},//鼠标选中
  keyboardConfig:{
    isArrow: true,
    isDel: true,
    isEnter: true,
    isTab: true,
    isEdit: true,
    isChecked: true
  },
  editConfig: {
    trigger: 'click',
@@ -431,14 +462,16 @@
      title: t('order.width'),
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
      filterMethod: filterChanged,
      sortable: true,
    },
    {
      field: 'child_height',
      title: t('order.height'),
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
      filterMethod: filterChanged,
      sortable: true,
    },
    {
      field: 'area',
@@ -447,8 +480,22 @@
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
    },
  ],//表头按钮
  ],
  //表单验证
  editRules: {
    sort: [
      //type: 'number', min: 0, message: '请输入大于等于0的数值' ,
      {
        validator ({ cellValue }) {
          const regex = /^[1-9]\d*$/
          if (!regex.test(cellValue)) {
            return new Error(t('basicData.msg.greater0'))
          }
        }}
    ],
  },
  //表头按钮
  toolbarConfig: {
    buttons: [
      {code: 'sort', name: t('processCard.sorting'), status: 'primary'},
@@ -487,6 +534,8 @@
<template>
  <div class="main-div-customer">
    <el-input clearable :placeholder="$t('processCard.mergePrinting')" v-model="printMerge" style="width: 90px"></el-input>
    &nbsp;
    <label>{{$t('processCard.labelStyle')}}:</label>
    <el-select v-model="printType" clearable default-value="default_city" :placeholder="$t('processCard.pleaseSelect')" style="width: 120px">
      <el-option
@@ -506,7 +555,7 @@
      />
    </el-select>
    &nbsp;
    <el-select v-model="stateValue" class="m-2" placeholder='' clearable allow-create filterable style="width: 140px">
    <el-select v-model="stateValue" class="m-2" :placeholder="$t('processCard.pleaseSelect')" clearable allow-create filterable style="width: 140px">
      <el-option
          v-for="item in stateOptions"
          :key="item.value"
@@ -599,7 +648,7 @@
          ref="xGridDetail"
          class="mytable-scrollbar"
          max-height="100%"
          height="600px"
          height="550px"
          size="small"
          v-bind="detailGridOptions"
          v-on="gridEvents">