Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
ruitu-fahuoyi-exension
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖健文
ruitu-fahuoyi-exension
Commits
941cc279
Commit
941cc279
authored
Nov 04, 2022
by
liuyanfang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加发货失败关闭方案
parent
10682647
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
bookingV2.ts
src/content/bookingV2.ts
+14
-2
No files found.
src/content/bookingV2.ts
View file @
941cc279
...
...
@@ -18,7 +18,9 @@ let domEle = {
tableResult
:
():
any
=>
document
.
querySelector
(
"#ewaybill-result-table > div > div.ant-table-body > table"
),
btnClose
:
():
any
=>
document
.
querySelector
(
"div.ant-modal-footer button:nth-child(3)"
)
,
btnDeliver
:
():
any
=>
document
.
querySelector
(
"div.ant-modal-footer button:nth-child(2)"
)
,
}
deliverResult
:():
any
=>
document
.
querySelector
(
".ant-modal-body>div.ant-table-wrapper .ant-table-tbody"
),
deliverClose
:
():
any
=>
document
.
querySelector
(
"div.ant-modal-footer button"
)
,
}
async
function
booking
(
waybillTemplateTitle
:
string
,
orderNo
:
string
,
shopId
:
string
)
{
let
result
=
{
status
:
4
,
...
...
@@ -122,7 +124,7 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri
printReslut
.
list
.
push
(
rowObject
)
}
result
.
data
=
printReslut
;
console
.
log
(
result
,
rowResultList
);
//
console.log(result,rowResultList);
// 如果所有的订单都打印失败则,等会再发货,关闭弹窗
if
(
rowResultList
.
every
((
item
:
any
)
=>
item
.
includes
(
'class="text-error"'
))){
chooseIndex
=
-
1
...
...
@@ -136,6 +138,16 @@ async function booking(waybillTemplateTitle: string, orderNo: string,shopId:stri
console
.
log
(
'马上发货'
);
simulateMouseClick
(
domEle
.
btnDeliver
());
}
await
delayDate
(
1000
);
// console.log('xxxx',domEle.deliverResult(),domEle.deliverClose());
if
(
domEle
.
deliverResult
()){
// 关闭
simulateMouseClick
(
domEle
.
deliverClose
());
}
// for (let rowIter = 1; rowIter < domEle.deliverResult().rows.length; rowIter++) {
// let rowDeliverHTML = domEle.tableResult().rows[rowIter].cells[3].innerHTML
// rowDeliverList.push(rowDeliverHTML)
// }
return
result
;
}
...
...
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