Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
klck
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
位宇华
klck
Commits
c6cf5960
Commit
c6cf5960
authored
Mar 11, 2024
by
hehongwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前端转换修改;后端清洗修改
parent
10e24885
Changes
26
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
2692 additions
and
2036 deletions
+2692
-2036
ruoyi-admin/src/main/resources/application.yml
ruoyi-admin/src/main/resources/application.yml
+1
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesCleaningRuleController.java
.../system/controller/ActSuppliesCleaningRuleController.java
+3
-3
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesHistorydataController.java
...i/system/controller/ActSuppliesHistorydataController.java
+1
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesHistorydataMapper.java
...com/ruoyi/system/mapper/ActSuppliesHistorydataMapper.java
+1
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesHistorydataService.java
.../ruoyi/system/service/IActSuppliesHistorydataService.java
+1
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
...ystem/service/impl/ActSuppliesHistorydataServiceImpl.java
+8
-2
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesHistorydataMapper.xml
.../resources/mapper/system/ActSuppliesHistorydataMapper.xml
+2
-2
ruoyi-ui/package.json
ruoyi-ui/package.json
+3
-2
ruoyi-ui/public/exportExcel.js
ruoyi-ui/public/exportExcel.js
+1
-4
ruoyi-ui/src/api/Actsupplies/cleaning_rule.js
ruoyi-ui/src/api/Actsupplies/cleaning_rule.js
+3
-2
ruoyi-ui/src/conversion/DonghuantuoMine.js
ruoyi-ui/src/conversion/DonghuantuoMine.js
+32
-8
ruoyi-ui/src/conversion/LinxiMine.js
ruoyi-ui/src/conversion/LinxiMine.js
+13
-5
ruoyi-ui/src/conversion/MoneyMine.js
ruoyi-ui/src/conversion/MoneyMine.js
+243
-0
ruoyi-ui/src/conversion/TangshanMine copy.js
ruoyi-ui/src/conversion/TangshanMine copy.js
+166
-0
ruoyi-ui/src/conversion/conversion.js
ruoyi-ui/src/conversion/conversion.js
+133
-112
ruoyi-ui/src/conversion/danhouMine.js
ruoyi-ui/src/conversion/danhouMine.js
+43
-30
ruoyi-ui/src/conversion/fanMine.js
ruoyi-ui/src/conversion/fanMine.js
+9
-6
ruoyi-ui/src/conversion/hongMine.js
ruoyi-ui/src/conversion/hongMine.js
+28
-15
ruoyi-ui/src/conversion/lvMine.js
ruoyi-ui/src/conversion/lvMine.js
+22
-18
ruoyi-ui/src/main.js
ruoyi-ui/src/main.js
+0
-1
ruoyi-ui/src/views/system/ActsupplesAll/MoneyMine.vue
ruoyi-ui/src/views/system/ActsupplesAll/MoneyMine.vue
+57
-0
ruoyi-ui/src/views/system/ActsupplesAll/fanMine.vue
ruoyi-ui/src/views/system/ActsupplesAll/fanMine.vue
+1
-0
ruoyi-ui/src/views/system/historydata/index.vue
ruoyi-ui/src/views/system/historydata/index.vue
+0
-4
ruoyi-ui/src/views/system/supplies/index_vue.vue
ruoyi-ui/src/views/system/supplies/index_vue.vue
+1823
-1594
ruoyi-ui/src/views/system/user/index.vue
ruoyi-ui/src/views/system/user/index.vue
+95
-223
ruoyi-ui/vue.config.js
ruoyi-ui/vue.config.js
+3
-3
No files found.
ruoyi-admin/src/main/resources/application.yml
View file @
c6cf5960
...
@@ -95,6 +95,7 @@ spring:
...
@@ -95,6 +95,7 @@ spring:
time-zone
:
GMT+8
time-zone
:
GMT+8
serialization
:
serialization
:
write-dates-as-timestamps
:
false
write-dates-as-timestamps
:
false
# token配置
# token配置
token
:
token
:
# 令牌自定义标识
# 令牌自定义标识
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesCleaningRuleController.java
View file @
c6cf5960
...
@@ -42,11 +42,11 @@ public class ActSuppliesCleaningRuleController extends BaseController
...
@@ -42,11 +42,11 @@ public class ActSuppliesCleaningRuleController extends BaseController
* 获取所有历史数据
* 获取所有历史数据
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:cleaningrule:queryAllAcc')"
)
@PreAuthorize
(
"@ss.hasPermi('system:cleaningrule:queryAllAcc')"
)
@
GetMapping
(
"/queryAllAcc/{tylkStatus}
"
)
@
PutMapping
(
"/queryAllAcc
"
)
public
AjaxResult
selectActSuppliesHistorydataAcc
(
@
PathVariable
(
"tylkStatus"
)
Integer
tylkStatus
)
public
AjaxResult
selectActSuppliesHistorydataAcc
(
@
RequestBody
ActSuppliesHistorydata
actSuppliesHistorydata
)
{
{
List
<
ActSuppliesHistorydata
>
s
=
actSuppliesHistorydataService
.
selectActSuppliesHistorydataAcc
(
tylkStatus
);
List
<
ActSuppliesHistorydata
>
s
=
actSuppliesHistorydataService
.
selectActSuppliesHistorydataAcc
(
actSuppliesHistorydata
);
return
AjaxResult
.
success
(
s
);
return
AjaxResult
.
success
(
s
);
}
}
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesHistorydataController.java
View file @
c6cf5960
...
@@ -123,6 +123,7 @@ public class ActSuppliesHistorydataController extends BaseController
...
@@ -123,6 +123,7 @@ public class ActSuppliesHistorydataController extends BaseController
@PostMapping
(
"/addInsertAccount"
)
@PostMapping
(
"/addInsertAccount"
)
public
AjaxResult
addInsertAccount
(
@RequestBody
List
<
ActSuppliesHistorydata
>
actSuppliesHistorydata
)
public
AjaxResult
addInsertAccount
(
@RequestBody
List
<
ActSuppliesHistorydata
>
actSuppliesHistorydata
)
{
{
System
.
out
.
println
(
actSuppliesHistorydata
);
actSuppliesHistorydataService
.
addInsertActSuppliesHistorydataAcc
(
actSuppliesHistorydata
);
actSuppliesHistorydataService
.
addInsertActSuppliesHistorydataAcc
(
actSuppliesHistorydata
);
return
toAjax
(
1
);
return
toAjax
(
1
);
}
}
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesHistorydataMapper.java
View file @
c6cf5960
...
@@ -96,7 +96,7 @@ public interface ActSuppliesHistorydataMapper
...
@@ -96,7 +96,7 @@ public interface ActSuppliesHistorydataMapper
void
updateActSuppliesHistorydataStatusByIdAcc
(
Long
gethId
);
void
updateActSuppliesHistorydataStatusByIdAcc
(
Long
gethId
);
List
<
ActSuppliesHistorydata
>
selectActSuppliesHistorydataAcc
(
Integer
tylkStatus
);
List
<
ActSuppliesHistorydata
>
selectActSuppliesHistorydataAcc
(
ActSuppliesHistorydata
actSuppliesHistorydata
);
List
<
ActSuppliesHistorydata
>
selectActSuppliesHistorydataCopyList
(
ActSuppliesHistorydata
actSuppliesHistorydata
);
List
<
ActSuppliesHistorydata
>
selectActSuppliesHistorydataCopyList
(
ActSuppliesHistorydata
actSuppliesHistorydata
);
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesHistorydataService.java
View file @
c6cf5960
...
@@ -90,7 +90,7 @@ public interface IActSuppliesHistorydataService
...
@@ -90,7 +90,7 @@ public interface IActSuppliesHistorydataService
void
addInsertActSuppliesHistorydataAcc
(
List
<
ActSuppliesHistorydata
>
actSuppliesHistorydata
);
void
addInsertActSuppliesHistorydataAcc
(
List
<
ActSuppliesHistorydata
>
actSuppliesHistorydata
);
List
<
ActSuppliesHistorydata
>
selectActSuppliesHistorydataAcc
(
Integer
tylkStatus
);
List
<
ActSuppliesHistorydata
>
selectActSuppliesHistorydataAcc
(
ActSuppliesHistorydata
actSuppliesHistorydata
);
List
<
ActSuppliesImportCleaningAcc
>
selectActSuppliesCleaningCopyAcc
(
Long
id
);
List
<
ActSuppliesImportCleaningAcc
>
selectActSuppliesCleaningCopyAcc
(
Long
id
);
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
View file @
c6cf5960
...
@@ -627,6 +627,12 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
...
@@ -627,6 +627,12 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
@Transactional
@Transactional
public
void
addInsertImportssAccounts
(
List
<
ActOperation1
>
actOperation2s
)
{
public
void
addInsertImportssAccounts
(
List
<
ActOperation1
>
actOperation2s
)
{
Thread
thread1
=
new
Thread
(()->{
System
.
out
.
println
(
"sssss"
);
});
Thread
thread
=
new
Thread
()
{
Thread
thread
=
new
Thread
()
{
public
void
run
()
{
public
void
run
()
{
...
@@ -838,9 +844,9 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
...
@@ -838,9 +844,9 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
}
}
@Override
@Override
public
List
<
ActSuppliesHistorydata
>
selectActSuppliesHistorydataAcc
(
Integer
tylkStatus
)
{
public
List
<
ActSuppliesHistorydata
>
selectActSuppliesHistorydataAcc
(
ActSuppliesHistorydata
actSuppliesHistorydata
)
{
return
actSuppliesHistorydataMapper
.
selectActSuppliesHistorydataAcc
(
tylkStatus
);
return
actSuppliesHistorydataMapper
.
selectActSuppliesHistorydataAcc
(
actSuppliesHistorydata
);
}
}
...
...
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesHistorydataMapper.xml
View file @
c6cf5960
...
@@ -257,11 +257,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -257,11 +257,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where t1.clean_status = 0 and t1.tylk_status =#{tylkStatus}
where t1.clean_status = 0 and t1.tylk_status =#{tylkStatus}
</select>
</select>
<select
id=
"selectActSuppliesHistorydataAcc"
parameterType=
"
java.lang.Integer
"
resultMap=
"ActSuppliesHistorydataResult"
>
<select
id=
"selectActSuppliesHistorydataAcc"
parameterType=
"
ActSuppliesHistorydata
"
resultMap=
"ActSuppliesHistorydataResult"
>
SELECT t1.id,t1.import_uuid, t1.template_id, t1.export_uuid, t1.role_id, t1.history_name, t1.history_role,t1.conven_role,t2.history_content, t1.identifying_code, t1.status, t1.create_by, t1.create_time,t1.date,t1.ssk_id
SELECT t1.id,t1.import_uuid, t1.template_id, t1.export_uuid, t1.role_id, t1.history_name, t1.history_role,t1.conven_role,t2.history_content, t1.identifying_code, t1.status, t1.create_by, t1.create_time,t1.date,t1.ssk_id
FROM act_supplies_historydata_copy1 t1
FROM act_supplies_historydata_copy1 t1
LEFT JOIN act_supplies_historycontent_copy1 t2 ON t1.import_uuid = t2.hid
LEFT JOIN act_supplies_historycontent_copy1 t2 ON t1.import_uuid = t2.hid
where t1.clean_status = 0 and t1.tylk_status =#{tylkStatus}
where t1.clean_status = 0 and t1.tylk_status =#{tylkStatus}
and t1.ssk_id = #{mining}
</select>
</select>
<update
id=
"updateActSuppliesHistorydataStatusById"
parameterType=
"java.lang.Long"
>
<update
id=
"updateActSuppliesHistorydataStatusById"
parameterType=
"java.lang.Long"
>
...
...
ruoyi-ui/package.json
View file @
c6cf5960
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
"af-table-column"
:
"^1.0.3"
,
"af-table-column"
:
"^1.0.3"
,
"axios"
:
"0.21.0"
,
"axios"
:
"0.21.0"
,
"babel-eslint"
:
"10.1.0"
,
"babel-eslint"
:
"10.1.0"
,
"bigdecimal"
:
"^0.6.1"
,
"chalk"
:
"4.1.0"
,
"chalk"
:
"4.1.0"
,
"clipboard"
:
"2.0.6"
,
"clipboard"
:
"2.0.6"
,
"connect"
:
"3.6.6"
,
"connect"
:
"3.6.6"
,
...
@@ -61,6 +62,7 @@
...
@@ -61,6 +62,7 @@
"jsencrypt"
:
"3.0.0-rc.1"
,
"jsencrypt"
:
"3.0.0-rc.1"
,
"lint-staged"
:
"10.5.3"
,
"lint-staged"
:
"10.5.3"
,
"luckyexcel"
:
"^1.0.1"
,
"luckyexcel"
:
"^1.0.1"
,
"mathjs"
:
"^12.4.0"
,
"moment"
:
"^2.30.1"
,
"moment"
:
"^2.30.1"
,
"nprogress"
:
"0.2.0"
,
"nprogress"
:
"0.2.0"
,
"quill"
:
"1.3.7"
,
"quill"
:
"1.3.7"
,
...
@@ -72,7 +74,6 @@
...
@@ -72,7 +74,6 @@
"scriptjs"
:
"^2.5.9"
,
"scriptjs"
:
"^2.5.9"
,
"svg-sprite-loader"
:
"5.1.1"
,
"svg-sprite-loader"
:
"5.1.1"
,
"uuid"
:
"^9.0.0"
,
"uuid"
:
"^9.0.0"
,
"vue"
:
"2.6.12"
,
"vue-append"
:
"^2.2.0"
,
"vue-append"
:
"^2.2.0"
,
"vue-count-to"
:
"1.0.13"
,
"vue-count-to"
:
"1.0.13"
,
"vue-cropper"
:
"0.5.5"
,
"vue-cropper"
:
"0.5.5"
,
...
@@ -118,7 +119,7 @@
...
@@ -118,7 +119,7 @@
"scriptjs"
:
"^2.5.9"
,
"scriptjs"
:
"^2.5.9"
,
"sortablejs"
:
"^1.10.2"
,
"sortablejs"
:
"^1.10.2"
,
"svg-sprite-loader"
:
"5.1.1"
,
"svg-sprite-loader"
:
"5.1.1"
,
"vue"
:
"2.6.12"
,
"vue"
:
"
^
2.6.12"
,
"vue-append"
:
"^2.2.0"
,
"vue-append"
:
"^2.2.0"
,
"vue-count-to"
:
"1.0.13"
,
"vue-count-to"
:
"1.0.13"
,
"vue-cropper"
:
"0.5.5"
,
"vue-cropper"
:
"0.5.5"
,
...
...
ruoyi-ui/public/exportExcel.js
View file @
c6cf5960
...
@@ -4,6 +4,7 @@ import Excel from 'exceljs';
...
@@ -4,6 +4,7 @@ import Excel from 'exceljs';
import
FileSaver
from
'
file-saver
'
;
import
FileSaver
from
'
file-saver
'
;
const
exportExcel
=
function
(
luckysheet
,
value
,
contrast
,
id
)
{
const
exportExcel
=
function
(
luckysheet
,
value
,
contrast
,
id
)
{
// 函数体
// 函数体
// 参数为luckysheet.getluckysheetfile()获取的对象
// 参数为luckysheet.getluckysheetfile()获取的对象
// 1.创建工作簿,可以为工作簿添加属性
// 1.创建工作簿,可以为工作簿添加属性
...
@@ -23,8 +24,6 @@ const exportExcel = function (luckysheet, value, contrast, id) {
...
@@ -23,8 +24,6 @@ const exportExcel = function (luckysheet, value, contrast, id) {
setMerge
(
merge
,
worksheet
);
setMerge
(
merge
,
worksheet
);
setBorder
(
borderInfo
,
worksheet
);
setBorder
(
borderInfo
,
worksheet
);
if
(
id
===
1248
)
{
if
(
id
===
1248
)
{
worksheet
.
getRow
(
2
).
hidden
=
true
;
worksheet
.
getRow
(
2
).
hidden
=
true
;
worksheet
.
getRow
(
3
).
hidden
=
true
;
worksheet
.
getRow
(
3
).
hidden
=
true
;
worksheet
.
getRow
(
4
).
hidden
=
true
;
worksheet
.
getRow
(
4
).
hidden
=
true
;
...
@@ -131,14 +130,12 @@ var setStyleAndValue = function (cellArr, worksheet, contrast) {
...
@@ -131,14 +130,12 @@ var setStyleAndValue = function (cellArr, worksheet, contrast) {
// style 填入到_value中可以实现填充色
// style 填入到_value中可以实现填充色
let
letter
=
createCellPos
(
columnid
);
let
letter
=
createCellPos
(
columnid
);
let
target
=
worksheet
.
getCell
(
letter
+
(
rowid
+
1
));
let
target
=
worksheet
.
getCell
(
letter
+
(
rowid
+
1
));
if
(
contrast
)
{
if
(
contrast
)
{
const
column
=
worksheet
.
getColumn
(
1
);
const
column
=
worksheet
.
getColumn
(
1
);
const
column2
=
worksheet
.
getColumn
(
2
);
const
column2
=
worksheet
.
getColumn
(
2
);
column
.
hidden
=
true
;
column
.
hidden
=
true
;
column2
.
hidden
=
true
;
column2
.
hidden
=
true
;
}
}
// console.log('1233', letter + (rowid + 1))
for
(
const
key
in
fill
)
{
for
(
const
key
in
fill
)
{
target
.
fill
=
fill
;
target
.
fill
=
fill
;
break
;
break
;
...
...
ruoyi-ui/src/api/Actsupplies/cleaning_rule.js
View file @
c6cf5960
...
@@ -11,8 +11,9 @@ export function selectActSuppliesHistorydata(tylkStatus) {
...
@@ -11,8 +11,9 @@ export function selectActSuppliesHistorydata(tylkStatus) {
//查询通用凭证单表数据
//查询通用凭证单表数据
export
function
selectActSuppliesHistorydataAcc
(
tylkStatus
)
{
export
function
selectActSuppliesHistorydataAcc
(
tylkStatus
)
{
return
request
({
return
request
({
url
:
'
/system/cleaningrule/queryAllAcc/
'
+
tylkStatus
,
url
:
'
/system/cleaningrule/queryAllAcc
'
,
method
:
'
get
'
method
:
'
put
'
,
data
:
tylkStatus
})
})
}
}
...
...
ruoyi-ui/src/conversion/DonghuantuoMine.js
View file @
c6cf5960
export
function
DongMine
(
money
,
code
,
codess
,
CompositeTable
,
Department
,
classify
,
duplicateData
)
{
export
function
DongMine
(
money
,
code
,
codess
,
CompositeTable
,
Department
,
classify
,
duplicateData
)
{
let
result
=
[
'
运输业务
'
]
let
results
=
[
'
10:应付职工薪酬
'
,
'
福利费
'
,
'
自建食堂支付
'
]
//先把运输业务插入到成本材料表中
let
inserts
=
CompositeTable
[
0
].
celldata
.
filter
(
obj
=>
obj
.
v
.
v
==
'
5.其他业务成本
'
)[
0
].
r
;
let
insert
=
CompositeTable
[
0
].
celldata
.
filter
(
obj
=>
obj
.
v
.
v
==
'
9.专项储备
'
)[
0
].
r
for
(
let
i
=
0
,
k
=
0
;
i
<
CompositeTable
[
0
].
celldata
.
length
&&
k
<
results
.
length
;
i
++
)
{
if
(
CompositeTable
[
0
].
celldata
[
i
]?.
r
>=
insert
+
1
&&
CompositeTable
[
0
].
celldata
[
i
]?.
r
<
insert
+
4
&&
CompositeTable
[
0
].
celldata
[
i
]?.
c
==
0
)
{
CompositeTable
[
0
].
celldata
[
i
].
v
=
{
v
:
results
[
k
],
m
:
results
[
k
]
};
k
++
;
}
}
for
(
let
i
=
0
,
k
=
0
;
i
<
CompositeTable
[
0
].
celldata
.
length
&&
k
<
result
.
length
;
i
++
)
{
if
(
CompositeTable
[
0
].
celldata
[
i
]?.
r
>=
inserts
+
1
&&
CompositeTable
[
0
].
celldata
[
i
]?.
r
<
inserts
+
2
&&
CompositeTable
[
0
].
celldata
[
i
]?.
c
==
0
)
{
CompositeTable
[
0
].
celldata
[
i
].
v
=
{
v
:
result
[
k
],
m
:
result
[
k
]
};
k
++
;
}
}
//东欢坨矿转换方法
//东欢坨矿转换方法
//如果部门为旧品和设备 并且他们的材料为支护用品和大型材料就把他们放到基本生产里
//如果部门为旧品和设备 并且他们的材料为支护用品和大型材料就把他们放到基本生产里
//材料编码,金额,部门
//材料编码,金额,部门
...
@@ -9,7 +26,6 @@ export function DongMine(money, code, codess, CompositeTable, Department, classi
...
@@ -9,7 +26,6 @@ export function DongMine(money, code, codess, CompositeTable, Department, classi
item
.
v
.
v
=
item
.
v
.
v
.
replace
(
/单项卡/g
,
''
);
item
.
v
.
v
=
item
.
v
.
v
.
replace
(
/单项卡/g
,
''
);
}
}
});
});
money
.
forEach
((
item
)
=>
{
money
.
forEach
((
item
)
=>
{
item
.
remark
=
''
;
item
.
remark
=
''
;
item
.
code
=
''
;
item
.
code
=
''
;
...
@@ -101,9 +117,11 @@ export function DongMine(money, code, codess, CompositeTable, Department, classi
...
@@ -101,9 +117,11 @@ export function DongMine(money, code, codess, CompositeTable, Department, classi
case
'
选煤
'
:
case
'
选煤
'
:
item
.
r
=
DepartColumns
.
r
+
3
;
item
.
r
=
DepartColumns
.
r
+
3
;
break
;
break
;
case
'
厂区服
务
'
:
case
'
运输业
务
'
:
item
.
r
=
DepartColumns
.
r
+
1
;
item
.
r
=
DepartColumns
.
r
+
1
;
break
;
break
;
case
'
福利费-自建食堂支持
'
:
item
.
r
=
DepartColumns
.
r
+
2
default
:
default
:
// 默认情况
// 默认情况
}
}
...
@@ -112,12 +130,18 @@ export function DongMine(money, code, codess, CompositeTable, Department, classi
...
@@ -112,12 +130,18 @@ export function DongMine(money, code, codess, CompositeTable, Department, classi
}
}
}
}
});
});
// && item.r !==9 && item.c!==8
// 更新金额列
//
//
更新金额列
for
(
let
item
of
money
)
{
for
(
let
item
of
money
)
{
if
(
item
.
r
>
8
&&
item
.
c
<
10
)
{
if
(
item
.
r
>
8
&&
item
.
c
<
10
)
{
item
.
c
=
10
;
item
.
c
=
10
;
}
}
if
(
item
.
cc
==
6
&&
item
.
r
>=
8
&&
item
.
r
<=
11
){
item
.
c
=
item
.
cc
}
if
(
item
.
c
==
9
){
item
.
c
=
10
}
}
}
// 合并重复单元格数据
// 合并重复单元格数据
...
@@ -155,9 +179,9 @@ export function DongMine(money, code, codess, CompositeTable, Department, classi
...
@@ -155,9 +179,9 @@ export function DongMine(money, code, codess, CompositeTable, Department, classi
}
}
}
}
}
}
let
duplicateDatas
=
{
let
duplicateDatas
=
{
duplicateData
:
duplicateData
,
duplicateData
:
duplicateData
,
CompositeTable
:
CompositeTable
CompositeTable
:
CompositeTable
}
}
return
duplicateDatas
return
duplicateDatas
}
}
\ No newline at end of file
ruoyi-ui/src/conversion/LinxiMine.js
View file @
c6cf5960
export
function
Linxi
(
names
,
name
,
Department
,
money
,
code
,
duplicateData
,
CompositeTable
,
codess
,
classify
,
DepartmentColumns
,
codecolumn
)
{
export
function
Linxi
(
names
,
Department
,
money
,
code
,
duplicateData
,
CompositeTable
,
codess
,
classify
,
DepartmentColumns
,
codecolumn
)
{
let
nameColums
=
name
nameColums
=
nameColums
.
flat
().
filter
(
obj
=>
obj
.
v
.
hasOwnProperty
(
'
v
'
));
let
results
=
[
'
加工修理
'
]
let
insert
=
CompositeTable
[
0
].
celldata
.
filter
(
obj
=>
obj
.
v
.
v
==
'
5.其他业务成本
'
)[
0
].
r
for
(
let
i
=
0
,
k
=
0
;
i
<
CompositeTable
[
0
].
celldata
.
length
&&
k
<
results
.
length
;
i
++
)
{
if
(
CompositeTable
[
0
].
celldata
[
i
]
&&
CompositeTable
[
0
].
celldata
[
i
].
r
&&
CompositeTable
[
0
].
celldata
[
i
].
r
>=
insert
+
2
&&
CompositeTable
[
0
].
celldata
[
i
].
r
<
insert
+
4
&&
CompositeTable
[
0
].
celldata
[
i
].
c
==
0
)
{
CompositeTable
[
0
].
celldata
[
i
].
v
.
v
=
results
[
k
];
CompositeTable
[
0
].
celldata
[
i
].
v
.
m
=
results
[
k
];
k
++
;
}
}
let
name1
=
Department
let
name1
=
Department
// code 编码 name1部门名称 money金额 name1 部门名称
// code 编码 name1部门名称 money金额 name1 部门名称
// 清空属性
// 清空属性
...
@@ -12,7 +20,7 @@ export function Linxi(names,name, Department, money,code, duplicateData, Composi
...
@@ -12,7 +20,7 @@ export function Linxi(names,name, Department, money,code, duplicateData, Composi
entry
.
index
=
entry
.
r
entry
.
index
=
entry
.
r
});
});
// 合并数组
// 合并数组
let
newobj
=
[...
name1
,
...
nameColums
,
...
code
];
let
newobj
=
[...
name1
,
...
code
];
// 匹配赋值
// 匹配赋值
money
.
forEach
(
m
=>
{
money
.
forEach
(
m
=>
{
newobj
.
forEach
(
a
=>
{
newobj
.
forEach
(
a
=>
{
...
@@ -115,7 +123,7 @@ export function Linxi(names,name, Department, money,code, duplicateData, Composi
...
@@ -115,7 +123,7 @@ export function Linxi(names,name, Department, money,code, duplicateData, Composi
item
.
r
=
DepartColumns
.
r
+
1
;
item
.
r
=
DepartColumns
.
r
+
1
;
break
;
break
;
case
'
加工修理
'
:
case
'
加工修理
'
:
item
.
r
=
DepartColumns
.
r
+
4
;
item
.
r
=
DepartColumns
.
r
+
2
;
break
;
break
;
default
:
default
:
// 默认情况
// 默认情况
...
...
ruoyi-ui/src/conversion/MoneyMine.js
0 → 100644
View file @
c6cf5960
export
function
MoneyMine
(
money
,
DepartmentColumns
,
name
,
materianame
,
c
,
CompositeTable
,
headRow
)
{
let
results
=
[
'
运输业务
'
]
//先把安全费用 研发什么的插入到成本材料表中
let
insert
=
CompositeTable
[
0
].
celldata
.
filter
(
obj
=>
obj
.
v
.
v
==
'
5.其他业务成本
'
)[
0
].
r
for
(
let
i
=
0
,
k
=
0
;
i
<
CompositeTable
[
0
].
celldata
.
length
&&
k
<
results
.
length
;
i
++
)
{
if
(
CompositeTable
[
0
].
celldata
[
i
]
&&
CompositeTable
[
0
].
celldata
[
i
].
r
&&
CompositeTable
[
0
].
celldata
[
i
].
r
>=
insert
+
2
&&
CompositeTable
[
0
].
celldata
[
i
].
r
<
insert
+
4
&&
CompositeTable
[
0
].
celldata
[
i
].
c
==
0
)
{
CompositeTable
[
0
].
celldata
[
i
].
v
.
v
=
results
[
k
];
CompositeTable
[
0
].
celldata
[
i
].
v
.
m
=
results
[
k
];
k
++
;
}
}
//部门 因为部门再第0列 所以条件 obj.c不满足 需要单独写出来
let
Department
=
c
.
flat
().
filter
(
obj
=>
obj
.
c
!==
undefined
&&
obj
.
c
==
DepartmentColumns
&&
obj
.
r
>
headRow
)
//表头行数据
let
remarkColumns
=
c
.
flat
().
filter
(
obj
=>
obj
.
r
!==
undefined
&&
obj
.
r
==
headRow
)
//最后一列
let
remark
=
c
.
flat
().
filter
(
obj
=>
obj
.
c
&&
obj
.
c
==
remarkColumns
.
length
&&
obj
.
r
>
headRow
)
money
.
forEach
(
item
=>
{
item
.
v
.
name
=
''
item
.
index
=
item
.
r
,
item
.
v
.
remark
=
''
,
item
.
materianame
=
''
item
.
Department
=
''
item
.
matching
=
false
});
for
(
let
i
=
0
;
i
<
money
.
length
;
i
++
)
{
if
(
money
[
i
].
r
==
Department
[
i
].
r
)
{
money
[
i
].
Department
=
Department
[
i
].
v
.
v
;
}
if
(
money
[
i
].
r
==
name
[
i
].
r
)
{
money
[
i
].
v
.
name
=
name
[
i
].
v
.
v
;
}
if
(
money
[
i
].
r
==
materianame
[
i
].
r
)
{
money
[
i
].
materianame
=
materianame
[
i
].
v
.
v
;
}
if
(
money
[
i
].
r
==
remark
[
i
].
r
)
{
money
[
i
].
v
.
remark
=
remark
[
i
].
v
.
v
;
}
}
let
classify
=
[
{
remark
:
'
坑木
'
,
name
:
'
支-生产-大型材料,支-生产-一般材料
'
,
r
:
5
,
c
:
1
},
{
remark
:
'
坑代
'
,
name
:
'
支-生产-大型材料,支-生产-一般材料
'
,
r
:
5
,
c
:
2
},
{
remark
:
'
国配,综配
'
,
name
:
'
支-生产-大型材料,支-生产-一般材料
'
,
r
:
5
,
c
:
3
},
{
remark
:
'
工具
'
,
name
:
'
支-生产-大型材料,支-生产-一般材料
'
,
r
:
5
,
c
:
4
},
{
remark
:
'
劳保
'
,
name
:
'
支-生产-大型材料,支-生产-一般材料
'
,
r
:
5
,
c
:
6
},
{
remark
:
'
建材
'
,
name
:
'
支-生产-大型材料,支-生产-一般材料
'
,
r
:
5
,
c
:
7
},
{
remark
:
'
化工
'
,
name
:
'
支-生产-大型材料,支-生产-一般材料
'
,
r
:
5
,
c
:
8
},
]
let
SectorPlant
=
[{
Department
:
'
洗煤厂
'
,
remark
:
'
国配,综配
'
,
r
:
6
,
c
:
4
},
{
Department
:
'
洗煤厂
'
,
remark
:
'
化工
'
,
r
:
6
,
c
:
8
},]
let
organ
=
[
{
Department
:
'
机关
'
,
r
:
12
,
c
:
10
},
{
materianame
:
'
钢丝绳,轻轨,电缆,运输带,钢管
'
,
r
:
5
,
c
:
3
},
{
Department
:
'
煤制科
'
,
materianame
:
'
柴油,汽油
'
,
r
:
16
,
c
:
10
},
]
let
coal
=
[{
Department
:
'
洗煤厂
'
,
remark
:
'
国配,综配,化工
'
,
r
:
6
,
c
:
10
}]
money
.
forEach
(
item
=>
{
item
.
v
.
v
=
Math
.
abs
(
item
.
v
.
v
);
item
.
v
.
m
=
Math
.
abs
(
item
.
v
.
v
);
classify
.
forEach
(
obj
=>
{
const
classifyNames
=
obj
.
name
.
includes
(
'
,
'
)
?
obj
.
name
.
split
(
'
,
'
).
map
(
value
=>
value
.
trim
())
:
[
obj
.
name
.
trim
()];
// 含有逗号时分割,不含逗号时直接 trim
const
classifyRemarks
=
obj
.
remark
.
trim
().
includes
(
'
,
'
)
?
obj
.
remark
.
split
(
'
,
'
).
map
(
value
=>
value
.
trim
())
:
[
obj
.
remark
.
trim
()];
if
(
classifyNames
.
some
(
nameValue
=>
{
const
itemNames
=
item
.
v
.
name
.
includes
(
'
,
'
)
?
item
.
v
.
name
.
split
(
'
,
'
).
map
(
value
=>
value
.
trim
())
:
[
item
.
v
.
name
.
trim
()]
return
itemNames
.
includes
(
nameValue
);
})
&&
classifyRemarks
.
some
(
remarkValue
=>
{
const
itemRemarks
=
item
.
v
.
remark
.
trim
().
includes
(
'
,
'
)
?
item
.
v
.
remark
.
split
(
'
,
'
).
map
(
value
=>
value
.
trim
())
:
[
item
.
v
.
remark
.
trim
()];
return
itemRemarks
.
includes
(
remarkValue
)
}))
{
item
.
r
=
obj
.
r
;
item
.
c
=
obj
.
c
;
item
.
matching
=
true
}
});
SectorPlant
.
forEach
(
obj
=>
{
const
classifyNames
=
obj
.
Department
.
includes
(
'
,
'
)
?
obj
.
Department
.
split
(
'
,
'
).
map
(
value
=>
value
.
trim
())
:
[
obj
.
Department
.
trim
()];
// 含有逗号时分割,不含逗号时直接 trim
const
classifyRemarks
=
obj
.
remark
.
trim
().
includes
(
'
,
'
)
?
obj
.
remark
.
split
(
'
,
'
).
map
(
value
=>
value
.
trim
())
:
[
obj
.
remark
.
trim
()];
if
(
classifyNames
.
some
(
nameValue
=>
{
const
itemNames
=
item
.
Department
.
includes
(
'
,
'
)
?
item
.
Department
.
split
(
'
,
'
).
map
(
value
=>
value
.
trim
())
:
[
item
.
Department
.
trim
()]
return
itemNames
.
includes
(
nameValue
);
})
&&
classifyRemarks
.
some
(
remarkValue
=>
{
const
itemRemarks
=
item
.
v
.
remark
.
trim
().
includes
(
'
,
'
)
?
item
.
v
.
remark
.
split
(
'
,
'
).
map
(
value
=>
value
.
trim
())
:
[
item
.
v
.
remark
.
trim
()];
return
itemRemarks
.
includes
(
remarkValue
)
}))
{
item
.
r
=
obj
.
r
;
item
.
c
=
obj
.
c
;
item
.
matching
=
true
}
});
organ
.
forEach
(
obj
=>
{
const
checkDepartment
=
obj
.
Department
&&
(
obj
.
Department
.
includes
(
'
,
'
)
?
obj
.
Department
.
split
(
'
,
'
).
map
(
value
=>
value
.
trim
())
:
[
obj
.
Department
.
trim
()]);
const
checkMaterianame
=
obj
.
materianame
&&
(
obj
.
materianame
.
includes
(
'
,
'
)
?
obj
.
materianame
.
split
(
'
,
'
).
map
(
value
=>
value
.
trim
())
:
[
obj
.
materianame
.
trim
()]);
if
((
checkDepartment
&&
checkDepartment
.
some
(
nameValue
=>
item
.
Department
.
includes
(
nameValue
)))
||
(
checkMaterianame
&&
checkMaterianame
.
some
(
remarkValue
=>
item
.
materianame
.
includes
(
remarkValue
))))
{
item
.
r
=
obj
.
r
;
item
.
c
=
obj
.
c
;
item
.
matching
=
true
}
});
coal
.
forEach
(
obj
=>
{
const
classifyNames
=
obj
.
Department
.
includes
(
'
,
'
)
?
obj
.
Department
.
split
(
'
,
'
).
map
(
value
=>
value
.
trim
())
:
[
obj
.
Department
.
trim
()];
// 含有逗号时分割,不含逗号时直接 trim
const
classifyRemarks
=
obj
.
remark
.
trim
().
includes
(
'
,
'
)
?
obj
.
remark
.
split
(
'
,
'
).
map
(
value
=>
value
.
trim
())
:
[
obj
.
remark
.
trim
()];
if
(
classifyNames
.
some
(
nameValue
=>
{
const
itemNames
=
item
.
Department
.
includes
(
'
,
'
)
?
item
.
Department
.
split
(
'
,
'
).
map
(
value
=>
value
.
trim
())
:
[
item
.
Department
.
trim
()]
return
itemNames
.
includes
(
nameValue
);
})
&&
classifyRemarks
.
every
(
remarkValue
=>
{
const
itemRemarks
=
item
.
v
.
remark
.
trim
().
includes
(
'
,
'
)
?
item
.
v
.
remark
.
split
(
'
,
'
).
map
(
value
=>
value
.
trim
())
:
[
item
.
v
.
remark
.
trim
()];
return
itemRemarks
.
every
(
itemRemark
=>
itemRemark
!==
remarkValue
);
}))
{
item
.
r
=
obj
.
r
;
item
.
c
=
obj
.
c
;
item
.
matching
=
true
}
});
if
(
!
item
.
matching
)
{
item
.
r
=
5
item
.
c
=
10
}
});
let
duplicateData
=
[];
let
seen
=
new
Map
();
// 根据行列信息合并重复数据并记录索引
for
(
let
obj
of
money
)
{
let
key
=
obj
.
r
+
'
,
'
+
obj
.
c
;
if
(
seen
.
has
(
key
))
{
let
existingObj
=
seen
.
get
(
key
);
existingObj
.
v
.
v
+=
obj
.
v
.
v
;
existingObj
.
v
.
m
=
(
parseInt
(
existingObj
.
v
.
m
)
+
parseInt
(
obj
.
v
.
m
)).
toString
();
existingObj
.
index
.
push
(
obj
.
index
);
}
else
{
obj
.
index
=
[
obj
.
index
];
seen
.
set
(
key
,
obj
);
}
}
// 将合并后的数据放入 duplicateData 数组
for
(
let
obj
of
seen
.
values
())
{
if
(
obj
.
v
.
v
>
0
||
parseInt
(
obj
.
v
.
m
)
>
0
)
{
duplicateData
.
push
(
obj
);
}
}
duplicateData
=
duplicateData
.
map
(
item
=>
{
return
{
...
item
,
v
:
{
...
item
.
v
,
v
:
isNaN
(
item
.
v
.
v
)
?
item
.
v
.
v
:
Number
(
item
.
v
.
v
).
toFixed
(
2
)
}
};
});
// 替换金额所在列和行相同的模板表中的数据
//金额所在列和行,去模板表中查找,如果行列一致则替换
for
(
let
i
=
0
;
i
<
duplicateData
.
length
;
i
++
)
{
// // 对比 c 和 r 是否与 CompositeTable[0]["celldata"] 中相应对象相同
for
(
let
k
=
0
;
k
<
CompositeTable
[
0
][
"
celldata
"
].
length
;
k
++
)
{
if
(
duplicateData
[
i
].
r
===
CompositeTable
[
0
][
"
celldata
"
][
k
].
r
&&
duplicateData
[
i
].
c
===
CompositeTable
[
0
][
"
celldata
"
][
k
].
c
)
{
// 如果相同,则进行替换
CompositeTable
[
0
][
"
celldata
"
][
k
]
=
duplicateData
[
i
];
}
}
}
let
duplic
=
{
duplicateData
:
duplicateData
,
CompositeTable
:
CompositeTable
}
return
duplic
}
\ No newline at end of file
ruoyi-ui/src/conversion/TangshanMine copy.js
0 → 100644
View file @
c6cf5960
export
function
Tangshan
(
money
,
c
,
name
,
CompositeTable
,
headRow
)
{
//money 总金额 c导入表所有数据,name 来源类别,CompositeTable 材料汇总表数据, headRow 数据行
let
results
=
[
'
金属厂
'
]
let
insert
=
CompositeTable
[
0
].
celldata
.
filter
(
obj
=>
obj
.
v
.
v
==
'
7.代付单位(XXX单位)
'
)[
0
].
r
for
(
let
i
=
0
,
k
=
0
;
i
<
CompositeTable
[
0
].
celldata
.
length
&&
k
<
results
.
length
;
i
++
)
{
if
(
CompositeTable
[
0
].
celldata
[
i
]
&&
CompositeTable
[
0
].
celldata
[
i
].
r
&&
CompositeTable
[
0
].
celldata
[
i
].
r
>=
insert
+
1
&&
CompositeTable
[
0
].
celldata
[
i
].
r
<
insert
+
4
&&
CompositeTable
[
0
].
celldata
[
i
].
c
==
0
)
{
CompositeTable
[
0
].
celldata
[
i
].
v
.
v
=
results
[
k
];
CompositeTable
[
0
].
celldata
[
i
].
v
.
m
=
results
[
k
];
k
++
;
}
}
function
findValueInArray
(
arr
,
value
)
{
for
(
let
obj
of
arr
)
{
if
(
JSON
.
stringify
(
obj
).
includes
(
value
))
{
return
obj
;
}
}
return
null
;
}
let
targetValue
=
"
器材大类
"
;
let
resultObject
=
findValueInArray
(
c
,
targetValue
);
let
material
=
c
.
flat
().
filter
(
obj
=>
obj
.
c
&&
obj
.
c
==
resultObject
.
c
&&
obj
.
r
>
headRow
)
money
.
forEach
(
entry
=>
{
entry
.
department
=
''
;
entry
.
v
.
name
=
''
;
entry
.
v
.
material
=
''
;
entry
.
index
=
entry
.
r
});
// 匹配赋值
for
(
let
i
=
0
;
i
<
money
.
length
;
i
++
)
{
if
(
money
[
i
].
r
==
name
[
i
].
r
)
{
money
[
i
].
v
.
name
=
name
[
i
].
v
.
v
;
}
if
(
money
[
i
].
r
==
material
[
i
].
r
)
{
money
[
i
].
v
.
material
=
material
[
i
].
v
.
v
;
}
}
//对费用来源列和材料分类列进行处理
money
.
forEach
(
obj
=>
{
if
(
!
obj
.
v
.
material
)
{
obj
.
v
.
material
=
'
其他材料
'
}
if
(
obj
.
v
.
name
==
'
基本生产
'
||
obj
.
v
.
name
==
'
制造费用
'
)
{
obj
.
v
.
name
+=
'
-原煤
'
}
if
(
obj
.
v
.
name
.
includes
(
'
洗煤
'
))
{
obj
.
v
.
name
=
'
基本生产-洗煤
'
}
if
(
obj
.
v
.
name
==
'
其他业务成本
'
)
{
obj
.
v
.
name
+=
'
-厂区服务
'
}
if
(
obj
.
v
.
name
==
'
其他费用
'
)
{
obj
.
v
.
name
=
'
代付单位(XXX单位)-金属厂
'
}
// 如果不包含连字符,就在末尾添加一个连字符
if
(
obj
.
v
.
name
.
indexOf
(
'
-
'
)
===
-
1
)
{
obj
.
v
.
name
+=
'
-
'
;
}
})
//材料分类列和汇总列数值一样的话,列数就一样
money
.
forEach
(
obj
=>
{
CompositeTable
[
0
].
celldata
.
forEach
(
cell
=>
{
if
(
obj
.
v
.
material
==
cell
.
v
.
v
)
{
obj
.
c
=
cell
.
c
}
})
})
money
.
forEach
(
item
=>
{
if
(
item
.
v
.
name
!==
undefined
)
{
let
index
=
item
.
v
.
name
.
indexOf
(
"
-
"
);
if
(
index
!==
-
1
)
{
let
substrBeforeDash
=
item
.
v
.
name
.
slice
(
0
,
index
);
let
DepartColumns
=
CompositeTable
[
0
][
"
celldata
"
].
flat
().
filter
(
obj
=>
{
if
(
obj
.
v
&&
obj
.
v
.
v
&&
typeof
obj
.
v
.
v
===
'
string
'
)
{
return
obj
.
v
.
v
.
includes
(
item
.
v
.
name
.
slice
(
0
,
index
));
}
return
false
;
})[
0
];
if
(
DepartColumns
&&
DepartColumns
.
r
)
{
let
index
=
item
.
v
.
name
.
indexOf
(
"
-
"
);
if
(
index
!==
-
1
)
{
let
substrAfterDash
=
item
.
v
.
name
.
slice
(
index
+
1
);
switch
(
substrAfterDash
)
{
case
''
:
item
.
r
=
DepartColumns
.
r
;
break
;
case
'
原煤
'
:
item
.
r
=
DepartColumns
.
r
+
1
;
break
;
case
'
洗煤
'
:
item
.
r
=
DepartColumns
.
r
+
2
;
break
;
case
'
选煤
'
:
item
.
r
=
DepartColumns
.
r
+
3
;
break
;
case
'
厂区服务
'
:
item
.
r
=
DepartColumns
.
r
+
1
;
break
;
case
'
加工修理
'
:
item
.
r
=
DepartColumns
.
r
+
4
;
break
;
case
'
金属厂
'
:
item
.
r
=
DepartColumns
.
r
+
1
default
:
// 默认情况
}
}
}
}
}
});
// 同一个单元格,金额相加
let
seen
=
new
Map
();
let
duplicateData
=
[]
money
.
forEach
((
obj
)
=>
{
let
key
=
obj
.
r
+
'
,
'
+
obj
.
c
;
if
(
seen
.
has
(
key
))
{
let
existingObj
=
seen
.
get
(
key
);
existingObj
.
v
.
v
=
Number
(
existingObj
.
v
.
v
)
+
Number
(
obj
.
v
.
v
);
existingObj
.
v
.
m
=
existingObj
.
v
.
v
.
toString
();
existingObj
.
index
.
push
(
obj
.
index
);
}
else
{
obj
.
index
=
[
obj
.
index
];
seen
.
set
(
key
,
obj
);
}
});
seen
.
forEach
(
obj
=>
{
if
(
obj
.
v
.
v
>
0
||
parseInt
(
obj
.
v
.
m
)
>
0
)
{
duplicateData
.
push
(
obj
);
}
});
duplicateData
=
duplicateData
.
map
(
item
=>
{
return
{
...
item
,
v
:
{
...
item
.
v
,
v
:
isNaN
(
item
.
v
.
v
)
?
item
.
v
.
v
:
Number
(
item
.
v
.
v
).
toFixed
(
2
),
m
:
Number
(
item
.
v
.
m
).
toFixed
(
2
)
}
};
});
for
(
let
i
=
0
;
i
<
duplicateData
.
length
;
i
++
)
{
// // 对比 c 和 r 是否与 CompositeTable[0]["celldata"] 中相应对象相同
for
(
let
k
=
0
;
k
<
CompositeTable
[
0
][
"
celldata
"
].
length
;
k
++
)
{
if
(
duplicateData
[
i
].
r
===
CompositeTable
[
0
][
"
celldata
"
][
k
].
r
&&
duplicateData
[
i
].
c
===
CompositeTable
[
0
][
"
celldata
"
][
k
].
c
)
{
// 如果相同,则进行替换
CompositeTable
[
0
][
"
celldata
"
][
k
]
=
duplicateData
[
i
];
}
}
}
duplicateData
.
forEach
(
obj
=>
{
if
(
obj
.
r
>
8
){
obj
.
c
=
10
}
})
let
duplicateDatas
=
{
duplicateData
:
duplicateData
,
CompositeTable
:
CompositeTable
}
return
duplicateDatas
}
\ No newline at end of file
ruoyi-ui/src/conversion/conversion.js
View file @
c6cf5960
This diff is collapsed.
Click to expand it.
ruoyi-ui/src/conversion/danhouMine.js
View file @
c6cf5960
export
function
danMine
(
newArray
,
c
,
Department
,
money
,
code
,
classify
,
codess
)
{
export
function
danMine
(
newArray
,
c
,
Department
,
money
,
code
,
classify
,
codess
,
name
,
headRow
)
{
//单侯矿转换方法&& this.selectname.includes('单侯')
//单侯矿转换方法&& this.selectname.includes('单侯')
//特定规则 制造费用可能放也可能不放,制造费用后期可能会晒出来
let
headRows
=
newArray
[
0
].
celldata
.
flat
().
filter
(
obj
=>
obj
.
v
&&
obj
.
v
.
v
===
"
火工品
"
)[
0
]?.
r
//费用来源
//费用来源
let
fylyColumn
=
c
.
flat
().
filter
(
obj
=>
obj
.
v
&&
obj
.
v
.
v
===
"
费用来源
"
)[
0
]?.
c
let
headRows
=
newArray
[
0
].
celldata
.
flat
().
filter
(
obj
=>
obj
.
r
&&
obj
.
r
===
headRow
&&
obj
.
c
>
0
)
let
headRow
=
newArray
[
0
].
celldata
.
flat
().
filter
(
obj
=>
obj
.
r
&&
obj
.
r
===
headRows
&&
obj
.
c
>
0
)
let
fyly
=
c
.
flat
().
filter
(
obj
=>
obj
.
c
&&
obj
.
c
===
fylyColumn
&&
obj
.
r
>
0
)
// 清空money数组中的属性
// 清空money数组中的属性
money
.
forEach
(
item
=>
{
money
.
forEach
(
item
=>
{
item
.
Department
=
''
;
item
.
Department
=
''
;
...
@@ -27,7 +23,7 @@ export function danMine(newArray,c,Department,money,code,classify,codess) {
...
@@ -27,7 +23,7 @@ export function danMine(newArray,c,Department,money,code,classify,codess) {
item
.
Department
=
matchingRemark
.
v
.
v
;
item
.
Department
=
matchingRemark
.
v
.
v
;
}
}
let
matchingFyly
=
fyly
.
find
(
f
=>
f
.
r
===
item
.
r
);
let
matchingFyly
=
name
.
find
(
f
=>
f
.
r
===
item
.
r
);
if
(
matchingFyly
)
{
if
(
matchingFyly
)
{
item
.
fyly
=
matchingFyly
.
v
.
v
;
item
.
fyly
=
matchingFyly
.
v
.
v
;
}
}
...
@@ -45,6 +41,9 @@ export function danMine(newArray,c,Department,money,code,classify,codess) {
...
@@ -45,6 +41,9 @@ export function danMine(newArray,c,Department,money,code,classify,codess) {
if
(
item
.
Department
.
includes
(
'
生活
'
))
{
if
(
item
.
Department
.
includes
(
'
生活
'
))
{
item
.
Department
=
'
生活科
'
item
.
Department
=
'
生活科
'
}
}
if
(
item
.
fyly
!==
'
生产成本
'
){
item
.
Department
=
item
.
fyly
}
});
});
money
=
money
.
map
(
obj
=>
{
money
=
money
.
map
(
obj
=>
{
let
v
=
obj
.
Department
;
let
v
=
obj
.
Department
;
...
@@ -87,7 +86,9 @@ export function danMine(newArray,c,Department,money,code,classify,codess) {
...
@@ -87,7 +86,9 @@ export function danMine(newArray,c,Department,money,code,classify,codess) {
}
}
if
(
!
money
[
i
].
cc
)
{
if
(
!
money
[
i
].
cc
)
{
money
[
i
].
c
=
10
money
[
i
].
c
=
10
}
if
(
!
money
[
i
].
rr
)
{
money
[
i
].
r
=
''
}
}
}
}
let
seen
=
new
Map
();
let
seen
=
new
Map
();
...
@@ -110,6 +111,10 @@ export function danMine(newArray,c,Department,money,code,classify,codess) {
...
@@ -110,6 +111,10 @@ export function danMine(newArray,c,Department,money,code,classify,codess) {
duplicateData
.
push
(
obj
);
duplicateData
.
push
(
obj
);
}
}
}
}
duplicateData
.
forEach
(
obj
=>
{
obj
.
v
.
v
=
Number
(
obj
.
v
.
v
).
toFixed
(
2
);
obj
.
v
.
m
=
Number
(
obj
.
v
.
v
).
toFixed
(
2
);
})
for
(
let
i
=
0
;
i
<
duplicateData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
duplicateData
.
length
;
i
++
)
{
// // 对比 c 和 r 是否与 he[0]["celldata"] 中相应对象相同
// // 对比 c 和 r 是否与 he[0]["celldata"] 中相应对象相同
for
(
let
k
=
0
;
k
<
synthesis
[
0
][
"
celldata
"
].
length
;
k
++
)
{
for
(
let
k
=
0
;
k
<
synthesis
[
0
][
"
celldata
"
].
length
;
k
++
)
{
...
@@ -119,53 +124,55 @@ export function danMine(newArray,c,Department,money,code,classify,codess) {
...
@@ -119,53 +124,55 @@ export function danMine(newArray,c,Department,money,code,classify,codess) {
}
}
}
}
}
}
duplicateData
.
forEach
(
item
=>
{
let
duplicateJSON
=
JSON
.
stringify
(
duplicateData
)
const
matchedHeadRow
=
headRow
.
find
(
headItem
=>
headItem
.
c
===
item
.
c
);
duplicateJSON
=
JSON
.
parse
(
duplicateJSON
)
duplicateJSON
.
forEach
(
item
=>
{
const
matchedHeadRow
=
headRows
.
find
(
headItem
=>
headItem
.
c
===
item
.
c
);
if
(
matchedHeadRow
)
{
if
(
matchedHeadRow
)
{
item
.
v
.
material
=
matchedHeadRow
.
v
.
v
;
item
.
v
.
material
=
matchedHeadRow
.
v
.
v
;
}
}
});
});
for
(
let
i
=
0
;
i
<
duplicate
Data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
duplicate
JSON
.
length
;
i
++
)
{
if
(
duplicate
Data
[
i
].
r
>
4
&&
duplicateData
[
i
].
r
<
16
)
{
if
(
duplicate
JSON
[
i
].
r
>
4
&&
duplicateJSON
[
i
].
r
<
16
)
{
//管理费用
//管理费用
duplicate
Data
[
i
].
r
=
6
duplicate
JSON
[
i
].
r
=
6
duplicate
Data
[
i
].
c
=
12
duplicate
JSON
[
i
].
c
=
12
}
}
if
(
duplicate
Data
[
i
].
r
>
16
&&
duplicateData
[
i
].
r
<
27
)
{
if
(
duplicate
JSON
[
i
].
r
>
16
&&
duplicateJSON
[
i
].
r
<
27
)
{
//制造费用
//制造费用
duplicate
Data
[
i
].
r
=
7
duplicate
JSON
[
i
].
r
=
7
duplicate
Data
[
i
].
c
=
10
duplicate
JSON
[
i
].
c
=
10
}
}
if
(
duplicate
Data
[
i
].
r
>
28
&&
duplicateData
[
i
].
r
<
43
)
{
if
(
duplicate
JSON
[
i
].
r
>
28
&&
duplicateJSON
[
i
].
r
<
43
)
{
//基本费用
//基本费用
duplicate
Data
[
i
].
r
=
8
duplicate
JSON
[
i
].
r
=
8
}
}
if
(
duplicate
Data
[
i
].
r
>
43
&&
duplicateData
[
i
].
r
<
46
)
{
if
(
duplicate
JSON
[
i
].
r
>
43
&&
duplicateJSON
[
i
].
r
<
46
)
{
//销售费用
//销售费用
duplicate
Data
[
i
].
r
=
9
duplicate
JSON
[
i
].
r
=
9
duplicate
Data
[
i
].
c
=
10
duplicate
JSON
[
i
].
c
=
10
}
}
if
(
duplicate
Data
[
i
].
r
>
46
&&
duplicateData
[
i
].
r
<
48
)
{
if
(
duplicate
JSON
[
i
].
r
>
46
&&
duplicateJSON
[
i
].
r
<
48
||
(
!
duplicateJSON
[
i
].
r
)
)
{
//其他业务
//其他业务
duplicate
Data
[
i
].
r
=
10
duplicate
JSON
[
i
].
r
=
10
duplicate
Data
[
i
].
c
=
10
duplicate
JSON
[
i
].
c
=
10
}
}
if
(
duplicate
Data
[
i
].
r
>
49
&&
duplicateData
[
i
].
r
<
51
)
{
if
(
duplicate
JSON
[
i
].
r
>
49
&&
duplicateJSON
[
i
].
r
<
51
)
{
//安全费用
//安全费用
duplicate
Data
[
i
].
r
=
11
duplicate
JSON
[
i
].
r
=
11
duplicate
Data
[
i
].
c
=
10
duplicate
JSON
[
i
].
c
=
10
}
}
}
}
let
seens
=
new
Map
();
let
seens
=
new
Map
();
let
duplicateDatas
=
[];
let
duplicateDatas
=
[];
for
(
let
obj
of
duplicate
Data
)
{
for
(
let
obj
of
duplicate
JSON
)
{
let
key
=
obj
.
r
+
'
,
'
+
obj
.
c
;
let
key
=
obj
.
r
+
'
,
'
+
obj
.
c
;
if
(
seens
.
has
(
key
))
{
if
(
seens
.
has
(
key
))
{
let
existingObj
=
seens
.
get
(
key
);
let
existingObj
=
seens
.
get
(
key
);
...
@@ -182,8 +189,14 @@ export function danMine(newArray,c,Department,money,code,classify,codess) {
...
@@ -182,8 +189,14 @@ export function danMine(newArray,c,Department,money,code,classify,codess) {
duplicateDatas
.
push
(
obj
);
duplicateDatas
.
push
(
obj
);
}
}
}
}
duplicateJSON
=
duplicateJSON
.
filter
(
item
=>
item
.
v
&&
item
.
v
.
name
);
duplicateJSON
.
forEach
(
items
=>
{
items
.
v
.
v
=
Number
(
items
.
v
.
v
).
toFixed
(
2
);
items
.
v
.
m
=
items
.
v
.
v
.
toString
();
items
.
v
.
m
=
Number
(
items
.
v
.
m
).
toFixed
(
2
);
})
let
duplic
=
{
let
duplic
=
{
duplicateData
:
duplicate
Datas
,
duplicateData
:
duplicate
JSON
,
CompositeTable
:
synthesis
CompositeTable
:
synthesis
}
}
return
duplic
return
duplic
...
...
ruoyi-ui/src/conversion/fanMine.js
View file @
c6cf5960
...
@@ -5,6 +5,7 @@ export function fanMine(money, codess, code, CompositeTable, name) {
...
@@ -5,6 +5,7 @@ export function fanMine(money, codess, code, CompositeTable, name) {
entry
.
v
.
name
=
''
;
entry
.
v
.
name
=
''
;
//编码
//编码
entry
.
code
=
''
;
entry
.
code
=
''
;
entry
.
row
=
''
//对比编码之后的列数
//对比编码之后的列数
entry
.
coloumn
=
''
entry
.
coloumn
=
''
//所在行
//所在行
...
@@ -56,22 +57,22 @@ export function fanMine(money, codess, code, CompositeTable, name) {
...
@@ -56,22 +57,22 @@ export function fanMine(money, codess, code, CompositeTable, name) {
let
substrAfterDash
=
item
.
v
.
name
.
slice
(
index
+
1
);
let
substrAfterDash
=
item
.
v
.
name
.
slice
(
index
+
1
);
switch
(
substrAfterDash
)
{
switch
(
substrAfterDash
)
{
case
''
:
case
''
:
item
.
r
=
DepartColumns
.
r
;
item
.
r
ow
=
DepartColumns
.
r
;
break
;
break
;
case
'
原煤
'
:
case
'
原煤
'
:
item
.
r
=
DepartColumns
.
r
+
1
;
item
.
r
ow
=
DepartColumns
.
r
+
1
;
break
;
break
;
case
'
洗煤
'
:
case
'
洗煤
'
:
item
.
r
=
DepartColumns
.
r
+
2
;
item
.
r
ow
=
DepartColumns
.
r
+
2
;
break
;
break
;
case
'
选煤
'
:
case
'
选煤
'
:
item
.
r
=
DepartColumns
.
r
+
3
;
item
.
r
ow
=
DepartColumns
.
r
+
3
;
break
;
break
;
case
'
厂区服务
'
:
case
'
厂区服务
'
:
item
.
r
=
DepartColumns
.
r
+
1
;
item
.
r
ow
=
DepartColumns
.
r
+
1
;
break
;
break
;
case
'
加工修理
'
:
case
'
加工修理
'
:
item
.
r
=
DepartColumns
.
r
+
4
;
item
.
r
ow
=
DepartColumns
.
r
+
4
;
break
;
break
;
default
:
default
:
// 默认情况
// 默认情况
...
@@ -83,6 +84,7 @@ export function fanMine(money, codess, code, CompositeTable, name) {
...
@@ -83,6 +84,7 @@ export function fanMine(money, codess, code, CompositeTable, name) {
});
});
money
.
forEach
((
item
)
=>
{
money
.
forEach
((
item
)
=>
{
item
.
c
=
item
.
coloumn
?
item
.
coloumn
*
1
:
10
;
item
.
c
=
item
.
coloumn
?
item
.
coloumn
*
1
:
10
;
item
.
r
=
item
.
row
?
item
.
row
*
1
:
''
;
});
});
// 同一个单元格,金额相加
// 同一个单元格,金额相加
let
seen
=
new
Map
();
let
seen
=
new
Map
();
...
@@ -126,6 +128,7 @@ export function fanMine(money, codess, code, CompositeTable, name) {
...
@@ -126,6 +128,7 @@ export function fanMine(money, codess, code, CompositeTable, name) {
}
}
}
}
}
}
duplicateData
=
duplicateData
.
filter
(
obj
=>
obj
.
row
!==
''
)
let
duplicateDatas
=
{
let
duplicateDatas
=
{
duplicateData
:
duplicateData
,
duplicateData
:
duplicateData
,
CompositeTable
:
CompositeTable
CompositeTable
:
CompositeTable
...
...
ruoyi-ui/src/conversion/hongMine.js
View file @
c6cf5960
...
@@ -11,8 +11,10 @@ export function hongMine(money, Department, code, name, codess, newArrayhong) {
...
@@ -11,8 +11,10 @@ export function hongMine(money, Department, code, name, codess, newArrayhong) {
element
.
row
=
''
element
.
row
=
''
element
.
index
=
element
.
r
element
.
index
=
element
.
r
});
});
for
(
let
i
=
0
;
i
<
money
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
money
.
length
;
i
++
)
{
//编码列
//编码列
if
(
money
[
i
].
r
==
code
[
i
].
r
)
{
if
(
money
[
i
].
r
==
code
[
i
].
r
)
{
money
[
i
].
code
=
code
[
i
].
v
.
v
;
money
[
i
].
code
=
code
[
i
].
v
.
v
;
}
}
...
@@ -31,7 +33,7 @@ export function hongMine(money, Department, code, name, codess, newArrayhong) {
...
@@ -31,7 +33,7 @@ export function hongMine(money, Department, code, name, codess, newArrayhong) {
money
.
forEach
((
item
)
=>
{
money
.
forEach
((
item
)
=>
{
if
(
item
.
v
.
Department
.
includes
(
'
洗煤
'
))
{
if
(
item
.
v
.
Department
.
includes
(
'
洗煤
'
))
{
item
.
v
.
Department
=
'
洗煤厂
'
item
.
v
.
Department
=
'
洗煤厂
'
}
}
});
});
for
(
let
i
=
0
;
i
<
codess
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
codess
.
length
;
i
++
)
{
...
@@ -46,13 +48,10 @@ export function hongMine(money, Department, code, name, codess, newArrayhong) {
...
@@ -46,13 +48,10 @@ export function hongMine(money, Department, code, name, codess, newArrayhong) {
}
}
money
[
k
].
coloumn
=
codess
[
i
].
oneLevel
*
1
money
[
k
].
coloumn
=
codess
[
i
].
oneLevel
*
1
}
}
let
Officeexpenses
=
columnIdString
.
substring
(
0
,
4
)
if
(
Officeexpenses
==
'
6601
'
)
{
money
[
k
].
coloumn
=
9
}
}
}
}
}
money
.
forEach
(
obj
=>
{
money
.
forEach
(
obj
=>
{
let
matchedItems
=
newArrayhong
[
0
][
"
celldata
"
].
filter
(
item
=>
item
.
v
&&
item
.
v
.
v
&&
item
.
v
.
v
.
includes
(
obj
.
v
.
Department
));
let
matchedItems
=
newArrayhong
[
0
][
"
celldata
"
].
filter
(
item
=>
item
.
v
&&
item
.
v
.
v
&&
item
.
v
.
v
.
includes
(
obj
.
v
.
Department
));
if
(
matchedItems
.
length
>
0
)
{
if
(
matchedItems
.
length
>
0
)
{
...
@@ -61,7 +60,15 @@ export function hongMine(money, Department, code, name, codess, newArrayhong) {
...
@@ -61,7 +60,15 @@ export function hongMine(money, Department, code, name, codess, newArrayhong) {
obj
.
row
=
''
;
obj
.
row
=
''
;
}
}
});
});
for
(
let
k
=
0
;
k
<
money
.
length
;
k
++
)
{
let
columnIdString
=
String
(
money
[
k
].
code
);
let
Officeexpenses
=
columnIdString
.
substring
(
0
,
4
)
if
(
Officeexpenses
==
'
6601
'
&&
money
[
k
].
row
<
17
)
{
money
[
k
].
coloumn
=
9
}
}
money
.
forEach
((
item
)
=>
{
money
.
forEach
((
item
)
=>
{
item
.
c
=
item
.
coloumn
?
item
.
coloumn
*
1
:
10
;
item
.
c
=
item
.
coloumn
?
item
.
coloumn
*
1
:
10
;
item
.
r
=
item
.
row
?
item
.
row
*
1
:
''
item
.
r
=
item
.
row
?
item
.
row
*
1
:
''
});
});
...
@@ -107,18 +114,24 @@ export function hongMine(money, Department, code, name, codess, newArrayhong) {
...
@@ -107,18 +114,24 @@ export function hongMine(money, Department, code, name, codess, newArrayhong) {
}
}
}
}
}
}
let
matchedItems
=
newArrayhong
[
0
][
"
celldata
"
].
filter
(
item
=>
item
.
v
&&
(
typeof
item
.
v
.
v
===
'
string
'
&&
item
.
v
.
v
.
includes
(
'
办公费用
'
)
||
typeof
item
.
v
.
m
===
'
string
'
&&
item
.
v
.
m
.
includes
(
'
办公费用
'
)))[
0
].
r
;
let
matchedItems
=
newArrayhong
[
0
][
"
celldata
"
].
filter
(
item
=>
item
.
v
&&
(
typeof
item
.
v
.
v
===
'
string
'
&&
item
.
v
.
v
.
includes
(
'
办公费用
'
)
||
typeof
item
.
v
.
m
===
'
string
'
&&
item
.
v
.
m
.
includes
(
'
办公费用
'
)))[
0
].
c
;
duplicateData
.
forEach
(
obj
=>
{
if
(
obj
.
c
===
matchedItems
)
{
let
other
=
newArrayhong
[
0
][
"
celldata
"
].
filter
(
item
=>
item
.
v
&&
(
typeof
item
.
v
.
v
===
'
string
'
&&
item
.
v
.
v
==
'
其他材料
'
||
typeof
item
.
v
.
m
===
'
string
'
&&
item
.
v
.
m
==
'
其他材料
'
))[
0
].
c
;
obj
.
v
.
name
=
'
管理费用-
'
;
let
duplicateJSON
=
JSON
.
stringify
(
duplicateData
)
}
else
if
(
obj
.
Department
==
'
洗煤厂
'
){
duplicateJSON
=
JSON
.
parse
(
duplicateJSON
)
obj
.
v
.
name
=
'
制造费用—选混煤
'
duplicateJSON
.
forEach
(
obj
=>
{
}
else
{
if
(
obj
.
c
===
matchedItems
)
{
obj
.
v
.
name
=
'
基本生产-原煤
'
obj
.
v
.
name
=
'
管理费用-
'
;
}
obj
.
c
=
other
;
}
else
if
(
obj
.
v
.
Department
===
'
洗煤厂
'
)
{
obj
.
v
.
name
=
'
制造费用-选混煤
'
;
obj
.
c
=
other
}
else
{
obj
.
v
.
name
=
'
基本生产-原煤
'
;
}
});
});
let
duplicateDatas
=
{
let
duplicateDatas
=
{
duplicateData
:
duplicate
Data
,
duplicateData
:
duplicate
JSON
,
CompositeTable
:
newArrayhong
CompositeTable
:
newArrayhong
}
}
return
duplicateDatas
return
duplicateDatas
...
...
ruoyi-ui/src/conversion/lvMine.js
View file @
c6cf5960
export
function
lvMine
(
CompositeTable
,
cjson
,
codess
)
{
export
function
lvMine
(
CompositeTable
,
cjson
,
codess
)
{
let
results
=
[
'
10.安全费用
'
,
'
11.研究费用
'
,
'
12.维简及井巷费
'
]
let
results
=
[
'
10.安全费用
'
,
'
11.研究费用
'
,
'
12.维简及井巷费
'
]
//先把安全费用 研发什么的插入到成本材料表中
//先把安全费用 研发什么的插入到成本材料表中
let
insert
=
CompositeTable
[
0
].
celldata
.
filter
(
obj
=>
obj
.
v
.
v
==
'
9.专项储备
'
)[
0
].
r
for
(
let
i
=
0
,
k
=
0
;
i
<
CompositeTable
[
0
].
celldata
.
length
&&
k
<
results
.
length
;
i
++
)
{
for
(
let
i
=
0
,
k
=
0
;
i
<
CompositeTable
[
0
].
celldata
.
length
&&
k
<
results
.
length
;
i
++
)
{
if
(
CompositeTable
[
0
].
celldata
[
i
]
&&
CompositeTable
[
0
].
celldata
[
i
].
r
&&
CompositeTable
[
0
].
celldata
[
i
].
r
>=
23
&&
CompositeTable
[
0
].
celldata
[
i
].
r
<
26
&&
CompositeTable
[
0
].
celldata
[
i
].
c
==
0
)
{
if
(
CompositeTable
[
0
].
celldata
[
i
]
&&
CompositeTable
[
0
].
celldata
[
i
].
r
&&
CompositeTable
[
0
].
celldata
[
i
].
r
>=
insert
+
1
&&
CompositeTable
[
0
].
celldata
[
i
].
r
<
insert
+
4
&&
CompositeTable
[
0
].
celldata
[
i
].
c
==
0
)
{
CompositeTable
[
0
].
celldata
[
i
].
v
.
v
=
results
[
k
];
CompositeTable
[
0
].
celldata
[
i
].
v
.
v
=
results
[
k
];
CompositeTable
[
0
].
celldata
[
i
].
v
.
m
=
results
[
k
];
CompositeTable
[
0
].
celldata
[
i
].
v
.
m
=
results
[
k
];
k
++
;
k
++
;
...
@@ -54,7 +55,7 @@ export function lvMine(CompositeTable,cjson,codess) {
...
@@ -54,7 +55,7 @@ export function lvMine(CompositeTable,cjson,codess) {
max
.
forEach
(
obj
=>
{
max
.
forEach
(
obj
=>
{
if
(
obj
.
r
>
0
&&
obj
.
c
>=
min
)
{
if
(
obj
.
r
>
0
&&
obj
.
c
>=
min
)
{
let
coulumn
=
obj
.
c
;
let
coulumn
=
obj
.
c
;
obj
.
v
.
name
=
max
.
find
(
c
=>
c
.
c
===
coulumn
&&
c
.
r
===
0
).
v
.
v
;
obj
.
v
.
name
=
max
.
find
(
c
=>
c
.
c
===
coulumn
&&
c
.
r
===
0
)
?
.
v
.
v
;
obj
.
category
=
max
.
find
(
c
=>
c
.
c
===
coulumn
&&
c
.
r
===
1
)?.
v
.
v
;
obj
.
category
=
max
.
find
(
c
=>
c
.
c
===
coulumn
&&
c
.
r
===
1
)?.
v
.
v
;
}
}
});
});
...
@@ -70,19 +71,18 @@ export function lvMine(CompositeTable,cjson,codess) {
...
@@ -70,19 +71,18 @@ export function lvMine(CompositeTable,cjson,codess) {
});
});
const
money
=
moneycolumn
.
filter
(
obj
=>
(
obj
.
category
.
includes
(
'
单价
'
)
||
obj
.
category
.
includes
(
'
数量
'
)));
const
money
=
moneycolumn
.
filter
(
obj
=>
(
obj
.
category
.
includes
(
'
单价
'
)
||
obj
.
category
.
includes
(
'
数量
'
)));
// 计算总金额
// 计算总金额
const
result
=
[];
const
moneys
=
money
.
filter
(
obj
=>
obj
.
category
==
'
出库单价
'
)
const
map
=
new
Map
();
moneys
.
forEach
(
item
=>
{
money
.
forEach
(
item
=>
{
item
.
v
.
quantity
=
money
.
filter
(
obj
=>
obj
.
r
==
item
.
r
&&
obj
.
c
==
item
.
c
-
1
)[
0
].
v
.
v
if
(
map
.
has
(
item
.
r
))
{
if
(
item
.
v
.
v
&&
item
.
v
.
quantity
)
{
const
existingItem
=
map
.
get
(
item
.
r
);
item
.
v
.
v
=
item
.
v
.
v
*
item
.
v
.
quantity
existingItem
.
v
.
v
*=
parseFloat
(
item
.
v
.
v
);
item
.
v
.
m
=
item
.
v
.
v
}
else
{
}
else
{
map
.
set
(
item
.
r
,
{
...
item
,
v
:
{
...
item
.
v
,
v
:
parseFloat
(
item
.
v
.
v
)
},
category
:
"
总金额
"
}
);
this
.
$message
.
error
(
'
请仔细检查所导入表
'
);
}
}
});
})
map
.
forEach
(
value
=>
result
.
push
(
value
));
// 对 部门分类 进行处理
// 对 部门分类 进行处理
const
duplicateDatas
=
result
.
map
(
item
=>
{
moneys
.
forEach
(
item
=>
{
let
categories
=
item
.
v
.
name
;
let
categories
=
item
.
v
.
name
;
if
(
categories
.
includes
(
'
--
'
)
||
categories
.
includes
(
'
-
'
))
{
if
(
categories
.
includes
(
'
--
'
)
||
categories
.
includes
(
'
-
'
))
{
categories
=
categories
.
replace
(
/--/g
,
'
-
'
);
categories
=
categories
.
replace
(
/--/g
,
'
-
'
);
...
@@ -92,7 +92,7 @@ export function lvMine(CompositeTable,cjson,codess) {
...
@@ -92,7 +92,7 @@ export function lvMine(CompositeTable,cjson,codess) {
item
.
v
.
name
=
categories
;
item
.
v
.
name
=
categories
;
return
item
;
return
item
;
});
});
duplicateData
s
.
forEach
(
item
=>
{
money
s
.
forEach
(
item
=>
{
item
.
index
=
item
.
r
item
.
index
=
item
.
r
if
(
item
.
v
.
name
!==
undefined
)
{
if
(
item
.
v
.
name
!==
undefined
)
{
let
index
=
item
.
v
.
name
.
indexOf
(
"
-
"
);
let
index
=
item
.
v
.
name
.
indexOf
(
"
-
"
);
...
@@ -136,19 +136,22 @@ export function lvMine(CompositeTable,cjson,codess) {
...
@@ -136,19 +136,22 @@ export function lvMine(CompositeTable,cjson,codess) {
codess
.
forEach
(
codeItem
=>
{
codess
.
forEach
(
codeItem
=>
{
let
codeLength
=
String
(
codeItem
.
code
).
length
;
let
codeLength
=
String
(
codeItem
.
code
).
length
;
let
codeToCompare
=
String
(
codeItem
.
code
).
substring
(
0
,
codeLength
);
let
codeToCompare
=
String
(
codeItem
.
code
).
substring
(
0
,
codeLength
);
let
matchingItem
=
duplicateData
s
.
find
(
duplicateItem
=>
String
(
duplicateItem
.
code
).
startsWith
(
codeToCompare
));
let
matchingItem
=
money
s
.
find
(
duplicateItem
=>
String
(
duplicateItem
.
code
).
startsWith
(
codeToCompare
));
if
(
matchingItem
)
{
if
(
matchingItem
)
{
matchingItem
.
cc
=
codeItem
.
oneLevel
*
1
;
matchingItem
.
cc
=
codeItem
.
oneLevel
*
1
;
}
}
});
});
duplicateData
s
.
forEach
((
item
)
=>
{
money
s
.
forEach
((
item
)
=>
{
item
.
c
=
item
.
cc
?
item
.
cc
*
1
:
10
;
item
.
c
=
item
.
cc
?
item
.
cc
*
1
:
10
;
if
(
item
.
r
>
8
){
item
.
c
=
10
}
});
});
//同一个单元格的数据 金额相加。
//同一个单元格的数据 金额相加。
let
duplicateData
=
[];
let
duplicateData
=
[];
let
seen
=
new
Map
();
let
seen
=
new
Map
();
// 根据行列信息合并重复数据并记录索引
// 根据行列信息合并重复数据并记录索引
for
(
let
obj
of
duplicateData
s
)
{
for
(
let
obj
of
money
s
)
{
let
key
=
obj
.
r
+
'
,
'
+
obj
.
c
;
let
key
=
obj
.
r
+
'
,
'
+
obj
.
c
;
if
(
seen
.
has
(
key
))
{
if
(
seen
.
has
(
key
))
{
let
existingObj
=
seen
.
get
(
key
);
let
existingObj
=
seen
.
get
(
key
);
...
@@ -186,7 +189,8 @@ export function lvMine(CompositeTable,cjson,codess) {
...
@@ -186,7 +189,8 @@ export function lvMine(CompositeTable,cjson,codess) {
}
}
}
}
}
}
let
duplic
=
{
duplicateData
=
duplicateData
.
filter
(
item
=>
!
item
.
v
.
name
.
includes
(
'
研发费用
'
)
&&!
item
.
v
.
name
.
includes
(
'
安全费用
'
)
&&!
item
.
v
.
name
.
includes
(
'
维简及井巷费
'
));
let
duplic
=
{
duplicateData
:
duplicateData
,
duplicateData
:
duplicateData
,
CompositeTable
:
CompositeTable
CompositeTable
:
CompositeTable
}
}
...
...
ruoyi-ui/src/main.js
View file @
c6cf5960
...
@@ -11,7 +11,6 @@ import App from './App'
...
@@ -11,7 +11,6 @@ import App from './App'
import
store
from
'
./store
'
import
store
from
'
./store
'
import
router
from
'
./router
'
import
router
from
'
./router
'
import
permission
from
'
./directive/permission
'
import
permission
from
'
./directive/permission
'
import
'
./assets/icons
'
// icon
import
'
./assets/icons
'
// icon
import
'
./permission
'
// permission control
import
'
./permission
'
// permission control
import
{
getDicts
}
from
"
@/api/system/dict/data
"
;
import
{
getDicts
}
from
"
@/api/system/dict/data
"
;
...
...
ruoyi-ui/src/views/system/ActsupplesAll/MoneyMine.vue
0 → 100644
View file @
c6cf5960
<
template
>
<div
class=
"app-container"
>
<el-form
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
label=
"模板"
prop=
"name"
>
<el-select
v-model=
"selectedOption"
ref=
"mySelect"
size=
"mini"
@
change=
"handleOptionChange($event,
{
name: '钱家营',
id: '010105'
}, '010105')" filterable
placeholder="请选择您要查看的模板">
<el-option
v-for=
"item in depss"
:key=
"item.id"
:label=
"item.templateName"
:value=
"item.id"
:disabled=
"item.disabled"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"清洗规则"
prop=
"roleid"
>
<el-select
v-model=
"selectedRule"
ref=
"mySelect"
size=
"mini"
@
change=
"handleRuleChange"
filterable
placeholder=
"请选择您要查看的规则"
>
<el-option
v-for=
"iem in luckyrule"
:key=
"iem.id"
:label=
"iem.roleName"
:value=
"iem.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"时间"
prop=
"date"
>
<el-date-picker
@
change=
"handledateChange"
v-model=
"date"
type=
"month"
placeholder=
"选择月"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleExport"
>
导出
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-upload
type=
"file"
name=
"file"
ref=
"upload"
:before-upload=
"handleFileChange"
action=
''
accept=
'.xlsx'
:limit=
"1"
:file-list=
"fileList"
:disabled=
"disableNextButton"
:show-file-list=
false
>
<el-button
plain
size=
"mini"
icon=
"el-icon-download"
type=
"primary"
:disabled=
"disableNextButton"
@
click=
"rulesdate"
>
导入
</el-button>
</el-upload>
<el-button
:plain=
"true"
style=
"display: none;"
@
click=
"open4"
>
错误
</el-button>
</el-col>
</el-row>
<!-- luckysheet容器 -->
<div
id=
"luckysheet"
style=
"margin: 0px; padding: 0px; position: absolute; width: 100%; height:80vh; z-index: 0"
>
</div>
<div
v-if=
"showMask"
class=
"mask"
>
<div
class=
"loading-spinner"
></div>
</div>
</div>
</
template
>
<
script
src=
"@/conversion/conversion"
></
script
>
<
style
scoped
src=
"./actsuppMine.css"
></
style
>
ruoyi-ui/src/views/system/ActsupplesAll/fanMine.vue
View file @
c6cf5960
...
@@ -54,4 +54,5 @@
...
@@ -54,4 +54,5 @@
</div>
</div>
</
template
>
</
template
>
<
script
src=
"@/conversion/conversion"
></
script
>
<
script
src=
"@/conversion/conversion"
></
script
>
<
style
scoped
src=
"./actsuppMine.css"
></
style
>
<
style
scoped
src=
"./actsuppMine.css"
></
style
>
ruoyi-ui/src/views/system/historydata/index.vue
View file @
c6cf5960
...
@@ -107,10 +107,6 @@ export default {
...
@@ -107,10 +107,6 @@ export default {
name
:
'
东欢坨矿
'
,
name
:
'
东欢坨矿
'
,
id
:
'
010102
'
id
:
'
010102
'
},
},
{
name
:
'
范矿
'
,
id
:
2
},
{
{
name
:
'
范各庄
'
,
name
:
'
范各庄
'
,
id
:
'
011701
'
id
:
'
011701
'
...
...
ruoyi-ui/src/views/system/supplies/index_vue.vue
View file @
c6cf5960
This diff is collapsed.
Click to expand it.
ruoyi-ui/src/views/system/user/index.vue
View file @
c6cf5960
This diff is collapsed.
Click to expand it.
ruoyi-ui/vue.config.js
View file @
c6cf5960
...
@@ -27,15 +27,15 @@ module.exports = {
...
@@ -27,15 +27,15 @@ module.exports = {
productionSourceMap
:
false
,
productionSourceMap
:
false
,
// webpack-dev-server 相关配置
// webpack-dev-server 相关配置
devServer
:
{
devServer
:
{
// host: '
0.0.0.0
',
// host: '
localhost
',
port
:
port
,
port
:
port
,
open
:
true
,
open
:
true
,
proxy
:
{
proxy
:
{
// detail: https://cli.vuejs.org/config/#devserver-proxy
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
[
process
.
env
.
VUE_APP_BASE_API
]:
{
// target: `http://192.168.0.111
:8080`,
target
:
`http://192.168.0.88
:8080`
,
// target: `http://localhost:5001`,
// target: `http://localhost:5001`,
target
:
`http://localhost
:8080`
,
// target: `http://192.168.111.228
:8080`,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
pathRewrite
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment