Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄媛媛
ElectricitySheep
Commits
9bb67c72
Commit
9bb67c72
authored
Aug 19, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
d6612ef4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
104 deletions
+66
-104
LiveOrder.vue
src/components/orderMan/LiveOrder.vue
+66
-104
No files found.
src/components/orderMan/LiveOrder.vue
View file @
9bb67c72
...
...
@@ -32,15 +32,17 @@
<el-date-picker
v-model=
"dateList"
@
change=
"msg.pageIndex=1,getList()"
size=
"small"
type=
"datetimerange"
range-separator=
"至"
value-format=
"yyyy-MM-dd HH:mm:ss"
start-placeholder=
"下单开始日期"
end-placeholder=
"下单结束日期"
>
</el-date-picker>
<el-button
type=
"primary"
size=
"mini"
@
click=
"getList()"
style=
"margin-left:10px;position:relative;top:-1px;"
>
查询
</el-button>
</div>
<el-table
:data=
"tableData"
ref=
"multipleTable"
v-loading=
"loading"
border
style=
"width: 100%"
@
select=
"selectSingle"
@
select-all=
"selectAll"
>
<el-table
:data=
"tableData"
ref=
"multipleTable"
v-loading=
"loading"
border
style=
"width: 100%"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
-->
<el-table-column
width=
"55"
>
<template
slot=
"header"
slot-scope=
"scope"
>
<el-checkbox
v-model=
"isCheckAll"
@
change=
"getCheck
dData(tableData,''
)"
></el-checkbox>
<el-checkbox
v-model=
"isCheckAll"
@
change=
"getCheck
All(tableData
)"
></el-checkbox>
</
template
>
<
template
slot-scope=
"scope"
>
<el-checkbox
v-model=
"scope.row.isChecked"
@
change=
"getCheckdData
(tableData,scope.row)"
></el-checkbox>
<el-checkbox
v-model=
"scope.row.isChecked"
:disabled=
"scope.row.isCanCheck"
@
change=
"getSingleCheck
(tableData,scope.row)"
></el-checkbox>
</
template
>
</el-table-column>
<el-table-column
prop=
"OrderNo"
label=
"订单号/订单Id"
width=
"200"
>
...
...
@@ -111,10 +113,10 @@
<el-dialog
title=
"修改"
:visible
.
sync=
"updateDialog"
width=
"400px"
>
<el-form
label-width=
"50px"
>
<el-form-item
label=
"数量"
v-if=
"updateMsg.Type==1||updateMsg.Type==2"
>
<el-input
size=
"small"
v-model=
"updateMsg.LivePeopleNum"
></el-input>
<el-input
size=
"small"
@
keyup
.
native=
"checkInteger(updateMsg,'LivePeopleNum')"
v-model=
"updateMsg.LivePeopleNum"
></el-input>
</el-form-item>
<el-form-item
label=
"金额"
v-if=
"updateMsg.Type==1||updateMsg.Type==3"
>
<el-input
size=
"small"
v-model=
"updateMsg.LiveCommission"
></el-input>
<el-input
size=
"small"
@
keyup
.
native=
"checkPrice(updateMsg,'LiveCommission')"
v-model=
"updateMsg.LiveCommission"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -155,7 +157,6 @@
ERPEmpId
:
0
,
updateDialog
:
false
,
isCheckAll
:
false
,
//全选
//修改信息
updateMsg
:
{
Ids
:
''
,
...
...
@@ -167,7 +168,11 @@
isSingleCheck
:
false
,
//有过单选
firstPeoNum
:
-
1
,
AccountList
:
[],
//账户下拉
checkedDan
:
[]
//选中数
checkedDan
:
[],
//选中数
isCheckAll
:
false
,
//全选
findRow
:{},
}
},
created
()
{
...
...
@@ -197,14 +202,12 @@
this
.
loading
=
true
;
this
.
apipost
(
"/api/order/GetLiveGoodsOrderPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
console
.
log
(
res
,
'res'
);
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
var
myData
=
res
.
data
.
data
.
pageData
;
var
tempArray
=
[];
myData
.
forEach
(
x
=>
{
x
.
isChecked
=
false
;
x
.
isCanCheck
=
false
;
})
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
myData
));
}
else
{
...
...
@@ -232,6 +235,7 @@
this
.
getList
();
this
.
Success
(
res
.
data
.
message
);
this
.
ComCheckedArr
=
[];
this
.
findRow
=
{};
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
...
...
@@ -252,74 +256,64 @@
}
}
},
//单选
selectSingle
(
selection
,
row
)
{
this
.
isSingleCheck
=
true
;
if
(
selection
.
length
>
0
)
{
this
.
firstPeoNum
=
selection
[
0
].
LivePeopleNum
;
selection
.
forEach
(
x
=>
{
if
(
x
.
LivePeopleNum
!=
this
.
firstPeoNum
)
{
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
x
);
this
.
Error
(
'主播数量不一致,不能勾选!'
);
}
});
}
this
.
ComCheckedArr
=
selection
;
},
getCheckdData
(
tabledata
,
row
)
{
console
.
log
(
tabledata
,
'tabledata'
);
//自定义单选
getSingleCheck
(
tableData
,
row
){
this
.
ComCheckedArr
=
[];
//单选
if
(
row
)
{
var
findRow
=
tabledata
.
find
(
eItem
=>
eItem
.
isChecked
==
true
);
console
.
log
(
"findRow"
,
findRow
);
if
(
findRow
)
{
tabledata
.
forEach
(
x
=>
{
if
(
x
.
isChecked
)
{
if
(
x
.
LivePeopleNum
!=
findRow
.
LivePeopleNum
)
{
this
.
Info
(
"11111"
)
x
.
isChecked
=
false
;
}
this
.
ComCheckedArr
.
push
(
x
);
this
.
findRow
=
tableData
.
find
(
eItem
=>
eItem
.
isChecked
==
true
);
if
(
this
.
findRow
){
tableData
.
forEach
(
x
=>
{
if
(
x
.
LivePeopleNum
!=
this
.
findRow
.
LivePeopleNum
){
x
.
isCanCheck
=
true
;
}
})
}
}
else
{
var
findRow
=
tabledata
[
0
];
if
(
findRow
)
{
tabledata
.
forEach
(
x
=>
{
if
(
x
.
LivePeopleNum
==
findRow
.
LivePeopleNum
)
{
x
.
isChecked
=
this
.
isCheckAll
;
if
(
x
.
isChecked
){
this
.
ComCheckedArr
.
push
(
x
);
}
})
}
})
}
else
{
tableData
.
forEach
(
x
=>
{
x
.
isCanCheck
=
false
;
})
this
.
isCheckAll
=
false
;
this
.
findRow
=
{};
}
console
.
log
(
this
.
ComCheckedArr
,
'ComCheckedArr'
);
},
//多选
selectAll
(
selection
)
{
//有过单选
this
.
$refs
.
multipleTable
.
clearSelection
();
// this.$refs.multipleTable.toggleRowSelection(false);
this
.
ComCheckedArr
=
[];
if
(
this
.
isSingleCheck
)
{
selection
.
forEach
(
x
=>
{
if
(
x
.
LivePeopleNum
==
this
.
firstPeoNum
)
{
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
x
,
true
);
this
.
ComCheckedArr
.
push
(
x
);
}
});
}
else
{
var
firstPeoNum
=
selection
[
0
].
LivePeopleNum
selection
.
forEach
(
x
=>
{
if
(
x
.
LivePeopleNum
==
firstPeoNum
)
{
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
x
,
true
);
this
.
ComCheckedArr
.
push
(
x
);
//自定义多选
getCheckAll
(
tableData
){
this
.
ComCheckedArr
=
[];
if
(
this
.
isCheckAll
){
//有过单选
if
(
JSON
.
stringify
(
this
.
findRow
)
!=
"{}"
){
this
.
findRow
=
tableData
.
find
(
eItem
=>
eItem
.
isChecked
==
true
);
tableData
.
forEach
(
x
=>
{
if
(
x
.
LivePeopleNum
==
this
.
findRow
.
LivePeopleNum
){
x
.
isChecked
=
true
;
this
.
ComCheckedArr
.
push
(
x
);
}
else
{
x
.
isCanCheck
=
true
;
}
})
}
else
{
if
(
tableData
.
length
>
0
){
var
firstData
=
tableData
[
0
];
tableData
.
forEach
(
x
=>
{
if
(
x
.
LivePeopleNum
==
firstData
.
LivePeopleNum
){
x
.
isChecked
=
true
;
this
.
ComCheckedArr
.
push
(
x
);
}
else
{
x
.
isCanCheck
=
true
;
}
})
}
});
}
}
else
{
tableData
.
forEach
(
x
=>
{
x
.
isChecked
=
false
;
x
.
isCanCheck
=
false
;
})
this
.
findRow
=
{};
}
},
//点击批量修改金额
batchUpMoney
()
{
if
(
this
.
ComCheckedArr
==
0
)
{
...
...
@@ -359,7 +353,8 @@
}
var
_index
=
this
.
finMsg
.
AccountIds
.
indexOf
(
0
);
if
(
_index
>
-
1
)
{
this
.
Error
(
'请选择第'
+
_index
+
'个账户'
);
this
.
Error
(
'请选择第'
+
(
_index
+
1
)
+
'个账户'
);
return
;
}
if
(
this
.
ComCheckedArr
.
length
>
0
)
{
this
.
ComCheckedArr
.
forEach
(
x
=>
{
...
...
@@ -384,7 +379,6 @@
this
.
apipost
(
"/api/Supplier/GetClientBankAccountList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
AccountList
=
res
.
data
.
data
;
console
.
log
(
this
.
AccountList
,
'AccountList'
);
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
...
...
@@ -404,36 +398,4 @@
box-sizing
:
border-box
;
}
.LiveOrder
.LiveOrderTable
{
width
:
100%
;
border-collapse
:
collapse
;
}
.LiveOrder
.LiveOrderTable
tr
th
{
height
:
48px
;
font-size
:
14px
;
color
:
#909399
;
border
:
1px
solid
#EBEEF5
;
font-weight
:
bold
;
}
.LiveOrder
.LiveOrderTable
tr
{
background
:
#fff
;
text-align
:
center
;
height
:
50px
;
}
.LiveOrder
.LiveOrderTable
tr
td
{
font-size
:
14px
;
border
:
1px
solid
#EBEEF5
;
}
.LiveOrder
.fx_inner
:hover
td
{
background-color
:
#F5F7FA
;
}
.LiveOrder
.LiveOrderTable
td
{
transition
:
background-color
.25s
ease
;
}
</
style
>
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