|
@@ -105,6 +105,7 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div class="second-step-form-wrap" v-show="step===2">
|
|
|
+ <el-button type="primary" @click="addRenewalHandle" style="margin-top: 15px;">添加续约</el-button>
|
|
|
<el-table :data="recordData" border>
|
|
|
<el-table-column
|
|
|
v-for="item in tableColOpts"
|
|
@@ -114,8 +115,14 @@
|
|
|
align="center"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span class="editsty" @click="editRenewal(scope.row)" style="padding: 0 3px;">编辑</span>
|
|
|
+ <span class="deletesty" @click="deleteRenewal(scope.row)" style="padding: 0 3px;">删除</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
- <el-button type="text" @click="showRenewal=true">添加续约</el-button>
|
|
|
+ <!-- <el-button type="text" @click="showRenewal=true">添加续约</el-button> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="business-other">
|
|
@@ -143,7 +150,7 @@
|
|
|
|
|
|
<!-- 添加续约 -->
|
|
|
<el-dialog
|
|
|
- title="添加续约"
|
|
|
+ :title="renewalDiaTitle"
|
|
|
:visible.sync="showRenewal"
|
|
|
:modal-append-to-body="false"
|
|
|
:close-on-click-modal="false"
|
|
@@ -152,7 +159,8 @@
|
|
|
>
|
|
|
<AddRenewal
|
|
|
@addRenewal="handleAddRenewal"
|
|
|
- @close="showRenewal=false"/>
|
|
|
+ @close="showRenewal=false"
|
|
|
+ :renewalForm="renewalForm"/>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -218,7 +226,7 @@ export default {
|
|
|
recordData:[],
|
|
|
tableColOpts:[
|
|
|
{
|
|
|
- label:'签约时间',
|
|
|
+ label:'运维时间',
|
|
|
key:'SigningTime'
|
|
|
},{
|
|
|
label:'到期时间',
|
|
@@ -230,6 +238,8 @@ export default {
|
|
|
],
|
|
|
activities:[],
|
|
|
showRenewal:false,
|
|
|
+ renewalDiaTitle:"添加续约",
|
|
|
+ renewalForm:{}
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -308,15 +318,49 @@ export default {
|
|
|
this.getBusinessDetail()
|
|
|
})
|
|
|
},
|
|
|
- //添加续约
|
|
|
- handleAddRenewal({signDate,expirationDate}){
|
|
|
- businessCustomInterence.addNewContract({
|
|
|
+ // 添加续约
|
|
|
+ addRenewalHandle(){
|
|
|
+ this.renewalForm={}
|
|
|
+ this.renewalDiaTitle="添加续约"
|
|
|
+ this.showRenewal=true
|
|
|
+ },
|
|
|
+ // 编辑续约
|
|
|
+ editRenewal(row){
|
|
|
+ this.renewalDiaTitle="编辑续约"
|
|
|
+ this.renewalForm={
|
|
|
+ id:row.EtaBusinessContractId,
|
|
|
+ signDate:row.SigningTime,
|
|
|
+ expirationDate:row.ExpiredTime
|
|
|
+ }
|
|
|
+ this.showRenewal=true
|
|
|
+ },
|
|
|
+ deleteRenewal(row){
|
|
|
+ this.$confirm("是否确认删除该签约信息?", "提示", {
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ businessCustomInterence.
|
|
|
+ removeContract({EtaBusinessContractId:row.EtaBusinessContractId})
|
|
|
+ .then(res=>{
|
|
|
+ if(res.Ret == 200){
|
|
|
+ this.$message.success("删除成功")
|
|
|
+ this.getTableData(Number(this.$route.query.id))
|
|
|
+ this.getTimeLineData(Number(this.$route.query.id))
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
+ //添加续约-保存
|
|
|
+ handleAddRenewal({signDate,expirationDate,id}){
|
|
|
+ // id-商家合约ID
|
|
|
+ let api = Number(id) ? 'editContract' : 'addNewContract'
|
|
|
+ businessCustomInterence[api]({
|
|
|
EtaBusinessId:Number(this.$route.query.id),
|
|
|
+ EtaBusinessContractId:Number(id),
|
|
|
SigningTime:signDate,
|
|
|
ExpiredTime:expirationDate
|
|
|
}).then(res=>{
|
|
|
if(res.Ret!==200) return
|
|
|
- this.$message.success('添加续约成功')
|
|
|
+ this.$message.success(this.renewalDiaTitle+'成功')
|
|
|
this.showRenewal=false
|
|
|
this.getTableData(Number(this.$route.query.id))
|
|
|
this.getTimeLineData(Number(this.$route.query.id))
|
|
@@ -359,7 +403,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.el-table{
|
|
|
- margin-top: 30px;
|
|
|
+ margin-top: 15px;
|
|
|
}
|
|
|
}
|
|
|
.business-other{
|