网点管理、线路管理导出
This commit is contained in:
parent
6822f3d81f
commit
93aa2a2fad
@ -73,6 +73,7 @@
|
||||
slot="pageContent"
|
||||
slot-scope="slotProps"
|
||||
:height="(slotProps.contentHeight)+'px'"
|
||||
ref="refTable"
|
||||
|
||||
storageName="emisSiteList_main"
|
||||
v-loading="loading"
|
||||
@ -121,16 +122,16 @@
|
||||
v-hasPermi="['emis:emisSite:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
size="mini"
|
||||
v-hasPermi="['emis:emisSite:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
</el-col>
|
||||
<el-button style="margin-right: 5px;"
|
||||
type="primary"
|
||||
plain
|
||||
@ -546,47 +547,58 @@ export default {
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('emis/emisSite/export', {
|
||||
// ...this.queryParams
|
||||
// }, `emisSite_${new Date().getTime()}.xlsx`)
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
var qParam = {...this.queryParams};
|
||||
qParam.pageNum=1;
|
||||
qParam.pageSize=5000;
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
const qParam = { ...this.queryParams }
|
||||
qParam.pageNum = 1
|
||||
qParam.pageSize = 5000
|
||||
|
||||
listEmisSite(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
||||
this.downloadLoading = false
|
||||
listEmisSite(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
||||
if (response.code === 200) {
|
||||
const curList = response.rows
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['序号','站点代码','站点名称','英文名称','parent_site_id','父站点id','父站点名称','缺省货币','截单时间','财务中心代码','财务中心名称','类型','类型','默认发件地','国家代码','省代码','市代码','区代码','乡镇代码','大区代码','大区名称','范围名称','电话','负责人','管理人','管理人电话','销售电话','紧急电话','传真','站点描述','派送区域','不派送区域','公共备注','私有备注','排序','结算账户','tb服务姓名','tb服务电话','tb服务网址','car开始时间','car结束时间','bl_web','加盟时间','地图经纬度','特殊区域','qq','email','服务数量','服务数量','等级','仓库名称','站点限制','jy电话','jy密码','bl_not_input','停止日期','bl_allow_agent_money','bl_allow_topayment','goods_payment_limited','派到付款限额','bl_rec','bl_disp','bl_come','bl_open_taobao','bl_arbitration_department','bl_allow_agent_sign','bl_message','bl_provide','bl_projectclient','bl_vip_site','bl_dispatch_zt','bl_billto_account','账套编号','地址','disp_delivery_mode','trans_type_id','trans_type_name','org_id','org_name','数据绑定来源','站点区域','允许代理金额','disp_goods_payment_limited','disp_delivery_site','disp_delivery_site_code','vendor_name','credit_code','bl_cargo_service','bl_handling_service','pickup_center_site_code','pickup_center_site_name','pickup_center_site_id','bl_disp_good','bl_push_jd','push_date','reason','site_pos','distribute_code','disp_delivery_site_id','bl_push_site','site_type','logo_type','size_code2','size_code3','audit_status','audit_date','audit_man','audit_man_code','audit_site','audit_site_code','bl_class','bl_material','soon_piece_type','province_area','second_area','second_area_code','province_area_code','bl_rec_name','bl_disp_name','bl_not_input_name','bl_dispatch_zt_name','bl_allow_agent_money_name','bl_allow_topayment_name','bl_cargo_service_name','bl_handling_service_name','bl_allow_disp_agent_money_name','province_area_code','province_code','city_code','county_code','town_code','bl_not_rec_name','bl_not_rec','bl_not_disp_name','bl_not_disp','bl_not_cash_out_name','bl_not_cash_out','备注','租户ID','删除标志(0代表存在','创建者','创建时间','更新者','更新时间',];
|
||||
const filterVal = ['id','siteCode','siteName','siteNameEn','parentSiteId','parentSiteCode','parentSiteName','defaultCurrency','cutOffTime','superiorFinanceCenterCode','superiorFinanceCenter','type','defaultDestinationNameCode','defaultSendPlace','countryCode','province','city','county','town','areaCode','areaName','rangeName','phone','principal','manager','managerPhone','salePhone','exigencePhone','fax','siteDesc','dispatchRange','notDispatchRange','publicRemark','privateRemark','orderBy','financialAccount','tbSerName','tbSerTel','tbSerWw','carStartTime','carEndTime','blWeb','joinTime','mapsCoordinate','specserviceRange','qq','email','serviceQuality','salesQuality','levels','warehouseName','siteLimite','jyMobile','jyPwd','blNotInput','stopDate','blAllowAgentMoney','blAllowTopayment','goodsPaymentLimited','topaymentLimited','blRec','blDisp','blCome','blOpenTaobao','blArbitrationDepartment','blAllowAgentSign','blMessage','blProvide','blProjectclient','blVipSite','blDispatchZt','blBilltoAccount','accountCode','address','dispDeliveryMode','transTypeId','transTypeName','orgId','orgName','dataFrom','siteArea','blAllowDispAgentMoney','dispGoodsPaymentLimited','dispDeliverySite','dispDeliverySiteCode','vendorName','creditCode','blCargoService','blHandlingService','pickupCenterSiteCode','pickupCenterSiteName','pickupCenterSiteId','blDispGood','blPushJd','pushDate','reason','sitePos','distributeCode','dispDeliverySiteId','blPushSite','siteType','logoType','sizeCode2','sizeCode3','auditStatus','auditDate','auditMan','auditManCode','auditSite','auditSiteCode','blClass','blMaterial','soonPieceType','provinceArea','secondArea','secondAreaCode','provinceAreaCode','blRecName','blDispName','blNotInputName','blDispatchZtName','blAllowAgentMoneyName','blAllowTopaymentName','blCargoServiceName','blHandlingServiceName','blAllowDispAgentMoneyName','blDispGoodName','provinceCode','cityCode','countyCode','townCode','blNotRecName','blNotRec','blNotDispName','blNotDisp','blNotCashOutName','blNotCashOut','remark','tenantId','delFlag','createBy','createTime','updateBy','updateTime',];
|
||||
const data = this.formatJson(filterVal, curList, response.rows)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '网点',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
})
|
||||
this.exportData(response.rows, loadingInstance)
|
||||
return
|
||||
}
|
||||
});
|
||||
loadingInstance.close()
|
||||
}).catch(() => {
|
||||
loadingInstance.close()
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData, resData) {
|
||||
exportData(selData, loadingInstance) {
|
||||
const curList = selData || []
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const exportParam = this.$refs.refTable.getExportParam()
|
||||
const tHeader = exportParam.header
|
||||
const filterVal = exportParam.filter
|
||||
const data = this.formatJson(filterVal, curList)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '网点',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
}).catch(() => {
|
||||
loadingInstance.close()
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData) {
|
||||
let index = 0
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
if (j === 'index') {
|
||||
return ++index
|
||||
}
|
||||
if (j === 'siteType') {
|
||||
return this.selectDictLabel(this.dict.type.emis_site_type, v[j])
|
||||
}
|
||||
if (j === 'scopeType') {
|
||||
return this.selectDictLabel(this.dict.type.emis_affiliate_type, v[j])
|
||||
}
|
||||
if (j === 'status') {
|
||||
var statusStr='xxx'
|
||||
if(v[j] == 10){
|
||||
statusStr='xxx'
|
||||
}
|
||||
return statusStr;
|
||||
return this.selectDictLabel(this.dict.type.sys_biz_enable_status, v[j])
|
||||
}
|
||||
if (j === 'blAllowTopayment' || j === 'blDispatchZt') {
|
||||
return Number(v[j]) === 1 ? '是' : '否'
|
||||
}
|
||||
return v[j]
|
||||
}))
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<!-- :header-cell-style="{background:'#f7f7f7',color:'#606266'}" -->
|
||||
|
||||
<XdTable
|
||||
ref="refTable"
|
||||
v-loading="loading"
|
||||
border
|
||||
stripe
|
||||
@ -94,7 +95,7 @@
|
||||
v-hasPermi="['emis:emisTransLine:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@ -103,7 +104,7 @@
|
||||
@click="handleExport"
|
||||
v-hasPermi="['emis:emisTransLine:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
</el-col>
|
||||
<el-button style="margin-right: 5px;"
|
||||
type="primary"
|
||||
plain
|
||||
@ -439,47 +440,49 @@ export default {
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('emis/emisTransLine/export', {
|
||||
// ...this.queryParams
|
||||
// }, `emisTransLine_${new Date().getTime()}.xlsx`)
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
var qParam = {...this.queryParams};
|
||||
qParam.pageNum=1;
|
||||
qParam.pageSize=5000;
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
const qParam = { ...this.queryParams }
|
||||
qParam.pageNum = 1
|
||||
qParam.pageSize = 5000
|
||||
|
||||
listEmisTransLine(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
||||
this.downloadLoading = false
|
||||
listEmisTransLine(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
||||
if (response.code === 200) {
|
||||
const curList = response.rows
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['序号','线路代码','线路名称','启用状态','单证员','单证员代码','客服专员','客服专员代码','操作员','操作员代码','目的国家','适用范围','品牌类型',];
|
||||
const filterVal = ['id','lineCode','lineName','status','siteAuditMan','siteAuditManCode','marketMan','marketManCode','operateMan','operateManCode','country','applyScope','logoType',];
|
||||
const data = this.formatJson(filterVal, curList, response.rows)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '线路',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
})
|
||||
this.exportData(response.rows, loadingInstance)
|
||||
return
|
||||
}
|
||||
});
|
||||
loadingInstance.close()
|
||||
}).catch(() => {
|
||||
loadingInstance.close()
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData, resData) {
|
||||
exportData(selData, loadingInstance) {
|
||||
const curList = selData || []
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const exportParam = this.$refs.refTable.getExportParam()
|
||||
const tHeader = exportParam.header
|
||||
const filterVal = exportParam.filter
|
||||
const data = this.formatJson(filterVal, curList)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '线路',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
}).catch(() => {
|
||||
loadingInstance.close()
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData) {
|
||||
let index = 0
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
if (j === 'index') {
|
||||
return ++index
|
||||
}
|
||||
if (j === 'status') {
|
||||
var statusStr='xxx'
|
||||
if(v[j] == 10){
|
||||
statusStr='xxx'
|
||||
}
|
||||
return statusStr;
|
||||
if (j === 'status' && (v[j] === 0 || v[j] === 1 || v[j] === '0' || v[j] === '1')) {
|
||||
return Number(v[j]) === 1 ? '启用' : '停用'
|
||||
}
|
||||
return v[j]
|
||||
}))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user