|
|
@@ -96,7 +96,7 @@
|
|
|
<kt-common-table :operationWidth="130" class="ktTable expendTable" ref="expendTable" :data="expendPageResult"
|
|
|
:columns="expendColumns" :showBatchDelete="false" :showOperation="true" :button1Name="expendButton1Name"
|
|
|
permsButton1="expenseManagement:accountInformation:changeStatus" button2Background="#92D050"
|
|
|
- button3Background="#f56c6c" button1Icon="el-icon-s-finance" @handleButton1="handleTableConfirm"
|
|
|
+ button3Background="#f56c6c" button1Icon="el-icon-s-finance" @handleButton1="handleTableConfirm($event)"
|
|
|
@findPage="getExpendData" :isshowpagination="true"></kt-common-table>
|
|
|
</el-dialog>
|
|
|
<!-- 收入弹框 -->
|
|
|
@@ -194,6 +194,31 @@
|
|
|
<el-button type="primary" @click="submitIncomeForm()" size="small">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="支出"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :before-close="closeExpenditure"
|
|
|
+ :visible.sync="expenditureVisible"
|
|
|
+ width="30%"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <el-radio-group v-model="expendRadio">
|
|
|
+ <el-radio :label="0">全部</el-radio>
|
|
|
+ <el-radio :label="1">部分支出</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-input v-show="expendRadio" v-model="payOutAmount" placeholder="请输入支出金额" style="width: 200px;margin-left: 20px;" size="small"></el-input>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="closeExpenditure" size="small">取 消</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="!formDisable"
|
|
|
+ type="primary"
|
|
|
+ @click="submitFormExpend"
|
|
|
+ size="small"
|
|
|
+ >确定支出</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -214,6 +239,10 @@ export default {
|
|
|
mounted() { },
|
|
|
data() {
|
|
|
return {
|
|
|
+ expenditureRow: {},
|
|
|
+ payOutAmount: 0, // 已转金额
|
|
|
+ expendRadio: 0,
|
|
|
+ expenditureVisible: false,
|
|
|
type: 1, //1为账户信息,2为卡信息 账户和卡判断条件
|
|
|
/**
|
|
|
* 账户收入模块
|
|
|
@@ -811,25 +840,60 @@ export default {
|
|
|
})
|
|
|
.then(data != null ? data.callback : "");
|
|
|
},
|
|
|
- //弹框确认支出按钮事件
|
|
|
- handleTableConfirm(index) {
|
|
|
- this.$confirm("确认把该条数据设为已转账状态吗?", "提示", {
|
|
|
- type: "warning",
|
|
|
+ // 确定支出
|
|
|
+ submitFormExpend() {
|
|
|
+ const num = this.expenditureRow.applyAmount - this.expenditureRow.payoutAmount
|
|
|
+ if (num == 0) {
|
|
|
+ this.$message.error('支出金额不足')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.payOutAmount > num) {
|
|
|
+ this.$message.error('支出金额不足')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.expendRadio) {
|
|
|
+ this.payOutAmount = num
|
|
|
+ }
|
|
|
+ this.$api.expense.updateExpenditure({
|
|
|
+ excelAccountOperateId: this.expenditureRow.excelAccountOperateId,
|
|
|
+ payOutAmount: this.payOutAmount
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success('支出成功')
|
|
|
+ this.queryStaffInfo()
|
|
|
+ this.closeExpenditure()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- this.$api.expense
|
|
|
- .updateTransferFlag(index.row.excelAccountOperateId)
|
|
|
- .then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success("确认转账成功");
|
|
|
- this.getExpendData();
|
|
|
- this.findPage();
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => { });
|
|
|
+ },
|
|
|
+ closeExpenditure() {
|
|
|
+ this.expenditureRow = {}
|
|
|
+ this.payOutAmount = 0
|
|
|
+ this.expendRadio = 0
|
|
|
+ this.expenditureVisible = false
|
|
|
+ },
|
|
|
+ //弹框确认支出按钮事件
|
|
|
+ handleTableConfirm(e) {
|
|
|
+ this.expenditureRow = e.row
|
|
|
+ this.expenditureVisible = true
|
|
|
+ // this.$confirm("确认把该条数据设为已转账状态吗?", "提示", {
|
|
|
+ // type: "warning",
|
|
|
+ // })
|
|
|
+ // .then(() => {
|
|
|
+ // this.$api.expense
|
|
|
+ // .updateTransferFlag(index.row.excelAccountOperateId)
|
|
|
+ // .then((res) => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.$message.success("确认转账成功");
|
|
|
+ // this.getExpendData();
|
|
|
+ // this.findPage();
|
|
|
+ // } else {
|
|
|
+ // this.$message.error(res.msg);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // })
|
|
|
+ // .catch(() => { });
|
|
|
},
|
|
|
//选择证书有效日期区间
|
|
|
setDateInterval(e) {
|