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
e2e6436b
Commit
e2e6436b
authored
Oct 16, 2023
by
lvzhuangzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
清除console
parent
f9f06365
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
44 deletions
+40
-44
ruoyi-ui/src/views/system/supplies/index.vue
ruoyi-ui/src/views/system/supplies/index.vue
+40
-44
No files found.
ruoyi-ui/src/views/system/supplies/index.vue
View file @
e2e6436b
...
...
@@ -535,8 +535,7 @@ export default {
message
:
error
.
message
,
type
:
"
error
"
});
console
.
log
(
error
.
message
);
console
.
log
(
"
这里是最外面的地方
"
);
})
.
finally
(()
=>
{
// 导入完成后关闭遮罩层
...
...
@@ -564,8 +563,7 @@ export default {
message
:
error
.
message
,
type
:
"
error
"
});
console
.
log
(
error
.
message
);
console
.
log
(
"
这里是最外面的地方
"
);
})
.
finally
(()
=>
{
// 导入完成后关闭遮罩层
...
...
@@ -780,7 +778,7 @@ export default {
.
then
(
response
=>
{
let
array
=
response
.
rows
;
//console.log(array);
//luckysheet.setCellValue(12, 1, {bg:"#FF0000"})
for
(
let
i
=
parseFloat
(
sysRulez
[
0
].
re
)
+
1
,
k
=
0
;
i
<
data
.
length
;
i
++
,
k
++
)
{
let
values
=
[];
...
...
@@ -809,7 +807,7 @@ export default {
}
//循环得到汇总结果
console
.
log
(
map
);
if
(
map
.
size
===
0
)
{
throw
new
Error
(
"
导入失败,导入文件错误
"
);
}
...
...
@@ -822,7 +820,7 @@ export default {
map
.
forEach
((
value
,
key
)
=>
{
const
suffixArr
=
key
.
split
(
'
/
'
),
mat
=
suffixArr
[
2
],
depp
=
suffixArr
[
1
],
expp
=
suffixArr
[
0
];
//console.log(expp);console.log(depp);console.log(mat);
let
searchResult
=
luckysheet
.
find
(
expp
);
if
(
searchResult
.
length
!==
0
)
{
rowws
=
searchResult
[
0
].
row
;
...
...
@@ -913,7 +911,7 @@ export default {
}
catch
(
err
){
throw
new
Error
(
"
导入失败,导入文件与模板规则不匹
"
);
}
//console.log(smallMat);
asyncTasks
.
push
(
new
Promise
((
innerResolve
,
innerReject
)
=>
{
const
allNull
=
smallMat
.
every
(
item
=>
item
===
null
);
...
...
@@ -923,7 +921,7 @@ export default {
materialConvert
(
smallMat
)
.
then
(
response
=>
{
let
array
=
response
.
rows
;
//console.log(array);
//luckysheet.setCellValue(12, 1, {bg:"#FF0000"})
for
(
let
i
=
parseInt
(
sysRulez
[
0
].
re
)
+
1
;
i
<
data
.
length
;
i
++
)
{
let
values
=
[];
...
...
@@ -962,7 +960,7 @@ export default {
let
row
;
let
con
;
let
warn
=
0
;
//console.log(map);
map
.
forEach
((
value
,
key
)
=>
{
let
searchResult
;
searchResult
=
luckysheet
.
find
(
key
);
...
...
@@ -1042,7 +1040,7 @@ export default {
if
(
map2
.
size
===
0
)
{
throw
new
Error
(
"
导入失败,导入文件错误
"
);
}
//console.log(map2);
map2
.
forEach
((
value
,
key
)
=>
{
let
searchResult
;
searchResult
=
luckysheet
.
find
(
key
);
...
...
@@ -1070,7 +1068,7 @@ export default {
resolve
(
response
.
rows
);
innerResolve
();
// 标记当前异步任务完成
}).
catch
(
Error
=>
{
console
.
log
(
"
这里是单个异步请求出错处
"
);
//必须加,不能删除
innerReject
(
Error
);
// 异步请求出错
});
...
...
@@ -1138,13 +1136,12 @@ export default {
}
}
}
//console.log(newSmasll)
for (let k = 0; k < newSmasll.length; k++) {
SixList[newSmasll[k].index]='11';
m++;
}
//console.log(m)
//console.log(SixList,'1231231231231')
this.NewSixList=SixList*/
let
SixMateriel
=
[];
...
...
@@ -1154,7 +1151,7 @@ export default {
let
newSmasll
=
smallMat
;
SixMateriel
=
response
.
rows
;
NewMarterielCode
=
sortArray
(
SixMateriel
)
console
.
log
(
"
新的转换规则有
"
+
NewMarterielCode
.
length
+
"
条
"
);
// //转化编码
let
p
=
0
;
for
(
var
i
=
0
;
i
<
newSmasll
.
length
;
i
++
){
...
...
@@ -1171,9 +1168,9 @@ export default {
}
}
}
console
.
log
(
p
)
let
newSixList
=
SixList
console
.
log
(
newSixList
)
for
(
let
i
=
parseFloat
(
sysRulez
[
0
].
re
)
+
1
,
k
=
0
;
i
<
data
.
length
;
i
++
,
k
++
)
{
...
...
@@ -1191,7 +1188,7 @@ export default {
innerReject
(
error
);
// 异步请求出错
}
}
//console.log(SixList)
let
key
=
SixList
[
k
]
+
'
/
'
+
deps
[
k
];
if
(
map
.
has
(
key
))
{
let
oldValues
=
map
.
get
(
key
);
...
...
@@ -1205,7 +1202,7 @@ export default {
}
}
console
.
log
(
map
);
//循环得到汇总结果
if
(
map
.
size
===
0
)
{
throw
new
Error
(
"
导入失败,导入文件错误
"
);
...
...
@@ -1301,7 +1298,7 @@ export default {
// 计算执行时间(以毫秒为单位)
const
executionTime
=
endTime
-
startTime
;
// 输出执行时间
console
.
log
(
`代码执行时间:
${
executionTime
}
毫秒`
);
resolve
(
response
.
rows
);
innerResolve
();
// 标记当前异步任务完成
...
...
@@ -1335,7 +1332,7 @@ export default {
}
}
//console.log("smallMat="+smallMat);
}catch(err){
throw new Error("导入失败,导入文件与模板规则不匹");
}
...
...
@@ -1346,15 +1343,15 @@ export default {
throw new Error("导入失败,导入文件错误,所选文件与模板规则不匹");
}
//一部分报表的数据
//console.log('----->',smallMat);
materialList().then( response => {
//六矿物料编码数据
// console.log(response.rows,'ymy');
let array = response.rows;
//有code的数据
// console.log(array,"<-------->");
//六矿六位编码
let newSix = [];
for (let i = 0; i < array.length; i++) {
...
...
@@ -1362,7 +1359,7 @@ export default {
newSix.push(array[i]);
}
}
// console.log('6666666666666',newSix);
//六矿四位编码
let newFour = [];
for (let u = 0; u < array.length; u++) {
...
...
@@ -1370,7 +1367,7 @@ export default {
newFour.push(array[u]);
}
}
// console.log('444444444444444',newFour);
//六矿二位编码
let newTwo = [];
for (let l = 0; l < array.length; l++) {
...
...
@@ -1378,7 +1375,7 @@ export default {
newTwo.push(array[l]);
}
}
// console.log('22222222222222',newTwo);
//转换六位
let a = [];
for (let h = 0; h < smallMat.length; h++) {
...
...
@@ -1389,7 +1386,7 @@ export default {
}
}
}
//console.log('ssssssssss',a);
//删除方法
const result = smallMat.filter(item => item.code.length <= 4).map(item =>({index:item.index,code:item.code}) );
let i = 0;
...
...
@@ -1401,7 +1398,7 @@ export default {
i++;
}
}
//console.log(smallMat);
//转换四位
let b = [];
for (let h = 0; h < smallMat.length; h++) {
...
...
@@ -1413,11 +1410,10 @@ export default {
}
}
//console.log('fffffffffffff',b);
//console.log('原数组',smallMat);
let uniqueB = [...new Set(b.map(obj => obj.index))].map(index => b.find(obj => obj.index === index));
// 622
//console.log('fffffffffffff', uniqueB);
//删除方法
const re = smallMat.filter(item => item.code.length <= 4).map(item =>({index:item.index,code:item.code}) );
...
...
@@ -1430,7 +1426,7 @@ export default {
ii++;
}
}
//console.log(smallMat);
//转换二位
let c = [];
...
...
@@ -1442,7 +1438,7 @@ export default {
}
}
}
//console.log('tttttttttt',c);
//删除方法
const sult = smallMat.filter(item => item.code.length <= 4).map(item =>({index:item.index,code:item.code}) );
let iii = 0;
...
...
@@ -1454,24 +1450,24 @@ export default {
iii++;
}
}
//console.log(smallMat);
//转换其他
for (let other = 0; other < smallMat.length; other++) {
if( smallMat[other].code.length == '10'){
smallMat[other].code = 11;
}
}
//console.log(smallMat);
//合并
let newSmallMat = [...a,...uniqueB,...c,...smallMat];
//console.log(newSmallMat);
//索引排序
function newSort(arr){
arr.sort((a,b) => a.index - b.index)
return arr;
}
let newSortArray = newSort(newSmallMat);
//console.log(newSortArray);
for (let i = parseFloat(sysRulez[0].re) + 1, k = 0; i < data.length; i++, k++) {
let values = [];
if (data[i][key_i] != null) {
...
...
@@ -1506,7 +1502,7 @@ export default {
}
//循环得到汇总结果
console.log(map);
if (map.size === 0) {
throw new Error("导入失败,导入文件错误");
}
...
...
@@ -1529,7 +1525,7 @@ export default {
let warn=0;
map.forEach((value, key) => {
const suffixArr = key.split('/'), mat = suffixArr[0], depp = suffixArr[1];
//console.log(mat);console.log(depp);
let searchResult = luckysheet.find(mat);
if (searchResult.length != 0 && key != null) {
rowws = searchResult[0].row;
...
...
@@ -1589,14 +1585,14 @@ export default {
// 计算执行时间(以毫秒为单位)
const executionTime = endTime - startTime;
// 输出执行时间
console.log(`代码执行时间:${executionTime} 毫秒`);
resolve(response.rows);
innerResolve(); // 标记当前异步任务完成
/!*let find1 = luckysheet.find("合计");
let number = parseInt(find1[0].row)-1;
luckysheet.setCellValue(find1[0].row, sysRules[sysRules.length-1].ct, "=SUM(F2:F"+number+")")*!/
}).catch(Error => {
console.log("这里是单个异步请求出错处");
//必须加,不能删除
innerReject(Error); // 异步请求出错
});
...
...
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