Commit e73b5eb3 authored by 黄奎's avatar 黄奎

1

parent 9c21c180
<style lang="scss" scoped> <style lang="scss" scoped>
@import url("@/asset/css/flex.css"); @import url("@/asset/css/flex.css");
.Sure{
padding: 0 20rpx; .Sure {
margin-top: 30rpx; padding: 0 20rpx;
} margin-top: 30rpx;
.Sure view{ }
background: #257BF2;
border-radius: 80rpx; .Sure view {
line-height: 80rpx; background: #257BF2;
font-size: 32rpx; border-radius: 80rpx;
color: #fff; line-height: 80rpx;
} font-size: 32rpx;
color: #fff;
.paymentTitle{ }
font-size: 28rpx;
} .paymentTitle {
.paymentTexts view{ font-size: 28rpx;
padding: 5rpx 15rpx; }
border: 1px solid #EDEDED;
color: #888888; .paymentTexts view {
border-radius: 6rpx; padding: 5rpx 15rpx;
} border: 1px solid #EDEDED;
.paymentTexts view:last-child{ color: #888888;
margin-left: 40rpx; border-radius: 6rpx;
} }
.paymentTexts view.active{
color: #fff; .paymentTexts view:last-child {
background: #257BF2; margin-left: 40rpx;
border: 1px solid #257BF2; }
}
.paymentTitle .tisp{ .paymentTexts view.active {
color: #666666; color: #fff;
} background: #257BF2;
.textareaBox textarea{ border: 1px solid #257BF2;
height: 208rpx; }
background: #FFFFFF;
border: 1rpx solid #EAEAEA; .paymentTitle .tisp {
border-radius: 10rpx; color: #666666;
} }
.InforImgBox{
flex-wrap: wrap; .textareaBox textarea {
} height: 208rpx;
.InforImg,.addUp{ background: #FFFFFF;
width: 208rpx; border: 1rpx solid #EAEAEA;
height: 208rpx; border-radius: 10rpx;
margin-bottom: 20rpx; }
}
.InforImg{ .InforImgBox {
border-radius: 10rpx; flex-wrap: wrap;
margin-right: 20rpx; }
position: relative;
} .InforImg,
.InforImg image{ .addUp {
width: 100%; width: 208rpx;
height: 100%; height: 208rpx;
border-radius: 10rpx; margin-bottom: 20rpx;
} }
.InforImgDel{
position: absolute; .InforImg {
left: 0; border-radius: 10rpx;
top: -14rpx; margin-right: 20rpx;
z-index: 1; position: relative;
background: #fff; }
border-radius: 50%;
} .InforImg image {
.inforCenter{ width: 100%;
border-radius: 10rpx; height: 100%;
overflow: hidden; border-radius: 10rpx;
border: 1px solid rgba(102,102,102,0.3); }
margin-bottom: 40rpx;
position: relative; .InforImgDel {
} position: absolute;
.inforCenter:last-child{ left: 0;
margin-bottom: 0; top: -14rpx;
} z-index: 1;
.inforCenterTop{ background: #fff;
background: #F3F3F3; border-radius: 50%;
padding: 20rpx 29rpx; }
font-size: 32rpx;
color: #333333; .inforCenter {
} border-radius: 10rpx;
.inputBox{ overflow: hidden;
padding: 20rpx 0; border: 1px solid rgba(102, 102, 102, 0.3);
margin: 0 29rpx; margin-bottom: 40rpx;
border-bottom:1px solid #DDD ; position: relative;
font-size: 28rpx; }
}
.inputBox.noBorder{ .inforCenter:last-child {
border: 0; margin-bottom: 0;
} }
.tisp{
color: red; .inforCenterTop {
} background: #F3F3F3;
.inputBoxRight{ padding: 20rpx 29rpx;
position: relative; font-size: 32rpx;
} color: #333333;
.inputBoxRight u-number-box{ }
position: absolute;
right: 0; .inputBox {
top: -7rpx; padding: 20rpx 0;
} margin: 0 29rpx;
/deep/.inputBoxRight u-number-box input{ border-bottom: 1px solid #DDD;
width: 130rpx !important; font-size: 28rpx;
min-width: 130rpx !important; }
}
.inforCenterTopDel{ .inputBox.noBorder {
position: absolute; border: 0;
left: -7rpx; }
top: -7rpx;
padding: 5rpx; .tisp {
z-index: 1; color: red;
} }
.inputBoxRight {
</style> position: relative;
}
.inputBoxRight u-number-box {
position: absolute;
right: 0;
top: -7rpx;
}
/deep/.inputBoxRight u-number-box input {
width: 130rpx !important;
min-width: 130rpx !important;
}
.inforCenterTopDel {
position: absolute;
left: -7rpx;
top: -7rpx;
padding: 5rpx;
z-index: 1;
}
</style>
<template> <template>
<view> <view>
<view v-if="datas&&datas.ReimburseList&&datas.ReimburseList.ReimburseDetailsList.length>0" class="inforCenterBox PX30 MT20"> <view v-if="datas&&datas.ReimburseList&&datas.ReimburseList.ReimburseDetailsList.length>0"
<view class="inforCenter" v-for="(item,index) in datas.ReimburseList.ReimburseDetailsList" class="inforCenterBox PX30 MT20">
:key="index"> <view class="inforCenter" v-for="(item,index) in datas.ReimburseList.ReimburseDetailsList" :key="index">
<view class="inforCenterTop row justify-between" @click="showOptionVisible(index)"> <view class="inforCenterTop row justify-between" @click="showOptionVisible(index)">
<view>{{ item.UserTypeStr?item.UserTypeStr:'选择类型' }}</view> <view>{{ item.UserTypeStr?item.UserTypeStr:'选择类型' }}</view>
<view> <view>
<u-icon name="arrow-down" color="#BBBBBB" size="42"/> <u-icon name="arrow-down" color="#BBBBBB" size="42" />
</view> </view>
</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"
<view class="inputBox row justify-between"> size="36" />
<view class="row"> <view class="inputBox row justify-between">
<text class="tisp MR10">*</text><text>出发地</text> <view class="row">
</view> <text class="tisp MR10">*</text><text>出发地</text>
<view><input class="text-right" type="text" v-model="item.StartPlace" placeholder="请输入出发地"/></view> </view>
</view> <view><input class="text-right" type="text" v-model="item.StartPlace" placeholder="请输入出发地" /></view>
<view class="inputBox row justify-between"> </view>
<view class="row"> <view class="inputBox row justify-between">
<text class="tisp MR10">*</text><text>目的地</text> <view class="row">
</view> <text class="tisp MR10">*</text><text>目的地</text>
<view><input class="text-right" type="text" v-model="item.EndPlace" placeholder="请输入目的地"/></view> </view>
</view> <view><input class="text-right" type="text" v-model="item.EndPlace" placeholder="请输入目的地" /></view>
<view class="inputBox row justify-between"> </view>
<view class="row"> <view class="inputBox row justify-between">
<text>数量</text> <view class="row">
</view> <text>数量</text>
<view class="inputBoxRight"> </view>
<u-number-box :min="0" :value="item.UserNum" @change="(e)=>getNum(e,index,'数量')"/> <view class="inputBoxRight">
</view> <input class="text-right" type="text" v-model="item.UserNum"
</view> @input="checkInteger(item,'UserNum')" @change="getNum()" />
<view class="inputBox row justify-between"> </view>
<view class="row"> </view>
<text>金额</text> <view class="inputBox row justify-between">
</view> <view class="row">
<view class="inputBoxRight"> <text>金额</text>
<u-number-box :min="0" :max="99999999999999999" v-model="item.UnitPrice" @change="(e)=>getNum(e,index,'金额')"/> </view>
</view> <view class="inputBoxRight">
</view> <input class="text-right" type="text" v-model="item.UnitPrice"
<view class="inputBox row justify-between noBorder"> @input="changePrice($event,item,index,true)" />
<view class="row"> </view>
<text>金额小计</text> </view>
</view> <view class="inputBox row justify-between noBorder">
<view class="text-right">{{ (item.UserNum*item.UnitPrice).toFixed(2) }}</view> <view class="row">
</view> <text>金额小计</text>
</view> </view>
</view> <view class="text-right">{{ (item.UserNum*item.UnitPrice).toFixed(2) }}</view>
<view class="Sure"> </view>
<view class="text-center" @click="addData">添加</view> </view>
</view> </view>
<view class="paymentTitle PA30">支付方式</view> <view class="Sure">
<view class="PX30 PB20 paymentTexts row"> <view class="text-center" @click="addData">添加</view>
<template v-for="(item,index) in paymentList"> </view>
<view :class="[datas.ReimburseList.SettlementType==item.id?'active':'']" @click="getSettlementType(item)">{{ item.name }}</view> <view class="paymentTitle PA30">支付方式</view>
</template> <view class="PX30 PB20 paymentTexts row">
</view> <template v-for="(item,index) in paymentList">
<view class="paymentTitle PA30">备注</view> <view :class="[datas.ReimburseList.SettlementType==item.id?'active':'']"
<view class="textareaBox PX30 row"> @click="getSettlementType(item)">{{ item.name }}</view>
<textarea class="PA20 flex1" placeholder-style="color:#AAAAAA" </template>
v-model="datas.ReimburseList.Remarks" placeholder="请输入备注信息" @blur="updateData"/> </view>
</view> <view class="paymentTitle PA30">备注</view>
<view class="paymentTitle PA30"> <view class="textareaBox PX30 row">
<text>凭证</text> <textarea class="PA20 flex1" placeholder-style="color:#AAAAAA" v-model="datas.ReimburseList.Remarks"
<text class="tisp">(可上传多张图片)</text> placeholder="请输入备注信息" @blur="updateData" />
</view> </view>
<view class="PX30 PB30 row InforImgBox"> <view class="paymentTitle PA30">
<view class="InforImg" v-for="(item,index) in datas.ReimburseList.VoucherPicList" <text>凭证</text>
@click="previewImage(item.url)"> <text class="tisp">(可上传多张图片)</text>
<image :src="item.url" mode="aspectFill"></image> </view>
<u-icon @click="delImg(index)" class="InforImgDel" name="clear" color="#FA6967" size="36"/> <view class="PX30 PB30 row InforImgBox">
</view> <view class="InforImg" v-for="(item,index) in datas.ReimburseList.VoucherPicList">
<upload class="addUp" @onSuccess="onSuccess"></upload> <image :src="item.url" mode="aspectFill" @click="previewImage(item.url)"></image>
</view> <u-icon @click="delImg(index)" class="InforImgDel" name="clear" color="#FA6967" size="36" />
<singleChoice v-if="optionVisible" </view>
:current="optionObj.id" <upload class="addUp" @onSuccess="onSuccess"></upload>
:list="optionList" </view>
@close="close" @change="popupCurrent"></singleChoice> <singleChoice v-if="optionVisible" :current="optionObj.id" :list="optionList" @close="close"
</view> @change="popupCurrent"></singleChoice>
</view>
</template> </template>
<script> <script>
import upload from "../upload"; import upload from "../upload";
import singleChoice from "../singleChoice"; import singleChoice from "../singleChoice";
export default { export default {
props:['data','optionList'], props: ['data', 'optionList'],
components: { components: {
upload, upload,
singleChoice, singleChoice,
}, },
data() { data() {
return { return {
paymentList:[ paymentList: [{
{name:'现金支付',id:1}, name: '现金支付',
{name:'公司结算',id:2}, id: 1
], },
optionVisible: false, {
optionObj:{}, name: '公司结算',
params: {}, id: 2
datas: null,//展示数据 },
dataIndex: 0, ],
ReimIndex: 0, optionVisible: false,
ReimDatas: {}, optionObj: {},
BusList:[], //车信息 params: {},
HotelOrderListReport:[], //酒店信息,合团 datas: null, //展示数据
DiningList:[], //餐厅 dataIndex: 0,
ScenicList:[], //景点 ReimIndex: 0,
OtherList:[], //其他订单信息 ReimDatas: {},
TipList:[], //小费收入 BusList: [], //车信息
TeamList:[], //团费小计 HotelOrderListReport: [], //酒店信息,合团
SelfPlayingIncomeList:[], //自费收入 DiningList: [], //餐厅
SelfPlayingExpendList:[], //自费支出 ScenicList: [], //景点
LeaderShopList:[], //购物报账 OtherList: [], //其他订单信息
} TipList: [], //小费收入
}, TeamList: [], //团费小计
watch: { SelfPlayingIncomeList: [], //自费收入
data:{ SelfPlayingExpendList: [], //自费支出
handler(newVal,oldVal){ LeaderShopList: [], //购物报账
this.params = JSON.parse(JSON.stringify(newVal)) }
this.BusList = this.params.BusList //车信息 },
watch: {
data: {
handler(newVal, oldVal) {
var newJson = JSON.parse(JSON.stringify(newVal));
console.log("newJson", newJson);
this.params = newJson;
this.BusList = this.params.BusList //车信息
this.dataIndex = this.params.dataIndex1;
this.getRenderingData()
this.getTotal()
},
deep: true,
immediate: false
},
datas: {
handler(newVal, oldVal) {
//this.updateData()
this.getRenderingData();
},
deep: true,
immediate: false
}
},
mounted() {
},
methods: {
changePrice(e, item, index, isMinus) {
var value = e.detail.value;
var t = value.charAt(0);
value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
value = value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
value = value
.replace(".", "$#$")
.replace(/\./g, "")
.replace("$#$", ".");
value = value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
//如果第一位是负号,则允许添加 如果不允许添加负号 可以把这块注释掉
//是否允许负数
if (isMinus && t == '-') {
value = '-' + value;
}
if (value === '' || value === '.') {
value = 0;
}
item.UnitPrice = value;
this.$set(this.datas.ReimburseList.ReimburseDetailsList, index, item);
this.getNum();
},
getNum() {
this.getTotal();
},
getTotal() {
let total = 0;
console.log("getTotal", JSON.parse(JSON.stringify(this.datas.ReimburseList.ReimburseDetailsList)))
this.datas.ReimburseList.ReimburseDetailsList.forEach(x => {
total += x.UserNum * x.UnitPrice
})
this.datas.TotalMoney = total
this.updateData()
},
delInfor(index) {
this.datas.ReimburseList.ReimburseDetailsList.splice(index, 1)
},
delImg(index) {
this.datas.ReimburseList.VoucherPicList.splice(index, 1);
},
getSettlementType(item) {
this.datas.ReimburseList.SettlementType = item.id
this.updateData()
this.$forceUpdate()
},
updateData() {
this.BusList[this.dataIndex] = JSON.parse(JSON.stringify(this.datas))
this.params.BusList = JSON.parse(JSON.stringify(this.BusList))
this.$emit('change', this.params)
},
getRenderingData() {
this.datas = this.BusList[this.dataIndex]
console.log("this.datas", this.datas);
if (this.datas.VoucherPicList == null) this.datas.VoucherPicList = []
this.ReimDatas = JSON.parse(JSON.stringify(this.datas.ReimburseList.ReimburseDetailsList[0]))
},
showOptionVisible(index) {
this.optionVisible = true
this.ReimIndex = index
this.optionObj = {
name: this.datas.ReimburseList.ReimburseDetailsList[this.ReimIndex].UserTypeStr,
id: this.datas.ReimburseList.ReimburseDetailsList[this.ReimIndex].UserType,
}
},
close() {
this.optionVisible = false
},
popupCurrent(value) {
this.optionVisible = false
let findIndex = this.optionList.findIndex(x => x.id == value)
this.optionObj = this.optionList[findIndex]
this.datas.ReimburseList.ReimburseDetailsList[this.ReimIndex].UserTypeStr = this.optionObj.name
this.datas.ReimburseList.ReimburseDetailsList[this.ReimIndex].UserType = this.optionObj.id
},
previewImage(src) {
uni.previewImage({
urls: this.datas.ReimburseList.VoucherPicList.map(x => {
return x.url
}),
current: src,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
success: function(data) {
},
fail: function(err) {
},
},
});
},
addData() {
this.ReimDatas = {
...this.ReimDatas,
ID: 0,
StartPlace: '',
EndPlace: '',
UserType: 0,
UserTypeStr: '',
UserNum: 0,
UnitPrice: 0,
}
this.datas.ReimburseList.ReimburseDetailsList.push(JSON.parse(JSON.stringify(this.ReimDatas)))
this.dataIndex = this.params.dataIndex1 },
this.getRenderingData() onSuccess(infor) {
this.getTotal() this.datas.ReimburseList.VoucherPicList.push({
}, FileName: infor.name,
deep:true, url: infor.url,
immediate:false })
}, }
datas:{ }
handler(newVal,oldVal){ }
this.updateData()
},
deep:true,
immediate:false
}
},
mounted() {
},
methods:{
getNum(e,index,type){
if(type=='数量') {
this.datas.ReimburseList.ReimburseDetailsList[index].UserNum = e.value
}else if(type=='金额'){
this.datas.ReimburseList.ReimburseDetailsList[index].UnitPrice = e.value
}
this.getTotal()
},
getTotal(){
let total = 0
this.datas.ReimburseList.ReimburseDetailsList.forEach(x=>{
total+=x.UserNum*x.UnitPrice
})
this.datas.TotalMoney = total
this.updateData()
},
delInfor(index){
this.datas.ReimburseList.ReimburseDetailsList.splice(index,1)
},
delImg(index){
this.datas.VoucherPicList.splice(index,1)
},
getSettlementType(item){
this.datas.ReimburseList.SettlementType = item.id
this.updateData()
this.$forceUpdate()
},
updateData(){
this.BusList[this.dataIndex] = JSON.parse(JSON.stringify(this.datas))
this.params.BusList = JSON.parse(JSON.stringify(this.BusList))
this.$emit('change',this.params)
},
getRenderingData(){
this.datas = this.BusList[this.dataIndex]
if(this.datas.VoucherPicList==null) this.datas.VoucherPicList = []
this.ReimDatas = JSON.parse(JSON.stringify(this.datas.ReimburseList.ReimburseDetailsList[0]))
},
showOptionVisible(index){
this.optionVisible = true
this.ReimIndex = index
this.optionObj = {
name: this.datas.ReimburseList.ReimburseDetailsList[this.ReimIndex].UserTypeStr,
id: this.datas.ReimburseList.ReimburseDetailsList[this.ReimIndex].UserType,
}
},
close(){
this.optionVisible = false
},
popupCurrent(value){
this.optionVisible = false
let findIndex = this.optionList.findIndex(x=>x.id==value)
this.optionObj = this.optionList[findIndex]
this.datas.ReimburseList.ReimburseDetailsList[this.ReimIndex].UserTypeStr = this.optionObj.name
this.datas.ReimburseList.ReimburseDetailsList[this.ReimIndex].UserType = this.optionObj.id
},
previewImage(src) {
uni.previewImage({
urls: this.datas.ReimburseList.VoucherPicList.map(x=> {return x.url}),
current: src,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
success: function(data) {
},
fail: function(err) {
},
},
});
},
addData(){
this.ReimDatas = {
...this.ReimDatas,
ID: 0,
StartPlace: '',
EndPlace: '',
UserType: 0,
UserTypeStr: '',
UserNum: 0,
UnitPrice: 0,
}
this.datas.ReimburseList.ReimburseDetailsList.push(JSON.parse(JSON.stringify(this.ReimDatas)))
},
onSuccess(infor){
this.datas.ReimburseList.VoucherPicList.push({
FileName: infor.name,
url: infor.url,
})
}
}
}
</script> </script>
\ No newline at end of file
...@@ -324,8 +324,6 @@ ...@@ -324,8 +324,6 @@
width, width,
height height
} = res[0]; } = res[0];
// console.log(`元素 ${index} 的横向位置(left):`, left); // 单位:px
// console.log(`元素 ${index} 的宽度:`, width);
x.left = width * (index) x.left = width * (index)
} else { } else {
console.log(`未找到元素 refs_${index + 1}`); console.log(`未找到元素 refs_${index + 1}`);
...@@ -335,6 +333,7 @@ ...@@ -335,6 +333,7 @@
}); });
}, },
methods: { methods: {
//车验证
VerificationBusList() { VerificationBusList() {
let msg = '' let msg = ''
for (let i = 0; i < this.params.BusList.length; i++) { for (let i = 0; i < this.params.BusList.length; i++) {
...@@ -347,16 +346,8 @@ ...@@ -347,16 +346,8 @@
obj.ReimburseList.VoucherPicList.length > 0 || child.StartPlace != '' || obj.ReimburseList.VoucherPicList.length > 0 || child.StartPlace != '' ||
child.EndPlace != '' || child.UserNum > 0 || child.UnitPrice > 0 || child.UserType) child.EndPlace != '' || child.UserNum > 0 || child.UnitPrice > 0 || child.UserType)
) { ) {
msg = `请选择车辆币种` //日期:${obj.PlanDateStr} msg = `请选择车辆币种`
} }
// if(msg==''&&child.UserType==0&&
// (obj.ReimburseList.SettlementType>0||obj.ReimburseList.Remarks!=''||
// obj.ReimburseList.VoucherPicList.length>0||child.StartPlace!=''||
// child.EndPlace!=''||obj.ReimburseList.CurrencyId||child.UserNum>0||child.UnitPrice>0)
// ){
// msg = `请输入车辆类型`
// }
if (msg == '' && child.StartPlace == '' && if (msg == '' && child.StartPlace == '' &&
(obj.ReimburseList.SettlementType > 0 || obj.ReimburseList.Remarks != '' || (obj.ReimburseList.SettlementType > 0 || obj.ReimburseList.Remarks != '' ||
obj.ReimburseList.VoucherPicList.length > 0 || obj.ReimburseList.CurrencyId || obj.ReimburseList.VoucherPicList.length > 0 || obj.ReimburseList.CurrencyId ||
...@@ -375,6 +366,7 @@ ...@@ -375,6 +366,7 @@
} }
return msg return msg
}, },
//酒店验证
VerificationHotel() { VerificationHotel() {
let msg = '' let msg = ''
for (let i = 0; i < this.params.HotelOrderListReport.length; i++) { for (let i = 0; i < this.params.HotelOrderListReport.length; i++) {
...@@ -391,18 +383,12 @@ ...@@ -391,18 +383,12 @@
) { ) {
msg = `请选择酒店币种` msg = `请选择酒店币种`
} }
// if(msg==''&&grandson.UserType==0&&
// (child.ReimburseList.SettlementType>0||child.ReimburseList.Remarks!=''||
// child.ReimburseList.VoucherPicList.length>0||grandson.UserNum>0||
// grandson.UnitPrice>0||child.ReimburseList.CurrencyId)
// ){
// msg = `请选择酒店类型`
// }
} }
} }
} }
return msg return msg
}, },
//餐验证
VerificationDining() { VerificationDining() {
let msg = '' let msg = ''
for (let i = 0; i < this.params.DiningList.length; i++) { for (let i = 0; i < this.params.DiningList.length; i++) {
...@@ -419,18 +405,12 @@ ...@@ -419,18 +405,12 @@
) { ) {
msg = `请选择餐币种` msg = `请选择餐币种`
} }
// if(msg==''&&grandson.UserType==0&&
// (child.ReimburseList.SettlementType>0||child.ReimburseList.Remarks!=''||
// child.ReimburseList.VoucherPicList.length>0||grandson.UserNum>0||
// grandson.UnitPrice>0||child.ReimburseList.CurrencyId)
// ){
// msg = `请选择餐类型`
// }
} }
} }
} }
return msg return msg
}, },
//景点验证
VerificationScenic() { VerificationScenic() {
let msg = '' let msg = ''
for (let i = 0; i < this.params.ScenicList.length; i++) { for (let i = 0; i < this.params.ScenicList.length; i++) {
...@@ -447,13 +427,6 @@ ...@@ -447,13 +427,6 @@
) { ) {
msg = `请选择门票币种` msg = `请选择门票币种`
} }
// if(msg==''&&grandson.UserType==0&&
// (child.ReimburseList.SettlementType>0||child.ReimburseList.Remarks!=''||
// child.ReimburseList.VoucherPicList.length>0||grandson.UserNum>0||
// grandson.UnitPrice>0||child.ReimburseList.CurrencyId)
// ){
// msg = `请选择门票类型`
// }
} }
} }
} }
...@@ -463,10 +436,10 @@ ...@@ -463,10 +436,10 @@
let msg = '' let msg = ''
for (let i = 0; i < this.params.OtherOrderInfo.OtherList.length; i++) { for (let i = 0; i < this.params.OtherOrderInfo.OtherList.length; i++) {
let obj = this.params.OtherOrderInfo.OtherList[i] let obj = this.params.OtherOrderInfo.OtherList[i]
console.log("obj", obj)
if (msg == '' && obj.UseDate == null && if (msg == '' && obj.UseDate == null &&
(obj.UnitPrice > 0 || obj.Rebate > 0 || obj.VoucherPicList.length > 0 || (obj.UnitPrice > 0 || obj.Rebate > 0 || obj.VoucherPicList.length > 0 ||
obj.Remark != '' || obj.Currency!=0) obj.Remark != '' || obj.Currency != 0)
) { ) {
msg = `请选择其他费用使用时间` msg = `请选择其他费用使用时间`
} }
...@@ -478,7 +451,7 @@ ...@@ -478,7 +451,7 @@
} }
if (msg == '' && (obj.Currency == 0 || obj.Currency == null) && if (msg == '' && (obj.Currency == 0 || obj.Currency == null) &&
(obj.UnitPrice > 0 || obj.Rebate > 0 || obj.VoucherPicList.length > 0 || (obj.UnitPrice > 0 || obj.Rebate > 0 || obj.VoucherPicList.length > 0 ||
obj.Remark != '' || obj.UseDate != null) obj.Remark != '' || obj.UseDate != null)
) { ) {
msg = `请选择其他费用币种` msg = `请选择其他费用币种`
} }
...@@ -559,12 +532,11 @@ ...@@ -559,12 +532,11 @@
icon: "none", icon: "none",
}) })
} }
// console.log(this.params,'-----')
// return
if (this.loading) return if (this.loading) return
this.loading = true this.loading = true
uni.showLoading() uni.showLoading()
this.apipost("dmcstatistics_post_SetNewLeaderApplyList_V2", this.params, (res) => { this.apipost("dmcstatistics_post_SetNewLeaderApplyList_V2", this.params, (res) => {
console.log("dmcstatistics_post_SetNewLeaderApplyList_V2",JSON.parse(JSON.stringify(res.data)));
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.loading = false this.loading = false
uni.hideLoading() uni.hideLoading()
...@@ -592,6 +564,7 @@ ...@@ -592,6 +564,7 @@
init() { init() {
uni.showLoading() uni.showLoading()
this.apipost("dmcstatistics_post_GetNewLeaderPayMoneyStatics", this.msg, (res) => { this.apipost("dmcstatistics_post_GetNewLeaderPayMoneyStatics", this.msg, (res) => {
console.log("dmcstatistics_post_GetNewLeaderPayMoneyStatics",JSON.parse(JSON.stringify(res.data)));
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.params = res.data; this.params = res.data;
for (let i = 1; i < 5; i++) { for (let i = 1; i < 5; i++) {
...@@ -610,18 +583,14 @@ ...@@ -610,18 +583,14 @@
this.$set(this.params.HotelOrderListReport[i], `TotalMoney`, 0); this.$set(this.params.HotelOrderListReport[i], `TotalMoney`, 0);
this.$set(this.params.HotelOrderListReport[i], `hotelIndex`, 0); this.$set(this.params.HotelOrderListReport[i], `hotelIndex`, 0);
} }
if (res.data.CountryIds) this.getShoppingType(res.data.CountryIds) if (res.data.CountryIds) {
// console.log(this.params.HotelOrderListReport,'-----酒店') this.getShoppingType(res.data.CountryIds)
// console.log(this.params.BusList,'-----车信息') }
// console.log(this.params.ScenicList,'-----景点')
// console.log(this.params.DiningList,'-----餐厅')
// console.log(this.params.LeaderShopList ,'-----购物店信息')
// console.log(this.params.LeaderApply ,'-----领队用款申请信息')
console.log(this.params.OtherOrderInfo, '-----其他信息')
for (let i = 0; i < this.params.OtherOrderInfo.OtherList.length; i++) { for (let i = 0; i < this.params.OtherOrderInfo.OtherList.length; i++) {
let obj = this.params.OtherOrderInfo.OtherList[i] let obj = this.params.OtherOrderInfo.OtherList[i]
console.log("obj", obj) if (obj.UseDate == null && obj.UnitPrice == 0 && obj.Rebate == 0 && obj.VoucherPic !=
if ( obj.UseDate == null &&obj.UnitPrice==0&&obj.Rebate==0&&obj.VoucherPic !=""&&obj.Remark == '' && obj.Currency==0) { "" && obj.Remark == '' && obj.Currency == 0) {
obj.CostProject = -1 obj.CostProject = -1
} }
} }
...@@ -663,7 +632,6 @@ ...@@ -663,7 +632,6 @@
Math.floor(e.detail.scrollTop - 100) / 100 > 1 ? Math.floor(e.detail.scrollTop - 100) / 100 > 1 ?
1 : 1 :
Math.floor(e.detail.scrollTop - 100) / 100; Math.floor(e.detail.scrollTop - 100) / 100;
this.$forceUpdate(); this.$forceUpdate();
}, },
getOptionData() { getOptionData() {
...@@ -697,6 +665,7 @@ ...@@ -697,6 +665,7 @@
}) })
}, },
//获取币种
getCurrencyList() { getCurrencyList() {
this.apipost("financeinfo_post_GetList", { this.apipost("financeinfo_post_GetList", {
Name: '', Name: '',
......
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