vue版本上线

This commit is contained in:
季圣华
2021-04-07 23:53:57 +08:00
parent 76a0033a4e
commit f4ef5aa067
803 changed files with 171959 additions and 27 deletions

View File

@@ -0,0 +1,143 @@
<template>
<a-card :bordered="false" class="card-area">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-form-item label="单据编号" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-input placeholder="请输入单据编号" v-model="queryParam.billNo"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="10">
<a-form-item label="单据日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-range-picker
style="width: 210px"
v-model="queryParam.createTimeRange"
format="YYYY-MM-DD"
:placeholder="['开始时间', '结束时间']"
@change="onDateChange"
@ok="onDateOk"
/>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
</a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<!-- table区域-end -->
<!-- 表单区域 -->
<advance-in-modal ref="modalForm" @ok="modalFormOk"></advance-in-modal>
</a-card>
</template>
<script>
import AdvanceInModal from './modules/AdvanceInModal'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { FinancialListMixin } from './mixins/FinancialListMixin'
import JDate from '@/components/jeecg/JDate'
export default {
name: "AdvanceInList",
mixins:[JeecgListMixin, FinancialListMixin],
components: {
AdvanceInModal,
JDate
},
data () {
return {
// 查询条件
queryParam: {
billNo: "",
searchMaterial: "",
type: "收预付款"
},
labelCol: {
xs: { span: 24 },
sm: { span: 8 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:40,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{ title: '付款会员', dataIndex: 'organName',width:140},
{ title: '单据编号', dataIndex: 'billNo',width:160},
{ title: '操作员', dataIndex: 'userName',width:80},
{ title: '单据日期 ', dataIndex: 'billTimeStr',width:160},
{ title: '合计', dataIndex: 'totalPrice',width:80},
{ title: '备注', dataIndex: 'remark',width:200},
{
title: '操作',
dataIndex: 'action',
align:"center",
scopedSlots: { customRender: 'action' },
}
],
url: {
list: "/accountHead/list",
delete: "/accountHead/delete",
deleteBatch: "/accountHead/deleteBatch"
}
}
},
computed: {
},
methods: {
}
}
</script>
<style scoped>
@import '~@assets/less/common.less'
</style>

View File

@@ -0,0 +1,142 @@
<template>
<a-card :bordered="false" class="card-area">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-form-item label="单据编号" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-input placeholder="请输入单据编号" v-model="queryParam.billNo"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="10">
<a-form-item label="单据日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-range-picker
style="width: 210px"
v-model="queryParam.createTimeRange"
format="YYYY-MM-DD"
:placeholder="['开始时间', '结束时间']"
@change="onDateChange"
@ok="onDateOk"
/>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
</a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<!-- table区域-end -->
<!-- 表单区域 -->
<giro-modal ref="modalForm" @ok="modalFormOk"></giro-modal>
</a-card>
</template>
<script>
import GiroModal from './modules/GiroModal'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { FinancialListMixin } from './mixins/FinancialListMixin'
import JDate from '@/components/jeecg/JDate'
export default {
name: "GiroList",
mixins:[JeecgListMixin, FinancialListMixin],
components: {
GiroModal,
JDate
},
data () {
return {
// 查询条件
queryParam: {
billNo: "",
searchMaterial: "",
type: "转账"
},
labelCol: {
xs: { span: 24 },
sm: { span: 8 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:40,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{ title: '单据编号', dataIndex: 'billNo',width:160},
{ title: '操作员', dataIndex: 'userName',width:80},
{ title: '单据日期 ', dataIndex: 'billTimeStr',width:160},
{ title: '合计', dataIndex: 'totalPrice',width:80},
{ title: '备注', dataIndex: 'remark',width:200},
{
title: '操作',
dataIndex: 'action',
align:"center",
scopedSlots: { customRender: 'action' },
}
],
url: {
list: "/accountHead/list",
delete: "/accountHead/delete",
deleteBatch: "/accountHead/deleteBatch"
}
}
},
computed: {
},
methods: {
}
}
</script>
<style scoped>
@import '~@assets/less/common.less'
</style>

View File

@@ -0,0 +1,143 @@
<template>
<a-card :bordered="false" class="card-area">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-form-item label="单据编号" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-input placeholder="请输入单据编号" v-model="queryParam.billNo"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="10">
<a-form-item label="单据日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-range-picker
style="width: 210px"
v-model="queryParam.createTimeRange"
format="YYYY-MM-DD"
:placeholder="['开始时间', '结束时间']"
@change="onDateChange"
@ok="onDateOk"
/>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
</a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<!-- table区域-end -->
<!-- 表单区域 -->
<item-in-modal ref="modalForm" @ok="modalFormOk"></item-in-modal>
</a-card>
</template>
<script>
import ItemInModal from './modules/ItemInModal'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { FinancialListMixin } from './mixins/FinancialListMixin'
import JDate from '@/components/jeecg/JDate'
export default {
name: "ItemInList",
mixins:[JeecgListMixin, FinancialListMixin],
components: {
ItemInModal,
JDate
},
data () {
return {
// 查询条件
queryParam: {
billNo: "",
searchMaterial: "",
type: "收入"
},
labelCol: {
xs: { span: 24 },
sm: { span: 8 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:40,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{ title: '往来单位', dataIndex: 'organName',width:140},
{ title: '单据编号', dataIndex: 'billNo',width:160},
{ title: '操作员', dataIndex: 'userName',width:80},
{ title: '单据日期 ', dataIndex: 'billTimeStr',width:160},
{ title: '合计', dataIndex: 'totalPrice',width:80},
{ title: '备注', dataIndex: 'remark',width:200},
{
title: '操作',
dataIndex: 'action',
align:"center",
scopedSlots: { customRender: 'action' },
}
],
url: {
list: "/accountHead/list",
delete: "/accountHead/delete",
deleteBatch: "/accountHead/deleteBatch"
}
}
},
computed: {
},
methods: {
}
}
</script>
<style scoped>
@import '~@assets/less/common.less'
</style>

View File

@@ -0,0 +1,143 @@
<template>
<a-card :bordered="false" class="card-area">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-form-item label="单据编号" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-input placeholder="请输入单据编号" v-model="queryParam.billNo"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="10">
<a-form-item label="单据日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-range-picker
style="width: 210px"
v-model="queryParam.createTimeRange"
format="YYYY-MM-DD"
:placeholder="['开始时间', '结束时间']"
@change="onDateChange"
@ok="onDateOk"
/>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
</a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<!-- table区域-end -->
<!-- 表单区域 -->
<item-out-modal ref="modalForm" @ok="modalFormOk"></item-out-modal>
</a-card>
</template>
<script>
import ItemOutModal from './modules/ItemOutModal'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { FinancialListMixin } from './mixins/FinancialListMixin'
import JDate from '@/components/jeecg/JDate'
export default {
name: "ItemOutList",
mixins:[JeecgListMixin, FinancialListMixin],
components: {
ItemOutModal,
JDate
},
data () {
return {
// 查询条件
queryParam: {
billNo: "",
searchMaterial: "",
type: "支出"
},
labelCol: {
xs: { span: 24 },
sm: { span: 8 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:40,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{ title: '往来单位', dataIndex: 'organName',width:140},
{ title: '单据编号', dataIndex: 'billNo',width:160},
{ title: '操作员', dataIndex: 'userName',width:80},
{ title: '单据日期 ', dataIndex: 'billTimeStr',width:160},
{ title: '合计', dataIndex: 'totalPrice',width:80},
{ title: '备注', dataIndex: 'remark',width:200},
{
title: '操作',
dataIndex: 'action',
align:"center",
scopedSlots: { customRender: 'action' },
}
],
url: {
list: "/accountHead/list",
delete: "/accountHead/delete",
deleteBatch: "/accountHead/deleteBatch"
}
}
},
computed: {
},
methods: {
}
}
</script>
<style scoped>
@import '~@assets/less/common.less'
</style>

View File

@@ -0,0 +1,143 @@
<template>
<a-card :bordered="false" class="card-area">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-form-item label="单据编号" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-input placeholder="请输入单据编号" v-model="queryParam.billNo"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="10">
<a-form-item label="单据日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-range-picker
style="width: 210px"
v-model="queryParam.createTimeRange"
format="YYYY-MM-DD"
:placeholder="['开始时间', '结束时间']"
@change="onDateChange"
@ok="onDateOk"
/>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
</a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<!-- table区域-end -->
<!-- 表单区域 -->
<money-in-modal ref="modalForm" @ok="modalFormOk"></money-in-modal>
</a-card>
</template>
<script>
import MoneyInModal from './modules/MoneyInModal'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { FinancialListMixin } from './mixins/FinancialListMixin'
import JDate from '@/components/jeecg/JDate'
export default {
name: "MoneyInList",
mixins:[JeecgListMixin, FinancialListMixin],
components: {
MoneyInModal,
JDate
},
data () {
return {
// 查询条件
queryParam: {
billNo: "",
searchMaterial: "",
type: "收款"
},
labelCol: {
xs: { span: 24 },
sm: { span: 8 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:40,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{ title: '付款单位', dataIndex: 'organName',width:140},
{ title: '单据编号', dataIndex: 'billNo',width:160},
{ title: '操作员', dataIndex: 'userName',width:80},
{ title: '单据日期 ', dataIndex: 'billTimeStr',width:160},
{ title: '合计', dataIndex: 'totalPrice',width:80},
{ title: '备注', dataIndex: 'remark',width:200},
{
title: '操作',
dataIndex: 'action',
align:"center",
scopedSlots: { customRender: 'action' },
}
],
url: {
list: "/accountHead/list",
delete: "/accountHead/delete",
deleteBatch: "/accountHead/deleteBatch"
}
}
},
computed: {
},
methods: {
}
}
</script>
<style scoped>
@import '~@assets/less/common.less'
</style>

View File

@@ -0,0 +1,143 @@
<template>
<a-card :bordered="false" class="card-area">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-form-item label="单据编号" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-input placeholder="请输入单据编号" v-model="queryParam.billNo"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="10">
<a-form-item label="单据日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-range-picker
style="width: 210px"
v-model="queryParam.createTimeRange"
format="YYYY-MM-DD"
:placeholder="['开始时间', '结束时间']"
@change="onDateChange"
@ok="onDateOk"
/>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
</a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<!-- table区域-end -->
<!-- 表单区域 -->
<money-out-modal ref="modalForm" @ok="modalFormOk"></money-out-modal>
</a-card>
</template>
<script>
import MoneyOutModal from './modules/MoneyOutModal'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { FinancialListMixin } from './mixins/FinancialListMixin'
import JDate from '@/components/jeecg/JDate'
export default {
name: "MoneyOutList",
mixins:[JeecgListMixin, FinancialListMixin],
components: {
MoneyOutModal,
JDate
},
data () {
return {
// 查询条件
queryParam: {
billNo: "",
searchMaterial: "",
type: "付款"
},
labelCol: {
xs: { span: 24 },
sm: { span: 8 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:40,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{ title: '收款单位', dataIndex: 'organName',width:140},
{ title: '单据编号', dataIndex: 'billNo',width:160},
{ title: '操作员', dataIndex: 'userName',width:80},
{ title: '单据日期 ', dataIndex: 'billTimeStr',width:160},
{ title: '合计', dataIndex: 'totalPrice',width:80},
{ title: '备注', dataIndex: 'remark',width:200},
{
title: '操作',
dataIndex: 'action',
align:"center",
scopedSlots: { customRender: 'action' },
}
],
url: {
list: "/accountHead/list",
delete: "/accountHead/delete",
deleteBatch: "/accountHead/deleteBatch"
}
}
},
computed: {
},
methods: {
}
}
</script>
<style scoped>
@import '~@assets/less/common.less'
</style>

View File

@@ -0,0 +1,49 @@
export const FinancialListMixin = {
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
isBatchDelEnabled: function () {
for (let i = 0; i < this.selectedRowKeys.length; i++) {
if (!this.selectionRows[i].actionsEnabled.delete) {
return false;
}
}
return true;
}
},
methods: {
myHandleAdd() {
this.$refs.modalForm.action = "add";
this.handleAdd();
},
myHandleEdit(record) {
this.$refs.modalForm.action = "edit";
this.handleEdit(record);
},
myHandleDetail(record) {
this.$refs.modalForm.action = "detail";
this.handleDetail(record);
},
handleApprove(record) {
this.$refs.modalForm.action = "approve";
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "审核";
},
searchReset() {
this.queryParam = {
type: this.queryParam.type
}
this.loadData(1);
},
onDateChange: function (value, dateString) {
this.queryParam.beginTime=dateString[0];
this.queryParam.endTime=dateString[1];
},
onDateOk(value) {
console.log(value);
}
}
}

View File

@@ -0,0 +1,174 @@
import { VALIDATE_NO_PASSED, validateFormAndTables } from '@/utils/JEditableTableUtil'
import {findBySelectSup,findBySelectCus,findBySelectRetail,findStockByDepotAndBarCode,getAccount,getPersonByType,findInOutItemByParam} from '@/api/api'
import { getAction,putAction } from '@/api/manage'
import { getMpListShort, getNowFormatDateTime } from "@/utils/util"
import Vue from 'vue'
export const FinancialModalMixin = {
data() {
return {
action: '',
supList: [],
cusList: [],
retailList: [],
personList: [],
accountList: [],
spans: {
labelCol1: {span: 2},
wrapperCol1: {span: 22},
//1_5: 分为1.5列相当于占了2/3
labelCol1_5: { span: 3 },
wrapperCol1_5: { span: 21 },
labelCol2: {span: 4},
wrapperCol2: {span: 20},
labelCol3: {span: 6},
wrapperCol3: {span: 18},
labelCol6: {span: 12},
wrapperCol6: {span: 12}
},
};
},
created () {
this.initSupplier()
this.initCustomer()
this.initRetail()
this.initPerson()
},
computed: {
readOnly: function() {
return this.action !== "add" && this.action !== "edit";
}
},
methods: {
addInit(amountNum) {
this.$nextTick(() => {
this.form.setFieldsValue({'billTime':getNowFormatDateTime()})
});
getAction('/sequence/buildNumber').then((res) => {
if (res && res.code === 200) {
this.form.setFieldsValue({'billNo':amountNum + res.data.defaultNumber})
}
})
},
initSupplier() {
let that = this;
findBySelectSup({}).then((res)=>{
if(res) {
that.supList = res;
}
});
},
initCustomer() {
let that = this;
findBySelectCus({}).then((res)=>{
if(res) {
that.cusList = res;
}
});
},
initRetail() {
let that = this;
findBySelectRetail({}).then((res)=>{
if(res) {
that.retailList = res;
}
});
},
initPerson() {
let that = this;
getPersonByType({type:'财务员'}).then((res)=>{
if(res && res.code === 200) {
that.personList = res.data.personList;
}
})
},
initInOutItem(type) {
let that = this;
findInOutItemByParam({type:type}).then((res)=>{
if(res) {
for(let i=0; i<res.length; i++) {
let inOutItemInfo = {};
inOutItemInfo.value = res[i].id+'' //注意-此处value必须为字符串格式
inOutItemInfo.text = res[i].name
inOutItemInfo.title = res[i].name
for(let item of that.accountTable.columns){
if(item.key == 'inOutItemId') {
item.options.push(inOutItemInfo)
}
}
}
}
})
},
//账户-用于主表
initAccount(){
let that = this;
getAccount({}).then((res)=>{
if(res && res.code === 200) {
that.accountList = res.data.accountList;
}
})
},
//账户-用于明细
initDetailAccount(){
let that = this;
getAccount({}).then((res)=>{
if(res && res.code === 200) {
let list = res.data.accountList;
for(let i=0; i<list.length; i++) {
let accountInfo = {};
accountInfo.value = list[i].id+'' //注意-此处value必须为字符串格式
accountInfo.text = list[i].name
accountInfo.title = list[i].name
for(let item of that.accountTable.columns){
if(item.key == 'accountId') {
item.options.push(accountInfo)
}
}
}
}
})
},
//单元值改变一个字符就触发一次
onValueChange(event) {
let that = this
const { type, row, column, value, target } = event
let param,operNumber,unitPrice,allPrice,taxRate,taxMoney,taxLastMoney
switch(column.key) {
case "operNumber":
unitPrice = row.unitPrice
taxRate = row.taxRate
allPrice = unitPrice*value
taxMoney =(taxRate/100)*allPrice
taxLastMoney = allPrice + taxMoney
target.setValues([{rowKey: row.id, values: {allPrice: allPrice, taxMoney: taxMoney, taxLastMoney: taxLastMoney}}])
target.recalcAllStatisticsColumns()
let allTaxLastMoney = target.statisticsColumns.taxLastMoney
this.$nextTick(() => {
this.form.setFieldsValue({'discount':0,'discountMoney':0,'discountLastMoney':allTaxLastMoney,
'changeAmount':allTaxLastMoney,'debt':0})
});
break;
case "unitPrice":
operNumber = row.operNumber
target.setValues([{rowKey: row.id, values: {allPrice: value*operNumber}}])
target.recalcAllStatisticsColumns()
break;
case "allPrice":
operNumber = row.operNumber
target.setValues([{rowKey: row.id, values: {unitPrice: value/operNumber}}])
target.recalcAllStatisticsColumns()
break;
}
},
//根据仓库和条码查询库存
getStockByDepotBarCode(row, target){
findStockByDepotAndBarCode({ depotId: row.depotId, barCode: row.barCode }).then((res) => {
if (res && res.code === 200) {
target.setValues([{rowKey: row.id, values: {stock: res.data.stock}}])
target.recalcAllStatisticsColumns()
}
})
}
}
}

View File

@@ -0,0 +1,180 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
:confirmLoading="confirmLoading"
:maskClosable="false"
:keyboard="false"
:forceRender="true"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row class="form-row" :gutter="24">
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款会员">
<a-select placeholder="选择付款会员" v-decorator="[ 'organId' ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in retailList" :key="index" :value="item.id">
{{ item.supplier }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="经手人">
<a-select placeholder="选择经手人" v-decorator="[ 'handsPersonId' ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in personList" :key="index" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
<j-date v-decorator="['billTime']" :show-time="true"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
<a-input placeholder="请输入单据编号" v-decorator.trim="[ 'billNo' ]" />
</a-form-item>
</a-col>
</a-row>
<j-editable-table
:ref="refKeys[0]"
:loading="accountTable.loading"
:columns="accountTable.columns"
:dataSource="accountTable.dataSource"
:maxHeight="300"
:rowNumber="false"
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange" />
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
<a-textarea :rows="2" placeholder="请输入备注" v-decorator="[ 'remark' ]" style="margin-top:8px;"/>
</a-form-item>
</a-col>
</a-row>
<a-row class="form-row" :gutter="24">
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠金额">
<a-input placeholder="请输入优惠金额" v-decorator.trim="[ 'changeAmount' ]" />
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
</a-row>
</a-form>
</a-spin>
</j-modal>
</template>
<script>
import pick from 'lodash.pick'
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
import JDate from '@/components/jeecg/JDate'
export default {
name: "MoneyInModal",
mixins: [JEditableTableMixin, FinancialModalMixin],
components: {
JDate
},
data () {
return {
title:"操作",
width: '1200px',
moreStatus: false,
// 新增时子表默认添加几行空数据
addDefaultRowNum: 1,
visible: false,
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
refKeys: ['accountDataTable', ],
activeKey: 'accountDataTable',
accountTable: {
loading: false,
dataSource: [],
columns: [
{ title: '账户名称',key: 'accountId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: []},
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}' },
{ title: '备注',key: 'remark', width: '30%', type: FormTypes.input, placeholder: '请选择${title}'}
]
},
confirmLoading: false,
validatorRules:{
billTime:{
rules: [
{ required: true, message: '请输入单据日期!' }
]
}
},
url: {
add: '/accountHead/addAccountHeadAndDetail',
edit: '/accountHead/updateAccountHeadAndDetail',
detailList: '/accountItem/getDetailList'
}
}
},
created () {
this.initDetailAccount()
},
methods: {
//调用完edit()方法之后会自动调用此方法
editAfter() {
if (this.action === 'add') {
this.addInit("SYF")
} else {
this.model.billTime = this.model.billTimeStr
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'organId', 'handsPersonId', 'billTime', 'billNo', 'remark', 'changeAmount'))
});
// 加载子表数据
let params = {
headerId: this.model.id
}
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.accountTable);
}
},
//提交单据时整理成formData
classifyIntoFormData(allValues) {
let totalPrice = 0
let billMain = Object.assign(this.model, allValues.formValue)
let detailArr = allValues.tablesValue[0].values
billMain.type = '收预付款'
for(let item of detailArr){
totalPrice += item.eachAmount-0
}
billMain.totalPrice = totalPrice
if(this.model.id){
billMain.id = this.model.id
}
return {
info: JSON.stringify(billMain),
rows: JSON.stringify(detailArr),
}
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,182 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
:confirmLoading="confirmLoading"
:maskClosable="false"
:keyboard="false"
:forceRender="true"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row class="form-row" :gutter="24">
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="经手人">
<a-select placeholder="选择经手人" v-decorator="[ 'handsPersonId' ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in personList" :key="index" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
<j-date v-decorator="['billTime']" :show-time="true"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
<a-input placeholder="请输入单据编号" v-decorator.trim="[ 'billNo' ]" />
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
</a-row>
<j-editable-table
:ref="refKeys[0]"
:loading="accountTable.loading"
:columns="accountTable.columns"
:dataSource="accountTable.dataSource"
:maxHeight="300"
:rowNumber="false"
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange" />
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
<a-textarea :rows="2" placeholder="请输入备注" v-decorator="[ 'remark' ]" style="margin-top:8px;"/>
</a-form-item>
</a-col>
</a-row>
<a-row class="form-row" :gutter="24">
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款账户">
<a-select placeholder="选择付款账户" v-decorator="[ 'accountId' ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="实付金额">
<a-input placeholder="请输入实付金额" v-decorator.trim="[ 'changeAmount' ]" />
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
</a-row>
</a-form>
</a-spin>
</j-modal>
</template>
<script>
import pick from 'lodash.pick'
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
import JDate from '@/components/jeecg/JDate'
export default {
name: "MoneyInModal",
mixins: [JEditableTableMixin, FinancialModalMixin],
components: {
JDate
},
data () {
return {
title:"操作",
width: '1200px',
moreStatus: false,
// 新增时子表默认添加几行空数据
addDefaultRowNum: 1,
visible: false,
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
refKeys: ['accountDataTable', ],
activeKey: 'accountDataTable',
accountTable: {
loading: false,
dataSource: [],
columns: [
{ title: '账户名称',key: 'accountId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: []},
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}' },
{ title: '备注',key: 'remark', width: '30%', type: FormTypes.input, placeholder: '请选择${title}'}
]
},
confirmLoading: false,
validatorRules:{
billTime:{
rules: [
{ required: true, message: '请输入单据日期!' }
]
}
},
url: {
add: '/accountHead/addAccountHeadAndDetail',
edit: '/accountHead/updateAccountHeadAndDetail',
detailList: '/accountItem/getDetailList'
}
}
},
created () {
this.initAccount()
this.initDetailAccount()
},
methods: {
//调用完edit()方法之后会自动调用此方法
editAfter() {
if (this.action === 'add') {
this.addInit("ZZ")
} else {
this.model.billTime = this.model.billTimeStr
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'organId', 'handsPersonId', 'billTime', 'billNo', 'remark',
'accountId', 'changeAmount'))
});
// 加载子表数据
let params = {
headerId: this.model.id
}
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.accountTable);
}
},
//提交单据时整理成formData
classifyIntoFormData(allValues) {
let totalPrice = 0
let billMain = Object.assign(this.model, allValues.formValue)
let detailArr = allValues.tablesValue[0].values
billMain.type = '转账'
for(let item of detailArr){
totalPrice += item.eachAmount-0
}
billMain.totalPrice = totalPrice
if(this.model.id){
billMain.id = this.model.id
}
return {
info: JSON.stringify(billMain),
rows: JSON.stringify(detailArr),
}
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,189 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
:confirmLoading="confirmLoading"
:maskClosable="false"
:keyboard="false"
:forceRender="true"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row class="form-row" :gutter="24">
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="往来单位">
<a-select placeholder="选择往来单位" v-decorator="[ 'organId' ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in cusList" :key="index" :value="item.id">
{{ item.supplier }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="经手人">
<a-select placeholder="选择经手人" v-decorator="[ 'handsPersonId' ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in personList" :key="index" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
<j-date v-decorator="['billTime']" :show-time="true"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
<a-input placeholder="请输入单据编号" v-decorator.trim="[ 'billNo' ]" />
</a-form-item>
</a-col>
</a-row>
<j-editable-table
:ref="refKeys[0]"
:loading="accountTable.loading"
:columns="accountTable.columns"
:dataSource="accountTable.dataSource"
:maxHeight="300"
:rowNumber="false"
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange" />
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
<a-textarea :rows="2" placeholder="请输入备注" v-decorator="[ 'remark' ]" style="margin-top:8px;"/>
</a-form-item>
</a-col>
</a-row>
<a-row class="form-row" :gutter="24">
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款账户">
<a-select placeholder="选择收款账户" v-decorator="[ 'accountId' ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款金额">
<a-input placeholder="请输入收款金额" v-decorator.trim="[ 'changeAmount' ]" />
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
</a-row>
</a-form>
</a-spin>
</j-modal>
</template>
<script>
import pick from 'lodash.pick'
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
import JDate from '@/components/jeecg/JDate'
export default {
name: "ItemInModal",
mixins: [JEditableTableMixin, FinancialModalMixin],
components: {
JDate
},
data () {
return {
title:"操作",
width: '1200px',
moreStatus: false,
// 新增时子表默认添加几行空数据
addDefaultRowNum: 1,
visible: false,
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
refKeys: ['accountDataTable', ],
activeKey: 'accountDataTable',
accountTable: {
loading: false,
dataSource: [],
columns: [
{ title: '收入项目',key: 'inOutItemId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: []},
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}' },
{ title: '备注',key: 'remark', width: '30%', type: FormTypes.input, placeholder: '请选择${title}'}
]
},
confirmLoading: false,
validatorRules:{
billTime:{
rules: [
{ required: true, message: '请输入单据日期!' }
]
}
},
url: {
add: '/accountHead/addAccountHeadAndDetail',
edit: '/accountHead/updateAccountHeadAndDetail',
detailList: '/accountItem/getDetailList'
}
}
},
created () {
this.initInOutItem('in')
this.initAccount()
},
methods: {
//调用完edit()方法之后会自动调用此方法
editAfter() {
if (this.action === 'add') {
this.addInit("SR")
} else {
this.model.billTime = this.model.billTimeStr
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'organId', 'handsPersonId', 'billTime', 'billNo', 'remark',
'accountId','changeAmount'))
});
// 加载子表数据
let params = {
headerId: this.model.id
}
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.accountTable);
}
},
//提交单据时整理成formData
classifyIntoFormData(allValues) {
let totalPrice = 0
let billMain = Object.assign(this.model, allValues.formValue)
let detailArr = allValues.tablesValue[0].values
billMain.type = '收入'
for(let item of detailArr){
totalPrice += item.eachAmount-0
}
billMain.totalPrice = totalPrice
if(this.model.id){
billMain.id = this.model.id
}
return {
info: JSON.stringify(billMain),
rows: JSON.stringify(detailArr),
}
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,189 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
:confirmLoading="confirmLoading"
:maskClosable="false"
:keyboard="false"
:forceRender="true"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row class="form-row" :gutter="24">
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="往来单位">
<a-select placeholder="选择往来单位" v-decorator="[ 'organId' ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in supList" :key="index" :value="item.id">
{{ item.supplier }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="经手人">
<a-select placeholder="选择经手人" v-decorator="[ 'handsPersonId' ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in personList" :key="index" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
<j-date v-decorator="['billTime']" :show-time="true"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
<a-input placeholder="请输入单据编号" v-decorator.trim="[ 'billNo' ]" />
</a-form-item>
</a-col>
</a-row>
<j-editable-table
:ref="refKeys[0]"
:loading="accountTable.loading"
:columns="accountTable.columns"
:dataSource="accountTable.dataSource"
:maxHeight="300"
:rowNumber="false"
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange" />
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
<a-textarea :rows="2" placeholder="请输入备注" v-decorator="[ 'remark' ]" style="margin-top:8px;"/>
</a-form-item>
</a-col>
</a-row>
<a-row class="form-row" :gutter="24">
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款账户">
<a-select placeholder="选择付款账户" v-decorator="[ 'accountId' ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款金额">
<a-input placeholder="请输入付款金额" v-decorator.trim="[ 'changeAmount' ]" />
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
</a-row>
</a-form>
</a-spin>
</j-modal>
</template>
<script>
import pick from 'lodash.pick'
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
import JDate from '@/components/jeecg/JDate'
export default {
name: "ItemOutModal",
mixins: [JEditableTableMixin, FinancialModalMixin],
components: {
JDate
},
data () {
return {
title:"操作",
width: '1200px',
moreStatus: false,
// 新增时子表默认添加几行空数据
addDefaultRowNum: 1,
visible: false,
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
refKeys: ['accountDataTable', ],
activeKey: 'accountDataTable',
accountTable: {
loading: false,
dataSource: [],
columns: [
{ title: '支出项目',key: 'inOutItemId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: []},
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}' },
{ title: '备注',key: 'remark', width: '30%', type: FormTypes.input, placeholder: '请选择${title}'}
]
},
confirmLoading: false,
validatorRules:{
billTime:{
rules: [
{ required: true, message: '请输入单据日期!' }
]
}
},
url: {
add: '/accountHead/addAccountHeadAndDetail',
edit: '/accountHead/updateAccountHeadAndDetail',
detailList: '/accountItem/getDetailList'
}
}
},
created () {
this.initInOutItem('out')
this.initAccount()
},
methods: {
//调用完edit()方法之后会自动调用此方法
editAfter() {
if (this.action === 'add') {
this.addInit("ZC")
} else {
this.model.billTime = this.model.billTimeStr
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'organId', 'handsPersonId', 'billTime', 'billNo', 'remark',
'accountId','changeAmount'))
});
// 加载子表数据
let params = {
headerId: this.model.id
}
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.accountTable);
}
},
//提交单据时整理成formData
classifyIntoFormData(allValues) {
let totalPrice = 0
let billMain = Object.assign(this.model, allValues.formValue)
let detailArr = allValues.tablesValue[0].values
billMain.type = '支出'
for(let item of detailArr){
totalPrice += item.eachAmount-0
}
billMain.totalPrice = totalPrice
if(this.model.id){
billMain.id = this.model.id
}
return {
info: JSON.stringify(billMain),
rows: JSON.stringify(detailArr),
}
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,180 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
:confirmLoading="confirmLoading"
:maskClosable="false"
:keyboard="false"
:forceRender="true"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row class="form-row" :gutter="24">
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款单位">
<a-select placeholder="选择付款单位" v-decorator="[ 'organId' ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in cusList" :key="index" :value="item.id">
{{ item.supplier }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="经手人">
<a-select placeholder="选择经手人" v-decorator="[ 'handsPersonId' ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in personList" :key="index" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
<j-date v-decorator="['billTime']" :show-time="true"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
<a-input placeholder="请输入单据编号" v-decorator.trim="[ 'billNo' ]" />
</a-form-item>
</a-col>
</a-row>
<j-editable-table
:ref="refKeys[0]"
:loading="accountTable.loading"
:columns="accountTable.columns"
:dataSource="accountTable.dataSource"
:maxHeight="300"
:rowNumber="false"
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange" />
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
<a-textarea :rows="2" placeholder="请输入备注" v-decorator="[ 'remark' ]" style="margin-top:8px;"/>
</a-form-item>
</a-col>
</a-row>
<a-row class="form-row" :gutter="24">
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠金额">
<a-input placeholder="请输入优惠金额" v-decorator.trim="[ 'changeAmount' ]" />
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
</a-row>
</a-form>
</a-spin>
</j-modal>
</template>
<script>
import pick from 'lodash.pick'
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
import JDate from '@/components/jeecg/JDate'
export default {
name: "MoneyInModal",
mixins: [JEditableTableMixin, FinancialModalMixin],
components: {
JDate
},
data () {
return {
title:"操作",
width: '1200px',
moreStatus: false,
// 新增时子表默认添加几行空数据
addDefaultRowNum: 1,
visible: false,
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
refKeys: ['accountDataTable', ],
activeKey: 'accountDataTable',
accountTable: {
loading: false,
dataSource: [],
columns: [
{ title: '账户名称',key: 'accountId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: []},
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}' },
{ title: '备注',key: 'remark', width: '30%', type: FormTypes.input, placeholder: '请选择${title}'}
]
},
confirmLoading: false,
validatorRules:{
billTime:{
rules: [
{ required: true, message: '请输入单据日期!' }
]
}
},
url: {
add: '/accountHead/addAccountHeadAndDetail',
edit: '/accountHead/updateAccountHeadAndDetail',
detailList: '/accountItem/getDetailList'
}
}
},
created () {
this.initDetailAccount()
},
methods: {
//调用完edit()方法之后会自动调用此方法
editAfter() {
if (this.action === 'add') {
this.addInit("SK")
} else {
this.model.billTime = this.model.billTimeStr
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'organId', 'handsPersonId', 'billTime', 'billNo', 'remark', 'changeAmount'))
});
// 加载子表数据
let params = {
headerId: this.model.id
}
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.accountTable);
}
},
//提交单据时整理成formData
classifyIntoFormData(allValues) {
let totalPrice = 0
let billMain = Object.assign(this.model, allValues.formValue)
let detailArr = allValues.tablesValue[0].values
billMain.type = '收款'
for(let item of detailArr){
totalPrice += item.eachAmount-0
}
billMain.totalPrice = totalPrice
if(this.model.id){
billMain.id = this.model.id
}
return {
info: JSON.stringify(billMain),
rows: JSON.stringify(detailArr),
}
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,180 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
:confirmLoading="confirmLoading"
:maskClosable="false"
:keyboard="false"
:forceRender="true"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row class="form-row" :gutter="24">
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款单位">
<a-select placeholder="选择收款单位" v-decorator="[ 'organId' ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in supList" :key="index" :value="item.id">
{{ item.supplier }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="经手人">
<a-select placeholder="选择经手人" v-decorator="[ 'handsPersonId' ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in personList" :key="index" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
<j-date v-decorator="['billTime']" :show-time="true"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
<a-input placeholder="请输入单据编号" v-decorator.trim="[ 'billNo' ]" />
</a-form-item>
</a-col>
</a-row>
<j-editable-table
:ref="refKeys[0]"
:loading="accountTable.loading"
:columns="accountTable.columns"
:dataSource="accountTable.dataSource"
:maxHeight="300"
:rowNumber="false"
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange" />
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
<a-textarea :rows="2" placeholder="请输入备注" v-decorator="[ 'remark' ]" style="margin-top:8px;"/>
</a-form-item>
</a-col>
</a-row>
<a-row class="form-row" :gutter="24">
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠金额">
<a-input placeholder="请输入优惠金额" v-decorator.trim="[ 'changeAmount' ]" />
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
<a-col :lg="6" :md="12" :sm="24">
</a-col>
</a-row>
</a-form>
</a-spin>
</j-modal>
</template>
<script>
import pick from 'lodash.pick'
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
import JDate from '@/components/jeecg/JDate'
export default {
name: "MoneyInModal",
mixins: [JEditableTableMixin, FinancialModalMixin],
components: {
JDate
},
data () {
return {
title:"操作",
width: '1200px',
moreStatus: false,
// 新增时子表默认添加几行空数据
addDefaultRowNum: 1,
visible: false,
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
refKeys: ['accountDataTable', ],
activeKey: 'accountDataTable',
accountTable: {
loading: false,
dataSource: [],
columns: [
{ title: '账户名称',key: 'accountId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: []},
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}' },
{ title: '备注',key: 'remark', width: '30%', type: FormTypes.input, placeholder: '请选择${title}'}
]
},
confirmLoading: false,
validatorRules:{
billTime:{
rules: [
{ required: true, message: '请输入单据日期!' }
]
}
},
url: {
add: '/accountHead/addAccountHeadAndDetail',
edit: '/accountHead/updateAccountHeadAndDetail',
detailList: '/accountItem/getDetailList'
}
}
},
created () {
this.initDetailAccount()
},
methods: {
//调用完edit()方法之后会自动调用此方法
editAfter() {
if (this.action === 'add') {
this.addInit("FK")
} else {
this.model.billTime = this.model.billTimeStr
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'organId', 'handsPersonId', 'billTime', 'billNo', 'remark', 'changeAmount'))
});
// 加载子表数据
let params = {
headerId: this.model.id
}
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.accountTable);
}
},
//提交单据时整理成formData
classifyIntoFormData(allValues) {
let totalPrice = 0
let billMain = Object.assign(this.model, allValues.formValue)
let detailArr = allValues.tablesValue[0].values
billMain.type = '付款'
for(let item of detailArr){
totalPrice += item.eachAmount-0
}
billMain.totalPrice = totalPrice
if(this.model.id){
billMain.id = this.model.id
}
return {
info: JSON.stringify(billMain),
rows: JSON.stringify(detailArr),
}
}
}
}
</script>
<style scoped>
</style>