廖井涛
2024-07-25 15fa56463061f1e94140e23e98987aa3131714bf
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
@@ -9,12 +9,17 @@
import {changeFilterEvent, filterChanged} from "@/hook"
import footSum from "@/hook/footSum"
import TagStyle from "@/components/pp/TagStyle.vue"
import OrderSortDetail from '@/components/pp/OrderSortDetail.vue'
//语言获取
const {t} = useI18n()
let router = useRouter()
const printVisible= ref(false)
//排序
let editRow = ref({
  orderId:null,
})
//定义数据返回结果
let produceList = ref([])
@@ -30,6 +35,11 @@
  switch (type) {
    case 'edit' :{
      router.push({path: '/main/processCard/PrintFlowCard', query: { orderId: row.order_id }})
      break
    }
    case 'sort' :{
      editRow.value.orderId = row.order_id
      printVisible.value = true
      break
    }
  }
@@ -56,7 +66,7 @@
//获取七天前到当前时间
function getNowTime() {
  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7)
  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 15)
      .toISOString()
      .replace('T', ' ')
      .slice(0, 10) //默认开始时间7天前
@@ -126,7 +136,7 @@
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮
  id: 'CustomerList',
  id: 'SelectPrintFlowCard',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
@@ -145,14 +155,15 @@
  },
  editConfig: {
    trigger: 'click',
    trigger: 'dblclick',
    mode: 'row',
    showStatus: true
  },
  //表头参数
  columns: [
    {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50},
    {title: t('basicData.operate'), width: 80, slots: { default: 'button_slot' },fixed:"left"},
    {type: 'checkbox', fixed: "left", title: t('basicData.check'),width: 78},
    {title: t('basicData.operate'), width: 100, slots: { default: 'button_slot' },fixed:"left"},
    {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
    {
      field: 'order_id',
@@ -161,6 +172,9 @@
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
    },
    {field: 'customer_name', title: t('processCard.customerName'), filters: [{data: ''}], slots: {filter: 'num1_filter'},
      filterMethod: filterChanged, width: 110},
    {
      field: 'project',
      title: t('order.project'),
@@ -186,7 +200,9 @@
  toolbarConfig: {
    buttons: [
      {'code': 'titleStyle', 'name': '标签样式',status: 'primary'}
      {code: 'editCheckbox', name: t('basicData.edit'), status: 'primary'},
      {'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'},
    ],
    zoom: true,
@@ -219,6 +235,26 @@
        case 'titleStyle':  {
          titleStyleVisible.value = true
          break
        }
        case 'editCheckbox': {
          const selectRecords = $grid.getCheckboxRecords()
          if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
            return
          }
          let orderIdList = ""
          for (let i = 0; i < selectRecords.length; i++) {
            if (i + 1 === selectRecords.length) {
              orderIdList += selectRecords[i].order_id
            } else {
              orderIdList += selectRecords[i].order_id + "|"
            }
          }
          let array = orderIdList.split('|');
          router.push({path: '/main/processCard/PrintFlowCard', query: {printList: JSON.stringify(selectRecords)}})
          return;
        }
      }
    }
@@ -255,8 +291,7 @@
    <vxe-grid
        ref="xGrid"
        class="mytable-scrollbar"
        height="100%"
        max-height="100%"
        height="95%"
        v-bind="gridOptions"
        v-on="gridEvents"
    >
@@ -274,7 +309,8 @@
      </template>
      <!--左边固定显示的插槽-->
      <template #button_slot="{ row }">
        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button>
<!--        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button>-->
        <el-button @click="getTableRow(row,'sort')" link type="primary" size="small">{{$t('processCard.sorting')}}</el-button>
      </template>
      <template #num1_filter="{ column, $panel }">
@@ -289,12 +325,21 @@
    </vxe-grid>
    <el-dialog
        id="titleStyle"
        :title="'标签样式'"
        :title="$t('processCard.labelStyle')"
        style="width: 70%;height:70% "
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        v-model="titleStyleVisible">
      <tag-style style="width: 100%;height: 100%"/>
    </el-dialog>
    <el-dialog
        id="sizeCheck"
        v-model="printVisible"
        :title="$t('processCard.processCardDetails')"
        destroy-on-close
        style="width: 80%;height:75% ">
      <order-sort-detail id="child"  :orderId="editRow.orderId"  />
    </el-dialog>
  </div>
</template>
@@ -312,4 +357,9 @@
  width: 100%;
}
:deep(#sizeCheck .el-dialog__body){
  height: 90%;
  width: 100%;
}
</style>