|
|
|
@ -113,9 +113,9 @@ |
|
|
|
|
<el-table :data="coursePermissions" class="orderTable" stripe header-align="center"> |
|
|
|
|
<el-table-column type="index" width="60" label="序号" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="productName" label="课程名称" align="center" width="200"> |
|
|
|
|
<el-table-column prop="productName" label="课程名称" align="center" min-width="150" show-overflow-tooltip> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="使用期限" align="center"> |
|
|
|
|
<el-table-column label="使用期限" align="center" min-width="80"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input onkeyup="value=this.value.replace(/\D+/g,'')" |
|
|
|
@ -128,13 +128,13 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="起止日期" align="center" width="200"> |
|
|
|
|
<el-table-column label="起止日期" align="center" min-width="100"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<p v-if="!scope.row.startTime">请输入使用期限</p> |
|
|
|
|
<p v-else>{{ scope.row.startTime }} - {{ scope.row.endTime }}</p> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="剩余期限" align="center"> |
|
|
|
|
<el-table-column label="剩余期限" align="center" min-width="80"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input disabled v-model="scope.row.remainingPeriod" placeholder="" |
|
|
|
@ -143,7 +143,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="市场价" align="center"> |
|
|
|
|
<el-table-column label="市场价" align="center" min-width="80"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input disabled v-model="scope.row.marketValue" placeholder="" |
|
|
|
@ -152,20 +152,20 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="成交价" align="center"> |
|
|
|
|
<el-table-column label="成交价" align="center" min-width="80"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input :class="!scope.row.finalPrice&&whetherSubmit?'red':''" |
|
|
|
|
:disabled="viewDisabled||editDisabled" |
|
|
|
|
oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" |
|
|
|
|
@change="[allAmount($event,scope.row),calculateDiscount($event,scope.row)]" |
|
|
|
|
v-model="scope.row.finalPrice" placeholder="请输入" |
|
|
|
|
v-model="scope.row.finalPrice" |
|
|
|
|
type="text"></el-input> |
|
|
|
|
<span style="margin-left:5px">万</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="折扣率 " align="center"> |
|
|
|
|
<el-table-column label="折扣率 " align="center" min-width="80"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input disabled v-model="scope.row.discountRate" placeholder="" |
|
|
|
@ -173,12 +173,12 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="端口地址 " align="center" width="100"> |
|
|
|
|
<el-table-column label="端口地址 " align="center" min-width="80"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button @click="configure(scope.row)">配置</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center" width="230px"> |
|
|
|
|
<el-table-column label="操作" align="center" min-width="120"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="flex-c-c"> |
|
|
|
|
<el-button |
|
|
|
@ -230,9 +230,9 @@ |
|
|
|
|
<el-table :data="dataPlatformPermissions" class="orderTable" stripe header-align="center"> |
|
|
|
|
<el-table-column type="index" width="60" label="序号" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="productName" label="产品名称" align="center" width="200"> |
|
|
|
|
<el-table-column prop="productName" label="产品名称" align="center" min-width="150"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="使用期限" align="center"> |
|
|
|
|
<el-table-column label="使用期限" align="center" min-width="80"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input onkeyup="value=this.value.replace(/\D+/g,'')" |
|
|
|
@ -245,13 +245,13 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="起止日期" align="center" width="200"> |
|
|
|
|
<el-table-column label="起止日期" align="center" min-width="100"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<p v-if="!scope.row.startTime">请输入使用期限</p> |
|
|
|
|
<p v-else>{{ scope.row.startTime }} - {{ scope.row.endTime }}</p> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="剩余期限" align="center"> |
|
|
|
|
<el-table-column label="剩余期限" align="center" min-width="80"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input disabled v-model="scope.row.remainingPeriod" placeholder="" |
|
|
|
@ -260,7 +260,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="市场价" align="center"> |
|
|
|
|
<el-table-column label="市场价" align="center" min-width="120"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input disabled v-model="scope.row.marketValue" placeholder="" |
|
|
|
@ -269,20 +269,20 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="成交价" align="center"> |
|
|
|
|
<el-table-column label="成交价" align="center" min-width="120"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input :class="!scope.row.finalPrice&&whetherSubmit?'red':''" |
|
|
|
|
:disabled="viewDisabled||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="请输入" |
|
|
|
|
v-model="scope.row.finalPrice" |
|
|
|
|
type="text"></el-input> |
|
|
|
|
<span style="margin-left:5px">元 / 账号</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="折扣率" align="center"> |
|
|
|
|
<el-table-column label="折扣率" align="center" min-width="80"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<!-- <div class="discountRate"> --> |
|
|
|
|
<div class="small"> |
|
|
|
@ -291,31 +291,33 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="账号数" align="center"> |
|
|
|
|
<el-table-column label="账号数" align="center" min-width="80"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input :class="!scope.row.accountNum&&whetherSubmit?'red':''" |
|
|
|
|
:disabled="viewDisabled||editDisabled" |
|
|
|
|
onkeyup="value=this.value.replace(/\D+/g,'')" |
|
|
|
|
oninput="value=value.replace(/[^0-9.]/g,'')" |
|
|
|
|
v-model="scope.row.accountNum" |
|
|
|
|
@change="[dealComputers($event,scope.row),dealBargain($event,scope.row),calculateDiscount($event,scope.row)]" |
|
|
|
|
v-model="scope.row.accountNum" placeholder="请输入" |
|
|
|
|
type="text"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<!-- 金额自动计算,计算方式:账号数*成交价,且可以手动修改,保留两位小数 --> |
|
|
|
|
<el-table-column label="总金额(元)" align="center"> |
|
|
|
|
<el-table-column label="总金额(元)" align="center" min-width="100"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input :class="!scope.row.totalAmount&&whetherSubmit?'red':''" |
|
|
|
|
:disabled="viewDisabled||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="请输入" |
|
|
|
|
v-model="scope.row.totalAmount" |
|
|
|
|
type="text"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center" width="230px"> |
|
|
|
|
<el-table-column label="操作" align="center" min-width="120"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="flex-c-c"> |
|
|
|
|
<el-button |
|
|
|
@ -1211,7 +1213,8 @@ export default { |
|
|
|
|
// 已知成交和总额,计算账号数目 |
|
|
|
|
userAmount(val, row) { |
|
|
|
|
if (val && row.totalAmount) { |
|
|
|
|
row.accountNum = Math.floor(row.totalAmount / val); |
|
|
|
|
// row.accountNum = Math.floor(row.totalAmount / val); |
|
|
|
|
row.accountNum = Math.round(row.totalAmount / val); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 合同起止日期选择 |
|
|
|
@ -1247,7 +1250,8 @@ export default { |
|
|
|
|
row.finalPrice = Math.round(all / row.accountNum).toFixed(2); |
|
|
|
|
} |
|
|
|
|
if (row.finalPrice) {// 若有市场价 |
|
|
|
|
row.accountNum = Math.floor(all / row.finalPrice); |
|
|
|
|
// row.accountNum = Math.floor(all / row.finalPrice); |
|
|
|
|
row.accountNum = Math.round(all / row.finalPrice); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|