Commit 9389093a authored by 吴春's avatar 吴春

Merge branch 'B2C' of http://gitlab.oytour.com/zk123/jz_travel into B2C

parents 6b763d38 99547a29
......@@ -127,6 +127,7 @@
<template v-else>暂无司机信息</template>
</view>
<view v-if="params.type>1&&params.type<5" class="row justify-center items-center">
<view v-if="params.type==2" class="row justify-center items-center" @click="showOptionVisible(3)">
<view class="nameTitle">
{{ datas.HotelOrderList[datas.hotelIndex].ReimburseList.ActualUseInfo?datas.HotelOrderList[datas.hotelIndex].ReimburseList.ActualUseInfo:datas.HotelOrderList[datas.hotelIndex].NewHotelName }}
......@@ -213,9 +214,18 @@
</template>
</view>
<view class="headeDatasCurrency row justify-between" @click="showOptionVisible(2)">
<view>
<view v-if="params.type==1">
实际金额:¥{{ datas&&datas.TotalMoney>=0?datas.TotalMoney.toFixed(2):0.0 }}
</view>
<view v-else-if="params.type==2">
实际金额:¥{{ datas&&datas.HotelOrderList&&datas.HotelOrderList[datas.hotelIndex].TotalMoney>=0?datas.HotelOrderList[datas.hotelIndex].TotalMoney.toFixed(2):0.0 }}
</view>
<view v-else-if="params.type==3">
实际金额:¥{{ datas&&datas.DiningSummaryList&&datas.DiningSummaryList[datas.diningIndex].TotalMoney>=0?datas.DiningSummaryList[datas.diningIndex].TotalMoney.toFixed(2):0.0 }}
</view>
<view v-else="params.type==4">
实际金额:¥{{ datas&&datas.ScenicStatisticsList&&datas.ScenicStatisticsList[datas.scenicIndex].TotalMoney>=0?datas.ScenicStatisticsList[datas.scenicIndex].TotalMoney.toFixed(2):0.0 }}
</view>
<view class="row items-center">
<text style="color: red;">*</text>
<text class="ML10">币种:{{ currencyObj.name }}</text>
......
<style lang="scss" scoped>
@import url("@/asset/css/flex.css");
.Sure{
.Sure {
padding: 0 20rpx;
margin-top: 30rpx;
}
.Sure view{
.Sure view {
background: #257BF2;
border-radius: 80rpx;
line-height: 80rpx;
......@@ -12,51 +14,62 @@
color: #fff;
}
.paymentTitle{
.paymentTitle {
font-size: 28rpx;
}
.paymentTexts view{
.paymentTexts view {
padding: 5rpx 15rpx;
border: 1px solid #EDEDED;
color: #888888;
border-radius: 6rpx;
}
.paymentTexts view:last-child{
.paymentTexts view:last-child {
margin-left: 40rpx;
}
.paymentTexts view.active{
.paymentTexts view.active {
color: #fff;
background: #257BF2;
border: 1px solid #257BF2;
}
.paymentTitle .tisp{
.paymentTitle .tisp {
color: #666666;
}
.textareaBox textarea{
.textareaBox textarea {
height: 208rpx;
background: #FFFFFF;
border: 1rpx solid #EAEAEA;
border-radius: 10rpx;
}
.InforImgBox{
.InforImgBox {
flex-wrap: wrap;
}
.InforImg,.addUp{
.InforImg,
.addUp {
width: 208rpx;
height: 208rpx;
margin-bottom: 20rpx;
}
.InforImg{
.InforImg {
border-radius: 10rpx;
margin-right: 20rpx;
position: relative;
}
.InforImg image{
.InforImg image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
.InforImgDel{
.InforImgDel {
position: absolute;
left: 0;
top: -14rpx;
......@@ -64,74 +77,84 @@
background: #fff;
border-radius: 50%;
}
.inforCenter{
.inforCenter {
border-radius: 10rpx;
overflow: hidden;
border: 1px solid rgba(102,102,102,0.3);
border: 1px solid rgba(102, 102, 102, 0.3);
margin-bottom: 40rpx;
position: relative;
}
.inforCenter:last-child{
.inforCenter:last-child {
margin-bottom: 0;
}
.inforCenterTop{
.inforCenterTop {
background: #F3F3F3;
padding: 20rpx 29rpx;
font-size: 32rpx;
color: #333333;
}
.inputBox{
.inputBox {
padding: 20rpx 0;
margin: 0 29rpx;
border-bottom:1px solid #DDD ;
border-bottom: 1px solid #DDD;
font-size: 28rpx;
}
.inputBox.noBorder{
.inputBox.noBorder {
border: 0;
}
.tisp{
.tisp {
color: red;
}
.inputBoxRight{
.inputBoxRight {
position: relative;
}
.inputBoxRight u-number-box{
.inputBoxRight u-number-box {
position: absolute;
right: 0;
top: -7rpx;
}
/deep/.inputBoxRight u-number-box input{
/deep/.inputBoxRight u-number-box input {
width: 130rpx !important;
min-width: 130rpx !important;
}
.inforCenterTopDel{
.inforCenterTopDel {
position: absolute;
left: -7rpx;
top: -7rpx;
padding: 5rpx;
z-index: 1;
}
</style>
<template>
<view>
<view class="inforCenterBox PX30 MT20">
<view class="inforCenter" v-for="(item,index) in datas.HotelOrderList[datas.hotelIndex].ReimburseList.ReimburseDetailsList"
<view class="inforCenter"
v-for="(item,index) in datas.HotelOrderList[datas.hotelIndex].ReimburseList.ReimburseDetailsList"
:key="index">
<view class="inforCenterTop row justify-between" @click="showOptionVisible(index)">
<view>{{ item.UserTypeStr?item.UserTypeStr:'选择类型' }}</view>
<view>
<u-icon name="arrow-down" color="#BBBBBB" size="42"/>
<u-icon name="arrow-down" color="#BBBBBB" size="42" />
</view>
</view>
<u-icon v-if="index" @click="delInfor(index)" class="inforCenterTopDel" name="clear" color="#FA6967" size="36"/>
<u-icon v-if="index" @click="delInfor(index)" class="inforCenterTopDel" name="clear" color="#FA6967"
size="36" />
<view class="inputBox row justify-between">
<view class="row">
<text>数量</text>
</view>
<view class="inputBoxRight">
<u-number-box :min="0" :value="item.UserNum" @change="(e)=>getNum(e,index,'数量')"/>
<input class="text-right" type="number" v-model="item.UserNum" @input="getNum()" />
</view>
</view>
<view class="inputBox row justify-between">
......@@ -139,7 +162,7 @@
<text>单价</text>
</view>
<view class="inputBoxRight">
<u-number-box :min="0" :max="99999999999999999" v-model="item.UnitPrice" @change="(e)=>getNum(e,index,'金额')"/>
<input class="text-right" type="number" v-model="item.UnitPrice" @input="getNum()" />
</view>
</view>
<view class="inputBox row justify-between noBorder">
......@@ -156,148 +179,155 @@
<view class="paymentTitle PA30">支付方式</view>
<view class="PX30 PB20 paymentTexts row">
<template v-for="(item,index) in paymentList">
<view :class="[datas.HotelOrderList[datas.hotelIndex].ReimburseList.SettlementType==item.id?'active':'']" @click="getSettlementType(item)">{{ item.name }}</view>
<view
:class="[datas.HotelOrderList[datas.hotelIndex].ReimburseList.SettlementType==item.id?'active':'']"
@click="getSettlementType(item)">{{ item.name }}</view>
</template>
</view>
<view class="paymentTitle PA30">备注</view>
<view class="textareaBox PX30 row">
<textarea class="PA20 flex1" placeholder-style="color:#AAAAAA"
v-model="datas.HotelOrderList[datas.hotelIndex].ReimburseList.Remarks" placeholder="请输入备注信息" @blur="updateData"/>
v-model="datas.HotelOrderList[datas.hotelIndex].ReimburseList.Remarks" placeholder="请输入备注信息"
@blur="updateData" />
</view>
<view class="paymentTitle PA30">
<text>凭证</text>
<text class="tisp">(可上传多张图片)</text>
</view>
<view class="PX30 PB30 row InforImgBox">
<view class="InforImg" v-for="(item,index) in datas.HotelOrderList[datas.hotelIndex].ReimburseList.VoucherPicList" >
<view class="InforImg"
v-for="(item,index) in datas.HotelOrderList[datas.hotelIndex].ReimburseList.VoucherPicList">
<image :src="item.url" mode="aspectFill" @click="previewImage(item.url)"></image>
<u-icon @click="delImg(index)" class="InforImgDel" name="clear" color="#FA6967" size="36"/>
<u-icon @click="delImg(index)" class="InforImgDel" name="clear" color="#FA6967" size="36" />
</view>
<upload class="addUp" @onSuccess="onSuccess"></upload>
</view>
<singleChoice v-if="optionVisible"
:current="optionObj.id"
:list="optionList"
@close="close" @change="popupCurrent"></singleChoice>
<singleChoice v-if="optionVisible" :current="optionObj.id" :list="optionList" @close="close"
@change="popupCurrent"></singleChoice>
</view>
</template>
<script>
import upload from "../upload";
import singleChoice from "../singleChoice";
export default {
props:['data','optionList'],
import upload from "../upload";
import singleChoice from "../singleChoice";
export default {
props: ['data', 'dataIndex2', 'optionList'],
components: {
upload,
singleChoice,
},
data() {
return {
paymentList:[
{name:'现金支付',id:1},
{name:'公司结算',id:2},
paymentList: [{
name: '现金支付',
id: 1
},
{
name: '公司结算',
id: 2
},
],
optionVisible: false,
optionObj:{},
optionObj: {},
params: {},
datas: null,//展示数据
datas: null, //展示数据
dataIndex: 0,
ReimIndex: 0,
ReimDatas: {},
BusList:[], //车信息
HotelOrderListReport:[], //酒店信息,合团
DiningList:[], //餐厅
ScenicList:[], //景点
OtherList:[], //其他订单信息
TipList:[], //小费收入
TeamList:[], //团费小计
SelfPlayingIncomeList:[], //自费收入
SelfPlayingExpendList:[], //自费支出
LeaderShopList:[], //购物报账
HotelOrderListReport: [], //酒店信息,合团
}
},
watch: {
data:{
handler(newVal,oldVal){
this.params = JSON.parse(JSON.stringify(newVal))
this.HotelOrderListReport = this.params.HotelOrderListReport //酒店信息,合团
this.dataIndex = this.params.dataIndex2
this.getRenderingData()
this.getTotal()
},
deep:true,
immediate:true
data: {
handler(newVal, oldVal) {
if (newVal && oldVal) {
//切换酒店日期
if (newVal.dataIndex2 != oldVal.dataIndex2) {
this.initData();
}
//切换同一天酒店
else if (oldVal.HotelOrderListReport[this.dataIndex2].hotelIndex != newVal.HotelOrderListReport[
this.dataIndex2]
.hotelIndex) {
this.initData();
}
}
},
datas:{
handler(newVal,oldVal){
this.updateData()
deep: true,
immediate: true
},
deep:true,
immediate:false
}
},
mounted() {
this.initData();
},
methods:{
getNum(e,index,type){
if(type=='数量') {
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList[index].UserNum = e.value
}else if(type=='金额'){
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList[index].UnitPrice = e.value
}
methods: {
initData() {
this.params = JSON.parse(JSON.stringify(this.data))
this.HotelOrderListReport = this.params.HotelOrderListReport //酒店信息,合团
this.dataIndex = this.dataIndex2;
this.getRenderingData()
this.getTotal()
},
getTotal(){
getNum() {
this.getTotal()
},
getTotal() {
let total = 0
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList.forEach(x=>{
total+=x.UserNum*x.UnitPrice
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList.forEach(x => {
total += x.UserNum * x.UnitPrice
})
this.datas.TotalMoney = total
this.updateData()
},
delInfor(index){
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList.splice(index,1)
delInfor(index) {
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList.splice(index, 1)
},
delImg(index){
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.VoucherPicList.splice(index,1)
delImg(index) {
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.VoucherPicList.splice(index, 1)
},
getSettlementType(item){
getSettlementType(item) {
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.SettlementType = item.id
this.updateData()
this.$forceUpdate()
},
updateData(){
updateData() {
this.HotelOrderListReport[this.dataIndex] = JSON.parse(JSON.stringify(this.datas))
this.params.HotelOrderListReport = JSON.parse(JSON.stringify(this.HotelOrderListReport))
this.$emit('change',this.params)
this.$emit('change', this.params)
},
// 酒店
getRenderingData(){
getRenderingData() {
this.datas = this.HotelOrderListReport[this.dataIndex]
this.ReimDatas = JSON.parse(JSON.stringify(this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList[0]))
this.ReimDatas = JSON.parse(JSON.stringify(this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList
.ReimburseDetailsList[0]))
},
showOptionVisible(index){
showOptionVisible(index) {
this.optionVisible = true
this.ReimIndex = index
this.optionObj = {
name: this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex].UserTypeStr,
id: this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex].UserType,
name: this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList[this
.ReimIndex].UserTypeStr,
id: this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList[this
.ReimIndex].UserType,
}
},
close(){
close() {
this.optionVisible = false
},
popupCurrent(value){
popupCurrent(value) {
this.optionVisible = false
let findIndex = this.optionList.findIndex(x=>x.id==value)
let findIndex = this.optionList.findIndex(x => x.id == value)
this.optionObj = this.optionList[findIndex]
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex].UserTypeStr = this.optionObj.name
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex].UserType = this.optionObj.id
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex]
.UserTypeStr = this.optionObj.name
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex]
.UserType = this.optionObj.id
},
previewImage(src) {
uni.previewImage({
urls: this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.VoucherPicList.map(x=> {return x.url}),
urls: this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.VoucherPicList.map(x => {
return x.url
}),
current: src,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
......@@ -310,7 +340,7 @@ export default {
},
});
},
addData(){
addData() {
this.ReimDatas = {
...this.ReimDatas,
ID: 0,
......@@ -319,14 +349,15 @@ export default {
UserNum: 0,
UnitPrice: 0,
}
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList.push(JSON.parse(JSON.stringify(this.ReimDatas)))
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.ReimburseDetailsList.push(JSON.parse(JSON
.stringify(this.ReimDatas)))
},
onSuccess(infor){
onSuccess(infor) {
this.datas.HotelOrderList[this.datas.hotelIndex].ReimburseList.VoucherPicList.push({
FileName: infor.name,
url: infor.url,
})
}
}
}
}
</script>
\ No newline at end of file
<style lang="scss" scoped>
@import url("@/asset/css/flex.css");
.Sure{
.Sure {
padding: 0 20rpx;
margin-top: 30rpx;
}
.Sure view{
.Sure view {
background: #257BF2;
border-radius: 80rpx;
line-height: 80rpx;
......@@ -12,51 +14,62 @@
color: #fff;
}
.paymentTitle{
.paymentTitle {
font-size: 28rpx;
}
.paymentTexts view{
.paymentTexts view {
padding: 5rpx 15rpx;
border: 1px solid #EDEDED;
color: #888888;
border-radius: 6rpx;
}
.paymentTexts view:last-child{
.paymentTexts view:last-child {
margin-left: 40rpx;
}
.paymentTexts view.active{
.paymentTexts view.active {
color: #fff;
background: #257BF2;
border: 1px solid #257BF2;
}
.paymentTitle .tisp{
.paymentTitle .tisp {
color: #666666;
}
.textareaBox textarea{
.textareaBox textarea {
height: 208rpx;
background: #FFFFFF;
border: 1rpx solid #EAEAEA;
border-radius: 10rpx;
}
.InforImgBox{
.InforImgBox {
flex-wrap: wrap;
}
.InforImg,.addUp{
.InforImg,
.addUp {
width: 208rpx;
height: 208rpx;
margin-bottom: 20rpx;
}
.InforImg{
.InforImg {
border-radius: 10rpx;
margin-right: 20rpx;
position: relative;
}
.InforImg image{
.InforImg image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
.InforImgDel{
.InforImgDel {
position: absolute;
left: 0;
top: -14rpx;
......@@ -64,74 +77,85 @@
background: #fff;
border-radius: 50%;
}
.inforCenter{
.inforCenter {
border-radius: 10rpx;
overflow: hidden;
border: 1px solid rgba(102,102,102,0.3);
border: 1px solid rgba(102, 102, 102, 0.3);
margin-bottom: 40rpx;
position: relative;
}
.inforCenter:last-child{
.inforCenter:last-child {
margin-bottom: 0;
}
.inforCenterTop{
.inforCenterTop {
background: #F3F3F3;
padding: 20rpx 29rpx;
font-size: 32rpx;
color: #333333;
}
.inputBox{
.inputBox {
padding: 20rpx 0;
margin: 0 29rpx;
border-bottom:1px solid #DDD ;
border-bottom: 1px solid #DDD;
font-size: 28rpx;
}
.inputBox.noBorder{
.inputBox.noBorder {
border: 0;
}
.tisp{
.tisp {
color: red;
}
.inputBoxRight{
.inputBoxRight {
position: relative;
}
.inputBoxRight u-number-box{
.inputBoxRight u-number-box {
position: absolute;
right: 0;
top: -7rpx;
}
/deep/.inputBoxRight u-number-box input{
/deep/.inputBoxRight u-number-box input {
width: 130rpx !important;
min-width: 130rpx !important;
}
.inforCenterTopDel{
.inforCenterTopDel {
position: absolute;
left: -7rpx;
top: -7rpx;
padding: 5rpx;
z-index: 1;
}
</style>
<template>
<view>
<view class="inforCenterBox PX30 MT20">
<view class="inforCenter" v-for="(item,index) in datas.DiningSummaryList[datas.diningIndex].ReimburseList.ReimburseDetailsList"
<view class="inforCenter"
v-for="(item,index) in datas.DiningSummaryList[datas.diningIndex].ReimburseList.ReimburseDetailsList"
:key="index">
<view class="inforCenterTop row justify-between" @click="showOptionVisible(index)">
<view>{{ item.UserTypeStr?item.UserTypeStr:'选择类型' }}</view>
<view>
<u-icon name="arrow-down" color="#BBBBBB" size="42"/>
<u-icon name="arrow-down" color="#BBBBBB" size="42" />
</view>
</view>
<u-icon v-if="index" @click="delInfor(index)" class="inforCenterTopDel" name="clear" color="#FA6967" size="36"/>
<u-icon v-if="index" @click="delInfor(index)" class="inforCenterTopDel" name="clear" color="#FA6967"
size="36" />
<view class="inputBox row justify-between">
<view class="row">
<text>数量</text>
</view>
<view class="inputBoxRight">
<u-number-box :min="0" :value="item.UserNum" @change="(e)=>getNum(e,index,'数量')"/>
<input class="text-right" type="number" v-model="item.UserNum" @input="getNum()" />
</view>
</view>
<view class="inputBox row justify-between">
......@@ -139,7 +163,8 @@
<text>单价</text>
</view>
<view class="inputBoxRight">
<u-number-box :min="0" :max="99999999999999999" v-model="item.UnitPrice" @change="(e)=>getNum(e,index,'金额')"/>
<input class="text-right" type="number" v-model="item.UnitPrice" @input="getNum()" />
</view>
</view>
<view class="inputBox row justify-between noBorder">
......@@ -156,147 +181,153 @@
<view class="paymentTitle PA30">支付方式</view>
<view class="PX30 PB20 paymentTexts row">
<template v-for="(item,index) in paymentList">
<view :class="[datas.DiningSummaryList[datas.diningIndex].ReimburseList.SettlementType==item.id?'active':'']" @click="getSettlementType(item)">{{ item.name }}</view>
<view
:class="[datas.DiningSummaryList[datas.diningIndex].ReimburseList.SettlementType==item.id?'active':'']"
@click="getSettlementType(item)">{{ item.name }}</view>
</template>
</view>
<view class="paymentTitle PA30">备注</view>
<view class="textareaBox PX30 row">
<textarea class="PA20 flex1" placeholder-style="color:#AAAAAA"
v-model="datas.DiningSummaryList[datas.diningIndex].ReimburseList.Remarks" placeholder="请输入备注信息" @blur="updateData"/>
v-model="datas.DiningSummaryList[datas.diningIndex].ReimburseList.Remarks" placeholder="请输入备注信息"
@blur="updateData" />
</view>
<view class="paymentTitle PA30">
<text>凭证</text>
<text class="tisp">(可上传多张图片)</text>
</view>
<view class="PX30 PB30 row InforImgBox">
<view class="InforImg" v-for="(item,index) in datas.DiningSummaryList[datas.diningIndex].ReimburseList.VoucherPicList" >
<view class="InforImg"
v-for="(item,index) in datas.DiningSummaryList[datas.diningIndex].ReimburseList.VoucherPicList">
<image :src="item.url" mode="aspectFill" @click="previewImage(item.url)"></image>
<u-icon @click="delImg(index)" class="InforImgDel" name="clear" color="#FA6967" size="36"/>
<u-icon @click="delImg(index)" class="InforImgDel" name="clear" color="#FA6967" size="36" />
</view>
<upload class="addUp" @onSuccess="onSuccess"></upload>
</view>
<singleChoice v-if="optionVisible"
:current="optionObj.id"
:list="optionList"
@close="close" @change="popupCurrent"></singleChoice>
<singleChoice v-if="optionVisible" :current="optionObj.id" :list="optionList" @close="close"
@change="popupCurrent"></singleChoice>
</view>
</template>
<script>
import upload from "../upload";
import singleChoice from "../singleChoice";
export default {
props:['data','optionList'],
import upload from "../upload";
import singleChoice from "../singleChoice";
export default {
props: ['data', 'dataIndex3', 'optionList'],
components: {
upload,
singleChoice,
},
data() {
return {
paymentList:[
{name:'现金支付',id:1},
{name:'公司结算',id:2},
paymentList: [{
name: '现金支付',
id: 1
},
{
name: '公司结算',
id: 2
},
],
optionVisible: false,
optionObj:{},
optionObj: {},
params: {},
datas: null,//展示数据
datas: null, //展示数据
dataIndex: 0,
ReimIndex: 0,
ReimDatas: {},
BusList:[], //车信息
HotelOrderListReport:[], //酒店信息,合团
DiningList:[], //餐厅
ScenicList:[], //景点
OtherList:[], //其他订单信息
TipList:[], //小费收入
TeamList:[], //团费小计
SelfPlayingIncomeList:[], //自费收入
SelfPlayingExpendList:[], //自费支出
LeaderShopList:[], //购物报账
DiningList: [], //餐厅
}
},
watch: {
data:{
handler(newVal,oldVal){
this.params = JSON.parse(JSON.stringify(newVal))
this.DiningList = this.params.DiningList
this.dataIndex = this.params.dataIndex3
this.getRenderingData()
this.getTotal()
},
deep:true,
immediate:true
data: {
handler(newVal, oldVal) {
if (newVal && oldVal) {
//切换用餐日期
if (newVal.dataIndex3 != oldVal.dataIndex3) {
this.initData();
}
//切换同一天餐厅
else if (oldVal.DiningList[this.dataIndex3].diningIndex != newVal.DiningList[this.dataIndex3]
.diningIndex) {
this.initData();
}
}
},
datas:{
handler(newVal,oldVal){
this.updateData()
deep: true,
immediate: true
},
deep:true,
immediate:false
}
},
mounted() {
this.initData();
},
methods:{
getNum(e,index,type){
if(type=='数量') {
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList[index].UserNum = e.value
}else if(type=='金额'){
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList[index].UnitPrice = e.value
}
methods: {
initData() {
this.params = JSON.parse(JSON.stringify(this.data))
this.DiningList = this.params.DiningList
this.dataIndex = this.dataIndex3;
this.getRenderingData()
this.getTotal();
},
getNum(e, index, type) {
this.getTotal()
},
getTotal(){
getTotal() {
let total = 0
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList.forEach(x=>{
total+=x.UserNum*x.UnitPrice
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList.forEach(x => {
total += x.UserNum * x.UnitPrice
})
this.datas.TotalMoney = total
this.updateData()
},
delInfor(index){
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList.splice(index,1)
delInfor(index) {
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList.splice(index, 1)
},
delImg(index){
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.VoucherPicList.splice(index,1)
delImg(index) {
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.VoucherPicList.splice(index, 1)
},
getSettlementType(item){
getSettlementType(item) {
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.SettlementType = item.id
this.updateData()
this.$forceUpdate()
},
updateData(){
updateData() {
this.DiningList[this.dataIndex] = JSON.parse(JSON.stringify(this.datas))
this.params.DiningList = JSON.parse(JSON.stringify(this.DiningList))
this.$emit('change',this.params)
this.$emit('change', this.params)
},
getRenderingData(){
getRenderingData() {
this.datas = this.DiningList[this.dataIndex]
this.ReimDatas = JSON.parse(JSON.stringify(this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList[0]))
this.ReimDatas = JSON.parse(JSON.stringify(this.datas.DiningSummaryList[this.datas.diningIndex]
.ReimburseList.ReimburseDetailsList[0]))
},
showOptionVisible(index){
showOptionVisible(index) {
this.optionVisible = true
this.ReimIndex = index
this.optionObj = {
name: this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex].UserTypeStr,
id: this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex].UserType,
name: this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList[this
.ReimIndex].UserTypeStr,
id: this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList[this
.ReimIndex].UserType,
}
},
close(){
close() {
this.optionVisible = false
},
popupCurrent(value){
popupCurrent(value) {
this.optionVisible = false
let findIndex = this.optionList.findIndex(x=>x.id==value)
let findIndex = this.optionList.findIndex(x => x.id == value)
this.optionObj = this.optionList[findIndex]
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex].UserTypeStr = this.optionObj.name
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex].UserType = this.optionObj.id
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex]
.UserTypeStr = this.optionObj.name
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex]
.UserType = this.optionObj.id
},
previewImage(src) {
uni.previewImage({
urls: this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.VoucherPicList.map(x=> {return x.url}),
urls: this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.VoucherPicList.map(
x => {
return x.url
}),
current: src,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
......@@ -309,7 +340,7 @@ export default {
},
});
},
addData(){
addData() {
this.ReimDatas = {
...this.ReimDatas,
ID: 0,
......@@ -318,14 +349,15 @@ export default {
UserNum: 0,
UnitPrice: 0,
}
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList.push(JSON.parse(JSON.stringify(this.ReimDatas)))
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.ReimburseDetailsList.push(JSON.parse(
JSON.stringify(this.ReimDatas)))
},
onSuccess(infor){
onSuccess(infor) {
this.datas.DiningSummaryList[this.datas.diningIndex].ReimburseList.VoucherPicList.push({
FileName: infor.name,
url: infor.url,
})
}
}
}
}
</script>
\ No newline at end of file
<style lang="scss" scoped>
@import url("@/asset/css/flex.css");
.Sure{
.Sure {
padding: 0 20rpx;
margin-top: 30rpx;
}
.Sure view{
.Sure view {
background: #257BF2;
border-radius: 80rpx;
line-height: 80rpx;
......@@ -12,51 +14,62 @@
color: #fff;
}
.paymentTitle{
.paymentTitle {
font-size: 28rpx;
}
.paymentTexts view{
.paymentTexts view {
padding: 5rpx 15rpx;
border: 1px solid #EDEDED;
color: #888888;
border-radius: 6rpx;
}
.paymentTexts view:last-child{
.paymentTexts view:last-child {
margin-left: 40rpx;
}
.paymentTexts view.active{
.paymentTexts view.active {
color: #fff;
background: #257BF2;
border: 1px solid #257BF2;
}
.paymentTitle .tisp{
.paymentTitle .tisp {
color: #666666;
}
.textareaBox textarea{
.textareaBox textarea {
height: 208rpx;
background: #FFFFFF;
border: 1rpx solid #EAEAEA;
border-radius: 10rpx;
}
.InforImgBox{
.InforImgBox {
flex-wrap: wrap;
}
.InforImg,.addUp{
.InforImg,
.addUp {
width: 208rpx;
height: 208rpx;
margin-bottom: 20rpx;
}
.InforImg{
.InforImg {
border-radius: 10rpx;
margin-right: 20rpx;
position: relative;
}
.InforImg image{
.InforImg image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
.InforImgDel{
.InforImgDel {
position: absolute;
left: 0;
top: -14rpx;
......@@ -64,74 +77,84 @@
background: #fff;
border-radius: 50%;
}
.inforCenter{
.inforCenter {
border-radius: 10rpx;
overflow: hidden;
border: 1px solid rgba(102,102,102,0.3);
border: 1px solid rgba(102, 102, 102, 0.3);
margin-bottom: 40rpx;
position: relative;
}
.inforCenter:last-child{
.inforCenter:last-child {
margin-bottom: 0;
}
.inforCenterTop{
.inforCenterTop {
background: #F3F3F3;
padding: 20rpx 29rpx;
font-size: 32rpx;
color: #333333;
}
.inputBox{
.inputBox {
padding: 20rpx 0;
margin: 0 29rpx;
border-bottom:1px solid #DDD ;
border-bottom: 1px solid #DDD;
font-size: 28rpx;
}
.inputBox.noBorder{
.inputBox.noBorder {
border: 0;
}
.tisp{
.tisp {
color: red;
}
.inputBoxRight{
.inputBoxRight {
position: relative;
}
.inputBoxRight u-number-box{
.inputBoxRight u-number-box {
position: absolute;
right: 0;
top: -7rpx;
}
/deep/.inputBoxRight u-number-box input{
/deep/.inputBoxRight u-number-box input {
width: 130rpx !important;
min-width: 130rpx !important;
}
.inforCenterTopDel{
.inforCenterTopDel {
position: absolute;
left: -7rpx;
top: -7rpx;
padding: 5rpx;
z-index: 1;
}
</style>
<template>
<view>
<view class="inforCenterBox PX30 MT20">
<view class="inforCenter" v-for="(item,index) in datas.ScenicStatisticsList[datas.scenicIndex].ReimburseList.ReimburseDetailsList"
<view class="inforCenter"
v-for="(item,index) in datas.ScenicStatisticsList[datas.scenicIndex].ReimburseList.ReimburseDetailsList"
:key="index">
<view class="inforCenterTop row justify-between" @click="showOptionVisible(index)">
<view>{{ item.UserTypeStr?item.UserTypeStr:'选择类型' }}</view>
<view>
<u-icon name="arrow-down" color="#BBBBBB" size="42"/>
<u-icon name="arrow-down" color="#BBBBBB" size="42" />
</view>
</view>
<u-icon v-if="index" @click="delInfor(index)" class="inforCenterTopDel" name="clear" color="#FA6967" size="36"/>
<u-icon v-if="index" @click="delInfor(index)" class="inforCenterTopDel" name="clear" color="#FA6967"
size="36" />
<view class="inputBox row justify-between">
<view class="row">
<text>数量</text>
</view>
<view class="inputBoxRight">
<u-number-box :min="0" :value="item.UserNum" @change="(e)=>getNum(e,index,'数量')"/>
<input class="text-right" type="number" v-model="item.UserNum" @input="getNum()" />
</view>
</view>
<view class="inputBox row justify-between">
......@@ -139,7 +162,7 @@
<text>单价</text>
</view>
<view class="inputBoxRight">
<u-number-box :min="0" :max="99999999999999999" v-model="item.UnitPrice" @change="(e)=>getNum(e,index,'金额')"/>
<input class="text-right" type="number" v-model="item.UnitPrice" @input="getNum()" />
</view>
</view>
<view class="inputBox row justify-between noBorder">
......@@ -156,147 +179,153 @@
<view class="paymentTitle PA30">支付方式</view>
<view class="PX30 PB20 paymentTexts row">
<template v-for="(item,index) in paymentList">
<view :class="[datas.ScenicStatisticsList[datas.scenicIndex].ReimburseList.SettlementType==item.id?'active':'']" @click="getSettlementType(item)">{{ item.name }}</view>
<view
:class="[datas.ScenicStatisticsList[datas.scenicIndex].ReimburseList.SettlementType==item.id?'active':'']"
@click="getSettlementType(item)">{{ item.name }}</view>
</template>
</view>
<view class="paymentTitle PA30">备注</view>
<view class="textareaBox PX30 row">
<textarea class="PA20 flex1" placeholder-style="color:#AAAAAA"
v-model="datas.ScenicStatisticsList[datas.scenicIndex].ReimburseList.Remarks" placeholder="请输入备注信息" @blur="updateData"/>
v-model="datas.ScenicStatisticsList[datas.scenicIndex].ReimburseList.Remarks" placeholder="请输入备注信息"
@blur="updateData" />
</view>
<view class="paymentTitle PA30">
<text>凭证</text>
<text class="tisp">(可上传多张图片)</text>
</view>
<view class="PX30 PB30 row InforImgBox">
<view class="InforImg" v-for="(item,index) in datas.ScenicStatisticsList[datas.scenicIndex].ReimburseList.VoucherPicList" >
<view class="InforImg"
v-for="(item,index) in datas.ScenicStatisticsList[datas.scenicIndex].ReimburseList.VoucherPicList">
<image :src="item.url" mode="aspectFill" @click="previewImage(item.url)"></image>
<u-icon @click="delImg(index)" class="InforImgDel" name="clear" color="#FA6967" size="36"/>
<u-icon @click="delImg(index)" class="InforImgDel" name="clear" color="#FA6967" size="36" />
</view>
<upload class="addUp" @onSuccess="onSuccess"></upload>
</view>
<singleChoice v-if="optionVisible"
:current="optionObj.id"
:list="optionList"
@close="close" @change="popupCurrent"></singleChoice>
<singleChoice v-if="optionVisible" :current="optionObj.id" :list="optionList" @close="close"
@change="popupCurrent"></singleChoice>
</view>
</template>
<script>
import upload from "../upload";
import singleChoice from "../singleChoice";
export default {
props:['data','optionList'],
import upload from "../upload";
import singleChoice from "../singleChoice";
export default {
props: ['data', 'dataIndex4', 'optionList'],
components: {
upload,
singleChoice,
},
data() {
return {
paymentList:[
{name:'现金支付',id:1},
{name:'公司结算',id:2},
paymentList: [{
name: '现金支付',
id: 1
},
{
name: '公司结算',
id: 2
},
],
optionVisible: false,
optionObj:{},
optionObj: {},
params: {},
datas: null,//展示数据
datas: null, //展示数据
dataIndex: 0,
ReimIndex: 0,
ReimDatas: {},
BusList:[], //车信息
HotelOrderListReport:[], //酒店信息,合团
DiningList:[], //餐厅
ScenicList:[], //景点
OtherList:[], //其他订单信息
TipList:[], //小费收入
TeamList:[], //团费小计
SelfPlayingIncomeList:[], //自费收入
SelfPlayingExpendList:[], //自费支出
LeaderShopList:[], //购物报账
ScenicList: [], //景点
}
},
watch: {
data:{
handler(newVal,oldVal){
this.params = JSON.parse(JSON.stringify(newVal))
this.ScenicList = this.params.ScenicList
this.dataIndex = this.params.dataIndex4
this.getRenderingData()
this.getTotal()
},
deep:true,
immediate:true
data: {
handler(newVal, oldVal) {
if (newVal && oldVal) {
//切换日期
if (newVal.dataIndex4 != oldVal.dataIndex4) {
this.initData();
}
//切换同一天的景点
else if (oldVal.ScenicList[this.dataIndex4].scenicIndex != newVal.ScenicList[this.dataIndex4]
.scenicIndex) {
this.initData();
}
}
},
datas:{
handler(newVal,oldVal){
this.updateData()
deep: true,
immediate: true
},
deep:true,
immediate:false
}
},
mounted() {
this.initData();
},
methods:{
getNum(e,index,type){
if(type=='数量') {
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList[index].UserNum = e.value
}else if(type=='金额'){
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList[index].UnitPrice = e.value
}
methods: {
initData() {
this.params = JSON.parse(JSON.stringify(this.data))
this.ScenicList = this.params.ScenicList
this.dataIndex = this.dataIndex4;
this.getRenderingData()
this.getTotal()
},
getTotal(){
getNum() {
this.getTotal()
},
getTotal() {
let total = 0
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList.forEach(x=>{
total+=x.UserNum*x.UnitPrice
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList.forEach(x => {
total += x.UserNum * x.UnitPrice
})
this.datas.TotalMoney = total
this.updateData()
},
delInfor(index){
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList.splice(index,1)
delInfor(index) {
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList.splice(index, 1)
},
delImg(index){
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.VoucherPicList.splice(index,1)
delImg(index) {
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.VoucherPicList.splice(index, 1)
},
getSettlementType(item){
getSettlementType(item) {
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.SettlementType = item.id
this.updateData()
this.$forceUpdate()
},
updateData(){
updateData() {
this.ScenicList[this.dataIndex] = JSON.parse(JSON.stringify(this.datas))
this.params.ScenicList = JSON.parse(JSON.stringify(this.ScenicList))
this.$emit('change',this.params)
this.$emit('change', this.params)
},
getRenderingData(){
getRenderingData() {
this.datas = this.ScenicList[this.dataIndex]
this.ReimDatas = JSON.parse(JSON.stringify(this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList[0]))
this.ReimDatas = JSON.parse(JSON.stringify(this.datas.ScenicStatisticsList[this.datas.scenicIndex]
.ReimburseList.ReimburseDetailsList[0]))
},
showOptionVisible(index){
showOptionVisible(index) {
this.optionVisible = true
this.ReimIndex = index
this.optionObj = {
name: this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex].UserTypeStr,
id: this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex].UserType,
name: this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList[
this.ReimIndex].UserTypeStr,
id: this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList[this
.ReimIndex].UserType,
}
},
close(){
close() {
this.optionVisible = false
},
popupCurrent(value){
popupCurrent(value) {
this.optionVisible = false
let findIndex = this.optionList.findIndex(x=>x.id==value)
let findIndex = this.optionList.findIndex(x => x.id == value)
this.optionObj = this.optionList[findIndex]
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex].UserTypeStr = this.optionObj.name
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex].UserType = this.optionObj.id
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex]
.UserTypeStr = this.optionObj.name
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList[this.ReimIndex]
.UserType = this.optionObj.id
},
previewImage(src) {
uni.previewImage({
urls: this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.VoucherPicList.map(x=> {return x.url}),
urls: this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.VoucherPicList.map(
x => {
return x.url
}),
current: src,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
......@@ -309,7 +338,7 @@ export default {
},
});
},
addData(){
addData() {
this.ReimDatas = {
...this.ReimDatas,
ID: 0,
......@@ -318,14 +347,15 @@ export default {
UserNum: 0,
UnitPrice: 0,
}
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList.push(JSON.parse(JSON.stringify(this.ReimDatas)))
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.ReimburseDetailsList.push(JSON.parse(
JSON.stringify(this.ReimDatas)))
},
onSuccess(infor){
onSuccess(infor) {
this.datas.ScenicStatisticsList[this.datas.scenicIndex].ReimburseList.VoucherPicList.push({
FileName: infor.name,
url: infor.url,
})
}
}
}
}
</script>
\ No newline at end of file
......@@ -89,34 +89,38 @@
</headeDatas>
</view>
<!-- 车信息-->
<productInfor1 v-if="params.type==1" :data="params" :dataIndex1="params.dataIndex1" @change="getNewData" :optionList="busTypeList">
<productInfor1 v-if="params.type==1" :data="params" :dataIndex1="params.dataIndex1" @change="getNewData"
:optionList="busTypeList">
</productInfor1>
<!-- 酒店信息-->
<productInfor2 :data="params" v-if="params.type==2" @change="getNewData" :optionList="hotelTypeList">
<productInfor2 v-else-if="params.type==2" :data="params" :dataIndex2="params.dataIndex2"
@change="getNewData" :optionList="hotelTypeList">
</productInfor2>
<!-- 餐食信息-->
<productInfor3 :data="params" v-else-if="params.type==3" @change="getNewData" :optionList="diningTypeList">
<productInfor3 v-else-if="params.type==3" :data="params" :dataIndex3="params.dataIndex3"
@change="getNewData" :optionList="diningTypeList">
</productInfor3>
<!-- 门票信息-->
<productInfor4 :data="params" v-else-if="params.type==4" @change="getNewData" :optionList="scenicTypeList">
<productInfor4 v-else-if="params.type==4" :data="params" :dataIndex4="params.dataIndex4"
@change="getNewData" :optionList="scenicTypeList">
</productInfor4>
<!-- 其它信息-->
<otherInfor1 :currencyList="currencyList" :data="params" v-else-if="params.type==5" @change="getNewData"
<otherInfor1 v-else-if="params.type==5" :currencyList="currencyList" :data="params" @change="getNewData"
:options="otherTypeList"></otherInfor1>
<!-- 小费收入-->
<otherInfor2 :currencyList="currencyList" :data="params" v-else-if="params.type==6" @change="getNewData">
<otherInfor2 v-else-if="params.type==6" :currencyList="currencyList" :data="params" @change="getNewData">
</otherInfor2>
<!-- 团费小计-->
<otherInfor3 :currencyList="currencyList" :data="params" v-else-if="params.type==7" @change="getNewData">
<otherInfor3 v-else-if="params.type==7" :currencyList="currencyList" :data="params" @change="getNewData">
</otherInfor3>
<!-- 自费收入-->
<otherInfor4 :currencyList="currencyList" :data="params" v-else-if="params.type==8" @change="getNewData">
<otherInfor4 v-else-if="params.type==8" :currencyList="currencyList" :data="params" @change="getNewData">
</otherInfor4>
<!-- 自费支出-->
<otherInfor5 :currencyList="currencyList" :data="params" v-else-if="params.type==9" @change="getNewData">
<otherInfor5 v-else-if="params.type==9" :currencyList="currencyList" :data="params" @change="getNewData">
</otherInfor5>
<!-- 购物报账-->
<otherInfor6 :currencyList="currencyList" :data="params" v-else-if="params.type==10" @change="getNewData"
<otherInfor6 v-else-if="params.type==10" :currencyList="currencyList" :data="params" @change="getNewData"
:options="shopTypeList"></otherInfor6>
</scroll-view>
<view v-if="params.IsOperation==0" class="saveBox" @click="saveData">
......@@ -534,9 +538,11 @@
}
if (this.loading) return
this.loading = true
uni.showLoading()
uni.showLoading({
title: '保存中...'
})
this.apipost("dmcstatistics_post_SetNewLeaderApplyList_V2", this.params, (res) => {
console.log("dmcstatistics_post_SetNewLeaderApplyList_V2",JSON.parse(JSON.stringify(res.data)));
uni.hideLoading()
if (res.resultCode == 1) {
this.loading = false
uni.showToast({
......@@ -544,10 +550,8 @@
icon: 'success',
duration: 2000
});
uni.hideLoading()
this.init()
}
}, (failed) => {
this.loading = false
uni.showToast({
......@@ -567,31 +571,113 @@
this.scrollLeft = item.left
},
init() {
uni.showLoading()
uni.showLoading({
title: '数据加载中...'
});
this.apipost("dmcstatistics_post_GetNewLeaderPayMoneyStatics", this.msg, (res) => {
console.log("dmcstatistics_post_GetNewLeaderPayMoneyStatics",JSON.parse(JSON.stringify(res.data)));
if (res.resultCode == 1) {
this.params = res.data;
console.log("dmcstatistics_post_GetNewLeaderPayMoneyStatics", JSON.parse(JSON.stringify(
this.params)));
for (let i = 1; i < 5; i++) {
this.$set(this.params, `dataIndex${i}`, 0);
}
this.$set(this.params, `type`, this.oldDataIndex);
for (let i = 0; i < this.params.ScenicList.length; i++) {
this.$set(this.params.ScenicList[i], `TotalMoney`, 0);
this.$set(this.params.ScenicList[i], `scenicIndex`, 0);
if (this.params.BusList && this.params.BusList.length > 0) {
for (let i = 0; i < this.params.BusList.length; i++) {
this.$set(this.params.BusList, `TotalMoney`, 0);
}
this.params.BusList.forEach(item => {
var totalMoney = 0;
if (item.ReimburseList && item.ReimburseList.ReimburseDetailsList && item
.ReimburseList.ReimburseDetailsList.length > 0) {
item.ReimburseList.ReimburseDetailsList.forEach(subItem => {
totalMoney += subItem.UserNum * subItem.UnitPrice
})
}
for (let i = 0; i < this.params.DiningList.length; i++) {
this.$set(this.params.DiningList[i], `TotalMoney`, 0);
this.$set(this.params.DiningList[i], `diningIndex`, 0);
item.TotalMoney = totalMoney;
})
}
if (this.params && this.params.HotelOrderListReport && this.params.HotelOrderListReport
.length > 0) {
for (let i = 0; i < this.params.HotelOrderListReport.length; i++) {
this.$set(this.params.HotelOrderListReport[i], `TotalMoney`, 0);
this.$set(this.params.HotelOrderListReport[i], `hotelIndex`, 0);
}
this.params.HotelOrderListReport.forEach(item => {
if (item.HotelOrderList && item.HotelOrderList.length > 0) {
item.HotelOrderList.forEach(subItem => {
var totalMoney = 0;
if (subItem.ReimburseList.ReimburseDetailsList && subItem
.ReimburseList.ReimburseDetailsList.length > 0) {
subItem.ReimburseList.ReimburseDetailsList.forEach(
childItem => {
totalMoney += childItem.UserNum * childItem
.UnitPrice
})
}
subItem.TotalMoney = totalMoney;
});
}
});
console.log("this.params.HotelOrderListReport",this.params.HotelOrderListReport)
}
if (this.params && this.params.DiningList && this.params.DiningList.length > 0) {
for (let i = 0; i < this.params.DiningList.length; i++) {
this.$set(this.params.DiningList[i], `TotalMoney`, 0);
this.$set(this.params.DiningList[i], `diningIndex`, 0);
}
this.params.DiningList.forEach(item => {
if (item.DiningSummaryList && item.DiningSummaryList.length > 0) {
item.DiningSummaryList.forEach(subItem => {
var totalMoney = 0;
if (subItem.ReimburseList && subItem.ReimburseList
.ReimburseDetailsList && subItem.ReimburseList
.ReimburseDetailsList.length > 0) {
subItem.ReimburseList.ReimburseDetailsList.forEach(
childItem => {
totalMoney += childItem.UserNum * childItem
.UnitPrice
})
}
subItem.TotalMoney = totalMoney;
})
}
})
}
if (this.params && this.params.ScenicList && this.params.ScenicList.length > 0) {
for (let i = 0; i < this.params.ScenicList.length; i++) {
this.$set(this.params.ScenicList[i], `TotalMoney`, 0);
this.$set(this.params.ScenicList[i], `scenicIndex`, 0);
}
this.params.ScenicList.forEach(item => {
if (item.ScenicStatisticsList && item.ScenicStatisticsList.length > 0) {
item.ScenicStatisticsList.forEach(subItem => {
var totalMoney = 0;
if (subItem.ReimburseList && subItem.ReimburseList
.ReimburseDetailsList && subItem.ReimburseList
.ReimburseDetailsList.length > 0) {
subItem.ReimburseList.ReimburseDetailsList.forEach(
childItem => {
totalMoney += childItem.UserNum * childItem
.UnitPrice
})
}
subItem.TotalMoney = totalMoney;
})
}
});
}
if (res.data.CountryIds) {
this.getShoppingType(res.data.CountryIds)
}
for (let i = 0; i < this.params.OtherOrderInfo.OtherList.length; i++) {
let obj = this.params.OtherOrderInfo.OtherList[i]
if (obj.UseDate == null && obj.UnitPrice == 0 && obj.Rebate == 0 && obj.VoucherPic !=
......
......@@ -239,13 +239,11 @@ function goZanYangUrl() {
//验证只能输入2位小数【负数:isMinus传true】
function checkPrice(value, isMinus) {
console.log("checkPrice1", value);
var newValue = '';
if (value) {
newValue = value + '';
}
var t = newValue.length > 0 ? newValue[0] : '';
console.log("checkPrice2", newValue);
newValue = newValue.replace(/[^\d.]/g, ''); //清除“数字”和“.”以外的字符
newValue = newValue.replace(/\.{2,}/g, '.'); //只保留第一个. 清除多余的
newValue = newValue
......@@ -263,12 +261,10 @@ function checkPrice(value, isMinus) {
//验证只能输入整数【负数:isMinus传true】
function checkInteger(value, isMinus) {
console.log("checkInteger1", value)
var newValue = '';
if (value) {
newValue = value + '';
}
console.log("checkInteger2", newValue)
var t = newValue.length > 0 ? newValue[0] : '';
newValue = newValue.replace(/[^\d]/g, '');
//是否允许负数
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment