Commit db1bf8f7 authored by huangyuanyuan's avatar huangyuanyuan

新增财务单据

parent cf3107cf
......@@ -655,9 +655,11 @@ export default {
timer:'',
leaderType:1,
resultCode:null,
EmployeeId:0
EmployeeId:0,
describeList:[],
}
},methods:{
},
methods:{
deleteRow(i,obj){
obj.show = false;
this.msg.detailList.splice(i,1);
......@@ -1261,6 +1263,7 @@ export default {
console.log(this.$route.query.orderObj)
if(this.orderObj!=null&&this.orderObj.OrderSource===10){
console.log("getGuestInfo",this.$store.getters.getGuestInfo)
this.describeList=this.$store.getters.getGuestInfo;
}
},mounted(){
let userInfo = this.getLocalStorage();
......
......@@ -79,6 +79,11 @@
.page_SalesFinancialDetail .sfd_header>ul:nth-child(2){
padding-top: 0;
}
.checklist_ul li{
display: inline-block;
margin:10px 0;
width: 85px;
}
</style>
<template>
<div class="page_SalesFinancialDetail">
......@@ -102,7 +107,7 @@
<li><span>待审金额:</span><span :class="{color_red:(allMoneyP-shiMoneyP)!==allMoneyP}">{{moneyFormat(allMoneyP-shiMoneyP)}}</span></li>
</ul>
</div>
<p class="sfd_tit clearfix">收款单 <input type="button" value="增加财务单据" class="normalBtn" @click="addFinancialOrder(1)"></p>
<p class="sfd_tit clearfix">收款单 <input type="button" value="增加财务单据" class="normalBtn" @click="OpenOrder(1)"></p>
<table border="0" cellspacing="1" cellpadding="0" class="teamRevenueExpenditureTable">
<tr>
<th width="100">单号</th>
......@@ -188,7 +193,7 @@
</td>
</tr>
</table>
<p class="sfd_tit clearfix">付款单 <input type="button" value="增加财务单据" class="normalBtn" @click="addFinancialOrder(2)"></p>
<p class="sfd_tit clearfix">付款单 <input type="button" value="增加财务单据" class="normalBtn" @click="OpenOrder(2)"></p>
<table border="0" cellspacing="1" cellpadding="0" class="teamRevenueExpenditureTable">
<tr>
<th width="100">单号</th>
......@@ -275,12 +280,32 @@
</tr>
</table>
</div>
<el-dialog
:title="OrderTitle"
:visible.sync="dialogVisible"
width="30%">
<div>
<input type="checkbox" @change="checkAll" v-model="checkd" >全选
</div>
<ul class="checklist_ul">
<li v-for="item in checknameList" :key="item.Id">
<input type="checkbox" v-model="checkList" :value="item.Id" @change="checkThis">
{{item.GuestName}}
</li>
</ul>
<span slot="footer" class="dialog-footer">
<el-button size="mini" @click="dialogVisible = false">取 消</el-button>
<el-button size="mini" style="background:#E95252;color:#fff;border:none" @click="addFinancialOrder">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
dialogVisible:false,
orderId: 0,
dataList: [],
dataListP: [],
......@@ -332,8 +357,33 @@ export default {
tcid:0,
OutBranchId:0,
TCNUM:0,
type:0,
OrderTitle:'收款单',
checkAllList:[],
checknameList:[],
checkedId:[],
checkList:[],
checkListAll:[],
checkd:false,
}
}, methods: {
},
methods: {
checkThis(){ // 单选
if(this.checkList.length==this.checkListAll.length){
this.checkd = true
return
}
this.checkd = false
console.log("checkList",this.checkList)
},
checkAll(){ //全选
if(this.checkList.length==this.checkListAll.length){
this.checkList=[]
return
}
this.checkList = this.checkListAll
},
Financial_post_GetFinancLogList: function(id){ // 获取单据日志
if (this.checkboxShow) return
this.LogLoading = true;
......@@ -388,10 +438,38 @@ export default {
}
}, null)
},
addFinancialOrder: function (type) { // 新增单据方法
let userInfo =[{guestId:1,guestName:'谯亚军'},{guestId:2,guestName:'测试'}]
OpenOrder(num){
this.checkList=[];
this.checkAllList=[];
this.type=num;
this.dialogVisible=true;
if(num==1){
this.OrderTitle='收款单';
}else{
this.OrderTitle='付款单';
}
this.apipost('dmc_get_GetPriceNoFinanceGuestList',{tcid:this.tcid}, res=>{
if (res.data.resultCode == 1) {
let data = res.data.data;
this.checknameList=data;
data.forEach(item=>{
this.checkListAll.push(item.Id);
})
}
})
},
addFinancialOrder () { // 新增单据方法
let userInfo =[];
this.checkList.forEach(check=>{
this.checknameList.forEach(item=>{
if(item.Id==check){
userInfo.push(item);
}
})
})
this.$store.commit('saveGuestInfo',userInfo)
console.log("getGuestInfo",this.$store.getters.getGuestInfo)
// console.log("getGuestInfo",this.$store.getters.getGuestInfo)
let TCIDARR = [this.tcid];
let orderObj = {
OrderID: 0,
......@@ -400,7 +478,7 @@ export default {
SourceID: 0,
TCIDList: TCIDARR
}
if (type === 1) {
if (this.type === 1) {
this.$router.push({
name: 'ChoiceAddFinancialDocuments',
query:{
......@@ -411,7 +489,8 @@ export default {
'orderObj': JSON.stringify(orderObj)
}
});
} else if (type === 2) {
this.dialogVisible=false;
} else if (this.type === 2) {
this.$router.push({
name: 'ChoiceAddFinancialDocuments',
query:{
......@@ -422,7 +501,9 @@ export default {
'orderObj': JSON.stringify(orderObj)
}
});
this.dialogVisible=false;
}
},
}, mounted() {
this.userId = this.getLocalStorage().EmployeeId;
......
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