From d01fa9d49a8c8a723493aecb681d4e1f3e25fce5 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 26 一月 2024 14:28:55 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue | 374 +++++++++++++++++++++++++++++++++++------------------
1 files changed, 247 insertions(+), 127 deletions(-)
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..9789002 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, ref} 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},
+ {title: '鎿嶄綔', width: 110, slots: { default: 'button_slot' },fixed:"left"},
+ { type: 'seq',fixed:"left", title: '鑷簭', width: 50 },
+ {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,29 @@
resource: '',
desc: '',
})
-const router = useRouter()
-function goToPage() {
- router.push('/main/workOrder/addWorkOrder')
-}
-const tableData = [
+const value = ref('')
+const options = [
{
- 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)鎸夋壒娆″崟鐙惤鏋躲��',
+ value: 'Option1',
+ label: 'Option1',
},
{
- 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)鎸夋壒娆″崟鐙惤鏋躲��',
+ value: 'Option2',
+ label: 'Option2',
},
{
- 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)鎸夋壒娆″崟鐙惤鏋躲��',
+ value: 'Option3',
+ label: 'Option3',
},
]
+
</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"
@@ -139,35 +234,60 @@
:default-time="defaultTime"
/>
+ <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>
- <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,index) in gridOptions.columns" v-show="item.field!=undefined ">
+ <span style="font-weight: bold">{{item.title+': '}}</span>
+ <span>{{ row[item.field] }}</span>
+ </li>
+ </ul>
+ </template>
+
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <template #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 {
--
Gitblit v1.8.0