This commit is contained in:
linfso 2024-07-01 11:41:30 +08:00
parent 7b2ea113d1
commit 2683089833
4 changed files with 247 additions and 134 deletions

View File

@ -658,6 +658,7 @@ export default {
total: 0,
// 运单列表表格数据
emisWaybillList: [],
selectionList:[],
currentId:null,
openForm: false,
@ -898,14 +899,11 @@ export default {
this.currentTraceBillItem=row;
this.openTraceInfo=true;
},
/** 查询运单列表列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
initQueryParams(){
// this.queryOrderType="1";
// this.queryOrderDateType="1";
// this.queryOrderType="1";
// this.queryOrderDateType="1";
if(this.queryParams.billCode){
if(this.queryParams.billCode){
if(this.queryOrderType != "1"){
this.queryParams.orderSn=formatSearchStr(this.queryParams.billCode);
this.queryParams.billCode=null;
@ -927,7 +925,11 @@ export default {
}
}
this.queryParams=this.addDateRange(this.queryParams, this.dateRange,"sendDate");
},
/** 查询运单列表列表 */
getList() {
this.loading = true;
this.initQueryParams();
listEmisWaybill(this.queryParams).then(response => {
this.emisWaybillList = response.rows;
@ -965,20 +967,7 @@ export default {
this.queryParams.isAsc = column.order;
this.getList();
},
/** 新增按钮操作 */
handleAdd(row) {
// <router-link :to="'/waybillManagement/waybillEntry?billCode=' + scope.row.billCode" class="link-type">
this.$router.push({ path: '/d24/waybillManagement/WaybillEntry', query: { action:"add"} });
},
/** 修改按钮操作 */
handleUpdate(row) {
// const waybill = this.emisWaybillList.find(item => item.id === id)
this.$router.push({ path: '/d24/waybillManagement/WaybillModify', query: { action:"modify",billCode: this.billCode }})
},
handleView(row) {
this.$router.push({ path: '/d24/waybillManagement/WaybillDetail', query: { billCode: this.billCode }})
},
handleFormChanged(){
this.openForm = false;
this.getList();
@ -996,36 +985,51 @@ export default {
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// this.download('emis/emisWaybill/export', {
// ...this.queryParams
// }, `emisWaybill_${new Date().getTime()}.xlsx`)
const loadingInstance = this.$loading({
const loadingInstance = this.$loading({
text: '正在导出...'
})
var qParam = {...this.queryParams};
qParam.pageNum=1;
qParam.pageSize=5000;
})
listEmisWaybill(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
this.downloadLoading = false
if (response.code === 200) {
const curList = response.rows
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['id','订单号','客户单号,合同号','运单号','子单号,逗号隔开','订单状态','运单状态','订单类型','下单时间','客户ID','客户编号2502021','客户名称','收件客户编号2502021','收件客户客户名称','第三方客户客户编号','第三方客户客户名称','wx','收货人名','收货公司','收货人手机号','收货人电话','收货人国家','省','市','区','县','收货地址','邮编','寄件人省市区名称,逗号分隔','寄件人名','寄件公司','寄件人手机号','寄件人电话','寄件人国家','寄件省','寄件市','寄件区','寄件县','寄件地址','寄件邮编','发件人省市区名称,逗号分隔','支付方式','计费方式','支付月结编号','快递线路','快递产品类型','时效','计泡比例','清关方式','报关方式','预计到达时间','包装类型','派件方式:1-送货上门','取件方式:1-上门取件','预计上门取件开始时间','预计上门取件结束时间','取货失败原因','入仓代码','入仓名称','入仓地址','入仓联系人','入仓联系人电话','入仓单号','实际进仓单关联','客户发货开始时间','客户发货截止时间','货物大类','货物描述','货物图片,逗号隔开','预入仓代垫运费','预入仓代垫运费','预入仓实际运费','预入仓快递公司','预入仓快递单号','预入仓自定义标识','预入仓供应商','总重量','总体积','件数','实际重量','体积重量','费用币种','结算重量','计费重量','运费','是否超长','是否出账','账单备注','是否超重','超重重量','费用备注','三段码','实际货值','是否投保','投保货值','投保货值币种','保费币种','保费','保险备注','保险站点代码','投保日期','是否打印','打印人编号','打印站点','打印时间','打印次数','是否同行转单','转单代码','转单单号','转单时间','转单原因','当前网点编号','下一网点编号','上一网点点号','寄件站点代码','寄件日期','寄件人编号','取件员代码','发件网点代码','发货时间','派件人代码','派件时间','派件网点代码','生成账单时间','生成账单站点代码','生成账单人代码','目的地编号','目的省','目的城市','目的国家','目的地网点代码','目的地财务中心代码','业务人代码','销售回款人','销售联系人','操作员代码','是否问题件','问题件类型','问题件原因','问题件延期天数','是否备注消息','是否发送收件人短信','是否生成子单','签收人','签收人代码','签收站点代码','签收时间','揽收图片备注','签收底单图片','时区偏差','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','备注','创建网点','更新网点',];
const filterVal = ['id','orderSn','custOrderId','billCode','billCodeSub','orderStatus','waybillStatus','orderType','orderDate','userId','customerCode','customerName','receiveCustomerCode','receiveCustomerName','thirdCustomerCode','thirdCustomerName','openId','receiveName','receiveCompany','receiveMobile','receiveTel','receiveCountry','receiveProvince','receiveCity','receiveCounty','receiveTown','receiveAddress','receivePostcode','receivePcd','sendName','sendCompany','sendMobile','sendTel','sendCountry','sendProvince','sendCity','sendCounty','sendTown','sendAddress','sendPostcode','sendPcd','paymentType','calcFeeType','custNo','transLineType','productType','timeType','meterType','customsClear','customsEclaration','estimateDate','packType','dispatchMethod','pickupMethod','pickStartDate','pickFinishDate','pickFailReason','intoWarehouseCode','intoWarehouseName','intoWarehouseAddress','intoWarehouseContact','intoWarehousePhone','intoWarehouseBillCode','warehouseInNo','customerDeliveryBeginTime','customerDeliveryEndTime','goodsType','goodsInfo','goodsPics','blPrepareInFreight','prepareInEstFee','prepareInRealFee','prepareInExpress','prepareInBillCode','prepareInRemark','prepareInSupplier','totalWeight','totalVolume','parcelQty','billWeight','volumeWeight','currency','settlementWeight','feeWeight','freight','blOverLong','blBill','blBillText','blOverWeight','overWeightNumber','feeRemark','thirdCode','realValue','blInsure','insureValue','insureValueCurrency','insureFeeCurrency','insureFee','insureRemark','insureSiteCode','insureDate','blPrint','printManCode','printSite','printDate','printCount','blDispFd','transferCode','transferBillcode','dispFdDate','dispFdReason','currentSiteCode','nextSiteCode','lastSiteCode','registerSiteCode','registerDate','registerManCode','takePieceEmployeeCode','sendSiteCode','sendDate','dispatchManCode','dispatchDate','dispatchSiteCode','produceBillDate','produceBillSiteCode','produceBillManCode','destinationCode','destinationProvince','destinationCity','destinationCounty','dispatchUnderlingSiteCode','destinationCenterCode','marketManCode','payee','salesmen','operateEmployeeCode','blIsQuestion','problemType','problemCause','problemDelayDays','blMessage','blAcceptMessage','blGenSubbill','signMan','signManCode','signSiteCode','signDate','billPicSendRmk','billPicDispatchRmk','timezoneOffset','delFlag','createBy','createTime','updateBy','updateTime','remark','createSite','updateSite',];
const data = this.formatJson(filterVal, curList, response.rows)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '运单列表',
autoWidth: true
})
loadingInstance.close()
})
}
});
var qParam = {...this.queryParams};
// 增加导出记录
let postExportRecord={
menuName: '寄件运单查询',
dateRange: qParam.params.beginSendDate+"~"+qParam.params.endSendDate,
}
this.addExportAuditRecord(postExportRecord);
if(this.selectionList&&this.selectionList.length>0){
this.exportData(this.selectionList,loadingInstance);
}
else{
this.initQueryParams();
qParam.pageNum=1;
qParam.pageSize=5000;
listEmisWaybill(qParam).then(response => {
if (response.code === 200) {
this.exportData(response.rows,loadingInstance);
}
});
}
},
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, selData)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '寄件运单列表',
autoWidth: true
})
loadingInstance.close()
})
},
formatJson(filterVal, jsonData, resData) {
let index = 0
@ -1033,12 +1037,63 @@ export default {
if (j === 'index') {
return ++index
}
if (j === 'status') {
var statusStr='xxx'
if(v[j] == 10){
statusStr='xxx'
if (j === 'fjlx') {
return "";
}
if (j === 'fjr') {
return "";
}
if (j === 'sendMobile') {
return "";
}
if (j === 'paymentStatus') {
return this.selectDictLabel(this.dict.type.emis_payment_status,v[j]);
}
if (j === 'pickupMethod') {
return this.selectDictLabel(this.dict.type.emis_qujian_fangshi,v[j]);
}
if (j === 'customsEclaration') {
return this.selectDictLabel(this.dict.type.emis_declare_mode,v[j]);
}
if (j === 'customsClear') {
return this.selectDictLabel(this.dict.type.emis_customs_clear,v[j]);
}
if (j === 'packType') {
return this.selectDictLabels(this.dict.type.emis_tab_packing_type,v[j]);
}
if (j === 'dispatchMethod') {
if(v[j] == 1){
return '派送';
}else{
return '自提';
}
return statusStr;
}
if (j === 'blMessage') {
if(v[j] == 1){
return '发送';
}else{
return '不发送';
}
}
if (j === 'blAcceptMessage') {
if(v[j] == 1){
return '发送';
}else{
return '不发送';
}
}
if (j === 'blSign') {
if(v[j] == 1){
return '已签收';
}else{
return '未签收';
}
}
if (j === 'paymentType') {
return this.selectDictLabel(this.dict.type.emis_payment_type,v[j]);
}
return v[j]
}))

View File

@ -658,6 +658,7 @@ export default {
total: 0,
// 运单列表表格数据
emisWaybillList: [],
selectionList:[],
currentId:null,
openForm: false,
@ -884,9 +885,9 @@ export default {
this.openTraceInfo=true;
},
/** 查询运单列表列表 */
getList() {
this.loading = true;
initQueryParams(){
// this.queryOrderType="1";
// this.queryOrderDateType="1";
if(this.queryParams.billCode){
if(this.queryOrderType != "1"){
@ -910,8 +911,12 @@ export default {
}
}
this.queryParams=this.addDateRange(this.queryParams, this.dateRange,"sendDate");
},
/** 查询运单列表列表 */
getList() {
this.loading = true;
this.initQueryParams();
listEmisWaybill(this.queryParams).then(response => {
this.emisWaybillList = response.rows;
this.total = response.total;
@ -948,20 +953,6 @@ export default {
this.queryParams.isAsc = column.order;
this.getList();
},
/** 新增按钮操作 */
handleAdd(row) {
// <router-link :to="'/waybillManagement/waybillEntry?billCode=' + scope.row.billCode" class="link-type">
this.$router.push({ path: '/d24/waybillManagement/WaybillEntry', query: { action:"add"} });
},
/** 修改按钮操作 */
handleUpdate(row) {
// const waybill = this.emisWaybillList.find(item => item.id === id)
this.$router.push({ path: '/d24/waybillManagement/WaybillModify', query: { action:"modify",billCode: this.billCode }})
},
handleView(row) {
this.$router.push({ path: '/d24/waybillManagement/WaybillDetail', query: { billCode: this.billCode }})
},
handleFormChanged(){
this.openForm = false;
this.getList();
@ -979,36 +970,53 @@ export default {
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// this.download('emis/emisWaybill/export', {
// ...this.queryParams
// }, `emisWaybill_${new Date().getTime()}.xlsx`)
const loadingInstance = this.$loading({
text: '正在导出...'
})
var qParam = {...this.queryParams};
qParam.pageNum=1;
qParam.pageSize=5000;
listEmisWaybill(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
this.downloadLoading = false
if (response.code === 200) {
const curList = response.rows
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['id','订单号','客户单号,合同号','运单号','子单号,逗号隔开','订单状态','运单状态','订单类型','下单时间','客户ID','客户编号2502021','客户名称','收件客户编号2502021','收件客户客户名称','第三方客户客户编号','第三方客户客户名称','wx','收货人名','收货公司','收货人手机号','收货人电话','收货人国家','省','市','区','县','收货地址','邮编','寄件人省市区名称,逗号分隔','寄件人名','寄件公司','寄件人手机号','寄件人电话','寄件人国家','寄件省','寄件市','寄件区','寄件县','寄件地址','寄件邮编','发件人省市区名称,逗号分隔','支付方式','计费方式','支付月结编号','快递线路','快递产品类型','时效','计泡比例','清关方式','报关方式','预计到达时间','包装类型','派件方式:1-送货上门','取件方式:1-上门取件','预计上门取件开始时间','预计上门取件结束时间','取货失败原因','入仓代码','入仓名称','入仓地址','入仓联系人','入仓联系人电话','入仓单号','实际进仓单关联','客户发货开始时间','客户发货截止时间','货物大类','货物描述','货物图片,逗号隔开','预入仓代垫运费','预入仓代垫运费','预入仓实际运费','预入仓快递公司','预入仓快递单号','预入仓自定义标识','预入仓供应商','总重量','总体积','件数','实际重量','体积重量','费用币种','结算重量','计费重量','运费','是否超长','是否出账','账单备注','是否超重','超重重量','费用备注','三段码','实际货值','是否投保','投保货值','投保货值币种','保费币种','保费','保险备注','保险站点代码','投保日期','是否打印','打印人编号','打印站点','打印时间','打印次数','是否同行转单','转单代码','转单单号','转单时间','转单原因','当前网点编号','下一网点编号','上一网点点号','寄件站点代码','寄件日期','寄件人编号','取件员代码','发件网点代码','发货时间','派件人代码','派件时间','派件网点代码','生成账单时间','生成账单站点代码','生成账单人代码','目的地编号','目的省','目的城市','目的国家','目的地网点代码','目的地财务中心代码','业务人代码','销售回款人','销售联系人','操作员代码','是否问题件','问题件类型','问题件原因','问题件延期天数','是否备注消息','是否发送收件人短信','是否生成子单','签收人','签收人代码','签收站点代码','签收时间','揽收图片备注','签收底单图片','时区偏差','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','备注','创建网点','更新网点',];
const filterVal = ['id','orderSn','custOrderId','billCode','billCodeSub','orderStatus','waybillStatus','orderType','orderDate','userId','customerCode','customerName','receiveCustomerCode','receiveCustomerName','thirdCustomerCode','thirdCustomerName','openId','receiveName','receiveCompany','receiveMobile','receiveTel','receiveCountry','receiveProvince','receiveCity','receiveCounty','receiveTown','receiveAddress','receivePostcode','receivePcd','sendName','sendCompany','sendMobile','sendTel','sendCountry','sendProvince','sendCity','sendCounty','sendTown','sendAddress','sendPostcode','sendPcd','paymentType','calcFeeType','custNo','transLineType','productType','timeType','meterType','customsClear','customsEclaration','estimateDate','packType','dispatchMethod','pickupMethod','pickStartDate','pickFinishDate','pickFailReason','intoWarehouseCode','intoWarehouseName','intoWarehouseAddress','intoWarehouseContact','intoWarehousePhone','intoWarehouseBillCode','warehouseInNo','customerDeliveryBeginTime','customerDeliveryEndTime','goodsType','goodsInfo','goodsPics','blPrepareInFreight','prepareInEstFee','prepareInRealFee','prepareInExpress','prepareInBillCode','prepareInRemark','prepareInSupplier','totalWeight','totalVolume','parcelQty','billWeight','volumeWeight','currency','settlementWeight','feeWeight','freight','blOverLong','blBill','blBillText','blOverWeight','overWeightNumber','feeRemark','thirdCode','realValue','blInsure','insureValue','insureValueCurrency','insureFeeCurrency','insureFee','insureRemark','insureSiteCode','insureDate','blPrint','printManCode','printSite','printDate','printCount','blDispFd','transferCode','transferBillcode','dispFdDate','dispFdReason','currentSiteCode','nextSiteCode','lastSiteCode','registerSiteCode','registerDate','registerManCode','takePieceEmployeeCode','sendSiteCode','sendDate','dispatchManCode','dispatchDate','dispatchSiteCode','produceBillDate','produceBillSiteCode','produceBillManCode','destinationCode','destinationProvince','destinationCity','destinationCounty','dispatchUnderlingSiteCode','destinationCenterCode','marketManCode','payee','salesmen','operateEmployeeCode','blIsQuestion','problemType','problemCause','problemDelayDays','blMessage','blAcceptMessage','blGenSubbill','signMan','signManCode','signSiteCode','signDate','billPicSendRmk','billPicDispatchRmk','timezoneOffset','delFlag','createBy','createTime','updateBy','updateTime','remark','createSite','updateSite',];
const data = this.formatJson(filterVal, curList, response.rows)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '运单列表',
autoWidth: true
})
loadingInstance.close()
})
}
});
/** 导出按钮操作 */
handleExport() {
const loadingInstance = this.$loading({
text: '正在导出...'
})
var qParam = {...this.queryParams};
// 增加导出记录
let postExportRecord={
menuName: '寄件运单查询',
dateRange: qParam.params.beginSendDate+"~"+qParam.params.endSendDate,
}
this.addExportAuditRecord(postExportRecord);
if(this.selectionList&&this.selectionList.length>0){
this.exportData(this.selectionList,loadingInstance);
}
else{
this.initQueryParams();
qParam.pageNum=1;
qParam.pageSize=5000;
listEmisWaybill(qParam).then(response => {
if (response.code === 200) {
this.exportData(response.rows,loadingInstance);
}
});
}
},
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, selData)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '寄件运单列表',
autoWidth: true
})
loadingInstance.close()
})
},
formatJson(filterVal, jsonData, resData) {
let index = 0
@ -1016,16 +1024,68 @@ export default {
if (j === 'index') {
return ++index
}
if (j === 'status') {
var statusStr='xxx'
if(v[j] == 10){
statusStr='xxx'
if (j === 'fjlx') {
return "";
}
if (j === 'fjr') {
return "";
}
if (j === 'sendMobile') {
return "";
}
if (j === 'paymentStatus') {
return this.selectDictLabel(this.dict.type.emis_payment_status,v[j]);
}
if (j === 'pickupMethod') {
return this.selectDictLabel(this.dict.type.emis_qujian_fangshi,v[j]);
}
if (j === 'customsEclaration') {
return this.selectDictLabel(this.dict.type.emis_declare_mode,v[j]);
}
if (j === 'customsClear') {
return this.selectDictLabel(this.dict.type.emis_customs_clear,v[j]);
}
if (j === 'packType') {
return this.selectDictLabels(this.dict.type.emis_tab_packing_type,v[j]);
}
if (j === 'dispatchMethod') {
if(v[j] == 1){
return '派送';
}else{
return '自提';
}
return statusStr;
}
if (j === 'blMessage') {
if(v[j] == 1){
return '发送';
}else{
return '不发送';
}
}
if (j === 'blAcceptMessage') {
if(v[j] == 1){
return '发送';
}else{
return '不发送';
}
}
if (j === 'blSign') {
if(v[j] == 1){
return '已签收';
}else{
return '未签收';
}
}
if (j === 'paymentType') {
return this.selectDictLabel(this.dict.type.emis_payment_type,v[j]);
}
return v[j]
}))
},
/** 列索引函数 */
getIndex($index) {
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1

View File

@ -872,36 +872,36 @@ export default {
this.openView=true;
},
initQueryParams(){
// this.queryOrderType="1";
// this.queryOrderDateType="1";
// this.queryOrderType="1";
// this.queryOrderDateType="1";
if(this.queryParams.billCode){
if(this.queryOrderType != "1"){
this.queryParams.orderSn=formatSearchStr(this.queryParams.billCode);
this.queryParams.billCode=null;
}else{
// 处理子单号
let qBillCode=formatSearchStr(this.queryParams.billCode);
let billArr = qBillCode.split(",");
let newBillCodeStr="";
billArr.forEach(item=>{
if(item.startsWith("T")){
let mainBillCode=item.substr(0,14);
newBillCodeStr=newBillCodeStr+mainBillCode+",";
}else{
newBillCodeStr=newBillCodeStr+item+",";
}
});
this.queryParams.billCode=newBillCodeStr;
if(this.queryParams.billCode){
if(this.queryOrderType != "1"){
this.queryParams.orderSn=formatSearchStr(this.queryParams.billCode);
this.queryParams.billCode=null;
}else{
// 处理子单号
let qBillCode=formatSearchStr(this.queryParams.billCode);
let billArr = qBillCode.split(",");
let newBillCodeStr="";
billArr.forEach(item=>{
if(item.startsWith("T")){
let mainBillCode=item.substr(0,14);
newBillCodeStr=newBillCodeStr+mainBillCode+",";
}else{
newBillCodeStr=newBillCodeStr+item+",";
}
});
this.queryParams.billCode=newBillCodeStr;
}
}
this.queryParams=this.addDateRange(this.queryParams, this.dateRange,"sendDate");
},
}
}
this.queryParams=this.addDateRange(this.queryParams, this.dateRange,"sendDate");
},
/** 查询运单列表列表 */
getList() {
this.loading = true;
this.initQueryParams();
listEmisWaybill(this.queryParams).then(response => {
this.emisWaybillList = response.rows;
this.total = response.total;
@ -958,7 +958,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
handleExport() {
const loadingInstance = this.$loading({
text: '正在导出...'
})
@ -966,7 +966,7 @@ export default {
var qParam = {...this.queryParams};
// 增加导出记录
let postExportRecord={
menuName: '寄件运单查询新',
menuName: '寄件运单查询',
dateRange: qParam.params.beginSendDate+"~"+qParam.params.endSendDate,
}

View File

@ -944,8 +944,6 @@ export default {
/** 查询运单列表列表 */
getList() {
this.loading = true;
this.initQueryParams();
listEmisWaybill(this.queryParams).then(response => {