|
|
|
|
@ -4,9 +4,9 @@
|
|
|
|
|
<el-form-item label="时间" prop="incomeYear">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="queryParams.incomeYear"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择时间">
|
|
|
|
|
type="year"
|
|
|
|
|
value-format="yyyy-01-01"
|
|
|
|
|
placeholder="请选择年份">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="收入" prop="income">
|
|
|
|
|
@ -139,9 +139,9 @@
|
|
|
|
|
<el-form-item label="时间" prop="incomeYear">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.incomeYear"
|
|
|
|
|
type="datetime"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
placeholder="请选择时间">
|
|
|
|
|
type="year"
|
|
|
|
|
value-format="yyyy"
|
|
|
|
|
placeholder="请选择年份">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="收入" prop="income">
|
|
|
|
|
@ -259,6 +259,11 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
handleQuery() {
|
|
|
|
|
if (this.queryParams.incomeYear) {
|
|
|
|
|
// 确保日期格式为 yyyy-MM-01
|
|
|
|
|
const formattedDate = `${this.queryParams.incomeYear}-01`;
|
|
|
|
|
this.queryParams.incomeYear = formattedDate;
|
|
|
|
|
}
|
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
@ -304,8 +309,10 @@ export default {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.buttonLoading = true;
|
|
|
|
|
const formattedDate = `${this.form.incomeYear}-01-01 00:00:00`;
|
|
|
|
|
const form = {...this.form, incomeYear: formattedDate};
|
|
|
|
|
if (this.form.id != null) {
|
|
|
|
|
updateTaxIncomeYear(this.form).then(response => {
|
|
|
|
|
updateTaxIncomeYear(form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
@ -313,7 +320,7 @@ export default {
|
|
|
|
|
this.buttonLoading = false;
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
addTaxIncomeYear(this.form).then(response => {
|
|
|
|
|
addTaxIncomeYear(form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
|