Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
a0d079ae
Commit
a0d079ae
authored
May 30, 2023
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
7316f2b3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
256 additions
and
252 deletions
+256
-252
SignName.vue
src/components/SignName.vue
+205
-200
TravelContractConfirm.vue
src/components/TravelContractConfirm.vue
+1
-10
clientConfirm.vue
src/components/clientConfirm.vue
+4
-3
index.js
src/plug/index.js
+46
-39
No files found.
src/components/SignName.vue
View file @
a0d079ae
<
style
scoped
>
<
style
scoped
>
.SignName
.CanvasDiv
{
.SignName
.CanvasDiv
{
width
:
100%
;
width
:
100%
;
height
:
calc
(
100%
-
8rem
);
height
:
calc
(
100%
-
8rem
);
padding-top
:
20px
;
padding-top
:
20px
;
}
}
.SignName
.CanvasDiv
#canvas
{
width
:
100%
;
.SignName
.CanvasDiv
#canvas
{
height
:
100%
;
width
:
100%
;
}
height
:
100%
;
.SignName
.dash
{
}
padding
:
10px
;
box-sizing
:
border-box
;
.SignName
.dash
{
border
:
1px
dashed
#ccc
;
padding
:
10px
;
width
:
95%
;
box-sizing
:
border-box
;
height
:
98%
;
border
:
1px
dashed
#ccc
;
margin
:
0
auto
;
width
:
95%
;
overflow
:
hidden
;
height
:
98%
;
}
margin
:
0
auto
;
.SignName
.bg
{
overflow
:
hidden
;
}
.SignName
.bg
{
display
:
inline-block
;
display
:
inline-block
;
width
:
25px
;
width
:
25px
;
height
:
25px
;
height
:
25px
;
}
}
.SignName
.bg1
{
.SignName
.bg1
{
background-image
:
url('../assets/img/dzht/bg1.png')
;
background-image
:
url('../assets/img/dzht/bg1.png')
;
background-size
:
132px
;
background-size
:
132px
;
background-position
:
-1px
-2px
;
background-position
:
-1px
-2px
;
}
}
.SignName
.bg2
{
.SignName
.bg2
{
background-image
:
url('../assets/img/dzht/bg1.png')
;
background-image
:
url('../assets/img/dzht/bg1.png')
;
background-size
:
132px
;
background-size
:
132px
;
background-position
:
28px
-2px
;
background-position
:
28px
-2px
;
}
}
.SignName
.bottom
.el-col
>
div
{
display
:
inline-flex
;
.SignName
.bottom
.el-col
>
div
{
align-items
:
center
;
display
:
inline-flex
;
justify-content
:
center
;
align-items
:
center
;
}
justify-content
:
center
;
.SignName
.signTc
{
}
position
:
fixed
;
top
:
0
;
.SignName
.signTc
{
left
:
0
;
position
:
fixed
;
width
:
100%
;
top
:
0
;
height
:
100%
;
left
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0.5
);
width
:
100%
;
z-index
:
200
;
height
:
100%
;
text-align
:
center
;
background
:
rgba
(
0
,
0
,
0
,
0.5
);
}
z-index
:
200
;
.SignName
.signTc
.closeTc
{
text-align
:
center
;
position
:
relative
;
}
display
:
inline-block
;
width
:
60%
;
.SignName
.signTc
.closeTc
{
height
:
70px
;
position
:
relative
;
line-height
:
70px
;
display
:
inline-block
;
color
:
#fff
;
width
:
60%
;
border
:
1px
solid
#fff
;
height
:
70px
;
margin
:
0
auto
;
line-height
:
70px
;
top
:
50%
;
color
:
#fff
;
font-size
:
2rem
;
border
:
1px
solid
#fff
;
}
margin
:
0
auto
;
top
:
50%
;
font-size
:
2rem
;
}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"SignName"
>
<div
class=
"SignName"
>
<div
class=
"signTc"
v-show=
"tcStatus"
>
<div
class=
"signTc"
v-show=
"tcStatus"
>
<span
@
click=
"tcStatus=false;"
class=
"closeTc"
>
去签字
</span>
<span
@
click=
"tcStatus=false;"
class=
"closeTc"
>
去签字
</span>
</div>
<div
class=
"CliSignDiv"
style=
"height:100%;background:#fff;z-index:100"
>
<div
class=
"CanvasDiv"
>
<div
class=
"dash"
>
<div
id=
"canvas"
style=
"position:relative;top:0;"
>
</div>
</div>
</div>
</div>
<div
class=
"
CliSignDiv"
style=
"height:100%;background:#fff;z-index:100
"
>
<div
class=
"
bottom"
style=
"text-align:center;height:80px;line-height:80px
"
>
<div
class=
"CanvasDiv"
>
<el-row
>
<div
class=
"dash
"
>
<el-col
:span=
"12
"
>
<div
id=
"canvas"
style=
"position:relative;top:0;
"
>
<div
style=
"width:100%;"
@
click=
"handelClearEl()
"
>
<span
style=
"font-size:3rem;color:rgb(36, 173, 229)"
class=
"iconfont icon-zhongzhi1"
></span>
<
/div
>
<
span
style=
"font-size:2rem"
>
重置签名
</span
>
</div>
</div>
</div>
</el-col>
<el-col
:span=
"12"
>
<div
class=
"bottom"
style=
"text-align:center;height:80px;line-height:80px"
>
<div
style=
"width:100%;"
@
click=
"handelSaveEl()"
>
<el-row>
<span
style=
"font-size:3rem;color:rgb(36, 173, 229)"
class=
"iconfont icon-wancheng1"
></span>
<el-col
:span=
"12"
>
<span
style=
"font-size:2rem"
>
完成签名
</span>
<div
style=
"width:100%;"
@
click=
"handelClearEl()"
>
<!--
<span
class=
"bg bg1"
></span>
-->
<span
style=
"font-size:3rem;color:rgb(36, 173, 229)"
class=
"iconfont icon-zhongzhi1"
></span>
<span
style=
"font-size:2rem"
>
重置签名
</span>
</div>
</el-col>
<el-col
:span=
"12"
>
<div
style=
"width:100%;"
@
click=
"handelSaveEl()"
>
<!--
<span
class=
"bg bg2"
></span>
-->
<span
style=
"font-size:3rem;color:rgb(36, 173, 229)"
class=
"iconfont icon-wancheng1"
></span>
<span
style=
"font-size:2rem"
>
完成签名
</span>
</div>
</el-col>
</el-row>
<!--
<input
type=
"button"
@
click=
"handelClearEl()"
class=
"CV_Btn"
value=
"清除"
/>
<input
type=
"button"
@
click=
"handelSaveEl()"
class=
"CV_Btn"
value=
"保存"
/>
-->
</div>
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
tripBusOrderVue
from
'./busManagement/tripBusOrder.vue'
;
import
tripBusOrderVue
from
'./busManagement/tripBusOrder.vue'
;
let
canvas
=
document
.
createElement
(
"canvas"
);
let
canvas
=
document
.
createElement
(
"canvas"
);
let
cxt
=
canvas
.
getContext
(
"2d"
);
let
cxt
=
canvas
.
getContext
(
"2d"
);
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
tcStatus
:
false
,
tcStatus
:
false
,
linewidth
:
3
,
//线条粗细,选填
linewidth
:
3
,
//线条粗细,选填
color
:
"black"
,
//线条颜色,选填
color
:
"black"
,
//线条颜色,选填
background
:
"#fff"
,
//线条背景,选填
background
:
"#fff"
,
//线条背景,选填
SignInfo
:{},
SignInfo
:
{},
msg
:{
msg
:
{
TCID
:
0
,
TCID
:
0
,
orderID
:
0
orderID
:
0
,
guestId
:
0
,
},
},
}
}
},
},
created
(){
created
()
{
this
.
SignInfo
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"SignInfo"
));
this
.
SignInfo
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"SignInfo"
));
},
},
mounted
(){
mounted
()
{
this
.
msg
.
TCID
=
this
.
$route
.
query
.
TCID
;
this
.
msg
.
TCID
=
this
.
$route
.
query
.
TCID
;
this
.
msg
.
orderID
=
this
.
$route
.
query
.
orderID
;
this
.
msg
.
orderID
=
this
.
$route
.
query
.
orderID
;
this
.
getCanvas
();
this
.
getCanvas
();
document
.
getElementsByTagName
(
'body'
)[
0
].
style
=
"overscroll-behavior-y: contain;"
document
.
getElementsByTagName
(
'body'
)[
0
].
style
=
"overscroll-behavior-y: contain;"
},
},
beforeDestroy
()
{
beforeDestroy
()
{
document
.
getElementsByTagName
(
'body'
)[
0
].
style
=
""
document
.
getElementsByTagName
(
'body'
)[
0
].
style
=
""
},
},
methods
:{
methods
:
{
getCanvas
()
{
getCanvas
()
{
let
el
=
document
.
getElementById
(
"canvas"
);
let
el
=
document
.
getElementById
(
"canvas"
);
el
.
appendChild
(
canvas
);
el
.
appendChild
(
canvas
);
canvas
.
width
=
el
.
clientWidth
;
canvas
.
width
=
el
.
clientWidth
;
canvas
.
height
=
el
.
clientHeight
;
canvas
.
height
=
el
.
clientHeight
;
cxt
.
fillStyle
=
this
.
background
;
//填充绘图的背景颜色
cxt
.
fillStyle
=
this
.
background
;
//填充绘图的背景颜色
cxt
.
fillRect
(
0
,
0
,
canvas
.
width
,
canvas
.
height
);
//绘制“已填色”的矩形
cxt
.
fillRect
(
0
,
0
,
canvas
.
width
,
canvas
.
height
);
//绘制“已填色”的矩形
cxt
.
strokeStyle
=
this
.
color
;
//笔触的颜色
cxt
.
strokeStyle
=
this
.
color
;
//笔触的颜色
cxt
.
lineCap
=
"round"
;
//线条末端线帽的样式
cxt
.
lineCap
=
"round"
;
//线条末端线帽的样式
let
linewidth
=
this
.
linewidth
;
let
linewidth
=
this
.
linewidth
;
//开始绘制
//开始绘制
canvas
.
addEventListener
(
canvas
.
addEventListener
(
"touchstart"
,
"touchstart"
,
function
(
e
)
{
function
(
e
)
{
cxt
.
beginPath
();
cxt
.
beginPath
();
cxt
.
lineWidth
=
linewidth
;
//当前线条的宽度,以像素计
cxt
.
lineWidth
=
linewidth
;
//当前线条的宽度,以像素计
cxt
.
moveTo
(
e
.
changedTouches
[
0
].
pageX
,
e
.
changedTouches
[
0
].
pageY
);
cxt
.
moveTo
(
e
.
changedTouches
[
0
].
pageX
,
e
.
changedTouches
[
0
].
pageY
);
}.
bind
(
this
),
}.
bind
(
this
),
false
false
);
);
//绘制中
//绘制中
canvas
.
addEventListener
(
canvas
.
addEventListener
(
"touchmove"
,
"touchmove"
,
function
(
e
)
{
function
(
e
)
{
cxt
.
lineTo
(
e
.
changedTouches
[
0
].
pageX
,
e
.
changedTouches
[
0
].
pageY
);
cxt
.
lineTo
(
e
.
changedTouches
[
0
].
pageX
,
e
.
changedTouches
[
0
].
pageY
);
cxt
.
stroke
();
cxt
.
stroke
();
}.
bind
(
this
),
}.
bind
(
this
),
false
false
);
);
//结束绘制
//结束绘制
canvas
.
addEventListener
(
canvas
.
addEventListener
(
"touchend"
,
"touchend"
,
function
()
{
function
()
{
cxt
.
closePath
();
cxt
.
closePath
();
}.
bind
(
this
),
}.
bind
(
this
),
false
false
);
);
//开始绘制
//开始绘制
canvas
.
addEventListener
(
canvas
.
addEventListener
(
"mousedown"
,
"mousedown"
,
function
(
e
)
{
function
(
e
)
{
this
.
isMouseDown
=
tripBusOrderVue
this
.
isMouseDown
=
tripBusOrderVue
cxt
.
beginPath
();
cxt
.
beginPath
();
cxt
.
lineWidth
=
linewidth
;
//当前线条的宽度,以像素计
cxt
.
lineWidth
=
linewidth
;
//当前线条的宽度,以像素计
cxt
.
moveTo
(
e
.
pageX
-
20
,
e
.
pageY
-
20
);
cxt
.
moveTo
(
e
.
pageX
-
20
,
e
.
pageY
-
20
);
}.
bind
(
this
),
}.
bind
(
this
),
false
false
);
);
//绘制中
//绘制中
canvas
.
addEventListener
(
canvas
.
addEventListener
(
"mousemove"
,
"mousemove"
,
function
(
e
)
{
function
(
e
)
{
if
(
this
.
isMouseDown
)
{
if
(
this
.
isMouseDown
)
{
cxt
.
lineTo
(
e
.
pageX
-
20
,
e
.
pageY
-
20
);
cxt
.
lineTo
(
e
.
pageX
-
20
,
e
.
pageY
-
20
);
cxt
.
stroke
();
cxt
.
stroke
();
}
}
}.
bind
(
this
),
}.
bind
(
this
),
false
false
);
);
//结束绘制
//结束绘制
canvas
.
addEventListener
(
canvas
.
addEventListener
(
"mouseup"
,
"mouseup"
,
function
()
{
function
()
{
this
.
isMouseDown
=
false
this
.
isMouseDown
=
false
cxt
.
closePath
();
cxt
.
closePath
();
}.
bind
(
this
),
}.
bind
(
this
),
false
false
);
);
},
},
handelClearEl
()
{
handelClearEl
()
{
cxt
.
clearRect
(
0
,
0
,
canvas
.
width
,
canvas
.
height
);
cxt
.
clearRect
(
0
,
0
,
canvas
.
width
,
canvas
.
height
);
},
},
handelSaveEl
()
{
handelSaveEl
()
{
let
imgBase64
=
canvas
.
toDataURL
();
let
imgBase64
=
canvas
.
toDataURL
();
this
.
SignInfo
.
companySignature
=
imgBase64
;
this
.
SignInfo
.
companySignature
=
imgBase64
;
this
.
SaveMsg
();
this
.
SaveMsg
();
},
},
//提交数据
//提交数据
SaveMsg
(){
SaveMsg
()
{
// this.apiJavaPost("/api/contract/dosaveOrUpdate",this.SignInfo,res => {
this
.
apipost
(
"travelcontract_post_UpdateCompanySignatureService"
,
this
.
SignInfo
,
res
=>
{
this
.
apipost
(
"travelcontract_post_UpdateCompanySignatureService"
,
this
.
SignInfo
,
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
Success
(
res
.
data
.
message
);
this
.
Success
(
res
.
data
.
message
);
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"clientConfirm"
,
query
:
{
TCID
:
this
.
msg
.
TCID
,
orderID
:
this
.
msg
.
orderID
,
str
:
1
}})
name
:
"clientConfirm"
,
}
else
{
query
:
{
this
.
Error
(
res
.
data
.
message
);
TCID
:
this
.
msg
.
TCID
,
}
orderID
:
this
.
msg
.
orderID
,
},
null
);
str
:
1
,
},
guestId
:
this
.
msg
.
guestId
,
}
}
}
})
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
}
}
</
script
>
</
script
>
\ No newline at end of file
src/components/TravelContractConfirm.vue
View file @
a0d079ae
...
@@ -3681,19 +3681,10 @@
...
@@ -3681,19 +3681,10 @@
}
}
return
serviceCount
;
return
serviceCount
;
},
},
goUrl
()
{
sessionStorage
.
setItem
(
"SignInfo"
,
JSON
.
stringify
(
this
.
dataList
))
this
.
$router
.
push
({
name
:
"SignName"
,
query
:
{
ContractId
:
this
.
msg
.
ContractId
,
}
})
},
ChangeTab
(
num
)
{
ChangeTab
(
num
)
{
this
.
ActiveTab
=
num
;
this
.
ActiveTab
=
num
;
},
},
//获取数据
//获取数据
getList
()
{
getList
()
{
this
.
apipost
(
this
.
apipost
(
...
...
src/components/clientConfirm.vue
View file @
a0d079ae
...
@@ -2115,6 +2115,7 @@
...
@@ -2115,6 +2115,7 @@
query
:
{
query
:
{
TCID
:
this
.
msg
.
TCID
,
TCID
:
this
.
msg
.
TCID
,
orderID
:
this
.
msg
.
orderID
,
orderID
:
this
.
msg
.
orderID
,
guestId
:
this
.
msg
.
guestId
}
}
})
})
},
},
...
@@ -2123,7 +2124,7 @@
...
@@ -2123,7 +2124,7 @@
},
},
//获取数据
//获取数据
getList
()
{
getList
()
{
// this.apiJavaPost("/api/contract/getContractInfo", this.msg, res => {
this
.
apipost
(
"travelcontract_post_GetContractInfoService"
,
this
.
msg
,
res
=>
{
this
.
apipost
(
"travelcontract_post_GetContractInfoService"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
dataList
=
res
.
data
.
data
;
this
.
dataList
=
res
.
data
.
data
;
...
@@ -2219,7 +2220,7 @@
...
@@ -2219,7 +2220,7 @@
},
},
//提交数据
//提交数据
SaveMsg
()
{
SaveMsg
()
{
// this.apiJavaPost("/api/contract/dosaveOrUpdate", this.dataList, res => {
this
.
apipost
(
"travelcontract_post_UpdateCompanySignatureService"
,
this
.
dataList
,
res
=>
{
this
.
apipost
(
"travelcontract_post_UpdateCompanySignatureService"
,
this
.
dataList
,
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
Success
(
res
.
data
.
message
);
this
.
Success
(
res
.
data
.
message
);
...
@@ -2246,7 +2247,7 @@
...
@@ -2246,7 +2247,7 @@
this
.
getList
();
this
.
getList
();
this
.
getCanvas
();
this
.
getCanvas
();
}
catch
(
error
)
{
}
catch
(
error
)
{
//alert("mounted:"+error.message)
}
}
}
}
};
};
...
...
src/plug/index.js
View file @
a0d079ae
...
@@ -119,9 +119,9 @@ export default {
...
@@ -119,9 +119,9 @@ export default {
let
lxymallUrl
=
''
;
//国内游api
let
lxymallUrl
=
''
;
//国内游api
let
crmUrl
=
""
;
//crm API
let
crmUrl
=
""
;
//crm API
let
locationName
=
window
.
location
.
hostname
;
let
locationName
=
window
.
location
.
hostname
;
//
domainUrl = "http://192.168.10.128";
domainUrl
=
"http://192.168.10.128"
;
// domainUrl = "http://192.168.10.9:8083" // 刘东电脑
// domainUrl = "http://192.168.10.9:8083" // 刘东电脑
domainUrl
=
"http://192.168.10.226"
;
//
domainUrl = "http://192.168.10.226";
//domainUrl = "http://reborn.oytour.com";
//domainUrl = "http://reborn.oytour.com";
let
crmLocalFileStreamDownLoadUrl
=
""
;
let
crmLocalFileStreamDownLoadUrl
=
""
;
crmLocalFileStreamDownLoadUrl
=
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://crm.oytour.com"
:
"http://testcrm.oytour.com"
;
crmLocalFileStreamDownLoadUrl
=
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://crm.oytour.com"
:
"http://testcrm.oytour.com"
;
...
@@ -253,7 +253,7 @@ export default {
...
@@ -253,7 +253,7 @@ export default {
}
}
//HTTP提交数据
//HTTP提交数据
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
,
isTerminate
)
{
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
,
isTerminate
)
{
if
(
this
.
$route
.
name
.
indexOf
(
'login'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'clientConfirm'
)
===
-
1
&&
if
(
this
.
$route
.
name
.
indexOf
(
'login'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'clientConfirm'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'confirmationOrderDownLoad'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'PrintPage'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'confirmationOrderDownLoad'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'PrintPage'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'TravelContractConfirm'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'ViittoContractConfirm'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'TravelContractConfirm'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'ViittoContractConfirm'
)
===
-
1
&&
...
@@ -283,11 +283,13 @@ export default {
...
@@ -283,11 +283,13 @@ export default {
}
else
if
(
this
.
$route
.
path
==
"/clientConfirm"
)
{
}
else
if
(
this
.
$route
.
path
==
"/clientConfirm"
)
{
let
TCID
=
this
.
$route
.
query
.
TCID
;
let
TCID
=
this
.
$route
.
query
.
TCID
;
let
orderID
=
this
.
$route
.
query
.
orderID
;
let
orderID
=
this
.
$route
.
query
.
orderID
;
let
guestId
=
this
.
$route
.
query
.
guestId
;
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"clientConfirm"
,
name
:
"clientConfirm"
,
query
:
{
query
:
{
TCID
:
TCID
,
TCID
:
TCID
,
orderID
:
orderID
orderID
:
orderID
,
guestId
:
guestId
,
}
}
})
})
}
else
if
(
this
.
$route
.
path
==
"/TravelContractConfirm"
)
{
}
else
if
(
this
.
$route
.
path
==
"/TravelContractConfirm"
)
{
...
@@ -338,27 +340,30 @@ export default {
...
@@ -338,27 +340,30 @@ export default {
let
pending
=
[];
//声明一个数组用于存储每个请求的取消函数和axios标识
let
pending
=
[];
//声明一个数组用于存储每个请求的取消函数和axios标识
let
cancelToken
=
axios
.
CancelToken
;
let
cancelToken
=
axios
.
CancelToken
;
let
removePending
=
(
config
)
=>
{
let
removePending
=
(
config
)
=>
{
for
(
let
p
in
pending
)
{
for
(
let
p
in
pending
)
{
if
(
pending
[
p
].
u
===
config
.
url
+
'&'
+
config
.
method
)
{
//当当前请求在数组中存在时执行函数体
if
(
pending
[
p
].
u
===
config
.
url
+
'&'
+
config
.
method
)
{
//当当前请求在数组中存在时执行函数体
pending
[
p
].
f
();
//执行取消操作
pending
[
p
].
f
();
//执行取消操作
pending
.
splice
(
p
,
1
);
pending
.
splice
(
p
,
1
);
}
}
}
}
}
}
// 我的财务单防止多次请求导致数据混乱
// 我的财务单防止多次请求导致数据混乱
if
(
isTerminate
>
0
)
{
if
(
isTerminate
>
0
)
{
this
.
$http
.
interceptors
.
request
.
use
(
config
=>
{
this
.
$http
.
interceptors
.
request
.
use
(
config
=>
{
removePending
(
config
);
//在一个axios发送前执行一下取消操作
removePending
(
config
);
//在一个axios发送前执行一下取消操作
config
.
cancelToken
=
new
cancelToken
((
c
)
=>
{
config
.
cancelToken
=
new
cancelToken
((
c
)
=>
{
// 这里的axios标识我是用请求地址&请求方式拼接的字符串,当然你可以选择其他的一些方式
// 这里的axios标识我是用请求地址&请求方式拼接的字符串,当然你可以选择其他的一些方式
pending
.
push
({
u
:
config
.
url
+
'&'
+
config
.
method
,
f
:
c
});
pending
.
push
({
u
:
config
.
url
+
'&'
+
config
.
method
,
f
:
c
});
});
});
return
Promise
.
resolve
(
config
)
return
Promise
.
resolve
(
config
)
},
error
=>
{
},
error
=>
{
return
Promise
.
reject
(
error
)
return
Promise
.
reject
(
error
)
})
})
}
}
this
.
$http
.
post
(
apiurl
,
postData
,
{
this
.
$http
.
post
(
apiurl
,
postData
,
{
headers
:
{
headers
:
{
...
@@ -377,8 +382,8 @@ export default {
...
@@ -377,8 +382,8 @@ export default {
successCall
(
res
);
successCall
(
res
);
}
}
},
faildCall
)
},
faildCall
)
},
},
// CRM接口
// CRM接口
...
@@ -445,11 +450,13 @@ export default {
...
@@ -445,11 +450,13 @@ export default {
}
else
if
(
this
.
$route
.
path
==
"/clientConfirm"
)
{
}
else
if
(
this
.
$route
.
path
==
"/clientConfirm"
)
{
let
TCID
=
this
.
$route
.
query
.
TCID
;
let
TCID
=
this
.
$route
.
query
.
TCID
;
let
orderID
=
this
.
$route
.
query
.
orderID
;
let
orderID
=
this
.
$route
.
query
.
orderID
;
let
guestId
=
this
.
$route
.
query
.
guestId
;
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"clientConfirm"
,
name
:
"clientConfirm"
,
query
:
{
query
:
{
TCID
:
TCID
,
TCID
:
TCID
,
orderID
:
orderID
orderID
:
orderID
,
guestId
:
guestId
}
}
})
})
}
else
if
(
this
.
$route
.
path
==
"/TravelContractConfirm"
)
{
}
else
if
(
this
.
$route
.
path
==
"/TravelContractConfirm"
)
{
...
@@ -1657,32 +1664,32 @@ export default {
...
@@ -1657,32 +1664,32 @@ export default {
window
.
open
(
newUrl
.
href
,
'_blank'
);
window
.
open
(
newUrl
.
href
,
'_blank'
);
}
}
//验证文件格式
//验证文件格式
Vue
.
prototype
.
verificationFile
=
function
(
img
,
type
)
{
Vue
.
prototype
.
verificationFile
=
function
(
img
,
type
)
{
if
(
type
==
1
)
{
if
(
type
==
1
)
{
if
(
img
.
indexOf
(
'.DOCX'
)
!=-
1
||
img
.
indexOf
(
'.docx'
)
!=-
1
if
(
img
.
indexOf
(
'.DOCX'
)
!=
-
1
||
img
.
indexOf
(
'.docx'
)
!=
-
1
||
||
img
.
indexOf
(
'.DOC'
)
!=-
1
||
img
.
indexOf
(
'.doc'
)
!=-
1
img
.
indexOf
(
'.DOC'
)
!=
-
1
||
img
.
indexOf
(
'.doc'
)
!=
-
1
||
||
img
.
indexOf
(
'.XLSX'
)
!=-
1
||
img
.
indexOf
(
'.xlsx'
)
!=-
1
img
.
indexOf
(
'.XLSX'
)
!=
-
1
||
img
.
indexOf
(
'.xlsx'
)
!=
-
1
||
||
img
.
indexOf
(
'.XLS'
)
!=-
1
||
img
.
indexOf
(
'.xls'
)
!=-
1
img
.
indexOf
(
'.XLS'
)
!=
-
1
||
img
.
indexOf
(
'.xls'
)
!=
-
1
||
||
img
.
indexOf
(
'.PPT'
)
!=-
1
||
img
.
indexOf
(
'.ppt'
)
!=-
1
img
.
indexOf
(
'.PPT'
)
!=
-
1
||
img
.
indexOf
(
'.ppt'
)
!=
-
1
||
||
img
.
indexOf
(
'.PPTX'
)
!=-
1
||
img
.
indexOf
(
'.pptx'
)
!=-
1
img
.
indexOf
(
'.PPTX'
)
!=
-
1
||
img
.
indexOf
(
'.pptx'
)
!=
-
1
||
||
img
.
indexOf
(
'.PDF'
)
!=-
1
||
img
.
indexOf
(
'.pdf'
)
!=-
1
)
{
img
.
indexOf
(
'.PDF'
)
!=
-
1
||
img
.
indexOf
(
'.pdf'
)
!=
-
1
)
{
return
true
return
true
}
else
{
}
else
{
return
false
return
false
}
}
}
}
if
(
type
==
3
)
{
if
(
type
==
3
)
{
if
(
img
.
indexOf
(
'.png'
)
!=-
1
||
img
.
indexOf
(
'.PNG'
)
!=-
1
if
(
img
.
indexOf
(
'.png'
)
!=
-
1
||
img
.
indexOf
(
'.PNG'
)
!=
-
1
||
||
img
.
indexOf
(
'.GIF'
)
!=-
1
||
img
.
indexOf
(
'.gif'
)
!=-
1
img
.
indexOf
(
'.GIF'
)
!=
-
1
||
img
.
indexOf
(
'.gif'
)
!=
-
1
||
||
img
.
indexOf
(
'.JPEG'
)
!=-
1
||
img
.
indexOf
(
'.jpeg'
)
!=-
1
img
.
indexOf
(
'.JPEG'
)
!=
-
1
||
img
.
indexOf
(
'.jpeg'
)
!=
-
1
||
||
img
.
indexOf
(
'.JPG'
)
!=-
1
||
img
.
indexOf
(
'.jpg'
)
!=-
1
img
.
indexOf
(
'.JPG'
)
!=
-
1
||
img
.
indexOf
(
'.jpg'
)
!=
-
1
||
||
img
.
indexOf
(
'.BMP'
)
!=-
1
||
img
.
indexOf
(
'.bmp'
)
!=-
1
)
{
img
.
indexOf
(
'.BMP'
)
!=
-
1
||
img
.
indexOf
(
'.bmp'
)
!=
-
1
)
{
return
true
return
true
}
else
{
}
else
{
return
false
return
false
}
}
}
}
}
}
}
}
}
}
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