Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
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
youjj
cloud-platform-ui
Commits
c513b165
Commit
c513b165
authored
Sep 11, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/base-modify' into base-modify
parents
84673e99
d53be6a0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2818 additions
and
2652 deletions
+2818
-2652
index.vue
src/views/order/rentVehicleInfo/index.vue
+977
-827
customerServiceModel.vue
...nt/imCustomerServiceManger/model/customerServiceModel.vue
+1
-1
image.js
static/utf8-jsp/dialogs/image/image.js
+1092
-1083
video.js
static/utf8-jsp/dialogs/video/video.js
+748
-741
No files found.
src/views/order/rentVehicleInfo/index.vue
View file @
c513b165
<
template
>
<
template
>
<div
class=
"app-container calendar-list-container"
>
<div
class=
"app-container calendar-list-container"
>
<div
class=
"filter-container"
ref=
"filter-container"
>
<div
class=
"filter-container"
ref=
"filter-container"
>
<el-form
ref=
"queryForm"
:model=
"listQuery"
label-width=
"100px"
>
<el-form
ref=
"queryForm"
:model=
"listQuery"
label-width=
"100px"
>
<el-row>
<el-row>
<el-col
:span=
"5"
>
<el-col
:span=
"5"
>
<el-form-item
label=
"所属地区"
prop=
"zoneId"
>
<el-form-item
label=
"所属地区"
prop=
"zoneId"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.zoneId"
placeholder=
"请选择"
@
change=
"getProvinceRegions"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.zoneId"
placeholder=
"请选择"
@
change=
"getProvinceRegions"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
<el-option
v-for=
"val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"5"
>
<el-col
:span=
"5"
>
<el-form-item
label=
"所属公司"
prop=
"startCompanyId"
>
<el-form-item
label=
"所属公司"
prop=
"startCompanyId"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.startCompanyId"
placeholder=
"请选择"
@
change=
"getAllBranchCompanyChange"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.startCompanyId"
placeholder=
"请选择"
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
@
change=
"getAllBranchCompanyChange"
>
<el-option
v-for=
"val in allBranchCompany"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
</el-select>
<el-option
v-for=
"val in allBranchCompany"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
></el-option>
</el-form-item>
</el-select>
</el-col>
</el-form-item>
<el-col
:span=
"5"
>
</el-col>
<el-form-item
label=
"手机号"
>
<el-col
:span=
"5"
>
<el-input
v-model=
"listQuery.phone"
placeholder=
"请输入手机号"
></el-input>
<el-form-item
label=
"手机号"
>
</el-form-item>
<el-input
v-model=
"listQuery.phone"
placeholder=
"请输入手机号"
></el-input>
</el-col>
</el-form-item>
</el-row>
</el-col>
<el-row>
</el-row>
<el-col
:span=
"5"
>
<el-row>
<el-form-item
label=
"订单号"
>
<el-col
:span=
"5"
>
<el-input
v-model=
"listQuery.no"
placeholder=
"请输入订单号"
></el-input>
<el-form-item
label=
"车牌号"
>
</el-form-item>
<el-input
v-model=
"listQuery.plateNumber"
placeholder=
"请输入车牌号"
></el-input>
</el-col>
</el-form-item>
<el-col
:span=
"5"
>
</el-col>
<el-form-item
label=
"订单状态"
>
<el-col
:span=
"5"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.status"
placeholder=
"请选择状态"
>
<el-form-item
label=
"订单号"
>
<!--"0--删除"+"1--创建订单" +"2--取消" +"3--待付款" +"4--待出行" +"5--出行中(进行中)" +"6--已完成"-->
<el-input
v-model=
"listQuery.no"
placeholder=
"请输入订单号"
></el-input>
<el-option
:key=
"null"
label=
"全部订单"
:value=
"null"
></el-option>
</el-form-item>
<el-option
:key=
"3"
label=
"待付款"
:value=
"3"
></el-option>
</el-col>
<el-option
:key=
"4"
label=
"待出行"
:value=
"4"
></el-option>
<el-col
:span=
"5"
>
<el-option
:key=
"5"
label=
"出行中"
:value=
"5"
></el-option>
<el-form-item
label=
"订单状态"
>
<el-option
:key=
"6"
label=
"已完成"
:value=
"6"
></el-option>
<el-select
class=
"filter-item"
v-model=
"listQuery.status"
placeholder=
"请选择状态"
>
<el-option
:key=
"2"
label=
"已取消"
:value=
"2"
></el-option>
<!--"0--删除"+"1--创建订单" +"2--取消" +"3--待付款" +"4--待出行" +"5--出行中(进行中)" +"6--已完成"-->
</el-select>
<el-option
:key=
"null"
label=
"全部订单"
:value=
"null"
></el-option>
</el-form-item>
<el-option
:key=
"3"
label=
"待付款"
:value=
"3"
></el-option>
</el-col>
<el-option
:key=
"4"
label=
"待出行"
:value=
"4"
></el-option>
</el-row>
<el-option
:key=
"5"
label=
"出行中"
:value=
"5"
></el-option>
</el-form>
<el-option
:key=
"6"
label=
"已完成"
:value=
"6"
></el-option>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-option
:key=
"2"
label=
"已取消"
:value=
"2"
></el-option>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"delete"
@
click=
"clearSearch"
>
清除搜索
</el-button>
</el-select>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"delete"
@
click=
"clearSearch"
>
清除搜索
</el-button>
</div>
<el-table
:key=
'tableKey'
:data=
"list"
v-loading
.
body=
"listLoading"
<el-table
:key=
'tableKey'
:data=
"list"
v-loading
.
body=
"listLoading"
border
fit
highlight-current-row
border
fit
highlight-current-row
style=
"width: 100%"
>
style=
"width: 100%"
>
...
@@ -67,64 +73,72 @@
...
@@ -67,64 +73,72 @@
<span>
{{
scope
.
row
.
name
}}
</span><br/><span>
{{
scope
.
row
.
vehicleNumberPlat
}}
</span>
<span>
{{
scope
.
row
.
name
}}
</span><br/><span>
{{
scope
.
row
.
vehicleNumberPlat
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"150"
align=
"center"
label=
"姓名/手机号"
>
<el-table-column
width=
"150"
align=
"center"
label=
"姓名/手机号"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
username
}}
</span>
/
<span>
{{
scope
.
row
.
telephone
}}
</span>
<span>
{{
scope
.
row
.
username
}}
</span>
/
<span>
{{
scope
.
row
.
telephone
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"200"
align=
"center"
label=
"取车时间/还车时间"
>
<el-table-column
width=
"200"
align=
"center"
label=
"取车时间/还车时间"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
取:
<span>
{{
dateFormat
(
scope
.
row
.
orderRentVehicleDetail
.
startTime
)
}}
</span><br/>
取:
<span>
{{
dateFormat
(
scope
.
row
.
orderRentVehicleDetail
.
startTime
)
}}
</span><br/>
还:
<span>
{{
dateFormat
(
scope
.
row
.
orderRentVehicleDetail
.
endTime
)
}}
</span>
还:
<span>
{{
dateFormat
(
scope
.
row
.
orderRentVehicleDetail
.
endTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"200"
align=
"center"
label=
"交车公司"
>
<el-table-column
width=
"200"
align=
"center"
label=
"交车公司"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
startCompanyName
}}
</span><br/>
<span>
{{
scope
.
row
.
startCompanyName
}}
</span><br/>
<span>
(
{{
scope
.
row
.
orderRentVehicleDetail
.
startCityName
}}{{
scope
.
row
.
orderRentVehicleDetail
.
startAddr
}}
)
</span>
<span>
(
{{
scope
.
row
.
orderRentVehicleDetail
.
startCityName
}}{{
scope
.
row
.
orderRentVehicleDetail
.
startAddr
}}
)
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"200"
align=
"center"
label=
"收车公司"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
endCompanyName
}}
</span><br/>
<span>
(
{{
scope
.
row
.
orderRentVehicleDetail
.
endCityName
}}{{
scope
.
row
.
orderRentVehicleDetail
.
endAddr
}}
)
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"200"
align=
"center"
label=
"收车公司"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
endCompanyName
}}
</span><br/>
<span>
(
{{
scope
.
row
.
orderRentVehicleDetail
.
endCityName
}}{{
scope
.
row
.
orderRentVehicleDetail
.
endAddr
}}
)
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"110"
align=
"center"
label=
"订单金额"
>
<el-table-column
width=
"110"
align=
"center"
label=
"订单金额"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
orderAmount
}}
元
</span>
<span>
{{
scope
.
row
.
orderAmount
}}
元
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"订单状态"
>
<el-table-column
align=
"center"
label=
"订单状态"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span
v-if=
"scope.row.status == '2'"
>
取消
</span>
<span
v-if=
"scope.row.status == '2'"
>
取消
</span>
<span
v-if=
"scope.row.status == '3'"
>
待付款
</span>
<span
v-if=
"scope.row.status == '3'"
>
待付款
</span>
<span
v-if=
"scope.row.status == '4'"
>
待出行
</span>
<span
v-if=
"scope.row.status == '4'"
>
待出行
</span>
<span
v-if=
"scope.row.status == '5'"
>
出行中
</span>
<span
v-if=
"scope.row.status == '5'"
>
出行中
</span>
<span
v-if=
"scope.row.status == '6'"
>
已完成
</span>
<span
v-if=
"scope.row.status == '6'"
>
已完成
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"100"
align=
"center"
label=
"订单详情"
fixed=
"right"
>
<el-table-column
width=
"100"
align=
"center"
label=
"订单详情"
fixed=
"right"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span
style=
"color: #13CE66;cursor: pointer;"
@
click=
"handleOrderDetail(scope.row)"
>
订单详情
</span>
<span
style=
"color: #13CE66;cursor: pointer;"
@
click=
"handleOrderDetail(scope.row)"
>
订单详情
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"300"
fixed=
"right"
>
<el-table-column
align=
"center"
label=
"操作"
width=
"300"
fixed=
"right"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<el-button
size=
"small"
v-if=
"scope.row.status >=4"
class=
"el-button el-button--text el-button--small"
@
click=
"handleHandoverOrderVehicle(scope.row)"
>
交车记录
</el-button>
<el-button
size=
"small"
v-if=
"scope.row.status >=4"
class=
"el-button el-button--text el-button--small"
<el-button
size=
"small"
v-if=
"scope.row.status == 6"
class=
"el-button el-button--text el-button--small"
@
click=
"handleReturnOrderVehicle(scope.row)"
>
还车记录
</el-button>
@
click=
"handleHandoverOrderVehicle(scope.row)"
>
交车记录
<el-button
size=
"small"
v-if=
"scope.row.status > 3"
class=
"el-button el-button--text el-button--small"
@
click=
"handleRefundVehicle(scope.row)"
>
押金记录
</el-button>
</el-button>
<el-button
size=
"small"
v-if=
"scope.row.status == 6&&order_btn_order_violcation_save"
class=
"el-button el-button--text el-button--small"
@
click=
"illegalInquiry(scope.row)"
>
违章查询
</el-button>
<el-button
size=
"small"
v-if=
"scope.row.status == 6"
class=
"el-button el-button--text el-button--small"
</
template
>
@
click=
"handleReturnOrderVehicle(scope.row)"
>
还车记录
</el-button>
<el-button
size=
"small"
v-if=
"scope.row.status > 3"
class=
"el-button el-button--text el-button--small"
@
click=
"handleRefundVehicle(scope.row)"
>
押金记录
</el-button>
<el-button
size=
"small"
v-if=
"scope.row.status == 6&&order_btn_order_violcation_save"
class=
"el-button el-button--text el-button--small"
@
click=
"illegalInquiry(scope.row)"
>
违章查询
</el-button>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<!--违章查询弹框-->
<!--违章查询弹框-->
<Illegal
:row=
"currentRow"
v-if=
"illegalVisible"
v-on:illegalEvent
=
"illegalEvent"
></Illegal>
<Illegal
:row=
"currentRow"
v-if=
"illegalVisible"
v-on:illegalEvent
=
"illegalEvent"
></Illegal>
<!--查看详情弹框-->
<!--查看详情弹框-->
<Detail
:row=
"currentRow"
v-if=
"detailVisible"
v-on:detailEvent=
"detailEvent"
></Detail>
<Detail
:row=
"currentRow"
v-if=
"detailVisible"
v-on:detailEvent=
"detailEvent"
></Detail>
<div
v-show=
"!listLoading"
class=
"pagination-container"
>
<div
v-show=
"!listLoading"
class=
"pagination-container"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
...
@@ -132,136 +146,147 @@
...
@@ -132,136 +146,147 @@
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
></el-pagination>
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
></el-pagination>
</div>
</div>
<!-- 订单详情 -->
<!-- 订单详情 -->
<rentOrderDetailModal
:form=
"form"
:rentCostDetail=
"tourCostDetail"
v-if=
"rentDialogVisible"
v-on:rentOrderDetailDialogEvent=
"rentOrderDetailDialogEvent"
></rentOrderDetailModal>
<rentOrderDetailModal
:form=
"form"
:rentCostDetail=
"tourCostDetail"
v-if=
"rentDialogVisible"
v-on:rentOrderDetailDialogEvent=
"rentOrderDetailDialogEvent"
></rentOrderDetailModal>
<el-dialog
:title=
"modalTitle"
:visible
.
sync=
"orderVehicleCrosstownVisible"
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"form"
label-width=
"90px"
>
<el-dialog
:title=
"modalTitle"
:visible
.
sync=
"orderVehicleCrosstownVisible"
>
<div
class=
"label-title"
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"form"
label-width=
"90px"
>
<span
>
订单号:
</span><span
class=
"label-text"
>
{{form.no}}
</span>
<div
class=
"label-title"
>
<span
>
支付时间:
</span><span
class=
"label-text"
>
{{form.crtTime}}
</span>
<span>
订单号:
</span><span
class=
"label-text"
>
{{form.no}}
</span>
</div>
<span>
支付时间:
</span><span
class=
"label-text"
>
{{form.crtTime}}
</span>
<div
class=
"label-title"
>
</div>
<span
>
订单状态:
</span><span
class=
"label-text"
>
{{form.ststusName}}
</span>
<div
class=
"label-title"
>
</div>
<span>
订单状态:
</span><span
class=
"label-text"
>
{{form.ststusName}}
</span>
<div
class=
"label-title"
>
</div>
<span
>
姓名/手机号:
</span>
<span
class=
"label-text"
><span
>
{{form.username}}
</span>
/
<span>
{{form.telephone}}
</span></span>
<div
class=
"label-title"
>
</div>
<span>
姓名/手机号:
</span>
<span
<div
class=
"label-title"
>
class=
"label-text"
><span>
{{form.username}}
</span>
/
<span>
{{form.telephone}}
</span></span>
<span
>
取车:
</span>
<span
class=
"label-text"
>
{{form.orderRentVehicleDetail.startTime}}
</span><span
class=
"label-text"
>
{{form.orderRentVehicleDetail.startAddr}}
</span>
<span
class=
"label-text"
>
交车公司:
</span><span>
{{form.startCompanyName}}
</span>
</div>
</div>
<div
class=
"label-title"
>
<div
class=
"label-title"
>
<span>
取车:
</span>
<span
class=
"label-text"
>
{{form.orderRentVehicleDetail.startTime}}
</span><span
<span
>
还车:
</span>
<span
class=
"label-text"
>
{{form.orderRentVehicleDetail.endTime}}
</span><span
class=
"label-text"
>
{{form.orderRentVehicleDetail.endAddr}}
</span>
<span
class=
"label-text"
>
交车公司:
</span><span>
{{form.endCompanyName}}
</span>
class=
"label-text"
>
{{form.orderRentVehicleDetail.startAddr}}
</span>
<span
</div>
class=
"label-text"
>
交车公司:
</span><span>
{{form.startCompanyName}}
</span>
<div
class=
"stepBox"
v-if=
"depositDetail"
>
</div>
<div
class=
"title"
v-if=
"depositRefundRecord.length>0"
>
押金退还进度
</div>
<div
class=
"label-title"
>
<ul>
<span>
还车:
</span>
<span
class=
"label-text"
>
{{form.orderRentVehicleDetail.endTime}}
</span><span
<li
v-for =
"(item,index) in depositRefundRecord"
:class=
"{'active':item.iscomplete}"
:key=
"index"
>
class=
"label-text"
>
{{form.orderRentVehicleDetail.endAddr}}
</span>
<span
class=
"label-text"
>
交车公司:
</span><span>
{{form.endCompanyName}}
</span>
<img
class=
"activeImg"
v-if=
"item.iscomplete"
src=
"../../../assets/images/active.png"
alt=
""
>
</div>
<img
class=
"activeImg"
v-if=
"!item.iscomplete"
src=
"../../../assets/images/doing.png"
alt=
""
>
<div
class=
"stepBox"
v-if=
"depositDetail"
>
<p
class=
"stepTitle"
>
<div
class=
"title"
v-if=
"depositRefundRecord.length>0"
>
押金退还进度
</div>
<
template
v-if=
"item.status==1"
>
<ul>
<div
class=
"picBox"
>
<li
v-for=
"(item,index) in depositRefundRecord"
:class=
"{'active':item.iscomplete}"
:key=
"index"
>
<div
style=
"flex: 1"
>
{{
item
.
restAmount
}}
押金退还已申请
</div>
<img
class=
"activeImg"
v-if=
"item.iscomplete"
src=
"../../../assets/images/active.png"
alt=
""
>
<div
style=
"font-size: 10px;color: #999"
>
{{
item
.
updTimeStr
}}
</div>
<img
class=
"activeImg"
v-if=
"!item.iscomplete"
src=
"../../../assets/images/doing.png"
alt=
""
>
</div>
<p
class=
"stepTitle"
>
</
template
>
<
template
v-if=
"item.status==1"
>
<
template
v-if=
"item.status==2"
>
<div
class=
"picBox"
>
<div
class=
"picBox"
>
<div
style=
"flex: 1"
>
{{
item
.
restAmount
}}
押金退还已申请
</div>
<div
style=
"flex: 1"
>
{{
item
.
restAmount
}}
元押金退还到账
</div>
<div
style=
"font-size: 10px;color: #999"
>
{{
item
.
updTimeStr
}}
</div>
<div
style=
"font-size: 10px;color: #999"
>
{{
item
.
updTimeStr
}}
</div>
</div>
</div>
</
template
>
</
template
>
<
template
v-if=
"item.status==2"
>
<
template
v-if=
"item.status==3"
>
<div
class=
"picBox"
>
<div
class=
"picBox"
>
<div
style=
"flex: 1"
>
{{
item
.
restAmount
}}
元押金退还到账
</div>
<div
style=
"flex: 1"
>
{{
item
.
restAmount
}}
元房车违章押金到账
</div>
<div
style=
"font-size: 10px;color: #999"
>
{{
item
.
updTimeStr
}}
</div>
<div
style=
"font-size: 10px;color: #999"
>
{{
item
.
updTimeStr
}}
</div>
</div>
</div>
</
template
>
</
template
>
<
template
v-if=
"item.status==3"
>
<
template
v-if=
"item.status==4"
>
<div
class=
"picBox"
>
<div
class=
"picBox"
>
<div
style=
"flex: 1"
>
{{
item
.
restAmount
}}
元房车违章押金到账
</div>
<div
style=
"flex: 1"
>
房车定损评定中
</div>
<div
style=
"font-size: 10px;color: #999"
>
{{
item
.
updTimeStr
}}
</div>
<div
style=
"font-size: 10px;color: #999"
>
{{
item
.
updTimeStr
}}
</div>
</div>
</div>
</
template
>
</
template
>
<
template
v-if=
"item.status==4"
>
<
template
v-if=
"item.status==5"
>
<div
class=
"picBox"
>
<div
class=
"picBox"
>
<div
style=
"flex: 1"
>
房车定损评定中
</div>
<div
style=
"flex: 1"
>
完成定损,退还剩余押金
</div>
<div
style=
"font-size: 10px;color: #999"
>
{{
item
.
updTimeStr
}}
</div>
<div
style=
"font-size: 10px;color: #999"
>
{{
item
.
updTimeStr
}}
</div>
</div>
</div>
</
template
>
</
template
>
<
template
v-if=
"item.status==5"
>
<
template
v-if=
"item.status==6"
>
<div
class=
"picBox"
>
<div
class=
"picBox"
>
<div
style=
"flex: 1"
>
完成定损,退还剩余押金
</div>
<div
style=
"flex: 1"
>
押金退还到账
</div>
<div
style=
"font-size: 10px;color: #999"
>
{{
item
.
updTimeStr
}}
</div>
<div
style=
"font-size: 10px;color: #999"
>
{{
item
.
updTimeStr
}}
</div>
</div>
</div>
</
template
>
</
template
>
<
template
v-if=
"item.status==6"
>
</p>
<div
class=
"picBox"
>
<p
class=
"tip"
>
<div
style=
"flex: 1"
>
押金退还到账
</div>
<
template
v-if=
"item.status==1"
>
成功还车,退还15000租车押金
</
template
>
<div
style=
"font-size: 10px;color: #999"
>
{{
item
.
updTimeStr
}}
</div>
<
template
v-if=
"item.status==2"
>
{{
item
.
updTimeStr
}}
到账
</
template
>
</div>
<
template
v-if=
"item.status==3"
>
预计
{{
item
.
endTimeStr
}}
之前到账
</
template
>
</
template
>
<
template
v-if=
"item.status==4"
>
押金将在定损后退还,请耐心等待...
</
template
>
</p>
<
template
v-if=
"item.status==5"
>
定损流程有疑问可联系滴房车 客服
<a
:href=
"'tel://'+Tel"
style=
"color: #666666;"
>
{{
Tel
}}
</a></
template
>
<p
class=
"tip"
>
<
template
v-if=
"item.status==6"
>
定损流程有疑问可联系滴房车 客服
<a
:href=
"'tel://'+Tel"
style=
"color: #666666;"
>
{{
Tel
}}
</a></
template
>
<
template
v-if=
"item.status==1"
>
成功还车,退还15000租车押金
</
template
>
</p>
<
template
v-if=
"item.status==2"
>
{{
item
.
updTimeStr
}}
到账
</
template
>
<p
class=
"detailTitle"
v-if=
"item.orderViolation && item.status==3"
style=
"margin-top: 15px"
>
违章罚款
</p>
<
template
v-if=
"item.status==3"
>
预计
{{
item
.
endTimeStr
}}
之前到账
</
template
>
<p
class=
"detailTitle"
v-if=
"item.orderViolation && item.status==3"
>
违章截图:
</p>
<
template
v-if=
"item.status==4"
>
押金将在定损后退还,请耐心等待...
</
template
>
<div
class=
"picBox"
v-if=
"dedDetail.length>0"
>
<
template
v-if=
"item.status==5"
>
定损流程有疑问可联系滴房车 客服
<a
:href=
"'tel://'+Tel"
<img
class=
"picItem"
:src=
"itm"
alt=
""
v-for =
"(itm,idx) in item.pictureList"
:key=
"idx"
>
style=
"color: #666666;"
>
{{
Tel
}}
</a></
template
>
</div>
<
template
v-if=
"item.status==6"
>
定损流程有疑问可联系滴房车 客服
<a
:href=
"'tel://'+Tel"
<p
class=
"detailTitle"
v-if=
"item.orderViolation && item.status==3"
style=
"color: #666666;font-size: 13px"
>
如有疑问,可联系滴房车客服
<a
:href=
"'tel://'+Tel"
style=
"color: #666666;"
>
{{Tel}}
</a></p>
style=
"color: #666666;"
>
{{
Tel
}}
</a></
template
>
<p
class=
"detailTitle"
v-if=
"dedDetail.length>0 && item.status==5"
style=
"margin-top: 15px"
>
定损总罚款{{dedTotal}}元
</p>
</p>
<p
class=
"detailTitle"
v-if=
"dedDetail.length>0 && item.status==5"
>
明细
</p>
<p
class=
"detailTitle"
v-if=
"item.orderViolation && item.status==3"
style=
"margin-top: 15px"
>
违章罚款
</p>
<div
v-if=
"dedDetail.length>0 && item.status==5"
v-for=
"(itm,idx) in dedDetail"
:key=
"idx"
>
<p
class=
"detailTitle"
v-if=
"item.orderViolation && item.status==3"
>
违章截图:
</p>
<p
class=
"detailTitle"
>
{{itm.id}}、{{itm.statusName}}扣{{itm.cost}}元
</p>
<div
class=
"picBox"
v-if=
"dedDetail.length>0"
>
<div
class=
"picBox"
>
<img
class=
"picItem"
:src=
"itm"
alt=
""
v-for=
"(itm,idx) in item.pictureList"
:key=
"idx"
>
<img
class=
"picItem"
:src=
"it"
alt=
""
v-for =
"(it,ix) in itm.picList"
:key=
"ix"
>
</div>
</div>
<p
class=
"detailTitle"
v-if=
"item.orderViolation && item.status==3"
</div>
style=
"color: #666666;font-size: 13px"
>
如有疑问,可联系滴房车客服
<a
:href=
"'tel://'+Tel"
style=
"color: #666666;"
>
{{Tel}}
</a>
</li>
</p>
</ul>
<p
class=
"detailTitle"
v-if=
"dedDetail.length>0 && item.status==5"
style=
"margin-top: 15px"
>
</div>
定损总罚款{{dedTotal}}元
</p>
<div
v-if=
"vehicleDetail"
style=
"border: 1px solid;"
>
<p
class=
"detailTitle"
v-if=
"dedDetail.length>0 && item.status==5"
>
明细
</p>
<div
style=
"border-bottom: 1px solid;"
>
<div
v-if=
"dedDetail.length>0 && item.status==5"
v-for=
"(itm,idx) in dedDetail"
:key=
"idx"
>
<span
class=
"label-text"
>
交车交接人:
</span><span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.username}}
</span>
<p
class=
"detailTitle"
>
{{itm.id}}、{{itm.statusName}}扣{{itm.cost}}元
</p>
</div>
<div
class=
"picBox"
>
<div>
<img
class=
"picItem"
:src=
"it"
alt=
""
v-for=
"(it,ix) in itm.picList"
:key=
"ix"
>
<span
class=
"label-text"
>
上传驾驶证*:
</span><span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.licenseName}}
</span><span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.licensePhone}}
</span><br/>
</div>
<span
style=
"margin-left:110px;"
>
身份证号:
</span>
<span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.licenseIdCard}}
</span><br
/>
</div>
<img
:src=
"orderReturnVehicleCrosstown.licenseImg"
style=
"width: 100px; height: 100px;margin-left:110px;"
/>
</li>
</div>
</ul>
</div>
<div>
<div
v-if=
"vehicleDetail"
style=
"border: 1px solid;"
>
<span
class=
"label-text"
>
拍照取证*:
</span><br/>
<div
style=
"border-bottom: 1px solid;"
>
<img
v-for=
"item in otherImg"
:src=
"item"
style=
"width: 100px; height: 100px;margin-left:110px;"
/>
<span
class=
"label-text"
>
交车交接人:
</span><span
<!-- <img src="../../../../dist/static/img/success.8304acb.png" style="width: 100px; height: 100px;margin-left:110px;"/>
class=
"label-text"
>
{{orderReturnVehicleCrosstown.username}}
</span>
<img src="../../../../dist/static/img/success.8304acb.png" style="width: 100px; height: 100px;margin-left:110px;"/>
</div>
<img src="../../../../dist/static/img/success.8304acb.png" style="width: 100px; height: 100px;margin-left:110px;"/> -->
<div>
</div>
<span
class=
"label-text"
>
上传驾驶证*:
</span><span
<div
v-if=
"handover"
>
class=
"label-text"
>
{{orderReturnVehicleCrosstown.licenseName}}
</span><span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.licensePhone}}
</span><br/>
<span
class=
"label-text"
>
房车公里数*:
</span><span
class=
"label-text"
>
当前公里数:
</span><span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.mileage}}Km
</span><br/>
<span
style=
"margin-left:110px;"
>
身份证号:
</span>
<span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.licenseIdCard}}
</span><br/>
<img
:src=
"orderReturnVehicleCrosstown.mileageImg"
style=
"width: 100px; height: 100px;margin-left:110px;"
/>
<img
:src=
"orderReturnVehicleCrosstown.licenseImg"
style=
"width: 100px; height: 100px;margin-left:110px;"
/>
</div>
</div>
<div
v-if=
"returnVehicle"
>
<span
class=
"label-text"
>
钥匙照片*:
</span><br/>
<img
:src=
"orderReturnVehicleCrosstown.vehicleKey"
style=
"width: 100px; height: 100px;margin-left:110px;"
/>
</div>
<div
v-if=
"returnVehicle"
>
<span
class=
"label-text"
>
押金扣除项*:
</span><span>
{{orderReturnVehicleCrosstown.deduction?'有扣除项':'没有扣除项'}}
</span><br/>
</div>
<div>
<span
class=
"label-text"
>
备注:
</span><span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.remak}}
</span>
</div>
<div>
</div>
</div>
</el-form>
</el-dialog>
<div>
<span
class=
"label-text"
>
拍照取证*:
</span><br/>
<img
v-for=
"item in otherImg"
:src=
"item"
style=
"width: 100px; height: 100px;margin-left:110px;"
/>
<!-- <img src="../../../../dist/static/img/success.8304acb.png" style="width: 100px; height: 100px;margin-left:110px;"/>
<img src="../../../../dist/static/img/success.8304acb.png" style="width: 100px; height: 100px;margin-left:110px;"/>
<img src="../../../../dist/static/img/success.8304acb.png" style="width: 100px; height: 100px;margin-left:110px;"/> -->
</div>
<div
v-if=
"handover"
>
<span
class=
"label-text"
>
房车公里数*:
</span><span
class=
"label-text"
>
当前公里数:
</span><span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.mileage}}Km
</span><br/>
<img
:src=
"orderReturnVehicleCrosstown.mileageImg"
style=
"width: 100px; height: 100px;margin-left:110px;"
/>
</div>
<div
v-if=
"returnVehicle"
>
<span
class=
"label-text"
>
钥匙照片*:
</span><br/>
<img
:src=
"orderReturnVehicleCrosstown.vehicleKey"
style=
"width: 100px; height: 100px;margin-left:110px;"
/>
</div>
<div
v-if=
"returnVehicle"
>
<span
class=
"label-text"
>
押金扣除项*:
</span><span>
{{orderReturnVehicleCrosstown.deduction?'有扣除项':'没有扣除项'}}
</span><br/>
</div>
<div>
<span
class=
"label-text"
>
备注:
</span><span
class=
"label-text"
>
{{orderReturnVehicleCrosstown.remak}}
</span>
</div>
<div>
</div>
</div>
</el-form>
</el-dialog>
</div>
</div>
...
@@ -269,622 +294,747 @@
...
@@ -269,622 +294,747 @@
<
script
>
<
script
>
import
Illegal
from
"./illegalModal"
;
//违章查询
import
Illegal
from
"./illegalModal"
;
//违章查询
import
Detail
from
"./detail"
;
//违章查询
import
Detail
from
"./detail"
;
//违章查询
import
rentOrderDetailModal
from
"../modal/rentOrderDetailModal"
;
//租车订单详情
import
rentOrderDetailModal
from
"../modal/rentOrderDetailModal"
;
//租车订单详情
import
{
import
{
formatDate
formatDate
}
from
'../../../utils/dateFormattor'
;
}
from
'../../../utils/dateFormattor'
;
import
{
import
{
page
,
page
,
getAllBranchCompany
,
getAllBranchCompany
,
getAllBranchCompanyByZoneId
,
getAllBranchCompanyByZoneId
,
getOrderVehicleCrosstown
,
getOrderVehicleCrosstown
,
getStep
getStep
}
from
'api/order/rentVehicle'
;
}
from
'api/order/rentVehicle'
;
import
{
import
{
timestamp2Date
timestamp2Date
}
from
'utils/dateUtils'
;
}
from
'utils/dateUtils'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
mapGetters
}
from
'vuex'
;
import
rsCode
from
'../../../utils/rsCode'
;
import
rsCode
from
'../../../utils/rsCode'
;
import
{
import
{
getSysRegionByIds
getSysRegionByIds
}
from
'api/vehicle/vehicleInfo/'
;
}
from
'api/vehicle/vehicleInfo/'
;
import
{
import
{
getAllZone
getAllZone
}
from
'api/base_info/constant/'
;
}
from
'api/base_info/constant/'
;
import
ElRow
from
"element-ui/packages/row/src/row"
;
import
ElRow
from
"element-ui/packages/row/src/row"
;
import
ElCol
from
"element-ui/packages/col/src/col"
;
import
ElCol
from
"element-ui/packages/col/src/col"
;
import
ElButton
from
"../../../../node_modules/element-ui/packages/button/src/button.vue"
;
import
ElButton
from
"../../../../node_modules/element-ui/packages/button/src/button.vue"
;
export
default
{
name
:
'branchCompanyStock'
,
export
default
{
components
:
{
name
:
'branchCompanyStock'
,
ElButton
,
components
:
{
ElCol
,
ElButton
,
ElRow
,
ElCol
,
Illegal
,
ElRow
,
Detail
,
Illegal
,
rentOrderDetailModal
Detail
,
},
rentOrderDetailModal
data
()
{
return
{
pictureList
:[],
dedDetail
:[],
depositRefundRecord
:[],
dedTotal
:
''
,
Tel
:
''
,
form
:
{
couponAmount
:
undefined
,
crtHost
:
undefined
,
crtName
:
undefined
,
crtTime
:
undefined
,
crtUser
:
undefined
,
detailId
:
undefined
,
endCompanyName
:
undefined
,
goodsAmount
:
undefined
,
hasDiscount
:
undefined
,
hasMemberRight
:
undefined
,
hasPay
:
undefined
,
id
:
undefined
,
name
:
undefined
,
no
:
undefined
,
orderAmount
:
undefined
,
orderOrigin
:
undefined
,
orderVehicleCrosstownDto
:
{
licenseIdCard
:
""
,
licenseImg
:
""
,
licenseName
:
""
,
licensePhone
:
""
},
orderRentVehicleDetail
:
{
bookRecordId
:
undefined
,
costDetail
:
undefined
,
crtTime
:
undefined
,
dayNum
:
undefined
,
deposit
:
undefined
,
driverType
:
undefined
,
endAddr
:
undefined
,
endCity
:
undefined
,
endCityName
:
undefined
,
endCompanyId
:
undefined
,
endTime
:
undefined
,
freeDays
:
undefined
,
handelViolation
:
undefined
,
id
:
undefined
,
modelId
:
undefined
,
myDriverIds
:
undefined
,
orderId
:
undefined
,
score
:
undefined
,
startAddr
:
undefined
,
startCity
:
undefined
,
startCityName
:
undefined
,
startCompanyId
:
undefined
,
startTime
:
undefined
,
stime
:
undefined
,
suserid
:
undefined
,
updTime
:
undefined
,
vehicleId
:
undefined
,
},
payOrigin
:
undefined
,
picture
:
undefined
,
realAmount
:
undefined
,
refundStatus
:
undefined
,
startCompanyName
:
undefined
,
status
:
undefined
,
ststusName
:
undefined
,
telephone
:
undefined
,
type
:
undefined
,
updTime
:
undefined
,
userId
:
undefined
,
username
:
undefined
,
vehicleNumberPlat
:
undefined
,
version
:
undefined
},
orderVehicleCrosstownVisible
:
false
,
rentDialogVisible
:
false
,
//租车详情弹框
modalTitle
:
'订单详情'
,
illegalVisible
:
false
,
//违章查询弹框
detailVisible
:
false
,
rules
:
{
// companyName: [
// {
// required: true,
// message: '请输入用户',
// trigger: 'blur'
// }
// ],
},
},
list
:
null
,
data
()
{
total
:
null
,
return
{
listLoading
:
true
,
pictureList
:
[],
listQuery
:
{
dedDetail
:
[],
page
:
1
,
depositRefundRecord
:
[],
limit
:
20
,
dedTotal
:
''
,
type
:
1
,
Tel
:
''
,
no
:
null
,
form
:
{
status
:
null
,
couponAmount
:
undefined
,
startTime
:
undefined
,
crtHost
:
undefined
,
endTime
:
undefined
,
crtName
:
undefined
,
zoneId
:
undefined
,
crtTime
:
undefined
,
startCompanyId
:
undefined
crtUser
:
undefined
,
detailId
:
undefined
,
endCompanyName
:
undefined
,
goodsAmount
:
undefined
,
hasDiscount
:
undefined
,
hasMemberRight
:
undefined
,
hasPay
:
undefined
,
id
:
undefined
,
name
:
undefined
,
no
:
undefined
,
orderAmount
:
undefined
,
orderOrigin
:
undefined
,
orderVehicleCrosstownDto
:
{
licenseIdCard
:
""
,
licenseImg
:
""
,
licenseName
:
""
,
licensePhone
:
""
},
orderRentVehicleDetail
:
{
bookRecordId
:
undefined
,
costDetail
:
undefined
,
crtTime
:
undefined
,
dayNum
:
undefined
,
deposit
:
undefined
,
driverType
:
undefined
,
endAddr
:
undefined
,
endCity
:
undefined
,
endCityName
:
undefined
,
endCompanyId
:
undefined
,
endTime
:
undefined
,
freeDays
:
undefined
,
handelViolation
:
undefined
,
id
:
undefined
,
modelId
:
undefined
,
myDriverIds
:
undefined
,
orderId
:
undefined
,
score
:
undefined
,
startAddr
:
undefined
,
startCity
:
undefined
,
startCityName
:
undefined
,
startCompanyId
:
undefined
,
startTime
:
undefined
,
stime
:
undefined
,
suserid
:
undefined
,
updTime
:
undefined
,
vehicleId
:
undefined
,
},
payOrigin
:
undefined
,
picture
:
undefined
,
realAmount
:
undefined
,
refundStatus
:
undefined
,
startCompanyName
:
undefined
,
status
:
undefined
,
ststusName
:
undefined
,
telephone
:
undefined
,
type
:
undefined
,
updTime
:
undefined
,
userId
:
undefined
,
username
:
undefined
,
vehicleNumberPlat
:
undefined
,
version
:
undefined
},
orderVehicleCrosstownVisible
:
false
,
rentDialogVisible
:
false
,
//租车详情弹框
modalTitle
:
'订单详情'
,
illegalVisible
:
false
,
//违章查询弹框
detailVisible
:
false
,
rules
:
{
// companyName: [
// {
// required: true,
// message: '请输入用户',
// trigger: 'blur'
// }
// ],
},
list
:
null
,
total
:
null
,
listLoading
:
true
,
listQuery
:
{
page
:
1
,
limit
:
20
,
type
:
1
,
no
:
null
,
status
:
null
,
startTime
:
undefined
,
endTime
:
undefined
,
zoneId
:
undefined
,
startCompanyId
:
undefined
,
plateNumber
:
undefined
},
baranchQuery
:
{
zoneId
:
null
},
orderVehicleQuery
:
{
orderId
:
null
,
type
:
undefined
},
dialogFormVisible
:
false
,
dialogStatus
:
''
,
btn_del
:
true
,
btn_buy
:
true
,
btn_cancel
:
true
,
allZoneArr
:
[],
//全部片区
allBranchCompany
:
[],
tourCostDetail
:
''
,
damageSafe
:
''
,
serviceCost
:
0
,
orderReturnVehicleCrosstown
:
{
crtTime
:
undefined
,
deduction
:
undefined
,
id
:
undefined
,
imgs
:
undefined
,
isDel
:
undefined
,
mileage
:
undefined
,
mileageImg
:
undefined
,
orderId
:
undefined
,
orderNo
:
undefined
,
orperaterId
:
undefined
,
remak
:
undefined
,
status
:
undefined
,
statusId
:
undefined
,
statusTime
:
undefined
,
type
:
undefined
,
updTime
:
undefined
,
userLicenseId
:
undefined
,
username
:
undefined
,
licenseIdCard
:
undefined
,
licenseImg
:
undefined
,
licenseName
:
undefined
,
licensePhone
:
undefined
},
//还车记录
tableKey
:
0
,
otherImg
:
[],
handover
:
false
,
returnVehicle
:
false
,
refundshow
:
false
,
//退款信息
vehicleDetail
:
false
,
//交还车信息,默认全部显示
order_btn_order_violcation_save
:
false
,
depositDetail
:
false
,
}
},
},
baranchQuery
:
{
created
()
{
zoneId
:
null
this
.
getList
();
},
this
.
btn_del
=
this
.
elements
[
'branchCompany/stockApply:btn_delete'
];
orderVehicleQuery
:
{
this
.
order_btn_order_violcation_save
=
this
.
elements
[
'order:btn_order_violcation_save'
];
orderId
:
null
,
},
type
:
undefined
computed
:
{
},
...
mapGetters
([
dialogFormVisible
:
false
,
'elements'
dialogStatus
:
''
,
]),
btn_del
:
true
,
provinceRegions
()
{
btn_buy
:
true
,
return
getSonRegionByCodes
(
1
);
btn_cancel
:
true
,
},
allZoneArr
:[],
//全部片区
//获取大区列表
allBranchCompany
:[],
getAllZoneList
()
{
tourCostDetail
:
''
,
return
getAllZone
();
damageSafe
:
''
,
},
serviceCost
:
0
,
cityRegions
()
{
orderReturnVehicleCrosstown
:{
if
(
!
this
.
$utils
.
isInteger
(
this
.
form
.
addrProvince
))
{
crtTime
:
undefined
,
return
null
;
deduction
:
undefined
,
}
id
:
undefined
,
return
getSonRegionByCodes
(
this
.
form
.
addrProvince
);
imgs
:
undefined
,
}
isDel
:
undefined
,
},
mileage
:
undefined
,
methods
:
{
mileageImg
:
undefined
,
handleOrderDetail
(
row
)
{
orderId
:
undefined
,
this
.
form
=
row
;
orderNo
:
undefined
,
if
(
this
.
form
.
status
==
2
)
{
orperaterId
:
undefined
,
this
.
form
.
ststusName
=
'取消'
;
remak
:
undefined
,
}
status
:
undefined
,
if
(
this
.
form
.
status
==
3
)
{
statusId
:
undefined
,
this
.
form
.
ststusName
=
'待付款'
;
statusTime
:
undefined
,
}
type
:
undefined
,
if
(
this
.
form
.
status
==
4
)
{
updTime
:
undefined
,
this
.
form
.
ststusName
=
'待出行'
;
userLicenseId
:
undefined
,
}
username
:
undefined
,
if
(
this
.
form
.
status
==
5
)
{
licenseIdCard
:
undefined
,
this
.
form
.
ststusName
=
'出行中'
;
licenseImg
:
undefined
,
}
licenseName
:
undefined
,
if
(
this
.
form
.
status
==
6
)
{
licensePhone
:
undefined
this
.
form
.
ststusName
=
'已完成'
;
},
//还车记录
}
tableKey
:
0
,
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
)
otherImg
:[],
this
.
form
.
orderRentVehicleDetail
.
endTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
endTime
)
handover
:
false
,
this
.
costDetail
=
JSON
.
parse
(
this
.
form
.
orderRentVehicleDetail
.
costDetail
)
returnVehicle
:
false
,
var
cost
=
''
;
refundshow
:
false
,
//退款信息
this
.
costDetail
.
children
.
forEach
(
function
(
a
)
{
vehicleDetail
:
false
,
//交还车信息,默认全部显示
var
detail
=
a
.
detail
==
undefined
?
''
:
a
.
detail
order_btn_order_violcation_save
:
false
,
cost
+=
a
.
key
+
":"
+
detail
+
" "
depositDetail
:
false
,
})
}
this
.
tourCostDetail
=
cost
},
if
(
this
.
form
.
orderRentVehicleDetail
.
driverType
==
1
)
{
created
()
{
this
.
serviceCost
=
this
.
form
.
orderRentVehicleDetail
.
dayNum
*
600
this
.
getList
();
}
this
.
btn_del
=
this
.
elements
[
'branchCompany/stockApply:btn_delete'
];
this
.
rentDialogVisible
=
true
;
this
.
order_btn_order_violcation_save
=
this
.
elements
[
'order:btn_order_violcation_save'
];
},
},
/**
computed
:
{
* 租车订单详情弹框关闭
...
mapGetters
([
* */
'elements'
rentOrderDetailDialogEvent
(
e
)
{
]),
this
.
rentDialogVisible
=
false
;
provinceRegions
()
{
if
(
e
)
{
return
getSonRegionByCodes
(
1
);
this
.
getList
()
},
}
//获取大区列表
},
getAllZoneList
(){
/**
return
getAllZone
();
* 操作-违章查询按钮,显示违章弹框
},
*/
cityRegions
()
{
illegalInquiry
(
row
)
{
if
(
!
this
.
$utils
.
isInteger
(
this
.
form
.
addrProvince
))
{
this
.
currentRow
=
row
;
return
null
;
this
.
illegalVisible
=
true
;
}
},
return
getSonRegionByCodes
(
this
.
form
.
addrProvince
);
/**
}
* 操作-查看详情按钮,显示详情弹框
},
*/
methods
:
{
detailInquiry
(
row
)
{
handleOrderDetail
(
row
)
{
this
.
currentRow
=
row
;
this
.
form
=
row
;
this
.
detailVisible
=
true
;
if
(
this
.
form
.
status
==
2
)
{
},
this
.
form
.
ststusName
=
'取消'
;
/**
}
* 关闭违章查询弹框
if
(
this
.
form
.
status
==
3
)
{
* */
this
.
form
.
ststusName
=
'待付款'
;
illegalEvent
(
params
)
{
}
this
.
illegalVisible
=
false
;
if
(
this
.
form
.
status
==
4
)
{
if
(
params
)
{
this
.
form
.
ststusName
=
'待出行'
;
console
.
log
(
params
);
}
}
if
(
this
.
form
.
status
==
5
)
{
},
this
.
form
.
ststusName
=
'出行中'
;
/**
}
* 关闭违章查询弹框
if
(
this
.
form
.
status
==
6
)
{
* */
this
.
form
.
ststusName
=
'已完成'
;
detailEvent
(
params
)
{
}
this
.
detailVisible
=
false
;
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
)
if
(
params
)
{
this
.
form
.
orderRentVehicleDetail
.
endTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
endTime
)
console
.
log
(
params
);
this
.
costDetail
=
JSON
.
parse
(
this
.
form
.
orderRentVehicleDetail
.
costDetail
)
}
var
cost
=
''
;
},
this
.
costDetail
.
children
.
forEach
(
function
(
a
)
{
handleHandoverOrderVehicle
(
row
)
{
var
detail
=
a
.
detail
==
undefined
?
''
:
a
.
detail
console
.
log
(
row
)
cost
+=
a
.
key
+
":"
+
detail
+
" "
this
.
modalTitle
=
"交车记录"
})
this
.
form
=
row
;
this
.
tourCostDetail
=
cost
if
(
this
.
form
.
status
==
2
)
{
if
(
this
.
form
.
orderRentVehicleDetail
.
driverType
==
1
)
{
this
.
form
.
ststusName
=
'取消'
;
this
.
serviceCost
=
this
.
form
.
orderRentVehicleDetail
.
dayNum
*
600
}
}
if
(
this
.
form
.
status
==
3
)
{
this
.
rentDialogVisible
=
true
;
this
.
form
.
ststusName
=
'待付款'
;
},
}
/**
if
(
this
.
form
.
status
==
4
)
{
* 租车订单详情弹框关闭
this
.
form
.
ststusName
=
'待出行'
;
* */
}
rentOrderDetailDialogEvent
(
e
){
if
(
this
.
form
.
status
==
5
)
{
this
.
rentDialogVisible
=
false
;
this
.
form
.
ststusName
=
'出行中'
;
if
(
e
){
}
this
.
getList
()
if
(
this
.
form
.
status
==
6
)
{
}
this
.
form
.
ststusName
=
'已完成'
;
},
}
/**
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
)
* 操作-违章查询按钮,显示违章弹框
this
.
form
.
orderRentVehicleDetail
.
endTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
endTime
)
*/
this
.
costDetail
=
JSON
.
parse
(
this
.
form
.
orderRentVehicleDetail
.
costDetail
)
illegalInquiry
(
row
){
var
cost
=
''
;
this
.
currentRow
=
row
;
this
.
costDetail
.
children
.
forEach
(
function
(
a
)
{
this
.
illegalVisible
=
true
;
cost
+=
a
.
key
+
":"
+
a
.
detail
+
" "
},
})
/**
this
.
tourCostDetail
=
cost
* 操作-查看详情按钮,显示详情弹框
if
(
this
.
form
.
orderRentVehicleDetail
.
driverType
==
1
)
{
*/
this
.
serviceCost
=
this
.
form
.
orderRentVehicleDetail
.
dayNum
*
600
detailInquiry
(
row
){
}
this
.
currentRow
=
row
;
this
.
orderVehicleQuery
.
orderId
=
this
.
form
.
id
this
.
detailVisible
=
true
;
this
.
orderVehicleQuery
.
type
=
1
},
this
.
getAllOrderVehicleCrosstown
();
/**
this
.
handover
=
true
* 关闭违章查询弹框
this
.
returnVehicle
=
false
* */
this
.
vehicleDetail
=
true
illegalEvent
(
params
){
this
.
depositDetail
=
false
this
.
illegalVisible
=
false
;
if
(
params
){
},
console
.
log
(
params
);
getAllOrderVehicleCrosstown
()
{
}
getOrderVehicleCrosstown
(
this
.
orderVehicleQuery
)
},
.
then
(
response
=>
{
/**
console
.
log
(
response
)
* 关闭违章查询弹框
if
(
response
.
data
.
length
<=
0
)
{
* */
alert
(
"交还车记录不存在"
)
detailEvent
(
params
){
}
else
{
this
.
detailVisible
=
false
;
this
.
orderVehicleCrosstownVisible
=
true
if
(
params
){
this
.
orderReturnVehicleCrosstown
=
response
.
data
[
0
];
console
.
log
(
params
);
if
(
response
.
data
[
0
].
imgs
)
{
}
this
.
otherImg
=
response
.
data
[
0
].
imgs
.
split
(
','
)
},
}
handleHandoverOrderVehicle
(
row
)
{
}
console
.
log
(
row
)
})
this
.
modalTitle
=
"交车记录"
this
.
form
=
row
;
if
(
this
.
form
.
status
==
2
)
{
},
this
.
form
.
ststusName
=
'取消'
;
}
handleReturnOrderVehicle
(
row
)
{
if
(
this
.
form
.
status
==
3
)
{
console
.
log
(
row
)
this
.
form
.
ststusName
=
'待付款'
;
this
.
modalTitle
=
"还车记录"
}
this
.
form
=
row
;
if
(
this
.
form
.
status
==
4
)
{
if
(
this
.
form
.
status
==
2
)
{
this
.
form
.
ststusName
=
'待出行'
;
this
.
form
.
ststusName
=
'取消'
;
}
}
if
(
this
.
form
.
status
==
5
)
{
if
(
this
.
form
.
status
==
3
)
{
this
.
form
.
ststusName
=
'出行中'
;
this
.
form
.
ststusName
=
'待付款'
;
}
}
if
(
this
.
form
.
status
==
6
)
{
if
(
this
.
form
.
status
==
4
)
{
this
.
form
.
ststusName
=
'已完成'
;
this
.
form
.
ststusName
=
'待出行'
;
}
}
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
)
if
(
this
.
form
.
status
==
5
)
{
this
.
form
.
orderRentVehicleDetail
.
endTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
endTime
)
this
.
form
.
ststusName
=
'出行中'
;
this
.
costDetail
=
JSON
.
parse
(
this
.
form
.
orderRentVehicleDetail
.
costDetail
)
}
var
cost
=
''
;
if
(
this
.
form
.
status
==
6
)
{
this
.
costDetail
.
children
.
forEach
(
function
(
a
)
{
this
.
form
.
ststusName
=
'已完成'
;
cost
+=
a
.
key
+
":"
+
a
.
detail
+
" "
}
})
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
)
this
.
tourCostDetail
=
cost
this
.
form
.
orderRentVehicleDetail
.
endTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
endTime
)
if
(
this
.
form
.
orderRentVehicleDetail
.
driverType
==
1
)
{
this
.
costDetail
=
JSON
.
parse
(
this
.
form
.
orderRentVehicleDetail
.
costDetail
)
this
.
serviceCost
=
this
.
form
.
orderRentVehicleDetail
.
dayNum
*
600
var
cost
=
''
;
}
this
.
costDetail
.
children
.
forEach
(
function
(
a
)
{
this
.
orderVehicleQuery
.
orderId
=
this
.
form
.
id
cost
+=
a
.
key
+
":"
+
a
.
detail
+
" "
this
.
orderVehicleQuery
.
type
=
1
})
this
.
getAllOrderVehicleCrosstown
();
this
.
tourCostDetail
=
cost
this
.
handover
=
true
if
(
this
.
form
.
orderRentVehicleDetail
.
driverType
==
1
)
{
this
.
returnVehicle
=
false
this
.
serviceCost
=
this
.
form
.
orderRentVehicleDetail
.
dayNum
*
600
this
.
vehicleDetail
=
true
}
this
.
depositDetail
=
false
this
.
orderVehicleQuery
.
orderId
=
this
.
form
.
id
this
.
orderVehicleQuery
.
type
=
2
},
this
.
getAllOrderVehicleCrosstown
();
getAllOrderVehicleCrosstown
()
{
this
.
returnVehicle
=
true
getOrderVehicleCrosstown
(
this
.
orderVehicleQuery
)
this
.
handover
=
false
.
then
(
response
=>
{
this
.
vehicleDetail
=
true
console
.
log
(
response
)
this
.
depositDetail
=
false
if
(
response
.
data
.
length
<=
0
)
{
},
alert
(
"交还车记录不存在"
)
handleRefundVehicle
(
row
)
{
}
else
{
console
.
log
(
row
)
this
.
orderVehicleCrosstownVisible
=
true
var
that
=
this
;
this
.
orderReturnVehicleCrosstown
=
response
.
data
[
0
];
that
.
pictureList
=
[];
if
(
response
.
data
[
0
].
imgs
)
{
that
.
dedDetail
=
[];
this
.
otherImg
=
response
.
data
[
0
].
imgs
.
split
(
','
)
that
.
depositRefundRecord
=
[];
}
that
.
dedTotal
=
0
;
}
that
.
Tel
=
''
;
})
getStep
(
row
.
no
).
then
(
response
=>
{
response
.
data
.
forEach
(
function
(
item
)
{
if
(
item
.
type
!=
1
)
{
},
that
.
Tel
=
item
.
customerPhone
that
.
type
=
item
.
type
handleReturnOrderVehicle
(
row
)
{
if
(
item
.
dedDetail
)
{
console
.
log
(
row
)
var
dedTotal
=
0
this
.
modalTitle
=
"还车记录"
var
dedDetail
=
JSON
.
parse
(
item
.
dedDetail
);
this
.
form
=
row
;
that
.
dedDetail
=
dedDetail
;
if
(
this
.
form
.
status
==
2
)
{
dedDetail
.
forEach
(
function
(
item
)
{
this
.
form
.
ststusName
=
'取消'
;
dedTotal
+=
Number
(
item
.
cost
)
}
})
if
(
this
.
form
.
status
==
3
)
{
that
.
dedTotal
=
dedTotal
.
toFixed
(
2
);
this
.
form
.
ststusName
=
'待付款'
;
}
}
item
.
depositRefundRecord
.
forEach
(
function
(
itm
)
{
if
(
this
.
form
.
status
==
4
)
{
itm
.
updTimeStr
=
timestamp2Date
(
itm
.
updTime
);
this
.
form
.
ststusName
=
'待出行'
;
if
(
itm
.
status
==
3
)
{
}
itm
.
endTimeStr
=
timestamp2Date
(
Number
(
itm
.
updTime
)
+
2592000000
)
if
(
this
.
form
.
status
==
5
)
{
if
(
itm
.
orderViolation
)
{
this
.
form
.
ststusName
=
'出行中'
;
if
(
itm
.
orderViolation
.
picture
)
{
}
var
Arr
=
itm
.
orderViolation
.
picture
.
split
(
","
);
if
(
this
.
form
.
status
==
6
)
{
var
arrivalPicList
=
[];
this
.
form
.
ststusName
=
'已完成'
;
Arr
.
map
(
function
(
it
)
{
}
arrivalPicList
.
push
(
it
);
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
)
});
this
.
form
.
orderRentVehicleDetail
.
endTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
endTime
)
itm
.
pictureList
=
arrivalPicList
;
this
.
costDetail
=
JSON
.
parse
(
this
.
form
.
orderRentVehicleDetail
.
costDetail
)
var
cost
=
''
;
this
.
costDetail
.
children
.
forEach
(
function
(
a
)
{
cost
+=
a
.
key
+
":"
+
a
.
detail
+
" "
})
this
.
tourCostDetail
=
cost
if
(
this
.
form
.
orderRentVehicleDetail
.
driverType
==
1
)
{
this
.
serviceCost
=
this
.
form
.
orderRentVehicleDetail
.
dayNum
*
600
}
this
.
orderVehicleQuery
.
orderId
=
this
.
form
.
id
this
.
orderVehicleQuery
.
type
=
2
this
.
getAllOrderVehicleCrosstown
();
this
.
returnVehicle
=
true
this
.
handover
=
false
this
.
vehicleDetail
=
true
this
.
depositDetail
=
false
},
handleRefundVehicle
(
row
)
{
console
.
log
(
row
)
var
that
=
this
;
that
.
pictureList
=
[];
that
.
dedDetail
=
[];
that
.
depositRefundRecord
=
[];
that
.
dedTotal
=
0
;
that
.
Tel
=
''
;
getStep
(
row
.
no
).
then
(
response
=>
{
response
.
data
.
forEach
(
function
(
item
)
{
if
(
item
.
type
!=
1
){
that
.
Tel
=
item
.
customerPhone
that
.
type
=
item
.
type
if
(
item
.
dedDetail
){
var
dedTotal
=
0
var
dedDetail
=
JSON
.
parse
(
item
.
dedDetail
);
that
.
dedDetail
=
dedDetail
;
dedDetail
.
forEach
(
function
(
item
){
dedTotal
+=
Number
(
item
.
cost
)
})
that
.
dedTotal
=
dedTotal
.
toFixed
(
2
);
}
}
item
.
depositRefundRecord
.
forEach
(
function
(
itm
){
itm
.
updTimeStr
=
timestamp2Date
(
itm
.
updTime
);
if
(
itm
.
status
==
3
){
itm
.
endTimeStr
=
timestamp2Date
(
Number
(
itm
.
updTime
)
+
2592000000
)
if
(
itm
.
orderViolation
){
if
(
itm
.
orderViolation
.
picture
){
var
Arr
=
itm
.
orderViolation
.
picture
.
split
(
","
);
var
arrivalPicList
=
[];
Arr
.
map
(
function
(
it
){
arrivalPicList
.
push
(
it
);
});
itm
.
pictureList
=
arrivalPicList
;
}
}
}
})
if
(
item
.
type
==
3
){
var
arr
=
item
.
depositRefundRecord
;
var
item
=
arr
.
shift
();
arr
.
push
(
item
)
}
else
{
var
arr
=
item
.
depositRefundRecord
;
}
that
.
depositRefundRecord
=
arr
console
.
log
(
that
.
depositRefundRecord
)
}
}
}
})
if
(
item
.
type
==
3
)
{
var
arr
=
item
.
depositRefundRecord
;
var
item
=
arr
.
shift
();
arr
.
push
(
item
)
}
else
{
var
arr
=
item
.
depositRefundRecord
;
}
that
.
depositRefundRecord
=
arr
console
.
log
(
that
.
depositRefundRecord
)
}
});
})
this
.
modalTitle
=
"押金记录"
this
.
form
=
row
;
if
(
this
.
form
.
status
==
2
)
{
this
.
form
.
ststusName
=
'取消'
;
}
if
(
this
.
form
.
status
==
3
)
{
this
.
form
.
ststusName
=
'待付款'
;
}
if
(
this
.
form
.
status
==
4
)
{
this
.
form
.
ststusName
=
'待出行'
;
}
if
(
this
.
form
.
status
==
5
)
{
this
.
form
.
ststusName
=
'出行中'
;
}
if
(
this
.
form
.
status
==
6
)
{
this
.
form
.
ststusName
=
'已完成'
;
}
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
)
this
.
form
.
orderRentVehicleDetail
.
endTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
endTime
)
this
.
orderVehicleCrosstownVisible
=
true
this
.
vehicleDetail
=
false
this
.
depositDetail
=
true
},
//监听change事件
getProvinceRegions
(
item
)
{
this
.
listQuery
.
zoneId
=
item
this
.
baranchQuery
.
zoneId
=
item
this
.
listQuery
.
startCompanyId
=
undefined
;
getAllBranchCompanyByZoneId
(
this
.
baranchQuery
)
.
then
(
response
=>
{
this
.
allBranchCompany
=
response
.
data
;
})
},
getAllBranchCompanyChange
(
item
)
{
this
.
listQuery
.
startCompanyId
=
item
},
handleCancel
(
row
)
{
this
.
$confirm
(
'此操作将放弃购买, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
cancelApply
(
row
.
id
)
.
then
(()
=>
{
this
.
$notify
({
title
:
'成功'
,
message
:
'操作成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
getList
();
});
});
},
handleDelete
(
row
)
{
this
.
$confirm
(
'此操作将永久删除, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
delObj
(
row
.
id
)
.
then
(()
=>
{
this
.
$notify
({
title
:
'成功'
,
message
:
'删除成功'
,
type
:
'success'
,
duration
:
2000
});
});
})
const
index
=
this
.
list
.
indexOf
(
row
);
this
.
modalTitle
=
"押金记录"
this
.
list
.
splice
(
index
,
1
);
this
.
form
=
row
;
});
if
(
this
.
form
.
status
==
2
)
{
});
this
.
form
.
ststusName
=
'取消'
;
},
}
handleFilter
()
{
if
(
this
.
form
.
status
==
3
)
{
this
.
listQuery
.
page
=
1
;
this
.
form
.
ststusName
=
'待付款'
;
this
.
$refs
.
queryForm
.
validate
(
valid
=>
{
}
if
(
valid
)
{
if
(
this
.
form
.
status
==
4
)
{
this
.
getList
();
this
.
form
.
ststusName
=
'待出行'
;
}
else
{
}
return
false
;
if
(
this
.
form
.
status
==
5
)
{
}
this
.
form
.
ststusName
=
'出行中'
;
}
if
(
this
.
form
.
status
==
6
)
{
this
.
form
.
ststusName
=
'已完成'
;
}
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
)
this
.
form
.
orderRentVehicleDetail
.
endTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
endTime
)
this
.
orderVehicleCrosstownVisible
=
true
this
.
vehicleDetail
=
false
this
.
depositDetail
=
true
},
//监听change事件
getProvinceRegions
(
item
)
{
this
.
listQuery
.
zoneId
=
item
this
.
baranchQuery
.
zoneId
=
item
this
.
listQuery
.
startCompanyId
=
undefined
;
getAllBranchCompanyByZoneId
(
this
.
baranchQuery
)
.
then
(
response
=>
{
this
.
allBranchCompany
=
response
.
data
;
})
},
getAllBranchCompanyChange
(
item
)
{
this
.
listQuery
.
startCompanyId
=
item
},
handleCancel
(
row
)
{
this
.
$confirm
(
'此操作将放弃购买, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
cancelApply
(
row
.
id
)
.
then
(()
=>
{
this
.
$notify
({
title
:
'成功'
,
message
:
'操作成功'
,
type
:
'success'
,
duration
:
2000
});
});
},
clearSearch
()
{
this
.
listQuery
=
{
page
:
1
,
limit
:
20
,
type
:
1
,
no
:
null
,
status
:
null
,
startTime
:
undefined
,
endTime
:
undefined
,
zoneId
:
undefined
,
startCompanyId
:
undefined
}
this
.
getList
()
},
/**
* 获取订单列表
*/
getList
()
{
this
.
listLoading
=
true
;
console
.
log
(
this
.
listQuery
)
// if(this.listQuery.startTime){
// this.listQuery.startTime = this.listQuery.startTime.getTime();
// }
// if(this.listQuery.endTime){
// this.listQuery.endTime = this.listQuery.endTime.getTime();
// }
page
(
this
.
listQuery
)
.
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
;
this
.
total
=
response
.
data
.
totalCount
;
this
.
listLoading
=
false
;
})
},
handleSizeChange
(
val
)
{
this
.
listQuery
.
limit
=
val
;
this
.
getList
();
this
.
getList
();
});
},
});
dateFormat
(
timestamp
)
{
},
let
date
=
new
Date
(
timestamp
);
//时间戳为10位需*1000,时间戳为13位的话不需乘1000
return
formatDate
(
date
,
'yyyy-MM-dd hh:mm:ss'
);
handleDelete
(
row
)
{
},
this
.
$confirm
(
'此操作将永久删除, 是否继续?'
,
'提示'
,
{
handleCurrentChange
(
val
)
{
confirmButtonText
:
'确定'
,
this
.
listQuery
.
page
=
val
;
cancelButtonText
:
'取消'
,
this
.
getList
();
type
:
'warning'
}
})
}
.
then
(()
=>
{
delObj
(
row
.
id
)
.
then
(()
=>
{
this
.
$notify
({
title
:
'成功'
,
message
:
'删除成功'
,
type
:
'success'
,
duration
:
2000
});
const
index
=
this
.
list
.
indexOf
(
row
);
this
.
list
.
splice
(
index
,
1
);
});
});
},
handleFilter
()
{
this
.
listQuery
.
page
=
1
;
this
.
$refs
.
queryForm
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
getList
();
}
else
{
return
false
;
}
});
},
clearSearch
()
{
this
.
listQuery
=
{
page
:
1
,
limit
:
20
,
type
:
1
,
no
:
null
,
status
:
null
,
startTime
:
undefined
,
endTime
:
undefined
,
zoneId
:
undefined
,
startCompanyId
:
undefined
}
this
.
getList
()
},
/**
* 获取订单列表
*/
getList
()
{
this
.
listLoading
=
true
;
console
.
log
(
this
.
listQuery
)
// if(this.listQuery.startTime){
// this.listQuery.startTime = this.listQuery.startTime.getTime();
// }
// if(this.listQuery.endTime){
// this.listQuery.endTime = this.listQuery.endTime.getTime();
// }
page
(
this
.
listQuery
)
.
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
;
this
.
total
=
response
.
data
.
totalCount
;
this
.
listLoading
=
false
;
})
},
handleSizeChange
(
val
)
{
this
.
listQuery
.
limit
=
val
;
this
.
getList
();
},
dateFormat
(
timestamp
)
{
let
date
=
new
Date
(
timestamp
);
//时间戳为10位需*1000,时间戳为13位的话不需乘1000
return
formatDate
(
date
,
'yyyy-MM-dd hh:mm:ss'
);
},
handleCurrentChange
(
val
)
{
this
.
listQuery
.
page
=
val
;
this
.
getList
();
}
}
}
}
</
script
>
</
script
>
<
style
scpoed
>
<
style
scpoed
>
.label-text
{
.label-text
{
margin-left
:
10px
;
margin-left
:
10px
;
margin-right
:
20px
;
margin-right
:
20px
;
}
}
.label-title
{
margin-top
:
10px
;
.label-title
{
}
margin-top
:
10px
;
.orderDetail
tr
th
{
}
background
:
#eef1f6
;
}
.orderDetail
tr
th
{
.orderDetail
tr
td
,
.orderDetail
tr
th
{
background
:
#eef1f6
;
width
:
500px
;
}
text-align
:
center
;
border
:
1px
solid
#dfe6ec
;
.orderDetail
tr
td
,
.orderDetail
tr
th
{
margin-left
:
100px
;
width
:
500px
;
margin-right
:
100px
;
text-align
:
center
;
padding
:
10px
;
border
:
1px
solid
#dfe6ec
;
}
margin-left
:
100px
;
.label-value
{
margin-right
:
100px
;
margin-left
:
80px
;
padding
:
10px
;
margin-right
:
100px
;
}
}
#license-img
{
.label-value
{
width
:
50px
;
margin-left
:
80px
;
height
:
50px
;
margin-right
:
100px
;
}
}
.order-details
.el-form-item
{
margin-bottom
:
10px
!important
;
#license-img
{
}
width
:
50px
;
.stepBox
{
background-color
:
#fff
;
width
:
100%
;
margin-top
:
10px
;}
height
:
50px
;
.title
{
font-size
:
17px
;
color
:
#171413
;
border-bottom
:
1px
solid
#CCCCCC
;
margin-bottom
:
10px
;
font-weight
:
400
;
padding
:
10px
;}
}
.stepBox
ul
{
margin-left
:
10px
;
padding-left
:
10px
;
padding-top
:
20px
;}
.stepBox
li
{
position
:
relative
;
padding
:
0
20px
20px
20px
;
list-style
:
none
;
min-height
:
40px
;
border-left
:
1px
solid
#ccc
;
margin-top
:
-15px
;}
.order-details
.el-form-item
{
.stepBox
li
.active
{
border-color
:
#47E270
;}
margin-bottom
:
10px
!important
;
.stepBox
ul
li
:last-child
{
border
:
none
;}
}
.activeImg
,
.doingImg
{
position
:
absolute
;
width
:
28px
;
top
:
-18px
;
left
:
-14px
;
background
:
#fff
}
.stepTitle
{
font-size
:
15px
;
color
:
#171413
;
padding-bottom
:
5px
}
.stepBox
{
.tip
{
font-size
:
10px
;
color
:
#999999
;}
background-color
:
#fff
;
.detailTitle
{
font-size
:
10px
;
color
:
#171413
;}
width
:
100%
;
.orderBox
{
width
:
100%
;
padding
:
0
10px
;
background
:
#fff
;}
margin-top
:
10px
;
.orderItem
{
display
:
flex
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
align-items
:
center
;
padding-bottom
:
5px
}
}
.orderItemLeft
{
font-size
:
13px
;
color
:
#171413
}
.orderItemRight
{
font-size
:
13px
;
color
:
#666666
}
.title
{
.detailBox
{
display
:
flex
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
padding
:
0
10px
10px
10px
;
align-items
:
center
}
font-size
:
17px
;
.detailBoxLeft
{
width
:
80px
;
height
:
80px
;
border-radius
:
3px
;
margin-right
:
7px
}
color
:
#171413
;
.detailBoxRight
{
flex
:
1
;}
border-bottom
:
1px
solid
#CCCCCC
;
.copy
{
font-size
:
10px
;
color
:
#666666
;
background
:
#EEEEEE
;
border-radius
:
3px
;
padding
:
3px
;
margin-left
:
10px
}
margin-bottom
:
10px
;
.picBox
{
display
:
flex
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
align-items
:
center
;
flex-wrap
:
wrap
}
font-weight
:
400
;
.picItem
{
width
:
calc
(
33.3%
-
10px
);
margin-right
:
10px
;
margin-bottom
:
10px
;}
padding
:
10px
;
.bag
{
background
:
#171413
;
border-radius
:
3px
;
padding
:
0
2px
;
color
:
#fff
;
font-size
:
10px
;
margin-right
:
5px
}
}
.stepBox
ul
{
margin-left
:
10px
;
padding-left
:
10px
;
padding-top
:
20px
;
}
.stepBox
li
{
position
:
relative
;
padding
:
0
20px
20px
20px
;
list-style
:
none
;
min-height
:
40px
;
border-left
:
1px
solid
#ccc
;
margin-top
:
-15px
;
}
.stepBox
li
.active
{
border-color
:
#47E270
;
}
.stepBox
ul
li
:last-child
{
border
:
none
;
}
.activeImg
,
.doingImg
{
position
:
absolute
;
width
:
28px
;
top
:
-18px
;
left
:
-14px
;
background
:
#fff
}
.stepTitle
{
font-size
:
15px
;
color
:
#171413
;
padding-bottom
:
5px
}
.tip
{
font-size
:
10px
;
color
:
#999999
;
}
.detailTitle
{
font-size
:
10px
;
color
:
#171413
;
}
.orderBox
{
width
:
100%
;
padding
:
0
10px
;
background
:
#fff
;
}
.orderItem
{
display
:
flex
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
align-items
:
center
;
padding-bottom
:
5px
}
.orderItemLeft
{
font-size
:
13px
;
color
:
#171413
}
.orderItemRight
{
font-size
:
13px
;
color
:
#666666
}
.detailBox
{
display
:
flex
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
padding
:
0
10px
10px
10px
;
align-items
:
center
}
.detailBoxLeft
{
width
:
80px
;
height
:
80px
;
border-radius
:
3px
;
margin-right
:
7px
}
.detailBoxRight
{
flex
:
1
;
}
.copy
{
font-size
:
10px
;
color
:
#666666
;
background
:
#EEEEEE
;
border-radius
:
3px
;
padding
:
3px
;
margin-left
:
10px
}
.picBox
{
display
:
flex
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
align-items
:
center
;
flex-wrap
:
wrap
}
.picItem
{
width
:
calc
(
33.3%
-
10px
);
margin-right
:
10px
;
margin-bottom
:
10px
;
}
.bag
{
background
:
#171413
;
border-radius
:
3px
;
padding
:
0
2px
;
color
:
#fff
;
font-size
:
10px
;
margin-right
:
5px
}
</
style
>
</
style
>
src/views/userManagement/imCustomerServiceManger/model/customerServiceModel.vue
View file @
c513b165
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<el-row>
<el-row>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"客服电话"
prop=
"telphone"
>
<el-form-item
label=
"客服电话"
prop=
"telphone"
>
<el-input
v-model=
"form.telphone"
placeholder=
"请输入客服电话"
type=
"number"
></el-input>
<el-input
v-model=
"form.telphone"
placeholder=
"请输入客服电话"
type=
"number"
:readonly=
"title==='编辑'"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
...
static/utf8-jsp/dialogs/image/image.js
View file @
c513b165
This source diff could not be displayed because it is too large. You can
view the blob
instead.
static/utf8-jsp/dialogs/video/video.js
View file @
c513b165
...
@@ -6,786 +6,793 @@
...
@@ -6,786 +6,793 @@
* To change this template use File | Settings | File Templates.
* To change this template use File | Settings | File Templates.
*/
*/
(
function
(){
(
function
()
{
var
video
=
{},
var
video
=
{},
uploadVideoList
=
[],
uploadVideoList
=
[],
isModifyUploadVideo
=
false
,
isModifyUploadVideo
=
false
,
uploadFile
;
uploadFile
;
window
.
onload
=
function
(){
window
.
onload
=
function
()
{
$focus
(
$G
(
"videoUrl"
));
$focus
(
$G
(
"videoUrl"
));
initTabs
();
initTabs
();
initVideo
();
initVideo
();
initUpload
();
initUpload
();
};
};
/* 初始化tab标签 */
/* 初始化tab标签 */
function
initTabs
(){
function
initTabs
()
{
var
tabs
=
$G
(
'tabHeads'
).
children
;
var
tabs
=
$G
(
'tabHeads'
).
children
;
for
(
var
i
=
0
;
i
<
tabs
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
tabs
.
length
;
i
++
)
{
domUtils
.
on
(
tabs
[
i
],
"click"
,
function
(
e
)
{
domUtils
.
on
(
tabs
[
i
],
"click"
,
function
(
e
)
{
var
j
,
bodyId
,
target
=
e
.
target
||
e
.
srcElement
;
var
j
,
bodyId
,
target
=
e
.
target
||
e
.
srcElement
;
for
(
j
=
0
;
j
<
tabs
.
length
;
j
++
)
{
for
(
j
=
0
;
j
<
tabs
.
length
;
j
++
)
{
bodyId
=
tabs
[
j
].
getAttribute
(
'data-content-id'
);
bodyId
=
tabs
[
j
].
getAttribute
(
'data-content-id'
);
if
(
tabs
[
j
]
==
target
){
if
(
tabs
[
j
]
==
target
)
{
domUtils
.
addClass
(
tabs
[
j
],
'focus'
);
domUtils
.
addClass
(
tabs
[
j
],
'focus'
);
domUtils
.
addClass
(
$G
(
bodyId
),
'focus'
);
domUtils
.
addClass
(
$G
(
bodyId
),
'focus'
);
}
else
{
}
else
{
domUtils
.
removeClasses
(
tabs
[
j
],
'focus'
);
domUtils
.
removeClasses
(
tabs
[
j
],
'focus'
);
domUtils
.
removeClasses
(
$G
(
bodyId
),
'focus'
);
domUtils
.
removeClasses
(
$G
(
bodyId
),
'focus'
);
}
}
}
});
}
}
});
}
}
}
function
initVideo
(){
createAlignButton
(
[
"videoFloat"
,
"upload_alignment"
]
);
function
initVideo
()
{
addUrlChangeListener
(
$G
(
"videoUrl"
));
createAlignButton
([
"videoFloat"
,
"upload_alignment"
]);
addOkListener
();
addUrlChangeListener
(
$G
(
"videoUrl"
));
addOkListener
();
//编辑视频时初始化相关信息
(
function
(){
//编辑视频时初始化相关信息
var
img
=
editor
.
selection
.
getRange
().
getClosedNode
(),
url
;
(
function
()
{
if
(
img
&&
img
.
className
){
var
img
=
editor
.
selection
.
getRange
().
getClosedNode
(),
url
;
var
hasFakedClass
=
(
img
.
className
==
"edui-faked-video"
),
if
(
img
&&
img
.
className
)
{
hasUploadClass
=
img
.
className
.
indexOf
(
"edui-upload-video"
)
!=-
1
;
var
hasFakedClass
=
(
img
.
className
==
"edui-faked-video"
),
if
(
hasFakedClass
||
hasUploadClass
)
{
hasUploadClass
=
img
.
className
.
indexOf
(
"edui-upload-video"
)
!=
-
1
;
$G
(
"videoUrl"
).
value
=
url
=
img
.
getAttribute
(
"_url"
);
if
(
hasFakedClass
||
hasUploadClass
)
{
$G
(
"videoWidth"
).
value
=
img
.
width
;
$G
(
"videoUrl"
).
value
=
url
=
img
.
getAttribute
(
"_url"
);
$G
(
"videoHeight"
).
value
=
img
.
height
;
$G
(
"videoWidth"
).
value
=
img
.
width
;
var
align
=
domUtils
.
getComputedStyle
(
img
,
"float"
),
$G
(
"videoHeight"
).
value
=
img
.
height
;
parentAlign
=
domUtils
.
getComputedStyle
(
img
.
parentNode
,
"text-align"
);
var
align
=
domUtils
.
getComputedStyle
(
img
,
"float"
),
updateAlignButton
(
parentAlign
===
"center"
?
"center"
:
align
);
parentAlign
=
domUtils
.
getComputedStyle
(
img
.
parentNode
,
"text-align"
);
}
updateAlignButton
(
parentAlign
===
"center"
?
"center"
:
align
);
if
(
hasUploadClass
)
{
isModifyUploadVideo
=
true
;
}
}
createPreviewVideo
(
url
);
})();
}
/**
* 监听确认和取消两个按钮事件,用户执行插入或者清空正在播放的视频实例操作
*/
function
addOkListener
(){
dialog
.
onok
=
function
(){
$G
(
"preview"
).
innerHTML
=
""
;
var
currentTab
=
findFocus
(
"tabHeads"
,
"tabSrc"
);
switch
(
currentTab
){
case
"video"
:
return
insertSingle
();
break
;
case
"videoSearch"
:
return
insertSearch
(
"searchList"
);
break
;
case
"upload"
:
return
insertUpload
();
break
;
}
};
dialog
.
oncancel
=
function
(){
$G
(
"preview"
).
innerHTML
=
""
;
};
}
/**
* 依据传入的align值更新按钮信息
* @param align
*/
function
updateAlignButton
(
align
)
{
var
aligns
=
$G
(
"videoFloat"
).
children
;
for
(
var
i
=
0
,
ci
;
ci
=
aligns
[
i
++
];
)
{
if
(
ci
.
getAttribute
(
"name"
)
==
align
)
{
if
(
ci
.
className
!=
"focus"
)
{
ci
.
className
=
"focus"
;
}
}
else
{
if
(
ci
.
className
==
"focus"
)
{
ci
.
className
=
""
;
}
}
}
}
}
if
(
hasUploadClass
)
{
isModifyUploadVideo
=
true
;
/**
* 将单个视频信息插入编辑器中
*/
function
insertSingle
(){
var
width
=
$G
(
"videoWidth"
),
height
=
$G
(
"videoHeight"
),
url
=
$G
(
'videoUrl'
).
value
,
align
=
findFocus
(
"videoFloat"
,
"name"
);
if
(
!
url
)
return
false
;
if
(
!
checkNum
(
[
width
,
height
]
)
)
return
false
;
editor
.
execCommand
(
'insertvideo'
,
{
url
:
convert_url
(
url
),
width
:
width
.
value
,
height
:
height
.
value
,
align
:
align
},
isModifyUploadVideo
?
'upload'
:
null
);
}
/**
* 将元素id下的所有代表视频的图片插入编辑器中
* @param id
*/
function
insertSearch
(
id
){
var
imgs
=
domUtils
.
getElementsByTagName
(
$G
(
id
),
"img"
),
videoObjs
=
[];
for
(
var
i
=
0
,
img
;
img
=
imgs
[
i
++
];){
if
(
img
.
getAttribute
(
"selected"
)){
videoObjs
.
push
({
url
:
img
.
getAttribute
(
"ue_video_url"
),
width
:
420
,
height
:
280
,
align
:
"none"
});
}
}
}
editor
.
execCommand
(
'insertvideo'
,
videoObjs
);
}
}
createPreviewVideo
(
url
);
})();
/**
}
* 找到id下具有focus类的节点并返回该节点下的某个属性
* @param id
/**
* @param returnProperty
* 监听确认和取消两个按钮事件,用户执行插入或者清空正在播放的视频实例操作
*/
*/
function
findFocus
(
id
,
returnProperty
)
{
function
addOkListener
()
{
var
tabs
=
$G
(
id
).
children
,
dialog
.
onok
=
function
()
{
property
;
$G
(
"preview"
).
innerHTML
=
""
;
for
(
var
i
=
0
,
ci
;
ci
=
tabs
[
i
++
];
)
{
var
currentTab
=
findFocus
(
"tabHeads"
,
"tabSrc"
);
if
(
ci
.
className
==
"focus"
)
{
switch
(
currentTab
)
{
property
=
ci
.
getAttribute
(
returnProperty
);
case
"video"
:
break
;
return
insertSingle
();
}
break
;
case
"videoSearch"
:
return
insertSearch
(
"searchList"
);
break
;
case
"upload"
:
return
insertUpload
();
break
;
}
};
dialog
.
oncancel
=
function
()
{
$G
(
"preview"
).
innerHTML
=
""
;
};
}
/**
* 依据传入的align值更新按钮信息
* @param align
*/
function
updateAlignButton
(
align
)
{
var
aligns
=
$G
(
"videoFloat"
).
children
;
for
(
var
i
=
0
,
ci
;
ci
=
aligns
[
i
++
];)
{
if
(
ci
.
getAttribute
(
"name"
)
==
align
)
{
if
(
ci
.
className
!=
"focus"
)
{
ci
.
className
=
"focus"
;
}
}
return
property
;
}
else
{
if
(
ci
.
className
==
"focus"
)
{
ci
.
className
=
""
;
}
}
}
}
function
convert_url
(
url
){
}
if
(
!
url
)
return
''
;
url
=
utils
.
trim
(
url
)
/**
.
replace
(
/v
\.
youku
\.
com
\/
v_show
\/
id_
([\w\-
=
]
+
)\.
html/i
,
'player.youku.com/player.php/sid/$1/v.swf'
)
* 将单个视频信息插入编辑器中
.
replace
(
/
(
www
\.)?
youtube
\.
com
\/
watch
\?
v=
([\w\-]
+
)
/i
,
"www.youtube.com/v/$2"
)
*/
.
replace
(
/youtu.be
\/(\w
+
)
$/i
,
"www.youtube.com/v/$1"
)
function
insertSingle
()
{
.
replace
(
/v
\.
ku6
\.
com
\/
.+
\/([\w\.]
+
)\.
html.*$/i
,
"player.ku6.com/refer/$1/v.swf"
)
var
width
=
$G
(
"videoWidth"
),
.
replace
(
/www
\.
56
\.
com
\/
u
\d
+
\/
v_
([\w\-]
+
)\.
html/i
,
"player.56.com/v_$1.swf"
)
height
=
$G
(
"videoHeight"
),
.
replace
(
/www.56.com
\/
w
\d
+
\/
play_album
\-
aid
\-\d
+_vid
\-([^
.
]
+
)\.
html/i
,
"player.56.com/v_$1.swf"
)
url
=
$G
(
'videoUrl'
).
value
,
.
replace
(
/v
\.
pps
\.
tv
\/
play_
([\w]
+
)\.
html.*$/i
,
"player.pps.tv/player/sid/$1/v.swf"
)
align
=
findFocus
(
"videoFloat"
,
"name"
);
.
replace
(
/www
\.
letv
\.
com
\/
ptv
\/
vplay
\/([\d]
+
)\.
html.*$/i
,
"i7.imgs.letv.com/player/swfPlayer.swf?id=$1&autoplay=0"
)
if
(
!
url
)
return
false
;
.
replace
(
/www
\.
tudou
\.
com
\/
programs
\/
view
\/([\w\-]
+
)\/?
/i
,
"www.tudou.com/v/$1"
)
if
(
!
checkNum
([
width
,
height
]))
return
false
;
.
replace
(
/v
\.
qq
\.
com
\/
cover
\/[\w]
+
\/[\w]
+
\/([\w]
+
)\.
html/i
,
"static.video.qq.com/TPout.swf?vid=$1"
)
editor
.
execCommand
(
'insertvideo'
,
{
.
replace
(
/v
\.
qq
\.
com
\/
.+
[\?\&]
vid=
([^
&
]
+
)
.*$/i
,
"static.video.qq.com/TPout.swf?vid=$1"
)
url
:
convert_url
(
url
),
.
replace
(
/my
\.
tv
\.
sohu
\.
com
\/[\w]
+
\/[\d]
+
\/([\d]
+
)\.
shtml.*$/i
,
"share.vrs.sohu.com/my/v.swf&id=$1"
);
width
:
width
.
value
,
height
:
height
.
value
,
return
url
;
align
:
align
},
isModifyUploadVideo
?
'upload'
:
null
);
}
/**
* 将元素id下的所有代表视频的图片插入编辑器中
* @param id
*/
function
insertSearch
(
id
)
{
var
imgs
=
domUtils
.
getElementsByTagName
(
$G
(
id
),
"img"
),
videoObjs
=
[];
for
(
var
i
=
0
,
img
;
img
=
imgs
[
i
++
];)
{
if
(
img
.
getAttribute
(
"selected"
))
{
videoObjs
.
push
({
url
:
img
.
getAttribute
(
"ue_video_url"
),
width
:
420
,
height
:
280
,
align
:
"none"
});
}
}
}
editor
.
execCommand
(
'insertvideo'
,
videoObjs
);
/**
}
* 检测传入的所有input框中输入的长宽是否是正数
* @param nodes input框集合,
/**
*/
* 找到id下具有focus类的节点并返回该节点下的某个属性
function
checkNum
(
nodes
)
{
* @param id
for
(
var
i
=
0
,
ci
;
ci
=
nodes
[
i
++
];
)
{
* @param returnProperty
var
value
=
ci
.
value
;
*/
if
(
!
isNumber
(
value
)
&&
value
)
{
function
findFocus
(
id
,
returnProperty
)
{
alert
(
lang
.
numError
);
var
tabs
=
$G
(
id
).
children
,
ci
.
value
=
""
;
property
;
ci
.
focus
();
for
(
var
i
=
0
,
ci
;
ci
=
tabs
[
i
++
];)
{
return
false
;
if
(
ci
.
className
==
"focus"
)
{
}
property
=
ci
.
getAttribute
(
returnProperty
);
}
break
;
return
true
;
}
}
/**
* 数字判断
* @param value
*/
function
isNumber
(
value
)
{
return
/
(
0|^
[
1-9
]\d
*$
)
/
.
test
(
value
);
}
}
return
property
;
/**
}
* 创建图片浮动选择按钮
* @param ids
function
convert_url
(
url
)
{
*/
if
(
!
url
)
return
''
;
function
createAlignButton
(
ids
)
{
url
=
utils
.
trim
(
url
)
for
(
var
i
=
0
,
ci
;
ci
=
ids
[
i
++
];
)
{
.
replace
(
/v
\.
youku
\.
com
\/
v_show
\/
id_
([\w\-
=
]
+
)\.
html/i
,
'player.youku.com/player.php/sid/$1/v.swf'
)
var
floatContainer
=
$G
(
ci
),
.
replace
(
/
(
www
\.)?
youtube
\.
com
\/
watch
\?
v=
([\w\-]
+
)
/i
,
"www.youtube.com/v/$2"
)
nameMaps
=
{
"none"
:
lang
[
'default'
],
"left"
:
lang
.
floatLeft
,
"right"
:
lang
.
floatRight
,
"center"
:
lang
.
block
};
.
replace
(
/youtu.be
\/(\w
+
)
$/i
,
"www.youtube.com/v/$1"
)
for
(
var
j
in
nameMaps
)
{
.
replace
(
/v
\.
ku6
\.
com
\/
.+
\/([\w\.]
+
)\.
html.*$/i
,
"player.ku6.com/refer/$1/v.swf"
)
var
div
=
document
.
createElement
(
"div"
);
.
replace
(
/www
\.
56
\.
com
\/
u
\d
+
\/
v_
([\w\-]
+
)\.
html/i
,
"player.56.com/v_$1.swf"
)
div
.
setAttribute
(
"name"
,
j
);
.
replace
(
/www.56.com
\/
w
\d
+
\/
play_album
\-
aid
\-\d
+_vid
\-([^
.
]
+
)\.
html/i
,
"player.56.com/v_$1.swf"
)
if
(
j
==
"none"
)
div
.
className
=
"focus"
;
.
replace
(
/v
\.
pps
\.
tv
\/
play_
([\w]
+
)\.
html.*$/i
,
"player.pps.tv/player/sid/$1/v.swf"
)
div
.
style
.
cssText
=
"background:url(images/"
+
j
+
"_focus.jpg);"
;
.
replace
(
/www
\.
letv
\.
com
\/
ptv
\/
vplay
\/([\d]
+
)\.
html.*$/i
,
"i7.imgs.letv.com/player/swfPlayer.swf?id=$1&autoplay=0"
)
div
.
setAttribute
(
"title"
,
nameMaps
[
j
]
);
.
replace
(
/www
\.
tudou
\.
com
\/
programs
\/
view
\/([\w\-]
+
)\/?
/i
,
"www.tudou.com/v/$1"
)
floatContainer
.
appendChild
(
div
);
.
replace
(
/v
\.
qq
\.
com
\/
cover
\/[\w]
+
\/[\w]
+
\/([\w]
+
)\.
html/i
,
"static.video.qq.com/TPout.swf?vid=$1"
)
}
.
replace
(
/v
\.
qq
\.
com
\/
.+
[\?\&]
vid=
([^
&
]
+
)
.*$/i
,
"static.video.qq.com/TPout.swf?vid=$1"
)
switchSelect
(
ci
);
.
replace
(
/my
\.
tv
\.
sohu
\.
com
\/[\w]
+
\/[\d]
+
\/([\d]
+
)\.
shtml.*$/i
,
"share.vrs.sohu.com/my/v.swf&id=$1"
);
}
}
return
url
;
}
/**
* 选择切换
/**
* @param selectParentId
* 检测传入的所有input框中输入的长宽是否是正数
*/
* @param nodes input框集合,
function
switchSelect
(
selectParentId
)
{
*/
var
selects
=
$G
(
selectParentId
).
children
;
function
checkNum
(
nodes
)
{
for
(
var
i
=
0
,
ci
;
ci
=
selects
[
i
++
];
)
{
for
(
var
i
=
0
,
ci
;
ci
=
nodes
[
i
++
];)
{
domUtils
.
on
(
ci
,
"click"
,
function
()
{
var
value
=
ci
.
value
;
for
(
var
j
=
0
,
cj
;
cj
=
selects
[
j
++
];
)
{
if
(
!
isNumber
(
value
)
&&
value
)
{
cj
.
className
=
""
;
alert
(
lang
.
numError
);
cj
.
removeAttribute
&&
cj
.
removeAttribute
(
"class"
);
ci
.
value
=
""
;
}
ci
.
focus
();
this
.
className
=
"focus"
;
return
false
;
}
)
}
}
}
}
return
true
;
/**
}
* 监听url改变事件
* @param url
/**
*/
* 数字判断
function
addUrlChangeListener
(
url
){
* @param value
if
(
browser
.
ie
)
{
*/
url
.
onpropertychange
=
function
()
{
function
isNumber
(
value
)
{
createPreviewVideo
(
this
.
value
);
return
/
(
0|^
[
1-9
]\d
*$
)
/
.
test
(
value
);
}
}
}
else
{
url
.
addEventListener
(
"input"
,
function
()
{
/**
createPreviewVideo
(
this
.
value
);
* 创建图片浮动选择按钮
},
false
);
* @param ids
}
*/
function
createAlignButton
(
ids
)
{
for
(
var
i
=
0
,
ci
;
ci
=
ids
[
i
++
];)
{
var
floatContainer
=
$G
(
ci
),
nameMaps
=
{
"none"
:
lang
[
'default'
],
"left"
:
lang
.
floatLeft
,
"right"
:
lang
.
floatRight
,
"center"
:
lang
.
block
};
for
(
var
j
in
nameMaps
)
{
var
div
=
document
.
createElement
(
"div"
);
div
.
setAttribute
(
"name"
,
j
);
if
(
j
==
"none"
)
div
.
className
=
"focus"
;
div
.
style
.
cssText
=
"background:url(images/"
+
j
+
"_focus.jpg);"
;
div
.
setAttribute
(
"title"
,
nameMaps
[
j
]);
floatContainer
.
appendChild
(
div
);
}
switchSelect
(
ci
);
}
}
}
/**
* 根据url生成视频预览
/**
* @param url
* 选择切换
*/
* @param selectParentId
function
createPreviewVideo
(
url
){
*/
if
(
!
url
)
return
;
function
switchSelect
(
selectParentId
)
{
var
selects
=
$G
(
selectParentId
).
children
;
var
conUrl
=
convert_url
(
url
);
for
(
var
i
=
0
,
ci
;
ci
=
selects
[
i
++
];)
{
domUtils
.
on
(
ci
,
"click"
,
function
()
{
conUrl
=
utils
.
unhtmlForUrl
(
conUrl
);
for
(
var
j
=
0
,
cj
;
cj
=
selects
[
j
++
];)
{
cj
.
className
=
""
;
$G
(
"preview"
).
innerHTML
=
'<div class="previewMsg"><span>'
+
lang
.
urlError
+
'</span></div>'
+
cj
.
removeAttribute
&&
cj
.
removeAttribute
(
"class"
);
'<embed class="previewVideo" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"'
+
' src="'
+
conUrl
+
'"'
+
' width="'
+
420
+
'"'
+
' height="'
+
280
+
'"'
+
' wmode="transparent" play="true" loop="false" menu="false" allowscriptaccess="never" allowfullscreen="true" >'
+
'</embed>'
;
}
/* 插入上传视频 */
function
insertUpload
(){
var
videoObjs
=
[],
uploadDir
=
editor
.
getOpt
(
'videoUrlPrefix'
),
width
=
parseInt
(
$G
(
'upload_width'
).
value
,
10
)
||
420
,
height
=
parseInt
(
$G
(
'upload_height'
).
value
,
10
)
||
280
,
align
=
findFocus
(
"upload_alignment"
,
"name"
)
||
'none'
;
for
(
var
key
in
uploadVideoList
)
{
var
file
=
uploadVideoList
[
key
];
videoObjs
.
push
({
url
:
uploadDir
+
file
.
url
,
width
:
width
,
height
:
height
,
align
:
align
});
}
var
count
=
uploadFile
.
getQueueCount
();
if
(
count
)
{
$
(
'.info'
,
'#queueList'
).
html
(
'<span style="color:red;">'
+
'还有2个未上传文件'
.
replace
(
/
[\d]
/
,
count
)
+
'</span>'
);
return
false
;
}
else
{
editor
.
execCommand
(
'insertvideo'
,
videoObjs
,
'upload'
);
}
}
this
.
className
=
"focus"
;
})
}
}
}
/*初始化上传标签*/
function
initUpload
(){
/**
uploadFile
=
new
UploadFile
(
'queueList'
);
* 监听url改变事件
* @param url
*/
function
addUrlChangeListener
(
url
)
{
if
(
browser
.
ie
)
{
url
.
onpropertychange
=
function
()
{
createPreviewVideo
(
this
.
value
);
}
}
else
{
url
.
addEventListener
(
"input"
,
function
()
{
createPreviewVideo
(
this
.
value
);
},
false
);
}
}
/**
* 根据url生成视频预览
* @param url
*/
function
createPreviewVideo
(
url
)
{
if
(
!
url
)
return
;
var
conUrl
=
convert_url
(
url
);
conUrl
=
utils
.
unhtmlForUrl
(
conUrl
);
$G
(
"preview"
).
innerHTML
=
'<div class="previewMsg"><span>'
+
lang
.
urlError
+
'</span></div>'
+
'<embed class="previewVideo" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"'
+
' src="'
+
conUrl
+
'"'
+
' width="'
+
420
+
'"'
+
' height="'
+
280
+
'"'
+
' wmode="transparent" play="true" loop="false" menu="false" allowscriptaccess="never" allowfullscreen="true" >'
+
'</embed>'
;
}
/* 插入上传视频 */
function
insertUpload
()
{
var
videoObjs
=
[],
uploadDir
=
editor
.
getOpt
(
'videoUrlPrefix'
),
width
=
parseInt
(
$G
(
'upload_width'
).
value
,
10
)
||
420
,
height
=
parseInt
(
$G
(
'upload_height'
).
value
,
10
)
||
280
,
align
=
findFocus
(
"upload_alignment"
,
"name"
)
||
'none'
;
for
(
var
key
in
uploadVideoList
)
{
var
file
=
uploadVideoList
[
key
];
videoObjs
.
push
({
url
:
uploadDir
+
file
.
url
,
width
:
width
,
height
:
height
,
align
:
align
});
}
}
var
count
=
uploadFile
.
getQueueCount
();
/* 上传附件 */
if
(
count
)
{
function
UploadFile
(
target
)
{
$
(
'.info'
,
'#queueList'
).
html
(
'<span style="color:red;">'
+
'还有2个未上传文件'
.
replace
(
/
[\d]
/
,
count
)
+
'</span>'
);
this
.
$wrap
=
target
.
constructor
==
String
?
$
(
'#'
+
target
)
:
$
(
target
);
return
false
;
this
.
init
();
}
else
{
editor
.
execCommand
(
'insertvideo'
,
videoObjs
,
'upload'
);
}
}
UploadFile
.
prototype
=
{
}
init
:
function
()
{
this
.
fileList
=
[];
/*初始化上传标签*/
this
.
initContainer
();
function
initUpload
()
{
this
.
initUploader
();
uploadFile
=
new
UploadFile
(
'queueList'
);
},
}
initContainer
:
function
()
{
this
.
$queue
=
this
.
$wrap
.
find
(
'.filelist'
);
/* 上传附件 */
function
UploadFile
(
target
)
{
this
.
$wrap
=
target
.
constructor
==
String
?
$
(
'#'
+
target
)
:
$
(
target
);
this
.
init
();
}
UploadFile
.
prototype
=
{
init
:
function
()
{
this
.
fileList
=
[];
this
.
initContainer
();
this
.
initUploader
();
},
initContainer
:
function
()
{
this
.
$queue
=
this
.
$wrap
.
find
(
'.filelist'
);
},
/* 初始化容器 */
initUploader
:
function
()
{
var
_this
=
this
,
$
=
jQuery
,
// just in case. Make sure it's not an other libaray.
$wrap
=
_this
.
$wrap
,
// 图片容器
$queue
=
$wrap
.
find
(
'.filelist'
),
// 状态栏,包括进度和控制按钮
$statusBar
=
$wrap
.
find
(
'.statusBar'
),
// 文件总体选择信息。
$info
=
$statusBar
.
find
(
'.info'
),
// 上传按钮
$upload
=
$wrap
.
find
(
'.uploadBtn'
),
// 上传按钮
$filePickerBtn
=
$wrap
.
find
(
'.filePickerBtn'
),
// 上传按钮
$filePickerBlock
=
$wrap
.
find
(
'.filePickerBlock'
),
// 没选择文件之前的内容。
$placeHolder
=
$wrap
.
find
(
'.placeholder'
),
// 总体进度条
$progress
=
$statusBar
.
find
(
'.progress'
).
hide
(),
// 添加的文件数量
fileCount
=
0
,
// 添加的文件总大小
fileSize
=
0
,
// 优化retina, 在retina下这个值是2
ratio
=
window
.
devicePixelRatio
||
1
,
// 缩略图大小
thumbnailWidth
=
113
*
ratio
,
thumbnailHeight
=
113
*
ratio
,
// 可能有pedding, ready, uploading, confirm, done.
state
=
''
,
// 所有文件的进度信息,key为file id
percentages
=
{},
supportTransition
=
(
function
()
{
var
s
=
document
.
createElement
(
'p'
).
style
,
r
=
'transition'
in
s
||
'WebkitTransition'
in
s
||
'MozTransition'
in
s
||
'msTransition'
in
s
||
'OTransition'
in
s
;
s
=
null
;
return
r
;
})(),
// WebUploader实例
uploader
,
actionUrl
=
'/'
+
editor
.
getActionUrl
(
editor
.
getOpt
(
'videoActionName'
)),
fileMaxSize
=
editor
.
getOpt
(
'videoMaxSize'
),
acceptExtensions
=
(
editor
.
getOpt
(
'videoAllowFiles'
)
||
[]).
join
(
''
).
replace
(
/
\.
/g
,
','
).
replace
(
/^
[
,
]
/
,
''
);
;
if
(
!
WebUploader
.
Uploader
.
support
())
{
$
(
'#filePickerReady'
).
after
(
$
(
'<div>'
).
html
(
lang
.
errorNotSupport
)).
hide
();
return
;
}
else
if
(
!
editor
.
getOpt
(
'videoActionName'
))
{
$
(
'#filePickerReady'
).
after
(
$
(
'<div>'
).
html
(
lang
.
errorLoadConfig
)).
hide
();
return
;
}
uploader
=
_this
.
uploader
=
WebUploader
.
create
({
pick
:
{
id
:
'#filePickerReady'
,
label
:
lang
.
uploadSelectFile
},
},
/* 初始化容器 */
swf
:
'../../third-party/webuploader/Uploader.swf'
,
initUploader
:
function
()
{
server
:
actionUrl
,
var
_this
=
this
,
fileVal
:
editor
.
getOpt
(
'videoFieldName'
),
$
=
jQuery
,
// just in case. Make sure it's not an other libaray.
duplicate
:
true
,
$wrap
=
_this
.
$wrap
,
fileSingleSizeLimit
:
fileMaxSize
,
// 图片容器
compress
:
false
$queue
=
$wrap
.
find
(
'.filelist'
),
});
// 状态栏,包括进度和控制按钮
uploader
.
addButton
({
$statusBar
=
$wrap
.
find
(
'.statusBar'
),
id
:
'#filePickerBlock'
// 文件总体选择信息。
});
$info
=
$statusBar
.
find
(
'.info'
),
uploader
.
addButton
({
// 上传按钮
id
:
'#filePickerBtn'
,
$upload
=
$wrap
.
find
(
'.uploadBtn'
),
label
:
lang
.
uploadAddFile
// 上传按钮
});
$filePickerBtn
=
$wrap
.
find
(
'.filePickerBtn'
),
// 上传按钮
setState
(
'pedding'
);
$filePickerBlock
=
$wrap
.
find
(
'.filePickerBlock'
),
// 没选择文件之前的内容。
// 当有文件添加进来时执行,负责view的创建
$placeHolder
=
$wrap
.
find
(
'.placeholder'
),
function
addFile
(
file
)
{
// 总体进度条
var
$li
=
$
(
'<li id="'
+
file
.
id
+
'">'
+
$progress
=
$statusBar
.
find
(
'.progress'
).
hide
(),
'<p class="title">'
+
file
.
name
+
'</p>'
+
// 添加的文件数量
'<p class="imgWrap"></p>'
+
fileCount
=
0
,
'<p class="progress"><span></span></p>'
+
// 添加的文件总大小
'</li>'
),
fileSize
=
0
,
// 优化retina, 在retina下这个值是2
$btns
=
$
(
'<div class="file-panel">'
+
ratio
=
window
.
devicePixelRatio
||
1
,
'<span class="cancel">'
+
lang
.
uploadDelete
+
'</span>'
+
// 缩略图大小
'<span class="rotateRight">'
+
lang
.
uploadTurnRight
+
'</span>'
+
thumbnailWidth
=
113
*
ratio
,
'<span class="rotateLeft">'
+
lang
.
uploadTurnLeft
+
'</span></div>'
).
appendTo
(
$li
),
thumbnailHeight
=
113
*
ratio
,
$prgress
=
$li
.
find
(
'p.progress span'
),
// 可能有pedding, ready, uploading, confirm, done.
$wrap
=
$li
.
find
(
'p.imgWrap'
),
state
=
''
,
$info
=
$
(
'<p class="error"></p>'
).
hide
().
appendTo
(
$li
),
// 所有文件的进度信息,key为file id
percentages
=
{},
showError
=
function
(
code
)
{
supportTransition
=
(
function
()
{
switch
(
code
)
{
var
s
=
document
.
createElement
(
'p'
).
style
,
case
'exceed_size'
:
r
=
'transition'
in
s
||
text
=
lang
.
errorExceedSize
;
'WebkitTransition'
in
s
||
break
;
'MozTransition'
in
s
||
case
'interrupt'
:
'msTransition'
in
s
||
text
=
lang
.
errorInterrupt
;
'OTransition'
in
s
;
break
;
s
=
null
;
case
'http'
:
return
r
;
text
=
lang
.
errorHttp
;
})(),
break
;
// WebUploader实例
case
'not_allow_type'
:
uploader
,
text
=
lang
.
errorFileType
;
actionUrl
=
editor
.
getActionUrl
(
editor
.
getOpt
(
'videoActionName'
)),
break
;
fileMaxSize
=
editor
.
getOpt
(
'videoMaxSize'
),
default
:
acceptExtensions
=
(
editor
.
getOpt
(
'videoAllowFiles'
)
||
[]).
join
(
''
).
replace
(
/
\.
/g
,
','
).
replace
(
/^
[
,
]
/
,
''
);;
text
=
lang
.
errorUploadRetry
;
break
;
if
(
!
WebUploader
.
Uploader
.
support
())
{
$
(
'#filePickerReady'
).
after
(
$
(
'<div>'
).
html
(
lang
.
errorNotSupport
)).
hide
();
return
;
}
else
if
(
!
editor
.
getOpt
(
'videoActionName'
))
{
$
(
'#filePickerReady'
).
after
(
$
(
'<div>'
).
html
(
lang
.
errorLoadConfig
)).
hide
();
return
;
}
uploader
=
_this
.
uploader
=
WebUploader
.
create
({
pick
:
{
id
:
'#filePickerReady'
,
label
:
lang
.
uploadSelectFile
},
swf
:
'../../third-party/webuploader/Uploader.swf'
,
server
:
actionUrl
,
fileVal
:
editor
.
getOpt
(
'videoFieldName'
),
duplicate
:
true
,
fileSingleSizeLimit
:
fileMaxSize
,
compress
:
false
});
uploader
.
addButton
({
id
:
'#filePickerBlock'
});
uploader
.
addButton
({
id
:
'#filePickerBtn'
,
label
:
lang
.
uploadAddFile
});
setState
(
'pedding'
);
// 当有文件添加进来时执行,负责view的创建
function
addFile
(
file
)
{
var
$li
=
$
(
'<li id="'
+
file
.
id
+
'">'
+
'<p class="title">'
+
file
.
name
+
'</p>'
+
'<p class="imgWrap"></p>'
+
'<p class="progress"><span></span></p>'
+
'</li>'
),
$btns
=
$
(
'<div class="file-panel">'
+
'<span class="cancel">'
+
lang
.
uploadDelete
+
'</span>'
+
'<span class="rotateRight">'
+
lang
.
uploadTurnRight
+
'</span>'
+
'<span class="rotateLeft">'
+
lang
.
uploadTurnLeft
+
'</span></div>'
).
appendTo
(
$li
),
$prgress
=
$li
.
find
(
'p.progress span'
),
$wrap
=
$li
.
find
(
'p.imgWrap'
),
$info
=
$
(
'<p class="error"></p>'
).
hide
().
appendTo
(
$li
),
showError
=
function
(
code
)
{
switch
(
code
)
{
case
'exceed_size'
:
text
=
lang
.
errorExceedSize
;
break
;
case
'interrupt'
:
text
=
lang
.
errorInterrupt
;
break
;
case
'http'
:
text
=
lang
.
errorHttp
;
break
;
case
'not_allow_type'
:
text
=
lang
.
errorFileType
;
break
;
default
:
text
=
lang
.
errorUploadRetry
;
break
;
}
$info
.
text
(
text
).
show
();
};
if
(
file
.
getStatus
()
===
'invalid'
)
{
showError
(
file
.
statusText
);
}
else
{
$wrap
.
text
(
lang
.
uploadPreview
);
if
(
'|png|jpg|jpeg|bmp|gif|'
.
indexOf
(
'|'
+
file
.
ext
.
toLowerCase
()
+
'|'
)
==
-
1
)
{
$wrap
.
empty
().
addClass
(
'notimage'
).
append
(
'<i class="file-preview file-type-'
+
file
.
ext
.
toLowerCase
()
+
'"></i>'
+
'<span class="file-title">'
+
file
.
name
+
'</span>'
);
}
else
{
if
(
browser
.
ie
&&
browser
.
version
<=
7
)
{
$wrap
.
text
(
lang
.
uploadNoPreview
);
}
else
{
uploader
.
makeThumb
(
file
,
function
(
error
,
src
)
{
if
(
error
||
!
src
||
(
/^data:/
.
test
(
src
)
&&
browser
.
ie
&&
browser
.
version
<=
7
))
{
$wrap
.
text
(
lang
.
uploadNoPreview
);
}
else
{
var
$img
=
$
(
'<img src="'
+
src
+
'">'
);
$wrap
.
empty
().
append
(
$img
);
$img
.
on
(
'error'
,
function
()
{
$wrap
.
text
(
lang
.
uploadNoPreview
);
});
}
},
thumbnailWidth
,
thumbnailHeight
);
}
}
percentages
[
file
.
id
]
=
[
file
.
size
,
0
];
file
.
rotation
=
0
;
/* 检查文件格式 */
if
(
!
file
.
ext
||
acceptExtensions
.
indexOf
(
file
.
ext
.
toLowerCase
())
==
-
1
)
{
showError
(
'not_allow_type'
);
uploader
.
removeFile
(
file
);
}
}
file
.
on
(
'statuschange'
,
function
(
cur
,
prev
)
{
if
(
prev
===
'progress'
)
{
$prgress
.
hide
().
width
(
0
);
}
else
if
(
prev
===
'queued'
)
{
$li
.
off
(
'mouseenter mouseleave'
);
$btns
.
remove
();
}
// 成功
if
(
cur
===
'error'
||
cur
===
'invalid'
)
{
showError
(
file
.
statusText
);
percentages
[
file
.
id
][
1
]
=
1
;
}
else
if
(
cur
===
'interrupt'
)
{
showError
(
'interrupt'
);
}
else
if
(
cur
===
'queued'
)
{
percentages
[
file
.
id
][
1
]
=
0
;
}
else
if
(
cur
===
'progress'
)
{
$info
.
hide
();
$prgress
.
css
(
'display'
,
'block'
);
}
else
if
(
cur
===
'complete'
)
{
}
$li
.
removeClass
(
'state-'
+
prev
).
addClass
(
'state-'
+
cur
);
});
$li
.
on
(
'mouseenter'
,
function
()
{
$btns
.
stop
().
animate
({
height
:
30
});
});
$li
.
on
(
'mouseleave'
,
function
()
{
$btns
.
stop
().
animate
({
height
:
0
});
});
$btns
.
on
(
'click'
,
'span'
,
function
()
{
var
index
=
$
(
this
).
index
(),
deg
;
switch
(
index
)
{
case
0
:
uploader
.
removeFile
(
file
);
return
;
case
1
:
file
.
rotation
+=
90
;
break
;
case
2
:
file
.
rotation
-=
90
;
break
;
}
if
(
supportTransition
)
{
deg
=
'rotate('
+
file
.
rotation
+
'deg)'
;
$wrap
.
css
({
'-webkit-transform'
:
deg
,
'-mos-transform'
:
deg
,
'-o-transform'
:
deg
,
'transform'
:
deg
});
}
else
{
$wrap
.
css
(
'filter'
,
'progid:DXImageTransform.Microsoft.BasicImage(rotation='
+
(
~~
((
file
.
rotation
/
90
)
%
4
+
4
)
%
4
)
+
')'
);
}
});
$li
.
insertBefore
(
$filePickerBlock
);
}
// 负责view的销毁
function
removeFile
(
file
)
{
var
$li
=
$
(
'#'
+
file
.
id
);
delete
percentages
[
file
.
id
];
updateTotalProgress
();
$li
.
off
().
find
(
'.file-panel'
).
off
().
end
().
remove
();
}
function
updateTotalProgress
()
{
var
loaded
=
0
,
total
=
0
,
spans
=
$progress
.
children
(),
percent
;
$
.
each
(
percentages
,
function
(
k
,
v
)
{
total
+=
v
[
0
];
loaded
+=
v
[
0
]
*
v
[
1
];
});
percent
=
total
?
loaded
/
total
:
0
;
spans
.
eq
(
0
).
text
(
Math
.
round
(
percent
*
100
)
+
'%'
);
spans
.
eq
(
1
).
css
(
'width'
,
Math
.
round
(
percent
*
100
)
+
'%'
);
updateStatus
();
}
}
$info
.
text
(
text
).
show
();
};
function
setState
(
val
,
files
)
{
if
(
file
.
getStatus
()
===
'invalid'
)
{
showError
(
file
.
statusText
);
if
(
val
!=
state
)
{
}
else
{
$wrap
.
text
(
lang
.
uploadPreview
);
var
stats
=
uploader
.
getStats
();
if
(
'|png|jpg|jpeg|bmp|gif|'
.
indexOf
(
'|'
+
file
.
ext
.
toLowerCase
()
+
'|'
)
==
-
1
)
{
$wrap
.
empty
().
addClass
(
'notimage'
).
append
(
'<i class="file-preview file-type-'
+
file
.
ext
.
toLowerCase
()
+
'"></i>'
+
$upload
.
removeClass
(
'state-'
+
state
);
'<span class="file-title">'
+
file
.
name
+
'</span>'
);
$upload
.
addClass
(
'state-'
+
val
);
}
else
{
if
(
browser
.
ie
&&
browser
.
version
<=
7
)
{
switch
(
val
)
{
$wrap
.
text
(
lang
.
uploadNoPreview
);
}
else
{
/* 未选择文件 */
uploader
.
makeThumb
(
file
,
function
(
error
,
src
)
{
case
'pedding'
:
if
(
error
||
!
src
||
(
/^data:/
.
test
(
src
)
&&
browser
.
ie
&&
browser
.
version
<=
7
))
{
$queue
.
addClass
(
'element-invisible'
);
$wrap
.
text
(
lang
.
uploadNoPreview
);
$statusBar
.
addClass
(
'element-invisible'
);
$placeHolder
.
removeClass
(
'element-invisible'
);
$progress
.
hide
();
$info
.
hide
();
uploader
.
refresh
();
break
;
/* 可以开始上传 */
case
'ready'
:
$placeHolder
.
addClass
(
'element-invisible'
);
$queue
.
removeClass
(
'element-invisible'
);
$statusBar
.
removeClass
(
'element-invisible'
);
$progress
.
hide
();
$info
.
show
();
$upload
.
text
(
lang
.
uploadStart
);
uploader
.
refresh
();
break
;
/* 上传中 */
case
'uploading'
:
$progress
.
show
();
$info
.
hide
();
$upload
.
text
(
lang
.
uploadPause
);
break
;
/* 暂停上传 */
case
'paused'
:
$progress
.
show
();
$info
.
hide
();
$upload
.
text
(
lang
.
uploadContinue
);
break
;
case
'confirm'
:
$progress
.
show
();
$info
.
hide
();
$upload
.
text
(
lang
.
uploadStart
);
stats
=
uploader
.
getStats
();
if
(
stats
.
successNum
&&
!
stats
.
uploadFailNum
)
{
setState
(
'finish'
);
return
;
}
break
;
case
'finish'
:
$progress
.
hide
();
$info
.
show
();
if
(
stats
.
uploadFailNum
)
{
$upload
.
text
(
lang
.
uploadRetry
);
}
else
{
$upload
.
text
(
lang
.
uploadStart
);
}
break
;
}
state
=
val
;
updateStatus
();
}
if
(
!
_this
.
getQueueCount
())
{
$upload
.
addClass
(
'disabled'
)
}
else
{
}
else
{
$upload
.
removeClass
(
'disabled'
)
var
$img
=
$
(
'<img src="'
+
src
+
'">'
);
$wrap
.
empty
().
append
(
$img
);
$img
.
on
(
'error'
,
function
()
{
$wrap
.
text
(
lang
.
uploadNoPreview
);
});
}
}
},
thumbnailWidth
,
thumbnailHeight
);
}
}
}
percentages
[
file
.
id
]
=
[
file
.
size
,
0
];
file
.
rotation
=
0
;
/* 检查文件格式 */
if
(
!
file
.
ext
||
acceptExtensions
.
indexOf
(
file
.
ext
.
toLowerCase
())
==
-
1
)
{
showError
(
'not_allow_type'
);
uploader
.
removeFile
(
file
);
}
}
function
updateStatus
()
{
file
.
on
(
'statuschange'
,
function
(
cur
,
prev
)
{
var
text
=
''
,
stats
;
if
(
prev
===
'progress'
)
{
$prgress
.
hide
().
width
(
0
);
if
(
state
===
'ready'
)
{
}
else
if
(
prev
===
'queued'
)
{
text
=
lang
.
updateStatusReady
.
replace
(
'_'
,
fileCount
).
replace
(
'_KB'
,
WebUploader
.
formatSize
(
fileSize
));
$li
.
off
(
'mouseenter mouseleave'
);
}
else
if
(
state
===
'confirm'
)
{
$btns
.
remove
();
stats
=
uploader
.
getStats
();
}
if
(
stats
.
uploadFailNum
)
{
// 成功
text
=
lang
.
updateStatusConfirm
.
replace
(
'_'
,
stats
.
successNum
).
replace
(
'_'
,
stats
.
successNum
);
if
(
cur
===
'error'
||
cur
===
'invalid'
)
{
}
showError
(
file
.
statusText
);
}
else
{
percentages
[
file
.
id
][
1
]
=
1
;
stats
=
uploader
.
getStats
();
}
else
if
(
cur
===
'interrupt'
)
{
text
=
lang
.
updateStatusFinish
.
replace
(
'_'
,
fileCount
).
showError
(
'interrupt'
);
replace
(
'_KB'
,
WebUploader
.
formatSize
(
fileSize
)).
}
else
if
(
cur
===
'queued'
)
{
replace
(
'_'
,
stats
.
successNum
);
percentages
[
file
.
id
][
1
]
=
0
;
}
else
if
(
cur
===
'progress'
)
{
if
(
stats
.
uploadFailNum
)
{
$info
.
hide
();
text
+=
lang
.
updateStatusError
.
replace
(
'_'
,
stats
.
uploadFailNum
);
$prgress
.
css
(
'display'
,
'block'
);
}
}
else
if
(
cur
===
'complete'
)
{
}
}
$li
.
removeClass
(
'state-'
+
prev
).
addClass
(
'state-'
+
cur
);
});
$li
.
on
(
'mouseenter'
,
function
()
{
$btns
.
stop
().
animate
({
height
:
30
});
});
$li
.
on
(
'mouseleave'
,
function
()
{
$btns
.
stop
().
animate
({
height
:
0
});
});
$btns
.
on
(
'click'
,
'span'
,
function
()
{
var
index
=
$
(
this
).
index
(),
deg
;
switch
(
index
)
{
case
0
:
uploader
.
removeFile
(
file
);
return
;
case
1
:
file
.
rotation
+=
90
;
break
;
case
2
:
file
.
rotation
-=
90
;
break
;
}
if
(
supportTransition
)
{
deg
=
'rotate('
+
file
.
rotation
+
'deg)'
;
$wrap
.
css
({
'-webkit-transform'
:
deg
,
'-mos-transform'
:
deg
,
'-o-transform'
:
deg
,
'transform'
:
deg
});
}
else
{
$wrap
.
css
(
'filter'
,
'progid:DXImageTransform.Microsoft.BasicImage(rotation='
+
(
~~
((
file
.
rotation
/
90
)
%
4
+
4
)
%
4
)
+
')'
);
}
});
$li
.
insertBefore
(
$filePickerBlock
);
}
// 负责view的销毁
function
removeFile
(
file
)
{
var
$li
=
$
(
'#'
+
file
.
id
);
delete
percentages
[
file
.
id
];
updateTotalProgress
();
$li
.
off
().
find
(
'.file-panel'
).
off
().
end
().
remove
();
}
function
updateTotalProgress
()
{
var
loaded
=
0
,
total
=
0
,
spans
=
$progress
.
children
(),
percent
;
$
.
each
(
percentages
,
function
(
k
,
v
)
{
total
+=
v
[
0
];
loaded
+=
v
[
0
]
*
v
[
1
];
});
percent
=
total
?
loaded
/
total
:
0
;
spans
.
eq
(
0
).
text
(
Math
.
round
(
percent
*
100
)
+
'%'
);
spans
.
eq
(
1
).
css
(
'width'
,
Math
.
round
(
percent
*
100
)
+
'%'
);
updateStatus
();
}
function
setState
(
val
,
files
)
{
if
(
val
!=
state
)
{
var
stats
=
uploader
.
getStats
();
$upload
.
removeClass
(
'state-'
+
state
);
$upload
.
addClass
(
'state-'
+
val
);
switch
(
val
)
{
/* 未选择文件 */
case
'pedding'
:
$queue
.
addClass
(
'element-invisible'
);
$statusBar
.
addClass
(
'element-invisible'
);
$placeHolder
.
removeClass
(
'element-invisible'
);
$progress
.
hide
();
$info
.
hide
();
uploader
.
refresh
();
break
;
/* 可以开始上传 */
case
'ready'
:
$placeHolder
.
addClass
(
'element-invisible'
);
$queue
.
removeClass
(
'element-invisible'
);
$statusBar
.
removeClass
(
'element-invisible'
);
$progress
.
hide
();
$info
.
show
();
$upload
.
text
(
lang
.
uploadStart
);
uploader
.
refresh
();
break
;
/* 上传中 */
case
'uploading'
:
$progress
.
show
();
$info
.
hide
();
$upload
.
text
(
lang
.
uploadPause
);
break
;
/* 暂停上传 */
case
'paused'
:
$progress
.
show
();
$info
.
hide
();
$upload
.
text
(
lang
.
uploadContinue
);
break
;
case
'confirm'
:
$progress
.
show
();
$info
.
hide
();
$upload
.
text
(
lang
.
uploadStart
);
stats
=
uploader
.
getStats
();
if
(
stats
.
successNum
&&
!
stats
.
uploadFailNum
)
{
setState
(
'finish'
);
return
;
}
break
;
case
'finish'
:
$progress
.
hide
();
$info
.
show
();
if
(
stats
.
uploadFailNum
)
{
$upload
.
text
(
lang
.
uploadRetry
);
}
else
{
$upload
.
text
(
lang
.
uploadStart
);
}
break
;
}
state
=
val
;
updateStatus
();
$info
.
html
(
text
);
}
}
uploader
.
on
(
'fileQueued'
,
function
(
file
)
{
if
(
!
_this
.
getQueueCount
())
{
fileCount
++
;
$upload
.
addClass
(
'disabled'
)
fileSize
+=
file
.
size
;
}
else
{
$upload
.
removeClass
(
'disabled'
)
}
if
(
fileCount
===
1
)
{
}
$placeHolder
.
addClass
(
'element-invisible'
);
$statusBar
.
show
();
}
addFile
(
file
);
function
updateStatus
()
{
})
;
var
text
=
''
,
stats
;
uploader
.
on
(
'fileDequeued'
,
function
(
file
)
{
if
(
state
===
'ready'
)
{
fileCount
--
;
text
=
lang
.
updateStatusReady
.
replace
(
'_'
,
fileCount
).
replace
(
'_KB'
,
WebUploader
.
formatSize
(
fileSize
));
fileSize
-=
file
.
size
;
}
else
if
(
state
===
'confirm'
)
{
stats
=
uploader
.
getStats
();
if
(
stats
.
uploadFailNum
)
{
text
=
lang
.
updateStatusConfirm
.
replace
(
'_'
,
stats
.
successNum
).
replace
(
'_'
,
stats
.
successNum
);
}
}
else
{
stats
=
uploader
.
getStats
();
text
=
lang
.
updateStatusFinish
.
replace
(
'_'
,
fileCount
).
replace
(
'_KB'
,
WebUploader
.
formatSize
(
fileSize
)).
replace
(
'_'
,
stats
.
successNum
);
removeFile
(
file
);
if
(
stats
.
uploadFailNum
)
{
updateTotalProgress
();
text
+=
lang
.
updateStatusError
.
replace
(
'_'
,
stats
.
uploadFailNum
);
});
}
}
uploader
.
on
(
'filesQueued'
,
function
(
file
)
{
$info
.
html
(
text
);
if
(
!
uploader
.
isInProgress
()
&&
(
state
==
'pedding'
||
state
==
'finish'
||
state
==
'confirm'
||
state
==
'ready'
))
{
}
setState
(
'ready'
);
}
updateTotalProgress
();
});
uploader
.
on
(
'all'
,
function
(
type
,
files
)
{
uploader
.
on
(
'fileQueued'
,
function
(
file
)
{
switch
(
type
)
{
fileCount
++
;
case
'uploadFinished'
:
fileSize
+=
file
.
size
;
setState
(
'confirm'
,
files
);
break
;
case
'startUpload'
:
/* 添加额外的GET参数 */
var
params
=
utils
.
serializeParam
(
editor
.
queryCommandValue
(
'serverparam'
))
||
''
,
url
=
utils
.
formatUrl
(
actionUrl
+
(
actionUrl
.
indexOf
(
'?'
)
==
-
1
?
'?'
:
'&'
)
+
'encode=utf-8&'
+
params
);
uploader
.
option
(
'server'
,
url
);
setState
(
'uploading'
,
files
);
break
;
case
'stopUpload'
:
setState
(
'paused'
,
files
);
break
;
}
});
uploader
.
on
(
'uploadBeforeSend'
,
function
(
file
,
data
,
header
)
{
if
(
fileCount
===
1
)
{
//这里可以通过data对象添加POST参数
$placeHolder
.
addClass
(
'element-invisible'
);
header
[
'X_Requested_With'
]
=
'XMLHttpRequest'
;
$statusBar
.
show
()
;
});
}
uploader
.
on
(
'uploadProgress'
,
function
(
file
,
percentage
)
{
addFile
(
file
);
var
$li
=
$
(
'#'
+
file
.
id
),
});
$percent
=
$li
.
find
(
'.progress span'
);
$percent
.
css
(
'width'
,
percentage
*
100
+
'%'
);
uploader
.
on
(
'fileDequeued'
,
function
(
file
)
{
percentages
[
file
.
id
][
1
]
=
percentage
;
fileCount
--
;
updateTotalProgress
();
fileSize
-=
file
.
size
;
});
uploader
.
on
(
'uploadSuccess'
,
function
(
file
,
ret
)
{
removeFile
(
file
);
var
$file
=
$
(
'#'
+
file
.
id
);
updateTotalProgress
();
try
{
});
var
responseText
=
(
ret
.
_raw
||
ret
),
json
=
utils
.
str2json
(
responseText
);
if
(
json
.
state
==
'SUCCESS'
)
{
uploadVideoList
.
push
({
'url'
:
json
.
url
,
'type'
:
json
.
type
,
'original'
:
json
.
original
});
$file
.
append
(
'<span class="success"></span>'
);
}
else
{
$file
.
find
(
'.error'
).
text
(
json
.
state
).
show
();
}
}
catch
(
e
)
{
$file
.
find
(
'.error'
).
text
(
lang
.
errorServerUpload
).
show
();
}
});
uploader
.
on
(
'uploadError'
,
function
(
file
,
code
)
{
uploader
.
on
(
'filesQueued'
,
function
(
file
)
{
});
if
(
!
uploader
.
isInProgress
()
&&
(
state
==
'pedding'
||
state
==
'finish'
||
state
==
'confirm'
||
state
==
'ready'
))
{
uploader
.
on
(
'error'
,
function
(
code
,
file
)
{
setState
(
'ready'
);
if
(
code
==
'Q_TYPE_DENIED'
||
code
==
'F_EXCEED_SIZE'
)
{
}
addFile
(
file
);
updateTotalProgress
();
}
});
});
uploader
.
on
(
'uploadComplete'
,
function
(
file
,
ret
)
{
uploader
.
on
(
'all'
,
function
(
type
,
files
)
{
switch
(
type
)
{
case
'uploadFinished'
:
setState
(
'confirm'
,
files
);
break
;
case
'startUpload'
:
/* 添加额外的GET参数 */
var
params
=
utils
.
serializeParam
(
editor
.
queryCommandValue
(
'serverparam'
))
||
''
,
url
=
utils
.
formatUrl
(
actionUrl
+
(
actionUrl
.
indexOf
(
'?'
)
==
-
1
?
'?'
:
'&'
)
+
'encode=utf-8&'
+
params
);
uploader
.
option
(
'server'
,
url
);
setState
(
'uploading'
,
files
);
break
;
case
'stopUpload'
:
setState
(
'paused'
,
files
);
break
;
}
});
uploader
.
on
(
'uploadBeforeSend'
,
function
(
file
,
data
,
header
)
{
//这里可以通过data对象添加POST参数
header
[
'X_Requested_With'
]
=
'XMLHttpRequest'
;
});
uploader
.
on
(
'uploadProgress'
,
function
(
file
,
percentage
)
{
var
$li
=
$
(
'#'
+
file
.
id
),
$percent
=
$li
.
find
(
'.progress span'
);
$percent
.
css
(
'width'
,
percentage
*
100
+
'%'
);
percentages
[
file
.
id
][
1
]
=
percentage
;
updateTotalProgress
();
});
uploader
.
on
(
'uploadSuccess'
,
function
(
file
,
ret
)
{
var
$file
=
$
(
'#'
+
file
.
id
);
try
{
var
responseText
=
(
ret
.
_raw
||
ret
),
json
=
utils
.
str2json
(
responseText
);
if
(
json
.
state
==
'SUCCESS'
)
{
uploadVideoList
.
push
({
'url'
:
json
.
url
,
'type'
:
json
.
type
,
'original'
:
json
.
original
});
});
$file
.
append
(
'<span class="success"></span>'
);
}
else
{
$file
.
find
(
'.error'
).
text
(
json
.
state
).
show
();
}
}
catch
(
e
)
{
$file
.
find
(
'.error'
).
text
(
lang
.
errorServerUpload
).
show
();
}
});
$upload
.
on
(
'click'
,
function
()
{
uploader
.
on
(
'uploadError'
,
function
(
file
,
code
)
{
if
(
$
(
this
).
hasClass
(
'disabled'
))
{
});
return
false
;
uploader
.
on
(
'error'
,
function
(
code
,
file
)
{
}
if
(
code
==
'Q_TYPE_DENIED'
||
code
==
'F_EXCEED_SIZE'
)
{
addFile
(
file
);
}
});
uploader
.
on
(
'uploadComplete'
,
function
(
file
,
ret
)
{
});
if
(
state
===
'ready'
)
{
$upload
.
on
(
'click'
,
function
()
{
uploader
.
upload
();
if
(
$
(
this
).
hasClass
(
'disabled'
))
{
}
else
if
(
state
===
'paused'
)
{
return
false
;
uploader
.
upload
();
}
}
else
if
(
state
===
'uploading'
)
{
uploader
.
stop
();
}
});
$upload
.
addClass
(
'state-'
+
state
);
if
(
state
===
'ready'
)
{
updateTotalProgress
();
uploader
.
upload
();
},
}
else
if
(
state
===
'paused'
)
{
getQueueCount
:
function
()
{
uploader
.
upload
();
var
file
,
i
,
status
,
readyFile
=
0
,
files
=
this
.
uploader
.
getFiles
();
}
else
if
(
state
===
'uploading'
)
{
for
(
i
=
0
;
file
=
files
[
i
++
];
)
{
uploader
.
stop
();
status
=
file
.
getStatus
();
if
(
status
==
'queued'
||
status
==
'uploading'
||
status
==
'progress'
)
readyFile
++
;
}
return
readyFile
;
},
refresh
:
function
(){
this
.
uploader
.
refresh
();
}
}
};
});
$upload
.
addClass
(
'state-'
+
state
);
updateTotalProgress
();
},
getQueueCount
:
function
()
{
var
file
,
i
,
status
,
readyFile
=
0
,
files
=
this
.
uploader
.
getFiles
();
for
(
i
=
0
;
file
=
files
[
i
++
];)
{
status
=
file
.
getStatus
();
if
(
status
==
'queued'
||
status
==
'uploading'
||
status
==
'progress'
)
readyFile
++
;
}
return
readyFile
;
},
refresh
:
function
()
{
this
.
uploader
.
refresh
();
}
};
})();
})();
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