优化收款单

This commit is contained in:
季圣华
2021-06-30 00:54:07 +08:00
parent 4e66aeb98b
commit 344f35b60e
6 changed files with 587 additions and 457 deletions

View File

@@ -1,13 +1,49 @@
<template>
<a-modal
:title="title"
:width="1000"
:width="1150"
:visible="visible"
@ok="handleOk"
@cancel="handleCancel"
cancelText="关闭"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<!-- 查询区域 -->
<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.number"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-item label="商品信息" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-input placeholder="请输入名称规格型号" v-model="queryParam.materialParam"></a-input>
</a-form-item>
</a-col>
<a-col :md="7" :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>
<!-- table区域-begin -->
<a-table
bordered
@@ -27,6 +63,7 @@
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import Vue from 'vue'
export default {
name: 'DebtBillList',
mixins:[JeecgListMixin],
@@ -40,12 +77,22 @@
selectBillRows: [],
selectBillIds: '',
queryParam: {
organId: "",
materialParam: "",
number: "",
searchMaterial: "",
type: "",
subType: "",
roleType: Vue.ls.get('roleType'),
status: ""
},
labelCol: {
xs: { span: 24 },
sm: { span: 8 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
// 表头
columns: [
{
@@ -59,20 +106,30 @@
}
},
{ title: '', dataIndex: 'organName',width:120},
{ title: '单据编号', dataIndex: 'number',width:150},
{ title: '商品信息', dataIndex: 'materialsList',width:220, ellipsis:true,
{ title: '单据编号', dataIndex: 'number',width:120},
{ title: '商品信息', dataIndex: 'materialsList',width:200, ellipsis:true,
customRender:function (text,record,index) {
if(text) {
return text.replace(",","");
}
}
},
{ title: '单据日期', dataIndex: 'operTimeStr',width:145},
{ title: '单据日期', dataIndex: 'operTimeStr',width:130},
{ title: '操作员', dataIndex: 'userName',width:60},
{ title: '金额合计', dataIndex: 'totalPrice',width:70}
{ title: '应收欠款', dataIndex: 'needDebt',width:70,
customRender:function (text,record,index) {
return (record.discountLastMoney - record.changeAmount).toFixed(2);
}
},
{ title: '已收欠款', dataIndex: 'finishDebt',width:70 },
{ title: '待收欠款', dataIndex: 'debt',width:70,
customRender:function (text,record,index) {
return (record.discountLastMoney - record.changeAmount - record.finishDebt).toFixed(2);
}
}
],
url: {
list: "/depotHead/list"
list: "/depotHead/debtList"
}
}
},
@@ -84,7 +141,8 @@
created() {
},
methods: {
show(type, subType, organType, status) {
show(organId, type, subType, organType, status) {
this.queryParam.organId = organId
this.queryParam.type = type
this.queryParam.subType = subType
this.queryParam.status = status
@@ -109,6 +167,20 @@
this.$emit('ok', this.selectBillRows);
this.close();
},
onDateChange: function (value, dateString) {
this.queryParam.beginTime=dateString[0];
this.queryParam.endTime=dateString[1];
},
onDateOk(value) {
console.log(value);
},
searchReset() {
this.queryParam = {
type: this.queryParam.type,
subType: this.queryParam.subType
}
this.loadData(1);
},
getSelectBillRows() {
let dataSource = this.dataSource;
let billIds = "";

View File

@@ -288,6 +288,11 @@
</a-col>
</a-row>
<a-row class="form-row" :gutter="24">
<a-col :span="6">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款账户">
{{model.accountName}}
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠金额">
{{model.changeAmount}}
@@ -295,7 +300,6 @@
</a-col>
<a-col :span="6"></a-col>
<a-col :span="6"></a-col>
<a-col :span="6"></a-col>
</a-row>
</section>
</template>
@@ -405,8 +409,10 @@
],
moneyInColumns: [
{ title: '销售单据编号',dataIndex: 'billNumber',width: '20%'},
{ title: '金额',dataIndex: 'eachAmount', width: '10%'},
{ title: '备注',dataIndex: 'remark', width: '30%'}
{ title: '应收欠款',dataIndex: 'needDebt', width: '10%'},
{ title: '已收欠款',dataIndex: 'finishDebt', width: '10%'},
{ title: '本次收款',dataIndex: 'eachAmount', width: '10%'},
{ title: '备注',dataIndex: 'remark', width: '20%'}
],
moneyOutColumns: [
{ title: '账户名称',dataIndex: 'accountName',width: '20%'},