From c5151996182a7342bed2d62fcbd99349b9b2e3a1 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 03 七月 2024 14:58:28 +0800
Subject: [PATCH] 提交

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue |   87 ++++++++++++++++++++++++++++++-------------
 1 files changed, 61 insertions(+), 26 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
index d3ac47b..7b5a29b 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
@@ -7,19 +7,19 @@
 import {Search} from "@element-plus/icons-vue";
 import {useI18n} from 'vue-i18n'
 import {changeFilterEvent, filterChanged} from "@/hook"
+import footSum from "@/hook/footSum"
+import TagStyle from "@/components/pp/TagStyle.vue"
 //璇█鑾峰彇
 const {t} = useI18n()
 
 let router = useRouter()
 
 
-//瀹氫箟椤甸潰鎬婚〉鏁�
-let pageTotal = ref('')
+
 //瀹氫箟鏁版嵁杩斿洖缁撴灉
 let produceList = ref([])
-//瀹氫箟褰撳墠椤垫暟
-let pageNum = $ref(1)
-let pageState = null
+let titleStyleVisible = ref(false)
+
 
 const form = reactive({
   date1: '',
@@ -56,7 +56,7 @@
 
 //鑾峰彇涓冨ぉ鍓嶅埌褰撳墠鏃堕棿
 function getNowTime() {
-  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7)
+  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 10)
       .toISOString()
       .replace('T', ' ')
       .slice(0, 10) //榛樿寮�濮嬫椂闂�7澶╁墠
@@ -98,7 +98,16 @@
 
   let startTime = form.date1[0]
   let endTime = form.date1[1]
-  request.post(`/processCard/selectAddProcess/${startTime}/${endTime}`).then((res) => {
+  let orderId=form.orderId
+  let project=form.project
+
+  if (orderId==''){
+    orderId=null
+  }
+  if (project==''){
+    project=null
+  }
+  request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}`, filterData.value).then((res) => {
     if (res.code == 200) {
 
       xGrid.value.loadData(res.data.data)
@@ -109,7 +118,6 @@
   })
 }
 
-//瀛愮粍浠舵帴鏀跺弬鏁�
 const xGrid = ref()
 const gridOptions = reactive({
   loading: true,
@@ -148,28 +156,28 @@
     {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
     {
       field: 'order_id',
-      title: '閿�鍞崟鍙�',
+      title: t('order.orderId'),
       filters: [{data: ''}],
       slots: {filter: 'num1_filter'},
       filterMethod: filterChanged
     },
     {
       field: 'project',
-      title: '椤圭洰鍚嶇О',
+      title: t('order.project'),
       filters: [{data: ''}],
       slots: {filter: 'num1_filter'},
       filterMethod: filterChanged
     },
     {
       field: 'quantity',
-      title: '鏁伴噺',
+      title: t('order.quantity'),
       filters: [{data: ''}],
       slots: {filter: 'num1_filter'},
       filterMethod: filterChanged
     },
     {
       field: 'area',
-      title: '闈㈢Н',
+      title: t('order.area'),
       filters: [{data: ''}],
       slots: {filter: 'num1_filter'},
       filterMethod: filterChanged
@@ -177,24 +185,24 @@
   ],//琛ㄥご鎸夐挳
 
   toolbarConfig: {
-    buttons: [],
-    import: false,
-    // export: true,
-    // print: true,
+    buttons: [
+      {'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'}
+    ],
+
     zoom: true,
     custom: true
   },
   data: [],//table body瀹為檯鏁版嵁
   //鑴氶儴姹傚拰
-  footerMethod({columns, data}) {//椤佃剼鍑芥暟
-    let footList = []
-    return [
+  footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+    return[
       columns.map((column, columnIndex) => {
         if (columnIndex === 0) {
-          return '鍚堣:'
+          return t('basicData.total')
         }
-        if (footList.includes(column.field)) {
-          return sumNum(data, column.field)
+        const List = ["quantity",'area',]
+        if (List.includes(column.field)) {
+          return footSum(data, column.field)
         }
         return ''
       })
@@ -202,6 +210,20 @@
   }
 
 })
+
+const gridEvents = {
+  async toolbarButtonClick({code}) {
+    const $grid = xGrid.value
+    if ($grid) {
+      switch (code) {
+        case 'titleStyle':  {
+          titleStyleVisible.value = true
+          break
+        }
+      }
+    }
+  }
+}
 
 </script>
 
@@ -211,9 +233,9 @@
       <el-row :gutter="0">
         <el-date-picker
             v-model="form.date1"
-            end-placeholder="缁撴潫鏃堕棿"
+            :start-placeholder="$t('basicData.startDate')"
+            :end-placeholder="$t('basicData.endDate')"
             format="YYYY/MM/DD"
-            start-placeholder="寮�濮嬫椂闂�"
             type="daterange"
             value-format="YYYY-MM-DD"
 
@@ -221,7 +243,7 @@
         &nbsp;&nbsp;
         <el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 110px"></el-input>
         &nbsp;&nbsp;
-        <el-input v-model="form.project" clearable placeholder="椤圭洰鍚嶇О" style="width: 110px"></el-input>
+        <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 110px"></el-input>
         &nbsp;&nbsp;
         <el-button
             id="select"
@@ -236,6 +258,7 @@
         height="100%"
         max-height="100%"
         v-bind="gridOptions"
+        v-on="gridEvents"
     >
       <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
       <!--      涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
@@ -264,6 +287,15 @@
 
 
     </vxe-grid>
+    <el-dialog
+        id="titleStyle"
+        :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>
   </div>
 </template>
 
@@ -275,6 +307,9 @@
 #selectForm {
   width: 60%;
 }
-
+:deep(#titleStyle .el-dialog__body){
+  height: 90%;
+  width: 100%;
+}
 
 </style>
\ No newline at end of file

--
Gitblit v1.8.0