From c9120bd88aa705d24d81b81cb41022dfdec02c86 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期五, 19 一月 2024 15:40:53 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/northglass-erp/src/router/index.js | 14
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue | 21
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/MaterialOutbound.vue | 8
.idea/encodings.xml | 6
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Return.vue | 400 +++++--
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/OriginalMonthlySettlement.vue | 9
north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue | 10
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Details.vue | 453 ++++++++
.idea/misc.xml | 13
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/SelectIngredientsStock.vue | 8
.idea/vcs.xml | 6
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/AccessoriesMonthlySettlement.vue | 8
.idea/modules.xml | 8
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductReturn.vue | 9
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TakeOutRecord.vue | 8
.idea/ERP_override.iml | 9
north-glass-erp/northglass-erp/src/views/mm/mainTrader/SelectTrader.vue | 8
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/IngredientsStock.vue | 1
.idea/jarRepositories.xml | 25
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Create.vue | 471 +++++---
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/PurchaseOrder.vue | 64 +
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue | 164 +-
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Storage.vue | 381 +++++--
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/ReturnToStorage.vue | 256 +++++
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedGoodsIssue.vue | 14
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue | 10
.idea/.gitignore | 8
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TransferRecord.vue | 8
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductRework.vue | 14
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ReworkRecord.vue | 8
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue | 8
/dev/null | 8
north-glass-erp/northglass-erp/src/views/mm/stockReport/StockReport.vue | 4
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Select.vue | 377 +++++-
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/ReturnToStorageCreate.vue | 201 +++
.idea/compiler.xml | 18
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductOut.vue | 14
37 files changed, 2,379 insertions(+), 673 deletions(-)
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/ERP_override.iml b/.idea/ERP_override.iml
new file mode 100644
index 0000000..d6ebd48
--- /dev/null
+++ b/.idea/ERP_override.iml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..44679a3
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CompilerConfiguration">
+ <annotationProcessing>
+ <profile name="Maven default annotation processors profile" enabled="true">
+ <sourceOutputDir name="target/generated-sources/annotations" />
+ <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+ <outputRelativeToContentRoot value="true" />
+ <module name="erp" />
+ </profile>
+ </annotationProcessing>
+ </component>
+ <component name="JavacSettings">
+ <option name="ADDITIONAL_OPTIONS_OVERRIDE">
+ <module name="erp" options="-parameters" />
+ </option>
+ </component>
+</project>
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..6e4dcfa
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Encoding">
+ <file url="file://$PROJECT_DIR$/north-glass-erp/src/main/java" charset="UTF-8" />
+ </component>
+</project>
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 0000000..55f2271
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="RemoteRepositoriesConfiguration">
+ <remote-repository>
+ <option name="id" value="central" />
+ <option name="name" value="Central Repository" />
+ <option name="url" value="https://repo.maven.apache.org/maven2" />
+ </remote-repository>
+ <remote-repository>
+ <option name="id" value="nexus-aliyun" />
+ <option name="name" value="nexus-aliyun" />
+ <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
+ </remote-repository>
+ <remote-repository>
+ <option name="id" value="central" />
+ <option name="name" value="Maven Central repository" />
+ <option name="url" value="https://repo1.maven.org/maven2" />
+ </remote-repository>
+ <remote-repository>
+ <option name="id" value="jboss.community" />
+ <option name="name" value="JBoss Community repository" />
+ <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
+ </remote-repository>
+ </component>
+</project>
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..0ffbbaf
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,13 @@
+<project version="4">
+ <component name="ExternalStorageConfigurationManager" enabled="true" />
+ <component name="MavenProjectsManager">
+ <option name="originalFiles">
+ <list>
+ <option value="$PROJECT_DIR$/north-glass-erp/pom.xml" />
+ </list>
+ </option>
+ </component>
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+ <output url="file://$PROJECT_DIR$/out" />
+ </component>
+</project>
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..d99c30f
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/.idea/ERP_override.iml" filepath="$PROJECT_DIR$/.idea/ERP_override.iml" />
+ </modules>
+ </component>
+</project>
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="" vcs="Git" />
+ </component>
+</project>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/router/index.js b/north-glass-erp/northglass-erp/src/router/index.js
index d1cf03b..20868dc 100644
--- a/north-glass-erp/northglass-erp/src/router/index.js
+++ b/north-glass-erp/northglass-erp/src/router/index.js
@@ -666,11 +666,25 @@
name: 'materialOutbound',
component:()=>import('../views/mm/mainIngredientStock/MaterialOutbound.vue')
},
+ //鍑哄簱鏂板
{
path:'createOutBound',
name:'createOutBound',
component:()=>import('../views/mm/mainIngredientStock/CreateOutBound.vue')
},
+ //杩斿簱
+ {
+ path:'returnToStorage',
+ name:'returnToStorage',
+ component:()=>import('../views/mm/mainIngredientStock/ReturnToStorage.vue')
+ },
+
+ //杩斿簱鏂板
+ {
+ path:'returnToStorageCreate',
+ name:'returnToStorageCreate',
+ component:()=>import('../views/mm/mainIngredientStock/ReturnToStorageCreate.vue')
+ },
{
path: '',
redirect:'/main/ingredientsStock/SelectIngredientsStock'
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue
index de48f33..eb617c4 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue
@@ -147,11 +147,11 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
@@ -161,7 +161,7 @@
<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">
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 f34ff81..058693f 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
@@ -216,11 +216,11 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/CreateIngredientsStock.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/CreateIngredientsStock.vue
deleted file mode 100644
index 041ac1c..0000000
--- a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/CreateIngredientsStock.vue
+++ /dev/null
@@ -1,8 +0,0 @@
-<script>
-
-</script>
-<template>
- <h1>鏆傛棤锛屾暚璇锋湡寰�</h1></template>
-<style>
-
-</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/IngredientsStock.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/IngredientsStock.vue
index 7226bf6..6cdfc0c 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/IngredientsStock.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/IngredientsStock.vue
@@ -26,6 +26,7 @@
<el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/ingredientsStock/MaterialOutbound' }">鐗╂枡鍑哄簱</el-breadcrumb-item>
<el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/ingredientsStock/OriginalMonthlySettlement' }">鍘熺墖鏈堢粨</el-breadcrumb-item>
<el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/ingredientsStock/AccessoriesMonthlySettlement' }">杈呮枡鏈堢粨</el-breadcrumb-item>
+ <el-breadcrumb-item @click="changeRouter(5)" :class="indexFlag===5?'indexTag':''" :to="{ path: '/main/ingredientsStock/ReturnToStorage' }">杩斿簱</el-breadcrumb-item>
<el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">鎶ヨ〃</el-breadcrumb-item>
</el-breadcrumb>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/MaterialOutbound.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/MaterialOutbound.vue
index b7e5868..edb4f9e 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/MaterialOutbound.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/MaterialOutbound.vue
@@ -211,11 +211,11 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
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 a5f6bf3..b2fda63 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
@@ -217,15 +217,14 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/ReturnToStorage.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/ReturnToStorage.vue
new file mode 100644
index 0000000..3d8a6f8
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/ReturnToStorage.vue
@@ -0,0 +1,256 @@
+<!--杩斿簱-->
+
+
+<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/ingredientsStock/CreateOutbound', query: { id: row.id }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ 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'},
+ {title: '鎿嶄綔', width: '110', slots: { default: 'button_slot' },fixed:"left"},
+ // { type: 'checkbox',fixed:"left", title: '閫夋嫨', width: '80' },
+ { type: 'seq',fixed:"left", title: '鑷簭', width: '80' },
+
+ {title: '瀹℃牳', width: 50, slots: { default: 'state' },},
+
+ {field: 'ReturnNum', width:'150', title: '杩斿簱缂栧彿', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } },
+ {field: 'SalesNum', width: '150',title: '閿�鍞崟鍙�', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'ReturnType', width: '120',title: '杩斿簱绫诲瀷', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'DocumentType',width: '100', title: '鍗曟嵁绫诲瀷', sortable: true},
+ {field: 'ProjectName', width:'150', title: '椤圭洰鍚嶇О', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } },
+ {field: 'MaterialCode', width: '100',title: '鐗╂枡缂栫爜', sortable: true},
+ {field: 'MaterialName',width: '100', title: '鐗╂枡鍚嶇О', sortable: true,showOverflow:"ellipsis"},
+ {field: 'Width', width: '80',title: '瀹藉害', sortable: true},
+ {field: 'Height',width: '100', title: '楂樺害', sortable: true},
+ {field: 'Thickness', width: '100',title: '鍘氬害', sortable: true},
+ {field: 'OriginPlace',width: '100', title: '浜у湴', sortable: true},
+ {field: 'SaveQuantity', width: '100',title: '鑺傜害鏁伴噺', sortable: true},
+ {field: 'Type', width: '100',title: '绫诲瀷', sortable: true},
+ {field: 'Supplier',width: '140', title: '棰嗘枡鍛�/渚涘簲鍟�', sortable: true},
+ {field: 'ClassGroup',width: '100', title: '鐝粍/渚涘簲鍟�', sortable: true},
+ {field: 'WarehouseKeeper',width: '100', title: '浠撶鍛�', sortable: true},
+ {field: 'Remark',width: '100', title: '澶囨敞', sortable: true},
+ {field: 'MakingData',width: '100', title: '鍒跺崟鏃ユ湡', sortable: true},
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [{
+ code:'add','name': '杩斿簱鏂板',status:'primary'
+ }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [
+ {
+ "ReturnNum": "FK24010811",
+ "SalesNum": "杩愯緭鏉愭枡鐮存崯",
+ "ReturnType": "閲囪喘鐮存崯",
+ "DocumentType": "瀹℃牳",
+ "ProjectName": "",
+ "MaterialCode": "80010128003308035401530000",
+ "MaterialName": "鐧界幓-3鍘�-鍒堕暅-浼樿川鍔犲伐绾�",
+ "Width": '3540.00',
+ "Height": "1530.00",
+ "Thickness": "3.00",
+ "OriginPlace": "骞胯タ鍗楀畞",
+ "SaveQuantity": "1.000",
+ "Type": "鐩存帴杩斿簱",
+ "Supplier": "骞胯タ鍗楀畞浼忔硶",
+ "ClassGroup": "鏇叉儬闇�",
+ "WarehouseKeeper": "鏇叉儬闇�",
+ "Remark": "2401060345",
+ "MakingData": "2024-01-08 08锛�41锛�09",
+ },
+ {
+ "ReturnNum": "FK24010811",
+ "SalesNum": "杩愯緭鏉愭枡鐮存崯",
+ "ReturnType": "閲囪喘鐮存崯",
+ "DocumentType": "瀹℃牳",
+ "ProjectName": "",
+ "MaterialCode": "80010128003308035401530000",
+ "MaterialName": "鐧界幓-3鍘�-鍒堕暅-浼樿川鍔犲伐绾�",
+ "Width": '3540.00',
+ "Height": "1530.00",
+ "Thickness": "3.00",
+ "OriginPlace": "骞胯タ鍗楀畞",
+ "SaveQuantity": "1.000",
+ "Type": "鐩存帴杩斿簱",
+ "Supplier": "骞胯タ鍗楀畞浼忔硶",
+ "ClassGroup": "鏇叉儬闇�",
+ "WarehouseKeeper": "鏇叉儬闇�",
+ "Remark": "2401060345",
+ "MakingData": "2024-01-08 08锛�41锛�09",
+ },
+ {
+ "ReturnNum": "FK24010811",
+ "SalesNum": "杩愯緭鏉愭枡鐮存崯",
+ "ReturnType": "閲囪喘鐮存崯",
+ "DocumentType": "瀹℃牳",
+ "ProjectName": "",
+ "MaterialCode": "80010128003308035401530000",
+ "MaterialName": "鐧界幓-3鍘�-鍒堕暅-浼樿川鍔犲伐绾�",
+ "Width": '3540.00',
+ "Height": "1530.00",
+ "Thickness": "3.00",
+ "OriginPlace": "骞胯タ鍗楀畞",
+ "SaveQuantity": "1.000",
+ "Type": "鐩存帴杩斿簱",
+ "Supplier": "骞胯タ鍗楀畞浼忔硶",
+ "ClassGroup": "鏇叉儬闇�",
+ "WarehouseKeeper": "鏇叉儬闇�",
+ "Remark": "2401060345",
+ "MakingData": "2024-01-08 08锛�41锛�09",
+ },
+
+ ],//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':{
+ /*VXETable.modal.confirm('鐐瑰嚮浜嗗簱瀛樿皟鎷�');*/
+ router.push({path: '/main/ingredientsStock/ReturnToStorageCreate'});
+ return;
+ 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,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>
+
+ <template #state="{ row}">
+ <el-checkbox checked/>
+ </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/mm/mainIngredientStock/ReturnToStorageCreate.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/ReturnToStorageCreate.vue
new file mode 100644
index 0000000..b00ce2d
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/ReturnToStorageCreate.vue
@@ -0,0 +1,201 @@
+<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},
+ {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: [
+ {
+ 'name': '娓呴櫎',
+ 'code':'add',
+ status: 'primary',
+ },
+ {
+ 'name': '纭畾',
+ 'code':'add',
+ status: 'primary',
+ },
+ ],
+ 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" style="background-color: white">
+ <el-row>
+ <el-col :span="2"><el-text>浜よ揣鏃ユ湡锛�</el-text></el-col>
+ <el-col :span="4">
+ <el-date-picker
+ type="week"
+ format="[Week] ww"
+ placeholder="閫夋嫨鏃ユ湡"/>
+ </el-col>
+ <el-col :span="2"><el-text>*閫�鏂欏憳/渚涘簲鍟嗭細</el-text></el-col>
+ <el-col :span="4"><el-input/></el-col>
+ <el-col :span="2"><el-text>*閫�鏂欑彮缁勶細</el-text></el-col>
+ <el-col :span="4">
+ <el-select clearable placeholder=" " >
+ <el-option/>
+ </el-select>
+ </el-col>
+ <el-col :span="2"><el-text>*鍒跺崟鍛橈細</el-text></el-col>
+ <el-col :span="4">
+ <el-select clearable placeholder=" " >
+ <el-option />
+ </el-select>
+ </el-col>
+
+ <!-- <el-col :span="2"><el-text /></el-col>-->
+ </el-row>
+ <el-row>
+ <el-col :span="2"><el-text>*鍑哄簱绫诲瀷锛�</el-text></el-col>
+ <el-col :span="4">
+ <el-select clearable placeholder=" " >
+ <el-option/>
+ </el-select>
+ </el-col>
+ <el-col :span="2"><el-text>璁㈠崟缂栧彿锛�</el-text></el-col>
+ <el-col :span="4"><el-input/></el-col>
+ <el-col :span="2"><el-text>椤圭洰鍚嶇О锛�</el-text></el-col>
+ <el-col :span="4"><el-input/></el-col>
+ <el-col :span="2"><el-text>鎵规鍙凤細</el-text></el-col>
+ <el-col :span="4"><el-input/></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"
+ >
+
+ <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>
+
+<style scoped>
+.main-div {
+ width: 100%;
+ height: 100%;
+ text-align: center;
+}
+.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%;
+}
+.order-detail{
+ width: 100%;
+ height: 80%;
+}
+
+</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/SelectIngredientsStock.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/SelectIngredientsStock.vue
index c56a4e2..f7fac75 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/SelectIngredientsStock.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/SelectIngredientsStock.vue
@@ -188,11 +188,11 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue
index 8a7f575..6c9f983 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue
@@ -5,9 +5,9 @@
let router=useRouter()
const getTableRow = (row,type) =>{
switch (type) {
- case 'edit' :{
- //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
- router.push({path: '/main/productStock/OrderAllocation', query: { id: row.id }})
+ case 'add' :{
+ alert('鍏ュ簱鎴愬姛鍚庯紝璺宠浆鍒板簱瀛樻煡璇㈤〉闈�,搴撳瓨鏁版嵁澧炲姞涓�鏉★紒锛侊紒')
+ router.push({path: '/main/productStock/ProductStockList', query: { id: row.id }})
break
}
case 'back':{
@@ -201,8 +201,10 @@
if ($grid) {
switch (code) {
case 'add': {
- alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ alert('鍏ュ簱鎴愬姛鍚庯紝璺宠浆鍒板簱瀛樻煡璇㈤〉闈紝搴撳瓨鏁版嵁澧炲姞涓�鏉★紒锛侊紒')
+ router.push({path: '/main/productStock/ProductStockList'})
return;
+ break
}
}
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 a47bc52..249fd05 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
@@ -31,9 +31,9 @@
if($grid){
switch (code){
case 'verify':{
- alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
- // router.push({path: '/main/productStock/OrderAllocation'});
- // return;
+ alert('棰嗗嚭鎴愬姛锛岃繑鍥炲簱瀛樻煡璇㈤〉闈紝搴撳瓨鏁版嵁鍑忓皯涓�鏉★紒锛侊紒')
+ router.push({path: '/main/productStock/ProductStockList'});
+ return;
break
}
case 'out':{
@@ -208,11 +208,11 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductOut.vue b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductOut.vue
index 8ea5570..3e6f2dc 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductOut.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductOut.vue
@@ -29,9 +29,9 @@
if($grid){
switch (code){
case 'ver':{
- alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
- // router.push({path: '/main/productStock/OrderAllocation'});
- // return;
+ alert('鍑哄簱鎴愬姛鍚庯紝璺宠浆鍒板簱瀛樻煡璇㈤〉闈�,鏁版嵁鍑忓皯涓�鏉★紒锛侊紒')
+ router.push({path: '/main/productStock/ProductStockList'});
+ return;
break
}
case 'record':{
@@ -281,11 +281,11 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductReturn.vue b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductReturn.vue
index 6157485..b388a7a 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductReturn.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductReturn.vue
@@ -149,15 +149,14 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductRework.vue b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductRework.vue
index 6450da7..5b46807 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductRework.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductRework.vue
@@ -32,9 +32,9 @@
if($grid){
switch (code){
case 'ver':{
- alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
- // router.push({path: '/main/productStock/OrderAllocation'});
- // return;
+ alert('杩斿伐鎴愬姛锛侊紒锛�')
+ // router.push({path: '/main/productStock/ProductStockList'});
+ return;
break
}
case 'record':{
@@ -209,11 +209,11 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue
index 8d38fb8..fc8837e 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue
@@ -9,17 +9,20 @@
const getTableRow = (row,type) =>{
switch (type) {
case 'edit' :{
- alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
- // router.push({path: '/main/productStock/OrderAllocation', query: { id: row.id }})
+ alert('璋冩嫧鎴愬姛鍚庯紝璺宠浆鍥炲簱瀛樻煡璇㈤〉闈�')
+ router.push({path: '/main/productStock/ProductStockList'});
+ return;
break
}
case 'back':{
router.push({path: '/main/productStock/FinishedProductRework', query: { id: row.id }})
+ return;
break
}
case 'out' :{
//alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
router.push({path: '/main/productStock/FinishedGoodsIssue', query: { id: row.id }})
+ return;
break
}
}
@@ -174,9 +177,9 @@
if($grid){
switch (code){
case 'edit':{
- alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
- // router.push({path: '/main/productStock/OrderAllocation'});
- // return;
+ alert('璋冩嫧鎴愬姛鍚庯紝璺宠浆鍥炲簱瀛樻煡璇㈤〉闈�')
+ router.push({path: '/main/productStock/ProductStockList'});
+ return;
break
}
case 'record':{
@@ -208,11 +211,11 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue
index 4e88112..8cbee20 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue
@@ -255,11 +255,11 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ReworkRecord.vue b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ReworkRecord.vue
index 20a9b41..6d93559 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ReworkRecord.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ReworkRecord.vue
@@ -195,11 +195,11 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TakeOutRecord.vue b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TakeOutRecord.vue
index a82f79e..481f077 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TakeOutRecord.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TakeOutRecord.vue
@@ -187,11 +187,11 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TransferRecord.vue b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TransferRecord.vue
index 6fee8b0..13f6584 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TransferRecord.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TransferRecord.vue
@@ -166,11 +166,11 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainTrader/SelectTrader.vue b/north-glass-erp/northglass-erp/src/views/mm/mainTrader/SelectTrader.vue
index a0cae16..d1954be 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainTrader/SelectTrader.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainTrader/SelectTrader.vue
@@ -183,11 +183,11 @@
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Create.vue b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Create.vue
index 932c4b1..0fc1826 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Create.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Create.vue
@@ -1,81 +1,103 @@
<template>
<el-header height="auto">
- <el-form label-width="100px" :inline="true" :model="formInline" class="demo-form-inline">
- <el-row :gutter="10">
- <el-col :span="6">
- <el-form-item label="閲囪喘绫诲瀷" class="item-style">
- <el-select v-model="form.buyType" class="m-2" placeholder="閫夋嫨閲囪喘绫诲瀷" clearable>
- <el-option
- v-for="item in CGTypeOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="閲囪喘閮ㄩ棬" class="item-style">
- <el-select v-model="cgBuMen" class="m-2" placeholder="閫夋嫨閲囪喘閮ㄩ棬" clearable>
- <el-option
- v-for="item in CGBuMenOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="渚涘簲鍟�" class="item-style">
- <el-cascader
- placeholder="閫夋嫨渚涘簲鍟�"
- :options="buyerOptions"
- filterable
- clearable
- empty-text="empty-text"
- :v-model="form.supplier"
- >
- </el-cascader>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="閲囪喘鍛�" class="item-style">
- <el-select v-model="form.buyer" class="m-2" placeholder="閫夋嫨閲囪喘閮ㄩ棬" clearable>
- <el-option
- v-for="item in BuyerOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-form-item>
- </el-col>
+ <el-descriptions
+ class="margin-top"
+ title=""
+ :column="4"
+ :size="'default'"
+ border
+ :rules="rules"
+ :model="ruleForm"
+ >
- </el-row>
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy" prop="name">
+ <template #label>
+ <span style="color:red">*</span>
+ 閲囪喘绫诲瀷
+ </template>
+<!-- <el-select v-model="form.buyType" class="m-2" placeholder="閫夋嫨閲囪喘绫诲瀷" clearable>-->
+ <el-select v-model="ruleForm.name" class="m-2" placeholder="閫夋嫨閲囪喘绫诲瀷" clearable>
+ <el-option
+ v-for="item in CGTypeOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-descriptions-item >
- <el-row :gutter="10">
- <el-col :span="6">
- <el-form-item label="閲囪喘缁勭粐" class="item-style">
- <el-input v-model="form.buyItem" placeholder="閲囪喘缁勭粐" clearable></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="鍒惰〃鏃ユ湡" class="item-style">
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
+ <template #label>
+ <span style="color:red">*</span>
+ 閲囪喘缁勭粐
+ </template>
+ <el-input v-model="ruleForm.name" placeholder="閲囪喘缁勭粐" clearable prop="name"></el-input>
+ </el-descriptions-item>
- <el-date-picker
- v-model="form.date"
- type="date"
- placeholder="閫夋嫨鍒惰〃鏃ユ湡"
- style="width: 100%"
- />
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
+ <template #label>
+ <span style="color:red">*</span>
+ 渚涘簲鍟�
+ </template>
+ <el-cascader
+ placeholder="閫夋嫨渚涘簲鍟�"
+ :options="buyerOptions"
+ filterable
+ clearable
+ empty-text="empty-text"
+ :v-model="form.supplier"
+ >
+ </el-cascader>
+ </el-descriptions-item>
- </el-form-item>
- </el-col>
- <el-col :span="6"></el-col>
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
+ <template #label>
+ <span style="color:red">*</span>
+ 閲囪喘閮ㄩ棬
+ </template>
+ <el-select v-model="cgBuMen" class="m-2" placeholder="閫夋嫨閲囪喘閮ㄩ棬" clearable>
+ <el-option
+ v-for="item in CGBuMenOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-descriptions-item>
- </el-row>
- </el-form>
+
+
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
+ <template #label>
+ <span style="color:red">*</span>
+ 閲囪喘鍛�
+ </template>
+ <el-select v-model="form.buyer" class="m-2" placeholder="閫夋嫨閲囪喘鍛�" clearable>
+ <el-option
+ v-for="item in BuyerOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-descriptions-item>
+
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy"
+ >
+ <template #label>
+ <span style="color:red">*</span>
+ 鍒惰〃鏃ユ湡
+ </template>
+ <el-date-picker
+ v-model="form.date"
+ type="date"
+ placeholder="閫夋嫨鍒惰〃鏃ユ湡"
+
+ />
+ </el-descriptions-item>
+
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy"></el-descriptions-item>
+ </el-descriptions>
</el-header>
@@ -91,7 +113,7 @@
class="mytable-scrollbar"
ref="xGrid"
v-bind="gridOptions"
- v-on="gridEvents"
+ @="gridEvents"
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
@@ -115,7 +137,7 @@
<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)"/>
+ <el-input v-model="option.data" @input="changeFilterEvent($event, option, $panel)" />
</div>
</div>
</template>
@@ -125,8 +147,10 @@
</template>
-<script setup>
+<script lang="ts" setup>
import {ref, reactive} from 'vue'
+import {useRouter} from "vue-router";
+import {ElMessage, ElMessageBox} from "element-plus";
let router = useRouter()
@@ -163,7 +187,7 @@
//{title: '鎿嶄綔', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},
{type: 'seq', fixed: "left", title: ' ', width: 50},
{type: 'checkbox', fixed: "left", title: '', width: 50},
- {type: 'expand', title: '璇︽儏', fixed: "left", slots: {content: 'content'}, width: 50},
+ //{type: 'expand', title: '璇︽儏', fixed: "left", slots: {content: 'content'}, width: 50},
{
field: 'cgdh',
width: '10%',
@@ -203,7 +227,8 @@
width: '8%',
title: '楂樺害', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
editRender: {name: 'input', attrs: {placeholder: ''}},
- sortable: true
+ sortable: true,
+ type: 'number'
},
{
field: 'h',
@@ -310,12 +335,12 @@
'name': '鍏ュ簱',
status: 'primary',
'code': 'Storage'
- },
+ }/*,
{
'name': '閫�璐�',
status: 'primary',
'code': 'Return'
- }/*,
+ },
{
'name': '杩斿洖鏌ヨ',
@@ -356,7 +381,8 @@
const $grid = xGrid.value
if ($grid) {
switch (code) {
- case 'Add': {//鏂板
+//鏂板
+ case 'Add': {
const record = {
checked: false
}
@@ -365,83 +391,57 @@
})
break
}
- case 'Remove': {//绉婚櫎
+//绉婚櫎
+ case 'Remove': {
if ($grid.getCheckboxRecords().length === 0) {
- openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ MessageShow('璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�','warning');
return
} else {
- const type = VXETable.modal.confirm('鎮ㄧЩ闄や簡' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒');
- //openAlert({type:'alert', content: '鎴愬姛鍏ュ簱'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
- return
+
+ MessageConfirmShow('绉婚櫎','鏄惁纭绉婚櫎閫変腑鐨�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒');
+
}
break
}
- case 'Save': {//淇濆瓨
-
-
- if (form.buyItem === null || form.buyItem === '') {
- openAlert({type: 'message', content: '閲囪喘缁勭粐涓嶅彲涓虹┖', status: 'warning'})
+//淇濆瓨
+ case 'Save': {
+ /*if (form.buyItem === null || form.buyItem === '') {
+ MessageShow('閲囪喘缁勭粐涓嶅彲涓虹┖','warning');
+ return;
}
-
- return
-
- if (buyerOptions.values() <= 0) {
-
- }
-
- const type = VXETable.modal.confirm('鏄惁纭畾淇濆瓨褰撳墠璁㈠崟淇℃伅锛�');
- openAlert({type: 'message', content: $grid.rows.number + '', status: 'warning'})
- return
-
- break
- }
- case 'GoSelect': {
-
- router.push({path: '/main/purchaseOrder/SelectPurchaseOrder'})
- break
- }
-
- case 'Storage': {//鍏ュ簱
- if ($grid.getCheckboxRecords().length === 0) {
- openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
- return
- } else {
- const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭鍏ュ簱锛�');
- //openAlert({type:'alert', content: '鎴愬姛鍏ュ簱'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
- return
- }
- break
- }
- case 'Return': {//閫�搴�
- if ($grid.getCheckboxRecords().length === 0) {
- openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
- return
- } else {
- /* async ()=>{
- const type = await.VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
- }*/
- const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
-
-
- /* if(VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵' )){
- //openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success',lockView: false, mask: false })
-
-
- }*/
-
- /* if(type==='confirm'){
- openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
- }
-
*/
- //openAlert({type:'alert', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ //閫変腑鏁版嵁
+ /* const $table = this.$refs.xTable
+ const selectRecords = $table.getCheckboxRecords()*/
+//+$grid.rows.number
+ if ($grid.getCheckboxRecords().length === 0) {
+ MessageShow('璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�','warning');
return
+ } else {
+
+
+ MessageConfirmShow('淇濆瓨璁㈠崟','鏄惁纭畾淇濆瓨褰撳墠璁㈠崟淇℃伅');
+ }
+ break
+ }
+//鍏ュ簱
+ case 'Storage': {
+ if ($grid.getCheckboxRecords().length === 0) {
+ MessageShow('璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�','warning');
+ return
+ } else {
+ MessageConfirmShow('鍏ュ簱','鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭鍏ュ簱锛�')
+ }
+ break
+ }
+//閫�搴�
+ case 'Return': {
+ if ($grid.getCheckboxRecords().length === 0) {
+ MessageShow('璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�','warning');
+ return
+ } else {
+
+
}
break
}
@@ -463,14 +463,88 @@
}
-const openAlert = (options) => {
- if (options.type === 'message') {
- VXETable.modal.message(options)
- } else {
- VXETable.modal.alert(options)
- }
+import type { FormInstance, FormRules } from 'element-plus'
+
+
+
+interface RuleForm {
+ name: string
+ region: string
+ count: string
+ date1: string
+ date2: string
+ delivery: boolean
+ type: string[]
+ resource: string
+ desc: string
}
+const ruleFormRef = ref<FormInstance>()
+const ruleForm = reactive<RuleForm>({
+ name: '',
+ region: '',
+ count: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+})
+const rules = reactive<FormRules<RuleForm>>({
+ name: [
+ { required: true, message: 'Please input Activity name', trigger: 'blur' },
+ { min: 3, max: 5, message: 'Length should be 3 to 5', trigger: 'blur' },
+ ],
+ region: [
+ {
+ required: true,
+ message: 'Please select Activity zone',
+ trigger: 'change',
+ },
+ ],
+ count: [
+ {
+ required: true,
+ message: 'Please select Activity count',
+ trigger: 'change',
+ },
+ ],
+ date1: [
+ {
+ type: 'date',
+ required: true,
+ message: 'Please pick a date',
+ trigger: 'change',
+ },
+ ],
+ date2: [
+ {
+ type: 'date',
+ required: true,
+ message: 'Please pick a time',
+ trigger: 'change',
+ },
+ ],
+ type: [
+ {
+ type: 'array',
+ required: true,
+ message: 'Please select at least one activity type',
+ trigger: 'change',
+ },
+ ],
+ resource: [
+ {
+ required: true,
+ message: 'Please select activity resource',
+ trigger: 'change',
+ },
+ ],
+ desc: [
+ { required: true, message: 'Please input activity form', trigger: 'blur' },
+ ],
+})
const form = reactive({
@@ -487,10 +561,6 @@
buyType: ''
})
-
-const onSubmit = () => {
- console.log('submit!')
-}
//渚涘簲鍟�
const buyerOptions = [
@@ -573,23 +643,82 @@
]
-import dayjs from 'dayjs'
-import {VXETable} from "vxe-table";
-import {useRouter} from "vue-router";
+//椤甸潰閫昏緫浠g爜鎵ц
+function logicExecute(type){
+ const $grid = xGrid.value
+ switch (type) {
+ case '鍏ュ簱':
+ //鍏ュ簱閫昏緫浠g爜TODO
+ MessageShow('鍏ュ簱鎴愬姛锛�', 'success');
+ break;
+ case '閫�璐�':
+ //閫�璐ч�昏緫浠g爜TODO
+ MessageShow('閫�璐ф垚鍔燂紒', 'success');
+ break;
+ case '淇濆瓨璁㈠崟':
+ //淇濆瓨璁㈠崟閫昏緫浠g爜TODO
+ const submitForm = async (formEl: FormInstance | undefined) => {
+ if (!formEl) return
+ await formEl.validate((valid, fields) => {
+ if (valid) {
+ console.log('submit!')
+ } else {
+ console.log('error submit!', fields)
+ }
+ })
+ }
+ MessageShow('璁㈠崟淇濆瓨鎴愬姛锛�', 'success');
+ break;
+ case '绉婚櫎':
+ $grid.removeCheckboxRow();
+ break;
+ default:
+ MessageShow('鏈煡鎿嶄綔锛�', 'error');
+ break;
+ }
+ return true;
+
+}
+
+//鎻愮ず淇℃伅
+const MessageShow = (content, type ) => {
+
+ ElMessage({
+ message: content,
+ type: type,
+ showClose: true,
+ })
+}
+
+//鎿嶄綔纭绫讳俊鎭細鎿嶄綔绫诲瀷锛屾彁绀哄唴瀹癸紝鎻愮ず鏍囧ご锛屾彁绀虹被鍨�
+const MessageConfirmShow = (czType, content, title='鎿嶄綔纭鎻愮ず', type='warning') => {
+
+ ElMessageBox.confirm(
+ content,
+ title,
+ {
+ cancelButtonText: '鍙栨秷',
+ confirmButtonText: '纭畾',
+ type: type,
+ center: true,
+ }
+ )
+ //鐐瑰嚮浜嗙‘瀹�
+ .then(() => {
+ return logicExecute(czType);
+ })
+ //鐐瑰嚮浜嗗彇娑�
+ .catch(() => {
+ return false;
+ })
+}
</script>
-
-
<style scoped>
-.custom-header {
- .el-checkbox {
- display: flex;
- height: unset;
- }
-}
-
-.item-style {
- width: 300px;
+:deep(.el-descriptions__table .label-diy) {
+ text-align: center;
+ width: 100px;
+ /*font-size: large;*/
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Details.vue b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Details.vue
new file mode 100644
index 0000000..8ee52de
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Details.vue
@@ -0,0 +1,453 @@
+<template>
+ <el-header height="auto">
+ <el-descriptions
+ class="margin-top"
+ title=""
+ :column="4"
+ :size="'default'"
+ border
+ >
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
+ <template #label>
+ 鎿嶄綔鍗曞彿
+ </template>
+ <el-input v-model="form.buyItem" placeholder="鍗曞彿" disabled></el-input>
+ </el-descriptions-item>
+
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
+ <template #label>
+ 閲囪喘绫诲瀷
+ </template>
+ <el-input v-model="form.buyItem" placeholder="閲囪喘绫诲瀷" disabled></el-input>
+ </el-descriptions-item>
+
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
+ <template #label>
+ 閲囪喘閮ㄩ棬
+ </template>
+ <el-input v-model="form.buyItem" placeholder="閲囪喘閮ㄩ棬" disabled></el-input>
+ </el-descriptions-item>
+
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
+ <template #label>
+ 渚涘簲鍟�
+ </template>
+ <el-input v-model="form.buyItem" placeholder="渚涘簲鍟�" disabled></el-input>
+ </el-descriptions-item>
+
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
+ <template #label>
+ 閲囪喘鍛�
+ </template>
+ <el-input v-model="form.buyItem" placeholder="閲囪喘鍛�" disabled></el-input>
+ </el-descriptions-item>
+
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
+ <template #label>
+ 閲囪喘缁勭粐
+ </template>
+ <el-input v-model="form.buyItem" placeholder="閲囪喘缁勭粐" disabled></el-input>
+ </el-descriptions-item>
+
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
+ <template #label>
+ 鍒惰〃鏃ユ湡
+ </template>
+ <el-date-picker
+ v-model="form.date"
+ type="date"
+ placeholder="閫夋嫨鍒惰〃鏃ユ湡"
+ />
+ </el-descriptions-item>
+
+ <el-descriptions-item label-class-name="label-diy" class-name="content-diy"></el-descriptions-item>
+
+ </el-descriptions>
+ </el-header>
+
+ <el-main style="padding-top: 5px;height:100%">
+ <vxe-grid
+ max-height="500"
+ @filter-change="filterChanged"
+ 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>
+
+ </vxe-grid>
+
+ </el-main>
+
+</template>
+
+<script setup>
+import {ref, reactive} from 'vue'
+
+let router = useRouter()
+import {useRouter} from "vue-router";
+import { ElMessage, ElMessageBox} from "element-plus";
+
+const value = 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: 'seq', fixed: "left", title: ' ', width: 50},
+ {type: 'checkbox', fixed: "left", title: '', width: 50},
+ {
+ field: 'cgdh',
+ width: '10%',
+ title: '鐗╂枡缂栫爜',
+ filters: [{data: ''}],
+ sortable: true
+ },
+ {
+ field: 'cgzt',
+ width: '10%',
+ title: '鐗╂枡鍚嶇О',
+ filters: [{data: ''}],
+ sortable: true
+ },
+ {
+ field: 'gys',
+ width: '10%',
+ title: '浜у湴',
+
+ filters: [{data: ''}],
+ sortable: true
+ },
+ {
+ field: 'w',
+ width: '8%',
+ title: '瀹藉害',
+ filters: [{data: ''}],
+ sortable: true
+ },
+ {
+ field: 'g',
+ width: '8%',
+ title: '楂樺害',
+ filters: [{data: ''}],
+ sortable: true,
+
+ },
+ {
+ field: 'h',
+ width: '8%',
+ title: '鍘氬害',
+ filters: [{data: ''}],
+ sortable: true
+ },
+ {
+ field: 'xh',
+ width: '8%',
+ title: '鍨嬪彿',
+ filters: [{data: ''}],
+ sortable: true
+ },
+ {
+ field: 'dw',
+ width: '8%',
+ title: '鍗曚綅',
+ filters: [{data: ''}],
+ sortable: true
+ },
+ {
+ field: 'sl',
+ width: '8%',
+ title: '鏁伴噺',
+ filters: [{data: ''}],
+ sortable: true
+ },
+ {
+ field: 'czsl',
+ width: '8%',
+ title: '鎿嶄綔鏁伴噺',
+ type: 'number',
+ editRender: {name: 'input', type: 'number', attrs: {placeholder: ''}}
+ },
+ {
+ field: 'sl',
+ width: '12%',
+ title: '绠辨暟',
+ filters: [{data: ''}],
+ sortable: true
+ },
+ {
+ field: 'je',
+ width: '8%',
+ title: '鍗曠墖闈㈢Н',
+ filters: [{data: ''}],
+ sortable: true
+ },
+ {
+ field: 'je',
+ width: '12%',
+ title: '鍗曚环',
+ filters: [{data: ''}],
+ sortable: true
+ },
+ {
+ field: 'sl',
+ width: '8%',
+ title: '鎬婚潰绉�',
+ filters: [{data: ''}],
+ sortable: true
+ },
+ {
+ field: 'yl',
+ width: '10%',
+ title: '鎬婚噾棰�',
+ filters: [{data: ''}],
+ sortable: true
+ },
+ {
+ field: 'yl',
+ width: '10%',
+ title: '澶囨敞',
+ filters: [{data: ''}],
+ sortable: true
+ }
+ ],
+ //琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [
+ {type: 'text'},
+ {
+ 'name': '淇濆瓨璁㈠崟',
+ status: 'primary',
+ 'code': 'Save'
+ }, {
+ 'name': '鍏ュ簱',
+ status: 'primary',
+ 'code': 'Storage'
+ },
+ {
+ 'name': '閫�璐�',
+ status: 'primary',
+ 'code': 'Return'
+ },
+ {
+ 'name': '鍙栨秷',
+ status: '',
+ 'code': 'Cancel'
+ }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true,
+ tools: [],
+
+ },
+ //table body瀹為檯鏁版嵁
+ data: [{}, {}, {}],
+ //鑴氬悎骞�
+ mergeFooterItems: [
+ {row: 0, col: 0, rowspan: 1, colspan: 3}
+ ],
+ //鍚堝苟鑴�
+ 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 'Save': {
+ MessageAlertShow('鐐瑰嚮浜嗕繚瀛樿鍗�','鎿嶄綔鎻愮ず');
+ //MessageShow('鐐瑰嚮浜嗕繚瀛樿鍗曪紒', 'error');
+ break;
+ }
+//鍙栨秷锛岃繑鍥炴煡璇㈤〉闈�
+ case 'Cancel': {
+ router.push({path: '/main/purchaseOrder/StoragePurchaseOrder'})
+ break
+ }
+//鍏ュ簱
+ case 'Storage': {
+ if ($grid.getCheckboxRecords().length === 0) {
+ MessageShow('璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹紒', 'warning');
+ return
+ } else {
+ MessageConfirmShow('鍏ュ簱', '鏄惁纭瀵归�変腑鐨�' + $grid.getCheckboxRecords().length + '鐗╂枡杩涜鍏ュ簱鎿嶄綔锛�');
+ }
+ break
+ }
+//閫�璐�
+ case 'Return': {
+ if ($grid.getCheckboxRecords().length === 0) {
+ MessageShow('璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹紒', 'warning');
+ return
+ } else {
+
+ MessageConfirmShow('閫�璐�', '鏄惁纭瀵归�変腑鐨�' + $grid.getCheckboxRecords().length + '鐗╂枡杩涜閫�璐ф搷浣滐紒');
+ }
+ break
+ }
+
+ }
+ }
+ },
+ toolbarToolClick({code}) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (code) {
+ case 'myPrint': {
+ $grid.print()
+ break
+ }
+ }
+ }
+ },
+}
+
+//琛ㄥ崟鏁版嵁
+const form = reactive({
+ name: '',
+ region: '',
+ date: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+ supplier: '',
+ buyer: '',
+ buyItem: '',
+ buyType: ''
+
+})
+
+
+//椤甸潰閫昏緫浠g爜鎵ц
+function logicExecute(type){
+ const $grid = xGrid.value
+ switch (type) {
+ case '鍏ュ簱':
+ //鍏ュ簱閫昏緫浠g爜TODO
+ MessageShow('鍏ュ簱鎴愬姛锛�', 'success');
+ break;
+ case '閫�璐�':
+ //閫�璐ч�昏緫浠g爜TODO
+ MessageShow('閫�璐ф垚鍔燂紒', 'success');
+ break;
+ default:
+ MessageShow('鏈煡鎿嶄綔锛�', 'error');
+ break;
+ }
+ return true;
+}
+
+//鎻愮ず淇℃伅
+//淇℃伅鍐呭锛屾樉绀烘柟寮忥紝鏄剧ず鏍囬锛岀被鍨�
+const MessageShow = (content,type='success') => {
+ ElMessage({
+ message: content,
+ type: type,
+ showClose: true,
+ })
+}
+
+//鎿嶄綔纭绫讳俊鎭細鎿嶄綔绫诲瀷锛屾彁绀哄唴瀹癸紝鎻愮ず鏍囧ご锛屾彁绀虹被鍨�
+const MessageConfirmShow = (czType, content, title='鎿嶄綔纭鎻愮ず', type='warning') => {
+ ElMessageBox.confirm(
+ content,
+ title,
+ {
+ cancelButtonText: '鍙栨秷',
+ confirmButtonText: '纭畾',
+ type: type,
+ center: true,
+ }
+ )
+ //鐐瑰嚮浜嗙‘瀹�
+ .then(() => {
+
+ return logicExecute(czType);
+ })
+ //鐐瑰嚮浜嗗彇娑�
+ .catch(() => {
+ return false;
+ })
+}
+
+//寮圭獥淇℃伅
+const MessageAlertShow=(content,title,type='info')=>{
+
+ ElMessageBox.alert(content, title, {
+ // 绂佹鑷姩瀵圭劍
+ //autofocus: false,
+ confirmButtonText: 'OK',
+ /*callback: (action: Action) => {
+ MessageShow(`action: ${action}`,type)
+ },*/
+ })
+}
+
+</script>
+
+
+<style scoped>
+:deep(.el-descriptions__table .label-diy) {
+ text-align: center;
+ width: 100px;
+ /* font-size: large;*/
+}
+</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue
index 8b12b58..475da20 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue
@@ -39,14 +39,13 @@
@="gridEvents"
>
- <!-- @="gridEvents"-->
- <!-- @toolbar-button-click="toolbarButtonClickEvent"-->
+
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
@@ -79,6 +78,9 @@
import {VXETable} from "vxe-table";
import {reactive} from "vue";
import {useRouter} from 'vue-router'
+import {ElMessage, ElMessageBox} from "element-plus";
+
+const datevalue = ref('')//鏃堕棿
//缁勪欢鎺ユ敹鍙傛暟
const PayOptions = reactive({
@@ -110,10 +112,10 @@
showStatus: true
},
columns: [
- /* {title: '鎿嶄綔', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},*/
- {type: 'seq', fixed: "left", title: ' ', width: '5%'},
+ /* {title: '鎿嶄綔', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},*/
+ {type: 'expand', title: '', fixed: "left", slots: {content: 'content'}, width: '5%'},//璇︽儏
{type: 'checkbox', fixed: "left", title: '', width: '5%'},
- {type: 'expand', title: '璇︽儏', fixed: "left", slots: {content: 'content'}, width: '5%'},
+ {type: 'seq', fixed: "left", title: ' ', width: '5%'},
{
field: 'cgdh',
width: '10%',
@@ -147,15 +149,29 @@
slots: {filter: 'num1_filter'},
sortable: true
},
- {field: 'w', width: '10%', title: '鏈湡宸蹭粯', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'g', width: '10%', title: '鏈熸湯浣欓', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: 'w',
+ width: '10%',
+ title: '鏈湡宸蹭粯',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'g',
+ width: '10%',
+ title: '鏈熸湯浣欓',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
{field: 'h', width: '9%', title: '绋庣巼', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
{field: '6', width: '10%', title: '澶囨敞', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
],//琛ㄥご鍙傛暟
toolbarConfig: {
- buttons: [{type:'text'},{
+ buttons: [{type: 'text'}, {
'name': '搴斾粯纭',
- status:'primary',
+ status: 'primary',
'code': 'Sure',
}],
import: false,
@@ -165,7 +181,7 @@
custom: true,
style: 'paddling-left:10px'
},//琛ㄥご鎸夐挳
- data: [{},{},{},{}],//table body瀹為檯鏁版嵁
+ data: [{}, {}, {}, {}],//table body瀹為檯鏁版嵁
mergeFooterItems: [
{row: 0, col: 0, rowspan: 1, colspan: 3}
],//鍚堝苟鑴�
@@ -192,49 +208,13 @@
const $grid = xGrid.value
if ($grid) {
switch (code) {
- case 'Add': {//鏂板
- router.push({path: '/main/purchaseOrder/CreatePurchaseOrder'})
- break
- }
- case 'Storage': {//鍏ュ簱
+ //搴斾粯纭
+ case 'Sure': {
if ($grid.getCheckboxRecords().length === 0) {
- openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ MessageShow("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�!", 'warning');
return
} else {
- const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭鍏ュ簱锛�');
- //openAlert({type:'alert', content: '鎴愬姛鍏ュ簱'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
- return
- }
- break
- }
- case 'Return': {//閫�搴�
- if ($grid.getCheckboxRecords().length === 0) {
- openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
- return
- } else {
- /* async ()=>{
- const type = await.VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
- }*/
- const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
-
-
- /* if(VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵' )){
- //openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success',lockView: false, mask: false })
-
-
- }*/
-
- /* if(type==='confirm'){
- openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
- }
-
-*/
- //openAlert({type:'alert', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
- return
+ MessageConfirmShow("纭搴斾粯", '鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭搴斾粯锛�')
}
break
}
@@ -254,16 +234,7 @@
},
}
-const openAlert = (options) => {
- if (options.type === 'message') {
- VXETable.modal.message(options)
- } else {
- VXETable.modal.alert(options)
- }
-}
-
-const datevalue = ref('')
const shortcuts = [
{
@@ -294,6 +265,73 @@
},
},
]
+
+
+//椤甸潰閫昏緫浠g爜鎵ц
+function logicExecute(type){
+ const $grid = xGrid.value
+ switch (type) {
+ case '纭搴斾粯':
+ //鍏ュ簱閫昏緫浠g爜TODO
+ MessageShow('鎿嶄綔鎴愬姛锛�', 'success');
+ break;
+
+ default:
+ MessageShow('鏈煡鎿嶄綔锛�', 'error');
+ break;
+
+ }
+ return true;
+}
+
+
+//鎻愮ず淇℃伅
+//淇℃伅鍐呭锛屾樉绀烘柟寮忥紝鏄剧ず鏍囬锛岀被鍨�
+const MessageShow = (content, type = 'success') => {
+ ElMessage({
+ message: content,
+ type: type,
+ showClose: true,
+ })
+}
+
+//鎿嶄綔纭绫讳俊鎭細鎿嶄綔绫诲瀷锛屾彁绀哄唴瀹癸紝鎻愮ず鏍囧ご锛屾彁绀虹被鍨�
+const MessageConfirmShow = (czType, content, title = '鎿嶄綔纭鎻愮ず', type = 'warning') => {
+ ElMessageBox.confirm(
+ content,
+ title,
+ {
+ cancelButtonText: '鍙栨秷',
+ confirmButtonText: '纭畾',
+ type: type,
+ center: true,
+ }
+ )
+ //鐐瑰嚮浜嗙‘瀹�
+ .then(() => {
+
+ return logicExecute(czType);
+
+ })
+ //鐐瑰嚮浜嗗彇娑�
+ .catch(() => {
+ return false;
+ })
+}
+
+//寮圭獥淇℃伅
+const MessageAlertShow = (content, title, type = 'info') => {
+
+ ElMessageBox.alert(content, title, {
+ // 绂佹鑷姩瀵圭劍
+ //autofocus: false,
+ confirmButtonText: 'OK',
+ /*callback: (action: Action) => {
+ MessageShow(`action: ${action}`,type)
+ },*/
+ })
+}
+
</script>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/PurchaseOrder.vue b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/PurchaseOrder.vue
index dceff81..c95d058 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/PurchaseOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/PurchaseOrder.vue
@@ -39,6 +39,7 @@
<script setup>
import {nextTick, ref} from 'vue'
import {ArrowRight, Search} from "@element-plus/icons-vue";
+import {ElMessage, ElMessageBox} from "element-plus";
let indexFlag = $ref(1)
@@ -46,6 +47,69 @@
indexFlag = index
}
+/*
+
+//鎻愮ず淇℃伅
+//淇℃伅鍐呭锛屾樉绀烘柟寮忥紝鏄剧ず鏍囬锛岀被鍨�
+const MessageShow = (content, type = 'success') =>{
+ ElMessage({
+ message: content,
+ type: type,
+ showClose: true,
+ })
+}
+
+//鎿嶄綔纭绫讳俊鎭細鎿嶄綔绫诲瀷锛屾彁绀哄唴瀹癸紝鎻愮ず鏍囧ご锛屾彁绀虹被鍨�
+const MessageConfirmShow = (czType, content, title = '鎿嶄綔纭鎻愮ず', type = 'warning') => {
+ ElMessageBox.confirm(
+ content,
+ title,
+ {
+ cancelButtonText: '鍙栨秷',
+ confirmButtonText: '纭畾',
+ type: type,
+ center: true,
+ }
+ )
+ //鐐瑰嚮浜嗙‘瀹�
+ .then(() => {
+ switch (czType) {
+ case '纭畾':
+ //澶氶�夐��璐ч�昏緫浠g爜TODO
+ MessageShow('鎿嶄綔鎴愬姛锛�', 'success');
+ break;
+ case '閫�璐�':
+ //鍗曢��璐ч�昏緫浠g爜TODO
+ MessageShow('鎿嶄綔鎴愬姛锛�', 'success');
+ break;
+ default:
+ MessageShow('鏈煡鎿嶄綔锛�', 'error');
+ break;
+ }
+
+ return true;
+ })
+ //鐐瑰嚮浜嗗彇娑�
+ .catch(() => {
+ return false;
+ })
+}
+
+//寮圭獥淇℃伅
+const MessageAlertShow = (content, title, type = 'info') => {
+
+ ElMessageBox.alert(content, title, {
+ // 绂佹鑷姩瀵圭劍
+ //autofocus: false,
+ confirmButtonText: 'OK',
+ /!*callback: (action: Action) => {
+ MessageShow(`action: ${action}`,type)
+ },*!/
+ })
+}
+
+*/
+
</script>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Return.vue b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Return.vue
index 4420a82..6d8e32e 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Return.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Return.vue
@@ -42,11 +42,11 @@
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
@@ -70,12 +70,13 @@
<!-- 璇︽儏妗� 閮ㄥ垎1-->
- <vxe-modal v-model="showDetails" title="鏌ョ湅璇︽儏" width="600" height="80%" :mask="false" :lock-view="false" resize>
- <el-container >
+ <vxe-modal v-model="showDetails" title="鏌ョ湅璇︽儏" width="600" height="80%" :mask="false" :lock-view="false"
+ resize>
+ <el-container>
<el-header height="35px"
style="margin: 0;padding: 0">
- <el-input v-model="showCGDH" placeholder="閲囪喘鍗曞彿" disabled >
+ <el-input v-model="showCGDH" placeholder="閲囪喘鍗曞彿" disabled>
<template #prepend>閲囪喘鍗曞彿锛�</template>
</el-input>
</el-header>
@@ -119,60 +120,55 @@
<script setup>
+
import {ref} from "vue";
import {reactive} from "vue";
import {useRouter} from 'vue-router'
import {Search} from "@element-plus/icons-vue";
import dayjs from "dayjs";
-import {VXETable} from "vxe-table";
+import {ElMessage, ElMessageBox} from "element-plus";
+
let router = useRouter()
const getTableRow = (row, type) => {
switch (type) {
case 'edit' : {
//alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
- router.push({path: '/main/purchaseOrder/CreatePurchaseOrder', query: {id: row.id}})
+ router.push({path: '/main/purchaseOrder/DetailsPurchaseOrder', query: {id: row.id}})
break
}
case 'delete': {
-
- alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅'+row.id)
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅' + row.id)
break
}
}
}
const xGrid = ref()
+
const gridEvents = {
toolbarButtonClick({code}) {
const $grid = xGrid.value
if ($grid) {
switch (code) {
- case 'Add': {//鏂板
- router.push({path: '/main/purchaseOrder/CreatePurchaseOrder'})
- break
- }
- case 'Sure':{
+ case 'Sure': {
if ($grid.getCheckboxRecords().length === 0) {
- openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+
+ MessageShow('璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�!', 'warning');
+
return
} else {
- const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭閫�璐э紵');
- //openAlert({type:'alert', content: '鎴愬姛鍏ュ簱'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
- return
+
+ MessageConfirmShow('纭畾', '鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭閫�璐э紵')
}
break
}
- case 'Log':{
-
- openAlert({type: 'alert', content: '鐐瑰嚮浜嗛��璐ц褰�', status: 'success'})
+ case 'Log': {
+ MessageAlertShow('鐐瑰嚮浜嗛��璐ц褰�!', '鎿嶄綔鎻愮ず');
break
}
-
}
}
},
@@ -189,44 +185,33 @@
},
}
-const openAlert = (options) => {
- if(options.type==='message'){
- VXETable.modal.message(options)
- }else{
- VXETable.modal.alert(options)
- }
-}
-const closeAlert = (id) => {
- VXETable.modal.close(id)
-}
+//鏌ヨ鎸夐挳鏂规硶
+const BtnSearchPurchaseOrder = () => {
-const confirmEvent = async () => {
- const type = await VXETable.modal.confirm('鎮ㄧ‘瀹氳鍒犻櫎鍚楋紵')
- VXETable.modal.message({ content: `鐐瑰嚮浜� ${type}` })
-}
+ //寮�濮嬫椂闂达紝缁撴潫鏃堕棿鑾峰彇
+ //MessageShow("寮�濮嬫椂闂�"+datevalue._rawValue[0]+"\r\n缁撴潫鏃堕棿\r\n"+datevalue._rawValue[1]);
-const BtnSearchPurchaseOrder =()=>{
for (let i = 1; i < 6; i++) {
const randomInt = Math.floor(Math.random() * 999) + 1000;//4浣嶆暟闅忔満鏁�
const randomSumInt = Math.floor(Math.random() * 99) + 10;//2浣嶆暟闅忔満鏁�
const randomOrderInt = Math.floor(Math.random() * 99) + 100;//3浣嶆暟闅忔満鏁�
const t = i % 2 === 0 ? 5 : 6;
- const s = i % 2 === 0 ? '鍏ュ簱' :i % 3 === 0?'閫�璐�':'閮ㄥ垎鍏ュ簱';
- const thdh = i % 2 === 0 ? '' :i % 3 === 0?'THID'+randomOrderInt:'';
+ const s = i % 2 === 0 ? '鍏ュ簱' : i % 3 === 0 ? '閫�璐�' : '閮ㄥ垎鍏ュ簱';
+ const thdh = i % 2 === 0 ? '' : i % 3 === 0 ? 'THID' + randomOrderInt : '';
const CGNo = 'NGCG231200' + randomOrderInt;//閲囪喘缂栧彿
const wlNo = 'NGWL1000' + randomInt;
const xh = 'NGXH' + randomSumInt;
const wlmc = 'WLMC' + randomInt;
const gys = '渚涘簲鍟�' + randomSumInt;
- const xhdh='NG231200'+randomOrderInt;
+ const xhdh = 'NG231200' + randomOrderInt;
const w = i % 2 === 0 ? '3300' : i % 3 === 0 ? '3660' : i % 4 === 0 ? '2250' : '2580';
const h = i % 2 === 0 ? '2440' : i % 3 === 0 ? '2440' : i % 4 === 0 ? '2000' : '2300';
const dw = i % 2 === 0 ? '鐗�' : i % 3 === 0 ? '骞崇背' : i % 4 === 0 ? '鍖�' : '鍚�';
now.setDate(now.getDate() + 1);
gridOptions.data.push({
cgdh: CGNo,
- thdh:thdh,
+ thdh: thdh,
h: t,
xh: xh,
wlbh: wlNo,
@@ -235,19 +220,18 @@
w: w,
g: h,
dw: dw,
- cgzt:s,
- rq:dayjs(now).format('YYYY-MM-DD'),
- yl:randomSumInt,
- sl:randomOrderInt,
- xsdh:xhdh,
- je:randomInt,
+ cgzt: s,
+ rq: dayjs(now).format('YYYY-MM-DD'),
+ yl: randomSumInt,
+ sl: randomOrderInt,
+ xsdh: xhdh,
+ je: randomInt,
6: '139xxxxxxxx',
})
}
}
-
//缁勪欢鎺ユ敹鍙傛暟
@@ -280,48 +264,141 @@
showStatus: true
},
columns: [
+ {type: 'expand', title: '', fixed: "left", slots: {content: 'content'}, width: 50},//璇︽儏
{title: '鎿嶄綔', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},
+ {type: 'checkbox', fixed: "left", title: '', width: 50},
{type: 'seq', fixed: "left", title: ' ', width: 50},
- { type: 'checkbox',fixed:"left", title: '', width: 50 },
- {type: 'expand', title:'璇︽儏', fixed: "left", slots: {content: 'content'}, width: 50},
- {field: 'thdh', width: '10%', title: '閫�璐у崟鍙�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'cgdh', width: '10%', title: '閲囪喘鍗曞彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+
+
+ {
+ field: 'thdh',
+ width: '10%',
+ title: '閫�璐у崟鍙�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'cgdh',
+ width: '10%',
+ title: '閲囪喘鍗曞彿',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
{field: 'cgzt', width: '10%', title: '鐘舵��', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'gys', width: '10%',title: '渚涘簲鍟�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'wlbh', width: '10%',title: '鐗╂枡缂栧彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'wlmc', width: '10%', title: '鐗╂枡鍚嶇О', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'w', width: '8%',title: '瀹藉害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'g', width: '8%',title: '楂樺害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'h', width: '8%',title: '鍘氬害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'xh', width: '8%',title: '鍨嬪彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'dw', width: '8%',title: '鍗曚綅', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '12%',title: '涓嶅惈绋庡崟浠�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'sl', width: '8%',title: '鏁伴噺', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'sl', width: '12%',title: '宸查噰璐暟閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'je', width: '8%',title: '閲戦', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'je', width: '12%',title: '涓嶅惈绋庨噾棰�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '8%',title: '绋庣巼', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'sl', width: '8%',title: '搴撳瓨', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'yl', width: '10%',title: '鍛ㄧ敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'yl', width: '10%',title: '鏈堢敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'cgzt', width: '10%',title: '鍗曟嵁鐘舵��', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'xsdh', width: '10%',title: '閿�鍞崟鍙�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'rq', width: '10%',title: '鍒跺崟鏃ユ湡', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: 'gys',
+ width: '10%',
+ title: '渚涘簲鍟�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'wlbh',
+ width: '10%',
+ title: '鐗╂枡缂栧彿',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'wlmc',
+ width: '10%',
+ title: '鐗╂枡鍚嶇О',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: 'w', width: '8%', title: '瀹藉害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'g', width: '8%', title: '楂樺害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'h', width: '8%', title: '鍘氬害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'xh', width: '8%', title: '鍨嬪彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'dw', width: '8%', title: '鍗曚綅', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: '6',
+ width: '12%',
+ title: '涓嶅惈绋庡崟浠�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: 'sl', width: '8%', title: '鏁伴噺', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: 'sl',
+ width: '12%',
+ title: '宸查噰璐暟閲�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: 'je', width: '8%', title: '閲戦', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: 'je',
+ width: '12%',
+ title: '涓嶅惈绋庨噾棰�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: '6', width: '8%', title: '绋庣巼', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'sl', width: '8%', title: '搴撳瓨', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'yl', width: '10%', title: '鍛ㄧ敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'yl', width: '10%', title: '鏈堢敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: 'cgzt',
+ width: '10%',
+ title: '鍗曟嵁鐘舵��',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'xsdh',
+ width: '10%',
+ title: '閿�鍞崟鍙�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'rq',
+ width: '10%',
+ title: '鍒跺崟鏃ユ湡',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
{field: '6', width: '10%', title: '鍒跺崟浜�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '10%',title: '閲囪喘閮ㄩ棬', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '10%',title: '閲囪喘缁勭粐', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '10%',title: '澶囨敞', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
+ {
+ field: '6',
+ width: '10%',
+ title: '閲囪喘閮ㄩ棬',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: '6',
+ width: '10%',
+ title: '閲囪喘缁勭粐',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: '6', width: '10%', title: '澶囨敞', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
],//琛ㄥご鍙傛暟
toolbarConfig: {
- buttons: [{type:'text'},{
- 'name': '閫�璐ц褰�',
+ buttons: [{type: 'text'}, {
+ 'name': '閫�璐ц褰�',
- 'code':'Log'
- },
+ 'code': 'Log'
+ },
{
'name': '纭閫�璐�',
- status:'primary',
- 'code':'Sure'
+ status: 'primary',
+ 'code': 'Sure'
}],
import: false,
export: true,
@@ -352,65 +429,52 @@
//璇︽儏妗� 閮ㄥ垎2
-const showCGDH =ref();
-const showDetails =ref(false);
-let detailData =[];
+const showCGDH = ref();
+const showDetails = ref(false);
+let detailData = [];
const cellClickEvent = ({row}) => {
- detailData = ['cgdh', 'thdh', 'h', 'xh', 'wlbh', 'wlmc', 'gys','w','g','dw','cgzt','rq','yl','sl','xsdh','je','6'].map(field => {
- return { label: ModelColumnContent(field) , value: row[field] }
+ if (isQueryColumnId === false) {
+ queryColumnId();
+ }
+ detailData = list.map(field => {
+ return {label: queryColumnsTitle(field), value: row[field]}
})
showDetails.value = true;
showCGDH.value = row['cgdh'];
}
-const ModelColumnContent = (text) => {
- switch (text) {
- case 'cgdh':
- return "閲囪喘鍗曞彿";
- case 'thdh':
- return "閫�璐у崟鍙�";
- case 'h':
- return "鍘�";
- case 'xh':
- return "鍨嬪彿";
- case 'wlbh':
- return "鐗╂枡缂栫爜";
- case 'wlmc':
- return "鐗╂枡鍚嶇О";
- case 'gys':
- return "渚涘簲鍟�";
- case 'w':
- return "瀹�";
- case 'g':
- return "楂�";
- case 'dw':
- return "鍗曚綅";
- case 'cgzt':
- return "閲囪喘鐘舵��";
- case 'rq':
- return "鏃ユ湡";
- case 'yl':
- return "浣欓噺";
- case 'sl':
- return "鏁伴噺";
- case 'xsdh':
- return "閿�鍞崟鍙�";
- case 'je':
- return "閲戦";
- case '6':
- return "鍏朵粬";
+//鑾峰彇琛ㄥ垪
+let list = [];
+let columnIndex = 4;//鍒楁爣澶翠粠绗嚑鍒楀紑濮嬬殑
+let isQueryColumnId = false;
+const queryColumnId = () => {
- default:
- return text;
-
+ while (columnIndex < gridOptions.columns.length) {
+ list.push(gridOptions.columns[columnIndex].field);
+ columnIndex++;
}
-
+ isQueryColumnId = true;
+ return list;
}
-const SureReturn=()=>{
+//鑾峰彇琛ㄥ垪鍚�
+function queryColumnsTitle(cn) {
+ let i = 0;
+ while (i < gridOptions.columns.length + 1) {
+ if (gridOptions.columns[i].field === cn) {
+ return gridOptions.columns[i].title;
+ }
+ i++;
+ }
+}
- const type = VXETable.modal.confirm('鏄惁纭閫�璐э紵');
+// 璇︽儏妗嗛儴鍒�2 缁撴潫
+
+const SureReturn = () => {
+
+ MessageConfirmShow('閫�璐�', '鏄惁纭閫�璐э紵')
+
}
//璇︽儏妗� 閮ㄥ垎2 缁撴潫
@@ -450,12 +514,80 @@
},
]
+
+//椤甸潰閫昏緫浠g爜鎵ц
+function logicExecute(type) {
+ const $grid = xGrid.value
+ switch (type) {
+ case '纭畾':
+ //澶氶�夐��璐ч�昏緫浠g爜TODO
+ MessageShow('鎿嶄綔鎴愬姛锛�', 'success');
+ break;
+ case '閫�璐�':
+ //鍗曢��璐ч�昏緫浠g爜TODO
+ MessageShow('鎿嶄綔鎴愬姛锛�', 'success');
+ break;
+ default:
+ MessageShow('鏈煡鎿嶄綔锛�', 'error');
+ break;
+ }
+ return true;
+}
+
+
+//鎻愮ず淇℃伅
+//淇℃伅鍐呭锛屾樉绀烘柟寮忥紝鏄剧ず鏍囬锛岀被鍨�
+const MessageShow = (content, type = 'success') => {
+ ElMessage({
+ message: content,
+ type: type,
+ showClose: true,
+ })
+}
+
+//鎿嶄綔纭绫讳俊鎭細鎿嶄綔绫诲瀷锛屾彁绀哄唴瀹癸紝鎻愮ず鏍囧ご锛屾彁绀虹被鍨�
+const MessageConfirmShow = (czType, content, title = '鎿嶄綔纭鎻愮ず', type = 'warning') => {
+ ElMessageBox.confirm(
+ content,
+ title,
+ {
+ cancelButtonText: '鍙栨秷',
+ confirmButtonText: '纭畾',
+ type: type,
+ center: true,
+ }
+ )
+ //鐐瑰嚮浜嗙‘瀹�
+ .then(() => {
+
+ logicExecute(czType);
+
+ return true;
+ })
+ //鐐瑰嚮浜嗗彇娑�
+ .catch(() => {
+ return false;
+ })
+}
+
+//寮圭獥淇℃伅
+const MessageAlertShow = (content, title, type = 'info') => {
+
+ ElMessageBox.alert(content, title, {
+ // 绂佹鑷姩瀵圭劍
+ //autofocus: false,
+ confirmButtonText: 'OK',
+ /*callback: (action: Action) => {
+ MessageShow(`action: ${action}`,type)
+ },*/
+ })
+}
+
</script>
<style scoped>
-:deep(.v-column-label div span){
+:deep(.v-column-label div span) {
font-weight: bold;
- font-align:center;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Select.vue b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Select.vue
index 11161c1..29b29e8 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Select.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Select.vue
@@ -28,24 +28,24 @@
</el-col>
</el-row>
</el-header>
+
<el-main style="padding-top: 5px;height:100%">
<vxe-grid
-
max-height="600"
@filter-change="filterChanged"
class="mytable-scrollbar"
ref="xGrid"
v-bind="gridOptions"
v-on="gridEvents"
+ @cell-dblclick="cellClickEvent"
>
- <!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
@@ -53,8 +53,8 @@
<!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
<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>-->
-<!-- <el-button @click="cellClickEvent" link type="primary" size="small">璇︽儏</el-button>-->
+ <!-- <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">鍒犻櫎</el-button>-->
+ <!-- <el-button @click="cellClickEvent" link type="primary" size="small">璇︽儏</el-button>-->
</template>
@@ -67,23 +67,49 @@
</template>
</vxe-grid>
+ <!-- 璇︽儏妗� 閮ㄥ垎1-->
+ <vxe-modal v-model="showDetails" title="鏌ョ湅璇︽儏" width="600" height="80%" :mask="false" :lock-view="false"
+ resize>
+ <el-container>
+ <el-header height="35px"
+ style="margin: 0;padding: 0">
- <vxe-modal v-model="showDetails" title="鏌ョ湅璇︽儏" width="600" height="400" :mask="false" :lock-view="false" resize>
- <template #default>
- <vxe-table
- border="inner"
- auto-resize
- show-overflow
- height="auto"
- :row-config="{isHover: true}"
- :show-header="false"
- :sync-resize="showDetails"
- :data="detailData">
- <vxe-column field="label" width="40%"></vxe-column>
- <vxe-column field="value"></vxe-column>
- </vxe-table>
- </template>
+ <el-input v-model="showCGDH" placeholder="閲囪喘鍗曞彿" disabled>
+ <template #prepend>閲囪喘鍗曞彿锛�</template>
+ </el-input>
+ </el-header>
+ <el-main>
+ <template #default>
+ <vxe-table
+ border="inner"
+ auto-resize
+ show-overflow
+ max-height="400"
+ :row-config="{isHover: true}"
+ :show-header="false"
+ :sync-resize="showDetails"
+ :data="detailData">
+ <vxe-column field="label" width="30%" class-name="v-column-label"></vxe-column>
+ <vxe-column field="value"></vxe-column>
+ </vxe-table>
+ </template>
+ </el-main>
+ <el-footer height="40px">
+ <el-row>
+ <el-col :offset="20" :span="4">
+ <el-button
+ id="Sure"
+ type="primary"
+ @click="logicExecute('缂栬緫')"
+ >缂栬緫
+ </el-button>
+ </el-col>
+
+ </el-row>
+ </el-footer>
+ </el-container>
</vxe-modal>
+ <!-- 璇︽儏妗� 閮ㄥ垎1 缁撴潫-->
</el-main>
@@ -97,7 +123,9 @@
import {useRouter} from 'vue-router'
import {Search} from "@element-plus/icons-vue";
import dayjs from "dayjs";
-import {VXETable} from "vxe-table";
+import {ElMessage} from "element-plus";
+
+
let router = useRouter()
const getTableRow = (row, type) => {
@@ -110,8 +138,7 @@
case 'delete': {
-
- alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅'+row.id)
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅' + row.id)
break
}
}
@@ -128,7 +155,8 @@
break
}
case 'AddNo': {//鏃犲崟鏂板
- openAlert({type: 'alert', content: '鐐瑰嚮浜嗘棤鍗曟柊澧�', status: 'success'})
+
+ MessageShow('鐐瑰嚮浜嗘棤鍗曟柊澧�', 'success');
break
}
@@ -148,36 +176,19 @@
},
}
-const openAlert = (options) => {
- if(options.type==='message'){
- VXETable.modal.message(options)
- }else{
- VXETable.modal.alert(options)
- }
-
-}
-const closeAlert = (id) => {
- VXETable.modal.close(id)
-}
-
-const confirmEvent = async () => {
- const type = await VXETable.modal.confirm('鎮ㄧ‘瀹氳鍒犻櫎鍚楋紵')
- VXETable.modal.message({ content: `鐐瑰嚮浜� ${type}` })
-}
-
-const BtnSearchPurchaseOrder =()=>{
+const BtnSearchPurchaseOrder = () => {
for (let i = 1; i < 6; i++) {
const randomInt = Math.floor(Math.random() * 999) + 1000;//4浣嶆暟闅忔満鏁�
const randomSumInt = Math.floor(Math.random() * 99) + 10;//2浣嶆暟闅忔満鏁�
const randomOrderInt = Math.floor(Math.random() * 99) + 100;//3浣嶆暟闅忔満鏁�
const t = i % 2 === 0 ? 5 : 6;
- const s = i % 2 === 0 ? '鍏ュ簱':i % 3 === 0 ? '寰呭鏍�' : i % 5 === 0 ? '宸查噰璐�' :'閫�搴�';
+ const s = i % 2 === 0 ? '鍏ュ簱' : i % 3 === 0 ? '寰呭鏍�' : i % 5 === 0 ? '宸查噰璐�' : '閫�搴�';
const CGNo = 'NGCG231200' + randomOrderInt;//閲囪喘缂栧彿
const wlNo = 'NGWL1000' + randomInt;
const xh = 'NGXH' + randomSumInt;
const wlmc = 'WLMC' + randomInt;
const gys = '渚涘簲鍟�' + randomSumInt;
- const xhdh='NG231200'+randomOrderInt;
+ const xhdh = 'NG231200' + randomOrderInt;
const w = i % 2 === 0 ? '3300' : i % 3 === 0 ? '3660' : i % 4 === 0 ? '2250' : '2580';
const h = i % 2 === 0 ? '2440' : i % 3 === 0 ? '2440' : i % 4 === 0 ? '2000' : '2300';
const dw = i % 2 === 0 ? '鐗�' : i % 3 === 0 ? '骞崇背' : i % 4 === 0 ? '鍖�' : '鍚�';
@@ -192,12 +203,12 @@
w: w,
g: h,
dw: dw,
- cgzt:s,
- rq:dayjs(now).format('YYYY-MM-DD'),
- yl:randomSumInt,
- sl:randomOrderInt,
- xsdh:xhdh,
- je:randomInt,
+ cgzt: s,
+ rq: dayjs(now).format('YYYY-MM-DD'),
+ yl: randomSumInt,
+ sl: randomOrderInt,
+ xsdh: xhdh,
+ je: randomInt,
6: '139xxxxxxxx',
})
@@ -205,6 +216,26 @@
}
+
+//椤甸潰閫昏緫浠g爜鎵ц
+function logicExecute(type) {
+ const $grid = xGrid.value
+ switch (type) {
+ case '缂栬緫':
+ //MessageShow('鎿嶄綔鎴愬姛锛�', 'success');
+ //缂栬緫閫昏緫浠g爜TODO
+ router.push({path: '/main/purchaseOrder/CreatePurchaseOrder'})
+ break;
+ case '閫�璐�':
+ //鍗曢��璐ч�昏緫浠g爜TODO
+ MessageShow('鎿嶄綔鎴愬姛锛�', 'success');
+ break;
+ default:
+ MessageShow('鏈煡鎿嶄綔锛�', 'error');
+ break;
+ }
+ return true;
+}
//缁勪欢鎺ユ敹鍙傛暟
@@ -237,36 +268,122 @@
showStatus: true
},
columns: [
+ {type: 'expand', title: '', fixed: "left", slots: {content: 'content'}, width: 50},//璇︽儏
{title: '鎿嶄綔', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},
+ /* {type: 'checkbox',fixed:"left", title: '', width: 50 },*/
{type: 'seq', fixed: "left", title: ' ', width: 50},
- { type: 'checkbox',fixed:"left", title: '', width: 50 },
- {type: 'expand', title:'璇︽儏', fixed: "left", slots: {content: 'content'}, width: 50},
- {field: 'cgdh', width: '10%', title: '閲囪喘鍗曞彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+
+
+ {
+ field: 'cgdh',
+ width: '10%',
+ title: '閲囪喘鍗曞彿',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
{field: 'cgzt', width: '10%', title: '鐘舵��', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'gys', width: '10%',title: '渚涘簲鍟�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'wlbh', width: '10%',title: '鐗╂枡缂栧彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'wlmc', width: '10%', title: '鐗╂枡鍚嶇О', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'w', width: '8%',title: '瀹藉害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'g', width: '8%',title: '楂樺害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'h', width: '8%',title: '鍘氬害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'xh', width: '8%',title: '鍨嬪彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'dw', width: '8%',title: '鍗曚綅', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '12%',title: '涓嶅惈绋庡崟浠�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'sl', width: '8%',title: '鏁伴噺', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'sl', width: '12%',title: '宸查噰璐暟閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'je', width: '8%',title: '閲戦', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'je', width: '12%',title: '涓嶅惈绋庨噾棰�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '8%',title: '绋庣巼', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'sl', width: '8%',title: '搴撳瓨', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'yl', width: '10%',title: '鍛ㄧ敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'yl', width: '10%',title: '鏈堢敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'cgzt', width: '10%',title: '鍗曟嵁鐘舵��', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'xsdh', width: '10%',title: '閿�鍞崟鍙�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'rq', width: '10%',title: '鍒跺崟鏃ユ湡', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: 'gys',
+ width: '10%',
+ title: '渚涘簲鍟�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'wlbh',
+ width: '10%',
+ title: '鐗╂枡缂栧彿',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'wlmc',
+ width: '10%',
+ title: '鐗╂枡鍚嶇О',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: 'w', width: '8%', title: '瀹藉害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'g', width: '8%', title: '楂樺害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'h', width: '8%', title: '鍘氬害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'xh', width: '8%', title: '鍨嬪彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'dw', width: '8%', title: '鍗曚綅', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: '6',
+ width: '12%',
+ title: '涓嶅惈绋庡崟浠�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: 'sl', width: '8%', title: '鏁伴噺', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: 'sl',
+ width: '12%',
+ title: '宸查噰璐暟閲�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: 'je', width: '8%', title: '閲戦', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: 'je',
+ width: '12%',
+ title: '涓嶅惈绋庨噾棰�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: '6', width: '8%', title: '绋庣巼', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'sl', width: '8%', title: '搴撳瓨', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'yl', width: '10%', title: '鍛ㄧ敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'yl', width: '10%', title: '鏈堢敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: 'cgzt',
+ width: '10%',
+ title: '鍗曟嵁鐘舵��',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'xsdh',
+ width: '10%',
+ title: '閿�鍞崟鍙�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'rq',
+ width: '10%',
+ title: '鍒跺崟鏃ユ湡',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
{field: '6', width: '10%', title: '鍒跺崟浜�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '10%',title: '閲囪喘閮ㄩ棬', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '10%',title: '閲囪喘缁勭粐', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '10%',title: '澶囨敞', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
+ {
+ field: '6',
+ width: '10%',
+ title: '閲囪喘閮ㄩ棬',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: '6',
+ width: '10%',
+ title: '閲囪喘缁勭粐',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: '6', width: '10%', title: '澶囨敞', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
],//琛ㄥご鍙傛暟
toolbarConfig: {
buttons: [/*{type:'text'},
@@ -281,7 +398,7 @@
'code':'AddNo'
}*/
- ],
+ ],
import: false,
export: true,
print: true,
@@ -309,14 +426,47 @@
})
-/*const showDetails = ref(false)
-const detailData = ref([])
-const cellClickEvent = ({ row }) => {
- detailData.value = ['閲囪喘鍗曞彿', 'wlbh', 'wlmc', 'gys', 'h', 'k', 'g'].map(field => {
- return { label: field, value: row[field] }
+//璇︽儏妗� 閮ㄥ垎2
+const showCGDH = ref();
+const showDetails = ref(false);
+let detailData = [];
+const cellClickEvent = ({row}) => {
+ if(isQueryColumnId===false){
+ queryColumnId();
+ }
+
+ detailData = list.map(field => {
+ return {label: queryColumnsTitle(field), value: row[field]}
})
- showDetails.value = true
-}*/
+
+ showDetails.value = true;
+ showCGDH.value = row['cgdh'];
+}
+
+//鑾峰彇琛ㄥ垪
+let list = [];
+let columnIndex = 3;//鍒楁爣澶翠粠绗嚑鍒楀紑濮嬬殑
+let isQueryColumnId = false;
+const queryColumnId = () => {
+ while (columnIndex < gridOptions.columns.length) {
+ list.push(gridOptions.columns[columnIndex].field);
+ columnIndex++;
+ }
+ isQueryColumnId = true;
+ return list;
+}
+
+//鑾峰彇琛ㄥ垪鍚�
+function queryColumnsTitle(cn) {
+ let i = 0;
+ while (i < gridOptions.columns.length + 1) {
+ if (gridOptions.columns[i].field === cn) {
+ return gridOptions.columns[i].title;
+ }
+ i++;
+ }
+}
+//璇︽儏妗� 閮ㄥ垎2 缁撴潫
const now = new Date()
@@ -353,9 +503,60 @@
},
]
+
+//鎻愮ず淇℃伅
+//淇℃伅鍐呭锛屾樉绀烘柟寮忥紝鏄剧ず鏍囬锛岀被鍨�
+const MessageShow = (content, type = 'success') => {
+ ElMessage({
+ message: content,
+ type: type,
+ showClose: true,
+ })
+}
+
+//鎿嶄綔纭绫讳俊鎭細鎿嶄綔绫诲瀷锛屾彁绀哄唴瀹癸紝鎻愮ず鏍囧ご锛屾彁绀虹被鍨�
+const MessageConfirmShow = (czType, content, title = '鎿嶄綔纭鎻愮ず', type = 'warning') => {
+ ElMessageBox.confirm(
+ content,
+ title,
+ {
+ cancelButtonText: '鍙栨秷',
+ confirmButtonText: '纭畾',
+ type: type,
+ center: true,
+ }
+ )
+ //鐐瑰嚮浜嗙‘瀹�
+ .then(() => {
+
+ logicExecute(czType);
+
+ return true;
+ })
+ //鐐瑰嚮浜嗗彇娑�
+ .catch(() => {
+ return false;
+ })
+}
+
+//寮圭獥淇℃伅
+const MessageAlertShow = (content, title, type = 'info') => {
+
+ ElMessageBox.alert(content, title, {
+ // 绂佹鑷姩瀵圭劍
+ //autofocus: false,
+ confirmButtonText: 'OK',
+ /*callback: (action: Action) => {
+ MessageShow(`action: ${action}`,type)
+ },*/
+ })
+}
+
</script>
<style scoped>
-
+:deep(.v-column-label div span) {
+ font-weight: bold;
+}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Storage.vue b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Storage.vue
index 2e394f9..0f3b544 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Storage.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Storage.vue
@@ -29,8 +29,6 @@
</el-row>
-
-
</el-header>
<el-main style="padding-top: 5px;height:100%">
<vxe-grid
@@ -42,16 +40,16 @@
v-bind="gridOptions"
v-on="gridEvents"
- @cell-click ="cellClickEvent"
+ @cell-dblclick="cellClickEvent"
+
>
- <!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <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 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>
@@ -74,13 +72,14 @@
</template>
</vxe-grid>
-<!-- 璇︽儏妗� 閮ㄥ垎1-->
- <vxe-modal v-model="showDetails" title="鏌ョ湅璇︽儏" width="600" height="80%" :mask="false" :lock-view="false" resize>
- <el-container >
+ <!-- 璇︽儏妗� 閮ㄥ垎1-->
+ <vxe-modal v-model="showDetails" title="鏌ョ湅璇︽儏" width="600" height="80%" :mask="false" :lock-view="false"
+ resize>
+ <el-container>
<el-header height="35px"
- style="margin: 0;padding: 0">
+ style="margin: 0;padding: 0">
- <el-input v-model="showCGDH" placeholder="閲囪喘鍗曞彿" disabled >
+ <el-input v-model="showCGDH" placeholder="閲囪喘鍗曞彿" disabled>
<template #prepend>閲囪喘鍗曞彿锛�</template>
</el-input>
</el-header>
@@ -90,7 +89,7 @@
border="inner"
auto-resize
show-overflow
- max-height="420"
+ max-height="400"
:row-config="{isHover: true}"
:show-header="false"
:sync-resize="showDetails"
@@ -122,8 +121,6 @@
</el-container>
-
-
</template>
@@ -134,27 +131,29 @@
import {Search} from "@element-plus/icons-vue";
import dayjs from "dayjs";
import {VXETable} from "vxe-table";
-let router = useRouter()
+import {ElMessage, ElMessageBox} from "element-plus";
+import ERPMessage from '@/components/basic/ERPMessage.vue'
+let router = useRouter()
const getTableRow = (row, type) => {
switch (type) {
case 'edit' : {
//alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
- router.push({path: '/main/purchaseOrder/CreatePurchaseOrder', query: {id: row.id}});
+ router.push({path: '/main/purchaseOrder/DetailsPurchaseOrder', query: {id: row.id}});
break
}
- case 'look':{
+ case 'look': {
/*this.detailData = ['name', 'nickname', 'role', 'sex', 'age', 'amount', 'address'].map(field => {
return { label: field, value: row[field] }
})*/
//this.showDetails = true
-break
+ break
}
case 'delete': {
- alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅'+row.id)
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅' + row.id)
break
}
}
@@ -166,22 +165,24 @@
const $grid = xGrid.value
if ($grid) {
switch (code) {
- case 'Sure':{
+ case 'Sure': {
if ($grid.getCheckboxRecords().length === 0) {
- openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
+ MessageShow('璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', 'warning');
+ //openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
//VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
return
} else {
- const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭閫�璐э紵');
+ const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭鍏ュ簱锛�');
//openAlert({type:'alert', content: '鎴愬姛鍏ュ簱'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
//VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
return
}
break
}
- case 'Log':{
+ case 'Log': {
- openAlert({type: 'alert', content: '鐐瑰嚮浜嗛��璐ц褰�', status: 'success'})
+ //openAlert({type: 'alert', content: '鐐瑰嚮浜嗛��璐ц褰�', status: 'success'})
+ MessageConfirmShow("閫�璐ц褰�", "鐐瑰嚮浜嗛��璐ц褰�", "", 'success')
break
}
}
@@ -201,9 +202,9 @@
}
const openAlert = (options) => {
- if(options.type==='message'){
+ if (options.type === 'message') {
VXETable.modal.message(options)
- }else{
+ } else {
VXETable.modal.alert(options)
}
@@ -212,32 +213,32 @@
VXETable.modal.close(id)
}
-const confirmEvent = async () => {
- const type = await VXETable.modal.confirm('鎮ㄧ‘瀹氳鍒犻櫎鍚楋紵')
- VXETable.modal.message({ content: `鐐瑰嚮浜� ${type}` })
-}
-const BtnSearchPurchaseOrder =()=>{
+//鏌ヨ璋冪敤浜嬩欢
+const BtnSearchPurchaseOrder = () => {
+ //寮�濮嬫椂闂达紝缁撴潫鏃堕棿鑾峰彇
+ //MessageShow(datevalue._rawValue[0]+"\r\n鏃堕棿2\r\n"+datevalue._rawValue[1]);
+
for (let i = 1; i < 6; i++) {
const randomInt = Math.floor(Math.random() * 999) + 1000;//4浣嶆暟闅忔満鏁�
const randomSumInt = Math.floor(Math.random() * 99) + 10;//2浣嶆暟闅忔満鏁�
const randomOrderInt = Math.floor(Math.random() * 99) + 100;//3浣嶆暟闅忔満鏁�
const t = i % 2 === 0 ? 5 : 6;
- const s = i % 2 === 0 ? '鍏ュ簱':i % 3 === 0 ? '寰呭鏍�' : '宸查噰璐�';
- const rkdh = i % 2 === 0 ? 'RKID'+randomOrderInt:i % 3 === 0 ? '' : '';
+ const s = i % 2 === 0 ? '鍏ュ簱' : i % 3 === 0 ? '寰呭鏍�' : '宸查噰璐�';
+ const rkdh = i % 2 === 0 ? 'RKID' + randomOrderInt : i % 3 === 0 ? '' : '';
const CGNo = 'NGCG231200' + randomOrderInt;//閲囪喘缂栧彿
const wlNo = 'NGWL1000' + randomInt;
const xh = 'NGXH' + randomSumInt;
const wlmc = 'WLMC' + randomInt;
const gys = '渚涘簲鍟�' + randomSumInt;
- const xhdh='NG231200'+randomOrderInt;
+ const xhdh = 'NG231200' + randomOrderInt;
const w = i % 2 === 0 ? '3300' : i % 3 === 0 ? '3660' : i % 4 === 0 ? '2250' : '2580';
const h = i % 2 === 0 ? '2440' : i % 3 === 0 ? '2440' : i % 4 === 0 ? '2000' : '2300';
const dw = i % 2 === 0 ? '鐗�' : i % 3 === 0 ? '骞崇背' : i % 4 === 0 ? '鍖�' : '鍚�';
now.setDate(now.getDate() + 1);
gridOptions.data.push({
cgdh: CGNo,
- rkdh:rkdh,
+ rkdh: rkdh,
h: t,
xh: xh,
wlbh: wlNo,
@@ -246,19 +247,18 @@
w: w,
g: h,
dw: dw,
- cgzt:s,
- rq:dayjs(now).format('YYYY-MM-DD'),
- yl:randomSumInt,
- sl:randomOrderInt,
- xsdh:xhdh,
- je:randomInt,
+ cgzt: s,
+ rq: dayjs(now).format('YYYY-MM-DD'),
+ yl: randomSumInt,
+ sl: randomOrderInt,
+ xsdh: xhdh,
+ je: randomInt,
6: '139xxxxxxxx',
})
}
}
-
//缁勪欢鎺ユ敹鍙傛暟
@@ -292,48 +292,141 @@
showStatus: true
},
columns: [
+ {type: 'expand', title: '', fixed: "left", slots: {content: 'content'}, width: 50},//璇︽儏
{title: '鎿嶄綔', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},
+ {type: 'checkbox', fixed: "left", title: '', width: 50},
{type: 'seq', fixed: "left", title: ' ', width: 50},
- { type: 'checkbox',fixed:"left", title: '', width: 50 },
- {type: 'expand', title:'璇︽儏', fixed: "left", slots: {content: 'content'}, width: 50},
- {field: 'rkdh', width: '10%', title: '鍏ュ簱鍗曞彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'cgdh', width: '10%', title: '閲囪喘鍗曞彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+
+
+ {
+ field: 'rkdh',
+ width: '10%',
+ title: '鍏ュ簱鍗曞彿',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'cgdh',
+ width: '10%',
+ title: '閲囪喘鍗曞彿',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
{field: 'cgzt', width: '10%', title: '鐘舵��', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'gys', width: '10%',title: '渚涘簲鍟�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'wlbh', width: '10%',title: '鐗╂枡缂栧彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'wlmc', width: '10%', title: '鐗╂枡鍚嶇О', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'w', width: '8%',title: '瀹藉害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'g', width: '8%',title: '楂樺害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'h', width: '8%',title: '鍘氬害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'xh', width: '8%',title: '鍨嬪彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'dw', width: '8%',title: '鍗曚綅', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '12%',title: '涓嶅惈绋庡崟浠�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'sl', width: '8%',title: '鏁伴噺', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'sl', width: '12%',title: '宸查噰璐暟閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'je', width: '8%',title: '閲戦', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'je', width: '12%',title: '涓嶅惈绋庨噾棰�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '8%',title: '绋庣巼', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'sl', width: '8%',title: '搴撳瓨', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'yl', width: '10%',title: '鍛ㄧ敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'yl', width: '10%',title: '鏈堢敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'cgzt', width: '10%',title: '鍗曟嵁鐘舵��', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'xsdh', width: '10%',title: '閿�鍞崟鍙�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'rq', width: '10%',title: '鍒跺崟鏃ユ湡', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: 'gys',
+ width: '10%',
+ title: '渚涘簲鍟�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'wlbh',
+ width: '10%',
+ title: '鐗╂枡缂栧彿',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'wlmc',
+ width: '10%',
+ title: '鐗╂枡鍚嶇О',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: 'w', width: '8%', title: '瀹藉害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'g', width: '8%', title: '楂樺害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'h', width: '8%', title: '鍘氬害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'xh', width: '8%', title: '鍨嬪彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'dw', width: '8%', title: '鍗曚綅', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: '6',
+ width: '12%',
+ title: '涓嶅惈绋庡崟浠�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: 'sl', width: '8%', title: '鏁伴噺', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: 'sl',
+ width: '12%',
+ title: '宸查噰璐暟閲�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: 'je', width: '8%', title: '閲戦', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: 'je',
+ width: '12%',
+ title: '涓嶅惈绋庨噾棰�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: '6', width: '8%', title: '绋庣巼', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'sl', width: '8%', title: '搴撳瓨', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'yl', width: '10%', title: '鍛ㄧ敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'yl', width: '10%', title: '鏈堢敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: 'cgzt',
+ width: '10%',
+ title: '鍗曟嵁鐘舵��',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'xsdh',
+ width: '10%',
+ title: '閿�鍞崟鍙�',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'rq',
+ width: '10%',
+ title: '鍒跺崟鏃ユ湡',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
{field: '6', width: '10%', title: '鍒跺崟浜�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '10%',title: '閲囪喘閮ㄩ棬', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '10%',title: '閲囪喘缁勭粐', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: '6', width: '10%',title: '澶囨敞', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
+ {
+ field: '6',
+ width: '10%',
+ title: '閲囪喘閮ㄩ棬',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: '7',
+ width: '10%',
+ title: '閲囪喘缁勭粐',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {field: '8', width: '10%', title: '澶囨敞', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
],//琛ㄥご鍙傛暟
toolbarConfig: {
- buttons: [{type:'text'/*,name:'璁㈠崟鍏ュ簱'*/},{
+ buttons: [{type: 'text'/*,name:'璁㈠崟鍏ュ簱'*/}, {
'name': '鍏ュ簱璁板綍',
- 'code':'Log'
+ 'code': 'Log'
},
{
'name': '纭鍏ュ簱',
- status:'primary',
- 'code':'Sure'
+ status: 'primary',
+ 'code': 'Sure'
}],
import: false,
export: true,
@@ -362,70 +455,56 @@
})
-const showCGDH = ref();
+
//璇︽儏妗� 閮ㄥ垎2
-const showDetails =ref(false);
-let detailData =[];
+const showCGDH = ref();
+const showDetails = ref(false);
+let detailData = [];
const cellClickEvent = ({row}) => {
- detailData = ['cgdh', 'rkdh', 'h', 'xh', 'wlbh', 'wlmc', 'gys','w','g','dw','cgzt','rq','yl','sl','xsdh','je','6'].map(field => {
- return { label: ModelColumnContent(field) , value: row[field] }
- })
+ if(isQueryColumnId===false){
+ queryColumnId();
+ }
+
+ detailData = list.map(field => {
+ return {label: queryColumnsTitle(field), value: row[field]}
+ })
showDetails.value = true;
showCGDH.value = row['cgdh'];
}
-const ModelColumnContent = (text) => {
- switch (text) {
- case 'cgdh':
- return "閲囪喘鍗曞彿";
- case 'rkdh':
- return "鍏ュ簱鍗曞彿";
- case 'h':
- return "鍘�";
- case 'xh':
- return "鍨嬪彿";
- case 'wlbh':
- return "鐗╂枡缂栫爜";
- case 'wlmc':
- return "鐗╂枡鍚嶇О";
- case 'gys':
- return "渚涘簲鍟�";
- case 'w':
- return "瀹�";
- case 'g':
- return "楂�";
- case 'dw':
- return "鍗曚綅";
- case 'cgzt':
- return "閲囪喘鐘舵��";
- case 'rq':
- return "鏃ユ湡";
- case 'yl':
- return "浣欓噺";
- case 'sl':
- return "鏁伴噺";
- case 'xsdh':
- return "閿�鍞崟鍙�";
- case 'je':
- return "閲戦";
- case '6':
- return "鍏朵粬";
-
- default:
- return text;
-
+//鑾峰彇琛ㄥ垪
+let list = [];
+let columnIndex = 4;//鍒楁爣澶翠粠绗嚑鍒楀紑濮嬬殑
+let isQueryColumnId = false;
+const queryColumnId = () => {
+ while (columnIndex < gridOptions.columns.length) {
+ list.push(gridOptions.columns[columnIndex].field);
+ columnIndex++;
}
+ isQueryColumnId = true;
+ return list;
+}
+//鑾峰彇琛ㄥ垪鍚�
+function queryColumnsTitle(cn) {
+ let i = 0;
+ while (i < gridOptions.columns.length + 1) {
+ if (gridOptions.columns[i].field === cn) {
+ return gridOptions.columns[i].title;
+ }
+ i++;
+ }
}
//璇︽儏妗� 閮ㄥ垎2 缁撴潫
-const SureStorage=()=>{
- openAlert({type: 'alert', content: '纭鍏ュ簱鎴愬姛', status: 'success'})
+const SureStorage = () => {
+ MessageShow('纭鍏ュ簱鎴愬姛');
}
+
const now = new Date()
@@ -461,15 +540,65 @@
},
]
+
+//椤甸潰閫昏緫浠g爜鎵ц
+function logicExecute(type) {
+ const $grid = xGrid.value
+ switch (type) {
+ case '鍏ュ簱':
+ //鍏ュ簱閫昏緫浠g爜TODO
+ MessageShow('鍏ュ簱鎴愬姛锛�', 'success');
+ break;
+ case '閫�璐�':
+ //閫�璐ч�昏緫浠g爜TODO
+ MessageShow('閫�璐ф垚鍔燂紒', 'success');
+ break;
+ default:
+ MessageShow('鏈煡鎿嶄綔锛�', 'error');
+ break;
+ }
+ return true;
+}
+
+//鎻愮ず淇℃伅
+const MessageShow = (content, type = 'success') => {
+ ElMessage({
+ message: content,
+ type: type,
+ showClose: true,
+ })
+}
+
+//鎿嶄綔纭绫讳俊鎭細鎿嶄綔绫诲瀷锛屾彁绀哄唴瀹癸紝鎻愮ず鏍囧ご锛屾彁绀虹被鍨�
+const MessageConfirmShow = (czType, content, title = '鎿嶄綔纭鎻愮ず', type = 'warning') => {
+ ElMessageBox.confirm(
+ content,
+ title,
+ {
+ cancelButtonText: '鍙栨秷',
+ confirmButtonText: '纭畾',
+ type: type,
+ center: true,
+ }
+ )
+ //鐐瑰嚮浜嗙‘瀹�
+ .then(() => {
+ return logicExecute(czType);
+
+ })
+ //鐐瑰嚮浜嗗彇娑�
+ .catch(() => {
+ return false;
+ })
+}
+
</script>
<style scoped>
-:deep(.v-column-label div span){
+:deep(.v-column-label div span) {
font-weight: bold;
}
-
-
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockReport.vue b/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockReport.vue
index 845b896..851d811 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockReport.vue
@@ -10,11 +10,11 @@
:to="{path:'/main/stockReport/StockWarehouseReport'}">鎴愬搧鎶ヨ〃
</el-breadcrumb-item>
<el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''"
- :to="{path:'/main/stockReport/StockMonthReport'}">鍘熺墖鏈堢粨
+ :to="{path:'/main/stockReport/StockMonthReport'}">鍘熺墖鏈堢粨鎶ヨ〃
</el-breadcrumb-item>
<el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''"
:to="{path:'/main/stockReport/SubsidiaryMonthReport'}">
- 杈呮枡鏈堢粨
+ 杈呮枡鏈堢粨鎶ヨ〃
</el-breadcrumb-item>
<el-breadcrumb-item style="display: none"></el-breadcrumb-item>
</el-breadcrumb>
--
Gitblit v1.8.0