Commit 67b9db33 authored by youjie's avatar youjie

no message

parent d7c6ef10
...@@ -249,7 +249,7 @@ export default { ...@@ -249,7 +249,7 @@ export default {
this.params = JSON.parse(JSON.stringify(newVal)) this.params = JSON.parse(JSON.stringify(newVal))
this.OtherList = this.params.OtherOrderInfo.OtherList this.OtherList = this.params.OtherOrderInfo.OtherList
this.OtherList.forEach(x=>{ this.OtherList.forEach(x=>{
x.UseDate = x.UseDate?this.$utils.formatDates(new Date(x.UseDate),'yyyy-MM-dd'):'' x.UseDate = x.UseDate?this.$utils.formatDates(new Date(x.UseDate),'yyyy-MM-dd'):null
let findIndex = this.options.findIndex(y=>y.id==x.CostProject&&x.ID>0) let findIndex = this.options.findIndex(y=>y.id==x.CostProject&&x.ID>0)
if(findIndex!=-1) x.CostProjectStr =this.options[findIndex].name if(findIndex!=-1) x.CostProjectStr =this.options[findIndex].name
let findIndex2 = this.currencyList.findIndex(y=>y.id==x.Currency) let findIndex2 = this.currencyList.findIndex(y=>y.id==x.Currency)
...@@ -354,7 +354,8 @@ export default { ...@@ -354,7 +354,8 @@ export default {
addData(){ addData(){
this.ReimDatas = { this.ReimDatas = {
...this.ReimDatas, ...this.ReimDatas,
CostProject: 0, ID: 0,
CostProject: null,
CostProjectStr: '', CostProjectStr: '',
CurrencyName: '', CurrencyName: '',
Currency: 0, Currency: 0,
...@@ -362,6 +363,7 @@ export default { ...@@ -362,6 +363,7 @@ export default {
UnitPrice: 0, UnitPrice: 0,
Remark: '', Remark: '',
VoucherPicList: [], VoucherPicList: [],
UseDate: null
} }
this.OtherList.push(JSON.parse(JSON.stringify(this.ReimDatas))) this.OtherList.push(JSON.parse(JSON.stringify(this.ReimDatas)))
}, },
......
...@@ -347,10 +347,10 @@ export default { ...@@ -347,10 +347,10 @@ export default {
addData(){ addData(){
this.ReimDatas = { this.ReimDatas = {
...this.ReimDatas, ...this.ReimDatas,
CostProject: 0, CostProject: null,
CostProjectStr: '', CostProjectStr: '',
CurrencyName: '', CurrencyName: '',
Currency: 0, Currency: null,
Rebate: 0, Rebate: 0,
UnitPrice: 0, UnitPrice: 0,
Remark: '', Remark: '',
......
...@@ -351,10 +351,10 @@ export default { ...@@ -351,10 +351,10 @@ export default {
addData(){ addData(){
this.ReimDatas = { this.ReimDatas = {
...this.ReimDatas, ...this.ReimDatas,
CostProject: 0, CostProject: null,
CostProjectStr: '', CostProjectStr: '',
CurrencyName: '', CurrencyName: '',
Currency: 0, Currency: null,
Rebate: 0, Rebate: 0,
UnitPrice: 0, UnitPrice: 0,
Remark: '', Remark: '',
......
...@@ -250,7 +250,9 @@ export default { ...@@ -250,7 +250,9 @@ export default {
this.params = JSON.parse(JSON.stringify(newVal)) this.params = JSON.parse(JSON.stringify(newVal))
this.SelfPlayingIncomeList = this.params.OtherOrderInfo.SelfPlayingIncomeList this.SelfPlayingIncomeList = this.params.OtherOrderInfo.SelfPlayingIncomeList
this.SelfPlayingIncomeList.forEach(x=>{ this.SelfPlayingIncomeList.forEach(x=>{
x.UseDate = x.UseDate?this.$utils.formatDates(new Date(x.UseDate),'yyyy-MM-dd'):'' x.UseDate = x.UseDate?this.$utils.formatDates(new Date(x.UseDate),'yyyy-MM-dd'):null
let findIndex = this.currencyList.findIndex(y=>y.id==x.Currency)
if(findIndex!=-1) x.CurrencyName =this.currencyList[findIndex].name
}) })
}, },
deep:true, deep:true,
...@@ -351,7 +353,7 @@ export default { ...@@ -351,7 +353,7 @@ export default {
addData(){ addData(){
this.ReimDatas = { this.ReimDatas = {
...this.ReimDatas, ...this.ReimDatas,
CostProject: 0, CostProject: null,
CostProjectStr: '', CostProjectStr: '',
CurrencyName: '', CurrencyName: '',
Currency: 0, Currency: 0,
...@@ -359,6 +361,7 @@ export default { ...@@ -359,6 +361,7 @@ export default {
UnitPrice: 0, UnitPrice: 0,
Remark: '', Remark: '',
VoucherPicList: [], VoucherPicList: [],
UseDate: null,
} }
this.SelfPlayingIncomeList.push(JSON.parse(JSON.stringify(this.ReimDatas))) this.SelfPlayingIncomeList.push(JSON.parse(JSON.stringify(this.ReimDatas)))
}, },
......
...@@ -250,7 +250,7 @@ export default { ...@@ -250,7 +250,7 @@ export default {
this.params = JSON.parse(JSON.stringify(newVal)) this.params = JSON.parse(JSON.stringify(newVal))
this.SelfPlayingExpendList = this.params.OtherOrderInfo.SelfPlayingExpendList this.SelfPlayingExpendList = this.params.OtherOrderInfo.SelfPlayingExpendList
this.SelfPlayingExpendList.forEach(x=>{ this.SelfPlayingExpendList.forEach(x=>{
x.UseDate = x.UseDate?this.$utils.formatDates(new Date(x.UseDate),'yyyy-MM-dd'):'' x.UseDate = x.UseDate?this.$utils.formatDates(new Date(x.UseDate),'yyyy-MM-dd'):null
let findIndex = this.currencyList.findIndex(y=>y.id==x.Currency) let findIndex = this.currencyList.findIndex(y=>y.id==x.Currency)
if(findIndex!=-1) x.CurrencyName =this.currencyList[findIndex].name if(findIndex!=-1) x.CurrencyName =this.currencyList[findIndex].name
}) })
...@@ -353,7 +353,7 @@ export default { ...@@ -353,7 +353,7 @@ export default {
addData(){ addData(){
this.ReimDatas = { this.ReimDatas = {
...this.ReimDatas, ...this.ReimDatas,
CostProject: 0, CostProject: null,
CostProjectStr: '', CostProjectStr: '',
CurrencyName: '', CurrencyName: '',
Currency: 0, Currency: 0,
...@@ -361,6 +361,7 @@ export default { ...@@ -361,6 +361,7 @@ export default {
UnitPrice: 0, UnitPrice: 0,
Remark: '', Remark: '',
VoucherPicList: [], VoucherPicList: [],
UseDate: null,
} }
this.SelfPlayingExpendList.push(JSON.parse(JSON.stringify(this.ReimDatas))) this.SelfPlayingExpendList.push(JSON.parse(JSON.stringify(this.ReimDatas)))
}, },
......
...@@ -249,7 +249,7 @@ export default { ...@@ -249,7 +249,7 @@ export default {
this.params = JSON.parse(JSON.stringify(newVal)) this.params = JSON.parse(JSON.stringify(newVal))
this.LeaderShopList = this.params.LeaderShopList this.LeaderShopList = this.params.LeaderShopList
this.LeaderShopList.forEach(x=>{ this.LeaderShopList.forEach(x=>{
x.EnterTime = x.UseDate?this.$utils.formatDates(new Date(x.EnterTime),'yyyy-MM-dd'):'' x.EnterTime = x.EnterTime?this.$utils.formatDates(new Date(x.EnterTime),'yyyy-MM-dd'):null
let findIndex = this.options.findIndex(y=>y.id==x.ShopId) let findIndex = this.options.findIndex(y=>y.id==x.ShopId)
if(findIndex!=-1) x.ShopStr =this.options[findIndex].name if(findIndex!=-1) x.ShopStr =this.options[findIndex].name
let findIndex2 = this.currencyList.findIndex(y=>y.id==x.CurrencyId) let findIndex2 = this.currencyList.findIndex(y=>y.id==x.CurrencyId)
...@@ -355,11 +355,11 @@ export default { ...@@ -355,11 +355,11 @@ export default {
ShopId: null, ShopId: null,
ShopStr: '', ShopStr: '',
CurrencyName: '', CurrencyName: '',
CurrencyId: null, CurrencyId: 0,
ShopMoney: 0, ShopMoney: 0,
Remark: '', Remark: null,
VoucherPicList: [], VoucherPicList: [],
EnterTime: '', EnterTime: null,
} }
this.LeaderShopList.push(JSON.parse(JSON.stringify(this.ReimDatas))) this.LeaderShopList.push(JSON.parse(JSON.stringify(this.ReimDatas)))
}, },
......
...@@ -325,7 +325,7 @@ export default { ...@@ -325,7 +325,7 @@ export default {
for(let j=0;j<obj.ReimburseList.ReimburseDetailsList.length;j++){ for(let j=0;j<obj.ReimburseList.ReimburseDetailsList.length;j++){
let child = obj.ReimburseList.ReimburseDetailsList[j] let child = obj.ReimburseList.ReimburseDetailsList[j]
if(msg==''&& if(msg==''&&
(obj.ReimburseList.CurrencyId==0||obj.ReimburseList.CurrencyId=='')&& (obj.ReimburseList.CurrencyId==0||obj.ReimburseList.CurrencyId==null)&&
(obj.ReimburseList.SettlementType>0||obj.ReimburseList.Remarks!=''|| (obj.ReimburseList.SettlementType>0||obj.ReimburseList.Remarks!=''||
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)
...@@ -366,7 +366,7 @@ export default { ...@@ -366,7 +366,7 @@ export default {
let child = obj.HotelOrderList[j] let child = obj.HotelOrderList[j]
for(let x=0;x<child.ReimburseList.ReimburseDetailsList.length;x++){ for(let x=0;x<child.ReimburseList.ReimburseDetailsList.length;x++){
let grandson = child.ReimburseList.ReimburseDetailsList[x] let grandson = child.ReimburseList.ReimburseDetailsList[x]
if(msg==''&&(child.ReimburseList.CurrencyId==0||child.ReimburseList.CurrencyId=='')&& if(msg==''&&(child.ReimburseList.CurrencyId==0||child.ReimburseList.CurrencyId==null)&&
(child.ReimburseList.SettlementType>0||child.ReimburseList.Remarks!=''|| (child.ReimburseList.SettlementType>0||child.ReimburseList.Remarks!=''||
child.ReimburseList.VoucherPicList.length>0||grandson.UserNum>0|| child.ReimburseList.VoucherPicList.length>0||grandson.UserNum>0||
grandson.UnitPrice>0||grandson.UserType) grandson.UnitPrice>0||grandson.UserType)
...@@ -393,7 +393,7 @@ export default { ...@@ -393,7 +393,7 @@ export default {
let child = obj.DiningSummaryList[j] let child = obj.DiningSummaryList[j]
for(let x=0;x<child.ReimburseList.ReimburseDetailsList.length;x++){ for(let x=0;x<child.ReimburseList.ReimburseDetailsList.length;x++){
let grandson = child.ReimburseList.ReimburseDetailsList[x] let grandson = child.ReimburseList.ReimburseDetailsList[x]
if(msg==''&&(child.ReimburseList.CurrencyId==0||child.ReimburseList.CurrencyId=='')&& if(msg==''&&(child.ReimburseList.CurrencyId==0||child.ReimburseList.CurrencyId==null)&&
(child.ReimburseList.SettlementType>0||child.ReimburseList.Remarks!=''|| (child.ReimburseList.SettlementType>0||child.ReimburseList.Remarks!=''||
child.ReimburseList.VoucherPicList.length>0||grandson.UserNum>0|| child.ReimburseList.VoucherPicList.length>0||grandson.UserNum>0||
grandson.UnitPrice>0||grandson.UserType) grandson.UnitPrice>0||grandson.UserType)
...@@ -420,7 +420,7 @@ export default { ...@@ -420,7 +420,7 @@ export default {
let child = obj.ScenicStatisticsList[j] let child = obj.ScenicStatisticsList[j]
for(let x=0;x<child.ReimburseList.ReimburseDetailsList.length;x++){ for(let x=0;x<child.ReimburseList.ReimburseDetailsList.length;x++){
let grandson = child.ReimburseList.ReimburseDetailsList[x] let grandson = child.ReimburseList.ReimburseDetailsList[x]
if(msg==''&&(child.ReimburseList.CurrencyId==0||child.ReimburseList.CurrencyId=='')&& if(msg==''&&(child.ReimburseList.CurrencyId==0||child.ReimburseList.CurrencyId==null)&&
(child.ReimburseList.SettlementType>0||child.ReimburseList.Remarks!=''|| (child.ReimburseList.SettlementType>0||child.ReimburseList.Remarks!=''||
child.ReimburseList.VoucherPicList.length>0||grandson.UserNum>0|| child.ReimburseList.VoucherPicList.length>0||grandson.UserNum>0||
grandson.UnitPrice>0||grandson.UserType) grandson.UnitPrice>0||grandson.UserType)
...@@ -439,12 +439,99 @@ export default { ...@@ -439,12 +439,99 @@ export default {
} }
return msg return msg
}, },
VerificationOther(){
let msg = ''
for(let i=0;i<this.params.OtherOrderInfo.OtherList.length;i++){
let obj = this.params.OtherOrderInfo.OtherList[i]
if(msg==''&&obj.UseDate==null&&
(obj.UnitPrice>0||obj.Rebate>0||obj.VoucherPicList.length>0||
obj.Remark!=''||obj.CostProjectStr!=''||obj.Currency)
){
msg = `请选择其他费用使用时间`
}
if(msg==''&&obj.CostProjectStr==''&&
(obj.UnitPrice>0||obj.Rebate>0||obj.VoucherPicList.length>0||
obj.Remark!=''||obj.Currency||obj.UseDate!=null)
){
msg = `请选择其他费用费用项目`
}
if(msg==''&&(obj.Currency==0||obj.Currency==null)&&
(obj.UnitPrice>0||obj.Rebate>0||obj.VoucherPicList.length>0||
obj.Remark!=''||obj.CostProjectStr!=''||obj.UseDate!=null)
){
msg = `请选择其他费用币种`
}
}
return msg
},
VerificationIncome(){
let msg = ''
for(let i=0;i<this.params.OtherOrderInfo.SelfPlayingIncomeList.length;i++){
let obj = this.params.OtherOrderInfo.SelfPlayingIncomeList[i]
if(msg==''&&obj.UseDate==null&&
(obj.UnitPrice>0||obj.VoucherPicList.length>0||
obj.Remark!=''||obj.Currency)
){
msg = `请选择自费收入使用时间`
}
if(msg==''&&(obj.Currency==0||obj.Currency==null)&&
(obj.UnitPrice>0||obj.VoucherPicList.length>0||
obj.Remark!=''||obj.UseDate!=null)
){
msg = `请选择自费收入币种`
}
}
return msg
},
VerificationExpend(){
let msg = ''
for(let i=0;i<this.params.OtherOrderInfo.SelfPlayingExpendList.length;i++){
let obj = this.params.OtherOrderInfo.SelfPlayingExpendList[i]
if(msg==''&&obj.UseDate==null&&
(obj.UnitPrice>0||obj.Rebate>0||obj.VoucherPicList.length>0||
obj.Remark!='')
){
msg = `请选择自费支出使用时间`
}
}
return msg
},
VerificationShop(){
let msg = ''
for(let i=0;i<this.params.LeaderShopList.length;i++){
let obj = this.params.LeaderShopList[i]
if(msg==''&&obj.EnterTime==null&&
(obj.ShopMoney>0||obj.ShopId!=null||obj.VoucherPicList.length>0||
obj.Remark!=null||obj.CurrencyId)
){
msg = `请选择购物报账进店时间`
}
if(msg==''&&obj.ShopId==null&&
(obj.ShopMoney>0||obj.CurrencyId||obj.VoucherPicList.length>0||
obj.Remark!=null||obj.EnterTime!=null)
){
msg = `请选择购物名称`
}
if(msg==''&&(obj.CurrencyId==0||obj.CurrencyId==null)&&
(obj.ShopMoney>0||obj.ShopId!=null||obj.VoucherPicList.length>0||
obj.Remark!=null||obj.EnterTime!=null)
){
msg = `请选择购物报账币种`
}
}
return msg
},
saveData(){ saveData(){
let msg = '' let msg = ''
if(msg=='') msg = this.VerificationBusList() if(msg=='') msg = this.VerificationBusList()
if(msg=='') msg = this.VerificationHotel() if(msg=='') msg = this.VerificationHotel()
if(msg=='') msg = this.VerificationDining() if(msg=='') msg = this.VerificationDining()
if(msg=='') msg = this.VerificationScenic() if(msg=='') msg = this.VerificationScenic()
if(msg=='') msg = this.VerificationOther()
if(msg=='') msg = this.VerificationIncome()
if(msg=='') msg = this.VerificationExpend()
if(msg=='') msg = this.VerificationShop()
if(msg) { if(msg) {
return uni.showToast({ return uni.showToast({
title: msg, title: msg,
...@@ -452,6 +539,7 @@ export default { ...@@ -452,6 +539,7 @@ export default {
}) })
} }
// console.log(this.params,'-----') // console.log(this.params,'-----')
// return
if(this.loading) return if(this.loading) return
this.loading = true this.loading = true
uni.showLoading() uni.showLoading()
......
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