增加单据导出的埋点

This commit is contained in:
季圣华 2023-08-16 00:25:03 +08:00
parent 34fcdf9aea
commit e220aa8f39
4 changed files with 106 additions and 3 deletions

View File

@ -0,0 +1,83 @@
<template>
<div ref="container">
<a-modal
:title="title"
:width="width"
:visible="visible"
:getContainer="() => $refs.container"
:maskStyle="{'top':'93px','left':'154px'}"
:wrapClassName="wrapClassNameInfo()"
:mask="isDesktop()"
:maskClosable="false"
:style="modalStyle"
@cancel="handleCancel"
cancelText="关闭">
<template slot="footer">
<a-button key="back" @click="handleCancel">取消</a-button>
</template>
<a-form :form="form">
<template>
<iframe :src="billExcelUrl" width="100%" :height="height" frameborder="0" scrolling="no"></iframe>
</template>
<template>
<a-row>
<a-col>
<a-form-item>
<a-input v-decorator="['id']" hidden/>
</a-form-item>
</a-col>
</a-row>
</template>
</a-form>
</a-modal>
</div>
</template>
<script>
import pick from 'lodash.pick'
import {mixinDevice} from '@/utils/mixin'
export default {
name: 'BillExcelIframe',
mixins: [mixinDevice],
data () {
return {
title: "单据导出",
width: '500px',
visible: false,
modalStyle: '',
billExcelUrl: '',
height: "",
model: {},
form: this.$form.createForm(this),
loading: false
}
},
created () {
},
methods: {
show(record, billExcelUrl, height) {
this.height = height
this.billExcelUrl = billExcelUrl
this.visible = true
this.modalStyle = 'top:20%; height: 400px;'
this.model = Object.assign({}, record)
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'id'))
});
},
handleCancel() {
this.close()
},
close() {
this.billExcelUrl = ''
this.$emit('close')
this.visible = false
this.modalStyle = ''
}
}
}
</script>
<style scoped>
</style>

View File

@ -109,6 +109,7 @@
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="isShowExcel" type="primary" icon="download" @click="handleExport">导出</a-button>
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
@ -194,6 +195,7 @@
<!-- 表单区域 -->
<purchase-in-modal ref="modalForm" @ok="modalFormOk" @close="modalFormClose"></purchase-in-modal>
<bill-detail ref="modalDetail" @ok="modalFormOk" @close="modalFormClose"></bill-detail>
<bill-excel-iframe ref="billExcelIframe" @ok="modalFormOk" @close="modalFormClose"></bill-excel-iframe>
</a-card>
</a-col>
</a-row>
@ -202,6 +204,7 @@
<script>
import PurchaseInModal from './modules/PurchaseInModal'
import BillDetail from './dialog/BillDetail'
import BillExcelIframe from '@/components/tools/BillExcelIframe'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { BillListMixin } from './mixins/BillListMixin'
import JEllipsis from '@/components/jeecg/JEllipsis'
@ -213,6 +216,7 @@
components: {
PurchaseInModal,
BillDetail,
BillExcelIframe,
JEllipsis,
JDate
},

View File

@ -2,7 +2,7 @@ import Vue from 'vue'
import {getAction } from '@/api/manage'
import { FormTypes } from '@/utils/JEditableTableUtil'
import {findBillDetailByNumber, findBySelectSup, findBySelectCus, findBySelectRetail, getUserList, getAccount,
getCurrentSystemConfig} from '@/api/api'
getCurrentSystemConfig, getPlatformConfigByKey} from '@/api/api'
import { getCheckFlag } from "@/utils/util"
export const BillListMixin = {
@ -10,6 +10,9 @@ export const BillListMixin = {
return {
/* 原始审核是否开启 */
checkFlag: true,
/* 单据Excel是否开启 */
isShowExcel: false,
billExcelUrl: '',
supList: [],
cusList: [],
retailList: [],
@ -120,6 +123,14 @@ export const BillListMixin = {
this.checkFlag = getCheckFlag(multiBillType, multiLevelApprovalFlag, this.prefixNo)
}
})
getPlatformConfigByKey({ "platformKey": "bill_excel_url" }).then((res) => {
if (res && res.code === 200) {
if(res.data.platformValue) {
this.isShowExcel = true
this.billExcelUrl = res.data.platformValue + '?no='
}
}
})
},
initSupplier() {
let that = this;
@ -193,6 +204,11 @@ export const BillListMixin = {
handleRestDefault() {
Vue.ls.remove(this.prefixNo)
this.initColumnsSetting()
},
//导出单据
handleExport() {
this.$refs.billExcelIframe.show(this.model, this.billExcelUrl, 150)
this.$refs.billExcelIframe.title = "确认导出"
}
}
}

View File

@ -929,12 +929,12 @@
getMaxBarCode({}).then((res)=> {
if (res && res.code === 200) {
this.maxBarCodeInfo = res.data.barCode - 0
this.maxBarCodeInfo = this.maxBarCodeInfo + 1
this.maxBarCodeInfo = this.maxBarCodeInfo
target.setValues([{rowKey: row.id, values: {barCode: this.maxBarCodeInfo, commodityUnit: unit?unit:''}}])
}
})
} else {
this.maxBarCodeInfo = this.maxBarCodeInfo + 1
this.maxBarCodeInfo = this.maxBarCodeInfo
target.setValues([{rowKey: row.id, values: {barCode: this.maxBarCodeInfo, commodityUnit: unit?unit:''}}])
}
},