From fcd7ece15a86fc0cb526ee801ff8262b0db22dee Mon Sep 17 00:00:00 2001
From: NNowhZzU <1539353356@qq.com>
Date: 星期一, 25 十二月 2023 11:40:34 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue | 264
north-glass-erp/northglass-erp/src/assets/base.css | 33
north-glass-erp/northglass-erp/src/views/pp/report/Yield.vue | 246
north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue | 218
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectAddProcess.vue | 371
north-glass-erp/northglass-erp/src/views/pp/workOrder/WorkOrder.vue | 3
north-glass-erp/northglass-erp/src/views/pp/report/ProductionSchedule.vue | 499 +
north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue | 193
north-glass-erp/northglass-erp/src/views/pp/BOM/StandardBOMDetail.vue | 275
north-glass-erp/northglass-erp/src/views/sd/returns/SelectReturns.vue | 227
north-glass-erp/northglass-erp/src/components/basic/BasicTable.vue | 2
north-glass-erp/northglass-erp/src/views/pp/report/EquipmentOutput.vue | 246
north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue | 283
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectOrderList.vue | 271
north-glass-erp/northglass-erp/src/views/sd/delivery/Delivery.vue | 3
north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue | 287
north-glass-erp/northglass-erp/src/views/pp/BOM/StandardBOM.vue | 253
north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue | 281
north-glass-erp/northglass-erp/src/views/pp/machine/AddMaintenanceAndRepair.vue | 311
north-glass-erp/northglass-erp/src/views/pp/report/OrderBOMOutside.vue | 278
north-glass-erp/northglass-erp/src/views/pp/processCard/SplittingDetails.vue | 230
north-glass-erp/northglass-erp/src/views/sd/order/Order.vue | 3
north-glass-erp/northglass-erp/src/views/pp/report/SplittingDetailsOutside.vue | 268
north-glass-erp/northglass-erp/src/views/pp/BOM/OrderBOMDetails.vue | 289
north-glass-erp/northglass-erp/src/views/pp/BOM/BenchmarkBOM.vue | 262
north-glass-erp/northglass-erp/src/views/pp/Replenish/SelectReplenish.vue | 526 +
north-glass-erp/northglass-erp/src/views/pp/report/Report.vue | 6
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue | 375
north-glass-erp/northglass-erp/src/views/pp/BOM/OrderBOM.vue | 242
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectAddWorkOrder.vue | 2
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInspectionReview.vue | 355
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue | 141
north-glass-erp/northglass-erp/src/layout/MainErpView.vue | 225
north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue | 88
north-glass-erp/northglass-erp/src/views/pp/Replenish/AddReplenish.vue | 475 +
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue | 399
north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue | 295
north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryReport.vue | 161
north-glass-erp/northglass-erp/src/views/sd/order/OrderReport.vue | 160
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInReviewDetail.vue | 430 +
north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue | 235
north-glass-erp/northglass-erp/src/views/pp/rework/AddRework.vue | 300
north-glass-erp/northglass-erp/src/views/pp/machine/AddMachine.vue | 267
north-glass-erp/northglass-erp/src/views/sd/product/Product.vue | 4
north-glass-erp/northglass-erp/src/views/pp/processCard/ReShelving.vue | 251
north-glass-erp/northglass-erp/src/views/sd/product/Test.vue | 47
north-glass-erp/northglass-erp/src/views/sd/returns/SelectDeliveryList.vue | 262
north-glass-erp/northglass-erp/src/views/pp/rework/SelectRework.vue | 333
north-glass-erp/northglass-erp/src/views/pp/machine/MaintenanceAndRepair.vue | 252
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue | 432 +
north-glass-erp/northglass-erp/src/views/pp/machine/SelectMachine.vue | 311
north-glass-erp/northglass-erp/src/views/pp/BOM/SelectBOM.vue | 253
north-glass-erp/.idea/workspace.xml | 13
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue | 358
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue | 189
north-glass-erp/northglass-erp/src/views/sd/returns/CreateReturns.vue | 187
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue | 365
north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue | 372
north-glass-erp/northglass-erp/src/views/pp/workOrder/AddWorkOrder.vue | 226
north-glass-erp/northglass-erp/src/views/pp/report/RawMaterialRequisition.vue | 267
north-glass-erp/northglass-erp/src/views/pp/report/TaskCompletionStatus.vue | 288
north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue | 194
north-glass-erp/northglass-erp/src/views/pp/report/QualityReport.vue | 272
north-glass-erp/northglass-erp/src/views/sd/returns/ReturnsReport.vue | 134
64 files changed, 10,629 insertions(+), 4,659 deletions(-)
diff --git a/north-glass-erp/.idea/workspace.xml b/north-glass-erp/.idea/workspace.xml
index bdc9935..559c132 100644
--- a/north-glass-erp/.idea/workspace.xml
+++ b/north-glass-erp/.idea/workspace.xml
@@ -56,7 +56,7 @@
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
"WebServerToolWindowFactoryState": "false",
"git-widget-placeholder": "master",
- "last_opened_file_path": "D:/EPR-Refactoring/north-glass-erp",
+ "last_opened_file_path": "D:/GitRepository/ERP_override/north-glass-erp/northglass-erp/src/components/pp/processCard",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
@@ -82,11 +82,11 @@
<recent name="com.example.erp.config" />
</key>
<key name="CopyFile.RECENT_KEYS">
+ <recent name="D:\GitRepository\ERP_override\north-glass-erp\northglass-erp\src\components\pp\processCard" />
+ <recent name="D:\GitRepository\ERP_override\north-glass-erp\northglass-erp\src\components\pp\workorder" />
+ <recent name="D:\GitRepository\ERP_override\north-glass-erp\northglass-erp\src\views\pp\workOrder" />
<recent name="D:\Documents\north-glass-erp\src\main\resources\mapper\userInfo" />
<recent name="D:\projct\document\north-glass-erp\src\main\java\com\example\erp\service\userInfo" />
- <recent name="D:\projct\document\north-glass-erp\src\main\java\com\example\erp\mapper" />
- <recent name="D:\projct\document\north-glass-erp\src\main\java\com\example\erp\entity" />
- <recent name="D:\Documents\north-glass-erp\northglass-erp\public" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="D:\EPR-Refactoring\north-glass-erp\northglass-erp\src\views" />
@@ -104,7 +104,7 @@
<command value="length" />
</option>
</component>
- <component name="RunManager" selected="Spring Boot.ErpApplication">
+ <component name="RunManager" selected="npm.dev">
<configuration default="true" type="ArquillianJUnit" factoryName="" nameIsGenerated="true">
<option name="arquillianRunConfiguration">
<value>
@@ -211,7 +211,8 @@
<workItem from="1702426354510" duration="34981000" />
<workItem from="1702631535326" duration="205000" />
<workItem from="1702858329054" duration="9016000" />
- <workItem from="1703031064839" duration="6501000" />
+ <workItem from="1703031064839" duration="55055000" />
+ <workItem from="1703463546867" duration="1756000" />
</task>
<task id="LOCAL-00001" summary="绗竴娆℃帹閫�">
<option name="closed" value="true" />
diff --git a/north-glass-erp/northglass-erp/src/assets/base.css b/north-glass-erp/northglass-erp/src/assets/base.css
index 8816868..0656895 100644
--- a/north-glass-erp/northglass-erp/src/assets/base.css
+++ b/north-glass-erp/northglass-erp/src/assets/base.css
@@ -84,3 +84,36 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
+/*婊氬姩鏉℃暣浣撻儴鍒�*/
+.mytable-scrollbar ::-webkit-scrollbar {
+ width: 10px;
+ height: 10px;
+}
+/*婊氬姩鏉$殑杞ㄩ亾*/
+.mytable-scrollbar ::-webkit-scrollbar-track {
+ background-color: #FFFFFF;
+}
+/*婊氬姩鏉¢噷闈㈢殑灏忔柟鍧楋紝鑳藉悜涓婂悜涓嬬Щ鍔�*/
+.mytable-scrollbar ::-webkit-scrollbar-thumb {
+ background-color: transparent;
+ border-radius: 5px;
+ border: 0 solid #F1F1F1;
+ /*box-shadow: inset 0 0 6px rgba(0,0,0,.3);*/
+}
+.mytable-scrollbar ::-webkit-scrollbar-thumb:hover {
+ background-color: #ffffff;
+ box-shadow: inset 0 0 6px rgba(0,0,0,.3);
+}
+.mytable-scrollbar ::-webkit-scrollbar-thumb:active {
+ background-color: white;
+}
+/*杈硅锛屽嵆涓や釜婊氬姩鏉$殑浜ゆ眹澶�*/
+.mytable-scrollbar ::-webkit-scrollbar-corner {
+ background-color: #FFFFFF;
+}
+.vxe-grid{
+ background-color: white;
+}
+
+
+
diff --git a/north-glass-erp/northglass-erp/src/components/basic/BasicTable.vue b/north-glass-erp/northglass-erp/src/components/basic/BasicTable.vue
index 589bb55..9fdcc29 100644
--- a/north-glass-erp/northglass-erp/src/components/basic/BasicTable.vue
+++ b/north-glass-erp/northglass-erp/src/components/basic/BasicTable.vue
@@ -85,7 +85,7 @@
list.forEach(item => {
count += Number(item[field])
})
- return count
+ return count.toFixed(2)
}
const changeFilterEvent = (event, option, $panel,) => {
diff --git a/north-glass-erp/northglass-erp/src/layout/MainErpView.vue b/north-glass-erp/northglass-erp/src/layout/MainErpView.vue
index b9bc12d..56c836b 100644
--- a/north-glass-erp/northglass-erp/src/layout/MainErpView.vue
+++ b/north-glass-erp/northglass-erp/src/layout/MainErpView.vue
@@ -6,6 +6,7 @@
import {onMounted, reactive, ref, watch} from "vue"
import deepClone from "@/utils/deepClone"
import userInfo from '@/stores/userInfo'
+import {Close, Grid, Histogram, MessageBox, SwitchButton} from "@element-plus/icons-vue";
const store=userInfo()
const router = useRouter()
@@ -61,37 +62,55 @@
})
+let openFlag = $ref(null)
+//鍘熷鑿滃崟鎵撳紑
+const openMenu = (menuID) => {
+ if(menuID===openFlag){
+ openFlag = null
+ }else {
+ openFlag = menuID
+ }
+}
+
+
</script>
<template>
<div>
<el-container>
- <el-header>
+ <el-header >
<div style="height: 100%;width: 100%;display: flex">
<img src="../assets/northGlass.ico" alt="" style="max-width: 100%;max-height: 100%">
<h3 style="margin: 1rem ;font-weight: bold;width: 20vw;"> 娆㈣繋{{ user }}浣跨敤鍖楃幓ERP绯荤粺锛�</h3>
<span style="height: 70%;width: 78vw;margin-top: 1rem;" >
- <el-button class="sys-quit" @click="quit" type="info" round>閫�鍑�</el-button>
+
+ <el-button class="sys-quit" @click="quit" type="info" round>
+ <el-icon size="large"><SwitchButton size=""/></el-icon>
+ </el-button>
</span>
</div>
</el-header>
<el-container >
- <el-aside width="160px" style="margin-top: 1.5rem;height: 90% " >
- <el-menu
+ <el-aside width="160px" style="height: 97%; " >
+<!-- <el-menu
+ style=" border-radius:0.5rem;border: 0.01rem solid #409EFF;margin-bottom: 0.5rem"
@open="handleOpen"
ref="menu"
active-color="#ffd04b"
- background-color="#545c64"
- class="el-menu-vertical-demo"
+ background-color="#409EFF"
default-active="2"
text-color="#fff">
<el-sub-menu
+
v-for="items in menuList"
:index="items.id"
:key="items.id">
<template #title>
- <span>{{items.menuName}}</span>
+ <el-icon v-if="items.id==1"><Grid/></el-icon>
+ <el-icon v-if="items.id==2"><Histogram/></el-icon>
+ <el-icon v-if="items.id==3"><MessageBox/></el-icon>
+ <span style="font-weight: bold;">{{items.menuName}}</span>
</template>
<router-link
v-show="items.id==menuItem.menuID"
@@ -103,7 +122,25 @@
</router-link>
</el-sub-menu>
- </el-menu>
+ </el-menu>-->
+ <div class="menu" >
+ <div v-for="items in menuList">
+ <div class='menu_title' @click="openMenu(items.id)" >{{items.menuName}}<span class='indicator' >鈻�</span></div>
+ <ul class='enter-x-left' v-show="openFlag==items.id">
+
+ <li v-for="menuItem in menuItemList"
+ v-show="items.id==menuItem.menuID"
+ style="margin-bottom: 2px"
+ >
+ <router-link
+ :to="{path:menuItem.url}">
+ {{ menuItem.itemName}}
+ </router-link>
+
+ </li>
+ </ul>
+ </div>
+ </div>
</el-aside>
<el-main>
@@ -146,4 +183,176 @@
float: right;
height: 99%;
}
+
+
+
+
+/*------------*/
+
+
+
+
+.menu div div{
+
+ width: 138px;
+ height: 35px;
+ line-height: 35px;
+ background: #C6E2FF;
+ color: #000000;
+ font-size: 16px;
+ padding-left: 15px;
+ transition: all 0.3s ease;
+ cursor: pointer;
+ position: relative;
+ font-weight: bold;
+ overflow: hidden;
+ border-bottom: 12px ;
+ margin-bottom:4px;
+ text-align: left;
+ cursor: pointer;
+ border-radius:8px;
+ /* outline: none; */
+
+ background-color:#5CADFE;
+ box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19);
+
+
+
+}
+
+.menu {
+ width: 138px;
+ height: 33px;
+ line-height: 25px;
+
+ color: #000000;
+ font-size: 16px;
+ padding-left: 15px;
+ padding-right: 2px;
+
+
+
+}
+
+ul {
+ height: auto;
+ margin: 1px auto;
+ text-align: center;
+}
+
+ul li {
+
+ height: 28px;
+ line-height: 30px;
+ background: rgb(128, 128, 128);
+ color: #000000;
+ padding-left: 36px;
+ cursor: pointer;
+ overflow: hidden;
+ text-align: left;
+ border-radius:8px;
+ /* outline: none; */
+
+ background: #5CADFE;
+ box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19);
+}
+
+ul li:hover {
+ background:#5CADFE ;
+ color: #ffffff;
+}
+
+ul li a {
+ text-decoration: none;
+ color: #000000;
+ font-size: 14px;
+}
+ul li a:hover {
+
+ color: #ffffff;
+}
+
+.item_divider {
+ width: 118px;
+ height: 0px;
+ /* background-color: white;
+ opacity: 0.8; */
+ margin-bottom:2px;
+}
+.item a{
+ width: 138px;
+ height: 35px;
+ display: block;
+ text-decoration: none;
+ color: white;
+ font-size: 14px;
+ text-decoration: none;
+}
+
+.menu_title {
+ width: 138px;
+ height: 35px;
+ line-height: 35px;
+ background: #fafafa;
+ color: rgb(128, 128, 128);
+ font-size: 16px;
+ padding-left: 15px;
+ transition: all 0.3s ease;
+ cursor: pointer;
+ position: relative;
+ font-weight: bold;
+ overflow: hidden;
+
+}
+
+.menu_title:hover {
+ /* background: #dedede; */
+ color: #ffffff;
+}
+
+.indicator {
+ display: block;
+ width: 50px;
+ height: 35px;
+ font-weight: bold;
+ position: absolute;
+ right: 0px;
+ top: 0px;
+ transition: all 0.3s ease;
+ text-align: center;
+}
+
+
+
+/* 鍔ㄧ敾鏁堟灉 */
+.enter-x-left {
+ z-index: 9;
+ opacity: 0;
+ animation: enter-x-left 0.4s ease-in-out 0.3s;
+ animation-fill-mode: forwards;
+ transform: translateX(-50px);
+ transition: all 0.3s ease;
+}
+.enter-x-left:nth-child(1){
+ animation-delay: 0.1s;
+}
+.enter-x-left:nth-child(2){
+ animation-delay: 0.2s;
+}
+.enter-x-left:nth-child(3) {
+ animation-delay: 0.3s;
+}
+.enter-x-left:nth-child(4){
+ animation-delay: 0.4s;
+}
+
+
+@keyframes enter-x-left {
+ to {
+ opacity: 1;
+ transform: translateX(0);
+ }
+}
+
+
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/BOM/BenchmarkBOM.vue b/north-glass-erp/northglass-erp/src/views/pp/BOM/BenchmarkBOM.vue
index 4417046..c5b5258 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/BOM/BenchmarkBOM.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/BOM/BenchmarkBOM.vue
@@ -1,6 +1,159 @@
<script setup>
-import {reactive, ref} from 'vue'
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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: 'materialCode', title: '鐗╂枡缂栫爜',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'materialName', title: '鐗╂枡鍚嶇О', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'number',title: '鏁伴噺', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'materialRequisitionProcess', title: '棰嗘枡宸ュ簭',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'mainUnit',title: '涓诲崟浣�', sortable: true,showOverflow:"ellipsis"},
+ {field: 'conversionRate', title: '鎹㈢畻鐜�', sortable: true},
+ {field: 'deputyUnit', title: '鍓崟浣�', sortable: true},
+ {field: 'producer', title: '浜у湴', sortable: true,showOverflow:"ellipsis"},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ buttons: [
+
+ // {
+ // name:'浜у搧绉嶇被',
+ // dropdowns: [
+ // { code: 'other1', name: '绉嶇被涓�', type: 'text', },
+ // { code: 'other2', name: '绉嶇被浜�', type: 'text', },
+ // { code: 'other2', name: '绉嶇被涓�', type: 'text', },
+ // ]
+ // },
+ {code: 'print_lck', name: '娣诲姞涓�琛�' },
+ {code: 'print_lck', name: '鍑忓皯涓�琛�' },
+ {code: 'print_lck', name: '淇濆瓨',status:'primary' ,icon:'vxe-icon-save'},
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ materialCode: '70020000000000000000000004',
+ materialName: '棰勬礂鍓�7600TRO-DS',
+ number: '4',
+ materialRequisitionProcess: '鍒堕暅',
+ mainUnit:'L',
+ conversionRate:'0.001000',
+ deputyUnit:'ml',
+ producer:'鍥涘窛',
+ },
+ {
+ materialCode: '70020000000000000000000004',
+ materialName: '棰勬礂鍓�7600TRO-DS',
+ number: '4',
+ materialRequisitionProcess: '鍒堕暅',
+ mainUnit:'L',
+ conversionRate:'0.001000',
+ deputyUnit:'ml',
+ producer:'鍥涘窛',
+ },
+
+ {
+ materialCode: '70020000000000000000000004',
+ materialName: '棰勬礂鍓�7600TRO-DS',
+ number: '4',
+ materialRequisitionProcess: '鍒堕暅',
+ mainUnit:'L',
+ conversionRate:'0.001000',
+ deputyUnit:'ml',
+ producer:'鍥涘窛',
+ },
+ {
+ materialCode: '70020000000000000000000004',
+ materialName: '棰勬礂鍓�7600TRO-DS',
+ number: '4',
+ materialRequisitionProcess: '鍒堕暅',
+ mainUnit:'L',
+ conversionRate:'0.001000',
+ deputyUnit:'ml',
+ producer:'鍥涘窛',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['number']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
const value = ref('')
const options = [
@@ -17,53 +170,11 @@
label: 'Option3',
},
]
-const form = reactive({
- name: '1',
- region: '',
- date1: '',
- date2: '',
- delivery: false,
- type: [],
- resource: '',
- desc: '',
-})
-const tableData = [
- {
- 1: '70020000000000000000000004',
- 2: '棰勬礂鍓�7600TRO-DS',
- 3: '4',
- 4: '鍒堕暅',
- 5:'L',
- 6:'0.001000',
- 7:'ml',
- 8:'鍥涘窛',
- },
- {
- 1: '70020000000000000000000004',
- 2: '棰勬礂鍓�7600TRO-DS',
- 3: '4',
- 4: '鍒堕暅',
- 5:'L',
- 6:'0.001000',
- 7:'ml',
- 8:'鍥涘窛',
- },
- {
- 1: '70020000000000000000000004',
- 2: '棰勬礂鍓�7600TRO-DS',
- 3: '4',
- 4: '鍒堕暅',
- 5:'L',
- 6:'0.001000',
- 7:'ml',
- 8:'鍥涘窛',
- },
-]
+
</script>
<template>
-<div>
- <div>
+ <div class="main-div-customer">
<el-select v-model="value" class="m-2" placeholder="浜у搧绉嶇被">
<el-option
v-for="item in options"
@@ -72,29 +183,48 @@
:value="item.value"
/>
</el-select>
-
- <label>鍩烘暟:</label>
- <el-input placeholder="鍩烘暟" style="width: 100px" v-model="form.name">1</el-input>
-
- <el-button type="primary">娣诲姞涓�琛�</el-button>
- <el-button type="primary">鍑忓皯涓�琛�</el-button>
- <el-button type="primary">淇濆瓨</el-button>
+ <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>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="鐗╂枡缂栫爜" :show-overflow-tooltip='true' width="250" />
- <el-table-column prop="2" label="鐗╂枡鍚嶇О" :show-overflow-tooltip='true' width="250" />
- <el-table-column prop="3" label="鏁伴噺" width="105" />
- <el-table-column prop="4" label="棰嗘枡宸ュ簭" width="155" />
- <el-table-column prop="5" label="涓诲崟浣�" width="142" />
- <el-table-column prop="6" label="鎹㈢畻鐜�" width="175" />
- <el-table-column prop="7" label="鍓崟浣�" width="155" />
- <el-table-column prop="8" label="浜у湴" width="115" />
- </el-table>
- </div>
-</div>
</template>
<style scoped>
-
+.main-div-customer{
+ width: 99%;
+ height: 100%;
+}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/BOM/OrderBOM.vue b/north-glass-erp/northglass-erp/src/views/pp/BOM/OrderBOM.vue
index ec0acc8..d65d30b 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/BOM/OrderBOM.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/BOM/OrderBOM.vue
@@ -1,9 +1,25 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
-import {Search} from "@element-plus/icons-vue"
-import {useRouter} from "vue-router"
-const router = useRouter()
-// do not use same name with ref
+<script setup>
+
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/BOM/OrderBOMDetails', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
const form = reactive({
name: '',
region: '',
@@ -14,33 +30,145 @@
resource: '',
desc: '',
})
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-let listName = $ref([
- '璁㈠崟BOM','瀹℃牳','閲囪喘'
-])
-const tableData = [
- {
- salesOrderNo: 'NG23121201',
- 2: '姹熼棬棣楄揪鐗圭幓绉戞妧鏈夐檺鍏徃',
- 3: '澶ф澘闀�',
- 4: '1鎵逛竴',
- 5:'1212',
- 6:'442.21',
- 7:'鍐呴儴',
- 8:'XX',
- 9:'2020-01-01',
- 10:'2020-01-02',
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
+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 },
+ {title: '鎿嶄綔', width: 70, slots: { default: 'button_slot' },fixed:"left"},
+ { field: 'salesOrderNo',width: 130, title: '閿�鍞崟鍙�',sortable: true, filters:[{ data: '' }],slots: { filter: 'num1_filter' } },
+ { field: 'customerName',width: 130, title: '瀹㈡埛鍚嶇О',sortable: true, filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ { field: 'entryName',width: 130, title: '椤圭洰鍚嶇О',sortable: true, filters:[{ data: '' }],slots: { filter: 'num1_filter' } },
+ { field: 'batch',width: 75, title: '鎵规',sortable: true, },
+ {field: 'number',width: 83, title: '璁㈠崟鏁�', sortable: true, },
+ {field: 'area',width: 100, title: '璁㈠崟闈㈢Н', sortable: true,showOverflow:"ellipsis" ,},
+ {field: 'types',width: 110, title: '璁㈠崟绫诲瀷', sortable: true,},
+ {field: 'salesman',width: 85, title: '涓氬姟鍛�', sortable: true},
+ {field: 'orderBOMGenerationTime',width: 160,title: '宸ュ崟BOM鐢熸垚鏃堕棿', sortable: true,showOverflow:"ellipsis"},
+ {field: 'orderBOMAuditTime',width: 160,title: '宸ュ崟BOM瀹℃牳鏃堕棿', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ salesOrderNo: 'NG23121201',
+ customerName: '姹熼棬棣楄揪鐗圭幓绉戞妧鏈夐檺鍏徃',
+ entryName: '澶ф澘闀�',
+ batch: '1鎵逛竴',
+ number:'1212',
+ area:'442.21',
+ types:'鍐呴儴',
+ salesman:'XX',
+ orderBOMGenerationTime:'2020-01-01',
+ orderBOMAuditTime:'2020-01-02',
+ },
+ {
+ salesOrderNo: 'NG23121201',
+ customerName: '姹熼棬棣楄揪鐗圭幓绉戞妧鏈夐檺鍏徃',
+ entryName: '澶ф澘闀�',
+ batch: '1鎵逛竴',
+ number:'1212',
+ area:'442.21',
+ types:'鍐呴儴',
+ salesman:'XX',
+ orderBOMGenerationTime:'2020-01-01',
+ orderBOMAuditTime:'2020-01-02',
+ },
+ {
+ salesOrderNo: 'NG23121201',
+ customerName: '姹熼棬棣楄揪鐗圭幓绉戞妧鏈夐檺鍏徃',
+ entryName: '澶ф澘闀�',
+ batch: '1鎵逛竴',
+ number:'1212',
+ area:'442.21',
+ types:'鍐呴儴',
+ salesman:'XX',
+ orderBOMGenerationTime:'2020-01-01',
+ orderBOMAuditTime:'2020-01-02',
+ },
+ {
+ salesOrderNo: 'NG23121201',
+ customerName: '姹熼棬棣楄揪鐗圭幓绉戞妧鏈夐檺鍏徃',
+ entryName: '澶ф澘闀�',
+ batch: '1鎵逛竴',
+ number:'1212',
+ area:'442.21',
+ types:'鍐呴儴',
+ salesman:'XX',
+ orderBOMGenerationTime:'2020-01-01',
+ orderBOMAuditTime:'2020-01-02',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['finishedNumber','finishedArea','wornNumber','wornArea']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
+
+
</script>
<template>
- <div>
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
<el-date-picker
@@ -55,34 +183,50 @@
</el-row>
</div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column v-for="item in listName" prop="" :label="item" width="85" >
- <el-checkbox checked/>
- </el-table-column>
- <el-table-column prop="salesOrderNo" label="閿�鍞崟鍙�" width="125">
- <template v-slot="scope">
- <router-link :to="{path:'OrderBOMDetails'}" >{{scope.row.salesOrderNo}}</router-link>
- </template>
- </el-table-column>
- <el-table-column prop="2" label="瀹㈡埛鍚嶇О" :show-overflow-tooltip='true' width="165" />
- <el-table-column prop="3" label="椤圭洰鍚嶇О" :show-overflow-tooltip='true' width="105" />
- <el-table-column prop="4" label="鎵规" :show-overflow-tooltip='true' width="75" />
- <el-table-column prop="5" label="璁㈠崟鏁�" :show-overflow-tooltip='true' width="70" />
- <el-table-column prop="6" label="璁㈠崟闈㈢Н" width="85" />
- <el-table-column prop="7" label="璁㈠崟绫诲瀷" width="85" />
- <el-table-column prop="8" label="涓氬姟鍛�" width="75" />
- <el-table-column prop="9" label="宸ュ崟BOM鐢熸垚鏃堕棿" width="150" />
- <el-table-column prop="10" label="宸ュ崟BOM瀹℃牳鏃堕棿" :show-overflow-tooltip='true' width="158" />
- </el-table>
+ <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>
+ </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>
+.main-div-customer{
+ width: 99%;
+ height: 100%;
+}
#selectForm {
width: 40%;
- height: 100%;
text-align: center;
}
-
-
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/BOM/OrderBOMDetails.vue b/north-glass-erp/northglass-erp/src/views/pp/BOM/OrderBOMDetails.vue
index 666c8fe..b136563 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/BOM/OrderBOMDetails.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/BOM/OrderBOMDetails.vue
@@ -1,5 +1,177 @@
<script setup>
-import {reactive, ref} from 'vue'
+
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/BOM/StandardBOMDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+const form = reactive({
+ xsdh:'NG23010101',
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+})
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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 },
+ {title: '鎿嶄綔', width: 60, slots: { default: 'button_slot' },fixed:"left"},
+ { type: 'checkbox',fixed:"left", title: '鍩哄噯BOM', width: 110 },
+ { type: 'checkbox',fixed:"left", title: '鏍囧噯BOM', width:110 },
+ { type: 'checkbox',fixed:"left", title: '瀹℃牳', width: 80 },
+ {field: 'customerNumber', width: 120, title: '瀹㈡埛缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'customerName',width: 120, title: '瀹㈡埛鍚嶇О', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'productNumber', width: 130,title: '浜у搧缂栧彿', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'productName',width: 120, title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'glassLength', width: 100,title: '鐜荤拑闀�', sortable: true,showOverflow:"ellipsis"},
+ {field: 'glassWidth', width: 100,title: '鐜荤拑瀹�', sortable: true},
+ {field: 'thickness',width: 100, title: '鍘氬害', sortable: true},
+ {field: 'shape',width: 120, title: '褰㈢姸', sortable: true,showOverflow:"ellipsis"},
+ {field: 'notes', width: 120,title: '澶囨敞', sortable: true},
+ {field: 'productCreator',width: 120, title: '浜у搧鍒涘缓浜�', sortable: true},
+ {field: 'BOMCreator',width: 120, title: 'BOM鍒涘缓浜�', sortable: true},
+ {field: 'auditor',width: 120, title: '瀹℃牳鍛�', sortable: true}
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ buttons: [
+ {code: 'print_lck', name: '杞噰璐崟' ,status:'primary'},
+ {code: 'print_lck', name: '瀹℃牳', status:'primary'},
+ {code: 'print_lck', name: '鍒犻櫎', status:'primary'},
+ {code: 'print_lck', name: '淇敼瓒呴鏁伴噺', status:'primary'},
+ {code: 'print_lck', name: '鐢熸垚璁㈠崟BOM',status:'primary' ,icon:'vxe-icon-save'},
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ customerNumber: 'D123123',
+ customerName: 'XXXX鍏徃',
+ productNumber: '06040000022',
+ productName:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+ glassLength:'1440',
+ glassWidth:'3660',
+ thickness:'30',
+ shape:'鏅舰',
+ notes:'111',
+ productCreator:'寮犱笁',
+ BOMCreator:'鏉庡洓',
+ auditor:'鐜嬩簲',
+
+
+ },
+ {
+ customerNumber: 'D123123',
+ customerName: 'XXXX鍏徃',
+ productNumber: '06040000022',
+ productName:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+ glassLength:'1440',
+ glassWidth:'3660',
+ thickness:'30',
+ shape:'鏅舰',
+ notes:'111',
+ productCreator:'寮犱笁',
+ BOMCreator:'鏉庡洓',
+ auditor:'鐜嬩簲',
+
+
+ },
+ {
+ customerNumber: 'D123123',
+ customerName: 'XXXX鍏徃',
+ productNumber: '06040000022',
+ productName:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+ glassLength:'1440',
+ glassWidth:'3660',
+ thickness:'30',
+ shape:'鏅舰',
+ notes:'111',
+ productCreator:'寮犱笁',
+ BOMCreator:'鏉庡洓',
+ auditor:'鐜嬩簲',
+
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['finishedNumber','finishedArea','wornNumber','wornArea']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
const value = ref('')
@@ -17,57 +189,15 @@
label: 'Option3',
},
]
-const form = reactive({
- name: '',
- region: '',
- date1: '',
- date2: '',
- delivery: false,
- type: [],
- resource: '',
- desc: '',
-})
-const tableData = [
- {
- 1: 'NG23121201',
- 2: '12300001110',
- 3: '10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
- 4: '111',
- 5:'閽㈠寲',
- 6:'5001011100000110',
- 7:'鏃犲皹绾�',
- 8:'113',
- 9:'1144',
- 10:'寮�',
- 11:'11',
- 12:'22',
- 13:'33',
- 14:'44',
- 15:'涓滆帪',
- 16:'2023-12-01',
- 17:'',
- },
-]
</script>
<template>
- <div>
+ <div class="main-div-customer">
<div>
- <div>
- <el-input placeholder="閿�鍞崟鍙�" style="width: 120px" v-model="form.name"></el-input>
- <el-button type="primary">鐢熸垚璁㈠崟BOM</el-button>
- <el-button type="primary">杞噰璐崟</el-button>
- <el-button type="primary">瀹℃牳</el-button>
- <el-button type="primary">鍙嶅</el-button>
- <el-button type="primary">鍒犻櫎</el-button>
- <el-button type="primary">淇敼瓒呴鏁伴噺</el-button>
+ <el-input placeholder="閿�鍞崟鍙�" style="width: 115px" v-model="form.xsdh"></el-input>
-
- </div>
-
-
- <el-select v-model="value" class="m-2" placeholder="浜у搧绉嶇被">
+ <el-select v-model="value" class="m-2" placeholder="001123311" style="width: 120px">
<el-option
v-for="item in options"
:key="item.value"
@@ -75,7 +205,7 @@
:value="item.value"
/>
</el-select>
- <el-select v-model="value" class="m-2" placeholder="棰嗘枡宸ュ簭">
+ <el-select v-model="value" class="m-2" placeholder="閽㈠寲" style="width: 80px">
<el-option
v-for="item in options"
:key="item.value"
@@ -83,37 +213,56 @@
:value="item.value"
/>
</el-select>
-
+ <br>
<el-input placeholder="鐗╂枡缂栫爜" style="width: 200px"></el-input>
<el-input placeholder="鐗╂枡鍚嶇О" style="width: 200px"></el-input>
<el-input placeholder="闇�姹傛暟閲�" style="width: 200px"></el-input>
<el-button type="primary">娣诲姞</el-button>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="閿�鍞崟鍙�" :show-overflow-tooltip='true' width="120" />
- <el-table-column prop="2" label="浜у搧缂栧彿" :show-overflow-tooltip='true' width="130" />
- <el-table-column prop="3" label="浜у搧鍚嶇О" :show-overflow-tooltip='true' width="155" />
- <el-table-column prop="4" label="宸ュ崟鏁伴噺" width="85" />
- <el-table-column prop="5" label="棰嗘枡宸ュ簭" width="85" />
- <el-table-column prop="6" label="鐗╂枡缂栫爜" :show-overflow-tooltip='true' width="125" />
- <el-table-column prop="7" label="鐗╂枡鍚嶇О" :show-overflow-tooltip='true' width="135" />
- <el-table-column prop="8" label="瀹�" width="60" />
- <el-table-column prop="9" label="楂�" width="60" />
- <el-table-column prop="10" label="鍗曚綅" width="70" />
- <el-table-column prop="11" label="鐗╂枡鏁伴噺" width="85" />
- <el-table-column prop="12" label="搴撳瓨鏁伴噺" width="85" />
- <el-table-column prop="13" label="搴撳瓨鏁�-闇�姹傛暟" width="120" />
- <el-table-column prop="14" label="閲囪喘鏁伴噺" width="85" />
- <el-table-column prop="15" label="浜у湴" width="70" />
- <el-table-column prop="16" label="璁″垝鍒拌揣鏃堕棿" width="120" />
- <el-table-column prop="17" label="澶囨敞" :show-overflow-tooltip='true' width="120" />
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
- </el-table>
- </div>
+ >
+ <!-- @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>
+ </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>
-
+.main-div-customer{
+ width: 99%;
+ height: 100%;
+}
+#selectForm {
+ width: 40%;
+ text-align: center;
+}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/BOM/SelectBOM.vue b/north-glass-erp/northglass-erp/src/views/pp/BOM/SelectBOM.vue
index b043431..b78a75d 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/BOM/SelectBOM.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/BOM/SelectBOM.vue
@@ -1,9 +1,25 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
-import {Search} from "@element-plus/icons-vue"
-import {useRouter} from "vue-router"
-const router = useRouter()
-// do not use same name with ref
+<script setup>
+
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/BOM/StandardBOMDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
const form = reactive({
name: '',
region: '',
@@ -14,36 +30,150 @@
resource: '',
desc: '',
})
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-let listName = $ref([
- '鍩哄噯BOM','鏍囧噯BOM','瀹℃牳'
-])
-const tableData = [
- {
- serialNumber: '1',
- 2: 'D123123',
- 3: 'XXXX鍏徃',
- 4: '06040000022',
- 5:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
- 6:'1440',
- 7:'3660',
- 8:'30',
- 9:'鏅舰',
- 10:'111',
- 11:'寮犱笁',
- 12:'鏉庡洓',
- 13:'鐜嬩簲',
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
+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 },
+ {title: '鎿嶄綔', width: 80, slots: { default: 'button_slot' },fixed:"left"},
+ { type: 'checkbox',fixed:"left", title: '鍩哄噯BOM', width: 110 },
+ { type: 'checkbox',fixed:"left", title: '鏍囧噯BOM', width: 110 },
+ { type: 'checkbox',fixed:"left", title: '瀹℃牳', width: 80 },
+ {field: 'customerNumber', width: 120, title: '瀹㈡埛缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'customerName',width: 120, title: '瀹㈡埛鍚嶇О', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'productNumber', width: 130,title: '浜у搧缂栧彿', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'productName',width: 120, title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'glassLength', width: 100,title: '鐜荤拑闀�', sortable: true,showOverflow:"ellipsis"},
+ {field: 'glassWidth', width: 100,title: '鐜荤拑瀹�', sortable: true},
+ {field: 'thickness',width: 100, title: '鍘氬害', sortable: true},
+ {field: 'shape',width: 120, title: '褰㈢姸', sortable: true,showOverflow:"ellipsis"},
+ {field: 'notes', width: 120,title: '澶囨敞', sortable: true},
+ {field: 'productCreator',width: 120, title: '浜у搧鍒涘缓浜�', sortable: true},
+ {field: 'BOMCreator',width: 120, title: 'BOM鍒涘缓浜�', sortable: true},
+ {field: 'auditor',width: 120, title: '瀹℃牳鍛�', sortable: true}
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ customerNumber: 'D123123',
+ customerName: 'XXXX鍏徃',
+ productNumber: '06040000022',
+ productName:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+ glassLength:'1440',
+ glassWidth:'3660',
+ thickness:'30',
+ shape:'鏅舰',
+ notes:'111',
+ productCreator:'寮犱笁',
+ BOMCreator:'鏉庡洓',
+ auditor:'鐜嬩簲',
+
+
+ },
+ {
+ customerNumber: 'D123123',
+ customerName: 'XXXX鍏徃',
+ productNumber: '06040000022',
+ productName:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+ glassLength:'1440',
+ glassWidth:'3660',
+ thickness:'30',
+ shape:'鏅舰',
+ notes:'111',
+ productCreator:'寮犱笁',
+ BOMCreator:'鏉庡洓',
+ auditor:'鐜嬩簲',
+
+
+ },
+ {
+ customerNumber: 'D123123',
+ customerName: 'XXXX鍏徃',
+ productNumber: '06040000022',
+ productName:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+ glassLength:'1440',
+ glassWidth:'3660',
+ thickness:'30',
+ shape:'鏅舰',
+ notes:'111',
+ productCreator:'寮犱笁',
+ BOMCreator:'鏉庡洓',
+ auditor:'鐜嬩簲',
+
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['finishedNumber','finishedArea','wornNumber','wornArea']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
+
+
</script>
<template>
- <div>
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
<el-date-picker
@@ -58,37 +188,50 @@
</el-row>
</div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column v-for="item in listName" prop="" :label="item" width="85" >
- <el-checkbox checked/>
- </el-table-column>
- <el-table-column prop="serialNumber" label="鑷簭" width="55" >
- <template v-slot="scope">
- <router-link :to="{path:'StandardBOMDetail'}" >{{scope.row.serialNumber}}</router-link>
- </template>
- </el-table-column>
- <el-table-column prop="2" label="瀹㈡埛缂栧彿" width="105" />
- <el-table-column prop="3" label="瀹㈡埛鍚嶇О" width="105" />
- <el-table-column prop="4" label="浜у搧缂栧彿" :show-overflow-tooltip='true' width="125" />
- <el-table-column prop="5" label="浜у搧鍚嶇О" :show-overflow-tooltip='true' width="150" />
- <el-table-column prop="6" label="鐜荤拑闀�" width="75" />
- <el-table-column prop="7" label="鐜荤拑瀹�" width="75" />
- <el-table-column prop="8" label="鍘氬害" width="65" />
- <el-table-column prop="9" label="褰㈢姸" width="65" />
- <el-table-column prop="10" label="澶囨敞" :show-overflow-tooltip='true' width="155" />
- <el-table-column prop="11" label="浜у搧鍒涘缓浜�" width="95" />
- <el-table-column prop="12" label="BOM鍒涘缓浜�" width="105" />
- <el-table-column prop="13" label="瀹℃牳鍛�" width="85" />
- </el-table>
+ <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>
+ </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>
+.main-div-customer{
+ width: 99%;
+ height: 100%;
+}
#selectForm {
width: 40%;
- height: 100%;
text-align: center;
}
-
-
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/BOM/StandardBOM.vue b/north-glass-erp/northglass-erp/src/views/pp/BOM/StandardBOM.vue
index 80af515..fd8c448 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/BOM/StandardBOM.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/BOM/StandardBOM.vue
@@ -1,9 +1,25 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
-import {Search} from "@element-plus/icons-vue"
-import {useRouter} from "vue-router"
-const router = useRouter()
-// do not use same name with ref
+<script setup>
+
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/BOM/StandardBOMDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑瀹℃牳鐘舵��')
+ break
+ }
+ }
+}
const form = reactive({
name: '',
region: '',
@@ -14,36 +30,150 @@
resource: '',
desc: '',
})
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-let listName = $ref([
- '鍩哄噯BOM','鏍囧噯BOM','瀹℃牳'
-])
-const tableData = [
- {
- serialNumber: '1',
- 2: 'D123123',
- 3: 'XXXX鍏徃',
- 4: '06040000022',
- 5:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
- 6:'1440',
- 7:'3660',
- 8:'30',
- 9:'鏅舰',
- 10:'111',
- 11:'寮犱笁',
- 12:'鏉庡洓',
- 13:'鐜嬩簲',
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
+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 },
+ {title: '鎿嶄綔', width: 80, slots: { default: 'button_slot' },fixed:"left"},
+ { type: 'checkbox',fixed:"left", title: '鍩哄噯BOM', width: 110 },
+ { type: 'checkbox',fixed:"left", title: '鏍囧噯BOM', width: 110 },
+ { type: 'checkbox',fixed:"left", title: '瀹℃牳', width: 80 },
+ {field: 'customerNumber', width: 120, title: '瀹㈡埛缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'customerName',width: 120, title: '瀹㈡埛鍚嶇О', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'productNumber', width: 130,title: '浜у搧缂栧彿', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'productName',width: 120, title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'glassLength', width: 100,title: '鐜荤拑闀�', sortable: true,showOverflow:"ellipsis"},
+ {field: 'glassWidth', width: 100,title: '鐜荤拑瀹�', sortable: true},
+ {field: 'thickness',width: 100, title: '鍘氬害', sortable: true},
+ {field: 'shape',width: 120, title: '褰㈢姸', sortable: true,showOverflow:"ellipsis"},
+ {field: 'notes', width: 120,title: '澶囨敞', sortable: true},
+ {field: 'productCreator',width: 120, title: '浜у搧鍒涘缓浜�', sortable: true},
+ {field: 'BOMCreator',width: 120, title: 'BOM鍒涘缓浜�', sortable: true},
+ {field: 'auditor',width: 120, title: '瀹℃牳鍛�', sortable: true}
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ customerNumber: 'D123123',
+ customerName: 'XXXX鍏徃',
+ productNumber: '06040000022',
+ productName:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+ glassLength:'1440',
+ glassWidth:'3660',
+ thickness:'30',
+ shape:'鏅舰',
+ notes:'111',
+ productCreator:'寮犱笁',
+ BOMCreator:'鏉庡洓',
+ auditor:'鐜嬩簲',
+
+
+ },
+ {
+ customerNumber: 'D123123',
+ customerName: 'XXXX鍏徃',
+ productNumber: '06040000022',
+ productName:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+ glassLength:'1440',
+ glassWidth:'3660',
+ thickness:'30',
+ shape:'鏅舰',
+ notes:'111',
+ productCreator:'寮犱笁',
+ BOMCreator:'鏉庡洓',
+ auditor:'鐜嬩簲',
+
+
+ },
+ {
+ customerNumber: 'D123123',
+ customerName: 'XXXX鍏徃',
+ productNumber: '06040000022',
+ productName:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+ glassLength:'1440',
+ glassWidth:'3660',
+ thickness:'30',
+ shape:'鏅舰',
+ notes:'111',
+ productCreator:'寮犱笁',
+ BOMCreator:'鏉庡洓',
+ auditor:'鐜嬩簲',
+
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['finishedNumber','finishedArea','wornNumber','wornArea']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
+
+
</script>
<template>
- <div>
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
<el-date-picker
@@ -58,37 +188,50 @@
</el-row>
</div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column v-for="item in listName" prop="" :label="item" width="85" >
- <el-checkbox checked/>
- </el-table-column>
- <el-table-column prop="serialNumber" label="鑷簭" width="55" >
- <template v-slot="scope">
- <router-link :to="{path:'StandardBOMDetail'}" >{{scope.row.serialNumber}}</router-link>
- </template>
- </el-table-column>
- <el-table-column prop="2" label="瀹㈡埛缂栧彿" width="105" />
- <el-table-column prop="3" label="瀹㈡埛鍚嶇О" width="105" />
- <el-table-column prop="4" label="浜у搧缂栧彿" :show-overflow-tooltip='true' width="125" />
- <el-table-column prop="5" label="浜у搧鍚嶇О" :show-overflow-tooltip='true' width="150" />
- <el-table-column prop="6" label="鐜荤拑闀�" width="75" />
- <el-table-column prop="7" label="鐜荤拑瀹�" width="75" />
- <el-table-column prop="8" label="鍘氬害" width="65" />
- <el-table-column prop="9" label="褰㈢姸" width="65" />
- <el-table-column prop="10" label="澶囨敞" :show-overflow-tooltip='true' width="155" />
- <el-table-column prop="11" label="浜у搧鍒涘缓浜�" width="95" />
- <el-table-column prop="12" label="BOM鍒涘缓浜�" width="105" />
- <el-table-column prop="13" label="瀹℃牳鍛�" width="85" />
- </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>
+ </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>
+.main-div-customer{
+ width: 99%;
+ height: 100%;
+}
#selectForm {
width: 40%;
- height: 100%;
text-align: center;
}
-
-
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/BOM/StandardBOMDetail.vue b/north-glass-erp/northglass-erp/src/views/pp/BOM/StandardBOMDetail.vue
index 34b70e9..55bb0e4 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/BOM/StandardBOMDetail.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/BOM/StandardBOMDetail.vue
@@ -1,25 +1,167 @@
<script setup>
-import {reactive, ref} from 'vue'
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
-const value = ref('')
-const options = [
- {
- value: 'Option1',
- label: 'Option1',
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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
},
- {
- value: 'Option2',
- label: 'Option2',
+ filterConfig: { //绛涢�夐厤缃」
+ remote: true
},
- {
- value: 'Option3',
- label: 'Option3',
+ 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: 'materialCode', title: '鐗╂枡缂栫爜',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'materialName', title: '鐗╂枡鍚嶇О', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'number',title: '鏁伴噺', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'materialRequisitionProcess', title: '棰嗘枡宸ュ簭',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'mainUnit',title: '涓诲崟浣�', sortable: true,showOverflow:"ellipsis"},
+ {field: 'conversionRate', title: '鎹㈢畻鐜�', sortable: true},
+ {field: 'deputyUnit', title: '鍓崟浣�', sortable: true},
+ {field: 'producer', title: '浜у湴', sortable: true,showOverflow:"ellipsis"},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ buttons: [
+
+ // {
+ // name:'浜у搧绉嶇被',
+ // dropdowns: [
+ // { code: 'other1', name: '绉嶇被涓�', type: 'text', },
+ // { code: 'other2', name: '绉嶇被浜�', type: 'text', },
+ // { code: 'other2', name: '绉嶇被涓�', type: 'text', },
+ // ]
+ // },
+ {code: 'print_lck', name: '娣诲姞涓�琛�' },
+ {code: 'print_lck', name: '鍑忓皯涓�琛�' },
+ {code: 'print_lck', name: '瀹℃牳',status:'primary' },
+ {code: 'print_lck', name: '淇濆瓨',status:'primary' ,icon:'vxe-icon-save'},
+
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ materialCode: '70020000000000000000000004',
+ materialName: '棰勬礂鍓�7600TRO-DS',
+ number: '4',
+ materialRequisitionProcess: '鍒堕暅',
+ mainUnit:'L',
+ conversionRate:'0.001000',
+ deputyUnit:'ml',
+ producer:'鍥涘窛',
+ },
+ {
+ materialCode: '70020000000000000000000004',
+ materialName: '棰勬礂鍓�7600TRO-DS',
+ number: '4',
+ materialRequisitionProcess: '鍒堕暅',
+ mainUnit:'L',
+ conversionRate:'0.001000',
+ deputyUnit:'ml',
+ producer:'鍥涘窛',
+ },
+
+ {
+ materialCode: '70020000000000000000000004',
+ materialName: '棰勬礂鍓�7600TRO-DS',
+ number: '4',
+ materialRequisitionProcess: '鍒堕暅',
+ mainUnit:'L',
+ conversionRate:'0.001000',
+ deputyUnit:'ml',
+ producer:'鍥涘窛',
+ },
+ {
+ materialCode: '70020000000000000000000004',
+ materialName: '棰勬礂鍓�7600TRO-DS',
+ number: '4',
+ materialRequisitionProcess: '鍒堕暅',
+ mainUnit:'L',
+ conversionRate:'0.001000',
+ deputyUnit:'ml',
+ producer:'鍥涘窛',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['number']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
const form = reactive({
- name: '1',
- region: '',
+ name: '',
+ id:'',
+ length:'',
+ width:'',
+
+ region: '1',
date1: '',
date2: '',
delivery: false,
@@ -27,58 +169,23 @@
resource: '',
desc: '',
})
-const tableData = [
- {
- 1: '70020000000000000000000004',
- 2: '棰勬礂鍓�7600TRO-DS',
- 3: '4',
- 4: '鍒堕暅',
- 5:'L',
- 6:'0.001000',
- 7:'ml',
- 8:'鍥涘窛',
- },
- {
- 1: '70020000000000000000000004',
- 2: '棰勬礂鍓�7600TRO-DS',
- 3: '4',
- 4: '鍒堕暅',
- 5:'L',
- 6:'0.001000',
- 7:'ml',
- 8:'鍥涘窛',
- },
- {
- 1: '70020000000000000000000004',
- 2: '棰勬礂鍓�7600TRO-DS',
- 3: '4',
- 4: '鍒堕暅',
- 5:'L',
- 6:'0.001000',
- 7:'ml',
- 8:'鍥涘窛',
- },
-]
+
</script>
<template>
<div>
<div style="text-align: center">
- <el-select v-model="value" class="m-2" placeholder="浜у搧绉嶇被">
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
+ <el-input placeholder="浜у搧缂栧彿" style="width: 140px" v-model="form.id"></el-input>
+
+ <el-input placeholder="浜у搧鍚嶇О" style="width: 180px" v-model="form.name"></el-input>
+
+ <el-input placeholder="闀�" style="width: 60px" v-model="form.length"></el-input>
+
+ <el-input placeholder="瀹�" style="width: 60px" v-model="form.width"></el-input>
<label>鍩烘暟:</label>
- <el-input placeholder="鍩烘暟" style="width: 100px" v-model="form.name">1</el-input>
-
- <el-button type="primary">娣诲姞涓�琛�</el-button>
- <el-button type="primary">鍑忓皯涓�琛�</el-button>
- <el-button type="primary">淇濆瓨</el-button>
+ <el-input placeholder="鍩烘暟" style="width: 40px" v-model="form.region">1</el-input>
+
<div id="tab_div">
<table class="tab_bfl" style="border: 1px solid black;">
<tr>
@@ -88,7 +195,7 @@
<td>閽㈠寲</td>
</tr>
<tr>
- <td>鎶ョ毊鐜�%</td>
+ <td>鎶ュ簾鐜�%</td>
<td>0</td>
<td>0</td>
<td>0</td>
@@ -97,16 +204,42 @@
</div>
</div>
<div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="鐗╂枡缂栫爜" :show-overflow-tooltip='true' width="250" />
- <el-table-column prop="2" label="鐗╂枡鍚嶇О" :show-overflow-tooltip='true' width="250" />
- <el-table-column prop="3" label="鏁伴噺" width="105" />
- <el-table-column prop="4" label="棰嗘枡宸ュ簭" width="155" />
- <el-table-column prop="5" label="涓诲崟浣�" width="142" />
- <el-table-column prop="6" label="鎹㈢畻鐜�" width="175" />
- <el-table-column prop="7" label="鍓崟浣�" width="155" />
- <el-table-column prop="8" label="浜у湴" width="115" />
- </el-table>
+ <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>
</div>
</template>
diff --git a/north-glass-erp/northglass-erp/src/views/pp/Replenish/AddReplenish.vue b/north-glass-erp/northglass-erp/src/views/pp/Replenish/AddReplenish.vue
index 1bbe8e8..36e9c05 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/Replenish/AddReplenish.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/Replenish/AddReplenish.vue
@@ -1,234 +1,289 @@
<script setup>
-import {reactive, ref} from 'vue'
-import {ElTable} from "element-plus"
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
-const form = reactive({
- lckh:'',
- xsdh:'',
+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 },
+ { type: 'checkbox',fixed:"left", title: '閫夋嫨', width: 80 },
+
+ {field: 'salesOrderNo', width: 120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'processCardNo',width: 120, title: '娴佺▼鍗″彿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'entryName', width: 130,title: '椤圭洰鍚嶇О', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'productName',width: 120, title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'reportingWorkNo', width: 100,title: '鎶ュ伐缂栧彿', sortable: true,showOverflow:"ellipsis"},
+ {field: 'serialNumber', width: 70,title: '搴忓彿', sortable: true},
+ {field: 'singlePieceName',width: 100, title: '鍗曠墖鍚嶇О', sortable: true},
+ {field: 'floorNumber',width: 120, title: '妤煎眰缂栧彿', sortable: true,showOverflow:"ellipsis"},
+ {field: 'marking', width: 80,title: '鏍囪', sortable: true},
+ {field: 'pieces',width: 90, title: '鐗囨爣璁�', sortable: true},
+ {field: 'processCardNumber',width: 120, title: '娴佺▼鍗℃暟閲�', sortable: true},
+ {field: 'width',width: 80, title: '瀹�', sortable: true},
+ {field: 'height',width: 80, title: '楂�', sortable: true},
+ {field: 'area',width: 80, title: '闈㈢Н', sortable: true},
+ {field: 'shape',width: 80, title: '褰㈢姸', sortable: true},
+ {field: 'numberBroken',width: 120, title: '娆$牬鏁伴噺', sortable: true},
+ {field: 'reasonType',width: 120, title: '娆$牬绫诲瀷', sortable: true},
+ {field: 'reasonDamage',width: 120, title: '娆$牬鍘熷洜', sortable: true},
+ {field: 'responsibilityDevice',width: 120, title: '璐d换璁惧', sortable: true},
+ {field: 'reportingProcess',width: 120, title: '鎶ュ伐宸ュ簭', sortable: true},
+ {field: 'responsibilityProcess',width: 120, title: '璐d换宸ュ簭', sortable: true},
+ {field: 'responsibilityTeams',width: 120, title: '璐d换鐝粍', sortable: true},
+ {field: 'responsibilityPersonnel',width: 120, title: '璐d换浜哄憳', sortable: true},
+ {field: 'qualityInspector',width: 100, title: '璐ㄦ鍛�', sortable: true}
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ buttons: [
+ {code: 'print_lck', name: '淇濆瓨',status:'primary' ,icon:'vxe-icon-save'},
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ reportingWorkTime:'2021-01-01',
+ salesOrderNo:'NG23010101',
+ processCardNo:'NG23010101A01',
+ entryName:'xxxx',
+ productName:"xxxxxxxxx",
+ reportingWorkNo:"BG2301010001",
+ floorNumber:"D4-010-01",
+ area:'23.11',
+ reportingProcess:'閽㈠寲',
+ qualityInspector:"寮犱笁",
+ serialNumber:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '12',
+ completedQuantity: '1',
+ numberBroken:'2',
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ },
+ {
+ reportingWorkTime:'2021-01-01',
+ salesOrderNo:'NG23010101',
+ processCardNo:'NG23010101A01',
+ entryName:'xxxx',
+ productName:"xxxxxxxxx",
+ reportingWorkNo:"BG2301010001",
+ floorNumber:"D4-010-01",
+ area:'23.11',
+ reportingProcess:'閽㈠寲',
+ qualityInspector:"寮犱笁",
+ serialNumber:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '12',
+ completedQuantity: '1',
+ numberBroken:'2',
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ },
+ {
+ reportingWorkTime:'2021-01-01',
+ salesOrderNo:'NG23010101',
+ processCardNo:'NG23010101A01',
+ entryName:'xxxx',
+ productName:"xxxxxxxxx",
+ reportingWorkNo:"BG2301010001",
+ floorNumber:"D4-010-01",
+ area:'23.11',
+ reportingProcess:'閽㈠寲',
+ qualityInspector:"寮犱笁",
+ serialNumber:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '12',
+ completedQuantity: '1',
+ numberBroken:'2',
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ },
+ {
+ reportingWorkTime:'2021-01-01',
+ salesOrderNo:'NG23010101',
+ processCardNo:'NG23010101A01',
+ entryName:'xxxx',
+ productName:"xxxxxxxxx",
+ reportingWorkNo:"BG2301010001",
+ floorNumber:"D4-010-01",
+ area:'23.11',
+ reportingProcess:'閽㈠寲',
+ qualityInspector:"寮犱笁",
+ serialNumber:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '12',
+ completedQuantity: '1',
+ numberBroken:'2',
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['processCardNumber','numberBroken']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
-const tableData = [
- {
- reportingWorkTime:'2021-01-01',
- salesOrderNo:'NG23010101',
- processCardNo:'NG23010101A01',
- entryName:'xxxx',
- productName:"xxxxxxxxx",
- reportingWorkNo:"BG2301010001",
- floorNumber:"D4-010-01",
- area:'23.11',
- reportingProcess:'閽㈠寲',
- qualityInspector:"寮犱笁",
- serialNumber:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'2',
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- },
- {
- reportingWorkTime:'2021-01-01',
- salesOrderNo:'NG23010101',
- processCardNo:'NG23010101A01',
- entryName:'xxxx',
- productName:"xxxxxxxxx",
- reportingWorkNo:"BG2301010001",
- floorNumber:"D4-010-01",
- area:'23.11',
- reportingProcess:'閽㈠寲',
- qualityInspector:"寮犱笁",
- serialNumber:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'2',
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- },
- {
- reportingWorkTime:'2021-01-01',
- salesOrderNo:'NG23010101',
- processCardNo:'NG23010101A01',
- entryName:'xxxx',
- productName:"xxxxxxxxx",
- reportingWorkNo:"BG2301010001",
- floorNumber:"D4-010-01",
- area:'23.11',
- reportingProcess:'閽㈠寲',
- qualityInspector:"寮犱笁",
- serialNumber:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'2',
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- },
- {
- reportingWorkTime:'2021-01-01',
- salesOrderNo:'NG23010101',
- processCardNo:'NG23010101A01',
- entryName:'xxxx',
- productName:"xxxxxxxxx",
- reportingWorkNo:"BG2301010001",
- floorNumber:"D4-010-01",
- area:'23.11',
- reportingProcess:'閽㈠寲',
- qualityInspector:"寮犱笁",
- serialNumber:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'2',
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- },
-]
+
</script>
<template>
- <div>
-<!-- <div id="head" style="width: 900px;">-->
-<!-- <el-input placeholder="娴佺▼鍗″彿" v-model="form.xsdh" style="width: 200px"/>-->
-<!-- -->
+ <div class="main-div-customer">
-<!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.lckh" style="width: 200px"/>-->
-<!-- -->
-<!-- <el-button type="primary">鏌ヨ</el-button>-->
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
-<!-- </div>-->
+ >
+ <!-- @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>
- <div>
- <el-button class="btn_bc" type="primary">淇濆瓨</el-button>
- <el-table
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <template #button_slot="{ row }">
+ <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">鍒犻櫎</el-button>
+ </template>
- :data="tableData"
- style="width: 100%"
-
- >
- <el-table-column type="selection" width="55" />
- <el-table-column prop="reportingWorkTime" label="鎶ュ伐鏃堕棿" width="155" >
-
- </el-table-column>
- <el-table-column sortable prop="salesOrderNo" label="閿�鍞崟鍙�" width="120" />
- <el-table-column sortable prop="processCardNo" label="娴佺▼鍗″彿" width="130" />
- <el-table-column prop="entryName" label="椤圭洰鍚嶇О" width="120" :show-overflow-tooltip='true'/>
- <el-table-column prop="productName" label="浜у搧鍚嶇О" width="120" :show-overflow-tooltip='true'/>
- <el-table-column sortable prop="reportingWorkNo" label="鎶ュ伐缂栧彿" width="120"/> >
- <el-table-column prop="serialNumber" label="搴忓彿" width="60" />
- <el-table-column prop="singlePieceName" :show-overflow-tooltip='true' label="鍗曠墖鍚嶇О" width="120" />
- <el-table-column prop="floorNumber" label="妤煎眰缂栧彿" width="120" />
- <el-table-column prop="marking" label="鏍囪" width="60" />
- <el-table-column prop="pieces" label="鐗囨爣璁�" width="70" />
- <el-table-column prop="processCardNumber" label="娴佺▼鍗℃暟閲�" width="95" />
- <el-table-column prop="width" label="瀹�" width="60" />
- <el-table-column prop="height" label="楂�" width="60" />
- <el-table-column prop="area" label="闈㈢Н" width="65" />
- <el-table-column prop="shape" label="褰㈢姸" :show-overflow-tooltip='true' width="60" />
- <el-table-column prop="numberBroken" label="娆$牬鏁伴噺" width="85" />
- <el-table-column prop="reasonType" label="娆$牬绫诲瀷" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="reasonDamage" label="娆$牬鍘熷洜" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityDevice" label="璐d换璁惧" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="reportingProcess" label="鎶ュ伐宸ュ簭" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityProcess" label="璐d换宸ュ簭" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityTeams" label="璐d换鐝粍" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityPersonnel" label="璐d换浜哄憳" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="qualityInspector" label="璐ㄦ鍛�" width="80" />
+ <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>
-
-
-
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ </vxe-grid>
</div>
</template>
<style scoped>
-
-
-.processCard{
- width: 140px;
-}
-.processesSt{
- height: 33px;
- width: 80px;
- background-color: #409eff;
- color: white;
- border: none;
- border-radius: 5px;
-}
-#titleTable tr,#titleTable td{
- border: 1px solid #000;
-}
-#titleTable{
- border-collapse: collapse;
- text-align: center;
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
-}
-#titleTable td{
- width: 100px;
- height: 30px;
-}
-#titleTable td:nth-child(1){
- width: 100px;
- height: 30px;
-}
-#titleTable td:nth-child(2){
- width: 100px;
-}
-.chaxun{
- background-color:#D5EAFF;
- border: none;
-}
-
-.btn_bc{
- float: right;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue b/north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue
index 311dc58..0efb845 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue
@@ -1,158 +1,251 @@
<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 },
+ // {title: '鎿嶄綔', width: 140, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'salesOrderNo',width: 120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'productionOrderNo',width: 120, title: '娴佺▼鍗″彿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'customerName',width: 120, title: '瀹㈡埛鍚嶇О', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'entryName',width: 120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'sliceMarking',width: 90, title: '鐗囨爣璁�', sortable: true,showOverflow:"ellipsis"},
+ {field: 'marking',width: 80, title: '鏍囪', sortable: true},
+ {field: 'pieces',width: 80, title: '鐗囨暟', sortable: true},
+ {field: 'area',width: 80, title: '闈㈢Н', sortable: true,showOverflow:"ellipsis"},
+ {field: 'productName',width: 120, title: '浜у搧鍚嶇О', sortable: true},
+ {field: 'floorNumber',width: 120, title: '妤煎眰缂栧彿', sortable: true},
+ {field: 'divider', width: 120,title: '鍒嗘灦鍛�', sortable: true},
+ {field: 'splittingTime',width: 120, title: '鍒嗘灦鏃堕棿', sortable: true},
+ {field: 'notes',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' },
+ {code: 'print_qx', name: '涓嶅彲鎺掔増' ,status:'primary'},
+ {code: 'print_pb', name: '璁″垝鎺掔増',status:'primary' }
+ ],
+
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 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: '',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['pieces','area']
+ 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">
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
- <router-link to="/main/processCard/PrintProcess" target="_blank">鎵撳紑鏂版爣绛�</router-link>
- <el-button type="primary">鎵撳嵃娴佺▼鍗�</el-button>
- <el-button type="primary">鎵撳嵃鏍囩</el-button>
-
- <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>
-
- <el-button type="primary">涓嶅彲鎺掔増</el-button>
- <el-button type="primary">璁″垝鎺掔増</el-button>
- </div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column type="selection" width="55" />
- <el-table-column sortable prop="salesOrderNo" label="閿�鍞崟鍙�" width="120" >
- </el-table-column>
- <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> -->
+ >
+ <!-- @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;
@@ -161,7 +254,4 @@
border: none;
border-radius: 5px;
}
-
-
-
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/Replenish/SelectReplenish.vue b/north-glass-erp/northglass-erp/src/views/pp/Replenish/SelectReplenish.vue
index fe8a94d..1d58a78 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/Replenish/SelectReplenish.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/Replenish/SelectReplenish.vue
@@ -1,258 +1,324 @@
<script setup>
-import {reactive, ref} from 'vue'
-// do not use same name with ref
-const form = reactive({
- lckh:'',
- xsdh:'',
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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 },
+ {title: '鎿嶄綔', width: 80, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'salesOrderNo', width: 120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'processCardNo',width: 120, title: '娴佺▼鍗″彿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'entryName', width: 130,title: '椤圭洰鍚嶇О', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'productName',width: 120, title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'reportingWorkNo', width: 100,title: '鎶ュ伐缂栧彿', sortable: true,showOverflow:"ellipsis"},
+ {field: 'serialNumber', width: 70,title: '搴忓彿', sortable: true},
+ {field: 'singlePieceName',width: 100, title: '鍗曠墖鍚嶇О', sortable: true},
+ {field: 'floorNumber',width: 120, title: '妤煎眰缂栧彿', sortable: true,showOverflow:"ellipsis"},
+ {field: 'marking', width: 80,title: '鏍囪', sortable: true},
+ {field: 'pieces',width: 90, title: '鐗囨爣璁�', sortable: true},
+ {field: 'processCardNumber',width: 120, title: '娴佺▼鍗℃暟閲�', sortable: true},
+ {field: 'width',width: 80, title: '瀹�', sortable: true},
+ {field: 'height',width: 80, title: '楂�', sortable: true},
+ {field: 'area',width: 80, title: '闈㈢Н', sortable: true},
+ {field: 'shape',width: 80, title: '褰㈢姸', sortable: true},
+ {field: 'numberBroken',width: 120, title: '娆$牬鏁伴噺', sortable: true},
+ {field: 'reasonType',width: 120, title: '娆$牬绫诲瀷', sortable: true},
+ {field: 'reasonDamage',width: 120, title: '娆$牬鍘熷洜', sortable: true},
+ {field: 'responsibilityDevice',width: 120, title: '璐d换璁惧', sortable: true},
+ {field: 'reportingProcess',width: 120, title: '鎶ュ伐宸ュ簭', sortable: true},
+ {field: 'responsibilityProcess',width: 120, title: '璐d换宸ュ簭', sortable: true},
+ {field: 'responsibilityTeams',width: 120, title: '璐d换鐝粍', sortable: true},
+ {field: 'responsibilityPersonnel',width: 120, title: '璐d换浜哄憳', sortable: true},
+ {field: 'qualityInspector',width: 100, title: '璐ㄦ鍛�', sortable: true}
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ reportingWorkTime:'2021-01-01',
+ salesOrderNo:'NG23010101',
+ processCardNo:'NG23010101A01',
+ entryName:'xxxx',
+ productName:"xxxxxxxxx",
+ reportingWorkNo:"BG2301010001",
+ floorNumber:"D4-010-01",
+ area:'23.11',
+ reportingProcess:'閽㈠寲',
+ qualityInspector:"寮犱笁",
+ serialNumber:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '12',
+ completedQuantity: '1',
+ numberBroken:'2',
+ availableUse:'',
+ returnProcess:'',
+
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ available:'',
+ reworkProcess:'',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ completed:'',
+ onceBroken:'',
+ },
+ {
+ reportingWorkTime:'2021-01-01',
+ salesOrderNo:'NG23010101',
+ processCardNo:'NG23010101A01',
+ entryName:'xxxx',
+ productName:"xxxxxxxxx",
+ reportingWorkNo:"BG2301010001",
+ floorNumber:"D4-010-01",
+ area:'23.11',
+ reportingProcess:'閽㈠寲',
+ qualityInspector:"寮犱笁",
+ serialNumber:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '12',
+ completedQuantity: '1',
+ numberBroken:'2',
+ availableUse:'',
+ returnProcess:'',
+
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ available:'',
+ reworkProcess:'',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ completed:'',
+ onceBroken:'',
+ },
+ {
+ reportingWorkTime:'2021-01-01',
+ salesOrderNo:'NG23010101',
+ processCardNo:'NG23010101A01',
+ entryName:'xxxx',
+ productName:"xxxxxxxxx",
+ reportingWorkNo:"BG2301010001",
+ floorNumber:"D4-010-01",
+ area:'23.11',
+ reportingProcess:'閽㈠寲',
+ qualityInspector:"寮犱笁",
+ serialNumber:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '12',
+ completedQuantity: '1',
+ numberBroken:'2',
+ availableUse:'',
+ returnProcess:'',
+
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ available:'',
+ reworkProcess:'',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ completed:'',
+ onceBroken:'',
+ },
+ {
+ reportingWorkTime:'2021-01-01',
+ salesOrderNo:'NG23010101',
+ processCardNo:'NG23010101A01',
+ entryName:'xxxx',
+ productName:"xxxxxxxxx",
+ reportingWorkNo:"BG2301010001",
+ floorNumber:"D4-010-01",
+ area:'23.11',
+ reportingProcess:'閽㈠寲',
+ qualityInspector:"寮犱笁",
+ serialNumber:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '12',
+ completedQuantity: '1',
+ numberBroken:'2',
+ availableUse:'',
+ returnProcess:'',
+
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ available:'',
+ reworkProcess:'',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ completed:'',
+ onceBroken:'',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['processCardNumber','numberBroken']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
-const value = ref('')
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-const tableData = [
- {
- reportingWorkTime:'2021-01-01',
- salesOrderNo:'NG23010101',
- processCardNo:'NG23010101A01',
- entryName:'xxxx',
- productName:"xxxxxxxxx",
- reportingWorkNo:"BG2301010001",
- floorNumber:"D4-010-01",
- area:'23.11',
- reportingProcess:'閽㈠寲',
- qualityInspector:"寮犱笁",
- serialNumber:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'2',
- availableUse:'',
- returnProcess:'',
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- available:'',
- reworkProcess:'',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- completed:'',
- onceBroken:'',
- },
- {
- reportingWorkTime:'2021-01-01',
- salesOrderNo:'NG23010101',
- processCardNo:'NG23010101A01',
- entryName:'xxxx',
- productName:"xxxxxxxxx",
- reportingWorkNo:"BG2301010001",
- floorNumber:"D4-010-01",
- area:'23.11',
- reportingProcess:'閽㈠寲',
- qualityInspector:"寮犱笁",
- serialNumber:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'2',
- availableUse:'',
- returnProcess:'',
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- available:'',
- reworkProcess:'',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- completed:'',
- onceBroken:'',
- },
- {
- reportingWorkTime:'2021-01-01',
- salesOrderNo:'NG23010101',
- processCardNo:'NG23010101A01',
- entryName:'xxxx',
- productName:"xxxxxxxxx",
- reportingWorkNo:"BG2301010001",
- floorNumber:"D4-010-01",
- area:'23.11',
- reportingProcess:'閽㈠寲',
- qualityInspector:"寮犱笁",
- serialNumber:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'2',
- availableUse:'',
- returnProcess:'',
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- available:'',
- reworkProcess:'',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- completed:'',
- onceBroken:'',
- },
- {
- reportingWorkTime:'2021-01-01',
- salesOrderNo:'NG23010101',
- processCardNo:'NG23010101A01',
- entryName:'xxxx',
- productName:"xxxxxxxxx",
- reportingWorkNo:"BG2301010001",
- floorNumber:"D4-010-01",
- area:'23.11',
- reportingProcess:'閽㈠寲',
- qualityInspector:"寮犱笁",
- serialNumber:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'2',
- availableUse:'',
- returnProcess:'',
-
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- available:'',
- reworkProcess:'',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- completed:'',
- onceBroken:'',
- },
-]
</script>
<template>
- <div>
+ <div class="main-div-customer">
<div id="head" style="width: 900px;">
-<!-- <el-input placeholder="娴佺▼鍗″彿" v-model="form.xsdh" style="width: 200px"/>-->
-<!-- -->
-
-<!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.lckh" style="width: 200px"/>-->
-<!-- -->
<el-date-picker
v-model="value"
type="daterange"
start-placeholder="鎶ュ伐寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
- :default-time="defaultTime"
/>
<el-button type="primary">鏌ヨ</el-button>
</div>
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column fixed label="鎿嶄綔" width="60" >
- <el-button link type="primary" size="small">鍒犻櫎</el-button>
- </el-table-column>
- <el-table-column prop="reportingWorkTime" label="鎶ュ伐鏃堕棿" width="155" />
- <el-table-column sortable prop="salesOrderNo" label="閿�鍞崟鍙�" width="120" />
- <el-table-column sortable prop="processCardNo" label="娴佺▼鍗″彿" width="130" />
- <el-table-column prop="entryName" label="椤圭洰鍚嶇О" width="120" :show-overflow-tooltip='true'/>
- <el-table-column prop="productName" label="浜у搧鍚嶇О" width="120" :show-overflow-tooltip='true'/>
- <el-table-column sortable prop="reportingWorkNo" label="鎶ュ伐缂栧彿" width="120"/> >
- <el-table-column prop="serialNumber" label="搴忓彿" width="60" />
- <el-table-column prop="singlePieceName" :show-overflow-tooltip='true' label="鍗曠墖鍚嶇О" width="120" />
- <el-table-column prop="floorNumber" label="妤煎眰缂栧彿" width="120" />
- <el-table-column prop="marking" label="鏍囪" width="60" />
- <el-table-column prop="pieces" label="鐗囨爣璁�" width="70" />
- <el-table-column prop="processCardNumber" label="娴佺▼鍗℃暟閲�" width="95" />
- <el-table-column prop="width" label="瀹�" width="60" />
- <el-table-column prop="height" label="楂�" width="60" />
- <el-table-column prop="area" label="闈㈢Н" width="65" />
- <el-table-column prop="shape" label="褰㈢姸" :show-overflow-tooltip='true' width="60" />
- <el-table-column prop="numberBroken" label="娆$牬鏁伴噺" width="85" />
- <el-table-column prop="reasonType" label="娆$牬绫诲瀷" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="reasonDamage" label="娆$牬鍘熷洜" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityDevice" label="璐d换璁惧" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="reportingProcess" label="鎶ュ伐宸ュ簭" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityProcess" label="璐d换宸ュ簭" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityTeams" label="璐d换鐝粍" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityPersonnel" label="璐d换浜哄憳" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="qualityInspector" label="璐ㄦ鍛�" width="80" />
+ >
+ <!-- @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,'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>
-
-
-
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ </vxe-grid>
</div>
</template>
<style scoped>
-
-
-.processCard{
- width: 140px;
-}
-.processesSt{
- height: 33px;
- width: 80px;
- background-color: #409eff;
- color: white;
- border: none;
- border-radius: 5px;
-}
-#titleTable tr,#titleTable td{
- border: 1px solid #000;
-}
-#titleTable{
- border-collapse: collapse;
- text-align: center;
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
-}
-#titleTable td{
- width: 100px;
- height: 30px;
-}
-#titleTable td:nth-child(1){
- width: 100px;
- height: 30px;
-}
-#titleTable td:nth-child(2){
- width: 100px;
-}
-.chaxun{
- background-color:#D5EAFF;
- border: none;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/machine/AddMachine.vue b/north-glass-erp/northglass-erp/src/views/pp/machine/AddMachine.vue
index e8a8f01..e3e81d4 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/machine/AddMachine.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/machine/AddMachine.vue
@@ -1,24 +1,157 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
-import {Search} from "@element-plus/icons-vue"
-import {useRouter} from "vue-router"
-const router = useRouter()
-// do not use same name with ref
-const value = ref('')
-const options = [
- {
- value: 'Option1',
- label: 'Option1',
+<script setup>
+
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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
},
- {
- value: 'Option2',
- label: 'Option2',
+ filterConfig: { //绛涢�夐厤缃」
+ remote: true
},
- {
- value: 'Option3',
- label: 'Option3',
+ customConfig: {
+ storage: true
},
-]
+ editConfig: {
+ trigger: 'click',
+ mode: 'row',
+ showStatus: true
+ },//琛ㄥご鍙傛暟
+ columns:[
+ { type: 'seq',fixed:"left", title: '鑷簭', width: 50 },
+
+ {field: 'standardName', title: '鏍囧噯鍚嶇О',editRender: { name: 'input', attrs: { placeholder: '' } } },
+ {field: 'deviceName', title: '璁惧鍚嶇О',editRender: { name: 'input', attrs: { placeholder: '' } } },
+ {field: 'buyingTime', title: '璐拱鏃堕棿',editRender: { name: 'input', attrs: { placeholder: '' } }},
+ {field: 'installationTime',title: '瀹夎鏃堕棿',editRender: { name: 'input', attrs: { placeholder: '' } } },
+ {field: 'serviceInterval', title: '淇濆吇鍛ㄦ湡',editRender: { name: 'input', attrs: { placeholder: '' } }},
+ {field: 'process', title: '鎵�鍦ㄥ伐鑹�', editRender: { name: 'input', attrs: { placeholder: '' } }},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ buttons: [
+ {code: 'print_lck', name: '淇濆瓨',status:'primary' ,icon:'vxe-icon-save'},
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ standardName: '',
+ deviceName: '',
+ buyingTime: '',
+ installationTime: '',
+ serviceInterval:'',
+ process:'',
+
+ },
+ {
+ standardName: '',
+ deviceName: '',
+ buyingTime: '',
+ installationTime: '',
+ serviceInterval:'',
+ process:'',
+
+ },
+ {
+ standardName: '',
+ deviceName: '',
+ buyingTime: '',
+ installationTime: '',
+ serviceInterval:'',
+ process:'',
+
+ },
+ {
+ standardName: '',
+ deviceName: '',
+ buyingTime: '',
+ installationTime: '',
+ serviceInterval:'',
+ process:'',
+
+ },
+ {
+ standardName: '',
+ deviceName: '',
+ buyingTime: '',
+ installationTime: '',
+ serviceInterval:'',
+ process:'',
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['maintenanceFrequency','MaintenancesFrequency']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
+const size = ref<'default' | 'large' | 'small'>('default')
+
+const value1 = ref('')
+const dialogFormVisible = ref(false)
+const formLabelWidth = '140px'
+
const form = reactive({
name: '',
region: '',
@@ -30,76 +163,52 @@
desc: '',
})
-
-const tableData = [
- {
- 1: '',
- 2: '',
- 3: '',
- 4: '',
- 5:'',
- 6:'',
-
- },
- {
- 1: '',
- 2: '',
- 3: '',
- 4: '',
- 5:'',
- 6:'',
-
- },
- {
- 1: '',
- 2: '',
- 3: '',
- 4: '',
- 5:'',
- 6:'',
-
- },
-]
</script>
<template>
- <div>
- <div id="selectForm">
- <el-row :gutter="0">
+ <div class="main-div-customer">
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
- <el-button type="primary">淇濆瓨</el-button>
- </el-row>
+ >
+ <!-- @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>
- </div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="鏍囧噯鍚嶇О" >
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="2" label="璁惧鍚嶇О" >
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="3" label="璐拱鏃堕棿" >
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="4" label="瀹夎鏃堕棿">
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="5" label="淇濆吇鍛ㄦ湡" >
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="6" label="鎵�鍦ㄥ伐鑹�" >
- <el-input></el-input>
- </el-table-column>
- </el-table><!-- <h1>{{msg}}</h1> -->
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <template #button_slot="{ row }">
+ <el-button @click="dialogFormVisible = true" 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>
-#selectForm {
- float: right;
+.main-div-customer{
+ width: 99%;
height: 100%;
- text-align: center;
}
-
-
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/machine/AddMaintenanceAndRepair.vue b/north-glass-erp/northglass-erp/src/views/pp/machine/AddMaintenanceAndRepair.vue
index 0d4c8ef..9855cd1 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/machine/AddMaintenanceAndRepair.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/machine/AddMaintenanceAndRepair.vue
@@ -1,24 +1,186 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
-import {Search} from "@element-plus/icons-vue"
-import {useRouter} from "vue-router"
-const router = useRouter()
-// do not use same name with ref
-const value = ref('')
-const options = [
- {
- value: 'Option1',
- label: 'Option1',
+<script setup>
+
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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
},
- {
- value: 'Option2',
- label: 'Option2',
+ filterConfig: { //绛涢�夐厤缃」
+ remote: true
},
- {
- value: 'Option3',
- label: 'Option3',
+ customConfig: {
+ storage: true
},
-]
+ editConfig: {
+ trigger: 'click',
+ mode: 'row',
+ showStatus: true
+ },//琛ㄥご鍙傛暟
+ columns:[
+ { type: 'seq',fixed:"left", title: '鑷簭', width: 50 },
+ {field: 'deviceName', width: 100,title: '璁惧鍚嶇О', editRender: { name: 'input', attrs: { placeholder: '' } }},
+ {field: 'types',width: 80, title: '绫诲瀷',editRender: { name: 'input', attrs: { placeholder: '' } }},
+ {field: 'faultDate', width: 100,title: '鏁呴殰鏃ユ湡',editRender: { name: 'input', attrs: { placeholder: '' } }},
+ {field: 'failureCause', width: 100,title: '鏁呴殰鍘熷洜', editRender: { name: 'input', attrs: { placeholder: '' } }},
+ {field: 'maintenanceDate',width: 100, title: '淇濆吇鏃ユ湡', editRender: { name: 'input', attrs: { placeholder: '' } }},
+ {field: 'maintenanceInstructions',width: 110, title: '淇濆吇璇存槑', editRender: { name: 'input', attrs: { placeholder: '' } }},
+ {field: 'RepairMaintenanceStartTime', width: 160,title: '缁翠慨/淇濆吇寮�濮嬫椂闂�', editRender: { name: 'input', attrs: { placeholder: '' } }},
+ {field: 'RepairMaintenanceEndTime',width: 160, title: '缁翠慨/淇濆吇缁撴潫鏃堕棿', editRender: { name: 'input', attrs: { placeholder: '' } }},
+ {field: 'process',width: 100, title: '鎵�鍦ㄥ伐鑹�', editRender: { name: 'input', attrs: { placeholder: '' } }},
+ {field: 'RepairMaintenancePersonnel',width: 150, title: '缁翠慨/淇濆吇浜哄憳', editRender: { name: 'input', attrs: { placeholder: '' } }},
+ {field: 'cost', title: '璐圭敤', editRender: { name: 'input', attrs: { placeholder: '' } }},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ buttons: [
+ {code: 'print_lck', name: '淇濆瓨',status:'primary' ,icon:'vxe-icon-save'},
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ deviceName: '',
+ types: '',
+ faultDate: '',
+ failureCause: '',
+ maintenanceDate:'',
+ maintenanceInstructions:'',
+ RepairMaintenanceStartTime:'',
+ RepairMaintenanceEndTime:'',
+ process:'',
+ RepairMaintenancePersonnel:'',
+ cost:'',
+
+ },
+ {
+ deviceName: '',
+ types: '',
+ faultDate: '',
+ failureCause: '',
+ maintenanceDate:'',
+ maintenanceInstructions:'',
+ RepairMaintenanceStartTime:'',
+ RepairMaintenanceEndTime:'',
+ process:'',
+ RepairMaintenancePersonnel:'',
+ cost:'',
+
+ },
+ {
+ deviceName: '',
+ types: '',
+ faultDate: '',
+ failureCause: '',
+ maintenanceDate:'',
+ maintenanceInstructions:'',
+ RepairMaintenanceStartTime:'',
+ RepairMaintenanceEndTime:'',
+ process:'',
+ RepairMaintenancePersonnel:'',
+ cost:'',
+
+ },
+ {
+ deviceName: '',
+ types: '',
+ faultDate: '',
+ failureCause: '',
+ maintenanceDate:'',
+ maintenanceInstructions:'',
+ RepairMaintenanceStartTime:'',
+ RepairMaintenanceEndTime:'',
+ process:'',
+ RepairMaintenancePersonnel:'',
+ cost:'',
+
+ },
+ {
+ deviceName: '',
+ types: '',
+ faultDate: '',
+ failureCause: '',
+ maintenanceDate:'',
+ maintenanceInstructions:'',
+ RepairMaintenanceStartTime:'',
+ RepairMaintenanceEndTime:'',
+ process:'',
+ RepairMaintenancePersonnel:'',
+ cost:'',
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['maintenanceFrequency','MaintenancesFrequency']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
+const size = ref<'default' | 'large' | 'small'>('default')
+
+const value1 = ref('')
+const dialogFormVisible = ref(false)
+const formLabelWidth = '140px'
+
const form = reactive({
name: '',
region: '',
@@ -30,91 +192,52 @@
desc: '',
})
-
-const tableData = [
- {
- 1: '',
- 2: '',
- 3: '',
- 4: '',
- 5:'',
- 6:'',
-
- },
- {
- 1: '',
- 2: '',
- 3: '',
- 4: '',
- 5:'',
- 6:'',
-
- },
- {
- 1: '',
- 2: '',
- 3: '',
- 4: '',
- 5:'',
- 6:'',
-
- },
-]
</script>
<template>
- <div>
- <div id="selectForm" style="float: right">
- <el-row :gutter="0">
+ <div class="main-div-customer">
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
- <el-button type="primary">淇濆瓨</el-button>
- </el-row>
+ >
+ <!-- @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>
- </div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="璁惧鍚嶇О" >
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="2" label="绫诲瀷" >
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="3" label="鏁呴殰鏃ユ湡" :show-overflow-tooltip='true' >
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="4" label="鏁呴殰鍘熷洜" :show-overflow-tooltip='true' >
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="5" label="淇濆吇鏃ユ湡" >
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="6" label="淇濆吇璇存槑" >
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="7" label="缁翠慨/淇濆吇寮�濮嬫椂闂�" width="150px">
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="8" label="缁翠慨/淇濆吇瀹屾垚鏃堕棿" width="150px" >
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="9" label="鎵�鍦ㄥ伐鑹�" >
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="10" label="缁翠慨/淇濆吇浜哄憳" :show-overflow-tooltip='true'>
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="11" label="璐圭敤" >
- <el-input></el-input>
- </el-table-column>
- </el-table><!-- <h1>{{msg}}</h1> -->
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <template #button_slot="{ row }">
+ <el-button @click="dialogFormVisible = true" 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>
-#selectForm {
-
+.main-div-customer{
+ width: 99%;
height: 100%;
- text-align: center;
}
-
-
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/machine/MaintenanceAndRepair.vue b/north-glass-erp/northglass-erp/src/views/pp/machine/MaintenanceAndRepair.vue
index 8085b0b..cb80956 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/machine/MaintenanceAndRepair.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/machine/MaintenanceAndRepair.vue
@@ -1,62 +1,143 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
-import {Search} from "@element-plus/icons-vue"
-import {useRouter} from "vue-router"
-const router = useRouter()
-// do not use same name with ref
-const value = ref('')
-const options = [
- {
- value: 'Option1',
- label: 'Option1',
- },
- {
- value: 'Option2',
- label: 'Option2',
- },
- {
- value: 'Option3',
- label: 'Option3',
- },
-]
+<script setup>
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
-const tableData = [
- {
- 1: '閽㈠寲鐐�(22E)',
- 2: '缁翠慨',
- 3: '2022-03-16',
- 4: '鍧忎簡',
- 5:'',
- 6:'',
- 7:'2022-03-16',
- 8:'2022-03-16',
- 9:'閽㈠寲',
- 10:'SSS',
- 11:'112',
+//瀛愮粍浠舵帴鏀跺弬鏁�
+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
},
- {
- 1: '閽㈠寲鐐�(22E)',
- 2: '淇濆吇',
- 3: '',
- 4: '',
- 5:'2022-03-16',
- 6:'淇濆吇',
- 7:'2022-03-16',
- 8:'2022-03-16',
- 9:'閽㈠寲',
- 10:'SSS',
- 11:'112',
-
+ 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 },
+ {title: '鎿嶄綔', width: 140, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'deviceName', width: 130,title: '璁惧鍚嶇О', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'types',width: 120, title: '绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'faultDate', width: 100,title: '鏁呴殰鏃ユ湡', sortable: true,showOverflow:"ellipsis"},
+ {field: 'failureCause', width: 100,title: '鏁呴殰鍘熷洜', sortable: true},
+ {field: 'maintenanceDate',width: 100, title: '淇濆吇鏃ユ湡', sortable: true},
+ {field: 'maintenanceInstructions',width: 120, title: '淇濆吇璇存槑', sortable: true,showOverflow:"ellipsis"},
+ {field: 'RepairMaintenanceStartTime', width: 160,title: '缁翠慨/淇濆吇寮�濮嬫椂闂�', sortable: true},
+ {field: 'RepairMaintenanceEndTime',width: 160, title: '缁翠慨/淇濆吇缁撴潫鏃堕棿', sortable: true},
+ {field: 'process',width: 120, title: '鎵�鍦ㄥ伐鑹�', sortable: true},
+ {field: 'RepairMaintenancePersonnel',width: 150, title: '缁翠慨/淇濆吇浜哄憳', sortable: true},
+ {field: 'cost',width: 120, title: '璐圭敤', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ deviceName: '閽㈠寲鐐�(22E)',
+ types: '缁翠慨',
+ faultDate: '2022-03-16',
+ failureCause: '鍧忎簡',
+ maintenanceDate:'',
+ maintenanceInstructions:'',
+ RepairMaintenanceStartTime:'2022-03-16',
+ RepairMaintenanceEndTime:'2022-03-16',
+ process:'閽㈠寲',
+ RepairMaintenancePersonnel:'SSS',
+ cost:'112',
+ },
+ {
+ deviceName: '閽㈠寲鐐�(22E)',
+ types: '淇濆吇',
+ faultDate: '',
+ failureCause: '',
+ maintenanceDate:'2022-03-16',
+ maintenanceInstructions:'淇濆吇',
+ RepairMaintenanceStartTime:'2022-03-16',
+ RepairMaintenanceEndTime:'2022-03-16',
+ process:'閽㈠寲',
+ RepairMaintenancePersonnel:'SSS',
+ cost:'112',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['maintenanceFrequency','MaintenancesFrequency']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
const size = ref<'default' | 'large' | 'small'>('default')
const value1 = ref('')
const dialogFormVisible = ref(false)
-const formLabelWidth = '130px'
+const formLabelWidth = '140px'
const form = reactive({
name: '',
@@ -68,44 +149,46 @@
resource: '',
desc: '',
})
+
</script>
<template>
- <div>
-<!-- <div id="selectForm">-->
-<!-- <el-row :gutter="0">-->
-<!-- <el-select v-model="value" class="m-2" placeholder="鎵�鍦ㄥ伐鑹�">-->
-<!-- <el-option-->
-<!-- v-for="item in options"-->
-<!-- :key="item.value"-->
-<!-- :label="item.label"-->
-<!-- :value="item.value"-->
-<!-- />-->
-<!-- </el-select>-->
-<!-- -->
-<!-- <el-button type="primary">鏌ヨ</el-button>-->
-<!-- </el-row>-->
+ <div class="main-div-customer">
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
-<!-- </div>-->
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column fixed label="鎿嶄綔" width="100" >
- <el-button link type="primary" size="small" @click="dialogFormVisible = true">缂栬緫</el-button>
- <el-button link type="primary" size="small">鍒犻櫎</el-button>
+ >
+ <!-- @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>
- </el-table-column>
- <el-table-column prop="1" label="璁惧鍚嶇О" width="105" />
- <el-table-column prop="2" label="绫诲瀷" width="65" />
- <el-table-column prop="3" label="鏁呴殰鏃ユ湡" :show-overflow-tooltip='true' width="105" />
- <el-table-column prop="4" label="鏁呴殰鍘熷洜" :show-overflow-tooltip='true' width="135" />
- <el-table-column prop="5" label="淇濆吇鏃ユ湡" width="125" />
- <el-table-column prop="6" label="淇濆吇璇存槑" width="125" />
- <el-table-column prop="7" label="缁翠慨/淇濆吇寮�濮嬫椂闂�" width="155" />
- <el-table-column prop="8" label="缁翠慨/淇濆吇瀹屾垚鏃堕棿" width="150" />
- <el-table-column prop="9" label="鎵�鍦ㄥ伐鑹�" width="85" />
- <el-table-column prop="10" label="缁翠慨/淇濆吇浜哄憳" :show-overflow-tooltip='true' width="125" />
- <el-table-column prop="11" label="璐圭敤" width="112" />
- </el-table><!-- <h1>{{msg}}</h1> -->
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <template #button_slot="{ row }">
+ <el-button @click="dialogFormVisible = true" 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>
<el-dialog v-model="dialogFormVisible" title="淇濆吇涓庣淮淇紪杈�">
@@ -212,11 +295,8 @@
</template>
<style scoped>
-#selectForm {
- width: 40%;
+.main-div-customer{
+ width: 99%;
height: 100%;
- text-align: center;
}
-
-
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/machine/SelectMachine.vue b/north-glass-erp/northglass-erp/src/views/pp/machine/SelectMachine.vue
index 6aa085e..d289b45 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/machine/SelectMachine.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/machine/SelectMachine.vue
@@ -1,83 +1,170 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
-import {Search} from "@element-plus/icons-vue"
-import {useRouter} from "vue-router"
-const router = useRouter()
-// do not use same name with ref
-const value = ref('')
-const options = [
- {
- value: 'Option1',
- label: 'Option1',
- },
- {
- value: 'Option2',
- label: 'Option2',
- },
- {
- value: 'Option3',
- label: 'Option3',
- },
-]
+<script setup>
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
-const tableData = [
- {
- 1: 'SB2209211',
- 2: '閽㈠寲鐐�(22E)',
- 3: '閽㈠寲鐐�(22E)',
- 4: '2022-03-16',
- 5:'2022-03-16',
- 6:'313',
- 7:'浣跨敤涓�',
- 8:'0',
- 9:'0',
- 10:'',
- 11:'',
- 12:'',
- 13:'',
- 14:'閽㈠寲',
- 15:'姝e父',
+//瀛愮粍浠舵帴鏀跺弬鏁�
+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
},
- {
- 1: 'SB2209211',
- 2: '閽㈠寲鐐�(22E)',
- 3: '閽㈠寲鐐�(22E)',
- 4: '2022-03-16',
- 5:'2022-03-16',
- 6:'313',
- 7:'浣跨敤涓�',
- 8:'0',
- 9:'0',
- 10:'',
- 11:'',
- 12:'',
- 13:'',
- 14:'閽㈠寲',
- 15:'姝e父',
-
+ filterConfig: { //绛涢�夐厤缃」
+ remote: true
},
- {
- 1: 'SB2209211',
- 2: '閽㈠寲鐐�(22E)',
- 3: '閽㈠寲鐐�(22E)',
- 4: '2022-03-16',
- 5:'2022-03-16',
- 6:'313',
- 7:'浣跨敤涓�',
- 8:'0',
- 9:'0',
- 10:'',
- 11:'',
- 12:'',
- 13:'',
- 14:'閽㈠寲',
- 15:'姝e父',
-
+ 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 },
+ {title: '鎿嶄綔', width: 140, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'equipmentNumber', width: 120, title: '璁惧缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'standardName',width: 120, title: '鏍囧噯鍚嶇О', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'deviceName', width: 130,title: '璁惧鍚嶇О', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'buyingTime',width: 120, title: '璐拱鏃堕棿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'installationTime', width: 100,title: '瀹夎鏃堕棿', sortable: true,showOverflow:"ellipsis"},
+ {field: 'usageCycle', width: 100,title: '浣跨敤鍛ㄦ湡(骞�)', sortable: true},
+ {field: 'onState',width: 100, title: '浣跨敤鐘舵��', sortable: true},
+ {field: 'maintenanceFrequency',width: 120, title: '缁翠慨娆℃暟', sortable: true,showOverflow:"ellipsis"},
+ {field: 'MaintenancesFrequency', width: 120,title: '淇濆吇娆℃暟', sortable: true},
+ {field: 'finalRepairTime',width: 120, title: '鏈�鍚庣淮淇椂闂�', sortable: true},
+ {field: 'finalMaintenanceTime',width: 120, title: '鏈�鍚庝繚鍏绘椂闂�', sortable: true},
+ {field: 'maintenanceCosts',width: 120, title: '缁翠慨璐圭敤', sortable: true},
+ {field: 'maintenancesCosts',width: 120, title: '淇濆吇璐圭敤', sortable: true},
+ {field: 'process',width: 120, title: '鎵�鍦ㄥ伐鑹�', sortable: true},
+ {field: 'cancel',width: 120, title: '浣滃簾鐘舵��', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ equipmentNumber: 'SB2209211',
+ standardName: '閽㈠寲鐐�(22E)',
+ deviceName: '閽㈠寲鐐�(22E)',
+ buyingTime: '2022-03-16',
+ installationTime:'2022-03-16',
+ usageCycle:'313',
+ onState:'浣跨敤涓�',
+ maintenanceFrequency:'0',
+ MaintenancesFrequency:'0',
+ finalRepairTime:'',
+ finalMaintenanceTime:'',
+ maintenanceCosts:'',
+ maintenancesCosts:'',
+ process:'閽㈠寲',
+ cancel:'姝e父',
+
+ },
+ {
+ equipmentNumber: 'SB2209211',
+ standardName: '閽㈠寲鐐�(22E)',
+ deviceName: '閽㈠寲鐐�(22E)',
+ buyingTime: '2022-03-16',
+ installationTime:'2022-03-16',
+ usageCycle:'313',
+ onState:'浣跨敤涓�',
+ maintenanceFrequency:'0',
+ MaintenancesFrequency:'0',
+ finalRepairTime:'',
+ finalMaintenanceTime:'',
+ maintenanceCosts:'',
+ maintenancesCosts:'',
+ process:'閽㈠寲',
+ cancel:'姝e父',
+
+ },
+ {
+ equipmentNumber: 'SB2209211',
+ standardName: '閽㈠寲鐐�(22E)',
+ deviceName: '閽㈠寲鐐�(22E)',
+ buyingTime: '2022-03-16',
+ installationTime:'2022-03-16',
+ usageCycle:'313',
+ onState:'浣跨敤涓�',
+ maintenanceFrequency:'0',
+ MaintenancesFrequency:'0',
+ finalRepairTime:'',
+ finalMaintenanceTime:'',
+ maintenanceCosts:'',
+ maintenancesCosts:'',
+ process:'閽㈠寲',
+ cancel:'姝e父',
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['maintenanceFrequency','MaintenancesFrequency']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
const size = ref<'default' | 'large' | 'small'>('default')
const value1 = ref('')
@@ -94,47 +181,46 @@
resource: '',
desc: '',
})
+
</script>
<template>
- <div>
-<!-- <div id="selectForm">-->
-<!-- <el-row :gutter="0">-->
-<!-- <el-select v-model="value" class="m-2" placeholder="鎵�鍦ㄥ伐鑹�">-->
-<!-- <el-option-->
-<!-- v-for="item in options"-->
-<!-- :key="item.value"-->
-<!-- :label="item.label"-->
-<!-- :value="item.value"-->
-<!-- />-->
-<!-- </el-select>-->
-<!-- -->
-<!-- <el-button type="primary">鏌ヨ</el-button>-->
-<!-- </el-row>-->
+ <div class="main-div-customer">
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
-<!-- </div>-->
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column fixed label="鎿嶄綔" width="100" >
- <el-button link type="primary" size="small" @click="dialogFormVisible = true">缂栬緫</el-button>
- <el-button link type="primary" size="small">鍒犻櫎</el-button>
+ >
+ <!-- @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>
- </el-table-column>
- <el-table-column prop="1" label="璁惧缂栧彿" width="95" />
- <el-table-column prop="2" label="鏍囧噯鍚嶇О" width="105" />
- <el-table-column prop="3" label="璁惧鍚嶇О" width="105" />
- <el-table-column prop="4" label="璐拱鏃堕棿" :show-overflow-tooltip='true' width="115" />
- <el-table-column prop="5" label="瀹夎鏃堕棿" :show-overflow-tooltip='true' width="115" />
- <el-table-column prop="6" label="浣跨敤鍛ㄦ湡(骞�)" width="105" />
- <el-table-column prop="7" label="浣跨敤鐘舵��" width="85" />
- <el-table-column prop="8" label="缁翠慨娆℃暟" width="85" />
- <el-table-column prop="9" label="淇濆吇娆℃暟" width="85" />
- <el-table-column prop="10" label="鏈�鍚庣淮淇椂闂�" :show-overflow-tooltip='true' width="115" />
- <el-table-column prop="11" label="鏈�鍚庝繚鍏绘椂闂�" width="115" />
- <el-table-column prop="12" label="缁翠慨璐圭敤" width="105" />
- <el-table-column prop="13" label="淇濆吇璐圭敤" width="85" />
- <el-table-column prop="14" label="鎵�鍦ㄥ伐鑹�" width="85" />
- <el-table-column prop="15" label="浣滃簾鐘舵��" width="85" />
- </el-table><!-- <h1>{{msg}}</h1> -->
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <template #button_slot="{ row }">
+ <el-button @click="dialogFormVisible = true" 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>
<el-dialog v-model="dialogFormVisible" title="璁惧缂栬緫">
<el-form :model="form">
@@ -184,11 +270,8 @@
</template>
<style scoped>
-#selectForm {
- width: 40%;
+.main-div-customer{
+ width: 99%;
height: 100%;
- text-align: center;
}
-
-
</style>
\ No newline at end of file
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 29a728a..57419a8 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,156 +1,249 @@
<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 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: '',
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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
},
- {
- 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: '',
+ filterConfig: { //绛涢�夐厤缃」
+ remote: true
},
- {
- 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: '',
+ customConfig: {
+ storage: true
},
- {
- salesOrderNo: 'NG231201',
- productionOrderNo:'NG231201A',
- processCard: 'NG231201A02',
- customerName:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃',
- entryName:'閾堕殕骞垮満',
- sliceMarking:'(鍐�)',
- marking:'2',
- pieces:'6',
- area:'24.14',
+ editConfig: {
+ trigger: 'click',
+ mode: 'row',
+ showStatus: true
+ },//琛ㄥご鍙傛暟
+ columns:[
+ {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
+ { type: 'seq',fixed:"left", title: '鑷簭', width: 50 },
+ // {title: '鎿嶄綔', width: 140, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'salesOrderNo',width: 120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'productionOrderNo',width: 120, title: '娴佺▼鍗″彿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'customerName',width: 120, title: '瀹㈡埛鍚嶇О', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'entryName',width: 120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'sliceMarking',width: 90, title: '鐗囨爣璁�', sortable: true,showOverflow:"ellipsis"},
+ {field: 'marking',width: 80, title: '鏍囪', sortable: true},
+ {field: 'pieces',width: 80, title: '鐗囨暟', sortable: true},
+ {field: 'area',width: 80, title: '闈㈢Н', sortable: true,showOverflow:"ellipsis"},
+ {field: 'productName',width: 120, title: '浜у搧鍚嶇О', sortable: true},
+ {field: 'floorNumber',width: 120, title: '妤煎眰缂栧彿', sortable: true},
+ {field: 'divider', width: 120,title: '鍒嗘灦鍛�', sortable: true},
+ {field: 'splittingTime',width: 120, title: '鍒嗘灦鏃堕棿', sortable: true},
+ {field: 'notes',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: [
+ {
+ salesOrderNo: 'NG231201',
+ productionOrderNo:'NG231201A',
+ processCard: 'NG231201A01',
+ customerName:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃',
+ entryName:'閾堕殕骞垮満',
+ sliceMarking:'(澶�)',
+ marking:'1',
+ pieces:'16',
+ area:'24.14',
productName: '10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
- singlePieceName: '10mm瓒呯櫧骞抽挗(鍐�)',
- floorNumber: '16-BSGB05',
- divider: '鏅舰',
- splittingTime: '2023-01-11',
- notes: '',
- },
- function openNewWindow() {
- window.open('/main/processCard/PrintProcess');
+ 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: '',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['pieces','area']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
}
-]
+
+})
+
+
+
</script>
<template>
- <div>
- <div class="header">
+ <div class="main-div-customer">
- <a href="/main/processCard/PrintProcess" target="_blank">鎵撳紑鏂版爣绛�</a>
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
- <el-button type="primary">鎵撳嵃娴佺▼鍗�</el-button>
- <el-button type="primary">鎵撳嵃鏍囩</el-button>
-
- <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> -->
+ >
+ <!-- @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;
@@ -159,7 +252,4 @@
border: none;
border-radius: 5px;
}
-
-
-
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/ReShelving.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/ReShelving.vue
index 2879136..3be6b4e 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/ReShelving.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/ReShelving.vue
@@ -1,88 +1,203 @@
-<script lang="ts" setup>
-import { reactive } from 'vue'
+<script setup>
-// do not use same name with ref
+import {reactive} from "vue";
+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
+ }
+ }
+}
+
const form = reactive({
- name: '',
- region: '',
- date1: '',
- date2: '',
- delivery: false,
- type: [],
- resource: '',
- desc: '',
+ xsdh: 'NG231207'
})
-const tableData = [
- {
- salesOrderNo: 'NG231207',
- processCard:'NG231207A01',
- serialNumber:"1",
- number: '11',
- technologicalProcess: '鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰,鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰',
- },
- {
- salesOrderNo: 'NG231207',
- processCard:'NG231207A01',
- serialNumber:"2",
- number: '11',
- technologicalProcess: '鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰,鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰',
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
- },
- {
- salesOrderNo: 'NG231207',
- processCard:'NG231207A01',
- serialNumber:"3",
- number: '11',
- technologicalProcess: '鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰,鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰',
+//瀛愮粍浠舵帴鏀跺弬鏁�
+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
},
- {
- salesOrderNo: 'NG231207',
- processCard:'NG231207A02',
- serialNumber:"4",
- number: '11',
- technologicalProcess: '鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰,鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰',
+ filterConfig: { //绛涢�夐厤缃」
+ remote: true
+ },
+ customConfig: {
+ storage: true
+ },
+ editConfig: {
+ trigger: 'click',
+ mode: 'row',
+ showStatus: true
+ },//琛ㄥご鍙傛暟
+ columns:[
+ {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
+ { type: 'checkbox',fixed:"left", title: '閫夋嫨', width: 80 },
+ { type: 'seq',fixed:"left", title: '鑷簭', width: 50 },
+ {field: 'salesOrderNo', title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'processCard', title: '娴佺▼鍗″彿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'serialNumber', title: '搴忓彿', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'number', title: '鏁伴噺',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'technologicalProcess', title: '宸ヨ壓娴佺▼', sortable: true,showOverflow:"ellipsis"},
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [
+ {code: 'print_lck', name: '閲嶆柊鍒嗘灦',status:'primary' ,icon:'vxe-icon-save'},
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
},
- {
- salesOrderNo: 'NG231207',
- processCard:'NG231207A02',
- serialNumber:"5",
- number: '11',
- technologicalProcess: '鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰,鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰',
+ data: [
+ {
+ salesOrderNo: 'NG231207',
+ processCard:'NG231207A01',
+ serialNumber:"1",
+ number: '11',
+ technologicalProcess: '鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰,鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰',
- },
-]
+ },
+ {
+ salesOrderNo: 'NG231207',
+ processCard:'NG231207A01',
+ serialNumber:"2",
+ number: '11',
+ technologicalProcess: '鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰,鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰',
+
+ },
+ {
+ salesOrderNo: 'NG231207',
+ processCard:'NG231207A01',
+ serialNumber:"3",
+ number: '11',
+ technologicalProcess: '鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰,鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰',
+
+ },
+ {
+ salesOrderNo: 'NG231207',
+ processCard:'NG231207A02',
+ serialNumber:"4",
+ number: '11',
+ technologicalProcess: '鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰,鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰',
+
+ },
+ {
+ salesOrderNo: 'NG231207',
+ processCard:'NG231207A02',
+ serialNumber:"5",
+ number: '11',
+ technologicalProcess: '鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰,鍒囧壊->纾ㄨ竟->閽㈠寲->涓┖->鍖呰',
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['number']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
+
+
</script>
<template>
- <div>
- <div id="selectForm">
- <el-row :gutter="0">
- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 200px"/>
-
- <el-button type="primary">鏌ヨ</el-button>
- <el-button type="primary">閲嶆柊鍒嗘灦</el-button>
- </el-row>
+ <div class="main-div-customer">
+ <el-row :gutter="0">
+ <el-input placeholder="閿�鍞崟鍙�" v-model="form.xsdh" style="width: 200px"/>
+
+ <el-button type="primary">鏌ヨ</el-button>
+ </el-row>
+ <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>
- </div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column type="selection" width="55" />
- <el-table-column label="閿�鍞崟鍙�" width="100">
- <template #default="scope">{{ scope.row.salesOrderNo }}</template>
- </el-table-column>
- <el-table-column prop="processCard" label="娴佺▼鍗″彿" :show-overflow-tooltip='true' width="130" />
- <el-table-column prop="serialNumber" label="搴忓彿" width="60" />
- <el-table-column prop="number" label="鏁伴噺" width="80" />
- <el-table-column prop="technologicalProcess" :show-overflow-tooltip='true' label="宸ヨ壓娴佺▼" />
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ </vxe-grid>
</div>
</template>
<style scoped>
-
+.main-div-customer{
+ width: 99%;
+ height: 100%;
+}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectAddProcess.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectAddProcess.vue
index 11afacb..2f4321c 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectAddProcess.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectAddProcess.vue
@@ -1,148 +1,249 @@
-<script lang="ts" setup>
-import { reactive } from 'vue'
+<script setup>
-// do not use same name with ref
-const form = reactive({
- name: '',
- region: '',
- date1: '',
- date2: '',
- delivery: false,
- type: [],
- resource: '',
- desc: '',
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/processCard/SplittingDetails', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鎺掔増鐘舵��')
+ break
+ }
+ }
+}
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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 },
+ {title: '鎿嶄綔', width: 80, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'salesOrderNo', title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'customerName', title: '瀹㈡埛鍚嶇О', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'entryName', title: '椤圭洰鍚嶇О', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'batch', title: '鎵规',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'originalFilmRequired', title: '鍘熺墖瑕佹眰', sortable: true,showOverflow:"ellipsis"},
+ {field: 'trademark', title: '鍟嗘爣閫夐」', sortable: true},
+ {field: 'salesman', title: '涓氬姟鍛�', sortable: true},
+ {field: 'processRequirements', title: '鍔犲伐瑕佹眰', sortable: true,showOverflow:"ellipsis"},
+ {field: 'shipTo', title: '閫佽揣鍦板潃', sortable: true},
+ {field: 'deliveryDate', title: '浜よ揣鏃ユ湡', sortable: true}
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ salesOrderNo: 'NG231201',
+ customerName:"鎱曞鍏徃",
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '23鎵�',
+ originalFilmRequired: '2022/5/24XFPO202205202',
+ trademark:'鍖楃幓鍟嗘爣',
+ orderType: '鏅�氳鍗�',
+ salesman: 'XXX',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ shipTo:'宸ュ湴',
+ deliveryDate:'2024-01-12'
+ },
+ {
+ salesOrderNo: 'NG231202',
+ customerName:"澶ц崚寤烘潗鏈夐檺鍏徃",
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '23鎵�',
+ originalFilmRequired: '2022/5/24XFPO202205202',
+ trademark:'鍖楃幓鍟嗘爣',
+ orderType: '鏅�氳鍗�',
+ salesman: 'XXX',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ shipTo:'宸ュ湴',
+ deliveryDate:'2024-01-12'
+ },
+ {
+ salesOrderNo: 'NG231203',
+ customerName:"寤虹瓚宸ョ▼闆嗗洟鏈夐檺鍏徃",
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '23鎵�',
+ originalFilmRequired: '2022/5/24XFPO202205202',
+ trademark:'鍖楃幓鍟嗘爣',
+ orderType: '鏅�氳鍗�',
+ salesman: 'XXX',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ shipTo:'宸ュ湴',
+ deliveryDate:'2024-01-12'
+ },
+ {
+ salesOrderNo: 'NG231204',
+ customerName:"鎱曞鍏徃",
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '23鎵�',
+ originalFilmRequired: '2022/5/24XFPO202205202',
+ trademark:'鍖楃幓鍟嗘爣',
+ orderType: '鏅�氳鍗�',
+ salesman: 'XXX',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ shipTo:'宸ュ湴',
+ deliveryDate:'2024-01-12'
+ },
+ {
+ salesOrderNo: 'NG231205',
+ customerName:"鎱曞鍏徃",
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '23鎵�',
+ originalFilmRequired: '2022/5/24XFPO202205202',
+ trademark:'鍖楃幓鍟嗘爣',
+ orderType: '鏅�氳鍗�',
+ salesman: 'XXX',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ shipTo:'宸ュ湴',
+ deliveryDate:'2024-01-12'
+ },
+ {
+ salesOrderNo: 'NG231206',
+ customerName:"鎱曞鍏徃",
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '23鎵�',
+ originalFilmRequired: '2022/5/24XFPO202205202',
+ trademark:'鍖楃幓鍟嗘爣',
+ orderType: '鏅�氳鍗�',
+ salesman: 'XXX',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ shipTo:'宸ュ湴',
+ deliveryDate:'2024-01-12'
+ },
+ {
+ salesOrderNo: 'NG231207',
+ customerName:"鎱曞鍏徃",
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '23鎵�',
+ originalFilmRequired: '2022/5/24XFPO202205202',
+ trademark:'鍖楃幓鍟嗘爣',
+ orderType: '鏅�氳鍗�',
+ salesman: 'XXX',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ shipTo:'宸ュ湴',
+ deliveryDate:'2024-01-12'
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['total','TotalArea','Cases']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ // if (footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
+ }
+
})
-const tableData = [
- {
- salesOrderNo: 'NG231201',
- customerName:"鎱曞鍏徃",
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '23鎵�',
- originalFilmRequired: '2022/5/24XFPO202205202',
- trademark:'鍖楃幓鍟嗘爣',
- orderType: '鏅�氳鍗�',
- salesman: 'XXX',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- shipTo:'宸ュ湴',
- deliveryDate:'2024-01-12'
- },
- {
- salesOrderNo: 'NG231202',
- customerName:"澶ц崚寤烘潗鏈夐檺鍏徃",
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '23鎵�',
- originalFilmRequired: '2022/5/24XFPO202205202',
- trademark:'鍖楃幓鍟嗘爣',
- orderType: '鏅�氳鍗�',
- salesman: 'XXX',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- shipTo:'宸ュ湴',
- deliveryDate:'2024-01-12'
- },
- {
- salesOrderNo: 'NG231203',
- customerName:"寤虹瓚宸ョ▼闆嗗洟鏈夐檺鍏徃",
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '23鎵�',
- originalFilmRequired: '2022/5/24XFPO202205202',
- trademark:'鍖楃幓鍟嗘爣',
- orderType: '鏅�氳鍗�',
- salesman: 'XXX',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- shipTo:'宸ュ湴',
- deliveryDate:'2024-01-12'
- },
- {
- salesOrderNo: 'NG231204',
- customerName:"鎱曞鍏徃",
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '23鎵�',
- originalFilmRequired: '2022/5/24XFPO202205202',
- trademark:'鍖楃幓鍟嗘爣',
- orderType: '鏅�氳鍗�',
- salesman: 'XXX',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- shipTo:'宸ュ湴',
- deliveryDate:'2024-01-12'
- },
- {
- salesOrderNo: 'NG231205',
- customerName:"鎱曞鍏徃",
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '23鎵�',
- originalFilmRequired: '2022/5/24XFPO202205202',
- trademark:'鍖楃幓鍟嗘爣',
- orderType: '鏅�氳鍗�',
- salesman: 'XXX',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- shipTo:'宸ュ湴',
- deliveryDate:'2024-01-12'
- },
- {
- salesOrderNo: 'NG231206',
- customerName:"鎱曞鍏徃",
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '23鎵�',
- originalFilmRequired: '2022/5/24XFPO202205202',
- trademark:'鍖楃幓鍟嗘爣',
- orderType: '鏅�氳鍗�',
- salesman: 'XXX',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- shipTo:'宸ュ湴',
- deliveryDate:'2024-01-12'
- },
- {
- salesOrderNo: 'NG231207',
- customerName:"鎱曞鍏徃",
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '23鎵�',
- originalFilmRequired: '2022/5/24XFPO202205202',
- trademark:'鍖楃幓鍟嗘爣',
- orderType: '鏅�氳鍗�',
- salesman: 'XXX',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- shipTo:'宸ュ湴',
- deliveryDate:'2024-01-12'
- },
-]
+
+
</script>
<template>
- <div>
-<!-- <div id="selectForm">-->
-<!-- <el-row :gutter="0">-->
-<!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 200px"/>-->
+ <div class="main-div-customer">
+ <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>
+ </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>
-<!-- -->
-<!-- <el-button type="primary">鏌ヨ</el-button>-->
-<!-- </el-row>-->
-
-
-<!-- </div>-->
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column sortable prop="salesOrderNo" label="閿�鍞崟鍙�" width="110" >
- <template v-slot="scope">
- <router-link :to="{path:'SplittingDetails'}" >{{scope.row.salesOrderNo}}</router-link>
- </template>
- </el-table-column>
- <el-table-column prop="customerName" label="瀹㈡埛鍚嶇О" :show-overflow-tooltip='true' width="110" />
- <el-table-column prop="entryName" label="椤圭洰鍚嶇О" width="135" />
- <el-table-column prop="batch" label="鎵规" width="80" />
- <el-table-column prop="originalFilmRequired" :show-overflow-tooltip='true' label="鍘熺墖瑕佹眰" width="200" />
- <el-table-column prop="trademark" label="鍟嗘爣閫夐」" width="100" />
- <el-table-column prop="orderType" label="璁㈠崟绫诲瀷" width="100" />
- <el-table-column prop="salesman" label="涓氬姟鍛�" width="75" />
- <el-table-column prop="processRequirements" :show-overflow-tooltip='true' label="鍔犲伐瑕佹眰" width="400" />
- <el-table-column prop="shipTo" label="閫佽揣鍦板潃" width="100" />
- <el-table-column prop="deliveryDate" label="浜よ揣鏃ユ湡" width="100" />
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ </vxe-grid>
</div>
</template>
<style scoped>
-
+.main-div-customer{
+ width: 99%;
+ height: 100%;
+}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
index b2033b5..290b620 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
@@ -1,13 +1,207 @@
-<script lang="ts" setup>
-import { reactive } from 'vue'
-import { ref } from 'vue'
-import {useRouter} from "vue-router";
-const value = ref('')
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
+<script setup>
+
+import {reactive} from "vue";
+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
+ }
+ }
+}
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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 },
+ {title: '鎿嶄綔', width: 140, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'salesOrderNo', title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'productionOrderNo', title: '娴佺▼鍗″彿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'productID', title: '浜у搧缂栧彿', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'productName', title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'entryName', title: '椤圭洰鍚嶇О', sortable: true,showOverflow:"ellipsis"},
+ {field: 'total', title: '鎬绘暟閲�', sortable: true},
+ {field: 'TotalArea', title: '鎬婚潰绉�', sortable: true},
+ {field: 'Cases', title: '鍒嗙', sortable: true,showOverflow:"ellipsis"},
+ {field: 'divider', title: '鍒嗘灦鍛�', sortable: true},
+ {field: 'processRequirements', title: '鍔犲伐瑕佹眰', sortable: true}
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ salesOrderNo: 'NG231201',
+ productionOrderNo: 'NG231201A',
+ productID: '9001010203000008',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ entryName: '淇″悎鏄ュぉ閲�',
+ total: '169',
+ TotalArea: '175.31',
+ Cases: '3',
+ divider: 'xxx',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ salesOrderNo: 'NG231201',
+ productionOrderNo: 'NG231201B',
+ productID: '9001010203000008',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ entryName: '淇″悎鏄ュぉ閲�',
+ total: '169',
+ TotalArea: '175.31',
+ Cases: '3',
+ divider: 'xxx',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ salesOrderNo: 'NG231202',
+ productionOrderNo: 'NG231202A',
+ productID: '9001010203000008',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ entryName: '淇″悎鏄ュぉ閲�',
+ total: '169',
+ TotalArea: '175.31',
+ Cases: '3',
+ divider: 'xxx',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ salesOrderNo: 'NG231203',
+ productionOrderNo: 'NG231203A',
+ productID: '9001010203000008',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ entryName: '淇″悎鏄ュぉ閲�',
+ total: '169',
+ TotalArea: '175.31',
+ Cases: '3',
+ divider: 'xxx',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ salesOrderNo: 'NG231204',
+ productionOrderNo: 'NG231204A',
+ productID: '9001010203000008',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ entryName: '淇″悎鏄ュぉ閲�',
+ total: '169',
+ TotalArea: '175.31',
+ Cases: '3',
+ divider: 'xxx',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ salesOrderNo: 'NG231205',
+ productionOrderNo: 'NG231205A',
+ productID: '9001010203000008',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ entryName: '淇″悎鏄ュぉ閲�',
+ total: '169',
+ TotalArea: '175.31',
+ Cases: '3',
+ divider: 'xxx',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ salesOrderNo: 'NG231206',
+ productionOrderNo: 'NG231206A',
+ productID: '9001010203000008',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ entryName: '淇″悎鏄ュぉ閲�',
+ total: '169',
+ TotalArea: '175.31',
+ Cases: '3',
+ divider: 'xxx',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ salesOrderNo: 'NG231207',
+ productionOrderNo: 'NG231207A',
+ productID: '9001010203000008',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ entryName: '淇″悎鏄ュぉ閲�',
+ total: '169',
+ TotalArea: '175.31',
+ Cases: '3',
+ divider: 'xxx',
+ processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['total','TotalArea','Cases']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
const form = reactive({
name: '',
region: '',
@@ -18,168 +212,71 @@
resource: '',
desc: '',
})
-const router = useRouter()
-function goToPage() {
- router.push('/main/processCard/PrintFlowCard')
-}
-const tableData = [
- {
- salesOrderNo: 'NG231201',
- productionOrderNo: 'NG231201A',
- productID: '9001010203000008',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- entryName: '淇″悎鏄ュぉ閲�',
- total: '169',
- TotalArea: '175.31',
- Cases: '3',
- divider: 'xxx',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- salesOrderNo: 'NG231201',
- productionOrderNo: 'NG231201B',
- productID: '9001010203000008',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- entryName: '淇″悎鏄ュぉ閲�',
- total: '169',
- TotalArea: '175.31',
- Cases: '3',
- divider: 'xxx',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- salesOrderNo: 'NG231202',
- productionOrderNo: 'NG231202A',
- productID: '9001010203000008',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- entryName: '淇″悎鏄ュぉ閲�',
- total: '169',
- TotalArea: '175.31',
- Cases: '3',
- divider: 'xxx',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- salesOrderNo: 'NG231203',
- productionOrderNo: 'NG231203A',
- productID: '9001010203000008',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- entryName: '淇″悎鏄ュぉ閲�',
- total: '169',
- TotalArea: '175.31',
- Cases: '3',
- divider: 'xxx',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- salesOrderNo: 'NG231204',
- productionOrderNo: 'NG231204A',
- productID: '9001010203000008',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- entryName: '淇″悎鏄ュぉ閲�',
- total: '169',
- TotalArea: '175.31',
- Cases: '3',
- divider: 'xxx',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- salesOrderNo: 'NG231205',
- productionOrderNo: 'NG231205A',
- productID: '9001010203000008',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- entryName: '淇″悎鏄ュぉ閲�',
- total: '169',
- TotalArea: '175.31',
- Cases: '3',
- divider: 'xxx',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- salesOrderNo: 'NG231206',
- productionOrderNo: 'NG231206A',
- productID: '9001010203000008',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- entryName: '淇″悎鏄ュぉ閲�',
- total: '169',
- TotalArea: '175.31',
- Cases: '3',
- divider: 'xxx',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- salesOrderNo: 'NG231207',
- productionOrderNo: 'NG231207A',
- productID: '9001010203000008',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- entryName: '淇″悎鏄ュぉ閲�',
- total: '169',
- TotalArea: '175.31',
- Cases: '3',
- divider: 'xxx',
- processRequirements: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
-]
+
</script>
<template>
- <div>
- <div id="selectForm" >
+ <div class="main-div-customer">
+ <div id="selectForm">
<el-row :gutter="0">
-<!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 200px"/>-->
-<!-- -->
-<!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 200px"/>-->
-
-<!-- -->
<el-date-picker
- v-model="value"
+ v-model="form.date1"
type="daterange"
start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
:default-time="defaultTime"
/>
- <el-button type="primary" style="width: 80px">鏌ヨ</el-button>
+ <el-button type="primary">鏌ヨ</el-button>
</el-row>
</div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column fixed label="鎿嶄綔" width="140" >
- <el-button link type="primary" size="small">鍒犻櫎</el-button>
- <el-button link type="primary" size="small">鎺掔増</el-button>
- <el-button link type="primary" size="small" @click="goToPage">鎵撳嵃</el-button>
- </el-table-column>
- <el-table-column sortable prop="salesOrderNo" label="閿�鍞崟鍙�" width="110" >
- <template v-slot="scope">
- <router-link :to="{path:'ProcessCardDetails'}" >{{scope.row.salesOrderNo}}</router-link>
- </template>
- </el-table-column>
- <el-table-column prop="productionOrderNo" label="鐢熶骇璁㈠崟鍙�" width="125" />
- <el-table-column prop="productID" label="浜у搧缂栧彿" width="155" />
- <el-table-column prop="productName" label="浜у搧鍚嶇О" :show-overflow-tooltip='true' width="180" />
- <el-table-column prop="entryName" label="椤圭洰鍚嶇О" width="155" />
- <el-table-column prop="total" label="鎬荤墖鏁�" width="75" />
- <el-table-column prop="TotalArea" label="鎬婚潰绉�" width="100" />
- <el-table-column prop="Cases" label="绠辨暟" width="100" />
- <el-table-column prop="divider" label="鍒嗘灦鍛�" width="70" />
- <el-table-column prop="processRequirements" 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>
-*{
- margin: 0;
- padding:0;
+.main-div-customer{
+ width: 99%;
+ height: 100%;
}
-
-a{
- color:#409eff;
-}
-
#selectForm {
width: 40%;
- height: 100%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/SplittingDetails.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/SplittingDetails.vue
index 244880a..222d3bf 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/SplittingDetails.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/SplittingDetails.vue
@@ -1,72 +1,182 @@
-<script lang="ts" setup>
-import { reactive } from 'vue'
-import {ArrowLeftBold} from "@element-plus/icons-vue";
-import {useRouter} from "vue-router";
+<script setup>
-// do not use same name with ref
-const form = reactive({
- name: '',
- region: '',
- date1: '',
- date2: '',
- delivery: false,
- type: [],
- resource: '',
- desc: '',
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/processCard/AddProcessCard', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鎺掔増鐘舵��')
+ break
+ }
+ }
+}
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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 },
+ {title: '鎿嶄綔', width: 80, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'salesOrderNo', title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'productionOrderNo', title: '娴佺▼鍗″彿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'productID', title: '浜у搧缂栧彿', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'productName', title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'total', title: '鎬绘暟閲�', sortable: true,showOverflow:"ellipsis"},
+ {field: 'TotalArea', title: '鎬婚潰绉�', sortable: true},
+ {field: 'perimeter', title: '鍛ㄩ暱', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ salesOrderNo: 'NG231201',
+ productionOrderNo: 'NG231201A',
+ productID: '9001010203000008',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ total: '169',
+ TotalArea: '175.31',
+ perimeter: '99.84',
+ },
+ {
+ salesOrderNo: 'NG231201',
+ productionOrderNo: 'NG231201B',
+ productID: '9001010208000018',
+ productName: '6mm鍙挗LOW-E-85骞抽挗(澶�)+12A(缁�)+6mm鐧界幓骞抽挗(鍐�)',
+ total: '169',
+ TotalArea: '175.31',
+ perimeter: '99.84',
+ },
+ {
+ salesOrderNo: 'NG231201',
+ productionOrderNo: 'NG231201C',
+ productID: '9001010203000021',
+ productName: '6mm瓒呯櫧UD60骞抽挗(澶�)+12A(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
+ total: '169',
+ TotalArea: '175.31',
+ perimeter: '99.84',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['total','TotalArea']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
-const router = useRouter()
-const tableData = [
- {
- salesOrderNo: 'NG231201',
- productionOrderNo: 'NG231201A',
- productID: '9001010203000008',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- total: '169',
- TotalArea: '175.31',
- perimeter: '99.84',
- },
- {
- salesOrderNo: 'NG231201',
- productionOrderNo: 'NG231201B',
- productID: '9001010208000018',
- productName: '6mm鍙挗LOW-E-85骞抽挗(澶�)+12A(缁�)+6mm鐧界幓骞抽挗(鍐�)',
- total: '169',
- TotalArea: '175.31',
- perimeter: '99.84',
- },
- {
- salesOrderNo: 'NG231201',
- productionOrderNo: 'NG231201C',
- productID: '9001010203000021',
- productName: '6mm瓒呯櫧UD60骞抽挗(澶�)+12A(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
- total: '169',
- TotalArea: '175.31',
- perimeter: '99.84',
- },
-]
+
+
</script>
<template>
- <div>
+ <div class="main-div-customer">
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column sortable prop="salesOrderNo" label="閿�鍞崟鍙�" width="110" >
- <template v-slot="scope">
- <router-link :to="{path:'AddProcessCard'}" >{{scope.row.salesOrderNo}}</router-link>
- </template>
- </el-table-column>
- <el-table-column prop="productionOrderNo" label="鐢熶骇璁㈠崟鍙�" width="125" />
- <el-table-column prop="productID" label="浜у搧缂栧彿" width="155" />
- <el-table-column prop="productName" label="浜у搧鍚嶇О" :show-overflow-tooltip='true' width="180" />
- <el-table-column prop="total" label="鎬绘暟閲�" width="75" />
- <el-table-column prop="TotalArea" label="鎬婚潰绉�" width="100" />
- <el-table-column prop="perimeter" label="鍛ㄩ暱" width="75" />
- </el-table><!-- <h1>{{msg}}</h1> -->
+ >
+ <!-- @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>
+
+ </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>
-
-
+.main-div-customer{
+ width: 99%;
+ height: 100%;
+}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue b/north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue
index 55fa961..00a38fc 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue
@@ -1,23 +1,175 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
+<script setup>
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
-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: '1', width: 120, title: '鎶ュ伐鏃堕棿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: '2',width: 120, title: '宸ュ簭', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '3', width: 130,title: '璐d换鐝粍', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '4',width: 120, title: '璐d换璁惧',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5', width: 100,title: '娆$牬鍘熷洜', sortable: true,showOverflow:"ellipsis"},
+ {field: '6', width: 100,title: '娆$牬鏁伴噺', sortable: true},
+ {field: '7',width: 100, title: '娆$牬闈㈢Н', sortable: true},
+ {field: '8',width: 120, title: '鎴愬搧鐜�', sortable: true,showOverflow:"ellipsis"},
+ {field: '9', width: 120,title: '椤圭洰鍚嶇О', sortable: true},
+ {field: '10', width: 120,title: '鎵规', sortable: true},
+ {field: '11',width: 120, title: '閿�鍞崟鍙�', sortable: true},
+ {field: '12',width: 120, title: '鍗曞搧鍚嶇О', sortable: true},
+ {field: '13',width: 120, title: '浜у湴', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 1:'2023-01-01',
+ 2:'閽㈠寲',
+ 3:'閽㈠寲涓�鐝�',
+ 4:'榛戦噾鍒�',
+ 5:'鏈哄櫒',
+ 6:'1 ',
+ 7:'3.14',
+ 8:'89',
+ 9:'濂斿悜骞曞',
+ 10:'涓�鎵�',
+ 11:'NG20010101',
+ 12:'6mm瓒呯櫧骞抽挗',
+ 13:'鍖楁柟',
+
+ },
+ {
+ 1:'2023-01-01',
+ 2:'閽㈠寲',
+ 3:'閽㈠寲涓�鐝�',
+ 4:'榛戦噾鍒�',
+ 5:'鏈哄櫒',
+ 6:'1 ',
+ 7:'3.14',
+ 8:'89',
+ 9:'濂斿悜骞曞',
+ 10:'涓�鎵�',
+ 11:'NG20010101',
+ 12:'6mm瓒呯櫧骞抽挗',
+ 13:'鍖楁柟',
+
+ },
+ {
+ 1:'2023-01-01',
+ 2:'閽㈠寲',
+ 3:'閽㈠寲涓�鐝�',
+ 4:'榛戦噾鍒�',
+ 5:'鏈哄櫒',
+ 6:'1 ',
+ 7:'3.14',
+ 8:'89',
+ 9:'濂斿悜骞曞',
+ 10:'涓�鎵�',
+ 11:'NG20010101',
+ 12:'6mm瓒呯櫧骞抽挗',
+ 13:'鍖楁柟',
+
+ },
+ {
+ 1:'2023-01-01',
+ 2:'閽㈠寲',
+ 3:'閽㈠寲涓�鐝�',
+ 4:'榛戦噾鍒�',
+ 5:'鏈哄櫒',
+ 6:'1 ',
+ 7:'3.14',
+ 8:'89',
+ 9:'濂斿悜骞曞',
+ 10:'涓�鎵�',
+ 11:'NG20010101',
+ 12:'6mm瓒呯櫧骞抽挗',
+ 13:'鍖楁柟',
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['6','7']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
const value = ref('')
@@ -35,38 +187,35 @@
label: 'Option3',
},
]
-const tableData = [
- {
- 1:'2023-01-01',
- 2:'閽㈠寲',
- 3:'閽㈠寲涓�鐝�',
- 4:'榛戦噾鍒�',
- 5:'鏈哄櫒',
- 6:'1 ',
- 7:'3.14',
- 8:'89',
- 9:'濂斿悜骞曞',
- 10:'涓�鎵�',
- 11:'NG20010101',
- 12:'6mm瓒呯櫧骞抽挗',
- 13:'鍖楁柟',
- },
-]
+const form = reactive({
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+
+})
+
</script>
-<!--娆$牬鎶ヨ〃-->
+
<template>
- <div class="div-main">
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
-<!-- <el-input placeholder="鐝粍鍚嶇О" v-model="form.name" style="width: 200px"/>-->
-<!-- -->
+ <!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
+ <!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
+
<el-date-picker
v-model="form.date1"
type="daterange"
start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
:default-time="defaultTime"
+ style="width: 100px"
/>
<el-select v-model="value" class="m-2" placeholder="鏌ヨ绫诲瀷">
@@ -81,34 +230,52 @@
</el-row>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="鎶ュ伐鏃堕棿" />
- <el-table-column prop="2" label="宸ュ簭"/>
- <el-table-column prop="3" label="璐d换鐝粍" :show-overflow-tooltip='true' />
- <el-table-column prop="4" label="璐d换璁惧" />
- <el-table-column prop="5" label="娆$牬鍘熷洜" />
- <el-table-column prop="6" label="娆$牬鏁伴噺" />
- <el-table-column prop="7" label="娆$牬闈㈢Н"/>
- <el-table-column prop="8" label="鎴愬搧鐜�"/>
- <el-table-column prop="9" label="椤圭洰鍚嶇О" :show-overflow-tooltip='true' />
- <el-table-column prop="10" label="鎵规" />
- <el-table-column prop="11" label="閿�鍞崟鍙�" width="120px" />
- <el-table-column prop="12" label="鍗曞搧鍚嶇О" :show-overflow-tooltip='true' width="150px" />
- <el-table-column prop="13" label="浜у湴" />
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ <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>
-.div-main{
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
}
#selectForm {
- width: 70%;
+ width: 60%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/EquipmentOutput.vue b/north-glass-erp/northglass-erp/src/views/pp/report/EquipmentOutput.vue
index 6a250bd..1f9ce62 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/EquipmentOutput.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/EquipmentOutput.vue
@@ -1,23 +1,150 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
+<script setup>
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
-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: '1', title: '宸ュ簭',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: '2', title: '鍔犲伐璁惧', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '3', title: '閿�鍞崟鍙�', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '4', title: '鐢熶骇璁㈠崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5',title: '浜у搧鍚嶇О', sortable: true,showOverflow:"ellipsis"},
+ {field: '6', title: '瀹屽伐鏁伴噺', sortable: true},
+ {field: '7', title: '瀹屽伐闈㈢Н', sortable: true},
+ {field: '8', title: '鎶ュ伐鏃堕棿', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 1:'鍒囧壊',
+ 2:'澶ф捣鍒╁畞',
+ 3:'NG23010102',
+ 4:'NG23010102A',
+ 5:'6mm瓒呯櫧LYE-80骞抽挗(澶�)+12Ar(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
+ 6:'133',
+ 7:'123.14',
+ 8:'2023-01-02',
+
+ },
+ {
+ 1:'鍒囧壊',
+ 2:'澶ф捣鍒╁畞',
+ 3:'NG23010102',
+ 4:'NG23010102A',
+ 5:'6mm瓒呯櫧LYE-80骞抽挗(澶�)+12Ar(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
+ 6:'133',
+ 7:'123.14',
+ 8:'2023-01-02',
+
+ },
+ {
+ 1:'鍒囧壊',
+ 2:'澶ф捣鍒╁畞',
+ 3:'NG23010102',
+ 4:'NG23010102A',
+ 5:'6mm瓒呯櫧LYE-80骞抽挗(澶�)+12Ar(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
+ 6:'133',
+ 7:'123.14',
+ 8:'2023-01-02',
+
+ },
+ {
+ 1:'鍒囧壊',
+ 2:'澶ф捣鍒╁畞',
+ 3:'NG23010102',
+ 4:'NG23010102A',
+ 5:'6mm瓒呯櫧LYE-80骞抽挗(澶�)+12Ar(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
+ 6:'133',
+ 7:'123.14',
+ 8:'2023-01-02',
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['6','7']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
const value = ref('')
@@ -35,33 +162,35 @@
label: 'Option3',
},
]
-const tableData = [
- {
- 1:'鍒囧壊',
- 2:'澶ф捣鍒╁畞',
- 3:'NG23010102',
- 4:'NG23010102A',
- 5:'6mm瓒呯櫧LYE-80骞抽挗(澶�)+12Ar(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
- 6:'133',
- 7:'123.14',
- 8:'2023-01-02',
- },
-]
+const form = reactive({
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+
+})
+
</script>
-<!--璁惧浜ч噺-->
+
<template>
- <div class="div-main">
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
-<!-- <el-input placeholder="璁惧鍚嶇О" v-model="form.name" style="width: 200px"/>-->
-<!-- -->
+ <!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
+ <!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
+
<el-date-picker
v-model="form.date1"
type="daterange"
start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
:default-time="defaultTime"
+ style="width: 100px"
/>
<el-select v-model="value" class="m-2" placeholder="鏌ヨ绫诲瀷">
@@ -76,29 +205,52 @@
</el-row>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="宸ュ簭" />
- <el-table-column prop="2" label="鍔犲伐璁惧"/>
- <el-table-column prop="3" label="閿�鍞崟鍙�" :show-overflow-tooltip='true' />
- <el-table-column prop="4" label="鐢熶骇璁㈠崟鍙�" />
- <el-table-column prop="5" label="浜у搧鍚嶇О" :show-overflow-tooltip='true' />
- <el-table-column prop="6" label="瀹屽伐鏁伴噺" />
- <el-table-column prop="7" label="瀹屽伐闈㈢Н"/>
- <el-table-column prop="8" label="鎶ュ伐鏃堕棿"/>
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ <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>
-.div-main{
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
}
#selectForm {
- width: 70%;
+ width: 60%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/OrderBOMOutside.vue b/north-glass-erp/northglass-erp/src/views/pp/report/OrderBOMOutside.vue
index 1815244..6fa3f41 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/OrderBOMOutside.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/OrderBOMOutside.vue
@@ -1,23 +1,171 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
+<script setup>
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
-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: '1', width: 120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: '2',width: 120, title: '瀹㈡埛缂栫爜', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '3', width: 130,title: '浜у搧缂栧彿', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '4',width: 120, title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5', width: 100,title: '璁㈠崟鏁伴噺', sortable: true,showOverflow:"ellipsis"},
+ {field: '6', width: 100,title: '棰嗘枡宸ュ簭', sortable: true},
+ {field: '7',width: 100, title: '鐗╂枡缂栫爜', sortable: true},
+ {field: '8',width: 120, title: '鐗╂枡鍚嶇О', sortable: true,showOverflow:"ellipsis"},
+ {field: '9', width: 120,title: '鍗曚綅', sortable: true},
+ {field: '10', width: 120,title: '浜у湴', sortable: true},
+ {field: '11',width: 120, title: '鐗╂枡鏁伴噺', sortable: true},
+ {field: '12',width: 120, title: '閲囪喘鏁伴噺', sortable: true},
+ {field: '13',width: 120, title: '鏄惁瀹℃牳', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 1:'NG230101',
+ 2:'24',
+ 3:'06045001',
+ 4:'3mm鐧藉潯/PE绮楃(/鍒囪9*9mm/TG/鎸夊浘[KD10059406-7-20002] 1011* 374(鍖呰 : 320鐗�/绠憋紝鐢ㄧ儹闅擣SC绾�)',
+ 5:'1300',
+ 6:'涓�绾胯绠�',
+ 7:'70030201000010400410000002',
+ 8:'FSC鏃犲皹绾�',
+ 9:'寮�',
+ 10:'涓滆帪甯傞敠鑽g焊涓�',
+ 11:'1304.00',
+ 12:'1000.0000',
+ 13:'宸插鏍�',
+ },
+ {
+ 1:'NG230101',
+ 2:'24',
+ 3:'06045001',
+ 4:'3mm鐧藉潯/PE绮楃(/鍒囪9*9mm/TG/鎸夊浘[KD10059406-7-20002] 1011* 374(鍖呰 : 320鐗�/绠憋紝鐢ㄧ儹闅擣SC绾�)',
+ 5:'1300',
+ 6:'涓�绾胯绠�',
+ 7:'70030201000010400410000002',
+ 8:'FSC鏃犲皹绾�',
+ 9:'寮�',
+ 10:'涓滆帪甯傞敠鑽g焊涓�',
+ 11:'1304.00',
+ 12:'1000.0000',
+ 13:'宸插鏍�',
+ },
+ {
+ 1:'NG230101',
+ 2:'24',
+ 3:'06045001',
+ 4:'3mm鐧藉潯/PE绮楃(/鍒囪9*9mm/TG/鎸夊浘[KD10059406-7-20002] 1011* 374(鍖呰 : 320鐗�/绠憋紝鐢ㄧ儹闅擣SC绾�)',
+ 5:'1300',
+ 6:'涓�绾胯绠�',
+ 7:'70030201000010400410000002',
+ 8:'FSC鏃犲皹绾�',
+ 9:'寮�',
+ 10:'涓滆帪甯傞敠鑽g焊涓�',
+ 11:'1304.00',
+ 12:'1000.0000',
+ 13:'宸插鏍�',
+ },
+ {
+ 1:'NG230101',
+ 2:'24',
+ 3:'06045001',
+ 4:'3mm鐧藉潯/PE绮楃(/鍒囪9*9mm/TG/鎸夊浘[KD10059406-7-20002] 1011* 374(鍖呰 : 320鐗�/绠憋紝鐢ㄧ儹闅擣SC绾�)',
+ 5:'1300',
+ 6:'涓�绾胯绠�',
+ 7:'70030201000010400410000002',
+ 8:'FSC鏃犲皹绾�',
+ 9:'寮�',
+ 10:'涓滆帪甯傞敠鑽g焊涓�',
+ 11:'1304.00',
+ 12:'1000.0000',
+ 13:'宸插鏍�',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['5','11','12']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
const value = ref('')
@@ -35,37 +183,35 @@
label: 'Option3',
},
]
-const tableData = [
- {
- 1:'NG230101',
- 2:'24',
- 3:'06045001',
- 4:'3mm鐧藉潯/PE绮楃(/鍒囪9*9mm/TG/鎸夊浘[KD10059406-7-20002] 1011* 374(鍖呰 : 320鐗�/绠憋紝鐢ㄧ儹闅擣SC绾�)',
- 5:'1300',
- 6:'涓�绾胯绠�',
- 7:'70030201000010400410000002',
- 8:'FSC鏃犲皹绾�',
- 9:'寮�',
- 10:'涓滆帪甯傞敠鑽g焊涓�',
- 11:'1304.00',
- 12:'1000.0000',
- 13:'宸插鏍�',
- },
-]
+
+const form = reactive({
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+
+})
+
</script>
-<!--BOM鎶ヨ〃-->
+
<template>
- <div class="div-main">
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
-<!-- <el-input placeholder="璁惧鍚嶇О" v-model="form.name" style="width: 200px"/>-->
-<!-- -->
+ <!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
+ <!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
+
<el-date-picker
v-model="form.date1"
type="daterange"
start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
:default-time="defaultTime"
+ style="width: 100px"
/>
<el-select v-model="value" class="m-2" placeholder="鏌ヨ绫诲瀷">
@@ -80,34 +226,52 @@
</el-row>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="閿�鍞崟鍙�" />
- <el-table-column prop="2" label="瀹㈡埛缂栫爜" :show-overflow-tooltip='true'/>
- <el-table-column prop="3" label="浜у搧缂栧彿" :show-overflow-tooltip='true' />
- <el-table-column prop="4" label="浜у搧鍚嶇О" :show-overflow-tooltip='true'/>
- <el-table-column prop="5" label="璁㈠崟鏁伴噺" :show-overflow-tooltip='true' />
- <el-table-column prop="6" label="棰嗘枡宸ュ簭" />
- <el-table-column prop="7" label="鐗╂枡缂栫爜" :show-overflow-tooltip='true'/>
- <el-table-column prop="8" label="鐗╂枡鍚嶇О" :show-overflow-tooltip='true'/>
- <el-table-column prop="9" label="鍗曚綅"/>
- <el-table-column prop="10" label="浜у湴" :show-overflow-tooltip='true'/>
- <el-table-column prop="11" label="鐗╂枡鏁伴噺"/>
- <el-table-column prop="12" label="閲囪喘鏁伴噺"/>
- <el-table-column prop="13" label="鏄惁瀹℃牳"/>
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ <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>
-.div-main{
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
}
#selectForm {
- width: 70%;
+ width: 60%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue b/north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue
index c0335f3..1612c12 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue
@@ -1,23 +1,176 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
+<script setup>
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
-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: '1', width: 120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: '2',width: 120, title: '瀹㈡埛鎵规', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '3', width: 130,title: '鎵规', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '4',width: 120, title: '鏁伴噺',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5', width: 100,title: '闈㈢Н', sortable: true,showOverflow:"ellipsis"},
+ {field: '6', width: 100,title: '璁㈠崟浜ゆ帴鏃堕棿', sortable: true},
+ {field: '7',width: 100, title: '閿�鍞崟鍙�', sortable: true},
+ {field: '8',width: 120, title: '寮�濮嬪垏鍓叉椂闂�', sortable: true,showOverflow:"ellipsis"},
+ {field: '9', width: 120,title: '娴佽浆宸ュ簭', sortable: true},
+ {field: '10', width: 120,title: '瀹屽伐鏁伴噺', sortable: true},
+ {field: '11',width: 120, title: '宸插叆搴撴暟閲�', sortable: true},
+ {field: '12',width: 120, title: '鏈叆搴撴暟閲�', sortable: true},
+ {field: '13',width: 120, title: '娓呭崟鏃堕棿', sortable: true},
+ {field: '14',width: 120, title: '鐢熶骇鐢ㄦ椂(澶�)', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 1:'鏂板畨鍖楃幓浜т笟鍥�',
+ 2:'1#瀹胯垗妤煎',
+ 3:'1#琛ョ墖',
+ 4:'8',
+ 5:'9.82',
+ 6:'2023-12-01 11:06:10',
+ 7:'NG23113003',
+ 8:'2023-12-03 23:19:11',
+ 9:'鍒囧壊',
+ 10:'2',
+ 11:'0',
+ 12:'9',
+ 13:'宸插鏍�',
+ 14:'4',
+ },
+ {
+ 1:'鏂板畨鍖楃幓浜т笟鍥�',
+ 2:'1#瀹胯垗妤煎',
+ 3:'1#琛ョ墖',
+ 4:'8',
+ 5:'9.82',
+ 6:'2023-12-01 11:06:10',
+ 7:'NG23113003',
+ 8:'2023-12-03 23:19:11',
+ 9:'鍒囧壊',
+ 10:'2',
+ 11:'0',
+ 12:'9',
+ 13:'宸插鏍�',
+ 14:'4',
+ },
+ {
+ 1:'鏂板畨鍖楃幓浜т笟鍥�',
+ 2:'1#瀹胯垗妤煎',
+ 3:'1#琛ョ墖',
+ 4:'8',
+ 5:'9.82',
+ 6:'2023-12-01 11:06:10',
+ 7:'NG23113003',
+ 8:'2023-12-03 23:19:11',
+ 9:'鍒囧壊',
+ 10:'2',
+ 11:'0',
+ 12:'9',
+ 13:'宸插鏍�',
+ 14:'4',
+ },
+ {
+ 1:'鏂板畨鍖楃幓浜т笟鍥�',
+ 2:'1#瀹胯垗妤煎',
+ 3:'1#琛ョ墖',
+ 4:'8',
+ 5:'9.82',
+ 6:'2023-12-01 11:06:10',
+ 7:'NG23113003',
+ 8:'2023-12-03 23:19:11',
+ 9:'鍒囧壊',
+ 10:'2',
+ 11:'0',
+ 12:'9',
+ 13:'宸插鏍�',
+ 14:'4',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['4','5','10','11','12']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
const value = ref('')
@@ -35,36 +188,35 @@
label: 'Option3',
},
]
-const tableData = [
- {
- 1:'鏂板畨鍖楃幓浜т笟鍥�',
- 2:'1#瀹胯垗妤煎',
- 3:'1#琛ョ墖',
- 4:'8',
- 5:'9.82',
- 6:'2023-12-01 11:06:10',
- 7:'NG23113003',
- 8:'2023-12-03 23:19:11',
- 9:'鍒囧壊',
- 10:'2',
- 11:'0',
- 12:'9',
- 13:'宸插鏍�',
- 14:'4',
- },
-]
+
+const form = reactive({
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+
+})
+
</script>
-<!--璁㈠崟璁″垝鍒嗚В-->
+
<template>
- <div class="div-main">
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
+ <!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
+ <!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
+
<el-date-picker
v-model="form.date1"
type="daterange"
start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
:default-time="defaultTime"
+ style="width: 100px"
/>
<el-select v-model="value" class="m-2" placeholder="鏌ヨ绫诲瀷">
@@ -79,35 +231,52 @@
</el-row>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="椤圭洰鍚嶇О" width="115" :show-overflow-tooltip='true'/>
- <el-table-column prop="2" label="瀹㈡埛鎵规" width="115" :show-overflow-tooltip='true'/>
- <el-table-column prop="3" label="鎵规" :show-overflow-tooltip='true' />
- <el-table-column prop="4" label="鏁伴噺" :show-overflow-tooltip='true'/>
- <el-table-column prop="5" label="闈㈢Н" :show-overflow-tooltip='true' />
- <el-table-column prop="6" label="璁㈠崟浜ゆ帴鏃堕棿" width="115" :show-overflow-tooltip='true'/>
- <el-table-column prop="7" label="閿�鍞崟鍙�" width="115" :show-overflow-tooltip='true'/>
- <el-table-column prop="8" label="寮�濮嬪垏鍓叉椂闂�" width="115" :show-overflow-tooltip='true'/>
- <el-table-column prop="9" label="娴佽浆宸ュ簭" width="82"/>
- <el-table-column prop="10" label="瀹屽伐鏁伴噺" width="85" :show-overflow-tooltip='true'/>
- <el-table-column prop="11" label="宸插叆搴撴暟閲�" width="95"/>
- <el-table-column prop="12" label="鏈叆搴撴暟閲�" width="95"/>
- <el-table-column prop="13" label="娓呭崟鏃堕棿" width="82"/>
- <el-table-column prop="14" label="鐢熶骇鐢ㄦ椂(澶�)" width="115"/>
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ <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>
-.div-main{
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
}
#selectForm {
- width: 70%;
+ width: 60%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue b/north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue
index f68e379..7afdcbe 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue
@@ -1,23 +1,127 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
+<script setup>
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
-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: '1', title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: '2', title: '鍗曠墖鍚嶇О', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '3',title: '鏈畬鏁�', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '4', title: '鏈畬闈㈢Н',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 1:'鏂板畨鍖楃幓浜т笟鍥�',
+ 2:'19mm瓒呯櫧骞抽挗',
+ 3:'1',
+ 4:'3.11',
+ },
+ {
+ 1:'鏂板畨鍖楃幓浜т笟鍥�',
+ 2:'19mm瓒呯櫧骞抽挗',
+ 3:'1',
+ 4:'3.11',
+ },
+ {
+ 1:'鏂板畨鍖楃幓浜т笟鍥�',
+ 2:'19mm瓒呯櫧骞抽挗',
+ 3:'1',
+ 4:'3.11',
+ },
+ {
+ 1:'鏂板畨鍖楃幓浜т笟鍥�',
+ 2:'19mm瓒呯櫧骞抽挗',
+ 3:'1',
+ 4:'3.11',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['finishedNumber','finishedArea','wornNumber','wornArea']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
const value = ref('')
@@ -35,29 +139,37 @@
label: 'Option3',
},
]
-const tableData = [
- {
- 1:'鏂板畨鍖楃幓浜т笟鍥�',
- 2:'19mm瓒呯櫧骞抽挗',
- 3:'1',
- 4:'3.11',
- },
-]
+
+const form = reactive({
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+
+})
+
</script>
-<!--宸ュ簭寰呭畬鎴愭姤琛�-->
+
<template>
- <div class="div-main">
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
-<!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
-<!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
+ <!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
+ <!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
+
<el-date-picker
v-model="form.date1"
type="daterange"
start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
:default-time="defaultTime"
+ style="width: 100px"
/>
+
<el-select v-model="value" class="m-2" placeholder="鏌ヨ绫诲瀷">
<el-option
v-for="item in options"
@@ -66,30 +178,56 @@
:value="item.value"
/>
</el-select>
-
<el-button type="primary">鏌ヨ</el-button>
</el-row>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="椤圭洰鍚嶇О" width="115" :show-overflow-tooltip='true'/>
- <el-table-column prop="2" label="鍗曞搧鍚嶇О" width="115" :show-overflow-tooltip='true'/>
- <el-table-column prop="3" label="鏈畬鏁�" :show-overflow-tooltip='true' />
- <el-table-column prop="4" label="鏈畬闈㈢Н" :show-overflow-tooltip='true'/>
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ <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>
-.div-main{
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
}
#selectForm {
- width: 70%;
+ width: 60%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/ProductionSchedule.vue b/north-glass-erp/northglass-erp/src/views/pp/report/ProductionSchedule.vue
index c406346..5b2b085 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/ProductionSchedule.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/ProductionSchedule.vue
@@ -1,27 +1,254 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
-import type { TableColumnCtx } from 'element-plus'
+<script setup>
-interface User {
- id: string
- name: string
- amount1: string
- amount2: string
- amount3: number
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
}
-interface SpanMethodProps {
- row: User
- column: TableColumnCtx<User>
- rowIndex: number
- columnIndex: number
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
}
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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: '1', width: 100, title: '搴忓彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: '2',width: 120, title: '妤煎眰缂栧彿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '3', width: 100,title: '褰㈢姸', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '4',width: 120, title: '鎴愬搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5', width: 90,title: '瀹�', sortable: true,showOverflow:"ellipsis"},
+ {field: '6', width: 90,title: '楂�', sortable: true},
+ {field: '7',width: 90, title: '鏁伴噺', sortable: true},
+ {field: '8',width: 90, title: '鐗囨爣璁�', sortable: true,showOverflow:"ellipsis"},
+ {field: '9', width: 80,title: '鏍囪', sortable: true},
+ {field: '10', width: 120,title: '鍗曠墖鍚嶇О', sortable: true},
+ {field: '11',width: 120, title: '鍒囧壊', sortable: true},
+ {field: '12',width: 120, title: '纾ㄨ竟', sortable: true},
+ {field: '13',width: 120, title: '閽㈠寲', sortable: true},
+ {field: '14',width: 120, title: '鍏ュ簱鏁伴噺', sortable: true},
+ {field: '15',width: 120, title: '鍏ュ簱闈㈢Н', sortable: true},
+ {field: '16',width: 120, title: '鍙戣揣鏁伴噺', sortable: true},
+ {field: '17',width: 120, title: '鍙戣揣闈㈢Н', sortable: true},
+ {field: '17',width: 120, title: '缁撶畻鎬婚潰绉�', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 1:'1',
+ 2:'J8-B1-BD-BL1-001',
+ 3:'鏅舰',
+ 4:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+ 5:'1114',
+ 6:'1445',
+ 7:'3',
+ 8:'(澶�)',
+ 9:'1',
+ 10:'10mm瓒呯櫧UD60骞抽挗(澶�)',
+ 11:'1',
+ 12:'1',
+ 13:'1',
+ 14:'0',
+ 15:'0',
+ 16:'0',
+ 17:'0',
+ 18:'4.11',
+ },
+ {
+ 1:'1',
+ 2:'J8-B1-BD-BL1-001',
+ 3:'鏅舰',
+ 4:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+ 5:'1114',
+ 6:'1445',
+ 7:'3',
+ 8:'(涓�)',
+ 9:'2',
+ 10:'10mm瓒呯櫧UD60骞抽挗(澶�)',
+ 11:'1',
+ 12:'1',
+ 13:'1',
+ 14:'0',
+ 15:'0',
+ 16:'0',
+ 17:'0',
+ 18:'4.11',
+ },
+ {
+ 1:'1',
+ 2:'J8-B1-BD-BL1-001',
+ 3:'鏅舰',
+ 4:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
+ 5:'1114',
+ 6:'1445',
+ 7:'3',
+ 8:'(鍐�)',
+ 9:'3',
+ 10:'10mm瓒呯櫧UD60骞抽挗(澶�)',
+ 11:'1',
+ 12:'1',
+ 13:'1',
+ 14:'0',
+ 15:'0',
+ 16:'0',
+ 17:'0',
+ 18:'4.11',
+ },
+ {
+ 1:'2',
+ 2:'J8-B1-BD-BL1-001',
+ 3:'鏅舰',
+ 4:'6mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+6mm瓒呯櫧骞抽挗+12Ar(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
+ 5:'1114',
+ 6:'1445',
+ 7:'3',
+ 8:'(澶�)',
+ 9:'1',
+ 10:'6mm瓒呯櫧UD60骞抽挗(澶�)',
+ 11:'1',
+ 12:'1',
+ 13:'1',
+ 14:'0',
+ 15:'0',
+ 16:'0',
+ 17:'0',
+ 18:'4.11',
+ },
+ {
+ 1:'2',
+ 2:'J8-B1-BD-BL1-001',
+ 3:'鏅舰',
+ 4:'6mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+6mm瓒呯櫧骞抽挗+12Ar(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
+ 5:'1114',
+ 6:'1445',
+ 7:'3',
+ 8:'(涓�)',
+ 9:'2',
+ 10:'6mm瓒呯櫧UD60骞抽挗(澶�)',
+ 11:'1',
+ 12:'1',
+ 13:'1',
+ 14:'0',
+ 15:'0',
+ 16:'0',
+ 17:'0',
+ 18:'4.11',
+ },
+ {
+ 1:'2',
+ 2:'J8-B1-BD-BL1-001',
+ 3:'鏅舰',
+ 4:'6mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+6mm瓒呯櫧骞抽挗+12Ar(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
+ 5:'1114',
+ 6:'1445',
+ 7:'3',
+ 8:'(鍐�)',
+ 9:'3',
+ 10:'6mm瓒呯櫧UD60骞抽挗(澶�)',
+ 11:'1',
+ 12:'1',
+ 13:'1',
+ 14:'0',
+ 15:'0',
+ 16:'0',
+ 17:'0',
+ 18:'4.11',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['7','11','12','13','14','15','16','17','18']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
+const value = ref('')
+const options = [
+ {
+ value: 'Option1',
+ label: 'Option1',
+ },
+ {
+ value: 'Option2',
+ label: 'Option2',
+ },
+ {
+ value: 'Option3',
+ label: 'Option3',
+ },
+]
+
const form = reactive({
name: '',
region: '',
@@ -31,159 +258,30 @@
type: [],
resource: '',
desc: '',
+
})
+const mergeCells = ref([
+ { row: 0, col: 2, rowspan: 3, colspan: 0},
+ { row: 3, col: 2, rowspan: 3, colspan: 0},
-const objectSpanMethod = ({
- row,
- column,
- rowIndex,
- columnIndex,
- }: SpanMethodProps) => {
- if (columnIndex === 0 ||columnIndex === 1||columnIndex === 2||columnIndex === 3||columnIndex === 6) {
- console.log(rowIndex)
- if (rowIndex % 3 === 0) {
- return {
- rowspan: 3,
- colspan: 1,
- column:1
- }
- } else {
- return {
- rowspan: 0,
- colspan: 0,
- column:1
- }
- }
- }
+ { row: 0, col: 3, rowspan: 3, colspan: 0},
+ { row: 3, col: 3, rowspan: 3, colspan: 0},
-}
-const tableData = [
- {
- 1:'1',
- 2:'J8-B1-BD-BL1-001',
- 3:'鏅舰',
- 4:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
- 5:'1114',
- 6:'1445',
- 7:'3',
- 8:'(澶�)',
- 9:'1',
- 10:'10mm瓒呯櫧UD60骞抽挗(澶�)',
- 11:'1',
- 12:'1',
- 13:'1',
- 14:'0',
- 15:'0',
- 16:'0',
- 17:'0',
- 18:'4.11',
- },
- {
- 1:'1',
- 2:'J8-B1-BD-BL1-001',
- 3:'鏅舰',
- 4:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
- 5:'1114',
- 6:'1445',
- 7:'3',
- 8:'(涓�)',
- 9:'2',
- 10:'10mm瓒呯櫧UD60骞抽挗(澶�)',
- 11:'1',
- 12:'1',
- 13:'1',
- 14:'0',
- 15:'0',
- 16:'0',
- 17:'0',
- 18:'4.11',
- },
- {
- 1:'1',
- 2:'J8-B1-BD-BL1-001',
- 3:'鏅舰',
- 4:'10mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+10mm瓒呯櫧骞抽挗+12Ar(缁�)+10mm瓒呯櫧骞抽挗(鍐�)',
- 5:'1114',
- 6:'1445',
- 7:'3',
- 8:'(鍐�)',
- 9:'3',
- 10:'10mm瓒呯櫧UD60骞抽挗(澶�)',
- 11:'1',
- 12:'1',
- 13:'1',
- 14:'0',
- 15:'0',
- 16:'0',
- 17:'0',
- 18:'4.11',
- },
- {
- 1:'2',
- 2:'J8-B1-BD-BL1-001',
- 3:'鏅舰',
- 4:'6mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+6mm瓒呯櫧骞抽挗+12Ar(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
- 5:'1114',
- 6:'1445',
- 7:'3',
- 8:'(澶�)',
- 9:'1',
- 10:'6mm瓒呯櫧UD60骞抽挗(澶�)',
- 11:'1',
- 12:'1',
- 13:'1',
- 14:'0',
- 15:'0',
- 16:'0',
- 17:'0',
- 18:'4.11',
- },
- {
- 1:'2',
- 2:'J8-B1-BD-BL1-001',
- 3:'鏅舰',
- 4:'6mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+6mm瓒呯櫧骞抽挗+12Ar(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
- 5:'1114',
- 6:'1445',
- 7:'3',
- 8:'(涓�)',
- 9:'2',
- 10:'6mm瓒呯櫧UD60骞抽挗(澶�)',
- 11:'1',
- 12:'1',
- 13:'1',
- 14:'0',
- 15:'0',
- 16:'0',
- 17:'0',
- 18:'4.11',
- },
- {
- 1:'2',
- 2:'J8-B1-BD-BL1-001',
- 3:'鏅舰',
- 4:'6mm瓒呯櫧UD60骞抽挗(澶�)+12Ar(缁�)+6mm瓒呯櫧骞抽挗+12Ar(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
- 5:'1114',
- 6:'1445',
- 7:'3',
- 8:'(鍐�)',
- 9:'3',
- 10:'6mm瓒呯櫧UD60骞抽挗(澶�)',
- 11:'1',
- 12:'1',
- 13:'1',
- 14:'0',
- 15:'0',
- 16:'0',
- 17:'0',
- 18:'4.11',
- },
-]
+ { row: 0, col: 4, rowspan: 3, colspan: 0},
+ { row: 3, col: 4, rowspan: 3, colspan: 0},
+
+ { row: 0, col: 5, rowspan: 3, colspan: 0},
+ { row: 3, col: 5, rowspan: 3, colspan: 0},
+
+ { row: 0, col: 8, rowspan: 3, colspan: 0},
+ { row: 3, col: 8, rowspan: 3, colspan: 0},
+])
+
</script>
-<!--鐢熶骇鍙戣揣杩涘害-->
+
<template>
- <div class="div-main">
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
<el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>
@@ -192,44 +290,53 @@
</el-row>
</div>
- <div>
- <el-table
- :data="tableData"
- :span-method="objectSpanMethod"
- border
- style="width: 100%; margin-top: 20px"
- >
- <el-table-column prop="1" label="搴忓彿" />
- <el-table-column prop="2" label="妤煎眰缂栧彿" width="120px" :show-overflow-tooltip='true'/>
- <el-table-column prop="3" label="褰㈢姸" :show-overflow-tooltip='true' />
- <el-table-column prop="4" label="鎴愬搧鍚嶇О" width="120px" :show-overflow-tooltip='true'/>
- <el-table-column prop="5" label="瀹�" />
- <el-table-column prop="6" label="楂�" />
- <el-table-column prop="7" label="鏁伴噺"/>
- <el-table-column prop="8" label="鐗囨爣璁�"/>
- <el-table-column prop="9" label="鏍囪" :show-overflow-tooltip='true' />
- <el-table-column prop="10" label="鍗曠墖鍚嶇О" width="120px" :show-overflow-tooltip='true'/>
- <el-table-column prop="11" label="鍒囧壊" width="120px" />
- <el-table-column prop="12" label="纾ㄨ竟" :show-overflow-tooltip='true' width="150px" />
- <el-table-column prop="13" label="閽㈠寲" />
- <el-table-column prop="14" label="鍏ュ簱鏁伴噺" />
- <el-table-column prop="15" label="鍏ュ簱闈㈢Н" />
- <el-table-column prop="16" label="鍙戣揣鏁伴噺" />
- <el-table-column prop="17" label="鍙戣揣闈㈢Н" />
- <el-table-column prop="18" label="缁撶畻鎬婚潰绉�" />
- </el-table>
- </div>
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+ :merge-cells="mergeCells"
+ >
+ <!-- @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>
-.div-main{
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
}
#selectForm {
- width: 70%;
+ width: 60%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/QualityReport.vue b/north-glass-erp/northglass-erp/src/views/pp/report/QualityReport.vue
index 9152a17..9346a09 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/QualityReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/QualityReport.vue
@@ -1,23 +1,170 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
+<script setup>
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
-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: '1', width: 120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: '2',width: 120, title: '瀹㈡埛缂栫爜', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '3', width: 130,title: '椤圭洰鍚嶇О', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '4',width: 120, title: '璁㈠崟搴忓彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5', width: 100,title: '浜у搧鍚嶇О', sortable: true,showOverflow:"ellipsis"},
+ {field: '6', width: 100,title: '璁㈠崟鏁伴噺', sortable: true},
+ {field: '7',width: 100, title: '澶囩敤浠�', sortable: true},
+ {field: '8',width: 120, title: '鎶曞叆鏁伴噺', sortable: true,showOverflow:"ellipsis"},
+ {field: '9', width: 120,title: '娆$牬鏁伴噺', sortable: true},
+ {field: '10', width: 120,title: '琛ョ墖鏁伴噺', sortable: true},
+ {field: '11',width: 120, title: '鍏ュ簱鏁伴噺', sortable: true},
+ {field: '12',width: 120, title: '鎶ュ簾鐜�', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 1:'NG23022706',
+ 2:'45',
+ 3:'澶ф澘闀�',
+ 4:'1',
+ 5:'3mm 楂樻�ц兘鐜繚闀� 3660*2440',
+ 6:'180 ',
+ 7:'0',
+ 8:'186',
+ 9:'3',
+ 10:'3',
+ 11:'180',
+ 12:'1.6129%',
+
+ },
+ {
+ 1:'NG23022706',
+ 2:'45',
+ 3:'澶ф澘闀�',
+ 4:'1',
+ 5:'3mm 楂樻�ц兘鐜繚闀� 3660*2440',
+ 6:'180 ',
+ 7:'0',
+ 8:'186',
+ 9:'3',
+ 10:'3',
+ 11:'180',
+ 12:'1.6129%',
+
+ },
+ {
+ 1:'NG23022706',
+ 2:'45',
+ 3:'澶ф澘闀�',
+ 4:'1',
+ 5:'3mm 楂樻�ц兘鐜繚闀� 3660*2440',
+ 6:'180 ',
+ 7:'0',
+ 8:'186',
+ 9:'3',
+ 10:'3',
+ 11:'180',
+ 12:'1.6129%',
+
+ },
+ {
+ 1:'NG23022706',
+ 2:'45',
+ 3:'澶ф澘闀�',
+ 4:'1',
+ 5:'3mm 楂樻�ц兘鐜繚闀� 3660*2440',
+ 6:'180 ',
+ 7:'0',
+ 8:'186',
+ 9:'3',
+ 10:'3',
+ 11:'180',
+ 12:'1.6129%',
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['6','7','8','9','10','11']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
const value = ref('')
@@ -35,30 +182,27 @@
label: 'Option3',
},
]
-const tableData = [
- {
- 1:'NG23022706',
- 2:'45',
- 3:'澶ф澘闀�',
- 4:'1',
- 5:'3mm 楂樻�ц兘鐜繚闀� 3660*2440',
- 6:'180 ',
- 7:'0',
- 8:'186',
- 9:'3',
- 10:'3',
- 11:'180',
- 12:'1.6129%',
- },
-]
+const form = reactive({
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+
+})
+
</script>
-<!--鍝佽川鎶ヨ〃-->
+
<template>
- <div class="div-main">
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
-<!-- <el-input placeholder="瀹㈡埛鍚嶇О" v-model="form.name" style="width: 200px"/>-->
+ <!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
+ <!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
<el-date-picker
v-model="form.date1"
@@ -66,39 +210,59 @@
start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
:default-time="defaultTime"
+ style="width: 100px"
/>
<el-button type="primary">鏌ヨ</el-button>
</el-row>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="閿�鍞崟鍙�" />
- <el-table-column prop="2" label="瀹㈡埛缂栫爜"/>
- <el-table-column prop="3" label="椤圭洰鍚嶇О" :show-overflow-tooltip='true' />
- <el-table-column prop="4" label="璁㈠崟搴忓彿" />
- <el-table-column prop="5" label="浜у搧鍚嶇О" :show-overflow-tooltip='true'/>
- <el-table-column prop="6" label="璁㈠崟鏁伴噺" />
- <el-table-column prop="7" label="澶囩敤浠�"/>
- <el-table-column prop="8" label="鎶曞叆鏁伴噺"/>
- <el-table-column prop="9" label="娆$牬鏁伴噺" :show-overflow-tooltip='true' />
- <el-table-column prop="10" label="甯冪墖鏁伴噺" />
- <el-table-column prop="11" label="鍏ュ簱鏁伴噺" width="120px" />
- <el-table-column prop="12" label="鎶ュ簾鐜�" :show-overflow-tooltip='true' width="150px" />
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ <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>
-.div-main{
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
}
#selectForm {
- width: 70%;
+ width: 50%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/RawMaterialRequisition.vue b/north-glass-erp/northglass-erp/src/views/pp/report/RawMaterialRequisition.vue
index 196ca1d..ab60678 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/RawMaterialRequisition.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/RawMaterialRequisition.vue
@@ -1,23 +1,165 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
+<script setup>
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
-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: '1', width: 120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: '2',width: 100, title: '鎵规', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '3', width: 130,title: '閿�鍞崟鍙�', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '4',width: 120, title: '浜у搧绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5', width: 100,title: '鐗╂枡鍚嶇О', sortable: true,showOverflow:"ellipsis"},
+ {field: '6', width: 100,title: '鍘熺墖浜у湴', sortable: true},
+ {field: '7',width: 90, title: '瀹�', sortable: true},
+ {field: '8',width: 90, title: '楂�', sortable: true,showOverflow:"ellipsis"},
+ {field: '9', width: 120,title: '宸查鏁伴噺', sortable: true},
+ {field: '10', width: 120,title: '宸查闈㈢Н', sortable: true},
+ {field: '11',width: 120, title: '鍘熺墖鐢熶骇鏃ユ湡', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 1:'姝︽眽瀹夐摥鍗庝鲸鍩�',
+ 2:'23绗�1鎵�',
+ 3:'N0231210',
+ 4:'骞抽挗',
+ 5:'10mm瓒呯櫧UD60',
+ 6:'灞变笢鍏ㄥ搧',
+ 7:'3360',
+ 8:'4567',
+ 9:'6',
+ 10:'22.76',
+ 11:'2023-10-22',
+
+ },
+ {
+ 1:'姝︽眽瀹夐摥鍗庝鲸鍩�',
+ 2:'23绗�1鎵�',
+ 3:'N0231210',
+ 4:'骞抽挗',
+ 5:'10mm瓒呯櫧UD60',
+ 6:'灞变笢鍏ㄥ搧',
+ 7:'3360',
+ 8:'4567',
+ 9:'6',
+ 10:'22.76',
+ 11:'2023-10-22',
+
+ },
+ {
+ 1:'姝︽眽瀹夐摥鍗庝鲸鍩�',
+ 2:'23绗�1鎵�',
+ 3:'N0231210',
+ 4:'骞抽挗',
+ 5:'10mm瓒呯櫧UD60',
+ 6:'灞变笢鍏ㄥ搧',
+ 7:'3360',
+ 8:'4567',
+ 9:'6',
+ 10:'22.76',
+ 11:'2023-10-22',
+
+ },
+ {
+ 1:'姝︽眽瀹夐摥鍗庝鲸鍩�',
+ 2:'23绗�1鎵�',
+ 3:'N0231210',
+ 4:'骞抽挗',
+ 5:'10mm瓒呯櫧UD60',
+ 6:'灞变笢鍏ㄥ搧',
+ 7:'3360',
+ 8:'4567',
+ 9:'6',
+ 10:'22.76',
+ 11:'2023-10-22',
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['9','10']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
const value = ref('')
@@ -35,30 +177,27 @@
label: 'Option3',
},
]
-const tableData = [
- {
- 1:'姝︽眽瀹夐摥鍗庝鲸鍩�',
- 2:'23绗�1鎵�',
- 3:'N0231210',
- 4:'骞抽挗',
- 5:'10mm瓒呯櫧UD60',
- 6:'灞变笢鍏ㄥ搧',
- 7:'3360',
- 8:'4567',
- 9:'6',
- 10:'22.76',
- 11:'2023-10-22',
- },
-]
+const form = reactive({
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+
+})
+
</script>
-<!--鍘熺墖棰嗘枡-->
+
<template>
- <div class="div-main">
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
-<!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 200px"/>-->
-<!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 200px"/>-->
+ <!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
+ <!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
<el-date-picker
v-model="form.date1"
@@ -66,38 +205,60 @@
start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
:default-time="defaultTime"
+ style="width: 100px"
/>
+
<el-button type="primary">鏌ヨ</el-button>
</el-row>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="椤圭洰鍚嶇О" :show-overflow-tooltip='true'/>
- <el-table-column prop="2" label="鎵规"/>
- <el-table-column prop="3" label="閿�鍞崟鍙�" :show-overflow-tooltip='true' />
- <el-table-column prop="4" label="浜у搧绫诲瀷" />
- <el-table-column prop="5" label="鐗╂枡鍚嶇О" :show-overflow-tooltip='true'/>
- <el-table-column prop="6" label="鍘熺墖浜у湴" />
- <el-table-column prop="7" label="瀹�"/>
- <el-table-column prop="8" label="楂�"/>
- <el-table-column prop="9" label="宸查鏁伴噺" :show-overflow-tooltip='true' />
- <el-table-column prop="10" label="宸查闈㈢Н" />
- <el-table-column prop="11" label="鍘熺墖鐢熶骇鏃ユ湡" width="120px" />
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ <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>
-.div-main{
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
}
#selectForm {
- width: 70%;
+ width: 60%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/Report.vue b/north-glass-erp/northglass-erp/src/views/pp/report/Report.vue
index 7c657bd..1cc32c6 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/Report.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/Report.vue
@@ -44,8 +44,9 @@
mode="horizontal"
:default-active="$route.path"
router
- background-color="#545c64"
- text-color="white"
+ background-color="#5CADFE"
+ text-color="#000000"
+ active-text-color="#ffffff"
>
@@ -95,6 +96,7 @@
#div-title{
height: 5%;
width: 100%;
+ //color: #ffd04b;
}
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/SplittingDetailsOutside.vue b/north-glass-erp/northglass-erp/src/views/pp/report/SplittingDetailsOutside.vue
index 8be36a5..45ad240 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/SplittingDetailsOutside.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/SplittingDetailsOutside.vue
@@ -1,23 +1,170 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
+<script setup>
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
-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: '1', width: 130, title: '娴佺▼鍗″彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: '2',width: 100, title: '搴忓彿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '3', width: 100,title: '钀芥灦椤哄簭', sortable: true,},
+ {field: '4',width: 120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5', width: 100,title: '鎵规', sortable: true,showOverflow:"ellipsis"},
+ {field: '6', width: 100,title: '妤煎眰缂栧彿', sortable: true},
+ {field: '7',width: 90, title: '瀹�', sortable: true},
+ {field: '8',width: 90, title: '楂�', sortable: true,showOverflow:"ellipsis"},
+ {field: '9', width: 90,title: '鏁伴噺', sortable: true},
+ {field: '10', width: 90,title: '闈㈢Н', sortable: true},
+ {field: '11',width: 90, title: '褰㈢姸', sortable: true},
+ {field: '12',width: 120, title: '澶囨敞', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 1:'NG23120702A01',
+ 2:'8',
+ 3:'1',
+ 4:'閾堕殕骞垮満',
+ 5:'琛�8',
+ 6:'J8-B1-BD-BL1-009 ',
+ 7:'1764',
+ 8:'2466',
+ 9:'5',
+ 10:'23.13',
+ 11:'鏅舰',
+ 12:'',
+
+ },
+ {
+ 1:'NG23120702A01',
+ 2:'8',
+ 3:'1',
+ 4:'閾堕殕骞垮満',
+ 5:'琛�8',
+ 6:'J8-B1-BD-BL1-009 ',
+ 7:'1764',
+ 8:'2466',
+ 9:'5',
+ 10:'23.13',
+ 11:'鏅舰',
+ 12:'',
+
+ },
+ {
+ 1:'NG23120702A01',
+ 2:'8',
+ 3:'1',
+ 4:'閾堕殕骞垮満',
+ 5:'琛�8',
+ 6:'J8-B1-BD-BL1-009 ',
+ 7:'1764',
+ 8:'2466',
+ 9:'5',
+ 10:'23.13',
+ 11:'鏅舰',
+ 12:'',
+
+ },
+ {
+ 1:'NG23120702A01',
+ 2:'8',
+ 3:'1',
+ 4:'閾堕殕骞垮満',
+ 5:'琛�8',
+ 6:'J8-B1-BD-BL1-009 ',
+ 7:'1764',
+ 8:'2466',
+ 9:'5',
+ 10:'23.13',
+ 11:'鏅舰',
+ 12:'',
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['9','10']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
const value = ref('')
@@ -35,27 +182,23 @@
label: 'Option3',
},
]
-const tableData = [
- {
- 1:'NG23120702A01',
- 2:'8',
- 3:'1',
- 4:'閾堕殕骞垮満',
- 5:'琛�8',
- 6:'J8-B1-BD-BL1-009 ',
- 7:'1764',
- 8:'2466',
- 9:'5',
- 10:'23.13',
- 11:'鏅舰',
- 12:'',
- },
-]
+const form = reactive({
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+
+})
+
</script>
-<!--鍒嗘灦鏄庣粏-->
+
<template>
- <div class="div-main">
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
<el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 200px"/>
@@ -64,33 +207,52 @@
</el-row>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="娴佺▼鍗″彿" width="130px"/>
- <el-table-column prop="2" label="搴忓彿"/>
- <el-table-column prop="3" label="钀芥灦椤哄簭" :show-overflow-tooltip='true' />
- <el-table-column prop="4" label="椤圭洰鍚嶇О" />
- <el-table-column prop="5" label="鎵规" />
- <el-table-column prop="6" label="妤煎眰缂栧彿" :show-overflow-tooltip='true' />
- <el-table-column prop="7" label="瀹�"/>
- <el-table-column prop="8" label="楂�"/>
- <el-table-column prop="9" label="鏁伴噺" :show-overflow-tooltip='true' />
- <el-table-column prop="10" label="闈㈢Н" />
- <el-table-column prop="11" label="褰㈢姸" />
- <el-table-column prop="12" label="澶囨敞" :show-overflow-tooltip='true' width="150px" />
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ <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>
-.div-main{
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
}
#selectForm {
- width: 70%;
+ width: 60%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/TaskCompletionStatus.vue b/north-glass-erp/northglass-erp/src/views/pp/report/TaskCompletionStatus.vue
index 91a7aed..d389b54 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/TaskCompletionStatus.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/TaskCompletionStatus.vue
@@ -1,23 +1,180 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
+<script setup>
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
-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: '1', width: 120, title: '瀹㈡埛鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: '2',width: 120, title: '椤圭洰鍚嶇О', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '3', width: 100,title: '鎵规', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '4',width: 120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5', width: 100,title: '浜у搧澶х被', sortable: true,showOverflow:"ellipsis"},
+ {field: '6', width: 100,title: '浜у搧灏忕被', sortable: true},
+ {field: '7',width: 100, title: '璁㈠崟鏁�', sortable: true},
+ {field: '8',width: 100, title: '鎬婚潰绉�', sortable: true,showOverflow:"ellipsis"},
+ {field: '9', width: 120,title: '鍙戣揣鏁伴噺', sortable: true},
+ {field: '10', width: 120,title: '鍙戣揣闈㈢Н', sortable: true},
+ {field: '11',width: 120, title: '鎶ヨ〃鏃ユ湡', sortable: true},
+ {field: '12',width: 90, title: '鍒囧壊', sortable: true},
+ {field: '13',width: 90, title: '纾ㄨ竟', sortable: true},
+ {field: '14',width: 90, title: '閽㈠寲', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 1:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃 ',
+ 2:'閾堕殕骞垮満',
+ 3:'琛�8',
+ 4:'NG23120702',
+ 5:'涓┖鐜荤拑',
+ 6:'鍙屽钩閽腑绌�',
+ 7:'1',
+ 8:'1.88',
+ 9:'',
+ 10:'',
+ 11:'2023-12-17',
+ 12:'5',
+ 13:'5',
+ 14:'5',
+
+ },
+ {
+ 1:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃 ',
+ 2:'閾堕殕骞垮満',
+ 3:'琛�8',
+ 4:'NG23120702',
+ 5:'涓┖鐜荤拑',
+ 6:'鍙屽钩閽腑绌�',
+ 7:'1',
+ 8:'1.88',
+ 9:'',
+ 10:'',
+ 11:'2023-12-17',
+ 12:'5',
+ 13:'5',
+ 14:'5',
+
+ },
+ {
+ 1:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃 ',
+ 2:'閾堕殕骞垮満',
+ 3:'琛�8',
+ 4:'NG23120702',
+ 5:'涓┖鐜荤拑',
+ 6:'鍙屽钩閽腑绌�',
+ 7:'1',
+ 8:'1.88',
+ 9:'',
+ 10:'',
+ 11:'2023-12-17',
+ 12:'5',
+ 13:'5',
+ 14:'5',
+
+ },
+ {
+ 1:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃 ',
+ 2:'閾堕殕骞垮満',
+ 3:'琛�8',
+ 4:'NG23120702',
+ 5:'涓┖鐜荤拑',
+ 6:'鍙屽钩閽腑绌�',
+ 7:'1',
+ 8:'1.88',
+ 9:'',
+ 10:'',
+ 11:'2023-12-17',
+ 12:'5',
+ 13:'5',
+ 14:'5',
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['7','8','9','10']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
const value = ref('')
@@ -35,33 +192,27 @@
label: 'Option3',
},
]
-const tableData = [
- {
- 1:'瑗垮畨楂樼骞曞闂ㄧ獥鏈夐檺鍏徃 ',
- 2:'閾堕殕骞垮満',
- 3:'琛�8',
- 4:'NG23120702',
- 5:'涓┖鐜荤拑',
- 6:'鍙屽钩閽腑绌�',
- 7:'1',
- 8:'1.88',
- 9:'',
- 10:'',
- 11:'2023-12-17',
- 12:'5',
- 13:'5',
- 14:'5',
- },
-]
+const form = reactive({
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+
+})
+
</script>
-<!--浠诲姟瀹屾垚鎯呭喌-->
+
<template>
- <div class="div-main">
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
-<!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
-<!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
+ <!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
+ <!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
<el-date-picker
v-model="form.date1"
@@ -69,7 +220,7 @@
start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
:default-time="defaultTime"
- style="width: 120px"
+ style="width: 100px"
/>
<el-select v-model="value" class="m-2" placeholder="鏌ヨ绫诲瀷">
@@ -84,35 +235,52 @@
</el-row>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="瀹㈡埛鍚嶇О" :show-overflow-tooltip='true'/>
- <el-table-column prop="2" label="椤圭洰鍚嶇О" :show-overflow-tooltip='true'/>
- <el-table-column prop="3" label="鎵规" :show-overflow-tooltip='true' />
- <el-table-column prop="4" label="閿�鍞崟鍙�" width="120px" />
- <el-table-column prop="5" label="浜у搧澶х被" />
- <el-table-column prop="6" label="浜у搧灏忕被" width="120px"/>
- <el-table-column prop="7" label="璁㈠崟鏁�"/>
- <el-table-column prop="8" label="鎬婚潰绉�"/>
- <el-table-column prop="9" label="鍙戣揣鏁伴噺" :show-overflow-tooltip='true' />
- <el-table-column prop="10" label="鍙戣揣闈㈢Н" />
- <el-table-column prop="11" label="鎶ヨ〃鏃ユ湡" width="120px" />
- <el-table-column prop="12" label="鍒囧壊" />
- <el-table-column prop="13" label="纾ㄨ竟" />
- <el-table-column prop="14" label="閽㈠寲" />
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ <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>
-.div-main{
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
}
#selectForm {
- width: 70%;
+ width: 60%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue b/north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue
index 3472b52..d0a4305 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue
@@ -1,23 +1,185 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
+<script setup>
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
-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: '1', width: 120, title: '鎶ュ伐鏃堕棿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: '2',width: 120, title: '宸ュ簭', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '3', width: 130,title: '鐝粍鍚嶇О', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '4',width: 120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5', width: 100,title: '娴佺▼鍗″彿', sortable: true,showOverflow:"ellipsis"},
+ {field: '6', width: 100,title: '浜у搧澶х被', sortable: true},
+ {field: '7',width: 100, title: '浜у搧灏忕被', sortable: true},
+ {field: '8',width: 120, title: '鍦ㄥ埗鍝佸悕绉�', sortable: true,showOverflow:"ellipsis"},
+ {field: '9', width: 110,title: '纾ㄨ竟绫诲瀷', sortable: true},
+ {field: '10', width: 100,title: '褰㈢姸', sortable: true},
+ {field: '11',width: 100, title: '鍘氬害', sortable: true},
+ {field: '12',width: 110, title: '瀹屽伐鏁伴噺', sortable: true},
+ {field: '13',width: 110, title: '瀹屽伐闈㈢Н', sortable: true},
+ {field: '14',width: 110, title: '骞虫柟姣背(澶�)', sortable: true},
+ {field: '15',width: 110, title: '鍖呰鏂瑰紡', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 1:'2023-01-01',
+ 2:'閽㈠寲',
+ 3:'閽㈠寲涓�鐝�',
+ 4:'閾跺窛澶фゼ',
+ 5:'NG23010121A01',
+ 6:'涓┖鐜荤拑',
+ 7:'骞充腑绌哄す鑳�',
+ 8:'5mmLYE-70骞抽挗(澶�)+20mmA(瀵�)+5mm瓒呯櫧骞抽挗(鍐�)',
+ 9:'绮剧(',
+ 10:'鏅瀷',
+ 11:'5',
+ 12:'11',
+ 13:'41.14',
+ 14:'123.33',
+ 15:'',
+
+ },
+ {
+ 1:'2023-01-01',
+ 2:'閽㈠寲',
+ 3:'閽㈠寲涓�鐝�',
+ 4:'閾跺窛澶фゼ',
+ 5:'NG23010121A01',
+ 6:'涓┖鐜荤拑',
+ 7:'骞充腑绌哄す鑳�',
+ 8:'5mmLYE-70骞抽挗(澶�)+20mmA(瀵�)+5mm瓒呯櫧骞抽挗(鍐�)',
+ 9:'绮剧(',
+ 10:'鏅瀷',
+ 11:'5',
+ 12:'11',
+ 13:'41.14',
+ 14:'123.33',
+ 15:'',
+
+ },
+ {
+ 1:'2023-01-01',
+ 2:'閽㈠寲',
+ 3:'閽㈠寲涓�鐝�',
+ 4:'閾跺窛澶фゼ',
+ 5:'NG23010121A01',
+ 6:'涓┖鐜荤拑',
+ 7:'骞充腑绌哄す鑳�',
+ 8:'5mmLYE-70骞抽挗(澶�)+20mmA(瀵�)+5mm瓒呯櫧骞抽挗(鍐�)',
+ 9:'绮剧(',
+ 10:'鏅瀷',
+ 11:'5',
+ 12:'11',
+ 13:'41.14',
+ 14:'123.33',
+ 15:'',
+
+ },
+ {
+ 1:'2023-01-01',
+ 2:'閽㈠寲',
+ 3:'閽㈠寲涓�鐝�',
+ 4:'閾跺窛澶фゼ',
+ 5:'NG23010121A01',
+ 6:'涓┖鐜荤拑',
+ 7:'骞充腑绌哄す鑳�',
+ 8:'5mmLYE-70骞抽挗(澶�)+20mmA(瀵�)+5mm瓒呯櫧骞抽挗(鍐�)',
+ 9:'绮剧(',
+ 10:'鏅瀷',
+ 11:'5',
+ 12:'11',
+ 13:'41.14',
+ 14:'123.33',
+ 15:'',
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['12','13','14']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
const value = ref('')
@@ -35,34 +197,27 @@
label: 'Option3',
},
]
-const tableData = [
- {
- 1:'2023-01-01',
- 2:'閽㈠寲',
- 3:'閽㈠寲涓�鐝�',
- 4:'閾跺窛澶фゼ',
- 5:'NG23010121A01',
- 6:'涓┖鐜荤拑',
- 7:'骞充腑绌哄す鑳�',
- 8:'5mmLYE-70骞抽挗(澶�)+20mmA(瀵�)+5mm瓒呯櫧骞抽挗(鍐�)',
- 9:'绮剧(',
- 10:'鏅瀷',
- 11:'5',
- 12:'11',
- 13:'41.14',
- 14:'123.33',
- 15:'',
- },
-]
+const form = reactive({
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+
+})
+
</script>
-<!--鐝粍浜ч噺-->
+
<template>
- <div class="div-main">
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
-<!-- <el-input placeholder="鐝粍鍚嶇О" v-model="form.name" style="width: 150px"/>-->
-<!-- <el-input placeholder="鍘氬害" v-model="form.name" style="width: 50px"/>-->
+ <!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
+ <!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
<el-date-picker
v-model="form.date1"
@@ -70,6 +225,7 @@
start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
:default-time="defaultTime"
+ style="width: 100px"
/>
<el-select v-model="value" class="m-2" placeholder="鏌ヨ绫诲瀷">
@@ -78,43 +234,58 @@
:key="item.value"
:label="item.label"
:value="item.value"
- style="width: 100px"
/>
</el-select>
<el-button type="primary">鏌ヨ</el-button>
</el-row>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="鎶ュ伐鏃堕棿" width="100px" />
- <el-table-column prop="2" label="宸ュ簭"/>
- <el-table-column prop="3" label="鐝粍鍚嶇О" width="100px" :show-overflow-tooltip='true' />
- <el-table-column prop="4" label="椤圭洰鍚嶇О" width="100px" :show-overflow-tooltip='true'/>
- <el-table-column prop="5" label="娴佺▼鍗″彿" width="130px"/>
- <el-table-column prop="6" label="浜у搧澶х被" width="100px"/>
- <el-table-column prop="7" label="浜у搧灏忕被" width="100px"/>
- <el-table-column prop="8" label="鍦ㄥ埗鍝佸悕绉�" width="120px" :show-overflow-tooltip='true'/>
- <el-table-column prop="9" label="纾ㄨ竟绫诲瀷" width="90px" :show-overflow-tooltip='true' />
- <el-table-column prop="10" label="褰㈢姸" />
- <el-table-column prop="11" label="鍘氬害" />
- <el-table-column prop="12" label="瀹屽伐鏁伴噺" :show-overflow-tooltip='true' width="100px" />
- <el-table-column prop="13" label="瀹屽伐闈㈢Н" width="100px"/>
- <el-table-column prop="14" label="骞虫柟姣背" width="100px"/>
- <el-table-column prop="15" label="鍖呰鏂瑰紡" width="100px"/>
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ <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>
-.div-main{
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
}
#selectForm {
- width: 70%;
+ width: 60%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
index 498b347..ebab984 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
@@ -1,23 +1,175 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
+<script setup>
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
-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: '1', width: 120, title: '宸ュ簭',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: '2',width: 120, title: '娴佺▼鍗″彿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '3', width: 130,title: '瀹㈡埛鍚嶇О', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '4',width: 120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5', width: 100,title: '鎵规', sortable: true,showOverflow:"ellipsis"},
+ {field: '6', width: 100,title: '搴忓彿', sortable: true},
+ {field: '7',width: 100, title: '褰㈢姸', sortable: true},
+ {field: '8',width: 120, title: '妤煎眰缂栧彿', sortable: true,showOverflow:"ellipsis"},
+ {field: '9', width: 120,title: '宸ヨ壓娴佺▼', sortable: true},
+ {field: '10', width: 120,title: '璁㈠崟鏁�', sortable: true},
+ {field: '11',width: 120, title: '瀹�', sortable: true},
+ {field: '12',width: 120, title: '楂�', sortable: true},
+ {field: '13',width: 120, title: '搴撳瓨鏁�', sortable: true},
+ {field: '14',width: 120, title: '搴撳瓨闈㈢Н', sortable: true},
+ {field: '15',width: 120, title: '鎴愬搧鍚嶇О', sortable: true},
+ {field: '16',width: 120, title: '鍦ㄥ埗鍝佸悕绉�', sortable: true},
+ {field: '17',width: 120, title: '寮挗鍗婂緞', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 1:'纾ㄨ竟',
+ 2:'NG22091906A02/1',
+ 3:'涓浗寤虹瓚瑁呴グ闆嗗洟鏈夐檺鍏徃',
+ 4:'閾跺窛缁垮湴涓績鍗楀(25鎵�2)',
+ 5:'25鎵�2',
+ 6:'褰㈢姸',
+ 7:'2',
+ 8:'25-BL19',
+ 9:'鍒囧壊->闀�鑶�->纾ㄨ竟->閽㈠寲->鍖呰',
+ 10:'40',
+ 11:'1345',
+ 12:'1556',
+ 13:'1',
+ 14:'1.99',
+ 15:'8mm瓒呯櫧銆怢YTM-46銆戝钩閽�',
+ 16:'8mm瓒呯櫧銆怢YTM-46銆戝钩閽�',
+ 17:'0',
+
+ },
+ {
+ 1:'纾ㄨ竟',
+ 2:'NG22091906A02/1',
+ 3:'涓浗寤虹瓚瑁呴グ闆嗗洟鏈夐檺鍏徃',
+ 4:'閾跺窛缁垮湴涓績鍗楀(25鎵�2)',
+ 5:'25鎵�2',
+ 6:'褰㈢姸',
+ 7:'2',
+ 8:'25-BL19',
+ 9:'鍒囧壊->闀�鑶�->纾ㄨ竟->閽㈠寲->鍖呰',
+ 10:'40',
+ 11:'1345',
+ 12:'1556',
+ 13:'1',
+ 14:'1.99',
+ 15:'8mm瓒呯櫧銆怢YTM-46銆戝钩閽�',
+ 16:'8mm瓒呯櫧銆怢YTM-46銆戝钩閽�',
+ 17:'0',
+
+ },
+ {
+ 1:'纾ㄨ竟',
+ 2:'NG22091906A02/1',
+ 3:'涓浗寤虹瓚瑁呴グ闆嗗洟鏈夐檺鍏徃',
+ 4:'閾跺窛缁垮湴涓績鍗楀(25鎵�2)',
+ 5:'25鎵�2',
+ 6:'褰㈢姸',
+ 7:'2',
+ 8:'25-BL19',
+ 9:'鍒囧壊->闀�鑶�->纾ㄨ竟->閽㈠寲->鍖呰',
+ 10:'40',
+ 11:'1345',
+ 12:'1556',
+ 13:'1',
+ 14:'1.99',
+ 15:'8mm瓒呯櫧銆怢YTM-46銆戝钩閽�',
+ 16:'8mm瓒呯櫧銆怢YTM-46銆戝钩閽�',
+ 17:'0',
+
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['finishedNumber','finishedArea','wornNumber','wornArea']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
const value = ref('')
@@ -35,36 +187,27 @@
label: 'Option3',
},
]
-const tableData = [
- {
- 1:'纾ㄨ竟',
- 2:'NG22091906A02/1',
- 3:'涓浗寤虹瓚瑁呴グ闆嗗洟鏈夐檺鍏徃',
- 4:'閾跺窛缁垮湴涓績鍗楀(25鎵�2)',
- 5:'25鎵�2',
- 6:'褰㈢姸',
- 7:'2',
- 8:'25-BL19',
- 9:'鍒囧壊->闀�鑶�->纾ㄨ竟->閽㈠寲->鍖呰',
- 10:'40',
- 11:'1345',
- 12:'1556',
- 13:'1',
- 14:'1.99',
- 15:'8mm瓒呯櫧銆怢YTM-46銆戝钩閽�',
- 16:'8mm瓒呯櫧銆怢YTM-46銆戝钩閽�',
- 17:'0',
- },
-]
+const form = reactive({
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+
+})
+
</script>
-<!--鍦ㄥ埗鍝佹姤琛�-->
+
<template>
- <div class="div-main">
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
-<!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
-<!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
+ <!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
+ <!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
<el-date-picker
v-model="form.date1"
@@ -87,38 +230,52 @@
</el-row>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="宸ュ簭" />
- <el-table-column prop="2" label="娴佺▼鍗″彿" width="120px" :show-overflow-tooltip='true'/>
- <el-table-column prop="3" label="瀹㈡埛鍚嶇О" width="120px" :show-overflow-tooltip='true' />
- <el-table-column prop="4" label="椤圭洰鍚嶇О" width="120px" :show-overflow-tooltip='true'/>
- <el-table-column prop="5" label="鎵规" />
- <el-table-column prop="6" label="搴忓彿" />
- <el-table-column prop="7" label="褰㈢姸"/>
- <el-table-column prop="8" label="妤煎眰缂栧彿" width="120px" :show-overflow-tooltip='true'/>
- <el-table-column prop="9" label="宸ヨ壓娴佺▼" width="120px" :show-overflow-tooltip='true' />
- <el-table-column prop="10" label="璁㈠崟鏁�" />
- <el-table-column prop="11" label="瀹�" />
- <el-table-column prop="12" label="楂�" :show-overflow-tooltip='true' />
- <el-table-column prop="13" label="搴撳瓨鏁�" />
- <el-table-column prop="14" label="搴撳瓨闈㈢Н" width="100px"/>
- <el-table-column prop="15" label="鎴愬搧鍚嶇О" width="120px" :show-overflow-tooltip='true'/>
- <el-table-column prop="16" label="鍦ㄥ埗鍝佸悕绉�" width="120px" :show-overflow-tooltip='true'/>
- <el-table-column prop="17" label="寮挗鍗婂緞" width="100px"/>
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ <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>
-.div-main{
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
}
#selectForm {
- width: 70%;
+ width: 60%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/Yield.vue b/north-glass-erp/northglass-erp/src/views/pp/report/Yield.vue
index 0796907..1ba0deb 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/Yield.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/Yield.vue
@@ -1,23 +1,151 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
+<script setup>
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+//瀛愮粍浠舵帴鏀跺弬鏁�
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
-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: '1', title: '宸ュ簭',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: '2', title: '閿�鍞崟鍙�', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '3',title: '瀹㈡埛鍚嶇О', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: '4', title: '鎴愬搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5',title: '瀹屽伐闈㈢Н', sortable: true,showOverflow:"ellipsis"},
+ {field: '6',title: '娆$牬闈㈢Н', sortable: true},
+ {field: '7', title: '鎬婚潰绉�', sortable: true},
+ {field: '8', title: '鎴愬搧鐜�', sortable: true,},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 1:'澶瑰眰',
+ 2:'NG23103001',
+ 3:'鎱曢潚鏂囧寲',
+ 4:'10mmLYTM-140寮挗鍖�(澶�)+2.28PVB閫忔槑+10mm鐧界幓寮挗鍖�(鍐�)',
+ 5:'256.67',
+ 6:'7.94',
+ 7:'264.61',
+ 8:'97.0%',
+
+ },
+ {
+ 1:'澶瑰眰',
+ 2:'NG23103001',
+ 3:'鎱曢潚鏂囧寲',
+ 4:'10mmLYTM-140寮挗鍖�(澶�)+2.28PVB閫忔槑+10mm鐧界幓寮挗鍖�(鍐�)',
+ 5:'256.67',
+ 6:'7.94',
+ 7:'264.61',
+ 8:'97.0%',
+
+ },
+ {
+ 1:'澶瑰眰',
+ 2:'NG23103001',
+ 3:'鎱曢潚鏂囧寲',
+ 4:'10mmLYTM-140寮挗鍖�(澶�)+2.28PVB閫忔槑+10mm鐧界幓寮挗鍖�(鍐�)',
+ 5:'256.67',
+ 6:'7.94',
+ 7:'264.61',
+ 8:'97.0%',
+
+ },
+ {
+ 1:'澶瑰眰',
+ 2:'NG23103001',
+ 3:'鎱曢潚鏂囧寲',
+ 4:'10mmLYTM-140寮挗鍖�(澶�)+2.28PVB閫忔槑+10mm鐧界幓寮挗鍖�(鍐�)',
+ 5:'256.67',
+ 6:'7.94',
+ 7:'264.61',
+ 8:'97.0%',
+
+ },
+
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['5','6','7']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
const value = ref('')
@@ -35,27 +163,27 @@
label: 'Option3',
},
]
-const tableData = [
- {
- 1:'澶瑰眰',
- 2:'NG23103001',
- 3:'鎱曢潚鏂囧寲',
- 4:'10mmLYTM-140寮挗鍖�(澶�)+2.28PVB閫忔槑+10mm鐧界幓寮挗鍖�(鍐�)',
- 5:'256.67',
- 6:'7.94',
- 7:'264.61',
- 8:'97.0%',
- },
-]
+const form = reactive({
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+
+})
+
</script>
-<!--鎴愬搧鐜囨姤琛�-->
+
<template>
- <div class="div-main">
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
-<!-- <el-input placeholder="宸ュ簭" v-model="form.name" style="width: 100px"/>-->
-<!-- <el-input placeholder="瀹㈡埛鍚嶇О" v-model="form.name" style="width: 120px"/>-->
+ <!-- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 150px"/>-->
+ <!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 150px"/>-->
<el-date-picker
v-model="form.date1"
@@ -63,6 +191,7 @@
start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
:default-time="defaultTime"
+ style="width: 100px"
/>
<el-select v-model="value" class="m-2" placeholder="鏌ヨ绫诲瀷">
@@ -77,29 +206,52 @@
</el-row>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="1" label="宸ュ簭" />
- <el-table-column prop="2" label="閿�鍞崟鍙�"/>
- <el-table-column prop="3" label="瀹㈡埛鍚嶇О" :show-overflow-tooltip='true' />
- <el-table-column prop="4" label="鎴愬搧鍚嶇О" :show-overflow-tooltip='true'/>
- <el-table-column prop="5" label="瀹屽伐闈㈢Н" />
- <el-table-column prop="6" label="娆$牬闈㈢Н" />
- <el-table-column prop="7" label="鎬婚潰绉�"/>
- <el-table-column prop="8" label="鎴愬搧鐜�"/>
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ <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>
-.div-main{
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
}
#selectForm {
- width: 70%;
+ width: 60%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
index 686d4b1..397022b 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -1,124 +1,239 @@
<script setup>
-import { reactive } from 'vue'
-import {Open} from "@element-plus/icons-vue";
+import {reactive} from "vue";
+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
+ }
+ }
+}
-// do not use same name with ref
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
const form = reactive({
- lckh:'',
+ lckh: 'NG23120801A01/1'
+})
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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},
+ {field: 'serialNumber',width:90, title: '搴忓彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'singlePieceName',width:120, title: '鍗曠墖鍚嶇О', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'marking',width:90, title: '鏍囪', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'pieces',width:100, title: '鐗囨爣璁�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'processCardNumber',width:110, title: '娴佺▼鍗℃暟閲�', sortable: true,showOverflow:"ellipsis"},
+ {field: 'width',width:70, title: '瀹�', sortable: true},
+ {field: 'height',width:70, title: '楂�', sortable: true},
+ {field: 'shape',width:70, title: '褰㈢姸', sortable: true,showOverflow:"ellipsis"},
+ {field: 'upCompletedQuantity',width:120, title: '涓婂伐瀹屽伐鏁伴噺', sortable: true},
+ {field: 'completedQuantity',width:100, title: '瀹屽伐鏁伴噺', sortable: true},
+ {field: 'numberBroken',width:100, title: '娆$牬鏁伴噺', sortable: true},
+ {field: 'availableUse',width:80, title: '鍙埄鐢�', sortable: true},
+ {field: 'returnProcess',width:100, title: '閫�鍥炲伐搴�', sortable: true},
+ {field: 'reasonType',width:100, title: '娆$牬绫诲瀷', sortable: true},
+ {field: 'reasonDamage',width:100, title: '娆$牬鍘熷洜', sortable: true},
+ {field: 'responsibilityDevice',width:100, title: '璐d换璁惧', sortable: true},
+ {field: 'responsibilityProcess',width:100, title: '璐d换宸ュ簭', sortable: true},
+ {field: 'responsibilityTeams',width:100, title: '璐d换鐝粍', sortable: true},
+ {field: 'responsibilityPersonnel',width:100, title: '璐d换浜哄憳', sortable: true},
+ {field: 'completed', width:90,title: '宸插畬宸�', sortable: true},
+ {field: 'onceBroken', width:90,title: '宸叉鐮�', sortable: true}
+
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ buttons: [
+ { code: 'empty', name: '娓呯┖鎶ュ伐鏁伴噺' },
+ { code: 'sameCompletion', name: '瀹屽伐鐩稿悓' },
+ { code: 'sameDamage', name: '娆$牬鐩稿悓' },
+ { code: 'sameOneCompletion', name: '瀹屽伐涓�鍒楃浉鍚�' },
+ { code: 'sameOneDamage', name: '娆$牬涓�鍒楃浉鍚�' },
+ {code: 'print_lck', name: '淇濆瓨',status:'primary' ,icon:'vxe-icon-save'},
+ {code: 'print_lck', name: '淇濆瓨骞跺鏍�',status:'primary' ,icon:'vxe-icon-save'},
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ serialNumber:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '11',
+ completedQuantity: '1',
+ numberBroken:'',
+ availableUse:'',
+ returnProcess:'',
+
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ available:'',
+ reworkProcess:'',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ completed:'',
+ onceBroken:'',
+ },
+ {
+ serialNumber:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(鍐�)',
+ marking: '2',
+ pieces: '(鍐�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '11',
+ completedQuantity: '1',
+ numberBroken:'',
+ availableUse:'',
+ returnProcess:'',
+
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ available:'',
+ reworkProcess:'',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ completed:'',
+ onceBroken:'',
+ },
+ {
+ serialNumber:'2',
+ singlePieceName: '8mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '11',
+ completedQuantity: '1',
+ numberBroken:'',
+ availableUse:'',
+ returnProcess:'',
+
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ available:'',
+ reworkProcess:'',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ completed:'',
+ onceBroken:'',
+ },
+ {
+ serialNumber:'2',
+ singlePieceName: '8mm鐧界幓骞抽挗(鍐�)',
+ marking: '2',
+ pieces: '(鍐�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '11',
+ completedQuantity: '1',
+ numberBroken:'',
+ availableUse:'',
+ returnProcess:'',
+
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ available:'',
+ reworkProcess:'',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ completed:'',
+ onceBroken:'',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['processCardNumber','upCompletedQuantity','completedQuantity','numberBroken','']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
-const tableData = [
- {
- serialNumber:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'',
- availableUse:'',
- returnProcess:'',
-
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- available:'',
- reworkProcess:'',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- completed:'',
- onceBroken:'',
- },
- {
- serialNumber:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(鍐�)',
- marking: '2',
- pieces: '(鍐�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'',
- availableUse:'',
- returnProcess:'',
-
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- available:'',
- reworkProcess:'',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- completed:'',
- onceBroken:'',
- },
- {
- serialNumber:'2',
- singlePieceName: '8mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'',
- availableUse:'',
- returnProcess:'',
-
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- available:'',
- reworkProcess:'',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- completed:'',
- onceBroken:'',
- },
- {
- serialNumber:'2',
- singlePieceName: '8mm鐧界幓骞抽挗(鍐�)',
- marking: '2',
- pieces: '(鍐�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'',
- availableUse:'',
- returnProcess:'',
-
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- available:'',
- reworkProcess:'',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- completed:'',
- onceBroken:'',
- },
-]
</script>
<template>
<div>
<div id="head">
- <el-input placeholder="娴佺▼鍗″彿" v-model="form.name" style="width: 200px"/>
+ <el-input placeholder="娴佺▼鍗″彿" v-model="form.lckh" style="width: 200px"/>
<select class="processesSt">
@@ -172,55 +287,76 @@
<td>1</td>
</tr>
<tr>
- <td></td>
- <td></td>
- <td><el-button type="primary">淇濆瓨</el-button></td>
- <td><el-button type="primary">淇濆瓨骞跺鏍�</el-button></td>
- <td><el-button type="primary">娓呯┖鎶ュ伐鏁伴噺</el-button></td>
- <td><el-button type="primary">瀹屽伐鐩稿悓</el-button></td>
- <td><el-button type="primary">娆$牬鐩稿悓</el-button></td>
+ <td>鍗曠墖娆$牬</td>
+ <td>
+ <el-select v-model="value" placeholder="鍏佽" >
+ <el-option
+ v-for="item in options"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value">
+ </el-option>
+ </el-select>
+ </td>
- <td><el-button type="primary">瀹屽伐涓�鍒楃浉鍚�</el-button></td>
- <td><el-button type="primary">娆$牬涓�鍒楃浉鍚�</el-button></td>
- <td><el-button type="primary">鏄惁鍏佽</el-button></td>
+ <td></td>
+ <td></td>
+ <td></td>
+
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
</tr>
</table>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="serialNumber" label="搴忓彿" width="60" />
- <el-table-column prop="singlePieceName" :show-overflow-tooltip='true' label="鍗曠墖鍚嶇О" width="120" />
- <el-table-column prop="marking" label="鏍囪" width="60" />
- <el-table-column prop="pieces" label="鐗囨爣璁�" width="70" />
- <el-table-column prop="processCardNumber" label="娴佺▼鍗℃暟閲�" width="95" />
- <el-table-column prop="width" label="瀹�" width="60" />
- <el-table-column prop="height" label="楂�" width="60" />
- <el-table-column prop="shape" label="褰㈢姸" :show-overflow-tooltip='true' width="60" />
- <el-table-column prop="upCompletedQuantity" label="涓婂伐瀹屽伐鏁伴噺" width="110" />
- <el-table-column prop="completedQuantity" label="瀹屽伐鏁伴噺" width="85" />
- <el-table-column prop="numberBroken" label="娆$牬鏁伴噺" width="85" />
- <el-table-column prop="availableUse" label="鍙埄鐢�" width="70" />
- <el-table-column prop="returnProcess" label="閫�鍥炲伐搴�" width="85" />
- <el-table-column prop="reasonType" label="娆$牬绫诲瀷" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="reasonDamage" label="娆$牬鍘熷洜" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityDevice" label="璐d换璁惧" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityProcess" label="璐d换宸ュ簭" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityTeams" label="璐d换鐝粍" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityPersonnel" label="璐d换浜哄憳" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="completed" label="宸插畬宸�" width="90" />
- <el-table-column prop="onceBroken" label="宸叉鐮�" width="90" />
+ <div class="main-div-customer">
+ <vxe-grid
+ max-height="100%"
+ min-height="100px"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+ size="small"
+
+ >
+ <!-- @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>
-
-
-
- </el-table><!-- <h1>{{msg}}</h1> -->
+ </vxe-grid>
</div>
</div>
</template>
<style scoped>
+
.processCard{
width: 140px;
}
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInReviewDetail.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInReviewDetail.vue
index 860e8fe..f53a8b9 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInReviewDetail.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInReviewDetail.vue
@@ -1,192 +1,274 @@
<script setup>
-import { reactive } from 'vue'
-// do not use same name with ref
-const form = reactive({
- lckh:'',
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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: 'serialNumber', width: 120, title: '搴忓彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'singlePieceName',width: 120, title: '鍗曠墖鍚嶇О', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'marking', width: 130,title: '鏍囪', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'pieces',width: 120, title: '鐗囨爣璁�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'processCardNumber', width: 100,title: '娴佺▼鍗℃暟閲�', sortable: true,showOverflow:"ellipsis"},
+ {field: 'width', width: 100,title: '瀹�', sortable: true},
+ {field: 'height',width: 100, title: '楂�', sortable: true},
+ {field: 'shape',width: 120, title: '褰㈢姸', sortable: true,showOverflow:"ellipsis"},
+ {field: 'upCompletedQuantity', width: 120,title: '涓婂伐瀹屽伐鏁伴噺', sortable: true},
+ {field: 'completedQuantity',width: 120, title: '瀹屽伐鏁伴噺', sortable: true},
+ {field: 'numberBroken',width: 120, title: '娆$牬鏁伴噺', sortable: true},
+ {field: 'availableUse',width: 120, title: '鍙埄鐢�', sortable: true},
+ {field: 'returnProcess',width: 120, title: '閫�鍥炲伐搴�', sortable: true},
+ {field: 'reasonType',width: 120, title: '娆$牬绫诲瀷', sortable: true},
+ {field: 'reasonDamage',width: 120, title: '娆$牬鍘熷洜', sortable: true},
+ {field: 'responsibilityDevice',width: 120, title: '璐d换璁惧', sortable: true},
+ {field: 'responsibilityProcess',width: 120, title: '璐d换宸ュ簭', sortable: true},
+ {field: 'responsibilityTeams',width: 120, title: '璐d换鐝粍', sortable: true},
+ {field: 'responsibilityPersonnel',width: 120, title: '璐d换浜哄憳', sortable: true},
+ {field: 'completed',width: 90, title: '宸插畬宸�', sortable: true},
+ {field: 'onceBroken',width: 90, title: '宸叉鐮�', sortable: true},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ buttons: [
+ {code: 'print_lck', name: '瀹℃牳閫氳繃',status:'primary' },
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ serialNumber:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '12',
+ completedQuantity: '1',
+ numberBroken:'',
+ availableUse:'',
+ returnProcess:'',
+
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ available:'',
+ reworkProcess:'',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ completed:'',
+ onceBroken:'',
+ },
+ {
+ serialNumber:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(鍐�)',
+ marking: '2',
+ pieces: '(鍐�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '12',
+ completedQuantity: '1',
+ numberBroken:'',
+ availableUse:'',
+ returnProcess:'',
+
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ available:'',
+ reworkProcess:'',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ completed:'',
+ onceBroken:'',
+ },
+ {
+ serialNumber:'2',
+ singlePieceName: '8mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '12',
+ completedQuantity: '1',
+ numberBroken:'',
+ availableUse:'',
+ returnProcess:'',
+
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ available:'',
+ reworkProcess:'',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ completed:'',
+ onceBroken:'',
+ },
+ {
+ serialNumber:'2',
+ singlePieceName: '8mm鐧界幓骞抽挗(鍐�)',
+ marking: '2',
+ pieces: '(鍐�)',
+ processCardNumber: '11',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ upCompletedQuantity: '12',
+ completedQuantity: '1',
+ numberBroken:'',
+ availableUse:'',
+ returnProcess:'',
+
+ reasonType: '鏈哄櫒',
+ reasonDamage:'姘旀场瓒呮爣',
+ available:'',
+ reworkProcess:'',
+ responsibilityProcess:'涓┖',
+ responsibilityTeams:'涓┖涓�鐝�',
+ responsibilityPersonnel:'',
+ responsibilityDevice:'涓┖3#绾�',
+ completed:'',
+ onceBroken:'',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['processCardNumber','upCompletedQuantity','completedQuantity','numberBroken','completed','onceBroken']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
-const tableData = [
- {
- serialNumber:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'',
- availableUse:'',
- returnProcess:'',
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- available:'',
- reworkProcess:'',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- completed:'',
- onceBroken:'',
- },
- {
- serialNumber:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(鍐�)',
- marking: '2',
- pieces: '(鍐�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'',
- availableUse:'',
- returnProcess:'',
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- available:'',
- reworkProcess:'',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- completed:'',
- onceBroken:'',
- },
- {
- serialNumber:'2',
- singlePieceName: '8mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'',
- availableUse:'',
- returnProcess:'',
-
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- available:'',
- reworkProcess:'',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- completed:'',
- onceBroken:'',
- },
- {
- serialNumber:'2',
- singlePieceName: '8mm鐧界幓骞抽挗(鍐�)',
- marking: '2',
- pieces: '(鍐�)',
- processCardNumber: '11',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- upCompletedQuantity: '12',
- completedQuantity: '1',
- numberBroken:'',
- availableUse:'',
- returnProcess:'',
-
- reasonType: '鏈哄櫒',
- reasonDamage:'姘旀场瓒呮爣',
- available:'',
- reworkProcess:'',
- responsibilityProcess:'涓┖',
- responsibilityTeams:'涓┖涓�鐝�',
- responsibilityPersonnel:'',
- responsibilityDevice:'涓┖3#绾�',
- completed:'',
- onceBroken:'',
- },
-]
</script>
<template>
+ <div class="main-div-customer">
- <div>
- <div class="adopt" style="float: right">
- <el-button type="primary">閫氳繃</el-button>
- </div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column prop="serialNumber" label="搴忓彿" width="60" />
- <el-table-column prop="singlePieceName" :show-overflow-tooltip='true' label="鍗曠墖鍚嶇О" width="120" />
- <el-table-column prop="marking" label="鏍囪" width="60" />
- <el-table-column prop="pieces" label="鐗囨爣璁�" width="70" />
- <el-table-column prop="processCardNumber" label="娴佺▼鍗℃暟閲�" width="95" />
- <el-table-column prop="width" label="瀹�" width="60" />
- <el-table-column prop="height" label="楂�" width="60" />
- <el-table-column prop="shape" label="褰㈢姸" :show-overflow-tooltip='true' width="60" />
- <el-table-column prop="upCompletedQuantity" label="涓婂伐瀹屽伐鏁伴噺" width="110" />
- <el-table-column prop="completedQuantity" label="瀹屽伐鏁伴噺" width="85" />
- <el-table-column prop="numberBroken" label="娆$牬鏁伴噺" width="85" />
- <el-table-column prop="availableUse" label="鍙埄鐢�" width="70" />
- <el-table-column prop="returnProcess" label="閫�鍥炲伐搴�" width="85" />
- <el-table-column prop="reasonType" label="娆$牬绫诲瀷" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="reasonDamage" label="娆$牬鍘熷洜" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityDevice" label="璐d换璁惧" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityProcess" label="璐d换宸ュ簭" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityTeams" label="璐d换鐝粍" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="responsibilityPersonnel" label="璐d换浜哄憳" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="completed" label="宸插畬宸�" width="90" />
- <el-table-column prop="onceBroken" label="宸叉鐮�" width="90" />
+ <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>
-
-
-
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
-
+ </vxe-grid>
+ </div>
</template>
<style scoped>
-
-.processCard{
- width: 140px;
-}
-.processesSt{
- height: 33px;
- width: 80px;
- background-color: #409eff;
- color: white;
- border: none;
- border-radius: 5px;
-}
-#titleTable tr,#titleTable td{
- border: 1px solid #000;
-}
-#titleTable{
- border-collapse: collapse;
- text-align: center;
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
-}
-#titleTable td{
- width: 100px;
- height: 30px;
-}
-#titleTable td:nth-child(1){
- width: 100px;
- height: 30px;
-}
-#titleTable td:nth-child(2){
- width: 100px;
-}
-.chaxun{
- background-color:#D5EAFF;
- border: none;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInspectionReview.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInspectionReview.vue
index 5cfdacf..a29e9d3 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInspectionReview.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInspectionReview.vue
@@ -1,107 +1,199 @@
-<script lang="ts" setup>
-import { reactive } from 'vue'
-import { ref } from 'vue'
-const value = ref('')
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
+<script setup>
-// do not use same name with ref
-const form = reactive({
- name: '',
- region: '',
- date1: '',
- date2: '',
- delivery: false,
- type: [],
- resource: '',
- desc: '',
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/QualityInReviewDetail', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑瀹℃牳鐘舵��')
+ break
+ }
+ }
+}
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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 },
+ {title: '鎿嶄綔', width: 120, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'reportingWorkNo',width: 120, title: '鎶ュ伐缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'reportingWorkTime',width: 120, title: '鎶ュ伐鏃堕棿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'entryName',width: 120, title: '椤圭洰鍚嶇О', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'customerName',width: 120, title: '瀹㈡埛鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'thisProcess',width: 100, title: '鏈伐搴�', sortable: true,showOverflow:"ellipsis"},
+ {field: 'teamName',width: 110, title: '鎶ュ伐鐝粍', sortable: true},
+ {field: 'finishedNumber',width: 100, title: '瀹屽伐鏁伴噺', sortable: true},
+ {field: 'wornNumber', width: 100,title: '娆$牬鏁伴噺', sortable: true},
+ {field: 'responsibilityProcess',width: 100, title: '璐d换宸ュ簭', sortable: true},
+ {field: 'previousProcess', width: 100,title: '涓婂伐搴�', sortable: true},
+ {field: 'nextProcess',width: 100, title: '涓嬪伐搴�', sortable: true},
+ {field: 'qualityInspector',width: 120, title: '璐ㄦ鍛�', sortable: true},
+ {field: 'qualityState',width: 120, title: '璐ㄦ鐘舵��', sortable: true},
+ {field: 'notes',width: 120, title: '澶囨敞', sortable: true}
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ reportingWorkNo: 'BG2312070001',
+ reportingWorkTime: '2023-12-01 08:01:22',
+ processCard: 'NG231207A01',
+ entryName: '淇″悎鏄ュぉ閲�',
+ customerName: 'XXXX',
+ thisProcess: '涓┖',
+ teamName:"涓┖涓�鐝�",
+ finishedNumber: '11',
+ wornNumber: '1',
+ responsibilityProcess: '閽㈠寲',
+ previousProcess:'閽㈠寲',
+ nextProcess:'鍖呰',
+ qualityInspector: 'XXX',
+ qualityState: '1',
+ notes: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ reportingWorkNo: 'BG2312070002',
+ reportingWorkTime: '2023-12-01 08:01:22',
+ processCard: 'NG231207A01',
+ entryName: '淇″悎鏄ュぉ閲�',
+ customerName: 'XXXX',
+ thisProcess: '涓┖',
+ teamName:"涓┖涓�鐝�",
+ finishedNumber: '11',
+ wornNumber: '1',
+ responsibilityProcess: '閽㈠寲',
+ previousProcess:'閽㈠寲',
+ nextProcess:'鍖呰',
+ qualityInspector: 'XXX',
+ qualityState: '1',
+ notes: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ reportingWorkNo: 'BG2312070003',
+ reportingWorkTime: '2023-12-01 08:01:22',
+ processCard: 'NG231207A01',
+ entryName: '淇″悎鏄ュぉ閲�',
+ customerName: 'XXXX',
+ thisProcess: '涓┖',
+ teamName:"涓┖涓�鐝�",
+ finishedNumber: '11',
+ wornNumber: '1',
+ responsibilityProcess: '閽㈠寲',
+ previousProcess:'閽㈠寲',
+ nextProcess:'鍖呰',
+ qualityInspector: 'XXX',
+ qualityState: '1',
+ notes: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ reportingWorkNo: 'BG2312070004',
+ reportingWorkTime: '2023-12-01 08:01:22',
+ processCard: 'NG231207A01',
+ entryName: '淇″悎鏄ュぉ閲�',
+ customerName: 'XXXX',
+ thisProcess: '涓┖',
+ teamName:"涓┖涓�鐝�",
+ finishedNumber: '11',
+ wornNumber: '1',
+ responsibilityProcess: '閽㈠寲',
+ previousProcess:'閽㈠寲',
+ nextProcess:'鍖呰',
+ qualityInspector: 'XXX',
+ qualityState: '1',
+ notes: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['finishedNumber','wornNumber']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
})
-const tableData = [
- {
- reportingWorkNo: 'BG2312070001',
- reportingWorkTime: '2023-12-01 08:01:22',
- processCard: 'NG231207A01',
- entryName: '淇″悎鏄ュぉ閲�',
- customerName: 'XXXX',
- thisProcess: '涓┖',
- teamName:"涓┖涓�鐝�",
- finishedNumber: '11',
- wornNumber: '1',
- responsibilityProcess: '閽㈠寲',
- previousProcess:'閽㈠寲',
- nextProcess:'鍖呰',
- qualityInspector: 'XXX',
- qualityState: '1',
- notes: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- reportingWorkNo: 'BG2312070002',
- reportingWorkTime: '2023-12-01 08:01:22',
- processCard: 'NG231207A01',
- entryName: '淇″悎鏄ュぉ閲�',
- customerName: 'XXXX',
- thisProcess: '涓┖',
- teamName:"涓┖涓�鐝�",
- finishedNumber: '11',
- wornNumber: '1',
- responsibilityProcess: '閽㈠寲',
- previousProcess:'閽㈠寲',
- nextProcess:'鍖呰',
- qualityInspector: 'XXX',
- qualityState: '1',
- notes: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- reportingWorkNo: 'BG2312070003',
- reportingWorkTime: '2023-12-01 08:01:22',
- processCard: 'NG231207A01',
- entryName: '淇″悎鏄ュぉ閲�',
- customerName: 'XXXX',
- thisProcess: '涓┖',
- teamName:"涓┖涓�鐝�",
- finishedNumber: '11',
- wornNumber: '1',
- responsibilityProcess: '閽㈠寲',
- previousProcess:'閽㈠寲',
- nextProcess:'鍖呰',
- qualityInspector: 'XXX',
- qualityState: '1',
- notes: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- reportingWorkNo: 'BG2312070004',
- reportingWorkTime: '2023-12-01 08:01:22',
- processCard: 'NG231207A01',
- entryName: '淇″悎鏄ュぉ閲�',
- customerName: 'XXXX',
- thisProcess: '涓┖',
- teamName:"涓┖涓�鐝�",
- finishedNumber: '11',
- wornNumber: '1',
- responsibilityProcess: '閽㈠寲',
- previousProcess:'閽㈠寲',
- nextProcess:'鍖呰',
- qualityInspector: 'XXX',
- qualityState: '1',
- notes: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
-]
+
+
</script>
<template>
- <div>
+ <div class="main-div-customer">
<div style="width: 600px">
<el-row :gutter="0">
-<!-- <el-input placeholder="娴佺▼鍗″彿" v-model="form.name" style="width: 200px"/>-->
-<!-- -->
- <select class="processesSt">
- <option value="鏈鏍�">鏈鏍�</option>
- <option value="宸插鏍�">宸插鏍�</option>
- </select>
-
+ <!-- <el-input placeholder="娴佺▼鍗″彿" v-model="form.name" style="width: 200px"/>-->
+ <!-- -->
+<!-- <select class="processesSt">-->
+<!-- <option value="鏈鏍�">鏈鏍�</option>-->
+<!-- <option value="宸插鏍�">宸插鏍�</option>-->
+<!-- </select>-->
+
<el-date-picker
v-model="value"
type="daterange"
@@ -114,44 +206,47 @@
<el-button type="primary">鏌ヨ</el-button>
</el-row>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column fixed label="鎿嶄綔" width="60" >
- <el-button link type="primary" size="small">閫氳繃</el-button>
- </el-table-column>
- <el-table-column sortable prop="reportingWorkNo" label="鎶ュ伐缂栧彿" width="120" >
- <template v-slot="scope">
- <router-link :to="{path:'QualityInReviewDetail'}" >{{scope.row.reportingWorkNo}}</router-link>
- </template>
- </el-table-column>
- <el-table-column prop="reportingWorkTime" label="鎶ュ伐鏃堕棿" width="155" />
- <el-table-column prop="processCard" label="娴佺▼鍗″彿" width="125" />
- <el-table-column prop="entryName" label="椤圭洰鍚嶇О" :show-overflow-tooltip='true' width="155" />
- <el-table-column prop="customerName" label="瀹㈡埛鍚嶇О" :show-overflow-tooltip='true' width="155" />
- <el-table-column prop="thisProcess" label="鏈伐搴�" width="70" />
- <el-table-column prop="teamName" label="鎶ュ伐鐝粍" width="95" />
- <el-table-column prop="finishedNumber" label="瀹屽伐鏁伴噺" width="85" />
- <el-table-column prop="wornNumber" label="娆$牬鏁伴噺" width="85" />
- <el-table-column prop="responsibilityProcess" label="璐d换宸ュ簭" width="85" />
- <el-table-column prop="previousProcess" label="涓婂伐搴�" width="70" />
- <el-table-column prop="nextProcess" label="涓嬪伐搴�" width="70" />
- <el-table-column prop="qualityInspector" label="璐ㄦ鍛�" width="80" />
- <el-table-column prop="qualityState" label="璐ㄦ鐘舵��" width="90" />
- <el-table-column prop="notes" label="澶囨敞" :show-overflow-tooltip='true' width="350" />
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ <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>
+ </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>
-.processesSt{
- height: 33px;
- width: 80px;
- background-color: #409eff;
- color: white;
- border: none;
- border-radius: 5px;
+.main-div-customer{
+ width: 99%;
+ height: 100%;
}
-
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
index e555543..6947d90 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
@@ -1,8 +1,198 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
-import {useRouter} from "vue-router";
+<script setup>
-// do not use same name with ref
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/reportingWorks/AddReportingWork', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍙嶅鐘舵��')
+ break
+ }
+ }
+}
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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 },
+ {title: '鎿嶄綔', width: 140, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'reportingWorkNo', width: 120, title: '鎶ュ伐缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'reportingWorkTime',width: 120, title: '鎶ュ伐鏃堕棿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'processCard', width: 130,title: '娴佺▼鍗″彿', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'entryName',width: 120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'batch', width: 100,title: '鎵规', sortable: true,showOverflow:"ellipsis"},
+ {field: 'device', width: 100,title: '璁惧', sortable: true},
+ {field: 'thisProcess',width: 100, title: '鏈伐搴�', sortable: true},
+ {field: 'finishedNumber',width: 120, title: '鏈伐搴忓畬宸�', sortable: true,showOverflow:"ellipsis"},
+ {field: 'finishedArea', width: 120,title: '瀹屽伐闈㈢Н', sortable: true},
+ {field: 'wornNumber',width: 120, title: '鏈伐搴忔鐮�', sortable: true},
+ {field: 'wornArea',width: 120, title: '娆$牬闈㈢Н', sortable: true},
+ {field: 'teamName',width: 120, title: '鐝粍鍚嶇О', sortable: true}
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ reportingWorkNo: 'BG2312080011',
+ reportingWorkTime: '2023-12-08 09:05:58',
+ processCard: 'NG23120801A01',
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '鍥涙壒浜�',
+ device:'澶ф捣鍒╁畞',
+ thisProcess: '鍒囧壊',
+ finishedNumber: '13',
+ finishedArea: '44.22',
+ wornNumber: '',
+ wornArea: '',
+ teamName:'鍒囧壊涓�鐝�'
+ },
+ {
+ reportingWorkNo: 'BG2312080013',
+ reportingWorkTime: '2023-12-08 09:05:58',
+ processCard: 'NG23120801A01',
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '涓�鎵逛簩',
+ device:'澶ф捣鍒╁畞',
+ thisProcess: '鍒囧壊',
+ finishedNumber: '13',
+ finishedArea: '44.22',
+ wornNumber: '',
+ wornArea: '',
+ teamName:'鍒囧壊涓�鐝�'
+ },
+ {
+ reportingWorkNo: 'BG2311080025',
+ reportingWorkTime: '2023-12-08 09:05:58',
+ processCard: 'NG23120801A01',
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '涓�鎵逛簩',
+ device:'澶ф捣鍒╁畞',
+ thisProcess: '鍒囧壊',
+ finishedNumber: '13',
+ finishedArea: '44.22',
+ wornNumber: '',
+ wornArea: '',
+ teamName:'鍒囧壊涓�鐝�'
+ },
+ {
+ reportingWorkNo: 'BG2303080025',
+ reportingWorkTime: '2023-12-08 09:05:58',
+ processCard: 'NG23120801A01',
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '涓�鎵逛簩',
+ device:'澶ф捣鍒╁畞',
+ thisProcess: '鍒囧壊',
+ finishedNumber: '13',
+ finishedArea: '44.22',
+ wornNumber: '',
+ wornArea: '',
+ teamName:'鍒囧壊涓�鐝�'
+ },
+ {
+ reportingWorkNo: 'BG2312080001',
+ reportingWorkTime: '2023-12-08 09:05:58',
+ processCard: 'NG23120801A01',
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '涓�鎵逛簩',
+ device:'澶ф捣鍒╁畞',
+ thisProcess: '鍒囧壊',
+ finishedNumber: '13',
+ finishedArea: '44.22',
+ wornNumber: '',
+ wornArea: '',
+ teamName:'鍒囧壊涓�鐝�'
+ },
+ {
+ reportingWorkNo: 'BG2312080015',
+ reportingWorkTime: '2023-12-08 09:05:58',
+ processCard: 'NG23120801A01',
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '涓�鎵逛簩',
+ device:'澶ф捣鍒╁畞',
+ thisProcess: '鍒囧壊',
+ finishedNumber: '13',
+ finishedArea: '44.22',
+ wornNumber: '',
+ wornArea: '',
+ teamName:'鍒囧壊涓�鐝�'
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['finishedNumber','finishedArea','wornNumber','wornArea']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
+
const form = reactive({
name: '',
region: '',
@@ -13,118 +203,16 @@
resource: '',
desc: '',
})
-const value = ref('')
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-const router = useRouter()
-function goToPage() {
- router.push('/main/reportingWorks/AddReportingWork')
-}
-const tableData = [
- {
- reportingWorkNo: 'BG2312080011',
- reportingWorkTime: '2023-12-08 09:05:58',
- processCard: 'NG23120801A01',
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '鍥涙壒浜�',
- device:'澶ф捣鍒╁畞',
- thisProcess: '鍒囧壊',
- finishedNumber: '13',
- finishedArea: '44.22',
- wornNumber: '',
- wornArea: '',
- teamName:'鍒囧壊涓�鐝�'
- },
- {
- reportingWorkNo: 'BG2312080013',
- reportingWorkTime: '2023-12-08 09:05:58',
- processCard: 'NG23120801A01',
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '涓�鎵逛簩',
- device:'澶ф捣鍒╁畞',
- thisProcess: '鍒囧壊',
- finishedNumber: '13',
- finishedArea: '44.22',
- wornNumber: '',
- wornArea: '',
- teamName:'鍒囧壊涓�鐝�'
- },
- {
- reportingWorkNo: 'BG2311080025',
- reportingWorkTime: '2023-12-08 09:05:58',
- processCard: 'NG23120801A01',
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '涓�鎵逛簩',
- device:'澶ф捣鍒╁畞',
- thisProcess: '鍒囧壊',
- finishedNumber: '13',
- finishedArea: '44.22',
- wornNumber: '',
- wornArea: '',
- teamName:'鍒囧壊涓�鐝�'
- },
- {
- reportingWorkNo: 'BG2303080025',
- reportingWorkTime: '2023-12-08 09:05:58',
- processCard: 'NG23120801A01',
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '涓�鎵逛簩',
- device:'澶ф捣鍒╁畞',
- thisProcess: '鍒囧壊',
- finishedNumber: '13',
- finishedArea: '44.22',
- wornNumber: '',
- wornArea: '',
- teamName:'鍒囧壊涓�鐝�'
- },
- {
- reportingWorkNo: 'BG2312080001',
- reportingWorkTime: '2023-12-08 09:05:58',
- processCard: 'NG23120801A01',
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '涓�鎵逛簩',
- device:'澶ф捣鍒╁畞',
- thisProcess: '鍒囧壊',
- finishedNumber: '13',
- finishedArea: '44.22',
- wornNumber: '',
- wornArea: '',
- teamName:'鍒囧壊涓�鐝�'
- },
- {
- reportingWorkNo: 'BG2312080015',
- reportingWorkTime: '2023-12-08 09:05:58',
- processCard: 'NG23120801A01',
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '涓�鎵逛簩',
- device:'澶ф捣鍒╁畞',
- thisProcess: '鍒囧壊',
- finishedNumber: '13',
- finishedArea: '44.22',
- wornNumber: '',
- wornArea: '',
- teamName:'鍒囧壊涓�鐝�'
- },
-]
</script>
<template>
- <div>
- <div id="selectForm" >
+ <div class="main-div-customer">
+ <div id="selectForm">
<el-row :gutter="0">
-<!-- <el-input placeholder="娴佺▼鍗″彿" v-model="form.name" style="width: 200px"/>-->
-
-
-<!-- -->
-<!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.name" style="width: 200px"/>-->
-
-<!-- -->
<el-date-picker
- v-model="value"
+ v-model="form.date1"
type="daterange"
- start-placeholder="鎶ュ伐寮�濮嬫椂闂�"
+ start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
:default-time="defaultTime"
/>
@@ -133,37 +221,52 @@
</el-row>
</div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column fixed label="鎿嶄綔" width="140" >
- <el-button link type="primary" size="small" @click="goToPage">缂栬緫</el-button>
- <el-button link type="primary" size="small">鍒犻櫎</el-button>
- <el-button link type="primary" size="small">鍙嶅</el-button>
- </el-table-column>
- <el-table-column sortable prop="reportingWorkNo" label="鎶ュ伐缂栧彿" width="120" >
- <template v-slot="scope">
- <router-link :to="{path:'ReportingWorkDetail'}" >{{scope.row.reportingWorkNo}}</router-link>
- </template>
- </el-table-column>
- <el-table-column prop="reportingWorkTime" label="鎶ュ伐鏃堕棿" width="155" />
- <el-table-column prop="processCard" label="娴佺▼鍗″彿" width="135" />
- <el-table-column prop="entryName" label="椤圭洰鍚嶇О" width="155" />
- <el-table-column prop="batch" label="鎵规" width="75" />
- <el-table-column prop="device" label="璁惧" width="100" />
- <el-table-column prop="thisProcess" label="鏈伐搴�" width="100" />
- <el-table-column prop="finishedNumber" label="鏈伐搴忓畬宸�" width="100" />
- <el-table-column prop="finishedArea" label="瀹屽伐闈㈢Н" width="90" />
- <el-table-column prop="wornNumber" label="鏈伐搴忔鐮�" width="100" />
- <el-table-column prop="wornArea" label="娆$牬闈㈢Н" width="90" />
- <el-table-column prop="teamName" label="鐝粍鍚嶇О" width="150" />
- </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>
-#selectForm {
- width: 45%;
+.main-div-customer{
+ width: 99%;
height: 100%;
+}
+#selectForm {
+ width: 40%;
text-align: center;
}
-
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/rework/AddRework.vue b/north-glass-erp/northglass-erp/src/views/pp/rework/AddRework.vue
index 3bc5376..d9f2661 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/rework/AddRework.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/rework/AddRework.vue
@@ -1,123 +1,213 @@
<script setup>
-import {reactive, ref} from 'vue'
-// do not use same name with ref
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ //router.push({path: '/main/processCard/AddProcessCard', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鎺掔増鐘舵��')
+ break
+ }
+ }
+}
-const tableData = [
- {
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
- reworkNumber:'FG20202020',
- salesOrderNo:'NG23010101',
- processCardNo:'NG23010101A01',
- entryName:'xxxx',
- batch:'浜屾壒涓�',
- serialNumber:'1',
- area:'23.11',
- qualityInspector:"寮犱笁",
- number:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- type: '鏈哄櫒',
- damage:'姘旀场瓒呮爣',
- device:'XXX',
- reworkProcess:'鍒囧壊',
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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
},
- {
-
- reworkNumber:'FG20203333',
- salesOrderNo:'NG23010101',
- processCardNo:'NG23010101A01',
- entryName:'xxxx',
- batch:'浜屾壒涓�',
- serialNumber:'1',
- area:'23.11',
- qualityInspector:"寮犱笁",
- number:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- type: '鏈哄櫒',
- damage:'姘旀场瓒呮爣',
- reworkProcess:'纾ㄨ竟',
- device:'XXX'
+ 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 },
+ {title: '鎿嶄綔', width: 70, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'reworkTeams',width: 90, title: '杩斿伐鐝粍', editRender: { name: 'input', attrs: { placeholder: '' } }},
+ {field: 'reworkNumber',width: 120, title: '杩斿伐缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'salesOrderNo',width: 120, title: '閿�鍞崟鍙�', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'processCardNo',width: 120, title: '娴佺▼鍗″彿', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'entryName', width: 120,title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'batch',width: 80, title: '鎵规', sortable: true,showOverflow:"ellipsis"},
+ {field: 'serialNumber',width: 80, title: '搴忓彿', sortable: true},
+ {field: 'singlePieceName',width: 120, title: '鍗曠墖鍚嶇О', sortable: true},
+ {field: 'marking',width: 80, title: '鏍囪', sortable: true,showOverflow:"ellipsis"},
+ {field: 'pieces',width: 90, title: '鐗囨爣璁�', sortable: true},
+ {field: 'number',width: 80, title: '鏁伴噺', sortable: true},
+ {field: 'width',width: 80, title: '瀹�', sortable: true},
+ {field: 'height',width: 80, title: '楂�', sortable: true},
+ {field: 'shape',width: 80, title: '褰㈢姸', sortable: true},
+ {field: 'type',width: 100, title: '杩斿伐宸ュ簭', sortable: true},
+ {field: 'type',width: 100, title: '杩斿伐绫诲瀷', sortable: true},
+ {field: 'damage',width: 120, title: '杩斿伐鍘熷洜', sortable: true},
+ {field: 'device',width: 120, title: '璐d换璁惧', sortable: true},
+ {field: 'teams',width: 120, title: '璐d换鐝粍', sortable: true},
+ {field: 'area',width: 120, title: '杩斿伐闈㈢Н', sortable: true},
+ {field: 'qualityInspector',width: 100, title: '璐ㄦ鍛�', sortable: true}
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ // name:'淇濆瓨'
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+
+ reworkNumber:'FG20202020',
+ salesOrderNo:'NG23010101',
+ processCardNo:'NG23010101A01',
+ entryName:'xxxx',
+ batch:'浜屾壒涓�',
+ serialNumber:'1',
+ area:'23.11',
+ qualityInspector:"寮犱笁",
+ number:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ type: '鏈哄櫒',
+ damage:'姘旀场瓒呮爣',
+ device:'XXX',
+ reworkProcess:'鍒囧壊',
+ },
+ {
+
+ reworkNumber:'FG20203333',
+ salesOrderNo:'NG23010101',
+ processCardNo:'NG23010101A01',
+ entryName:'xxxx',
+ batch:'浜屾壒涓�',
+ serialNumber:'1',
+ area:'23.11',
+ qualityInspector:"寮犱笁",
+ number:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ type: '鏈哄櫒',
+ damage:'姘旀场瓒呮爣',
+ reworkProcess:'纾ㄨ竟',
+ device:'XXX'
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['total','TotalArea']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
+
+
</script>
<template>
- <div>
+ <div class="main-div-customer">
+ <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>
+
+ </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>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column fixed label="鎿嶄綔" width="70" >
- <el-button link type="primary" size="small">淇濆瓨</el-button>
- </el-table-column>
- <el-table-column prop="reworkTeams" label="杩斿伐鐝粍" :show-overflow-tooltip='true' width="85" >
- <el-input></el-input>
- </el-table-column>
- <el-table-column prop="reworkNumber" label="杩斿伐缂栧彿" width="105" />
- <el-table-column sortable prop="salesOrderNo" label="閿�鍞崟鍙�" width="120" />
- <el-table-column sortable prop="processCardNo" label="娴佺▼鍗″彿" width="130" />
- <el-table-column prop="entryName" label="椤圭洰鍚嶇О" width="120" :show-overflow-tooltip='true'/>
- <el-table-column prop="batch" label="鎵规" width="70" />
- <el-table-column prop="serialNumber" label="搴忓彿" width="60" />
- <el-table-column prop="singlePieceName" :show-overflow-tooltip='true' label="鍗曠墖鍚嶇О" width="120" />
- <el-table-column prop="marking" label="鏍囪" width="60" />
- <el-table-column prop="pieces" label="鐗囨爣璁�" width="70" />
- <el-table-column prop="number" label="鏁伴噺" width="95" />
- <el-table-column prop="width" label="瀹�" width="60" />
- <el-table-column prop="height" label="楂�" width="60" />
- <el-table-column prop="shape" label="褰㈢姸" :show-overflow-tooltip='true' width="60" />
- <el-table-column prop="reworkProcess" label="杩斿伐宸ュ簭" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="type" label="杩斿伐绫诲瀷" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="damage" label="杩斿伐鍘熷洜" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="device" label="璐d换璁惧" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="teams" label="璐d换鐝粍" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="area" label="杩斿伐闈㈢Н" width="85" />
- <el-table-column prop="qualityInspector" label="璐ㄦ鍛�" width="80" />
-
-
-
-
-
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ </vxe-grid>
</div>
</template>
<style scoped>
-
-
-#titleTable tr,#titleTable td{
- border: 1px solid #000;
-}
-#titleTable{
- border-collapse: collapse;
- text-align: center;
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
-}
-#titleTable td{
- width: 100px;
- height: 30px;
-}
-#titleTable td:nth-child(1){
- width: 100px;
- height: 30px;
-}
-#titleTable td:nth-child(2){
- width: 100px;
-}
-.chaxun{
- background-color:#D5EAFF;
- border: none;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/rework/SelectRework.vue b/north-glass-erp/northglass-erp/src/views/pp/rework/SelectRework.vue
index 571db7e..a97896d 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/rework/SelectRework.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/rework/SelectRework.vue
@@ -1,61 +1,9 @@
<script setup>
-import {reactive, ref} from 'vue'
-// do not use same name with ref
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
-const value = ref('')
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-const tableData = [
- {
-
- reworkNumber:'FG20202020',
- salesOrderNo:'NG23010101',
- processCardNo:'NG23010101A01',
- entryName:'xxxx',
- batch:'浜屾壒涓�',
- serialNumber:'1',
- area:'23.11',
- qualityInspector:"寮犱笁",
- number:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- reworkTeams:'XX浜岀彮',
- type: '鏈哄櫒',
- damage:'姘旀场瓒呮爣',
- reworkProcess:'XXXX',
- device:'XXX'
- },
- {
-
- reworkNumber:'FG20203333',
- salesOrderNo:'NG23010101',
- processCardNo:'NG23010101A01',
- entryName:'xxxx',
- batch:'浜屾壒涓�',
- serialNumber:'1',
- area:'23.11',
- qualityInspector:"寮犱笁",
- number:'1',
- singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
- marking: '1',
- pieces: '(澶�)',
- width: '575',
- height:"2241",
- shape: '鏅舰',
- reworkTeams:'XX浜岀彮',
- type: '鏈哄櫒',
- damage:'姘旀场瓒呮爣',
- reworkProcess:'XXXX',
- device:'XXX'
- },
-]
const dialogFormVisible = ref(false)
const formLabelWidth = '140px'
@@ -69,61 +17,217 @@
resource: '',
desc: '',
})
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ console.log(type)
+
+ // router.push({path: '/main/Rework/SelectRework', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ case 'setType':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鎺掔増鐘舵��')
+ break
+ }
+ }
+}
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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 },
+ {title: '鎿嶄綔', width: 110, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'reworkNumber',width: 120, title: '杩斿伐缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'salesOrderNo',width: 120, title: '閿�鍞崟鍙�', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'processCardNo',width: 120, title: '娴佺▼鍗″彿', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'entryName', width: 120,title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'batch',width: 80, title: '鎵规', sortable: true,showOverflow:"ellipsis"},
+ {field: 'serialNumber',width: 80, title: '搴忓彿', sortable: true},
+ {field: 'singlePieceName',width: 120, title: '鍗曠墖鍚嶇О', sortable: true},
+ {field: 'marking',width: 80, title: '鏍囪', sortable: true,showOverflow:"ellipsis"},
+ {field: 'pieces',width: 90, title: '鐗囨爣璁�', sortable: true},
+ {field: 'number',width: 80, title: '鏁伴噺', sortable: true},
+ {field: 'width',width: 80, title: '瀹�', sortable: true},
+ {field: 'height',width: 80, title: '楂�', sortable: true},
+ {field: 'shape',width: 80, title: '褰㈢姸', sortable: true},
+ {field: 'type',width: 100, title: '杩斿伐绫诲瀷', sortable: true},
+ {field: 'damage',width: 120, title: '杩斿伐鍘熷洜', sortable: true},
+ {field: 'device',width: 120, title: '璐d换璁惧', sortable: true},
+ {field: 'teams',width: 120, title: '璐d换鐝粍', sortable: true},
+ {field: 'area',width: 120, title: '杩斿伐闈㈢Н', sortable: true},
+ {field: 'reworkProcess',width: 120, title: '杩斿伐宸ュ簭', sortable: true},
+ {field: 'reworkTeams',width: 120, title: '杩斿伐鐝粍', sortable: true},
+ {field: 'qualityInspector',width: 100, title: '璐ㄦ鍛�', sortable: true}
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+
+ reworkNumber:'FG20202020',
+ salesOrderNo:'NG23010101',
+ processCardNo:'NG23010101A01',
+ entryName:'xxxx',
+ batch:'浜屾壒涓�',
+ serialNumber:'1',
+ area:'23.11',
+ qualityInspector:"寮犱笁",
+ number:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ reworkTeams:'XX浜岀彮',
+ type: '鏈哄櫒',
+ damage:'姘旀场瓒呮爣',
+ reworkProcess:'XXXX',
+ device:'XXX'
+ },
+ {
+
+ reworkNumber:'FG20203333',
+ salesOrderNo:'NG23010101',
+ processCardNo:'NG23010101A01',
+ entryName:'xxxx',
+ batch:'浜屾壒涓�',
+ serialNumber:'1',
+ area:'23.11',
+ qualityInspector:"寮犱笁",
+ number:'1',
+ singlePieceName: '6mm鐧界幓骞抽挗(澶�)',
+ marking: '1',
+ pieces: '(澶�)',
+ width: '575',
+ height:"2241",
+ shape: '鏅舰',
+ reworkTeams:'XX浜岀彮',
+ type: '鏈哄櫒',
+ damage:'姘旀场瓒呮爣',
+ reworkProcess:'XXXX',
+ device:'XXX'
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['number','area']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
+
+
</script>
<template>
- <div>
+ <div class="main-div-customer">
<div id="head" >
-<!-- <el-input placeholder="娴佺▼鍗″彿" v-model="form.xsdh" style="width: 200px"/>-->
-<!-- -->
-
-<!-- <el-input placeholder="椤圭洰鍚嶇О" v-model="form.lckh" style="width: 200px"/>-->
-<!-- -->
<el-date-picker
v-model="value"
type="daterange"
start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
- :default-time="defaultTime"
/>
<el-button type="primary">鏌ヨ</el-button>
</div>
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column fixed label="鎿嶄綔" width="100" >
- <el-button link type="primary" size="small" @click="dialogFormVisible = true">缂栬緫</el-button>
- <el-button link type="primary" size="small">瀹℃牳</el-button>
- </el-table-column>
- <el-table-column prop="reworkNumber" label="杩斿伐缂栧彿" width="155" />
- <el-table-column sortable prop="salesOrderNo" label="閿�鍞崟鍙�" width="120" />
- <el-table-column sortable prop="processCardNo" label="娴佺▼鍗″彿" width="130" />
- <el-table-column prop="entryName" label="椤圭洰鍚嶇О" width="120" :show-overflow-tooltip='true'/>
- <el-table-column prop="batch" label="鎵规" width="70" />
- <el-table-column prop="serialNumber" label="搴忓彿" width="60" />
- <el-table-column prop="singlePieceName" :show-overflow-tooltip='true' label="鍗曠墖鍚嶇О" width="120" />
- <el-table-column prop="marking" label="鏍囪" width="60" />
- <el-table-column prop="pieces" label="鐗囨爣璁�" width="70" />
- <el-table-column prop="number" label="鏁伴噺" width="95" />
- <el-table-column prop="width" label="瀹�" width="60" />
- <el-table-column prop="height" label="楂�" width="60" />
- <el-table-column prop="shape" label="褰㈢姸" :show-overflow-tooltip='true' width="60" />
- <el-table-column prop="type" label="杩斿伐绫诲瀷" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="damage" label="杩斿伐鍘熷洜" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="device" label="璐d换璁惧" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="teams" label="璐d换鐝粍" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="area" label="杩斿伐闈㈢Н" width="85" />
- <el-table-column prop="reworkProcess" label="杩斿伐宸ュ簭" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="reworkTeams" label="杩斿伐鐝粍" :show-overflow-tooltip='true' width="85" />
- <el-table-column prop="qualityInspector" label="璐ㄦ鍛�" width="80" />
+ >
+ <!-- @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="dialogFormVisible = true" link type="primary" size="small">缂栬緫</el-button>
+ <el-button @click="getTableRow(row,'setType')" 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>
-
-
-
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
-
+ </vxe-grid>
<el-dialog v-model="dialogFormVisible" title="杩斿伐缂栬緫">
<el-form :model="form">
<el-form-item label="杩斿伐缂栧彿" :label-width="formLabelWidth">
@@ -149,43 +253,8 @@
</template>
<style scoped>
-#head{
- width: 70%;
-}
-
-.processCard{
- width: 140px;
-}
-.processesSt{
- height: 33px;
- width: 80px;
- background-color: #409eff;
- color: white;
- border: none;
- border-radius: 5px;
-}
-#titleTable tr,#titleTable td{
- border: 1px solid #000;
-}
-#titleTable{
- border-collapse: collapse;
- text-align: center;
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
-}
-#titleTable td{
- width: 100px;
- height: 30px;
-}
-#titleTable td:nth-child(1){
- width: 100px;
- height: 30px;
-}
-#titleTable td:nth-child(2){
- width: 100px;
-}
-.chaxun{
- background-color:#D5EAFF;
- border: none;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/workOrder/AddWorkOrder.vue b/north-glass-erp/northglass-erp/src/views/pp/workOrder/AddWorkOrder.vue
index 9b11362..6a77e0b 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/workOrder/AddWorkOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/workOrder/AddWorkOrder.vue
@@ -1,94 +1,166 @@
-<script lang="ts" setup>
-import { ref } from 'vue'
-import { ElTable } from 'element-plus'
-import {ArrowLeftBold} from "@element-plus/icons-vue";
-import request from "@/utils/request";
-import deepClone from "@/utils/deepClone";
-import {ElMessage} from "element-plus";
-import {useRouter} from "vue-router";
-import GlassType from '@/components/basic/product/GlassType.vue'
+<script setup>
-interface User {
- //閿�鍞崟鍙�
- selection:string
- //浜у搧缂栧彿
- productID: string
- //浜у搧鍚嶇О
- productName: string
- //鎬绘暟閲�
- total: string
- //鎬婚潰绉�
- totalArea:string
- //鍛ㄩ暱
- perimeter:string
-}
-
-const multipleTableRef = ref<InstanceType<typeof ElTable>>()
-const multipleSelection = ref<User[]>([])
-
-const handleSelectionChange = (val: User[]) => {
- multipleSelection.value = val
-}
-const router = useRouter()
-let flag = $ref(true)
-function intoCreateProduct(){
- if(flag){
- router.push('/main/workOrder/SelectAddWorkOrder')
- }else {
- router.push('/main/workOrder/SelectAddWorkOrder')
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/workOrder/addWorkOrder', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
}
- flag=!flag
}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
-const tableData: User[] = [
- {
- selection: 'NG231201',
- productID: '9001010208000021',
- productName: '6mm瓒呯櫧UD60骞抽挗(澶�)+12A(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
- total:"123",
- totalArea:"1233.12",
- perimeter:"133"
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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
},
- {
- selection: 'NG231201',
- productID: '9001010203000008',
- productName: '6mm瓒呯櫧LYDE-80骞抽挗(澶�)+12Ar(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
- total:"123",
- totalArea:"1233.12",
- perimeter:"133"
+ filterConfig: { //绛涢�夐厤缃」
+ remote: true
},
-]
+ customConfig: {
+ storage: true
+ },
+ editConfig: {
+ trigger: 'click',
+ mode: 'row',
+ showStatus: true
+ },//琛ㄥご鍙傛暟
+ columns:[
+ {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
+ { type: 'checkbox',fixed:"left", title: '閫夋嫨', width: 80 },
+ { type: 'seq',fixed:"left", title: '鑷簭', width: 50 },
+ {field: 'salesOrderNo', title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'productID', title: '浜у搧缂栧彿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'productName', title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'total', title: '鎬绘暟閲�', sortable: true},
+ {field: 'totalArea', title: '鎬婚潰绉�', sortable: true},
+ {field: 'perimeter', title: '鍛ㄩ暱', sortable: true,showOverflow:"ellipsis"},
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ buttons: [
+ {code: 'print_lck', name: '淇濆瓨',status:'primary' ,icon:'vxe-icon-save'},
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ salesOrderNo: 'NG231201',
+ productID: '9001010208000021',
+ productName: '6mm瓒呯櫧UD60骞抽挗(澶�)+12A(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
+ total:"123",
+ totalArea:"1233.12",
+ perimeter:"133"
+ },
+ {
+ salesOrderNo: 'NG231201',
+ productID: '9001010203000008',
+ productName: '6mm瓒呯櫧LYDE-80骞抽挗(澶�)+12Ar(缁�)+6mm瓒呯櫧骞抽挗(鍐�)',
+ total:"123",
+ totalArea:"1233.12",
+ perimeter:"133"
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['total','totalArea']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
+
+
</script>
<template>
-<div >
- <div id="headerButton">
+ <div class="main-div-customer">
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
- <el-button type="primary">淇濆瓨</el-button>
+ >
+ <!-- @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,'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>
- <el-table
- ref="multipleTableRef"
- :data="tableData"
- style="width: 100%"
- @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="55" />
- <el-table-column label="閿�鍞崟鍙�" width="120">
- <template #default="scope">{{ scope.row.selection }}</template>
- </el-table-column>
- <el-table-column property="productID" label="浜у搧缂栧彿" :show-overflow-tooltip='true'/>
- <el-table-column property="productName" label="浜у搧鍚嶇О" width="280" show-overflow-tooltip :show-overflow-tooltip='true'/>
- <el-table-column property="total" label="鎬绘暟閲�" />
- <el-table-column property="totalArea" label="鎬婚潰绉�" />
- <el-table-column property="perimeter" label="鍛ㄩ暱" />
- </el-table>
-</div>
</template>
<style scoped>
-#headerButton{
- width: 200px;
- float: right;
+.main-div-customer{
+ width: 99%;
+ height: 100%;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectAddWorkOrder.vue b/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectAddWorkOrder.vue
index c1d2881..50318fa 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectAddWorkOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectAddWorkOrder.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+ <script lang="ts" setup>
import { reactive } from 'vue'
// do not use same name with ref
diff --git a/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue b/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
index f0f34e4..93522b3 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
@@ -1,20 +1,198 @@
-<script lang="ts" setup>
-import {reactive, ref} from 'vue'
-import SelectWorkOrder from "@/views/pp/workOrder/SelectWorkOrder.vue";
-import SelectAddWorkOrder from "@/views/pp/workOrder/SelectAddWorkOrder.vue";
-import {ArrowLeftBold} from "@element-plus/icons-vue";
-import request from "@/utils/request";
-import deepClone from "@/utils/deepClone";
-import {ElMessage} from "element-plus";
-import {useRouter} from "vue-router";
+<script setup>
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/workOrder/addWorkOrder', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ }
+}
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
-const defaultTime = ref<[Date, Date]>([
- new Date(2000, 1, 1, 0, 0, 0),
- new Date(2000, 2, 1, 23, 59, 59),
-])
-// do not use same name with ref
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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 },
+ {title: '鎿嶄綔', width: 110, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'salesOrderNo', title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
+ {field: 'productionOrderNo', title: '娴佺▼鍗″彿', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'batch', title: '鎵规', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'productName', title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'monolithicTotalArea', title: '鍗曠墖鎬婚潰绉�', sortable: true,showOverflow:"ellipsis"},
+ {field: 'total', title: '鎬绘暟閲�', sortable: true},
+ {field: 'productTotalArea', title: '鎴愬搧鎬婚潰绉�', sortable: true},
+ {field: 'perimeter', title: '鍛ㄩ暱', sortable: true,showOverflow:"ellipsis"},
+ {field: 'radius', title: '鍗婂緞', sortable: true},
+ {field: 'createTime', title: '鍔犲伐瑕佹眰', sortable: true}
+ ],//琛ㄥご鎸夐挳
+
+ toolbarConfig: {
+ // buttons: [{
+ //
+ // }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ salesOrderNo: 'NG231201',
+ productionOrderNo: 'NG231201A',
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '23鎵�',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ monolithicTotalArea: '509.78',
+ total: '169',
+ productTotalArea: '175.31',
+ perimeter: '99.84',
+ radius: '0',
+ createTime: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ salesOrderNo: 'NG231201',
+ productionOrderNo: 'NG231201B',
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '23鎵�',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ monolithicTotalArea: '509.78',
+ total: '169',
+ productTotalArea: '175.31',
+ perimeter: '99.84',
+ radius: '0',
+ createTime: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ salesOrderNo: 'NG231202',
+ productionOrderNo: 'NG231202A',
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '23鎵�',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ monolithicTotalArea: '509.78',
+ total: '169',
+ productTotalArea: '175.31',
+ perimeter: '99.84',
+ radius: '0',
+ createTime: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ salesOrderNo: 'NG231203',
+ productionOrderNo: 'NG231203A',
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '23鎵�',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ monolithicTotalArea: '509.78',
+ total: '169',
+ productTotalArea: '175.31',
+ perimeter: '99.84',
+ radius: '0',
+ createTime: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ salesOrderNo: 'NG231204',
+ productionOrderNo: 'NG231204A',
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '23鎵�',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ monolithicTotalArea: '509.78',
+ total: '169',
+ productTotalArea: '175.31',
+ perimeter: '99.84',
+ radius: '0',
+ createTime: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ salesOrderNo: 'NG231205',
+ productionOrderNo: 'NG231205A',
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '23鎵�',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ monolithicTotalArea: '509.78',
+ total: '169',
+ productTotalArea: '175.31',
+ perimeter: '99.84',
+ radius: '0',
+ createTime: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ {
+ salesOrderNo: 'NG231206',
+ productionOrderNo: 'NG231206A',
+ entryName: '淇″悎鏄ュぉ閲�',
+ batch: '23鎵�',
+ productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
+ monolithicTotalArea: '509.78',
+ total: '169',
+ productTotalArea: '175.31',
+ perimeter: '99.84',
+ radius: '0',
+ createTime: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
+ },
+ ],//table body瀹為檯鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList=['total','monolithicTotalArea','productTotalArea']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
const form = reactive({
name: '',
region: '',
@@ -25,112 +203,13 @@
resource: '',
desc: '',
})
-const router = useRouter()
-function goToPage() {
- router.push('/main/workOrder/addWorkOrder')
-}
-const tableData = [
- {
- salesOrderNo: 'NG231201',
- productionOrderNo: 'NG231201A',
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '23鎵�',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- monolithicTotalArea: '509.78',
- total: '169',
- productTotalArea: '175.31',
- perimeter: '99.84',
- radius: '0',
- createTime: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- salesOrderNo: 'NG231201',
- productionOrderNo: 'NG231201B',
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '23鎵�',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- monolithicTotalArea: '509.78',
- total: '169',
- productTotalArea: '175.31',
- perimeter: '99.84',
- radius: '0',
- createTime: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- salesOrderNo: 'NG231202',
- productionOrderNo: 'NG231202A',
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '23鎵�',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- monolithicTotalArea: '509.78',
- total: '169',
- productTotalArea: '175.31',
- perimeter: '99.84',
- radius: '0',
- createTime: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- salesOrderNo: 'NG231203',
- productionOrderNo: 'NG231203A',
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '23鎵�',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- monolithicTotalArea: '509.78',
- total: '169',
- productTotalArea: '175.31',
- perimeter: '99.84',
- radius: '0',
- createTime: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- salesOrderNo: 'NG231204',
- productionOrderNo: 'NG231204A',
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '23鎵�',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- monolithicTotalArea: '509.78',
- total: '169',
- productTotalArea: '175.31',
- perimeter: '99.84',
- radius: '0',
- createTime: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- salesOrderNo: 'NG231205',
- productionOrderNo: 'NG231205A',
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '23鎵�',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- monolithicTotalArea: '509.78',
- total: '169',
- productTotalArea: '175.31',
- perimeter: '99.84',
- radius: '0',
- createTime: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
- {
- salesOrderNo: 'NG231206',
- productionOrderNo: 'NG231206A',
- entryName: '淇″悎鏄ュぉ閲�',
- batch: '23鎵�',
- productName: '5mm鐧界幓骞抽挗(澶�)+0.76PVB閫忔槑+5mm鐧界幓骞抽挗(鍐�)',
- monolithicTotalArea: '509.78',
- total: '169',
- productTotalArea: '175.31',
- perimeter: '99.84',
- radius: '0',
- createTime: '1)鎸変紒鏍�2)姣忕墖鐜荤拑鏍囩璐村澶栭潰銆傚唴鐗囩幓鐠冩墦鈥�3C鍟嗘爣鈥濓紝缁熶竴鎵撳湪鐜荤拑鈥滃搴︹�濇柟鍚戝彸涓嬭4)鎸夋壒娆″崟鐙惤鏋躲��',
- },
-]
</script>
<template>
- <div class="div-main">
+ <div class="main-div-customer">
<div id="selectForm">
<el-row :gutter="0">
- <el-input placeholder="閿�鍞崟鍙�" v-model="form.name" style="width: 200px"/>
-
<el-date-picker
v-model="form.date1"
type="daterange"
@@ -143,35 +222,51 @@
</el-row>
</div>
- <div>
- <el-table :data="tableData" border style="width: 100%" height="100%">
- <el-table-column fixed label="鎿嶄綔" width="120" >
- <el-button link type="primary" size="small" @click="goToPage">杞伐鍗�</el-button>
- <el-button link type="primary" size="small">鍒犻櫎</el-button>
- </el-table-column>
- <el-table-column sortable prop="salesOrderNo" label="閿�鍞崟鍙�" width="110" />
- <el-table-column prop="entryName" label="椤圭洰鍚嶇О" width="155" />
- <el-table-column prop="batch" label="鎵规" width="80" />
- <el-table-column prop="productName" label="浜у搧鍚嶇О" :show-overflow-tooltip='true' width="180" />
- <el-table-column prop="monolithicTotalArea" label="鍗曠墖鎬婚潰绉�" width="100" />
- <el-table-column prop="total" label="鎬绘暟閲�" width="75" />
- <el-table-column prop="productTotalArea" label="鎴愬搧鎬婚潰绉�" width="100" />
- <el-table-column prop="perimeter" label="鍛ㄩ暱" width="100" />
- <el-table-column prop="radius" label="鍗婂緞" width="70" />
- <el-table-column prop="createTime" label="鍔犲伐瑕佹眰" :show-overflow-tooltip='true' width="350" />
- </el-table><!-- <h1>{{msg}}</h1> -->
- </div>
+ <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,'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>
-.div-main{
- width: 100%;
+.main-div-customer{
+ width: 99%;
height: 100%;
}
#selectForm {
- width: 50%;
+ width: 40%;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/workOrder/WorkOrder.vue b/north-glass-erp/northglass-erp/src/views/pp/workOrder/WorkOrder.vue
index a059d5c..08dff22 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/workOrder/WorkOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/workOrder/WorkOrder.vue
@@ -53,7 +53,7 @@
}
#div-title{
height: 5%;
- width: 100%;
+ width: 98%;
}
#searchButton{
margin-top: -5px;
@@ -66,6 +66,5 @@
#main-body{
width: 99%;
height: 92%;
- margin-top: 1%;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue b/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue
index 9e4fdd9..46c414a 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue
@@ -1,67 +1,153 @@
<script setup>
-let orderList = $ref([
- {
- '0':'1',
- '1':'澶粨鍗撻珮鐜荤拑鍒跺搧鏈夐檺鍏徃',
- '2':'A',
- '3':'100000',
- '4':'姹熻嫃澶粨xxxx琛楅亾',
- '5':'寮犱笁',
- '6':'139xxxxxxxx',
-
- },
- {
- '0':'1',
- '1':'灞辫タ鏌愭煇鍏徃',
- '2':'A',
- '3':'100000',
- '4':'姹熻嫃澶粨xxxx琛楅亾',
- '5':'寮犱笁',
- '6':'139xxxxxxxx',
-
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/customer/CreateCustomer', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
}
-])
+}
-let titleList = $ref([
- '瀹㈡埛缂栫爜',
- '鍚嶇О',
- '瀹㈡埛绛夌骇',
- '淇$敤棰濆害',
- '鍦板潃',
- '鑱旂郴浜�',
- '鑱旂郴鐢佃瘽'
-])
+
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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: 80 },
+ {title: '鎿嶄綔', width: 110, slots: { default: 'button_slot' },fixed:"left"},
+ {field: '0', title: '瀹㈡埛缂栫爜',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '1', title: '鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '2', title: '瀹㈡埛绛夌骇',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '3', title: '淇$敤棰濆害',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '4', title: '鍦板潃',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5', title: '鑱旂郴浜�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '6', title: '鑱旂郴鐢佃瘽',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ '0':'1',
+ '1':'澶粨鍗撻珮鐜荤拑鍒跺搧鏈夐檺鍏徃',
+ '2':'A',
+ '3':'100000',
+ '4':'姹熻嫃澶粨xxxx琛楅亾',
+ '5':'寮犱笁',
+ '6':'139xxxxxxxx',
+
+ },
+ {
+ '0':'1',
+ '1':'灞辫タ鏌愭煇鍏徃',
+ '2':'A',
+ '3':'100000',
+ '4':'姹熻嫃澶粨xxxx琛楅亾',
+ '5':'寮犱笁',
+ '6':'139xxxxxxxx',
+
+ }
+ ],//table body瀹為檯鏁版嵁
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
+ }
+
+})
+
+
+
</script>
<template>
<div class="main-div-customer">
- <el-table
- :data="orderList"
- :header-cell-style="{ 'text-align': 'center' }"
- :cell-style="{ 'text-align': 'center' }"
- lazy
- border
- >
- <el-table-column type="expand" fixed>
- <template #default="props" >
- <div m="4">
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
- <p m="t-0 b-2">瀹㈡埛鐩稿叧淇℃伅</p>
+ >
+ <!-- @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,'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>
- </template>
- </el-table-column>
- <el-table-column label="鎿嶄綔" fixed width="110" >
- <el-button link type="primary" size="small">缂栬緫</el-button>
- <el-button link type="primary" size="small">鍒犻櫎</el-button>
- </el-table-column>
- <el-table-column
- :prop="index.toString()"
- :show-overflow-tooltip='true'
- v-for="(item,index) in titleList"
- :label="item" >
- </el-table-column>
- </el-table>
+ </div>
+ </template>
+
+
+ </vxe-grid>
</div>
</template>
diff --git a/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue b/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
index e6c9abd..a77362d 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
@@ -1,65 +1,150 @@
<script setup>
-let deliveryTitle = $ref([
- '閿�鍞崟鍙�',
- '鎵规',
- '搴撳瓨鍙彂',
- '鏈彂鏁伴噺',
- '鎬绘暟閲�',
- '鏈鍙戣揣鏁伴噺',
- '妤煎彿',
- '浜у搧缂栧彿',
- '浜у搧鍚嶇О',
- '鍗曚环',
- '搴撳尯',
- '寮傚舰鍙傛暟',
- '閲戦',
- '瀹�',
- '楂�',
- '褰㈢姸',
- '瀹為檯鍗曠墖/鎬婚潰绉�',
- '缁撶畻鍗曠墖闈㈢Н',
- '缁撶畻鎬婚潰绉�',
- '鍔犲伐瑕佹眰',
- '澶囨敞',
- '纾ㄨ竟绫诲瀷',
- '鍛ㄩ暱',
+import {reactive} from "vue";
-])
-let deliveryList =[
- {
- '0': 'NG23110101',
- '1': '20鎵�1',
- '2': '16',
- '3': '18',
- '4': '20',
- '5': '20',
- '6': 'A妤糱灞�',
- '7': '101',
- '8': '10mmLYTM-140寮挗鍖�',
- '9': '1008.38',
- '10': 'A鍙锋煴瀛�',
- '11': '',
- '12': '100',
- '13': '3360',
- '14': '2440',
- '15': '鏅舰',
- '16': '1.11/100.1',
- '17': '1.22',
- '18': '11.11',
- '19': '杩欐槸鍔犲伐瑕佹眰',
- '20': '杩欐槸澶囨敞',
- '21': '杩欐槸纾ㄨ竟绫诲瀷',
- '22': '1.1'
+const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'OrderList',
+ 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',slots: { content:'content' },width: 50,fixed:"left"},
+ {type:'checkbox',title: '閫夊垯', width: 80,fixed:"left"},
+ {type: 'seq', title: '鑷簭', width: 80 ,fixed:"left"},
+ {field: '0',width:120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '1',width:120, title: '鎵规',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '2',width:120, title: '搴撳瓨鍙彂',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '3',width:120, title: '鏈彂鏁伴噺',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '4',width:120, title: '鎬绘暟閲�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5',width:120, title: '鍙戣揣鏁伴噺',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '6',width:120, title: '妤煎彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '7',width:120, title: '浜у搧缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '8',width:120, title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '9',width:120, title: '鍗曚环',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '10',width:120, title: '搴撳尯',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '11',width:120, title: '閲戦',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '12',width:120, title: '瀹�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '13',width:120, title: '楂�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '14',width:120, title: '褰㈢姸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '15',width:120, title: '鍗曠墖闈㈢Н',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '16',width:120, title: '鎬婚潰绉�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '17',width:120, title: '缁撶畻鍗曠墖闈㈢Н',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '18',width:120, title: '缁撶畻鎬婚潰绉�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '19',width:120, title: '鍔犲伐瑕佹眰',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '20',width:120, title: '澶囨敞',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '21',width:120, title: '纾ㄨ竟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '22',width:120, title: '鍛ㄩ暱',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+
+
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [
+ {'code': 'add', 'name': '淇濆瓨',status: 'primary',icon: 'vxe-icon-save'}
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ '0': 'NG23110102',
+ '1': '20鎵�1',
+ '2': '16',
+ '3': '18',
+ '4': '20',
+ '5': '20',
+ '6': 'A妤糱灞�',
+ '7': '101',
+ '8': '10mmLYTM-140寮挗鍖�',
+ '9': '1008.38',
+ '10': 'A鍙锋煴瀛�',
+ '11': '100',
+ '12': '3360',
+ '13': '2440',
+ '14': '鏅舰',
+ '15': '1.11',
+ '16': '100.1',
+ '17': '1.22',
+ '18': '11.11',
+ '19': '杩欐槸鍔犲伐瑕佹眰',
+ '20': '杩欐槸澶囨敞',
+ '21': '杩欐槸纾ㄨ竟绫诲瀷',
+ '22': '1.1'
+ },
+ {
+ '0': 'NG23110102',
+ '1': '20鎵�1',
+ '2': '16',
+ '3': '18',
+ '4': '20',
+ '5': '20',
+ '6': 'A妤糱灞�',
+ '7': '101',
+ '8': '10mmLYTM-140寮挗鍖�',
+ '9': '1008.38',
+ '10': 'A鍙锋煴瀛�',
+ '11': '100',
+ '12': '3360',
+ '13': '2440',
+ '14': '鏅舰',
+ '15': '1.11',
+ '16': '100.1',
+ '17': '1.22',
+ '18': '11.11',
+ '19': '杩欐槸鍔犲伐瑕佹眰',
+ '20': '杩欐槸澶囨敞',
+ '21': '杩欐槸纾ㄨ竟绫诲瀷',
+ '22': '1.1'
+ }
+ ],//table body瀹為檯鏁版嵁
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
}
-]
+
+})
</script>
<template>
<div class="main-div">
- <div class="order-primary">
+ <div class="order-primary" style="background-color: white">
<el-row>
<el-col :span="2"><el-text>瀹㈡埛缂栫爜:</el-text></el-col>
<el-col :span="5"><el-text style="font-size: large;color: #181818">131</el-text></el-col>
@@ -112,33 +197,33 @@
<el-col :span="5"><el-text style="font-size: large;color: #181818"></el-text></el-col>
<el-col :span="2"><el-text>鍙戣揣鍛�:</el-text></el-col>
<el-col :span="5"><el-text style="font-size: large;color: #181818"></el-text></el-col>
- <el-col style="background-color: #337ecc" :span="2"><el-button style="width: 100%" type="primary">淇濆瓨</el-button></el-col>
</el-row>
</div>
<div class="order-detail">
- <el-table
- :data="deliveryList"
- :header-cell-style="{ 'text-align': 'center' }"
- :cell-style="{ 'text-align': 'center' }"
- border
- >
- <el-table-column type="expand" fixed>
- <template #default="props" >
- <div m="4">
- <p m="t-0 b-2">璁㈠崟鍙戣揣鏈夊叧鎵�鏈変俊鎭�</p>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="閫夊垯" fixed>
- <el-checkbox/>
- </el-table-column>
- <el-table-column
- :prop="index.toString()"
- :show-overflow-tooltip='true'
- width="100" v-for="(item,index) in deliveryTitle"
- :label="item" />
+ <vxe-grid
+ max-height="97%"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
- </el-table>
+ >
+ <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>
+ <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>
+
+ </vxe-grid>
</div>
</div>
diff --git a/north-glass-erp/northglass-erp/src/views/sd/delivery/Delivery.vue b/north-glass-erp/northglass-erp/src/views/sd/delivery/Delivery.vue
index 47fc1be..1e4b5ef 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/delivery/Delivery.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/delivery/Delivery.vue
@@ -11,6 +11,7 @@
<el-breadcrumb-item :to="{ path: '/main/delivery/selectDelivery' }">鍙戣揣棣栭〉</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/main/delivery/selectOrderList' }">璁㈠崟鍙戣揣</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/main/delivery/deliveryReport' }">鎶ヨ〃</el-breadcrumb-item>
+ <el-breadcrumb-item v-show="false" :to="{ path: '/main/delivery/deliveryReport' }">鎶ヨ〃</el-breadcrumb-item>
</el-breadcrumb>
</div>
@@ -38,7 +39,7 @@
}
/*main-body鏍峰紡*/
#main-body{
- width: 100%;
+ width: 99%;
height: 95%;
margin-top: 1%;
}
diff --git a/north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryReport.vue b/north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryReport.vue
index 2b64e45..7219aea 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryReport.vue
@@ -1,38 +1,96 @@
<script setup>
import {Folder, Search} from "@element-plus/icons-vue";
-
-let titleList = [
- '搴忓彿',
- '鍙戣揣鍗曞彿',
- '閿�鍞崟鍙�',
- '瀹㈡埛鍗曞彿',
- '椤圭洰鍚嶇О',
- '瀹㈡埛鍚嶇О',
- '涓氬姟鍛�',
- '閫佽揣鍦板潃',
- '鍙戣揣鍛�',
- '妤煎彿',
- '浜у搧缂栧彿',
- '浜у搧鍚嶇О',
- '鏈鍙戣揣鏁伴噺',
- '鍛ㄩ暱',
- '瀹為檯闈㈢Н',
- '鍙戣揣闈㈢Н',
- '鍗曚环',
- '鍙戣揣閲戦',
- '瀹�',
- '楂�',
- '褰㈢姸',
- '纾ㄨ竟绫诲瀷',
- '澶囨敞',
- '鍔犲伐瑕佹眰',
- '寤虹珛鏃堕棿'
+import {reactive} from "vue";
+const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'OrderList',
+ 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',slots: { content:'content' },width: 50,fixed:"left"},
+ {type: 'seq', title: '鑷簭', width: 80 ,fixed:"left"},
+ {field: '0',width:120, title: '鍙戣揣鍗曞彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '1',width:120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '2',width:120, title: '瀹㈡埛鍗曞彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '3',width:120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '4',width:120, title: '瀹㈡埛鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5',width:120, title: '涓氬姟鍛�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '6',width:120, title: '閫佽揣鍦板潃',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '7',width:120, title: '鍙戣揣鍛�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '8',width:120, title: '妤煎彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '9',width:120, title: '浜у搧缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '10',width:120, title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '11',width:120, title: '鍙戣揣鏁伴噺',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '12',width:120, title: '鍛ㄩ暱',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '13',width:120, title: '瀹為檯闈㈢Н',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '14',width:120, title: '鍙戣揣闈㈢Н',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '15',width:120, title: '鍗曚环',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '16',width:120, title: '鍙戣揣閲戦',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '17',width:120, title: '瀹�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '18',width:120, title: '楂�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '19',width:120, title: '褰㈢姸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '20',width:120, title: '纾ㄨ竟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '21',width:120, title: '澶囨敞',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '22',width:120, title: '鍔犲伐瑕佹眰',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '22',width:120, title: '寤虹珛鏃堕棿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
+
+
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [
+ ],
+ 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 '鍚堣:'
+ }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
+ }
+
+})
+
</script>
<template>
@@ -44,30 +102,31 @@
end-placeholder="缁撴潫鏃堕棿"
/>
<el-button style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">鏌ヨ</el-button>
- <el-button style="margin-top: -5px" id="searchButton" type="primary" :icon="Folder">瀵煎嚭</el-button>
<div class="order-detail">
- <el-table
- :data="dataList"
- :header-cell-style="{ 'text-align': 'center' }"
- :cell-style="{ 'text-align': 'center' }"
- border
+ <vxe-grid
+ max-height="97%"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+
>
-
- <el-table-column type="expand" fixed>
- <template #default="props" >
- <div m="4">
- <p m="t-0 b-2">: {{ props.row['2'] }}</p>
+ <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>
- </template>
- </el-table-column>
+ </div>
+ </template>
+ <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>
-
- <el-table-column
- :prop="index.toString()"
- :show-overflow-tooltip='true'
- width="120" v-for="(item,index) in titleList"
- :label="item" />
- </el-table>
+ </vxe-grid>
</div>
</div>
</template>
@@ -79,12 +138,6 @@
}
.el-col{
border: #181818 1px solid;
-}
-:deep(.el-table .el-input__wrapper) {
- box-shadow: 0 0 0 0 var(--el-input-border-color, var(--el-border-color)) inset;
- cursor: default;
- border: none !important;
- background-color: transparent;
}
.order-primary{
width: 100%;
diff --git a/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue b/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
index 643db12..9c62e6f 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
@@ -1,35 +1,81 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
+import {reactive} from "vue";
+import {useRouter} from "vue-router"
+const router = useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/delivery/createDelivery', query: { deliveryID: 'JG24010101' }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ }
+}
-let deliveryTitle = $ref([
- '搴忓彿',
- '瀹℃牳',
- '鍑哄簱',
- '鍙戣揣鍗曞彿',
- '鍙戣揣鍛�',
- '鍙戣揣鏃ユ湡',
- '瀹㈡埛缂栧彿',
- '瀹㈡埛鍚嶇О',
- '鎵规',
- '椤圭洰鍚嶇О',
- '璁㈠崟缂栧彿',
- '浠樻鏉′欢',
- '浠樻鏂瑰紡',
- '鎬绘暟閲�',
- '鎬婚潰绉�',
- '鎬婚噾棰�',
- '鎶ヨ〃鏃ユ湡',
- '涓氬姟鍛�',
- '閫佽揣鏃ユ湡',
- '鏀舵鏃堕棿'
+const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'OrderList',
+ 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',slots: { content:'content' },width: 50},
+ {title: '鎿嶄綔', width: 110, slots: { default: 'button_slot' }},
+ {type: 'seq', title: '鑷簭', width: 80 },
-])
+ {title: '瀹℃牳', width: 40, slots: { default: 'state' }},
+ {title: '鍑哄簱', width: 40, slots: { default: 'state' }},
+ {field: '3',width:120, title: '鍙戣揣鍗曞彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '4',width:120, title: '鍙戣揣鍛�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5',width:120, title: '鍙戣揣鏃ユ湡',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '6',width:120, title: '瀹㈡埛缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '7',width:120, title: '瀹㈡埛鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '8',width:120, title: '鎵规',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '9',width:120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '10',width:120, title: '璁㈠崟缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '11',width:120, title: '浠樻鏉′欢',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '12',width:120, title: '浠樻鏂瑰紡',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '13',width:120, title: '鎬绘暟閲�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '14',width:120, title: '鎬婚潰绉�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
-let deliveryList =[
- {
- '0': '1',
- '1': '',
- '2': '',
+
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [{
'3': 'JG23120801',
'4': '閮戠強鐝�',
'5': '2023-12-08',
@@ -48,11 +94,26 @@
'18': '瀹胯縼鏌愭煇鍦板潃',
'19': '2023-12-08'
}
-]
+ ],//table body瀹為檯鏁版嵁
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
+ }
+
+})
</script>
<template>
- <div>
+ <div style="width: 100%;height: 100%">
<el-date-picker
v-model="value1"
type="daterange"
@@ -60,46 +121,44 @@
end-placeholder="缁撴潫鏃堕棿"
/>
<el-button style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">鏌ヨ</el-button>
- <el-table
- :data="deliveryList"
- :header-cell-style="{ 'text-align': 'center' }"
- :cell-style="{ 'text-align': 'center' }"
- lazy
- border
- style="width: 99%;"
- max-height="80vh">
- <el-table-column type="expand" fixed>
- <template #default="props" >
- <div m="4">
- <p m="t-0 b-2">: {{ props.row['2'] }}</p>
+ <vxe-grid
+ max-height="97%"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+
+ >
+ <!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
+ <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 #state="{ row}">
+ <el-checkbox checked/>
+ </template>
+
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <template #button_slot="{ row }">
+ <el-button @click="getTableRow(row,'edit')" 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>
- </template>
- </el-table-column>
- <el-table-column label="鎿嶄綔" fixed width="110" >
- <el-button link type="primary" size="small">缂栬緫</el-button>
-<!-- <el-button @click="openCraft" link type="primary" size="small">瀹℃牳</el-button>-->
-<!-- <el-button link type="primary" size="small">淇敼</el-button>-->
- <el-button link type="primary" size="small">鍒犻櫎</el-button>
- </el-table-column>
- <el-table-column
- :prop="index.toString()"
- :show-overflow-tooltip='true'
- width="100" v-for="(item,index) in deliveryTitle"
- :label="item" >
- <el-checkbox v-if="index>0 && index<3" checked/>
- </el-table-column>
-
-
- </el-table>
+ </div>
+ </template>
+ </vxe-grid>
</div>
</template>
<style scoped>
-:deep(.el-table .el-input__wrapper) {
- box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
- cursor: default;
- border: none !important;
- background-color: transparent;
-}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectOrderList.vue b/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectOrderList.vue
index 3a6ef29..9cf28b2 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectOrderList.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectOrderList.vue
@@ -1,61 +1,165 @@
<script setup>
-import {CirclePlus, Search} from "@element-plus/icons-vue";
-import {useRouter} from 'vue-router'
+import {Search} from "@element-plus/icons-vue"
+import {useRouter} from "vue-router"
+import {reactive, ref} from "vue";
+const router = useRouter()
-let router = useRouter()
-let deliveryTitle = $ref([
- '搴忓彿',
- '閿�鍞崟鍙�',
- '瀹㈡埛缂栧彿',
- '瀹㈡埛鍚嶇О',
- '鎬绘暟閲�',
- '鍙敤搴撳瓨',
- '椤圭洰鍚嶇О',
- '鎵规',
- '鎬婚噾棰�',
- '缁撶畻鎬婚潰绉�',
- '鎶ヨ〃鏃ユ湡',
- '鍖呰鏂瑰紡',
- '璁㈠崟绫诲瀷',
- '閫佽揣鍦板潃',
- '涓氬姟鍛�'
-
-])
-
-let deliveryList =[
- {
- '0': '1',
- '1': 'NG23110101',
- '2': '11',
- '3': '涓缓',
- '4': '534',
- '5': '116',
- '6': '榛勭煶鏈夎建鐢佃溅',
- '7': '20鎵�',
- '8': '111100.02',
- '9': '1008.38',
- '10': '2023-10-30',
- '11': '鍙夎溅鏈ㄧ',
- '12': '鏅�氳鍗�',
- '13': '',
- '14': '鐜嬮緳'
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/delivery/createDelivery', query: { deliveryID: 'JG24010101' }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
}
-]
-
-let listName = $ref([
- '涓嬪崟','宸ヨ壓','瀹℃牳','鐢熶骇','浜ゆ帴','涓嬭揪','鍏ュ簱','鍙戣揣'
-])
-
-function addDelivery(){
- router.push({path:'/main/delivery/createDelivery'})
}
+const xGrid = ref()
+const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'OrderList',
+ 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',slots: { content:'content' },width: 50,fixed:"left"},
+ {type:'checkbox',title: '閫夊垯', width: 80,fixed:"left"},
+ {type: 'seq', title: '鑷簭', width: 80 ,fixed:"left"},
+
+ {title: '涓嬪崟', width: 40, slots: { default: 'state' }},
+ {title: '宸ヨ壓', width: 40, slots: { default: 'state' }},
+ {title: '瀹℃牳', width: 40, slots: { default: 'state' }},
+ {title: '鐢熶骇', width: 40, slots: { default: 'state' }},
+ {title: '浜ゆ帴', width: 40, slots: { default: 'state' }},
+ {title: '涓嬭揪', width: 40, slots: { default: 'state' }},
+ {title: '鍏ュ簱', width: 40, slots: { default: 'state' }},
+ {title: '鍙戣揣', width: 40, slots: { default: 'state' }},
+
+ {field: '1',width:120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '2',width:120, title: '瀹㈡埛缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '3',width:120, title: '瀹㈡埛鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '4',width:120, title: '鎬绘暟閲�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5',width:120, title: '鍙敤搴撳瓨',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '6',width:120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '7',width:120, title: '鎵规',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '8',width:120, title: '鎬婚噾棰�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '9',width:120, title: '缁撶畻鎬婚潰绉�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '10',width:120, title: '鎶ヨ〃鏃ユ湡',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '11',width:120, title: '鍖呰鏂瑰紡',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '12',width:120, title: '璁㈠崟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '13',width:120, title: '璁㈠崟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '14',width:120, title: '璁㈠崟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
+
+
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [
+ {'code': 'add', 'name': '鍙戣揣',status: 'primary',icon: 'vxe-icon-add'}
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ '0': '1',
+ '1': 'NG23110102',
+ '2': '11',
+ '3': '涓缓',
+ '4': '534',
+ '5': '116',
+ '6': '榛勭煶鏈夎建鐢佃溅',
+ '7': '20鎵�',
+ '8': '111100.02',
+ '9': '1008.38',
+ '10': '2023-10-30',
+ '11': '鍙夎溅鏈ㄧ',
+ '12': '鏅�氳鍗�',
+ '13': '',
+ '14': '鐜嬮緳'
+ },
+ {
+ '0': '1',
+ '1': 'NG23110101',
+ '2': '11',
+ '3': '涓缓',
+ '4': '534',
+ '5': '116',
+ '6': '榛勭煶鏈夎建鐢佃溅',
+ '7': '20鎵�',
+ '8': '111100.02',
+ '9': '1008.38',
+ '10': '2023-10-30',
+ '11': '鍙夎溅鏈ㄧ',
+ '12': '鏅�氳鍗�',
+ '13': '',
+ '14': '鐜嬮緳'
+ }
+ ],//table body瀹為檯鏁版嵁
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
+ }
+
+})
+const gridEvents = {
+ toolbarButtonClick ({ code }) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (code) {
+ case 'add': {
+ router.push({path: '/main/delivery/createDelivery', params: { orderID: 'NG24010101' }})
+ break
+ }
+ }
+ }
+ }
+}
+
</script>
<template>
- <div>
+ <div style="width: 100%;height: 100%">
<el-date-picker
v-model="value1"
type="daterange"
@@ -63,44 +167,47 @@
end-placeholder="缁撴潫鏃堕棿"
/>
<el-button style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">鏌ヨ</el-button>
- <el-button @click="addDelivery" style="margin-top: -5px" id="searchButton" type="primary" :icon="CirclePlus">鍙戣揣</el-button>
- <el-table
- :data="deliveryList"
- :header-cell-style="{ 'text-align': 'center' }"
- :cell-style="{ 'text-align': 'center' }"
- lazy
- border
- style="width: 99%;"
- max-height="80vh">
- <el-table-column type="expand" fixed>
- <template #default="props" >
- <div m="4">
- <p m="t-0 b-2">璁㈠崟鍙戣揣鏈夊叧鎵�鏈変俊鎭�</p>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="閫夋嫨" fixed width="40" >
- <el-checkbox />
- </el-table-column>
- <el-table-column v-for="item in listName" prop="" :label="item" width="40" >
+ <vxe-grid
+ max-height="97%"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+ v-on="gridEvents"
+
+ >
+ <!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
+ <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 #state="{ row}">
<el-checkbox checked/>
- </el-table-column>
+ </template>
- <el-table-column
- :prop="index.toString()"
- :show-overflow-tooltip='true'
- width="100" v-for="(item,index) in deliveryTitle"
- :label="item" />
- </el-table>
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <template #button_slot="{ row }">
+ <el-button @click="getTableRow(row,'edit')" 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>
-:deep(.el-table .el-input__wrapper) {
- box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
- cursor: default;
- border: none !important;
- background-color: transparent;
-}
+
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
index 3927f90..545b2f5 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -1,11 +1,110 @@
<script setup>
+import {reactive, ref} from "vue"
+import {VXETable} from "vxe-table"
+import {useRouter} from "vue-router"
+const router = useRouter()
+
+const xGrid = ref()
+const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'OrderList',
+ 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: 'seq',fixed:"left", title: '鑷簭', width: 80 },
+ {field: 'orderID',width:120, title: '妤煎彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'orderID',width:120, title: '浜у搧',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'orderID',width:120, title: '瀹�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'orderID',width:120, title: '楂�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'orderID',width:120, title: '鏁伴噺',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'orderID',width:120, title: '鍗曚环',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'orderID',width:120, title: '褰㈢姸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'orderID',width:120, title: '鎬婚潰绉�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'orderID',width:120, title: '鍗曠墖闈㈢Н',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'orderID',width:120, title: '缁撶畻鍗曠墖闈㈢Н',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'orderID',width:120, title: '缁撶畻鎬婚潰绉�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'orderID',width:120, title: '纾ㄨ竟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'orderID',width:120, title: '鍔犲伐瑕佹眰',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'orderID',width:120, title: '澶囨敞',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'orderID',width:120, title: '澶栬喘',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
+
+
+
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [
+ {'code': 'remarks', 'name': '鍔犲伐瑕佹眰'},
+ {'code': 'Craft', 'name': '宸ヨ壓',status: 'primary'},
+ {'code': 'add', 'name': '瀹℃牳',status: 'primary',disabled: true},
+ {'code': 'add', 'name': '淇濆瓨',status: 'primary',icon: 'vxe-icon-save'}
+ ],
+ 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 '鍚堣:'
+ }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
+ }
+
+})
+
+const gridEvents = {
+ toolbarButtonClick ({ code }) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (code) {
+ case 'Craft': {
+ router.push({path: '/main/order/updateOrderCraft', query: { orderID: 12123 }})
+ break
+ }
+ }
+ }
+ }
+}
</script>
<template>
<div class="main-div">
- <div class="order-primary">
+ <div class="order-primary" style="background-color: white">
<el-row>
<el-col :span="2"><el-text>*椤圭洰鍚嶇О锛�</el-text></el-col>
<el-col :span="2"><el-input/></el-col>
@@ -90,33 +189,27 @@
<el-row>
<el-col :span="2"><el-text>鍏朵粬閲戦锛�</el-text></el-col>
<el-col :span="2"><el-text /></el-col>
- <el-col style="background-color: #337ecc" :span="2"><el-button style="width: 100%" type="primary">鍔犲伐瑕佹眰</el-button></el-col>
- <el-col style="background-color: #337ecc" :span="2"><el-button style="width: 100%" type="primary">瀵煎叆Excel</el-button></el-col>
- <el-col style="background-color: #337ecc" :span="2"><el-button style="width: 100%" type="primary">鎻愪氦</el-button></el-col>
+ <el-col :span="2"><el-text>鍏朵粬閲戦澶囨敞锛�</el-text></el-col>
+ <el-col :span="2"><el-text /></el-col>
+
</el-row>
</div>
<div class="order-detail">
- <el-table
- :header-cell-style="{ 'text-align': 'center' }"
- :cell-style="{ 'text-align': 'center' }"
- border
+ <vxe-grid
+ max-height="97%"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+ v-on="gridEvents"
>
- <el-table-column label="搴忓彿" />
- <el-table-column label="妤煎彿" />
- <el-table-column label="浜у搧" />
- <el-table-column label="瀹�" />
- <el-table-column label="楂�" />
- <el-table-column label="鏁伴噺" />
- <el-table-column label="鍗曚环" />
- <el-table-column label="褰㈢姸" />
-
- <el-table-column label="瀹為檯鎬�/鍗曠墖闈㈢Н" width="150"/>
- <el-table-column label="缁撶畻鍗曠墖闈㈢Н" width="150" />
- <el-table-column label="缁撶畻鎬婚潰绉�" width="150" />
- <el-table-column label="鍔犲伐瑕佹眰" width="100" />
- <el-table-column label="澶栬喘" />
- <el-table-column label="澶囨敞" />
- </el-table>
+ <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>
</div>
</template>
diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/Order.vue b/north-glass-erp/northglass-erp/src/views/sd/order/Order.vue
index 3d945b0..b1addba 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/Order.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/Order.vue
@@ -12,6 +12,7 @@
<el-breadcrumb-item :to="{ path: '/main/order/selectOrder' }">璁㈠崟棣栭〉</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/main/order/createOrder' }">鍒涘缓</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/main/order/orderReport' }">鎶ヨ〃</el-breadcrumb-item>
+ <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">鎶ヨ〃</el-breadcrumb-item>
</el-breadcrumb>
</div>
@@ -23,7 +24,7 @@
<style scoped>
#main-div{
- width: 100%;
+ width: 99%;
height: 100%;
}
#div-title{
diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/OrderReport.vue b/north-glass-erp/northglass-erp/src/views/sd/order/OrderReport.vue
index 7940bfe..51c8978 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/OrderReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/OrderReport.vue
@@ -1,49 +1,112 @@
<script setup>
import {Folder, Search} from "@element-plus/icons-vue";
+import BasicTable from "@/components/basic/BasicTable.vue";
+import {reactive} from "vue";
-let titleList = [
- '搴忓彿',
- '璁㈠崟绫诲瀷',
- '瀹㈡埛鍚嶇О',
- '椤圭洰鍚嶇О',
- '閿�鍞崟鍙�',
- '鎵规',
- '浜у搧缂栧彿',
- '浜у搧缂栫爜',
- '浜у搧鍚嶇О',
- '璁㈠崟搴忓彿',
- '妤煎彿',
- '瀹�',
- '楂�',
- '鏁伴噺',
- '鍗婂緞',
- '瀹為檯闈㈢Н',
- '缁撶畻鎬婚潰绉�',
- '褰㈢姸',
- '纾ㄨ竟绫诲瀷',
- '涓诲姞宸ヨ姹�',
- '鍔犲伐瑕佹眰',
- '澶囨敞',
- '鍟嗘爣閫夐」',
- '鍖呰鏂瑰紡',
- '宸ヨ壓娴佺▼',
- '鍛ㄩ暱',
- '鍗曚环',
- '閲戦',
- '閾濇潯鏂瑰紡',
- '璁㈠崟绫诲瀷',
- '涓氬姟鍛�',
- '閫佽揣鍦板潃',
- '鍒跺崟鍛�',
- '寤虹珛鏃堕棿',
- '鎬诲帤搴�',
- '浜у搧澶х被',
- '浜у搧灏忕被',
- '瀹㈡埛鎵规'
+const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'OrderReport',
+ 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: 80 },
+ {field: '1',width:120, title: '璁㈠崟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '2',width:120, title: '瀹㈡埛鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '3',width:120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '4',width:120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5',width:120, title: '鎵规',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '6',width:120, title: '浜у搧缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '7',width:120, title: '浜у搧缂栫爜',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '8',width:120, title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '9',width:120, title: '璁㈠崟搴忓彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '妤煎彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '瀹�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '楂�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '鏁伴噺',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '鍗婂緞',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '瀹為檯闈㈢Н',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '缁撶畻鎬婚潰绉�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '褰㈢姸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '纾ㄨ竟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '涓诲姞宸ヨ姹�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '鍔犲伐瑕佹眰',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '澶囨敞',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '鍟嗘爣閫夐」',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '鍖呰鏂瑰紡',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '宸ヨ壓娴佺▼',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '鍛ㄩ暱',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '鍗曚环',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '閲戦',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '閾濇潯鏂瑰紡',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '璁㈠崟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '涓氬姟鍛�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '閫佽揣鍦板潃',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '鍒跺崟鍛�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '寤虹珛鏃堕棿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '鎬诲帤搴�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '浜у搧澶х被',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '浜у搧灏忕被',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'prodID',width:120, title: '瀹㈡埛鎵规',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
+
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [],
+ 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 '鍚堣:'
+ }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
+ }
+
+})
-]
+
+
+
+
+
+
</script>
<template>
@@ -55,9 +118,14 @@
end-placeholder="缁撴潫鏃堕棿"
/>
<el-button style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">鏌ヨ</el-button>
- <el-button style="margin-top: -5px" id="searchButton" type="primary" :icon="Folder">瀵煎嚭</el-button>
<div class="order-detail">
- <el-table
+ <vxe-grid
+ max-height="97%"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+ ></vxe-grid>
+<!-- <el-table
:data="dataList"
:header-cell-style="{ 'text-align': 'center' }"
:cell-style="{ 'text-align': 'center' }"
@@ -78,7 +146,7 @@
:show-overflow-tooltip='true'
width="100" v-for="(item,index) in titleList"
:label="item" />
- </el-table>
+ </el-table>-->
</div>
</div>
</template>
@@ -102,6 +170,10 @@
}
.order-detail{
width: 100%;
- height: 80%;
+ height: 90%;
+
}
+
+
+
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue b/north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue
index 0f15532..5581944 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue
@@ -1,38 +1,153 @@
<script setup>
import {Search} from "@element-plus/icons-vue"
import {useRouter} from "vue-router"
+ import {reactive} from "vue";
const router = useRouter()
- let orderList = $ref([
- {
- '1':'NG23120701',
- '2':'1',
- '3':'涓北甯備簯闀滃灞呮湁闄愬叕鍙�',
- '4':'澶ф澘闀�',
- '5':'涓�鎵�1',
- '6':'999999.99',
- '7':'99999',
- '8':'99999.99',
- '9':'99999.99',
- '10':'2023-12-07',
- '11':'瑁呯',
- '12':'鏅�氳鍗�',
- '13':'寮犱笁',
- '14':'绗簩鎵�',
- '15':'2023-12-30',
+ const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/order/createOrder', query: { orderID: 'NG24010101' }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
}
- ])
- let listName = $ref([
- '涓嬪崟','宸ヨ壓','瀹℃牳','鐢熶骇','浜ゆ帴','涓嬭揪','鍏ュ簱','鍙戣揣'
- ])
-
- function openCraft(){
- router.push({name:'updateOrderCraft'})
}
+
+ const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'OrderList',
+ 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',slots: { content:'content' },width: 50,fixed:"left",},
+ {title: '鎿嶄綔', width: 110, slots: { default: 'button_slot' },fixed:"left",},
+ {type: 'seq', title: '鑷簭', width: 80 ,fixed:"left",},
+
+ {title: '涓嬪崟', width: 40, slots: { default: 'state' }},
+ {title: '宸ヨ壓', width: 40, slots: { default: 'state' }},
+ {title: '瀹℃牳', width: 40, slots: { default: 'state' }},
+ {title: '鐢熶骇', width: 40, slots: { default: 'state' }},
+ {title: '浜ゆ帴', width: 40, slots: { default: 'state' }},
+ {title: '涓嬭揪', width: 40, slots: { default: 'state' }},
+ {title: '鍏ュ簱', width: 40, slots: { default: 'state' }},
+ {title: '鍙戣揣', width: 40, slots: { default: 'state' }},
+
+ {field: '1',width:120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '2',width:120, title: '瀹㈡埛缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '3',width:120, title: '瀹㈡埛鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '4',width:120, title: '鎬绘暟閲�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5',width:120, title: '鍙敤搴撳瓨',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '6',width:120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '7',width:120, title: '鎵规',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '8',width:120, title: '鎬婚噾棰�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '9',width:120, title: '缁撶畻鎬婚潰绉�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '10',width:120, title: '鎶ヨ〃鏃ユ湡',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '11',width:120, title: '鍖呰鏂瑰紡',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '12',width:120, title: '璁㈠崟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '13',width:120, title: '璁㈠崟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '14',width:120, title: '璁㈠崟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
+
+
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [
+
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ '0': '1',
+ '1': 'NG23110102',
+ '2': '11',
+ '3': '涓缓',
+ '4': '534',
+ '5': '116',
+ '6': '榛勭煶鏈夎建鐢佃溅',
+ '7': '20鎵�',
+ '8': '111100.02',
+ '9': '1008.38',
+ '10': '2023-10-30',
+ '11': '鍙夎溅鏈ㄧ',
+ '12': '鏅�氳鍗�',
+ '13': '',
+ '14': '鐜嬮緳'
+ },
+ {
+ '0': '1',
+ '1': 'NG23110101',
+ '2': '11',
+ '3': '涓缓',
+ '4': '534',
+ '5': '116',
+ '6': '榛勭煶鏈夎建鐢佃溅',
+ '7': '20鎵�',
+ '8': '111100.02',
+ '9': '1008.38',
+ '10': '2023-10-30',
+ '11': '鍙夎溅鏈ㄧ',
+ '12': '鏅�氳鍗�',
+ '13': '',
+ '14': '鐜嬮緳'
+ }
+ ],//table body瀹為檯鏁版嵁
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
+ }
+
+ })
+
+
+
+
+
+
</script>
<template>
- <div >
+ <div style="width: 100%;height: 100%">
<el-date-picker
v-model="value1"
type="daterange"
@@ -40,85 +155,46 @@
end-placeholder="缁撴潫鏃堕棿"
/>
<el-button style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">鏌ヨ</el-button>
- <el-table
- :data="orderList"
- :header-cell-style="{ 'text-align': 'center' }"
- :cell-style="{ 'text-align': 'center' }"
- lazy
- border
- style="width: 99%;"
- max-height="80vh">
- <el-table-column type="expand" fixed>
- <template #default="props" >
- <div m="4">
+ <vxe-grid
+ max-height="97%"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
- <p m="t-0 b-2">缂栧彿: {{ props.row.prodID }}</p>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="鎿嶄綔" fixed width="110" >
-<!-- <el-button @click="openCraft" link type="primary" size="small">宸ヨ壓</el-button>-->
-<!-- 瀹℃牳涓庡伐鑹洪兘鍦ㄥ悓涓�涓寜閽�-->
- <el-button link type="primary" size="small">缂栬緫</el-button>
- <el-button link type="primary" size="small">鍒犻櫎</el-button>
-<!--璁㈠崟瀹℃牳鍚庝笉鑳藉垹闄ゅ彧鑳戒綔搴�-->
- </el-table-column>
- <el-table-column label="搴忓彿" width="40" />
+ >
+ <!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
+ <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>
- <el-table-column v-for="item in listName" prop="" :label="item" width="40" >
-<!-- <el-table-column prop="1" >-->
-<!-- <template #header>-->
-<!-- <el-button type="primary" size="small" style="width: 10px;height: 10px"></el-button>-->
-<!-- </template>-->
-
-<!-- <el-checkbox checked/>-->
-<!-- </el-table-column>-->
+ <template #state="{ row}">
<el-checkbox checked/>
+ </template>
- </el-table-column>
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <template #button_slot="{ row }">
+ <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">缂栬緫</el-button>
+ <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">鍒犻櫎</el-button>
+ </template>
- <el-table-column prop="1" width="110" label="閿�鍞崟鍙�" />
-
- <el-table-column prop="2" width="55" label="瀹㈡埛缂栧彿" />
-
- <el-table-column prop="3" width="120" label="瀹㈡埛鍚嶇О" />
-
- <el-table-column prop="4" width="120" label="椤圭洰鍚嶇О" />
-
- <el-table-column prop="5" label="鎵规" />
-
- <el-table-column prop="6" width="100" label="鎬婚噾棰�" />
-
- <el-table-column prop="7" label="鏁伴噺" />
-
- <el-table-column prop="8" width="100" label="缁撶畻闈㈢Н" />
-
- <el-table-column prop="9" width="100" label="瀹為檯闈㈢Н" />
-
- <el-table-column prop="10" width="100" label="鎶ヨ〃鏃ユ湡" />
-
- <el-table-column prop="11" width="100" label="鍖呰鏂瑰紡" />
-
- <el-table-column prop="12" width="100" label="璁㈠崟绫诲瀷" />
-
- <el-table-column prop="13" label="涓氬姟鍛�" />
-
- <el-table-column prop="14" width="100" label="瀹㈡埛鎵规" />
-
- <el-table-column prop="15" width="100" label="浜よ揣鏃ユ湡" />
+ <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>
-
- </el-table>
</div>
</template>
<style scoped>
-:deep(.el-table .el-input__wrapper) {
- box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
- cursor: default;
- border: none !important;
- background-color: transparent;
-}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue b/north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue
index b27d91d..a290769 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue
@@ -1,25 +1,78 @@
<script setup>
- let titleList = [
- '搴忓彿',
- '妤煎彿',
- '鎴愬搧鍚嶇О',
- '鏍囪',
- '瀛愪骇鍝�',
- '鎴愬搧瀹�',
- '鎴愬搧楂�',
- '褰㈢姸',
- '鎴愬搧灏哄',
- '纾ㄨ竟绫诲瀷',
- '鍗曠墖瀹�',
- '鍗曠墖楂�',
- '鍗曠墖灏哄',
- '鏁伴噺',
- '宸ヨ壓娴佺▼',
- '鍔犲伐瑕佹眰',
- '澶囨敞'
- ]
+import {reactive, ref} from "vue"
+import {useRouter} from "vue-router"
+const router = useRouter()
- let dataList = [
+
+const xGrid = ref()
+const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾规ゼ鍙�
+ rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'OrderList',
+ 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:[
+ {title: '鎿嶄綔', width: 110, slots: { default: 'button_slot' },fixed:"left",},
+ {field: '0',width:120, title: '搴忓彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '1',width:120, title: '妤煎彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '2',width:120, title: '鎴愬搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '3',width:120, title: '鏍囪',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '4',width:120, title: '瀛愪骇鍝�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5',width:120, title: '鎴愬搧瀹�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '6',width:120, title: '鎴愬搧楂�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '7',width:120, title: '褰㈢姸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '8',width:120, title: '鎴愬搧灏哄',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '9',width:120, title: '纾ㄨ竟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '10',width:120, title: '鍗曠墖瀹�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '11',width:120, title: '鍗曠墖楂�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '12',width:120, title: '鍗曠墖灏哄',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '13',width:120, title: '鏁伴噺',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '14',width:120, title: '宸ヨ壓娴佺▼',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '15',width:120, title: '鍔犲伐瑕佹眰',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '16',width:120, title: '澶囨敞',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
+ ],//琛ㄥご鎸夐挳
+ mergeCells: [
+ { row: 0, col: 1, rowspan: 2, colspan: 1 },
+ { row: 0, col: 2, rowspan: 2, colspan: 1 },
+ { row: 0, col: 3, rowspan: 2, colspan: 1 },
+ { row: 0, col: 6, rowspan: 2, colspan: 1 },
+ { row: 0, col: 7, rowspan: 2, colspan: 1 },
+ ],
+ toolbarConfig: {
+ buttons: [
+ {'code': 'remarks', 'name': '鍔犲伐瑕佹眰'},
+ {'code': 'Craft', 'name': '璁㈠崟璇︽儏',status: 'primary'},
+ {'code': 'Craft', 'name': '瀹℃牳',status: 'primary'},
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
{
'0' : '1',
'1' : 'JHH-T33-G-07A-01',
@@ -60,28 +113,36 @@
'16' : '',
'17' : 0,
}
- ]
+ ],//table body瀹為檯鏁版嵁
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
+ }
- const objectSpanMethod = ({ row, column, rowIndex, columnIndex }) => {
+})
- if (columnIndex === 2 || columnIndex === 3 || columnIndex === 4) {
- // 鑾峰彇褰撳墠琛岀殑闇�瑕佸悎骞剁殑鍗曞厓鏍兼暟
- const rowNum = dataList[rowIndex]['17']
- if (rowNum) {
- // 涓�涓崟鍏冩牸绾靛悜妯悜鍚堝苟鐨勫崟鍏冩牸鏁伴噺
- return {
- rowspan: rowNum, // 绾靛悜鍚堝苟鍗曞厓鏍肩殑鏁伴噺
- colspan: rowNum > 0 ? 1 : 0 // 妯悜鍚堝苟鍗曞厓鏍肩殑鏁伴噺锛岀旱鍚戝崟鍏冩牸鏁版槸0鐨勮瘽璇存槑浠栨槸琚悎骞剁殑锛屾í鍚戝崟鍏冩牸鏁颁篃灏变负0涓嶆樉绀轰簡锛岃繖閲屼笉鑰冭檻妯悜鍚堝苟鎵�浠ュ啓姝荤殑鏄�1
- };
- } else {
- // 琚悎骞堕」璁剧疆涓�0锛屽嵆涓嶆樉绀哄崟鍏冩牸
- return {
- rowspan: 0,
- colspan: 0
- };
+const gridEvents = {
+ toolbarButtonClick ({ code }) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (code) {
+ case 'Craft': {
+ router.push({path: '/main/order/createOrder', query: { orderID: 12123 }})
+ break
+ }
}
}
}
+}
@@ -90,7 +151,7 @@
<template>
<div class="main-div">
- <div class="order-primary">
+ <div class="order-primary" style="background-color: white">
<el-row>
<el-col :span="4"><el-text>閿�鍞崟鍙凤細</el-text></el-col>
<el-col :span="4"><el-text>NG23120704</el-text></el-col>
@@ -112,38 +173,42 @@
<el-col :span="4"><el-text>鏈ㄧ</el-text></el-col>
<el-col :span="4"><el-text>浜よ揣鏃ユ湡锛�</el-text></el-col>
<el-col :span="4"><el-text>2023-11-11</el-text></el-col>
- <el-col style="background-color: #337ecc" :span="4"><el-button style="width: 100%;height: 100%" size="small" type="primary">鍔犲伐瑕佹眰璇︾粏</el-button></el-col>
- <el-col style="background-color: #337ecc" :span="4"><el-button style="width: 100%;height: 100%" size="small" type="primary">瀹℃牳</el-button></el-col>
</el-row>
</div>
<div class="order-detail">
+ <vxe-grid
+ max-height="97%"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+ v-on="gridEvents"
- <el-table
- :data="dataList"
- :header-cell-style="{ 'text-align': 'center' }"
- :cell-style="{ 'text-align': 'center' }"
- border
- :span-method="objectSpanMethod"
>
+ <!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
+ <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>
- <el-table-column type="expand" fixed>
- <template #default="props" >
- <div m="4">
- <p m="t-0 b-2">浜у搧鍚嶇О: {{ props.row['2'] }}</p>
- <p m="t-0 b-2">鍗曠墖: {{ props.row['4'] }}</p>
- <p m="t-0 b-2">宸ヨ壓: {{ props.row['14'] }}</p>
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <template #button_slot="{ row }">
+ <el-button @click="getTableRow(row,'edit')" 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>
- </template>
- </el-table-column>
+ </div>
+ </template>
+ </vxe-grid>
- <el-table-column label="鎿嶄綔" fixed><el-button link type="primary" size="small">淇敼宸ヨ壓</el-button></el-table-column>
- <el-table-column
- :prop="index.toString()"
- :show-overflow-tooltip='true'
- width="100"
- v-for="(item,index) in titleList" :label="item" />
- </el-table>
</div>
</div>
</template>
@@ -156,12 +221,6 @@
}
.el-col{
border: #181818 1px solid;
-}
-:deep(.el-input__wrapper) {
- box-shadow: 0 0 0 0 var(--el-input-border-color, var(--el-border-color)) inset;
- cursor: default;
- border: none !important;
- background-color: transparent;
}
.order-primary{
width: 100%;
diff --git a/north-glass-erp/northglass-erp/src/views/sd/product/Product.vue b/north-glass-erp/northglass-erp/src/views/sd/product/Product.vue
index edf987c..fd31b46 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/product/Product.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/product/Product.vue
@@ -18,8 +18,8 @@
<el-breadcrumb :separator-icon="ArrowRight">
<el-breadcrumb-item :to="{ path: '/main/product/selectProduct' }">浜у搧棣栭〉</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/main/product/createProduct' }">鍒涘缓</el-breadcrumb-item>
- <el-breadcrumb-item :to="{ path: '/main/product/test' }">娴嬭瘯</el-breadcrumb-item>
- <el-breadcrumb-item :to="{ path: '/main/product/test1' }">娴嬭瘯</el-breadcrumb-item>
+<!-- <el-breadcrumb-item :to="{ path: '/main/product/test' }">娴嬭瘯</el-breadcrumb-item>-->
+<!-- <el-breadcrumb-item :to="{ path: '/main/product/test1' }">娴嬭瘯</el-breadcrumb-item>-->
<el-breadcrumb-item v-show="false" :to="{ path: '/main/product/test1' }">娴嬭瘯</el-breadcrumb-item>
</el-breadcrumb>
diff --git a/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue b/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
index 5a71562..f0b1d2c 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
@@ -1,45 +1,94 @@
<script setup>
-import request from "@/utils/request";
-import deepClone from "@/utils/deepClone";
-import {ElDatePicker, ElMessage} from "element-plus";
+import request from "@/utils/request"
+import deepClone from "@/utils/deepClone"
+import {ElDatePicker, ElMessage} from "element-plus"
import useProductGlassTypeStore from "@/stores/productGlassType"
-import {watch} from "vue";
-import {Search} from "@element-plus/icons-vue";
-import GlassType from "@/components/sd/product/GlassType.vue";
-import router from "@/router";
+import {watch} from "vue"
+import {Search} from "@element-plus/icons-vue"
+import GlassType from "@/components/sd/product/GlassType.vue"
+import {useRouter} from 'vue-router'
+import BasicTable from '@/components/basic/BasicTable.vue'
let productGlassTypeStore = useProductGlassTypeStore()
+let router=useRouter()
watch(productGlassTypeStore,(newVal,oldVal) => {
- console.log(newVal.GlassType)
let list = productList.filter( product=>{
return product.glassType==newVal.GlassType
})
})
-let loading = $ref(true)
-let productList=$ref([])
+//let productList=$ref([])
+let flag = $ref(false)
request.get("/product").then((res) => {
if(res.code==200){
- productList= deepClone(res.data)
- loading=false
+ tableProp.datas= deepClone(res.data)
+ flag = true
}else{
ElMessage.warning(res.msg)
router.push("/login")
}
})
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+let tableProp = $ref({
+ title:[
+ {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
+ {type: 'seq',fixed:"left", title: '鑷簭', width: 80 },
+ {title: '鎿嶄綔', width: 110, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'prodID', title: '缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'product', title: '鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'typeName', title: '鎵�灞炵被鍒�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'query', title: '蹇�熸煡璇�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'remarks', title: '澶囨敞',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'creator', title: '鍒涘缓浜�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'createTime', title: '鍒涘缓鏃堕棿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
+ ],
+ datas:null,
+ footList:[],
+ //绛涢�夋潯浠跺垪
+ filter:{
+ },
+})
+
+
+
+const getChildren = (row,type) =>{
+ switch (type) {
+ case 'edit' : {
+ router.push({path: '/main/product/createProduct', query: { id: row.id }})
+ break
+ }
+ case 'delete': {
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ }
+}
+
+const getCheckList = (row) =>{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑纭澶嶉�夋淇℃伅鍙湪鎺у埗鍙版煡鐪�')
+ console.log(row)
+}
+
</script>
<template>
- <div>
- <glass-type style="float: left" />
+ <div style="width: 100%;height: 100%">
+ <glass-type style="float: left" />
+ <el-button
+ id="select"
+ type="primary" :icon="Search">鏌ヨ</el-button>
- <el-button
- id="select"
- type="primary" :icon="Search">鏌ヨ</el-button>
+ <basic-table style="height: 97%" v-if="flag"
+ :tableProp="tableProp"
+ @getCheckList="getCheckList"
+ @getChildren="getChildren"
+ ></basic-table>
- <el-table
+
+<!-- <el-table
v-loading="loading"
:data="productList"
:header-cell-style="{ 'text-align': 'center' }"
@@ -65,7 +114,6 @@
</el-table-column>
<el-table-column label="鎿嶄綔" width="110" fixed >
<el-button link type="primary" size="small">缂栬緫</el-button>
-<!-- <el-button link type="primary" size="small">淇敼</el-button>-->
<el-button link type="primary" size="small">鍒犻櫎</el-button>
</el-table-column>
<el-table-column sortable prop="prodID" label="缂栧彿" width="110" />
@@ -75,7 +123,7 @@
<el-table-column prop="remarks" label="澶囨敞" :show-overflow-tooltip='true' width="100" />
<el-table-column prop="creator" label="鍒涘缓浜�" width="75" />
<el-table-column prop="createTime" label="鍒涘缓鏃堕棿" width="100" />
- </el-table>
+ </el-table>-->
</div>
</template>
diff --git a/north-glass-erp/northglass-erp/src/views/sd/product/Test.vue b/north-glass-erp/northglass-erp/src/views/sd/product/Test.vue
index b774da4..4877821 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/product/Test.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/product/Test.vue
@@ -29,6 +29,7 @@
let tableProp = $ref({
title:[
+
{type:'expand',fixed:"left",slots: { content:'content' },width: 50},
{ type: 'checkbox',fixed:"left", title: '閫夋嫨', width: 80 },
{ type: 'seq',fixed:"left", title: '鑷簭', width: 80 },
@@ -41,38 +42,7 @@
{field: 'creator', title: '鍒涘缓浜�', sortable: true},
{field: 'createTime', title: '鍒涘缓鏃堕棿', sortable: true}
],
- datas:[
- {
- "id": 24,
- "prodID": "0101000001",
- "product": "6mm瓒呯櫧骞抽挗(澶�)+1.52PVB瓒呯櫧+6mm瓒呯櫧LNGFX85骞抽挗+20Ar鏆栬竟鏉�(缁�)+10mm瓒呯櫧LYE-80骞抽挗(鍐�) ",
- "glassType": "0101",
- "typeName": "骞抽挗",
- "totalThickness": 40,
- "thickness": 22,
- "remarks": "1",
- "state": 1,
- "creator": "寮犱笁閲�",
- "createTime": "2023-11-23",
- "updateTime": null,
- "query": "6+6+10+10+10",
- "_X_ROW_KEY": "row_11"
- },{
- "id": 24,
- "prodID": "0101000001",
- "product": "6mm瓒呯櫧骞抽挗(澶�)+1.52PVB瓒呯櫧+6mm瓒呯櫧LNGFX85骞抽挗+20Ar鏆栬竟鏉�(缁�)+10mm瓒呯櫧LYE-80骞抽挗(鍐�) ",
- "glassType": "0101",
- "typeName": "骞抽挗",
- "totalThickness": 40,
- "thickness": 22,
- "remarks": "1",
- "state": 1,
- "creator": "寮犱笁閲�",
- "createTime": "2023-11-23",
- "updateTime": null,
- "query": "6+6+10+10+10",
- "_X_ROW_KEY": "row_11"
- }],
+ datas:null,
//鑴氶儴姹傚拰
footList:['remarks'],
//绛涢�夋潯浠跺垪
@@ -89,7 +59,7 @@
let flag = $ref(false)
request.get("/product").then((res) => {
if(res.code==200){
- //tableProp.datas= res.data
+ tableProp.datas= res.data
flag = true
//console.log(res.data)
}else{
@@ -97,18 +67,17 @@
}
})
-//蹇呴』鍔犱笂
//鎺ユ敹瀛愮粍浠朵紶杩囨潵鐨勯�変腑澶嶉�夋鏁版嵁
const getCheckList = (row) =>{
alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑纭澶嶉�夋淇℃伅鍙湪鎺у埗鍙版煡鐪�')
console.log(row)
}
-//蹇呴』鍔犱笂
+
const getChildren = (row,type) =>{
switch (type) {
case 'edit' :{
- alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
break
}
@@ -116,10 +85,7 @@
alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
break
}
-
}
-
-
}
const getFilterChildren = (param) =>{
@@ -132,8 +98,7 @@
<template>
<div style="width: 100%;height: 100%;">
- <el-input v-model="tableProp.filter.product"/>
-
+<!-- <el-input v-model="tableProp.filter.product"/>-->
<basic-table v-if="flag"
:tableProp="tableProp"
@getCheckList="getCheckList"
diff --git a/north-glass-erp/northglass-erp/src/views/sd/returns/CreateReturns.vue b/north-glass-erp/northglass-erp/src/views/sd/returns/CreateReturns.vue
index c0bbd7c..8e203da 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/returns/CreateReturns.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/returns/CreateReturns.vue
@@ -1,65 +1,100 @@
<script setup>
-let deliveryTitle = $ref([
- '鍙戣揣鍗曞彿',
- '鎵规',
- '鍙��鏁伴噺',
- '宸查��鏁伴噺',
- '鎬绘暟閲�',
- '鏈閫�璐ф暟閲�',
- '妤煎彿',
- '浜у搧缂栧彿',
- '浜у搧鍚嶇О',
- '鍗曚环',
- '搴撳尯',
- '寮傚舰鍙傛暟',//鍙互涓嶉渶瑕�
- '閲戦',
- '瀹�',
- '楂�',
- '褰㈢姸',
- '瀹為檯鍗曠墖/鎬婚潰绉�',
- '缁撶畻鍗曠墖闈㈢Н',
- '缁撶畻鎬婚潰绉�',
- '鍔犲伐瑕佹眰',
- '澶囨敞',
- '纾ㄨ竟绫诲瀷',
- '鍛ㄩ暱',
+import {reactive} from "vue";
-])
-let deliveryList =[
- {
- '0': 'JG23110101',
- '1': '20鎵�1',
- '2': '16',
- '3': '4',
- '4': '20',
- '5': '16',
- '6': 'A妤糱灞�',
- '7': '101',
- '8': '10mmLYTM-140寮挗鍖�',
- '9': '1008.38',
- '10': 'A鍙锋煴瀛�',
- '11': '',
- '12': '100',
- '13': '3360',
- '14': '2440',
- '15': '鏅舰',
- '16': '1.11/100.1',
- '17': '1.22',
- '18': '11.11',
- '19': '杩欐槸鍔犲伐瑕佹眰',
- '20': '杩欐槸澶囨敞',
- '21': '杩欐槸纾ㄨ竟绫诲瀷',
- '22': '1.1'
+const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'OrderList',
+ 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',slots: { content:'content' },width: 50,fixed:"left"},
+ {type:'checkbox',title: '閫夊垯', width: 80,fixed:"left"},
+ {type: 'seq', title: '鑷簭', width: 80 ,fixed:"left"},
+ {field: '0',width:120, title: '鍙戣揣鍗曞彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '1',width:120, title: '鎵规',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '2',width:120, title: '鍙��鏁伴噺',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '3',width:120, title: '宸查��鏁伴噺',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '4',width:120, title: '鎬绘暟閲�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5',width:120, title: '閫�璐ф暟閲�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '6',width:120, title: '妤煎彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '7',width:120, title: '浜у搧缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '8',width:120, title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '9',width:120, title: '鍗曚环',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '10',width:120, title: '搴撳尯',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '11',width:120, title: '閲戦',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '12',width:120, title: '瀹�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '13',width:120, title: '楂�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '14',width:120, title: '褰㈢姸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '15',width:120, title: '鍗曠墖闈㈢Н',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '16',width:120, title: '鎬婚潰绉�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '17',width:120, title: '缁撶畻鍗曠墖闈㈢Н',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '18',width:120, title: '缁撶畻鎬婚潰绉�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '19',width:120, title: '鍔犲伐瑕佹眰',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '20',width:120, title: '澶囨敞',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '21',width:120, title: '纾ㄨ竟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '22',width:120, title: '鍛ㄩ暱',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+
+
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [
+ {'code': 'add', 'name': '淇濆瓨',status: 'primary',icon: 'vxe-icon-save'}
+ ],
+ 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 '鍚堣:'
+ }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
}
-]
+
+})
+
</script>
<template>
<div class="main-div">
- <div class="order-primary">
+ <div class="order-primary" style="background-color: white" >
<el-row>
<el-col :span="2"><el-text>瀹㈡埛缂栫爜:</el-text></el-col>
<el-col :span="5"><el-text style="font-size: large;color: #181818">131</el-text></el-col>
@@ -75,7 +110,7 @@
<el-option/>
</el-select>
</el-col>
- <el-col :span="2"><el-text>鍙戣揣鎶ヨ〃鏃ユ湡:</el-text></el-col>
+ <el-col :span="2"><el-text>閫�璐ф棩鏈�:</el-text></el-col>
<el-col :span="5">
<el-date-picker
type="week"
@@ -90,33 +125,33 @@
<el-col :span="5"><el-text style="font-size: large;color: #181818"></el-text></el-col>
<el-col :span="2"><el-text>鍙戣揣鍛�:</el-text></el-col>
<el-col :span="5"><el-text style="font-size: large;color: #181818"></el-text></el-col>
- <el-col style="background-color: #337ecc" :span="2"><el-button style="width: 100%" type="primary">淇濆瓨</el-button></el-col>
</el-row>
</div>
<div class="order-detail">
- <el-table
- :data="deliveryList"
- :header-cell-style="{ 'text-align': 'center' }"
- :cell-style="{ 'text-align': 'center' }"
- border
- >
- <el-table-column type="expand" fixed>
- <template #default="props" >
- <div m="4">
- <p m="t-0 b-2">璁㈠崟鍙戣揣鏈夊叧鎵�鏈変俊鎭�</p>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="閫夊垯" fixed>
- <el-checkbox/>
- </el-table-column>
- <el-table-column
- :prop="index.toString()"
- :show-overflow-tooltip='true'
- width="110" v-for="(item,index) in deliveryTitle"
- :label="item" />
+ <vxe-grid
+ max-height="97%"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
- </el-table>
+ >
+ <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>
+ <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>
+
+ </vxe-grid>
</div>
</div>
diff --git a/north-glass-erp/northglass-erp/src/views/sd/returns/ReturnsReport.vue b/north-glass-erp/northglass-erp/src/views/sd/returns/ReturnsReport.vue
index 2bae8fb..883648d 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/returns/ReturnsReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/returns/ReturnsReport.vue
@@ -1,6 +1,7 @@
<script setup>
import {Folder, Search} from "@element-plus/icons-vue";
+import {reactive} from "vue";
let titleList = [
'搴忓彿',
@@ -33,6 +34,93 @@
]
+
+const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'OrderList',
+ 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',slots: { content:'content' },width: 50,fixed:"left"},
+ {type: 'seq', title: '鑷簭', width: 80 ,fixed:"left"},
+ {field: '0',width:120, title: '閫�璐у崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '1',width:120, title: '鍙戣揣鍗曞彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '2',width:120, title: '璁㈠崟鍗曞彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '3',width:120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '4',width:120, title: '瀹㈡埛鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5',width:120, title: '涓氬姟鍛�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '6',width:120, title: '閫佽揣鍦板潃',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '7',width:120, title: '鍙戣揣鍛�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '8',width:120, title: '妤煎彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '9',width:120, title: '浜у搧缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '10',width:120, title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '11',width:120, title: '閫�璐ф暟閲�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '12',width:120, title: '鍛ㄩ暱',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '13',width:120, title: '瀹為檯闈㈢Н',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '14',width:120, title: '閫�璐ч潰绉�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '15',width:120, title: '鍗曚环',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '16',width:120, title: '閫�璐ч噾棰�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '17',width:120, title: '瀹�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '18',width:120, title: '楂�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '19',width:120, title: '褰㈢姸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '20',width:120, title: '纾ㄨ竟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '21',width:120, title: '澶囨敞',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '22',width:120, title: '鍔犲伐瑕佹眰',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '22',width:120, title: '寤虹珛鏃堕棿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
+
+
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [
+ ],
+ 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 '鍚堣:'
+ }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
+ }
+
+})
+
</script>
<template>
@@ -46,28 +134,30 @@
<el-button style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">鏌ヨ</el-button>
<el-button style="margin-top: -5px" id="searchButton" type="primary" :icon="Folder">瀵煎嚭</el-button>
<div class="order-detail">
- <el-table
- :data="dataList"
- :header-cell-style="{ 'text-align': 'center' }"
- :cell-style="{ 'text-align': 'center' }"
- border
+ <vxe-grid
+ max-height="97%"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+
>
-
- <el-table-column type="expand" fixed>
- <template #default="props" >
- <div m="4">
- <p m="t-0 b-2">: {{ props.row['2'] }}</p>
+ <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>
- </template>
- </el-table-column>
+ </div>
+ </template>
+ <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>
-
- <el-table-column
- :prop="index.toString()"
- :show-overflow-tooltip='true'
- width="120" v-for="(item,index) in titleList"
- :label="item" />
- </el-table>
+ </vxe-grid>
</div>
</div>
</template>
@@ -79,12 +169,6 @@
}
.el-col{
border: #181818 1px solid;
-}
-:deep(.el-table .el-input__wrapper) {
- box-shadow: 0 0 0 0 var(--el-input-border-color, var(--el-border-color)) inset;
- cursor: default;
- border: none !important;
- background-color: transparent;
}
.order-primary{
width: 100%;
diff --git a/north-glass-erp/northglass-erp/src/views/sd/returns/SelectDeliveryList.vue b/north-glass-erp/northglass-erp/src/views/sd/returns/SelectDeliveryList.vue
index cbc1217..615fdb4 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/returns/SelectDeliveryList.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/returns/SelectDeliveryList.vue
@@ -1,61 +1,158 @@
<script setup>
-import {CirclePlus, Search} from "@element-plus/icons-vue";
-import {useRouter} from 'vue-router'
+import {Search} from "@element-plus/icons-vue"
+import {useRouter} from "vue-router"
+import {reactive, ref} from "vue";
+const router = useRouter()
-let router = useRouter()
-let deliveryTitle = $ref([
- '搴忓彿',
- '鍙戣揣鍗曞彿',
- '瀹㈡埛缂栧彿',
- '瀹㈡埛鍚嶇О',
- '鎬绘暟閲�',
- '鍙敤搴撳瓨',
- '椤圭洰鍚嶇О',
- '鎵规',
- '鎬婚噾棰�',
- '缁撶畻鎬婚潰绉�',
- '鎶ヨ〃鏃ユ湡',
- '鍖呰鏂瑰紡',
- '璁㈠崟绫诲瀷',
- '閫佽揣鍦板潃',
- '涓氬姟鍛�'
-
-])
-
-let deliveryList =[
- {
- '0': '1',
- '1': 'NG23110101',
- '2': '11',
- '3': '涓缓',
- '4': '534',
- '5': '116',
- '6': '榛勭煶鏈夎建鐢佃溅',
- '7': '20鎵�',
- '8': '111100.02',
- '9': '1008.38',
- '10': '2023-10-30',
- '11': '鍙夎溅鏈ㄧ',
- '12': '鏅�氳鍗�',
- '13': '',
- '14': '鐜嬮緳'
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/returns/createReturns', query: { deliveryID: 'JG24010101' }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
}
-]
-
-let listName = $ref([
- '瀹℃牳','鍑哄簱'
-])
-
-function addReturns(){
- router.push({path:'/main/Returns/createReturns'})
}
+const xGrid = ref()
+const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'OrderList',
+ 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',slots: { content:'content' },width: 50,fixed:"left"},
+ {title: '鎿嶄綔',slots: { default: 'button_slot' }, width: 80,fixed:"left"},
+ {type: 'seq', title: '鑷簭', width: 80 ,fixed:"left"},
+
+ {title: '瀹℃牳', width: 40, slots: { default: 'state' }},
+ {title: '鍑哄簱', width: 40, slots: { default: 'state' }},
+
+ {field: '1',width:120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '2',width:120, title: '瀹㈡埛缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '3',width:120, title: '瀹㈡埛鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '4',width:120, title: '鎬绘暟閲�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5',width:120, title: '鍙敤搴撳瓨',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '6',width:120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '7',width:120, title: '鎵规',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '8',width:120, title: '鎬婚噾棰�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '9',width:120, title: '缁撶畻鎬婚潰绉�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '10',width:120, title: '鎶ヨ〃鏃ユ湡',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '11',width:120, title: '鍖呰鏂瑰紡',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '12',width:120, title: '璁㈠崟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '13',width:120, title: '璁㈠崟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '14',width:120, title: '璁㈠崟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
+
+
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [
+ ],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ '0': '1',
+ '1': 'NG23110102',
+ '2': '11',
+ '3': '涓缓',
+ '4': '534',
+ '5': '116',
+ '6': '榛勭煶鏈夎建鐢佃溅',
+ '7': '20鎵�',
+ '8': '111100.02',
+ '9': '1008.38',
+ '10': '2023-10-30',
+ '11': '鍙夎溅鏈ㄧ',
+ '12': '鏅�氳鍗�',
+ '13': '',
+ '14': '鐜嬮緳'
+ },
+ {
+ '0': '1',
+ '1': 'NG23110101',
+ '2': '11',
+ '3': '涓缓',
+ '4': '534',
+ '5': '116',
+ '6': '榛勭煶鏈夎建鐢佃溅',
+ '7': '20鎵�',
+ '8': '111100.02',
+ '9': '1008.38',
+ '10': '2023-10-30',
+ '11': '鍙夎溅鏈ㄧ',
+ '12': '鏅�氳鍗�',
+ '13': '',
+ '14': '鐜嬮緳'
+ }
+ ],//table body瀹為檯鏁版嵁
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
+ }
+
+})
+const gridEvents = {
+ toolbarButtonClick ({ code }) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (code) {
+ case 'add': {
+ router.push({path: '/main/delivery/createDelivery', params: { orderID: 'NG24010101' }})
+ break
+ }
+ }
+ }
+ }
+}
+
</script>
<template>
- <div>
+ <div style="width: 100%;height: 100%">
<el-date-picker
v-model="value1"
type="daterange"
@@ -63,43 +160,46 @@
end-placeholder="缁撴潫鏃堕棿"
/>
<el-button style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">鏌ヨ</el-button>
- <el-table
- :data="deliveryList"
- :header-cell-style="{ 'text-align': 'center' }"
- :cell-style="{ 'text-align': 'center' }"
- lazy
- border
- style="width: 99%;"
- max-height="80vh">
- <el-table-column type="expand" fixed>
- <template #default="props" >
- <div m="4">
- <p m="t-0 b-2">閫�璐х浉鍏充俊鎭�</p>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="閫夋嫨" fixed width="70" >
- <el-button @click="addReturns" link type="primary" size="small">閫�璐�</el-button>
- </el-table-column>
- <el-table-column v-for="item in listName" prop="" :label="item" width="40" >
+ <vxe-grid
+ max-height="97%"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+ v-on="gridEvents"
+
+ >
+ <template #state="{ row}">
<el-checkbox checked/>
- </el-table-column>
+ </template>
- <el-table-column
- :prop="index.toString()"
- :show-overflow-tooltip='true'
- width="100" v-for="(item,index) in deliveryTitle"
- :label="item" />
- </el-table>
+ <!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
+ <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>
+ </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>
-:deep(.el-table .el-input__wrapper) {
- box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
- cursor: default;
- border: none !important;
- background-color: transparent;
-}
+
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/sd/returns/SelectReturns.vue b/north-glass-erp/northglass-erp/src/views/sd/returns/SelectReturns.vue
index 59cdfda..2344cb6 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/returns/SelectReturns.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/returns/SelectReturns.vue
@@ -1,54 +1,120 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
+import {reactive} from "vue";
+import {useRouter} from "vue-router"
+const router = useRouter()
-let deliveryTitle = $ref([
- '搴忓彿',
- '瀹℃牳',
- '鍑哄簱',
- '閫�璐у崟鍙�',
- '閫�璐у憳',
- '閫�璐ф棩鏈�',
- '瀹㈡埛缂栫爜',
- '瀹㈡埛鍚嶇О',
- '鎵规',
- '椤圭洰鍚嶇О',
- '鍙戣揣鍗曞彿',
- '閫�璐ф柟寮�',
- '浠樻鏂瑰紡',
- '鎬绘暟閲�',
- '鎬婚潰绉�',
- '鎬婚噾棰�',
- '鎶ヨ〃鏃ユ湡',
- '涓氬姟鍛�',
- '閫佽揣鏃ユ湡',
- '鏀舵鏃堕棿'
-])
-let deliveryList =[
- {
- '0': '1',
- '1': '',
- '2': '',
- '3': 'TH23120801',
- '4': '閮戠強鐝�',
- '5': '2023-12-08',
- '6': '310',
- '7': '涓婃捣閲岃寤虹瓚宸ョ▼鏈夐檺鍏徃',
- '8': '琛�1-2',
- '9': '瀹胯縼鏌愭煇椤圭洰',
- '10': 'JG23112304',
- '11': '瀹炵墿閫�璐�',
- '12': '',
- '13': '8',
- '14': '15.68',
- '15': '11912.05',
- '16': '2023-11-24',
- '17': '鐜嬮緳',
- '18': '',
- '19': '2023-12-08'
+
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
}
-]
+}
+
+const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'OrderList',
+ 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',slots: { content:'content' },width: 50},
+ {title: '鎿嶄綔', width: 110, slots: { default: 'button_slot' }},
+ {type: 'seq', title: '鑷簭', width: 80 },
+
+ {title: '瀹℃牳', width: 40, slots: { default: 'state' }},
+ {title: '鍏ュ簱', width: 40, slots: { default: 'state' }},
+
+ {field: '3',width:120, title: '閫�璐у崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '4',width:120, title: '閫�璐у憳',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5',width:120, title: '閫�璐ф棩鏈�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '6',width:120, title: '瀹㈡埛缂栫爜',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '7',width:120, title: '瀹㈡埛鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '8',width:120, title: '鎵规',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '9',width:120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '10',width:120, title: '鍙戣揣鍗曞彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '11',width:120, title: '閫�璐ф柟寮�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '12',width:120, title: '鎬绘暟閲�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '13',width:120, title: '鎬婚潰绉�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '14',width:120, title: '鎬婚噾棰�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '15',width:120, title: '鎶ヨ〃鏃ユ湡',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '16',width:120, title: '涓氬姟鍛�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ '0': '1',
+ '1': '',
+ '2': '',
+ '3': 'TH23120801',
+ '4': '閮戠強鐝�',
+ '5': '2023-12-08',
+ '6': '310',
+ '7': '涓婃捣閲岃寤虹瓚宸ョ▼鏈夐檺鍏徃',
+ '8': '琛�1-2',
+ '9': '瀹胯縼鏌愭煇椤圭洰',
+ '10': 'JG23112304',
+ '11': '瀹炵墿閫�璐�',
+ '12': '8',
+ '13': '15.68',
+ '14': '11912.05',
+ '15': '2023-11-24',
+ '16': '鐜嬮緳'
+ }
+ ],//table body瀹為檯鏁版嵁
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
+ }
+})
</script>
<template>
@@ -60,45 +126,46 @@
end-placeholder="缁撴潫鏃堕棿"
/>
<el-button style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">鏌ヨ</el-button>
- <el-table
- :data="deliveryList"
- :header-cell-style="{ 'text-align': 'center' }"
- :cell-style="{ 'text-align': 'center' }"
- lazy
- border
- style="width: 99%;"
- max-height="80vh">
- <el-table-column type="expand" fixed>
- <template #default="props" >
- <div m="4">
- <p m="t-0 b-2">: 閫�璐х殑鏄庣粏</p>
+
+
+ <vxe-grid
+ max-height="97%"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+
+ >
+ <!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
+ <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 #state="{ row}">
+ <el-checkbox checked/>
+ </template>
+
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <template #button_slot="{ row }">
+ <el-button @click="getTableRow(row,'edit')" 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>
- </template>
- </el-table-column>
- <el-table-column label="鎿嶄綔" fixed width="110" >
- <el-button link type="primary" size="small">缂栬緫</el-button>
-<!-- <el-button link type="primary" size="small">淇敼</el-button>-->
- <el-button link type="primary" size="small">鍒犻櫎</el-button>
- </el-table-column>
- <el-table-column
- :prop="index.toString()"
- :show-overflow-tooltip='true'
- width="100" v-for="(item,index) in deliveryTitle"
- :label="item" >
- <el-checkbox v-if="index>0 && index<3" checked/>
- </el-table-column>
-
-
- </el-table>
+ </div>
+ </template>
+ </vxe-grid>
</div>
</template>
<style scoped>
-:deep(.el-table .el-input__wrapper) {
- box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
- cursor: default;
- border: none !important;
- background-color: transparent;
-}
</style>
\ No newline at end of file
--
Gitblit v1.8.0