Commit ec28876d by 前端

修复BUG

1 parent 2a5f4a4f
<!-- 管理其他变更明细弹窗 --> <!-- 管理其他变更明细弹窗 -->
<template> <template>
<d2-dialog <d2-dialog title="管理其他变更明细"
title="管理其他变更明细"
:is-visible="manageVisible" :is-visible="manageVisible"
class="manageOtherDialog" class="manageOtherDialog"
width="70%" width="70%"
...@@ -9,43 +8,35 @@ ...@@ -9,43 +8,35 @@
btn-ok-label="关闭" btn-ok-label="关闭"
@closeDialog="handleClose" @closeDialog="handleClose"
@confirmDialog="handleClose" @confirmDialog="handleClose"
:append-to-body="true" :append-to-body="true">
>
<div class="merchantInfo"> <div class="merchantInfo">
<span class="merchantName">{{ info.merchantName }}</span <span class="merchantName">{{ info.merchantName }}</span><span
><span class="merchantId">{{ info.merchantId }}</span> class="merchantId">{{ info.merchantId }}</span>
<span class="merchantYear" <span class="merchantYear">{{ statYear + "年" + info.statMonth + "月" }}
>{{ statYear + "年" + info.statMonth + "月" }} <el-button type="primary"
<el-button
type="primary"
size="small" size="small"
icon="el-icon-plus" icon="el-icon-plus"
@click="addRow" @click="addRow"
>新增</el-button :disabled="addflag">新增</el-button></span>
></span
>
</div> </div>
<div> <div>
<div class="header" slot="header"></div> <div class="header"
slot="header"></div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table <d2-table ref="recordTable"
ref="recordTable"
:table-data="tableData" :table-data="tableData"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
:has-page="false" :has-page="false">
> <div slot="otherAmount"
<div slot="otherAmount" slot-scope="scope"> slot-scope="scope">
<template v-if="scope.scope.isEdit"> <template v-if="scope.scope.isEdit">
<!-- v-model="tableData[scope.index].otherAmount" --> <!-- v-model="tableData[scope.index].otherAmount" -->
<span <span><el-input v-model="tableData[scope.index].otherAmount"
><el-input
v-model="tableData[scope.index].otherAmount"
style="width: 80%" style="width: 80%"
placeholder="请输入金额" placeholder="请输入金额"
@input="checkAmount($event, scope)" @input="checkAmount($event, scope)" /></span>
/></span>
<!-- {{ scope.index }} --> <!-- {{ scope.index }} -->
</template> </template>
<template v-else> <template v-else>
...@@ -56,22 +47,18 @@ ...@@ -56,22 +47,18 @@
}}</span> }}</span>
</template> </template>
</div> </div>
<div slot="remark" slot-scope="scope"> <div slot="remark"
slot-scope="scope">
<template v-if="scope.scope.isEdit"> <template v-if="scope.scope.isEdit">
<span <span><el-input v-model="scope.scope.remark"
><el-input
v-model="scope.scope.remark"
style="width: 80%" style="width: 80%"
placeholder="请输入变更说明" placeholder="请输入变更说明"
maxlength="50" maxlength="50" /></span>
/></span>
</template> </template>
<template v-else> <template v-else>
<el-tooltip <el-tooltip class="item"
class="item"
:content="scope.scope.remark" :content="scope.scope.remark"
placement="right" placement="right">
>
<span> <span>
{{ {{
scope.scope.remark scope.scope.remark
...@@ -84,22 +71,16 @@ ...@@ -84,22 +71,16 @@
</el-tooltip> </el-tooltip>
</template> </template>
</div> </div>
<div slot="tableOpt" slot-scope="scope"> <div slot="tableOpt"
slot-scope="scope">
<template v-if="scope.scope.isEdit"> <template v-if="scope.scope.isEdit">
<span <span><el-button type="text"
><el-button type="text" @click="add(scope.scope)" @click="add(scope.scope)">保存</el-button><el-button type="text"
>保存</el-button @click="cancel(scope.scope)">取消</el-button></span>
><el-button type="text" @click="cancel(scope.scope)"
>取消</el-button
></span
>
</template> </template>
<template v-else> <template v-else>
<span <span><el-button type="text"
><el-button type="text" @click="del(scope.scope)" @click="del(scope.scope)">删除</el-button></span>
>删除</el-button
></span
>
</template> </template>
</div> </div>
</d2-table> </d2-table>
...@@ -170,7 +151,8 @@ export default { ...@@ -170,7 +151,8 @@ export default {
} }
] ]
}, },
addForm: {} addForm: {},
addflag: false
} }
}, },
...@@ -181,7 +163,7 @@ export default { ...@@ -181,7 +163,7 @@ export default {
}, },
info: { info: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
statYear: { statYear: {
type: String, type: String,
...@@ -218,6 +200,7 @@ export default { ...@@ -218,6 +200,7 @@ export default {
remark: "", remark: "",
isEdit: true isEdit: true
} }
this.addflag = true
this.addForm = newRow this.addForm = newRow
this.tableData.unshift(newRow) this.tableData.unshift(newRow)
}, },
...@@ -261,6 +244,7 @@ export default { ...@@ -261,6 +244,7 @@ export default {
dfBalanceMonthOtherDetailInsertOrUpdate(params).then((res) => { dfBalanceMonthOtherDetailInsertOrUpdate(params).then((res) => {
this.notice.okTips() this.notice.okTips()
this.getList() this.getList()
this.addflag = false
}) })
// } // }
// }) // })
...@@ -293,6 +277,7 @@ export default { ...@@ -293,6 +277,7 @@ export default {
if (index > -1) { if (index > -1) {
this.tableData.splice(index, 1) this.tableData.splice(index, 1)
} }
this.addflag = false
}, },
del(row) { del(row) {
this.$confirm("是否确定删除?", "提示", { this.$confirm("是否确定删除?", "提示", {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!