diff --git a/public/static/tpl/import_country.xlsx b/public/static/tpl/import_country.xlsx new file mode 100644 index 00000000..ad3a78b9 Binary files /dev/null and b/public/static/tpl/import_country.xlsx differ diff --git a/public/static/tpl/import_special_calc_weight.xlsx b/public/static/tpl/import_special_calc_weight.xlsx new file mode 100644 index 00000000..8ad7dcce Binary files /dev/null and b/public/static/tpl/import_special_calc_weight.xlsx differ diff --git a/src/api/emis/emisCountry.js b/src/api/emis/emisCountry.js index 38dafdab..a6d5bdf2 100644 --- a/src/api/emis/emisCountry.js +++ b/src/api/emis/emisCountry.js @@ -51,3 +51,12 @@ export function delEmisCountry(id) { method: 'delete' }) } + +//批量导入国家 +export function draftSubmitCountry(data) { + return request({ + url: '/emis/emisCountry/draftSubmitCountry', + method: 'post', + data: data + }) +} \ No newline at end of file diff --git a/src/api/emis/emisSpecialCalcWeight.js b/src/api/emis/emisSpecialCalcWeight.js index ea8cadf1..82c94a41 100644 --- a/src/api/emis/emisSpecialCalcWeight.js +++ b/src/api/emis/emisSpecialCalcWeight.js @@ -42,3 +42,12 @@ export function delEmisSpecialCalcWeight(id) { method: 'delete' }) } + +//批量导入特殊取重 +export function draftSubmitSpecialCalcWeight(data) { + return request({ + url: '/emis/emisSpecialCalcWeight/draftSubmitSpecialCalcWeight', + method: 'post', + data: data + }) +} \ No newline at end of file diff --git a/src/views/emis/emisCountry/batchImportCountry.vue b/src/views/emis/emisCountry/batchImportCountry.vue new file mode 100644 index 00000000..af22def4 --- /dev/null +++ b/src/views/emis/emisCountry/batchImportCountry.vue @@ -0,0 +1,400 @@ + + + + + + + + + + 选择文件 + 下载导入Excel模板 + + + + 批量发送 + + + 删除 + + + + + + + + 发送成功 + 待发送 + 发送异常 + + + + + {{ scope.row.errorInfo }} + 发送成功 + 待发送 + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/emis/emisCountry/index.vue b/src/views/emis/emisCountry/index.vue index 7c8d81fe..f416ca95 100644 --- a/src/views/emis/emisCountry/index.vue +++ b/src/views/emis/emisCountry/index.vue @@ -155,6 +155,16 @@ v-hasPermi="['emis:emisCountry:export']" >导出 + + 批量导入 + @@ -276,17 +286,22 @@ + + + + diff --git a/src/views/emis/emisSpecialCalcWeight/batchImportSpecialCalcWeight.vue b/src/views/emis/emisSpecialCalcWeight/batchImportSpecialCalcWeight.vue new file mode 100644 index 00000000..add4be08 --- /dev/null +++ b/src/views/emis/emisSpecialCalcWeight/batchImportSpecialCalcWeight.vue @@ -0,0 +1,414 @@ + + + + + + + + + + 选择文件 + 下载导入Excel模板 + + + + 批量发送 + + + 删除 + + + + + + + + 发送成功 + 待发送 + 发送异常 + + + + + {{ scope.row.errorInfo }} + 发送成功 + 待发送 + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/emis/emisSpecialCalcWeight/index.vue b/src/views/emis/emisSpecialCalcWeight/index.vue index e0b21728..0d2556ec 100644 --- a/src/views/emis/emisSpecialCalcWeight/index.vue +++ b/src/views/emis/emisSpecialCalcWeight/index.vue @@ -109,6 +109,16 @@ v-hasPermi="['emis:emisSpecialCalcWeight:export']" >导出 --> + + 批量导入 + @@ -177,7 +187,10 @@ --> - + + + + @@ -189,10 +202,11 @@ import CountryPicker from '@/views/emis/EmisBaseTools/CountryPicker.vue'; import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue'; import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue'; import TransProductCasPicker from '@/views/emis/EmisBaseTools/TransProductCasPicker.vue'; +import batchImportSpecialCalcWeight from '@/views/emis/emisSpecialCalcWeight/batchImportSpecialCalcWeight.vue'; export default { name: "EmisSpecialCalcWeight", - components: { CountryPicker,TransLinePicker,elDateSimplePicker,TransProductPicker,emisSpecialCalcWeightForm ,TransProductCasPicker}, + components: { CountryPicker,TransLinePicker,elDateSimplePicker,TransProductPicker,emisSpecialCalcWeightForm ,TransProductCasPicker,batchImportSpecialCalcWeight}, dicts: [ 'sys_normal_disable', 'emis_take_weight_method', @@ -236,6 +250,8 @@ export default { daterangeCreateTime: [], // 更新时间时间范围 daterangeUpdateTime: [], + openBatchAdd: false, + titleBatchAdd: "批量新增特殊取重", // 查询参数 queryParams: { pageNum: 1, @@ -391,6 +407,10 @@ export default { dateTimeChange(value){ this.dateTimeRange=value; }, + handleBatchAdd(){ + this.openBatchAdd= true; + this.batchAddTitleForm = "批量导入"; + }, } }; diff --git a/src/views/emis/emisTmsScanRecord/signatureRecordQuery.vue b/src/views/emis/emisTmsScanRecord/signatureRecordQuery.vue index 669e327c..83659881 100644 --- a/src/views/emis/emisTmsScanRecord/signatureRecordQuery.vue +++ b/src/views/emis/emisTmsScanRecord/signatureRecordQuery.vue @@ -1,14 +1,14 @@ - - - - 运单号 - 订单号 - - - - - + + + + - - - - + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - + + - - + + - + - + 导出 - - + + @@ -109,26 +109,26 @@ - - {{ parseTime(scope.row.waybillDetail.sendDate) }} - + + {{ parseTime(scope.row.waybillDetail.sendDate) }} + - - {{ parseTime(scope.row.waybillDetail.estimateDate) }} - + + {{ parseTime(scope.row.waybillDetail.estimateDate) }} + - + {{ scope.row.waybillDetail.transLineTypeName }} - + - - - + + + {{ scope.row.waybillDetail.productTypeName }} @@ -162,8 +162,8 @@ - {{ scope.row.waybillDetail.customerName }} - + {{ scope.row.waybillDetail.customerName }} + @@ -320,22 +320,7 @@ export default { /** 查询扫描记录列表 */ getList() { this.loading = true; - console.log("---->this.queryParams,", this.queryParams); - let queryParams = Object.assign({},this.queryParams); - if (null != this.dateTimeRange && '' != this.dateTimeRange) { - queryParams.params.beginScanDate = dateToStr(new Date(this.dateTimeRange[0])); - queryParams.params.endScanDate = dateToStr(new Date(this.dateTimeRange[1])); - }else{ - queryParams.params.beginScanDate = null; - queryParams.params.endScanDate = null; - } - if(this.queryParams.params.queryOrderType == "1"){ - queryParams.orderSN=null; - }else if(this.queryParams.params.queryOrderType == "0"){ - queryParams.orderSN=this.queryParams.billCode; - queryParams.billCode=null; - } - queryParams.scanType="50"; + let queryParams = this.initQueryParams(); listEmisTmsScanRecord(queryParams).then(response => { this.tmsScanList = []; this.loading = false; @@ -356,6 +341,24 @@ export default { } }); }, + initQueryParams() { + let qParam = Object.assign({}, this.queryParams); + if (null != this.dateTimeRange && '' != this.dateTimeRange) { + qParam.params.beginScanDate = dateToStr(new Date(this.dateTimeRange[0])); + qParam.params.endScanDate = dateToStr(new Date(this.dateTimeRange[1])); + } else { + qParam.params.beginScanDate = null; + qParam.params.endScanDate = null; + } + if (this.queryParams.params.queryOrderType == "1") { + qParam.orderSN = null; + } else if (this.queryParams.params.queryOrderType == "0") { + qParam.orderSN = this.queryParams.billCode; + qParam.billCode = null; + } + qParam.scanType = "50"; + return qParam; + }, onStaffSelect(item){ this.form.dispatchOrSendMan=item.empName || this.$store.getters.empName; this.form.dispatchOrSendManCode=item.empCode || this.$store.getters.empCode; @@ -440,25 +443,12 @@ export default { }, /** 导出按钮操作 */ handleExport() { - const loadingInstance = this.$loading({ - text: '正在导出...' - }) - let queryParams = Object.assign({},this.queryParams); - queryParams.pageNum=1; - queryParams.pageSize=5000; - if (null != this.dateTimeRange && '' != this.dateTimeRange) { - queryParams.params.beginSignDate = this.dateTimeRange[0]; - queryParams.params.endSignDate = this.dateTimeRange[1]; - }else{ - queryParams.params.beginSignDate = null; - queryParams.params.endSignDate = null; - } - if(this.queryParams.params.queryOrderType == "1"){ - queryParams.orderSN=null; - }else if(this.queryParams.params.queryOrderType == "0"){ - queryParams.orderSN=this.queryParams.billCode; - queryParams.billCode=null; - } + const loadingInstance = this.$loading({ + text: '正在导出...' + }) + let queryParams = this.initQueryParams(); + queryParams.pageNum = 1; + queryParams.pageSize = 5000; listEmisTmsScanRecord(queryParams).then(response => { this.downloadLoading = false let rows = response.rows; @@ -467,40 +457,27 @@ export default { this.$modal.msgError("未查到单号"); return; } - // for (let index = 0; index < rows.length; index++) { - // let scanRstItem = rows[index]; - // console.log(scanRstItem); - // let record =Object.assign({}, scanRstItem) - // record.queryType = this.queryParams.queryType; - // record.scanSiteName = this.queryParams.scanSiteName || record.scanSiteName; - // record.preOrNextStation = this.queryParams.preOrNextStation || scanRstItem.preOrNextStation; - // this.tmsScanList.push(record); - // } if (response.code === 200) { - const curList = [] - for (let index = 0; index < response.rows.length; index++) { - let scanRstItem = response.rows[index]; - let record =Object.assign({}, scanRstItem) - record.orderType = this.queryParams.orderType; - record.scanSiteName = this.queryParams.scanSiteName || record.scanSiteName; - record.preOrNextStation = this.queryParams.preOrNextStation || scanRstItem.preOrNextStation; - curList.push(record); - } - import('@/vendor/Export2Excel').then(excel => { - const tHeader = ['id','单号','单号类型','车牌号','扫描时间','扫描类型','扫描网点','上/下一网点','扫描员','录入时间','扫描重量']; - const filterVal = ['id','billCode','orderType','carNo','scanDate','scanType','scanSite','preOrNextStation','scanMan','createTime','scanWeight']; - const data = this.formatJson(filterVal, curList, curList) - excel.export_json_to_excel({ - header: tHeader, - data, - filename: '签收记录', - autoWidth: true - }) - loadingInstance.close() - }) + this.exportData(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 return jsonData.map(v => filterVal.map(j => { @@ -508,18 +485,50 @@ export default { return ++index } if (j === 'status') { - var statusStr='xxx' - if(v[j] == 10){ - statusStr='xxx' - } - return statusStr; + return '已签收'; + } + if (j === 'sendDate') { + //formatJson + return v['waybillDetail']?.[j]||''; + } + //waybillDetail.estimateDate + if (j === 'estimateDate') { + return v['waybillDetail']?.[j]||''; + } + //waybillDetail.transLineTypeName + if (j === 'transLineTypeName') { + return v['waybillDetail']?.[j]||''; + } + //paymentType + if (j === 'paymentType') { + return this.selectDictLabel(this.dict.type.emis_payment_type,v['waybillDetail'][j]); + } + //waybillDetail.timeType + if (j === 'timeType') { + return v['waybillDetail']?.[j]||''; + } + //waybillDetail.customerName + if (j === 'customerName') { + return v['waybillDetail']?.[j]||''; + } + //waybillDetail.receiveCountryName + if (j === 'waybillDetail.receiveCountryName') { + return v['waybillDetail']?.['receiveCountryName']||''; + } + // waybillDetail.receiveProvinceName + if (j === 'waybillDetail.receiveProvinceName') { + return v['waybillDetail']?.['receiveProvinceName']||''; + } + //waybillDetail.productTypeName + if (j === 'productTypeName') { + return v['waybillDetail']?.[j]||''; } return v[j] })) }, /** 列索引函数 */ getIndex($index) { - return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1 + return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1 }, } }; @@ -527,26 +536,26 @@ export default {