解决供应商、客户、会员导入的bug
This commit is contained in:
parent
1c1229dfc7
commit
8b415b2bcc
BIN
jshERP-web/public/doc/customer_template.xls
Normal file
BIN
jshERP-web/public/doc/customer_template.xls
Normal file
Binary file not shown.
BIN
jshERP-web/public/doc/member_template.xls
Normal file
BIN
jshERP-web/public/doc/member_template.xls
Normal file
Binary file not shown.
BIN
jshERP-web/public/doc/vendor_template.xls
Normal file
BIN
jshERP-web/public/doc/vendor_template.xls
Normal file
Binary file not shown.
@ -38,12 +38,12 @@
|
||||
<a-upload v-if="btnEnableList.indexOf(1)>-1" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-popover title="导入注意点">
|
||||
<template slot="content">
|
||||
<p>期初应收、期初应付、税率均为数值且要大于0;<br/>另外期初应收、期初应付不能同时输入</p>
|
||||
<p><a target="_blank" href="/doc/customer_template.xls"><b>客户Excel模板下载</b></a></p>
|
||||
</template>
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-popover>
|
||||
</a-upload>
|
||||
<a-button type="primary" @click="exportExcel" icon="download">导出</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('客户信息')">导出</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>
|
||||
@ -157,7 +157,8 @@
|
||||
list: "/supplier/list",
|
||||
delete: "/supplier/delete",
|
||||
deleteBatch: "/supplier/deleteBatch",
|
||||
importExcelUrl: "/supplier/importExcel",
|
||||
importExcelUrl: "/supplier/importCustomer",
|
||||
exportXlsUrl: "/supplier/exportExcel",
|
||||
batchSetStatusUrl: "/supplier/batchSetStatus"
|
||||
}
|
||||
}
|
||||
@ -181,18 +182,6 @@
|
||||
if(this.btnEnableList.indexOf(1)===-1) {
|
||||
this.$refs.modalForm.isReadOnly = true
|
||||
}
|
||||
},
|
||||
exportExcel() {
|
||||
let aoa = [['名称', '联系人', '手机号码', '联系电话', '电子邮箱', '传真', '期初应收',
|
||||
'期末应收', '纳税人识别号', '税率(%)', '开户行', '账号', '地址', '备注', '状态']]
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
let ds = this.dataSource[i]
|
||||
let enabledStr = ds.enabled?'启用':'禁用'
|
||||
let item = [ds.supplier, ds.contacts, ds.telephone, ds.phoneNum, ds.email, ds.fax, ds.beginNeedGet,
|
||||
ds.allNeedGet, ds.taxNum, ds.taxRate, ds.bankName, ds.accountNumber, ds.address, ds.description, enabledStr]
|
||||
aoa.push(item)
|
||||
}
|
||||
openDownloadDialog(sheet2blob(aoa), '客户信息')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,12 +37,12 @@
|
||||
<a-upload v-if="btnEnableList.indexOf(1)>-1" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-popover title="导入注意点">
|
||||
<template slot="content">
|
||||
<p>预收款为数值且要大于0</p>
|
||||
<p><a target="_blank" href="/doc/member_template.xls"><b>会员Excel模板下载</b></a></p>
|
||||
</template>
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-popover>
|
||||
</a-upload>
|
||||
<a-button type="primary" @click="exportExcel" icon="download">导出</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('会员信息')">导出</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>
|
||||
@ -154,7 +154,8 @@
|
||||
list: "/supplier/list",
|
||||
delete: "/supplier/delete",
|
||||
deleteBatch: "/supplier/deleteBatch",
|
||||
importExcelUrl: "/supplier/importExcel",
|
||||
importExcelUrl: "/supplier/importMember",
|
||||
exportXlsUrl: "/supplier/exportExcel",
|
||||
batchSetStatusUrl: "/supplier/batchSetStatus"
|
||||
}
|
||||
}
|
||||
@ -178,16 +179,6 @@
|
||||
if(this.btnEnableList.indexOf(1)===-1) {
|
||||
this.$refs.modalForm.isReadOnly = true
|
||||
}
|
||||
},
|
||||
exportExcel() {
|
||||
let aoa = [['名称', '联系人', '手机号码', '联系电话', '电子邮箱', '预付款', '备注', '状态']]
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
let ds = this.dataSource[i]
|
||||
let enabledStr = ds.enabled?'启用':'禁用'
|
||||
let item = [ds.supplier, ds.contacts, ds.telephone, ds.phoneNum, ds.email, ds.advanceIn, ds.description, enabledStr]
|
||||
aoa.push(item)
|
||||
}
|
||||
openDownloadDialog(sheet2blob(aoa), '会员信息')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,12 +37,12 @@
|
||||
<a-upload v-if="btnEnableList.indexOf(1)>-1" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-popover title="导入注意点">
|
||||
<template slot="content">
|
||||
<p>期初应收、期初应付、税率均为数值且要大于0;<br/>另外期初应收、期初应付不能同时输入</p>
|
||||
<p><a target="_blank" href="/doc/vendor_template.xls"><b>供应商Excel模板下载</b></a></p>
|
||||
</template>
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-popover>
|
||||
</a-upload>
|
||||
<a-button type="primary" @click="exportExcel" icon="download">导出</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('供应商信息')">导出</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>
|
||||
@ -156,7 +156,8 @@
|
||||
list: "/supplier/list",
|
||||
delete: "/supplier/delete",
|
||||
deleteBatch: "/supplier/deleteBatch",
|
||||
importExcelUrl: "/supplier/importExcel",
|
||||
importExcelUrl: "/supplier/importVendor",
|
||||
exportXlsUrl: "/supplier/exportExcel",
|
||||
batchSetStatusUrl: "/supplier/batchSetStatus"
|
||||
}
|
||||
}
|
||||
@ -180,18 +181,6 @@
|
||||
if(this.btnEnableList.indexOf(1)===-1) {
|
||||
this.$refs.modalForm.isReadOnly = true
|
||||
}
|
||||
},
|
||||
exportExcel() {
|
||||
let aoa = [['名称', '联系人', '手机号码', '联系电话', '电子邮箱', '传真', '期初应付',
|
||||
'期末应付', '纳税人识别号', '税率(%)', '开户行', '账号', '地址', '备注', '状态']]
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
let ds = this.dataSource[i]
|
||||
let enabledStr = ds.enabled?'启用':'禁用'
|
||||
let item = [ds.supplier, ds.contacts, ds.telephone, ds.phoneNum, ds.email, ds.fax, ds.beginNeedPay,
|
||||
ds.allNeedPay, ds.taxNum, ds.taxRate, ds.bankName, ds.accountNumber, ds.address, ds.description, enabledStr]
|
||||
aoa.push(item)
|
||||
}
|
||||
openDownloadDialog(sheet2blob(aoa), '供应商信息')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user