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/mainProductStock/FinishedGoodsIssue.vue |  338 ++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 233 insertions(+), 105 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedGoodsIssue.vue b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedGoodsIssue.vue
index 93b82a8..42f7a37 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedGoodsIssue.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedGoodsIssue.vue
@@ -1,119 +1,247 @@
-<!-- 鎴愬搧棰嗗嚭 -->
+<!--鎴愬搧棰嗗嚭-->
 
 
-<script lang="ts" setup>
-import {ref} from "vue";
+<script setup>
 
-let tableData = ref([
-  {
-    "閿�鍞崟鍙�":'NG23121309',
-    "椤圭洰鍚嶇О":'閽㈠寲鐜荤拑',
-    "瀹㈡埛缂栧彿":'89',
-    "瀹㈡埛鍚嶇О":'',
-    "娴佺▼鍗″彿":'NG23121309A01',
-    "鎴愬搧缂栧彿":'0604000299',
-    "绠辨灦鍙�":'0',
-    "鎴愬搧鍚嶇О":'3.2mm鎷卞舰閽㈠寲鐜荤拑',
-    "闀�":'1610.00',
-    "瀹�":'520.00',
-    "鍘�":'3.20',
-    "鏁伴噺":'122.00',
-    "鍗曠墖闈㈢Н":'0.8372',
-    "鎬婚潰绉�":'102.1384',
-    "搴撳尯":'搴撳尯',
-    "搴撲綅":'0',
-  },  {
-    "閿�鍞崟鍙�":'NG23121309',
-    "椤圭洰鍚嶇О":'閽㈠寲鐜荤拑',
-    "瀹㈡埛缂栧彿":'89',
-    "瀹㈡埛鍚嶇О":'',
-    "娴佺▼鍗″彿":'NG23121309A01',
-    "鎴愬搧缂栧彿":'0604000299',
-    "绠辨灦鍙�":'0',
-    "鎴愬搧鍚嶇О":'3.2mm鎷卞舰閽㈠寲鐜荤拑',
-    "闀�":'1610.00',
-    "瀹�":'520.00',
-    "鍘�":'3.20',
-    "鏁伴噺":'122.00',
-    "鍗曠墖闈㈢Н":'0.8372',
-    "鎬婚潰绉�":'102.1384',
-    "搴撳尯":'搴撳尯',
-    "搴撲綅":'0',
+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/productStock/OrderAllocation', query: { id: row.id }})
+    //   break
+    // }
+    // case 'back':{
+    //   router.push({path: '/main/productStock/FinishedProductRework', query: { id: row.id }})
+    //   break
+    // }
+    // case 'out' :{
+    //   //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+    //   router.push({path: '/main/productStock/FinishedGoodsIssue', query: { id: row.id }})
+    //   break
+    // }
+  }
+}
+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;
+        }
+
+      }
+    }
   },
-  {
-    "閿�鍞崟鍙�":'NG23121309',
-    "椤圭洰鍚嶇О":'閽㈠寲鐜荤拑',
-    "瀹㈡埛缂栧彿":'89',
-    "瀹㈡埛鍚嶇О":'',
-    "娴佺▼鍗″彿":'NG23121309A01',
-    "鎴愬搧缂栧彿":'0604000299',
-    "绠辨灦鍙�":'0',
-    "鎴愬搧鍚嶇О":'3.2mm鎷卞舰閽㈠寲鐜荤拑',
-    "闀�":'1610.00',
-    "瀹�":'520.00',
-    "鍘�":'3.20',
-    "鏁伴噺":'122.00',
-    "鍗曠墖闈㈢Н":'0.8372',
-    "鎬婚潰绉�":'102.1384',
-    "搴撳尯":'搴撳尯',
-    "搴撲綅":'0',
+  toolbarToolClick ({ code }) {
+    const $grid = xGrid.value
+    if ($grid) {
+      switch (code) {
+        case 'myPrint': {
+          $grid.print()
+          break
+        }
+      }
+    }
   },
-])
+}
+
+
+
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+
+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: '220', slots: { default: 'button_slot' },fixed:"left"},
+    {field: 'SalesOrderNumber', width: '150',title: '閿�鍞崟鍙�', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+    {field: 'ProjectName', width: '120',title: '椤圭洰鍚嶇О', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+    {field: 'ProcessCardNumber',width: '100', title: '娴佺▼鍗″彿', sortable: true,showOverflow:"ellipsis"},
+    {field: 'FinishedProductNumber', width: '100',title: '鎴愬搧缂栧彿', sortable: true},
+    {field: 'Quantity',width: '140', title: '鏁伴噺', sortable: true},
+    {field: 'DiaoQuantity',width: '140', title: '棰嗗嚭鏁伴噺',editRender: { name: 'input', attrs: { placeholder: '' } }, sortable: true},
+    {field: 'ProductNumber',width: '100', title: '浜у搧缂栧彿', sortable: true},
+    {field: 'CustomerNumber', width: '100',title: '瀹㈡埛缂栧彿', sortable: true},
+    {field: 'CustomerName',width: '100', title: '瀹㈡埛鍚嶇О', sortable: true},
+    {field: 'Length', width: '100',title: '闀垮害', sortable: true},
+    {field: 'Width',width: '100', title: '瀹藉害', sortable: true},
+    {field: 'Thickness', width: '100',title: '鍘氬害', sortable: true},
+    {field: 'SingleArea',width: '140', title: '鍗曠墖闈㈢Н', sortable: true},
+    {field: 'TotalArea',width: '100', title: '鎬婚潰绉�', sortable: true},
+    {field: 'StorageArea',width: '100', title: '搴撳尯', sortable: true},
+    {field: 'Location',width: '100', title: '搴撲綅', sortable: true},
+  ],//琛ㄥご鎸夐挳
+  toolbarConfig: {
+    buttons: [{
+      'name': '纭棰嗗嚭',
+      status: 'primary'
+    },{
+      'name': '棰嗗嚭璁板綍',
+    }],
+    import: false,
+    export: true,
+    print: true,
+    zoom: true,
+    custom: true
+  },
+  data:  [
+    {
+      "SalesOrderNumber": "NG23072003",
+      "ProjectName": "閽㈠寲鐜荤拑",
+      "ProcessCardNumber": "NG23072003A01",
+      'FinishedProductNumber':'',
+      'FinishedProductName':'',
+      'BoxNumber':'',
+      "CustomerNumber": "KD0071",
+      "CustomerName": "浠�",
+      "Length": "1075.00",
+      "Width": "440.00",
+      "Thickness": "3.00",
+      "Quantity": "360",
+      "SingleArea": "0.473000",
+      "TotalArea": "170.28",
+      "StorageArea": "0.47",
+      "Location": "170.28",
+    },{
+      "SalesOrderNumber": "NG23072003",
+      "ProjectName": "閽㈠寲鐜荤拑",
+      "ProcessCardNumber": "NG23072003A01",
+      'FinishedProductNumber':'',
+      'FinishedProductName':'',
+      'BoxNumber':'',
+      "CustomerNumber": "KD0071",
+      "CustomerName": "浠�",
+      "Length": "1075.00",
+      "Width": "440.00",
+      "Thickness": "3.00",
+      "Quantity": "360",
+      "SingleArea": "0.473000",
+      "TotalArea": "170.28",
+      "StorageArea": "0.47",
+      "Location": "170.28",
+    },{
+      "SalesOrderNumber": "NG23072003",
+      "ProjectName": "閽㈠寲鐜荤拑",
+      "ProcessCardNumber": "NG23072003A01",
+      'FinishedProductNumber':'',
+      'FinishedProductName':'',
+      'BoxNumber':'',
+      "CustomerNumber": "KD0071",
+      "CustomerName": "浠�",
+      "Length": "1075.00",
+      "Width": "440.00",
+      "Thickness": "3.00",
+      "Quantity": "360",
+      "SingleArea": "0.473000",
+      "TotalArea": "170.28",
+      "StorageArea": "0.47",
+      "Location": "170.28",
+    },
+
+  ],//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>
-      <el-form  size="medium" >
+  <div class="main-div-customer">
+    <vxe-grid
+        max-height="100%"
+        @filter-change="filterChanged"
+        class="mytable-scrollbar"
+        ref="xGrid"
+        v-bind="gridOptions"
 
-        <el-row gutter="5">
-<!--          <el-col :span="4">-->
-<!--            <el-input v-model="name" placeholder="璇疯緭瀹㈡埛鍚嶇О" style="width: 200px; height: 30px;" />-->
-<!--          </el-col>-->
-<!--          <el-col :span="4">-->
-<!--            <el-input v-model="name" placeholder="璇疯緭椤圭洰鍚嶇О" style="width: 200px; height: 30px;" />-->
-<!--          </el-col>-->
-<!--          <el-col :span="4">-->
-<!--            <el-input v-model="name" placeholder="璇疯緭閿�鍞崟鍙�" style="width: 200px; height: 30px;" />-->
-<!--          </el-col>-->
-          <el-col :span="2.5">
-            <el-button id="searchButton" type="primary" :icon="Search">棰嗗嚭璁板綍</el-button>
-          </el-col>
-          <el-col :span="4">
-            <el-button id="searchButton" type="primary" :icon="Search">鏌ヨ</el-button>
-          </el-col>
+    >
+      <!--      @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-row>
-      </el-form>
-    </div>
-    <div>
-      <el-table :data="tableData" border style="width: 100%;">
-        <el-table-column prop="閿�鍞崟鍙�" label="閿�鍞崟鍙�" width="180" style="text-align: center"/>
-        <el-table-column prop="椤圭洰鍚嶇О" label="椤圭洰鍚嶇О" width="180" />
-        <el-table-column prop="瀹㈡埛缂栧彿" label="瀹㈡埛缂栧彿" width="180"/>
-        <el-table-column prop="瀹㈡埛鍚嶇О" label="瀹㈡埛鍚嶇О" width="180"/>
-        <el-table-column prop="娴佺▼鍗″彿" label="娴佺▼鍗″彿" width="180"/>
-        <el-table-column prop="鎴愬搧缂栧彿" label="鎴愬搧缂栧彿" width="180"/>
-        <el-table-column prop="绠辨灦鍙�" label="绠辨灦鍙�" width="180"/>
-        <el-table-column prop="鎴愬搧鍚嶇О" label="鎴愬搧鍚嶇О" width="180"/>
-        <el-table-column prop="闀�" label="闀�" width="180"/>
-        <el-table-column prop="瀹�" label="瀹�" width="180"/>
-        <el-table-column prop="鍘�" label="鍘�" width="180"/>
-        <el-table-column prop="鏁伴噺" label="鏁伴噺" width="180"/>
-        <el-table-column prop="鍗曠墖闈㈢Н" label="鍗曠墖闈㈢Н" width="180"/>
-        <el-table-column prop="鎬婚潰绉�" label="鎬婚潰绉�" width="180"/>
-        <el-table-column prop="搴撳尯" label="搴撳尯" width="180"/>
-        <el-table-column prop="搴撲綅" label="搴撲綅" width="180"/>
-        <el-table-column fixed="left" label="鎿嶄綔" width="80">
-          <template #default>
-            <el-button link type="primary" size="small" @click="handleClick(row)"
-            >缂栬緫</el-button>
+      <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+      <template #button_slot="{ row }">
+        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">璁㈠崟璋冩嫧</el-button>
+        <el-button @click="getTableRow(row,'out')" link type="primary" size="small">鎴愬搧棰嗗嚭</el-button>
+        <el-button @click="getTableRow(row,'back')" link type="primary" size="small">鎴愬搧杩斿伐</el-button>
+      </template>
 
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
+      <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>
 
+<style scoped>
+.main-div-customer{
+  width: 99%;
+  height: 100%;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0