给单据明细导入界面进行优化

This commit is contained in:
季圣华 2023-11-13 00:27:30 +08:00
parent dbe6cbbbf2
commit 3fa7a0ac6a
5 changed files with 38 additions and 6 deletions

View File

@ -17,7 +17,7 @@
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="模板">
<span><a href="/doc/bill_item_template.xls" target="_blank"><b>明细Excel模板[下载]</b></a></span>
<span><a :href="tmpUrl" target="_blank"><b>明细Excel模板[下载]</b></a></span>
</a-form-item>
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="文件">
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader"
@ -43,6 +43,7 @@
title:"导入明细",
visible: false,
prefixNo: '',
tmpUrl: '',
model: {},
tokenHeader: {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)},
labelCol: {
@ -70,6 +71,13 @@
methods: {
add (prefixNo) {
this.prefixNo = prefixNo
if(prefixNo === 'CGDD' || prefixNo === 'XSDD') {
this.tmpUrl = '/doc/bill_order_item_template.xls'
} else if(prefixNo === 'CGRK' || prefixNo === 'XSCK') {
this.tmpUrl = '/doc/bill_buy_sale_item_template.xls'
} else if(prefixNo === 'QTRK' || prefixNo === 'QTCK') {
this.tmpUrl = '/doc/bill_other_in_out_item_template.xls'
}
this.form.resetFields()
this.model = Object.assign({}, {})
this.visible = true

View File

@ -73,6 +73,9 @@
<a-button @click="stopScan">收起扫码</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;padding-bottom: 5px;padding-left:20px;">
<a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
@ -101,6 +104,7 @@
<vendor-modal ref="vendorModalForm" @ok="vendorModalFormOk"></vendor-modal>
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
<import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal>
<workflow-iframe ref="modalWorkflow"></workflow-iframe>
</j-modal>
</template>
@ -109,6 +113,7 @@
import VendorModal from '../../system/modules/VendorModal'
import DepotModal from '../../system/modules/DepotModal'
import BatchSetDepot from '../dialog/BatchSetDepot'
import ImportItemModal from '../dialog/ImportItemModal'
import WorkflowIframe from '@/components/tools/WorkflowIframe'
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
@ -124,6 +129,7 @@
VendorModal,
DepotModal,
BatchSetDepot,
ImportItemModal,
WorkflowIframe,
JUpload,
JDate,

View File

@ -73,6 +73,9 @@
<a-button @click="stopScan">收起扫码</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;padding-bottom: 5px;padding-left:20px;">
<a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
@ -101,6 +104,7 @@
<customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal>
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
<import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal>
<workflow-iframe ref="modalWorkflow"></workflow-iframe>
</j-modal>
</template>
@ -109,6 +113,7 @@
import CustomerModal from '../../system/modules/CustomerModal'
import DepotModal from '../../system/modules/DepotModal'
import BatchSetDepot from '../dialog/BatchSetDepot'
import ImportItemModal from '../dialog/ImportItemModal'
import WorkflowIframe from '@/components/tools/WorkflowIframe'
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
@ -124,6 +129,7 @@
CustomerModal,
DepotModal,
BatchSetDepot,
ImportItemModal,
WorkflowIframe,
JUpload,
JDate,

View File

@ -75,20 +75,23 @@
<template #buttonAfter>
<a-row v-if="rowCanEdit" :gutter="24" style="float:left;padding-bottom: 5px;" data-step="4" data-title="扫码录入" data-intro="此功能支持扫码枪扫描商品条码进行录入">
<a-col v-if="scanStatus" :md="6" :sm="24">
<a-button @click="scanEnter" style="margin-right: 8px">扫码录入</a-button>
<a-button @click="scanEnter">扫码录入</a-button>
</a-col>
<a-col v-if="!scanStatus" :md="16" :sm="24" style="padding: 0 8px 0 12px">
<a-input placeholder="请扫描商品条码并回车" v-model="scanBarCode" @pressEnter="scanPressEnter" ref="scanBarCode"/>
</a-col>
<a-col v-if="!scanStatus" :md="6" :sm="24" style="padding: 0px 24px 0 0">
<a-button @click="stopScan" style="margin-right: 8px">收起扫码</a-button>
<a-button @click="stopScan">收起扫码</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;padding-bottom: 5px;">
<a-col :md="24" :sm="24">
<a-button @click="handleHistoryBillList"><a-icon type="history" />历史单据</a-button>
<a-button style="margin-left: 8px" @click="handleHistoryBillList"><a-icon type="history" />历史单据</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;padding-bottom: 5px;padding-left:20px;">
<a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
@ -180,6 +183,7 @@
</a-form>
</a-spin>
<many-account-modal ref="manyAccountModalForm" @ok="manyAccountModalFormOk"></many-account-modal>
<import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal>
<link-bill-list ref="linkBillList" @ok="linkBillListOk"></link-bill-list>
<vendor-modal ref="vendorModalForm" @ok="vendorModalFormOk"></vendor-modal>
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
@ -193,6 +197,7 @@
<script>
import pick from 'lodash.pick'
import ManyAccountModal from '../dialog/ManyAccountModal'
import ImportItemModal from '../dialog/ImportItemModal'
import LinkBillList from '../dialog/LinkBillList'
import VendorModal from '../../system/modules/VendorModal'
import DepotModal from '../../system/modules/DepotModal'
@ -213,6 +218,7 @@
mixins: [JEditableTableMixin, BillModalMixin],
components: {
ManyAccountModal,
ImportItemModal,
LinkBillList,
VendorModal,
DepotModal,

View File

@ -76,7 +76,7 @@
<template #buttonAfter>
<a-row v-if="rowCanEdit" :gutter="24" style="float:left;padding-bottom: 5px;" data-step="4" data-title="扫码录入" data-intro="此功能支持扫码枪扫描商品条码进行录入">
<a-col v-if="scanStatus" :md="6" :sm="24">
<a-button @click="scanEnter" style="margin-right: 8px">扫码录入</a-button>
<a-button @click="scanEnter">扫码录入</a-button>
</a-col>
<a-col v-if="!scanStatus" :md="16" :sm="24" style="padding: 0 8px 0 12px">
<a-input placeholder="请扫条码或序列号并回车" v-model="scanBarCode" @pressEnter="scanPressEnter" ref="scanBarCode"/>
@ -87,9 +87,12 @@
</a-row>
<a-row :gutter="24" style="float:left;padding-bottom: 5px;">
<a-col :md="24" :sm="24">
<a-button @click="handleHistoryBillList"><a-icon type="history" />历史单据</a-button>
<a-button style="margin-left: 8px" @click="handleHistoryBillList"><a-icon type="history" />历史单据</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;padding-bottom: 5px;padding-left:20px;">
<a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
@ -195,6 +198,7 @@
</a-form>
</a-spin>
<many-account-modal ref="manyAccountModalForm" @ok="manyAccountModalFormOk"></many-account-modal>
<import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal>
<link-bill-list ref="linkBillList" @ok="linkBillListOk"></link-bill-list>
<customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal>
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
@ -207,6 +211,7 @@
<script>
import pick from 'lodash.pick'
import ManyAccountModal from '../dialog/ManyAccountModal'
import ImportItemModal from '../dialog/ImportItemModal'
import LinkBillList from '../dialog/LinkBillList'
import CustomerModal from '../../system/modules/CustomerModal'
import DepotModal from '../../system/modules/DepotModal'
@ -228,6 +233,7 @@
mixins: [JEditableTableMixin, BillModalMixin],
components: {
ManyAccountModal,
ImportItemModal,
LinkBillList,
CustomerModal,
DepotModal,