Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
SuperMan
Commits
12541cc5
Commit
12541cc5
authored
Dec 12, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
906a8cc5
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
2071 additions
and
1668 deletions
+2071
-1668
leaderReimbursement.vue
src/components/LeaderManagement/leaderReimbursement.vue
+706
-662
RegistrationList.vue
src/components/TravelManager/TravelList/RegistrationList.vue
+0
-1
PersonnelManagement.vue
src/components/activity/PersonnelManagement.vue
+0
-2
VToolBar.vue
...wTravelmanager/TravelGroupControl/TravelTemp/VToolBar.vue
+253
-203
travelFeature3.vue
...lmanager/TravelGroupControl/TravelTemp/travelFeature3.vue
+1029
-767
travelDaysTrip.vue
...onents/newTravelmanager/travelLineTrip/travelDaysTrip.vue
+0
-3
msgs.js
src/store/actions/msgs.js
+83
-30
No files found.
src/components/LeaderManagement/leaderReimbursement.vue
View file @
12541cc5
...
...
@@ -801,14 +801,12 @@
</template>
<
script
>
import
commonHotelInfo
from
"../commonPage/commonHotelInfo.vue"
;
import
{
constants
}
from
'os'
;
export
default
{
import
commonHotelInfo
from
"../commonPage/commonHotelInfo.vue"
;
import
{
constants
}
from
"os"
;
export
default
{
data
()
{
return
{
isUpdate
:
'false'
,
isUpdate
:
"false"
,
LineId
:
0
,
loading
:
false
,
defaultSelectValue
:
0
,
...
...
@@ -817,17 +815,17 @@
picObj
:
[],
TemporaryItem
:
{},
msg
:
{
TCIDs
:
''
,
NewCombinationNum
:
''
TCIDs
:
""
,
NewCombinationNum
:
""
},
zhuijiaList
:
[],
list
:
[],
nav
:
[],
TravelDayNum
:
0
,
RealityNum
:
0
,
UseCount
:
''
,
UseCount
:
""
,
//定团号
NewCombinationNum
:
''
,
NewCombinationNum
:
""
,
TotalNav
:
[],
LeaderGetPrice
:
0
,
HangingList
:
[],
...
...
@@ -847,7 +845,7 @@
//判断是否显示人民币
IsShowRMB
:
false
,
ContractUrlCount
:
1
}
};
},
components
:
{
commonHotelInfo
...
...
@@ -855,29 +853,37 @@
methods
:
{
// 20190815 新增领款单据重新生成自动带上计算后的金额
goFncEditUrl
(
url
,
crId
,
frId
)
{
let
obj
=
{}
let
obj
=
{};
this
.
CurrencyListMoney
.
map
(
x
=>
{
if
(
x
.
CurrencyId
==
crId
)
{
obj
=
x
obj
=
x
;
}
})
let
price
=
obj
.
money
*
0.95
let
calcPrice
=
0
if
(
crId
==
1
)
{
//人民币
calcPrice
=
parseInt
(
price
/
1000
)
>
0
?
parseInt
(
price
/
1000
)
*
1000
:
parseInt
(
price
)
}
else
{
// 其他
calcPrice
=
parseInt
(
price
/
10000
)
>
0
?
parseInt
(
price
/
10000
)
*
10000
:
parseInt
(
price
)
});
let
price
=
obj
.
money
*
0.95
;
let
calcPrice
=
0
;
if
(
crId
==
1
)
{
//人民币
calcPrice
=
parseInt
(
price
/
1000
)
>
0
?
parseInt
(
price
/
1000
)
*
1000
:
parseInt
(
price
);
}
else
{
// 其他
calcPrice
=
parseInt
(
price
/
10000
)
>
0
?
parseInt
(
price
/
10000
)
*
10000
:
parseInt
(
price
);
}
this
.
$router
.
push
({
name
:
url
,
query
:
{
"FrID"
:
frId
,
"blank"
:
'y'
,
"edit"
:
true
,
"dijieEditMoney"
:
calcPrice
,
"tab"
:
'修改财务单据'
FrID
:
frId
,
blank
:
"y"
,
edit
:
true
,
dijieEditMoney
:
calcPrice
,
tab
:
"修改财务单据"
}
})
});
},
GetCurrency
(
Id
)
{
var
str
=
""
;
...
...
@@ -930,22 +936,27 @@
}
return
str
;
},
financeinfo_post_GetList
()
{
// 币种类型
this
.
apipost
(
'financeinfo_post_GetList'
,
{
Name
:
''
},
res
=>
{
financeinfo_post_GetList
()
{
// 币种类型
this
.
apipost
(
"financeinfo_post_GetList"
,
{
Name
:
""
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
data
.
forEach
(
item
=>
{
this
.
currencyTypeObj
[
item
.
ID
]
=
item
.
Name
;
})
})
;
}
else
{
}
},
err
=>
{})
},
err
=>
{}
);
},
ZhuiJiaTuanKuan
(
item
)
{
let
TCIDARR
=
[
item
.
TCIDS
]
// [this.$route.query.id]
let
TCIDARR
=
[
item
.
TCIDS
];
// [this.$route.query.id]
let
orderObj
=
{
OrderID
:
0
,
OrderSource
:
8
,
...
...
@@ -954,66 +965,68 @@
TCIDList
:
TCIDARR
,
TravelReplenish
:
this
.
$route
.
query
.
id
,
OtherType
:
1
}
};
this
.
$router
.
push
({
name
:
'ChoiceAddFinancialDocuments'
,
name
:
"ChoiceAddFinancialDocuments"
,
query
:
{
"Type"
:
2
,
"companyID"
:
item
.
companyID
,
"path"
:
""
,
'blank'
:
'y'
,
'orderObj'
:
JSON
.
stringify
(
orderObj
),
Type
:
2
,
companyID
:
item
.
companyID
,
path
:
""
,
blank
:
"y"
,
orderObj
:
JSON
.
stringify
(
orderObj
)
}
});
},
getzhuijiaList
()
{
this
.
apipost
(
'Financial_post_GetTravelFinanceReplenishList'
,
{
"Financial_post_GetTravelFinanceReplenishList"
,
{
TravelReplenish
:
this
.
$route
.
query
.
id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
zhuijiaList
=
res
.
data
.
data
.
list
this
.
zhuijiaList
=
res
.
data
.
data
.
list
;
}
},
err
=>
{}
)
);
},
getHangingAccountByTCIDList
:
function
()
{
getHangingAccountByTCIDList
:
function
()
{
this
.
apipost
(
'Financial_post_GetHangingAccountByTCIDList'
,
{
"Financial_post_GetHangingAccountByTCIDList"
,
{
TCIDs
:
this
.
$route
.
query
.
id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
HangingList
=
res
.
data
.
data
this
.
HangingList
=
res
.
data
.
data
;
}
},
err
=>
{}
)
);
},
goFncUrl
:
function
(
path
,
id
)
{
goFncUrl
:
function
(
path
,
id
)
{
this
.
$router
.
push
({
name
:
path
,
query
:
{
"id"
:
id
,
blank
:
'y'
id
:
id
,
blank
:
"y"
}
})
});
},
goHotelDetail
:
function
(
id
,
num
,
TCNUM
,
path
)
{
goHotelDetail
:
function
(
id
,
num
,
TCNUM
,
path
)
{
this
.
$router
.
push
({
name
:
path
,
query
:
{
"id"
:
id
,
"NewCombinationNum"
:
num
,
"TCNUM"
:
TCNUM
,
'blank'
:
'y'
,
id
:
id
,
NewCombinationNum
:
num
,
TCNUM
:
TCNUM
,
blank
:
"y"
}
});
},
goZhiDan2
:
function
(
obj
,
type
,
leadr
,
cur
)
{
let
TCIDARR
=
[
obj
.
TCIDS
]
goZhiDan2
:
function
(
obj
,
type
,
leadr
,
cur
)
{
let
TCIDARR
=
[
obj
.
TCIDS
];
let
orderObj
=
{
OrderID
:
0
,
OrderSource
:
8
,
...
...
@@ -1023,117 +1036,127 @@
CostType
:
56
,
Money
:
leadr
.
LeaderGetPriceT
,
TCNUMS
:
obj
.
TCNUMS
,
CurrencyId
:
leadr
.
CurrencyId
,
}
CurrencyId
:
leadr
.
CurrencyId
};
let
id
=
[];
console
.
log
(
"nowLineId:"
+
obj
.
LineId
+
"old:"
+
this
.
LineId
);
if
(
obj
.
LineId
==
this
.
LineId
)
{
id
=
[
98
,
99
]
id
=
[
98
,
99
];
}
else
{
if
(
obj
.
OutBranchId
===
0
)
{
id
=
[
43
,
48
]
id
=
[
43
,
48
];
}
else
{
id
=
[
56
,
53
]
id
=
[
56
,
53
];
}
}
this
.
$router
.
push
({
name
:
'ChoiceAddFinancialDocuments'
,
name
:
"ChoiceAddFinancialDocuments"
,
query
:
{
"Type"
:
2
,
"templateID"
:
JSON
.
stringify
(
id
),
"companyID"
:
obj
.
OutBranchId
,
"path"
:
""
,
'blank'
:
'y'
,
'orderObj'
:
JSON
.
stringify
(
orderObj
),
Type
:
2
,
templateID
:
JSON
.
stringify
(
id
),
companyID
:
obj
.
OutBranchId
,
path
:
""
,
blank
:
"y"
,
orderObj
:
JSON
.
stringify
(
orderObj
)
}
});
},
goZhiDan
:
function
(
obj
,
num
,
leadr
,
cur
)
{
goZhiDan
:
function
(
obj
,
num
,
leadr
,
cur
)
{
if
(
!
num
)
{
let
totailMoney
=
Number
(
leadr
.
LeaderGetPriceT
)
+
Number
(
cur
.
yiLing
);
if
(
totailMoney
>
leadr
.
PlanPrice
)
return
this
.
$message
.
error
(
'最大领款为预付合计金额的95%!'
)
if
(
!
leadr
.
LeaderGetPriceT
||
leadr
.
LeaderGetPriceT
<=
0
)
return
this
.
$message
.
error
(
'请输入金额!'
)
if
(
totailMoney
>
leadr
.
PlanPrice
)
return
this
.
$message
.
error
(
"最大领款为预付合计金额的95%!"
);
if
(
!
leadr
.
LeaderGetPriceT
||
leadr
.
LeaderGetPriceT
<=
0
)
return
this
.
$message
.
error
(
"请输入金额!"
);
}
if
(
this
.
list
.
hotelNoSureInfo
!==
""
)
{
this
.
$confirm
(
`
${
this
.
list
.
hotelNoSureInfo
}
,是否去制单?`
,
this
.
$t
(
"tips.tips"
),
{
confirmButtonText
:
this
.
$t
(
"pub.sureBtn"
),
cancelButtonText
:
this
.
$t
(
"pub.cancelBtn"
),
type
:
"warning"
}
if
(
this
.
list
.
hotelNoSureInfo
!==
''
)
{
this
.
$confirm
(
`
${
this
.
list
.
hotelNoSureInfo
}
,是否去制单?`
,
this
.
$t
(
'tips.tips'
),
{
confirmButtonText
:
this
.
$t
(
'pub.sureBtn'
),
cancelButtonText
:
this
.
$t
(
'pub.cancelBtn'
),
type
:
'warning'
}).
then
(()
=>
{
this
.
goZhiDan2
(
obj
,
num
,
leadr
,
cur
)
}).
catch
(()
=>
{
return
false
)
.
then
(()
=>
{
this
.
goZhiDan2
(
obj
,
num
,
leadr
,
cur
);
})
.
catch
(()
=>
{
return
false
;
});
}
else
{
this
.
goZhiDan2
(
obj
,
num
,
leadr
,
cur
)
this
.
goZhiDan2
(
obj
,
num
,
leadr
,
cur
);
}
},
addOtherList
(
index
,
id
)
{
this
.
list
.
OtherOrderReportList
.
OtherList
.
push
({
OrderType
:
'1'
,
OrderType
:
"1"
,
ID
:
0
,
UseDate
:
''
,
CostProject
:
'0'
,
TotalNum
:
'0'
,
UnitPrice
:
'0'
,
Rebate
:
'0'
,
TotalPrice
:
'0'
,
Remark
:
''
,
UseDate
:
""
,
CostProject
:
"0"
,
TotalNum
:
"0"
,
UnitPrice
:
"0"
,
Rebate
:
"0"
,
TotalPrice
:
"0"
,
Remark
:
""
,
TCIDs
:
this
.
$route
.
query
.
id
,
TCID
:
id
,
UseCount
:
this
.
UseCount
,
VoucherPicList
:
[]
})
});
},
deleteOtherListItem
(
outIndex
,
index
)
{
this
.
list
.
OtherOrderReportList
.
OtherList
.
splice
(
index
,
1
)
this
.
list
.
OtherOrderReportList
.
OtherList
.
splice
(
index
,
1
);
},
addSelfPlayingIncomeList
(
index
,
id
)
{
this
.
list
.
OtherOrderReportList
.
SelfPlayingIncomeList
.
push
({
OrderType
:
'4'
,
OrderType
:
"4"
,
ID
:
0
,
UseDate
:
''
,
UseDate
:
""
,
CostProject
:
0
,
TotalNum
:
'0'
,
UnitPrice
:
'0'
,
Rebate
:
'0'
,
TotalPrice
:
'0'
,
Remark
:
''
,
TotalNum
:
"0"
,
UnitPrice
:
"0"
,
Rebate
:
"0"
,
TotalPrice
:
"0"
,
Remark
:
""
,
TCID
:
id
,
UseCount
:
this
.
UseCount
,
TCIDs
:
this
.
$route
.
query
.
id
,
VoucherPicList
:
[]
})
});
},
deleteSelfPlayingIncomeListItem
(
outIndex
,
index
)
{
this
.
list
.
OtherOrderReportList
.
SelfPlayingIncomeList
.
splice
(
index
,
1
)
this
.
list
.
OtherOrderReportList
.
SelfPlayingIncomeList
.
splice
(
index
,
1
);
},
addSelfPlayingExpendList
(
index
,
id
)
{
this
.
list
.
OtherOrderReportList
.
SelfPlayingExpendList
.
push
({
OrderType
:
'5'
,
OrderType
:
"5"
,
ID
:
0
,
UseDate
:
''
,
CostProject
:
''
,
TotalNum
:
'0'
,
UnitPrice
:
'0'
,
Rebate
:
'0'
,
TotalPrice
:
'0'
,
Remark
:
''
,
UseDate
:
""
,
CostProject
:
""
,
TotalNum
:
"0"
,
UnitPrice
:
"0"
,
Rebate
:
"0"
,
TotalPrice
:
"0"
,
Remark
:
""
,
TCID
:
id
,
UseCount
:
this
.
UseCount
,
TCIDs
:
this
.
$route
.
query
.
id
,
VoucherPicList
:
[]
})
});
},
deleteSelfPlayingExpendList
(
outIndex
,
index
)
{
this
.
list
.
OtherOrderReportList
.
SelfPlayingExpendList
.
splice
(
index
,
1
)
this
.
list
.
OtherOrderReportList
.
SelfPlayingExpendList
.
splice
(
index
,
1
);
},
busTotalPrice
(
obj
)
{
let
totalPrice
=
0
let
totalPrice
=
0
;
obj
.
forEach
(
item
=>
{
totalPrice
+=
Number
(
item
.
CostPrice
)
+
Number
(
item
.
HighSpeedPrice
)
+
Number
(
item
.
StopPrice
)
})
return
this
.
moneyFormat
(
totalPrice
)
totalPrice
+=
Number
(
item
.
CostPrice
)
+
Number
(
item
.
HighSpeedPrice
)
+
Number
(
item
.
StopPrice
);
});
return
this
.
moneyFormat
(
totalPrice
);
},
hotelTotalPrice
(
obj
)
{
let
totalPrice
=
0
;
...
...
@@ -1147,98 +1170,106 @@
if
(
index
==
4
&&
obj
.
DMCPayType
!==
1
&&
obj
.
DMCPayType
!==
11
)
{
totalPrice
+=
0
;
}
else
{
totalPrice
+=
item
.
UnitPrice
*
(
item
.
BookNum
-
item
.
HotelDiscount
)
*
(
coefficient
-
item
.
RebateRatio
/
100
);
totalPrice
+=
item
.
UnitPrice
*
(
item
.
BookNum
-
item
.
HotelDiscount
)
*
(
coefficient
-
item
.
RebateRatio
/
100
);
}
if
((
obj
.
OPState
==
1
||
obj
.
DMCState
==
1
)
&&
item
.
HouseType
!=
6
)
{
totalPrice
+=
item
.
BookNum
*
obj
.
InTangTax
;
}
}
else
{
totalPrice
+=
0
;
}
})
});
totalPrice
+=
obj
.
ParkFee
+
obj
.
CityTax
;
return
this
.
moneyFormat
(
totalPrice
)
return
this
.
moneyFormat
(
totalPrice
);
},
diningTotalPrice
(
sObj
,
obj
)
{
let
totalPrice
=
0
let
totalPrice
=
0
;
obj
.
forEach
(
x
=>
{
totalPrice
+=
x
.
PeoplePrice
*
(
x
.
PeopleNum
-
x
.
Discount
)
*
(
1
-
x
.
DiscountPrice
/
100
)
})
totalPrice
+=
x
.
PeoplePrice
*
(
x
.
PeopleNum
-
x
.
Discount
)
*
(
1
-
x
.
DiscountPrice
/
100
);
});
if
(
!
(
sObj
.
PayStyle
==
1
||
sObj
.
PayStyle
==
11
))
{
totalPrice
=
0
totalPrice
=
0
;
}
return
this
.
moneyFormat
(
totalPrice
)
return
this
.
moneyFormat
(
totalPrice
);
},
scenicTotalPrice
(
sObj
,
obj
)
{
let
totalPrice
=
0
let
totalPrice
=
0
;
obj
.
forEach
(
x
=>
{
totalPrice
+=
x
.
PeoplePrice
*
(
x
.
UsePeopleNum
-
x
.
Discount
)
*
(
1
-
x
.
DiscountPrice
/
100
)
})
totalPrice
+=
x
.
PeoplePrice
*
(
x
.
UsePeopleNum
-
x
.
Discount
)
*
(
1
-
x
.
DiscountPrice
/
100
);
});
if
(
sObj
.
PayStyle
!==
1
)
{
totalPrice
=
0
totalPrice
=
0
;
}
return
this
.
moneyFormat
(
totalPrice
)
return
this
.
moneyFormat
(
totalPrice
);
},
otherTotalPrice
(
obj
)
{
let
totalPrice
=
0
let
totalPrice
=
0
;
obj
.
forEach
(
item
=>
{
totalPrice
+=
item
.
TotalNum
*
item
.
UnitPrice
*
(
1
-
item
.
Rebate
/
100
)
})
return
this
.
moneyFormat
(
totalPrice
)
totalPrice
+=
item
.
TotalNum
*
item
.
UnitPrice
*
(
1
-
item
.
Rebate
/
100
);
});
return
this
.
moneyFormat
(
totalPrice
);
},
saveData
()
{
this
.
apipost
(
'dmcstatistics_post_SetOtherOrderList'
,
this
.
list
.
OtherOrderReportList
,
res
=>
{
this
.
apipost
(
"dmcstatistics_post_SetOtherOrderList"
,
this
.
list
.
OtherOrderReportList
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
res
.
data
.
message
)
this
.
getNav
()
this
.
getList
()
this
.
$message
.
success
(
res
.
data
.
message
)
;
this
.
getNav
()
;
this
.
getList
()
;
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
)
this
.
$message
.
error
(
res
.
data
.
message
)
;
}
},
err
=>
{})
},
err
=>
{}
);
},
saveitem
(
obj
)
{
this
.
TemporaryItem
=
obj
this
.
TemporaryItem
=
obj
;
},
analyzeItem
(
obj
,
index
)
{
//预览
this
.
picObj
=
[]
analyzeItem
(
obj
,
index
)
{
//预览
this
.
picObj
=
[];
obj
.
forEach
(
item
=>
{
this
.
picObj
.
push
(
item
.
url
)
})
this
.
initialIndex
=
index
this
.
picIsShow
=
true
this
.
picObj
.
push
(
item
.
url
);
});
this
.
initialIndex
=
index
;
this
.
picIsShow
=
true
;
},
peopleStrToWord
(
str
)
{
if
(
str
==
1
)
return
'大人'
if
(
str
==
2
)
return
'中人'
if
(
str
==
3
)
return
'小人'
if
(
str
==
1
)
return
"大人"
;
if
(
str
==
2
)
return
"中人"
;
if
(
str
==
3
)
return
"小人"
;
},
UseDinnerTypeToWord
(
str
)
{
if
(
str
==
1
)
return
'早餐'
if
(
str
==
2
)
return
'午餐'
if
(
str
==
3
)
return
'晚餐'
if
(
str
==
1
)
return
"早餐"
;
if
(
str
==
2
)
return
"午餐"
;
if
(
str
==
3
)
return
"晚餐"
;
},
CompareDate
(
d1
,
d2
)
{
return
((
new
Date
(
d1
.
replace
(
/-/g
,
"
\
/"
)))
<=
(
new
Date
(
d2
.
replace
(
/-/g
,
"
\
/"
))
));
return
new
Date
(
d1
.
replace
(
/-/g
,
"/"
))
<=
new
Date
(
d2
.
replace
(
/-/g
,
"/"
));
},
getNav
()
{
let
_this
=
this
this
.
apipost
(
'dmcstatistics_post_GetHotelStaticsByTCIDs'
,
{
let
_this
=
this
;
this
.
apipost
(
"dmcstatistics_post_GetHotelStaticsByTCIDs"
,
{
TCIDs
:
this
.
$route
.
query
.
id
},
res
=>
{
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
nav
=
res
.
data
.
data
.
list
;
this
.
LineId
=
res
.
data
.
data
.
EntryId
this
.
LineId
=
res
.
data
.
data
.
EntryId
;
if
(
nav
[
0
].
OutBranchId
==
1216
)
{
this
.
IsShowRMB
=
true
;
}
...
...
@@ -1246,27 +1277,26 @@
nav
.
forEach
(
x
=>
{
x
.
CurrencyIdArr
=
[];
nav
.
LeaderGetPriceT
=
0
;
num
+=
x
.
LeaderGetPrice
num
+=
x
.
LeaderGetPrice
;
x
.
hideZDBtn
=
false
;
if
(
Number
(
x
.
DMCRemark
)
>=
0
)
{
x
.
hideZDBtn
=
true
;
}
x
.
LeaderGetPriceList
.
forEach
(
lead
=>
{
if
(
x
.
CurrencyIdArr
.
indexOf
(
lead
.
CurrencyId
)
<
0
)
{
x
.
CurrencyIdArr
.
push
(
lead
.
CurrencyId
)
x
.
CurrencyIdArr
.
push
(
lead
.
CurrencyId
)
;
}
})
})
});
});
// 预付合计总金额
let
CurrencyIdArr
=
[];
this
.
CurrencyListMoney
=
[];
if
(
this
.
TotalNav
.
planPriceList
)
{
this
.
TotalNav
.
planPriceList
.
forEach
(
item
=>
{
if
(
CurrencyIdArr
.
indexOf
(
item
.
CurrencyId
)
<
0
)
{
CurrencyIdArr
.
push
(
item
.
CurrencyId
)
CurrencyIdArr
.
push
(
item
.
CurrencyId
)
;
}
})
})
;
CurrencyIdArr
.
forEach
(
id
=>
{
let
obj
=
{
money
:
0
,
...
...
@@ -1277,12 +1307,12 @@
obj
.
money
+=
item
.
PlanTotalPrice
;
obj
.
CurrencyId
=
item
.
CurrencyId
;
}
})
})
;
this
.
CurrencyListMoney
.
push
(
obj
);
})
})
;
}
this
.
CurrencyListMoney
.
forEach
((
cur
,
i
)
=>
{
cur
.
yiLing
=
0
cur
.
yiLing
=
0
;
cur
.
LeaderGetPriceArr
=
[];
nav
.
forEach
(
x
=>
{
let
obj
=
{
...
...
@@ -1298,43 +1328,57 @@
obj
.
LeaderGetPrice
+=
price
.
OrderMakingPrice
;
cur
.
yiLing
+=
price
.
OrderMakingPrice
;
}
})
})
;
cur
.
LeaderGetPriceArr
.
push
(
obj
);
})
})
})
;
})
;
this
.
CurrencyListMoney
.
forEach
((
cur
,
i
)
=>
{
cur
.
LeaderGetPriceArr
.
forEach
(
lead
=>
{
lead
.
LeaderGetPriceT
=
Math
.
floor
(((
cur
.
money
*
0.95
)
-
cur
.
yiLing
)
*
100
)
/
100
;
lead
.
LeaderGetPriceT
=
Math
.
floor
((
cur
.
money
*
0.95
-
cur
.
yiLing
)
*
100
)
/
100
;
lead
.
PlanPrice
=
cur
.
money
*
0.95
;
})
})
})
;
})
;
this
.
nav
=
nav
;
}
else
{
this
.
Error
(
res
.
data
.
message
)
this
.
Error
(
res
.
data
.
message
)
;
}
},
err
=>
{})
},
err
=>
{}
);
},
getTotalNav
()
{
this
.
apipost
(
'dmcstatistics_post_GetNewPlanTotalPrice_V2'
,
{
this
.
apipost
(
"dmcstatistics_post_GetNewPlanTotalPrice_V2"
,
{
TCIDs
:
this
.
$route
.
query
.
id
},
res
=>
{
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
TotalNav
=
res
.
data
.
data
;
this
.
getNav
();
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{})
},
err
=>
{}
);
},
getList
()
{
this
.
loading
=
true
;
this
.
apipost
(
'dmcstatistics_post_GetGroupLeaderUserMoneyPlan'
,
this
.
msg
,
res
=>
{
this
.
apipost
(
"dmcstatistics_post_GetGroupLeaderUserMoneyPlan"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
list
=
res
.
data
.
data
;
this
.
ContractUrlCount
=
res
.
data
.
data
.
ContractUrlCount
;
this
.
UseCount
=
this
.
list
.
UseCount
;
if
(
this
.
list
.
OtherOrderReportList
.
OtherList
&&
this
.
list
.
OtherOrderReportList
.
OtherList
.
length
>
0
)
{
if
(
this
.
list
.
OtherOrderReportList
.
OtherList
&&
this
.
list
.
OtherOrderReportList
.
OtherList
.
length
>
0
)
{
this
.
list
.
OtherOrderReportList
.
OtherList
.
forEach
(
x
=>
{
x
.
CostProject
=
x
.
CostProject
.
toString
();
});
...
...
@@ -1342,8 +1386,10 @@
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{})
},
err
=>
{}
);
}
},
mounted
()
{
this
.
isUpdate
=
this
.
$route
.
query
.
isUpdate
;
...
...
@@ -1355,72 +1401,71 @@
}
this
.
getList
();
this
.
getTotalNav
();
this
.
getHangingAccountByTCIDList
()
this
.
getzhuijiaList
()
this
.
getHangingAccountByTCIDList
();
this
.
getzhuijiaList
();
this
.
financeinfo_post_GetList
();
}
}
};
</
script
>
<
style
>
.leaderReimbursementTableNav
{
.leaderReimbursementTableNav
{
background
:
#d6cece
;
width
:
100%
;
margin
:
20px
0
;
}
}
.leaderReimbursementTableNav
tr
th
{
background
:
#E6E6E
6
;
.leaderReimbursementTableNav
tr
th
{
background
:
#e6e6e
6
;
height
:
40px
;
font-size
:
12px
;
color
:
#333
;
}
}
.leaderReimbursementTableNav
tr
{
.leaderReimbursementTableNav
tr
{
background
:
#fff
;
text-align
:
center
;
height
:
40px
;
font-size
:
12px
;
}
}
.leaderReimbursementTableNav
tr
td
{
.leaderReimbursementTableNav
tr
td
{
background
:
#fff
;
text-align
:
center
;
height
:
20px
;
font-size
:
12px
;
}
}
.leaderReimbursementTableNav
._go_detail
p
{
.leaderReimbursementTableNav
._go_detail
p
{
cursor
:
pointer
;
line-height
:
25px
;
}
}
.leaderReimbursementTable
{
.leaderReimbursementTable
{
width
:
100%
;
margin
:
20px
0
;
border-collapse
:
collapse
;
}
}
.leaderReimbursementTable
tr
th
{
background
:
#E6E6E
6
;
.leaderReimbursementTable
tr
th
{
background
:
#e6e6e
6
;
height
:
40px
;
font-size
:
13px
;
color
:
#333
;
border
:
1px
solid
#ccc
;
text-align
:
center
;
}
}
.leaderReimbursementTable
tr
td
{
.leaderReimbursementTable
tr
td
{
border
:
1px
solid
#ccc
;
line-height
:
25px
;
height
:
25px
;
font-size
:
12px
;
background
:
#fff
;
text-align
:
center
;
}
}
.leader2Btn
{
.leader2Btn
{
color
:
#fff
;
padding
:
0
15px
;
height
:
30px
;
...
...
@@ -1428,192 +1473,191 @@
border
:
1px
solid
#e95252
;
cursor
:
pointer
;
border-radius
:
15px
;
}
}
.Receipt_box
{
.Receipt_box
{
padding
:
15px
;
color
:
#c94052
;
width
:
614px
;
background-color
:
rgba
(
242
,
242
,
242
,
1
);
border
:
1px
solid
rgba
(
228
,
228
,
228
,
1
)
}
border
:
1px
solid
rgba
(
228
,
228
,
228
,
1
);
}
.Receipt_box.color_blur
{
color
:
#106BAF
;
}
.Receipt_box.color_blur
{
color
:
#106baf
;
}
.Receipt_box.color_blur
.rb_stit
span
{
.Receipt_box.color_blur
.rb_stit
span
{
display
:
inline-block
;
border-bottom
:
2px
solid
#106BAF
;
padding
:
0
20px
}
border-bottom
:
2px
solid
#106baf
;
padding
:
0
20px
;
}
.rb_tit
{
.rb_tit
{
font-size
:
18px
;
text-align
:
center
}
text-align
:
center
;
}
.rb_stit
{
.rb_stit
{
font-size
:
14px
;
text-align
:
center
}
text-align
:
center
;
}
.rb_stit
span
{
.rb_stit
span
{
display
:
inline-block
;
border-bottom
:
2px
solid
#C
94052
;
padding
:
0
20px
}
border-bottom
:
2px
solid
#c
94052
;
padding
:
0
20px
;
}
.rb_top_row
{
.rb_top_row
{
display
:
flex
;
justify-content
:
space-between
;
font-size
:
12px
;
}
}
.rb_top_row
span
._r_name
{
color
:
#333333
}
.rb_top_row
span
._r_name
{
color
:
#333333
;
}
.rb_top_row
span
._r_bold
{
font-weight
:
bold
}
.rb_top_row
span
._r_bold
{
font-weight
:
bold
;
}
.rb_top_row
._r_time
span
{
color
:
#333333
}
.rb_top_row
._r_time
span
{
color
:
#333333
;
}
._r_mb5
{
._r_mb5
{
margin-bottom
:
5px
;
}
}
.Receipt_table
{
.Receipt_table
{
width
:
100%
;
font-size
:
14px
;
text-align
:
center
}
text-align
:
center
;
}
.Receipt_table
.th
{
font-weight
:
200
!important
}
.Receipt_table
.th
{
font-weight
:
200
!important
;
}
._r_mt10
{
._r_mt10
{
margin-top
:
10px
;
}
}
._bg__
{
._bg__
{
display
:
inline-block
;
padding
:
2px
8px
;
color
:
white
;
border-radius
:
4px
}
border-radius
:
4px
;
}
._bg_red
{
background-color
:
#E
95252
;
}
._bg_red
{
background-color
:
#e
95252
;
}
._bg_green
{
background-color
:
#2BB87C
}
._bg_green
{
background-color
:
#2bb87c
;
}
.text_d
{
.text_d
{
text-decoration
:
underline
;
cursor
:
pointer
;
}
}
.PingFangSC
{
font-weight
:
bold
}
.PingFangSC
{
font-weight
:
bold
;
}
.Bill_par
{
.Bill_par
{
position
:
relative
;
}
}
tr
._item_list
{
border-bottom
:
1px
solid
#E5E5E
5
;
tr
._item_list
{
border-bottom
:
1px
solid
#e5e5e
5
;
height
:
78px
;
}
}
tr
._item_list
td
{
tr
._item_list
td
{
border-bottom
:
1px
solid
#e5e5e5
;
padding
:
10px
;
}
}
/* tr._t_head th{border-top: 1px solid #e5e5e5;} */
tr
._item_list
td
:first-child
{
/* tr._t_head th{border-top: 1px solid #e5e5e5;} */
tr
._item_list
td
:first-child
{
border-left
:
1px
solid
#e5e5e5
;
}
}
tr
._item_list
td
:last-child
{
tr
._item_list
td
:last-child
{
border-right
:
1px
solid
#e5e5e5
;
}
}
._head_img
{
._head_img
{
width
:
28px
;
height
:
28px
;
border-radius
:
50%
;
vertical-align
:
middle
;
}
}
._btn_group
{
._btn_group
{
font-size
:
14px
;
}
}
.icon-daiqueren
{
color
:
#4BCA81
}
.icon-daiqueren
{
color
:
#4bca81
;
}
.icon-yiqueren
{
color
:
#4BCA81
}
.icon-yiqueren
{
color
:
#4bca81
;
}
.icon-yiquxiao
{
color
:
#959595
}
.icon-yiquxiao
{
color
:
#959595
;
}
.icon-shenhebohui
{
color
:
#E95252
}
.icon-shenhebohui
{
color
:
#e95252
;
}
.icon-icon-zancun
{
color
:
#FF9C01
}
.icon-icon-zancun
{
color
:
#ff9c01
;
}
.singeRowTable
tr
:hover
{
background-color
:
white
}
.singeRowTable
tr
:hover
{
background-color
:
white
;
}
._TradeWayList
{
._TradeWayList
{
padding
:
5px
10px
;
background-color
:
#EEEEEE
;
background-color
:
#eeeeee
;
border-radius
:
4px
;
margin
:
10px
0
;
width
:
230px
}
width
:
230px
;
}
._bold
{
font-weight
:
bold
}
._bold
{
font-weight
:
bold
;
}
._bank_name
,
._bank_type
{
._bank_name
,
._bank_type
{
display
:
inline-block
;
background-color
:
#333333
;
color
:
white
;
padding
:
2px
4px
;
border-radius
:
4px
;
margin-left
:
10px
;
}
}
._bank_name
{
._bank_name
{
margin-left
:
10px
;
}
._bank_type
{
background-color
:
#2AAEF2
}
}
._bank_type2
{
background-color
:
#FF9C01
}
._bank_type
{
background-color
:
#2aaef2
;
}
._bank_type2
{
background-color
:
#ff9c01
;
}
</
style
>
src/components/TravelManager/TravelList/RegistrationList.vue
View file @
12541cc5
...
...
@@ -5007,7 +5007,6 @@
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
console
.
log
(
res
,
'resssssssss'
);
this
.
OrderDataList
=
res
.
data
.
data
;
this
.
IsUpdateOrderMoney
=
res
.
data
.
data
.
IsUpdateOrderMoney
}
...
...
src/components/activity/PersonnelManagement.vue
View file @
12541cc5
...
...
@@ -655,13 +655,11 @@ export default {
}
else
if
(
this
.
index1
+
1
==
3
){
period
=
this
.
yearVal
}
console
.
log
(
this
.
yearVal
,
this
.
weekVal
,
this
.
monthVal
)
let
msg
=
{
timeRange
:
this
.
index1
+
1
,
userRange
:
this
.
index2
+
1
,
period
};
console
.
log
(
msg
)
this
.
apipost
(
"user_get_usedsixSatistics"
,
msg
,
r
=>
{
if
(
r
.
data
.
data
&&
r
.
data
.
data
.
length
>
0
){
this
.
tableData
=
this
.
orderBy
(
...
...
src/components/newTravelmanager/TravelGroupControl/TravelTemp/VToolBar.vue
View file @
12541cc5
<
template
>
<div
:class=
"isHorizontal === true?'vToolBar vToolBar_horizontal':'vToolBar vToolBar_vertical'"
>
<div
:class=
"
isHorizontal === true
? 'vToolBar vToolBar_horizontal'
: 'vToolBar vToolBar_vertical'
"
>
<div
v-if=
"preShow()"
>
<i
:class=
"isHorizontal === true?'iconfont ' + icon.leftZ:'iconfont ' + icon.topZ"
@
click=
"toPreZ"
></i>
<i
:class=
"
isHorizontal === true
? 'iconfont ' + icon.leftZ
: 'iconfont ' + icon.topZ
"
@
click=
"toPreZ"
></i>
</div>
<div
v-if=
"preShow()"
>
<i
:class=
"isHorizontal === true?'iconfont ' + icon.leftY:'iconfont ' + icon.topY"
@
click=
"toPreY"
></i>
<i
:class=
"
isHorizontal === true
? 'iconfont ' + icon.leftY
: 'iconfont ' + icon.topY
"
@
click=
"toPreY"
></i>
</div>
<div
v-if=
"isHuan === true"
>
<i
:class=
"'iconfont ' + icon.huan"
@
click=
"toHuan"
></i>
...
...
@@ -12,26 +32,44 @@
<div
v-if=
"isXuan === true"
>
<i
:class=
"'iconfont ' + icon.xuan"
@
click=
"toXuan"
></i>
</div>
<div
v-if=
"isAdd === true"
style=
"display:none;
"
>
<div
v-if=
"isAdd === true
"
>
<i
:class=
"'' + icon.add"
@
click=
"toAdd"
></i>
</div>
<div
v-if=
"isDelete === true"
>
<i
:class=
"'iconfont ' + icon.delete"
@
click=
"toDelete"
></i>
</div>
<div
v-if=
"nextShow()"
>
<i
:class=
"isHorizontal === true?'iconfont ' + icon.rightY:'iconfont ' + icon.bottomY"
@
click=
"toNextY"
></i>
<i
:class=
"
isHorizontal === true
? 'iconfont ' + icon.rightY
: 'iconfont ' + icon.bottomY
"
@
click=
"toNextY"
></i>
</div>
<div
v-if=
"nextShow()"
>
<i
:class=
"isHorizontal === true?'iconfont ' + icon.rightZ:'iconfont ' + icon.bottomZ"
@
click=
"toNextZ"
></i>
<i
:class=
"
isHorizontal === true
? 'iconfont ' + icon.rightZ
: 'iconfont ' + icon.bottomZ
"
@
click=
"toNextZ"
></i>
</div>
<div
v-if=
"isReset === true"
>
<i
title=
"重置图片位置"
:class=
"'iconfont ' + icon.reset"
@
click=
"toReset"
></i>
<i
title=
"重置图片位置"
:class=
"'iconfont ' + icon.reset"
@
click=
"toReset"
></i>
</div>
</div>
</
template
>
<
script
>
export
default
{
export
default
{
props
:
{
// 是否横向
isHorizontal
:
{
...
...
@@ -46,7 +84,7 @@
// 标识
name
:
{
type
:
String
,
default
:
''
default
:
""
},
// 当前版块下标
index1
:
{
...
...
@@ -94,120 +132,132 @@
default
:
false
}
},
data
()
{
data
()
{
return
{
icon
:
{
topZ
:
'icon-zhiding'
,
topY
:
'icon-arrow-up'
,
leftZ
:
'icon-left1'
,
leftY
:
'icon-left'
,
huan
:
'icon-img_bdsc'
,
xuan
:
'icon-img_cz'
,
delete
:
'icon-remove'
,
rightY
:
'icon-right1'
,
rightZ
:
'icon-right'
,
bottomY
:
'icon-arrowdown'
,
bottomZ
:
'icon-zhidi'
,
reset
:
'icon-zhongzhi'
,
add
:
'el-icon-plus'
}
topZ
:
"icon-zhiding"
,
topY
:
"icon-arrow-up"
,
leftZ
:
"icon-left1"
,
leftY
:
"icon-left"
,
huan
:
"icon-img_bdsc"
,
xuan
:
"icon-img_cz"
,
delete
:
"icon-remove"
,
rightY
:
"icon-right1"
,
rightZ
:
"icon-right"
,
bottomY
:
"icon-arrowdown"
,
bottomZ
:
"icon-zhidi"
,
reset
:
"icon-zhongzhi"
,
add
:
"el-icon-plus"
}
};
},
methods
:
{
preShow
:
function
()
{
preShow
:
function
()
{
if
(
this
.
type
===
1
)
{
if
(
this
.
length1
!==
0
&&
this
.
index1
>
0
&&
this
.
index1
<
this
.
length1
)
{
return
true
if
(
this
.
length1
!==
0
&&
this
.
index1
>
0
&&
this
.
index1
<
this
.
length1
)
{
return
true
;
}
else
{
return
false
return
false
;
}
}
else
{
if
(
this
.
length2
!==
0
&&
this
.
index2
>
0
&&
this
.
index2
<
this
.
length2
)
{
return
true
if
(
this
.
length2
!==
0
&&
this
.
index2
>
0
&&
this
.
index2
<
this
.
length2
)
{
return
true
;
}
else
{
return
false
return
false
;
}
}
},
nextShow
:
function
()
{
nextShow
:
function
()
{
if
(
this
.
type
===
1
)
{
if
(
this
.
length1
!==
0
&&
this
.
index1
<
this
.
length1
-
1
)
{
return
true
if
(
this
.
length1
!==
0
&&
this
.
index1
<
this
.
length1
-
1
)
{
return
true
;
}
else
{
return
false
return
false
;
}
}
else
{
if
(
this
.
length2
!==
0
&&
this
.
index2
<
this
.
length2
-
1
)
{
return
true
if
(
this
.
length2
!==
0
&&
this
.
index2
<
this
.
length2
-
1
)
{
return
true
;
}
else
{
return
false
return
false
;
}
}
},
toPreZ
:
function
()
{
this
.
$emit
(
'toPreZ'
,
this
.
name
,
this
.
index1
,
this
.
index2
)
toPreZ
:
function
()
{
this
.
$emit
(
"toPreZ"
,
this
.
name
,
this
.
index1
,
this
.
index2
);
},
toPreY
:
function
()
{
this
.
$emit
(
'toPreY'
,
this
.
name
,
this
.
index1
,
this
.
index2
)
toPreY
:
function
()
{
this
.
$emit
(
"toPreY"
,
this
.
name
,
this
.
index1
,
this
.
index2
);
},
toNextY
:
function
()
{
this
.
$emit
(
'toNextY'
,
this
.
name
,
this
.
index1
,
this
.
index2
)
toNextY
:
function
()
{
this
.
$emit
(
"toNextY"
,
this
.
name
,
this
.
index1
,
this
.
index2
);
},
toNextZ
:
function
()
{
this
.
$emit
(
'toNextZ'
,
this
.
name
,
this
.
index1
,
this
.
index2
)
toNextZ
:
function
()
{
this
.
$emit
(
"toNextZ"
,
this
.
name
,
this
.
index1
,
this
.
index2
);
},
toHuan
:
function
()
{
this
.
$emit
(
'toHuan'
,
this
.
name
,
this
.
index1
,
this
.
index2
)
toHuan
:
function
()
{
this
.
$emit
(
"toHuan"
,
this
.
name
,
this
.
index1
,
this
.
index2
);
},
toXuan
:
function
()
{
this
.
$emit
(
'toXuan'
,
this
.
name
,
this
.
index1
,
this
.
index2
)
toXuan
:
function
()
{
this
.
$emit
(
"toXuan"
,
this
.
name
,
this
.
index1
,
this
.
index2
);
},
toDelete
:
function
()
{
this
.
$emit
(
'toDelete'
,
this
.
name
,
this
.
index1
,
this
.
index2
)
toDelete
:
function
()
{
this
.
$emit
(
"toDelete"
,
this
.
name
,
this
.
index1
,
this
.
index2
);
},
toReset
:
function
()
{
this
.
$emit
(
'toReset'
,
this
.
name
,
this
.
index1
,
this
.
index2
)
toReset
:
function
()
{
this
.
$emit
(
"toReset"
,
this
.
name
,
this
.
index1
,
this
.
index2
);
},
//添加
toAdd
:
function
()
{
this
.
$emit
(
'toAdd'
,
this
.
name
,
this
.
index1
,
this
.
index2
)
}
toAdd
:
function
()
{
this
.
$emit
(
"toAdd"
,
this
.
name
,
this
.
index1
,
this
.
index2
);
}
}
};
</
script
>
<
style
scoped
>
.vToolBar
{
.vToolBar
{
display
:
inline-block
;
font-size
:
0px
;
background-color
:
rgba
(
0
,
0
,
0
,
.7
);
background-color
:
rgba
(
0
,
0
,
0
,
0
.7
);
border-radius
:
2px
;
}
.vToolBar_horizontal
{
}
.vToolBar_horizontal
{
height
:
30px
;
white-space
:
nowrap
;
}
.vToolBar_vertical
{
}
.vToolBar_vertical
{
width
:
30px
;
}
.vToolBar
>
div
{
}
.vToolBar
>
div
{
display
:
inline-block
;
width
:
30px
;
height
:
30px
;
vertical-align
:
top
;
cursor
:
pointer
;
}
.vToolBar
>
div
>
i
{
}
.vToolBar
>
div
>
i
{
display
:
inline-block
;
width
:
30px
;
height
:
30px
;
line-height
:
30px
;
text-align
:
center
;
font-size
:
20px
;
color
:
#FFFFFF
;
}
.vToolBar
>
div
>
i
:hover
{
color
:
#ffffff
;
}
.vToolBar
>
div
>
i
:hover
{
background-color
:
#666666
;
}
}
</
style
>
src/components/newTravelmanager/TravelGroupControl/TravelTemp/travelFeature3.vue
View file @
12541cc5
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/components/newTravelmanager/travelLineTrip/travelDaysTrip.vue
View file @
12541cc5
...
...
@@ -303,9 +303,6 @@
methods
:
{
//非直采切换
NoDirectScenicCheck
(
number
)
{
// this.dayObj.ScenicArray.forEach(x=>{
// x.ScenicJson = x.ScenicJsonStr ? JSON.parse(x.ScenicJsonStr) : { x:0, y:0 };
// })
if
(
this
.
dayObj
.
ScenicArray
==
null
)
{
this
.
dayObj
.
ScenicArray
=
[];
}
...
...
src/store/actions/msgs.js
View file @
12541cc5
...
...
@@ -2,7 +2,7 @@ import store from '../'
import
config
from
'../../configs'
import
util
from
'../../utils'
export
function
formatMsg
(
msg
)
{
export
function
formatMsg
(
msg
)
{
const
nim
=
store
.
state
.
nim
if
(
msg
.
type
===
'robot'
)
{
if
(
msg
.
content
&&
msg
.
content
.
flag
===
'bot'
)
{
...
...
@@ -25,21 +25,21 @@ export function formatMsg (msg) {
return
msg
}
export
function
onRoamingMsgs
(
obj
)
{
export
function
onRoamingMsgs
(
obj
)
{
let
msgs
=
obj
.
msgs
.
map
(
msg
=>
{
return
formatMsg
(
msg
)
})
store
.
commit
(
'updateMsgs'
,
msgs
)
}
export
function
onOfflineMsgs
(
obj
)
{
export
function
onOfflineMsgs
(
obj
)
{
let
msgs
=
obj
.
msgs
.
map
(
msg
=>
{
return
formatMsg
(
msg
)
})
store
.
commit
(
'updateMsgs'
,
msgs
)
}
export
function
onMsg
(
msg
)
{
export
function
onMsg
(
msg
)
{
msg
=
formatMsg
(
msg
)
store
.
commit
(
'putMsg'
,
msg
)
if
(
msg
.
sessionId
===
store
.
state
.
currSessionId
)
{
...
...
@@ -52,7 +52,7 @@ export function onMsg (msg) {
}
}
function
onSendMsgDone
(
error
,
msg
)
{
function
onSendMsgDone
(
error
,
msg
)
{
store
.
dispatch
(
'hideLoading'
)
if
(
error
)
{
// 被拉黑
...
...
@@ -67,7 +67,7 @@ function onSendMsgDone (error, msg) {
}
// 消息撤回
export
function
onRevocateMsg
(
error
,
msg
)
{
export
function
onRevocateMsg
(
error
,
msg
)
{
const
nim
=
store
.
state
.
nim
if
(
error
)
{
if
(
error
.
code
===
508
)
{
...
...
@@ -94,7 +94,7 @@ export function onRevocateMsg (error, msg) {
to
:
msg
.
to
,
tip
,
time
:
msg
.
time
,
done
:
function
sendTipMsgDone
(
error
,
tipMsg
)
{
done
:
function
sendTipMsgDone
(
error
,
tipMsg
)
{
let
idClient
=
msg
.
deletedIdClient
||
msg
.
idClient
store
.
commit
(
'replaceMsg'
,
{
sessionId
:
msg
.
sessionId
,
...
...
@@ -112,20 +112,28 @@ export function onRevocateMsg (error, msg) {
})
}
export
function
revocateMsg
({
state
,
commit
},
msg
)
{
export
function
revocateMsg
({
state
,
commit
},
msg
)
{
const
nim
=
state
.
nim
let
{
idClient
}
=
msg
let
{
idClient
}
=
msg
msg
=
Object
.
assign
(
msg
,
state
.
msgsMap
[
idClient
])
nim
.
deleteMsg
({
msg
,
done
:
function
deleteMsgDone
(
error
)
{
done
:
function
deleteMsgDone
(
error
)
{
onRevocateMsg
(
error
,
msg
)
}
})
}
// 发送普通消息
export
function
sendMsg
({
state
,
commit
},
obj
)
{
export
function
sendMsg
({
state
,
commit
},
obj
)
{
const
nim
=
state
.
nim
obj
=
obj
||
{}
let
type
=
obj
.
type
||
''
...
...
@@ -152,13 +160,16 @@ export function sendMsg ({state, commit}, obj) {
}
}
export
function
sendTip
({
state
,
commit
},
obj
)
{
export
function
sendTip
({
state
,
commit
},
obj
)
{
const
nim
=
store
.
state
.
nim
nim
.
sendTipMsg
({
scene
:
obj
.
scene
,
to
:
obj
.
to
,
tip
:
obj
.
tip
,
done
:
function
sendTipMsgDone
(
error
,
msg
)
{
done
:
function
sendTipMsgDone
(
error
,
msg
)
{
// 超哥 do something
onSendMsgDone
(
error
,
msg
)
}
...
...
@@ -166,9 +177,16 @@ export function sendTip ({state, commit}, obj) {
}
// 发送文件消息
export
function
sendFileMsg
({
state
,
commit
},
obj
)
{
export
function
sendFileMsg
({
state
,
commit
},
obj
)
{
const
nim
=
state
.
nim
let
{
scene
,
to
,
fileInput
}
=
obj
let
{
scene
,
to
,
fileInput
}
=
obj
let
type
=
'file'
if
(
/
\.(
png|jpg|bmp|jpeg|gif
)
$/i
.
test
(
fileInput
.
value
))
{
type
=
'image'
...
...
@@ -199,16 +217,26 @@ export function sendFileMsg ({state, commit}, obj) {
})
}
export
function
sendDataUrlMsg
({
state
,
commit
},
obj
)
{
export
function
sendDataUrlMsg
({
state
,
commit
},
obj
)
{
const
nim
=
state
.
nim
let
{
scene
,
to
,
dataURL
,
name
}
=
obj
let
{
scene
,
to
,
dataURL
,
name
}
=
obj
let
type
=
'file'
if
(
/
(
png|jpg|bmp|jpeg|gif
)
$/i
.
test
(
name
))
{
type
=
'image'
}
else
if
(
/
(
mov|mp4|ogg|webm
)
$/i
.
test
(
name
))
{
type
=
'video'
}
let
otherMsg
=
{
'fileName'
:
name
}
let
otherMsg
=
{
'fileName'
:
name
}
store
.
dispatch
(
'showLoading'
)
nim
.
sendFile
({
scene
:
scene
,
...
...
@@ -235,9 +263,21 @@ export function sendDataUrlMsg ({state, commit}, obj) {
}
// 发送机器人消息
export
function
sendRobotMsg
({
state
,
commit
},
obj
)
{
export
function
sendRobotMsg
({
state
,
commit
},
obj
)
{
const
nim
=
state
.
nim
let
{
type
,
scene
,
to
,
robotAccid
,
content
,
params
,
target
,
body
}
=
obj
let
{
type
,
scene
,
to
,
robotAccid
,
content
,
params
,
target
,
body
}
=
obj
scene
=
scene
||
'p2p'
if
(
type
===
'text'
)
{
nim
.
sendRobotMsg
({
...
...
@@ -279,7 +319,10 @@ export function sendRobotMsg ({state, commit}, obj) {
}
// 发送消息已读回执
export
function
sendMsgReceipt
({
state
,
commit
})
{
export
function
sendMsgReceipt
({
state
,
commit
})
{
// 如果有当前会话
let
currSessionId
=
store
.
state
.
currSessionId
if
(
currSessionId
)
{
...
...
@@ -290,7 +333,7 @@ export function sendMsgReceipt ({state, commit}) {
if
(
state
.
sessionMap
[
currSessionId
])
{
nim
.
sendMsgReceipt
({
msg
:
state
.
sessionMap
[
currSessionId
].
lastMsg
,
done
:
function
sendMsgReceiptDone
(
error
,
obj
)
{
done
:
function
sendMsgReceiptDone
(
error
,
obj
)
{
// do something
}
})
...
...
@@ -299,21 +342,27 @@ export function sendMsgReceipt ({state, commit}) {
}
}
function
sendMsgReceiptDone
(
error
,
obj
)
{
function
sendMsgReceiptDone
(
error
,
obj
)
{
console
.
log
(
'发送消息已读回执'
+
(
!
error
?
'成功'
:
'失败'
),
error
,
obj
)
}
export
function
getHistoryMsgs
({
state
,
commit
},
obj
)
{
export
function
getHistoryMsgs
({
state
,
commit
},
obj
)
{
const
nim
=
state
.
nim
if
(
nim
)
{
let
{
scene
,
to
}
=
obj
let
{
scene
,
to
}
=
obj
let
options
=
{
scene
,
to
,
reverse
:
false
,
asc
:
true
,
limit
:
config
.
localMsglimit
||
20
,
done
:
function
getHistoryMsgsDone
(
error
,
obj
)
{
done
:
function
getHistoryMsgsDone
(
error
,
obj
)
{
if
(
obj
.
msgs
)
{
if
(
obj
.
msgs
.
length
===
0
)
{
commit
(
'setNoMoreHistoryMsgs'
)
...
...
@@ -341,11 +390,15 @@ export function getHistoryMsgs ({state, commit}, obj) {
}
}
export
function
resetNoMoreHistoryMsgs
({
commit
})
{
export
function
resetNoMoreHistoryMsgs
({
commit
})
{
commit
(
'resetNoMoreHistoryMsgs'
)
}
// 继续与机器人会话交互
export
function
continueRobotMsg
({
commit
},
robotAccid
)
{
export
function
continueRobotMsg
({
commit
},
robotAccid
)
{
commit
(
'continueRobotMsg'
,
robotAccid
)
}
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