From 25cc86fd8a2fb3b2bb6b385cba0adaf89ff3dcdc Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 18 十二月 2025 16:39:32 +0800
Subject: [PATCH] 流程卡进度打印部分代码

---
 north-glass-erp/northglass-erp/src/router/index.js                                     |    6 
 north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProgressProcessCard.vue   |  544 +++++++++++++++++++++++++++++++++++++++++++++
 north-glass-erp/northglass-erp/src/views/pp/processCard/ProcessCard.vue                |    3 
 north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue              |    1 
 north-glass-erp/src/main/resources/mapper/pp/Report.xml                                |    2 
 north-glass-erp/northglass-erp/src/lang/zh.js                                          |    1 
 north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java            |    4 
 north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java |    6 
 north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java          |   25 ++
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml                              |  100 ++++++++
 10 files changed, 690 insertions(+), 2 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/lang/zh.js b/north-glass-erp/northglass-erp/src/lang/zh.js
index e97f90b..fa13082 100644
--- a/north-glass-erp/northglass-erp/src/lang/zh.js
+++ b/north-glass-erp/northglass-erp/src/lang/zh.js
@@ -600,6 +600,7 @@
         terminationNo:'鍙栨秷缁堟',
         updateProcessMsg:'淇濆瓨澶辫触锛佽妫�鏌ュ彉鏇村伐搴忔槸鍚︽姤宸�',
         termination:'缁堟',
+        printProgressProcessCard:'娴佺▼鍗¤繘搴︽墦鍗�',
 
         quantity:'宸ョ▼鐢ㄦ暟閲�',
         print1:'11鍒�4琛�',
diff --git a/north-glass-erp/northglass-erp/src/router/index.js b/north-glass-erp/northglass-erp/src/router/index.js
index 4ba8821..acf964b 100644
--- a/north-glass-erp/northglass-erp/src/router/index.js
+++ b/north-glass-erp/northglass-erp/src/router/index.js
@@ -587,6 +587,12 @@
               name: 'printProjectDetailSmallPiece',
               component: () => import('../views/pp/processCard/PrintProjectDetailSmallPiece.vue'),
             },
+
+            {
+              path: 'PrintProgressProcessCard',
+              name: 'PrintProgressProcessCard',
+              component: () => import('../views/pp/processCard/PrintProgressProcessCard.vue'),
+            },
             {
               path: '',
               redirect:'/main/processCard/selectProcessCard'
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
index cafc314..47c4f2c 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -426,6 +426,7 @@
           printRow.value.flashback = flashback.value
           printRow.value.landingSequence=landingSequence.value
           printRow.value.compound = compound.value
+          console.log(printRow.value)
           // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}})
           if(company.companyName=='甯稿窞甯傚悏鍒╃幓鐠冩湁闄愬叕鍙�'){
             dialogTableVisibleStraight.value = true
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProgressProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProgressProcessCard.vue
new file mode 100644
index 0000000..af2a3bc
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProgressProcessCard.vue
@@ -0,0 +1,544 @@
+<script setup>
+
+import request from "@/utils/request"
+import {ElDatePicker, ElMessage} from "element-plus"
+import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue"
+import {Search} from "@element-plus/icons-vue"
+import {useRoute, useRouter} from 'vue-router'
+import {changeFilterEvent, filterChanged} from "@/hook"
+import {addListener} from "@/hook/mouseMove";
+import { useI18n } from 'vue-i18n'
+import footSum from "@/hook/footSum";
+import {VxeUI} from "vxe-pc-ui";
+import useOrderInfoStore from "@/stores/sd/order/orderInfo"
+import {Printer} from "@element-plus/icons-vue/global";
+import PrintProcess from "@/components/pp/PrintProcess.vue";
+import PrintCustomLabelXJ from "@/components/pp/PrintCustomLabelTwo.vue";
+import companyInfo from "@/stores/sd/companyInfo";
+//璇█鑾峰彇
+const { t } = useI18n()
+let router=useRouter()
+const route = useRoute()
+const orderInfo = useOrderInfoStore()
+const company = companyInfo()
+
+const dialogTableVisible = ref(false)
+const dialogTableVisibleLabel = ref(false)
+
+let props = defineProps({
+  orderId:null
+})
+onMounted(()=>{
+  getTags()
+  filterData.value = orderInfo.selectProcessCardFilter.data
+  orderInfo.selectProcessCardFilter.list.forEach(item =>{
+    xGrid.value.getColumnByField(item.field).filters = item.column.filters
+  })
+  //鍚敤琛ㄦ牸鎷栧姩閫変腑
+  addListener(xGrid.value, gridOptions)
+  if(props.orderId===null  || props.orderId===undefined || props.orderId===''){
+
+  }else{
+    form.orderId = props.orderId
+    getWorkOrder()
+  }
+  if(route.query.orderId===null  || route.query.orderId===undefined || route.query.orderId===''){
+
+  }else {
+    form.orderId = route.query.orderId
+    getWorkOrder()
+  }
+
+})
+
+//鎵撳嵃娴佺▼鍗℃潯浠�
+let printRow = ref({
+  list: null,//閫変腑鐨勬暟鎹�
+  printMergeVal: null,
+  like: null,
+  merge: null,
+  printFc:null,
+  flashback:null,
+  landingSequence:null,
+  compound:null
+})
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+  let count = 0
+  list.forEach(item => {
+    count += Number(item[field])
+  })
+  return count.toFixed(2)
+}
+
+
+//绛涢�夋潯浠讹紝鏈夊閿渶瑕佸厛瀹氫箟鏄庣粏閲岄潰鐨勬暟鎹�
+let filterData = ref({
+  order: {
+    project: ''
+  },
+  orderDetail: {
+    productId: '',
+    productName: '',
+    computeGrossArea: '',
+    processingNote: '',
+  }
+})
+
+
+//闇�瑕佸悎骞剁殑鍒�
+let column = [1,3,8]
+//鐐瑰嚮鏌ヨ
+const getWorkOrder = () => {
+  gridOptions.loading = true
+  gridOptions.columns = gridOptions.columns.slice(0, 17); //娓呴櫎鍔ㄦ�佺敓鎴愮殑鍒楅噸鏂版煡璇�
+  request.post(`/processCard/PrintProgressProcessCard/${orderInfo.workOrderDate}`, column).then((res) => {
+    if (res.code == 200) {
+      if (res.data.data.length === 0) {
+        ElMessage.warning(t('report.noDataFoundForThisOrder'))
+        return
+      }
+      orderInfo.workOrderDate = res.data.selectDate
+      const processList = {
+        title:t('report.workingProcedure'),
+        field:'process',
+        children:[]
+      }
+      // 鍔ㄦ�佹坊鍔犲垪
+      res.data.title.forEach((item,index) =>{
+        let column = {
+          slots: { default: 'quantitySum' },
+          width: 100,
+          title: item.process,
+          field: `dynamicColumn${index}` // 涓哄姩鎬佸垪娣诲姞鍞竴鐨� field
+        }
+        processList.children.push(column)
+
+      })
+      gridOptions.columns.push(processList)
+      res.data.data.forEach(item => {
+        item.reportWorkQuantity=JSON.parse(item.reportWorkQuantity)
+        item.reportWorkQuantityCount=JSON.parse(item.reportWorkQuantityCount)
+        item.reportWorkQuantityShow=JSON.parse(item.reportWorkQuantityShow)
+      })
+      gridOptions.loading = false
+      //mergeCells.value = res.data.mergeCell
+      xGrid.value.loadData(res.data.data)
+    } else {
+      gridOptions.loading = false
+      ElMessage.warning(res.msg)
+    }
+  })
+}
+
+const footSumDynamic = (data, columnTitle) => {
+  let sum = 0;
+  data.forEach(item => {
+    const value = Number(item.reportWorkQuantity[columnTitle]) || 0; // 浠� reportWorkQuantity 涓彁鍙栧�煎苟杞崲涓烘暟瀛�
+    sum += value;
+  });
+  return sum.toFixed(2);
+}
+
+const quantitySum = ( row,column )=>{
+  const reportWorkQuantityCount = row.reportWorkQuantityCount[column.title] || ''
+  const reportWorkQuantityShow = row.reportWorkQuantityShow[column.title] || ''
+  if(reportWorkQuantityShow === reportWorkQuantityCount ){
+    return reportWorkQuantityShow
+  }
+
+  return (reportWorkQuantityShow
+      +'('
+      +reportWorkQuantityCount
+      +')' )
+}
+
+const tags = ref([])
+
+const tag = ref({
+  id: null,
+  name: null,
+  type: 1,
+  tagWidth: null,
+  tagHeight: null,
+  value: null,
+  size: null
+})
+const getTags = () => {
+  request.get('tagStyle/getTagList').then(res => {
+    res.data.forEach(item => {
+      item.value = JSON.parse(item.value)
+    })
+    tags.value = res.data
+  })
+}
+
+/*鍚庣杩斿洖缁撴灉澶氬眰宓屽灞曠ず*/
+const hasDecimal = (value) => {
+  const regex = /\./; // 瀹氫箟姝e垯琛ㄨ揪寮忥紝鏌ユ壘灏忔暟鐐�
+  return regex.test(value); // 杩斿洖true/false
+}
+
+const xGrid = ref()
+const gridOptions = reactive({
+  loading: false,
+  border:  "full",//琛ㄦ牸鍔犺竟妗�
+  keepSource: true,//淇濇寔婧愭暟鎹�
+  align: 'center',//鏂囧瓧灞呬腑
+  stripe:true,//鏂戦┈绾�
+  rowConfig: {isCurrent: true, isHover: true,height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  id: 'ProcessCardProgress',
+  showFooter: true,//鏄剧ず鑴�
+  printConfig: {},
+  importConfig: {},
+  exportConfig: {},
+  scrollY:{ enabled: true },//寮�鍚櫄鎷熸粴鍔�
+  showOverflow:true,
+  columnConfig: {
+    resizable: true,
+    useKey: true
+  },
+  filterConfig: {   //绛涢�夐厤缃」
+                    // remote: true
+  },
+  customConfig: {
+    storage: true
+  },
+  editConfig: {
+    trigger: 'click',
+    mode: 'row',
+    showStatus: true
+  },//琛ㄥご鍙傛暟
+  columns : [
+
+    {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80},
+    {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
+    {field: 'order_id', width: 120,
+      title: t('order.orderId'),
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged},
+    {field: 'project', width: 150,
+      title: t('order.project'),
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged},
+    {field: 'customer_name', width: 150,
+      title: t('customer.customerName'),
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged},
+    {field: 'product_name', width: 150,
+      title: t('order.product'),
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged},
+    {field: 'glass_child',width: 130, title:  t('reportingWorks.glassChild') ,filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged},
+    {field: 'order_type', width: 120,title: t('order.orderType'),filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged},
+    {field: 'process_id',width: 150, title: t('processCard.processId'),filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged},
+    {field: 'print_status', width: 120,title: t('processCard.numberTimesProcessCardPrinted')},
+    {field: 'print_number', width: 110,title: t('processCard.numberLabelPrintingOperations')},
+    {field: 'order_number', width: 100,title: t('order.OrderNum'),showOverflow:"ellipsis",filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged},
+    // {field: 'glassNumber', width: 110,title: t('reportingWorks.glassNumber'),showOverflow:"ellipsis",filters: [{data: ''}],
+    //   slots: {filter: 'num1_filter'},
+    //   filterMethod: filterChanged},
+    {field: 'technology_number', width: 110,title: t('processCard.technologyNumber'),showOverflow:"ellipsis",filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged},
+
+    {field: 'quantity', width: 90,title: t('order.quantity')},
+    {field: 'grossArea', width: 90,title: t('order.area')},
+    {field: 'broken_num',width: 90, title: t('reportingWorks.quantityBroken')},
+    // {field: 'shippedQuantity',width: 120, title: t('report.shippedQuantity')},
+    {field: 'Storage',width: 120, title: t('report.inventoryNum')},
+    {field: 'StorageAreaShow',width: 120, title: t('report.inventoryArea')},
+  ],
+
+  toolbarConfig: {
+    buttons: [
+      {code: 'print', name: t('processCard.print'), status: 'primary'},
+      {code: 'printLabel', name: t('processCard.printLabel'), status: 'primary'},
+    ],
+    // import: false,
+    // export: true,
+    // print: true,
+    zoom: true,
+    custom: true
+  },
+  data:  [
+  ],//table body瀹為檯鏁版嵁
+  //鑴氶儴姹傚拰
+  footerMethod ({ columns, data }) {
+    return [
+      columns.map((column, columnIndex) => {
+        if (columnIndex === 0) {
+          return t('basicData.total')
+        }
+        const List = ["quantity", "broken_num", "inventory", "inventoryArea","gross_area"]; // 闈欐�佸垪鐨勬眰鍜�
+        if (List.includes(column.field)) {
+          return footSum(data, column.field)
+        }
+        // 鍔ㄦ�佸垪鐨勬眰鍜�
+        if (column.field && column.field.startsWith('dynamicColumn')) {
+          return footSumDynamic(data, column.title)
+        }
+        return ''
+      })
+    ]
+  }
+})
+
+const gridEvents = {
+  async toolbarButtonClick({code}) {
+    const $grid = xGrid.value
+    selectRecords = $grid.getCheckboxRecords()
+    // selectRecords.forEach(obj => {
+    //   delete obj.print_status;
+    // });
+    let type = tag.value.name
+    let faceOrientation = stateValue.value
+    let lableTypes = lableType.value
+    let lableTitle = lableType.text
+    if ($grid) {
+      switch (code) {
+          //鎵撳嵃娴佺▼鍗�
+        case 'print': {
+          if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
+            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
+            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 + "|"
+            }
+          }
+          printRow.value.list = JSON.stringify(selectRecords)
+          printRow.value.printMergeVal = printMerge.value
+          printRow.value.like = null
+          printRow.value.merge = company.flowCardMerge
+          printRow.value.printFc= printFc
+          printRow.value.flashback = flashback.value
+          printRow.value.landingSequence=landingSequence.value
+          printRow.value.compound = compound.value
+          dialogTableVisible.value = true
+
+
+          break
+        }
+        case 'printLabel': {
+          if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
+            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
+            return
+          }
+          if (tag.value.name === null || tag.value.name === '' || tag.value.name === 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 = tag.value.name
+          labelRow.value.lableType = lableTypes
+          labelRow.value.dataType = 1
+          dialogTableVisibleLabel.value = true
+
+
+          break
+        }
+      }
+    }
+  },
+}
+
+
+const form = reactive({
+  orderId: '',
+
+})
+
+const mergeCells = ref([
+
+])
+
+
+const handleCellDblClick = ({ row, column, cell, $event }) => {
+  VxeUI.clipboard.copy(row[column.property])
+}
+</script>
+
+<template>
+  <div  style="width: 100%;height: 100%">
+    <div class="head">
+      <el-date-picker
+          v-model="orderInfo.workOrderDate"
+          :default-time="defaultTime"
+          :end-placeholder="$t('basicData.endDate')"
+          :start-placeholder="$t('basicData.startDate')"
+          format="YYYY/MM/DD"
+          type="daterange"
+          value-format="YYYY-MM-DD"
+
+      />
+      &nbsp;&nbsp;
+      <el-button
+          :disabled="props.orderId"
+          @click="getWorkOrder"
+          id="select"
+          type="primary" :icon="Search">{{$t('basicData.search')}}
+
+      </el-button>
+      &nbsp;&nbsp;
+        <label>{{ $t('processCard.labelStyle') }}锛�</label>
+        <el-select v-model="tag" :placeholder="$t('processCard.pleaseSelect')" style="width: 140px" @change="changeTag">
+          <el-option
+              v-for="(tag,index) in tags"
+              :key="index"
+              :label="tag.name"
+              :value="tag"
+          />
+        </el-select>
+
+    </div>
+    <div class="main-table">
+      <vxe-grid
+          height="100%"
+          class="mytable-scrollbar"
+          ref="xGrid"
+          v-bind="gridOptions"
+          :merge-cells="mergeCells"
+          @cell-dblclick="handleCellDblClick"
+
+      >
+        <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
+        <!--      涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
+        <template #content="{ row }">
+          <ul class="expand-wrapper">
+            <li  v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
+              <span style="font-weight: bold">{{item.title+':  '}}</span>
+              <span>{{ row[item.field] }}</span>
+            </li>
+          </ul>
+        </template>
+
+
+
+        <template #num1_filter="{ column, $panel }">
+          <div>
+            <div v-for="(option, index) in column.filters" :key="index">
+              <input v-model="option.data"
+                     type="text"
+                     @keyup.enter.native="$panel.confirmFilter()"
+                     @input="changeFilterEvent($event, option, $panel)"/>
+            </div>
+          </div>
+        </template>
+
+        <template #quantitySum="{ row,column }">
+          <span>{{ quantitySum(row,column) }} </span>
+        </template>
+
+
+      </vxe-grid>
+    </div>
+    <!--  娴佺▼鍗℃墦鍗�  -->
+    <el-dialog
+        id="sizePrintCalrd"
+        v-model="dialogTableVisible"
+        :title="$t('processCard.print')"
+        destroy-on-close
+        style="width: 75%;height:75% ">
+      <template #header="{ close, titleId, titleClass }">
+        <el-button v-print="printContent" :icon="Printer" circle @click="printNumber"/>
+      </template>
+      <print-process
+          id="child"
+          :printLike="printRow.like"
+          :printList="printRow.list"
+          :printMerge="printRow.printMergeVal"
+          :printFc="printRow.printFc"
+          :merges="printRow.merge"
+          :flashback = "printRow.flashback"
+          :landingSequence = "printRow.landingSequence"
+          :compound = "printRow.compound"
+          style="width: 100%;height: 100%"/>
+    </el-dialog>
+
+   <!--    鎴愬搧鏍囩-->
+    <el-dialog
+        id="sizeCustom"
+        v-model="dialogTableVisibleLabel"
+        :title="$t('processCard.printLabel')"
+        destroy-on-close
+        style="width: 80%;height:75% ">
+      <template #header="{ close, titleId, titleClass }">
+        <el-tooltip
+            class="box-item"
+            effect="dark"
+            :content="$t('processCard.yesTitle')"
+            placement="top"
+        >
+          <el-button :icon="Printer" circle @click="printOrder(1)"/>
+        </el-tooltip>
+        <el-tooltip
+            class="box-item"
+            effect="dark"
+            :content="$t('processCard.noTitle')"
+            placement="top"
+        >
+          <el-button @click="printOrder(3)">
+            <i class="vxe-icon-print"></i>
+          </el-button>
+        </el-tooltip>
+      </template>
+      <print-custom-label-x-j id="childLabel"
+                              :faceOrientation="labelRow.faceOrientation"
+                              :lableType="labelRow.lableType"
+                              :list="labelRow.list"
+                              :lastList='lastList'
+                              :type="labelRow.type"
+                              style="width: 100%;height: 100%"/>
+    </el-dialog>
+  </div>
+</template>
+
+<style scoped>
+.head{
+  width: 100%;
+  height: 35px;
+}
+
+.main-table{
+  width: 100%;
+  height: calc(100% - 35px);
+}
+
+.vxe-grid {
+  /* 绂佺敤娴忚鍣ㄩ粯璁ら�変腑 */
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/ProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/ProcessCard.vue
index 32bab17..785d376 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/ProcessCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/ProcessCard.vue
@@ -28,7 +28,8 @@
         <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/processCard/productionScheduling' }">{{$t('processCard.scheduling')}}
         </el-breadcrumb-item>
         <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/processCard/selectPrintFlowCard' }" >{{ $t('basicData.print') }}</el-breadcrumb-item>
-        <el-breadcrumb-item @click="changeRouter(5)" :class="indexFlag===5?'indexTag':''" :to="{ path: '/main/processCard/selectPrintProject' }" >{{$t('processCard.engineeringPrinting')}}</el-breadcrumb-item>
+<!--        <el-breadcrumb-item @click="changeRouter(5)" :class="indexFlag===5?'indexTag':''" :to="{ path: '/main/processCard/printProgressProcessCard' }" >{{ $t('processCard.printProgressProcessCard') }}</el-breadcrumb-item>-->
+        <el-breadcrumb-item @click="changeRouter(6)" :class="indexFlag===6?'indexTag':''" :to="{ path: '/main/processCard/selectPrintProject' }" >{{$t('processCard.engineeringPrinting')}}</el-breadcrumb-item>
         <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/processCard/selectPrintFlowCard' }" style="display: none">{{ $t('basicData.print') }}</el-breadcrumb-item>
       </el-breadcrumb>
     </div>
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
index c019f24..11ec07b 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -549,4 +549,10 @@
     public Result selectProcessCardProgress(@RequestBody Map<String, String> object) {
         return flowCardService.selectProcessCardProgressSv(object);
     }
+
+    @ApiOperation("娴佺▼鍗¤繘搴︽墦鍗�")
+    @PostMapping("/PrintProgressProcessCard/{selectDate}")
+    public Result PrintProgressProcessCard(@PathVariable List<String> selectDate, @RequestBody List<String> columns) {
+        return Result.success(flowCardService.PrintProgressProcessCardSv(selectDate, columns));
+    }
 }
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
index 7acc163..d4fea5f 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -301,4 +301,8 @@
     List<Map<String, Object>> getNewProcessMp(String processId, String orderNumber, String technologyNumber);
 
     Map<String, Object> getProcessInfo( String processName);
+
+    List<Map<String, String>> OrderProcess();
+
+    List<Map<String, String>> PrintProgressProcessCardData(String startDate, String endDate);
 }
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
index f43ff53..1e40d95 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -1790,6 +1790,31 @@
         }
         return true;
     }
+
+    public Map<String, Object> PrintProgressProcessCardSv(List<String> selectDate, List<String> columns) {
+        String endDate = LocalDate.now().toString();
+        String startDate = LocalDate.now().minusDays(15).toString();
+        if(selectDate !=null && selectDate.size()==2){
+            if(!selectDate.get(0).isEmpty()){
+                startDate = selectDate.get(0);
+            }
+            if(!selectDate.get(1).isEmpty()){
+                endDate = selectDate.get(1);
+            }
+        }
+        Map<String, Object> map = new HashMap<>();
+        //鑾峰彇琛ㄦ牸鍐呭鏁版嵁
+        List<Map<String, String>> dataList = flowCardMapper.PrintProgressProcessCardData(startDate, endDate);
+        //鑾峰彇琛ㄥご宸ュ簭绛涢�夋暟鎹�
+        List<Map<String, String>> uniqueList = flowCardMapper.OrderProcess();
+        map.put("title", uniqueList);
+        List<String> list = new ArrayList<>();
+        list.add(startDate);
+        list.add(endDate);
+        map.put("selectDate",list);
+        map.put("data",dataList );
+        return map;
+    }
 }
 
 
diff --git a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
index 33f08a2..952fb3c 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -3935,4 +3935,104 @@
         select basic_name as process,sort FROM sd.basic_data as bd
         where bd.basic_category='process' and bd.basic_name = #{processName}
     </select>
+    <select id="OrderProcess">
+        select DISTINCT basic_name as process,nickname,sort from sd.basic_data where basic_category = 'process'
+    </select>
+
+    <select id="PrintProgressProcessCardData">
+        select a.product_name,
+        b.glass_child,
+        d.order_type,
+        c.process_id,
+        c.process_id as 'processId',
+        c.order_id,
+        c.order_number,
+        c.technology_number,
+        b.child_width,
+        b.child_height,
+        c.quantity,
+
+        c.quantity-ifnull(c.termination_quantity,0) as thisQuantity,/*鐢ㄤ簬鍒ゆ柇鏄惁鏀瑰彉棰滆壊*/
+        e.reportWorkQuantity,
+        e.reportWorkQuantityShow,
+        e.reportWorkQuantityCount,
+        e.reportWorkTime,
+        e.broken_num,
+        c.quantity-ifnull(c.termination_quantity,0) as glassQuantity,
+
+        c.quantity-ifnull(c.termination_quantity,0) as quantityShow,
+        round( (c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,2) as grossAreaShow,
+        ifnull(c.received_quantity, 0) as StorageShow,
+        ifnull(dd.quantity, 0) as shippedQuantityShow, -- 鍙戣揣鏁伴噺
+        round(ifnull(dd.quantity, 0)*a.compute_area,2) as shippedAreaShow, -- 鍙戣揣闈㈢Н
+        round((ifnull(c.received_quantity, 0))*a.compute_area,2)  as StorageAreaShow,-- 鍏ュ簱闈㈢Н
+
+        round((c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,2)as grossArea,
+        ifnull(c.received_quantity, 0)                       as Storage,
+        ifnull(dd.quantity, 0)                        as shippedQuantity,
+        round(ifnull(dd.quantity, 0)*a.compute_area,2)        as shippedArea,
+        round((ifnull(c.received_quantity, 0))*a.compute_area,2) as StorageArea,
+
+
+        ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber,
+        b.`group`,
+        c.print_status,
+        c.print_number,
+        o.project,
+        o.customer_name
+
+        from pp.flow_card as c
+        left join
+        sd.order_detail as a
+        on c.order_id = a.order_id
+        and c.order_number = a.order_number
+        left join sd.order_glass_detail as b
+        on c.order_id = b.order_id
+        and b.order_number = c.order_number
+        and c.technology_number = b.technology_number
+        left join sd.`order` as d
+        on c.order_id = d.order_id
+        #                  left join mm.finished_goods_inventory as f
+        #                            on c.order_id = f.order_id and f.order_number = c.order_number
+        left join sd.delivery_detail as dd on dd.order_id = a.order_id and dd.order_number = a.order_number
+        left join (SELECT a.process_id,
+        a.order_number,
+        a.technology_number,
+        sum(a.broken_num) as broken_num,
+        concat('{',
+        GROUP_CONCAT(concat("\"", process, "\":\"", if(a.technology_number!=1 and (bd.nickname='stepD' || bd.nickname='stepB' ) ,0,reporting_work_num), "\"")),
+        '}'
+        )             as reportWorkQuantity,
+        concat('{',
+        GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num, "\"")),
+        '}'
+        )             as reportWorkQuantityShow,
+        concat('{',
+        GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num_count, "\"")),
+        '}'
+        )             as reportWorkQuantityCount,
+        concat('{',
+        GROUP_CONCAT(concat("\"", process, "\":\"", IFNULL(date(a.update_time),''), "\"")),
+        '}'
+        )             as reportWorkTime
+        FROM sd.order_process_detail as a
+        left join (SELECT DISTINCT basic_name,nickname from sd.basic_data as bd where  bd.basic_category = 'process') as bd
+        on a.process = bd.basic_name
+        left join pp.flow_card as fc on fc.process_id=a.process_id and fc.order_number=a.order_number and fc.technology_number=a.technology_number
+        where (fc.create_time) >= #{startDate} and (fc.create_time) &lt;= #{endDate}
+        GROUP BY a.process_id, a.order_number, a.technology_number
+
+
+        ) as e
+        on e.process_id = c.process_id
+        and e.technology_number = c.technology_number
+        and e.order_number = c.order_number
+        left join sd.`order` as o on o.order_id =c.order_id
+        where (c.create_time) >= #{startDate} and (c.create_time) &lt;= #{endDate}
+        and d.create_order>0 and c.quantity-ifnull(c.termination_quantity,0)>0
+        group by c.order_number,
+        c.technology_number,
+        c.process_id
+        order by c.process_id, c.order_number, c.technology_number
+    </select>
 </mapper>
\ No newline at end of file
diff --git a/north-glass-erp/src/main/resources/mapper/pp/Report.xml b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
index 37cbad3..59f0137 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -2979,7 +2979,7 @@
         od.quantity,
         ogd.child_width,
         ogd.child_height,
-        d.numCounts + d.patchNumSum - d.numCount -d.broken_num as stockNum,
+        d.numCounts + d.patchNumSum - d.numCount -d.broken_num-ifnull(fc.termination_quantity,0) as stockNum,
         ROUND(ogd.child_width * ogd.child_height *
         (d.numCounts + d.patchNumSum - d.numCount -
         d.broken_num) / 1000000, 2) as stockArea,

--
Gitblit v1.8.0