|
|
@ -7,10 +7,8 @@ |
|
|
|
<div>{{ viewTitle }}</div> |
|
|
|
<!--start 添加修改按钮--> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存 |
|
|
|
</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交 |
|
|
|
</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -18,63 +16,47 @@ |
|
|
|
<!--Start 新增修改部分--> |
|
|
|
<div class="listconadd"> |
|
|
|
<div class="titwu"><span>{{ formobj.withApply }}单车返利预提申请</span></div> |
|
|
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|
|
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|
|
|
<el-row class="rowStyle"> |
|
|
|
<el-col :span="24" class="tleftb colOneStyle"> |
|
|
|
<div><span style="font-size: 16px">金额单位:元</span></div> |
|
|
|
<el-col :span="24" class="colOneStyle"> |
|
|
|
<div style="text-align: right;font-weight: bold">金额单位:元</div> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row class="rowStyle"> |
|
|
|
<el-col :span="2" class="tleftb colOneStyle"> |
|
|
|
<span>品牌:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="colOneStyle"> |
|
|
|
<el-col :span="6" class="colOneStyle"> |
|
|
|
<div class="span-sty" style="border-right: 0px !important;">品牌:</div> |
|
|
|
<el-form-item> |
|
|
|
<el-select :disabled="dialogStatus === 'edit'" v-model="formobj.brandName" placeholder="请选择" filterable clearable @change="changeBrand"> |
|
|
|
<el-select class="addinputInfo" :disabled="dialogStatus === 'edit'" v-model="formobj.brandName" placeholder="请选择" filterable clearable @change="changeBrand"> |
|
|
|
<el-option v-for="item in brand_list" :key="item.sid" :label="item.brandName" :value="item.brandName"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18" class="tleftb colOneStyle"> |
|
|
|
<el-button size="small" type="primary" @click="handleSelect()">选择</el-button> |
|
|
|
<el-col :span="18" class="colOneStyle"> |
|
|
|
<div style="text-align: right"><el-button size="small" type="primary" class="btntopblueline" @click="handleSelect()">选择</el-button></div> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-table :key="tableKey" :data="formobj.scmVehRebateWiths" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries"> |
|
|
|
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|
|
|
<el-table-column label="返利类型" align="center"> |
|
|
|
<el-table-column prop="rebateTypeValue" label="返利类型" align="center" width="120" /> |
|
|
|
<el-table-column prop="num" label="台数" align="center" width="80" /> |
|
|
|
<el-table-column prop="withRebate" label="预提返利" align="center" width="120" /> |
|
|
|
<el-table-column prop="expectTreatCost" label="其中待支付费用" align="center" width="150" /> |
|
|
|
<el-table-column prop="expectSuppCost" label="其中抵顶费用" align="center" width="130" /> |
|
|
|
<el-table-column label="明细" align="center" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.rebateTypeValue }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="台数" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.num }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="withRebate" label="预提返利" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.withRebate }}</span> |
|
|
|
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="明细" align="center"> |
|
|
|
<el-table-column label="备注" align="center" min-width="200"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button> |
|
|
|
<el-input v-model="scope.row.remarks" clearable placeholder=""></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column label="备注" align="center">--> |
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
<!-- <el-input v-model="scope.row.remarks" clearable placeholder="" class="addinputw"></el-input>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
</el-table> |
|
|
|
<el-row> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
<span>备注</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="22"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formobj.remarks" clearable placeholder="" class="addinputw"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-col :span="24"> |
|
|
|
<div class="span-sty">备注</div> |
|
|
|
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder="" class="addinputInfo addinputw"></el-input></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
@ -208,6 +190,8 @@ export default { |
|
|
|
if (this.formobj.scmVehRebateWiths[j].rebateTypeValue === cval.rebateTypeValue) { |
|
|
|
this.formobj.scmVehRebateWiths[j].num = parseInt(this.formobj.scmVehRebateWiths[j].num) + parseInt(1) |
|
|
|
this.formobj.scmVehRebateWiths[j].withRebate = parseFloat(this.formobj.scmVehRebateWiths[j].withRebate !== '' ? this.formobj.scmVehRebateWiths[j].withRebate : 0) + parseFloat(cval.withRebate !== '' ? cval.withRebate : 0) |
|
|
|
this.formobj.scmVehRebateWiths[j].expectTreatCost = parseFloat(this.formobj.scmVehRebateWiths[j].expectTreatCost !== '' ? this.formobj.scmVehRebateWiths[j].expectTreatCost : 0) + parseFloat(cval.expectTreatCost !== '' ? cval.expectTreatCost : 0) |
|
|
|
this.formobj.scmVehRebateWiths[j].expectSuppCost = parseFloat(this.formobj.scmVehRebateWiths[j].expectSuppCost !== '' ? this.formobj.scmVehRebateWiths[j].expectSuppCost : 0) + parseFloat(cval.expectSuppCost !== '' ? cval.expectSuppCost : 0) |
|
|
|
this.formobj.scmVehRebateWiths[j].vehRebateSids.push(cval.sid) |
|
|
|
v = 1 |
|
|
|
break |
|
|
@ -219,10 +203,12 @@ export default { |
|
|
|
rebateTypeValue: cval.rebateTypeValue, |
|
|
|
num: 1, |
|
|
|
withRebate: cval.withRebate, |
|
|
|
expectTreatCost: cval.expectTreatCost, |
|
|
|
expectSuppCost: cval.expectSuppCost, |
|
|
|
brandName: cval.brandName, |
|
|
|
brandSid: cval.brandSid, |
|
|
|
vehRebateSids: [cval.sid], |
|
|
|
// remarks: '', |
|
|
|
remarks: '', |
|
|
|
sid: '', |
|
|
|
mainSid: '' |
|
|
|
}) |
|
|
@ -246,6 +232,8 @@ export default { |
|
|
|
if (aa[j].rebateTypeValue === cval.rebateTypeValue) { |
|
|
|
aa[j].num = parseInt(aa[j].num) + parseInt(1) |
|
|
|
aa[j].withRebate = parseFloat(aa[j].withRebate !== '' ? aa[j].withRebate : 0) + parseFloat(cval.withRebate !== '' ? cval.withRebate : 0) |
|
|
|
aa[j].expectTreatCost = parseFloat(aa[j].expectTreatCost !== '' ? aa[j].expectTreatCost : 0) + parseFloat(cval.expectTreatCost !== '' ? cval.expectTreatCost : 0) |
|
|
|
aa[j].expectSuppCost = parseFloat(aa[j].expectSuppCost !== '' ? aa[j].expectSuppCost : 0) + parseFloat(cval.expectSuppCost !== '' ? cval.expectSuppCost : 0) |
|
|
|
aa[j].vehRebateSids.push(cval.sid) |
|
|
|
v = 1 |
|
|
|
break |
|
|
@ -257,10 +245,12 @@ export default { |
|
|
|
rebateTypeValue: cval.rebateTypeValue, |
|
|
|
num: 1, |
|
|
|
withRebate: cval.withRebate, |
|
|
|
expectTreatCost: cval.expectTreatCost, |
|
|
|
expectSuppCost: cval.expectSuppCost, |
|
|
|
brandName: cval.brandName, |
|
|
|
brandSid: cval.brandSid, |
|
|
|
vehRebateSids: [cval.sid], |
|
|
|
// remarks: '', |
|
|
|
remarks: '', |
|
|
|
sid: '', |
|
|
|
mainSid: '' |
|
|
|
}) |
|
|
@ -272,6 +262,8 @@ export default { |
|
|
|
this.formobj.scmVehRebateWiths[k].rebateTypeValue = aa[0].rebateTypeValue |
|
|
|
this.formobj.scmVehRebateWiths[k].num = aa[0].num |
|
|
|
this.formobj.scmVehRebateWiths[k].withRebate = aa[0].withRebate |
|
|
|
this.formobj.scmVehRebateWiths[k].expectTreatCost = aa[0].expectTreatCost |
|
|
|
this.formobj.scmVehRebateWiths[k].expectSuppCost = aa[0].expectSuppCost |
|
|
|
this.formobj.scmVehRebateWiths[k].brandName = aa[0].brandName |
|
|
|
this.formobj.scmVehRebateWiths[k].brandSid = aa[0].brandSid |
|
|
|
this.formobj.scmVehRebateWiths[k].vehRebateSids = aa[0].vehRebateSids |
|
|
@ -347,21 +339,6 @@ export default { |
|
|
|
}, 0) |
|
|
|
sums[index] += '' |
|
|
|
this.formobj.withRebateTotal = sums[index] += '' |
|
|
|
} else { |
|
|
|
if (!values.every(value => isNaN(value))) { |
|
|
|
sums[index] = values.reduce((prev, curr) => { |
|
|
|
const value = Number(curr) |
|
|
|
if (!isNaN(value)) { |
|
|
|
return prev + curr |
|
|
|
} else { |
|
|
|
return prev |
|
|
|
} |
|
|
|
}, 0) |
|
|
|
sums[index] += '' |
|
|
|
this.amount = sums[index] += '' |
|
|
|
} else { |
|
|
|
sums[index] = '' |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
return sums |
|
|
@ -400,5 +377,15 @@ export default { |
|
|
|
border-right: 0px !important; |
|
|
|
border-bottom: 0px !important; |
|
|
|
} |
|
|
|
.span-sty { |
|
|
|
width: 130px !important; |
|
|
|
} |
|
|
|
.addinputInfo { |
|
|
|
margin-left: 120px !important; |
|
|
|
} |
|
|
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|
|
|
margin-left: 120px !important; |
|
|
|
width: calc(100% - 115px); |
|
|
|
} |
|
|
|
</style> |
|
|
|
|
|
|
|