|
|
@@ -4,7 +4,7 @@
|
|
|
<el-drawer
|
|
|
title="编辑支出凭证"
|
|
|
:visible.sync="dialogVisible"
|
|
|
- size="600px"
|
|
|
+ size="800px"
|
|
|
direction="rtl"
|
|
|
append-to-body
|
|
|
@close="onClose">
|
|
|
@@ -18,6 +18,8 @@
|
|
|
v-model="isShow"
|
|
|
width="600"
|
|
|
trigger="click">
|
|
|
+ <el-input style="width:200px;margin-bottom: 10px" placeholder="搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
|
|
|
+ </el-input>
|
|
|
<tableNewLayout :layout="tablecols" :data="list" :opwidth="200" height="400px" :width="true" :custom="true" @rowClick="rowClick">
|
|
|
<template v-slot:customcol="scope">
|
|
|
<div>
|
|
|
@@ -55,12 +57,12 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="金额:" prop="amount">
|
|
|
- <el-input v-model="form.amount" placeholder="请填写金额"></el-input>
|
|
|
+ <el-input v-model="form.amount" placeholder="请填写金额" v-on:input="validateInput"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="收入凭证:" prop="source_hrcashbill">
|
|
|
- <tableNewLayout ref="tableRef" :checkbox="false" :layout="income.tablecols" :data="income.list" :opwidth="200" height="400px" :width="true" :custom="true" @selectionChange="selectionChange">
|
|
|
+ <tableNewLayout ref="tableRef" :checkbox="false" :layout="income.tablecols" :data="income.list" :opwidth="200" height="calc(100vh - 440px)" :width="true" :custom="true" @selectionChange="selectionChange">
|
|
|
<template v-slot:customcol="scope">
|
|
|
<div v-if="scope.column.columnname === 'amount'">
|
|
|
{{tool.formatAmount(scope.column.data[[scope.column.columnname]],2)}}
|
|
|
@@ -125,7 +127,7 @@ export default {
|
|
|
],
|
|
|
amount:[
|
|
|
{ required: true, message: '金额不可为空', trigger: 'change'},
|
|
|
- { pattern:/^[0-9]+\.{0,1}[0-9]{0,6}$/,message: '输入不合法,请输入数值',trigger: 'change'},
|
|
|
+ /* { pattern:/^[0-9]+\.{0,1}[0-9]{0,6}$/,message: '输入不合法,请输入数值',trigger: 'change'},*/
|
|
|
],
|
|
|
},
|
|
|
param:{
|
|
|
@@ -166,6 +168,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
+ validateInput() {
|
|
|
+ // 使用正则表达式验证输入是否为数值
|
|
|
+ this.form.amount = this.form.amount.replace(/[^-0-9][^\d.]/g, '');
|
|
|
+ },
|
|
|
onShow(){
|
|
|
this.form = Object.assign({},this.form,this.data)
|
|
|
this.income.list = this.data.detail
|
|
|
@@ -245,6 +251,11 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ 'isShow':function (val){
|
|
|
+ this.param.content.where.condition = ''
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.queryAccountType()
|
|
|
},
|
|
|
@@ -256,5 +267,7 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-
|
|
|
+/deep/ .el-input__validateIcon {
|
|
|
+ display: none;
|
|
|
+}
|
|
|
</style>
|