优化单据界面的账户和销售展示

This commit is contained in:
季圣华
2021-05-05 22:36:07 +08:00
parent 9fb970fd7c
commit 30e5136c4d
7 changed files with 57 additions and 16 deletions

View File

@@ -10,6 +10,11 @@
@cancel="handleCancel" @cancel="handleCancel"
wrapClassName="ant-modal-cust-warp" wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden"> style="top:5%;height: 100%;overflow-y: hidden">
<template slot="footer">
<a-button key="back" @click="handleCancel">
取消
</a-button>
</template>
<a-form :form="form"> <a-form :form="form">
<!--调拨出库--> <!--调拨出库-->
<template v-if="billType === '调拨出库'"> <template v-if="billType === '调拨出库'">
@@ -544,11 +549,7 @@
{{model.number}} {{model.number}}
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6" :md="12" :sm="24"> <a-col :lg="6" :md="12" :sm="24"></a-col>
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售人员">
{{model.salesManStr}}
</a-form-item>
</a-col>
</a-row> </a-row>
<a-table <a-table
ref="table" ref="table"
@@ -606,7 +607,7 @@
</a-col> </a-col>
<a-col :lg="6" :md="12" :sm="24"> <a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售人员"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售人员">
{{model.salesMan}} {{model.salesManStr}}
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -272,7 +272,7 @@ export const BillModalMixin = {
}, },
//改变优惠、本次付款、欠款的值 //改变优惠、本次付款、欠款的值
autoChangePrice(target) { autoChangePrice(target) {
let allTaxLastMoney = target.statisticsColumns.taxLastMoney let allTaxLastMoney = target.statisticsColumns.taxLastMoney-0
let discount = this.form.getFieldValue('discount')-0 let discount = this.form.getFieldValue('discount')-0
let otherMoney = this.form.getFieldValue('otherMoney')-0 let otherMoney = this.form.getFieldValue('otherMoney')-0
let discountMoney = (discount*0.01*allTaxLastMoney).toFixed(2)-0 let discountMoney = (discount*0.01*allTaxLastMoney).toFixed(2)-0
@@ -285,6 +285,7 @@ export const BillModalMixin = {
}, },
//改变优惠率 //改变优惠率
onKeyUpDiscount(e) { onKeyUpDiscount(e) {
debugger
const value = e.target.value-0 const value = e.target.value-0
let discountMoney = this.form.getFieldValue('discountMoney')-0 let discountMoney = this.form.getFieldValue('discountMoney')-0
let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0 let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0

View File

@@ -73,7 +73,7 @@
</a-col> </a-col>
<a-col :lg="6" :md="12" :sm="24"> <a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="其它费用"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="其它费用">
<a-input placeholder="选择其它费用" v-decorator.trim="[ 'otherMoney' ]" @keyup="onKeyUpOtherMoney"/> <a-input placeholder="输入其它费用" v-decorator.trim="[ 'otherMoney' ]" @keyup="onKeyUpOtherMoney"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -73,7 +73,7 @@
</a-col> </a-col>
<a-col :lg="6" :md="12" :sm="24"> <a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="其它费用"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="其它费用">
<a-input placeholder="选择其它费用" v-decorator.trim="[ 'otherMoney' ]" @keyup="onKeyUpOtherMoney"/> <a-input placeholder="输入其它费用" v-decorator.trim="[ 'otherMoney' ]" @keyup="onKeyUpOtherMoney"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@@ -204,7 +204,7 @@
} else { } else {
this.model.operTime = this.model.operTimeStr this.model.operTime = this.model.operTimeStr
this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2) this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2)
if(this.model.accountId == null) { if(this.model.accountId == null || this.model.accountId == 0) {
this.model.accountId = 0 this.model.accountId = 0
this.manyAccountBtnStatus = true this.manyAccountBtnStatus = true
this.accountIdList = this.model.accountIdList this.accountIdList = this.model.accountIdList
@@ -239,6 +239,11 @@
} }
billMain.totalPrice = 0-totalPrice billMain.totalPrice = 0-totalPrice
billMain.changeAmount = 0-billMain.changeAmount billMain.changeAmount = 0-billMain.changeAmount
if(billMain.accountId === 0) {
billMain.accountId = ''
}
billMain.accountIdList = this.accountIdList.length>0 ? JSON.stringify(this.accountIdList) : ""
billMain.accountMoneyList = this.accountMoneyList.length>0 ? JSON.stringify(this.accountMoneyList) : ""
if(this.model.id){ if(this.model.id){
billMain.id = this.model.id billMain.id = this.model.id
} }

View File

@@ -62,7 +62,7 @@
<a-row class="form-row" :gutter="24"> <a-row class="form-row" :gutter="24">
<a-col :lg="6" :md="12" :sm="24"> <a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠率"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠率">
<a-input placeholder="请输入优惠率" v-decorator.trim="[ 'discount' ]" suffix="%" @keyup="onKeyUpDiscount"/> <a-input style="width:185px;" placeholder="请输入优惠率" v-decorator.trim="[ 'discount' ]" suffix="%" @keyup="onKeyUpDiscount"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6" :md="12" :sm="24"> <a-col :lg="6" :md="12" :sm="24">
@@ -77,7 +77,7 @@
</a-col> </a-col>
<a-col :lg="6" :md="12" :sm="24"> <a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="其它费用"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="其它费用">
<a-input placeholder="选择其它费用" v-decorator.trim="[ 'otherMoney' ]" @keyup="onKeyUpOtherMoney"/> <a-input placeholder="输入其它费用" v-decorator.trim="[ 'otherMoney' ]" @keyup="onKeyUpOtherMoney"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -49,20 +49,27 @@
:pagination="ipagination" :pagination="ipagination"
:loading="loading" :loading="loading"
@change="handleTableChange"> @change="handleTableChange">
<span slot="numberCustomRender" slot-scope="text, record">
<a @click="myHandleDetail(record)">{{record.number}}</a>
</span>
</a-table> </a-table>
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 -->
<bill-detail ref="modalDetail"></bill-detail>
</a-card> </a-card>
</template> </template>
<script> <script>
import BillDetail from '../bill/dialog/BillDetail'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getNowFormatMonth } from '@/utils/util'; import { getNowFormatMonth } from '@/utils/util';
import {findBySelectCus, findSupplierById, findDepotHeadTotalPay, findAccountHeadTotalPay} from '@/api/api' import {findBySelectCus, findSupplierById, findDepotHeadTotalPay, findAccountHeadTotalPay, findBillDetailByNumber} from '@/api/api'
import JEllipsis from '@/components/jeecg/JEllipsis' import JEllipsis from '@/components/jeecg/JEllipsis'
import moment from 'moment' import moment from 'moment'
export default { export default {
name: "BuyInReport", name: "BuyInReport",
mixins:[JeecgListMixin], mixins:[JeecgListMixin],
components: { components: {
BillDetail,
JEllipsis JEllipsis
}, },
data () { data () {
@@ -94,7 +101,10 @@
return parseInt(index)+1; return parseInt(index)+1;
} }
}, },
{title: '单据编号', dataIndex: 'number', width: 140}, {
title: '单据编号', dataIndex: 'number', width: 140,
scopedSlots: { customRender: 'numberCustomRender' },
},
{title: '类型', dataIndex: 'type', width: 100}, {title: '类型', dataIndex: 'type', width: 100},
{title: '单位名称', dataIndex: 'supplierName', width: 200}, {title: '单位名称', dataIndex: 'supplierName', width: 200},
{title: '单据金额', dataIndex: 'billMoney', width: 80}, {title: '单据金额', dataIndex: 'billMoney', width: 80},
@@ -177,6 +187,13 @@
searchQuery() { searchQuery() {
this.loadData(1); this.loadData(1);
this.initStatistics(); this.initStatistics();
},
myHandleDetail(record) {
findBillDetailByNumber({ number: record.number }).then((res) => {
if (res && res.code === 200) {
this.handleDetail(res.data, record.type);
}
})
} }
} }
} }

View File

@@ -49,20 +49,27 @@
:pagination="ipagination" :pagination="ipagination"
:loading="loading" :loading="loading"
@change="handleTableChange"> @change="handleTableChange">
<span slot="numberCustomRender" slot-scope="text, record">
<a @click="myHandleDetail(record)">{{record.number}}</a>
</span>
</a-table> </a-table>
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 -->
<bill-detail ref="modalDetail"></bill-detail>
</a-card> </a-card>
</template> </template>
<script> <script>
import BillDetail from '../bill/dialog/BillDetail'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getNowFormatMonth } from '@/utils/util'; import { getNowFormatMonth } from '@/utils/util';
import {findBySelectSup, findSupplierById, findDepotHeadTotalPay, findAccountHeadTotalPay} from '@/api/api' import {findBySelectSup, findSupplierById, findDepotHeadTotalPay, findAccountHeadTotalPay, findBillDetailByNumber} from '@/api/api'
import JEllipsis from '@/components/jeecg/JEllipsis' import JEllipsis from '@/components/jeecg/JEllipsis'
import moment from 'moment' import moment from 'moment'
export default { export default {
name: "BuyInReport", name: "BuyInReport",
mixins:[JeecgListMixin], mixins:[JeecgListMixin],
components: { components: {
BillDetail,
JEllipsis JEllipsis
}, },
data () { data () {
@@ -94,7 +101,10 @@
return parseInt(index)+1; return parseInt(index)+1;
} }
}, },
{title: '单据编号', dataIndex: 'number', width: 140}, {
title: '单据编号', dataIndex: 'number', width: 140,
scopedSlots: { customRender: 'numberCustomRender' },
},
{title: '类型', dataIndex: 'type', width: 100}, {title: '类型', dataIndex: 'type', width: 100},
{title: '单位名称', dataIndex: 'supplierName', width: 200}, {title: '单位名称', dataIndex: 'supplierName', width: 200},
{title: '单据金额', dataIndex: 'billMoney', width: 80}, {title: '单据金额', dataIndex: 'billMoney', width: 80},
@@ -177,6 +187,13 @@
searchQuery() { searchQuery() {
this.loadData(1); this.loadData(1);
this.initStatistics(); this.initStatistics();
},
myHandleDetail(record) {
findBillDetailByNumber({ number: record.number }).then((res) => {
if (res && res.code === 200) {
this.handleDetail(res.data, record.type);
}
})
} }
} }
} }