From d01fa9d49a8c8a723493aecb681d4e1f3e25fce5 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 26 一月 2024 14:28:55 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue |  374 ++++++++++++++++++++++++++++++++--------------------
 1 files changed, 230 insertions(+), 144 deletions(-)

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 42fb41d..7f5d48c 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
@@ -1,161 +1,250 @@
 <script setup>
-import {ArrowLeftBold} from "@element-plus/icons-vue";
-import {useRouter} from "vue-router";
+
 import {reactive} from "vue";
-const router = useRouter()
-let flag = $ref(true)
-function intoCreateProduct(){
-  if(flag){
-    router.push('/main/processCard/SelectPrintFlowCard')
-  }else {
-    router.push('/main/processCard/SelectPrintFlowCard')
+import {useRouter} from  'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+  switch (type) {
+    case 'edit' :{
+      //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+      router.push({path: '/main/processCard/PrintFlowCard', query: { id: row.id }})
+      break
+    }
+    case 'delete':{
+      alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+      break
+    }
+    case  'setType':{
+      alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鎺掔増鐘舵��')
+      break
+    }
   }
-  flag=!flag
 }
-function openPrint() {
-  this.$router.push('/page');
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+  let count = 0
+  list.forEach(item => {
+    count += Number(item[field])
+  })
+  return count.toFixed(2)
 }
-const form = reactive({
-  name: '',
-  region: '',
-  date1: '',
-  date2: '',
-  delivery: false,
-  type: [],
-  resource: '',
-  desc: '',
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+const gridOptions = reactive({
+  border:  "full",//琛ㄦ牸鍔犺竟妗�
+  keepSource: true,//淇濇寔婧愭暟鎹�
+  align: 'center',//鏂囧瓧灞呬腑
+  stripe:true,//鏂戦┈绾�
+  rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  id: 'CustomerList',
+  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:'expand',fixed:"left",slots: { content:'content' },width: 50},
+    { type: 'seq',fixed:"left", title: '鑷簭', width: 50 },
+    {field: '閿�鍞崟鍙�',width: 120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+    {field: '鐢熶骇璁㈠崟鍙�',width: 140, title: '鐢熶骇璁㈠崟鍙�', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+    {field: '娴佺▼鍗″彿',width: 120, title: '娴佺▼鍗″彿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+    {field: '瀹㈡埛鍚嶇О',width: 120, title: '瀹㈡埛鍚嶇О', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+    {field: '椤圭洰鍚嶇О',width: 120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+    {field: '鐗囨爣璁�',width: 90, title: '鐗囨爣璁�', sortable: true,showOverflow:"ellipsis"},
+    {field: '鏍囪',width: 80, title: '鏍囪', sortable: true},
+    {field: '鐗囨暟',width: 80, title: '鐗囨暟', sortable: true},
+    {field: '闈㈢Н',width: 80, title: '闈㈢Н', sortable: true,showOverflow:"ellipsis"},
+    {field: '浜у搧鍚嶇О',width: 120, title: '浜у搧鍚嶇О', sortable: true},
+    {field: '鍗曠墖鍚嶇О',width: 120, title: '鍗曠墖鍚嶇О', sortable: true},
+    {field: '妤煎眰缂栧彿',width: 120, title: '妤煎眰缂栧彿', sortable: true},
+    {field: '鍒嗘灦鍛�', width: 120,title: '鍒嗘灦鍛�', sortable: true},
+    {field: '鍒嗘灦鏃堕棿',width: 120, title: '鍒嗘灦鏃堕棿', sortable: true},
+    {field: '澶囨敞',width: 120, title: '澶囨敞', sortable: true}
+  ],//琛ㄥご鎸夐挳
+
+  toolbarConfig: {
+    buttons: [
+    {
+        name:'瀹ゅ唴闈�',
+        dropdowns: [
+          { code: 'other1', name: '瀹ゅ唴闈�', type: 'text', },
+          { code: 'other2', name: '瀹ゅ闈�', type: 'text',  },
+        ]
+      },
+      {
+        name:'鎴愬搧鏍囩',
+        dropdowns: [
+          { code: 'other1', name: '鎴愬搧鏍囩', type: 'text', },
+          { code: 'other2', name: '鍗曠墖鏍囩', type: 'text',},
+        ]
+      },
+      {code: 'print_lck', name: '鎵撳嵃娴佺▼鍗�',status:'primary' },
+      {code: 'print_bq', name: '鎵撳嵃鏍囩',status:'primary' }
+    ],
+    import: false,
+    export: true,
+    print: true,
+    zoom: true,
+    custom: true
+  },
+  data:  [
+    {
+      閿�鍞崟鍙�: 'NG231201',
+      鐢熶骇璁㈠崟鍙�:'NG231201A',
+      娴佺▼鍗″彿: 'NG231201A01',
+      瀹㈡埛鍚嶇О:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃',
+      椤圭洰鍚嶇О:'閾堕殕骞垮満',
+      鐗囨爣璁�:'(澶�)',
+      鏍囪:'1',
+      鐗囨暟:'16',
+      闈㈢Н:'24.14',
+      浜у搧鍚嶇О: '10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+      鍗曠墖鍚嶇О: '10mm瓒呯櫧UD60骞抽挗(澶�)',
+      妤煎眰缂栧彿: '16-BSGB05',
+      鍒嗘灦鍛�: '寮犱笁',
+      鍒嗘灦鏃堕棿: '2023-01-11',
+      澶囨敞: '',
+    },
+    {
+      閿�鍞崟鍙�: 'NG231201',
+      鐢熶骇璁㈠崟鍙�:'NG231201A',
+      娴佺▼鍗″彿: 'NG231201A01',
+      瀹㈡埛鍚嶇О:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃',
+      椤圭洰鍚嶇О:'閾堕殕骞垮満',
+      鐗囨爣璁�:'(澶�)',
+      鏍囪:'1',
+      鐗囨暟:'16',
+      闈㈢Н:'24.14',
+      浜у搧鍚嶇О: '10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+      鍗曠墖鍚嶇О: '10mm瓒呯櫧UD60骞抽挗(澶�)',
+      妤煎眰缂栧彿: '16-BSGB05',
+      鍒嗘灦鍛�: '寮犱笁',
+      鍒嗘灦鏃堕棿: '2023-01-11',
+      澶囨敞: '',
+    },
+    {
+      閿�鍞崟鍙�: 'NG231201',
+      鐢熶骇璁㈠崟鍙�:'NG231201A',
+      娴佺▼鍗″彿: 'NG231201A01',
+      瀹㈡埛鍚嶇О:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃',
+      椤圭洰鍚嶇О:'閾堕殕骞垮満',
+      鐗囨爣璁�:'(澶�)',
+      鏍囪:'1',
+      鐗囨暟:'16',
+      闈㈢Н:'24.14',
+      浜у搧鍚嶇О: '10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+      鍗曠墖鍚嶇О: '10mm瓒呯櫧UD60骞抽挗(澶�)',
+      妤煎眰缂栧彿: '16-BSGB05',
+      鍒嗘灦鍛�: '寮犱笁',
+      鍒嗘灦鏃堕棿: '2023-01-11',
+      澶囨敞: '',
+    },
+    {
+      閿�鍞崟鍙�: 'NG231201',
+      鐢熶骇璁㈠崟鍙�:'NG231201A',
+      娴佺▼鍗″彿: 'NG231201A01',
+      瀹㈡埛鍚嶇О:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃',
+      椤圭洰鍚嶇О:'閾堕殕骞垮満',
+      鐗囨爣璁�:'(澶�)',
+      鏍囪:'1',
+      鐗囨暟:'16',
+      闈㈢Н:'24.14',
+      浜у搧鍚嶇О: '10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+      鍗曠墖鍚嶇О: '10mm瓒呯櫧UD60骞抽挗(澶�)',
+      妤煎眰缂栧彿: '16-BSGB05',
+      鍒嗘灦鍛�: '寮犱笁',
+      鍒嗘灦鏃堕棿: '2023-01-11',
+      澶囨敞: '',
+    },
+  ],//table body瀹為檯鏁版嵁
+  //鑴氶儴姹傚拰
+  footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+    let footList=['鐗囨暟','闈㈢Н']
+    return[
+      columns.map((column, columnIndex) => {
+        if (columnIndex === 0) {
+          return '鍚堣:'
+        }
+        if (footList.includes(column.field)) {
+          return sumNum(data, column.field)
+        }
+        return ''
+      })
+    ]
+  }
+
 })
-const tableData = [
-  {
-    salesOrderNo: 'NG231201',
-    productionOrderNo:'NG231201A',
-    processCard: 'NG231201A01',
-    customerName:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃',
-    entryName:'閾堕殕骞垮満',
-    sliceMarking:'(澶�)',
-    marking:'1',
-    pieces:'16',
-    area:'24.14',
-    productName: '10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
-    singlePieceName: '10mm瓒呯櫧UD60骞抽挗(澶�)',
-    floorNumber: '16-BSGB05',
-    divider: '鏅舰',
-    splittingTime: '2023-01-11',
-    notes: '',
-  },
-  {
-    salesOrderNo: 'NG231201',
-    productionOrderNo:'NG231201A',
-    processCard: 'NG231201A01',
-    customerName:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃',
-    entryName:'閾堕殕骞垮満',
-    sliceMarking:'(鍐�)',
-    marking:'2',
-    pieces:'16',
-    area:'24.14',
-    productName: '10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
-    singlePieceName: '10mm瓒呯櫧骞抽挗(鍐�)',
-    floorNumber: '16-BSGB05',
-    divider: '鏅舰',
-    splittingTime: '2023-01-11',
-    notes: '',
-  },
-  {
-    salesOrderNo: 'NG231201',
-    productionOrderNo:'NG231201A',
-    processCard: 'NG231201A02',
-    customerName:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃',
-    entryName:'閾堕殕骞垮満',
-    sliceMarking:'(澶�)',
-    marking:'1',
-    pieces:'6',
-    area:'24.14',
-    productName: '10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
-    singlePieceName: '10mm瓒呯櫧UD60骞抽挗(澶�)',
-    floorNumber: '16-BSGB05',
-    divider: '鏅舰',
-    splittingTime: '2023-01-11',
-    notes: '',
-  },
-  {
-    salesOrderNo: 'NG231201',
-    productionOrderNo:'NG231201A',
-    processCard: 'NG231201A02',
-    customerName:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃',
-    entryName:'閾堕殕骞垮満',
-    sliceMarking:'(鍐�)',
-    marking:'2',
-    pieces:'6',
-    area:'24.14',
-      productName: '10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
-    singlePieceName: '10mm瓒呯櫧骞抽挗(鍐�)',
-    floorNumber: '16-BSGB05',
-    divider: '鏅舰',
-    splittingTime: '2023-01-11',
-    notes: '',
-  },
-]
+
+
+
 </script>
 
 <template>
-  <div>
-    <div class="header">
+  <div class="main-div-customer">
 
-<!--      <el-button-->
-<!--          style="float: left"-->
-<!--          @click="intoCreateProduct"-->
-<!--          id="searchButton1"-->
-<!--          type="primary"-->
-<!--          :icon="ArrowLeftBold"-->
-<!--          round >-->
-<!--        {{flag?'杩斿洖':'杩斿洖'}}-->
-<!--      </el-button>-->
-      <router-link to="/main/processCard/PrintProcess" target="_blank">鎵撳紑鏂版爣绛�</router-link>
-      <el-button type="primary">鎵撳嵃娴佺▼鍗�</el-button>
-      <el-button type="primary">鎵撳嵃鏍囩</el-button>
-      &nbsp;&nbsp;
-      <select class="stnw"  style="width: 100px" >
-        <option label="瀹ゅ唴闈�" value="option1"></option>
-        <option label="瀹ゅ闈�" value="option2"></option>
-      </select>
-      <select class="stnw"  style="width: 100px" >
-        <option label="鎴愬搧鏍囩" value="option1"></option>
-        <option label="鍗曠墖鏍囩" value="option2"></option>
-      </select>
-    </div>
-    <el-table :data="tableData" border style="width: 100%" height="100%">
-      <el-table-column sortable prop="salesOrderNo" label="閿�鍞崟鍙�" width="120" />
-      <el-table-column sortable prop="productionOrderNo" label="鐢熶骇璁㈠崟鍙�" width="120" />
-      <el-table-column sortable prop="processCard" label="娴佺▼鍗″彿" width="120" />
-      <el-table-column prop="customerName" label="瀹㈡埛鍚嶇О" width="120" :show-overflow-tooltip='true'/>
-      <el-table-column prop="entryName" label="椤圭洰鍚嶇О" width="120" :show-overflow-tooltip='true'/>
-      <el-table-column prop="sliceMarking" label="鐗囨爣璁�" :show-overflow-tooltip='true' width="70" />
-      <el-table-column prop="marking" label="鏍囪" width="55" />
-      <el-table-column prop="pieces" label="鐗囨暟" width="65" />
-      <el-table-column prop="area" label="闈㈢Н" width="65" />
-      <el-table-column prop="productName" label="浜у搧鍚嶇О" width="120" :show-overflow-tooltip='true'/>
-      <el-table-column prop="singlePieceName" label="鍗曠墖鍚嶇О" width="120" :show-overflow-tooltip='true'/>
-      <el-table-column prop="floorNumber" label="妤煎眰缂栧彿" width="120" />
-      <el-table-column prop="divider" label="鍒嗘灦鍛�" width="75" />
-      <el-table-column prop="splittingTime" label="鍒嗘灦鏃堕棿" width="120" />
-      <el-table-column prop="notes" label="澶囨敞" :show-overflow-tooltip='true' width="350" />
-    </el-table><!-- <h1>{{msg}}</h1> -->
+    <vxe-grid
+        max-height="100%"
+        @filter-change="filterChanged"
+        class="mytable-scrollbar"
+        ref="xGrid"
+        v-bind="gridOptions"
+
+    >
+      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
+      <!--      涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
+      <template #content="{ row}">
+        <ul class="expand-wrapper">
+          <li  v-for="(item,key,index) in row">
+            <span style="font-weight: bold">{{key+':  '}}</span>
+            <span>{{ item }}</span>
+          </li>
+        </ul>
+      </template>
+
+      <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+      <template #button_slot="{ row }">
+        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">鎵撳嵃</el-button>
+        <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">鎺掔増</el-button>
+        <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">鍒犻櫎</el-button>
+      </template>
+
+      <template #num1_filter="{ column, $panel }">
+        <div>
+          <div v-for="(option, index) in column.filters" :key="index">
+            <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
+          </div>
+        </div>
+      </template>
+
+
+    </vxe-grid>
   </div>
 </template>
 
 <style scoped>
-.common-layout{
+.main-div-customer{
+  width: 99%;
   height: 100%;
 }
 
-.el-aside{
-  height: 100%;
-}
-
-.el-main{
-  height: 100%;
-  text-align: center;
-}
 .stnw{
   height: 33px;
   width: 80px;
@@ -164,7 +253,4 @@
   border: none;
   border-radius: 5px;
 }
-
-
-
 </style>
\ No newline at end of file

--
Gitblit v1.8.0