Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CRM
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
华国豪
CRM
Commits
e525831e
Commit
e525831e
authored
Apr 28, 2022
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/huaguohao/crm
into master
parents
1a024d62
e91e89a6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1163 additions
and
671 deletions
+1163
-671
Record.vue
src/components/clueManagement/Record.vue
+46
-46
clueManagement.vue
src/components/clueManagement/clueManagement.vue
+48
-54
customerInfoBox.vue
src/components/clueManagement/customerInfoBox.vue
+191
-156
guestDialogBox.vue
src/components/clueManagement/guestDialogBox.vue
+1
-15
guestInfoBox.vue
src/components/clueManagement/guestInfoBox.vue
+192
-156
importDialogBox.vue
src/components/clueManagement/importDialogBox.vue
+239
-0
invalidDialogBox.vue
src/components/clueManagement/invalidDialogBox.vue
+249
-0
customerInfoBox.vue
src/components/guestManagement/customerInfoBox.vue
+3
-2
main.js
src/main.js
+180
-123
index.js
src/plugins/index.js
+14
-119
No files found.
src/components/clueManagement/Record.vue
View file @
e525831e
<
style
>
@import
'../../assets/css/Record.css'
;
@import
'../../assets/css/Record.css'
;
</
style
>
<
template
>
<div
class=
"Record"
id=
"Record"
>
<div
class=
"ha-cont"
style=
"justify-content: flex-start; align-items: stretch;"
v-for=
"(item, index) in logList"
:key=
"index"
>
<div
class=
"ha-cont"
style=
"justify-content: flex-start; align-items: stretch;"
v-for=
"(item, index) in logList"
:key=
"index"
>
<div
class=
"ha-circle"
></div>
<div
class=
"ha-time"
>
{{
item
.
UpdateDate
}}
</div>
<!--
<div
class=
"ha-name"
>
admin
</div>
-->
...
...
@@ -18,9 +18,8 @@
</div>
</div>
</
template
>
</template>
<
script
>
export
default
{
export
default
{
props
:
[
'CustomerId'
],
data
()
{
return
{
...
...
@@ -32,14 +31,15 @@ export default {
SourceId
:
0
}
};
},
watch
:{
},
watch
:
{
},
mounted
()
{
let
$this
=
this
let
$this
=
this
document
.
getElementById
(
"Record"
)
.
addEventListener
(
"scroll"
,
function
()
{
.
addEventListener
(
"scroll"
,
function
()
{
//全部动态
if
(
this
.
scrollHeight
-
this
.
scrollTop
===
this
.
clientHeight
)
{
$this
.
logMsg
.
pageIndex
=
$this
.
logMsg
.
pageIndex
+
1
...
...
@@ -50,8 +50,8 @@ export default {
this
.
GetOperationLogPageList
()
},
methods
:
{
GetOperationLogPageList
(
t
)
{
this
.
apipost
(
'/api/Customer/GetOperationLogPageList'
,
this
.
msg
,
res
=>
{
GetOperationLogPageList
(
t
)
{
this
.
apipost
(
'/api/Customer/GetOperationLogPageList'
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
if
(
t
)
{
...
...
@@ -65,5 +65,5 @@ export default {
})
}
}
}
}
</
script
>
\ No newline at end of file
src/components/clueManagement/clueManagement.vue
View file @
e525831e
This diff is collapsed.
Click to expand it.
src/components/clueManagement/customerInfoBox.vue
View file @
e525831e
<
style
>
.drawer-box
{
.drawer-box
{
height
:
100%
;
}
.drawer-header
{
}
.drawer-header
{
height
:
83px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
0
30px
;
}
.drawer-header
.left
{
}
.drawer-header
.left
{
display
:
flex
;
align-items
:
center
;
}
.drawer-header
.left
img
{
}
.drawer-header
.left
img
{
display
:
inline-block
;
margin-right
:
10px
;
}
.drawer-body
{
height
:
calc
(
100%
-
83px
);
}
.drawer-body
.top-info
{
}
.drawer-body
{
height
:
calc
(
100%
-
83px
);
}
.drawer-body
.top-info
{
height
:
115px
;
padding
:
30px
;
box-sizing
:
border-box
;
font-size
:
12px
;
background-color
:
#F6F4FC
;
}
.drawer-body
.top-info
.info-lable
{
}
.drawer-body
.top-info
.info-lable
{
display
:
inline-block
;
width
:
80px
;
color
:
#999999
;
}
.margin-bottom-25
{
}
.margin-bottom-25
{
margin-bottom
:
25px
;
}
.drawer-box
.el-tabs__nav-wrap
::after
{
}
.drawer-box
.el-tabs__nav-wrap
::after
{
height
:
0
;
}
.drawer-body
.el-tabs__header
{
}
.drawer-body
.el-tabs__header
{
padding
:
0
25px
;
margin-bottom
:
0
;
}
.drawer-body
>
.content
{
}
.drawer-body
>
.content
{
height
:
calc
(
100%
-
115px
);
}
.drawer-body
.el-tabs
{
}
.drawer-body
.el-tabs
{
height
:
100%
;
}
.drawer-body
.el-tabs__content
{
}
.drawer-body
.el-tabs__content
{
background-color
:
#F6F4FC
;
height
:
calc
(
100%
-
40px
);
box-sizing
:
border-box
;
}
.drawer-body
.el-tabs__content
.el-tab-pane
{
}
.drawer-body
.el-tabs__content
.el-tab-pane
{
height
:
100%
;
position
:
absolute
;
width
:
calc
(
100%
);
padding
:
17px
20px
;
box-sizing
:
border-box
}
}
</
style
>
<
template
>
<div
class=
"drawer-box"
v-if=
"loading"
>
...
...
@@ -69,15 +82,17 @@
<p>
{{
detailsData
.
CustomerName
}}
</p>
</div>
<div
class=
"right"
>
<el-button
class=
"crm-btn query-btn"
@
click=
"editCust"
>
编辑
</el-button>
<el-button
class=
"crm-btn query-btn"
@
click=
"editCust
omerInfo
"
>
编辑
</el-button>
<el-dropdown
@
command=
"handleCommand"
style=
"top: 1px;"
>
<el-button
class=
"crm-btn crm-btn-more easy-btn margin-right0"
>
<i
class=
"iconfont icongengduo"
></i>
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"z"
><i
class=
"iconfont iconplus-transfer"
></i>
转移
</el-dropdown-item>
<el-dropdown-item
command=
"g"
><i
class=
"iconfont icongonghaiguanli"
></i>
转化为客户
</el-dropdown-item>
<el-dropdown-item
command=
"g"
><i
class=
"iconfont icongonghaiguanli"
></i>
转化为客户
</el-dropdown-item>
<el-dropdown-item
command=
"d"
><i
class=
"iconfont icondelete"
></i>
删除
</el-dropdown-item>
<el-dropdown-item
command=
"w"
><i
class=
"iconfont icondelete"
></i>
无效线索
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
...
...
@@ -89,7 +104,7 @@
<span
class=
"info-lable"
>
客户级别:
</span><span>
{{
detailsData
.
CustomerIdLevelStr
}}
</span>
</el-col>
<el-col
:span=
"12"
>
<span
class=
"info-lable"
>
成交状态:
</span><span
>
已成交
</span>
<span
class=
"info-lable"
>
成交状态:
</span><span>
已成交
</span>
</el-col>
</el-row>
<el-row>
...
...
@@ -107,32 +122,35 @@
<Activity
v-if=
"activeName === '1'"
:CustomerId=
"CustomerId"
/>
</el-tab-pane>
<el-tab-pane
label=
"详细资料"
name=
"2"
>
<Details
v-if=
"activeName === '2'"
:detailsData=
"detailsData"
/>
<Details
v-if=
"activeName === '2'"
:detailsData=
"detailsData"
/>
</el-tab-pane>
<el-tab-pane
label=
"附件"
name=
"8"
>
<Enclosure
v-if=
"activeName === '8'"
:ID=
'CustomerId'
:type=
'1'
/>
<Enclosure
v-if=
"activeName === '8'"
:ID=
'CustomerId'
:type=
'1'
/>
</el-tab-pane>
<el-tab-pane
label=
"操作记录"
name=
"9"
>
<Record
v-if=
"activeName === '9'"
:CustomerId=
"CustomerId"
/>
<Record
v-if=
"activeName === '9'"
:CustomerId=
"CustomerId"
/>
</el-tab-pane>
</el-tabs>
</div>
</div>
<invalidDialogBox
v-if=
"isShowInvalidBox"
:customerInfo=
"detailsData"
@
success=
"refreshParentPage"
/>
</div>
</
template
>
<
script
>
import
Activity
from
"./Activity"
;
import
Details
from
"./Details"
;
import
Enclosure
from
"./Enclosure"
;
import
Record
from
"./Record"
;
export
default
{
import
Activity
from
"./Activity"
;
import
Details
from
"./Details"
;
import
Enclosure
from
"./Enclosure"
;
import
Record
from
"./Record"
;
import
invalidDialogBox
from
"./invalidDialogBox"
;
export
default
{
components
:
{
Activity
,
Details
,
Enclosure
,
Record
Record
,
invalidDialogBox
},
props
:
{
props
:
{
CustomerId
:
{
type
:
Number
,
default
:
0
...
...
@@ -143,14 +161,16 @@ export default {
activeName
:
'1'
,
detailsData
:
{},
loading
:
false
,
isShowInvalidBox
:
false
,
};
},
watch
:{
},
watch
:
{
CustomerId
:
{
handler
(
val
,
oldVal
)
{
handler
(
val
,
oldVal
)
{
this
.
init
()
this
.
activeName
=
'1'
},
deep
:
true
deep
:
true
}
},
mounted
()
{
...
...
@@ -160,37 +180,47 @@ export default {
this
.
MsgBus
.
$on
(
'RefreshInfoBox'
,
function
()
{
$this
.
init
()
})
//关闭无效线索弹窗
this
.
MsgBus
.
$on
(
'closeInvalidDialogBox'
,
function
()
{
$this
.
isShowInvalidBox
=
false
;
})
},
methods
:
{
init
(){
this
.
apipost
(
'/api/Customer/GetAllCustmersModel'
,
{
CustomerId
:
this
.
CustomerId
},
res
=>
{
//刷新父页面
refreshParentPage
()
{
this
.
$emit
(
'getList'
)
},
init
()
{
this
.
apipost
(
'/api/Customer/GetAllCustmersModel'
,
{
CustomerId
:
this
.
CustomerId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
if
(
!
data
.
HousePhotos
)
{
if
(
!
data
.
HousePhotos
)
{
data
.
HousePhotos
=
[]
}
if
(
!
data
.
BusinessCardPhotos
)
{
if
(
!
data
.
BusinessCardPhotos
)
{
data
.
BusinessCardPhotos
=
[]
}
if
(
!
data
.
Images
)
{
if
(
!
data
.
Images
)
{
data
.
Images
=
[]
}
if
(
!
data
.
CustomerSourceType
)
{
if
(
!
data
.
CustomerSourceType
)
{
data
.
CustomerSourceType
=
''
}
if
(
!
data
.
CustomerSource
)
{
if
(
!
data
.
CustomerSource
)
{
data
.
CustomerSource
=
''
}
if
(
!
data
.
Province
)
{
if
(
!
data
.
Province
)
{
data
.
Province
=
''
}
if
(
!
data
.
Country
)
{
if
(
!
data
.
Country
)
{
data
.
Country
=
''
}
if
(
!
data
.
City
)
{
if
(
!
data
.
City
)
{
data
.
City
=
''
}
if
(
!
data
.
District
)
{
if
(
!
data
.
District
)
{
data
.
District
=
''
}
this
.
detailsData
=
data
...
...
@@ -198,7 +228,7 @@ export default {
}
})
},
handleCommand
(
command
)
{
handleCommand
(
command
)
{
if
(
command
===
'z'
)
{
this
.
$emit
(
'transferS'
,
3
);
}
else
if
(
command
===
'g'
)
{
...
...
@@ -206,14 +236,19 @@ export default {
}
else
if
(
command
===
'd'
)
{
this
.
$emit
(
'deleteClue'
,
1
)
}
//无效线索弹窗
else
if
(
command
===
'w'
)
{
this
.
isShowInvalidBox
=
true
;
}
},
handleClick
(
tab
,
event
)
{},
editCust
(){
//编辑客户信息
editCustomerInfo
()
{
this
.
$emit
(
'editCustS'
,
1
)
},
handleClose
(
done
)
{
done
();
}
}
}
}
</
script
>
\ No newline at end of file
src/components/clueManagement/guestDialogBox.vue
View file @
e525831e
...
...
@@ -240,7 +240,6 @@
</el-form-item>
</div>
</el-col>
<el-col
:span=
"8"
>
<div
class=
"MyEditForm-item"
>
<el-form-item
label=
"客户来源"
prop=
"CustomerSourceType"
>
...
...
@@ -270,7 +269,6 @@
</div>
</el-col>
</el-row>
<el-col
:span=
"24"
>
<div
class=
"MyEditForm-item label-pad-left"
>
<el-form-item
label=
"备注"
prop=
"Remarks"
>
...
...
@@ -280,7 +278,6 @@
</el-col>
</el-form>
</div>
<div
class=
"form-box"
v-if=
"show"
>
<el-collapse
v-model=
"activeNames"
>
<el-collapse-item
title=
"更多信息"
name=
"3"
>
...
...
@@ -488,7 +485,6 @@
</el-form-item>
</div>
</el-col>
<template
v-for=
'(item,index) in EconomicCapabilityS'
>
<el-col
:span=
"8"
:key=
"index"
v-if=
'item.isShow'
>
<div
class=
"MyEditForm-item"
>
...
...
@@ -498,18 +494,13 @@
</div>
</el-col>
</
template
>
<div
class=
"_addPassengerEconomicCapability"
>
<span
v-for=
"(item, index) in EconomicCapabilityS"
:key=
"index"
@
click=
"addEconomicCapability(item)"
:class=
"{_active:item.isShow}"
>
{{item.Name}}
</span>
</div>
</el-form>
</el-collapse-item>
</el-collapse>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
class=
"add-box-btn"
@
click=
"submitForm('form')"
>
确 定
</el-button>
...
...
@@ -538,7 +529,7 @@
if
(
!
value
)
{
return
callback
(
new
Error
(
"手机号不能为空"
));
}
else
{
const
reg
=
/^1
[
3|4|5|
7|8
][
0-9
]\d{8}
$/
;
const
reg
=
/^1
[
3|4|5|
6|7|8|9
][
0-9
]\d{8}
$/
;
if
(
reg
.
test
(
value
))
{
callback
();
}
else
{
...
...
@@ -640,11 +631,6 @@
message
:
"请填写客人需求"
,
trigger
:
"blur"
,
},
],
// Remarks: [{
// required: true,
// message: '请填写备注',
// trigger: 'blur'
// }],
WeChatNo
:
[{
required
:
true
,
validator
:
validateWechatAndPhone
,
...
...
src/components/clueManagement/guestInfoBox.vue
View file @
e525831e
This diff is collapsed.
Click to expand it.
src/components/clueManagement/importDialogBox.vue
0 → 100644
View file @
e525831e
<
style
>
.importDialogBox.add-box
.add-tit
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
height
:
20px
;
}
.importDialogBox.add-box
.add-tit
p
{
display
:
flex
;
align-items
:
center
;
font-weight
:
bold
;
color
:
rgba
(
17
,
17
,
17
,
1
);
font-size
:
14px
;
}
.importDialogBox.add-box
.add-tit
p
span
{
display
:
inline-block
;
width
:
6px
;
height
:
6px
;
background
:
#409efe
;
border-radius
:
50%
;
margin-right
:
10px
;
}
.importDialogBox.add-box
.el-dialog__header
{
padding
:
15px
20px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
}
.importDialogBox.add-box
.dialog-footer
{
text-align
:
center
;
background-color
:
rgba
(
248
,
250
,
251
,
1
);
padding-bottom
:
20px
;
}
.importDialogBox.add-box
.el-dialog__footer
{
padding
:
0
;
}
.importDialogBox.add-box
.el-dialog__body
{
background-color
:
rgba
(
248
,
250
,
251
,
1
);
padding-top
:
20px
;
max-height
:
400px
;
overflow
:
auto
;
}
.importDialogBox
.add-box-btn.el-button
{
border-radius
:
0
;
background-color
:
#409efe
cc
;
border-color
:
#409efe
cc
;
color
:
white
;
padding
:
12px
43px
;
}
.importDialogBox
.add-box-btn.el-button
:hover
{
background-color
:
#409efe
;
border-color
:
#409efe
;
color
:
white
;
}
.importDialogBox
.add-box-btn.el-button.add-box-cancel
{
color
:
#409efe
cc
;
background-color
:
white
;
}
.importDialogBox
.add-box-btn.el-button.add-box-cancel
:hover
{
color
:
#409efe
;
background-color
:
white
;
}
.importDialogBox
.el-input
.el-input-group__append
{
background-color
:
#409efe
;
border-color
:
#409efe
;
color
:
#fff
;
}
.importDialogBox
.form-box
.form-box-tit
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
20px
;
}
.importDialogBox
.form-box
.radius
{
display
:
flex
;
width
:
4px
;
height
:
4px
;
background
:
rgba
(
255
,
164
,
117
,
1
);
border-radius
:
50%
;
margin-right
:
10px
;
}
.importDialogBox
.up-img-box
.uib-item
{
margin-right
:
30px
;
width
:
130px
;
height
:
130px
;
background-color
:
white
;
position
:
relative
;
margin-bottom
:
30px
;
}
.importDialogBox
.up-img-box
.uib-item
p
{
position
:
absolute
;
bottom
:
-30px
;
font-size
:
12px
;
text-align
:
center
;
width
:
100%
;
}
.importDialogBox
.up-img-box
.uib-item
:hover
.imgzhe-btn
{
opacity
:
1
;
}
.importDialogBox
.imgzhe
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
top
:
0
;
}
.importDialogBox
.imgzhe
.imgzhe-btn
{
background
:
rgba
(
0
,
0
,
0
,
0.6
);
width
:
100%
;
height
:
100%
;
text-align
:
center
;
line-height
:
120px
;
position
:
absolute
;
top
:
0
;
opacity
:
1
;
transition
:
all
linear
0.5s
;
}
.importDialogBox
.imgzhe
.imgzhe-btn
i
{
font-size
:
22px
;
margin-right
:
5px
;
color
:
white
;
cursor
:
pointer
;
}
.importDialogBox
.up-ctrl
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
}
.importDialogBox
.up-ctrl
>
div
{
width
:
100%
;
height
:
100%
;
text-align
:
center
;
line-height
:
140px
;
}
</
style
>
<
template
>
<el-dialog
:visible
.
sync=
"dialogTableVisible"
@
closed=
"closedDialog"
:close-on-click-modal=
"false"
class=
"add-box add-box1 importDialogBox"
width=
"450px"
v-loading=
"loading"
:element-loading-text=
"loadingText"
>
<div
class=
"add-tit"
slot=
"title"
>
<p><span></span>
{{
importType
==
1
?
"导入客户线索"
:
"导入直客线索"
}}
</p>
<span
icon=
"el-icon-close"
></span>
</div>
<div
class=
"form-box"
>
<p
class=
"form-box-tit"
><span
class=
"radius"
></span>
上传文件
</p>
<div
class=
"up-img-box"
>
<div
class=
"uib-item"
style=
"margin:0 auto;margin-bottom:20px;"
>
<div
class=
"up-ctrl"
>
<el-upload
:limit=
"1"
:http-request=
"UploadClue"
:multiple=
"false"
accept=
"*.xls,*.xlsx"
:show-file-list=
"false"
action=
""
>
<img
src=
"../../assets/img/cust/upimg.png"
alt=
""
>
</el-upload>
</div>
<p>
<a
:href=
"downloadUrl"
style=
"cursor:pointer;color:blue;text-decoration:underline;"
>
模板下载
</a>
</p>
</div>
</div>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"add-box-btn add-box-cancel"
@
click=
"dialogTableVisible = false"
>
关 闭
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
export
default
{
props
:
{
importType
:
{
type
:
Number
,
default
:
0
,
},
},
data
()
{
return
{
dialogTableVisible
:
false
,
downloadUrl
:
""
,
loading
:
false
,
loadingText
:
""
};
},
mounted
()
{
var
fileUrl
=
"https://imgfile.oytour.com"
if
(
this
.
importType
==
1
)
{
this
.
downloadUrl
=
fileUrl
+
"/static/客户模板.xlsx"
;
}
else
{
this
.
downloadUrl
=
fileUrl
+
"/static/直客模板.xlsx"
;
}
let
$this
=
this
;
setTimeout
(()
=>
{
$this
.
dialogTableVisible
=
true
;
},
50
);
},
methods
:
{
closedDialog
()
{
this
.
MsgBus
.
$emit
(
"closeCustomerDialogBox"
);
},
//上传线索
UploadClue
(
file
)
{
var
userInfo
=
this
.
getLocalStorage
();
var
params
=
{
EmployeeId
:
userInfo
.
EmployeeId
,
UploadType
:
this
.
importType
};
this
.
loading
=
true
;
this
.
loadingText
=
"正在上传文件,请稍后..."
;
this
.
UploadLocalSystem
(
params
,
file
.
file
,
(
res
)
=>
{
this
.
loading
=
false
;
this
.
loadingText
=
""
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dialogTableVisible
=
false
;
this
.
Success
(
"导入线索成功!"
);
this
.
$emit
(
"getList"
);
}
else
{
this
.
Error
(
"导入失败!"
);
}
});
},
},
};
</
script
>
\ No newline at end of file
src/components/clueManagement/invalidDialogBox.vue
0 → 100644
View file @
e525831e
<
style
>
.invalidDialogBox.add-box
.add-tit
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
height
:
20px
;
}
.invalidDialogBox.add-box
.add-tit
p
{
display
:
flex
;
align-items
:
center
;
font-weight
:
bold
;
color
:
rgba
(
17
,
17
,
17
,
1
);
font-size
:
14px
;
}
.invalidDialogBox.add-box
.add-tit
p
span
{
display
:
inline-block
;
width
:
6px
;
height
:
6px
;
background
:
#409efe
;
border-radius
:
50%
;
margin-right
:
10px
;
}
.invalidDialogBox.add-box
.el-dialog__header
{
padding
:
15px
20px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
}
.invalidDialogBox.add-box
.dialog-footer
{
text-align
:
center
;
background-color
:
rgba
(
248
,
250
,
251
,
1
);
padding-bottom
:
20px
;
}
.invalidDialogBox.add-box
.el-dialog__footer
{
padding
:
0
;
}
.invalidDialogBox.add-box
.el-dialog__body
{
background-color
:
rgba
(
248
,
250
,
251
,
1
);
padding-top
:
20px
;
max-height
:
400px
;
overflow
:
auto
;
}
.invalidDialogBox
.add-box-btn.el-button
{
border-radius
:
0
;
background-color
:
#409efe
cc
;
border-color
:
#409efe
cc
;
color
:
white
;
padding
:
12px
43px
;
}
.invalidDialogBox
.add-box-btn.el-button
:hover
{
background-color
:
#409efe
;
border-color
:
#409efe
;
color
:
white
;
}
.invalidDialogBox
.add-box-btn.el-button.add-box-cancel
{
color
:
#409efe
cc
;
background-color
:
white
;
}
.invalidDialogBox
.add-box-btn.el-button.add-box-cancel
:hover
{
color
:
#409efe
;
background-color
:
white
;
}
.invalidDialogBox
.el-input
.el-input-group__append
{
background-color
:
#409efe
;
border-color
:
#409efe
;
color
:
#fff
;
}
.invalidDialogBox
.form-box
.form-box-tit
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
20px
;
}
.invalidDialogBox
.form-box
.radius
{
display
:
flex
;
width
:
4px
;
height
:
4px
;
background
:
rgba
(
255
,
164
,
117
,
1
);
border-radius
:
50%
;
margin-right
:
10px
;
}
.invalidDialogBox
.up-img-box
.uib-item
{
margin-right
:
30px
;
width
:
130px
;
height
:
130px
;
background-color
:
white
;
position
:
relative
;
margin-bottom
:
30px
;
}
.invalidDialogBox
.up-img-box
.uib-item
p
{
position
:
absolute
;
bottom
:
-30px
;
font-size
:
12px
;
text-align
:
center
;
width
:
100%
;
}
.invalidDialogBox
.up-img-box
.uib-item
:hover
.imgzhe-btn
{
opacity
:
1
;
}
.invalidDialogBox
.imgzhe
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
top
:
0
;
}
.invalidDialogBox
.imgzhe
.imgzhe-btn
{
background
:
rgba
(
0
,
0
,
0
,
0.6
);
width
:
100%
;
height
:
100%
;
text-align
:
center
;
line-height
:
120px
;
position
:
absolute
;
top
:
0
;
opacity
:
1
;
transition
:
all
linear
0.5s
;
}
.invalidDialogBox
.imgzhe
.imgzhe-btn
i
{
font-size
:
22px
;
margin-right
:
5px
;
color
:
white
;
cursor
:
pointer
;
}
.invalidDialogBox
.up-ctrl
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
}
.invalidDialogBox
.up-ctrl
>
div
{
width
:
100%
;
height
:
100%
;
text-align
:
center
;
line-height
:
140px
;
}
</
style
>
<
template
>
<el-dialog
:visible
.
sync=
"dialogTableVisible"
@
closed=
"closedDialog"
class=
"add-box add-box1 invalidDialogBox"
width=
"450px"
append-to-body
>
<div
class=
"add-tit"
slot=
"title"
>
<p><span></span>
无效线索标记
</p>
<span
icon=
"el-icon-close"
></span>
</div>
<div
class=
"form-box"
>
<el-form
ref=
"form"
class=
"MyEditForm"
>
<p
class=
"form-box-tit"
><span
class=
"radius"
></span>
<template
v-if=
"guestInfo"
>
你正在把线索【
{{
guestInfo
.
ClueName
}}
】,标记为无效
</
template
>
<
template
v-else-if=
"customerInfo"
>
你正在把线索【
{{
customerInfo
.
CustomerName
}}
】,标记为无效
</
template
>
</p>
<el-row>
<el-col
:span=
"24"
>
<div
class=
"MyEditForm-item label-pad-left"
>
<el-form-item
label=
"无效说明"
>
<el-input
type=
"textarea"
placeholder=
"无效说明"
v-model=
"saveMsg.Remark"
></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
</el-form>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
class=
"add-box-btn"
@
click=
"SaveInvalid()"
>
确 定
</el-button>
<el-button
class=
"add-box-btn add-box-cancel"
@
click=
"dialogTableVisible = false"
>
关 闭
</el-button>
</div>
</el-dialog>
</template>
<
script
>
export
default
{
props
:
{
guestInfo
:
{
type
:
Object
,
default
:
null
,
},
customerInfo
:
{
type
:
Object
,
default
:
null
,
},
},
data
()
{
return
{
dialogTableVisible
:
false
,
saveMsg
:
{
CustomerId
:
0
,
GueustId
:
0
,
Remark
:
""
,
ClueState
:
2
,
ClueName
:
""
,
//线索名称
}
};
},
watch
:
{
},
mounted
()
{
let
$this
=
this
;
setTimeout
(()
=>
{
$this
.
dialogTableVisible
=
true
;
},
50
);
},
methods
:
{
closedDialog
()
{
this
.
MsgBus
.
$emit
(
"closeInvalidDialogBox"
);
},
//保存无效线索
SaveInvalid
()
{
if
(
this
.
guestInfo
)
{
this
.
saveMsg
.
GueustId
=
this
.
guestInfo
.
Id
;
this
.
saveMsg
.
ClueName
=
this
.
guestInfo
.
ClueName
;
}
if
(
this
.
customerInfo
)
{
this
.
saveMsg
.
CustomerId
=
this
.
customerInfo
.
CustomerId
;
this
.
saveMsg
.
ClueName
=
this
.
customerInfo
.
CustomerName
;
}
this
.
apipost
(
'/api/Customer/UpdateClueState'
,
this
.
saveMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$emit
(
"success"
);
this
.
dialogTableVisible
=
false
;
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
},
};
</
script
>
\ No newline at end of file
src/components/guestManagement/customerInfoBox.vue
View file @
e525831e
...
...
@@ -82,7 +82,8 @@
<p>
{{
detailsData
.
SurName
+
detailsData
.
Name
}}
</p>
</div>
<div
class=
"right"
v-if=
"!hiddenMenu"
>
<el-button
class=
"crm-btn query-btn"
@
click=
"editCust"
>
编辑
</el-button>
<el-button
class=
"crm-btn query-btn"
@
click=
"editCust"
v-if=
"detailsData.IsCreate==1||detailsData.IsRead==1"
>
编辑
</el-button>
<el-dropdown
@
command=
"handleCommand"
style=
"top: 1px;"
v-if=
"detailsData.IsCreate==1"
>
<el-button
class=
"crm-btn crm-btn-more easy-btn margin-right0"
>
<i
class=
"iconfont icongengduo"
></i>
...
...
src/main.js
View file @
e525831e
...
...
@@ -16,56 +16,39 @@ import languageUtils from './assets/utils/languageUtils' //引入语言转换帮
import
moment
from
'moment'
import
co
from
'co'
import
MsgBus
from
'./plugins/event-bus'
import
{
location
}
from
"./assets/utils/getLocation"
import
{
location
}
from
"./assets/utils/getLocation"
import
'xe-utils'
import
vueQuillEditor
from
'vue-quill-editor'
import
'quill/dist/quill.core.css'
import
'quill/dist/quill.snow.css'
import
pinyin
from
'pinyin'
Vue
.
prototype
.
pinyin
=
pinyin
// import VXETable from 'vxe-table'
// import 'vxe-table/lib/index.css'
// import tinymce from 'tinymce/tinymce'
// import Editor from '@tinymce/tinymce-vue'
// import 'tinymce/themes/silver'
// 使用Vue.use()方法就会调用工具方法中的install方法
Vue
.
use
(
htmlToPdf
)
Vue
.
use
(
VueLazyload
)
// Vue.use(VXETable)
Vue
.
use
(
vueQuillEditor
)
// Vue.use(VueLazyload, {
// preLoad: 1.3,
// error: '../src/assets/img/banner@3x.png',
// loading: '../src/assets/img/loader.gif',
// attempt: 1
// })
Vue
.
config
.
productionTip
=
false
Vue
.
use
(
ElementUI
)
Vue
.
use
(
plug
)
Vue
.
http
=
Vue
.
prototype
.
$http
=
axios
Vue
.
commonUtils
=
Vue
.
prototype
.
$commonUtils
=
commonUtils
Vue
.
languageUtils
=
Vue
.
prototype
.
$languageUtils
=
languageUtils
Vue
.
commonUtils
=
Vue
.
prototype
.
$commonUtils
=
commonUtils
Vue
.
languageUtils
=
Vue
.
prototype
.
$languageUtils
=
languageUtils
Vue
.
prototype
.
MsgBus
=
MsgBus
Vue
.
prototype
.
$echarts
=
echarts
String
.
prototype
.
IsPicture
=
function
()
{
String
.
prototype
.
IsPicture
=
function
()
{
//判断是否是图片 - strFilter必须是小写列举
var
strFilter
=
".jpeg|.gif|.jpg|.png|.bmp|.pic|"
if
(
this
.
indexOf
(
"."
)
>-
1
)
{
var
strFilter
=
".jpeg|.gif|.jpg|.png|.bmp|.pic|"
if
(
this
.
indexOf
(
"."
)
>
-
1
)
{
var
p
=
this
.
lastIndexOf
(
"."
);
//alert(p);
//alert(this.length);
var
strPostfix
=
this
.
substring
(
p
,
this
.
length
)
+
'|'
;
var
strPostfix
=
this
.
substring
(
p
,
this
.
length
)
+
'|'
;
strPostfix
=
strPostfix
.
toLowerCase
();
//alert(strPostfix);
if
(
strFilter
.
indexOf
(
strPostfix
)
>-
1
)
{
//alert("True");
if
(
strFilter
.
indexOf
(
strPostfix
)
>
-
1
)
{
return
true
;
}
}
//alert('False');
return
false
;
}
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
...
...
@@ -75,12 +58,12 @@ router.beforeEach((to, from, next) => {
}
sessionStorage
.
setItem
(
"FromPath"
,
JSON
.
stringify
(
msg
));
if
(
to
.
meta
.
title
)
{
if
(
localStorage
.
g
&&
localStorage
.
g
!=
'undefined'
)
{
if
(
JSON
.
parse
(
localStorage
.
g
).
i
!=
2
)
document
.
title
=
to
.
meta
.
title
.
split
(
'-'
)[
0
]
+
'-'
+
JSON
.
parse
(
localStorage
.
g
).
n
if
(
localStorage
.
g
&&
localStorage
.
g
!=
'undefined'
)
{
if
(
JSON
.
parse
(
localStorage
.
g
).
i
!=
2
)
document
.
title
=
to
.
meta
.
title
.
split
(
'-'
)[
0
]
+
'-'
+
JSON
.
parse
(
localStorage
.
g
).
n
else
document
.
title
=
to
.
meta
.
title
}
else
{
}
else
{
document
.
title
=
to
.
meta
.
title
}
}
...
...
@@ -95,6 +78,7 @@ Vue.prototype.getLocalStorage = function () {
return
null
;
}
}
Vue
.
prototype
.
getNowDate
=
function
()
{
var
date
=
new
Date
();
var
seperator1
=
"-"
;
...
...
@@ -107,9 +91,9 @@ Vue.prototype.getNowDate = function () {
if
(
strDate
>=
0
&&
strDate
<=
9
)
{
strDate
=
"0"
+
strDate
;
}
var
currentdate
=
date
.
getFullYear
()
+
seperator1
+
month
+
seperator1
+
strDate
+
" "
+
date
.
getHours
()
+
seperator2
+
date
.
getMinutes
()
+
seperator2
+
date
.
getSeconds
();
var
currentdate
=
date
.
getFullYear
()
+
seperator1
+
month
+
seperator1
+
strDate
+
" "
+
date
.
getHours
()
+
seperator2
+
date
.
getMinutes
()
+
seperator2
+
date
.
getSeconds
();
return
currentdate
;
}
Vue
.
prototype
.
DateDiff
=
function
(
sDate1
,
sDate2
)
{
...
...
@@ -118,10 +102,11 @@ Vue.prototype.DateDiff = function (sDate1, sDate2) {
oDate1
=
new
Date
(
aDate
[
1
]
+
'-'
+
aDate
[
2
]
+
'-'
+
aDate
[
0
])
aDate
=
sDate2
.
split
(
"-"
)
oDate2
=
new
Date
(
aDate
[
1
]
+
'-'
+
aDate
[
2
]
+
'-'
+
aDate
[
0
])
iDays
=
parseInt
(
Math
.
abs
(
oDate1
-
oDate2
)
/
1000
/
60
/
60
/
24
)
//把相差的毫秒数转换为天数
iDays
=
parseInt
(
Math
.
abs
(
oDate1
-
oDate2
)
/
1000
/
60
/
60
/
24
)
//把相差的毫秒数转换为天数
return
iDays
}
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
//价钱格式化,三位数逗号分隔,保留两位小数
Vue
.
prototype
.
moneyFormat
=
function
(
value
)
{
if
(
!
value
)
{
return
0.00
...
...
@@ -137,8 +122,9 @@ Vue.prototype.moneyFormat = function (value) {
}
return
x1
+
x2
;
},
// 注册
Vue
.
filter
(
'priceFormat'
,
function
(
value
)
{
Vue
.
filter
(
'priceFormat'
,
function
(
value
)
{
if
(
value
==
null
)
{
return
0.00
;
}
...
...
@@ -152,16 +138,15 @@ Vue.filter('priceFormat', function (value) {
x1
=
x1
.
replace
(
rgx
,
'$1'
+
','
+
'$2'
);
}
return
x1
+
x2
;
})
// 不要小数点
Vue
.
filter
(
'NoDesnum'
,
function
(
value
)
{
})
// 不要小数点
Vue
.
filter
(
'NoDesnum'
,
function
(
value
)
{
if
(
value
==
null
)
{
return
0.00
;
}
else
if
(
value
<
1
){
}
else
if
(
value
<
1
)
{
return
value
;
}
else
{
}
else
{
let
nStr
=
Number
(
value
).
toFixed
(
0
)
nStr
+=
''
;
let
x
=
nStr
.
split
(
'.'
);
...
...
@@ -177,15 +162,17 @@ Vue.filter('priceFormat', function (value) {
})
// 时间格式YYYY-MM-DD
Vue
.
filter
(
"YMD"
,
function
(
date
)
{
return
moment
(
date
).
format
(
"YYYY-MM-DD"
);
})
Vue
.
filter
(
"MD"
,
function
(
date
)
{
return
moment
(
date
).
format
(
"MM月DD日"
);
})
Vue
.
filter
(
"YMDHMS"
,
function
(
date
)
{
return
moment
(
date
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
})
Vue
.
prototype
.
random_string
=
function
(
len
)
{
len
=
len
||
32
;
var
chars
=
'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'
;
...
...
@@ -195,9 +182,10 @@ Vue.prototype.random_string = function (len) {
pwd
+=
chars
.
charAt
(
Math
.
floor
(
Math
.
random
()
*
maxPos
));
}
return
pwd
;
},
//上传文件到本地服务器
Vue
.
prototype
.
UploadSelfFileT
=
function
(
path
,
files
,
successCall
)
{
},
//上传文件到文件服务器
Vue
.
prototype
.
UploadSelfFileT
=
function
(
path
,
files
,
successCall
)
{
if
(
files
&&
files
.
length
>
0
)
{
let
nameList
=
new
Array
()
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
...
...
@@ -222,6 +210,75 @@ Vue.prototype.UploadSelfFileT = function (path, files, successCall) {
}
}
/**
* 上传到当前Api站点
* @param params 上传需要携带信息
* @param fileObj 上传文件信息
* @param successCall 回调函数
*/
Vue
.
prototype
.
UploadLocalSystem
=
function
(
params
,
fileObj
,
successCall
)
{
let
that
=
this
;
let
url
=
that
.
domainManager
().
PostUrl
+
"/api/Upload/Index"
;
let
formData
=
new
FormData
()
if
(
params
)
{
formData
.
append
(
"params"
,
JSON
.
stringify
(
params
));
}
formData
.
append
(
'myfile'
,
fileObj
);
co
(
function
*
()
{
that
.
$http
.
post
(
url
,
formData
,
{})
.
then
(
res
=>
{
successCall
(
res
);
})
}).
catch
(
function
(
err
)
{
console
.
log
(
"上传文件出错"
+
err
);
});
}
//新页面打开页面
Vue
.
prototype
.
OpenNewUrl
=
function
(
path
,
queryObj
)
{
var
newUrl
=
this
.
$router
.
resolve
({
path
:
path
,
query
:
queryObj
});
window
.
open
(
newUrl
.
href
,
'_blank'
);
}
//验证只能输入2位小数
Vue
.
prototype
.
checkPrice
=
function
(
item
,
filed
)
{
var
value
=
""
;
if
(
typeof
item
[
filed
]
==
"string"
)
{
value
=
item
[
filed
];
}
else
{
value
=
item
[
filed
].
toString
();
}
value
=
value
.
replace
(
/
[^\d
.
]
/g
,
""
);
//清除“数字”和“.”以外的字符
value
=
value
.
replace
(
/
\.{2,}
/g
,
"."
);
//只保留第一个. 清除多余的
value
=
value
.
replace
(
"."
,
"$#$"
)
.
replace
(
/
\.
/g
,
""
)
.
replace
(
"$#$"
,
"."
);
value
=
value
.
replace
(
/^
(\-)
*
(\d
+
)\.(\d\d)
.*$/
,
"$1$2.$3"
);
//只能输入两个小数
if
(
value
.
indexOf
(
"."
)
<
0
&&
value
!=
""
)
{
//以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
value
=
parseFloat
(
value
);
}
item
[
filed
]
=
value
;
}
//验证只能输入整数
Vue
.
prototype
.
checkInteger
=
function
(
item
,
filed
)
{
var
value
=
""
;
if
(
typeof
item
[
filed
]
==
"string"
)
{
value
=
item
[
filed
];
}
else
{
value
=
item
[
filed
].
toString
();
}
value
=
value
.
replace
(
this
.
$commonUtils
.
Regex
.
isInteger
,
""
);
item
[
filed
]
=
value
;
}
new
Vue
({
router
,
store
,
...
...
src/plugins/index.js
View file @
e525831e
...
...
@@ -17,7 +17,9 @@ export default {
//domainUrl = "http://localhost:5003";
let
locationName
=
window
.
location
.
hostname
;
//旅游ERPApi
let
domainPostUrl
=
"http://192.168.10.2:8083"
let
domainPostUrl
=
""
domainPostUrl
=
"http://192.168.10.2:8083"
;
//domainPostUrl = "http://192.168.10.46";
if
(
this
.
isOnline
())
{
if
(
window
.
location
.
host
.
indexOf
(
'fcrmyx.oytour.com'
)
!=
-
1
)
{
domainUrl
=
"http://crm.oytour.com"
...
...
@@ -33,75 +35,17 @@ export default {
DownLoadContractUrl
:
domainPostUrl
,
//阿里服务器地址
AliUrl
:
"https://reborndev.oss-cn-hangzhou.aliyuncs.com"
,
//本站文件流下载地址
LocalFileStreamDownLoadUrl
:
domainUrl
+
"/api/file/GetFileFromWebApi"
,
//PDF文件预览地址
PDFViewUrl
:
domainUrl
+
"/plug/pdf/web/viewer.html?file="
,
//SocketUrl
WebSocketUrl
:
"ws://192.168.1.110:8080?account="
,
//google地图图片地址
GoogleMapImageUrl
:
"http://imgfile.oytour.com"
,
//常用提交数据URL
//CRMApi地址
PostUrl
:
domainUrl
,
PostUrl2
:
domainPostUrl
+
"/api/common/post"
,
//旅游ERPApi地址
ERPApiUrl
:
domainPostUrl
+
"/api/common/post"
,
javaUrl
:
locationName
.
indexOf
(
'testb2b'
)
==
-
1
?
"http://efficient.oytour.com"
:
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
?
"http://47.96.12.235:9001"
:
"http://192.168.10.215:9000"
,
ViittoFileUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
?
"http://staticfile.oytour.com"
:
'http://192.168.10.214:8130'
,
UploadUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
?
"http://uploadfile.oytour.com"
:
"http://192.168.10.214:8120"
,
LocalFileStreamDownLoadUrl
:
domainUrl
+
"/api/file/GetFileFromWebApi"
,
};
return
obj
;
},
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"
)
{
this
.
$router
.
push
({
path
:
'/login'
})
}
var
token
=
""
;
var
key
=
""
;
if
(
this
.
getLocalStorage
()
!=
null
)
{
token
=
this
.
getLocalStorage
().
token
;
key
=
this
.
getLocalStorage
().
secretKey
;
}
var
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
var
md5Str
=
md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
var
postData
=
{
"msg"
:
msg
,
"cmd"
:
cmd
,
"timestamp"
:
timestamp
,
"token"
:
token
,
"sign"
:
md5Str
}
this
.
$http
.
post
(
apiurl
,
postData
,
{
responseType
:
'arraybuffer'
}).
then
((
res
)
=>
{
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
"application/vnd.ms-excel"
})
let
url
=
URL
.
createObjectURL
(
blob
);
let
link
=
document
.
createElement
(
'a'
);
link
.
href
=
url
;
link
.
setAttribute
(
"download"
,
fileName
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
successCall
(
res
);
}).
catch
(
function
(
res
)
{});
},
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue
.
prototype
.
moneyFormat
=
function
(
value
)
{
let
nStr
=
Number
(
value
).
toFixed
(
2
)
nStr
+=
''
;
let
x
=
nStr
.
split
(
'.'
);
let
x1
=
x
[
0
];
let
x2
=
x
.
length
>
1
?
'.'
+
x
[
1
]
:
''
;
var
rgx
=
/
(\d
+
)(\d{3})
/
;
while
(
rgx
.
test
(
x1
))
{
x1
=
x1
.
replace
(
rgx
,
'$1'
+
','
+
'$2'
);
}
return
x1
+
x2
;
},
//消息成功提示
Vue
.
prototype
.
Success
=
function
(
msg
)
{
this
.
$message
({
...
...
@@ -168,18 +112,14 @@ export default {
}
return
path
.
split
(
'?'
)[
0
]
+
'?width='
+
w
;
}
//打开新窗口连接
Vue
.
prototype
.
OpenNewUrl
=
function
(
URL
)
{
if
(
URL
!=
''
)
{
window
.
open
(
'http://'
+
URL
,
'_blank'
);
}
}
//旅游ERP接口
Vue
.
prototype
.
apipost2
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
var
apiurl
=
this
.
domainManager
().
PostUrl2
;
var
apiurl
=
this
.
domainManager
().
ERPApiUrl
;
var
timestamp
=
(
new
Date
()).
valueOf
();
this
.
apiurl
=
apiurl
;
if
(
!
localStorage
.
userInfo
&&
localStorage
.
userInfo
!=
""
&&
this
.
$route
.
path
.
toLowerCase
()
!=
"/login"
)
{
...
...
@@ -222,6 +162,8 @@ export default {
}
},
faildCall
)
}
//CRM接口
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
...
...
@@ -263,6 +205,8 @@ export default {
}
},
faildCall
)
},
//Java接口
Vue
.
prototype
.
apiJavaPost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
...
...
@@ -312,55 +256,6 @@ export default {
successCall
(
res
)
}
},
faildCall
)
},
Vue
.
prototype
.
getAction
=
function
(
actionId
,
lineId
)
{
let
msg
=
{};
msg
.
actionId
=
actionId
;
if
(
lineId
)
{
msg
.
lineId
=
lineId
;
}
this
.
apiJavaPost
(
'/api/b2b/home/getSpecialAction'
,
msg
,
res
=>
{
this
.
Travelload
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
)
}
//验证只能输入2位小数
Vue
.
prototype
.
checkPrice
=
function
(
item
,
filed
)
{
var
value
=
""
;
if
(
typeof
item
[
filed
]
==
"string"
)
{
value
=
item
[
filed
];
}
else
{
value
=
item
[
filed
].
toString
();
}
value
=
value
.
replace
(
/
[^\d
.
]
/g
,
""
);
//清除“数字”和“.”以外的字符
value
=
value
.
replace
(
/
\.{2,}
/g
,
"."
);
//只保留第一个. 清除多余的
value
=
value
.
replace
(
"."
,
"$#$"
)
.
replace
(
/
\.
/g
,
""
)
.
replace
(
"$#$"
,
"."
);
value
=
value
.
replace
(
/^
(\-)
*
(\d
+
)\.(\d\d)
.*$/
,
"$1$2.$3"
);
//只能输入两个小数
if
(
value
.
indexOf
(
"."
)
<
0
&&
value
!=
""
)
{
//以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
value
=
parseFloat
(
value
);
}
item
[
filed
]
=
value
;
}
//验证只能输入整数
Vue
.
prototype
.
checkInteger
=
function
(
item
,
filed
)
{
var
value
=
""
;
if
(
typeof
item
[
filed
]
==
"string"
)
{
value
=
item
[
filed
];
}
else
{
value
=
item
[
filed
].
toString
();
}
value
=
value
.
replace
(
this
.
$commonUtils
.
Regex
.
isInteger
,
""
);
item
[
filed
]
=
value
;
}
}
}
\ No newline at end of file
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