廖井涛
2025-03-21 b8982b86a15d186c4cf6144fface700d9769fa95
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
@@ -44,6 +44,19 @@
let produceList = ref([])
let titleStyleVisible = ref(false)
//定义分架状态
const optionVal = ref('1')
const options = [
  {
    value: '0',
    label: '未分架',
  },
  {
    value: '1',
    label: '已分架',
  },
]
const form = reactive({
  date1: '',
@@ -104,7 +117,7 @@
let endTime = orderInfo.workOrderDate[1]
let orderId=form.orderId
let project=form.project
let state = optionVal.value
if (orderId==''){
  orderId=null
}
@@ -114,7 +127,7 @@
//第一次加载数据
request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}`, filterData.value).then((res) => {
request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}/${state}`, filterData.value).then((res) => {
  if (res.code == 200) {
    produceList = produceList.value.concat(deepClone(res.data.data))
@@ -145,7 +158,9 @@
  if (project==''){
    project=null
  }
  request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}`, filterData.value).then((res) => {
  let state = optionVal.value
  request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}/${state}`, filterData.value).then((res) => {
    if (res.code == 200) {
      xGrid.value.loadData(res.data.data)
@@ -229,10 +244,10 @@
  toolbarConfig: {
    buttons: [
      {code: 'editCheckbox', name: t('basicData.edit'), status: 'primary'},
      {'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'},
      //{'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'},
      {code: 'detailsPrint', name: t('processCard.detailPrinting'), status: 'primary'},
      {code: 'detailsProcessPrint', name: t('processCard.detailsPrintedSeparately'), status: 'primary'},
      {code: 'orderPrint', name: '订单打印', status: 'primary'},
    ],
    zoom: true,
@@ -272,7 +287,10 @@
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
            return
          }
          if (optionVal.value != '1'){
            ElMessage.warning('请选择已分架订单打印')
            return
          }
          let orderIdList = ""
          for (let i = 0; i < selectRecords.length; i++) {
            if (i + 1 === selectRecords.length) {
@@ -292,7 +310,10 @@
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
            return
          }
          if (optionVal.value != '1'){
            ElMessage.warning('请选择已分架订单打印')
            return
          }
          let orderIdList = ""
          for (let i = 0; i < selectRecords.length; i++) {
            if (i + 1 === selectRecords.length) {
@@ -312,7 +333,10 @@
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
            return
          }
          if (optionVal.value != '1'){
            ElMessage.warning('请选择已分架订单打印')
            return
          }
          let orderIdList = ""
          for (let i = 0; i < selectRecords.length; i++) {
            if (i + 1 === selectRecords.length) {
@@ -326,6 +350,29 @@
          return;
        }
        case 'orderPrint': {
          const selectRecords = $grid.getCheckboxRecords()
          if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
            return
          }
          if (optionVal.value != '0'){
            ElMessage.warning('请选择未分架订单打印')
            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/PrintFlowCardDetails', query: {printList: JSON.stringify(selectRecords),checkedValue:checkedValue.value.value,type:3}})
          return;
        }
      }
    }
@@ -335,9 +382,8 @@
</script>
<template>
  <div class="main-div-customer">
    <div id="selectForm">
      <el-row :gutter="0">
  <div  style="width: 100%;height: 100%">
    <div class="head">
        <el-date-picker
            v-model="orderInfo.workOrderDate"
            :start-placeholder="$t('basicData.startDate')"
@@ -352,18 +398,36 @@
        &nbsp;&nbsp;
        <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 110px"></el-input>
        &nbsp;&nbsp;
      <el-select
          :default-first-option="true"
          ref="getSelect" style="width: 130px"
          v-model="optionVal"
          class="m-2"
          @change="getWorkOrder"
      >
        <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
        />
      </el-select>
      &nbsp;&nbsp;
        <el-button
            id="select"
            :icon="Search"
            type="primary" @click="getWorkOrder">{{ $t('basicData.search') }}
        </el-button>
        <vxe-checkbox style="margin-top:6px;margin-left:10px " v-if="!(checkedValue.value === 2 && inquiryMode === 2)" v-model="checkedValue.value"  :content="$t('processCard.merge')" :checked-value="1" :unchecked-value="3" ></vxe-checkbox>
      </el-row>
    </div>
    <div class="main-table">
    <vxe-grid
        ref="xGrid"
        class="mytable-scrollbar"
        height="95%"
        height="100%"
        v-bind="gridOptions"
        v-on="gridEvents"
    >
@@ -397,6 +461,7 @@
    </vxe-grid>
  </div>
    <el-dialog
        id="titleStyle"
        :title="$t('processCard.labelStyle')"
@@ -420,12 +485,14 @@
</template>
<style scoped>
.main-div-customer {
  width: 99%;
  height: 100%;
.head{
  width: 100%;
  height: 35px;
}
#selectForm {
  width: 60%;
.main-table{
  width: 100%;
  height: calc(100% - 35px);
}
:deep(#titleStyle .el-dialog__body){
  height: 90%;