|
|
@ -136,7 +136,7 @@ |
|
|
|
<el-table-column label="成交价 " align="center"> |
|
|
|
<el-table-column label="成交价 " align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="small"> |
|
|
|
<div class="small"> |
|
|
|
<el-input @change="discount($event,scope.row)" v-model="scope.row.finalPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
<el-input @change="calculateDiscount($event,scope.row)" v-model="scope.row.finalPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
<span>万</span> |
|
|
|
<span>万</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -218,7 +218,7 @@ |
|
|
|
<el-table-column label="成交价" align="center" width="185"> |
|
|
|
<el-table-column label="成交价" align="center" width="185"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="small"> |
|
|
|
<div class="small"> |
|
|
|
<el-input :class="!scope.row.finalPrice&&whetherSubmit?'red':''" :disabled="disabled||editDisabled" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" @change="[dealComputers($event,scope.row),discount($event,scope.row),userAmount($event,scope.row)]" v-model="scope.row.finalPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
<el-input :class="!scope.row.finalPrice&&whetherSubmit?'red':''" :disabled="disabled||editDisabled" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" @change="[dealComputers($event,scope.row),calculateDiscount($event,scope.row),userAmount($event,scope.row)]" v-model="scope.row.finalPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
<span>元 / 账号</span> |
|
|
|
<span>元 / 账号</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -233,7 +233,7 @@ |
|
|
|
<el-table-column label="账号数" align="center" width="150"> |
|
|
|
<el-table-column label="账号数" align="center" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="small"> |
|
|
|
<div class="small"> |
|
|
|
<el-input :class="!scope.row.accountNum&&whetherSubmit?'red':''" :disabled="disabled||editDisabled" @change="[dealComputers($event,scope.row),dealBargain($event,scope.row)]" v-model="scope.row.accountNum" placeholder="请输入"type="text"></el-input> |
|
|
|
<el-input :class="!scope.row.accountNum&&whetherSubmit?'red':''" :disabled="disabled||editDisabled" @change="[dealComputers($event,scope.row),dealBargain($event,scope.row),calculateDiscount($event,scope.row)]" v-model="scope.row.accountNum" placeholder="请输入"type="text"></el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
@ -241,7 +241,7 @@ |
|
|
|
<el-table-column label="总金额(元)" align="center" width="180"> |
|
|
|
<el-table-column label="总金额(元)" align="center" width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="small"> |
|
|
|
<div class="small"> |
|
|
|
<el-input :class="!scope.row.totalAmount&&whetherSubmit?'red':''" :disabled="disabled||editDisabled" @blur="[allAmount($event,scope.row),allAmountChange($event,scope.row)]" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" v-model="scope.row.totalAmount" placeholder="请输入"type="text"></el-input> |
|
|
|
<el-input :class="!scope.row.totalAmount&&whetherSubmit?'red':''" :disabled="disabled||editDisabled" @blur="[allAmount($event,scope.row),allAmountChange($event,scope.row),calculateDiscount($event,scope.row)]" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" v-model="scope.row.totalAmount" placeholder="请输入"type="text"></el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
@ -938,10 +938,9 @@ export default { |
|
|
|
this.addDataJurisdiction(); |
|
|
|
this.addDataJurisdiction(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 计算折扣率 |
|
|
|
// 计算折扣率 |
|
|
|
discount(val,row){ |
|
|
|
calculateDiscount(val,row){ |
|
|
|
if(val){ |
|
|
|
if(row.finalPrice) |
|
|
|
row.discountRate = Math.floor(val/row.marketValue*100).toFixed(2)+'%' |
|
|
|
row.discountRate = (row.finalPrice/row.marketValue*100).toFixed(2)+'%' |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// 已知成交和总额,计算账号数目 |
|
|
|
// 已知成交和总额,计算账号数目 |
|
|
|
userAmount(val,row){ |
|
|
|
userAmount(val,row){ |
|
|
@ -997,11 +996,8 @@ export default { |
|
|
|
// 数据平台--发货 |
|
|
|
// 数据平台--发货 |
|
|
|
deliverGoods (e,row) { |
|
|
|
deliverGoods (e,row) { |
|
|
|
if(this.editDisabled){ |
|
|
|
if(this.editDisabled){ |
|
|
|
// this.$post(this.api.ship+"?id="+`${row.dataOrCourseId}`).then(res=>{ |
|
|
|
this.$post(this.api.ship+"?id="+`${row.dataOrCourseId}`).then(res=>{ }) |
|
|
|
this.$post(this.api.ship,{id:4}).then(res=>{ |
|
|
|
// this.$post(this.api.ship,{id:4}).then(res=>{ |
|
|
|
console.log(res); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 使用期限转换以及计算剩余天数 |
|
|
|
// 使用期限转换以及计算剩余天数 |
|
|
@ -1024,7 +1020,9 @@ export default { |
|
|
|
let renewM = arr.shift()/* 月 */ |
|
|
|
let renewM = arr.shift()/* 月 */ |
|
|
|
let renewD = arr.shift()/* 日 */ |
|
|
|
let renewD = arr.shift()/* 日 */ |
|
|
|
console.log(renewY,renewM,renewD,'拆分时间'); |
|
|
|
console.log(renewY,renewM,renewD,'拆分时间'); |
|
|
|
let endYear = +renewY + (parseInt((+renewM+(+e))/12)===0?0:parseInt((+renewM+(+e))/12))+ char + completeDate((+renewM+(+e))%12) + char + renewD; |
|
|
|
let endYear = +renewY + (parseInt((+renewM+(+e))/13)===0?0:parseInt((+renewM+(+e))/12))+ char + completeDate((+renewM+(+e))%12) + char + renewD; |
|
|
|
|
|
|
|
// console.log((parseInt((+renewM(+e))/12)===0?0:parseInt((+renewM+(+e))/12)),renewY,'看下时间计算', +renewY + (parseInt((+renewM+(+e))/12)===0?0:parseInt((+renewM+(+e))/12))); |
|
|
|
|
|
|
|
console.log(parseInt((+renewM+(+e))/13),'计算整除的年份',12/13,'+renewM+(+e)'); |
|
|
|
row.endTime = endYear |
|
|
|
row.endTime = endYear |
|
|
|
|
|
|
|
|
|
|
|
// 计算剩余天数 |
|
|
|
// 计算剩余天数 |
|
|
|