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/AccessoriesMonthlySettlement.vue |  324 ++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 241 insertions(+), 83 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/AccessoriesMonthlySettlement.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/AccessoriesMonthlySettlement.vue
index 95794bc..f34ff81 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/AccessoriesMonthlySettlement.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/AccessoriesMonthlySettlement.vue
@@ -1,94 +1,252 @@
-<!--杈呮枡鏈堢粨-->
+<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-item>鏃犲皹绾�</el-dropdown-item>
-                  <el-dropdown-item>鑶�</el-dropdown-item>
-                  <el-dropdown-item>鏈ㄧ</el-dropdown-item>
-                  <el-dropdown-item>鐢靛伐鐢垫皵</el-dropdown-item>
-                  <el-dropdown-item>鏈哄櫒閰嶄欢</el-dropdown-item>
-                  <el-dropdown-item>宸ュ叿</el-dropdown-item>
-                  <el-dropdown-item>鍔炲叕鐢ㄥ搧</el-dropdown-item>
-                  <el-dropdown-item>杈呮枡浣欐枡</el-dropdown-item>
-                  <el-dropdown-item>鏉ユ枡鍔犲伐</el-dropdown-item>
-                  <el-dropdown-item>涓濆嵃</el-dropdown-item>
-                  <el-dropdown-item>鏈ㄦ澘</el-dropdown-item>
-                  <el-dropdown-item>姘斾綋</el-dropdown-item>
-                  <el-dropdown-item>鍖栧伐绠′欢</el-dropdown-item>
-                  <el-dropdown-item>鍙戝鍔犲伐</el-dropdown-item>
-                  <el-dropdown-item>鏈哄櫒璁惧缁翠慨</el-dropdown-item>
-                  <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="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':'浠�',
+      'materialCode':'KF2023122101',
+      'materialName':'鍏墰鎻掑骇',
+      'height':'0',
+      'thickness':'0',
+      'width':'0',
+      'lastMonthQuantity':'100',
+      'lastMonthArea':'0',
+      'thisMonthReceivedQuantity':'100',
+      'thisMonthReceivedArea':'0',
+      'thisMonthIssuedQuantity':'23',
+      'thisMonthIssuedArea':'0',
+      'thisMonthInventoryQuantity':'77',
+      'thisMonthInventoryArea':'0',
+    },
+    {
+      'month':'3',
+      'unit':'浠�',
+      'materialCode':'KF2023122101',
+      'materialName':'鍏墰鎻掑骇',
+      'height':'0',
+      'thickness':'0',
+      'width':'0',
+      'lastMonthQuantity':'100',
+      'lastMonthArea':'0',
+      'thisMonthReceivedQuantity':'100',
+      'thisMonthReceivedArea':'0',
+      'thisMonthIssuedQuantity':'23',
+      'thisMonthIssuedArea':'0',
+      'thisMonthInventoryQuantity':'77',
+      'thisMonthInventoryArea':'0',
+    },
+    {
+      'month':'3',
+      'unit':'浠�',
+      'materialCode':'KF2023122101',
+      'materialName':'鍏墰鎻掑骇',
+      'height':'0',
+      'thickness':'0',
+      'width':'0',
+      '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