Commit eb9dc0c2 authored by zhengke's avatar zhengke

no message

parent 3455c127
......@@ -178,7 +178,6 @@
<template slot-scope="scope">
<div class="agreement-IncomeMoney-box">
{{scope.row.IncomeMoney}}
<!-- scope.row.OrderType.split(',').length>1 -->
<i v-if="scope.row.OrderStatus==1"
@click="makeAdocument(scope.row,scope.$index,1)"
class="iconfont iconjia- numIcon"></i>
......@@ -186,12 +185,12 @@
<div class="float-flag-shape"></div>
<el-checkbox-group v-model="scope.row.checkList"
@change="clickMultipleChoice(scope.row,scope.$index,1)">
<el-checkbox v-for="(item,index) in MultipleChoiceList" :key="index"
<el-checkbox v-for="(item,index) in scope.row.MultipleChoiceList" :key="index"
:label="item.Id">{{item.Name}}</el-checkbox>
</el-checkbox-group>
<div class="agreement-Cancel">
<span @click="scope.row.actuallyReceived=false">取消</span>
<span @click="popClick(scope.$index,1)">确定</span>
<span @click="popCancelClick(scope.row,scope.$index,1)">取消</span>
<span @click="popClick(scope.row,scope.$index,1)">确定</span>
</div>
</div>
......@@ -213,13 +212,13 @@
@click="makeAdocument(scope.row,scope.$index,3)" class="iconfont iconjia- numIcon"></i>
<div v-show="scope.row.cost" class="agreement-IncomeMoney-pop">
<div class="float-flag-shape"></div>
<el-checkbox-group v-model="scope.row.checkList" @change="clickMultipleChoice">
<el-checkbox v-for="(item,index) in MultipleChoiceList" :key="index"
:label="item.Id">{{item.Name}}</el-checkbox>
</el-checkbox-group>
<el-radio-group v-model="scope.row.selectedType" @change="clickMultipleChoice(scope.row,scope.$index,3)">
<el-radio v-for="(item,index) in scope.row.MultipleChoiceList" :key="index"
:label="item.Id">{{item.Name}}</el-radio>
</el-radio-group>
<div class="agreement-Cancel">
<span @click="scope.row.cost=false">取消</span>
<span @click="popClick(scope.$index,3)">确定</span>
<span @click="popCancelClick(scope.row,scope.$index,3)">取消</span>
<span @click="popClick(scope.row,scope.$index,3)">确定</span>
</div>
</div>
......@@ -398,14 +397,26 @@
});
},
methods: {
// 关闭弹窗
popClick(index,num){
// 取消
popCancelClick(row, index, num){
if(num==1){
this.dataList[index].actuallyReceived =false
}
if(num==3){
this.dataList[index].cost =false
}
this.dataList[index].MultipleChoiceList = []
this.dataList[index].selectedType = ''
},
// 关闭弹窗
popClick(row, index, num){
this.makeAdocumentFun(row, index, num)
if(num==1){
this.dataList[index].actuallyReceived =false
}
if(num==3){
this.dataList[index].cost =false
}
},
// 查看出票凭据
......@@ -459,23 +470,25 @@
},
// 多选发生变化
clickMultipleChoice(row, index, num) {
if(row.checkList.slice(-1)[0] == 4){
this.delType(row,1)
this.delType(row,2)
this.delType(row,3)
this.delType(row,5)
}else if(row.checkList.slice(-1)[0] == 5){
this.delType(row,1)
this.delType(row,2)
this.delType(row,3)
this.delType(row,4)
}else{
this.delType(row,4)
this.delType(row,5)
if(num == 1){
if(row.checkList.slice(-1)[0] == 4){
this.delType(row,1)
this.delType(row,2)
this.delType(row,3)
this.delType(row,5)
row.selectedType = row.checkList.join(',')
}else if(row.checkList.slice(-1)[0] == 5){
this.delType(row,1)
this.delType(row,2)
this.delType(row,3)
this.delType(row,4)
row.selectedType = row.checkList.join(',')
}else{
this.delType(row,4)
this.delType(row,5)
row.selectedType = row.checkList.join(',')
}
}
this.RelevanceFrId = row.checkList.join(',')
console.log(this.RelevanceFrId,'=====')
},
// 删除套餐值
delType(row,item) {
......@@ -487,20 +500,32 @@
},
// 制作单据
makeAdocument(row, index, num) {
if(row.OrderType.split(',').length>1&&num==1){
let list = row.OrderType&&row.OrderType.split(',')
if(list!=null&&list.length!=0&&num==1){
this.dataList.forEach(item=>{
return item.actuallyReceived = false
})
if(this.dataList[index]){
this.dataList[index].actuallyReceived = true
this.dataList[index].actuallyReceived = true
for(let j=0;j<list.length;j++){
for(let i=0;i<this.MultipleChoiceList.length;i++){
if(list[j]==this.MultipleChoiceList[i].Id){
this.dataList[index].MultipleChoiceList.push(this.MultipleChoiceList[i])
}
}
}
}
else if(row.OrderType.split(',').length>1&&num==3){
else if(list!=null&&list.length!=0&&num==3){
this.dataList.forEach(item=>{
return item.cost = false
})
if(this.dataList[index]){
this.dataList[index].cost = true
this.dataList[index].cost = true
for(let j=0;j<list.length;j++){
for(let i=0;i<this.MultipleChoiceList.length;i++){
if(list[j]==this.MultipleChoiceList[i].Id){
this.dataList[index].MultipleChoiceList.push(this.MultipleChoiceList[i])
}
}
}
}else{
this.makeAdocumentFun(row, index, num)
......@@ -518,7 +543,7 @@
if (this.isOnline()) {
url = 'http://yx.oytour.com/#/'
} else {
url = 'http://www.test.com:8084/#/'
url = 'http://www.test.com:8081/#/'
}
let data = [{
path: 'ChoiceAddFinancialDocuments',
......@@ -527,8 +552,13 @@
ReFinanceId: row.OrderId,
ReFinanceId2: num,
GuestId: row.GuestId,
RelevanceFrId: row.OrderType // 单据类型
RelevanceFrId: row.selectedType?row.selectedType:row.OrderType // 单据类型
}]
this.dataList.forEach(item=>{
item.checkList = []
item.MultipleChoiceList = []
item.selectedType = ''
})
href = url + 'automaticLogin?token=' + this.getLocalStorage().token + '&data=' + JSON.stringify(data)
window.open(href);
}
......@@ -670,17 +700,19 @@
this.msg,
(res) => {
if (res.data.resultCode == 1) {
let data = res.data.data.pageData;;
let data = res.data.data.pageData;
let addList = function(arr) {
arr.forEach(item => {
item.More = ''
item.actuallyReceived = false
item.cost = ''
item.cost = false
item.selectedType = ''
item.checkList = []
item.MultipleChoiceList = []
});
};
addList(data);
this.dataList = res.data.data.pageData;
this.dataList = data;
this.total = res.data.data.count;
this.loading = false
} else {
......
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