From 97c3f97a11524d8bacc6d36cf2ec4e3b93b5c277 Mon Sep 17 00:00:00 2001
From: NNowhZzU <1539353356@qq.com>
Date: 星期三, 27 十二月 2023 10:36:19 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/OriginalMonthlySettlement.vue | 312 ++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 242 insertions(+), 70 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/OriginalMonthlySettlement.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/OriginalMonthlySettlement.vue
index 866a79b..a5f6bf3 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/OriginalMonthlySettlement.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/OriginalMonthlySettlement.vue
@@ -1,81 +1,253 @@
-<!-- 鍘熺墖鏈堢粨 -->
+<script setup>
+
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+import {VXETable} from "vxe-table";
+let router=useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/trader/CreateTrader', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
-<script lang="ts" setup>
+ }
+}
-</script>
-<template>
- <div>
- <div>
- <el-form>
- <el-row gutter="10" >
- <el-col :span="2.5">
- <div class="label-text">鏌ヨ鍘熺墖鎶ヨ〃鏃ユ湡</div>
- </el-col>
- <el-col :span="4">
- <el-date-picker
- type="daterange"
- start-placeholder="寮�濮嬫椂闂�"
- end-placeholder="缁撴潫鏃堕棿"
- style="width: 200px;"
- />
- </el-col>
- <el-col :span="4">
- <el-dropdown>
- <el-button type="primary">
- 鍘熺墖<el-icon class="el-icon--right" style="width: 66px;"><arrow-down /></el-icon>
- </el-button>
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item>鍘熺墖</el-dropdown-item>
- <el-dropdown-item>浣欐枡</el-dropdown-item>
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- </el-col>
- <el-col :span="4">
- <el-button id="searchButton" type="primary" :icon="Search">鏌ヨ鎶ヨ〃</el-button>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div>
- <div>
- <el-table :data="tableData" border style="width: 100%">
- <el-table-column prop="鑷簭" label="鑷簭" width="100" />
- <el-table-column prop="鏈堜唤" label="鏈堜唤" width="100" />
- <el-table-column prop="鍗曚綅" label="鍗曚綅" width="60"/>
- <el-table-column prop="鐗╂枡缂栫爜" label="鐗╂枡缂栫爜" width="100"/>
- <el-table-column prop="鐗╂枡鍚嶇О" label="鐗╂枡鍚嶇О" width="100"/>
- <el-table-column prop="楂樺害" label="楂樺害" width="100"/>
- <el-table-column prop="鍘氬害" label="鍘氬害" width="100"/>
- <el-table-column prop="瀹藉害" label="瀹藉害" width="100"/>
- <el-table-column prop="涓婃湀鏁伴噺" label="涓婃湀鏁伴噺" width="100"/>
- <el-table-column prop="涓婃湀闈㈢Н" label="涓婃湀闈㈢Н" width="100"/>
- <el-table-column prop="鏈湀鍏ュ簱鏁伴噺" label="鏈湀鍏ュ簱鏁伴噺" width="110"/>
- <el-table-column prop="鏈湀鍏ュ簱闈㈢Н" label="鏈湀鍏ュ簱闈㈢Н" width="110"/>
- <el-table-column prop="鏈湀鍑哄簱鏁伴噺" label="鏈湀鍑哄簱鏁伴噺" width="110"/>
- <el-table-column prop="鏈湀鍑哄簱闈㈢Н" label="鏈湀鍑哄簱闈㈢Н" width="110"/>
- <el-table-column prop="鏈湀搴撳瓨鏁伴噺" label="鏈湀搴撳瓨鏁伴噺" width="110"/>
- <el-table-column prop="鏈湀搴撳瓨闈㈢Н" label="鏈湀搴撳瓨闈㈢Н" width="110"/>
- </el-table>
- </div>
- </div>
- </div>
-</template>
-<style>
-.centered-box {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100vh;
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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: 'checkbox',fixed:"left", title: '閫夋嫨', width: '80' },
+ { type: 'seq',fixed:"left", title: '鑷簭', width: '80' },
+ // {title: '鎿嶄綔', width: '110', slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'month', width:'150', title: '鏈堜唤', sortable: true,editRender: { name: 'input' },filters:[{ data: '' }],slots: { filter: 'num1_filter' } },
+ {field: 'unit', width: '150',title: '鍗曚綅', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'materialCode', width: '120',title: '鐗╂枡缂栫爜', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'materialName', width: '100',title: '鐗╂枡鍚嶇О', sortable: true},
+ {field: 'height',width: '100', title: '楂樺害', sortable: true,showOverflow:"ellipsis"},
+ {field: 'thickness', width: '80',title: '鍘氬害', sortable: true},
+ {field: 'width',width: '100', title: '瀹藉害', sortable: true},
+ {field: 'lastMonthQuantity', width: '100',title: '涓婃湀鏁伴噺', sortable: true},
+ {field: 'lastMonthArea',width: '100', title: '涓婃湀闈㈢Н', sortable: true},
+ {field: 'thisMonthReceivedQuantity', width: '140',title: '鏈湀鍏ュ簱鏁伴噺', sortable: true},
+ {field: 'thisMonthReceivedArea',width: '140', title: '鏈湀鍏ュ簱闈㈢Н', sortable: true},
+ {field: 'thisMonthIssuedQuantity', width: '140',title: '鏈湀鍑哄簱鏁伴噺', sortable: true},
+ {field: 'thisMonthIssuedArea',width: '140', title: '鏈湀鍑哄簱闈㈢Н', sortable: true},
+ {field: 'thisMonthInventoryQuantity',width: '140', title: '鏈湀搴撳瓨鏁伴噺', sortable: true},
+ {field: 'thisMonthInventoryArea',width: '140', title: '鏈湀搴撳瓨闈㈢Н', sortable: true},
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ // buttons: [{
+ // 'name': '鏌ヨ',
+ // 'code':'add'
+ // },],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ 'month':'3',
+ 'unit':'mm',
+ 'materialCode':'KF2023122101',
+ 'materialName':'鏅�氶挗鍖栫幓鐠�',
+ 'height':'110.20',
+ 'thickness':'3.00',
+ 'width':'90.40',
+ 'lastMonthQuantity':'100',
+ 'lastMonthArea':'0',
+ 'thisMonthReceivedQuantity':'100',
+ 'thisMonthReceivedArea':'0',
+ 'thisMonthIssuedQuantity':'23',
+ 'thisMonthIssuedArea':'0',
+ 'thisMonthInventoryQuantity':'77',
+ 'thisMonthInventoryArea':'0',
+ },
+ {
+ 'month':'3',
+ 'unit':'mm',
+ 'materialCode':'KF2023122101',
+ 'materialName':'鏅�氶挗鍖栫幓鐠�',
+ 'height':'224.50',
+ 'thickness':'5.00',
+ 'width':'120.80',
+ 'lastMonthQuantity':'100',
+ 'lastMonthArea':'0',
+ 'thisMonthReceivedQuantity':'100',
+ 'thisMonthReceivedArea':'0',
+ 'thisMonthIssuedQuantity':'23',
+ 'thisMonthIssuedArea':'0',
+ 'thisMonthInventoryQuantity':'77',
+ 'thisMonthInventoryArea':'0',
+ },
+ {
+ 'month':'3',
+ 'unit':'mm',
+ 'materialCode':'KF2023122101',
+ 'materialName':'鏅�氶挗鍖栫幓鐠�',
+ 'height':'190.00',
+ 'thickness':'4.00',
+ 'width':'90.00',
+ 'lastMonthQuantity':'100',
+ 'lastMonthArea':'0',
+ 'thisMonthReceivedQuantity':'100',
+ 'thisMonthReceivedArea':'0',
+ 'thisMonthIssuedQuantity':'23',
+ 'thisMonthIssuedArea':'0',
+ 'thisMonthInventoryQuantity':'77',
+ 'thisMonthInventoryArea':'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 xGrid = ref();
+
+const gridEvents = {
+ toolbarButtonClick ({ code }) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (code) {
+ case 'add': {
+
+ router.push({path: '/main/trader/CreateTrader'})
+ /*if($grid.getCheckboxRecords().length==0){
+ VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ return
+ }*/
+ return;
+ }
+
+ }
+ }
+ },
+ toolbarToolClick ({ code }) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (code) {
+ case 'myPrint': {
+ $grid.print()
+ break
+ }
+ }
+ }
+ },
}
+</script>
+
+<template>
+ <div class="main-div-customer">
+ <el-row gutter="10" >
+ <el-col :span="2.5">
+ <div class="label-text">鏌ヨ鍘熺墖鎶ヨ〃鏃ユ湡</div>
+ </el-col>
+ <el-col :span="4">
+ <el-date-picker
+ type="daterange"
+ start-placeholder="寮�濮嬫椂闂�"
+ end-placeholder="缁撴潫鏃堕棿"
+ style="width: 200px;"
+ />
+ </el-col>
+ <el-col span="4">
+ <el-button id="searchButton" type="primary" :icon="Search">鏌ヨ鎶ヨ〃</el-button>
+ </el-col>
+ </el-row>
+ <vxe-grid
+ max-height="100%"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+ v-on="gridEvents"
+
+ >
+ <!-- @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>
-.label-text {
- font-weight: bold;
+ </vxe-grid>
+ </div>
+</template>
+
+<style scoped>
+.main-div-customer{
+ width: 99%;
+ height: 100%;
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0