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

下单 财务单据选择

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