Commit 6334177d authored by 华国豪's avatar 华国豪 🙄

下单 财务单据选择

parent ab7d0d02
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<li :class="active==3?'_active':''" v-else>挂账单</li> <li :class="active==3?'_active':''" v-else>挂账单</li>
</ul> </ul>
<ul class="_conten"> <ul class="_conten">
<li v-for="(item,index) in GetList" v-if="item.IsShow === 1"> <li v-for="(item,index) in GetList" v-if="item.IsShow === 1 || item.showYes">
<div class="_left"> <div class="_left">
<span class="_Icon">{{item.Name.substring(0,1)}}</span> <span class="_Icon">{{item.Name.substring(0,1)}}</span>
<div> <div>
...@@ -127,7 +127,10 @@ ...@@ -127,7 +127,10 @@
this.templateID.forEach(x=>{ this.templateID.forEach(x=>{
this.payList.forEach(y=>{ this.payList.forEach(y=>{
if(x === y.Id) { if(x === y.Id) {
y.showYes = true
newList.push(y) newList.push(y)
} else {
y.showYes = false
} }
}) })
}) })
......
...@@ -441,17 +441,17 @@ ...@@ -441,17 +441,17 @@
<th>操作</th> <th>操作</th>
</tr> </tr>
<tr v-for='(item, index) in nav' > <tr v-for='(item, index) in nav' >
<td rowspan="2" width="180" v-if="index===0">总金额: {{moneyFormat(TotalNav.reimburseTotalPrice.PlanPrice * 0.95)}}</td> <td rowspan="2" width="180" v-if="index===0">总金额: {{moneyFormat(TotalNav.reimburseTotalPrice.PlanPrice)}}</td>
<td>{{item.TCNUMS}}</td> <td>{{item.TCNUMS}}</td>
<td> <td>
<p v-if="item.LeaderGetPrice>0">已领款:{{moneyFormat(item.LeaderGetPrice)}}</p> <p v-if="item.LeaderGetPrice>0">已领款:{{moneyFormat(item.LeaderGetPrice)}}</p>
<el-input v-if="item.LeaderGetPrice>0 || item.LeaderGetPrice < (TotalNav.reimburseTotalPrice.PlanPrice * 0.95)" class="w300" type="number" v-model="item.LeaderGetPriceT"></el-input> <el-input v-if="item.LeaderGetPrice < (TotalNav.reimburseTotalPrice.PlanPrice * 0.95)" class="w300" type="number" v-model="item.LeaderGetPriceT"></el-input>
</td> </td>
<td> <td>
<span v-for="(subItem, subIndex) in item.FinanceIds" class="cursorpointer text-decoration" @click="goFncUrl('FinancialDocumentsDetail', subItem)">{{subItem}}</span> <span v-for="(subItem, subIndex) in item.FinanceIds" class="cursorpointer text-decoration" @click="goFncUrl('FinancialDocumentsDetail', subItem)">{{subItem}}</span>
</td> </td>
<td width="80" class="_zhidan"> <td width="80" class="_zhidan">
<input type="button" v-if="isUpdate=='true'" value="制单" class="normalBtn" @click="goZhiDan(item)" /> <input type="button" v-if="isUpdate=='true' && item.LeaderGetPrice < (TotalNav.reimburseTotalPrice.PlanPrice * 0.95)" value="制单" class="normalBtn" @click="goZhiDan(item)" />
</td> </td>
</tr> </tr>
</table> </table>
...@@ -509,7 +509,7 @@ ...@@ -509,7 +509,7 @@
}); });
}, },
goZhiDan: function (obj) { goZhiDan: function (obj) {
console.log(obj) console.log(this.TotalNav.reimburseTotalPrice.PlanPrice)
let allMoney = this.TotalNav.reimburseTotalPrice.PlanPrice * 0.95 let allMoney = this.TotalNav.reimburseTotalPrice.PlanPrice * 0.95
let totailMoney = 0 let totailMoney = 0
this.nav.forEach(x=>{ this.nav.forEach(x=>{
...@@ -517,7 +517,7 @@ ...@@ -517,7 +517,7 @@
totailMoney += x.LeaderGetPrice totailMoney += x.LeaderGetPrice
}) })
console.log(allMoney, totailMoney) console.log(allMoney, totailMoney)
if ((allMoney - totailMoney)<0) return this.$message.error('总制单金额已大于等于总金额,无法制单!') if ((allMoney - totailMoney)<0) return this.$message.error('最大领款为预付合计金额的95%!')
if (!obj.LeaderGetPriceT || obj.LeaderGetPriceT<=0) return this.$message.error('请输入金额!') if (!obj.LeaderGetPriceT || obj.LeaderGetPriceT<=0) return this.$message.error('请输入金额!')
let TCIDARR = [obj.TCIDS] let TCIDARR = [obj.TCIDS]
let orderObj = { let orderObj = {
......
...@@ -239,8 +239,7 @@ ...@@ -239,8 +239,7 @@
</el-form-item> --> </el-form-item> -->
<el-form-item label="成交单价" prop="Unit_Price"> <el-form-item label="成交单价" prop="Unit_Price">
<el-select v-model='addMsg.Unit_Price' <el-select v-model='addMsg.Unit_Price' filterable :placeholder="$t('pub.pleaseSel')" @change="getTotalPrice(2)">
filterable :placeholder="$t('pub.pleaseSel')" @change="getTotalPrice()">
<el-option v-for="item in Unit_PriceList" :label='item.LessMoney' :value='item.ID' :key='item.ID'> <el-option v-for="item in Unit_PriceList" :label='item.LessMoney' :value='item.ID' :key='item.ID'>
</el-option> </el-option>
</el-select> </el-select>
...@@ -1480,6 +1479,7 @@ ...@@ -1480,6 +1479,7 @@
getTypePrice() { getTypePrice() {
this.addMsg.ContactName = '' this.addMsg.ContactName = ''
this.addMsg.ContactMobile = '' this.addMsg.ContactMobile = ''
console.log('this.addMsg.CustomerType', this.addMsg.CustomerType)
if (this.addMsg.CustomerType == 1) { if (this.addMsg.CustomerType == 1) {
this.addMsg.TC_Price = this.addObj.B2BMemberPrice this.addMsg.TC_Price = this.addObj.B2BMemberPrice
this.addMsg.Unit_Price = this.addObj.B2BMemberPrice; this.addMsg.Unit_Price = this.addObj.B2BMemberPrice;
...@@ -1560,9 +1560,7 @@ ...@@ -1560,9 +1560,7 @@
this.addMsg.Commission = (Number(this.addMsg.PreferPrice) * 0.01 + ewtc).toFixed(2) this.addMsg.Commission = (Number(this.addMsg.PreferPrice) * 0.01 + ewtc).toFixed(2)
this.addMsg.CommissionShareMoney = '0' this.addMsg.CommissionShareMoney = '0'
if ((this.addMsg.CustomerType == 1 || this.addMsg.CustomerType == 2) && this.addMsg.CommissionSharePeople != '') { if ((this.addMsg.CustomerType == 1 || this.addMsg.CustomerType == 2) && this.addMsg.CommissionSharePeople != '') {
console.log(22)
if (this.addMsg.CommissionSharePeople != '-1') { if (this.addMsg.CommissionSharePeople != '-1') {
console.log(33)
if (this.addMsg.Commission > 0) { if (this.addMsg.Commission > 0) {
this.addMsg.CommissionShareMoney = this.addMsg.Commission / 2 this.addMsg.CommissionShareMoney = this.addMsg.Commission / 2
this.addMsg.Commission = this.addMsg.Commission - this.addMsg.CommissionShareMoney this.addMsg.Commission = this.addMsg.Commission - this.addMsg.CommissionShareMoney
...@@ -1591,7 +1589,7 @@ ...@@ -1591,7 +1589,7 @@
this.addMsg.YSeatNum = SeatNum<0?0:SeatNum; this.addMsg.YSeatNum = SeatNum<0?0:SeatNum;
this.autoRemarks("VisaNum", "不要签证数量") this.autoRemarks("VisaNum", "不要签证数量")
}, },
getTotalPrice() { getTotalPrice(t) {
this.addMsg.ChirdNum = this.addMsg.ChirdNoNeedBedNum * 1 + this.addMsg.ChirdNeedBedNum * 1 this.addMsg.ChirdNum = this.addMsg.ChirdNoNeedBedNum * 1 + this.addMsg.ChirdNeedBedNum * 1
// //
//console.log(this.addObj) //console.log(this.addObj)
...@@ -1645,7 +1643,9 @@ ...@@ -1645,7 +1643,9 @@
} }
this.getTicheng(); this.getTicheng();
if (!t) {
this.getTypePrice() this.getTypePrice()
}
}, },
...@@ -1653,7 +1653,6 @@ ...@@ -1653,7 +1653,6 @@
let x = Number(this.addMsg.AirticketNum) + Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNeedBedNum) + let x = Number(this.addMsg.AirticketNum) + Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNeedBedNum) +
Number(this.addMsg.OldPeopleNum) - Number(this.addMsg.SingleRoomNum) Number(this.addMsg.OldPeopleNum) - Number(this.addMsg.SingleRoomNum)
let y = x - Number(this.addMsg.TripleRoomNum) * 3 - Number(this.addMsg.BigRoomNum) * 2 let y = x - Number(this.addMsg.TripleRoomNum) * 3 - Number(this.addMsg.BigRoomNum) * 2
console.log(y)
if (y < 0) { if (y < 0) {
this.addMsg.SingleRoomNum = 0 this.addMsg.SingleRoomNum = 0
} }
...@@ -1665,7 +1664,6 @@ ...@@ -1665,7 +1664,6 @@
let x = Number(this.addMsg.AirticketNum) + Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNeedBedNum) + let x = Number(this.addMsg.AirticketNum) + Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNeedBedNum) +
Number(this.addMsg.OldPeopleNum) - Number(this.addMsg.SingleRoomNum) Number(this.addMsg.OldPeopleNum) - Number(this.addMsg.SingleRoomNum)
let y = x - Number(this.addMsg.TripleRoomNum) * 3 - Number(this.addMsg.BigRoomNum) * 2 let y = x - Number(this.addMsg.TripleRoomNum) * 3 - Number(this.addMsg.BigRoomNum) * 2
console.log(y)
if (y <= -1) { if (y <= -1) {
this.addMsg.BigRoomNum = 0 this.addMsg.BigRoomNum = 0
} }
...@@ -1676,7 +1674,6 @@ ...@@ -1676,7 +1674,6 @@
let x = Number(this.addMsg.AirticketNum) + Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNeedBedNum) + let x = Number(this.addMsg.AirticketNum) + Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNeedBedNum) +
Number(this.addMsg.OldPeopleNum) - Number(this.addMsg.SingleRoomNum) Number(this.addMsg.OldPeopleNum) - Number(this.addMsg.SingleRoomNum)
let y = x - Number(this.addMsg.TripleRoomNum) * 3 - Number(this.addMsg.BigRoomNum) * 2 let y = x - Number(this.addMsg.TripleRoomNum) * 3 - Number(this.addMsg.BigRoomNum) * 2
console.log(y)
if (y <= -1) { if (y <= -1) {
this.addMsg.TripleRoomNum = 0 this.addMsg.TripleRoomNum = 0
} }
...@@ -1872,7 +1869,6 @@ ...@@ -1872,7 +1869,6 @@
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.fylxList = res.data.data this.fylxList = res.data.data
// console.log(res.data)
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -1899,7 +1895,6 @@ ...@@ -1899,7 +1895,6 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.addMsg.BrandId = '' this.addMsg.BrandId = ''
this.ssptList = res.data.data this.ssptList = res.data.data
// console.log(this.ssptList)
} }
}, err => {}) }, err => {})
}, },
...@@ -1941,7 +1936,6 @@ ...@@ -1941,7 +1936,6 @@
this.apipost('sellorder_get_GetSellClientTypeEnumList', {}, res => { this.apipost('sellorder_get_GetSellClientTypeEnumList', {}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.khlxList = res.data.data this.khlxList = res.data.data
// console.log(res.data.data)
} }
}, err => {}) }, err => {})
}, },
...@@ -2022,7 +2016,7 @@ ...@@ -2022,7 +2016,7 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.startCityList = res.data.data; this.startCityList = res.data.data;
} else { } else {
console.log(res.data) // console.log(res.data)
} }
}); });
}, },
...@@ -2034,7 +2028,7 @@ ...@@ -2034,7 +2028,7 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.startCityList1 = res.data.data; this.startCityList1 = res.data.data;
} else { } else {
console.log(res.data) // console.log(res.data)
} }
}); });
}, },
......
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