|
@@ -3,9 +3,8 @@
|
|
|
<el-form ref="form" :model="form" label-width="80px">
|
|
|
<el-form-item label="年" prop="year">
|
|
|
<el-date-picker
|
|
|
- v-model="form.year"
|
|
|
+ v-model="form.fYear"
|
|
|
type="year"
|
|
|
- @change="methodYear"
|
|
|
format="yyyy"
|
|
|
value-format="yyyy"
|
|
|
placeholder="选择年">
|
|
@@ -14,6 +13,13 @@
|
|
|
</el-form>
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<div class="tabSetting">
|
|
|
+ <el-button type="success"
|
|
|
+ plain
|
|
|
+ icon="el-icon-search"
|
|
|
+ style="margin-right: 10px"
|
|
|
+ @click="methodYear"
|
|
|
+ v-hasPermi="['anpin:closing:list']"
|
|
|
+ size="mini">查询</el-button>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
<div style="margin: 0 12px">
|
|
|
<el-button
|
|
@@ -90,11 +96,16 @@
|
|
|
:show-overflow-tooltip="true"
|
|
|
sortable
|
|
|
:fixed="item.fixed"
|
|
|
- />
|
|
|
- <el-table-column label="操作">
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button>结账</el-button>
|
|
|
- <el-button>反结账</el-button>
|
|
|
+ <span v-if="'fStatusName' === item.label">{{scope.row[item.label]}}</span>
|
|
|
+ <span v-else>{{scope.row[item.label]}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
+ <template slot-scope="scope" v-hasPermi="['anpin:closing:edit']">
|
|
|
+ <el-button type="text" v-if="scope.row.fStatusName === '是'" @click="cDoperation(scope.row,1)">反结账</el-button>
|
|
|
+ <el-button type="text" v-else @click="cDoperation(scope.row,2)">结账</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -105,7 +116,7 @@
|
|
|
:page.sync="form.pageNum"
|
|
|
:limit.sync="form.pageSize"
|
|
|
:page-sizes="[50,100, 200, 500, 1000]"
|
|
|
- @pagination="getList"
|
|
|
+ @pagination="methodYear"
|
|
|
/>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -113,47 +124,50 @@
|
|
|
<script>
|
|
|
import Cookies from 'js-cookie'
|
|
|
import { addSet, resetModule, select } from '@/api/system/set'
|
|
|
-
|
|
|
+import {checkOut,operation} from '@/api/monthEndClosing/monthEndClosing'
|
|
|
export default {
|
|
|
name: 'monthEndClosing',
|
|
|
data(){
|
|
|
return{
|
|
|
- form:{},
|
|
|
+ form:{
|
|
|
+ pageNum:1,
|
|
|
+ pageSize:10
|
|
|
+ },
|
|
|
total:0,
|
|
|
setRowList: [],
|
|
|
getRowList: [],
|
|
|
tableDate: [
|
|
|
{
|
|
|
surface: "1",
|
|
|
- label: "fName",
|
|
|
+ label: "fYear",
|
|
|
name: "年",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
},
|
|
|
{
|
|
|
surface: "2",
|
|
|
- label: "fFeesName",
|
|
|
+ label: "fMonth",
|
|
|
name: "月",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
},
|
|
|
{
|
|
|
surface: "3",
|
|
|
- label: "fMblno",
|
|
|
+ label: "fStart",
|
|
|
name: "开始日期",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
},
|
|
|
{
|
|
|
surface: "4",
|
|
|
- label: "fProductName",
|
|
|
+ label: "fEnf",
|
|
|
name: "结束日期",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
},
|
|
|
{
|
|
|
surface: "5",
|
|
|
- label: "fProductName",
|
|
|
+ label: "fStatusName",
|
|
|
name: "是否结账",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
@@ -175,7 +189,31 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
methodYear(){
|
|
|
-
|
|
|
+ console.log(this.form.fYear)
|
|
|
+ if (this.form.fYear !== undefined){
|
|
|
+ checkOut(this.form).then(res=>{
|
|
|
+ console.log(res.rows)
|
|
|
+ this.dataList = res.rows
|
|
|
+ this.total = res.total
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.$message.error('请选择年后再查询');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cDoperation(row,item){
|
|
|
+ let list = row
|
|
|
+ if (item === 1){
|
|
|
+ list.fStatus = 'F'
|
|
|
+ operation(row).then(res=>{
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ list.fStatus = 'T'
|
|
|
+ operation(row).then(res=>{
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.methodYear()
|
|
|
},
|
|
|
getList(){
|
|
|
|