From 41839ab44e27a646bbdb8359a6fb02130129f853 Mon Sep 17 00:00:00 2001
From: 陈婷婷 <506607603@qq.com>
Date: 星期三, 17 十二月 2025 08:53:26 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI
---
src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue | 97
src/views/component/BarCodeDetail/index.vue | 34
src/views/component/CurrencyDialog/index.vue | 1408 ++++--
src/views/basic/gyStockPlace/gyStockPlace.vue | 69
src/views/KCGL/OtherOutBill/Kf_OtherOutBillEdit.vue | 27
src/views/gyMaterial/GyMaterialCorrection.vue | 130
src/views/component/HSourceReportHtml/index.vue | 2
public/static/grf/物料条码_old.grf | 93
src/views/component/SettleStyleDialog/index.vue | 1448 ++++--
public/static/grf/物料条码.grf | 195
src/views/component/CustomerTypeDialog/index.vue | 132
public/static/grf/库位码.grf | 132
src/views/gyStockPlace/edit/index.vue | 2
src/views/basic/gyCartypelist/gyCartypelist.vue | 6
src/views/FbStepFoldinBillList/fbStepFoldinBillListEdit.vue | 28
src/views/basic/gyProperty/gyPropertyList.vue | 1467 +++++++
src/views/component/printList/barcode.vue | 143
src/views/GyCustomer/CustomerEdit/index.vue | 160
src/views/gyMaterial/edit/index.vue | 2
src/views/FbStepFoldOutBillList/fbStepFoldOutBillListEdit.vue | 28
src/views/FbStepFoldinBillList/EmployeeDialog.vue | 18
src/views/component/printList/hBarPlanPrint.vue | 171
src/store/modules/permission.js | 40
src/views/component/AreaDialog/index.vue | 1324 ++++--
src/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillEdit.vue | 1195 ++++++
src/views/gyEmployee/index.vue | 2
src/router/index.js | 95
src/views/component/PackStockDetail/index.vue | 30
src/views/component/printList/index.vue | 5
src/views/warehouse/transfer/Kf_MoveStockRequestBillList.vue | 2
src/views/GyCustomer/index.vue | 6
src/views/ICMO/ScICMOReportBill/ScICMOReportBillEdit.vue | 10
src/views/gyEmployee/edit/index.vue | 2
src/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillList.vue | 816 ++++
src/views/gyMaterial/GyMaterial.vue | 659 +-
package.json | 1
src/views/FbStepFoldinBillList/SupplierDialog.vue | 22
src/views/gyWarehouse/edit/index.vue | 2
src/views/warehouse/transfer/Kf_MoveStockRequestBillEdit.vue | 1151 +++--
src/App.vue | 1
40 files changed, 8,443 insertions(+), 2,712 deletions(-)
diff --git a/package.json b/package.json
index bb43bd1..1db4057 100644
--- a/package.json
+++ b/package.json
@@ -39,6 +39,7 @@
"jsencrypt": "3.0.0-rc.1",
"moment": "^2.30.1",
"nprogress": "0.2.0",
+ "print-js": "^1.6.0",
"quill": "2.0.2",
"screenfull": "5.0.2",
"sortablejs": "^1.10.2",
diff --git "a/public/static/grf/\345\272\223\344\275\215\347\240\201.grf" "b/public/static/grf/\345\272\223\344\275\215\347\240\201.grf"
new file mode 100644
index 0000000..4881d2d
--- /dev/null
+++ "b/public/static/grf/\345\272\223\344\275\215\347\240\201.grf"
@@ -0,0 +1,132 @@
+锘縶
+ "Version":"6.8.9.5",
+ "Title":"1a.绠�鍗曡〃鏍�",
+ "Author":"閿愭氮鎶ヨ〃杞欢",
+ "Description":"婕旂ず涓�涓渶鍩烘湰鐨勫垪琛ㄦ姤琛ㄣ��",
+ "Font":{
+ "Name":"瀹嬩綋",
+ "Size":90000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "Size":256,
+ "Width":9,
+ "Height":6,
+ "LeftMargin":0,
+ "TopMargin":0,
+ "RightMargin":0,
+ "BottomMargin":0
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "PrintAdaptMethod":"ResizeToFit",
+ "Recordset":{
+ "Field":[
+ {
+ "Name":"鏉$爜缂栧彿1"
+ },
+ {
+ "Name":"鏉$爜缂栧彿2"
+ },
+ {
+ "Name":"浠撲綅鍚嶇О1"
+ },
+ {
+ "Name":"浠撲綅鍚嶇О2"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"鍗曟嵁鍙�",
+ "Width":8.78417
+ }
+ ],
+ "ColumnContent":{
+ "Height":5.60917,
+ "ColumnContentCell":[
+ {
+ "Column":"鍗曟嵁鍙�",
+ "FreeCell":true,
+ "Control":[
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox1",
+ "Left":0.396875,
+ "Top":0.211667,
+ "Width":8.20208,
+ "Height":5.18583
+ },
+ {
+ "Type":"Barcode",
+ "Name":"Barcode1",
+ "Left":-0.370417,
+ "Top":0.79375,
+ "Width":5.52979,
+ "Height":3.59833,
+ "BarcodeType":"QRCode",
+ "CaptionPosition":"None",
+ "Text":"[#鏉$爜缂栧彿1#]"
+ },
+ {
+ "Type":"Barcode",
+ "Name":"Barcode2",
+ "Left":4.04813,
+ "Top":0.79375,
+ "Width":5.13292,
+ "Height":3.59833,
+ "BarcodeType":"QRCode",
+ "CaptionPosition":"None",
+ "Text":"[#鏉$爜缂栧彿2#]"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox1",
+ "Left":0.608542,
+ "Top":4.60375,
+ "Width":3.59833,
+ "Height":0.608542,
+ "TextAlign":"MiddleCenter",
+ "DataField":"浠撲綅鍚嶇О1"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox2",
+ "Left":4.78896,
+ "Top":4.60375,
+ "Width":3.59833,
+ "Height":0.608542,
+ "TextAlign":"MiddleCenter",
+ "DataField":"浠撲綅鍚嶇О2"
+ }
+ ]
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "BackColor":"C0C0C0",
+ "Height":0,
+ "Font":{
+ "Name":"瀹嬩綋",
+ "Size":90000,
+ "Bold":true,
+ "Charset":134
+ },
+ "RepeatStyle":"OnPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"鍗曟嵁鍙�",
+ "BackColor":"FFFFFF",
+ "TextAlign":"MiddleCenter"
+ }
+ ]
+ }
+ },
+ "ReportHeader":[
+ {
+ "Height":0
+ }
+ ]
+}
\ No newline at end of file
diff --git "a/public/static/grf/\347\211\251\346\226\231\346\235\241\347\240\201.grf" "b/public/static/grf/\347\211\251\346\226\231\346\235\241\347\240\201.grf"
index d505d0e..d4213fd 100644
--- "a/public/static/grf/\347\211\251\346\226\231\346\235\241\347\240\201.grf"
+++ "b/public/static/grf/\347\211\251\346\226\231\346\235\241\347\240\201.grf"
@@ -27,17 +27,40 @@
"Field":[
{
"Name":"鏉$爜缂栧彿"
+ },
+ {
+ "Name":"鐗╂枡浠g爜"
+ },
+ {
+ "Name":"瑙勬牸鍨嬪彿"
+ },
+ {
+ "Name":"鐗╂枡鍚嶇О"
+ },
+ {
+ "Name":"渚涘簲鍟�"
+ },
+ {
+ "Name":"鏁伴噺"
+ },
+ {
+ "Name":"鎵瑰彿"
+ },
+ {
+ "Name":"鏉$爜鏃ユ湡",
+ "Type":"DateTime",
+ "Format":"yyyy-MM-dd"
}
]
},
"Column":[
{
"Name":"鍗曟嵁鍙�",
- "Width":8.78417
+ "Width":8.96938
}
],
"ColumnContent":{
- "Height":3.41313,
+ "Height":5.79438,
"ColumnContentCell":[
{
"Column":"鍗曟嵁鍙�",
@@ -52,14 +75,166 @@
"Height":2.98979
},
{
- "Type":"Barcode",
- "Name":"Barcode1",
- "Left":0.211667,
- "Top":0.396875,
- "Width":4.39208,
- "Height":2.59292,
- "BarcodeType":"QRCode",
- "Text":"[#鏉$爜缂栧彿#]"
+ "Type":"FreeGrid",
+ "Name":"FreeGrid1",
+ "Left":0.185208,
+ "Top":0.238125,
+ "Border":{
+ "Styles":"[DrawLeft|DrawTop|DrawRight|DrawBottom]"
+ },
+ "ColumnCount":4,
+ "RowCount":6,
+ "FreeGridColumn":[
+ {
+ "index":1,
+ "Width":1.56104
+ },
+ {
+ "index":2,
+ "Width":3.43958
+ },
+ {
+ "index":3,
+ "Width":1.11125
+ },
+ {
+ "index":4,
+ "Width":2.54
+ }
+ ],
+ "FreeGridRow":[
+ {
+ "index":1,
+ "Height":0.714375
+ },
+ {
+ "index":2,
+ "Height":1.11125
+ },
+ {
+ "index":3,
+ "Height":1.00542
+ },
+ {
+ "index":4,
+ "Height":0.978958
+ },
+ {
+ "index":5,
+ "Height":0.767292
+ },
+ {
+ "index":6,
+ "Height":0.820208
+ }
+ ],
+ "FreeGridCell":[
+ {
+ "row":1,
+ "col":1,
+ "TextAlign":"MiddleCenter",
+ "Text":"鐗╂枡缂栫爜"
+ },
+ {
+ "row":1,
+ "col":2,
+ "Text":"[#鐗╂枡浠g爜#]"
+ },
+ {
+ "row":1,
+ "col":3,
+ "FreeCell":true,
+ "Control":[
+ {
+ "Type":"Barcode",
+ "Name":"Barcode1",
+ "Left":0.211667,
+ "Top":0.211667,
+ "Width":3.20146,
+ "Height":3.99521,
+ "BarcodeType":"QRCode",
+ "Text":"[#鏉$爜缂栧彿#]",
+ "Font":{
+ "Name":"瀹嬩綋",
+ "Size":67500,
+ "Weight":400,
+ "Charset":134
+ }
+ }
+ ],
+ "ColSpan":2,
+ "RowSpan":5
+ },
+ {
+ "row":2,
+ "col":1,
+ "TextAlign":"MiddleCenter",
+ "Text":"瑙勬牸鍨嬪彿"
+ },
+ {
+ "row":2,
+ "col":2,
+ "WordWrap":true,
+ "Text":"[#瑙勬牸鍨嬪彿#]"
+ },
+ {
+ "row":3,
+ "col":1,
+ "TextAlign":"MiddleCenter",
+ "Text":"鐗╂枡鍚嶇О"
+ },
+ {
+ "row":3,
+ "col":2,
+ "WordWrap":true,
+ "Text":"[#鐗╂枡鍚嶇О#]"
+ },
+ {
+ "row":4,
+ "col":1,
+ "TextAlign":"MiddleCenter",
+ "Text":"渚涘簲鍟�"
+ },
+ {
+ "row":4,
+ "col":2,
+ "WordWrap":true,
+ "Text":"[#渚涘簲鍟�#]"
+ },
+ {
+ "row":5,
+ "col":1,
+ "TextAlign":"MiddleCenter",
+ "Text":"鎵瑰彿"
+ },
+ {
+ "row":5,
+ "col":2,
+ "Text":"[#鎵瑰彿#]"
+ },
+ {
+ "row":6,
+ "col":1,
+ "TextAlign":"MiddleCenter",
+ "Text":"鏁伴噺"
+ },
+ {
+ "row":6,
+ "col":2,
+ "Text":"[#鏁伴噺#]"
+ },
+ {
+ "row":6,
+ "col":3,
+ "TextAlign":"MiddleCenter",
+ "Text":"鏃ユ湡"
+ },
+ {
+ "row":6,
+ "col":4,
+ "Text":"[#鏉$爜鏃ユ湡#]"
+ }
+ ]
}
]
}
diff --git "a/public/static/grf/\347\211\251\346\226\231\346\235\241\347\240\201_old.grf" "b/public/static/grf/\347\211\251\346\226\231\346\235\241\347\240\201_old.grf"
new file mode 100644
index 0000000..d505d0e
--- /dev/null
+++ "b/public/static/grf/\347\211\251\346\226\231\346\235\241\347\240\201_old.grf"
@@ -0,0 +1,93 @@
+锘縶
+ "Version":"6.8.2.2",
+ "Title":"1a.绠�鍗曡〃鏍�",
+ "Author":"閿愭氮鎶ヨ〃杞欢",
+ "Description":"婕旂ず涓�涓渶鍩烘湰鐨勫垪琛ㄦ姤琛ㄣ��",
+ "Font":{
+ "Name":"瀹嬩綋",
+ "Size":90000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "Size":256,
+ "Width":9,
+ "Height":6,
+ "LeftMargin":0,
+ "TopMargin":0,
+ "RightMargin":0,
+ "BottomMargin":0
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "PrintAdaptMethod":"ResizeToFit",
+ "Recordset":{
+ "ConnectionString":"xml",
+ "QuerySQL":"閿�鍞嚭搴撳崟.txt",
+ "Field":[
+ {
+ "Name":"鏉$爜缂栧彿"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"鍗曟嵁鍙�",
+ "Width":8.78417
+ }
+ ],
+ "ColumnContent":{
+ "Height":3.41313,
+ "ColumnContentCell":[
+ {
+ "Column":"鍗曟嵁鍙�",
+ "FreeCell":true,
+ "Control":[
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox1",
+ "Left":0.396875,
+ "Top":0.211667,
+ "Width":8.20208,
+ "Height":2.98979
+ },
+ {
+ "Type":"Barcode",
+ "Name":"Barcode1",
+ "Left":0.211667,
+ "Top":0.396875,
+ "Width":4.39208,
+ "Height":2.59292,
+ "BarcodeType":"QRCode",
+ "Text":"[#鏉$爜缂栧彿#]"
+ }
+ ]
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "BackColor":"C0C0C0",
+ "Height":0,
+ "Font":{
+ "Name":"瀹嬩綋",
+ "Size":90000,
+ "Bold":true,
+ "Charset":134
+ },
+ "RepeatStyle":"OnPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"鍗曟嵁鍙�",
+ "BackColor":"FFFFFF",
+ "TextAlign":"MiddleCenter"
+ }
+ ]
+ }
+ },
+ "ReportHeader":[
+ {
+ "Height":0
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/App.vue b/src/App.vue
index 12df51d..e63cdde 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -7,6 +7,7 @@
<script>
import ThemePicker from "@/components/ThemePicker"
+require("@/utils/grhtml5-6.8-min");
export default {
name: "App",
diff --git a/src/router/index.js b/src/router/index.js
index 92b2a75..81d3b80 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -523,7 +523,7 @@
title: "閲囪喘閫�鏂欏崟鍒楄〃锛堝凡鍏ュ簱锛�",
activeMenu: "purchase/postockInBack",
},
- }
+ },
],
},
//#endregion
@@ -584,7 +584,7 @@
],
},
//#endregion
-
+
//#region 鐢熶骇鍏ュ簱鍗�
{
path: "/icmo",
@@ -739,7 +739,7 @@
],
},
//#endregion
-
+
//#region 閿�鍞��璐у崟鍒楄〃
{
path: "/sell/StockBillMainList/KfICStockBillMainList",
@@ -812,8 +812,8 @@
},
],
},
- //#endregion
-
+ //#endregion
+
//#region 鍣ㄥ叿涓绘。
{
path: "/scMould/basicModeling/Gy_MouldFile",
@@ -862,8 +862,8 @@
],
},
//#endregion
- //#endregion
-
+ //#endregion
+
//#region 鍣ㄥ叿浠撳瓨绠$悊
//#region 鍣ㄥ叿棰嗙敤鐢宠鍗曞垪琛�
{
@@ -886,7 +886,7 @@
},
],
},
- //#endregion
+ //#endregion
//#region 鍣ㄥ叿棰嗙敤鐢宠鍗�
{
@@ -997,7 +997,7 @@
},
],
},
- //#endregion
+ //#endregion
//#region 鍣ㄥ叿棰嗙敤閫�搴撳崟鍒楄〃
{
@@ -1132,7 +1132,7 @@
},
],
},
- //#endregion
+ //#endregion
//#endregion
//#endregion
@@ -1199,7 +1199,7 @@
},
],
},
- //#endregion
+ //#endregion
//#endregion
//#region OA鍩虹璧勬枡
@@ -1296,7 +1296,7 @@
],
},
//#endregion
-
+
//#region 浠撲綅
{
path: "/basic/gy/gyStockPlace",
@@ -1341,7 +1341,28 @@
},
//#endregion
//#endregion
-
+//#region 鐗╂祦鍩虹璧勬枡
+//#region 鎵胯繍鍚堝悓鍗曟嵁
+{
+ path: "/basic/transport/cgContractTransportBillList",
+ component: Layout,
+ hidden: true,
+ redirect: "noredirect",
+ meta: {
+ breadcrumb: false, // 濡傛灉璁剧疆涓篺alse锛屽垯涓嶄細鍦╞readcrumb闈㈠寘灞戜腑鏄剧ず銆�
+ activeMenu: "/basic/transport", // 褰撹矾鐢辫缃簡璇ュ睘鎬э紝鍒欎細楂樹寒鐩稿搴旂殑渚ц竟鏍忋��
+ },
+ children: [
+ {
+ path: "/basic/transport/cgContractTransportBillList",
+ component: () => import("@/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillList.vue"),
+ name: "CgContractTransportBillList",
+ meta: { title: "鎵胯繍鍚堝悓", activeMenu: "basic/transport" },
+ },
+ ],
+ },
+//#endregion
+//#endregion
//#region 鐢熶骇鍩虹璧勬枡
//#region 鐢熶骇璧勬簮
{
@@ -1396,7 +1417,7 @@
},
//#endregion
//#endregion
-
+
//#region 鐗╂祦鍩虹璧勬枡
//#region 椹鹃┒鍛樺垪琛�
{
@@ -1432,7 +1453,8 @@
children: [
{
path: "/basic/gy/gyCartypelist",
- component: () => import("@/views/basic/gyCartypelist/gyCartypelist.vue"),
+ component: () =>
+ import("@/views/basic/gyCartypelist/gyCartypelist.vue"),
name: "GyCartype",
meta: { title: "杞﹀瀷鍒楄〃", activeMenu: "basic/gy" },
},
@@ -1468,10 +1490,11 @@
//#endregion
//#endregion
-
+
//#region 璐圭敤鍩虹璧勬枡
//#region 璐圭敤椤圭洰鍒楄〃
- {//src\views\basic\gyItemMoney\gyItemMoney.vue
+ {
+ //src\views\basic\gyItemMoney\gyItemMoney.vue
path: "/basic/gy/gyItemMoney",
component: Layout,
hidden: true,
@@ -1491,6 +1514,28 @@
},
//#endregion
//#endregion
+
+ //#region 杈呭姪灞炴�у熀纭�璧勬枡
+ {
+ //src\views\basic\gyItemMoney\gyItemMoney.vue
+ path: "/basic",
+ component: Layout,
+ hidden: true,
+ redirect: "noredirect",
+ meta: {
+ breadcrumb: false, // 濡傛灉璁剧疆涓篺alse锛屽垯涓嶄細鍦╞readcrumb闈㈠寘灞戜腑鏄剧ず
+ activeMenu: "/basic/gy", // 褰撹矾鐢辫缃簡璇ュ睘鎬э紝鍒欎細楂樹寒鐩稿搴旂殑渚ц竟鏍忋��
+ },
+ children: [
+ {
+ path: "/basic/gy/gyProperty",
+ component: () => import("@/views/basic/gyProperty/gyPropertyList.vue"),
+ name: "GyProperty",
+ meta: { title: "杈呭姪灞炴�у垪琛�", activeMenu: "basic/gy" },
+ },
+ ],
+ },
+ //#endregion
//#endregion
//#region 閫氱敤椤甸潰
@@ -1509,10 +1554,16 @@
component: () => import("@/views/component/printList/hBarPlanPrint"),
hidden: true,
},
+ //#region 鎵撳嵃鍒楄〃(缃戦〉)
+ {
+ path: "/hBarPlanPrintWeb",
+ component: () => import("@/views/component/printList/barcode.vue"),
+ hidden: true,
+ },
//#endregion
//#endregion
//#endregion
-
+
//#region 鑺傜偣椤甸潰
{
path: "/iframe",
@@ -1593,8 +1644,14 @@
name: "IframeGyCarEdit",
meta: { title: "杞﹁締缂栬緫", noCache: true, noLoading: true },
},
+ {
+ path: "GyProperty",
+ component: () => import("@/views/basic/gyProperty/gyPropertyList"), // 杈呭姪灞炴��
+ name: "IframeGyProperty",
+ meta: { title: "杈呭姪灞炴��", noCache: true, noLoading: true },
+ },
],
- },
+ },
//#endregion
];
diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js
index 7e0a423..52ab7b5 100644
--- a/src/store/modules/permission.js
+++ b/src/store/modules/permission.js
@@ -474,6 +474,34 @@
icon: "build",
link: null,
noCache: false,
+ title: "鐗╂祦鍩虹璧勬枡",
+ },
+ hidden: false,
+ name: "Transport",
+ path: "transport",
+ redirect: "noRedirect",
+ component: "Layout",
+ children: [
+ {
+ meta: {
+ icon: "build",
+ link: null,
+ noCache: false,
+ title: "鎵胯繍鍚堝悓鍗曟嵁",
+ },
+ component: () =>
+ import("@/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillList.vue"),
+ hidden: false,
+ name: "CgContractTransportBillList",
+ path: "cgContractTransportBillList",
+ },
+ ],
+ },
+ {
+ meta: {
+ icon: "build",
+ link: null,
+ noCache: false,
title: "鍏敤璧勬枡",
},
hidden: false,
@@ -610,6 +638,18 @@
name: "GyCustomer",
path: "GyCustomer",
},
+ {
+ meta: {
+ icon: "build",
+ link: null,
+ noCache: false,
+ title: "杈呭姪灞炴�у垪琛�",
+ },
+ component: () => import("@/views/basic/gyProperty/gyPropertyList.vue"),
+ hidden: false,
+ name: "GyProperty",
+ path: "gyProperty",
+ },
],
},
],
diff --git a/src/views/FbStepFoldOutBillList/fbStepFoldOutBillListEdit.vue b/src/views/FbStepFoldOutBillList/fbStepFoldOutBillListEdit.vue
index 9d5d3cc..60a8031 100644
--- a/src/views/FbStepFoldOutBillList/fbStepFoldOutBillListEdit.vue
+++ b/src/views/FbStepFoldOutBillList/fbStepFoldOutBillListEdit.vue
@@ -101,7 +101,7 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="楠屾敹">
- <el-input v-model="form.HSecManagerName" placeholder="楠屾敹" style="width: calc(100% - 50px)" />
+ <el-input v-model="form.HSecManagerName" placeholder="楠屾敹" style="width: calc(100% - 50px)" />
<el-button type="primary" icon="el-icon-search" @click="showEmployeeDialog('inspector')">
</el-button>
</el-form-item>
@@ -382,7 +382,7 @@
:dialog-type="currentDialogType"
:dialog-title="employeeDialogTitle"
@select="handleEmployeeSelect"
- />
+ />
</div>
</template>
@@ -504,7 +504,7 @@
}
],
selectedRows: [],
- baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/'
+ baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/'
}
},
computed: {
@@ -815,7 +815,7 @@
}
console.log(`閫夋嫨鐨�${type}:`, data)
},
-
+
handleSupplierSelect(data, type) {
this.form.HSupID = data.HItemID
@@ -823,7 +823,7 @@
console.log('閫夋嫨鐨勪緵搴斿晢:', data)
},
-
+
// 琛ㄦ牸鎿嶄綔
handleAddLine() {
this.tableData.push({
@@ -898,11 +898,11 @@
}
// 纭繚琛ㄦ牸鏁版嵁涓殑浠撳簱ID涔熸湁鍊�
- const hasValidTableData = this.tableData.every(row =>
- row.HMaterID && row.HMaterID !== 0 &&
+ const hasValidTableData = this.tableData.every(row =>
+ row.HMaterID && row.HMaterID !== 0 &&
row.HUnitID && row.HUnitID !== 0
)
-
+
if (!hasValidTableData) {
// this.$message.error('璇峰畬鍠勮〃鏍间腑鐨勭墿鏂欏拰鍗曚綅淇℃伅')
// return
@@ -919,14 +919,14 @@
// })
// }
//const formData=JSON.stringify(this.form)+';'+JSON.stringify(this.tableData)+';'+this.operationType+';'+(sessionStorage['HUserName'] || 'admin');
- const submitData =
- JSON.stringify(this.form) + ';' +
- JSON.stringify(this.tableData) + ';' +
- this.operationType + ';' +
+ const submitData =
+ JSON.stringify(this.form) + ';' +
+ JSON.stringify(this.tableData) + ';' +
+ this.operationType + ';' +
(sessionStorage['HUserName'] || 'admin') + ';' +
JSON.stringify({ main: this.form, table: this.tableData })
console.log('鎻愪氦鐨勫畬鏁存暟鎹�:', submitData)
-
+
const response = await axios.post(`${this.baseURL}/Kf_StepFoldOutBill/Kf_StepFoldOutBillEdit`, {
sMainSub: submitData
})
@@ -1004,4 +1004,4 @@
.el-input-number {
width: 100%;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/FbStepFoldinBillList/EmployeeDialog.vue b/src/views/FbStepFoldinBillList/EmployeeDialog.vue
index 7b07a3b..572a0ec 100644
--- a/src/views/FbStepFoldinBillList/EmployeeDialog.vue
+++ b/src/views/FbStepFoldinBillList/EmployeeDialog.vue
@@ -260,7 +260,7 @@
selectedRows: [],
currentFilterName: '',
activeCollapse: ['more'],
- baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/"
+ baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/"
}
},
watch: {
@@ -318,11 +318,11 @@
}
console.log('璇锋眰鍙傛暟:', requestParams)
const response = await axios.get(`${this.baseURL}/Gy_Employee/list`, { params: requestParams })
-
+
if (response.data.count === 1) {
this.tableData = response.data.data || []
this.total = response.data.count || 0
-
+
if (response.data.list.length > 0) {
this.setTableColumns(response.data.list)
}
@@ -431,11 +431,11 @@
return ` and ${col} ${com}`
}
- if (q.ColName && q.Comparator && q.Comparator !== '0' && q.ColContent)
+ if (q.ColName && q.Comparator && q.Comparator !== '0' && q.ColContent)
sWhereParts.push(buildComparator(q.ColName, q.Comparator, q.ColContent))
- if (q.ColName1 && q.Comparator1 && q.Comparator1 !== '0' && q.ColContent1)
+ if (q.ColName1 && q.Comparator1 && q.Comparator1 !== '0' && q.ColContent1)
sWhereParts.push(buildComparator(q.ColName1, q.Comparator1, q.ColContent1))
- if (q.ColName2 && q.Comparator2 && q.Comparator2 !== '0' && q.ColContent2)
+ if (q.ColName2 && q.Comparator2 && q.Comparator2 !== '0' && q.ColContent2)
sWhereParts.push(buildComparator(q.ColName2, q.Comparator2, q.ColContent2))
if (q.HNumber) sWhereParts.push(` and 鑱屽憳浠g爜 like '%${q.HNumber}%'`)
@@ -488,7 +488,7 @@
this.getEmployeeList(this.buildWhereClause())
},
-
+
handleConfirm() {
if (this.selectedRows.length === 0) {
this.$message.warning('璇烽�夋嫨鑱屽憳')
@@ -500,7 +500,7 @@
this.$emit('update:visible', false)
},
-
+
handleCancel() {
this.$emit('update:visible', false)
},
@@ -543,4 +543,4 @@
::v-deep .el-table .cell {
padding: 8px 12px;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/FbStepFoldinBillList/SupplierDialog.vue b/src/views/FbStepFoldinBillList/SupplierDialog.vue
index 7246adc..e88df1a 100644
--- a/src/views/FbStepFoldinBillList/SupplierDialog.vue
+++ b/src/views/FbStepFoldinBillList/SupplierDialog.vue
@@ -252,12 +252,12 @@
},
dialogType: {
type: String,
- default: 'supplier'
+ default: 'supplier'
}
},
data() {
return {
-
+
isVisible: this.visible,
dialogTitle: '閫夋嫨渚涘簲鍟�',
queryForm: {
@@ -290,7 +290,7 @@
selectedRows: [],
currentFilterName: '',
activeCollapse: ['more'],
- baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/"
+ baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/"
}
},
watch: {
@@ -300,7 +300,7 @@
this.initDialog()
}
},
-
+
isVisible(val) {
this.$emit('update:visible', val)
}
@@ -320,7 +320,7 @@
if (response.data.count === 1) {
this.organizations = response.data.data
// 璁剧疆榛樿缁勭粐
- const defaultOrg = sessionStorage.getItem('Organization') ||
+ const defaultOrg = sessionStorage.getItem('Organization') ||
sessionStorage.getItem('OrganizationID')
if (defaultOrg) {
this.queryForm.HUSEORGID = defaultOrg
@@ -357,11 +357,11 @@
}
console.log('璇锋眰鍙傛暟:', params)
const response = await axios.get(`${this.baseURL}/Gy_Supplier/page`, { params })
-
+
if (response.data.code == 1) {
this.tableData = response.data.data || []
this.total = response.data.count || 0
-
+
if ( response.data.list.length > 0) {
this.setTableColumns(response.data.list)
}
@@ -451,11 +451,11 @@
}
// 娣诲姞杩囨护鏉′欢
- if (q.ColName && q.Comparator && q.Comparator !== '0' && q.ColContent)
+ if (q.ColName && q.Comparator && q.Comparator !== '0' && q.ColContent)
sWhereParts.push(buildComparator(q.ColName, q.Comparator, q.ColContent))
- if (q.ColName1 && q.Comparator1 && q.Comparator1 !== '0' && q.ColContent1)
+ if (q.ColName1 && q.Comparator1 && q.Comparator1 !== '0' && q.ColContent1)
sWhereParts.push(buildComparator(q.ColName1, q.Comparator1, q.ColContent1))
- if (q.ColName2 && q.Comparator2 && q.Comparator2 !== '0' && q.ColContent2)
+ if (q.ColName2 && q.Comparator2 && q.Comparator2 !== '0' && q.ColContent2)
sWhereParts.push(buildComparator(q.ColName2, q.Comparator2, q.ColContent2))
// 娣诲姞鍩烘湰鏌ヨ鏉′欢
@@ -591,4 +591,4 @@
.dialog-footer {
text-align: right;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/FbStepFoldinBillList/fbStepFoldinBillListEdit.vue b/src/views/FbStepFoldinBillList/fbStepFoldinBillListEdit.vue
index 5eea970..59179d6 100644
--- a/src/views/FbStepFoldinBillList/fbStepFoldinBillListEdit.vue
+++ b/src/views/FbStepFoldinBillList/fbStepFoldinBillListEdit.vue
@@ -101,7 +101,7 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="楠屾敹">
- <el-input v-model="form.HSecManagerName" placeholder="楠屾敹" style="width: calc(100% - 50px)" />
+ <el-input v-model="form.HSecManagerName" placeholder="楠屾敹" style="width: calc(100% - 50px)" />
<el-button type="primary" icon="el-icon-search" @click="showEmployeeDialog('inspector')">
</el-button>
</el-form-item>
@@ -382,7 +382,7 @@
:dialog-type="currentDialogType"
:dialog-title="employeeDialogTitle"
@select="handleEmployeeSelect"
- />
+ />
</div>
</template>
@@ -504,7 +504,7 @@
}
],
selectedRows: [],
- baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/'
+ baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/'
}
},
computed: {
@@ -815,7 +815,7 @@
}
console.log(`閫夋嫨鐨�${type}:`, data)
},
-
+
handleSupplierSelect(data, type) {
this.form.HSupID = data.HItemID
@@ -823,7 +823,7 @@
console.log('閫夋嫨鐨勪緵搴斿晢:', data)
},
-
+
// 琛ㄦ牸鎿嶄綔
handleAddLine() {
this.tableData.push({
@@ -898,11 +898,11 @@
}
// 纭繚琛ㄦ牸鏁版嵁涓殑浠撳簱ID涔熸湁鍊�
- const hasValidTableData = this.tableData.every(row =>
- row.HMaterID && row.HMaterID !== 0 &&
+ const hasValidTableData = this.tableData.every(row =>
+ row.HMaterID && row.HMaterID !== 0 &&
row.HUnitID && row.HUnitID !== 0
)
-
+
if (!hasValidTableData) {
// this.$message.error('璇峰畬鍠勮〃鏍间腑鐨勭墿鏂欏拰鍗曚綅淇℃伅')
// return
@@ -919,14 +919,14 @@
// })
// }
//const formData=JSON.stringify(this.form)+';'+JSON.stringify(this.tableData)+';'+this.operationType+';'+(sessionStorage['HUserName'] || 'admin');
- const submitData =
- JSON.stringify(this.form) + ';' +
- JSON.stringify(this.tableData) + ';' +
- this.operationType + ';' +
+ const submitData =
+ JSON.stringify(this.form) + ';' +
+ JSON.stringify(this.tableData) + ';' +
+ this.operationType + ';' +
(sessionStorage['HUserName'] || 'admin') + ';' +
JSON.stringify({ main: this.form, table: this.tableData })
console.log('鎻愪氦鐨勫畬鏁存暟鎹�:', submitData)
-
+
const response = await axios.post(`${this.baseURL}/Kf_StepFoldInBill/Kf_StepFoldInBillEdit`, {
sMainSub: submitData
})
@@ -1004,4 +1004,4 @@
.el-input-number {
width: 100%;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/GyCustomer/CustomerEdit/index.vue b/src/views/GyCustomer/CustomerEdit/index.vue
index 6433895..5c5c5c0 100644
--- a/src/views/GyCustomer/CustomerEdit/index.vue
+++ b/src/views/GyCustomer/CustomerEdit/index.vue
@@ -23,15 +23,15 @@
<el-card>
<div class="card-body">
<h1 style="text-align:center;margin-bottom:20px;"><b>瀹㈡埛璧勬枡</b></h1>
-
+
<el-tabs v-model="activeTab" type="card">
<el-tab-pane label="鍩烘湰淇℃伅" name="basic">
<el-form ref="form" :model="formData" label-width="100px" :rules="rules">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="瀹㈡埛浠g爜" prop="HNumber">
- <el-input
- v-model="formData.HNumber"
+ <el-input
+ v-model="formData.HNumber"
placeholder="璇疯緭鍏ュ鎴蜂唬鐮�"
:readonly="operationType === 3"
></el-input>
@@ -78,8 +78,8 @@
</el-col>
<el-col :span="12">
<el-form-item label="鍒涘缓缁勭粐" prop="HCreateOrgID">
- <el-select
- v-model="formData.HCreateOrgID"
+ <el-select
+ v-model="formData.HCreateOrgID"
placeholder="璇烽�夋嫨鍒涘缓缁勭粐"
:disabled="operationType !== 1"
style="width: 100%"
@@ -98,8 +98,8 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="浣跨敤缁勭粐" prop="HUSEORGID">
- <el-select
- v-model="formData.HUSEORGID"
+ <el-select
+ v-model="formData.HUSEORGID"
placeholder="璇烽�夋嫨浣跨敤缁勭粐"
:disabled="operationType !== 1"
style="width: 100%"
@@ -117,7 +117,7 @@
</el-form>
</el-tab-pane>
-
+
<el-tab-pane label="鍏朵粬淇℃伅" name="other">
<el-form ref="formOther" :model="formData" :rules="rules" label-width="100px">
<el-row :gutter="20">
@@ -221,16 +221,16 @@
</el-col>
<el-col :span="12">
<el-form-item label="鍦板尯" prop="HAreaID">
- <el-input
- v-model="formData.HAreaName"
+ <el-input
+ v-model="formData.HAreaName"
placeholder="璇烽�夋嫨鍦板尯"
readonly
style="width: calc(100% - 50px)"
>
</el-input>
- <el-button
- type="primary"
- icon="el-icon-search"
+ <el-button
+ type="primary"
+ icon="el-icon-search"
style="margin-left: 10px;"
@click="openAreaDialog"
></el-button>
@@ -242,16 +242,16 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="榛樿璐у竵">
- <el-input
- v-model="formData.HCurName"
+ <el-input
+ v-model="formData.HCurName"
placeholder="璇烽�夋嫨榛樿璐у竵"
readonly
style="width: calc(100% - 50px)"
>
</el-input>
- <el-button
- type="primary"
- icon="el-icon-search"
+ <el-button
+ type="primary"
+ icon="el-icon-search"
style="margin-left: 10px;"
@click="openCurrencyDialog"
></el-button>
@@ -260,16 +260,16 @@
</el-col>
<el-col :span="12">
<el-form-item label="缁撶畻鏂瑰紡">
- <el-input
- v-model="formData.HSSName"
+ <el-input
+ v-model="formData.HSSName"
placeholder="璇烽�夋嫨缁撶畻鏂瑰紡"
readonly
style="width: calc(100% - 50px)"
>
</el-input>
- <el-button
- type="primary"
- icon="el-icon-search"
+ <el-button
+ type="primary"
+ icon="el-icon-search"
style="margin-left: 10px;"
@click="openSettleStyleDialog"
></el-button>
@@ -292,16 +292,16 @@
</el-col>
<el-col :span="12">
<el-form-item label="瀹㈡埛鍒嗙被">
- <el-input
- v-model="formData.HCusTypeName"
+ <el-input
+ v-model="formData.HCusTypeName"
placeholder="璇烽�夋嫨瀹㈡埛鍒嗙被"
readonly
style="width: calc(100% - 50px)"
>
</el-input>
- <el-button
- type="primary"
- icon="el-icon-search"
+ <el-button
+ type="primary"
+ icon="el-icon-search"
style="margin-left: 10px;"
@click="openCustomerTypeDialog"
></el-button>
@@ -372,28 +372,28 @@
</el-card>
</div>
-
+
<!-- 鍦板尯tanchuang -->
- <AreaDialog
+ <AreaDialog
:visible.sync="areaDialogVisible"
@selected="handleAreaSelected"
/>
-
-
+
+
<!-- 璐у竵tanchuang -->
- <CurrencyDialog
+ <CurrencyDialog
:visible.sync="currencyDialogVisible"
@selected="handleCurrencySelected"
/>
<!-- 缁撶畻鏂瑰紡tanchuang -->
- <SettleStyleDialog
+ <SettleStyleDialog
:visible.sync="settleStyleDialogVisible"
@selected="handleSettleStyleSelected"
/>
<!-- 瀹㈡埛鍒嗙被tanchuang -->
- <CustomerTypeDialog
+ <CustomerTypeDialog
:visible.sync="customerTypeDialogVisible"
@selected="handleCustomerTypeSelected"
/>
@@ -442,7 +442,7 @@
return {
openEdit: true,
activeTab: 'basic',
-
+
// 琛ㄥ崟鏁版嵁
formData: {
HNumber: '',
@@ -454,7 +454,7 @@
HMateOutEmp: '',
HCreateOrgID: '',
HUSEORGID: '',
-
+
// 鍏朵粬淇℃伅
HLinkMan: '',
HLinkPhone: '',
@@ -480,7 +480,7 @@
HCusStatus: '',
HCusTypeName: '',
HCusTypeID: '0',
-
+
// 绯荤粺淇℃伅
HCreator: '',
HCreateDate: '',
@@ -491,7 +491,7 @@
HDeleteMan: '',
HDeleteDate: ''
},
-
+
// 楠岃瘉
rules: {
HNumber: [
@@ -507,19 +507,19 @@
{ required: true, message: '璇烽�夋嫨浣跨敤缁勭粐', trigger: 'change' }
]
},
-
+
organizationList: [],
-
-
+
+
areaDialogVisible: false,
currencyDialogVisible: false,
settleStyleDialogVisible: false,
customerTypeDialogVisible: false,
-
+
saveDisabled: false,
auditDisabled: false,
-
- baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/',
+
+ baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/',
user: 'admin'
}
},
@@ -555,7 +555,7 @@
this.formData.HCreator = this.user
this.formData.HCreateDate = new Date().toLocaleString()
},
-
+
loadOrganizations() {
axios.get(`${this.baseURL}/Web/GetOrganizations`)
.then(response => {
@@ -572,7 +572,7 @@
this.$modal.msgError('鍔犺浇缁勭粐鏁版嵁澶辫触!')
})
},
-
+
handleOperationType() {
switch (this.operationType) {
case 1: // 鏂板
@@ -589,13 +589,13 @@
break
}
},
-
+
handleAddNew() {
this.auditDisabled = true
this.getMaxBillID()
},
-
+
handleSerialAdd() {
this.formData.HCusTypeName = this.HCusClsName
@@ -603,19 +603,19 @@
this.setHNumber(this.HCusTypeID)
this.auditDisabled = true
},
-
-
+
+
handleEdit() {
this.loadEditData(this.linterid)
},
-
-
+
+
handleCopy() {
this.loadEditData(this.linterid)
this.auditDisabled = true
},
-
-
+
+
getMaxBillID() {
axios.get(`${this.baseURL}/Gy_Customer/GetMAXBillID`)
.then(response => {
@@ -625,7 +625,7 @@
console.error('鑾峰彇鏈�澶у崟鎹甀D澶辫触:', error)
})
},
-
+
// 璁剧疆娴佹按鍙�
setHNumber(typeID) {
axios.get(`${this.baseURL}/Gy_Customer/getMaxNum`, {
@@ -644,7 +644,7 @@
this.$modal.msgError('鑾峰彇娴佹按鍙峰け璐�!')
})
},
-
+
loadEditData(interId) {
axios.get(`${this.baseURL}/Gy_Customer/xg_extendCheckEmp`, {
params: { HInterID: interId }
@@ -653,7 +653,7 @@
if (response.data.data && response.data.data.length > 0) {
const data = response.data.data[0]
this.populateFormData(data)
-
+
if (data.瀹℃牳浜� && data.瀹℃牳浜� !== '') {
this.saveDisabled = true
this.auditDisabled = true
@@ -664,8 +664,8 @@
this.$modal.msgError('鍔犺浇瀹㈡埛鏁版嵁澶辫触!')
})
},
-
-
+
+
populateFormData(data) {
this.formData = {
...this.formData,
@@ -703,11 +703,11 @@
HChecker: data.瀹℃牳浜� || '',
HCheckDate: data.瀹℃牳鏃ユ湡 || ''
}
-
+
this.formData.HUpDater = this.user
this.formData.HUpDateDate = new Date().toLocaleString()
},
-
+
// 淇濆瓨
async handleSave() {
const validMain = await new Promise(resolve => {
@@ -735,7 +735,7 @@
if (this.operationType === 3) {
// 缂栬緫淇濆瓨
url = `${this.baseURL}/Gy_Customer/AddBill1`
- params = {
+ params = {
oMain: JSON.stringify(formData) + ';' + this.linterid + ';' + this.user + ';Gy_Customer_Edit'
}
}
@@ -799,19 +799,19 @@
return callback()
},
-
+
// 琛ㄥ崟楠岃瘉
validateForm() {
if (!this.formData.HNumber) {
this.$modal.msgWarning('璇疯緭鍏ュ鎴蜂唬鐮�!')
return false
}
-
+
if (!this.formData.HName) {
this.$modal.msgWarning('璇疯緭鍏ュ鎴峰悕绉�!')
return false
}
-
+
// 澧炲�肩◣鐜囬獙璇�
const taxRate = this.formData.HTaxRate
// if (taxRate && taxRate.substring(taxRate.length - 1) === '.') {
@@ -823,10 +823,10 @@
this.$modal.msgWarning('澧炲�肩◣鐜囪杈撳叆姝g‘鏁板瓧!')
return false
}
-
+
return true
},
-
+
// 瀹℃牳
handleAudit() {
axios.get(`${this.baseURL}/Gy_Customer/AuditGy_Customer`, {
@@ -849,13 +849,13 @@
this.$modal.msgError('瀹℃牳澶辫触!')
})
},
-
+
// 閫�鍑�
handleExit() {
this.openEdit = false
this.$emit('editClose', false)
},
-
+
// 鍏抽棴瀵硅瘽妗�
handleClose(done) {
this.$confirm('纭鍏抽棴锛�')
@@ -865,7 +865,7 @@
})
.catch(_ => {})
},
-
+
// 淇濆瓨閰嶇疆
saveConfig() {
const config = {
@@ -876,40 +876,40 @@
}
localStorage.setItem('Gy_Customer_Edit', JSON.stringify(config))
},
-
+
// 鎵撳紑瀵硅瘽妗嗘柟娉�
openAreaDialog() {
this.areaDialogVisible = true
},
-
+
openCurrencyDialog() {
this.currencyDialogVisible = true
},
-
+
openSettleStyleDialog() {
this.settleStyleDialogVisible = true
},
-
+
openCustomerTypeDialog() {
this.customerTypeDialogVisible = true
},
-
+
// 瀵硅瘽妗嗛�夋嫨鍥炶皟
handleAreaSelected(data) {
this.formData.HAreaName = data.鍦板尯鍚嶇О
this.formData.HAreaID = data.HItemID
},
-
+
handleCurrencySelected(data) {
this.formData.HCurName = data.璐у竵鍚嶇О
this.formData.HCurID = data.HItemID
},
-
+
handleSettleStyleSelected(data) {
this.formData.HSSName = data.缁撶畻鏂瑰紡鍚嶇О
this.formData.HSSID = data.HItemID
},
-
+
handleCustomerTypeSelected(data) {
this.formData.HCusTypeName = data.瀹㈡埛鍒嗙被鍚嶇О
this.formData.HCusTypeID = data.HItemID
@@ -947,4 +947,4 @@
.el-button-group {
margin-bottom: 10px;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/GyCustomer/index.vue b/src/views/GyCustomer/index.vue
index b7da1d3..84b23ef 100644
--- a/src/views/GyCustomer/index.vue
+++ b/src/views/GyCustomer/index.vue
@@ -356,7 +356,7 @@
uploadData: [],
uploadTableLoading: false,
- baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/",
+ baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
user: "admin",
};
},
@@ -376,7 +376,7 @@
this.getTreeData();
this.getList();
this.getDefaultFilterScheme();
-
+
},
getTreeData() {
@@ -945,4 +945,4 @@
.filter-collapse {
margin-top: 10px;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/ICMO/ScICMOReportBill/ScICMOReportBillEdit.vue b/src/views/ICMO/ScICMOReportBill/ScICMOReportBillEdit.vue
index 4ad5ebb..fdd1974 100644
--- a/src/views/ICMO/ScICMOReportBill/ScICMOReportBillEdit.vue
+++ b/src/views/ICMO/ScICMOReportBill/ScICMOReportBillEdit.vue
@@ -269,7 +269,7 @@
linterid: 0,
HSouceBillType: '',
- baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/'
+ baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/'
}
},
@@ -296,7 +296,7 @@
},
methods: {
async initData() {
-
+
const params = this.$route ? this.$route.query : {}
if (this.propOperationType !== null && this.propOperationType !== undefined) {
this.OperationType = this.propOperationType
@@ -335,7 +335,7 @@
this.$set(this.form, 'HGroupName', sessionStorage.HGroup || '')
this.$set(this.form, 'HEmpID', sessionStorage.HEmpID || 0)
this.$set(this.form, 'HEmpName', sessionStorage.HEmpName || '')
- }
+ }
} catch (error) {
@@ -878,7 +878,7 @@
return true
},
-
+
handleRemove(file, fileList) {
console.log(file, fileList)
},
@@ -926,4 +926,4 @@
.el-table {
margin-top: 10px;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/KCGL/OtherOutBill/Kf_OtherOutBillEdit.vue b/src/views/KCGL/OtherOutBill/Kf_OtherOutBillEdit.vue
index 1a2ec36..da00d0b 100644
--- a/src/views/KCGL/OtherOutBill/Kf_OtherOutBillEdit.vue
+++ b/src/views/KCGL/OtherOutBill/Kf_OtherOutBillEdit.vue
@@ -233,7 +233,8 @@
</el-table-column>
<el-table-column align="center" label="杈呭姪灞炴��" width="120">
<template slot-scope="scope">
- <span>{{ scope.row.杈呭姪灞炴�� }}</span>
+ <el-input v-model="scope.row.杈呭姪灞炴��" placeholder="璇疯緭鍏ヨ緟鍔╁睘鎬�" @keyup.native.f7="openDataDialog(5, scope.row)"
+ @dblclick.native="openDataDialog(5, scope.row)" />
</template>
</el-table-column>
<el-table-column align="center" label="HAuxPropID" width="120">
@@ -347,6 +348,12 @@
<Warehouse @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="warehouseShow" />
<!-- 鐗╂枡 -->
<Material @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="materialShow" />
+ <GyProperty
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="PropertyShow"
+ />
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="deptClickSub">纭� 瀹�</el-button>
<el-button @click="deptClose">鍙� 娑�</el-button>
@@ -365,10 +372,11 @@
import Dept from '@/views/component/dept'
import Warehouse from '@/views/component/warehouse'
import Material from '@/views/component/material'
+import GyProperty from "@/views/basic/gyProperty/gyPropertyList.vue";
export default {
name: 'OtherOutBillEdit',
- components: { Dept, Warehouse, Material, RowSettings },
+ components: { Dept, Warehouse, Material, RowSettings,GyProperty, },
props: {
OperationType: { type: Number, },
linterid: { type: Number, },
@@ -403,6 +411,7 @@
warehouseShow: false, //浠撳簱鏁版嵁缁勪欢鏄剧ず鏍囪
materialShow: false, //鐗╂枡鏁版嵁缁勪欢鏄剧ず鏍囪
stockPlaceShow: false, //浠撲綅鏁版嵁缁勪欢鏄剧ず鏍囪
+ PropertyShow: false, //杈呭姪灞炴�ф暟鎹暟缁勬樉绀烘爣璁�
deptform: {}, //寮圭獥閫変腑鏁版嵁
temp: undefined, //涓存椂鍙橀噺
@@ -418,6 +427,8 @@
zbIndex: null,
zbSelForm: {}, //瀛愯〃閫変腑鏁版嵁,鐢ㄤ簬瀛愯〃澶嶅埗銆佷笂绉汇�佷笅绉荤瓑鎿嶄綔
zbRow: null,
+
+ HModName: "Kf_OtherOutBillEdit",
};
},
created() {
@@ -661,6 +672,10 @@
this.dialogTitle = '浠撲綅鍒楄〃'
this.stockPlaceShow = true
this.openData = true
+ }else if(num == 5) {
+ this.dialogTitle = '杈呭姪灞炴�у垪琛�'
+ this.PropertyShow = true
+ this.openData = true
}
},
//#region 灏嗘暟鎹脊绐楀叏閮ㄥ彇娑堝姞杞�
@@ -674,6 +689,7 @@
//#region 寮圭獥鏁版嵁鍙屽嚮杩斿洖琛ㄥ崟璧嬪�间簨浠�
dbEmitData(deptRow, num) {
+ console.log(num)
if (num == 1) {
this.form.HDeptName = deptRow.閮ㄩ棬鍚嶇О //閮ㄩ棬
this.form.HDeptID = deptRow.HItemID
@@ -712,6 +728,13 @@
this.editData[this.zbIndex].HTaxRate = deptRow.榛樿绋庣巼
this.openData = false
}
+ else if (num == "gyProperty") {
+ this.editData[this.zbIndex].HPropertyID = deptRow.HItemID;
+ this.editData[this.zbIndex]["杈呭姪灞炴��"] = deptRow["杈呭姪灞炴�у悕绉�"];
+
+ this.propertyShow = false;
+ this.openData = false;
+ }
},
//#endregion
diff --git a/src/views/basic/gyCartypelist/gyCartypelist.vue b/src/views/basic/gyCartypelist/gyCartypelist.vue
index e018105..1e344bf 100644
--- a/src/views/basic/gyCartypelist/gyCartypelist.vue
+++ b/src/views/basic/gyCartypelist/gyCartypelist.vue
@@ -433,7 +433,8 @@
this.lastSelectedRowIndex = this.tableData.indexOf(row);
this.$refs.tableData.toggleRowSelection(row);
if (this.openPage) {
- this.$emit('carTypeEmit', row, 1)
+ //this.$emit('carTypeEmit', row, 1)
+ this.$emit('deptEmitDb', row, 7)
}
},
@@ -455,7 +456,8 @@
}
this.OperationType = 3
if (this.openPage) {
- this.$emit('carTypeEmitDb', row, 1)
+ //this.$emit('carTypeEmitDb', row, 1)
+ this.$emit('deptEmitDb', row, 7)
} else {
this.handleEdit();
}
diff --git a/src/views/basic/gyProperty/gyPropertyList.vue b/src/views/basic/gyProperty/gyPropertyList.vue
new file mode 100644
index 0000000..0a01a5e
--- /dev/null
+++ b/src/views/basic/gyProperty/gyPropertyList.vue
@@ -0,0 +1,1467 @@
+<template>
+ <div style="padding: 10px; position: relative">
+ <el-form
+ :model="queryParams"
+ ref="queryForm"
+ label-width="98px"
+ :inline="true"
+ class="searchBox"
+ >
+ <el-row>
+ <el-form-item label="杈呭姪灞炴�т唬鐮�" prop="HNumber" style="padding-left: 100px">
+ <el-input
+ v-model="queryParams.HNumber"
+ placeholder="璇疯緭鍏ヨ緟鍔╁睘鎬т唬鐮�"
+ @keyup.enter.native="handleQuery"
+ class="ForFilteringSchemes"
+ />
+ </el-form-item>
+ <el-form-item label="杈呭姪灞炴�у悕绉�" prop="HName">
+ <el-input
+ v-model="queryParams.HName"
+ placeholder="璇疯緭鍏ヨ緟鍔╁睘鎬у悕绉�"
+ @keyup.enter.native="handleQuery"
+ class="ForFilteringSchemes"
+ />
+ </el-form-item>
+ <el-form-item label="缁勭粐">
+ <el-select
+ v-model="queryParams.HOrgID"
+ placeholder="璇烽�夋嫨"
+ class="ForFilteringSchemes"
+ >
+ <el-option
+ v-for="(item, index) in organizationList"
+ :key="index"
+ :label="item.Name"
+ :value="item.ID.toString()"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-row>
+ <el-form-item label-width="78px">
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">
+ 鎼� 绱�</el-button
+ >
+ <el-button icon="el-icon-circle-close" size="mini" @click="searchOpen = false"
+ >鍙� 娑�</el-button
+ >
+ </el-form-item>
+ <el-collapse v-model="activeSeach">
+ <el-collapse-item title="鏇村" name="1">
+ <el-card class="box-card">
+ <div slot="header" class="clearfix"><span>杩囨护</span></div>
+ <div>
+ <el-row>
+ <el-form-item label-width="0">
+ <el-col :span="7">
+ <el-select
+ v-model="queryParams.ColName1"
+ placeholder="璇烽�夋嫨"
+ @change="riqiChange"
+ class="ForFilteringSchemes"
+ >
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option
+ :label="item.field"
+ :value="item.field"
+ v-if="!item.hide"
+ ></el-option>
+ </span>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px">
+ <el-select
+ v-model="queryParams.Comparator1"
+ placeholder="璇烽�夋嫨"
+ @change="riqiChange"
+ class="ForFilteringSchemes"
+ >
+ <el-option
+ v-for="(item, index) in comparatorList"
+ :key="index"
+ :label="item.label"
+ :value="item.value"
+ ></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input
+ v-model="queryParams.ColContent1"
+ placeholder="璇疯緭鍏�"
+ clearable
+ @keyup.enter.native="handleQuery"
+ class="ForFilteringSchemes"
+ />
+ </el-col>
+ </el-form-item>
+ </el-row>
+ <el-row>
+ <el-form-item label-width="0">
+ <el-col :span="7">
+ <el-select
+ v-model="queryParams.ColName2"
+ placeholder="璇烽�夋嫨"
+ @change="riqiChange"
+ class="ForFilteringSchemes"
+ >
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option
+ :label="item.field"
+ :value="item.field"
+ v-if="!item.hide"
+ ></el-option>
+ </span>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px">
+ <el-select
+ v-model="queryParams.Comparator2"
+ placeholder="璇烽�夋嫨"
+ @change="riqiChange"
+ class="ForFilteringSchemes"
+ >
+ <span v-for="(item, index) in comparatorList" :key="index">
+ <el-option
+ :label="item.label"
+ :value="item.value"
+ v-if="!item.hide"
+ ></el-option>
+ </span>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input
+ v-model="queryParams.ColContent2"
+ placeholder="璇疯緭鍏�"
+ clearable
+ @keyup.enter.native="handleQuery"
+ class="ForFilteringSchemes"
+ />
+ </el-col>
+ </el-form-item>
+ </el-row>
+ <el-row>
+ <el-form-item label-width="0">
+ <el-col :span="7">
+ <el-select
+ v-model="queryParams.ColName"
+ placeholder="璇烽�夋嫨"
+ @change="riqiChange"
+ class="ForFilteringSchemes"
+ >
+ <el-option
+ v-for="(item, index) in btList"
+ :key="index"
+ :label="item.field"
+ :value="item.field"
+ ></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px">
+ <el-select
+ v-model="queryParams.Comparator"
+ placeholder="璇烽�夋嫨"
+ @change="riqiChange"
+ class="ForFilteringSchemes"
+ >
+ <el-option
+ v-for="(item, index) in comparatorList"
+ :key="index"
+ :label="item.label"
+ :value="item.value"
+ ></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input
+ v-model="queryParams.ColContent"
+ placeholder="璇疯緭鍏�"
+ clearable
+ @keyup.enter.native="handleQuery"
+ class="ForFilteringSchemes"
+ />
+ </el-col>
+ </el-form-item>
+ </el-row>
+ </div>
+ </el-card>
+ </el-collapse-item>
+ </el-collapse>
+ </el-form>
+
+ <el-row :gutter="10" class="mb8">
+ <!-- <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-download"
+ size="mini"
+ @click="handleImport"
+ >瀵煎叆</el-button
+ >
+ </el-col> -->
+ <!-- <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-plus"
+ size="mini"
+ @click="handleAddEdit((OperationType = 1))"
+ id="btn-Add"
+ >鏂板</el-button
+ >
+ </el-col> -->
+ <!-- <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-edit"
+ size="mini"
+ :disabled="single"
+ @click="handleEdit((row = rowForm), (OperationType = 3))"
+ >缂栬緫</el-button
+ >
+ </el-col> -->
+ <!-- <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-edit"
+ size="mini"
+ :disabled="single"
+ @click="handleEdit((row = rowForm), (OperationType = 2))"
+ >澶嶅埗</el-button
+ >
+ </el-col> -->
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-delete"
+ size="mini"
+ :disabled="single"
+ @click="handleDelete"
+ >鍒犻櫎
+ </el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-edit"
+ size="mini"
+ :disabled="single"
+ @click="set_CheckBill(0, (form = rowForm))"
+ >瀹℃牳</el-button
+ >
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-edit"
+ size="mini"
+ :disabled="single"
+ @click="set_CheckBill(1, (form = rowForm))"
+ >杩斿鏍�</el-button
+ >
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-edit"
+ size="mini"
+ :disabled="single"
+ @click="set_De_Stop(0, (form = rowForm))"
+ >绂佺敤</el-button
+ >
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-edit"
+ size="mini"
+ :disabled="single"
+ @click="set_De_Stop(1, (form = rowForm))"
+ >鍙嶇鐢�</el-button
+ >
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-download"
+ size="mini"
+ @click="handleExport"
+ >瀵煎嚭</el-button
+ >
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-download"
+ size="mini"
+ @click="handleRowHide"
+ >闅愯棌鍒楄缃�</el-button
+ >
+ </el-col>
+ <el-col :span="1.5" class="zy-hidden">
+ <el-button type="primary" icon="el-icon-help" size="mini" @click="handleSearch"
+ >鎼� 绱�</el-button
+ >
+ </el-col>
+ <el-col :span="1.5" class="zy-hidden">
+ <el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery"
+ >閲� 缃�</el-button
+ >
+ </el-col>
+ <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
+ </el-row>
+ <div class="tableBox" v-loading="loading">
+ <el-table
+ :data="tableData"
+ ref="tableData"
+ max-height="750"
+ :summary-method="getSummaries"
+ @selection-change="handleSelectionChange"
+ show-summary
+ border
+ @row-click="handleRowClick"
+ :row-style="rowStyle"
+ @cell-dblclick="handleDblclick"
+ v-if="tableShow"
+ >
+ <template v-for="(item, index) in btList">
+ <el-table-column
+ type="selection"
+ width="55"
+ align="center"
+ :fixed="item.fixed"
+ v-if="item.type == 'checkbox'"
+ :key="index"
+ />
+ <el-table-column
+ :align="item.align"
+ :prop="item.field"
+ :label="item.title"
+ :width="item.width"
+ :key="item.sorderid"
+ v-else-if="!item.hide && item.type != 'checkbox'"
+ :sortable="item.sort"
+ show-overflow-tooltip
+ :fixed="item.fixed"
+ >
+ <template slot-scope="{ row, column }">
+ <el-checkbox v-model="checked" v-if="item.type == 'checkbox'"></el-checkbox>
+ <div :style="item.style">
+ <span v-if="column.property.includes('鏃ユ湡')">{{
+ parseTime(row[column.property], "{y}-{m}-{d}")
+ }}</span>
+
+ <el-button
+ type="text"
+ @click.stop="handleEdit(row, (OperationType = 3))"
+ v-else-if="column.property == '浠撳簱浠g爜'"
+ >{{ row.浠撳簱浠g爜 }}</el-button
+ >
+ <span v-else>{{ row[column.label] }}</span>
+ </div>
+ </template>
+ </el-table-column>
+ </template>
+ </el-table>
+ <pagination
+ v-show="total > 0"
+ :total="total"
+ :page.sync="page"
+ :limit.sync="pageSize"
+ :pageSizes="pageSizes"
+ @pagination="getList"
+ />
+ <el-dialog
+ title="闅愯棌鍒楄缃�"
+ :visible.sync="openRowHide"
+ width="816px"
+ append-to-body
+ >
+ <RowSettings
+ :colName="btResList"
+ :HModName="HModName"
+ @rowEditClose="rowSetClose"
+ v-if="rowHideShow"
+ />
+ </el-dialog>
+ <!-- 缂栬緫 -->
+ <el-dialog
+ title="缂栬緫浠撳簱"
+ :visible.sync="openEdit"
+ width="1480px"
+ append-to-body
+ class="xsckdBox"
+ :before-close="close"
+ @close="editBeforeCloseHandle"
+ >
+ <edit
+ :OperationType="OperationType"
+ :linterid="this.rowForm.HItemID"
+ :HSouceBillType="this.rowForm.HSourceBillType"
+ :copyType="copyType"
+ @editCloseGy="editGyClose"
+ v-if="editShow"
+ ref="editRef"
+ />
+ </el-dialog>
+ <el-dialog
+ :title="upload.title"
+ :visible.sync="upload.open"
+ width="1500px"
+ append-to-body
+ >
+ <div style="margin-top: -20px">
+ <el-button type="primary" @click="set_AddNew">瀵煎叆鏁版嵁</el-button>
+ <el-button type="primary" @click="upload.open = false">閫� 鍑�</el-button>
+ <el-upload
+ ref="upload"
+ :limit="1"
+ accept=".xlsx, .xls"
+ style="display: inline-block; margin-left: 10px"
+ :action="upload.url + '?updateSupport=' + upload.updateSupport"
+ :disabled="upload.isUploading"
+ :on-progress="handleFileUploadProgress"
+ :on-success="handleFileSuccess"
+ >
+ <el-button type="primary">鏂囦欢涓婁紶</el-button>
+ </el-upload>
+ </div>
+ <el-table
+ :data="uploadData"
+ v-loading="uploadTableLoading"
+ :row-class-name="uploadDataIndex"
+ border
+ height="550"
+ >
+ <el-table-column type="index" label="搴忓彿" width="55" align="center" />
+ <el-table-column label="浠撳簱浠g爜" align="center" width="120" />
+ <el-table-column label="浠撳簱鍚嶇О" prop="浠撳簱鍚嶇О" align="center" width="120" />
+ <el-table-column label="鑱旂郴鐢佃瘽" prop="鑱旂郴鐢佃瘽" align="center" width="120" />
+ <el-table-column label="鑱屽憳浠g爜" prop="鑱屽憳浠g爜" align="center" width="120" />
+ <el-table-column label="鑱屽憳鍚嶇О" prop="鑱屽憳鍚嶇О" align="center" width="120" />
+ <el-table-column label="澶囨敞" prop="澶囨敞" align="center" width="120" />
+ <el-table-column label="鎿嶄綔" align="center">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ @click="uploadDataDelete(scope.row)"
+ >鍒犻櫎</el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
+ <pagination
+ v-show="uploadTotal > 0"
+ :total="uploadTotal"
+ :page.sync="uploadPage"
+ :limit.sync="uploadPageSize"
+ :pageSizes="uploadPageSizes"
+ @pagination="currentPage"
+ />
+ </el-dialog>
+ </div>
+ </div>
+</template>
+
+<script>
+import axios from "axios";
+import RowSettings from "@/views/component/rowSettings";
+import Edit from "@/views/basic/gyWarehouse/gyWarehouseEdit";
+import gyWarehouse from "@/views/basic/gyWarehouse/gyWarehouse";
+
+export default {
+ name: "GyWarehouse",
+ components: { RowSettings, Edit, gyWarehouse },
+ props: {
+ openPage: { type: String },
+ },
+ data() {
+ return {
+ editRef: null,
+ activeSeach: "",
+ HModName: "Gy_Warehouse",
+ activeSeach: "",
+ editShow: false,
+ openEdit: false,
+ totalNameList: [],
+ tableShow: true,
+ openPrintList: false,
+ printListShow: false,
+ HClassTag: "ForFilteringSchemes", //杩囨护鏉′欢鐨刢lass绫�
+ HBillType: "Gy_Warehouse",
+ openBtnHide: false,
+ btnHideShow: false,
+ rowHideShow: false,
+ openRowHide: false,
+ copyType: 0,
+ comparatorList: [
+ { label: "=", value: "=" },
+ { label: ">=", value: ">=" },
+ { label: ">", value: ">" },
+ { label: "<=", value: "<=" },
+ { label: "<", value: "<" },
+ { label: "<>", value: "<>" },
+ { label: "鍖呭惈", value: "7" },
+ { label: "宸﹀寘鍚�", value: "8" },
+ { label: "鍙冲寘鍚�", value: "9" },
+ { label: "涓嶅寘鍚�", value: "10" },
+ ],
+ sWhere: "",
+ sTime: "",
+ eTime: "",
+ rqsgList: [
+ { label: "浠婂ぉ", value: 0 },
+ { label: "杩戜袱澶�", value: 1 },
+ { label: "杩戜笁澶�", value: 2 },
+ { label: "杩戝洓澶�", value: 3 },
+ { label: "杩戜簲澶�", value: 4 },
+ { label: "杩戝叚澶�", value: 5 },
+ { label: "杩戜竷澶�", value: 6 },
+ { label: "杩�30澶�", value: 29 },
+ { label: "杩戝崐骞�", value: 180 },
+ { label: "杩戜竴骞�", value: 365 },
+ ],
+ hPriceTypeList: ["鎴愭湰浠�", "缁撶畻浠�"],
+ addBtnShow: false,
+ zbIndex: null,
+ zbSelForm: {}, //瀛愯〃閫変腑鏁版嵁
+ dialogTypeNum: null, //閮ㄩ棬寮圭獥1锛屼粨搴撳脊绐�2
+ deptShow: false, //閮ㄩ棬鏁版嵁缁勪欢
+ warehouseShow: false, //浠撳簱鏁版嵁缁勪欢
+ materialShow: false, //鐗╂枡鏁版嵁缁勪欢
+ deptform: {}, //寮圭獥閫変腑鏁版嵁
+ openData: false, //鏁版嵁寮圭獥
+ dialogTitle: "",
+ zuzhiId: "",
+ organizationList: JSON.parse(sessionStorage["organizationList"]), //缁勭粐鍒楄〃
+ subDisabled: false, //缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
+ OperationType: null, //淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
+ HInterID: null,
+ baseURL: process.env.VUE_APP_BASE_API,
+ currentRow: [],
+ lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
+ lastSelectedRow: null, // 涓婁竴娆¢�変腑鐨勮
+ selectedRow: null, // 褰撳墠閫変腑鐨勮
+ rowForm: {},
+ checkedSysZb: [],
+ editData: [], //鐢熶骇璧勬枡瀛愯〃
+ editBtData: [], //瀛愯〃琛ㄥご
+ activeName: "first",
+ searchOpen: false,
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
+ // 鏃ユ湡鑼冨洿
+ dateRange: [],
+ // 鏌ヨ鍙傛暟
+ queryParams: {
+ HOrgID: sessionStorage["OrganizationID"],
+ HName: null,
+ HNumber: null,
+ Comparator1: "",
+ Comparator2: "",
+ Comparator: "",
+ ColContent1: "",
+ ColContent2: "",
+ ColContent: "",
+ },
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 閬僵灞�
+ loading: true,
+ tyResList: [], //閿�鍞嚭搴撳垪琛紙鎺ュ彛鏁版嵁锛�
+ btList: [], //閿�鍞嚭搴撹〃澶村垪琛ㄦ樉绀�
+ btResList: [],
+ tableData: [], //閿�鍞嚭搴撳垪琛�(鍒嗛〉鏄剧ず)
+ dataList: [],
+ titleData: ["HItemID", "HParentID"], //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ pageSizes: [50, 100, 500, 5000, 50000],
+ page: 1,
+ pageSize: 50,
+ total: 0,
+ scollHeight: document.body.clientHeight * (38.056 / 100),
+ // 琛ㄥ崟鍙傛暟
+ form: {},
+ // 琛ㄥ崟鏍¢獙
+ rules: {
+ HSupName: [{ required: true, message: "瀹㈡埛涓嶈兘涓虹┖", trigger: "blur" }],
+ HDate: [{ required: true, message: "鏃ユ湡涓嶈兘涓虹┖", trigger: "blur" }],
+ HExRate: [{ required: true, message: "姹囩巼涓嶈兘涓虹┖", trigger: "blur" }],
+ },
+ upload: {
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁绂佺敤涓婁紶
+ isUploading: false,
+ // 鏄惁鏇存柊宸茬粡瀛樺湪鐨勬暟鎹�
+ updateSupport: 0,
+ // 璁剧疆涓婁紶鐨勮姹傚ご閮�
+ // headers: { Authorization: "Bearer " + getToken() },
+ // 涓婁紶鐨勫湴鍧�
+ url: "http://47.96.97.237/API/Gy_Source/Gy_Source_Excel",
+ },
+ uploadData: [],
+ alluploadList: [],
+ uploadTableLoading: false,
+ uploadPageSizes: [50, 100, 500, 5000, 50000],
+ uploadPage: 1,
+ uploadPageSize: 50,
+ uploadTotal: 0,
+ };
+ },
+ created() {
+ this.handleQuery();
+ this.riqiChange();
+ },
+ methods: {
+ editBeforeCloseHandle() {
+ this.$refs.editRef.close();
+ },
+ // 浠撳簱鍚屾
+ async handleSync() {
+ try {
+ let res = await axios.get(this.baseURL + "/Gy_Warehouse/Gy_WarehouseViewApi", {
+ params: {
+ Number: this.queryParams.HSyncNumber,
+ Type: "CK",
+ HUseOrgID: this.queryParams.HOrgID,
+ },
+ });
+ console.log(res.data);
+ let { count, Message } = res.data;
+
+ if (count == 1) {
+ this.$modal.msgSuccess(Message);
+ } else {
+ this.$modal.msgError(`鎺ュ彛璇锋眰澶辫触: ${Message}`);
+ }
+ } catch (err) {
+ this.$modal.msgError(`鎺ュ彛璇锋眰澶辫触: ${err}`);
+ }
+ },
+ getSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ return;
+ }
+ const values = data.map((item) => Number(item[column.property]));
+ if (this.totalNameList[index].totalRow) {
+ if (!values.every((value) => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr);
+ if (!isNaN(value)) {
+ return prev + curr;
+ } else {
+ return prev;
+ }
+ }, 0);
+ } else {
+ sums[index] = "";
+ }
+ }
+ }, 1000);
+ return sums;
+ },
+
+ //#region 鑾峰彇鍏徃鍚嶏紝鏍规嵁鍏徃杩涜瀹氬埗鍖栧紑鍙�
+ defaintOperationByCompanyName() {
+ var result = false;
+ axios
+ .get(this.baseURL + "/Xt_getInfo/getCompanyName")
+ .then((response) => {
+ var data1 = response.data;
+ if (data1.count == 1) {
+ if (data1.data == "姘村姟") {
+ result = true;
+ }
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ return result;
+ },
+ handleBtnHide() {
+ this.btnHideShow = true;
+ this.openBtnHide = true;
+ },
+ handleRowHide() {
+ this.rowHideShow = true;
+ this.openRowHide = true;
+ },
+ rowSetClose(val) {
+ this.rowHideShow = false;
+ this.tableShow = true;
+ this.openRowHide = val;
+ this.getList();
+ },
+ riqiChange() {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * this.queryParams.HInitTimeCycle);
+ const yyyyS = start.getFullYear();
+ const mmS = String(start.getMonth() + 1).padStart(2, "0"); // 鏈堜唤鏄粠0寮�濮嬬殑
+ const ddS = String(start.getDate()).padStart(2, "0");
+ const yyyyE = end.getFullYear();
+ const mmE = String(end.getMonth() + 1).padStart(2, "0"); // 鏈堜唤鏄粠0寮�濮嬬殑
+ const ddE = String(end.getDate()).padStart(2, "0");
+ this.sTime = yyyyS + "-" + mmS + "-" + ddS;
+ this.eTime = yyyyE + "-" + mmE + "-" + ddE;
+ this.dateRange = [this.sTime, this.eTime];
+ },
+ organizationChange(val) {
+ // let options=undefined
+ // this.form=this.organizationList.find(option => option.ID === val)?.Name || '';
+ },
+ //閮ㄩ棬寮圭獥璧嬪��
+ dbEmitData(deptRow, num) {
+ // num=1閮ㄩ棬 num=2鍑哄簱浠撳簱
+ if (num == 1) {
+ this.form.HDeptName = deptRow.閮ㄩ棬鍚嶇О;
+ this.form.HDeptID = deptRow.HItemID;
+ this.form.HEmpID = deptRow.HEmpID;
+ this.form.HManagerName = deptRow.璐熻矗浜�;
+ this.openData = false;
+ } else if (num == 2) {
+ this.editData[this.zbIndex].HWHID = deptRow.HItemID;
+ this.editData[this.zbIndex].鍙戣揣浠撳簱 = deptRow.浠撳簱鍚嶇О;
+ this.openData = false;
+ } else if (num == 3) {
+ this.editData[this.zbIndex].HMaterID = deptRow.HItemID;
+ this.editData[this.zbIndex].鐗╂枡浠g爜 = deptRow.鐗╂枡浠g爜;
+ this.editData[this.zbIndex].鐗╂枡鍚嶇О = deptRow.鐗╂枡鍚嶇О;
+ this.editData[this.zbIndex].HUnitID = deptRow.HUnitID;
+ this.editData[this.zbIndex].瑙勬牸鍨嬪彿 = deptRow.瑙勬牸鍨嬪彿;
+ this.editData[this.zbIndex].璁¢噺鍗曚綅 = deptRow.璁¢噺鍗曚綅鍚嶇О;
+ this.editData[this.zbIndex].HTaxPrice = deptRow.鍚◣鎴愭湰浠�;
+ this.editData[this.zbIndex].HTaxRate = deptRow.榛樿绋庣巼;
+ this.openData = false;
+ }
+ },
+ emitData(deptRow, num) {
+ this.dialogTypeNum = num;
+ this.deptform = deptRow;
+ },
+ deptClickSub() {
+ this.dbEmitData(this.deptform, this.dialogTypeNum);
+ this.deptform = {};
+ },
+ getList() {
+ this.tableShow = false;
+ this.loading = true;
+ if (this.pageSize == 0) {
+ this.pageSize = 50;
+ }
+ // this.queryParams.HOrgID = 100038
+ this.sWhere += "";
+ //鐢熶骇璧勬枡鍒楄〃
+ axios
+ .get(this.baseURL + "/Gy_Property/listPage", {
+ params: {
+ sWhere: `${this.sWhere}`,
+ user: sessionStorage["HUserName"],
+ page: this.page,
+ size: this.pageSize,
+ },
+ })
+ .then((response) => {
+ this.tyResList = response.data.data; //鎬绘暟鎹�
+ let data1 = response.data;
+ let option = [];
+ if (data1.code == 1) {
+ this.btResList = data1.list; //鐢熶骇璧勬枡鎺ュ彛琛ㄥご鏁版嵁
+ this.total = data1.count;
+ var data = []; //鍒楀瓧娈垫暟鎹�
+ var col = [];
+ var totalArray = ["浠舵暟"];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {
+ //寰簭閬嶅巻鏁扮粍
+ data.push({
+ id: data1.list[key].ColmCols,
+ name: data1.list[key].ColmCols,
+ Type: data1.list[key].ColmType,
+ }); //浠庢瘡涓璞′腑鎻愬彇鏁版嵁
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: "checkbox", fixed: "left", totalRowText: "鍚堣" });
+ for (var i = 0; i < data.length; i++) {
+ //閬嶅巻data鏁扮粍閲嶇殑鏁版嵁
+ if (this.titleData.indexOf(data[i].name) > -1) {
+ //妫�鏌ata銆恑銆�.name鏄惁鍦ㄦ暟缁勪腑 //璁$畻鍒�
+ col.push({
+ field: data[i].id,
+ title: data[i].name,
+ align: "center",
+ hide: true,
+ }); //闅愯棌id鍒�
+ } else if (
+ totalArray.indexOf(data[i].name) > -1 ||
+ data[i].Type == "Decimal" ||
+ data[i].Type == "Int32"
+ ) {
+ //璁$畻鍒�
+ col.push({
+ field: data[i].id,
+ title: data[i].name,
+ align: "center",
+ sort: true,
+ totalRow: true,
+ width: 120,
+ });
+ } else {
+ col.push({
+ field: data[i].id,
+ title: data[i].name,
+ align: "center",
+ sort: true,
+ width: 200,
+ });
+ }
+ }
+ option.cols = [col];
+ this.dataList = option;
+ option.data = data1.data;
+ var result = data1.data;
+ var temp = "";
+ for (var i = 0; i < result.length; i++) {
+ if (temp != result[i]["HItemID"]) {
+ temp = result[i]["HItemID"];
+ } else {
+ result[i].鏃ユ湡 = null;
+ result[i].鍗曟嵁鍙� = "";
+ /*result[i].鐘舵�� = "";*/
+ result[i].绾㈣摑鍗曟爣璁� = "";
+ result[i].hsupid = "";
+ result[i].瀹㈡埛 = "";
+ result[i].HEmpID = "";
+ result[i].涓氬姟鍛� = "";
+ result[i].hmanagerid = "";
+ result[i].涓荤 = "";
+ result[i].hsecmanagerid = "";
+ result[i].鍙戣揣浜� = "";
+ result[i].hkeeperid = "";
+ result[i].淇濈鍛� = "";
+ result[i].HDeptID = "";
+ result[i].閮ㄩ棬 = "";
+ result[i].閿�鍞柟寮� = "";
+ }
+ }
+ option.data = result;
+ this.DisPlay_HideColumn(
+ this.HModName,
+ sessionStorage["HUserName"],
+ option,
+ this.dataList
+ );
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ DisPlay_HideColumn(HModName, user, option, dataOption) {
+ this.totalNameList = [];
+ axios
+ .get(this.baseURL + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
+ params: {
+ HModName: HModName,
+ user: user,
+ },
+ })
+ .then((res) => {
+ let data1 = res.data;
+ if (data1.data.length != 0) {
+ var dataCol = []; //鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var newCols = [[]]; //瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+ newCols[0].push(option.cols[0][0]); //鏀惧叆绗竴涓猚heckbox
+ dataCol = data1.data[0].HGridString.split(",");
+ //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+ if (dataCol.length == option.cols[0].length - 1) {
+ //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+ for (var j = 0; j < option.cols[0].length - 1; j++) {
+ for (var i = 0; i < option.cols[0].length - 1; i++) {
+ var dataCols = dataCol[j].split("|");
+ //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+ if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] =
+ "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //鏄剧ず鍒�
+ if (
+ dataCols[1] == 0 &&
+ this.titleData.indexOf(option.cols[0][i + 1]["title"]) == -1
+ ) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
+ } else {
+ option.cols[0][i + 1]["totalRow"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ newCols[0].push(option.cols[0][i + 1]);
+ break;
+ }
+ }
+ }
+ //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+ if (dataCol.length == newCols[0].length - 1) {
+ option.cols = newCols;
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i + 1]["fixed"] != null) {
+ option.cols[0][i + 1]["fixed"] = null;
+ } else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if (
+ dataOption.cols[0].indexOf(option.cols[0][i + 1]["title"]) != -1
+ ) {
+ data1.data[0].HFixCols += 1;
+ }
+
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ //璁剧疆鍒楁帓搴�
+ for (var i = 1; i < option.cols[0].length; i++) {
+ if (data1.data[0].HSortFlag == "鏄�") {
+ option.cols[0][i]["sort"] = true;
+ } else {
+ option.cols[0][i]["sort"] = false;
+ }
+ }
+ }
+ }
+ this.btList = option.cols[0];
+ this.btList.map((item) => {
+ if (!item.hide) {
+ this.totalNameList.push(item);
+ }
+ });
+ if (data1.data[0].HPageSize == 0) {
+ this.pageSize = 50;
+ } else {
+ this.pageSize = data1.data[0].HPageSize;
+ }
+ this.tableData = option.data;
+ this.tableShow = true;
+ this.loading = false;
+ } else {
+ this.btList = dataOption.cols[0];
+ this.btList.map((item) => {
+ if (!item.hide) {
+ this.totalNameList.push(item);
+ }
+ });
+ this.tableData = dataOption.data;
+ this.tableShow = true;
+ this.loading = false;
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ renderHeader(h, { column, $index }) {
+ // 鏂板缓涓�涓� span
+ let span = document.createElement(span); // 璁剧疆琛ㄥご鍚嶇О
+ span.innerText = column.label;
+ //涓存椂鎻掑叆 document
+ document.body.appendChild(span); // 閲嶇偣:鑾峰彇 span 鏈�灏忓搴︼紝璁剧疆褰撳墠鍒楋紝娉ㄦ剰杩欓噷鍔犱簡 20锛屽瓧娈佃緝澶氭椂column.minWidth=span.getBoundingClientRect().width + 50.//绉婚櫎 document 涓复鏃剁殑 span
+ document.body.removeChild(span);
+ return h(span, column.label);
+ },
+ //鐐瑰嚮琛�
+ handleRowClick(row, column, event) {
+ this.lastSelectedRow = this.selectedRow; // 璁板綍涓婁竴娆¢�変腑鐨勮
+ this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
+ if (this.checkIsIframe()) {
+ // 灏嗗綋鍓嶉�変腑鐨勬暟鎹毚闇插埌window涓�
+ window.selectedRow = row;
+ }
+ this.lastSelectedRowIndex = this.tableData.indexOf(row);
+ this.$refs.tableData.toggleRowSelection(row);
+ if (this.openPage) {
+ this.$emit("deptEmit", row, 'gyProperty');
+ }
+ },
+ //閫変腑琛岄珮浜牱寮�
+ rowStyle({ row, rowIndex }) {
+ if (this.ids.includes(row.HItemID)) {
+ return { background: "#ecf5ff" };
+ }
+ },
+ checkIsIframe() {
+ if (window.self == window.top) {
+ return false;
+ }
+ return true;
+ },
+ //鍙屽嚮琛�
+ handleDblclick(row, column, cell, event) {
+ if (this.checkIsIframe()) {
+ // IFrame 鍙屽嚮 杩斿洖褰撳墠鍙屽嚮鐨勬暟鎹�
+ window.parent.iframePropertyCallBack(row);
+ return;
+ }
+ this.OperationType = 3;
+ if (this.openPage) {
+ this.$emit("deptEmitDb", row, 'gyProperty');
+ } else {
+ this.handleEdit(row);
+ }
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ // this.rowForm = {}
+ if (this.openPage) {
+ //鍒楄〃鍗曢��
+ if (selection.length > 1) {
+ const del_row = selection.shift();
+ this.$refs.tableData.toggleRowSelection(del_row, false); //璁剧疆杩欎竴琛屽彇娑堥�変腑
+ }
+ this.rowForm = {};
+ this.ids = selection.map((item) => item.HItemID);
+ this.rowForm = selection[0];
+ } else {
+ this.ids = selection.map((item) => item.HItemID);
+ this.single = selection.length != 1;
+ this.multiple = !selection.length;
+ if (!this.single) {
+ this.rowForm = selection[0];
+ }
+ }
+ },
+ //鎵撳紑渚ц竟鎼滅储寮圭獥
+ handleSearch() {
+ this.searchOpen = true;
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.sWhere = "";
+ if (this.queryParams.ColName && this.queryParams.Comparator) {
+ var com = "";
+ switch (this.queryParams.Comparator) {
+ case "7":
+ com = "like'%" + this.queryParams.ColContent + "%'";
+ break;
+ case "8":
+ com = "like'%" + this.queryParams.ColContent + "'";
+ break;
+ case "9":
+ com = "like'" + this.queryParams.ColContent + "%'";
+ break;
+ case "10":
+ com = "not like'%" + this.queryParams.ColContent + "%'";
+ break;
+ default:
+ com =
+ "" + this.queryParams.Comparator + "'" + this.queryParams.ColContent + "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName + " " + com;
+ }
+ if (this.queryParams.ColName1 && this.queryParams.Comparator1) {
+ var com1 = "";
+ switch (this.queryParams.Comparator1) {
+ case "7":
+ com1 = "like'%" + this.queryParams.ColContent1 + "%'";
+ break;
+ case "8":
+ com1 = "like'%" + this.queryParams.ColContent1 + "'";
+ break;
+ case "9":
+ com1 = "like'" + this.queryParams.ColContent1 + "%'";
+ break;
+ case "10":
+ com1 = "not like'%" + this.queryParams.ColContent1 + "%'";
+ break;
+ default:
+ com1 =
+ "" +
+ this.queryParams.Comparator1 +
+ "'" +
+ this.queryParams.ColContent1 +
+ "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName1 + " " + com1;
+ }
+ if (this.queryParams.ColName2 && this.queryParams.Comparator2) {
+ var com2 = "";
+ switch (this.queryParams.Comparator2) {
+ case "7":
+ com2 = "like'%" + this.queryParams.ColContent2 + "%'";
+ break;
+ case "8":
+ com2 = "like'%" + this.queryParams.ColContent2 + "'";
+ break;
+ case "9":
+ com2 = "like'" + this.queryParams.ColContent2 + "%'";
+ break;
+ case "10":
+ com2 = "not like'%" + this.queryParams.ColContent2 + "%'";
+ break;
+ default:
+ com2 =
+ "" + this.queryParams.Comparator + "'" + this.queryParams.ColContent + "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
+ }
+ if (this.queryParams.HNumber) {
+ this.sWhere += " and 杈呭姪灞炴�т唬鐮� like '%" + this.queryParams.HNumber + "%'";
+ }
+ if (this.queryParams.HName) {
+ this.sWhere += " and 杈呭姪灞炴�у悕绉� like '%" + this.queryParams.HName + "%'";
+ }
+ // if (this.queryParams.HOrgID) {
+ // this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'";
+ // }
+ // this.sWhere += this.addSWhereByOpenType()
+ // this.sWhere += this.getOrgIDByUser()
+ this.searchOpen = false;
+ this.getList();
+ },
+ // 鍒ゆ柇鏄洿鎺ユ墦寮�椤甸潰杩樻槸鍏跺畠椤甸潰閫氳繃閫夋嫨鎸夐挳鎵撳紑锛屽苟鏄剧ず鐩稿簲鏁版嵁
+ addSWhereByOpenType() {
+ //鑾峰彇鍙傛暟
+ var sWhere = "";
+ //this.openPage鍒ゆ柇鏄惁鏈夊�硷紝鏈変唬琛ㄥ叾瀹冮〉闈㈤�氳繃閫夋嫨鎸夐挳鎵撳紑
+ if (this.openPage) {
+ sWhere += " and 绂佺敤鏍囪 != 'Y' and ISNULL(瀹℃牳浜�,'') != ''";
+ return sWhere;
+ }
+ return sWhere;
+ },
+ //鏍规嵁鐢ㄦ埛鑾峰彇鐢ㄦ埛鍏宠仈缁勭粐鐨勮繃婊ゆ潯浠�
+ getOrgIDByUser() {
+ var res = "";
+ axios
+ .get(this.baseURL + "/Xt_User/getOrgIDListByUser", {
+ params: {
+ HModName: this.HModName,
+ user: sessionStorage["HUserName"],
+ HOrgID: this.zuzhiId,
+ },
+ })
+ .then((response) => {
+ let result = response.data;
+ if (result.count == 1) {
+ if (result.data[0].sWhere == "1") {
+ res = " and HUSEORGID = '" + this.zuzhiId + "'";
+ } else {
+ res = result.data[0].sWhere;
+ }
+ }
+ })
+ .catch((error) => {
+ res = " and 1 = 0";
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ return res;
+ },
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.dateRange = [];
+ this.sWhere = "";
+ this.queryParams = {
+ HBillNo: "",
+ HInitTimeCycle: 29,
+ HProjectNumber: "",
+ HCusID: null,
+ HMaterNumber: "",
+ HMaterName: "",
+ ColName1: "",
+ ColName2: "",
+ ColName: "",
+ Comparator1: "",
+ Comparator2: "",
+ Comparator: "",
+ ColContent1: "",
+ ColContent2: "",
+ ColContent: "",
+ HSyncNumber,
+ };
+ this.riqiChange();
+ this.resetForm("queryForm");
+ this.getList();
+ },
+
+ //閫�鍑�
+ close() {
+ this.tableShow = false;
+ this.openEdit = false;
+ this.getList();
+ },
+ //鎵撳紑鏂板缁勪欢寮圭獥
+ handleAddEdit() {
+ this.rowForm.HItemID = 0;
+ this.$nextTick(() => {
+ this.openEdit = true;
+ this.editShow = true;
+ });
+ },
+ //鎵撳紑淇敼缁勪欢寮圭獥
+
+ handleEdit(row) {
+ this.rowForm = row
+ this.$nextTick(() => {
+ this.openEdit = true;
+ this.editShow = true;
+ });
+ },
+ //鍏抽棴缂栬緫椤甸潰
+ editGyClose(val) {
+ this.editShow = false;
+ this.openEdit = false;
+ (this.multiple = true), this.getList();
+ },
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete() {
+ this.$modal
+ .confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠")
+ .then(() => {
+ if (!this.rowForm.瀹℃牳浜�) {
+ axios
+ .get(this.baseURL + "/DeltetGy_Warehouse", {
+ params: {
+ HItemID: this.rowForm.HItemID.toString(),
+ user: sessionStorage["HUserName"],
+ },
+ })
+ .then((response) => {
+ if (response.data.count == 1) {
+ this.getList();
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ } else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message);
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ } else {
+ this.$modal.msgError("姝ゆ潯鏁版嵁涓嶆槸鍒涘缓鐘舵��,鏃犳硶鍒犻櫎!");
+ }
+ })
+ .catch(() => {});
+ },
+ // 鍙嶅鏍�/瀹℃牳鏁版嵁
+ set_CheckBill(num, form) {
+ var InterID = form.HItemID || form.HInterID;
+ //閫昏緫瀹℃牳鏂规硶
+ axios
+ .get(this.baseURL + "/Gy_Warehouse/AuditGy_Warehouse", {
+ params: {
+ HInterID: InterID,
+ IsAudit: num,
+ CurUserName: sessionStorage["HUserName"],
+ },
+ })
+ .then((response) => {
+ let result = response.data;
+ if (result.code == 1) {
+ this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
+ this.getList();
+ } else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message);
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ // 鍙嶇鐢�/绂佺敤鏁版嵁
+ set_De_Stop(num, form) {
+ var InterID = form.HItemID || form.HInterID;
+ //閫昏緫瀹℃牳鏂规硶
+ axios
+ .get(this.baseURL + "/Gy_Warehouse/StopGy_Warehouse", {
+ params: {
+ HInterID: InterID,
+ IsStop: num,
+ CurUserName: sessionStorage["HUserName"],
+ },
+ })
+ .then((response) => {
+ let result = response.data;
+ if (result.code == 1) {
+ this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
+ this.getList();
+ } else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message);
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ //瀵煎嚭
+ handleExport() {
+ const ws = this.$XLSX.utils.json_to_sheet(this.tyResList); // 灏嗘暟鎹浆鎹负宸ヤ綔琛�
+ const wb = this.$XLSX.utils.book_new(); // 鍒涘缓涓�涓柊鐨勫伐浣滅翱
+ this.$XLSX.utils.book_append_sheet(wb, ws, "Sheet1"); // 灏嗗伐浣滆〃娣诲姞鍒板伐浣滅翱涓紝骞跺懡鍚嶄负"Sheet1"
+ this.$XLSX.writeFile(wb, `gyWarehouse_${new Date().getTime()}.xlsx`); // 瀵煎嚭鏂囦欢
+ },
+ handleImport() {
+ this.uploadData = [];
+ this.upload.isUploading = false;
+ this.upload.title = "瀵煎叆";
+ this.upload.open = true;
+ },
+ // 鏂囦欢涓婁紶涓鐞�
+ handleFileUploadProgress(event, file, fileList) {
+ this.upload.isUploading = true;
+ this.uploadTableLoading = true;
+ },
+ // 鏂囦欢涓婁紶鎴愬姛澶勭悊
+ handleFileSuccess(response, file, fileList) {
+ // this.upload.open = false;
+ this.upload.isUploading = true;
+ this.$refs.upload.clearFiles();
+ if (response.code == 1) {
+ this.alluploadList = response.data;
+ this.uploadData = this.getPage(this.uploadPage, this.alluploadList);
+ this.uploadTotal = this.alluploadList.length;
+ this.uploadTableLoading = false;
+ // this.set_AddNew(response.data)
+ } else {
+ this.$alert(
+ "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+ response.Message +
+ "</div>",
+ "瀵煎叆缁撴灉",
+ { dangerouslyUseHTMLString: true }
+ );
+ }
+ },
+ // 鎻愪氦涓婁紶鏂囦欢
+ submitFileForm() {
+ this.$refs.upload.submit();
+ },
+ set_AddNew() {
+ var num = [];
+ for (var i = 0; i < this.uploadData.length; i++) {
+ if (this.uploadData[i] != "") {
+ num.push(this.uploadData[i]);
+ }
+ }
+ var sSubStr = JSON.stringify(num);
+ var sMainSub = sSubStr + "&鍜�" + sessionStorage["HUserName"];
+ axios({
+ method: "post",
+ url: this.baseURL + "/Gy_Warehouse/Gy_Process_Excel",
+ data: {
+ sMainSub: sMainSub,
+ },
+ })
+ .then((res) => {
+ this.$alert(
+ "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+ res.data.Message +
+ "</div>",
+ "瀵煎叆缁撴灉",
+ { dangerouslyUseHTMLString: true }
+ );
+ this.upload.open = false;
+ this.getList();
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ uploadDataIndex({ row, rowIndex }) {
+ row.index = rowIndex + 1;
+ },
+ uploadDataDelete(row) {
+ this.$modal
+ .confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠")
+ .then(() => {
+ const deleteList = [row.index];
+ const data = this.uploadData;
+ this.uploadData = data.filter((item) => {
+ return deleteList.indexOf(item.index) == -1;
+ });
+ })
+ .catch(() => {});
+ },
+ getPage(page, list) {
+ let sindex = (parseInt(page) - 1) * this.uploadPageSize;
+ let eindex = parseInt(page) * this.uploadPageSize;
+ let newList = list.slice(sindex, eindex);
+ console.log(newList);
+ return newList;
+ },
+ currentPage(val) {
+ this.uploadPage = val.page;
+ setTimeout(() => {
+ this.uploadData = this.getPage(this.uploadPage, this.alluploadList);
+ }, 100);
+ },
+ },
+};
+</script>
+<style>
+.xsckdBox .el-date-editor.el-input {
+ width: 100%;
+}
+
+.form-item-inline > .el-form-item__content {
+ display: flex;
+ flex-direction: row;
+}
+
+.zy-hidden {
+ display: none;
+}
+</style>
diff --git a/src/views/basic/gyStockPlace/gyStockPlace.vue b/src/views/basic/gyStockPlace/gyStockPlace.vue
index 2fb5766..a743d1c 100644
--- a/src/views/basic/gyStockPlace/gyStockPlace.vue
+++ b/src/views/basic/gyStockPlace/gyStockPlace.vue
@@ -1,5 +1,5 @@
<template>
- <div style="padding: 10px;position: relative">
+ <div style="padding: 10px; position: relative">
<el-form
:model="queryParams"
ref="queryForm"
@@ -200,6 +200,16 @@
</el-collapse>
</el-form>
<el-row :gutter="10" class="mb8">
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-plus"
+ size="mini"
+ @click="get_PrintReport"
+ id="btn-printer"
+ >搴撲綅鐮佹墦鍗�</el-button
+ >
+ </el-col>
<el-col :span="1.5">
<el-button
type="primary"
@@ -411,6 +421,22 @@
/>
</el-dialog>
</div>
+ <el-dialog
+ title="鎵撳嵃妯℃澘閫夋嫨"
+ :visible.sync="openPrintList"
+ width="800px"
+ append-to-body
+ >
+ <PrintList
+ :linterid="encodeURI(rowSel.toString())"
+ :MyMsg="rowSel.toString()"
+ Type="HGyStockPlaceBarCode"
+ HModName="HGyStockPlaceBarCode"
+ @rowEditClose="rowSetClose"
+ v-if="printListShow"
+ />
+ <!-- <div>111</div> -->
+ </el-dialog>
</div>
</template>
@@ -419,18 +445,21 @@
import RowSettings from "@/views/component/rowSettings";
import Edit from "@/views/basic/gyStockPlace/gyStockPlaceEdit";
import GyStockPlace from "@/views/basic/gyStockPlace/gyStockPlace";
+import PrintList from "@/views/component/printList";
export default {
name: "GyStockPlace",
- components: { RowSettings, Edit, GyStockPlace },
+ components: { RowSettings, Edit, GyStockPlace, PrintList },
props: {
openPage: { type: String },
},
data() {
return {
+ rowSel: [],
+ danganSelList: [],
editRef: null,
activeSeach: "",
- HModName: "Gy_Warehouse",
+ HModName: "Gy_StockPlace",
editShow: false,
openEdit: false,
totalNameList: [],
@@ -596,6 +625,33 @@
}
} catch (err) {
this.$modal.msgError(`鎺ュ彛璇锋眰澶辫触: ${err}`);
+ }
+ },
+ get_PrintReport() {
+ if (this.danganSelList.length == 0) {
+ this.$modal.msgError("璇烽�夋嫨鏁版嵁");
+ } else {
+ this.rowSel = [];
+ for (var i = 0; i < this.danganSelList.length; i++) {
+ this.rowSel.push(`'${this.danganSelList[i]['鏉$爜缂栧彿'].toString()}'`);
+ }
+ this.printListShow = true;
+ this.openPrintList = true;
+ // axios.get(this.baseURL + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
+ // params: { HInterID: this.rowForm.hmainid },
+ // })
+ // .then((response) => {
+ // var result = response.data;
+ // if (result.count == 1) {
+ // this.printListShow = true;
+ // this.openPrintList = true;
+ // } else {
+ // this.$modal.msgError(result.code + result.Message);
+ // }
+ // })
+ // .catch((error) => {
+ // this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ // });
}
},
getSummaries(param) {
@@ -979,7 +1035,7 @@
},
//閫変腑琛岄珮浜牱寮�
rowStyle({ row, rowIndex }) {
- if (this.ids.includes(row.hmainid)) {
+ if (this.ids.includes(row.HItemID)) {
return { background: "#ecf5ff" };
}
},
@@ -994,6 +1050,9 @@
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
+ console.log(selection)
+ this.danganSelList = selection;
+
// this.rowForm = {}
if (this.openPage) {
//鍒楄〃鍗曢��
@@ -1189,7 +1248,7 @@
},
//鎵撳紑淇敼缁勪欢寮圭獥
handleEdit(row) {
- this.rowForm = row
+ this.rowForm = row;
this.$nextTick(() => {
this.openEdit = true;
this.editShow = true;
diff --git a/src/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillEdit.vue b/src/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillEdit.vue
new file mode 100644
index 0000000..1bda9e7
--- /dev/null
+++ b/src/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillEdit.vue
@@ -0,0 +1,1195 @@
+<template>
+ <div v-loading="formLoading" v-if="formShow">
+ <div style="margin-bottom: 10px; border-bottom: 1px solid #f6f6f6">
+ <!-- <el-button type="primary" @click="handleAdd(OperationType = 1)" v-if="addBtnShow">鏂板</el-button> -->
+ <el-button type="primary" @click="submitForm" :disabled="subDisabled"
+ >淇� 瀛�</el-button
+ >
+ <!-- <el-button type="primary" @click="set_CheckBill(1, form)">瀹� 鏍�</el-button> -->
+ <el-button type="primary" @click="close">閫� 鍑�</el-button>
+ <!-- <el-button @click="cancel">鍙� 娑�</el-button> -->
+ </div>
+ <div style="margin: 10px; font-size: 28px; font-weight: bold; text-align: center">
+鎵胯繍鍚堝悓
+ </div>
+ <el-form ref="form" :model="form" :rules="rules" label-width="90px">
+ <el-tabs v-model="activeName" type="card">
+ <el-tab-pane label="鍩烘湰淇℃伅" name="first">
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="鍗曟嵁鍙�" prop="HBillNo">
+ <el-input v-model="form.HBillNo" placeholder="璇疯緭鍏ュ崟鎹彿" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="绛捐鏃ユ湡" prop="HDate">
+ <el-date-picker
+ v-model="form.HDate"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ value-format="yyyy-MM-dd"
+ >
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鍚堝悓缂栧彿" prop="HContractNumber">
+ <el-input v-model="form.HContractNumber" placeholder="" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鍚堝悓鍚嶇О" prop="HContractName">
+ <el-input v-model="form.HContractName" placeholder="" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="浜よ揣鍦扮偣" prop="HAddress">
+ <el-input v-model="form.HAddress" placeholder="" />
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="6">
+ <el-form-item label="渚涘簲鍟�" prop="HSupName">
+ <el-input v-model="form.HSupName" placeholder="璇烽�夋嫨渚涘簲鍟�" disabled>
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="openDataDialog(6)"
+ ></el-button>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="涓氬姟鍛�" prop="HEmpName">
+ <el-input v-model="form.HEmpName" placeholder="璇烽�夋嫨" disabled>
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="openDataDialog(4, (empType = 1))"
+ ></el-button>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="甯佸埆" prop="HCurName">
+ <el-input v-model="form.HCurName" placeholder="璇烽�夋嫨璋冨叆甯佸埆" disabled>
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="openDataDialog(2)"
+ ></el-button>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="缁撶畻鏂瑰紡" prop="HSSName">
+ <el-input v-model="form.HSSName" placeholder="璇烽�夋嫨缁撶畻鏂瑰紡" disabled>
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="openDataDialog(5)"
+ ></el-button>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="姹囩巼" prop="HExRate">
+ <el-input v-model="form.HExRate" placeholder="" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="閮ㄩ棬" prop="HDeptName">
+ <el-input v-model="form.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" disabled>
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="openDataDialog(1)"
+ ></el-button>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="澶囨敞" prop="HRemark">
+ <el-input v-model="form.HRemark" placeholder="璇疯緭鍏ュ娉�" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="缁勭粐" prop="HSTOCKINORGID" >
+ <el-select v-model="form.HSTOCKINORGID" placeholder="璇烽�夋嫨缁勭粐" :disabled="OperationType == 3" @change="StockInOrgChangeHandler">
+ <el-option
+ v-for="(item, index) in organizationList"
+ :key="index"
+ :label="item.Name"
+ :value="item.ID.toString()"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <!-- <el-col :span="6">
+ <el-form-item label="缁勭粐" prop="HSTOCKOUTORGID">
+ <el-select v-model="form.HSTOCKOUTORGID" placeholder="璇烽�夋嫨璋冨叆缁勭粐" :disabled="OperationType == 3">
+ <el-option
+ v-for="(item, index) in organizationList"
+ :key="index"
+ :label="item.Name"
+ :value="item.ID.toString()"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col> -->
+ </el-row>
+ </el-tab-pane>
+ <el-tab-pane label="鍒跺崟淇℃伅" name="third">
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="鍒跺崟浜�" prop="HMaker">
+ <el-input v-model="form.HMaker" placeholder="璇疯緭鍏ュ埗鍗曚汉" disabled />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="淇敼浜�" prop="HUpDater">
+ <el-input v-model="form.HUpDater" placeholder="璇疯緭鍏ヤ慨鏀逛汉" disabled />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="瀹℃牳浜�" prop="HChecker">
+ <el-input v-model="form.HChecker" placeholder="璇疯緭鍏ュ鏍镐汉" disabled />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鍏抽棴浜�" prop="HCloseMan">
+ <el-input v-model="form.HCloseMan" placeholder="璇疯緭鍏ュ叧闂汉" disabled />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="鍒跺崟鏃ユ湡" prop="HMakeDate">
+ <el-date-picker
+ v-model="form.HMakeDate"
+ type="date"
+ placeholder="閫夋嫨鍒跺崟鏃ユ湡"
+ disabled
+ >
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="淇敼鏃ユ湡" prop="HUpDateDate">
+ <el-date-picker
+ v-model="form.HUpDateDate"
+ type="date"
+ placeholder="閫夋嫨瀹℃牳鏃ユ湡"
+ disabled
+ >
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="瀹℃牳鏃ユ湡" prop="HCheckDate">
+ <el-date-picker
+ v-model="form.HCheckDate"
+ type="date"
+ placeholder="閫夋嫨瀹℃牳鏃ユ湡"
+ disabled
+ >
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鍏抽棴鏃ユ湡" prop="HCloseDate">
+ <el-date-picker
+ v-model="form.HCloseDate"
+ type="date"
+ placeholder="閫夋嫨鍏抽棴鏃ユ湡"
+ disabled
+ >
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="浣滃簾浜�" prop="HDeleteMan">
+ <el-input v-model="form.HDeleteMan" placeholder="璇疯緭鍏ヤ綔搴熶汉" disabled />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="浣滃簾鏃ユ湡" prop="HDeleteDate">
+ <el-date-picker
+ v-model="form.HDeleteDate"
+ type="date"
+ placeholder="閫夋嫨浣滃簾鏃ユ湡"
+ disabled
+ >
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-tab-pane>
+ </el-tabs>
+
+ <el-tabs v-model="activeName1" type="border-card">
+ <el-tab-pane label="鏄庣粏淇℃伅" name="first">
+ <div style="margin-bottom: 10px">
+ <el-button
+ type="success"
+ plain
+ icon="el-icon-plus"
+ @click="handleAddSysZb()"
+ size="mini"
+ >澧炲姞涓�琛�</el-button
+ >
+ <el-button
+ type="success"
+ plain
+ icon="el-icon-plus"
+ @click="handleAddSysZb(zbIndex, 1)"
+ size="mini"
+ >鎻掑叆涓�琛�</el-button
+ >
+ <el-button
+ type="success"
+ plain
+ icon="el-icon-plus"
+ @click="handleCopyZbRow"
+ size="mini"
+ >澶嶅埗涓�琛�</el-button
+ >
+ <el-button
+ type="success"
+ plain
+ icon="el-icon-arrow-up"
+ @click="handleMoveRowUp(zbSelForm)"
+ size="mini"
+ >涓婄Щ</el-button
+ >
+ <el-button
+ type="success"
+ plain
+ icon="el-icon-arrow-down"
+ @click="handleMoveRowDown(zbSelForm)"
+ size="mini"
+ >涓嬬Щ</el-button
+ >
+ </div>
+ <el-table
+ :data="editData"
+ style="width: 100%"
+ height="300"
+ width="100%"
+ ref="zbTable"
+ @selection-change="handleTableZbEdit"
+ :row-class-name="rowSysZbIndex"
+ show-summary
+ border
+ >
+ <el-table-column type="selection" width="55" align="center" />
+ <el-table-column align="center" label="搴忓彿" type="index" width="80" />
+ <el-table-column align="center" label="濮嬪彂鍦�" width="120">
+ <template slot-scope="scope">
+ <el-input
+ v-model="scope.row.鍦板尯鍚嶇О"
+ placeholder="璇疯緭鍏�"
+ @keyup.native.f7="openDataDialog(3, scope.row, (areaType = 1))"
+ @dblclick.native="openDataDialog(3, scope.row, (areaType = 1))"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="鐩殑鍦�" width="120">
+ <template slot-scope="scope">
+ <el-input
+ v-model="scope.row.鐩殑鍦板悕绉�"
+ placeholder="璇疯緭鍏�"
+ @keyup.native.f7="openDataDialog(3, scope.row, (areaType = 2))"
+ @dblclick.native="openDataDialog(3, scope.row, (areaType = 2))"
+ />
+ </template>
+ </el-table-column>
+
+
+ <el-table-column align="center" label="杩愯緭鏂瑰紡" width="120">
+ <template slot-scope="scope">
+ <el-input
+ v-model="scope.row.杩愯緭鏂瑰紡鍚嶇О"
+ placeholder="璇疯緭鍏�"
+ @keyup.native.f7="openDataDialog(7, scope.row)"
+ @dblclick.native="openDataDialog(7, scope.row)"
+ />
+ </template>
+ </el-table-column>
+
+ <el-table-column align="center" label="杩愯緭绾胯矾鍚嶇О" width="120">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.HTransportLineName" placeholder="璇疯緭鍏�" />
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="璺濈锛堝叕閲岋級" width="120">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.HDistance" placeholder="璇疯緭鍏�" />
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="杩愯緭鏃舵晥" width="120">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.HTransportTimes" placeholder="璇疯緭鍏�" />
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="杩愯緭绫诲瀷" width="120">
+ <template slot-scope="scope">
+ <el-select v-model="scope.row.HTransportTyep" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="(item, index) in [
+ {
+ label: '鍗曠▼',
+ value: '鍗曠▼',
+ },
+ {
+ label: '寰�杩�',
+ value: '寰�杩�',
+ },
+ ]"
+ :key="index"
+ :label="item.label"
+ :value="item.value.toString()"
+ ></el-option>
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="杩愯緭璐圭敤" width="120">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.HMoney" placeholder="璇疯緭鍏�" />
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="鍘嗗彶杩愯緭璐圭敤" width="120">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.HMoney_His" placeholder="璇疯緭鍏�" />
+ </template>
+ </el-table-column>
+
+
+ <!-- <el-table-column align="center" label="缁勭粐" width="120">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.HSTOCKORGID" disabled />
+ </template>
+ </el-table-column> -->
+ <el-table-column align="center" label="鎿嶄綔" width="55" fixed="right">
+ <template slot-scope="scope">
+ <el-button
+ type="danger"
+ icon="el-icon-delete"
+ size="mini"
+ circle
+ @click="handleDeleteSysZb(scope.row)"
+ ></el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </el-tab-pane>
+ </el-tabs>
+ </el-form>
+ <!-- 寮圭獥 -->
+ <el-dialog
+ :title="dialogTitle"
+ :visible.sync="openData"
+ width="1280px"
+ append-to-body
+ >
+ <Dept
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="deptShow"
+ />
+ <GyEmployee
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="gyEmployeeShow"
+ />
+ <GySupplier
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="gySupplierShow"
+ />
+ <GyProperty
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="propertyShow"
+ />
+ <AreaDialog
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="AreaDialogShow"
+ />
+ <CurrencyDialog
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="CurrencyDialogShow"
+ />
+ <SettleStyleDialog
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="SettleStyleDialogShow"
+ />
+ <CarType
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="CarTypeShow"
+ />
+ <div slot="footer" class="dialog-footer">
+ <el-button type="primary" @click="deptClickSub">纭� 瀹�</el-button>
+ <el-button @click="deptClose">鍙� 娑�</el-button>
+ </div>
+ </el-dialog>
+ <el-dialog
+ title="闅愯棌鍒楄缃�"
+ :visible.sync="openRowHide"
+ width="816px"
+ append-to-body
+ >
+ <RowSettings
+ :colName="btResList"
+ :HModName="HModName"
+ @rowEditClose="rowSetClose"
+ v-if="rowHideShow"
+ />
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import axios from "axios";
+import RowSettings from "@/views/component/rowSettings";
+import GyEmployee from "@/views/basic/gyEmployee/gyEmployee.vue";
+import Dept from "@/views/basic/gy/gyDepartment";
+import GySupplier from "@/views/basic/gy/gySupplier.vue";
+import GyProperty from "@/views/basic/gyProperty/gyPropertyList.vue";
+import moment from "moment";
+import AreaDialog from "@/views/component/AreaDialog"
+import CurrencyDialog from "@/views/component/CurrencyDialog"
+import SettleStyleDialog from '@/views/component/SettleStyleDialog'
+import CarType from '@/views/basic/gyCartypelist/gyCartypelist.vue'
+
+
+export default {
+ name: "Cg_ContractTransportBillEdit",
+ components: {
+ Dept,
+ RowSettings,
+ GyEmployee,
+ GySupplier,
+ AreaDialog,
+ SettleStyleDialog,
+ CurrencyDialog,
+ GyProperty,
+ CarType,
+ },
+ props: {
+ OperationType: { type: Number },
+ linterid: { type: Number },
+ HSouceBillType: { type: String },
+ propsData: { type: String },
+ copyType: { type: Number },
+ },
+ data() {
+ return {
+ HModName: "Cg_ContractTransportBillEdit",
+ formShow: false,
+ temp: undefined,
+ formLoading: true,
+ rowHideShow: false,
+ openRowHide: false,
+ addBtnShow: false,
+ zbIndex: null,
+ zbSelForm: {}, //瀛愯〃閫変腑鏁版嵁
+ dialogTypeNum: null, //閮ㄩ棬寮圭獥1锛屼粨搴撳脊绐�2
+ deptShow: false, //閮ㄩ棬鏁版嵁缁勪欢
+ gyEmployeeShow: false, //閿�鍞憳鏁版嵁缁勪欢
+ gySupplierShow: false, //渚涘簲鍟嗘暟鎹粍浠�
+ AreaDialogShow: false, //鍦板尯鏁版嵁缁勪欢
+ CurrencyDialogShow: false, //xianjin鏁版嵁缁勪欢 CarTypeShow
+ SettleStyleDialogShow: false,
+ CarTypeShow: false,
+ propertyShow: false, // 杈呭姪灞炴�у熀纭�璧勬枡
+ areaType: 1, //鍦板尯寮圭獥鍖哄垎鏍囧織
+ empType: 1, //鑱屽憳寮圭獥鍖哄垎鏍囧織
+ deptform: {}, //寮圭獥閫変腑鏁版嵁
+ openData: false, //鏁版嵁寮圭獥
+ dialogTitle: "",
+ organizationList: [], //缁勭粐鍒楄〃
+ subDisabled: false, //缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
+ // OperationType: this.$route.query.OperationType,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼2锛�
+ HInterID: 0,
+ baseURL: process.env.VUE_APP_BASE_API,
+ checkedSysZb: [],
+ editData: [], //瀛愯〃
+ editData1: [], //姹囨�诲瓙琛�
+ editBtData: [], //瀛愯〃琛ㄥご
+ allVal: [],
+ activeName: "first",
+ activeName1: "first",
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
+ // 鏃ユ湡鑼冨洿
+ dateRange: [],
+ // 鏌ヨ鍙傛暟
+ queryParams: {
+ HBillNo: "",
+ HInitTimeCycle: 29,
+ HProjectNumber: "",
+ HCusID: null,
+ HMaterNumber: "",
+ HMaterName: "",
+ ColName1: "",
+ ColName2: "",
+ ColName: "",
+ Comparator1: "",
+ Comparator2: "",
+ Comparator: "",
+ ColContent1: "",
+ ColContent2: "",
+ ColContent: "",
+ },
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 閬僵灞�
+ loading: true,
+ btResList: [],
+ // 琛ㄥ崟鍙傛暟
+ form: {},
+ // 琛ㄥ崟鏍¢獙
+ rules: {
+ HDate: [{ required: true, message: "鏃ユ湡涓嶈兘涓虹┖", trigger: "blur" }],
+ HSupName: [{ required: true, message: "寰�鏉ュ崟浣嶄笉鑳戒负绌�", trigger: "blur" }],
+ HEmpName: [{ required: true, message: "涓氬姟鍛樹笉鑳戒负绌�", trigger: "blur" }],
+ HMangerName: [{ required: true, message: "涓荤涓嶈兘涓虹┖", trigger: "blur" }],
+ HSecManagerName: [{ required: true, message: "楠屾敹鍛樹笉鑳戒负绌�", trigger: "blur" }],
+ HKeeperName: [{ required: true, message: "淇濈鍛樹笉鑳戒负绌�", trigger: "blur" }],
+ HCurName: [{ required: true, message: "璋冨叆浠撳簱涓嶈兘涓虹┖", trigger: "blur" }],
+ HSSName: [{ required: true, message: "璋冨嚭浠撳簱涓嶈兘涓虹┖", trigger: "blur" }],
+ HDeptName: [{ required: true, message: "閮ㄩ棬涓嶈兘涓虹┖", trigger: "blur" }],
+ },
+ };
+ },
+ created() {
+ this.fetchData();
+ this.getdata();
+ },
+ methods: {
+ StockInOrgChangeHandler() {
+ this.editData.forEach(element => {
+ element.HSTOCKORGINID = this.form.HSTOCKINORGID
+ });
+ },
+ fetchData() {
+ axios
+ .get(this.baseURL + "/Web/GetOrganizations", {})
+ .then((response) => {
+ if (response.data.count == 1) {
+ this.organizationList = response.data.data; //缁勭粐鍒楄〃
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ getdata() {
+ this.formShow = false;
+ this.formLoading = true;
+ // 璋冨嚭缁勭粐榛樿涓虹櫥褰曠敤鎴风粍缁�
+ if (
+ (this.OperationType == 1 && this.copyType != 1) ||
+ (!this.OperationType && !this.copyType)
+ ) {
+ this.handleAdd();
+ } else if (this.OperationType == 3 || this.copyType == 1) {
+ this.handleUpdate();
+ }
+ },
+ // 鑾峰彇鍙傛暟_浼犻�掔殑JSON鏍煎紡鍙傛暟
+ getUrlVars_JSON() {
+ var datajson;
+ var str = this.propsData; //鑾峰彇閾炬帴涓紶閫掔殑鍙傛暟
+ var arr = str.substring(str.lastIndexOf("=") + 1);
+ datajson = JSON.parse(decodeURI(arr));
+ return datajson;
+ },
+ handleRowHide() {
+ this.rowHideShow = true;
+ this.openRowHide = true;
+ },
+ rowSetClose(val) {
+ this.rowHideShow = false;
+ this.openRowHide = val;
+ },
+
+ HStockOrgChange(val) {
+ console.log(549, val, this.zbIndex);
+ console.log(this.organizationList);
+
+ // let options=undefined
+ // this.form=this.organizationList.find(option => option.ID === val)?.Name || '';
+ },
+ //寮圭獥璧嬪��
+ dbEmitData(deptRow, num) {
+ // num=1閮ㄩ棬 num=2浠撳簱
+ console.log(deptRow, num);
+ if (deptRow.HItemID || deptRow.hmainid) {
+ if (num == 1) {
+ this.form.HDeptName = deptRow.閮ㄩ棬鍚嶇О;
+ this.form.HDeptID = deptRow.HItemID;
+ this.deptShow = false;
+ this.openData = false;
+ } else if (num == 2) {
+ this.form.HCurName = deptRow.璐у竵鍚嶇О;
+ this.form.HCurID = deptRow.HItemID;
+ this.CurrencyDialogShow = false;
+ this.openData = false;
+ } else if (num == 3) {
+ console.log(deptRow);
+ if(this.areaType==1)
+ {
+ this.editData[this.zbIndex].HBeginAddr = deptRow.HItemID;
+ this.editData[this.zbIndex].鍦板尯浠g爜 = deptRow.鍦板尯浠g爜;
+ this.editData[this.zbIndex].鍦板尯鍚嶇О = deptRow.鍦板尯鍚嶇О;
+ }
+ else
+ {
+ this.editData[this.zbIndex].HEndAddr = deptRow.HItemID;
+ this.editData[this.zbIndex].鐩殑鍦颁唬鐮� = deptRow.鍦板尯浠g爜;
+ this.editData[this.zbIndex].鐩殑鍦板悕绉� = deptRow.鍦板尯鍚嶇О;
+ }
+ this.AreaDialogShow = false;
+ this.openData = false;
+ } else if (num == 4) {
+ if (this.empType == 1) {
+ this.form.HEmpName = deptRow.鑱屽憳鍚嶇О;
+ this.form.HEmpID = deptRow.HItemID;
+ } else if (this.empType == 2) {
+ this.form.HMangerName = deptRow.鑱屽憳鍚嶇О;
+ this.form.HMangerID = deptRow.HItemID;
+ } else if (this.empType == 3) {
+ this.form.HSecManagerName = deptRow.鑱屽憳鍚嶇О;
+ this.form.HSecManagerID = deptRow.HItemID;
+ } else if (this.empType == 4) {
+ this.form.HKeeperName = deptRow.鑱屽憳鍚嶇О;
+ this.form.HKeeperID = deptRow.HItemID;
+ } else this.gyEmployeeShow = false;
+ this.openData = false;
+ } else if (num == 6) {
+ this.form.HSupName = deptRow.渚涘簲鍟嗗悕绉�;
+ this.form.HSupID = deptRow.HItemID;
+ this.gySupplierShow = false;
+ this.openData = false;
+ } else if (num == 5) {
+ this.form.HSSName = deptRow.缁撶畻鏂瑰紡鍚嶇О;
+ this.form.HSSID = deptRow.HItemID;
+ this.form.HExRate = deptRow.姹囩巼;
+ this.SettleStyleDialogShow = false;
+ this.openData = false;
+ }else if (num == 7) {
+ this.editData[this.zbIndex].HTransportCar = deptRow.HItemID;
+ this.editData[this.zbIndex].杩愯緭鏂瑰紡鍚嶇О = deptRow.杞﹀瀷鍚嶇О;
+ this.CarTypeShow = false;
+ this.openData = false;
+ }
+ } else {
+ this.$modal.msgError("璇烽�夋嫨鍗曟潯鏁版嵁!");
+ }
+ },
+ emitData(deptRow, num) {
+ this.dialogTypeNum = num;
+ this.deptform = deptRow;
+ },
+ deptClickSub() {
+ this.dbEmitData(this.deptform, this.dialogTypeNum);
+ this.deptform = {};
+ },
+ deptClose() {
+ this.deptform = {};
+ this.openData = false;
+ },
+
+ //琛ㄥ崟鍒濆鍖�
+ reset() {
+ this.form = {
+ HBillNo: "",
+ HInterID: 0,
+ HDate: new Date(),
+ HSupTypeID: 1,
+ HSupName: "",
+ HSupID: 0,
+ HDeptName: sessionStorage["HDept"] || "",
+ HDeptID: sessionStorage["HDeptID"] || 0,
+ HCurName: "",
+ HCurID: 0,
+ HExRate: 1,
+ HSSName: "",
+ HSSID: 0,
+ HEmpName: "",
+ HEmpID: "",
+ HMangerName: "",
+ HMangerID: "",
+ HSecManagerName: "",
+ HSecManagerID: "",
+ HKeeperName: "",
+ HKeeperID: "",
+ HExplanation: "",
+ HRemark: "",
+
+ HMaker: "",
+ HUpDater: "",
+ HChecker: "",
+ HMakeDate: new Date(),
+ HUpDateDate: "",
+ HCheckDate: "",
+ HCloseMan: "",
+ HDeleteMan: "",
+ HCloseDate: "",
+ HDeleteDate: "",
+ };
+ this.editData = [];
+ this.editData1 = [];
+ this.editBtData = [];
+ this.ids = [];
+ this.subDisabled = false;
+ this.addBtnShow = false;
+ // this.$refs.tableData.clearSelection()
+ this.activeName = "first";
+ this.activeName1 = "first";
+ this.resetForm("form");
+ },
+ //閫�鍑�
+ close() {
+ this.reset();
+ console.log(this.$route.path);
+ if (!this.OperationType && !this.copyType) {
+ console.log(this.$route.path);
+ const obj = {
+ fullPath: this.$route.path,
+ path: this.$route.path,
+ name: this.$route.name,
+ };
+ this.$tab.closePage(obj).then((res) => {
+ const latestView = res.visitedViews.slice(-1)[0];
+ if (latestView) {
+ this.$router.push(latestView.fullPath);
+ } else {
+ if (obj.name === "Dashboard") {
+ this.$router.replace({ path: "/redirect" + obj.fullPath });
+ } else {
+ this.$router.push("/");
+ }
+ }
+ });
+ } else {
+ this.formShow = false;
+ this.$emit("editClose", false);
+ }
+ },
+ //鏍规嵁鐢ㄦ埛鑾峰彇瀵瑰簲鑱屽憳銆侀儴闂ㄣ�侀攢鍞富绠�
+ getCzyglByUser() {
+ console.log(this.form.HDeptID && this.form.HDeptID != 0);
+ if (this.form.HDeptID && this.form.HDeptID != 0) {
+ axios
+ .get(this.baseURL + "/Gy_Department/list", {
+ params: {
+ sWhere: "and HItemID = '" + this.form.HDeptID + "'",
+ user: sessionStorage["HUserName"],
+ Organization: sessionStorage["Organization"],
+ },
+ })
+ .then((response) => {
+ let dataForm = response.data.data;
+ if (dataForm.length > 0) {
+ this.form.HMangerName = dataForm[0].璐熻矗浜�;
+ this.form.HMangerID = dataForm[0].HEmpID;
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ }
+ },
+ /** 鏂板鎸夐挳鎿嶄綔 */
+ handleAdd() {
+ this.reset();
+ //鏂板鑾峰彇鍗曟嵁鍙�
+ this.getHBillNo();
+ let date = new Date();
+ this.$set(this.form, "HSTOCKOUTORGID", sessionStorage["OrganizationID"]);
+ this.$set(this.form, "HSTOCKINORGID", sessionStorage["OrganizationID"]);
+ this.$set(this.form, "HDate", moment(date).format("YYYY-MM-DD HH:mm:ss"));
+ if (this.OperationType == 1) {
+ this.handleAddSysZb();
+ }
+ this.$nextTick(() => {
+ this.formShow = true;
+ this.formLoading = false;
+ });
+ },
+ getHBillNo() {
+ axios
+ .get(this.baseURL + "/Web/GetMAXNum", {
+ params: {
+ HBillType: "1117",
+ },
+ })
+ .then((response) => {
+ this.form.HMaker = sessionStorage["HUserName"];
+ this.form.HBillNo = response.data.data[0].HBillNo;
+ this.form.HInterID = response.data.data[0].HInterID;
+ this.getCzyglByUser();
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ /** 淇敼鎸夐挳鎿嶄綔 */
+ handleUpdate() {
+ this.reset();
+ let rowHmainid = this.linterid;
+ console.log(this.linterid);
+ //涓昏〃
+ axios
+ .get(this.baseURL + "/Cg_ContractTransportBillListController/%EF%BB%BFEditList", {
+ params: { HInterID: rowHmainid,user: sessionStorage["HUserName"]},
+ })
+ .then((response) => {
+ console.log("鏁版嵁涓�",response);
+ if (response.data.count == 1) {
+ var result = response.data;
+ var data = response.data.data;
+ console.log(data);
+
+ this.allVal = data[0];
+ console.log(666,this.allVal);
+ this.form = {
+ ...{
+ HBillNo: data[0].鍗曟嵁鍙�,
+ HDate: data[0].鏃ユ湡,
+ HDeptName: data[0].閮ㄩ棬鍚嶇О,
+ HDeptID: data[0].HDeptID,
+ HSupID: data[0].HSupID,
+ HSupName: data[0].渚涘簲鍟嗗悕绉�,
+ HEmpID: data[0].HEmpID,
+ HEmpName: data[0].涓氬姟鍛樺悕绉�,
+ HCurID: data[0].甯佸埆,
+ HCurName: data[0].璐у竵鍚嶇О,
+ HSSID: data[0].缁撶畻鏂瑰紡,
+ HSSName: data[0].缁撶畻鏂瑰紡鍚嶇О,
+ HExRate: data[0].姹囩巼,
+ HContractNumber: data[0].鍚堝悓缂栧彿,
+ HContractName: data[0].鍚堝悓鍚嶇О,
+ HAddress: data[0].浜よ揣鍦扮偣,
+
+
+
+ HRemark: data[0].琛ㄥご澶囨敞,
+ HMaker: data[0].鍒跺崟浜�,
+ HChecker: data[0].瀹℃牳浜�,
+ HCloseMan: data[0].鍏抽棴浜�,
+ HMakeDate: data[0].鍒跺崟鏃ユ湡,
+ HCheckDate: data[0].瀹℃牳鏃ユ湡,
+ HCloseDate: data[0].鍏抽棴鏃ユ湡,
+ HUpDateDate: data[0].淇敼鏃ユ湡,
+ HDeleteDate: data[0].浣滃簾鏃ユ湡,
+ // HSTOCKOUTORGID: data[0].HSTOCKOUTORGID.toString(),
+ //HSTOCKINORGID: data[0].HSTOCKINORGID.toString(),
+ },
+ };
+ //瀛愯〃
+ var rowdata = [];
+ for (let i = 0; i < data.length; i++) {
+ rowdata.push({
+ HEndAddr: data[i].鐩殑鍦�,
+ 鐩殑鍦板悕绉�: data[i].鐩殑鍦板悕绉�,
+ HBeginAddr: data[i].濮嬪彂鍦�,
+ 鍦板尯鍚嶇О: data[i].濮嬪彂鍦板悕绉�,
+ HTransportCar: data[i].杩愯緭鏂瑰紡,
+ 杩愯緭鏂瑰紡鍚嶇О: data[i].杩愯緭鏂瑰紡鍚嶇О,
+ HDistance: data[i].璺濈,
+ HTransportTyep: data[i].杩愯緭绫诲瀷,
+ HTransportTimes: data[i].杩愯緭鏃舵晥,
+ HMoney_His: data[i].鍘嗗彶杩愯緭璐圭敤,
+ HMoney: data[i].杩愯緭璐圭敤,
+
+ HTransportLineName: data[i].杩愯緭绾胯矾鍚嶇О,
+ HSTOCKORGID: data[i]["HSTOCKORGID"],
+ HPropertyID: data[i]["HPropertyID"],
+
+ });
+ }
+ this.editData = rowdata;
+
+ // 娓叉煋瀹屽悗鍐嶅弬涓庢槸鍚﹀鍒剁殑鍒ゆ柇
+ if (this.copyType == 1) {
+ this.getHBillNo();
+ let date = new Date();
+ this.form.HDate = moment(date).format("YYYY-MM-DDTHH:mm:ss");
+ }
+
+ this.formShow = true;
+ this.formLoading = false;
+ }
+ })
+ .catch((error) => {
+ console.log(error);
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ /** 瀛愯〃鏄庣粏搴忓彿 */
+ rowSysZbIndex({ row, rowIndex }) {
+ row.index = rowIndex + 1;
+ },
+ /** 缂栬緫椤靛瓙琛ㄦ坊鍔犳寜閽搷浣� */
+ handleAddSysZb(index, num) {
+ if (num == 1 && !index) {
+ this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹紪杈�!");
+ } else {
+ let obj = {
+ HBeginAddr: 0,//濮嬪彂鍦癐D
+ 鍦板尯浠g爜: "",
+ 鍦板尯鍚嶇О: "",
+ HEndAddr: 0,//鐩殑鍦癐D
+ 鐩殑鍦颁唬鐮�: "",
+ 鐩殑鍦板悕绉�: "",
+ HTransportCar:0,//杩愯緭鏂瑰紡ID
+ 杩愯緭鏂瑰紡鍚嶇О: "",
+ HDistance: "0",
+ HTransportTyep: "鍗曠▼",
+ HMoney_His: "0",
+ HTransportTimes: "0",
+ HTransportLineName: "",
+
+
+ HCurID: "0",
+ 璋冨叆浠撳簱: "",
+ HSSID: "0",
+ 璋冨嚭浠撳簱: "",
+ HBASEUNITID: "0",
+ HRemark: "",
+ HSTOCKORGID: sessionStorage["OrganizationID"],
+ HSTOCKORGINID: this.form.HSTOCKINORGID,
+
+ };
+ if (index) {
+ this.editData.splice(index, 0, obj);
+ this.$set(this.editData, index, obj);
+ } else {
+ this.editData.push(obj);
+ }
+ }
+ },
+ handleCopyZbRow() {
+ if (!this.zbIndex) {
+ this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹�");
+ } else {
+ let copyRow = JSON.parse(JSON.stringify(this.zbSelForm));
+ this.editData.push(copyRow);
+ }
+ },
+ handleMoveRowUp(zbSelForm) {
+ if (!this.zbIndex) {
+ this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹�");
+ } else {
+ if (zbSelForm.index == 1) {
+ this.$modal.msgError("绗竴琛屾暟鎹棤娉曚笂绉�");
+ } else {
+ // 纭繚涓嶆槸绗竴琛�
+ let num = zbSelForm.index - 1;
+ const record = this.editData.splice(num, 1)[0];
+ this.editData.splice(num - 1, 0, record);
+ }
+ }
+ },
+ handleMoveRowDown(zbSelForm) {
+ if (!this.zbIndex) {
+ this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹�");
+ } else {
+ if (zbSelForm.index == this.editData.length) {
+ this.$modal.msgError("鏈�鍚庝竴琛屾暟鎹棤娉曚笅绉�");
+ } else {
+ // 纭繚涓嶆槸绗竴琛�
+ let num = zbSelForm.index - 1;
+ const record = this.editData.splice(num, 1)[0];
+ this.editData.splice(num + 1, 0, record);
+ }
+ }
+ },
+ /** 缂栬緫椤靛瓙琛ㄥ垹闄ゆ寜閽搷浣� */
+ handleDeleteSysZb(row) {
+ this.checkedSysZb = [];
+ this.checkedSysZb.push(row.index);
+ if (this.checkedSysZb.length == 0) {
+ this.$modal.msgError("璇峰厛閫夋嫨瑕佸垹闄ょ殑鍟嗗搧璁㈠崟鏄庣粏鏁版嵁");
+ } else {
+ const editData = this.editData;
+ const checkedSysZb = this.checkedSysZb;
+ this.editData = editData.filter(function (item) {
+ return checkedSysZb.indexOf(item.index) == -1;
+ });
+ }
+ },
+ /** 缂栬緫椤靛瓙琛ㄥ閫夋閫変腑鏁版嵁 */
+ handleTableZbEdit(selection) {
+ this.checkedSysZb = selection.map((item) => item.index);
+ this.zbSelForm = selection[0];
+ this.zbIndex = this.checkedSysZb[0];
+ if (selection.length > 1) {
+ const del_row = selection.shift();
+ this.$refs.zbTable.toggleRowSelection(del_row, false); //璁剧疆杩欎竴琛屽彇娑堥�変腑
+ }
+ },
+ // 缂栬緫鎻愪氦淇濆瓨
+ submitForm() {
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ let fhck = false;
+ if (this.editData.length == 0) {
+ fhck = true;
+ this.$modal.msgError("娌℃湁鐗╂枡鏄庣粏璁板綍锛�");
+ }
+ this.editData.map((item, index) => {
+ if (!item.HMaterID) {
+ fhck = true;
+ this.$modal.msgError("绗�" + (index + 1) + "琛岋細鍣ㄥ叿鏈�夋嫨锛�");
+ } else if (!item.HQty || item.HQty == 0) {
+ fhck = true;
+ this.$modal.msgError("绗�" + (index + 1) + "琛岋細鏁伴噺涓嶈兘涓�0锛�");
+ }
+ });
+ this.$nextTick(() => {
+ if (!fhck) {
+ var Operation = null;
+ if (!this.OperationType) {
+ Operation = 1;
+ } else {
+ Operation = this.OperationType;
+ if (Operation == 3) {
+ this.form.HInterID = this.linterid;
+ }
+ }
+ var sMainStr = JSON.stringify(this.form);
+ var sSubStr = JSON.stringify(this.editData);
+ var sAllStr = JSON.stringify(this.allVal);
+ var sMainSub =
+ sMainStr +
+ ";" +
+ sSubStr +
+ ";" +
+ Operation +
+ ";" +
+ sessionStorage["HUserName"] +
+ ";" +
+ sAllStr;
+ axios({
+ method: "post",
+ url:
+ this.baseURL + "/Kf_MoveStockRequestBill/Kf_MoveStockRequestBillEdit",
+ data: {
+ sMainSub: sMainSub,
+ },
+ })
+ .then((response) => {
+ if (response.data.count == 1) {
+ this.subDisabled = true; //璁剧疆淇濆瓨鎸夐挳涓嶅彲鐢�
+ this.$modal.msgSuccess(response.data.Message);
+ this.addBtnShow = true;
+ this.close();
+ } else {
+ this.$modal.msgError(response.data.code + response.data.Message);
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ }
+ });
+ }
+ });
+ },
+ showReset() {
+ this.deptShow = false;
+ this.warehouseShow = false;
+ this.gyEmployeeShow = false;
+ this.gySupplierShow = false;
+ this.AreaDialogShow = false;
+ },
+ // 鎵撳紑鏁版嵁鍒楄〃寮圭獥
+ openDataDialog(num, row) {
+ //num1閮ㄩ棬锛�2鍑哄簱浠撳簱锛�3鐗╂枡锛�4閿�鍞憳
+ if (row) {
+ this.zbIndex = row.index - 1;
+ }
+ this.showReset();
+ if (num == 1) {
+ this.dialogTitle = "閮ㄩ棬鍒楄〃";
+ this.deptShow = true;
+ this.openData = true;
+ } else if (num == 2) {
+ this.dialogTitle = "甯佸埆鍒楄〃";
+ this.CurrencyDialogShow = true;
+ this.openData = true;
+ } else if (num == 3) {
+ this.dialogTitle = "鍦板尯鍒楄〃";
+ this.AreaDialogShow = true;
+ this.openData = true;
+ } else if (num == 4) {
+ if (this.empType == 1) {
+ this.dialogTitle = "涓氬姟鍛樺垪琛�";
+ } else if (this.empType == 2) {
+ this.dialogTitle = "涓荤鍒楄〃";
+ } else if (this.empType == 3) {
+ this.dialogTitle = "楠屾敹鍛樺垪琛�";
+ } else if (this.empType == 4) {
+ this.dialogTitle = "淇濈鍛樺垪琛�";
+ }
+ this.gyEmployeeShow = true;
+ this.openData = true;
+ }else if (num == 5) {
+ this.dialogTitle = "缁撶畻鏂瑰紡鍒楄〃";
+ this.SettleStyleDialogShow = true;
+ this.openData = true;
+ } else if (num == 6) {
+ this.dialogTitle = "渚涘簲鍟嗗垪琛�";
+ this.gySupplierShow = true;
+ this.openData = true;
+ } else if (num == 7) {
+ this.dialogTitle = "杞﹀瀷鍒楄〃";
+ this.CarTypeShow = true;
+ this.openData = true;
+ }
+ },
+ },
+};
+</script>
+<style>
+.xsckdBox .el-date-editor.el-input {
+ width: 100%;
+}
+</style>
diff --git a/src/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillList.vue b/src/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillList.vue
new file mode 100644
index 0000000..6a9cb35
--- /dev/null
+++ b/src/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillList.vue
@@ -0,0 +1,816 @@
+<template>
+ <div style="padding: 10px;">
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="78px" class="searchBox">
+ <el-form-item label="寮�濮嬫棩鏈�" style="margin-left: 100px;">
+ <el-date-picker v-model="sTime" type="date" placeholder="寮�濮嬫棩鏈�" style="width: 150px;">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="缁撴潫鏃ユ湡">
+ <el-date-picker v-model="eTime" type="date" placeholder="缁撴潫鏃ユ湡" style="width: 150px;">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="鏃ユ湡闂撮殧">
+ <el-select v-model="queryParams.HInitTimeCycle" placeholder="璇烽�夋嫨" @change="riqiChange" style="width: 150px;">
+ <el-option v-for="(item, index) in rqsgList" :key="index" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鍗曟嵁鍙�" prop="HBillNo">
+ <el-input v-model="queryParams.HBillNo" placeholder="璇疯緭鍏ュ崟鎹彿" @keyup.enter.native="handleQuery" />
+ </el-form-item>
+
+ <el-form-item label-width="78px">
+ <el-button type="primary" icon="el-icon-search" @click="handleQuery"> 鎼� 绱�</el-button>
+ <el-button icon="el-icon-circle-close" @click="resetQuery">閲� 缃�</el-button>
+ <el-button type="primary" icon="el-icon-search" @click="set_ResCnz">閲嶆柊鍚屾</el-button>
+ </el-form-item>
+ <el-collapse v-model="activeSeach">
+ <el-collapse-item title="鏇村" name="1">
+ <el-card class="box-card">
+ <el-form-item label="閮ㄩ棬" prop="HDeptID">
+ <el-input v-model="queryParams.HDeptID" placeholder="璇疯緭鍏�" @keyup.enter.native="handleQuery" />
+ </el-form-item>
+
+ <div slot="header" class="clearfix"><span>杩囨护</span></div>
+ <div>
+ <el-row>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName1" placeholder="璇烽�夋嫨" @change="riqiChange">
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
+ </span>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator1" placeholder="璇烽�夋嫨" @change="riqiChange">
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent1" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
+ </el-row>
+ <el-row>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName2" placeholder="璇烽�夋嫨" @change="riqiChange">
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
+ </span>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator2" placeholder="璇烽�夋嫨" @change="riqiChange">
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent2" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
+ </el-row>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨" @change="riqiChange">
+ <el-option v-for="(item, index) in btList" :key="index" :label="item.field"
+ :value="item.field"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator" placeholder="璇烽�夋嫨" @change="riqiChange">
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
+ </div>
+ </el-card>
+ </el-collapse-item>
+ </el-collapse>
+ </el-form>
+ <el-row :gutter="10" class="mb8" style="margin-top: 10px;">
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddEdit(OperationType = 1)"
+ id="btn-Add">鏂板</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="handleEdit(row = rowForm, OperationType = 3)">缂栬緫</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-document-copy" size="mini" :disabled="single"
+ @click="handleEdit(row = rowForm, OperationType = 1, copyType = 1)">澶嶅埗</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">鍒犻櫎
+ </el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="single"
+ @click="set_CheckBill(1, form = rowForm)">瀹℃牳</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="single"
+ @click="set_CheckBill(2, form = rowForm)">杩斿鏍�</el-button>
+ </el-col>
+ <!-- <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">瀵煎嚭</el-button>
+ </el-col> -->
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-date" size="mini" @click="handleRowHide">闅愯棌鍒楄缃�</el-button>
+ </el-col>
+ <!-- <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-printer" size="mini" @click="get_PrintReport">鎵撳嵃</el-button>
+ </el-col> -->
+ </el-row>
+ <div class="tableBox" v-loading="loading">
+ <el-table :data="tableData" ref="tableData" max-height="710" :summary-method="getSummaries"
+ @selection-change="handleSelectionChange" show-summary border @row-click="handleRowClick" :row-style="rowStyle"
+ @cell-dblclick="handleDblclick" v-if="tableShow">
+ <template v-for="(item, index) in btList">
+ <el-table-column type="selection" width="55" align="center" :fixed="item.fixed" v-if="item.type == 'checkbox'"
+ :key="index" />
+ <el-table-column :align="item.align" :prop="item.field" :label="item.title" :width="item.width" :key="item.id"
+ v-else-if="!item.hide && item.type != 'checkbox'" :sortable="item.sort" show-overflow-tooltip
+ :fixed="item.fixed">
+ <template slot-scope="{row, column }">
+ <el-checkbox v-model="checked" v-if="item.type == 'checkbox'"></el-checkbox>
+ <div :style="item.style">
+ <span v-if="column.property.includes('鏃ユ湡')">{{ parseTime(row[column.property], '{y}-{m}-{d}') }}</span>
+ <el-button type="text" @click.stop="handleEdit(row, OperationType = 3)"
+ v-else-if="column.property == '鍗曟嵁鍙�'">{{
+ row.鍗曟嵁鍙�
+ }}</el-button>
+ <span v-else>{{ row[column.label] }}</span>
+ </div>
+ </template>
+ </el-table-column>
+ </template>
+ </el-table>
+ <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes" @pagination="getList" />
+ <el-dialog title="闅愯棌鍒楄缃�" :visible.sync="openRowHide" width="816px" append-to-body>
+ <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose"
+ v-if="rowHideShow" />
+ </el-dialog>
+ <!-- 缂栬緫 -->
+ <el-dialog title="缂栬緫" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
+ <edit :OperationType=OperationType :linterid=this.rowForm.hmainid||this.rowForm.HInterID :HSouceBillType=this.rowForm.HSourceBillType
+ :copyType="copyType" @editClose="editClose" v-if="editShow" />
+ </el-dialog>
+ <el-dialog title="鎵撳嵃妯℃澘閫夋嫨" :visible.sync="openPrintList" width="800px" append-to-body>
+ <PrintList :linterid=this.rowForm.hmainid :MyMsg=this.rowForm.hmainid :Type='HModName'
+ :HModName='HModName' @rowEditClose="rowSetClose" v-if="printListShow" />
+ <!-- <div>111</div> -->
+ </el-dialog>
+ </div>
+ </div>
+</template>
+
+<script>
+import axios from 'axios'
+import RowSettings from '@/views/component/rowSettings'
+import Edit from '@/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillEdit.vue'
+import PrintList from '@/views/component/printList'
+import moment from 'moment';
+
+export default {
+ name: 'Cg_ContractTransportBillMainList',
+ components: { RowSettings, Edit, PrintList },
+ data() {
+ return {
+ HModName: "Cg_ContractTransportBillMainList",
+ activeSeach: '',
+ editShow: false,
+ openEdit: false,
+ totalNameList: [],
+ tableShow: true,
+ openPrintList: false,
+ printListShow: false,
+ openBtnHide: false,
+ btnHideShow: false,
+ rowHideShow: false,
+ openRowHide: false,
+ copyType: 0,
+ comparatorList: [
+ { label: '=', value: '=' },
+ { label: '>=', value: '>=' },
+ { label: '>', value: '>' },
+ { label: '<=', value: '<=' },
+ { label: '<', value: '<' },
+ { label: '<>', value: '<>' },
+ { label: '鍖呭惈', value: '7' },
+ { label: '宸﹀寘鍚�', value: '8' },
+ { label: '鍙冲寘鍚�', value: '9' },
+ { label: '涓嶅寘鍚�', value: '10' },
+ ],
+ sWhere: '',
+ sTime: '',
+ eTime: '',
+ rqsgList: [
+ { label: '浠婂ぉ', value: 0 },
+ { label: '杩戜袱澶�', value: 1 },
+ { label: '杩戜笁澶�', value: 2 },
+ { label: '杩戝洓澶�', value: 3 },
+ { label: '杩戜簲澶�', value: 4 },
+ { label: '杩戝叚澶�', value: 5 },
+ { label: '杩戜竷澶�', value: 6 },
+ { label: '杩�30澶�', value: 29 },
+ { label: '杩戝崐骞�', value: 180 },
+ { label: '杩戜竴骞�', value: 365 },
+ ],
+ organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//缁勭粐鍒楄〃
+ addBtnShow: false,
+ dialogTitle: '',
+ OperationType: null,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
+ HInterID: null,
+ baseURL: process.env.VUE_APP_BASE_API,
+ lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
+ lastSelectedRow: null, // 涓婁竴娆¢�変腑鐨勮
+ selectedRow: null, // 褰撳墠閫変腑鐨勮
+ rowForm: {},
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
+ // 鏌ヨ鍙傛暟
+ queryParams: {
+ HBillNo: '',
+ HBillno2:'',
+ HInitTimeCycle: 29,
+ HDeptID:'',
+
+ HSourceBillNo:'',
+ Warehouse:'',
+ Hmaker:'',
+ ColName1: '',
+ ColName2: '',
+ ColName: '',
+ Comparator1: '',
+ Comparator2: '',
+ Comparator: '',
+ ColContent1: '',
+ ColContent2: '',
+ ColContent: '',
+ },
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 閬僵灞�
+ loading: true,
+ tyResList: [],//鍒楄〃锛堟帴鍙f暟鎹級
+ btList: [],//琛ㄥご鍒楄〃鏄剧ず
+ btResList: [],
+ tableData: [],//鍒楄〃(鍒嗛〉鏄剧ず)
+ dataList: [],
+ titleData: [],//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ pageSizes: [50, 100, 500, 5000, 50000],
+ page: 1,
+ pageSize: 0,
+ total: 0,
+ };
+ },
+ created() {
+ this.riqiChange()
+ this.getList();
+ },
+
+ methods: {
+ //閲嶆柊鍚屾
+ set_ResCnz(){
+ axios.get(this.baseURL + "/Cg_POOrderBill/Resynchronize", {
+ params: { "HBillNo": '', "HBillType": 1117 }
+ }).then(response => {
+ let result = response.data
+ if (result.count == 1) {
+ this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+ this.getList();
+ }
+ else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message,);
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ getSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = '鍚堣';
+ return;
+ }
+ const values = data.map(item => Number(item[column.property]));
+ if (this.totalNameList[index].totalRow) {
+ if (!values.every(value => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr);
+ if (!isNaN(value)) {
+ return prev + curr;
+ } else {
+ return prev;
+ }
+ }, 0)
+
+ } else {
+ sums[index] = '';
+ }
+ }
+ }, 1000);
+ return sums;
+ },
+
+ handleBtnHide() {
+ this.btnHideShow = true
+ this.openBtnHide = true
+ },
+ handleRowHide() {
+ this.rowHideShow = true
+ this.openRowHide = true
+ },
+ rowSetClose(val) {
+ this.rowHideShow = false
+ this.tableShow = true
+ this.openRowHide = val
+ this.getList()
+ },
+ riqiChange() {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * this.queryParams.HInitTimeCycle);
+ const yyyyS = start.getFullYear();
+ const mmS = String(start.getMonth() + 1).padStart(2, '0'); // 鏈堜唤鏄粠0寮�濮嬬殑
+ const ddS = String(start.getDate()).padStart(2, '0');
+ const yyyyE = end.getFullYear();
+ const mmE = String(end.getMonth() + 1).padStart(2, '0'); // 鏈堜唤鏄粠0寮�濮嬬殑
+ const ddE = String(end.getDate()).padStart(2, '0');
+ this.sTime = yyyyS + '-' + mmS + '-' + ddS
+ this.eTime = yyyyE + '-' + mmE + '-' + ddE
+ },
+ getList() {
+ this.pageSize = 50
+ this.tableShow = false
+ this.loading = true
+ if (this.sTime && !this.sWhere) {
+ this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.sTime + "'"
+ this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.eTime + "'"
+ }
+ if (this.pageSize == 0) {
+ this.pageSize = 50
+ }
+ axios.get(this.baseURL + '/Cg_ContractTransportBillListController/get%EF%BB%BFList', {
+ params: {
+ "sWhere": this.sWhere,
+ "user": sessionStorage["HUserName"],
+ },
+ }).then(response => {
+ this.tyResList = response.data.data//鎬绘暟鎹�
+ let data1 = response.data
+ let option = []
+ if (data1.code == 1) {
+ this.btResList = data1.list//閿�鍞嚭搴撳崟鎺ュ彛琛ㄥご鏁版嵁
+ this.total = data1.count;
+ var data = [];//鍒楀瓧娈垫暟鎹�
+ var col = [];
+ var totalArray = ["浠舵暟"];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {//寰簭閬嶅巻鏁扮粍
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });//浠庢瘡涓璞′腑鎻愬彇鏁版嵁
+ //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛�
+ var patrn = new RegExp(/^h/i);
+ if (patrn.test(data1.list[key].ColmCols)) {
+ this.titleData[key] = data1.list[key].ColmCols;
+ }
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+ for (var i = 0; i < data.length; i++) {//閬嶅巻data鏁扮粍閲嶇殑鏁版嵁
+ if (this.titleData.indexOf(data[i].name) > -1) {//妫�鏌ata銆恑銆�.name鏄惁鍦ㄦ暟缁勪腑 //璁$畻鍒�
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ } else if (totalArray.indexOf(data[i].name) > -1 || (data[i].Type == "Decimal" || data[i].Type == "Int32")) { //璁$畻鍒�
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+ }
+ else {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+ }
+
+ }
+ option.cols = [col]
+ option.data = data1.data
+ this.dataList = option
+ this.DisPlay_HideColumn(this.HModName, sessionStorage["HUserName"], option, this.dataList);
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ DisPlay_HideColumn(HModName, user, option, dataOption) {
+ this.totalNameList = []
+ axios.get(this.baseURL + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
+ params: {
+ "HModName": HModName,
+ "user": user,
+ },
+ }).then(res => {
+ let data1 = res.data
+ if (data1.data.length != 0) {
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+ newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
+ dataCol = data1.data[0].HGridString.split(',');
+ //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+ if (dataCol.length == option.cols[0].length - 1) {
+ //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+ for (var j = 0; j < option.cols[0].length - 1; j++) {
+ for (var i = 0; i < option.cols[0].length - 1; i++) {
+ var dataCols = dataCol[j].split('|');
+ //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+ if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && this.titleData.indexOf(option.cols[0][i + 1]["title"]) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
+ } else {
+ option.cols[0][i + 1]["totalRow"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ newCols[0].push(option.cols[0][i + 1]);
+ break;
+ }
+ }
+ }
+ //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+ if (dataCol.length == newCols[0].length - 1) {
+ option.cols = newCols;
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i + 1]["fixed"] != null) {
+ option.cols[0][i + 1]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if (dataOption.cols[0].indexOf(option.cols[0][i + 1]["title"]) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ //璁剧疆鍒楁帓搴�
+ for (var i = 1; i < option.cols[0].length; i++) {
+ if (data1.data[0].HSortFlag == "鏄�") {
+ option.cols[0][i]["sort"] = true;
+ }
+ else {
+ option.cols[0][i]["sort"] = false;
+ }
+ }
+ }
+ }
+ this.btList = option.cols[0]
+ this.btList.map(item => {
+ if (!item.hide) {
+ this.totalNameList.push(item)
+ }
+ })
+ if (data1.data[0].HPageSize == 0) {
+ this.pageSize = 50
+ } else {
+ this.pageSize = data1.data[0].HPageSize
+ }
+ this.tableData = option.data
+ this.tableShow = true
+ this.loading = false
+ } else {
+ this.btList = dataOption.cols[0]
+ this.btList.map(item => {
+ if (!item.hide) {
+ this.totalNameList.push(item)
+ }
+ })
+ this.tableData = dataOption.data
+ this.tableShow = true
+ this.loading = false
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ renderHeader(h, { column, $index }) {// 鏂板缓涓�涓� span
+ let span = document.createElement(span)// 璁剧疆琛ㄥご鍚嶇О
+ span.innerText = column.label
+ //涓存椂鎻掑叆 document
+ document.body.appendChild(span)// 閲嶇偣:鑾峰彇 span 鏈�灏忓搴︼紝璁剧疆褰撳墠鍒楋紝娉ㄦ剰杩欓噷鍔犱簡 20锛屽瓧娈佃緝澶氭椂column.minWidth=span.getBoundingClientRect().width + 50.//绉婚櫎 document 涓复鏃剁殑 span
+ document.body.removeChild(span)
+ return h(span, column.label)
+ },
+ //鐐瑰嚮琛�
+ handleRowClick(row, column, event) {
+ this.lastSelectedRow = this.selectedRow; // 璁板綍涓婁竴娆¢�変腑鐨勮
+ this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
+ this.lastSelectedRowIndex = this.tableData.indexOf(row);
+ this.$refs.tableData.toggleRowSelection(row);
+ },
+ //閫変腑琛岄珮浜牱寮�
+ rowStyle({ row, rowIndex }) {
+ if (this.ids.includes(row.hmainid)) {
+ return { "background": "#ecf5ff" }
+ }
+ },
+ //鍙屽嚮琛�
+ handleDblclick(row, column, cell, event) {
+ this.OperationType = 3
+ this.handleEdit()
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ // this.rowForm = {}
+ this.ids = selection.map(item => item.hmainid)
+ this.single = selection.length != 1
+ this.multiple = !selection.length
+ if (!this.single) {
+ this.rowForm = selection[0]
+ }
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.sWhere = ''
+ if (this.queryParams.ColName && this.queryParams.Comparator) {
+ var com = "";
+ switch (this.queryParams.Comparator) {
+ case "7":
+ com = "like'%" + this.queryParams.ColContent + "%'";
+ break;
+ case "8":
+ com = "like'%" + this.queryParams.ColContent + "'";
+ break;
+ case "9":
+ com = "like'" + this.queryParams.ColContent + "%'";
+ break;
+ case "10":
+ com = "not like'%" + this.queryParams.ColContent + "%'";
+ break;
+ default:
+ com = "" + this.queryParams.Comparator + "'" + this.queryParams.ColContent + "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName + " " + com;
+ }
+ if (this.queryParams.ColName1 && this.queryParams.Comparator1) {
+ var com1 = "";
+ switch (this.queryParams.Comparator1) {
+ case "7":
+ com1 = "like'%" + this.queryParams.ColContent1 + "%'";
+ break;
+ case "8":
+ com1 = "like'%" + this.queryParams.ColContent1 + "'";
+ break;
+ case "9":
+ com1 = "like'" + this.queryParams.ColContent1 + "%'";
+ break;
+ case "10":
+ com1 = "not like'%" + this.queryParams.ColContent1 + "%'";
+ break;
+ default:
+ com1 = "" + this.queryParams.Comparator1 + "'" + this.queryParams.ColContent1 + "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName1 + " " + com1;
+ }
+ if (this.queryParams.ColName2 && this.queryParams.Comparator2) {
+ var com2 = "";
+ switch (this.queryParams.Comparator2) {
+ case "7":
+ com2 = "like'%" + this.queryParams.ColContent2 + "%'";
+ break;
+ case "8":
+ com2 = "like'%" + this.queryParams.ColContent2 + "'";
+ break;
+ case "9":
+ com2 = "like'" + this.queryParams.ColContent2 + "%'";
+ break;
+ case "10":
+ com2 = "not like'%" + this.queryParams.ColContent2 + "%'";
+ break;
+ default:
+ com2 = "" + this.queryParams.Comparator + "'" + this.queryParams.ColContent + "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
+ }
+ if (this.sTime) {
+ this.sTime = moment(this.sTime).format('YYYY-MM-DD')
+ this.eTime = moment(this.eTime).format('YYYY-MM-DD')
+ console.log(this.sTime, this.eTime)
+ this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.sTime + "'" + " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.eTime + "'";
+ }
+ if (this.queryParams.HBillNo) {
+ this.sWhere += " and 鍗曟嵁鍙� like '%" + this.queryParams.HBillNo + "%'";
+ }
+ if (this.queryParams.HDeptID) {
+ this.sWhere += " and 閮ㄩ棬 like '%" + this.queryParams.HDeptID + "%'";
+ }
+ console.log("danjuhao1",this.queryParams.HBillNo)
+ this.getList()
+ },
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.sWhere = ''
+ this.queryParams = {
+ HBillNo: '',
+ HInitTimeCycle: 29,
+ HDeptID:'',
+ HSourceBillNo:'',
+
+ Hmaker:'',
+ ColName1: '',
+ ColName2: '',
+ ColName: '',
+ Comparator1: '',
+ Comparator2: '',
+ Comparator: '',
+ ColContent1: '',
+ ColContent2: '',
+ ColContent: '',
+ }
+ this.riqiChange()
+ this.resetForm("queryForm")
+ this.getList()
+ },
+
+ //閫�鍑�
+ close() {
+ // this.reset()
+ this.tableShow = true
+ this.openEdit = false
+ this.editShow = false
+ this.getList()
+ },
+ //鎵撳紑鏂板缁勪欢寮圭獥
+ handleAddEdit() {
+ this.rowForm.hmainid = 0
+ this.editShow = true
+ this.openEdit = true
+ },
+ //鎵撳紑淇敼缁勪欢寮圭獥
+ handleEdit(row) {
+ this.rowForm = row
+ this.editShow = true
+ this.openEdit = true
+ },
+ //鍏抽棴缂栬緫椤甸潰
+ editClose(val) {
+ this.open = val
+ this.editShow = false
+ this.openEdit = val
+ this.getList()
+ },
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete() {
+ this.$modal.confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠').then(() => {
+ axios.get(this.baseURL + "/Cg_ContractTransportBillListController/Delete%EF%BB%BFBill", {
+ params: { 'HInterID': this.rowForm.hmainid.toString() }
+ }).then(response => {
+ if (response.data.count == 1) {
+ this.getList()
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛")
+ } else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message);
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ }).catch(() => { })
+ },
+ // 鍙嶅鏍�/瀹℃牳鏁版嵁
+ set_CheckBill(num, form) {
+ var InterID = form.hmainid || form.HInterID
+ //閫昏緫瀹℃牳鏂规硶
+ axios.get(this.baseURL + "/Cg_ContractTransportBillEdit/AuditCg_ContractTransportBillEdit", {
+ params: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] }
+ }).then(response => {
+ let result = response.data
+ if (result.count == 1) {
+ this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+ this.getList();
+ }
+ else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message,);
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ //瀵煎嚭
+ handleExport() {
+ const ws = this.$XLSX.utils.json_to_sheet(this.tyResList); // 灏嗘暟鎹浆鎹负宸ヤ綔琛�
+ const wb = this.$XLSX.utils.book_new(); // 鍒涘缓涓�涓柊鐨勫伐浣滅翱
+ this.$XLSX.utils.book_append_sheet(wb, ws, "Sheet1"); // 灏嗗伐浣滆〃娣诲姞鍒板伐浣滅翱涓紝骞跺懡鍚嶄负"Sheet1"
+ this.$XLSX.writeFile(wb, `sellOutBill_${new Date().getTime()}.xlsx`); // 瀵煎嚭鏂囦欢
+ },
+ //鎵撳嵃
+ get_PrintReport() {
+ if (this.ids.length != 1) {
+ this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹�")
+ } else if (this.rowForm.鐘舵�� != "宸插鏍�" && !this.defaintOperationByCompanyName()) {
+ this.$modal.msgError("鎵撳嵃澶辫触!鍘熷洜锛氬崟鎹姸鎬佷笉涓�'宸插鏍�'鐘舵��!!");
+ } else {
+ axios.get(this.baseURL + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
+ params: { "HInterID": this.rowForm.hmainid }
+ }).then(response => {
+ var result = response.data
+ if (result.count == 1) {
+ this.printListShow = true
+ this.openPrintList = true
+ // this.$router.push({ path:'/printList', query: { linterid: this.rowForm.hmainid,MyMsg:this.rowForm.hmainid,Type:'Kf_SellOutBillList' }})
+ } else {
+ this.$modal.msgError(result.code + result.Message)
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+
+
+ }
+ // var content= ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=Kf_SellOutBillList', 'yes']
+ },
+
+ //#region 鑾峰彇鍏徃鍚嶏紝鏍规嵁鍏徃杩涜瀹氬埗鍖栧紑鍙�
+ defaintOperationByCompanyName() {
+ var result = false;
+ axios.get(this.baseURL + '/Xt_getInfo/getCompanyName').then(response => {
+ var data1 = response.data
+ if (data1.count == 1) {
+ if (data1.data == "姘村姟") {
+ result = true;
+ }
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ return result;
+ },
+ }
+};
+</script>
+<style>
+.xsckdBox .el-date-editor.el-input {
+ width: 100%;
+}
+</style>
diff --git a/src/views/component/AreaDialog/index.vue b/src/views/component/AreaDialog/index.vue
index b1d526c..c1b25b6 100644
--- a/src/views/component/AreaDialog/index.vue
+++ b/src/views/component/AreaDialog/index.vue
@@ -1,492 +1,954 @@
<template>
- <el-dialog
- title="閫夋嫨鍦板尯"
- :visible.sync="dialogVisible"
- width="80%"
- :before-close="handleClose"
- append-to-body
- >
- <div class="area-dialog">
- <el-card class="search-card">
- <div slot="header" class="clearfix">
- <span>鏌ヨ鏉′欢</span>
- <el-button
- style="float: right; padding: 3px 0"
- type="text"
- @click="toggleCollapse"
- >
- {{ collapse ? '灞曞紑' : '鏀惰捣' }}
- </el-button>
- </div>
-
- <el-form :model="queryParams" ref="queryForm" :inline="true">
- <el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="鍦板尯浠g爜">
- <el-input
- v-model="queryParams.HNumber"
- placeholder="璇疯緭鍏ュ湴鍖轰唬鐮�"
- clearable
- />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="鍦板尯鍚嶇О">
- <el-input
- v-model="queryParams.HName"
- placeholder="璇疯緭鍏ュ湴鍖哄悕绉�"
- clearable
- />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" @click="handleQuery">鏌ヨ</el-button>
- <el-button icon="el-icon-refresh" @click="handleReset">閲嶇疆</el-button>
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-collapse-transition>
- <div v-show="!collapse">
- <el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="杩囨护瀛楁">
- <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨瀛楁" style="width: 100%">
- <el-option value="0" label=""></el-option>
- <el-option
- v-for="column in visibleColumns"
- :key="column.field"
- :label="column.label"
- :value="column.field"
- />
+ <div style="padding: 10px; position: relative;">
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="98px" class="searchBox">
+ <el-row>
+ <!-- <el-form-item label="閮ㄩ棬浠g爜" prop="HNumber" style="margin-left: 100px;">
+ <el-input v-model="queryParams.HNumber" placeholder="璇疯緭鍏ラ儴闂ㄤ唬鐮�" @keyup.enter.native="handleQuery" />
+ </el-form-item>
+ <el-form-item label="閮ㄩ棬鍚嶇О" prop="HName">
+ <el-input v-model="queryParams.HName" placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�" @keyup.enter.native="handleQuery" />
+ </el-form-item> -->
+ <el-form-item label="缁勭粐">
+ <el-select v-model="queryParams.HOrgID" placeholder="璇烽�夋嫨">
+ <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label-width="78px">
+ <el-button type="primary" icon="el-icon-search" @click="handleQuery">
+ 鎼� 绱�</el-button>
+ <el-button type="primary" icon="el-icon-refresh" @click="resetQuery">閲� 缃�</el-button>
+ </el-form-item>
+ </el-row>
+ <el-collapse v-model="activeSeach">
+ <el-collapse-item title="鏇村" name="1">
+ <el-card class="box-card">
+ <div slot="header" class="clearfix"><span>杩囨护</span></div>
+ <div>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName1" placeholder="璇烽�夋嫨">
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
+ </span>
</el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="姣旇緝绗�">
- <el-select v-model="queryParams.Comparator" placeholder="璇烽�夋嫨姣旇緝绗�" style="width: 100%">
- <el-option value="0" label=""></el-option>
- <el-option label="=" value="=" />
- <el-option label=">=" value=">=" />
- <el-option label=">" value=">" />
- <el-option label="<=" value="<=" />
- <el-option label="<" value="<" />
- <el-option label="<>" value="<>" />
- <el-option label="鍖呭惈" value="7" />
- <el-option label="宸﹀寘鍚�" value="8" />
- <el-option label="鍙冲寘鍚�" value="9" />
- <el-option label="涓嶅寘鍚�" value="10" />
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator1" placeholder="璇烽�夋嫨">
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
</el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="鍐呭">
- <el-input
- v-model="queryParams.ColContent"
- placeholder="璇疯緭鍏ュ唴瀹�"
- clearable
- />
- </el-form-item>
- </el-col>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent1" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
+ <el-row>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName2" placeholder="璇烽�夋嫨">
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
+ </span>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator2" placeholder="璇烽�夋嫨">
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
+ </span>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent2" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
</el-row>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨">
+ <el-option v-for="(item, index) in btList" :key="index" :label="item.field"
+ :value="item.field"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator" placeholder="璇烽�夋嫨">
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
</div>
- </el-collapse-transition>
- </el-form>
- </el-card>
-
-
- <el-card class="table-card">
- <div slot="header" class="clearfix">
- <span>鍦板尯鍒楄〃</span>
- <el-button-group style="float: right">
- <el-button type="primary" icon="el-icon-refresh" @click="handleRefresh">鍒锋柊</el-button>
- <el-button type="primary" icon="el-icon-close" @click="handleExit">閫�鍑�</el-button>
- </el-button-group>
+ </el-card>
+ </el-collapse-item>
+ </el-collapse>
+ </el-form>
+ <el-row :gutter="10" class="mb8" style="margin-top: 10px;">
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-download" size="mini" @click="handleImport">瀵煎叆</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddEdit(OperationType = 1)"
+ id="btn-Add">鏂板</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="handleEdit(row = rowForm, OperationType = 3)">缂栬緫</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="handleEdit(row = rowForm, copyType = 1)">澶嶅埗</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">鍒犻櫎
+ </el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="set_CheckBill(0, form = rowForm)">瀹℃牳</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="set_CheckBill(1, form = rowForm)">杩斿鏍�</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="set_De_Stop(0, form = rowForm)">绂佺敤</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="set_De_Stop(1, form = rowForm)">鍙嶇鐢�</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">瀵煎嚭</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-download" size="mini" @click="handleRowHide">闅愯棌鍒楄缃�</el-button>
+ </el-col>
+ </el-row>
+ <div class="tableBox" v-loading="loading">
+ <el-table :data="tableData" ref="tableData" max-height="750" :summary-method="getSummaries"
+ @selection-change="handleSelectionChange" show-summary border @row-click="handleRowClick" :row-style="rowStyle"
+ @cell-dblclick="handleDblclick" v-if="tableShow">
+ <template v-for="(item, index) in btList">
+ <el-table-column type="selection" width="55" align="center" :fixed="item.fixed" v-if="item.type == 'checkbox'"
+ :key="index" />
+ <el-table-column :align="item.align" :prop="item.field" :label="item.title" :width="item.width"
+ :key="item.sorderid" v-else-if="!item.hide && item.type != 'checkbox'" :sortable="item.sort"
+ show-overflow-tooltip :fixed="item.fixed">
+ <template slot-scope="{row, column }">
+ <el-checkbox v-model="checked" v-if="item.type == 'checkbox'"></el-checkbox>
+ <div :style="item.style">
+ <span v-if="column.property.includes('鏃ユ湡')">{{ parseTime(row[column.property], '{y}-{m}-{d}') }}</span>
+ <el-button type="text" @click="handleEdit(row, OperationType = 3)"
+ v-else-if="column.property == '鍗曟嵁鍙�'">{{
+ row.鍗曟嵁鍙�
+ }}</el-button>
+ <span v-else>{{ row[column.label] }}</span>
+ </div>
+ </template>
+ </el-table-column>
+ </template>
+ </el-table>
+ <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes"
+ @pagination="getList" />
+ <el-dialog title="闅愯棌鍒楄缃�" :visible.sync="openRowHide" width="816px" append-to-body>
+ <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" />
+ </el-dialog>
+ <!-- 缂栬緫 -->
+ <el-dialog title="缂栬緫閮ㄩ棬璧勬枡" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
+ <edit :OperationType=OperationType :linterid=this.rowForm.HItemID :HSouceBillType=this.rowForm.HSourceBillType
+ :copyType="copyType" @editCloseGy="editGyClose" v-if="editShow" />
+ </el-dialog>
+ <el-dialog :title="upload.title" :visible.sync="upload.open" width="1500px" append-to-body>
+ <div style="margin-top:-20px ;">
+ <el-button type="primary" @click="set_AddNew">瀵煎叆鏁版嵁</el-button>
+ <el-button type="primary" @click="upload.open = false">閫� 鍑�</el-button>
+ <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" style="display: inline-block; margin-left: 10px;"
+ :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
+ :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess">
+ <el-button type="primary">鏂囦欢涓婁紶</el-button>
+ </el-upload>
</div>
-
- <el-table
- ref="table"
- :data="tableData"
- v-loading="loading"
- height="400"
- border
- highlight-current-row
- @row-dblclick="handleRowDblClick"
- @row-click="handleRowClick"
- @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column
- v-for="column in tableColumns"
- :key="column.field"
- :prop="column.field"
- :label="column.label"
- :width="column.width"
- :align="column.align"
- :sortable="column.sortable"
- show-overflow-tooltip
- >
- <template slot-scope="{ row, column }">
- <span v-if="column.property.includes('鏃堕棿') || column.property.includes('鏃ユ湡')">
- {{ formatDate(row[column.property]) }}
- </span>
- <span v-else>{{ row[column.property] }}</span>
+ <el-table :data="uploadData" v-loading="uploadTableLoading" :row-class-name="uploadDataIndex" border
+ height="550">
+ <el-table-column type="index" label="搴忓彿" width="55" align="center" />
+ <el-table-column label="缁勭粐浠g爜" prop="缁勭粐浠g爜" align="center" width="120" />
+ <el-table-column label="缁勭粐鍚嶇О" prop="缁勭粐鍚嶇О" align="center" width="120" />
+ <el-table-column label="璐熻矗浜轰唬鐮�" prop="璐熻矗浜轰唬鐮�" align="center" width="120" />
+ <el-table-column label="璐熻矗浜�" prop="璐熻矗浜�" align="center" width="120" />
+ <el-table-column label="宸ヤ綔涓績浠g爜" prop="宸ヤ綔涓績浠g爜" align="center" width="120" />
+ <el-table-column label="宸ヤ綔涓績鍚嶇О" prop="宸ヤ綔涓績鍚嶇О" align="center" width="120" />
+ <el-table-column label="鍗曠彮宸ユ椂" prop="鍗曠彮宸ユ椂" align="center" width="120" />
+ <el-table-column label="鎿嶄綔" align="center">
+ <template slot-scope="scope">
+ <el-button size="mini" type="text" icon="el-icon-delete"
+ @click="uploadDataDelete(scope.row)">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
-
-
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="pagination.page"
- :page-sizes="[50, 100, 500, 5000]"
- :page-size="pagination.size"
- layout="total, sizes, prev, pager, next, jumper"
- :total="pagination.total"
- style="margin-top: 15px; text-align: right;"
- />
- </el-card>
+ <pagination v-show="uploadTotal > 0" :total="uploadTotal" :page.sync="uploadPage" :limit.sync="uploadPageSize"
+ :pageSizes="uploadPageSizes" @pagination="currentPage" />
+ </el-dialog>
</div>
- </el-dialog>
+ </div>
</template>
<script>
import axios from 'axios'
+import RowSettings from '@/views/component/rowSettings'
+import Edit from '@/views/basic/gy/gyDepartmentEdit.vue'
export default {
- name: 'AreaDialog',
+ name: 'GyDepartment',
+ components: { RowSettings, Edit },
props: {
- visible: {
- type: Boolean,
- default: false
- }
+ openPage: { type: String, },
},
data() {
return {
- dialogVisible: false,
- collapse: false,
- loading: false,
-
+ activeSeach: '',
+ HModName: 'Gy_DepartmentList',
+ editShow: false,
+ openEdit: false,
+ totalNameList: [],
+ tableShow: true,
+ openPrintList: false,
+ printListShow: false,
+ // HBillType: '1205',
+ openBtnHide: false,
+ btnHideShow: false,
+ rowHideShow: false,
+ openRowHide: false,
+ copyType: 0,
+ comparatorList: [
+ { label: '=', value: '=' },
+ { label: '>=', value: '>=' },
+ { label: '>', value: '>' },
+ { label: '<=', value: '<=' },
+ { label: '<', value: '<' },
+ { label: '<>', value: '<>' },
+ { label: '鍖呭惈', value: '7' },
+ { label: '宸﹀寘鍚�', value: '8' },
+ { label: '鍙冲寘鍚�', value: '9' },
+ { label: '涓嶅寘鍚�', value: '10' },
+ ],
+ sWhere: '',
+ dialogTitle: '',
+ organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//缁勭粐鍒楄〃
+ OperationType: null,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
+ HInterID: null,
+ baseURL: process.env.VUE_APP_BASE_API,
+ lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
+ lastSelectedRow: null, // 涓婁竴娆¢�変腑鐨勮
+ selectedRow: null, // 褰撳墠閫変腑鐨勮
+ rowForm: {},
+ activeName: 'first',
+
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
// 鏌ヨ鍙傛暟
queryParams: {
- HNumber: '',
- HName: '',
- ColName: '0',
- Comparator: '0',
- ColContent: ''
+ HOrgID: sessionStorage["OrganizationID"] - 0,
+ HName: null,
+ HNumber: null,
+ Comparator1: '',
+ Comparator2: '',
+ Comparator: '',
+ ColContent1: '',
+ ColContent2: '',
+ ColContent: '',
},
-
- // 琛ㄦ牸鏁版嵁
- tableData: [],
- tableColumns: [],
- selectedRow: null,
- multipleSelection: [],
-
- // 鍒嗛〉
- pagination: {
- page: 1,
- size: 50,
- total: 0
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 閬僵灞�
+ loading: true,
+ tyResList: [],//鍒楄〃锛堟帴鍙f暟鎹級
+ btList: [],//琛ㄥご鍒楄〃鏄剧ず
+ btResList: [],
+ tableData: [],//鍒楄〃(鍒嗛〉鏄剧ず)
+ dataList: [],
+ titleData: ["HItemID", "HUSEORGID", "HEmpID", "璐熻矗浜�"],//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ pageSizes: [50, 100, 500, 5000, 50000],
+ page: 1,
+ pageSize: 0,
+ total: 0,
+ // 琛ㄥ崟鍙傛暟
+ form: {},
+ // 琛ㄥ崟鏍¢獙
+ rules: {},
+ upload: {
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁绂佺敤涓婁紶
+ isUploading: false,
+ // 鏄惁鏇存柊宸茬粡瀛樺湪鐨勬暟鎹�
+ updateSupport: 0,
+ // 璁剧疆涓婁紶鐨勮姹傚ご閮�
+ // headers: { Authorization: "Bearer " + getToken() },
+ // 涓婁紶鐨勫湴鍧�
+ url: process.env.VUE_APP_BASE_API + "/Gy_Source/Gy_Source_Excel"
},
-
- // 闅愯棌瀛楁
- hiddenFields: ["HItemID", "鐭唬鐮�", "鐖剁骇ID", "绛夌骇", "鏈骇鏍囧織", "鍔╄鐮�", "鍒涘缓缁勭粐", "鑻辨枃鍚嶇О"],
-
- baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/',
- user: 'admin',
- HModName: 'Gy_AreaSet'
- }
+ uploadData: [],
+ alluploadList: [],
+ uploadTableLoading: false,
+ uploadPageSizes: [50, 100, 500, 5000, 50000],
+ uploadPage: 1,
+ uploadPageSize: 50,
+ uploadTotal: 0,
+ };
},
- computed: {
- visibleColumns() {
- return this.tableColumns
- .filter(col => !this.hiddenFields.includes(col.field))
- .map(col => ({
- field: col.field,
- label: col.label
- }))
- }
- },
- watch: {
- visible: {
- immediate: true,
- handler(val) {
- this.dialogVisible = val
- if (val) {
- this.initData()
- }
- }
- },
- dialogVisible(val) {
- this.$emit('update:visible', val)
- }
+ created() {
+ this.getList()
},
methods: {
- initData() {
- this.loadTableData()
- },
-
- async loadTableData() {
- this.loading = true
- try {
- const sWhere = this.buildQueryCondition()
-
- const response = await axios.get(`${this.baseURL}/Gy_BadReason/Gy_AreaSetList`, {
- params: {
- sWhere: sWhere,
- user: this.user,
- page: this.pagination.page,
- size: this.pagination.size
- }
- })
-
- if (response.data.count === 1) {
- this.tableData = response.data.data
- this.pagination.total = response.data.total || response.data.data.length
- this.generateTableColumns(response.data.list)
- } else {
- this.$message.error(response.data.Message || '鍔犺浇鏁版嵁澶辫触')
+ getSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = '鍚堣';
+ return;
}
- } catch (error) {
- console.error('鍔犺浇鍦板尯鏁版嵁澶辫触:', error)
- this.$message.error('鍔犺浇鍦板尯鏁版嵁澶辫触')
- } finally {
- this.loading = false
+ const values = data.map(item => Number(item[column.property]));
+ if (this.totalNameList[index].totalRow) {
+ if (!values.every(value => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr);
+ if (!isNaN(value)) {
+ return prev + curr;
+ } else {
+ return prev;
+ }
+ }, 0)
+
+ } else {
+ sums[index] = '';
+ }
+ }
+ }, 1000);
+ return sums;
+ },
+
+ handleBtnHide() {
+ this.btnHideShow = true
+ this.openBtnHide = true
+ },
+ handleRowHide() {
+ this.rowHideShow = true
+ this.openRowHide = true
+ },
+ rowSetClose(val) {
+ this.rowHideShow = false
+ this.tableShow = true
+ this.openRowHide = val
+ this.getList()
+ },
+ //鍒楄〃鏁版嵁
+ getList() {
+ this.pageSize = 50
+ this.tableShow = false
+ this.loading = true
+ if (this.pageSize == 0) {
+ this.pageSize = 50
+ }
+ //this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'"
+ //鐢熶骇璧勬枡鍒楄〃
+ axios.get(this.baseURL + '/Gy_BadReason/Gy_AreaSetList', {
+ params: {
+ "sWhere": this.sWhere,
+ "user": sessionStorage["HUserName"],
+ },
+ }).then(response => {
+ this.tyResList = response.data.data//鎬绘暟鎹�
+ let data1 = response.data
+ let option = []
+ if (data1.code == 1) {
+ this.btResList = data1.list//鐢熶骇璧勬枡鎺ュ彛琛ㄥご鏁版嵁
+ this.total = data1.count;
+ var data = [];//鍒楀瓧娈垫暟鎹�
+ var col = [];
+ var totalArray = ["浠舵暟"];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {//寰簭閬嶅巻鏁扮粍
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });//浠庢瘡涓璞′腑鎻愬彇鏁版嵁
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+ for (var i = 0; i < data.length; i++) {//閬嶅巻data鏁扮粍閲嶇殑鏁版嵁
+ if (this.titleData.indexOf(data[i].name) > -1) {//妫�鏌ata銆恑銆�.name鏄惁鍦ㄦ暟缁勪腑 //璁$畻鍒�
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ } else if (totalArray.indexOf(data[i].name) > -1 || (data[i].Type == "Decimal" || data[i].Type == "Int32")) { //璁$畻鍒�
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+ }
+ else {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+ }
+
+ }
+ option.cols = [col]
+ this.dataList = option
+ option.data = data1.data;
+ var result = data1.data;
+ var temp = "";
+ for (var i = 0; i < result.length; i++) {
+ if (temp != result[i]["HItemID"]) {
+ temp = result[i]["HItemID"];
+ } else {
+ result[i].鏃ユ湡 = null;
+ result[i].鍗曟嵁鍙� = "";
+ /*result[i].鐘舵�� = "";*/
+ result[i].绾㈣摑鍗曟爣璁� = "";
+ result[i].hsupid = "";
+ result[i].瀹㈡埛 = "";
+ result[i].HEmpID = "";
+ result[i].涓氬姟鍛� = "";
+ result[i].hmanagerid = "";
+ result[i].涓荤 = "";
+ result[i].hsecmanagerid = "";
+ result[i].鍙戣揣浜� = "";
+ result[i].hkeeperid = "";
+ result[i].淇濈鍛� = "";
+ result[i].HDeptID = "";
+ result[i].閮ㄩ棬 = "";
+ result[i].閿�鍞柟寮� = "";
+ }
+ }
+ option.data = result;
+ this.DisPlay_HideColumn(this.HModName, sessionStorage["HUserName"], option, this.dataList);
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ DisPlay_HideColumn(HModName, user, option, dataOption) {
+ this.totalNameList = []
+ axios.get(this.baseURL + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
+ params: {
+ "HModName": HModName,
+ "user": user,
+ },
+ }).then(res => {
+ let data1 = res.data
+ if (data1.data.length != 0) {
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+ newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
+ dataCol = data1.data[0].HGridString.split(',');
+ //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+ if (dataCol.length == option.cols[0].length - 1) {
+ //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+ for (var j = 0; j < option.cols[0].length - 1; j++) {
+ for (var i = 0; i < option.cols[0].length - 1; i++) {
+ var dataCols = dataCol[j].split('|');
+ //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+ if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && this.titleData.indexOf(option.cols[0][i + 1]["title"]) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
+ } else {
+ option.cols[0][i + 1]["totalRow"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ newCols[0].push(option.cols[0][i + 1]);
+ break;
+ }
+ }
+ }
+ //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+ if (dataCol.length == newCols[0].length - 1) {
+ option.cols = newCols;
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i + 1]["fixed"] != null) {
+ option.cols[0][i + 1]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if (dataOption.cols[0].indexOf(option.cols[0][i + 1]["title"]) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ //璁剧疆鍒楁帓搴�
+ for (var i = 1; i < option.cols[0].length; i++) {
+ if (data1.data[0].HSortFlag == "鏄�") {
+ option.cols[0][i]["sort"] = true;
+ }
+ else {
+ option.cols[0][i]["sort"] = false;
+ }
+ }
+ }
+ }
+ this.btList = option.cols[0]
+ this.btList.map(item => {
+ if (!item.hide) {
+ this.totalNameList.push(item)
+ }
+ })
+ if (data1.data[0].HPageSize == 0) {
+ this.pageSize = 50
+ } else {
+ this.pageSize = data1.data[0].HPageSize
+ }
+ this.tableData = option.data
+ this.tableShow = true
+ this.loading = false
+ } else {
+ this.btList = dataOption.cols[0]
+ this.btList.map(item => {
+ if (!item.hide) {
+ this.totalNameList.push(item)
+ }
+ })
+ this.tableData = dataOption.data
+ this.tableShow = true
+ this.loading = false
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ renderHeader(h, { column, $index }) {// 鏂板缓涓�涓� span
+ let span = document.createElement(span)// 璁剧疆琛ㄥご鍚嶇О
+ span.innerText = column.label
+ //涓存椂鎻掑叆 document
+ document.body.appendChild(span)// 閲嶇偣:鑾峰彇 span 鏈�灏忓搴︼紝璁剧疆褰撳墠鍒楋紝娉ㄦ剰杩欓噷鍔犱簡 20锛屽瓧娈佃緝澶氭椂column.minWidth=span.getBoundingClientRect().width + 50.//绉婚櫎 document 涓复鏃剁殑 span
+ document.body.removeChild(span)
+ return h(span, column.label)
+ },
+ //鐐瑰嚮琛�
+ handleRowClick(row, column, event) {
+ this.lastSelectedRow = this.selectedRow; // 璁板綍涓婁竴娆¢�変腑鐨勮
+ this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
+ this.lastSelectedRowIndex = this.tableData.indexOf(row);
+ this.$refs.tableData.toggleRowSelection(row);
+ if (this.openPage) {
+ this.$emit('deptEmit', row, 3)
}
},
-
-
- buildQueryCondition() {
- let sWhere = ""
-
-
- if (this.queryParams.HNumber) {
- sWhere += ` and 鍦板尯浠g爜 like '%${this.queryParams.HNumber}%'`
+ //閫変腑琛岄珮浜牱寮�
+ rowStyle({ row, rowIndex }) {
+ if (this.ids.includes(row.HItemID)) {
+ return { "background": "#ecf5ff" }
}
- if (this.queryParams.HName) {
- sWhere += ` and 鍦板尯鍚嶇О like '%${this.queryParams.HName}%'`
+ },
+ //鍙屽嚮琛�
+ handleDblclick(row, column, cell, event) {
+ this.OperationType = 3
+ if (this.openPage) {
+ this.$emit('deptEmitDb', row, 3)
+ } else {
+ this.handleEdit();
}
-
- if (this.queryParams.ColName && this.queryParams.ColName !== "0" &&
- this.queryParams.Comparator && this.queryParams.Comparator !== "0") {
- let com = ""
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ // this.rowForm = {}
+ if (this.openPage) {
+ //鍒楄〃鍗曢��
+ if (selection.length > 1) {
+ const del_row = selection.shift()
+ this.$refs.tableData.toggleRowSelection(del_row, false) //璁剧疆杩欎竴琛屽彇娑堥�変腑
+ }
+ this.rowForm = {}
+ this.ids = selection.map(item => item.HItemID)
+ this.rowForm = selection[0]
+ } else {
+ //澶氶��
+ this.ids = selection.map(item => item.HItemID)
+ this.single = selection.length != 1
+ this.multiple = !selection.length
+ if (!this.single) {
+ this.rowForm = selection[0]
+ }
+ }
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.sWhere = ''
+ if (this.queryParams.ColName && this.queryParams.Comparator) {
+ var com = "";
switch (this.queryParams.Comparator) {
case "7":
- com = `like '%${this.queryParams.ColContent}%'`
- break
+ com = "like'%" + this.queryParams.ColContent + "%'";
+ break;
case "8":
- com = `like '%${this.queryParams.ColContent}'`
- break
+ com = "like'%" + this.queryParams.ColContent + "'";
+ break;
case "9":
- com = `like '${this.queryParams.ColContent}%'`
- break
+ com = "like'" + this.queryParams.ColContent + "%'";
+ break;
case "10":
- com = `not like '%${this.queryParams.ColContent}%'`
- break
+ com = "not like'%" + this.queryParams.ColContent + "%'";
+ break;
default:
- com = `${this.queryParams.Comparator} '${this.queryParams.ColContent}'`
- break
+ com = "" + this.queryParams.Comparator + "'" + this.queryParams.ColContent + "'";
+ break;
}
- sWhere += ` and ${this.queryParams.ColName} ${com}`
+ this.sWhere += " and " + this.queryParams.ColName + " " + com;
}
-
-
- sWhere += this.addSWhereByOpenType()
-
- return sWhere
- },
-
+ if (this.queryParams.ColName1 && this.queryParams.Comparator1) {
+ var com1 = "";
+ switch (this.queryParams.Comparator1) {
+ case "7":
+ com1 = "like'%" + this.queryParams.ColContent1 + "%'";
+ break;
+ case "8":
+ com1 = "like'%" + this.queryParams.ColContent1 + "'";
+ break;
+ case "9":
+ com1 = "like'" + this.queryParams.ColContent1 + "%'";
+ break;
+ case "10":
+ com1 = "not like'%" + this.queryParams.ColContent1 + "%'";
+ break;
+ default:
+ com1 = "" + this.queryParams.Comparator1 + "'" + this.queryParams.ColContent1 + "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName1 + " " + com1;
+ }
+ if (this.queryParams.ColName2 && this.queryParams.Comparator2) {
+ var com2 = "";
+ switch (this.queryParams.Comparator2) {
+ case "7":
+ com2 = "like'%" + this.queryParams.ColContent2 + "%'";
+ break;
+ case "8":
+ com2 = "like'%" + this.queryParams.ColContent2 + "'";
+ break;
+ case "9":
+ com2 = "like'" + this.queryParams.ColContent2 + "%'";
+ break;
+ case "10":
+ com2 = "not like'%" + this.queryParams.ColContent2 + "%'";
+ break;
+ default:
+ com2 = "" + this.queryParams.Comparator + "'" + this.queryParams.ColContent + "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
+ }
+ if (this.queryParams.HNumber) {
+ this.sWhere += " and 閮ㄩ棬浠g爜 like '%" + this.queryParams.HNumber + "%'";
+ }
+ if (this.queryParams.HName) {
+ this.sWhere += " and 閮ㄩ棬鍚嶇О like '%" + this.queryParams.HName + "%'";
+ }
+ if (this.queryParams.HOrgID) {
+ this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'"
+ }
+ // this.sWhere += this.addSWhereByOpenType()
+ // this.sWhere += this.getOrgIDByUser()
+ this.clearData()
+ this.getList()
+ },
+ // 鍒ゆ柇鏄洿鎺ユ墦寮�椤甸潰杩樻槸鍏跺畠椤甸潰閫氳繃閫夋嫨鎸夐挳鎵撳紑锛屽苟鏄剧ず鐩稿簲鏁版嵁
addSWhereByOpenType() {
-
- return " and 绂佺敤鏍囧織 = '鍚�' and 瀹℃牳浜� != ''"
+ //鑾峰彇鍙傛暟
+ var sWhere = "";
+ //this.openPage鍒ゆ柇鏄惁鏈夊�硷紝鏈変唬琛ㄥ叾瀹冮〉闈㈤�氳繃閫夋嫨鎸夐挳鎵撳紑
+ if (this.openPage) {
+ sWhere += " and 绂佺敤鏍囪 != 'Y' and ISNULL(瀹℃牳浜�,'') != ''"
+ return sWhere;
+ }
+ return sWhere;
},
-
-
- generateTableColumns(columnList) {
- this.tableColumns = []
-
-
- this.tableColumns.push({ type: 'selection', fixed: 'left' })
-
-
- if (columnList && columnList.length > 0) {
- columnList.forEach(item => {
- if (!this.hiddenFields.includes(item.ColmCols)) {
- const column = {
- field: item.ColmCols,
- label: item.ColmCols,
- align: 'center',
- sortable: true,
- width: 200
- }
-
-
- if (item.ColmType === 'DateTime') {
- column.formatter = this.formatDate
- }
-
- this.tableColumns.push(column)
+ //鏍规嵁鐢ㄦ埛鑾峰彇鐢ㄦ埛鍏宠仈缁勭粐鐨勮繃婊ゆ潯浠�
+ getOrgIDByUser() {
+ var res = "";
+ axios.get(this.baseURL + '/Xt_User/getOrgIDListByUser', {
+ params: {
+ HModName: this.HModName,
+ user: sessionStorage["HUserName"],
+ HOrgID: sessionStorage["OrganizationID"]
+ },
+ }).then(response => {
+ let result = response.data
+ if (result.count == 1) {
+ if (result.data[0].sWhere == "1") {
+ res = " and HUSEORGID = '" + sessionStorage["OrganizationID"] + "'";
+ } else {
+ res = result.data[0].sWhere;
}
- })
- } else {
-
- const defaultColumns = [
- { field: '鍦板尯浠g爜', label: '鍦板尯浠g爜', align: 'center', width: 120 },
- { field: '鍦板尯鍚嶇О', label: '鍦板尯鍚嶇О', align: 'center', width: 120 },
- { field: '鏉$爜缂栧彿', label: '鏉$爜缂栧彿', align: 'center', width: 120 },
- { field: '绂佺敤鏍囪', label: '绂佺敤鏍囪', align: 'center', width: 100 },
- { field: '澶囨敞', label: '澶囨敞', align: 'center', width: 150 },
- { field: '瀹℃牳浜�', label: '瀹℃牳浜�', align: 'center', width: 100 },
- { field: '鍒涘缓浜�', label: '鍒涘缓浜�', align: 'center', width: 100 },
- { field: '鍒涘缓鏃堕棿', label: '鍒涘缓鏃堕棿', align: 'center', width: 150 }
- ]
- this.tableColumns = [...this.tableColumns, ...defaultColumns]
- }
+ }
+ }).catch(error => {
+ res = " and 1 = 0";
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ return res;
},
-
- // 鏌ヨ
- handleQuery() {
- this.pagination.page = 1
- this.loadTableData()
- },
-
- // 閲嶇疆鏌ヨ
- handleReset() {
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.sWhere = ''
this.queryParams = {
- HNumber: '',
- HName: '',
- ColName: '0',
- Comparator: '0',
- ColContent: ''
+ HOrgID: null,
+ HName: null,
+ HNumber: null,
+ Comparator1: '',
+ Comparator2: '',
+ Comparator: '',
+ ColContent1: '',
+ ColContent2: '',
+ ColContent: '',
}
- this.pagination.page = 1
- this.loadTableData()
+ this.clearData()
+ this.resetForm("queryForm")
+ this.getList()
},
-
- // 鍒锋柊
- handleRefresh() {
- this.loadTableData()
+ clearData() {
+ this.single = true
+ this.multiple = true
+ this.OperationType = 0
+ this.copyType = 0
+ this.ids = []
},
-
- // 鍒囨崲鎶樺彔鐘舵��
- toggleCollapse() {
- this.collapse = !this.collapse
+ //閫�鍑�
+ close() {
+ this.tableShow = true
+ this.openEdit = false
+ this.editShow = false
+ this.clearData()
+ this.getList()
},
-
- // 琛屽弻鍑讳簨浠�
- handleRowDblClick(row) {
- this.selectedRow = row
- this.confirmSelection()
+ //鎵撳紑鏂板缁勪欢寮圭獥
+ handleAddEdit() {
+ this.rowForm.HItemID = 0
+ this.$nextTick(() => {
+ this.openEdit = true
+ this.editShow = true
+ })
+
},
-
- // 琛岀偣鍑讳簨浠�
- handleRowClick(row) {
- this.$refs.table.toggleRowSelection(row)
- this.selectedRow = row
+ //鎵撳紑淇敼缁勪欢寮圭獥
+ handleEdit() {
+ this.$nextTick(() => {
+ this.openEdit = true
+ this.editShow = true
+ })
},
-
- // 閫夋嫨鍙樺寲
- handleSelectionChange(selection) {
- this.multipleSelection = selection
- if (selection.length === 1) {
- this.selectedRow = selection[0]
- }
+ //鍏抽棴缂栬緫椤甸潰
+ editGyClose(val) {
+ this.editShow = false
+ this.openEdit = false
+ this.clearData()
+ this.getList()
},
-
- // 纭閫夋嫨
- confirmSelection() {
- if (this.selectedRow) {
- this.$emit('selected', {
- HItemID: this.selectedRow.HItemID,
- 鍦板尯鍚嶇О: this.selectedRow.鍦板尯鍚嶇О
- })
- this.dialogVisible = false
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete() {
+ this.$modal.confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠').then(() => {
+ if (!this.rowForm.瀹℃牳浜�) {
+ axios.get(this.baseURL + "DeltetGy_Department", {
+ params: { 'HItemID': this.rowForm.HItemID, 'user': sessionStorage["HUserName"] }
+ }).then(response => {
+ if (response.data.count == 1) {
+ this.getList()
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛")
+ } else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message);
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ } else {
+ this.$modal.msgError("姝ゆ潯鏁版嵁涓嶆槸鍒涘缓鐘舵��,鏃犳硶鍒犻櫎!");
+ }
+ }).catch(() => { })
+ },
+ // 鍙嶅鏍�/瀹℃牳鏁版嵁
+ set_CheckBill(num, form) {
+ var InterID = form.HItemID || form.HInterID
+ //閫昏緫瀹℃牳鏂规硶
+ axios.get(this.baseURL + "/Gy_Department/AuditGy_Department", {
+ params: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] }
+ }).then(response => {
+ let result = response.data
+ if (result.code == 1) {
+ this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+ this.getList();
+ }
+ else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message,);
+ }
+ this.clearData()
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ // 鍙嶇鐢�/绂佺敤鏁版嵁
+ set_De_Stop(num, form) {
+ var InterID = form.HItemID.toString() || form.HInterID.toString()
+ //閫昏緫瀹℃牳鏂规硶
+ axios.get(this.baseURL + "/Gy_Department/StopGy_Department", {
+ params: { "HInterID": InterID, "IsStop": num, "CurUserName": sessionStorage["HUserName"] }
+ }).then(response => {
+ let result = response.data
+ if (result.code == 1) {
+ this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+ this.getList();
+ }
+ else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message,);
+ }
+ this.clearData()
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ //瀵煎嚭
+ handleExport() {
+ const ws = this.$XLSX.utils.json_to_sheet(this.tyResList); // 灏嗘暟鎹浆鎹负宸ヤ綔琛�
+ const wb = this.$XLSX.utils.book_new(); // 鍒涘缓涓�涓柊鐨勫伐浣滅翱
+ this.$XLSX.utils.book_append_sheet(wb, ws, "Sheet1"); // 灏嗗伐浣滆〃娣诲姞鍒板伐浣滅翱涓紝骞跺懡鍚嶄负"Sheet1"
+ this.$XLSX.writeFile(wb, `gySource_${new Date().getTime()}.xlsx`); // 瀵煎嚭鏂囦欢
+ },
+ handleImport() {
+ this.uploadData = []
+ this.upload.isUploading = false
+ this.upload.title = "瀵煎叆";
+ this.upload.open = true;
+ },
+ // 鏂囦欢涓婁紶涓鐞�
+ handleFileUploadProgress(event, file, fileList) {
+ this.upload.isUploading = true;
+ this.uploadTableLoading = true
+ },
+ // 鏂囦欢涓婁紶鎴愬姛澶勭悊
+ handleFileSuccess(response, file, fileList) {
+ // this.upload.open = false;
+ this.upload.isUploading = true;
+ this.$refs.upload.clearFiles();
+ if (response.code == 1) {
+ this.alluploadList = response.data
+ this.uploadData = this.getPage(this.uploadPage, this.alluploadList)
+ this.uploadTotal = this.alluploadList.length
+ this.uploadTableLoading = false
+ // this.set_AddNew(response.data)
} else {
- this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
+ this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.Message + "</div>", "瀵煎叆缁撴灉", { dangerouslyUseHTMLString: true });
}
+
},
-
- // 閫�鍑�
- handleExit() {
- this.dialogVisible = false
+ // 鎻愪氦涓婁紶鏂囦欢
+ submitFileForm() {
+ this.$refs.upload.submit();
},
-
- // 鍏抽棴瀵硅瘽妗�
- handleClose(done) {
- this.$confirm('纭鍏抽棴锛�')
- .then(_ => {
- done()
- })
- .catch(_ => {})
- },
-
- // 鍒嗛〉澶у皬鏀瑰彉
- handleSizeChange(size) {
- this.pagination.size = size
- this.pagination.page = 1
- this.loadTableData()
- },
-
- // 褰撳墠椤垫敼鍙�
- handleCurrentChange(page) {
- this.pagination.page = page
- this.loadTableData()
- },
-
- // 鏍煎紡鍖栨棩鏈�
- formatDate(dateString) {
- if (!dateString) return ''
- try {
- const date = new Date(dateString)
- return date.toLocaleDateString('zh-CN')
- } catch (error) {
- return dateString
+ set_AddNew() {
+ var num = [];
+ for (var i = 0; i < this.uploadData.length; i++) {
+ if (this.uploadData[i] != "") {
+ num.push(this.uploadData[i])
+ }
}
- }
+ var sSubStr = JSON.stringify(num);
+ var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"];
+ axios({
+ method: 'post',
+ url: this.baseURL + "/Gy_Source/Gy_Source_btnSave",
+ data: {
+ 'sMainSub': sMainSub
+ },
+ }).then(res => {
+ this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + res.data.Message + "</div>", "瀵煎叆缁撴灉", { dangerouslyUseHTMLString: true });
+ this.upload.open = false
+ this.getList()
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ uploadDataIndex({ row, rowIndex }) {
+ row.index = rowIndex + 1;
+ },
+ uploadDataDelete(row) {
+ this.$modal.confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠').then(() => {
+ const deleteList = [row.index]
+ const data = this.uploadData
+ this.uploadData = data.filter(item => {
+ return deleteList.indexOf(item.index) == -1
+ });
+ }).catch(() => { })
+ },
+ getPage(page, list) {
+ let sindex = (parseInt(page) - 1) * this.uploadPageSize
+ let eindex = parseInt(page) * this.uploadPageSize
+ let newList = list.slice(sindex, eindex)
+ console.log(newList)
+ return newList
+ },
+ currentPage(val) {
+ this.uploadPage = val.page
+ setTimeout(() => {
+ this.uploadData = this.getPage(this.uploadPage, this.alluploadList)
+ }, 100)
+ },
}
-}
+};
</script>
-
-<style scoped>
-.area-dialog {
- height: 70vh;
- display: flex;
- flex-direction: column;
+<style>
+.xsckdBox .el-date-editor.el-input {
+ width: 100%;
}
-
-.search-card {
- margin-bottom: 15px;
-}
-
-.table-card {
- flex: 1;
- display: flex;
- flex-direction: column;
-}
-
-.table-card >>> .el-card__body {
- flex: 1;
- display: flex;
- flex-direction: column;
-}
-
-.clearfix:before,
-.clearfix:after {
- display: table;
- content: "";
-}
-.clearfix:after {
- clear: both;
-}
-
-.el-form-item {
- margin-bottom: 15px;
-}
-
-.el-table {
- flex: 1;
-}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/component/BarCodeDetail/index.vue b/src/views/component/BarCodeDetail/index.vue
index bb5dafc..3de45f5 100644
--- a/src/views/component/BarCodeDetail/index.vue
+++ b/src/views/component/BarCodeDetail/index.vue
@@ -125,7 +125,7 @@
allColumns: [],
selectedColumns: [],
selectedRows: [],
- baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/"
+ baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/"
}
},
methods: {
@@ -138,8 +138,8 @@
const hmainid = record.hmainid || record.HInterID
const billNo = record.鍗曟嵁鍙� || record.HBillNo
-
-
+
+
let billTypeDesc = ''
switch (record.鍗曟嵁绫诲瀷 || '') {
case '1201': billTypeDesc = '澶栬喘鍏ュ簱鍗�'; break
@@ -170,10 +170,10 @@
this.loading = true
try {
const sWhere = `${HInterID},'${HBillType}','${HBillNo}'`
-
+
const url = `${this.baseURL}/Kf_ICStockInOutBill/Kf_BarCodeDetailQuery`
const params = { sWhere }
-
+
const response = await axios.get(url, { params })
const data = response.data
@@ -196,7 +196,7 @@
const columns = []
const allColumns = []
-
+
columns.push({
type: 'selection',
width: 55,
@@ -213,7 +213,7 @@
sortable: true
}
-
+
switch (colName) {
case 'HItemID':
columnConfig.hide = true
@@ -246,7 +246,7 @@
handleCellEdit(row, field, value) {
- const ref = /^\d+(\.\d+)?$/
+ const ref = /^\d+(\.\d+)?$/
switch (field) {
case 'HMaterialJQty':
@@ -327,12 +327,12 @@
validateData() {
- const ref = /^\d+(\.\d+)?$/
+ const ref = /^\d+(\.\d+)?$/
for (let i = 0; i < this.tableData.length; i++) {
const row = this.tableData[i]
-
+
const weight = row.HMaterialJQty + ''
if (!ref.test(weight)) {
this.$message.warning(`绗�${i + 1}琛岋細閲嶉噺缁存姢璇疯緭鍏ヤ笉灏忎簬0鐨勬暟瀛楋紒`)
@@ -365,12 +365,12 @@
applyColumnSettings() {
this.tableColumns = [
- this.tableColumns[0],
+ this.tableColumns[0],
...this.allColumns.filter(col => this.selectedColumns.includes(col.field))
]
this.columnDialogVisible = false
-
-
+
+
this.saveColumnSettings()
},
@@ -380,20 +380,20 @@
saveColumnSettings() {
-
+
},
// 鍚堣琛岃绠�
getSummaries(param) {
const { columns, data } = param
const sums = []
-
+
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '鍚堣'
return
}
-
+
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
@@ -452,4 +452,4 @@
:deep(.el-card__body) {
padding: 12px;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/component/CurrencyDialog/index.vue b/src/views/component/CurrencyDialog/index.vue
index 943ce98..a3fc120 100644
--- a/src/views/component/CurrencyDialog/index.vue
+++ b/src/views/component/CurrencyDialog/index.vue
@@ -1,568 +1,954 @@
<template>
- <el-dialog
- title="閫夋嫨璐у竵"
- :visible.sync="dialogVisible"
- width="80%"
- :before-close="handleClose"
- append-to-body
- >
- <div class="currency-dialog">
- <el-card class="search-card">
- <div slot="header" class="clearfix">
- <span>鏌ヨ鏉′欢</span>
- <el-button
- style="float: right; padding: 3px 0"
- type="text"
- @click="toggleCollapse"
- >
- {{ collapse ? '灞曞紑' : '鏀惰捣' }}
- </el-button>
- </div>
-
- <el-form :model="queryParams" ref="queryForm" :inline="true">
- <el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="璐у竵浠g爜">
- <el-input
- v-model="queryParams.HNumber"
- placeholder="璇疯緭鍏ヨ揣甯佷唬鐮�"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="璐у竵鍚嶇О">
- <el-input
- v-model="queryParams.HName"
- placeholder="璇疯緭鍏ヨ揣甯佸悕绉�"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" @click="handleQuery">鏌ヨ</el-button>
- <el-button icon="el-icon-refresh" @click="handleReset">閲嶇疆</el-button>
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-collapse-transition>
- <div v-show="!collapse">
- <el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="杩囨护瀛楁">
- <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨瀛楁" style="width: 100%">
- <el-option value="0" label=""></el-option>
- <el-option
- v-for="column in visibleColumns"
- :key="column.field"
- :label="column.label"
- :value="column.field"
- />
+ <div style="padding: 10px; position: relative;">
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="98px" class="searchBox">
+ <el-row>
+ <!-- <el-form-item label="閮ㄩ棬浠g爜" prop="HNumber" style="margin-left: 100px;">
+ <el-input v-model="queryParams.HNumber" placeholder="璇疯緭鍏ラ儴闂ㄤ唬鐮�" @keyup.enter.native="handleQuery" />
+ </el-form-item>
+ <el-form-item label="閮ㄩ棬鍚嶇О" prop="HName">
+ <el-input v-model="queryParams.HName" placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�" @keyup.enter.native="handleQuery" />
+ </el-form-item> -->
+ <el-form-item label="缁勭粐">
+ <el-select v-model="queryParams.HOrgID" placeholder="璇烽�夋嫨">
+ <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label-width="78px">
+ <el-button type="primary" icon="el-icon-search" @click="handleQuery">
+ 鎼� 绱�</el-button>
+ <el-button type="primary" icon="el-icon-refresh" @click="resetQuery">閲� 缃�</el-button>
+ </el-form-item>
+ </el-row>
+ <el-collapse v-model="activeSeach">
+ <el-collapse-item title="鏇村" name="1">
+ <el-card class="box-card">
+ <div slot="header" class="clearfix"><span>杩囨护</span></div>
+ <div>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName1" placeholder="璇烽�夋嫨">
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
+ </span>
</el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="姣旇緝绗�">
- <el-select v-model="queryParams.Comparator" placeholder="璇烽�夋嫨姣旇緝绗�" style="width: 100%">
- <el-option value="0" label=""></el-option>
- <el-option label="=" value="=" />
- <el-option label=">=" value=">=" />
- <el-option label=">" value=">" />
- <el-option label="<=" value="<=" />
- <el-option label="<" value="<" />
- <el-option label="<>" value="<>" />
- <el-option label="鍖呭惈" value="7" />
- <el-option label="宸﹀寘鍚�" value="8" />
- <el-option label="鍙冲寘鍚�" value="9" />
- <el-option label="涓嶅寘鍚�" value="10" />
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator1" placeholder="璇烽�夋嫨">
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
</el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="鍐呭">
- <el-input
- v-model="queryParams.ColContent"
- placeholder="璇疯緭鍏ュ唴瀹�"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- </el-col>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent1" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
+ <el-row>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName2" placeholder="璇烽�夋嫨">
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
+ </span>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator2" placeholder="璇烽�夋嫨">
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
+ </span>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent2" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
</el-row>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨">
+ <el-option v-for="(item, index) in btList" :key="index" :label="item.field"
+ :value="item.field"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator" placeholder="璇烽�夋嫨">
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
</div>
- </el-collapse-transition>
-
- <!-- 褰撳墠杩囨护鏂规鏄剧ず -->
- <div v-if="currentFilterScheme" class="filter-scheme">
- {{ currentFilterScheme }}
- </div>
- </el-form>
- </el-card>
-
- <el-card class="table-card">
- <div slot="header" class="clearfix">
- <span>璐у竵鍒楄〃</span>
- <el-button-group style="float: right">
- <el-button type="primary" icon="el-icon-refresh" @click="handleRefresh">鍒锋柊</el-button>
- <el-button type="primary" icon="el-icon-close" @click="handleExit">閫�鍑�</el-button>
- </el-button-group>
+ </el-card>
+ </el-collapse-item>
+ </el-collapse>
+ </el-form>
+ <el-row :gutter="10" class="mb8" style="margin-top: 10px;">
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-download" size="mini" @click="handleImport">瀵煎叆</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddEdit(OperationType = 1)"
+ id="btn-Add">鏂板</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="handleEdit(row = rowForm, OperationType = 3)">缂栬緫</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="handleEdit(row = rowForm, copyType = 1)">澶嶅埗</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">鍒犻櫎
+ </el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="set_CheckBill(0, form = rowForm)">瀹℃牳</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="set_CheckBill(1, form = rowForm)">杩斿鏍�</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="set_De_Stop(0, form = rowForm)">绂佺敤</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="set_De_Stop(1, form = rowForm)">鍙嶇鐢�</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">瀵煎嚭</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-download" size="mini" @click="handleRowHide">闅愯棌鍒楄缃�</el-button>
+ </el-col>
+ </el-row>
+ <div class="tableBox" v-loading="loading">
+ <el-table :data="tableData" ref="tableData" max-height="750" :summary-method="getSummaries"
+ @selection-change="handleSelectionChange" show-summary border @row-click="handleRowClick" :row-style="rowStyle"
+ @cell-dblclick="handleDblclick" v-if="tableShow">
+ <template v-for="(item, index) in btList">
+ <el-table-column type="selection" width="55" align="center" :fixed="item.fixed" v-if="item.type == 'checkbox'"
+ :key="index" />
+ <el-table-column :align="item.align" :prop="item.field" :label="item.title" :width="item.width"
+ :key="item.sorderid" v-else-if="!item.hide && item.type != 'checkbox'" :sortable="item.sort"
+ show-overflow-tooltip :fixed="item.fixed">
+ <template slot-scope="{row, column }">
+ <el-checkbox v-model="checked" v-if="item.type == 'checkbox'"></el-checkbox>
+ <div :style="item.style">
+ <span v-if="column.property.includes('鏃ユ湡')">{{ parseTime(row[column.property], '{y}-{m}-{d}') }}</span>
+ <el-button type="text" @click="handleEdit(row, OperationType = 3)"
+ v-else-if="column.property == '鍗曟嵁鍙�'">{{
+ row.鍗曟嵁鍙�
+ }}</el-button>
+ <span v-else>{{ row[column.label] }}</span>
+ </div>
+ </template>
+ </el-table-column>
+ </template>
+ </el-table>
+ <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes"
+ @pagination="getList" />
+ <el-dialog title="闅愯棌鍒楄缃�" :visible.sync="openRowHide" width="816px" append-to-body>
+ <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" />
+ </el-dialog>
+ <!-- 缂栬緫 -->
+ <el-dialog title="缂栬緫閮ㄩ棬璧勬枡" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
+ <edit :OperationType=OperationType :linterid=this.rowForm.HItemID :HSouceBillType=this.rowForm.HSourceBillType
+ :copyType="copyType" @editCloseGy="editGyClose" v-if="editShow" />
+ </el-dialog>
+ <el-dialog :title="upload.title" :visible.sync="upload.open" width="1500px" append-to-body>
+ <div style="margin-top:-20px ;">
+ <el-button type="primary" @click="set_AddNew">瀵煎叆鏁版嵁</el-button>
+ <el-button type="primary" @click="upload.open = false">閫� 鍑�</el-button>
+ <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" style="display: inline-block; margin-left: 10px;"
+ :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
+ :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess">
+ <el-button type="primary">鏂囦欢涓婁紶</el-button>
+ </el-upload>
</div>
-
- <el-table
- ref="table"
- :data="tableData"
- v-loading="loading"
- height="400"
- border
- highlight-current-row
- @row-dblclick="handleRowDblClick"
- @row-click="handleRowClick"
- @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column
- v-for="column in tableColumns"
- :key="column.field"
- :prop="column.field"
- :label="column.label"
- :width="column.width"
- :align="column.align"
- :sortable="column.sortable"
- show-overflow-tooltip
- >
- <template slot-scope="{ row, column }">
-
- <el-button
- v-if="column.property === '璐у竵浠g爜'"
- type="text"
- @click="handleCurrencyCodeClick(row)"
- style="color: #409EFF;"
- >
- {{ row[column.property] }}
- </el-button>
- <span v-else-if="column.property.includes('鏃堕棿') || column.property.includes('鏃ユ湡')">
- {{ formatDate(row[column.property]) }}
- </span>
- <span v-else>{{ row[column.property] }}</span>
+ <el-table :data="uploadData" v-loading="uploadTableLoading" :row-class-name="uploadDataIndex" border
+ height="550">
+ <el-table-column type="index" label="搴忓彿" width="55" align="center" />
+ <el-table-column label="缁勭粐浠g爜" prop="缁勭粐浠g爜" align="center" width="120" />
+ <el-table-column label="缁勭粐鍚嶇О" prop="缁勭粐鍚嶇О" align="center" width="120" />
+ <el-table-column label="璐熻矗浜轰唬鐮�" prop="璐熻矗浜轰唬鐮�" align="center" width="120" />
+ <el-table-column label="璐熻矗浜�" prop="璐熻矗浜�" align="center" width="120" />
+ <el-table-column label="宸ヤ綔涓績浠g爜" prop="宸ヤ綔涓績浠g爜" align="center" width="120" />
+ <el-table-column label="宸ヤ綔涓績鍚嶇О" prop="宸ヤ綔涓績鍚嶇О" align="center" width="120" />
+ <el-table-column label="鍗曠彮宸ユ椂" prop="鍗曠彮宸ユ椂" align="center" width="120" />
+ <el-table-column label="鎿嶄綔" align="center">
+ <template slot-scope="scope">
+ <el-button size="mini" type="text" icon="el-icon-delete"
+ @click="uploadDataDelete(scope.row)">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
-
-
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="pagination.page"
- :page-sizes="[50, 100, 500, 5000]"
- :page-size="pagination.size"
- layout="total, sizes, prev, pager, next, jumper"
- :total="pagination.total"
- style="margin-top: 15px; text-align: right;"
- />
- </el-card>
+ <pagination v-show="uploadTotal > 0" :total="uploadTotal" :page.sync="uploadPage" :limit.sync="uploadPageSize"
+ :pageSizes="uploadPageSizes" @pagination="currentPage" />
+ </el-dialog>
</div>
- </el-dialog>
+ </div>
</template>
<script>
import axios from 'axios'
+import RowSettings from '@/views/component/rowSettings'
+import Edit from '@/views/basic/gy/gyDepartmentEdit.vue'
export default {
- name: 'CurrencyDialog',
+ name: 'GyDepartment',
+ components: { RowSettings, Edit },
props: {
- visible: {
- type: Boolean,
- default: false
- }
+ openPage: { type: String, },
},
data() {
return {
- dialogVisible: false,
- collapse: false,
- loading: false,
+ activeSeach: '',
+ HModName: 'Gy_DepartmentList',
+ editShow: false,
+ openEdit: false,
+ totalNameList: [],
+ tableShow: true,
+ openPrintList: false,
+ printListShow: false,
+ // HBillType: '1205',
+ openBtnHide: false,
+ btnHideShow: false,
+ rowHideShow: false,
+ openRowHide: false,
+ copyType: 0,
+ comparatorList: [
+ { label: '=', value: '=' },
+ { label: '>=', value: '>=' },
+ { label: '>', value: '>' },
+ { label: '<=', value: '<=' },
+ { label: '<', value: '<' },
+ { label: '<>', value: '<>' },
+ { label: '鍖呭惈', value: '7' },
+ { label: '宸﹀寘鍚�', value: '8' },
+ { label: '鍙冲寘鍚�', value: '9' },
+ { label: '涓嶅寘鍚�', value: '10' },
+ ],
+ sWhere: '',
+ dialogTitle: '',
+ organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//缁勭粐鍒楄〃
+ OperationType: null,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
+ HInterID: null,
+ baseURL: process.env.VUE_APP_BASE_API,
+ lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
+ lastSelectedRow: null, // 涓婁竴娆¢�変腑鐨勮
+ selectedRow: null, // 褰撳墠閫変腑鐨勮
+ rowForm: {},
+ activeName: 'first',
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
+ // 鏌ヨ鍙傛暟
queryParams: {
- HNumber: '',
- HName: '',
- ColName: '0',
- Comparator: '0',
- ColContent: ''
+ HOrgID: sessionStorage["OrganizationID"] - 0,
+ HName: null,
+ HNumber: null,
+ Comparator1: '',
+ Comparator2: '',
+ Comparator: '',
+ ColContent1: '',
+ ColContent2: '',
+ ColContent: '',
},
-
- tableData: [],
- tableColumns: [],
- selectedRow: null,
- multipleSelection: [],
-
- pagination: {
- page: 1,
- size: 50,
- total: 0
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 閬僵灞�
+ loading: true,
+ tyResList: [],//鍒楄〃锛堟帴鍙f暟鎹級
+ btList: [],//琛ㄥご鍒楄〃鏄剧ず
+ btResList: [],
+ tableData: [],//鍒楄〃(鍒嗛〉鏄剧ず)
+ dataList: [],
+ titleData: ["HItemID", "HUSEORGID", "HEmpID", "璐熻矗浜�"],//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ pageSizes: [50, 100, 500, 5000, 50000],
+ page: 1,
+ pageSize: 0,
+ total: 0,
+ // 琛ㄥ崟鍙傛暟
+ form: {},
+ // 琛ㄥ崟鏍¢獙
+ rules: {},
+ upload: {
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁绂佺敤涓婁紶
+ isUploading: false,
+ // 鏄惁鏇存柊宸茬粡瀛樺湪鐨勬暟鎹�
+ updateSupport: 0,
+ // 璁剧疆涓婁紶鐨勮姹傚ご閮�
+ // headers: { Authorization: "Bearer " + getToken() },
+ // 涓婁紶鐨勫湴鍧�
+ url: process.env.VUE_APP_BASE_API + "/Gy_Source/Gy_Source_Excel"
},
-
- currentFilterScheme: '',
- HInterID_Choose: 0,
-
- hiddenFields: ["HItemID"],
-
- baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/',
- user: 'admin',
- HModName: 'Gy_Currency',
- HModuleName: '璐у竵鍒楄〃缁存姢'
- }
+ uploadData: [],
+ alluploadList: [],
+ uploadTableLoading: false,
+ uploadPageSizes: [50, 100, 500, 5000, 50000],
+ uploadPage: 1,
+ uploadPageSize: 50,
+ uploadTotal: 0,
+ };
},
- computed: {
- visibleColumns() {
- return this.tableColumns
- .filter(col => !this.hiddenFields.includes(col.field))
- .map(col => ({
- field: col.field,
- label: col.label
- }))
- }
- },
- watch: {
- visible: {
- immediate: true,
- handler(val) {
- this.dialogVisible = val
- if (val) {
- this.initData()
- }
- }
- },
- dialogVisible(val) {
- this.$emit('update:visible', val)
- }
+ created() {
+ this.getList()
},
methods: {
- // 鍒濆鍖栨暟鎹�
- initData() {
- this.loadTableData()
- this.getDefaultFilterScheme()
- },
-
- async loadTableData() {
- this.loading = true
- try {
- const sWhere = this.buildQueryCondition()
-
- const response = await axios.get(`${this.baseURL}/Gy_Currency/list1`, {
- params: {
- sWhere: sWhere,
- user: this.user,
- page: this.pagination.page,
- size: this.pagination.size
- }
- })
-
- if (response.data.count === 1) {
- this.tableData = response.data.data
- this.pagination.total = response.data.total || response.data.data.length
- this.generateTableColumns(response.data.list)
- } else {
- this.$message.error(response.data.Message || '鍔犺浇鏁版嵁澶辫触')
+ getSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = '鍚堣';
+ return;
}
- } catch (error) {
- console.error('鍔犺浇璐у竵鏁版嵁澶辫触:', error)
- this.$message.error('鍔犺浇璐у竵鏁版嵁澶辫触')
- } finally {
- this.loading = false
+ const values = data.map(item => Number(item[column.property]));
+ if (this.totalNameList[index].totalRow) {
+ if (!values.every(value => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr);
+ if (!isNaN(value)) {
+ return prev + curr;
+ } else {
+ return prev;
+ }
+ }, 0)
+
+ } else {
+ sums[index] = '';
+ }
+ }
+ }, 1000);
+ return sums;
+ },
+
+ handleBtnHide() {
+ this.btnHideShow = true
+ this.openBtnHide = true
+ },
+ handleRowHide() {
+ this.rowHideShow = true
+ this.openRowHide = true
+ },
+ rowSetClose(val) {
+ this.rowHideShow = false
+ this.tableShow = true
+ this.openRowHide = val
+ this.getList()
+ },
+ //鍒楄〃鏁版嵁
+ getList() {
+ this.pageSize = 50
+ this.tableShow = false
+ this.loading = true
+ if (this.pageSize == 0) {
+ this.pageSize = 50
+ }
+ //this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'"
+ //鐢熶骇璧勬枡鍒楄〃
+ axios.get(this.baseURL + '/Gy_Currency/list1', {
+ params: {
+ "sWhere": this.sWhere,
+ "user": sessionStorage["HUserName"],
+ },
+ }).then(response => {
+ this.tyResList = response.data.data//鎬绘暟鎹�
+ let data1 = response.data
+ let option = []
+ if (data1.code == 1) {
+ this.btResList = data1.list//鐢熶骇璧勬枡鎺ュ彛琛ㄥご鏁版嵁
+ this.total = data1.count;
+ var data = [];//鍒楀瓧娈垫暟鎹�
+ var col = [];
+ var totalArray = ["浠舵暟"];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {//寰簭閬嶅巻鏁扮粍
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });//浠庢瘡涓璞′腑鎻愬彇鏁版嵁
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+ for (var i = 0; i < data.length; i++) {//閬嶅巻data鏁扮粍閲嶇殑鏁版嵁
+ if (this.titleData.indexOf(data[i].name) > -1) {//妫�鏌ata銆恑銆�.name鏄惁鍦ㄦ暟缁勪腑 //璁$畻鍒�
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ } else if (totalArray.indexOf(data[i].name) > -1 || (data[i].Type == "Decimal" || data[i].Type == "Int32")) { //璁$畻鍒�
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+ }
+ else {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+ }
+
+ }
+ option.cols = [col]
+ this.dataList = option
+ option.data = data1.data;
+ var result = data1.data;
+ var temp = "";
+ for (var i = 0; i < result.length; i++) {
+ if (temp != result[i]["HItemID"]) {
+ temp = result[i]["HItemID"];
+ } else {
+ result[i].鏃ユ湡 = null;
+ result[i].鍗曟嵁鍙� = "";
+ /*result[i].鐘舵�� = "";*/
+ result[i].绾㈣摑鍗曟爣璁� = "";
+ result[i].hsupid = "";
+ result[i].瀹㈡埛 = "";
+ result[i].HEmpID = "";
+ result[i].涓氬姟鍛� = "";
+ result[i].hmanagerid = "";
+ result[i].涓荤 = "";
+ result[i].hsecmanagerid = "";
+ result[i].鍙戣揣浜� = "";
+ result[i].hkeeperid = "";
+ result[i].淇濈鍛� = "";
+ result[i].HDeptID = "";
+ result[i].閮ㄩ棬 = "";
+ result[i].閿�鍞柟寮� = "";
+ }
+ }
+ option.data = result;
+ this.DisPlay_HideColumn(this.HModName, sessionStorage["HUserName"], option, this.dataList);
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ DisPlay_HideColumn(HModName, user, option, dataOption) {
+ this.totalNameList = []
+ axios.get(this.baseURL + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
+ params: {
+ "HModName": HModName,
+ "user": user,
+ },
+ }).then(res => {
+ let data1 = res.data
+ if (data1.data.length != 0) {
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+ newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
+ dataCol = data1.data[0].HGridString.split(',');
+ //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+ if (dataCol.length == option.cols[0].length - 1) {
+ //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+ for (var j = 0; j < option.cols[0].length - 1; j++) {
+ for (var i = 0; i < option.cols[0].length - 1; i++) {
+ var dataCols = dataCol[j].split('|');
+ //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+ if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && this.titleData.indexOf(option.cols[0][i + 1]["title"]) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
+ } else {
+ option.cols[0][i + 1]["totalRow"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ newCols[0].push(option.cols[0][i + 1]);
+ break;
+ }
+ }
+ }
+ //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+ if (dataCol.length == newCols[0].length - 1) {
+ option.cols = newCols;
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i + 1]["fixed"] != null) {
+ option.cols[0][i + 1]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if (dataOption.cols[0].indexOf(option.cols[0][i + 1]["title"]) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ //璁剧疆鍒楁帓搴�
+ for (var i = 1; i < option.cols[0].length; i++) {
+ if (data1.data[0].HSortFlag == "鏄�") {
+ option.cols[0][i]["sort"] = true;
+ }
+ else {
+ option.cols[0][i]["sort"] = false;
+ }
+ }
+ }
+ }
+ this.btList = option.cols[0]
+ this.btList.map(item => {
+ if (!item.hide) {
+ this.totalNameList.push(item)
+ }
+ })
+ if (data1.data[0].HPageSize == 0) {
+ this.pageSize = 50
+ } else {
+ this.pageSize = data1.data[0].HPageSize
+ }
+ this.tableData = option.data
+ this.tableShow = true
+ this.loading = false
+ } else {
+ this.btList = dataOption.cols[0]
+ this.btList.map(item => {
+ if (!item.hide) {
+ this.totalNameList.push(item)
+ }
+ })
+ this.tableData = dataOption.data
+ this.tableShow = true
+ this.loading = false
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ renderHeader(h, { column, $index }) {// 鏂板缓涓�涓� span
+ let span = document.createElement(span)// 璁剧疆琛ㄥご鍚嶇О
+ span.innerText = column.label
+ //涓存椂鎻掑叆 document
+ document.body.appendChild(span)// 閲嶇偣:鑾峰彇 span 鏈�灏忓搴︼紝璁剧疆褰撳墠鍒楋紝娉ㄦ剰杩欓噷鍔犱簡 20锛屽瓧娈佃緝澶氭椂column.minWidth=span.getBoundingClientRect().width + 50.//绉婚櫎 document 涓复鏃剁殑 span
+ document.body.removeChild(span)
+ return h(span, column.label)
+ },
+ //鐐瑰嚮琛�
+ handleRowClick(row, column, event) {
+ this.lastSelectedRow = this.selectedRow; // 璁板綍涓婁竴娆¢�変腑鐨勮
+ this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
+ this.lastSelectedRowIndex = this.tableData.indexOf(row);
+ this.$refs.tableData.toggleRowSelection(row);
+ if (this.openPage) {
+ this.$emit('deptEmit', row, 2)
}
},
-
- buildQueryCondition() {
- let sWhere = ""
-
- if (this.queryParams.HNumber) {
- sWhere += ` and 璐у竵浠g爜 like '%${this.queryParams.HNumber}%'`
+ //閫変腑琛岄珮浜牱寮�
+ rowStyle({ row, rowIndex }) {
+ if (this.ids.includes(row.HItemID)) {
+ return { "background": "#ecf5ff" }
}
- if (this.queryParams.HName) {
- sWhere += ` and 璐у竵鍚嶇О like '%${this.queryParams.HName}%'`
+ },
+ //鍙屽嚮琛�
+ handleDblclick(row, column, cell, event) {
+ this.OperationType = 3
+ if (this.openPage) {
+ this.$emit('deptEmitDb', row, 2)
+ } else {
+ this.handleEdit();
}
-
- if (this.queryParams.ColName && this.queryParams.ColName !== "0" &&
- this.queryParams.Comparator && this.queryParams.Comparator !== "0") {
- let com = ""
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ // this.rowForm = {}
+ if (this.openPage) {
+ //鍒楄〃鍗曢��
+ if (selection.length > 1) {
+ const del_row = selection.shift()
+ this.$refs.tableData.toggleRowSelection(del_row, false) //璁剧疆杩欎竴琛屽彇娑堥�変腑
+ }
+ this.rowForm = {}
+ this.ids = selection.map(item => item.HItemID)
+ this.rowForm = selection[0]
+ } else {
+ //澶氶��
+ this.ids = selection.map(item => item.HItemID)
+ this.single = selection.length != 1
+ this.multiple = !selection.length
+ if (!this.single) {
+ this.rowForm = selection[0]
+ }
+ }
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.sWhere = ''
+ if (this.queryParams.ColName && this.queryParams.Comparator) {
+ var com = "";
switch (this.queryParams.Comparator) {
case "7":
- com = `like '%${this.queryParams.ColContent}%'`
- break
+ com = "like'%" + this.queryParams.ColContent + "%'";
+ break;
case "8":
- com = `like '%${this.queryParams.ColContent}'`
- break
+ com = "like'%" + this.queryParams.ColContent + "'";
+ break;
case "9":
- com = `like '${this.queryParams.ColContent}%'`
- break
+ com = "like'" + this.queryParams.ColContent + "%'";
+ break;
case "10":
- com = `not like '%${this.queryParams.ColContent}%'`
- break
+ com = "not like'%" + this.queryParams.ColContent + "%'";
+ break;
default:
- com = `${this.queryParams.Comparator} '${this.queryParams.ColContent}'`
- break
+ com = "" + this.queryParams.Comparator + "'" + this.queryParams.ColContent + "'";
+ break;
}
- sWhere += ` and ${this.queryParams.ColName} ${com}`
+ this.sWhere += " and " + this.queryParams.ColName + " " + com;
}
-
- sWhere += this.addSWhereByOpenType()
-
- return sWhere
- },
-
- addSWhereByOpenType() {
+ if (this.queryParams.ColName1 && this.queryParams.Comparator1) {
+ var com1 = "";
+ switch (this.queryParams.Comparator1) {
+ case "7":
+ com1 = "like'%" + this.queryParams.ColContent1 + "%'";
+ break;
+ case "8":
+ com1 = "like'%" + this.queryParams.ColContent1 + "'";
+ break;
+ case "9":
+ com1 = "like'" + this.queryParams.ColContent1 + "%'";
+ break;
+ case "10":
+ com1 = "not like'%" + this.queryParams.ColContent1 + "%'";
+ break;
+ default:
+ com1 = "" + this.queryParams.Comparator1 + "'" + this.queryParams.ColContent1 + "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName1 + " " + com1;
+ }
+ if (this.queryParams.ColName2 && this.queryParams.Comparator2) {
+ var com2 = "";
+ switch (this.queryParams.Comparator2) {
+ case "7":
+ com2 = "like'%" + this.queryParams.ColContent2 + "%'";
+ break;
+ case "8":
+ com2 = "like'%" + this.queryParams.ColContent2 + "'";
+ break;
+ case "9":
+ com2 = "like'" + this.queryParams.ColContent2 + "%'";
+ break;
+ case "10":
+ com2 = "not like'%" + this.queryParams.ColContent2 + "%'";
+ break;
+ default:
+ com2 = "" + this.queryParams.Comparator + "'" + this.queryParams.ColContent + "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
+ }
+ if (this.queryParams.HNumber) {
+ this.sWhere += " and 閮ㄩ棬浠g爜 like '%" + this.queryParams.HNumber + "%'";
+ }
+ if (this.queryParams.HName) {
+ this.sWhere += " and 閮ㄩ棬鍚嶇О like '%" + this.queryParams.HName + "%'";
+ }
+ if (this.queryParams.HOrgID) {
+ this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'"
+ }
+ // this.sWhere += this.addSWhereByOpenType()
+ // this.sWhere += this.getOrgIDByUser()
+ this.clearData()
+ this.getList()
- return " and 绂佺敤鏍囪 = '' and 瀹℃牳浜� != ''"
},
-
- // 鐢熸垚琛ㄦ牸鍒�
- generateTableColumns(columnList) {
- this.tableColumns = []
-
- // 娣诲姞閫夋嫨鍒�
- this.tableColumns.push({ type: 'selection', fixed: 'left' })
-
- // 鍔ㄦ�佺敓鎴愬垪
- if (columnList && columnList.length > 0) {
- columnList.forEach(item => {
- if (!this.hiddenFields.includes(item.ColmCols)) {
- const column = {
- field: item.ColmCols,
- label: item.ColmCols,
- align: 'center',
- sortable: true,
- width: 200
- }
-
- if (item.ColmType === 'DateTime') {
- column.formatter = this.formatDate
- }
-
- this.tableColumns.push(column)
- }
- })
- } else {
- // 榛樿鍒楋紙濡傛灉鎺ュ彛娌℃湁杩斿洖鍒椾俊鎭級
- const defaultColumns = [
- { field: '璐у竵浠g爜', label: '璐у竵浠g爜', align: 'center', width: 120 },
- { field: '璐у竵鍚嶇О', label: '璐у竵鍚嶇О', align: 'center', width: 120 },
- { field: '灏忔暟浣�', label: '灏忔暟浣�', align: 'center', width: 100 },
- { field: '姹囩巼', label: '姹囩巼', align: 'center', width: 100 },
- { field: '绂佺敤鏍囪', label: '绂佺敤鏍囪', align: 'center', width: 100 },
- { field: '澶囨敞', label: '澶囨敞', align: 'center', width: 150 },
- { field: '浣跨敤鏍囪', label: '浣跨敤鏍囪', align: 'center', width: 100 },
- { field: '瀹℃牳浜�', label: '瀹℃牳浜�', align: 'center', width: 100 },
- { field: '鍒涘缓浜�', label: '鍒涘缓浜�', align: 'center', width: 100 },
- { field: '鍒涘缓鏃堕棿', label: '鍒涘缓鏃堕棿', align: 'center', width: 150 }
- ]
- this.tableColumns = [...this.tableColumns, ...defaultColumns]
+ // 鍒ゆ柇鏄洿鎺ユ墦寮�椤甸潰杩樻槸鍏跺畠椤甸潰閫氳繃閫夋嫨鎸夐挳鎵撳紑锛屽苟鏄剧ず鐩稿簲鏁版嵁
+ addSWhereByOpenType() {
+ //鑾峰彇鍙傛暟
+ var sWhere = "";
+ //this.openPage鍒ゆ柇鏄惁鏈夊�硷紝鏈変唬琛ㄥ叾瀹冮〉闈㈤�氳繃閫夋嫨鎸夐挳鎵撳紑
+ if (this.openPage) {
+ sWhere += " and 绂佺敤鏍囪 != 'Y' and ISNULL(瀹℃牳浜�,'') != ''"
+ return sWhere;
}
+ return sWhere;
},
-
- // 鏌ヨ
- handleQuery() {
- this.pagination.page = 1
- this.loadTableData()
+ //鏍规嵁鐢ㄦ埛鑾峰彇鐢ㄦ埛鍏宠仈缁勭粐鐨勮繃婊ゆ潯浠�
+ getOrgIDByUser() {
+ var res = "";
+ axios.get(this.baseURL + '/Xt_User/getOrgIDListByUser', {
+ params: {
+ HModName: this.HModName,
+ user: sessionStorage["HUserName"],
+ HOrgID: sessionStorage["OrganizationID"]
+ },
+ }).then(response => {
+ let result = response.data
+ if (result.count == 1) {
+ if (result.data[0].sWhere == "1") {
+ res = " and HUSEORGID = '" + sessionStorage["OrganizationID"] + "'";
+ } else {
+ res = result.data[0].sWhere;
+ }
+ }
+ }).catch(error => {
+ res = " and 1 = 0";
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ return res;
},
-
- // 閲嶇疆鏌ヨ
- handleReset() {
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.sWhere = ''
this.queryParams = {
- HNumber: '',
- HName: '',
- ColName: '0',
- Comparator: '0',
- ColContent: ''
+ HOrgID: null,
+ HName: null,
+ HNumber: null,
+ Comparator1: '',
+ Comparator2: '',
+ Comparator: '',
+ ColContent1: '',
+ ColContent2: '',
+ ColContent: '',
}
- this.pagination.page = 1
- this.loadTableData()
+ this.clearData()
+ this.resetForm("queryForm")
+ this.getList()
},
-
- // 鍒锋柊
- handleRefresh() {
- this.loadTableData()
+ clearData() {
+ this.single = true
+ this.multiple = true
+ this.OperationType = 0
+ this.copyType = 0
+ this.ids = []
},
-
- // 鍒囨崲鎶樺彔鐘舵��
- toggleCollapse() {
- this.collapse = !this.collapse
+ //閫�鍑�
+ close() {
+ this.tableShow = true
+ this.openEdit = false
+ this.editShow = false
+ this.clearData()
+ this.getList()
},
-
- // 琛屽弻鍑讳簨浠�
- handleRowDblClick(row) {
- this.selectedRow = row
- this.confirmSelection()
+ //鎵撳紑鏂板缁勪欢寮圭獥
+ handleAddEdit() {
+ this.rowForm.HItemID = 0
+ this.$nextTick(() => {
+ this.openEdit = true
+ this.editShow = true
+ })
+
},
-
- // 琛岀偣鍑讳簨浠�
- handleRowClick(row) {
- this.$refs.table.toggleRowSelection(row)
- this.selectedRow = row
- },
-
- handleCurrencyCodeClick(row) {
- console.log('鐐瑰嚮璐у竵浠g爜:', row)
- this.selectedRow = row
- this.confirmSelection()
- },
-
- // 閫夋嫨鍙樺寲
- handleSelectionChange(selection) {
- this.multipleSelection = selection
- if (selection.length === 1) {
- this.selectedRow = selection[0]
- }
- },
-
- // 纭閫夋嫨
- confirmSelection() {
- if (this.selectedRow) {
- this.$emit('selected', {
- HItemID: this.selectedRow.HItemID,
- 璐у竵鍚嶇О: this.selectedRow.璐у竵鍚嶇О,
- 姹囩巼: this.selectedRow.姹囩巼
- })
- this.dialogVisible = false
- } else {
- this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
- }
- },
-
- // 閫�鍑�
- handleExit() {
- this.dialogVisible = false
- },
-
- // 鍏抽棴瀵硅瘽妗�
- handleClose(done) {
- this.$confirm('纭鍏抽棴锛�')
- .then(_ => {
- done()
- })
- .catch(_ => {})
- },
-
- // 鍒嗛〉澶у皬鏀瑰彉
- handleSizeChange(size) {
- this.pagination.size = size
- this.pagination.page = 1
- this.loadTableData()
- },
-
- // 褰撳墠椤垫敼鍙�
- handleCurrentChange(page) {
- this.pagination.page = page
- this.loadTableData()
- },
-
- // 鏍煎紡鍖栨棩鏈�
- formatDate(dateString) {
- if (!dateString) return ''
- try {
- const date = new Date(dateString)
- return date.toLocaleDateString('zh-CN')
- } catch (error) {
- return dateString
- }
- },
-
- // 鑾峰彇榛樿杩囨护鏂规
- async getDefaultFilterScheme() {
- try {
- const response = await axios.get(`${this.baseURL}/Xt_FastICScheme/Chooselist`, {
- params: {
- user: this.user,
- HModuleName: this.HModuleName,
- HInterID: 0,
- Type: "Default"
- }
- })
-
- if (response.data.count === 1) {
- const data = response.data.data[0]
- this.HInterID_Choose = data.hmainid
- this.currentFilterScheme = `褰撳墠杩囨护鏂规锛�${data.鏂规鍚嶇О} (${data.澶囨敞})`
-
- // 搴旂敤杩囨护鏉′欢
- this.applyFilterConditions(response.data.data)
- }
- } catch (error) {
- console.error('鑾峰彇杩囨护鏂规澶辫触:', error)
- }
- },
-
- // 搴旂敤杩囨护鏉′欢
- applyFilterConditions(filterData) {
- filterData.forEach(item => {
- if (this.queryParams.hasOwnProperty(item.杩囨护瀛楁ID)) {
- this.queryParams[item.杩囨护瀛楁ID] = item.杩囨护鍊�
- }
+ //鎵撳紑淇敼缁勪欢寮圭獥
+ handleEdit() {
+ this.$nextTick(() => {
+ this.openEdit = true
+ this.editShow = true
})
},
-
- // 淇濆瓨杩囨护鏂规
- handleSaveScheme() {
- // 瀹炵幇淇濆瓨杩囨护鏂规鐨勯�昏緫
- this.$message.info('淇濆瓨鏂规鍔熻兘')
+ //鍏抽棴缂栬緫椤甸潰
+ editGyClose(val) {
+ this.editShow = false
+ this.openEdit = false
+ this.clearData()
+ this.getList()
},
-
- // 璇诲彇杩囨护鏂规
- handleReadScheme() {
- // 瀹炵幇璇诲彇杩囨护鏂规鐨勯�昏緫
- this.$message.info('璇诲彇鏂规鍔熻兘')
- }
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete() {
+ this.$modal.confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠').then(() => {
+ if (!this.rowForm.瀹℃牳浜�) {
+ axios.get(this.baseURL + "DeltetGy_Department", {
+ params: { 'HItemID': this.rowForm.HItemID, 'user': sessionStorage["HUserName"] }
+ }).then(response => {
+ if (response.data.count == 1) {
+ this.getList()
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛")
+ } else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message);
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ } else {
+ this.$modal.msgError("姝ゆ潯鏁版嵁涓嶆槸鍒涘缓鐘舵��,鏃犳硶鍒犻櫎!");
+ }
+ }).catch(() => { })
+ },
+ // 鍙嶅鏍�/瀹℃牳鏁版嵁
+ set_CheckBill(num, form) {
+ var InterID = form.HItemID || form.HInterID
+ //閫昏緫瀹℃牳鏂规硶
+ axios.get(this.baseURL + "/Gy_Department/AuditGy_Department", {
+ params: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] }
+ }).then(response => {
+ let result = response.data
+ if (result.code == 1) {
+ this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+ this.getList();
+ }
+ else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message,);
+ }
+ this.clearData()
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ // 鍙嶇鐢�/绂佺敤鏁版嵁
+ set_De_Stop(num, form) {
+ var InterID = form.HItemID.toString() || form.HInterID.toString()
+ //閫昏緫瀹℃牳鏂规硶
+ axios.get(this.baseURL + "/Gy_Department/StopGy_Department", {
+ params: { "HInterID": InterID, "IsStop": num, "CurUserName": sessionStorage["HUserName"] }
+ }).then(response => {
+ let result = response.data
+ if (result.code == 1) {
+ this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+ this.getList();
+ }
+ else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message,);
+ }
+ this.clearData()
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ //瀵煎嚭
+ handleExport() {
+ const ws = this.$XLSX.utils.json_to_sheet(this.tyResList); // 灏嗘暟鎹浆鎹负宸ヤ綔琛�
+ const wb = this.$XLSX.utils.book_new(); // 鍒涘缓涓�涓柊鐨勫伐浣滅翱
+ this.$XLSX.utils.book_append_sheet(wb, ws, "Sheet1"); // 灏嗗伐浣滆〃娣诲姞鍒板伐浣滅翱涓紝骞跺懡鍚嶄负"Sheet1"
+ this.$XLSX.writeFile(wb, `gySource_${new Date().getTime()}.xlsx`); // 瀵煎嚭鏂囦欢
+ },
+ handleImport() {
+ this.uploadData = []
+ this.upload.isUploading = false
+ this.upload.title = "瀵煎叆";
+ this.upload.open = true;
+ },
+ // 鏂囦欢涓婁紶涓鐞�
+ handleFileUploadProgress(event, file, fileList) {
+ this.upload.isUploading = true;
+ this.uploadTableLoading = true
+ },
+ // 鏂囦欢涓婁紶鎴愬姛澶勭悊
+ handleFileSuccess(response, file, fileList) {
+ // this.upload.open = false;
+ this.upload.isUploading = true;
+ this.$refs.upload.clearFiles();
+ if (response.code == 1) {
+ this.alluploadList = response.data
+ this.uploadData = this.getPage(this.uploadPage, this.alluploadList)
+ this.uploadTotal = this.alluploadList.length
+ this.uploadTableLoading = false
+ // this.set_AddNew(response.data)
+ } else {
+ this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.Message + "</div>", "瀵煎叆缁撴灉", { dangerouslyUseHTMLString: true });
+ }
+
+ },
+ // 鎻愪氦涓婁紶鏂囦欢
+ submitFileForm() {
+ this.$refs.upload.submit();
+ },
+ set_AddNew() {
+ var num = [];
+ for (var i = 0; i < this.uploadData.length; i++) {
+ if (this.uploadData[i] != "") {
+ num.push(this.uploadData[i])
+ }
+ }
+ var sSubStr = JSON.stringify(num);
+ var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"];
+ axios({
+ method: 'post',
+ url: this.baseURL + "/Gy_Source/Gy_Source_btnSave",
+ data: {
+ 'sMainSub': sMainSub
+ },
+ }).then(res => {
+ this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + res.data.Message + "</div>", "瀵煎叆缁撴灉", { dangerouslyUseHTMLString: true });
+ this.upload.open = false
+ this.getList()
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ uploadDataIndex({ row, rowIndex }) {
+ row.index = rowIndex + 1;
+ },
+ uploadDataDelete(row) {
+ this.$modal.confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠').then(() => {
+ const deleteList = [row.index]
+ const data = this.uploadData
+ this.uploadData = data.filter(item => {
+ return deleteList.indexOf(item.index) == -1
+ });
+ }).catch(() => { })
+ },
+ getPage(page, list) {
+ let sindex = (parseInt(page) - 1) * this.uploadPageSize
+ let eindex = parseInt(page) * this.uploadPageSize
+ let newList = list.slice(sindex, eindex)
+ console.log(newList)
+ return newList
+ },
+ currentPage(val) {
+ this.uploadPage = val.page
+ setTimeout(() => {
+ this.uploadData = this.getPage(this.uploadPage, this.alluploadList)
+ }, 100)
+ },
}
-}
+};
</script>
-
-<style scoped>
-.currency-dialog {
- height: 70vh;
- display: flex;
- flex-direction: column;
+<style>
+.xsckdBox .el-date-editor.el-input {
+ width: 100%;
}
-
-.search-card {
- margin-bottom: 15px;
-}
-
-.table-card {
- flex: 1;
- display: flex;
- flex-direction: column;
-}
-
-.table-card >>> .el-card__body {
- flex: 1;
- display: flex;
- flex-direction: column;
-}
-
-.clearfix:before,
-.clearfix:after {
- display: table;
- content: "";
-}
-.clearfix:after {
- clear: both;
-}
-
-.el-form-item {
- margin-bottom: 15px;
-}
-
-.el-table {
- flex: 1;
-}
-
-.filter-scheme {
- text-align: center;
- font-size: 15px;
- font-weight: bold;
- color: #fc9393;
- margin: 10px 0;
-}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/component/CustomerTypeDialog/index.vue b/src/views/component/CustomerTypeDialog/index.vue
index 4e7b048..23bfe60 100644
--- a/src/views/component/CustomerTypeDialog/index.vue
+++ b/src/views/component/CustomerTypeDialog/index.vue
@@ -10,21 +10,21 @@
<el-card class="search-card">
<div slot="header" class="clearfix">
<span>鏌ヨ鏉′欢</span>
- <el-button
- style="float: right; padding: 3px 0"
+ <el-button
+ style="float: right; padding: 3px 0"
type="text"
@click="toggleCollapse"
>
{{ collapse ? '灞曞紑' : '鏀惰捣' }}
</el-button>
</div>
-
+
<el-form :model="queryParams" ref="queryForm" :inline="true">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="瀹㈡埛鍒嗙被浠g爜">
- <el-input
- v-model="queryParams.HNumber"
+ <el-input
+ v-model="queryParams.HNumber"
placeholder="璇疯緭鍏ュ鎴峰垎绫讳唬鐮�"
clearable
@keyup.enter.native="handleQuery"
@@ -33,8 +33,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="瀹㈡埛鍒嗙被鍚嶇О">
- <el-input
- v-model="queryParams.HName"
+ <el-input
+ v-model="queryParams.HName"
placeholder="璇疯緭鍏ュ鎴峰垎绫诲悕绉�"
clearable
@keyup.enter.native="handleQuery"
@@ -84,8 +84,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="鍐呭">
- <el-input
- v-model="queryParams.ColContent"
+ <el-input
+ v-model="queryParams.ColContent"
placeholder="璇疯緭鍏ュ唴瀹�"
clearable
/>
@@ -127,8 +127,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="鍐呭">
- <el-input
- v-model="queryParams.ColContent1"
+ <el-input
+ v-model="queryParams.ColContent1"
placeholder="璇疯緭鍏ュ唴瀹�"
clearable
/>
@@ -169,8 +169,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="鍐呭">
- <el-input
- v-model="queryParams.ColContent2"
+ <el-input
+ v-model="queryParams.ColContent2"
placeholder="璇疯緭鍏ュ唴瀹�"
clearable
/>
@@ -230,7 +230,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
- <el-table-column
+ <el-table-column
v-for="column in tableColumns"
:key="column.field"
:prop="column.field"
@@ -292,7 +292,7 @@
collapse: false,
loading: false,
treeLoading: false,
-
+
// 鏌ヨ鍙傛暟
queryParams: {
HNumber: '',
@@ -307,35 +307,35 @@
Comparator2: '0',
ColContent2: ''
},
-
+
// 鏍戝舰鏁版嵁
treeData: [],
treeProps: {
children: 'children',
label: 'title'
},
-
+
// 琛ㄦ牸鏁版嵁
tableData: [],
tableColumns: [],
selectedRow: null,
multipleSelection: [],
-
+
// 鍒嗛〉
pagination: {
page: 1,
size: 50,
total: 0
},
-
+
// 杩囨护鏂规
currentFilterScheme: '',
HInterID_Choose: 0,
-
+
// 闅愯棌瀛楁
hiddenFields: ["HItemID"],
-
- baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/',
+
+ baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/',
user: 'admin',
HModName: 'Gy_CusType',
HModuleName: '瀹㈡埛鍒嗙被鍒楄〃缁存姢'
@@ -372,13 +372,13 @@
this.loadTableData()
this.getDefaultFilterScheme()
},
-
+
// 鍔犺浇鏍戝舰鏁版嵁
async loadTreeData() {
this.treeLoading = true
try {
const response = await axios.get(`${this.baseURL}/Gy_BadReason/Gy_CusTypeTreeListByLevel`)
-
+
if (response.data.count === 1) {
this.treeData = JSON.parse(response.data.data)
} else {
@@ -391,13 +391,13 @@
this.treeLoading = false
}
},
-
+
// 鍔犺浇琛ㄦ牸鏁版嵁
async loadTableData() {
this.loading = true
try {
const sWhere = this.buildQueryCondition()
-
+
const response = await axios.get(`${this.baseURL}/Gy_BadReason/Gy_CusTypeList`, {
params: {
sWhere: sWhere,
@@ -406,7 +406,7 @@
size: this.pagination.size
}
})
-
+
if (response.data.count === 1) {
this.tableData = response.data.data
this.pagination.total = response.data.total || response.data.data.length
@@ -421,11 +421,11 @@
this.loading = false
}
},
-
+
// 鏋勫缓鏌ヨ鏉′欢
buildQueryCondition() {
let sWhere = ""
-
+
// 鍩烘湰鏌ヨ鏉′欢
if (this.queryParams.HNumber) {
sWhere += ` and 瀹㈡埛鍒嗙被浠g爜 like '%${this.queryParams.HNumber}%'`
@@ -433,16 +433,16 @@
if (this.queryParams.HName) {
sWhere += ` and 瀹㈡埛鍒嗙被鍚嶇О like '%${this.queryParams.HName}%'`
}
-
+
// 澶勭悊涓夌粍杩囨护鏉′欢
const filterGroups = [
{ colName: this.queryParams.ColName, comparator: this.queryParams.Comparator, content: this.queryParams.ColContent },
{ colName: this.queryParams.ColName1, comparator: this.queryParams.Comparator1, content: this.queryParams.ColContent1 },
{ colName: this.queryParams.ColName2, comparator: this.queryParams.Comparator2, content: this.queryParams.ColContent2 }
]
-
+
filterGroups.forEach(filter => {
- if (filter.colName && filter.colName !== "0" &&
+ if (filter.colName && filter.colName !== "0" &&
filter.comparator && filter.comparator !== "0") {
let com = ""
switch (filter.comparator) {
@@ -465,26 +465,26 @@
sWhere += ` and ${filter.colName} ${com}`
}
})
-
+
// 娣诲姞鎵撳紑绫诲瀷鐨勮繃婊ゆ潯浠�
sWhere += this.addSWhereByOpenType()
-
+
return sWhere
},
-
+
// 鏍规嵁鎵撳紑绫诲瀷娣诲姞鏉′欢
addSWhereByOpenType() {
// 杩欓噷鍙互鏍规嵁闇�瑕佹坊鍔犵壒瀹氱殑杩囨护鏉′欢
return " and 绂佺敤鏍囧織 = '鍚�' and 瀹℃牳浜� != ''"
},
-
+
// 鐢熸垚琛ㄦ牸鍒�
generateTableColumns(columnList) {
this.tableColumns = []
-
+
// 娣诲姞閫夋嫨鍒�
this.tableColumns.push({ type: 'selection', fixed: 'left' })
-
+
// 鍔ㄦ�佺敓鎴愬垪
if (columnList && columnList.length > 0) {
columnList.forEach(item => {
@@ -496,12 +496,12 @@
sortable: true,
width: 200
}
-
+
// 鏍规嵁瀛楁绫诲瀷璁剧疆涓嶅悓鐨勬ā鏉�
if (item.ColmType === 'DateTime') {
column.formatter = this.formatDate
}
-
+
this.tableColumns.push(column)
}
})
@@ -519,7 +519,7 @@
this.tableColumns = [...this.tableColumns, ...defaultColumns]
}
},
-
+
handleTreeNodeClick(data) {
let sWhere = ""
if (data.id !== '0') {
@@ -527,7 +527,7 @@
}
this.loadTableDataWithCondition(sWhere)
},
-
+
async loadTableDataWithCondition(sWhere) {
this.loading = true
try {
@@ -537,7 +537,7 @@
user: this.user
}
})
-
+
if (response.data.count === 1) {
this.tableData = response.data.data
this.pagination.total = response.data.total || response.data.data.length
@@ -548,12 +548,12 @@
this.loading = false
}
},
-
+
handleQuery() {
this.pagination.page = 1
this.loadTableData()
},
-
+
handleReset() {
this.queryParams = {
HNumber: '',
@@ -571,44 +571,44 @@
this.pagination.page = 1
this.loadTableData()
},
-
+
// 鍒锋柊
handleRefresh() {
this.loadTreeData()
this.loadTableData()
},
-
+
toggleCollapse() {
this.collapse = !this.collapse
},
-
+
// 琛屽弻鍑讳簨浠�
handleRowDblClick(row) {
this.selectedRow = row
this.confirmSelection()
},
-
+
// 琛岀偣鍑讳簨浠�
handleRowClick(row) {
this.$refs.table.toggleRowSelection(row)
this.selectedRow = row
},
-
+
handleCustomerTypeCodeClick(row) {
console.log('鐐瑰嚮瀹㈡埛鍒嗙被浠g爜:', row)
this.selectedRow = row
this.confirmSelection()
},
-
-
+
+
handleSelectionChange(selection) {
this.multipleSelection = selection
if (selection.length === 1) {
this.selectedRow = selection[0]
}
},
-
+
confirmSelection() {
if (this.selectedRow) {
@@ -621,12 +621,12 @@
this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
}
},
-
+
// 閫�鍑�
handleExit() {
this.dialogVisible = false
},
-
+
// 鍏抽棴瀵硅瘽妗�
handleClose(done) {
this.$confirm('纭鍏抽棴锛�')
@@ -635,20 +635,20 @@
})
.catch(_ => {})
},
-
+
// 鍒嗛〉澶у皬鏀瑰彉
handleSizeChange(size) {
this.pagination.size = size
this.pagination.page = 1
this.loadTableData()
},
-
+
// 褰撳墠椤垫敼鍙�
handleCurrentChange(page) {
this.pagination.page = page
this.loadTableData()
},
-
+
// 鏍煎紡鍖栨棩鏈�
formatDate(dateString) {
if (!dateString) return ''
@@ -659,7 +659,7 @@
return dateString
}
},
-
+
// 鑾峰彇榛樿杩囨护鏂规
async getDefaultFilterScheme() {
try {
@@ -671,12 +671,12 @@
Type: "Default"
}
})
-
+
if (response.data.count === 1) {
const data = response.data.data[0]
this.HInterID_Choose = data.hmainid
this.currentFilterScheme = `褰撳墠杩囨护鏂规锛�${data.鏂规鍚嶇О} (${data.澶囨敞})`
-
+
// 搴旂敤杩囨护鏉′欢
this.applyFilterConditions(response.data.data)
}
@@ -684,7 +684,7 @@
console.error('鑾峰彇杩囨护鏂规澶辫触:', error)
}
},
-
+
// 搴旂敤杩囨护鏉′欢
applyFilterConditions(filterData) {
filterData.forEach(item => {
@@ -693,17 +693,17 @@
}
})
},
-
+
// 淇濆瓨杩囨护鏂规
handleSaveScheme() {
this.$message.info('淇濆瓨鏂规鍔熻兘')
},
-
+
// 璇诲彇杩囨护鏂规
handleReadScheme() {
this.$message.info('璇诲彇鏂规鍔熻兘')
},
-
+
// 鍒楄缃�
handleColumnSetting() {
this.$message.info('鍒楄缃姛鑳�')
@@ -791,4 +791,4 @@
.el-tree >>> .el-tree-node.is-current > .el-tree-node__content {
background-color: #aef0f7;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/component/HSourceReportHtml/index.vue b/src/views/component/HSourceReportHtml/index.vue
index 7f7ec1d..2e02102 100644
--- a/src/views/component/HSourceReportHtml/index.vue
+++ b/src/views/component/HSourceReportHtml/index.vue
@@ -297,7 +297,7 @@
}
}
// 鍒楄〃
- axios.get(this.baseURL + "/Sc_BarCode/ReportFromBillList", {
+ axios.get(this.baseURL + "/Sc_BarCode/ReportFromBillList_New", {
params: {
sWhere: this.sWhere,
HSouceBillType: this.HSouceBillType,
diff --git a/src/views/component/PackStockDetail/index.vue b/src/views/component/PackStockDetail/index.vue
index 2509806..9fa23cd 100644
--- a/src/views/component/PackStockDetail/index.vue
+++ b/src/views/component/PackStockDetail/index.vue
@@ -110,13 +110,13 @@
loading: false, //椤甸潰鍔犺浇鍔ㄧ敾鏄剧ず鏍囪
dialogVisible: false, //鍖呰瀹瑰櫒鍑哄叆搴撴槑缁嗘暟鎹樉绀烘爣璁�
columnDialogVisible: false, //鍒楄缃寜閽樉绀烘爣璁�
-
+
tableData: [], //琛ㄦ牸鏁版嵁
tableColumns: [], //琛ㄦ牸鍒楁暟鎹�
- allColumns: [],
+ allColumns: [],
selectedColumns: [],
selectedRows: [],
- baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/"
+ baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/"
}
},
methods: {
@@ -129,8 +129,8 @@
const hmainid = record.hmainid || record.HInterID
const billNo = record.鍗曟嵁鍙� || record.HBillNo
-
-
+
+
let billTypeDesc = ''
switch (record.鍗曟嵁绫诲瀷 || '') {
case '1201': billTypeDesc = '澶栬喘鍏ュ簱鍗�'; break
@@ -163,10 +163,10 @@
this.loading = true
try {
const sWhere = " and hmainid = " + `${HInterID}` ;
-
+
const url = `${this.baseURL}/Kf_ICStockInOutBill/Kf_PackStockDetailQuery`
const params = { sWhere }
-
+
const response = await axios.get(url, { params })
const data = response.data
@@ -191,7 +191,7 @@
const columns = []
const allColumns = []
-
+
columns.push({
type: 'selection',
width: 55,
@@ -208,7 +208,7 @@
sortable: true
}
-
+
switch (colName) {
case 'HItemID':
columnConfig.hide = true
@@ -241,12 +241,12 @@
applyColumnSettings() {
this.tableColumns = [
- this.tableColumns[0],
+ this.tableColumns[0],
...this.allColumns.filter(col => this.selectedColumns.includes(col.field))
]
this.columnDialogVisible = false
-
-
+
+
this.saveColumnSettings()
},
@@ -256,7 +256,7 @@
saveColumnSettings() {
-
+
},
//#endregion
@@ -265,13 +265,13 @@
getSummaries(param) {
const { columns, data } = param
const sums = []
-
+
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '鍚堣'
return
}
-
+
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
diff --git a/src/views/component/SettleStyleDialog/index.vue b/src/views/component/SettleStyleDialog/index.vue
index e15d97a..e5a7467 100644
--- a/src/views/component/SettleStyleDialog/index.vue
+++ b/src/views/component/SettleStyleDialog/index.vue
@@ -1,609 +1,955 @@
<template>
- <el-dialog
- title="閫夋嫨缁撶畻鏂瑰紡"
- :visible.sync="dialogVisible"
- width="80%"
- :before-close="handleClose"
- append-to-body
- >
- <div class="settle-style-dialog">
- <!-- 鎼滅储鍖哄煙 -->
- <el-card class="search-card">
- <div slot="header" class="clearfix">
- <span>鏌ヨ鏉′欢</span>
- <el-button
- style="float: right; padding: 3px 0"
- type="text"
- @click="toggleCollapse"
- >
- {{ collapse ? '灞曞紑' : '鏀惰捣' }}
- </el-button>
- </div>
-
- <el-form :model="queryParams" ref="queryForm" :inline="true">
- <el-row :gutter="20">
- <el-col :span="6">
- <el-form-item label="浠g爜">
- <el-input
- v-model="queryParams.HNumber"
- placeholder="璇疯緭鍏ヤ唬鐮�"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="鍚嶇О">
- <el-input
- v-model="queryParams.HName"
- placeholder="璇疯緭鍏ュ悕绉�"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="缁撶畻鏂瑰紡浠g爜">
- <el-input
- v-model="queryParams.HNumber2"
- placeholder="璇疯緭鍏ョ粨绠楁柟寮忎唬鐮�"
- clearable
- style="width: 190px"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" @click="handleQuery">鏌ヨ</el-button>
- <el-button icon="el-icon-refresh" @click="handleReset">閲嶇疆</el-button>
- <el-button type="primary" @click="handleResCnz" style="margin-left: 10px">閲嶆柊鍚屾</el-button>
- </el-form-item>
- </el-col>
- </el-row>
-
- <!-- 楂樼骇鎼滅储 -->
- <el-collapse-transition>
- <div v-show="!collapse">
- <el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="杩囨护瀛楁">
- <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨瀛楁" style="width: 100%">
- <el-option value="0" label=""></el-option>
- <el-option
- v-for="column in visibleColumns"
- :key="column.field"
- :label="column.label"
- :value="column.field"
- />
+ <div style="padding: 10px; position: relative;">
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="98px" class="searchBox">
+ <el-row>
+ <!-- <el-form-item label="閮ㄩ棬浠g爜" prop="HNumber" style="margin-left: 100px;">
+ <el-input v-model="queryParams.HNumber" placeholder="璇疯緭鍏ラ儴闂ㄤ唬鐮�" @keyup.enter.native="handleQuery" />
+ </el-form-item>
+ <el-form-item label="閮ㄩ棬鍚嶇О" prop="HName">
+ <el-input v-model="queryParams.HName" placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�" @keyup.enter.native="handleQuery" />
+ </el-form-item> -->
+ <el-form-item label="缁勭粐">
+ <el-select v-model="queryParams.HOrgID" placeholder="璇烽�夋嫨">
+ <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label-width="78px">
+ <el-button type="primary" icon="el-icon-search" @click="handleQuery">
+ 鎼� 绱�</el-button>
+ <el-button type="primary" icon="el-icon-refresh" @click="resetQuery">閲� 缃�</el-button>
+ </el-form-item>
+ </el-row>
+ <el-collapse v-model="activeSeach">
+ <el-collapse-item title="鏇村" name="1">
+ <el-card class="box-card">
+ <div slot="header" class="clearfix"><span>杩囨护</span></div>
+ <div>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName1" placeholder="璇烽�夋嫨">
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
+ </span>
</el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="姣旇緝绗�">
- <el-select v-model="queryParams.Comparator" placeholder="璇烽�夋嫨姣旇緝绗�" style="width: 100%">
- <el-option value="0" label=""></el-option>
- <el-option label="=" value="=" />
- <el-option label=">=" value=">=" />
- <el-option label=">" value=">" />
- <el-option label="<=" value="<=" />
- <el-option label="<" value="<" />
- <el-option label="<>" value="<>" />
- <el-option label="鍖呭惈" value="7" />
- <el-option label="宸﹀寘鍚�" value="8" />
- <el-option label="鍙冲寘鍚�" value="9" />
- <el-option label="涓嶅寘鍚�" value="10" />
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator1" placeholder="璇烽�夋嫨">
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
</el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="鍐呭">
- <el-input
- v-model="queryParams.ColContent"
- placeholder="璇疯緭鍏ュ唴瀹�"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- </el-col>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent1" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
+ <el-row>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName2" placeholder="璇烽�夋嫨">
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
+ </span>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator2" placeholder="璇烽�夋嫨">
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
+ </span>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent2" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
</el-row>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨">
+ <el-option v-for="(item, index) in btList" :key="index" :label="item.field"
+ :value="item.field"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator" placeholder="璇烽�夋嫨">
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
</div>
- </el-collapse-transition>
-
- <!-- 褰撳墠杩囨护鏂规鏄剧ず -->
- <div v-if="currentFilterScheme" class="filter-scheme">
- {{ currentFilterScheme }}
- </div>
- </el-form>
- </el-card>
-
- <!-- 琛ㄦ牸鍖哄煙 -->
- <el-card class="table-card">
- <div slot="header" class="clearfix">
- <span>缁撶畻鏂瑰紡鍒楄〃</span>
- <el-button-group style="float: right">
- <el-button type="primary" icon="el-icon-refresh" @click="handleRefresh">鍒锋柊</el-button>
- <el-button type="primary" icon="el-icon-close" @click="handleExit">閫�鍑�</el-button>
- </el-button-group>
+ </el-card>
+ </el-collapse-item>
+ </el-collapse>
+ </el-form>
+ <el-row :gutter="10" class="mb8" style="margin-top: 10px;">
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-download" size="mini" @click="handleImport">瀵煎叆</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddEdit(OperationType = 1)"
+ id="btn-Add">鏂板</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="handleEdit(row = rowForm, OperationType = 3)">缂栬緫</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="handleEdit(row = rowForm, copyType = 1)">澶嶅埗</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">鍒犻櫎
+ </el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="set_CheckBill(0, form = rowForm)">瀹℃牳</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="set_CheckBill(1, form = rowForm)">杩斿鏍�</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="set_De_Stop(0, form = rowForm)">绂佺敤</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="set_De_Stop(1, form = rowForm)">鍙嶇鐢�</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">瀵煎嚭</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-download" size="mini" @click="handleRowHide">闅愯棌鍒楄缃�</el-button>
+ </el-col>
+ </el-row>
+ <div class="tableBox" v-loading="loading">
+ <el-table :data="tableData" ref="tableData" max-height="750" :summary-method="getSummaries"
+ @selection-change="handleSelectionChange" show-summary border @row-click="handleRowClick" :row-style="rowStyle"
+ @cell-dblclick="handleDblclick" v-if="tableShow">
+ <template v-for="(item, index) in btList">
+ <el-table-column type="selection" width="55" align="center" :fixed="item.fixed" v-if="item.type == 'checkbox'"
+ :key="index" />
+ <el-table-column :align="item.align" :prop="item.field" :label="item.title" :width="item.width"
+ :key="item.sorderid" v-else-if="!item.hide && item.type != 'checkbox'" :sortable="item.sort"
+ show-overflow-tooltip :fixed="item.fixed">
+ <template slot-scope="{row, column }">
+ <el-checkbox v-model="checked" v-if="item.type == 'checkbox'"></el-checkbox>
+ <div :style="item.style">
+ <span v-if="column.property.includes('鏃ユ湡')">{{ parseTime(row[column.property], '{y}-{m}-{d}') }}</span>
+ <el-button type="text" @click="handleEdit(row, OperationType = 3)"
+ v-else-if="column.property == '鍗曟嵁鍙�'">{{
+ row.鍗曟嵁鍙�
+ }}</el-button>
+ <span v-else>{{ row[column.label] }}</span>
+ </div>
+ </template>
+ </el-table-column>
+ </template>
+ </el-table>
+ <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes"
+ @pagination="getList" />
+ <el-dialog title="闅愯棌鍒楄缃�" :visible.sync="openRowHide" width="816px" append-to-body>
+ <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" />
+ </el-dialog>
+ <!-- 缂栬緫 -->
+ <el-dialog title="缂栬緫閮ㄩ棬璧勬枡" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
+ <edit :OperationType=OperationType :linterid=this.rowForm.HItemID :HSouceBillType=this.rowForm.HSourceBillType
+ :copyType="copyType" @editCloseGy="editGyClose" v-if="editShow" />
+ </el-dialog>
+ <el-dialog :title="upload.title" :visible.sync="upload.open" width="1500px" append-to-body>
+ <div style="margin-top:-20px ;">
+ <el-button type="primary" @click="set_AddNew">瀵煎叆鏁版嵁</el-button>
+ <el-button type="primary" @click="upload.open = false">閫� 鍑�</el-button>
+ <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" style="display: inline-block; margin-left: 10px;"
+ :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
+ :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess">
+ <el-button type="primary">鏂囦欢涓婁紶</el-button>
+ </el-upload>
</div>
-
- <el-table
- ref="table"
- :data="tableData"
- v-loading="loading"
- height="400"
- border
- highlight-current-row
- @row-dblclick="handleRowDblClick"
- @row-click="handleRowClick"
- @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column
- v-for="column in tableColumns"
- :key="column.field"
- :prop="column.field"
- :label="column.label"
- :width="column.width"
- :align="column.align"
- :sortable="column.sortable"
- show-overflow-tooltip
- >
- <template slot-scope="{ row, column }">
- <span v-if="column.property.includes('鏃堕棿') || column.property.includes('鏃ユ湡')">
- {{ formatDate(row[column.property]) }}
- </span>
- <span v-else>{{ row[column.property] }}</span>
+ <el-table :data="uploadData" v-loading="uploadTableLoading" :row-class-name="uploadDataIndex" border
+ height="550">
+ <el-table-column type="index" label="搴忓彿" width="55" align="center" />
+ <el-table-column label="缁勭粐浠g爜" prop="缁勭粐浠g爜" align="center" width="120" />
+ <el-table-column label="缁勭粐鍚嶇О" prop="缁勭粐鍚嶇О" align="center" width="120" />
+ <el-table-column label="璐熻矗浜轰唬鐮�" prop="璐熻矗浜轰唬鐮�" align="center" width="120" />
+ <el-table-column label="璐熻矗浜�" prop="璐熻矗浜�" align="center" width="120" />
+ <el-table-column label="宸ヤ綔涓績浠g爜" prop="宸ヤ綔涓績浠g爜" align="center" width="120" />
+ <el-table-column label="宸ヤ綔涓績鍚嶇О" prop="宸ヤ綔涓績鍚嶇О" align="center" width="120" />
+ <el-table-column label="鍗曠彮宸ユ椂" prop="鍗曠彮宸ユ椂" align="center" width="120" />
+ <el-table-column label="鎿嶄綔" align="center">
+ <template slot-scope="scope">
+ <el-button size="mini" type="text" icon="el-icon-delete"
+ @click="uploadDataDelete(scope.row)">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
-
- <!-- 鍒嗛〉 -->
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="pagination.page"
- :page-sizes="[50, 100, 500, 5000]"
- :page-size="pagination.size"
- layout="total, sizes, prev, pager, next, jumper"
- :total="pagination.total"
- style="margin-top: 15px; text-align: right;"
- />
- </el-card>
+ <pagination v-show="uploadTotal > 0" :total="uploadTotal" :page.sync="uploadPage" :limit.sync="uploadPageSize"
+ :pageSizes="uploadPageSizes" @pagination="currentPage" />
+ </el-dialog>
</div>
- </el-dialog>
+ </div>
</template>
<script>
import axios from 'axios'
+import RowSettings from '@/views/component/rowSettings'
+import Edit from '@/views/basic/gy/gyDepartmentEdit.vue'
export default {
- name: 'SettleStyleDialog',
+ name: 'GyDepartment',
+ components: { RowSettings, Edit },
props: {
- visible: {
- type: Boolean,
- default: false
- }
+ openPage: { type: String, },
},
data() {
return {
- dialogVisible: false,
- collapse: false,
- loading: false,
-
+ activeSeach: '',
+ HModName: 'Gy_DepartmentList',
+ editShow: false,
+ openEdit: false,
+ totalNameList: [],
+ tableShow: true,
+ openPrintList: false,
+ printListShow: false,
+ // HBillType: '1205',
+ openBtnHide: false,
+ btnHideShow: false,
+ rowHideShow: false,
+ openRowHide: false,
+ copyType: 0,
+ comparatorList: [
+ { label: '=', value: '=' },
+ { label: '>=', value: '>=' },
+ { label: '>', value: '>' },
+ { label: '<=', value: '<=' },
+ { label: '<', value: '<' },
+ { label: '<>', value: '<>' },
+ { label: '鍖呭惈', value: '7' },
+ { label: '宸﹀寘鍚�', value: '8' },
+ { label: '鍙冲寘鍚�', value: '9' },
+ { label: '涓嶅寘鍚�', value: '10' },
+ ],
+ sWhere: '',
+ dialogTitle: '',
+ organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//缁勭粐鍒楄〃
+ OperationType: null,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
+ HInterID: null,
+ baseURL: process.env.VUE_APP_BASE_API,
+ lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
+ lastSelectedRow: null, // 涓婁竴娆¢�変腑鐨勮
+ selectedRow: null, // 褰撳墠閫変腑鐨勮
+ rowForm: {},
+ activeName: 'first',
+
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
// 鏌ヨ鍙傛暟
queryParams: {
- HNumber: '',
- HName: '',
- HNumber2: '',
- ColName: '0',
- Comparator: '0',
- ColContent: ''
+ HOrgID: sessionStorage["OrganizationID"] - 0,
+ HName: null,
+ HNumber: null,
+ Comparator1: '',
+ Comparator2: '',
+ Comparator: '',
+ ColContent1: '',
+ ColContent2: '',
+ ColContent: '',
},
-
- // 琛ㄦ牸鏁版嵁
- tableData: [],
- tableColumns: [],
- selectedRow: null,
- multipleSelection: [],
-
- // 鍒嗛〉
- pagination: {
- page: 1,
- size: 50,
- total: 0
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 閬僵灞�
+ loading: true,
+ tyResList: [],//鍒楄〃锛堟帴鍙f暟鎹級
+ btList: [],//琛ㄥご鍒楄〃鏄剧ず
+ btResList: [],
+ tableData: [],//鍒楄〃(鍒嗛〉鏄剧ず)
+ dataList: [],
+ titleData: ["HItemID", "HUSEORGID", "HEmpID", "璐熻矗浜�"],//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ pageSizes: [50, 100, 500, 5000, 50000],
+ page: 1,
+ pageSize: 0,
+ total: 0,
+ // 琛ㄥ崟鍙傛暟
+ form: {},
+ // 琛ㄥ崟鏍¢獙
+ rules: {},
+ upload: {
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁绂佺敤涓婁紶
+ isUploading: false,
+ // 鏄惁鏇存柊宸茬粡瀛樺湪鐨勬暟鎹�
+ updateSupport: 0,
+ // 璁剧疆涓婁紶鐨勮姹傚ご閮�
+ // headers: { Authorization: "Bearer " + getToken() },
+ // 涓婁紶鐨勫湴鍧�
+ url: process.env.VUE_APP_BASE_API + "/Gy_Source/Gy_Source_Excel"
},
-
- // 杩囨护鏂规
- currentFilterScheme: '',
- HInterID_Choose: 0,
-
- // 闅愯棌瀛楁
- hiddenFields: ["HItemID", "HUSEORGID", "HCREATEORGID", "鐖剁骇ID"],
-
- baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/',
- user: 'admin',
- HModName: 'Gy_SettleStyle',
- HModuleName: '缁撶畻鏂瑰紡缁存姢',
- Organization: '100038'
- }
+ uploadData: [],
+ alluploadList: [],
+ uploadTableLoading: false,
+ uploadPageSizes: [50, 100, 500, 5000, 50000],
+ uploadPage: 1,
+ uploadPageSize: 50,
+ uploadTotal: 0,
+ };
},
- computed: {
- visibleColumns() {
- return this.tableColumns
- .filter(col => !this.hiddenFields.includes(col.field))
- .map(col => ({
- field: col.field,
- label: col.label
- }))
- }
- },
- watch: {
- visible: {
- immediate: true,
- handler(val) {
- this.dialogVisible = val
- if (val) {
- this.initData()
- }
- }
- },
- dialogVisible(val) {
- this.$emit('update:visible', val)
- }
+ created() {
+ this.getList()
},
methods: {
- // 鍒濆鍖栨暟鎹�
- initData() {
- this.loadTableData()
- this.getDefaultFilterScheme()
- },
-
- // 鍔犺浇琛ㄦ牸鏁版嵁
- async loadTableData() {
- this.loading = true
- try {
- const sWhere = this.buildQueryCondition()
-
- const response = await axios.get(`${this.baseURL}/Gy_SettleStyle/SettleStyleList`, {
- params: {
- sWhere: sWhere,
- user: this.user,
- Organization: this.Organization
- }
- })
-
- if (response.data.count === 1) {
- this.tableData = response.data.data
- console.log('缁撶畻鏂瑰紡鏁版嵁:', this.tableData)
- this.pagination.total = response.data.total || response.data.data.length
- this.generateTableColumns(response.data.list)
- } else {
- this.$message.error(response.data.Message || '鍔犺浇鏁版嵁澶辫触')
+ getSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = '鍚堣';
+ return;
}
- } catch (error) {
- console.error('鍔犺浇缁撶畻鏂瑰紡鏁版嵁澶辫触:', error)
- this.$message.error('鍔犺浇缁撶畻鏂瑰紡鏁版嵁澶辫触')
- } finally {
- this.loading = false
+ const values = data.map(item => Number(item[column.property]));
+ if (this.totalNameList[index].totalRow) {
+ if (!values.every(value => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr);
+ if (!isNaN(value)) {
+ return prev + curr;
+ } else {
+ return prev;
+ }
+ }, 0)
+
+ } else {
+ sums[index] = '';
+ }
+ }
+ }, 1000);
+ return sums;
+ },
+
+ handleBtnHide() {
+ this.btnHideShow = true
+ this.openBtnHide = true
+ },
+ handleRowHide() {
+ this.rowHideShow = true
+ this.openRowHide = true
+ },
+ rowSetClose(val) {
+ this.rowHideShow = false
+ this.tableShow = true
+ this.openRowHide = val
+ this.getList()
+ },
+ //鍒楄〃鏁版嵁
+ getList() {
+ this.pageSize = 50
+ this.tableShow = false
+ this.loading = true
+ if (this.pageSize == 0) {
+ this.pageSize = 50
+ }
+ //this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'"
+ //鐢熶骇璧勬枡鍒楄〃
+ axios.get(this.baseURL + '/Gy_SettleStyle/SettleStyleList', {
+ params: {
+ "sWhere": this.sWhere,
+ "user": sessionStorage["HUserName"],
+ "Organization":sessionStorage["Organization"]
+ },
+ }).then(response => {
+ this.tyResList = response.data.data//鎬绘暟鎹�
+ let data1 = response.data
+ let option = []
+ if (data1.code == 1) {
+ this.btResList = data1.list//鐢熶骇璧勬枡鎺ュ彛琛ㄥご鏁版嵁
+ this.total = data1.count;
+ var data = [];//鍒楀瓧娈垫暟鎹�
+ var col = [];
+ var totalArray = ["浠舵暟"];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {//寰簭閬嶅巻鏁扮粍
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });//浠庢瘡涓璞′腑鎻愬彇鏁版嵁
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+ for (var i = 0; i < data.length; i++) {//閬嶅巻data鏁扮粍閲嶇殑鏁版嵁
+ if (this.titleData.indexOf(data[i].name) > -1) {//妫�鏌ata銆恑銆�.name鏄惁鍦ㄦ暟缁勪腑 //璁$畻鍒�
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ } else if (totalArray.indexOf(data[i].name) > -1 || (data[i].Type == "Decimal" || data[i].Type == "Int32")) { //璁$畻鍒�
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+ }
+ else {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+ }
+
+ }
+ option.cols = [col]
+ this.dataList = option
+ option.data = data1.data;
+ var result = data1.data;
+ var temp = "";
+ for (var i = 0; i < result.length; i++) {
+ if (temp != result[i]["HItemID"]) {
+ temp = result[i]["HItemID"];
+ } else {
+ result[i].鏃ユ湡 = null;
+ result[i].鍗曟嵁鍙� = "";
+ /*result[i].鐘舵�� = "";*/
+ result[i].绾㈣摑鍗曟爣璁� = "";
+ result[i].hsupid = "";
+ result[i].瀹㈡埛 = "";
+ result[i].HEmpID = "";
+ result[i].涓氬姟鍛� = "";
+ result[i].hmanagerid = "";
+ result[i].涓荤 = "";
+ result[i].hsecmanagerid = "";
+ result[i].鍙戣揣浜� = "";
+ result[i].hkeeperid = "";
+ result[i].淇濈鍛� = "";
+ result[i].HDeptID = "";
+ result[i].閮ㄩ棬 = "";
+ result[i].閿�鍞柟寮� = "";
+ }
+ }
+ option.data = result;
+ this.DisPlay_HideColumn(this.HModName, sessionStorage["HUserName"], option, this.dataList);
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ DisPlay_HideColumn(HModName, user, option, dataOption) {
+ this.totalNameList = []
+ axios.get(this.baseURL + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
+ params: {
+ "HModName": HModName,
+ "user": user,
+ },
+ }).then(res => {
+ let data1 = res.data
+ if (data1.data.length != 0) {
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+ newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
+ dataCol = data1.data[0].HGridString.split(',');
+ //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+ if (dataCol.length == option.cols[0].length - 1) {
+ //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+ for (var j = 0; j < option.cols[0].length - 1; j++) {
+ for (var i = 0; i < option.cols[0].length - 1; i++) {
+ var dataCols = dataCol[j].split('|');
+ //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+ if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && this.titleData.indexOf(option.cols[0][i + 1]["title"]) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
+ } else {
+ option.cols[0][i + 1]["totalRow"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ newCols[0].push(option.cols[0][i + 1]);
+ break;
+ }
+ }
+ }
+ //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+ if (dataCol.length == newCols[0].length - 1) {
+ option.cols = newCols;
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i + 1]["fixed"] != null) {
+ option.cols[0][i + 1]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if (dataOption.cols[0].indexOf(option.cols[0][i + 1]["title"]) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ //璁剧疆鍒楁帓搴�
+ for (var i = 1; i < option.cols[0].length; i++) {
+ if (data1.data[0].HSortFlag == "鏄�") {
+ option.cols[0][i]["sort"] = true;
+ }
+ else {
+ option.cols[0][i]["sort"] = false;
+ }
+ }
+ }
+ }
+ this.btList = option.cols[0]
+ this.btList.map(item => {
+ if (!item.hide) {
+ this.totalNameList.push(item)
+ }
+ })
+ if (data1.data[0].HPageSize == 0) {
+ this.pageSize = 50
+ } else {
+ this.pageSize = data1.data[0].HPageSize
+ }
+ this.tableData = option.data
+ this.tableShow = true
+ this.loading = false
+ } else {
+ this.btList = dataOption.cols[0]
+ this.btList.map(item => {
+ if (!item.hide) {
+ this.totalNameList.push(item)
+ }
+ })
+ this.tableData = dataOption.data
+ this.tableShow = true
+ this.loading = false
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ renderHeader(h, { column, $index }) {// 鏂板缓涓�涓� span
+ let span = document.createElement(span)// 璁剧疆琛ㄥご鍚嶇О
+ span.innerText = column.label
+ //涓存椂鎻掑叆 document
+ document.body.appendChild(span)// 閲嶇偣:鑾峰彇 span 鏈�灏忓搴︼紝璁剧疆褰撳墠鍒楋紝娉ㄦ剰杩欓噷鍔犱簡 20锛屽瓧娈佃緝澶氭椂column.minWidth=span.getBoundingClientRect().width + 50.//绉婚櫎 document 涓复鏃剁殑 span
+ document.body.removeChild(span)
+ return h(span, column.label)
+ },
+ //鐐瑰嚮琛�
+ handleRowClick(row, column, event) {
+ this.lastSelectedRow = this.selectedRow; // 璁板綍涓婁竴娆¢�変腑鐨勮
+ this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
+ this.lastSelectedRowIndex = this.tableData.indexOf(row);
+ this.$refs.tableData.toggleRowSelection(row);
+ if (this.openPage) {
+ this.$emit('deptEmit', row, 5)
}
},
-
- // 鏋勫缓鏌ヨ鏉′欢
- buildQueryCondition() {
- let sWhere = ""
-
- // 鍩烘湰鏌ヨ鏉′欢
- if (this.queryParams.HNumber) {
- sWhere += ` and 缁撶畻鏂瑰紡浠g爜 like '%${this.queryParams.HNumber}%'`
+ //閫変腑琛岄珮浜牱寮�
+ rowStyle({ row, rowIndex }) {
+ if (this.ids.includes(row.HItemID)) {
+ return { "background": "#ecf5ff" }
}
- if (this.queryParams.HName) {
- sWhere += ` and 缁撶畻鏂瑰紡鍚嶇О like '%${this.queryParams.HName}%'`
+ },
+ //鍙屽嚮琛�
+ handleDblclick(row, column, cell, event) {
+ this.OperationType = 3
+ if (this.openPage) {
+ this.$emit('deptEmitDb', row, 5)
+ } else {
+ this.handleEdit();
}
-
- // 楂樼骇杩囨护鏉′欢
- if (this.queryParams.ColName && this.queryParams.ColName !== "0" &&
- this.queryParams.Comparator && this.queryParams.Comparator !== "0") {
- let com = ""
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ // this.rowForm = {}
+ if (this.openPage) {
+ //鍒楄〃鍗曢��
+ if (selection.length > 1) {
+ const del_row = selection.shift()
+ this.$refs.tableData.toggleRowSelection(del_row, false) //璁剧疆杩欎竴琛屽彇娑堥�変腑
+ }
+ this.rowForm = {}
+ this.ids = selection.map(item => item.HItemID)
+ this.rowForm = selection[0]
+ } else {
+ //澶氶��
+ this.ids = selection.map(item => item.HItemID)
+ this.single = selection.length != 1
+ this.multiple = !selection.length
+ if (!this.single) {
+ this.rowForm = selection[0]
+ }
+ }
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.sWhere = ''
+ if (this.queryParams.ColName && this.queryParams.Comparator) {
+ var com = "";
switch (this.queryParams.Comparator) {
case "7":
- com = `like '%${this.queryParams.ColContent}%'`
- break
+ com = "like'%" + this.queryParams.ColContent + "%'";
+ break;
case "8":
- com = `like '%${this.queryParams.ColContent}'`
- break
+ com = "like'%" + this.queryParams.ColContent + "'";
+ break;
case "9":
- com = `like '${this.queryParams.ColContent}%'`
- break
+ com = "like'" + this.queryParams.ColContent + "%'";
+ break;
case "10":
- com = `not like '%${this.queryParams.ColContent}%'`
- break
+ com = "not like'%" + this.queryParams.ColContent + "%'";
+ break;
default:
- com = `${this.queryParams.Comparator} '${this.queryParams.ColContent}'`
- break
+ com = "" + this.queryParams.Comparator + "'" + this.queryParams.ColContent + "'";
+ break;
}
- sWhere += ` and ${this.queryParams.ColName} ${com}`
+ this.sWhere += " and " + this.queryParams.ColName + " " + com;
}
-
- // 娣诲姞鎵撳紑绫诲瀷鐨勮繃婊ゆ潯浠�
- sWhere += this.addSWhereByOpenType()
-
- return sWhere
+ if (this.queryParams.ColName1 && this.queryParams.Comparator1) {
+ var com1 = "";
+ switch (this.queryParams.Comparator1) {
+ case "7":
+ com1 = "like'%" + this.queryParams.ColContent1 + "%'";
+ break;
+ case "8":
+ com1 = "like'%" + this.queryParams.ColContent1 + "'";
+ break;
+ case "9":
+ com1 = "like'" + this.queryParams.ColContent1 + "%'";
+ break;
+ case "10":
+ com1 = "not like'%" + this.queryParams.ColContent1 + "%'";
+ break;
+ default:
+ com1 = "" + this.queryParams.Comparator1 + "'" + this.queryParams.ColContent1 + "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName1 + " " + com1;
+ }
+ if (this.queryParams.ColName2 && this.queryParams.Comparator2) {
+ var com2 = "";
+ switch (this.queryParams.Comparator2) {
+ case "7":
+ com2 = "like'%" + this.queryParams.ColContent2 + "%'";
+ break;
+ case "8":
+ com2 = "like'%" + this.queryParams.ColContent2 + "'";
+ break;
+ case "9":
+ com2 = "like'" + this.queryParams.ColContent2 + "%'";
+ break;
+ case "10":
+ com2 = "not like'%" + this.queryParams.ColContent2 + "%'";
+ break;
+ default:
+ com2 = "" + this.queryParams.Comparator + "'" + this.queryParams.ColContent + "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
+ }
+ if (this.queryParams.HNumber) {
+ this.sWhere += " and 閮ㄩ棬浠g爜 like '%" + this.queryParams.HNumber + "%'";
+ }
+ if (this.queryParams.HName) {
+ this.sWhere += " and 閮ㄩ棬鍚嶇О like '%" + this.queryParams.HName + "%'";
+ }
+ if (this.queryParams.HOrgID) {
+ this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'"
+ }
+ // this.sWhere += this.addSWhereByOpenType()
+ // this.sWhere += this.getOrgIDByUser()
+ this.clearData()
+ this.getList()
+
},
-
- // 鏍规嵁鎵撳紑绫诲瀷娣诲姞鏉′欢
+ // 鍒ゆ柇鏄洿鎺ユ墦寮�椤甸潰杩樻槸鍏跺畠椤甸潰閫氳繃閫夋嫨鎸夐挳鎵撳紑锛屽苟鏄剧ず鐩稿簲鏁版嵁
addSWhereByOpenType() {
- // 杩欓噷鍙互鏍规嵁闇�瑕佹坊鍔犵壒瀹氱殑杩囨护鏉′欢
- return " and 绂佺敤鏍囪 = ''"
- },
-
- // 鐢熸垚琛ㄦ牸鍒�
- generateTableColumns(columnList) {
- this.tableColumns = []
-
- // 娣诲姞閫夋嫨鍒�
- this.tableColumns.push({ type: 'selection', fixed: 'left' })
-
- // 鍔ㄦ�佺敓鎴愬垪
- if (columnList && columnList.length > 0) {
- columnList.forEach(item => {
- if (!this.hiddenFields.includes(item.ColmCols)) {
- const column = {
- field: item.ColmCols,
- label: item.ColmCols,
- align: 'center',
- sortable: true,
- width: 200
- }
-
- // 鏍规嵁瀛楁绫诲瀷璁剧疆涓嶅悓鐨勬ā鏉�
- if (item.ColmType === 'DateTime') {
- column.formatter = this.formatDate
- }
-
- this.tableColumns.push(column)
- }
- })
- } else {
- // 榛樿鍒楋紙濡傛灉鎺ュ彛娌℃湁杩斿洖鍒椾俊鎭級
- const defaultColumns = [
- { field: '缁撶畻鏂瑰紡浠g爜', label: '缁撶畻鏂瑰紡浠g爜', align: 'center', width: 120 },
- { field: '缁撶畻鏂瑰紡鍚嶇О', label: '缁撶畻鏂瑰紡鍚嶇О', align: 'center', width: 120 },
- { field: '鏉$爜缂栧彿', label: '鏉$爜缂栧彿', align: 'center', width: 120 },
- { field: '绂佺敤鏍囪', label: '绂佺敤鏍囪', align: 'center', width: 100 },
- { field: '澶囨敞', label: '澶囨敞', align: 'center', width: 150 },
- { field: '瀹℃牳浜�', label: '瀹℃牳浜�', align: 'center', width: 100 },
- { field: '鍒涘缓浜�', label: '鍒涘缓浜�', align: 'center', width: 100 },
- { field: '鍒涘缓鏃堕棿', label: '鍒涘缓鏃堕棿', align: 'center', width: 150 }
- ]
- this.tableColumns = [...this.tableColumns, ...defaultColumns]
+ //鑾峰彇鍙傛暟
+ var sWhere = "";
+ //this.openPage鍒ゆ柇鏄惁鏈夊�硷紝鏈変唬琛ㄥ叾瀹冮〉闈㈤�氳繃閫夋嫨鎸夐挳鎵撳紑
+ if (this.openPage) {
+ sWhere += " and 绂佺敤鏍囪 != 'Y' and ISNULL(瀹℃牳浜�,'') != ''"
+ return sWhere;
}
+ return sWhere;
},
-
- // 鏌ヨ
- handleQuery() {
- this.pagination.page = 1
- this.loadTableData()
+ //鏍规嵁鐢ㄦ埛鑾峰彇鐢ㄦ埛鍏宠仈缁勭粐鐨勮繃婊ゆ潯浠�
+ getOrgIDByUser() {
+ var res = "";
+ axios.get(this.baseURL + '/Xt_User/getOrgIDListByUser', {
+ params: {
+ HModName: this.HModName,
+ user: sessionStorage["HUserName"],
+ HOrgID: sessionStorage["OrganizationID"]
+ },
+ }).then(response => {
+ let result = response.data
+ if (result.count == 1) {
+ if (result.data[0].sWhere == "1") {
+ res = " and HUSEORGID = '" + sessionStorage["OrganizationID"] + "'";
+ } else {
+ res = result.data[0].sWhere;
+ }
+ }
+ }).catch(error => {
+ res = " and 1 = 0";
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ return res;
},
-
- // 閲嶇疆鏌ヨ
- handleReset() {
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.sWhere = ''
this.queryParams = {
- HNumber: '',
- HName: '',
- HNumber2: '',
- ColName: '0',
- Comparator: '0',
- ColContent: ''
+ HOrgID: null,
+ HName: null,
+ HNumber: null,
+ Comparator1: '',
+ Comparator2: '',
+ Comparator: '',
+ ColContent1: '',
+ ColContent2: '',
+ ColContent: '',
}
- this.pagination.page = 1
- this.loadTableData()
+ this.clearData()
+ this.resetForm("queryForm")
+ this.getList()
},
-
- // 閲嶆柊鍚屾
- async handleResCnz() {
- if (!this.queryParams.HNumber2) {
- this.$message.warning('璇疯緭鍏ョ粨绠楁柟寮忎唬鐮�')
- return
- }
-
- try {
- const response = await axios.get(`${this.baseURL}/Gy_SettleStyle/Gy_SettleStyleViewApi`, {
- params: {
- Number: this.queryParams.HNumber2,
- Type: 'JSFS'
- }
- })
-
- if (response.data.count === 1) {
- this.$message.success(response.data.Message)
- this.loadTableData() // 閲嶆柊鍔犺浇鏁版嵁
- } else {
- this.$message.error(response.data.Message)
- }
- } catch (error) {
- console.error('閲嶆柊鍚屾澶辫触:', error)
- this.$message.error('閲嶆柊鍚屾澶辫触')
- }
+ clearData() {
+ this.single = true
+ this.multiple = true
+ this.OperationType = 0
+ this.copyType = 0
+ this.ids = []
},
-
- // 鍒锋柊
- handleRefresh() {
- this.loadTableData()
+ //閫�鍑�
+ close() {
+ this.tableShow = true
+ this.openEdit = false
+ this.editShow = false
+ this.clearData()
+ this.getList()
},
-
- // 鍒囨崲鎶樺彔鐘舵��
- toggleCollapse() {
- this.collapse = !this.collapse
+ //鎵撳紑鏂板缁勪欢寮圭獥
+ handleAddEdit() {
+ this.rowForm.HItemID = 0
+ this.$nextTick(() => {
+ this.openEdit = true
+ this.editShow = true
+ })
+
},
-
- // 琛屽弻鍑讳簨浠�
- handleRowDblClick(row) {
- this.selectedRow = row
- this.confirmSelection()
- },
-
- // 琛岀偣鍑讳簨浠�
- handleRowClick(row) {
- this.$refs.table.toggleRowSelection(row)
- this.selectedRow = row
- },
-
- // 閫夋嫨鍙樺寲
- handleSelectionChange(selection) {
- this.multipleSelection = selection
- if (selection.length === 1) {
- this.selectedRow = selection[0]
- }
- },
-
- // 纭閫夋嫨
- confirmSelection() {
- if (this.selectedRow) {
- this.$emit('selected', {
- HItemID: this.selectedRow.HItemID,
- 缁撶畻鏂瑰紡鍚嶇О: this.selectedRow.缁撶畻鏂瑰紡鍚嶇О
- })
- this.dialogVisible = false
- } else {
- this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
- }
- },
-
- // 閫�鍑�
- handleExit() {
- this.dialogVisible = false
- },
-
- // 鍏抽棴瀵硅瘽妗�
- handleClose(done) {
- this.$confirm('纭鍏抽棴锛�')
- .then(_ => {
- done()
- })
- .catch(_ => {})
- },
-
- // 鍒嗛〉澶у皬鏀瑰彉
- handleSizeChange(size) {
- this.pagination.size = size
- this.pagination.page = 1
- this.loadTableData()
- },
-
- // 褰撳墠椤垫敼鍙�
- handleCurrentChange(page) {
- this.pagination.page = page
- this.loadTableData()
- },
-
- // 鏍煎紡鍖栨棩鏈�
- formatDate(dateString) {
- if (!dateString) return ''
- try {
- const date = new Date(dateString)
- return date.toLocaleDateString('zh-CN')
- } catch (error) {
- return dateString
- }
- },
-
- // 鑾峰彇榛樿杩囨护鏂规
- async getDefaultFilterScheme() {
- try {
- const response = await axios.get(`${this.baseURL}/Xt_FastICScheme/Chooselist`, {
- params: {
- user: this.user,
- HModuleName: this.HModuleName,
- HInterID: 0,
- Type: "Default"
- }
- })
-
- if (response.data.count === 1) {
- const data = response.data.data[0]
- this.HInterID_Choose = data.hmainid
- this.currentFilterScheme = `褰撳墠杩囨护鏂规锛�${data.鏂规鍚嶇О} (${data.澶囨敞})`
-
- // 搴旂敤杩囨护鏉′欢
- this.applyFilterConditions(response.data.data)
- }
- } catch (error) {
- console.error('鑾峰彇杩囨护鏂规澶辫触:', error)
- }
- },
-
- // 搴旂敤杩囨护鏉′欢
- applyFilterConditions(filterData) {
- filterData.forEach(item => {
- if (this.queryParams.hasOwnProperty(item.杩囨护瀛楁ID)) {
- this.queryParams[item.杩囨护瀛楁ID] = item.杩囨护鍊�
- }
+ //鎵撳紑淇敼缁勪欢寮圭獥
+ handleEdit() {
+ this.$nextTick(() => {
+ this.openEdit = true
+ this.editShow = true
})
},
-
- // 淇濆瓨杩囨护鏂规
- handleSaveScheme() {
- this.$message.info('淇濆瓨鏂规鍔熻兘')
+ //鍏抽棴缂栬緫椤甸潰
+ editGyClose(val) {
+ this.editShow = false
+ this.openEdit = false
+ this.clearData()
+ this.getList()
},
-
- // 璇诲彇杩囨护鏂规
- handleReadScheme() {
- this.$message.info('璇诲彇鏂规鍔熻兘')
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete() {
+ this.$modal.confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠').then(() => {
+ if (!this.rowForm.瀹℃牳浜�) {
+ axios.get(this.baseURL + "DeltetGy_Department", {
+ params: { 'HItemID': this.rowForm.HItemID, 'user': sessionStorage["HUserName"] }
+ }).then(response => {
+ if (response.data.count == 1) {
+ this.getList()
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛")
+ } else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message);
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ } else {
+ this.$modal.msgError("姝ゆ潯鏁版嵁涓嶆槸鍒涘缓鐘舵��,鏃犳硶鍒犻櫎!");
+ }
+ }).catch(() => { })
},
-
- // 鍒楄缃�
- handleColumnSetting() {
- this.$message.info('鍒楄缃姛鑳�')
- }
+ // 鍙嶅鏍�/瀹℃牳鏁版嵁
+ set_CheckBill(num, form) {
+ var InterID = form.HItemID || form.HInterID
+ //閫昏緫瀹℃牳鏂规硶
+ axios.get(this.baseURL + "/Gy_Department/AuditGy_Department", {
+ params: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] }
+ }).then(response => {
+ let result = response.data
+ if (result.code == 1) {
+ this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+ this.getList();
+ }
+ else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message,);
+ }
+ this.clearData()
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ // 鍙嶇鐢�/绂佺敤鏁版嵁
+ set_De_Stop(num, form) {
+ var InterID = form.HItemID.toString() || form.HInterID.toString()
+ //閫昏緫瀹℃牳鏂规硶
+ axios.get(this.baseURL + "/Gy_Department/StopGy_Department", {
+ params: { "HInterID": InterID, "IsStop": num, "CurUserName": sessionStorage["HUserName"] }
+ }).then(response => {
+ let result = response.data
+ if (result.code == 1) {
+ this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+ this.getList();
+ }
+ else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message,);
+ }
+ this.clearData()
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ //瀵煎嚭
+ handleExport() {
+ const ws = this.$XLSX.utils.json_to_sheet(this.tyResList); // 灏嗘暟鎹浆鎹负宸ヤ綔琛�
+ const wb = this.$XLSX.utils.book_new(); // 鍒涘缓涓�涓柊鐨勫伐浣滅翱
+ this.$XLSX.utils.book_append_sheet(wb, ws, "Sheet1"); // 灏嗗伐浣滆〃娣诲姞鍒板伐浣滅翱涓紝骞跺懡鍚嶄负"Sheet1"
+ this.$XLSX.writeFile(wb, `gySource_${new Date().getTime()}.xlsx`); // 瀵煎嚭鏂囦欢
+ },
+ handleImport() {
+ this.uploadData = []
+ this.upload.isUploading = false
+ this.upload.title = "瀵煎叆";
+ this.upload.open = true;
+ },
+ // 鏂囦欢涓婁紶涓鐞�
+ handleFileUploadProgress(event, file, fileList) {
+ this.upload.isUploading = true;
+ this.uploadTableLoading = true
+ },
+ // 鏂囦欢涓婁紶鎴愬姛澶勭悊
+ handleFileSuccess(response, file, fileList) {
+ // this.upload.open = false;
+ this.upload.isUploading = true;
+ this.$refs.upload.clearFiles();
+ if (response.code == 1) {
+ this.alluploadList = response.data
+ this.uploadData = this.getPage(this.uploadPage, this.alluploadList)
+ this.uploadTotal = this.alluploadList.length
+ this.uploadTableLoading = false
+ // this.set_AddNew(response.data)
+ } else {
+ this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.Message + "</div>", "瀵煎叆缁撴灉", { dangerouslyUseHTMLString: true });
+ }
+
+ },
+ // 鎻愪氦涓婁紶鏂囦欢
+ submitFileForm() {
+ this.$refs.upload.submit();
+ },
+ set_AddNew() {
+ var num = [];
+ for (var i = 0; i < this.uploadData.length; i++) {
+ if (this.uploadData[i] != "") {
+ num.push(this.uploadData[i])
+ }
+ }
+ var sSubStr = JSON.stringify(num);
+ var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"];
+ axios({
+ method: 'post',
+ url: this.baseURL + "/Gy_Source/Gy_Source_btnSave",
+ data: {
+ 'sMainSub': sMainSub
+ },
+ }).then(res => {
+ this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + res.data.Message + "</div>", "瀵煎叆缁撴灉", { dangerouslyUseHTMLString: true });
+ this.upload.open = false
+ this.getList()
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ uploadDataIndex({ row, rowIndex }) {
+ row.index = rowIndex + 1;
+ },
+ uploadDataDelete(row) {
+ this.$modal.confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠').then(() => {
+ const deleteList = [row.index]
+ const data = this.uploadData
+ this.uploadData = data.filter(item => {
+ return deleteList.indexOf(item.index) == -1
+ });
+ }).catch(() => { })
+ },
+ getPage(page, list) {
+ let sindex = (parseInt(page) - 1) * this.uploadPageSize
+ let eindex = parseInt(page) * this.uploadPageSize
+ let newList = list.slice(sindex, eindex)
+ console.log(newList)
+ return newList
+ },
+ currentPage(val) {
+ this.uploadPage = val.page
+ setTimeout(() => {
+ this.uploadData = this.getPage(this.uploadPage, this.alluploadList)
+ }, 100)
+ },
}
-}
+};
</script>
-
-<style scoped>
-.settle-style-dialog {
- height: 70vh;
- display: flex;
- flex-direction: column;
+<style>
+.xsckdBox .el-date-editor.el-input {
+ width: 100%;
}
-
-.search-card {
- margin-bottom: 15px;
-}
-
-.table-card {
- flex: 1;
- display: flex;
- flex-direction: column;
-}
-
-.table-card >>> .el-card__body {
- flex: 1;
- display: flex;
- flex-direction: column;
-}
-
-.clearfix:before,
-.clearfix:after {
- display: table;
- content: "";
-}
-.clearfix:after {
- clear: both;
-}
-
-.el-form-item {
- margin-bottom: 15px;
-}
-
-.el-table {
- flex: 1;
-}
-
-.filter-scheme {
- text-align: center;
- font-size: 15px;
- font-weight: bold;
- color: #fc9393;
- margin: 10px 0;
-}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/component/printList/barcode.vue b/src/views/component/printList/barcode.vue
new file mode 100644
index 0000000..a640440
--- /dev/null
+++ b/src/views/component/printList/barcode.vue
@@ -0,0 +1,143 @@
+<template>
+ <div>
+ <button @click="getTemp">鎵撳嵃</button>
+ <div id="report_holder"> </div>
+ </div>
+</template>
+
+<script>
+import PrintJS from 'print-js'
+import axios from "axios";
+export default {
+ name: "HBarPlanPrintWeb",
+ data() {
+ return {
+ styleList: [],
+ handleMessage: this.$route.query,
+ pageSize: {
+ width: 0,
+ height: 0
+ },
+ reportViewer: null,
+ baseUrl: process.env.VUE_APP_BASE_API,
+ json_data: {
+ recordset: [],
+ },
+ grfPath: "",
+
+ }
+ },
+ async mounted() {
+ // 鑾峰彇 鎵撳嵃鐨勬暟鎹�
+ await this.getPrintData()
+
+ rubylong.grhtml5.barcodeURL = this.baseUrl + "/Utility/Barcode.ashx";
+ this.reportViewer = rubylong.grhtml5.insertReportViewer("report_holder", this.grfPath, this.json_data.recordset,
+ );
+ this.reportViewer.start();
+ },
+ methods: {
+ getUrlVars_JSON() {
+ var datajson;
+ var str = this.propsData; //鑾峰彇閾炬帴涓紶閫掔殑鍙傛暟
+ var arr = str.substring(str.lastIndexOf("=") + 1);
+ datajson = JSON.parse(decodeURI(arr));
+ return datajson;
+ },
+ async getPrintData() {
+ let OpenTmp = decodeURIComponent(this.$route.query.OpenTmp);
+ let sql = "";
+ if (this.$route.query.Type == "Kf_SellOutBillList") {
+ sql =
+ "exec h_p_Kf_SellOutBillList_PrintSellOutBill " +
+ this.handleMessage.linterid.toString();
+ } else if (this.$route.query.Type == "HGy_BarCodeBill") {
+ sql =
+ "select * from h_v_IF_BarCodeBillList where hmainid in(" +
+ this.handleMessage.linterid.toString() +
+ ") order by hmainid desc";
+ } else if (this.$route.query.Type == "HPOInStockBill") {
+ sql =
+ "select * from h_v_Sc_PrintMouldProdOutBillList where hmainid=" +
+ this.handleMessage.linterid.toString() +
+ " order by hmainid";
+ } else if (this.$route.query.Type == "HGyStockPlaceBarCode") {
+ let condition = decodeURI(this.handleMessage.linterid.toString());
+ sql = `SELECT
+ CEILING(CAST(t.row_num AS FLOAT) / 2) AS orderid,
+ MAX(CASE WHEN t.row_num % 2 = 1 THEN t.鏉$爜缂栧彿 END) AS 鏉$爜缂栧彿1,
+ MAX(CASE WHEN t.row_num % 2 = 1 THEN t.浠撲綅鍚嶇О END) AS 浠撲綅鍚嶇О1,
+ MAX(CASE WHEN t.row_num % 2 = 0 THEN t.鏉$爜缂栧彿 END) AS 鏉$爜缂栧彿2,
+ MAX(CASE WHEN t.row_num % 2 = 0 THEN t.浠撲綅鍚嶇О END) AS 浠撲綅鍚嶇О2
+ FROM (
+ SELECT
+ 鏉$爜缂栧彿, 浠撲綅鍚嶇О,
+ ROW_NUMBER() OVER (ORDER BY t1.HItemID) AS row_num
+ FROM h_v_IF_StockPlaceList t1 where 鏉$爜缂栧彿 in (${condition})
+ ) AS t
+ GROUP BY CEILING(CAST(t.row_num AS FLOAT) / 2)
+ ORDER BY orderid;`;
+ }
+ try{
+ let res = await axios.get(this.baseURL + "/CommonModel/searchMethod", {
+ params: {
+ sql: sql,
+ user: sessionStorage["HUserName"],
+ ModRightNameCheck: "",
+ // , "HSubID": data[i].hsubid
+ },
+ })
+ // 灏� 娓叉煋鏁版嵁 鍜� 妯℃澘鍔犺浇鍒版湰鍦�
+ let result = res.data;
+ this.json_data.recordset = result.data;
+ this.grfPath = "./static/grf/" + OpenTmp + ".grf"
+ console.log(this.json_data);
+ }catch(err) {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!" + err);
+ }
+
+ },
+ getTemp() {
+ // 瀵规瘡涓鎵撳嵃鐨勫璞℃坊鍔犲垎椤�
+ let docs = document.querySelectorAll('[_grrecno]')
+ this.pageSize.width = docs[0].offsetWidth
+ this.pageSize.height = docs[0].offsetHeight
+ docs.forEach((elem, index) => {
+ elem.classList.add('printable')
+ })
+ let styles = document.querySelectorAll('[id^="_gridcss"]')
+ this.styleList.push(...styles)
+
+ this.execPrint()
+ },
+ execPrint() {
+ PrintJS({
+ printable: 'report_holder',
+ scanStyles: false,
+ type: 'html',
+ style: this.styleList[0].innerText + ` @media print {
+ .printable {
+ page-break-inside: avoid;
+ page-break-after: always;
+ }
+
+ @page {
+ size: ${this.pageSize.width + 1}px ${this.pageSize.height + 1}px;
+ margin: 0;
+ padding: 0;
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ }
+ `,
+ })
+
+
+ }
+ }
+}
+</script>
+
+<style></style>
\ No newline at end of file
diff --git a/src/views/component/printList/hBarPlanPrint.vue b/src/views/component/printList/hBarPlanPrint.vue
index bb2b415..3541e8b 100644
--- a/src/views/component/printList/hBarPlanPrint.vue
+++ b/src/views/component/printList/hBarPlanPrint.vue
@@ -1,79 +1,106 @@
<template>
- <div>
- <div id="report_holder"> </div>
- </div>
+ <div>
+ <div id="report_holder"></div>
+ </div>
</template>
<script>
-import { webapp_ws_ajax_run, webapp_urlprotocol_startup, urlAddRandomNo } from "@/utils/grwebapp";
-import axios from 'axios'
+import {
+ webapp_ws_ajax_run,
+ webapp_urlprotocol_startup,
+ urlAddRandomNo,
+} from "@/utils/grwebapp";
+import axios from "axios";
export default {
- name: 'HBarPlanPrint',
- data() {
- return {
- handleMessage: this.$route.query,
- baseURL: process.env.VUE_APP_BASE_API,
- //瀹為檯搴旂敤涓紝data搴旇涓虹▼搴忎腑閫氳繃鍚勭閫斿緞鑾峰彇鍒扮殑鏁版嵁锛屾渶鍚庤灏嗘暟鎹浆鎹负鎶ヨ〃闇�瑕佺殑XML鎴朖SON鏍煎紡鐨勫瓧绗︿覆鏁版嵁
- json_data: {
- recordset: []
- },
-
- }
+ name: "HBarPlanPrint",
+ data() {
+ return {
+ handleMessage: this.$route.query,
+ baseURL: process.env.VUE_APP_BASE_API,
+ //瀹為檯搴旂敤涓紝data搴旇涓虹▼搴忎腑閫氳繃鍚勭閫斿緞鑾峰彇鍒扮殑鏁版嵁锛屾渶鍚庤灏嗘暟鎹浆鎹负鎶ヨ〃闇�瑕佺殑XML鎴朖SON鏍煎紡鐨勫瓧绗︿覆鏁版嵁
+ json_data: {
+ recordset: [],
+ },
+ };
+ },
+ mounted() {
+ this.ws_both_from_object();
+ },
+ // created() {
+ // this.ws_both_from_object()
+ // },
+ methods: {
+ // 鑾峰彇鍙傛暟_浼犻�掔殑JSON鏍煎紡鍙傛暟
+ getUrlVars_JSON() {
+ var datajson;
+ var str = this.propsData; //鑾峰彇閾炬帴涓紶閫掔殑鍙傛暟
+ var arr = str.substring(str.lastIndexOf("=") + 1);
+ datajson = JSON.parse(decodeURI(arr));
+ return datajson;
},
- mounted() {
- this.ws_both_from_object()
-
+ ws_both_from_object() {
+ let OpenTmp = decodeURIComponent(this.$route.query.OpenTmp);
+ let sql = "";
+ if (this.$route.query.Type == "Kf_SellOutBillList") {
+ sql =
+ "exec h_p_Kf_SellOutBillList_PrintSellOutBill " +
+ this.handleMessage.linterid.toString();
+ } else if (this.$route.query.Type == "HGy_BarCodeBill") {
+ sql =
+ "select * from h_v_IF_BarCodeBillList where hmainid in(" +
+ this.handleMessage.linterid.toString() +
+ ") order by hmainid desc";
+ } else if (this.$route.query.Type == "HPOInStockBill") {
+ sql =
+ "select * from h_v_Sc_PrintMouldProdOutBillList where hmainid=" +
+ this.handleMessage.linterid.toString() +
+ " order by hmainid";
+ } else if (this.$route.query.Type == "HGyStockPlaceBarCode") {
+ let condition = decodeURI(this.handleMessage.linterid.toString());
+ sql = `SELECT
+ CEILING(CAST(t.row_num AS FLOAT) / 2) AS orderid,
+ MAX(CASE WHEN t.row_num % 2 = 1 THEN t.鏉$爜缂栧彿 END) AS 鏉$爜缂栧彿1,
+ MAX(CASE WHEN t.row_num % 2 = 1 THEN t.浠撲綅鍚嶇О END) AS 浠撲綅鍚嶇О1,
+ MAX(CASE WHEN t.row_num % 2 = 0 THEN t.鏉$爜缂栧彿 END) AS 鏉$爜缂栧彿2,
+ MAX(CASE WHEN t.row_num % 2 = 0 THEN t.浠撲綅鍚嶇О END) AS 浠撲綅鍚嶇О2
+ FROM (
+ SELECT
+ 鏉$爜缂栧彿, 浠撲綅鍚嶇О,
+ ROW_NUMBER() OVER (ORDER BY t1.HItemID) AS row_num
+ FROM h_v_IF_StockPlaceList t1 where 鏉$爜缂栧彿 in (${condition})
+ ) AS t
+ GROUP BY CEILING(CAST(t.row_num AS FLOAT) / 2)
+ ORDER BY orderid;`;
+ }
+ axios
+ .get(this.baseURL + "/CommonModel/searchMethod", {
+ params: {
+ sql: sql,
+ user: sessionStorage["HUserName"],
+ ModRightNameCheck: "",
+ // , "HSubID": data[i].hsubid
+ },
+ })
+ .then((response) => {
+ let result = response.data;
+ this.json_data.recordset = result.data;
+ //鍙傛暟鍏蜂綋璇存槑璇峰弬鑰冨府鍔╂枃妗d腑鐨勨�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->鍚姩鍙傛暟璇存槑鈥濋儴鍒�
+ var args = {
+ type: "preview", //璁剧疆涓嶅悓鐨勫睘鎬у彲浠ユ墽琛屼笉鍚岀殑浠诲姟锛屽锛歱review print pdf xls csv txt rtf img grd
+ // report: this.json_report, //report: JSON.stringify(json_report),
+ report: urlAddRandomNo("./static/grf/" + OpenTmp + ".grf"),
+ data: this.json_data, //data: JSON.stringify(json_data)
+ };
+ console.log(args, this.json_data);
+ webapp_ws_ajax_run(args);
+ // var reportViewer = rubylong.grhtml5.insertReportViewer("report_holder", "./static/grf/閿�鍞嚭搴撳崟.grf", this.json_data);
+ // reportViewer.start();
+ })
+ .catch((error) => {
+ console.log(22222, error);
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
},
- // created() {
- // this.ws_both_from_object()
- // },
- methods: {
- // 鑾峰彇鍙傛暟_浼犻�掔殑JSON鏍煎紡鍙傛暟
- getUrlVars_JSON() {
- var datajson;
- var str = this.propsData; //鑾峰彇閾炬帴涓紶閫掔殑鍙傛暟
- var arr = str.substring(str.lastIndexOf("=") + 1);
- datajson = JSON.parse(decodeURI(arr));
- return datajson;
- },
- ws_both_from_object() {
- let OpenTmp = decodeURIComponent(this.$route.query.OpenTmp)
- let sql = ''
- if (this.$route.query.Type == 'Kf_SellOutBillList') {
- sql = "exec h_p_Kf_SellOutBillList_PrintSellOutBill " + this.handleMessage.linterid.toString()
- } else if (this.$route.query.Type == 'HGy_BarCodeBill') {
- sql = "select * from h_v_IF_BarCodeBillList where hmainid in(" + this.handleMessage.linterid.toString() + ") order by hmainid desc"
- }else if (this.$route.query.Type == 'HPOInStockBill') {
- sql = "select * from h_v_Sc_PrintMouldProdOutBillList where hmainid=" + this.handleMessage.linterid.toString()+ " order by hmainid"
- }
- axios.get(this.baseURL + '/CommonModel/searchMethod', {
- params: {
- "sql": sql,
- "user": sessionStorage["HUserName"],
- "ModRightNameCheck": ''
- // , "HSubID": data[i].hsubid
- },
- }).then(response => {
- let result = response.data
- this.json_data.recordset = result.data
- //鍙傛暟鍏蜂綋璇存槑璇峰弬鑰冨府鍔╂枃妗d腑鐨勨�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->鍚姩鍙傛暟璇存槑鈥濋儴鍒�
- var args = {
- type: "preview", //璁剧疆涓嶅悓鐨勫睘鎬у彲浠ユ墽琛屼笉鍚岀殑浠诲姟锛屽锛歱review print pdf xls csv txt rtf img grd
- // report: this.json_report, //report: JSON.stringify(json_report),
- report: urlAddRandomNo('./static/grf/' + OpenTmp + '.grf'),
- data: this.json_data //data: JSON.stringify(json_data)
- };
- console.log(args, this.json_data)
- webapp_ws_ajax_run(args);
- // var reportViewer = rubylong.grhtml5.insertReportViewer("report_holder", "./static/grf/閿�鍞嚭搴撳崟.grf", this.json_data);
- // reportViewer.start();
- }).catch(error => {
- console.log(22222, error)
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
-
- }
- },
-}
-
-</script>
\ No newline at end of file
+ },
+};
+</script>
diff --git a/src/views/component/printList/index.vue b/src/views/component/printList/index.vue
index 635d36d..85f427f 100644
--- a/src/views/component/printList/index.vue
+++ b/src/views/component/printList/index.vue
@@ -3,6 +3,7 @@
<el-form ref="formData" :model="formData" label-width="100px">
<div style="padding: 10px; ">
<el-button type="primary" size="small" @click="printClick">鎶ヨ〃鎵撳嵃</el-button>
+ <el-button type="primary" size="small" @click="printClickWeb">鎶ヨ〃鎵撳嵃(缃戦〉)</el-button>
</div>
<el-table v-loading="loading" :data="printdata" ref="printTable" max-height="540"
@selection-change="handleSelectionChange" :row-class-name="rowSysIndex" border>
@@ -66,6 +67,10 @@
handlePrint() {
this.openPrint = true
},
+ printClickWeb() {
+ const routeUrl = this.$router.resolve({ path: '/hBarPlanPrintWeb',query:{linterid:this.linterid.toString(),Type:this.Type.toString(),OpenTmp: encodeURIComponent(this.rowForm.妯℃澘鍚嶇О)} });
+ window.open(routeUrl.href, '_blank');
+ },
printClick() {
const routeUrl = this.$router.resolve({ path: '/hBarPlanPrint',query:{linterid:this.linterid.toString(),Type:this.Type.toString(),OpenTmp: encodeURIComponent(this.rowForm.妯℃澘鍚嶇О)} });
window.open(routeUrl.href, '_blank');
diff --git a/src/views/gyEmployee/edit/index.vue b/src/views/gyEmployee/edit/index.vue
index 6cb0bb3..57ad8ea 100644
--- a/src/views/gyEmployee/edit/index.vue
+++ b/src/views/gyEmployee/edit/index.vue
@@ -902,7 +902,7 @@
CheckBillDisabled: true,
// OperationType: this.$route.query.OperationType,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
HInterID: null,
- baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/",
+ baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
user: "admin",
currentRow: [],
lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
diff --git a/src/views/gyEmployee/index.vue b/src/views/gyEmployee/index.vue
index ac7292e..d8ddc64 100644
--- a/src/views/gyEmployee/index.vue
+++ b/src/views/gyEmployee/index.vue
@@ -572,7 +572,7 @@
subDisabled: false, //缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
OperationType: null, //淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
HInterID: null,
- baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/",
+ baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
user: "admin",
currentRow: [],
lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
diff --git a/src/views/gyMaterial/GyMaterial.vue b/src/views/gyMaterial/GyMaterial.vue
index 1f2fec3..5d8df4a 100644
--- a/src/views/gyMaterial/GyMaterial.vue
+++ b/src/views/gyMaterial/GyMaterial.vue
@@ -1,6 +1,6 @@
<template>
<div style="padding: 10px">
- <el-card style="margin-bottom: 10px;">
+ <el-card style="margin-bottom: 10px">
<el-form :inline="true" :model="queryParams" ref="queryForm" class="mb8">
<el-form-item label="鐗╂枡浠g爜" prop="HNumber">
<el-input
@@ -23,10 +23,10 @@
style="width: 160px"
>
<el-option
- v-for="item in organizationOptions"
- :key="item.ID"
+ v-for="(item, index) in organizationOptions"
+ :key="index"
:label="item.Name"
- :value="item.ID"
+ :value="item.ID.toString()"
/>
</el-select>
</el-form-item>
@@ -50,10 +50,18 @@
placeholder="璇疯緭鍏ョ墿鏂欎唬鐮�"
style="width: 160px"
/>
- <el-button type="primary" size="mini" @click="handleResCnz" style="margin-left: 10px">閲嶆柊鍚屾</el-button>
+ <el-button
+ type="primary"
+ size="mini"
+ @click="handleResCnz"
+ style="margin-left: 10px"
+ >閲嶆柊鍚屾</el-button
+ >
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
+ >鎼滅储</el-button
+ >
<el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
@@ -67,7 +75,7 @@
style="width: 160px"
/>
</el-form-item>
- <el-card class="box-card" style="margin-top: 20px;">
+ <el-card class="box-card" style="margin-top: 20px">
<div slot="header" class="clearfix"><span>杩囨护</span></div>
<div>
<el-form-item label-width="0">
@@ -201,159 +209,85 @@
</el-collapse-item>
</el-collapse>
</el-form>
- <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393;margin: 20px 0;">
+ <div
+ style="
+ text-align: center;
+ font-size: 15px;
+ font-weight: bold;
+ color: #fc9393;
+ margin: 20px 0;
+ "
+ >
{{ currentFilterScheme }}
</div>
</el-card>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
- <el-button
- type="primary"
- plain
- size="mini"
- @click="handleImport"
- >瀵煎叆</el-button
- >
+ <el-button type="primary" plain size="mini" @click="handleImport">瀵煎叆</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="primary"
- plain
- size="mini"
- @click="handleExport"
- >瀵煎嚭</el-button
- >
+ <el-button type="primary" plain size="mini" @click="handleExport">瀵煎嚭</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="primary"
- size="mini"
- @click="handleNumAdd"
- >娴佹按鍙锋柊澧�</el-button
- >
+ <el-button type="primary" size="mini" @click="handleNumAdd">娴佹按鍙锋柊澧�</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="primary"
- size="mini"
- @click="handleAdd"
- >鏂板</el-button
- >
+ <el-button type="primary" size="mini" @click="handleAdd">鏂板</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- :disabled="single"
- @click="handleCopy"
- >澶嶅埗</el-button
- >
+ <el-button size="mini" :disabled="single" @click="handleCopy">澶嶅埗</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- :disabled="single"
- @click="handleEdit"
- >缂栬緫</el-button
- >
+ <el-button size="mini" :disabled="single" @click="handleEdit">缂栬緫</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="danger"
- size="mini"
- :disabled="single"
- @click="handleDelete"
+ <el-button type="danger" size="mini" :disabled="single" @click="handleDelete"
>鍒犻櫎</el-button
>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- :disabled="single"
- @click="handleAudit(0)"
- >瀹℃牳</el-button
- >
+ <el-button size="mini" :disabled="single" @click="handleAudit(0)">瀹℃牳</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- :disabled="single"
- @click="handleAudit(1)"
+ <el-button size="mini" :disabled="single" @click="handleAudit(1)"
>鍙嶅鏍�</el-button
>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- :disabled="single"
- @click="handleStop(0)"
- >绂佺敤</el-button
- >
+ <el-button size="mini" :disabled="single" @click="handleStop(0)">绂佺敤</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- :disabled="single"
- @click="handleStop(1)"
+ <el-button size="mini" :disabled="single" @click="handleStop(1)"
>鍙嶇鐢�</el-button
>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- @click="handleColumnSetting"
- >鍒楄缃�</el-button
- >
+ <el-button size="mini" @click="handleColumnSetting">鍒楄缃�</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- @click="handleButtonSetting"
- >鎸夐挳璁剧疆</el-button
- >
+ <el-button size="mini" @click="handleButtonSetting">鎸夐挳璁剧疆</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="primary"
- size="mini"
- @click="handleSaveScheme"
+ <el-button type="primary" size="mini" @click="handleSaveScheme"
>淇濆瓨鏂规</el-button
>
</el-col>
<el-col :span="1.5">
- <el-button
- type="primary"
- size="mini"
- @click="handleReadScheme"
+ <el-button type="primary" size="mini" @click="handleReadScheme"
>璇诲彇鏂规</el-button
>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- @click="handleRefresh"
- >鍒锋柊</el-button
- >
+ <el-button size="mini" @click="handleRefresh">鍒锋柊</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- size="mini"
- @click="handleExit"
- >閫�鍑�</el-button
- >
+ <el-button size="mini" @click="handleExit">閫�鍑�</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="primary"
- size="mini"
- @click="handleCorrect"
- >鎵规敼</el-button
- >
+ <el-button type="primary" size="mini" @click="handleCorrect">鎵规敼</el-button>
</el-col>
<el-col :span="1.5">
- <el-button
- type="primary"
- size="mini"
- @click="handleCorrect2"
+ <el-button type="primary" size="mini" @click="handleCorrect2"
>鎵规敼(鏂规2)</el-button
>
</el-col>
@@ -361,11 +295,13 @@
<el-row :gutter="10" style="margin-top: 10px">
<el-col :span="6">
- <el-card style="height: 600px; overflow: hidden; display: flex; flex-direction: column;">
+ <el-card
+ style="height: 600px; overflow: hidden; display: flex; flex-direction: column"
+ >
<div slot="header">
<span>鐗╂枡鍒嗙被</span>
</div>
- <div style="flex: 1; overflow: auto; margin-bottom: 10px;">
+ <div style="flex: 1; overflow: auto; margin-bottom: 10px">
<el-tree
:data="treeData"
:props="treeProps"
@@ -381,31 +317,38 @@
</span>
</el-tree>
</div>
- <div style="height: 200px; border: 1px solid #ebeef5; border-radius: 4px;">
- <el-carousel
- :autoplay="false"
- indicator-position="none"
+ <div style="height: 200px; border: 1px solid #ebeef5; border-radius: 4px">
+ <el-carousel
+ :autoplay="false"
+ indicator-position="none"
height="200px"
ref="carousel"
>
<el-carousel-item v-for="(item, index) in fileList" :key="index">
<div v-if="item.type === 'image'" class="carousel-item">
- <img
- :src="item.url"
- :alt="item.name"
- style="width: 100%; height: 100%; object-fit: contain;"
+ <img
+ :src="item.url"
+ :alt="item.name"
+ style="width: 100%; height: 100%; object-fit: contain"
@click="previewImg(item.url)"
/>
</div>
<div v-else-if="item.type === 'pdf'" class="carousel-item">
- <embed
- :src="item.url"
- type="application/pdf"
- style="width: 100%; height: 100%;"
+ <embed
+ :src="item.url"
+ type="application/pdf"
+ style="width: 100%; height: 100%"
/>
</div>
<div v-else class="carousel-item">
- <h1 style="text-align:center;line-height:180px;color:red;font-weight:bolder;">
+ <h1
+ style="
+ text-align: center;
+ line-height: 180px;
+ color: red;
+ font-weight: bolder;
+ "
+ >
鏆傛湭涓婁紶鏂囦欢
</h1>
</div>
@@ -450,7 +393,12 @@
v-if="column.property === '鐗╂枡浠g爜'"
>{{ row[column.property] }}</el-button
>
- <span v-else-if="(column.property || '').includes('鏃堕棿') || (column.property || '').includes('鏃ユ湡')">
+ <span
+ v-else-if="
+ (column.property || '').includes('鏃堕棿') ||
+ (column.property || '').includes('鏃ユ湡')
+ "
+ >
{{ formatDate(row[column.property]) }}
</span>
<span v-else>{{ row[column.property] }}</span>
@@ -464,7 +412,7 @@
:page.sync="page"
:limit.sync="pageSize"
:pageSizes="pageSizes"
- @pagination="getList"
+ @pagination="handleQuery"
/>
</div>
</el-col>
@@ -476,7 +424,7 @@
top="5vh"
:before-close="handlePreviewClose"
>
- <img :src="previewImage" style="width: 100%;" />
+ <img :src="previewImage" style="width: 100%" />
</el-dialog>
<el-dialog
@@ -511,10 +459,7 @@
/>
</el-dialog>
- <MaterialCorrection
- :visible.sync="openCorrect"
- @close="closeCorrect"
- />
+ <MaterialCorrection :visible.sync="openCorrect" @close="closeCorrect" />
<el-dialog
title="鎵规敼(鏂规2)"
@@ -523,7 +468,7 @@
append-to-body
:before-close="closeCorrect2"
>
- <div style="text-align: center; padding: 50px;">
+ <div style="text-align: center; padding: 50px">
<h2>鐗╂枡鎵规敼鍔熻兘(鏂规2)</h2>
<p>鐗╂枡鎵规敼鍔熻兘(鏂规2)寰呭悗缁紑鍙�</p>
<el-button type="primary" @click="closeCorrect2">鍏抽棴</el-button>
@@ -537,8 +482,12 @@
append-to-body
>
<div style="margin-top: -20px">
- <el-button type="primary" size="mini" @click="handleImportSubmit">瀵煎叆鏁版嵁</el-button>
- <el-button type="primary" size="mini" @click="upload.open = false">閫� 鍑�</el-button>
+ <el-button type="primary" size="mini" @click="handleImportSubmit"
+ >瀵煎叆鏁版嵁</el-button
+ >
+ <el-button type="primary" size="mini" @click="upload.open = false"
+ >閫� 鍑�</el-button
+ >
<el-upload
ref="upload"
:limit="1"
@@ -552,12 +501,7 @@
<el-button type="primary" size="mini">鏂囦欢涓婁紶</el-button>
</el-upload>
</div>
- <el-table
- :data="uploadData"
- v-loading="uploadTableLoading"
- border
- height="550"
- >
+ <el-table :data="uploadData" v-loading="uploadTableLoading" border height="550">
<el-table-column type="index" label="搴忓彿" width="55" align="center" />
<el-table-column label="鐗╂枡浠g爜" prop="鐗╂枡浠g爜" align="center" width="120" />
<el-table-column label="鐗╂枡鍚嶇О" prop="鐗╂枡鍚嶇О" align="center" width="120" />
@@ -586,55 +530,55 @@
export default {
name: "GyMaterial",
- components: { RowSettings,MaterialEdit,MaterialCorrection },
+ components: { RowSettings, MaterialEdit, MaterialCorrection },
props: {
openPage: { type: String },
},
data() {
return {
- activeCollapse: [],
-
+ activeCollapse: [],
+
HModName: "Gy_Material",
HModuleName: "鐗╂枡鍒楄〃缁存姢",
HClassTag: "ForFilteringSchemes",
treeData: [],
treeProps: {
- children: 'children',
- label: 'title'
+ children: "children",
+ label: "title",
},
currentMaterTypeID: 0,
-
+
fileList: [
{
- type: 'empty',
- url: '',
- name: '鏆傛棤鏂囦欢'
- }
+ type: "empty",
+ url: "",
+ name: "鏆傛棤鏂囦欢",
+ },
],
-
+
// 缂栬緫鐩稿叧
editShow: false,
openEdit: false,
OperationType: null,
editTitle: "缂栬緫鐗╂枡",
currentEditId: 0,
-
+
// 鎵规敼鐩稿叧
openCorrect: false,
openCorrect2: false,
-
+
// 鍒楄缃�
columnSettingShow: false,
openColumnSetting: false,
-
+
// 鍥剧墖棰勮
previewVisible: false,
- previewImage: '',
-
+ previewImage: "",
+
// 琛ㄦ牸鏄剧ず
tableShow: true,
loading: true,
-
+
queryParams: {
HNumber: null,
HName: null,
@@ -652,7 +596,7 @@
ColContent1: "",
ColContent2: "",
},
- organizationOptions: [],
+ organizationOptions: JSON.parse(sessionStorage["organizationList"]),
projectOptions: [],
currentFilterScheme: "",
HInterID_Choose: 0,
@@ -668,7 +612,7 @@
{ label: "鍙冲寘鍚�", value: "9" },
{ label: "涓嶅寘鍚�", value: "10" },
],
-
+
sWhere: "",
selectedRow: null,
ids: [],
@@ -691,41 +635,32 @@
},
uploadData: [],
uploadTableLoading: false,
-
+
baseURL: process.env.VUE_APP_BASE_API,
user: "admin",
};
},
computed: {
visibleColumns() {
- return this.btList.filter(item => !item.hide && item.field);
- }
+ return this.btList.filter((item) => !item.hide && item.field);
+ },
},
created() {
+ this.user = sessionStorage["HUserName"];
+ this.queryParams.HOrgID = sessionStorage["OrganizationID"];
+ },
+ mounted() {
this.fetchData();
},
methods: {
fetchData() {
- axios
- .get(
- "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
- )
- .then((response) => {
- let data = response.data.data[0];
- this.user = data.Czymc;
-
- this.getOrganizations();
- this.queryParams.HOrgID = data.HUSEORGID;
- this.getTreeData();
- this.getProjectOptions();
- this.getList();
- //this.getDefaultFilterScheme();
- })
- .catch((error) => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
+ this.getOrganizations();
+ this.getTreeData();
+ this.getProjectOptions();
+ this.handleQuery();
+ //this.getDefaultFilterScheme();
},
-
+
getOrganizations() {
axios
.get(this.baseURL + "/Web/GetOrganizations")
@@ -741,13 +676,13 @@
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
+
getTreeData() {
axios
- .get(this.baseURL + "/Gy_MaterType/Gy_MaterTypeTreeListByLevel",{
- params: {
- HOrgID: '100038'
- }
+ .get(this.baseURL + "/Gy_MaterType/Gy_MaterTypeTreeListByLevel", {
+ params: {
+ HOrgID: this.queryParams.HOrgID,
+ },
})
.then((response) => {
if (response.data.count == 1) {
@@ -758,14 +693,13 @@
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
getProjectOptions() {
axios
.get(this.baseURL + "/Gy_Material/Get_HProject", {
params: {
- HOrgID: this.queryParams.HOrgID
- }
+ HOrgID: this.queryParams.HOrgID,
+ },
})
.then((response) => {
if (response.data.count == 1) {
@@ -776,12 +710,13 @@
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
-
+
getList() {
this.tableShow = false;
this.loading = true;
-
+
+ let orgName = this.organizationOptions.find((e) => e.ID == this.queryParams.HOrgID)
+ ?.Name;
axios
.get(this.baseURL + "/Gy_Material/page", {
params: {
@@ -789,7 +724,7 @@
user: this.user,
page: this.page,
size: this.pageSize,
- Organization: ''
+ Organization: orgName || "",
},
})
.then((response) => {
@@ -809,29 +744,27 @@
this.loading = false;
});
},
-
setDefaultColumns() {
this.btList = [
- { type: 'checkbox', fixed: 'left' },
- { field: 'hmainid', title: '鍗曟嵁ID', hide: true },
- { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', align: 'center', width: 120 },
- { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', align: 'center', width: 120 },
- { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', align: 'center', width: 120 },
- { field: '鐗╂枡灞炴��', title: '鐗╂枡灞炴��', align: 'center', width: 100 },
- { field: '缁勭粐鍚嶇О', title: '缁勭粐鍚嶇О', align: 'center', width: 120 },
- { field: '椤圭洰鍙�', title: '椤圭洰鍙�', align: 'center', width: 100 },
- { field: '绂佺敤鏍囪', title: '绂佺敤鏍囪', align: 'center', width: 100 },
- { field: '瀹℃牳浜�', title: '瀹℃牳浜�', align: 'center', width: 100 },
- { field: '鍒涘缓浜�', title: '鍒涘缓浜�', align: 'center', width: 100 },
- { field: '鍒涘缓鏃堕棿', title: '鍒涘缓鏃堕棿', align: 'center', width: 150 }
+ { type: "checkbox", fixed: "left" },
+ { field: "hmainid", title: "鍗曟嵁ID", hide: true },
+ { field: "鐗╂枡浠g爜", title: "鐗╂枡浠g爜", align: "center", width: 120 },
+ { field: "鐗╂枡鍚嶇О", title: "鐗╂枡鍚嶇О", align: "center", width: 120 },
+ { field: "瑙勬牸鍨嬪彿", title: "瑙勬牸鍨嬪彿", align: "center", width: 120 },
+ { field: "鐗╂枡灞炴��", title: "鐗╂枡灞炴��", align: "center", width: 100 },
+ { field: "缁勭粐鍚嶇О", title: "缁勭粐鍚嶇О", align: "center", width: 120 },
+ { field: "椤圭洰鍙�", title: "椤圭洰鍙�", align: "center", width: 100 },
+ { field: "绂佺敤鏍囪", title: "绂佺敤鏍囪", align: "center", width: 100 },
+ { field: "瀹℃牳浜�", title: "瀹℃牳浜�", align: "center", width: 100 },
+ { field: "鍒涘缓浜�", title: "鍒涘缓浜�", align: "center", width: 100 },
+ { field: "鍒涘缓鏃堕棿", title: "鍒涘缓鏃堕棿", align: "center", width: 150 },
];
},
-
-
+
handleTreeNodeClick(data) {
this.currentMaterTypeID = data.id;
-
+
if (data.id == "100") {
this.sWhere = " and HMaterTypeID= 0";
} else if (data.id == "0") {
@@ -839,16 +772,13 @@
} else {
this.sWhere = " and HMaterTypeID='" + data.id + "' ";
}
- this.getList();
+ this.handleQuery();
},
-
async handleQuery() {
this.sWhere = "";
-
this.processFilterConditions();
-
if (this.queryParams.HNumber) {
this.sWhere += " and 鐗╂枡浠g爜 like '%" + this.queryParams.HNumber + "%'";
@@ -865,16 +795,33 @@
this.getList();
},
-
+
processFilterConditions() {
const conditions = [
- { colName: this.queryParams.ColName, comparator: this.queryParams.Comparator, content: this.queryParams.ColContent },
- { colName: this.queryParams.ColName1, comparator: this.queryParams.Comparator1, content: this.queryParams.ColContent1 },
- { colName: this.queryParams.ColName2, comparator: this.queryParams.Comparator2, content: this.queryParams.ColContent2 }
+ {
+ colName: this.queryParams.ColName,
+ comparator: this.queryParams.Comparator,
+ content: this.queryParams.ColContent,
+ },
+ {
+ colName: this.queryParams.ColName1,
+ comparator: this.queryParams.Comparator1,
+ content: this.queryParams.ColContent1,
+ },
+ {
+ colName: this.queryParams.ColName2,
+ comparator: this.queryParams.Comparator2,
+ content: this.queryParams.ColContent2,
+ },
];
- conditions.forEach(condition => {
- if (condition.colName && condition.colName !== "0" && condition.comparator && condition.comparator !== "0") {
+ conditions.forEach((condition) => {
+ if (
+ condition.colName &&
+ condition.colName !== "0" &&
+ condition.comparator &&
+ condition.comparator !== "0"
+ ) {
let com = "";
switch (condition.comparator) {
case "7":
@@ -897,7 +844,6 @@
}
});
},
-
resetQuery() {
this.sWhere = "";
@@ -906,7 +852,7 @@
HName: null,
HNumber2: null,
HModel: null,
- HOrgID: this.organizationOptions.length > 0 ? this.organizationOptions[0].ID : null,
+ HOrgID: sessionStorage["OrganizationID"],
HProject: null,
ColName: "0",
ColName1: "0",
@@ -918,27 +864,26 @@
ColContent1: "",
ColContent2: "",
};
- this.getList();
+ this.handleQuery();
},
-
handleResCnz() {
if (!this.queryParams.HNumber2) {
this.$modal.msgWarning("璇疯緭鍏ョ墿鏂欎唬鐮�");
return;
}
-
+
axios
.get(this.baseURL + "/Gy_Material/Gy_MaterialViewApi", {
params: {
Number: this.queryParams.HNumber2,
- Type: 'WL'
- }
+ Type: "WL",
+ },
})
.then((response) => {
if (response.data.count == 1) {
this.$modal.msgSuccess(response.data.Message);
- this.getList();
+ this.handleQuery();
} else {
this.$modal.msgError(response.data.Message);
}
@@ -947,22 +892,21 @@
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
-
+
handleImport() {
this.uploadData = [];
this.upload.isUploading = false;
this.upload.title = "瀵煎叆";
this.upload.open = true;
},
-
+
handleExport() {
axios
.get(this.baseURL + "/LMES/getReportByModRightNameCheck", {
params: {
ModRightNameCheck: "Gy_Material_ExportExcel",
- user: this.user
- }
+ user: this.user,
+ },
})
.then((response) => {
if (response.data.count == 1) {
@@ -978,58 +922,61 @@
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
+
handleNumAdd() {
- if ((this.currentMaterTypeID == 0 || this.currentMaterTypeID == null) && !this.judgeSkipTouchMaterType()) {
- this.$modal.msgWarning("璇烽�夋嫨鍏蜂綋鐗╂枡鍒嗙被锛�");
- return;
- }
- this.OperationType = 4;
- this.currentEditId = 0;
- this.editTitle = "娴佹按鍙锋柊澧炵墿鏂�";
- this.openEdit = true;
- this.editShow = true;
- },
-
- handleAdd() {
- this.OperationType = 1;
- this.currentEditId = 0;
- this.editTitle = "鏂板鐗╂枡";
- this.openEdit = true;
- this.editShow = true;
+ if (
+ (this.currentMaterTypeID == 0 || this.currentMaterTypeID == null) &&
+ !this.judgeSkipTouchMaterType()
+ ) {
+ this.$modal.msgWarning("璇烽�夋嫨鍏蜂綋鐗╂枡鍒嗙被锛�");
+ return;
+ }
+ this.OperationType = 4;
+ this.currentEditId = 0;
+ this.editTitle = "娴佹按鍙锋柊澧炵墿鏂�";
+ this.openEdit = true;
+ this.editShow = true;
},
-
+
+ handleAdd() {
+ this.OperationType = 1;
+ this.currentEditId = 0;
+ this.editTitle = "鏂板鐗╂枡";
+ this.openEdit = true;
+ this.editShow = true;
+ },
+
handleCopy() {
- if (this.single) {
- this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
- return;
- }
- this.OperationType = 2;
- this.currentEditId = this.selectedRow.HItemID;
- this.editTitle = "澶嶅埗鐗╂枡";
- this.openEdit = true;
- this.editShow = true;
- },
-
+ if (this.single) {
+ this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
+ return;
+ }
+ this.OperationType = 2;
+ this.currentEditId = this.selectedRow.HItemID;
+ this.editTitle = "澶嶅埗鐗╂枡";
+ this.openEdit = true;
+ this.editShow = true;
+ },
+
handleEdit() {
- if (this.single) {
- this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
- return;
- }
- this.OperationType = 3;
- this.currentEditId = this.selectedRow.HItemID;
- this.editTitle = "缂栬緫鐗╂枡";
- this.openEdit = true;
- this.editShow = true;
- },
-
+ if (this.single) {
+ this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
+ return;
+ }
+ this.OperationType = 3;
+ this.currentEditId = this.selectedRow.HItemID;
+ this.editTitle = "缂栬緫鐗╂枡";
+ this.openEdit = true;
+ this.editShow = true;
+ },
+
handleDelete() {
if (this.single) {
this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
return;
}
- if (this.selectedRow.瀹℃牳浜� !== null && this.selectedRow.瀹℃牳浜� !== '') {
+ if (this.selectedRow.瀹℃牳浜� !== null && this.selectedRow.瀹℃牳浜� !== "") {
this.$modal.msgError("宸茶瀹℃牳鐨勭墿鏂欎笉鑳借鍒犻櫎!");
return;
}
@@ -1041,15 +988,17 @@
.get(this.baseURL + "/Gy_Material/Delete", {
params: {
HItemID: this.selectedRow.HItemID,
- user: this.user
- }
+ user: this.user,
+ },
})
.then((response) => {
if (response.data.count == 1) {
- this.getList();
+ this.handleQuery();
this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
} else {
- this.$modal.msgError("閿欒:" + response.data.code + response.data.Message);
+ this.$modal.msgError(
+ "閿欒:" + response.data.code + response.data.Message
+ );
}
})
.catch((error) => {
@@ -1058,7 +1007,7 @@
})
.catch(() => {});
},
-
+
handleAudit(isAudit) {
if (this.single) {
this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
@@ -1070,12 +1019,12 @@
params: {
HInterID: this.selectedRow.HItemID,
IsAudit: isAudit,
- CurUserName: this.user
- }
+ CurUserName: this.user,
+ },
})
.then((response) => {
if (response.data.count == 1) {
- this.getList();
+ this.handleQuery();
this.$modal.msgSuccess(response.data.Message);
} else {
this.$modal.msgError(response.data.Message);
@@ -1085,7 +1034,7 @@
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
+
handleStop(isStop) {
if (this.single) {
this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
@@ -1096,12 +1045,12 @@
params: {
HInterID: this.selectedRow.HItemID,
IsStop: isStop,
- CurUserName: this.user
- }
+ CurUserName: this.user,
+ },
})
.then((response) => {
if (response.data.count == 1) {
- this.getList();
+ this.handleQuery();
this.$modal.msgSuccess(response.data.Message);
} else {
this.$modal.msgError(response.data.Message);
@@ -1111,24 +1060,24 @@
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
+
handleColumnSetting() {
this.columnSettingShow = true;
this.openColumnSetting = true;
},
-
+
handleButtonSetting() {
this.$modal.msgInfo("鎸夐挳璁剧疆鍔熻兘");
},
-
+
handleSaveScheme() {
this.$modal.msgInfo("淇濆瓨鏂规鍔熻兘");
},
-
+
handleReadScheme() {
this.$modal.msgInfo("璇诲彇鏂规鍔熻兘");
},
-
+
handleRefresh() {
// 鍒锋柊鏃舵竻闄よ〃鏍奸�夋嫨骞堕噸缃浉鍏崇姸鎬侊紝淇濊瘉澶嶅埗/缂栬緫/鍒犻櫎/瀹℃牳绛夋寜閽绂佺敤
if (this.$refs.tableData && this.$refs.tableData.clearSelection) {
@@ -1138,35 +1087,34 @@
this.ids = [];
this.single = true;
this.multiple = true;
- this.getList();
+ this.handleQuery();
},
-
+
handleExit() {
this.$router.go(-1);
},
-
+
handleCorrect() {
this.openCorrect = true;
},
-
+
handleCorrect2() {
this.openCorrect2 = true;
},
-
+
// 鐗╂枡浠g爜鐐瑰嚮
handleMaterialCodeClick(row) {
- this.selectedRow = row;
- this.OperationType = 3;
- this.currentEditId = row.HItemID;
- this.editTitle = "缂栬緫鐗╂枡";
- this.openEdit = true;
- this.editShow = true;
- },
-
+ this.selectedRow = row;
+ this.OperationType = 3;
+ this.currentEditId = row.HItemID;
+ this.editTitle = "缂栬緫鐗╂枡";
+ this.openEdit = true;
+ this.editShow = true;
+ },
handleRowClick(row, column, event) {
- if(this.openPage){
- this.$emit('deptEmit', row, 3)
+ if (this.openPage) {
+ this.$emit("deptEmit", row, 3);
}
if (this.checkIsIframe()) {
// 灏嗗綋鍓嶉�変腑鐨勬暟鎹毚闇插埌window涓�
@@ -1176,39 +1124,38 @@
this.selectedRow = row;
this.getFileList(row.鐗╂枡浠g爜);
},
-
getFileList(HMaterNumber) {
if (!HMaterNumber) return;
-
+
axios
.get(this.baseURL + "/Cj_StationOutBill/Filelist", {
- params: { HBillNo: HMaterNumber }
+ params: { HBillNo: HMaterNumber },
})
.then((response) => {
if (response.data.count == 1) {
this.fileList = [];
const data = response.data.data;
-
+
if (data.length === 0) {
this.fileList.push({
- type: 'empty',
- url: '',
- name: '鏆傛棤鏂囦欢'
+ type: "empty",
+ url: "",
+ name: "鏆傛棤鏂囦欢",
});
} else {
- data.forEach(item => {
- if (item.HFileType === '.jpeg' || item.HFileType === '.jpg') {
+ data.forEach((item) => {
+ if (item.HFileType === ".jpeg" || item.HFileType === ".jpg") {
this.fileList.push({
- type: 'image',
+ type: "image",
url: `../../..${item.HFilePath}`,
- name: item.HFileName
+ name: item.HFileName,
});
- } else if (item.HFileType === '.pdf') {
+ } else if (item.HFileType === ".pdf") {
this.fileList.push({
- type: 'pdf',
+ type: "pdf",
url: `../../..${item.HFilePath}`,
- name: item.HFileName
+ name: item.HFileName,
});
}
});
@@ -1219,30 +1166,30 @@
this.$modal.msgError("鑾峰彇鏂囦欢鍒楄〃澶辫触!");
});
},
-
+
// 鍥剧墖棰勮
previewImg(url) {
this.previewImage = url;
this.previewVisible = true;
},
-
+
handlePreviewClose() {
this.previewVisible = false;
- this.previewImage = '';
+ this.previewImage = "";
},
-
+
// 琛屾牱寮�
rowStyle({ row, rowIndex }) {
if (this.ids.includes(row.hmainid)) {
- return { };
+ return {};
// background: "#ecf5ff"
}
},
-
+
// 鍙屽嚮琛�
handleDblclick(row, column, cell, event) {
- if(this.openPage){
- this.$emit('deptEmitDb', row, 3)
+ if (this.openPage) {
+ this.$emit("deptEmitDb", row, 3);
}
if (this.checkIsIframe()) {
// IFrame 鍙屽嚮 杩斿洖褰撳墠鍙屽嚮鐨勬暟鎹�
@@ -1263,41 +1210,41 @@
// this.$emit('deptEmit', this.selectedRow, 3)
// }
},
- // 缂栬緫鍏抽棴鍥炶皟
- handleEditClose() {
- this.openEdit = false;
- this.editShow = false;
- this.getList();
- },
+ // 缂栬緫鍏抽棴鍥炶皟
+ handleEditClose() {
+ this.openEdit = false;
+ this.editShow = false;
+ this.handleQuery();
+ },
// 鍏抽棴缂栬緫
closeEdit() {
this.openEdit = false;
this.editShow = false;
},
-
+
// 鍏抽棴鎵规敼
closeCorrect() {
this.openCorrect = false;
},
-
+
// 鍏抽棴鎵规敼鏂规2
closeCorrect2() {
this.openCorrect2 = false;
},
-
+
// 鍒楄缃叧闂�
columnSettingClose(val) {
this.columnSettingShow = false;
this.openColumnSetting = val;
- this.getList();
+ this.handleQuery();
},
-
+
// 瀵煎叆鐩稿叧鏂规硶
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
this.uploadTableLoading = true;
},
-
+
handleFileSuccess(response, file, fileList) {
this.upload.isUploading = true;
this.$refs.upload.clearFiles();
@@ -1314,13 +1261,13 @@
);
}
},
-
+
handleImportSubmit() {
if (this.uploadData.length === 0) {
this.$modal.msgWarning("璇峰厛涓婁紶鏂囦欢");
return;
}
-
+
var sMainSub = JSON.stringify(this.uploadData) + "&鍜�" + this.user;
axios({
method: "post",
@@ -1338,33 +1285,36 @@
{ dangerouslyUseHTMLString: true }
);
this.upload.open = false;
- this.getList();
+ this.handleQuery();
})
.catch((error) => {
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
-
+
uploadDataDelete(index) {
this.uploadData.splice(index, 1);
},
-
+
formatDate(dateString) {
- if (!dateString) return '';
+ if (!dateString) return "";
const date = new Date(dateString);
- return date.toLocaleString('zh-CN');
+ return date.toLocaleString("zh-CN");
},
-
+
judgeSkipTouchMaterType() {
- if (this.treeData.length > 0 && this.treeData[0].children &&
- this.treeData[0].children.length == 1 &&
- this.treeData[0].children[0].children.length == 0) {
+ if (
+ this.treeData.length > 0 &&
+ this.treeData[0].children &&
+ this.treeData[0].children.length == 1 &&
+ this.treeData[0].children[0].children.length == 0
+ ) {
return true;
} else {
return false;
}
},
-
+
getDefaultFilterScheme() {
this.currentFilterScheme = "褰撳墠杩囨护鏂规锛氶粯璁ゆ柟妗�";
},
@@ -1386,7 +1336,8 @@
.searchImg {
height: 60px;
- background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 24 24"><path fill="%23a0a0a0" d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>') no-repeat center;
+ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 24 24"><path fill="%23a0a0a0" d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>')
+ no-repeat center;
margin-top: 10px;
}
@@ -1427,4 +1378,4 @@
.filter-collapse {
margin-top: 10px;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/gyMaterial/GyMaterialCorrection.vue b/src/views/gyMaterial/GyMaterialCorrection.vue
index 2b20ba1..54b777f 100644
--- a/src/views/gyMaterial/GyMaterialCorrection.vue
+++ b/src/views/gyMaterial/GyMaterialCorrection.vue
@@ -15,15 +15,15 @@
<el-card class="search-card">
<div slot="header" class="clearfix">
<span>鏌ヨ鏉′欢</span>
- <el-button
- style="float: right; padding: 3px 0"
+ <el-button
+ style="float: right; padding: 3px 0"
type="text"
@click="toggleSearchMore"
>
{{ searchMore ? '鏀惰捣' : '鏇村' }}
</el-button>
</div>
-
+
<el-form :model="queryParams" ref="queryForm" label-width="80px">
<el-row :gutter="20">
<el-col :span="6">
@@ -126,7 +126,7 @@
</el-col>
</el-row>
</div>
-
+
<el-button
type="primary"
icon="el-icon-plus"
@@ -175,7 +175,7 @@
</el-button>
</div>
</div>
-
+
<div class="table-container">
<el-table
ref="mainTable"
@@ -204,7 +204,7 @@
</template>
</el-table-column>
</el-table>
-
+
<!-- 鍒嗛〉 -->
<div class="pagination-container">
<el-pagination
@@ -245,7 +245,7 @@
</el-button>
</div>
</div>
-
+
<div class="table-container">
<el-table
ref="tempTable"
@@ -270,7 +270,7 @@
size="mini"
@change="handleCellEdit(row, column.field, $index)"
/>
-
+
<!-- 涓嬫媺閫夋嫨妗� - 鐗╂枡灞炴�� -->
<el-select
v-else-if="column.field === '鐗╂枡灞炴��'"
@@ -283,7 +283,7 @@
<el-option value="鑷埗" label="鑷埗"></el-option>
<el-option value="濮斿" label="濮斿"></el-option>
</el-select>
-
+
<!-- 涓嬫媺閫夋嫨妗� - 浜嬩笟閮� -->
<el-select
v-else-if="column.field === '浜嬩笟閮�'"
@@ -296,7 +296,7 @@
<el-option value="杞浜嬩笟閮�" label="杞浜嬩笟閮�"></el-option>
<el-option value="鍏朵粬浜嬩笟閮�" label="鍏朵粬浜嬩笟閮�"></el-option>
</el-select>
-
+
<!-- 涓嶅彲缂栬緫瀛楁 -->
<span v-else>{{ row[column.field] }}</span>
</template>
@@ -347,34 +347,34 @@
loading: false,
tempLoading: false,
columnSettingVisible: false,
-
+
// 鏌ヨ鍙傛暟
queryParams: {
HNumber: '',
HName: '',
HOrgID: ''
},
-
+
// 杩囨护鏉′欢
filterConditions: [
{ colName: '0', comparator: '0', colContent: '' }
],
-
+
// 缁勭粐閫夐」
organizationOptions: [],
-
+
// 琛ㄦ牸鏁版嵁
tableData: [],
tempTableData: [],
selectedRows: [],
-
+
// 鍒嗛〉
pagination: {
page: 1,
size: 50,
total: 0
},
-
+
// 鍒楅厤缃�
allColumns: [],
mainTableColumns: [],
@@ -384,8 +384,8 @@
openColumnSetting: false,
// 妯″潡鍚嶇О
HModName: 'Gy_Material_Correction',
-
- baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/',
+
+ baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/',
user: 'admin'
}
},
@@ -414,7 +414,7 @@
await this.getOrganizations()
await this.getTableData()
},
-
+
// 鑾峰彇缁勭粐鍒楄〃
async getOrganizations() {
try {
@@ -429,9 +429,9 @@
this.$modal.msgError('鑾峰彇缁勭粐鍒楄〃澶辫触!')
}
},
-
-
-
+
+
+
// 璁剧疆榛樿鍒�
setDefaultColumns() {
this.allColumns = [
@@ -459,20 +459,20 @@
{ field: '鍒涘缓浜�', title: '鍒涘缓浜�', width: 100 },
{ field: '鍒涘缓鏃堕棿', title: '鍒涘缓鏃堕棿', width: 150 }
]
-
+
this.mainTableColumns = this.allColumns.filter(col => !col.hide)
this.tempTableColumns = this.mainTableColumns.map(col => ({
...col,
editable: this.isEditableColumn(col.field)
}))
},
-
+
// 鑾峰彇琛ㄦ牸鏁版嵁
async getTableData() {
this.loading = true
try {
const sWhere = this.buildWhereCondition()
-
+
const response = await axios.get(`${this.baseURL}/Gy_Material/page`, {
params: {
sWhere: sWhere,
@@ -482,7 +482,7 @@
Organization: ''
}
})
-
+
if (response.data.code === 1) {
this.tableData = response.data.data
this.pagination.total = response.data.count
@@ -495,11 +495,11 @@
this.loading = false
}
},
-
+
// 鏋勫缓鏌ヨ鏉′欢
buildWhereCondition() {
let sWhere = ''
-
+
// 鍩烘湰鏌ヨ鏉′欢
if (this.queryParams.HNumber) {
sWhere += ` and 鐗╂枡浠g爜 like '%${this.queryParams.HNumber}%'`
@@ -510,7 +510,7 @@
if (this.queryParams.HOrgID) {
sWhere += ` and HUSEORGID = '${this.queryParams.HOrgID}'`
}
-
+
// 杩囨护鏉′欢
this.filterConditions.forEach(filter => {
if (filter.colName && filter.colName !== '0' && filter.comparator && filter.comparator !== '0') {
@@ -534,16 +534,16 @@
sWhere += ` and ${filter.colName} ${condition}`
}
})
-
+
return sWhere
},
-
+
// 鏌ヨ
handleSearch() {
this.pagination.page = 1
this.getTableData()
},
-
+
handleColumnSetting() {
this.columnSettingShow = true;
this.openColumnSetting = true;
@@ -568,7 +568,7 @@
this.pagination.page = 1
this.getTableData()
},
-
+
// 娣诲姞杩囨护鏉′欢
addFilter() {
this.filterConditions.push({
@@ -577,50 +577,50 @@
colContent: ''
})
},
-
+
// 鍒犻櫎杩囨护鏉′欢
removeFilter(index) {
this.filterConditions.splice(index, 1)
},
-
+
// 鍒囨崲鏇村鎼滅储鏉′欢
toggleSearchMore() {
this.searchMore = !this.searchMore
},
-
+
// 閫夋嫨琛屽彉鍖�
handleSelectionChange(selection) {
this.selectedRows = selection
},
-
+
// 鏁版嵁纭 - 灏嗛�変腑鐨勬暟鎹鍒跺埌涓存椂琛ㄦ牸
handleDataConfirm() {
if (this.selectedRows.length === 0) {
this.$modal.msgWarning('璇峰厛閫夋嫨瑕佹壒鏀圭殑鏁版嵁!')
return
}
-
+
// 娣辨嫹璐濋�変腑鐨勬暟鎹埌涓存椂琛ㄦ牸
this.tempTableData = JSON.parse(JSON.stringify(this.selectedRows))
-
+
// 閿佸畾涓昏〃鏍间腑宸查�変腑鐨勮锛堥�氳繃CSS绫诲悕锛�
this.$nextTick(() => {
this.$refs.mainTable.clearSelection()
})
-
+
this.$modal.msgSuccess(`宸茬‘璁� ${this.selectedRows.length} 鏉℃暟鎹紝璇峰湪鍙充晶琛ㄦ牸涓繘琛屾壒鏀筦)
},
-
+
// 淇濆瓨鎵规敼鏁版嵁
async handleSave() {
if (this.tempTableData.length === 0) {
this.$modal.msgWarning('娌℃湁闇�瑕佷繚瀛樼殑鏁版嵁!')
return
}
-
+
try {
this.tempLoading = true
-
+
// 杞崲鏁版嵁鏍煎紡
const saveData = this.tempTableData.map(item => ({
HOnceRightRate: item['涓�娆″悎鏍肩巼鏍囧噯鍊�'],
@@ -643,7 +643,7 @@
// 鍏朵粬闇�瑕佷繚瀛樼殑瀛楁...
HItemID: item.HItemID
}))
-
+
// 鏁版嵁楠岃瘉
for (const item of saveData) {
if (!item.HNumber) {
@@ -654,12 +654,12 @@
}
// 鍏朵粬楠岃瘉瑙勫垯...
}
-
+
const dataStr = JSON.stringify(saveData)
const response = await axios.post(`${this.baseURL}/Gy_Material/SaveGy_MaterialList_Batch`, {
msg: dataStr + ';' + this.user + ';' + this.queryParams.HOrgID
})
-
+
if (response.data.count === 1) {
this.$modal.msgSuccess('淇濆瓨鎴愬姛!')
this.tempTableData = []
@@ -673,14 +673,14 @@
this.tempLoading = false
}
},
-
+
// 鍒犻櫎鏁版嵁
async handleDelete() {
if (this.selectedRows.length === 0) {
this.$modal.msgWarning('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁!')
return
}
-
+
try {
await this.$confirm('纭瑕佸垹闄ら�変腑鐨勬暟鎹悧锛�', '鎻愮ず', {
type: 'warning'
@@ -693,7 +693,7 @@
}
})
}
-
+
this.$modal.msgSuccess('鍒犻櫎鎴愬姛!')
this.getTableData()
this.selectedRows = []
@@ -703,13 +703,13 @@
}
}
},
-
+
// 鍗曞厓鏍肩紪杈�
handleCellEdit(row, field, index) {
// 鍙互鍦ㄨ繖閲屾坊鍔犵紪杈戦獙璇侀�昏緫
console.log(`缂栬緫绗�${index + 1}琛岋紝瀛楁: ${field}, 鍊�: ${row[field]}`)
},
-
+
// 涓嬫媺閫夋嫨鍙樺寲
handleSelectChange(field) {
// 鎵归噺鏇存柊鐩稿悓瀛楁鐨勫��
@@ -717,12 +717,12 @@
// 杩欓噷鍙互鏍规嵁涓氬姟闇�姹傚喅瀹氭槸鍚﹀悓姝ユ洿鏂版墍鏈夎鐨勭浉鍚屽瓧娈�
})
},
-
+
// 鍒楄缃�
handleColumnSetting() {
this.columnSettingVisible = true
},
-
+
// 淇濆瓨鍒楄缃�
handleColumnSave(columns) {
this.allColumns = columns
@@ -735,7 +735,7 @@
},
-
+
// 閫�鍑�
handleExit() {
if (this.tempTableData.length > 0) {
@@ -748,26 +748,26 @@
this.handleClose()
}
},
-
+
// 鍏抽棴瀵硅瘽妗�
handleClose() {
this.openCorrect = false
this.$emit('close')
},
-
+
// 鍒嗛〉澶у皬鍙樺寲
handleSizeChange(size) {
this.pagination.size = size
this.pagination.page = 1
this.getTableData()
},
-
+
// 褰撳墠椤靛彉鍖�
handleCurrentChange(page) {
this.pagination.page = page
this.getTableData()
},
-
+
// 宸ュ叿鏂规硶
isEditableColumn(field) {
const nonEditableFields = [
@@ -775,25 +775,25 @@
]
return !nonEditableFields.includes(field)
},
-
+
isSelectColumn(field) {
return ['鐗╂枡灞炴��', '浜嬩笟閮�'].includes(field)
},
-
+
isDateColumn(field) {
return field.includes('鏃堕棿') || field.includes('鏃ユ湡')
},
-
+
formatDate(dateString) {
if (!dateString) return ''
const date = new Date(dateString)
return date.toLocaleString('zh-CN')
},
-
+
getRowClassName({ row }) {
return this.selectedRows.some(selected => selected.HItemID === row.HItemID) ? 'locked-row' : ''
},
-
+
divisionJudgment(divisionStr) {
switch (divisionStr) {
case '娉ㄥ浜嬩笟閮�': return 3
@@ -801,7 +801,7 @@
default: return 0
}
},
-
+
materClsJudgment(materClsStr) {
switch (materClsStr) {
case '澶栬喘': return '1'
@@ -910,4 +910,4 @@
::v-deep .temp-table .el-select {
width: 100%;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/gyMaterial/edit/index.vue b/src/views/gyMaterial/edit/index.vue
index 70dc005..e82e545 100644
--- a/src/views/gyMaterial/edit/index.vue
+++ b/src/views/gyMaterial/edit/index.vue
@@ -729,7 +729,7 @@
canCopy: false,
qcSchemeType: 'fst', // fst, proc, patrol
- baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/",
+ baseURL: process.env.VUE_APP_BASE_API,
user: "admin"
};
},
diff --git a/src/views/gyStockPlace/edit/index.vue b/src/views/gyStockPlace/edit/index.vue
index 4a806cf..5e98170 100644
--- a/src/views/gyStockPlace/edit/index.vue
+++ b/src/views/gyStockPlace/edit/index.vue
@@ -139,7 +139,7 @@
CheckBillDisabled: true,
// OperationType: this.$route.query.OperationType,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
HInterID: null,
- baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/",
+ baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
user: "admin",
currentRow: [],
lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
diff --git a/src/views/gyWarehouse/edit/index.vue b/src/views/gyWarehouse/edit/index.vue
index a49f3c7..cc6803e 100644
--- a/src/views/gyWarehouse/edit/index.vue
+++ b/src/views/gyWarehouse/edit/index.vue
@@ -243,7 +243,7 @@
CheckBillDisabled: true,
// OperationType: this.$route.query.OperationType,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
HInterID: null,
- baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/",
+ baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
user: "admin",
currentRow: [],
lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
diff --git a/src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue b/src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue
index 0a80611..bead72d 100644
--- a/src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue
+++ b/src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue
@@ -51,7 +51,7 @@
<el-col :span="6">
<el-form-item label="閫夊崟鍙�" prop="HSourceBillNo">
<el-input v-model="form.HSourceBillNo" placeholder="璇疯緭鍏ラ�夊崟鍙�" disabled>
- <el-button slot="append" icon="el-icon-search" @click="openDataDialog(openNum)"></el-button>
+ <el-button class="input-search-btn" slot="append" icon="el-icon-search" @click="openDataDialog(null)"></el-button>
</el-input>
</el-form-item>
</el-col>
@@ -93,6 +93,22 @@
show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.HMaterModel }}</template>
</el-table-column>
+
+ <el-table-column align="center" label="鏁伴噺" prop="HQty" width="120" show-overflow-tooltip>
+ <template slot-scope="scope">
+ <el-input-number v-model="scope.row.HQty" :min="0" controls-position="right"
+ style="width: 100%;" @change="editMainTable(scope.row)" />
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="鏈�灏忓寘瑁呮暟" prop="HMinQty" width="120" show-overflow-tooltip>
+ <template slot-scope="scope">
+ <el-input-number v-model="scope.row.HMinQty" :min="0" controls-position="right"
+ style="width: 100%;" @change="editMainTable(scope.row)" />
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="绠辨暟" prop="HBQty" width="120" show-overflow-tooltip>
+ <template slot-scope="scope">{{ scope.row.HBQty }}</template>
+ </el-table-column>
<el-table-column align="center" label="瀹㈡埛瑙勬牸鍨嬪彿" prop="HCusModel" width="120"
show-overflow-tooltip>
<template slot-scope="scope"><el-input v-model="scope.row.HCusModel" /></template>
@@ -126,21 +142,7 @@
<el-table-column align="center" label="璁″垝璺熻釜鍙�" prop="HMTONo" width="120" show-overflow-tooltip>
<template slot-scope="scope"><el-input v-model="scope.row.HMTONo" /></template>
</el-table-column>
- <el-table-column align="center" label="鏁伴噺" prop="HQty" width="120" show-overflow-tooltip>
- <template slot-scope="scope">
- <el-input-number v-model="scope.row.HQty" :min="0" controls-position="right"
- style="width: 100%;" @change="editMainTable(scope.row)" />
- </template>
- </el-table-column>
- <el-table-column align="center" label="鏈�灏忓寘瑁呮暟" prop="HMinQty" width="120" show-overflow-tooltip>
- <template slot-scope="scope">
- <el-input-number v-model="scope.row.HMinQty" :min="0" controls-position="right"
- style="width: 100%;" @change="editMainTable(scope.row)" />
- </template>
- </el-table-column>
- <el-table-column align="center" label="绠辨暟" prop="HBQty" width="120" show-overflow-tooltip>
- <template slot-scope="scope">{{ scope.row.HBQty }}</template>
- </el-table-column>
+
<el-table-column align="center" label="澶栫鏁�" prop="HPackQty" width="120" show-overflow-tooltip>
<template slot-scope="scope"><el-input v-model="scope.row.HPackQty" /></template>
</el-table-column>
@@ -186,7 +188,11 @@
</el-table-column>
<el-table-column align="center" label="杈呭姪灞炴�т唬鐮�" prop="HAuxPropNumber" width="120"
show-overflow-tooltip>
- <template slot-scope="scope"><el-input v-model="scope.row.HAuxPropNumber" /></template>
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.HAuxPropNumber"
+ @keyup.native.f7="openDataDialog(1, scope.row)"
+ @dblclick.native="openDataDialog(1, scope.row)" />
+ </template>
</el-table-column>
<el-table-column align="center" label="杈呭姪灞炴�у悕绉�" prop="HAuxPropName" width="120"
show-overflow-tooltip>
@@ -254,13 +260,20 @@
<el-dialog :title="dialogTitle" :visible.sync="openData" width="1280px" append-to-body @close="closeBill">
<HSourceReportHtml @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName"
:HOrgID='this.form.HOrgID' :HSouceBillType="HSouceBillType" v-if="ScICMOBillShow" />
+
+ <GyProperty
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="propertyShow"
+ />
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="deptClickSub">纭� 瀹�</el-button>
<el-button @click="deptClose">鍙� 娑�</el-button>
</div>
</el-dialog>
<el-dialog title="鎵撳嵃妯℃澘閫夋嫨" :visible.sync="openPrintList" width="800px" append-to-body>
- <PrintList :linterid="rowSel.toString()" :MyMsg="rowSel.toString()" Type="HGy_BarCodeBill"
+ <PrintList :linterid="rowSel.toString()" :MyMsg="rowSel.toString()" Type="HGy_BarCodeBill"
HModName="HGy_BarCodeBill" @rowEditClose="rowSetClose" v-if="printListShow" />
<!-- <div>111</div> -->
</el-dialog>
@@ -271,10 +284,11 @@
import HSourceReportHtml from '@/views/component/HSourceReportHtml'
import PrintList from "@/views/component/printList";
import moment from 'moment';
+import GyProperty from "@/views/basic/gyProperty/gyPropertyList.vue";
export default {
name: 'Gy_BarCodeBill',
- components: { HSourceReportHtml, PrintList },
+ components: { HSourceReportHtml, PrintList, GyProperty },
props: {
OperationType: { type: Number, },
linterid: { type: Number, },
@@ -449,6 +463,7 @@
materialShow: false,//鐗╂枡鏁版嵁缁勪欢
gyEmployeeShow: false,//閿�鍞憳鏁版嵁缁勪欢
ScICMOBillShow: false,
+ propertyShow: false,
deptform: {},//寮圭獥閫変腑鏁版嵁
openData: false,//鏁版嵁寮圭獥
dialogTitle: '',
@@ -768,6 +783,17 @@
},
//寮圭獥璧嬪��
dbEmitData(deptRow, num) {
+ if(num) {
+ if(num == 'gyProperty') {
+ this.editWlxxData[this.zbIndex].HAuxPropID = deptRow.HItemID;
+ this.editWlxxData[this.zbIndex]["HAuxPropName"] = deptRow["杈呭姪灞炴�у悕绉�"];
+ this.editWlxxData[this.zbIndex]["HAuxPropNumber"] = deptRow["杈呭姪灞炴�т唬鐮�"];
+ this.propertyShow = false;
+ this.openData = false;
+ }
+
+ return
+ }
console.log(deptRow)
if (deptRow.length > 0) {
this.zbDataShow = false
@@ -1039,8 +1065,9 @@
, 'HPOOrderInterID': result.data[i].閲囪喘璁㈠崟鍐呯爜
, 'HPOOrderEntryID': result.data[i].閲囪喘璁㈠崟瀛愬唴鐮�
, 'HPOOrderBillNo': result.data[i].閲囪喘璁㈠崟鍙�
- , 'HPropertyID': result.data[i].HPropertyID
- , 'HPropertyName': result.data[i].杈呭姪灞炴��
+ , 'HAuxPropID': result.data[i].HPropertyID
+ , 'HAuxPropName': result.data[i].杈呭姪灞炴��
+ , 'HAuxPropNumber': result.data[i].杈呭姪灞炴�т唬鐮�
, 'HSecUnitID': result.data[i].HSecUnitID
, 'HSecUnitName': result.data[i].杈呭姪璁¢噺鍗曚綅
, 'HSecUnitRate': result.data[i].鎹㈢畻鐜�
@@ -1193,13 +1220,29 @@
if (row) {
this.zbIndex = row.index - 1
}
- this.showReset()
- this.HSouceBillType = this.getSupType()
- this.dialogTitle = this.getSupType() + '鍒楄〃'
- this.ScICMOBillShow = true
- this.openData = true
+ if(num) {
+ switch(num) {
+ case 1:
+ this.dialogTitle = '杈呭姪灞炴�у垪琛�'
+ this.propertyShow = true
+ this.openData = true
+ ;break;
+ }
+ }else {
+ this.showReset()
+ this.HSouceBillType = this.getSupType()
+ this.dialogTitle = this.getSupType() + '鍒楄〃'
+ this.ScICMOBillShow = true
+ this.openData = true
+ }
},
}
};
-</script>
\ No newline at end of file
+</script>
+<style>
+ .input-search-btn {
+ background-color: rgb(24, 144, 255) !important;
+ color: #fff !important;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/warehouse/transfer/Kf_MoveStockRequestBillEdit.vue b/src/views/warehouse/transfer/Kf_MoveStockRequestBillEdit.vue
index 984378d..7a2d3d4 100644
--- a/src/views/warehouse/transfer/Kf_MoveStockRequestBillEdit.vue
+++ b/src/views/warehouse/transfer/Kf_MoveStockRequestBillEdit.vue
@@ -1,13 +1,17 @@
<template>
<div v-loading="formLoading" v-if="formShow">
- <div style=" margin-bottom: 10px; border-bottom: 1px solid #f6f6f6;">
+ <div style="margin-bottom: 10px; border-bottom: 1px solid #f6f6f6">
<!-- <el-button type="primary" @click="handleAdd(OperationType = 1)" v-if="addBtnShow">鏂板</el-button> -->
- <el-button type="primary" @click="submitForm" :disabled="subDisabled">淇� 瀛�</el-button>
+ <el-button type="primary" @click="submitForm" :disabled="subDisabled"
+ >淇� 瀛�</el-button
+ >
<!-- <el-button type="primary" @click="set_CheckBill(1, form)">瀹� 鏍�</el-button> -->
<el-button type="primary" @click="close">閫� 鍑�</el-button>
<!-- <el-button @click="cancel">鍙� 娑�</el-button> -->
</div>
- <div style="margin: 10px; font-size: 28px; font-weight: bold; text-align: center;">璋冩嫧鐢宠鍗�</div>
+ <div style="margin: 10px; font-size: 28px; font-weight: bold; text-align: center">
+ 璋冩嫧鐢宠鍗�
+ </div>
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="鍩烘湰淇℃伅" name="first">
@@ -19,19 +23,28 @@
</el-col>
<el-col :span="6">
<el-form-item label="鏃ユ湡" prop="HDate">
- <el-date-picker v-model="form.HDate" type="date" placeholder="閫夋嫨鏃ユ湡" value-format="yyyy-MM-ddT">
+ <el-date-picker
+ v-model="form.HDate"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ value-format="yyyy-MM-ddT"
+ >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="杈呭姪瀛楁" prop="HInnerBillNo">
- <el-input v-model="form.HInnerBillNo" placeholder="" disabled/>
+ <el-input v-model="form.HInnerBillNo" placeholder="" disabled />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="寰�鏉ュ崟浣�" prop="HSupName">
<el-input v-model="form.HSupName" placeholder="璇烽�夋嫨寰�鏉ュ崟浣�" disabled>
- <el-button slot="append" icon="el-icon-search" @click="openDataDialog(6)"></el-button>
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="openDataDialog(6)"
+ ></el-button>
</el-input>
</el-form-item>
</el-col>
@@ -40,28 +53,44 @@
<el-col :span="6">
<el-form-item label="涓氬姟鍛�" prop="HEmpName">
<el-input v-model="form.HEmpName" placeholder="璇烽�夋嫨" disabled>
- <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4,empType=1)"></el-button>
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="openDataDialog(4, (empType = 1))"
+ ></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="涓荤" prop="HMangerName">
<el-input v-model="form.HMangerName" placeholder="璇烽�夋嫨" disabled>
- <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4,empType=2)"></el-button>
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="openDataDialog(4, (empType = 2))"
+ ></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="楠屾敹鍛�" prop="HSecManagerName">
<el-input v-model="form.HSecManagerName" placeholder="璇烽�夋嫨" disabled>
- <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4,empType=3)"></el-button>
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="openDataDialog(4, (empType = 3))"
+ ></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="淇濈鍛�" prop="HKeeperName">
<el-input v-model="form.HKeeperName" placeholder="璇烽�夋嫨" disabled>
- <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4,empType=4)"></el-button>
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="openDataDialog(4, (empType = 4))"
+ ></el-button>
</el-input>
</el-form-item>
</el-col>
@@ -70,27 +99,67 @@
<el-col :span="6">
<el-form-item label="璋冨叆浠撳簱" prop="HWHName">
<el-input v-model="form.HWHName" placeholder="璇烽�夋嫨璋冨叆浠撳簱" disabled>
- <el-button slot="append" icon="el-icon-search" @click="openDataDialog(2,eHWHType=1)"></el-button>
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="openDataDialog(2, (eHWHType = 1))"
+ ></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="璋冨嚭浠撳簱" prop="HSCWHName">
<el-input v-model="form.HSCWHName" placeholder="璇烽�夋嫨璋冨嚭浠撳簱" disabled>
- <el-button slot="append" icon="el-icon-search" @click="openDataDialog(2,eHWHType=2)"></el-button>
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="openDataDialog(2, (eHWHType = 2))"
+ ></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="閮ㄩ棬" prop="HDeptName">
<el-input v-model="form.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" disabled>
- <el-button slot="append" icon="el-icon-search" @click="openDataDialog(1)"></el-button>
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="openDataDialog(1)"
+ ></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="澶囨敞" prop="HRemark">
<el-input v-model="form.HRemark" placeholder="璇疯緭鍏ュ娉�" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="璋冨叆缁勭粐" prop="HSTOCKINORGID" >
+ <el-select v-model="form.HSTOCKINORGID" placeholder="璇烽�夋嫨璋冨叆缁勭粐" :disabled="OperationType == 3" @change="StockInOrgChangeHandler">
+ <el-option
+ v-for="(item, index) in organizationList"
+ :key="index"
+ :label="item.Name"
+ :value="item.ID.toString()"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="璋冨嚭缁勭粐" prop="HSTOCKOUTORGID">
+ <el-select v-model="form.HSTOCKOUTORGID" placeholder="璇烽�夋嫨璋冨叆缁勭粐" :disabled="OperationType == 3">
+ <el-option
+ v-for="(item, index) in organizationList"
+ :key="index"
+ :label="item.Name"
+ :value="item.ID.toString()"
+ >
+ </el-option>
+ </el-select>
</el-form-item>
</el-col>
</el-row>
@@ -121,25 +190,45 @@
<el-row>
<el-col :span="6">
<el-form-item label="鍒跺崟鏃ユ湡" prop="HMakeDate">
- <el-date-picker v-model="form.HMakeDate" type="date" placeholder="閫夋嫨鍒跺崟鏃ユ湡" disabled>
+ <el-date-picker
+ v-model="form.HMakeDate"
+ type="date"
+ placeholder="閫夋嫨鍒跺崟鏃ユ湡"
+ disabled
+ >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="淇敼鏃ユ湡" prop="HUpDateDate">
- <el-date-picker v-model="form.HUpDateDate" type="date" placeholder="閫夋嫨瀹℃牳鏃ユ湡" disabled>
+ <el-date-picker
+ v-model="form.HUpDateDate"
+ type="date"
+ placeholder="閫夋嫨瀹℃牳鏃ユ湡"
+ disabled
+ >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="瀹℃牳鏃ユ湡" prop="HCheckDate">
- <el-date-picker v-model="form.HCheckDate" type="date" placeholder="閫夋嫨瀹℃牳鏃ユ湡" disabled>
+ <el-date-picker
+ v-model="form.HCheckDate"
+ type="date"
+ placeholder="閫夋嫨瀹℃牳鏃ユ湡"
+ disabled
+ >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="鍏抽棴鏃ユ湡" prop="HCloseDate">
- <el-date-picker v-model="form.HCloseDate" type="date" placeholder="閫夋嫨鍏抽棴鏃ユ湡" disabled>
+ <el-date-picker
+ v-model="form.HCloseDate"
+ type="date"
+ placeholder="閫夋嫨鍏抽棴鏃ユ湡"
+ disabled
+ >
</el-date-picker>
</el-form-item>
</el-col>
@@ -154,7 +243,12 @@
<el-row>
<el-col :span="6">
<el-form-item label="浣滃簾鏃ユ湡" prop="HDeleteDate">
- <el-date-picker v-model="form.HDeleteDate" type="date" placeholder="閫夋嫨浣滃簾鏃ユ湡" disabled>
+ <el-date-picker
+ v-model="form.HDeleteDate"
+ type="date"
+ placeholder="閫夋嫨浣滃簾鏃ユ湡"
+ disabled
+ >
</el-date-picker>
</el-form-item>
</el-col>
@@ -164,24 +258,69 @@
<el-tabs v-model="activeName1" type="border-card">
<el-tab-pane label="鏄庣粏淇℃伅" name="first">
- <div style="margin-bottom: 10px;">
- <el-button type="success" plain icon="el-icon-plus" @click="handleAddSysZb()" size="mini">澧炲姞涓�琛�</el-button>
- <el-button type="success" plain icon="el-icon-plus" @click="handleAddSysZb(zbIndex, 1)"
- size="mini">鎻掑叆涓�琛�</el-button>
- <el-button type="success" plain icon="el-icon-plus" @click="handleCopyZbRow" size="mini">澶嶅埗涓�琛�</el-button>
- <el-button type="success" plain icon="el-icon-arrow-up" @click="handleMoveRowUp(zbSelForm)"
- size="mini">涓婄Щ</el-button>
- <el-button type="success" plain icon="el-icon-arrow-down" @click="handleMoveRowDown(zbSelForm)"
- size="mini">涓嬬Щ</el-button>
+ <div style="margin-bottom: 10px">
+ <el-button
+ type="success"
+ plain
+ icon="el-icon-plus"
+ @click="handleAddSysZb()"
+ size="mini"
+ >澧炲姞涓�琛�</el-button
+ >
+ <el-button
+ type="success"
+ plain
+ icon="el-icon-plus"
+ @click="handleAddSysZb(zbIndex, 1)"
+ size="mini"
+ >鎻掑叆涓�琛�</el-button
+ >
+ <el-button
+ type="success"
+ plain
+ icon="el-icon-plus"
+ @click="handleCopyZbRow"
+ size="mini"
+ >澶嶅埗涓�琛�</el-button
+ >
+ <el-button
+ type="success"
+ plain
+ icon="el-icon-arrow-up"
+ @click="handleMoveRowUp(zbSelForm)"
+ size="mini"
+ >涓婄Щ</el-button
+ >
+ <el-button
+ type="success"
+ plain
+ icon="el-icon-arrow-down"
+ @click="handleMoveRowDown(zbSelForm)"
+ size="mini"
+ >涓嬬Щ</el-button
+ >
</div>
- <el-table :data="editData" style="width: 100%" height="300" width="100%" ref="zbTable"
- @selection-change="handleTableZbEdit" :row-class-name="rowSysZbIndex" show-summary border>
+ <el-table
+ :data="editData"
+ style="width: 100%"
+ height="300"
+ width="100%"
+ ref="zbTable"
+ @selection-change="handleTableZbEdit"
+ :row-class-name="rowSysZbIndex"
+ show-summary
+ border
+ >
<el-table-column type="selection" width="55" align="center" />
<el-table-column align="center" label="搴忓彿" type="index" width="80" />
<el-table-column align="center" label="鐗╂枡浠g爜" width="120">
<template slot-scope="scope">
- <el-input v-model="scope.row.HMaterID" placeholder="璇疯緭鍏�" @keyup.native.f7="openDataDialog(3, scope.row)"
- @dblclick.native="openDataDialog(3, scope.row)" />
+ <el-input
+ v-model="scope.row.鐗╂枡浠g爜"
+ placeholder="璇疯緭鍏�"
+ @keyup.native.f7="openDataDialog(3, scope.row)"
+ @dblclick.native="openDataDialog(3, scope.row)"
+ />
</template>
</el-table-column>
<el-table-column align="center" label="鐗╂枡鍚嶇О" width="120">
@@ -197,6 +336,16 @@
<el-table-column align="center" label="璁¢噺鍗曚綅" width="120">
<template slot-scope="scope">
<span>{{ scope.row.璁¢噺鍗曚綅 }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="杈呭姪灞炴��" width="120">
+ <template slot-scope="scope">
+ <el-input
+ v-model="scope.row.杈呭姪灞炴��"
+ placeholder="璇疯緭鍏�"
+ @keyup.native.f7="openDataDialog(7, scope.row)"
+ @dblclick.native="openDataDialog(7, scope.row)"
+ />
</template>
</el-table-column>
<el-table-column align="center" label="鎹㈢畻鐜�" width="120">
@@ -216,8 +365,12 @@
</el-table-column>
<el-table-column align="center" label="瀹炴敹鏁伴噺" width="120">
<template slot-scope="scope">
- <el-input-number v-model="scope.row.HQty" :min="1" style="width: 90px;"
- controls-position="right"></el-input-number>
+ <el-input-number
+ v-model="scope.row.HQty"
+ :min="1"
+ style="width: 90px"
+ controls-position="right"
+ ></el-input-number>
</template>
</el-table-column>
<el-table-column align="center" label="鍗曚环" width="120">
@@ -242,14 +395,22 @@
</el-table-column>
<el-table-column align="center" label="璋冨叆浠撳簱" width="120">
<template slot-scope="scope">
- <el-input v-model="scope.row.璋冨叆浠撳簱" placeholder="璇疯緭鍏�" @keyup.native.f7="openDataDialog(2, scope.row ,eHWHType=3)"
- @dblclick.native="openDataDialog(2, scope.row ,eHWHType=3)" />
+ <el-input
+ v-model="scope.row.璋冨叆浠撳簱"
+ placeholder="璇疯緭鍏�"
+ @keyup.native.f7="openDataDialog(2, scope.row, (eHWHType = 3))"
+ @dblclick.native="openDataDialog(2, scope.row, (eHWHType = 3))"
+ />
</template>
</el-table-column>
<el-table-column align="center" label="璋冨嚭浠撳簱" width="120">
<template slot-scope="scope">
- <el-input v-model="scope.row.璋冨嚭浠撳簱" placeholder="璇疯緭鍏�" @keyup.native.f7="openDataDialog(2, scope.row ,eHWHType=4)"
- @dblclick.native="openDataDialog(2, scope.row ,eHWHType=4)" />
+ <el-input
+ v-model="scope.row.璋冨嚭浠撳簱"
+ placeholder="璇疯緭鍏�"
+ @keyup.native.f7="openDataDialog(2, scope.row, (eHWHType = 4))"
+ @dblclick.native="openDataDialog(2, scope.row, (eHWHType = 4))"
+ />
</template>
</el-table-column>
<el-table-column align="center" label="鍩烘湰璁¢噺鍗曚綅" width="120">
@@ -267,54 +428,118 @@
<el-input v-model="scope.row.HRemark" placeholder="璇疯緭鍏ュ娉�" />
</template>
</el-table-column>
+ <el-table-column align="center" label="缁勭粐" width="120">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.HSTOCKORGID" disabled />
+ </template>
+ </el-table-column>
<el-table-column align="center" label="鎿嶄綔" width="55" fixed="right">
<template slot-scope="scope">
- <el-button type="danger" icon="el-icon-delete" size="mini" circle
- @click="handleDeleteSysZb(scope.row)"></el-button>
+ <el-button
+ type="danger"
+ icon="el-icon-delete"
+ size="mini"
+ circle
+ @click="handleDeleteSysZb(scope.row)"
+ ></el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
-
</el-form>
<!-- 寮圭獥 -->
- <el-dialog :title="dialogTitle" :visible.sync="openData" width="1280px" append-to-body>
- <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="deptShow" />
- <Warehouse @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="warehouseShow" />
- <GyEmployee @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyEmployeeShow" />
- <GySupplier @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gySupplierShow" />
- <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="materialShow" />
+ <el-dialog
+ :title="dialogTitle"
+ :visible.sync="openData"
+ width="1280px"
+ append-to-body
+ >
+ <Dept
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="deptShow"
+ />
+ <Warehouse
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="warehouseShow"
+ />
+ <GyEmployee
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="gyEmployeeShow"
+ />
+ <GySupplier
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="gySupplierShow"
+ />
+ <Material
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="materialShow"
+ />
+ <GyProperty
+ @deptEmitDb="dbEmitData"
+ @deptEmit="emitData"
+ :openPage="HModName"
+ v-if="propertyShow"
+ />
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="deptClickSub">纭� 瀹�</el-button>
<el-button @click="deptClose">鍙� 娑�</el-button>
</div>
</el-dialog>
- <el-dialog title="闅愯棌鍒楄缃�" :visible.sync="openRowHide" width="816px" append-to-body>
- <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" />
+ <el-dialog
+ title="闅愯棌鍒楄缃�"
+ :visible.sync="openRowHide"
+ width="816px"
+ append-to-body
+ >
+ <RowSettings
+ :colName="btResList"
+ :HModName="HModName"
+ @rowEditClose="rowSetClose"
+ v-if="rowHideShow"
+ />
</el-dialog>
</div>
</template>
<script>
-import axios from 'axios'
-import RowSettings from '@/views/component/rowSettings'
-import GyEmployee from '@/views/basic/gyEmployee/gyEmployee.vue'
-import Dept from '@/views/basic/gy/gyDepartment'
-import Warehouse from '@/views/basic/gyWarehouse/gyWarehouse.vue'
-import GySupplier from '@/views/basic/gy/gySupplier.vue'
-import Material from '@/views/gyMaterial/GyMaterial.vue'
-import moment from 'moment';
+import axios from "axios";
+import RowSettings from "@/views/component/rowSettings";
+import GyEmployee from "@/views/basic/gyEmployee/gyEmployee.vue";
+import Dept from "@/views/basic/gy/gyDepartment";
+import Warehouse from "@/views/basic/gyWarehouse/gyWarehouse.vue";
+import GySupplier from "@/views/basic/gy/gySupplier.vue";
+import Material from "@/views/gyMaterial/GyMaterial.vue";
+import GyProperty from "@/views/basic/gyProperty/gyPropertyList.vue";
+import moment from "moment";
export default {
- name: 'Kf_MoveStockRequestBillEdit',
- components: { Dept, Warehouse, RowSettings, GyEmployee,GySupplier,Material },
+ name: "Kf_MoveStockRequestBillEdit",
+ components: {
+ Dept,
+ Warehouse,
+ RowSettings,
+ GyEmployee,
+ GySupplier,
+ Material,
+ GyProperty,
+ },
props: {
- OperationType: { type: Number, },
- linterid: { type: Number, },
- HSouceBillType: { type: String, },
- propsData: { type: String, },
- copyType: { type: Number, },
+ OperationType: { type: Number },
+ linterid: { type: Number },
+ HSouceBillType: { type: String },
+ propsData: { type: String },
+ copyType: { type: Number },
},
data() {
return {
@@ -326,30 +551,31 @@
openRowHide: false,
addBtnShow: false,
zbIndex: null,
- zbSelForm: {},//瀛愯〃閫変腑鏁版嵁
- dialogTypeNum: null,//閮ㄩ棬寮圭獥1锛屼粨搴撳脊绐�2
- deptShow: false,//閮ㄩ棬鏁版嵁缁勪欢
- warehouseShow: false,//浠撳簱鏁版嵁缁勪欢
- gyEmployeeShow: false,//閿�鍞憳鏁版嵁缁勪欢
- gySupplierShow: false,//渚涘簲鍟嗘暟鎹粍浠�
- materialShow: false,//鐗╂枡鏁版嵁缁勪欢
- eHWHType:1,//浠撳簱寮圭獥鍖哄垎鏍囧織
- empType:1,//鑱屽憳寮圭獥鍖哄垎鏍囧織
- deptform: {},//寮圭獥閫変腑鏁版嵁
- openData: false,//鏁版嵁寮圭獥
- dialogTitle: '',
- organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//缁勭粐鍒楄〃
- subDisabled: false,//缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
+ zbSelForm: {}, //瀛愯〃閫変腑鏁版嵁
+ dialogTypeNum: null, //閮ㄩ棬寮圭獥1锛屼粨搴撳脊绐�2
+ deptShow: false, //閮ㄩ棬鏁版嵁缁勪欢
+ warehouseShow: false, //浠撳簱鏁版嵁缁勪欢
+ gyEmployeeShow: false, //閿�鍞憳鏁版嵁缁勪欢
+ gySupplierShow: false, //渚涘簲鍟嗘暟鎹粍浠�
+ materialShow: false, //鐗╂枡鏁版嵁缁勪欢
+ propertyShow: false, // 杈呭姪灞炴�у熀纭�璧勬枡
+ eHWHType: 1, //浠撳簱寮圭獥鍖哄垎鏍囧織
+ empType: 1, //鑱屽憳寮圭獥鍖哄垎鏍囧織
+ deptform: {}, //寮圭獥閫変腑鏁版嵁
+ openData: false, //鏁版嵁寮圭獥
+ dialogTitle: "",
+ organizationList: JSON.parse(sessionStorage.getItem('organizationList')), //缁勭粐鍒楄〃
+ subDisabled: false, //缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
// OperationType: this.$route.query.OperationType,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼2锛�
HInterID: 0,
baseURL: process.env.VUE_APP_BASE_API,
checkedSysZb: [],
- editData: [],//瀛愯〃
- editData1: [],//姹囨�诲瓙琛�
- editBtData: [],//瀛愯〃琛ㄥご
- allVal:[],
- activeName: 'first',
- activeName1:'first',
+ editData: [], //瀛愯〃
+ editData1: [], //姹囨�诲瓙琛�
+ editBtData: [], //瀛愯〃琛ㄥご
+ allVal: [],
+ activeName: "first",
+ activeName1: "first",
// 寮瑰嚭灞傛爣棰�
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
@@ -358,21 +584,21 @@
dateRange: [],
// 鏌ヨ鍙傛暟
queryParams: {
- HBillNo: '',
+ HBillNo: "",
HInitTimeCycle: 29,
- HProjectNumber: '',
+ HProjectNumber: "",
HCusID: null,
- HMaterNumber: '',
- HMaterName: '',
- ColName1: '',
- ColName2: '',
- ColName: '',
- Comparator1: '',
- Comparator2: '',
- Comparator: '',
- ColContent1: '',
- ColContent2: '',
- ColContent: '',
+ HMaterNumber: "",
+ HMaterName: "",
+ ColName1: "",
+ ColName2: "",
+ ColName: "",
+ Comparator1: "",
+ Comparator2: "",
+ Comparator: "",
+ ColContent1: "",
+ ColContent2: "",
+ ColContent: "",
},
// 鏄剧ず鎼滅储鏉′欢
showSearch: true,
@@ -389,34 +615,16 @@
form: {},
// 琛ㄥ崟鏍¢獙
rules: {
- HDate: [
- { required: true, message: "鏃ユ湡涓嶈兘涓虹┖", trigger: "blur" }
- ],
- HSupName: [
- { required: true, message: "寰�鏉ュ崟浣嶄笉鑳戒负绌�", trigger: "blur" }
- ],
- HEmpName: [
- { required: true, message: "涓氬姟鍛樹笉鑳戒负绌�", trigger: "blur" }
- ],
- HMangerName: [
- { required: true, message: "涓荤涓嶈兘涓虹┖", trigger: "blur" }
- ],
- HSecManagerName: [
- { required: true, message: "楠屾敹鍛樹笉鑳戒负绌�", trigger: "blur" }
- ],
- HKeeperName: [
- { required: true, message: "淇濈鍛樹笉鑳戒负绌�", trigger: "blur" }
- ],
- HWHName: [
- { required: true, message: "璋冨叆浠撳簱涓嶈兘涓虹┖", trigger: "blur" }
- ],
- HSCWHName: [
- { required: true, message: "璋冨嚭浠撳簱涓嶈兘涓虹┖", trigger: "blur" }
- ],
- HDeptName: [
- { required: true, message: "閮ㄩ棬涓嶈兘涓虹┖", trigger: "blur" }
- ],
- }
+ HDate: [{ required: true, message: "鏃ユ湡涓嶈兘涓虹┖", trigger: "blur" }],
+ HSupName: [{ required: true, message: "寰�鏉ュ崟浣嶄笉鑳戒负绌�", trigger: "blur" }],
+ HEmpName: [{ required: true, message: "涓氬姟鍛樹笉鑳戒负绌�", trigger: "blur" }],
+ HMangerName: [{ required: true, message: "涓荤涓嶈兘涓虹┖", trigger: "blur" }],
+ HSecManagerName: [{ required: true, message: "楠屾敹鍛樹笉鑳戒负绌�", trigger: "blur" }],
+ HKeeperName: [{ required: true, message: "淇濈鍛樹笉鑳戒负绌�", trigger: "blur" }],
+ HWHName: [{ required: true, message: "璋冨叆浠撳簱涓嶈兘涓虹┖", trigger: "blur" }],
+ HSCWHName: [{ required: true, message: "璋冨嚭浠撳簱涓嶈兘涓虹┖", trigger: "blur" }],
+ HDeptName: [{ required: true, message: "閮ㄩ棬涓嶈兘涓虹┖", trigger: "blur" }],
+ },
};
},
created() {
@@ -424,13 +632,16 @@
},
methods: {
getdata() {
- console.log(this.copyType, this.OperationType)
- this.formShow = false
- this.formLoading = true
- if ((this.OperationType == 1 && this.copyType != 1) || (!this.OperationType && !this.copyType)) {
- this.handleAdd()
+ this.formShow = false;
+ this.formLoading = true;
+ // 璋冨嚭缁勭粐榛樿涓虹櫥褰曠敤鎴风粍缁�
+ if (
+ (this.OperationType == 1 && this.copyType != 1) ||
+ (!this.OperationType && !this.copyType)
+ ) {
+ this.handleAdd();
} else if (this.OperationType == 3 || this.copyType == 1) {
- this.handleUpdate()
+ this.handleUpdate();
}
},
// 鑾峰彇鍙傛暟_浼犻�掔殑JSON鏍煎紡鍙傛暟
@@ -442,285 +653,338 @@
return datajson;
},
handleRowHide() {
- this.rowHideShow = true
- this.openRowHide = true
+ this.rowHideShow = true;
+ this.openRowHide = true;
},
rowSetClose(val) {
- this.rowHideShow = false
- this.openRowHide = val
+ this.rowHideShow = false;
+ this.openRowHide = val;
},
HStockOrgChange(val) {
- console.log(549,val,this.zbIndex)
- console.log(this.organizationList)
-
+ console.log(549, val, this.zbIndex);
+ console.log(this.organizationList);
+
// let options=undefined
// this.form=this.organizationList.find(option => option.ID === val)?.Name || '';
},
//寮圭獥璧嬪��
dbEmitData(deptRow, num) {
// num=1閮ㄩ棬 num=2浠撳簱
- console.log(deptRow)
+ console.log(deptRow, num);
if (deptRow.HItemID || deptRow.hmainid) {
if (num == 1) {
- this.form.HDeptName = deptRow.閮ㄩ棬鍚嶇О
- this.form.HDeptID = deptRow.HItemID
- this.deptShow = false
- this.openData = false
+ this.form.HDeptName = deptRow.閮ㄩ棬鍚嶇О;
+ this.form.HDeptID = deptRow.HItemID;
+ this.deptShow = false;
+ this.openData = false;
} else if (num == 2) {
- if(this.eHWHType == 1){
- this.form.HWHName = deptRow.浠撳簱鍚嶇О
- this.form.HWHID = deptRow.HItemID
- }else if(this.eHWHType == 2){
- this.form.HSCWHName = deptRow.浠撳簱鍚嶇О
- this.form.HSCWHID = deptRow.HItemID
- }else if(this.eHWHType == 3){
- this.editData[this.zbIndex].HWHID = deptRow.HItemID
- this.editData[this.zbIndex].璋冨叆浠撳簱 = deptRow.浠撳簱鍚嶇О
- }else if(this.eHWHType == 4){
- this.editData[this.zbIndex].HSCWHID = deptRow.HItemID
- this.editData[this.zbIndex].璋冨嚭浠撳簱 = deptRow.浠撳簱鍚嶇О
+ if (this.eHWHType == 1) {
+ this.form.HWHName = deptRow.浠撳簱鍚嶇О;
+ this.form.HWHID = deptRow.HItemID;
+ } else if (this.eHWHType == 2) {
+ this.form.HSCWHName = deptRow.浠撳簱鍚嶇О;
+ this.form.HSCWHID = deptRow.HItemID;
+ } else if (this.eHWHType == 3) {
+ this.editData[this.zbIndex].HWHID = deptRow.HItemID;
+ this.editData[this.zbIndex].璋冨叆浠撳簱 = deptRow.浠撳簱鍚嶇О;
+ } else if (this.eHWHType == 4) {
+ this.editData[this.zbIndex].HSCWHID = deptRow.HItemID;
+ this.editData[this.zbIndex].璋冨嚭浠撳簱 = deptRow.浠撳簱鍚嶇О;
}
- this.warehouseShow = false
- this.openData = false
- } else if (num == 3){
-
- this.editData[this.zbIndex].HMaterID = deptRow.HItemID
- this.editData[this.zbIndex].鐗╂枡浠g爜 = deptRow.鐗╂枡浠g爜
- this.editData[this.zbIndex].鐗╂枡鍚嶇О = deptRow.鐗╂枡鍚嶇О
- this.editData[this.zbIndex].瑙勬牸鍨嬪彿 = deptRow.瑙勬牸鍨嬪彿
- this.editData[this.zbIndex].HUnitID = deptRow.HUnitID
- this.editData[this.zbIndex].璁¢噺鍗曚綅 = deptRow.璁¢噺鍗曚綅鍚嶇О
- this.materialShow = false
- this.openData = false
+ this.warehouseShow = false;
+ this.openData = false;
+ } else if (num == 3) {
+ console.log(deptRow);
+ this.editData[this.zbIndex].HMaterID = deptRow.HItemID;
+ this.editData[this.zbIndex].鐗╂枡浠g爜 = deptRow.鐗╂枡浠g爜;
+ this.editData[this.zbIndex].鐗╂枡鍚嶇О = deptRow.鐗╂枡鍚嶇О;
+ this.editData[this.zbIndex].瑙勬牸鍨嬪彿 = deptRow.瑙勬牸鍨嬪彿;
+ this.editData[this.zbIndex].璁¢噺鍗曚綅 = deptRow.璁¢噺鍗曚綅鍚嶇О;
+ this.editData[this.zbIndex].HUnitID = deptRow.HUnitID;
+ this.materialShow = false;
+ this.openData = false;
} else if (num == 4) {
- if(this.empType == 1){
- this.form.HEmpName = deptRow.鑱屽憳鍚嶇О
- this.form.HEmpID = deptRow.HItemID
- }else if(this.empType == 2){
- this.form.HMangerName = deptRow.鑱屽憳鍚嶇О
- this.form.HMangerID = deptRow.HItemID
- }else if(this.empType == 3){
- this.form.HSecManagerName = deptRow.鑱屽憳鍚嶇О
- this.form.HSecManagerID = deptRow.HItemID
- }else if(this.empType == 4){
- this.form.HKeeperName = deptRow.鑱屽憳鍚嶇О
- this.form.HKeeperID = deptRow.HItemID
- }else
- this.gyEmployeeShow = false
- this.openData = false
+ if (this.empType == 1) {
+ this.form.HEmpName = deptRow.鑱屽憳鍚嶇О;
+ this.form.HEmpID = deptRow.HItemID;
+ } else if (this.empType == 2) {
+ this.form.HMangerName = deptRow.鑱屽憳鍚嶇О;
+ this.form.HMangerID = deptRow.HItemID;
+ } else if (this.empType == 3) {
+ this.form.HSecManagerName = deptRow.鑱屽憳鍚嶇О;
+ this.form.HSecManagerID = deptRow.HItemID;
+ } else if (this.empType == 4) {
+ this.form.HKeeperName = deptRow.鑱屽憳鍚嶇О;
+ this.form.HKeeperID = deptRow.HItemID;
+ } else this.gyEmployeeShow = false;
+ this.openData = false;
} else if (num == 6) {
- this.form.HSupName = deptRow.渚涘簲鍟嗗悕绉�
- this.form.HSupID = deptRow.HItemID
- this.gySupplierShow = false
- this.openData = false
- }
+ this.form.HSupName = deptRow.渚涘簲鍟嗗悕绉�;
+ this.form.HSupID = deptRow.HItemID;
+ this.gySupplierShow = false;
+ this.openData = false;
+ } else if (num == "gyProperty") {
+ this.editData[this.zbIndex].HPropertyID = deptRow.HItemID;
+ this.editData[this.zbIndex]["杈呭姪灞炴��"] = deptRow["杈呭姪灞炴�у悕绉�"];
+
+ this.propertyShow = false;
+ this.openData = false;
+ }
} else {
this.$modal.msgError("璇烽�夋嫨鍗曟潯鏁版嵁!");
}
-
},
emitData(deptRow, num) {
- this.dialogTypeNum = num
- this.deptform = deptRow
+ this.dialogTypeNum = num;
+ this.deptform = deptRow;
},
deptClickSub() {
- this.dbEmitData(this.deptform, this.dialogTypeNum)
- this.deptform = {}
+ this.dbEmitData(this.deptform, this.dialogTypeNum);
+ this.deptform = {};
},
deptClose() {
- this.deptform = {}
- this.openData = false
+ this.deptform = {};
+ this.openData = false;
},
//琛ㄥ崟鍒濆鍖�
reset() {
this.form = {
- HBillNo: '',
+ HBillNo: "",
HInterID: 0,
HDate: new Date(),
- HSupTypeID:1,
- HSupName:'',
- HSupID:0,
- HDeptName: sessionStorage["HDept"] || '',
+ HSupTypeID: 1,
+ HSupName: "",
+ HSupID: 0,
+ HDeptName: sessionStorage["HDept"] || "",
HDeptID: sessionStorage["HDeptID"] || 0,
- HWHName:'',
- HWHID:0,
- HSCWHName:'',
- HSCWHID:0,
- HEmpName:'',
- HEmpID:'',
- HMangerName:'',
- HMangerID:'',
- HSecManagerName:'',
- HSecManagerID:'',
- HKeeperName:'',
- HKeeperID:'',
- HExplanation:'',
- HRemark:'',
+ HWHName: "",
+ HWHID: 0,
+ HSCWHName: "",
+ HSCWHID: 0,
+ HEmpName: "",
+ HEmpID: "",
+ HMangerName: "",
+ HMangerID: "",
+ HSecManagerName: "",
+ HSecManagerID: "",
+ HKeeperName: "",
+ HKeeperID: "",
+ HExplanation: "",
+ HRemark: "",
- HMaker: '',
- HUpDater: '',
- HChecker: '',
+ HMaker: "",
+ HUpDater: "",
+ HChecker: "",
HMakeDate: new Date(),
- HUpDateDate: '',
- HCheckDate: '',
- HCloseMan: '',
- HDeleteMan: '',
- HCloseDate: '',
- HDeleteDate: '',
- }
- this.editData = []
- this.editData1 = []
- this.editBtData = []
- this.ids = []
- this.subDisabled = false
- this.addBtnShow = false
+ HUpDateDate: "",
+ HCheckDate: "",
+ HCloseMan: "",
+ HDeleteMan: "",
+ HCloseDate: "",
+ HDeleteDate: "",
+ };
+ this.editData = [];
+ this.editData1 = [];
+ this.editBtData = [];
+ this.ids = [];
+ this.subDisabled = false;
+ this.addBtnShow = false;
// this.$refs.tableData.clearSelection()
- this.activeName = 'first'
- this.activeName1 = 'first'
+ this.activeName = "first";
+ this.activeName1 = "first";
this.resetForm("form");
},
//閫�鍑�
close() {
- this.reset()
- console.log(this.$route.path)
+ this.reset();
+ console.log(this.$route.path);
if (!this.OperationType && !this.copyType) {
- console.log(this.$route.path)
- const obj = { fullPath: this.$route.path, path: this.$route.path, name: this.$route.name, };
- this.$tab.closePage(obj).then(res => {
- const latestView = res.visitedViews.slice(-1)[0]
+ console.log(this.$route.path);
+ const obj = {
+ fullPath: this.$route.path,
+ path: this.$route.path,
+ name: this.$route.name,
+ };
+ this.$tab.closePage(obj).then((res) => {
+ const latestView = res.visitedViews.slice(-1)[0];
if (latestView) {
- this.$router.push(latestView.fullPath)
+ this.$router.push(latestView.fullPath);
} else {
- if (obj.name === 'Dashboard') {
- this.$router.replace({ path: '/redirect' + obj.fullPath })
+ if (obj.name === "Dashboard") {
+ this.$router.replace({ path: "/redirect" + obj.fullPath });
} else {
- this.$router.push('/')
+ this.$router.push("/");
}
}
});
} else {
- this.formShow = false
- this.$emit('editClose', false)
+ this.formShow = false;
+ this.$emit("editClose", false);
}
},
//鏍规嵁鐢ㄦ埛鑾峰彇瀵瑰簲鑱屽憳銆侀儴闂ㄣ�侀攢鍞富绠�
getCzyglByUser() {
- if(this.form.HDeptID && this.form.HDeptID!=0){
- axios.get(this.baseURL + '/Gy_Department/list', {
- params: { "sWhere": "and HItemID = '" + this.form.HDeptID + "'", "user": sessionStorage["HUserName"], "Organization": sessionStorage["Organization"] }
- }).then(response => {
- let dataForm = response.data.data[0]
- this.form.HMangerID = dataForm.HEmpID
- this.form.HMangerName = dataForm.璐熻矗浜�
- }).catch(error => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
- }
+ console.log(this.form.HDeptID && this.form.HDeptID != 0);
+ if (this.form.HDeptID && this.form.HDeptID != 0) {
+ axios
+ .get(this.baseURL + "/Gy_Department/list", {
+ params: {
+ sWhere: "and HItemID = '" + this.form.HDeptID + "'",
+ user: sessionStorage["HUserName"],
+ Organization: sessionStorage["Organization"],
+ },
+ })
+ .then((response) => {
+ let dataForm = response.data.data;
+ if (dataForm.length > 0) {
+ this.form.HMangerName = dataForm[0].璐熻矗浜�;
+ this.form.HMangerID = dataForm[0].HEmpID;
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ }
},
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
- this.reset()
+ this.reset();
//鏂板鑾峰彇鍗曟嵁鍙�
- this.getHBillNo()
- let date = new Date()
- this.form.HDate = moment(date).format('YYYY-MM-DDTHH:mm:ss')
+ this.getHBillNo();
+ let date = new Date();
+ this.$set(this.form, "HSTOCKOUTORGID", sessionStorage["OrganizationID"]);
+ this.$set(this.form, "HSTOCKINORGID", sessionStorage["OrganizationID"]);
+ this.$set(this.form, "HDate", moment(date).format("YYYY-MM-DD HH:mm:ss"));
if (this.OperationType == 1) {
- this.handleAddSysZb()
+ this.handleAddSysZb();
}
this.$nextTick(() => {
- this.formShow = true
- this.formLoading = false
- })
+ this.formShow = true;
+ this.formLoading = false;
+ });
},
getHBillNo() {
- axios.get(this.baseURL + "/Web/GetMAXNum", {
- params: {
- HBillType: '1243'
- }
- }).then(response => {
- this.form.HMaker = sessionStorage["HUserName"]
- this.form.HBillNo = response.data.data[0].HBillNo
- this.form.HInterID = response.data.data[0].HInterID
- this.getCzyglByUser()
- }).catch(error => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
+ axios
+ .get(this.baseURL + "/Web/GetMAXNum", {
+ params: {
+ HBillType: "1243",
+ },
+ })
+ .then((response) => {
+ this.form.HMaker = sessionStorage["HUserName"];
+ this.form.HBillNo = response.data.data[0].HBillNo;
+ this.form.HInterID = response.data.data[0].HInterID;
+ this.getCzyglByUser();
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
},
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate() {
- this.reset()
- let rowHmainid = this.linterid
- console.log(this.linterid)
+ this.reset();
+ let rowHmainid = this.linterid;
+ console.log(this.linterid);
//涓昏〃
- axios.get(this.baseURL + "/Kf_MoveStockRequestBill/cx", {
- params: { 'HInterID': rowHmainid }
- }).then(response => {
- if (response.data.count == 1) {
- var result = response.data
- var data = response.data.data
- if (this.copyType == 1) {
- this.getHBillNo()
- let date = new Date()
- this.form.HDate = moment(date).format('YYYY-MM-DDTHH:mm:ss')
- } else {
- this.allVal = data[0]
+ axios
+ .get(this.baseURL + "/Kf_MoveStockRequestBill/cx", {
+ params: { HInterID: rowHmainid },
+ })
+ .then((response) => {
+ if (response.data.count == 1) {
+ var result = response.data;
+ var data = response.data.data;
+ console.log(result, data);
+
+ this.allVal = data[0];
this.form = {
- "HBillNo": data[0].鍗曟嵁鍙�
- , "HDate": data[0].鏃ユ湡
- , "HDeptName": data[0].閮ㄩ棬
- , "HDeptID": data[0].HDeptID
- , "HSupID": data[0].HSupID
- , "HSupName": data[0].寰�鏉ュ崟浣�
- , "HEmpID": data[0].HEmpID
- , "HEmpName": data[0].涓氬姟鍛�
- , "HMangerName": data[0].涓荤
- , "HMangerID": data[0].HMangerID
- , "HSecManagerName": data[0].楠屾敹鍛�
- , "HSecManagerID": data[0].HSecManagerID
- , "HKeeperName": data[0].淇濈鍛�
- , "HKeeperID": data[0].HKeeperID
- , "HWHID": data[0].涓昏皟鍏ヤ粨搴揑D
- , "HWHName": data[0].涓昏皟鍏ヤ粨搴�
- , "HSCWHID": data[0].涓昏皟鍑轰粨搴揑D
- , "HSCWHName": data[0].涓昏皟鍑轰粨搴�
- , "HInnerBillNo": data[0].杈呭姪瀛楁
- , "HRemark": data[0].琛ㄥご澶囨敞
- , "HMaker": data[0].鍒跺崟浜�
- , "HChecker": data[0].瀹℃牳浜�
- , "HCloseMan": data[0].鍏抽棴浜�
- , "HMakeDate": data[0].鍒跺崟鏃ユ湡
- , "HCheckDate": data[0].瀹℃牳鏃ユ湡
- , "HCloseDate": data[0].鍏抽棴鏃ユ湡
- , "HUpDateDate": data[0].淇敼鏃ユ湡
- , "HDeleteDate": data[0].浣滃簾鏃ユ湡
- }
+ ...{
+ HBillNo: data[0].鍗曟嵁鍙�,
+ HDate: data[0].鏃ユ湡,
+ HDeptName: data[0].閮ㄩ棬,
+ HDeptID: data[0].HDeptID,
+ HSupID: data[0].HSupID,
+ HSupName: data[0].寰�鏉ュ崟浣�,
+ HEmpID: data[0].HEmpID,
+ HEmpName: data[0].涓氬姟鍛�,
+ HMangerName: data[0].涓荤,
+ HMangerID: data[0].HMangerID,
+ HSecManagerName: data[0].楠屾敹鍛�,
+ HSecManagerID: data[0].HSecManagerID,
+ HKeeperName: data[0].淇濈鍛�,
+ HKeeperID: data[0].HKeeperID,
+
+ HWHID: data[0].涓昏皟鍏ヤ粨搴揑D,
+ HWHName: data[0].涓昏皟鍏ヤ粨搴�,
+ HSCWHID: data[0].涓昏皟鍑轰粨搴揑D,
+ HSCWHName: data[0].涓昏皟鍑轰粨搴�,
+
+ HInnerBillNo: data[0].杈呭姪瀛楁,
+ HRemark: data[0].琛ㄥご澶囨敞,
+ HMaker: data[0].鍒跺崟浜�,
+ HChecker: data[0].瀹℃牳浜�,
+ HCloseMan: data[0].鍏抽棴浜�,
+ HMakeDate: data[0].鍒跺崟鏃ユ湡,
+ HCheckDate: data[0].瀹℃牳鏃ユ湡,
+ HCloseDate: data[0].鍏抽棴鏃ユ湡,
+ HUpDateDate: data[0].淇敼鏃ユ湡,
+ HDeleteDate: data[0].浣滃簾鏃ユ湡,
+ HSTOCKOUTORGID: data[0].HSTOCKOUTORGID.toString(),
+ HSTOCKINORGID: data[0].HSTOCKINORGID.toString(),
+ },
+ };
//瀛愯〃
var rowdata = [];
for (let i = 0; i < data.length; i++) {
- rowdata.push(
- {
- "HMaterID": data[i].HMaterID, "鐗╂枡浠g爜": data[i].鐗╂枡浠g爜, "鐗╂枡鍚嶇О": data[i].鐗╂枡鍚嶇О, "瑙勬牸鍨嬪彿": data[i].瑙勬牸鍨嬪彿,
- "HUnitID": data[i].HUnitID, "璁¢噺鍗曚綅": data[i].璁¢噺鍗曚綅, "HSecUnitRate": data[i].鎹㈢畻鐜�,
- "HSecUnitID": data[i].HSecUnitID, "杈呭姪璁¢噺鍗曚綅": data[i].杈呭姪璁¢噺鍗曚綅
- , "HQtyMust": data[i].搴旀敹鏁伴噺, "HQty": data[i].瀹炴敹鏁伴噺, "HRemark": data[i].琛ㄤ綋澶囨敞
- , "HPrice": data[i].鍗曚环, "HMoney": data[i].閲戦, "HOutPrice": data[i].璋冨嚭鍗曚环, "HOutMoney": data[i].璋冨嚭閲戦
- , "HWHID": data[i].HWHID, "璋冨叆浠撳簱": data[i].璋冨叆浠撳簱, "HSCWHID": data[i].HSCWHID, "璋冨嚭浠撳簱": data[i].璋冨嚭浠撳簱,
- "HBASEUNITID": data[i].HBASEUNITID, "鍩烘湰璁¢噺鍗曚綅": data[i].鍩烘湰璁¢噺鍗曚綅,
- "HEXTAUXUNITID": data[i].HEXTAUXUNITID, "杈呭崟浣�": data[i].杈呭崟浣�
- }
- )
+ rowdata.push({
+ HMaterID: data[i].HMaterID,
+ 鐗╂枡浠g爜: data[i].鐗╂枡浠g爜,
+ 鐗╂枡鍚嶇О: data[i].鐗╂枡鍚嶇О,
+ 瑙勬牸鍨嬪彿: data[i].瑙勬牸鍨嬪彿,
+ HUnitID: data[i].HUnitID,
+ 璁¢噺鍗曚綅: data[i].璁¢噺鍗曚綅,
+ HSecUnitRate: data[i].鎹㈢畻鐜�,
+ HSecUnitID: data[i].HSecUnitID,
+ 杈呭姪璁¢噺鍗曚綅: data[i].杈呭姪璁¢噺鍗曚綅,
+ HQtyMust: data[i].搴旀敹鏁伴噺,
+ HQty: data[i].瀹炴敹鏁伴噺,
+ HRemark: data[i].琛ㄤ綋澶囨敞,
+ HPrice: data[i].鍗曚环,
+ HMoney: data[i].閲戦,
+ HOutPrice: data[i].璋冨嚭鍗曚环,
+ HOutMoney: data[i].璋冨嚭閲戦,
+ HWHID: data[i].HWHID,
+ 璋冨叆浠撳簱: data[i].璋冨叆浠撳簱,
+ HSCWHID: data[i].HSCWHID,
+ 璋冨嚭浠撳簱: data[i].璋冨嚭浠撳簱,
+ HBASEUNITID: data[i].HBASEUNITID,
+ 鍩烘湰璁¢噺鍗曚綅: data[i].鍩烘湰璁¢噺鍗曚綅,
+ HEXTAUXUNITID: data[i].HEXTAUXUNITID,
+ 杈呭崟浣�: data[i].杈呭崟浣�,
+ HSTOCKORGID: data[i]["HSTOCKORGID"],
+ HPropertyID: data[i]["HPropertyID"],
+ 杈呭姪灞炴��: data[i]["杈呭姪灞炴��"],
+ });
}
- this.editData = rowdata
+ this.editData = rowdata;
+
+ // 娓叉煋瀹屽悗鍐嶅弬涓庢槸鍚﹀鍒剁殑鍒ゆ柇
+ if (this.copyType == 1) {
+ this.getHBillNo();
+ let date = new Date();
+ this.form.HDate = moment(date).format("YYYY-MM-DDTHH:mm:ss");
+ }
+
+ this.formShow = true;
+ this.formLoading = false;
}
- this.formShow = true
- this.formLoading = false
- }
- }).catch(error => {
- console.log(error)
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
+ })
+ .catch((error) => {
+ console.log(error);
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
},
/** 瀛愯〃鏄庣粏搴忓彿 */
rowSysZbIndex({ row, rowIndex }) {
@@ -732,13 +996,38 @@
this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹紪杈�!");
} else {
let obj = {
- "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HSecUnitRate": "0",
- "HSecUnitID": "0", "杈呭姪璁¢噺鍗曚綅": "", "HQtyMust": "0", "HQty": "0", "HPrice": "0", "HMoney": "0",
- "HOutPrice": "0", "HOutMoney": "0", "HWHID": "0", "璋冨叆浠撳簱": "", "HSCWHID": "0", "璋冨嚭浠撳簱": "",
- "HBASEUNITID": "0", "鍩烘湰璁¢噺鍗曚綅": "", "HEXTAUXUNITID": "0", "杈呭崟浣�": "","HRemark": ""}
+ HMaterID: 0,
+ 鐗╂枡浠g爜: "",
+ 鐗╂枡鍚嶇О: "",
+ 瑙勬牸鍨嬪彿: "",
+ HUnitID: 0,
+ 璁¢噺鍗曚綅: "",
+ HSecUnitRate: "0",
+ HSecUnitID: "0",
+ 杈呭姪璁¢噺鍗曚綅: "",
+ HQtyMust: "0",
+ HQty: "0",
+ HPrice: "0",
+ HMoney: "0",
+ HOutPrice: "0",
+ HOutMoney: "0",
+ HWHID: "0",
+ 璋冨叆浠撳簱: "",
+ HSCWHID: "0",
+ 璋冨嚭浠撳簱: "",
+ HBASEUNITID: "0",
+ 鍩烘湰璁¢噺鍗曚綅: "",
+ HEXTAUXUNITID: "0",
+ 杈呭崟浣�: "",
+ HRemark: "",
+ HSTOCKORGID: sessionStorage["OrganizationID"],
+ HSTOCKORGINID: this.form.HSTOCKINORGID,
+ HPropertyID: 0,
+ 杈呭姪灞炴��: "",
+ };
if (index) {
this.editData.splice(index, 0, obj);
- this.$set(this.editData, index, obj)
+ this.$set(this.editData, index, obj);
} else {
this.editData.push(obj);
}
@@ -746,20 +1035,21 @@
},
handleCopyZbRow() {
if (!this.zbIndex) {
- this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹�")
+ this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹�");
} else {
- let copyRow = JSON.parse(JSON.stringify(this.zbSelForm))
+ let copyRow = JSON.parse(JSON.stringify(this.zbSelForm));
this.editData.push(copyRow);
}
},
handleMoveRowUp(zbSelForm) {
if (!this.zbIndex) {
- this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹�")
+ this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹�");
} else {
if (zbSelForm.index == 1) {
this.$modal.msgError("绗竴琛屾暟鎹棤娉曚笂绉�");
- } else { // 纭繚涓嶆槸绗竴琛�
- let num = zbSelForm.index - 1
+ } else {
+ // 纭繚涓嶆槸绗竴琛�
+ let num = zbSelForm.index - 1;
const record = this.editData.splice(num, 1)[0];
this.editData.splice(num - 1, 0, record);
}
@@ -767,12 +1057,13 @@
},
handleMoveRowDown(zbSelForm) {
if (!this.zbIndex) {
- this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹�")
+ this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹�");
} else {
if (zbSelForm.index == this.editData.length) {
this.$modal.msgError("鏈�鍚庝竴琛屾暟鎹棤娉曚笅绉�");
- } else { // 纭繚涓嶆槸绗竴琛�
- let num = zbSelForm.index - 1
+ } else {
+ // 纭繚涓嶆槸绗竴琛�
+ let num = zbSelForm.index - 1;
const record = this.editData.splice(num, 1)[0];
this.editData.splice(num + 1, 0, record);
}
@@ -780,129 +1071,145 @@
},
/** 缂栬緫椤靛瓙琛ㄥ垹闄ゆ寜閽搷浣� */
handleDeleteSysZb(row) {
- this.checkedSysZb = []
- this.checkedSysZb.push(row.index)
+ this.checkedSysZb = [];
+ this.checkedSysZb.push(row.index);
if (this.checkedSysZb.length == 0) {
this.$modal.msgError("璇峰厛閫夋嫨瑕佸垹闄ょ殑鍟嗗搧璁㈠崟鏄庣粏鏁版嵁");
} else {
const editData = this.editData;
const checkedSysZb = this.checkedSysZb;
this.editData = editData.filter(function (item) {
- return checkedSysZb.indexOf(item.index) == -1
+ return checkedSysZb.indexOf(item.index) == -1;
});
}
},
/** 缂栬緫椤靛瓙琛ㄥ閫夋閫変腑鏁版嵁 */
handleTableZbEdit(selection) {
- this.checkedSysZb = selection.map(item => item.index)
- this.zbSelForm = selection[0]
- this.zbIndex = this.checkedSysZb[0]
+ this.checkedSysZb = selection.map((item) => item.index);
+ this.zbSelForm = selection[0];
+ this.zbIndex = this.checkedSysZb[0];
if (selection.length > 1) {
- const del_row = selection.shift()
- this.$refs.zbTable.toggleRowSelection(del_row, false) //璁剧疆杩欎竴琛屽彇娑堥�変腑
+ const del_row = selection.shift();
+ this.$refs.zbTable.toggleRowSelection(del_row, false); //璁剧疆杩欎竴琛屽彇娑堥�変腑
}
},
// 缂栬緫鎻愪氦淇濆瓨
submitForm() {
- this.$refs["form"].validate(valid => {
+ this.$refs["form"].validate((valid) => {
if (valid) {
- let fhck = false
- if(this.editData.length == 0){
- fhck = true
- this.$modal.msgError("娌℃湁鐗╂枡鏄庣粏璁板綍锛�");
+ let fhck = false;
+ if (this.editData.length == 0) {
+ fhck = true;
+ this.$modal.msgError("娌℃湁鐗╂枡鏄庣粏璁板綍锛�");
}
this.editData.map((item, index) => {
if (!item.HMaterID) {
- fhck = true
+ fhck = true;
this.$modal.msgError("绗�" + (index + 1) + "琛岋細鍣ㄥ叿鏈�夋嫨锛�");
- }else if(!item.HQty || item.HQty == 0){
- fhck = true
+ } else if (!item.HQty || item.HQty == 0) {
+ fhck = true;
this.$modal.msgError("绗�" + (index + 1) + "琛岋細鏁伴噺涓嶈兘涓�0锛�");
}
- })
+ });
this.$nextTick(() => {
if (!fhck) {
- var Operation = null
- if(!this.OperationType){
- Operation = 1
- }else{
- Operation = this.OperationType
- if(Operation == 3){
- this.form.HInterID = this.linterid
+ var Operation = null;
+ if (!this.OperationType) {
+ Operation = 1;
+ } else {
+ Operation = this.OperationType;
+ if (Operation == 3) {
+ this.form.HInterID = this.linterid;
}
}
var sMainStr = JSON.stringify(this.form);
var sSubStr = JSON.stringify(this.editData);
var sAllStr = JSON.stringify(this.allVal);
- var sMainSub = sMainStr + ';' + sSubStr + ';' + Operation + ";" + sessionStorage["HUserName"] + ";" + sAllStr;
+ var sMainSub =
+ sMainStr +
+ ";" +
+ sSubStr +
+ ";" +
+ Operation +
+ ";" +
+ sessionStorage["HUserName"] +
+ ";" +
+ sAllStr;
axios({
- method: 'post',
- url: this.baseURL + "/Kf_MoveStockRequestBill/Kf_MoveStockRequestBillEdit",
+ method: "post",
+ url:
+ this.baseURL + "/Kf_MoveStockRequestBill/Kf_MoveStockRequestBillEdit",
data: {
- 'sMainSub': sMainSub
+ sMainSub: sMainSub,
},
- }).then(response => {
- if (response.data.count == 1) {
- this.subDisabled = true//璁剧疆淇濆瓨鎸夐挳涓嶅彲鐢�
- this.$modal.msgSuccess(response.data.Message);
- this.addBtnShow = true
- this.close()
- } else {
- this.$modal.msgError(response.data.code + response.data.Message);
- }
- }).catch(error => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
+ })
+ .then((response) => {
+ if (response.data.count == 1) {
+ this.subDisabled = true; //璁剧疆淇濆瓨鎸夐挳涓嶅彲鐢�
+ this.$modal.msgSuccess(response.data.Message);
+ this.addBtnShow = true;
+ this.close();
+ } else {
+ this.$modal.msgError(response.data.code + response.data.Message);
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
}
- })
+ });
}
});
},
showReset() {
- this.deptShow = false
- this.warehouseShow = false
- this.gyEmployeeShow = false
- this.gySupplierShow = false
- this.materialShow = false
+ this.deptShow = false;
+ this.warehouseShow = false;
+ this.gyEmployeeShow = false;
+ this.gySupplierShow = false;
+ this.materialShow = false;
},
// 鎵撳紑鏁版嵁鍒楄〃寮圭獥
openDataDialog(num, row) {
//num1閮ㄩ棬锛�2鍑哄簱浠撳簱锛�3鐗╂枡锛�4閿�鍞憳
if (row) {
- this.zbIndex = row.index - 1
+ this.zbIndex = row.index - 1;
}
- this.showReset()
+ this.showReset();
if (num == 1) {
- this.dialogTitle = '閮ㄩ棬鍒楄〃'
- this.deptShow = true
- this.openData = true
+ this.dialogTitle = "閮ㄩ棬鍒楄〃";
+ this.deptShow = true;
+ this.openData = true;
} else if (num == 2) {
- this.dialogTitle = '浠撳簱鍒楄〃'
- this.warehouseShow = true
- this.openData = true
- } else if (num == 3) {
- this.dialogTitle = '鐗╂枡鍒楄〃'
- this.materialShow = true
- this.openData = true
+ this.dialogTitle = "浠撳簱鍒楄〃";
+ this.warehouseShow = true;
+ this.openData = true;
+ } else if (num == 3) {
+ this.dialogTitle = "鐗╂枡鍒楄〃";
+ this.materialShow = true;
+ this.openData = true;
} else if (num == 4) {
- if(this.empType == 1){
- this.dialogTitle = '涓氬姟鍛樺垪琛�'
- }else if(this.empType == 2){
- this.dialogTitle = '涓荤鍒楄〃'
- }else if(this.empType == 3){
- this.dialogTitle = '楠屾敹鍛樺垪琛�'
- }else if(this.empType == 4){
- this.dialogTitle = '淇濈鍛樺垪琛�'
+ if (this.empType == 1) {
+ this.dialogTitle = "涓氬姟鍛樺垪琛�";
+ } else if (this.empType == 2) {
+ this.dialogTitle = "涓荤鍒楄〃";
+ } else if (this.empType == 3) {
+ this.dialogTitle = "楠屾敹鍛樺垪琛�";
+ } else if (this.empType == 4) {
+ this.dialogTitle = "淇濈鍛樺垪琛�";
}
- this.gyEmployeeShow = true
- this.openData = true
+ this.gyEmployeeShow = true;
+ this.openData = true;
} else if (num == 6) {
- this.dialogTitle = '渚涘簲鍟嗗垪琛�'
- this.gySupplierShow = true
- this.openData = true
+ this.dialogTitle = "渚涘簲鍟嗗垪琛�";
+ this.gySupplierShow = true;
+ this.openData = true;
+ } else if (num == 7) {
+ this.dialogTitle = "杈呭姪灞炴�у垪琛�";
+ this.propertyShow = true;
+ this.openData = true;
}
},
- }
+ },
};
</script>
<style>
diff --git a/src/views/warehouse/transfer/Kf_MoveStockRequestBillList.vue b/src/views/warehouse/transfer/Kf_MoveStockRequestBillList.vue
index 10f0411..9454754 100644
--- a/src/views/warehouse/transfer/Kf_MoveStockRequestBillList.vue
+++ b/src/views/warehouse/transfer/Kf_MoveStockRequestBillList.vue
@@ -188,7 +188,7 @@
<el-checkbox v-model="checked" v-if="item.type == 'checkbox'"></el-checkbox>
<div :style="item.style">
<span v-if="column.property.includes('鏃ユ湡')">{{ parseTime(row[column.property], '{y}-{m}-{d}') }}</span>
- <el-button type="text" @click="handleEdit(row, OperationType = 3)"
+ <el-button type="text" @click.stop="handleEdit(row, OperationType = 3)"
v-else-if="column.property == '鍗曟嵁鍙�'">{{
row.鍗曟嵁鍙�
}}</el-button>
--
Gitblit v1.9.1