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
a3d2147a
Commit
a3d2147a
authored
Feb 14, 2023
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复合同功能
parent
5da0ded0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1750 additions
and
1602 deletions
+1750
-1602
package-lock.json
package-lock.json
+72
-5
TravelContractDetail.vue
src/components/TravelContractDetail.vue
+1
-1
TravelContractNew.vue
src/components/TravelContractNew.vue
+66
-7
clientConfirm.vue
src/components/clientConfirm.vue
+44
-22
index.js
src/plug/index.js
+1567
-1567
No files found.
package-lock.json
View file @
a3d2147a
...
...
@@ -515,7 +515,6 @@
"version"
:
"1.0.10"
,
"resolved"
:
"https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz"
,
"integrity"
:
"sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="
,
"dev"
:
true
,
"requires"
:
{
"sprintf-js"
:
"~1.0.2"
}
...
...
@@ -1685,6 +1684,34 @@
"integrity"
:
"sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
,
"dev"
:
true
},
"bmaplib.curveline"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmmirror.com/bmaplib.curveline/-/bmaplib.curveline-1.0.0.tgz"
,
"integrity"
:
"sha512-9wcFMVhiYxNPqpvsLDAADn3qDhNzXp2mA6VyHSHg2XOAgSooC7ZiujdFhy0sp+0QYjTfJ/MjmLuNoUg2HHxH4Q=="
},
"bmaplib.heatmap"
:
{
"version"
:
"1.0.4"
,
"resolved"
:
"https://registry.npmmirror.com/bmaplib.heatmap/-/bmaplib.heatmap-1.0.4.tgz"
,
"integrity"
:
"sha512-rmhqUARBpUSJ9jXzUI2j7dIOqnc38bqubkx/8a349U2qtw/ulLUwyzRD535OrA8G7w5cz4aPKm6/rNvUAarg/Q=="
},
"bmaplib.lushu"
:
{
"version"
:
"1.0.7"
,
"resolved"
:
"https://registry.npmmirror.com/bmaplib.lushu/-/bmaplib.lushu-1.0.7.tgz"
,
"integrity"
:
"sha512-LVvgpESPii6xGxyjnQjq8u+ic4NjvhdCPV/RiSS/PGTUdZKeTDS7prSpleJLZH3ES0+oc0gYn8bw0LtPYUSz2w=="
},
"bmaplib.markerclusterer"
:
{
"version"
:
"1.0.13"
,
"resolved"
:
"https://registry.npmmirror.com/bmaplib.markerclusterer/-/bmaplib.markerclusterer-1.0.13.tgz"
,
"integrity"
:
"sha512-VrLyWSiuDEVNi0yUfwOhFQ6z1oEEHS4w36GNu3iASu6p52QIx9uAXMUkuSCHReNR0bj2Cp9SA1dSx5RpojXajQ=="
,
"requires"
:
{
"bmaplib.texticonoverlay"
:
"^1.0.2"
}
},
"bmaplib.texticonoverlay"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmmirror.com/bmaplib.texticonoverlay/-/bmaplib.texticonoverlay-1.0.2.tgz"
,
"integrity"
:
"sha512-4ZTWr4ZP3B6qEWput5Tut16CfZgII38YwM3bpyb4gFTQyORlKYryFp9WHWrwZZaHlOyYDAXG9SX0hka43jTADg=="
},
"bn.js"
:
{
"version"
:
"4.11.8"
,
"resolved"
:
"https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz"
,
...
...
@@ -3842,8 +3869,7 @@
"entities"
:
{
"version"
:
"1.1.1"
,
"resolved"
:
"https://registry.npmjs.org/entities/-/entities-1.1.1.tgz"
,
"integrity"
:
"sha1-blwtClYhtdra7O+AuQ7ftc13cvA="
,
"dev"
:
true
"integrity"
:
"sha1-blwtClYhtdra7O+AuQ7ftc13cvA="
},
"errno"
:
{
"version"
:
"0.1.7"
,
...
...
@@ -7069,6 +7095,14 @@
"type-check"
:
"~0.3.2"
}
},
"linkify-it"
:
{
"version"
:
"2.2.0"
,
"resolved"
:
"https://registry.npmmirror.com/linkify-it/-/linkify-it-2.2.0.tgz"
,
"integrity"
:
"sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw=="
,
"requires"
:
{
"uc.micro"
:
"^1.0.1"
}
},
"load-json-file"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz"
,
...
...
@@ -7284,6 +7318,18 @@
"object-visit"
:
"^1.0.0"
}
},
"markdown-it"
:
{
"version"
:
"8.4.2"
,
"resolved"
:
"https://registry.npmmirror.com/markdown-it/-/markdown-it-8.4.2.tgz"
,
"integrity"
:
"sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ=="
,
"requires"
:
{
"argparse"
:
"^1.0.7"
,
"entities"
:
"~1.1.1"
,
"linkify-it"
:
"^2.0.0"
,
"mdurl"
:
"^1.0.1"
,
"uc.micro"
:
"^1.0.5"
}
},
"material-colors"
:
{
"version"
:
"1.2.6"
,
"resolved"
:
"http://registry.npm.taobao.org/material-colors/download/material-colors-1.2.6.tgz"
,
...
...
@@ -7317,6 +7363,11 @@
"integrity"
:
"sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA=="
,
"dev"
:
true
},
"mdurl"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmmirror.com/mdurl/-/mdurl-1.0.1.tgz"
,
"integrity"
:
"sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="
},
"media-typer"
:
{
"version"
:
"0.3.0"
,
"resolved"
:
"https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
,
...
...
@@ -11532,8 +11583,7 @@
"sprintf-js"
:
{
"version"
:
"1.0.3"
,
"resolved"
:
"https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz"
,
"integrity"
:
"sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
,
"dev"
:
true
"integrity"
:
"sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
},
"ssf"
:
{
"version"
:
"0.10.2"
,
...
...
@@ -12310,6 +12360,11 @@
"resolved"
:
"https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz"
,
"integrity"
:
"sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
"uc.micro"
:
{
"version"
:
"1.0.6"
,
"resolved"
:
"https://registry.npmmirror.com/uc.micro/-/uc.micro-1.0.6.tgz"
,
"integrity"
:
"sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="
},
"uglify-js"
:
{
"version"
:
"3.3.18"
,
"resolved"
:
"https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.18.tgz"
,
...
...
@@ -12959,6 +13014,18 @@
"uppercamelcase"
:
"^1.1.0"
}
},
"vue-baidu-map"
:
{
"version"
:
"0.21.22"
,
"resolved"
:
"https://registry.npmmirror.com/vue-baidu-map/-/vue-baidu-map-0.21.22.tgz"
,
"integrity"
:
"sha512-WQMPCih4UTh0AZCKKH/OVOYnyAWjfRNeK6BIeoLmscyY5aF8zzlJhz/NOHLb3mdztIpB0Z6aohn4Jd9mfCSjQw=="
,
"requires"
:
{
"bmaplib.curveline"
:
"^1.0.0"
,
"bmaplib.heatmap"
:
"^1.0.4"
,
"bmaplib.lushu"
:
"^1.0.7"
,
"bmaplib.markerclusterer"
:
"^1.0.13"
,
"markdown-it"
:
"^8.4.0"
}
},
"vue-draggable-resizable"
:
{
"version"
:
"1.7.2"
,
"resolved"
:
"https://registry.npmjs.org/vue-draggable-resizable/-/vue-draggable-resizable-1.7.2.tgz"
,
...
...
src/components/TravelContractDetail.vue
View file @
a3d2147a
...
...
@@ -742,7 +742,7 @@
<td>
旅游者代表签字(盖章):
</td>
<td>
<span>
{{
dataList
.
clientName
}}
</span>
<img
class=
"signDiv"
:src=
"dataList.companySignature"
alt=
""
>
<img
class=
"signDiv"
:src=
"dataList.companySignature"
v-if=
"dataList.companySignature"
alt=
""
>
</td>
<td>
出境社盖章:
...
...
src/components/TravelContractNew.vue
View file @
a3d2147a
...
...
@@ -293,6 +293,9 @@
<span
style=
"color:blue;font-size:14px;"
>
{{
CtObj
.
contractNum
}}
</span>
</span>
<div
class=
"pull-right"
>
<input
type=
"button"
class=
"TCbtn-info"
v-if=
"CtObj.companySignature=='' && CtObj.auditContract==2"
@
click=
"isShowFade=true,GetQrCode()"
value=
"客户签字链接"
/>
<span
v-if=
"CtObj.auditContract==1"
style=
"font-size:12px;color:red;"
>
等待行政审批通过后获取签字链接
</span>
<input
type=
"button"
v-if=
"CtObj.status==1&&CtObj.auditContract==0"
class=
"TCbtn-info"
@
click=
"sendAudit()"
value=
"提交审核"
/>
<input
type=
"button"
v-if=
"CtObj.status==1&&CtObj.auditContract==3"
class=
"TCbtn-info"
@
click=
"sendAudit()"
...
...
@@ -300,8 +303,8 @@
<input
type=
"button"
class=
"TCbtn-info"
v-if=
"CtObj.status==1"
@
click=
"goUrl()"
value=
"预览"
>
<input
type=
"button"
class=
"TCbtn-info"
v-if=
"CtObj.auditContract==2"
@
click=
"getinvalid()"
value=
"作废"
>
<input
type=
"button"
class=
"TCbtn-info"
@
click=
"dialogVisible=true,getGuestList()"
value=
"复制合同"
/>
<input
type=
"button"
class=
"TCbtn-info"
v-if=
"CtObj.status==1"
@
click=
"msgDialog=true,getMsgList()"
value=
"发送短信"
/>
<
!--
<
input
type=
"button"
class=
"TCbtn-info"
v-if=
"CtObj.status==1"
@
click=
"msgDialog=true,getMsgList()"
value=
"发送短信"
/>
-->
<input
type=
"button"
v-if=
"CtObj.auditContract!=2"
class=
"btn-warning"
@
click=
"submitForm('CtObj')"
value=
"保存"
/>
</div>
...
...
@@ -891,11 +894,16 @@
</td>
</tr>
<tr>
<td
colspan=
"5"
>
日本周游
</td>
<td
colspan=
"5"
>
<div
style=
"display:flex"
>
<span>
地接社名称:
</span>
<div
contenteditable=
"true"
style=
"width:250px;"
></div>
</div>
</td>
</tr>
<tr>
<
!--
<
tr>
<td
colspan=
"5"
>
地址:
</td>
</tr>
</tr>
-->
<tr>
<td
style=
"width:15%"
>
行程时间
</td>
<td
style=
"width:50%"
>
主要景点名称(游览时间)
</td>
...
...
@@ -1193,6 +1201,14 @@
</tr>
</table>
</el-dialog>
<div
class=
"fade"
v-show=
"isShowFade"
></div>
<div
class=
"qrCodeDiv"
v-show=
"isShowFade"
>
<div
style=
"margin-top:15px;"
>
请扫码签字
</div>
<div
id=
"qrcode"
style=
"margin:25px;"
ref=
"qrcode"
>
<img
class=
"WeiXinShare"
:src=
"'data:image/png;base64,'+QRCodeStr"
/>
</div>
<i
class=
"iconfont icon-cha Ec_cha"
@
click=
"isShowFade=false"
></i>
</div>
</div>
</template>
<
script
>
...
...
@@ -1230,6 +1246,8 @@
return
{
//国家列表
CountryList
:
[],
isShowFade
:
false
,
QRCodeStr
:
""
,
//客户省份列表
ClientProvinceList
:
[],
//客户城市列表
...
...
@@ -1337,7 +1355,8 @@
orderId
:
0
,
tCNum
:
''
,
payProtocol
:
''
,
shopProtocol
:
''
shopProtocol
:
''
,
dmcName
:
''
},
//旅客名单
guestList
:
[],
...
...
@@ -1465,6 +1484,42 @@
};
},
methods
:
{
goContract
()
{
let
routeData
=
this
.
$router
.
resolve
({
name
:
"TravelContractDetail"
,
query
:
{
TCID
:
this
.
$route
.
query
.
TCID
,
guestId
:
this
.
$route
.
query
.
guestId
,
orderID
:
this
.
$route
.
query
.
orderID
,
},
});
console
.
log
(
routeData
.
href
)
location
.
href
=
routeData
.
href
},
GetQrCode
:
function
()
{
let
urlObj
=
this
.
domainManager
();
let
msg
=
{
TCID
:
this
.
$route
.
query
.
TCID
,
orderID
:
this
.
$route
.
query
.
orderID
,
pUrl
:
"clientConfirm"
,
};
this
.
$http
({
headers
:
{
'Content-Type'
:
'application/json'
},
method
:
'post'
,
url
:
urlObj
.
DomainUrl
+
'/api/file/GetQrCodeImage?'
,
data
:
{
"msg"
:
msg
}
}).
then
(
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
QRCodeStr
=
res
.
data
.
data
;
}
else
{
}
}).
catch
(
err
=>
{})
},
//跳转锚点
goAnchor
(
selector
)
{
var
anchor
=
this
.
$el
.
querySelector
(
selector
)
...
...
@@ -1509,6 +1564,9 @@
this
.
CtObj
.
companyComplainCall
=
'028-96927'
;
}
if
(
this
.
CtObj
.
auditContract
==
2
){
this
.
goContract
()
}
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
...
...
@@ -1648,6 +1706,7 @@
}
}
this
.
CtObj
.
travelContent
=
this
.
$refs
.
TcTravel_Table
.
innerHTML
;
this
.
CtObj
.
rbGroupId
=
this
.
CurrentUserInfo
.
RB_Group_id
this
.
apiJavaPost
(
"/api/contract/dosaveOrUpdate"
,
this
.
CtObj
,
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
Success
(
res
.
data
.
message
);
...
...
src/components/clientConfirm.vue
View file @
a3d2147a
...
...
@@ -321,7 +321,6 @@
border-radius
:
5px
;
height
:
3.4rem
;
width
:
18rem
;
line-height
:
3.4rem
;
color
:
#fff
;
font-size
:
2rem
;
margin-top
:
1rem
;
...
...
@@ -511,14 +510,14 @@
<
template
>
<div
class=
"dic_content"
:class=
"dialogVisible?'CisHideen':''"
>
<!-- 签字 -->
<div
class=
"signSpan"
>
<div
@
click=
"goUrl"
class=
"sign"
>
<div
class=
"signSpan"
v-if=
"dataList.companySignature==''"
>
<div
@
click=
"goUrl"
class=
"sign"
>
<p><span
style=
"font-size:3rem"
class=
"iconfont icon-qianming"
></span></p>
<span
style=
"font-size:2rem"
>
签字
</span>
</div>
</div>
<!-- 开始进入弹窗 -->
<div
class=
TipTc
v-
show=
"tcShow
"
>
<div
class=
TipTc
v-
if=
"tcShowDialog"
id=
"tcShowDialog
"
>
<div
class=
"TipsDiv"
style=
"text-align:center;line-height:2"
>
<h4
style=
"font-size: 2.5rem;color: #24ade5;"
>
中国公民文明旅游公约
</h4>
<ul
style=
"font-size:2rem"
class=
"conventionList"
>
...
...
@@ -528,7 +527,7 @@
<li>
爱环境,护古迹;
</li>
<li>
文明行,最得体。
</li>
</ul>
<
span
@
click=
"tcShow=false"
class=
"readSpan"
>
已阅知
</spa
n>
<
el-button
type=
"primary"
@
click=
"closeTcShowHandler"
class=
"readSpan"
>
已阅知
</el-butto
n>
</div>
...
...
@@ -950,7 +949,10 @@
<li>
<el-row>
<el-col
:span=
"12"
>
旅游者代表签字(盖章):
</el-col>
<el-col
:span=
"12"
>
{{
dataList
.
clientName
}}
</el-col>
<el-col
:span=
"12"
>
{{
dataList
.
companySignature
!=
''
?
''
:
dataList
.
clientName
}}
<img
style=
"width:120px;"
:src=
"dataList.companySignature"
v-if=
"dataList.companySignature!=''"
alt=
""
/>
</el-col>
</el-row>
</li>
<li>
...
...
@@ -1005,7 +1007,7 @@
<li>
<el-row>
<el-col
:span=
"12"
>
出境社盖章:
</el-col>
<el-col
:span=
"12"
><img
class=
"signImg"
:src=
"CurrentUserInfo.ZhangImg"
alt=
""
/></el-col>
<el-col
:span=
"12"
><img
class=
"signImg"
:src=
"CurrentUserInfo.ZhangImg"
alt=
""
v-if=
"dataList.isTravelAgencySignature==1"
/></el-col>
</el-row>
</li>
<li>
...
...
@@ -1546,7 +1548,7 @@
<div
class=
"item_content"
>
<label
id=
"l3"
>
签章信息
</label>
<div
class=
"leftSign"
>
<div><span>
旅游者代表签字(盖章):
</span>
<div><span>
旅游者代表签字(盖章)
1
:
</span>
<img
style=
"width:120px;"
:src=
"dataList.companySignature"
alt=
""
/>
</div>
<div><span>
证件号码:
</span>
...
...
@@ -2067,7 +2069,7 @@
return
{
CurrentUserInfo
:
{},
signShow
:
true
,
tcShow
:
true
,
tcShow
Dialog
:
true
,
ActiveTab
:
1
,
//查询参数
msg
:
{
...
...
@@ -2095,12 +2097,25 @@
};
},
created
()
{
try
{
if
(
this
.
$route
.
query
.
str
)
{
this
.
tcShow
=
false
;
this
.
tcShowDialog
=
false
;
this
.
signShow
=
false
;
}
}
catch
(
error
)
{
//("mounted:"+error.message)
}
},
methods
:
{
closeTcShowHandler
(){
// this.tcShowDialog = false
// this.$forceUpdate();
// alert('点击了'+this.tcShowDialog)
let
domtemp
=
document
.
querySelector
(
"#tcShowDialog"
)
domtemp
.
remove
()
//alert('删除完成')
},
goUrl
()
{
sessionStorage
.
setItem
(
"SignInfo"
,
JSON
.
stringify
(
this
.
dataList
))
this
.
$router
.
push
({
...
...
@@ -2119,6 +2134,7 @@
this
.
apiJavaPost
(
"/api/contract/getContractInfo"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
dataList
=
res
.
data
.
data
;
this
.
dataList
.
travelContent
=
this
.
dataList
.
travelContent
.
replaceAll
(
/contenteditable="true"/ig
,
''
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
...
...
@@ -2626,7 +2642,10 @@
}
},
mounted
()
{
try
{
this
.
CurrentUserInfo
=
this
.
getLocalStorage
();
this
.
CurrentUserInfo
=
this
.
CurrentUserInfo
?
his
.
CurrentUserInfo
:{}
this
.
CurrentUserInfo
.
ZhangImg
=
'http://imgfile.oytour.com/New/Upload/CompanyImage/hepingzhang.png'
this
.
msg
.
TCID
=
this
.
$route
.
query
.
TCID
;
this
.
msg
.
orderID
=
this
.
$route
.
query
.
orderID
;
this
.
msg
.
guestId
=
this
.
$route
.
query
.
guestId
;
...
...
@@ -2636,6 +2655,9 @@
this
.
getList
();
this
.
getCanvas
();
this
.
GetTrip
(
0
,
this
.
msg
.
TCID
);
}
catch
(
error
)
{
//alert("mounted:"+error.message)
}
}
};
...
...
src/plug/index.js
View file @
a3d2147a
...
...
@@ -12,11 +12,11 @@ export default {
install
(
Vue
,
options
)
{
Vue
.
prototype
.
MsgBus
=
MsgBus
;
Vue
.
prototype
.
md5
=
md5
;
Vue
.
prototype
.
QjGroupId
=
function
(
msg
)
{
Vue
.
prototype
.
QjGroupId
=
function
(
msg
)
{
let
GroupId
=
2
;
return
GroupId
;
},
Vue
.
prototype
.
orderBy
=
function
(
source
,
orders
,
type
)
{
Vue
.
prototype
.
orderBy
=
function
(
source
,
orders
,
type
)
{
if
(
source
instanceof
Array
&&
orders
instanceof
Array
&&
...
...
@@ -28,7 +28,7 @@ export default {
var
totalSum
=
{};
function
grouporder
(
source
,
orders
,
totalSum
)
{
source
.
sort
(
function
(
a
,
b
)
{
source
.
sort
(
function
(
a
,
b
)
{
var
convertA
=
a
[
orders
[
0
]];
var
convertB
=
b
[
orders
[
0
]];
if
(
typeof
convertA
==
"string"
&&
typeof
convertB
==
"string"
)
{
...
...
@@ -77,7 +77,7 @@ export default {
return
source
;
}
},
Vue
.
prototype
.
calcPageSize
=
function
(
itemHeight
)
{
Vue
.
prototype
.
calcPageSize
=
function
(
itemHeight
)
{
let
yuHeight
=
itemHeight
try
{
let
obj
=
null
...
...
@@ -97,7 +97,7 @@ export default {
}
catch
(
error
)
{}
return
Math
.
floor
(
yuHeight
/
itemHeight
)
}
Vue
.
prototype
.
random_string
=
function
(
len
)
{
Vue
.
prototype
.
random_string
=
function
(
len
)
{
len
=
len
||
32
;
var
chars
=
'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'
;
var
maxPos
=
chars
.
length
;
...
...
@@ -108,23 +108,23 @@ export default {
return
pwd
;
},
//是否是线上环境【发布时修改为true】
Vue
.
prototype
.
isOnline
=
function
()
{
Vue
.
prototype
.
isOnline
=
function
()
{
return
process
.
env
.
NODE_ENV
!==
'development'
;
},
//域名管理对象
Vue
.
prototype
.
domainManager
=
function
()
{
Vue
.
prototype
.
domainManager
=
function
()
{
let
domainUrl
=
''
;
let
mallUrl
=
""
;
//商城API
let
lxymallUrl
=
''
;
//国内游api
let
crmUrl
=
""
;
//crm API
let
locationName
=
window
.
location
.
hostname
;
// domainUrl = "http://192.168.10.128";
domainUrl
=
"http://192.168.10.11:8083
"
;
domainUrl
=
"http://192.168.10.123:8002
"
;
// domainUrl = "http://reborn.oytour.com";
let
crmLocalFileStreamDownLoadUrl
=
""
;
crmLocalFileStreamDownLoadUrl
=
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://crm.oytour.com"
:
"http://testcrm.oytour.com"
;
let
javaUrldo
=
""
;
javaUrldo
=
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==
-
1
?
(
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://efficient.oytour.com"
:
"http://47.96.12.235:9001"
)
:
"http://192.168.2.215
:9000"
;
javaUrldo
=
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==
-
1
?
(
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://efficient.oytour.com"
:
"http://47.96.12.235:9001"
)
:
"http://127.0.0.1
:9000"
;
//商城API
// mallUrl = "http://192.168.1.48:8019";
mallUrl
=
"http://192.168.20.13:8088"
;
...
...
@@ -169,8 +169,8 @@ export default {
UploadUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==
-
1
?
"http://upload.oytour.com"
:
"http://192.168.10.214:8120"
,
//文件站点
ViittoFileUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==
-
1
?
"http://imgfile.oytour.com"
:
'http://192.168.10.214:8130'
,
javaUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==
-
1
?
(
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://efficient.oytour.com"
:
"http://47.96.12.235:9001"
)
:
"http://192.168.2.17:8087
"
,
javaUrlNew
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==
-
1
?
(
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://property.oytour.com"
:
"http://47.96.12.235:9001"
)
:
"http://192.168.2.17:8087
"
,
javaUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==
-
1
?
(
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://efficient.oytour.com"
:
"http://47.96.12.235:9001"
)
:
"http://192.168.10.123:9000
"
,
javaUrlNew
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==
-
1
?
(
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://property.oytour.com"
:
"http://47.96.12.235:9001"
)
:
"http://192.168.10.123:9000
"
,
//Java接口本站文件流下载地址
JavaLocalFileStreamDownLoadUrl
:
javaUrldo
,
mallUrl
:
mallUrl
,
...
...
@@ -180,14 +180,14 @@ export default {
};
return
obj
;
},
Vue
.
prototype
.
yinyanFn
=
function
(
url
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
yinyanFn
=
function
(
url
,
successCall
,
faildCall
)
{
this
.
$http
.
jsonp
(
url
,
)
.
then
(
res
=>
{
successCall
(
res
)
},
faildCall
)
},
//消息成功提示
Vue
.
prototype
.
Success
=
function
(
msg
)
{
Vue
.
prototype
.
Success
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
...
...
@@ -195,7 +195,7 @@ export default {
});
},
//错误提示
Vue
.
prototype
.
Error
=
function
(
msg
)
{
Vue
.
prototype
.
Error
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
...
...
@@ -204,7 +204,7 @@ export default {
},
//一般提示
Vue
.
prototype
.
Info
=
function
(
msg
)
{
Vue
.
prototype
.
Info
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
...
...
@@ -212,7 +212,7 @@ export default {
});
},
//警告提示
Vue
.
prototype
.
Warning
=
function
(
msg
)
{
Vue
.
prototype
.
Warning
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
...
...
@@ -220,7 +220,7 @@ export default {
});
},
//Confirm
Vue
.
prototype
.
Confirm
=
function
(
msg
,
callback
)
{
Vue
.
prototype
.
Confirm
=
function
(
msg
,
callback
)
{
this
.
$confirm
(
msg
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
...
...
@@ -236,7 +236,7 @@ export default {
});
},
//打开新窗口连接
Vue
.
prototype
.
OpenNewUrl
=
function
(
URL
)
{
Vue
.
prototype
.
OpenNewUrl
=
function
(
URL
)
{
if
(
URL
!=
''
)
{
if
(
URL
.
indexOf
(
"https"
)
!=
-
1
)
{
var
str
=
'http://'
+
URL
.
substring
(
8
);
...
...
@@ -251,7 +251,7 @@ export default {
}
//HTTP提交数据
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
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
(
'TravelContractConfirm'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'ViittoContractConfirm'
)
===
-
1
&&
...
...
@@ -352,7 +352,7 @@ export default {
},
faildCall
)
},
// CRM接口
Vue
.
prototype
.
crmapipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
Vue
.
prototype
.
crmapipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
var
apiurl
=
this
.
domainManager
().
crmUrl
+
cmd
;
var
token
=
""
;
var
key
=
""
;
...
...
@@ -382,7 +382,7 @@ export default {
},
faildCall
)
},
// 自动登录HTTP提交数据
Vue
.
prototype
.
apipostLogin
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
Vue
.
prototype
.
apipostLogin
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
if
(
this
.
$route
.
name
.
indexOf
(
'login'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'clientConfirm'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'confirmationsOrderDownLoad'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'PrintPage'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'TravelContractConfirm'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'ViittoContractConfirm'
)
===
-
1
&&
...
...
@@ -488,7 +488,7 @@ export default {
},
faildCall
)
},
//HTTP提交数据
Vue
.
prototype
.
mallapipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
Vue
.
prototype
.
mallapipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
var
apiurl
=
this
.
domainManager
().
mallUrl
+
cmd
;
var
postData
=
this
.
GetPostData
(
cmd
,
msg
,
""
);
this
.
$http
.
post
(
apiurl
,
postData
,
{
...
...
@@ -507,7 +507,7 @@ export default {
}
//文件下载
Vue
.
prototype
.
GetMallLocalFile
=
function
(
cmd
,
msg
,
fileName
,
newCmd
,
successCall
)
{
Vue
.
prototype
.
GetMallLocalFile
=
function
(
cmd
,
msg
,
fileName
,
newCmd
,
successCall
)
{
var
apiurl
=
this
.
domainManager
().
mallUrl
+
cmd
;
var
postData
=
this
.
GetPostData
(
cmd
,
msg
,
newCmd
);
this
.
$http
.
post
(
apiurl
,
postData
,
{
...
...
@@ -523,11 +523,11 @@ export default {
document
.
body
.
appendChild
(
link
);
link
.
click
();
successCall
(
res
);
}).
catch
(
function
(
res
)
{});
}).
catch
(
function
(
res
)
{});
}
//获取请求参数
Vue
.
prototype
.
GetPostData
=
function
(
cmd
,
msg
,
newCmd
)
{
Vue
.
prototype
.
GetPostData
=
function
(
cmd
,
msg
,
newCmd
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
...
...
@@ -564,7 +564,7 @@ export default {
},
//用户权限验证
Vue
.
prototype
.
CheckUserAuth
=
function
(
authCode
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
CheckUserAuth
=
function
(
authCode
,
successCall
,
faildCall
)
{
let
localStorageJson
=
this
.
getLocalStorage
();
var
newCode
=
','
+
authCode
+
','
;
if
((
","
+
localStorageJson
.
ActionMenuCode
+
","
).
indexOf
(
newCode
)
>
-
1
)
{
...
...
@@ -583,7 +583,7 @@ export default {
}
},
//供应商版请求接口方法
Vue
.
prototype
.
ApiPost2
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
ApiPost2
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
...
...
@@ -631,7 +631,7 @@ export default {
},
//请求Java接口
Vue
.
prototype
.
apiJavaPost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
apiJavaPost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
if
(
this
.
$route
.
name
.
indexOf
(
'login'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'confirmationOrderDownLoad'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'PrintPage'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'clientConfirm'
)
===
-
1
)
{
let
previousPathInfo
=
{
path
:
this
.
$route
.
name
,
...
...
@@ -688,7 +688,7 @@ export default {
},
faildCall
)
},
//请求资产管理接口
Vue
.
prototype
.
apiJavaPostZc
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
apiJavaPostZc
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
if
(
this
.
$route
.
name
.
indexOf
(
'login'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'confirmationOrderDownLoad'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'PrintPage'
)
===
-
1
&&
this
.
$route
.
name
.
indexOf
(
'clientConfirm'
)
===
-
1
)
{
let
previousPathInfo
=
{
...
...
@@ -747,7 +747,7 @@ export default {
},
//下载文件
Vue
.
prototype
.
GetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
successCall
)
{
Vue
.
prototype
.
GetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
successCall
)
{
var
apiurl
=
this
.
domainManager
().
LocalFileStreamDownLoadUrl
;
var
timestamp
=
(
new
Date
()).
valueOf
();
if
(
!
localStorage
.
userInfo
&&
localStorage
.
userInfo
!=
""
&&
this
.
$route
.
path
.
toLowerCase
()
!=
"/login"
)
{
...
...
@@ -781,10 +781,10 @@ export default {
document
.
body
.
appendChild
(
link
);
link
.
click
();
successCall
(
res
);
}).
catch
(
function
(
res
)
{});
}).
catch
(
function
(
res
)
{});
},
//crm下载文件
Vue
.
prototype
.
crmGetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
callBack
)
{
Vue
.
prototype
.
crmGetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
callBack
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
...
...
@@ -824,11 +824,11 @@ export default {
};
callBack
(
result
);
}
}).
catch
(
function
(
res
)
{
}).
catch
(
function
(
res
)
{
});
}
Vue
.
prototype
.
JavaGetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
successCall
)
{
Vue
.
prototype
.
JavaGetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
successCall
)
{
var
apiurl
=
this
.
domainManager
().
JavaLocalFileStreamDownLoadUrl
+
cmd
;
var
timestamp
=
(
new
Date
()).
valueOf
();
if
(
!
localStorage
.
userInfo
&&
localStorage
.
userInfo
!=
""
&&
this
.
$route
.
path
.
toLowerCase
()
!=
"/login"
)
{
...
...
@@ -866,16 +866,16 @@ export default {
document
.
body
.
appendChild
(
link
);
link
.
click
();
successCall
(
res
);
}).
catch
(
function
(
res
)
{});
}).
catch
(
function
(
res
)
{});
},
//跳转到登录页面
Vue
.
prototype
.
goToLogin
=
function
(
type
)
{
Vue
.
prototype
.
goToLogin
=
function
(
type
)
{
this
.
$router
.
push
({
path
:
'/login'
})
},
//ERP本地缓存
Vue
.
prototype
.
getLocalStorage
=
function
()
{
Vue
.
prototype
.
getLocalStorage
=
function
()
{
var
localStorageData
=
window
.
localStorage
[
"userInfo"
];
if
(
localStorageData
!==
undefined
&&
localStorageData
!=
'undefined'
)
{
return
JSON
.
parse
(
localStorageData
);
...
...
@@ -884,7 +884,7 @@ export default {
}
},
//供应商本地缓存
Vue
.
prototype
.
getLocalStorageSupplier
=
function
()
{
Vue
.
prototype
.
getLocalStorageSupplier
=
function
()
{
var
localStorageData
=
window
.
localStorage
[
"userInfo"
];
if
(
localStorageData
!==
undefined
&&
localStorageData
!=
'userInfo'
)
{
return
JSON
.
parse
(
localStorageData
);
...
...
@@ -893,11 +893,11 @@ export default {
}
},
//PDF预览
Vue
.
prototype
.
previewPDF
=
function
(
url
)
{
Vue
.
prototype
.
previewPDF
=
function
(
url
)
{
window
.
open
(
url
);
},
//文件下载
Vue
.
prototype
.
downloadFile
=
function
(
objectKey
)
{
Vue
.
prototype
.
downloadFile
=
function
(
objectKey
)
{
var
co
=
require
(
'co'
);
var
OSS
=
require
(
'ali-oss'
);
var
oss
=
new
OSS
({
...
...
@@ -913,7 +913,7 @@ export default {
link
.
click
();
},
//文件重命名下载
Vue
.
prototype
.
downloadFileRename
=
function
(
objectKey
,
filename
,
fileurl
)
{
Vue
.
prototype
.
downloadFileRename
=
function
(
objectKey
,
filename
,
fileurl
)
{
var
co
=
require
(
'co'
);
var
OSS
=
require
(
'ali-oss'
);
var
oss
=
new
OSS
({
...
...
@@ -955,7 +955,7 @@ export default {
});
},
//获取文件Blob
Vue
.
prototype
.
getFileBlob
=
function
(
objectKey
,
filename
)
{
Vue
.
prototype
.
getFileBlob
=
function
(
objectKey
,
filename
)
{
var
co
=
require
(
'co'
);
var
OSS
=
require
(
'ali-oss'
);
var
oss
=
new
OSS
({
...
...
@@ -979,7 +979,7 @@ export default {
return
getBlob
},
//文件上传
Vue
.
prototype
.
uploadImg
=
function
(
path
,
base64Str
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
uploadImg
=
function
(
path
,
base64Str
,
successCall
,
faildCall
)
{
var
apiurl
=
this
.
domainManager
().
UploadUrl
+
'/Upload/UploadBase64Two?fileType=1&fileLimit=5&&filePath='
+
path
;
this
.
$http
.
post
(
apiurl
,
{
MyFile
:
base64Str
...
...
@@ -987,12 +987,12 @@ export default {
headers
:
{
"Content-Type"
:
"application/x-www-form-urlencoded;"
},
}).
then
(
function
(
res
)
{
}).
then
(
function
(
res
)
{
})
},
//Blob文件上传
Vue
.
prototype
.
uploadSelfBlob
=
function
(
path
,
files
,
successCall
)
{
Vue
.
prototype
.
uploadSelfBlob
=
function
(
path
,
files
,
successCall
)
{
let
that
=
this
;
var
uploadUrl
=
that
.
domainManager
().
UploadUrl
+
"/Upload/UploadBlob?fileType=1&fileLimit=5&&filePath="
+
path
;
var
formData
=
new
FormData
();
...
...
@@ -1007,7 +1007,7 @@ export default {
//path 请按照"/模块名称/用户ID/自定义文件夹/" /谁搞错一次5块红包
//files 文件数组
//p 进度回调函数
Vue
.
prototype
.
uploadFile
=
function
(
path
,
files
,
successCall
)
{
Vue
.
prototype
.
uploadFile
=
function
(
path
,
files
,
successCall
)
{
if
(
files
&&
files
.
length
>
0
)
{
let
nameList
=
new
Array
()
...
...
@@ -1023,24 +1023,24 @@ export default {
let
that
=
this
;
let
checkpoint
=
null
;
let
percentage
=
0
;
co
(
function
*
()
{
co
(
function
*
()
{
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
let
fileName
=
nameList
[
index
]
fileName
=
"/New"
+
path
+
fileName
+
"."
+
files
[
index
].
name
.
split
(
'.'
).
pop
()
var
result
=
yield
oss
.
multipartUpload
(
fileName
,
files
[
index
],
{
progress
:
function
*
(
p
)
{},
progress
:
function
*
(
p
)
{},
mime
:
'application/octet-stream'
})
successCall
(
result
);
}
}).
catch
(
function
(
err
)
{
}).
catch
(
function
(
err
)
{
});
}
},
//公用判断图片地址 判断是否包含http
Vue
.
prototype
.
getIconLink
=
function
(
url
)
{
Vue
.
prototype
.
getIconLink
=
function
(
url
)
{
let
str
=
''
if
(
url
&&
url
!=
''
)
{
if
(
url
.
indexOf
(
'http'
)
!=
-
1
)
{
...
...
@@ -1052,14 +1052,14 @@ export default {
}
},
//上传文件到本地服务器
Vue
.
prototype
.
UploadSelfFileT
=
function
(
path
,
files
,
successCall
,
ocr
)
{
Vue
.
prototype
.
UploadSelfFileT
=
function
(
path
,
files
,
successCall
,
ocr
)
{
if
(
files
&&
files
.
length
>
0
)
{
let
nameList
=
new
Array
()
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
nameList
.
push
(
this
.
random_string
());
}
let
that
=
this
;
co
(
function
*
()
{
co
(
function
*
()
{
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
let
fileName
=
nameList
[
index
]
fileName
=
path
+
fileName
+
"."
+
files
[
index
].
name
.
split
(
'.'
).
pop
()
...
...
@@ -1069,14 +1069,14 @@ export default {
that
.
$http
.
post
(
uploadUrl
,
formData
,
{})
.
then
(
res
=>
{
successCall
(
res
);
}).
catch
(
function
(
reason
)
{
}).
catch
(
function
(
reason
)
{
that
.
$refs
[
'my-upload'
].
clearFiles
();
that
.
$message
.
error
(
'上传失败!'
);
that
.
MsgBus
.
$emit
(
'UploadSelfFileErr'
)
});
}
}).
catch
(
function
(
err
)
{
}).
catch
(
function
(
err
)
{
that
.
$refs
[
'my-upload'
].
clearFiles
();
that
.
$message
.
error
(
'上传失败!'
);
});
...
...
@@ -1087,7 +1087,7 @@ export default {
//type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定
// w : 宽
// h : 高
Vue
.
prototype
.
compressImg
=
function
(
path
,
type
,
w
,
h
)
{
Vue
.
prototype
.
compressImg
=
function
(
path
,
type
,
w
,
h
)
{
let
url
=
this
.
domainManager
().
UploadUrl
;
let
poise
=
'm_filt'
;
w
=
w
?
w
:
''
...
...
@@ -1100,7 +1100,7 @@ export default {
var
newpath
=
path
.
replace
(
'http://192.168.10.214:8130'
,
''
).
replace
(
'https://imgfile.oytour.com'
,
''
).
replace
(
'https://imgfile.oytour.com'
,
''
).
split
(
'?'
)[
0
];
return
url
+
'/image/index?filePath='
+
newpath
+
'&process=resize,'
+
poise
+
',w_'
+
w
+
',h_'
+
h
;
}
Vue
.
prototype
.
uploadSelfBlob
=
function
(
path
,
files
,
successCall
)
{
Vue
.
prototype
.
uploadSelfBlob
=
function
(
path
,
files
,
successCall
)
{
let
that
=
this
;
var
uploadUrl
=
that
.
domainManager
().
UploadUrl
+
"/Upload/UploadBlob?fileType=1&fileLimit=5&&filePath="
+
path
;
var
formData
=
new
FormData
();
...
...
@@ -1114,7 +1114,7 @@ export default {
},
//验证只能输入2位小数【负数:isMinus传true】
Vue
.
prototype
.
checkPrice
=
function
(
item
,
filed
,
isMinus
)
{
Vue
.
prototype
.
checkPrice
=
function
(
item
,
filed
,
isMinus
)
{
var
value
=
""
+
item
[
filed
];
//转字符串
var
t
=
value
.
charAt
(
0
);
value
=
value
.
replace
(
/
[^\d
.
]
/g
,
""
);
//清除“数字”和“.”以外的字符
...
...
@@ -1132,7 +1132,7 @@ export default {
item
[
filed
]
=
value
;
}
//验证输入6位小数汇率
Vue
.
prototype
.
checkRate
=
function
(
item
,
filed
)
{
Vue
.
prototype
.
checkRate
=
function
(
item
,
filed
)
{
var
value
=
""
+
item
[
filed
];
//转字符串
var
p1
=
/
[^\d\.]
/g
;
// 过滤非数字及小数点 /g :所有范围中过滤
var
p2
=
/
(\.\d{6})\d
*$/g
;
...
...
@@ -1147,7 +1147,7 @@ export default {
}
//验证只能输入整数【负数:isMinus传true】
Vue
.
prototype
.
checkInteger
=
function
(
item
,
filed
,
isMinus
)
{
Vue
.
prototype
.
checkInteger
=
function
(
item
,
filed
,
isMinus
)
{
var
value
=
""
+
item
[
filed
];
//转字符串
var
t
=
value
.
charAt
(
0
);
value
=
value
.
replace
(
this
.
$commonUtils
.
Regex
.
isInteger
,
""
);
...
...
@@ -1158,7 +1158,7 @@ export default {
item
[
filed
]
=
value
;
}
//格式化日期
Vue
.
prototype
.
FormartDate
=
function
(
date
)
{
Vue
.
prototype
.
FormartDate
=
function
(
date
)
{
let
today
=
date
.
getFullYear
()
+
"-"
+
...
...
@@ -1170,7 +1170,7 @@ export default {
return
today
;
}
//时间验证
Vue
.
prototype
.
checkTime
=
function
(
item
,
filed
)
{
Vue
.
prototype
.
checkTime
=
function
(
item
,
filed
)
{
var
date
=
item
[
filed
];
if
(
date
.
length
==
1
)
{
var
v1
=
date
.
substring
(
0
,
1
);
...
...
@@ -1214,10 +1214,10 @@ export default {
this
.
$forceUpdate
();
}
// 计算当前日期的前后日期
Vue
.
prototype
.
getBeforeDate
=
function
(
num
,
time
)
{
Vue
.
prototype
.
getBeforeDate
=
function
(
num
,
time
)
{
let
n
=
num
;
let
d
=
''
;
if
(
time
)
{
if
(
time
)
{
d
=
new
Date
(
time
);
}
else
{
d
=
new
Date
();
...
...
@@ -1225,8 +1225,8 @@ export default {
let
year
=
d
.
getFullYear
();
let
mon
=
d
.
getMonth
()
+
1
;
let
day
=
d
.
getDate
();
if
(
day
<=
n
)
{
if
(
mon
>
1
)
{
if
(
day
<=
n
)
{
if
(
mon
>
1
)
{
mon
=
mon
-
1
;
}
else
{
year
=
year
-
1
;
...
...
@@ -1242,7 +1242,7 @@ export default {
},
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue
.
prototype
.
moneyFormat
=
function
(
value
)
{
Vue
.
prototype
.
moneyFormat
=
function
(
value
)
{
let
nStr
=
Number
(
value
).
toFixed
(
2
)
nStr
+=
''
;
let
x
=
nStr
.
split
(
'.'
);
...
...
@@ -1255,7 +1255,7 @@ export default {
return
x1
+
x2
;
},
//价钱格式化,三位数逗号分隔,保留八位小数 duanjun
Vue
.
prototype
.
moneyFormatB
=
function
(
value
)
{
Vue
.
prototype
.
moneyFormatB
=
function
(
value
)
{
let
nStr
=
Number
(
value
).
toFixed
(
8
)
nStr
+=
''
;
let
x
=
nStr
.
split
(
'.'
);
...
...
@@ -1268,7 +1268,7 @@ export default {
return
x1
+
x2
;
},
//文件图标
Vue
.
prototype
.
loadFileICON
=
function
(
suffix
)
{
Vue
.
prototype
.
loadFileICON
=
function
(
suffix
)
{
let
icons
=
[{
"name"
:
"
\
u7f51
\
u76d8BT
\
u79bb
\
u7ebf
\
u4e0b
\
u8f7d"
,
...
...
@@ -1551,7 +1551,7 @@ export default {
},
//HTTP提交数据 5-18新的 司导旅行新加的
Vue
.
prototype
.
lxymallapipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
Vue
.
prototype
.
lxymallapipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
var
apiurl
=
this
.
domainManager
().
lxymallUrl
+
cmd
;
var
postData
=
this
.
GetNewPostData
(
cmd
,
msg
,
""
);
this
.
$http
.
post
(
apiurl
,
postData
,
{
...
...
@@ -1569,14 +1569,14 @@ export default {
},
faildCall
)
},
//公用跳转
Vue
.
prototype
.
CommonJump
=
function
(
path
,
obj
)
{
Vue
.
prototype
.
CommonJump
=
function
(
path
,
obj
)
{
this
.
$router
.
push
({
name
:
path
,
query
:
obj
});
}
//获取请求参数
Vue
.
prototype
.
GetNewPostData
=
function
(
cmd
,
msg
,
newCmd
)
{
Vue
.
prototype
.
GetNewPostData
=
function
(
cmd
,
msg
,
newCmd
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
...
...
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