优化单据界面,点击单号可以弹出单据

This commit is contained in:
季圣华
2021-07-04 23:57:34 +08:00
parent 090ca66a72
commit 0d64352950
3 changed files with 38 additions and 7 deletions

View File

@@ -243,7 +243,7 @@
</a-col>
<a-col :span="6">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
{{model.linkNumber}}
<a @click="myHandleDetail(model.linkNumber)">{{model.linkNumber}}</a>
</a-form-item>
</a-col>
</a-row>
@@ -328,7 +328,7 @@
</a-col>
<a-col :span="6">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单">
{{model.linkNumber}}
<a @click="myHandleDetail(model.linkNumber)">{{model.linkNumber}}</a>
</a-form-item>
</a-col>
</a-row>
@@ -453,7 +453,7 @@
</a-col>
<a-col :span="6">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
{{model.linkNumber}}
<a @click="myHandleDetail(model.linkNumber)">{{model.linkNumber}}</a>
</a-form-item>
</a-col>
</a-row>
@@ -597,7 +597,7 @@
</a-col>
<a-col :span="6">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
{{model.linkNumber}}
<a @click="myHandleDetail(model.linkNumber)">{{model.linkNumber}}</a>
</a-form-item>
</a-col>
</a-row>
@@ -729,7 +729,7 @@
</a-col>
<a-col :span="6">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单">
{{model.linkNumber}}
<a @click="myHandleDetail(model.linkNumber)">{{model.linkNumber}}</a>
</a-form-item>
</a-col>
</a-row>
@@ -817,6 +817,7 @@
<script>
import pick from 'lodash.pick'
import { getAction } from '@/api/manage'
import { findBillDetailByNumber} from '@/api/api'
import { getMpListShort } from "@/utils/util"
import Vue from 'vue'
export default {
@@ -1095,6 +1096,15 @@
close() {
this.$emit('close');
this.visible = false;
},
myHandleDetail(billNumber) {
findBillDetailByNumber({ number: billNumber }).then((res) => {
if (res && res.code === 200) {
let type = res.data.type === "其它"? "":res.data.type
this.show(res.data, res.data.subType + type);
this.title = res.data.subType + type + "-详情";
}
})
}
}
}

View File

@@ -288,6 +288,9 @@
:pagination="false"
:columns="moneyInColumns"
:dataSource="dataSource">
<span slot="numberCustomRender" slot-scope="text, record">
<a @click="myHandleDetail(record)">{{record.billNumber}}</a>
</span>
</a-table>
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
@@ -402,13 +405,20 @@
</template>
</a-form>
</j-modal>
<!-- 表单区域 -->
<bill-detail ref="modalDetail"></bill-detail>
</a-card>
</template>
<script>
import pick from 'lodash.pick'
import BillDetail from '../../bill/dialog/BillDetail'
import { getAction } from '@/api/manage'
import { findBillDetailByNumber} from '@/api/api'
export default {
name: 'FinancialDetail',
components: {
BillDetail
},
data () {
return {
title: "详情",
@@ -452,7 +462,10 @@
{ title: '备注',dataIndex: 'remark', width: '30%'}
],
moneyInColumns: [
{ title: '销售单据编号',dataIndex: 'billNumber',width: '20%'},
{
title: '销售单据编号', dataIndex: 'billNumber', width: '20%',
scopedSlots: { customRender: 'numberCustomRender' },
},
{ title: '应收欠款',dataIndex: 'needDebt', width: '10%'},
{ title: '已收欠款',dataIndex: 'finishDebt', width: '10%'},
{ title: '本次收款',dataIndex: 'eachAmount', width: '10%'},
@@ -514,6 +527,14 @@
close() {
this.$emit('close');
this.visible = false;
},
myHandleDetail(record) {
findBillDetailByNumber({ number: record.billNumber }).then((res) => {
if (res && res.code === 200) {
this.$refs.modalDetail.show(res.data, res.data.subType + res.data.type);
this.$refs.modalDetail.title= res.data.subType + res.data.type + "-详情";
}
})
}
}
}