779 lines
26 KiB
Vue
779 lines
26 KiB
Vue
<template>
|
|
<XdPageContainer class="app-container">
|
|
<SearchForm slot="pageHeader" :model="queryParams" ref="queryForm" size="mini" :maxShow="8" label-width="100px" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
|
|
<el-form-item label="" prop="billCode">
|
|
<div slot="label">
|
|
<el-radio-group class="query-label" v-model="queryOrderType">
|
|
<el-radio :key="1" label="1">运单号</el-radio>
|
|
<!-- <el-radio :key="0" label="0">订单号</el-radio> -->
|
|
</el-radio-group>
|
|
</div>
|
|
<XdTextareaInput
|
|
v-model="queryParams.billCode"
|
|
:placeholder="$t('多个流水号逗号或换行隔开')"
|
|
clearable
|
|
:rows="2"
|
|
/>
|
|
<!-- @keyup.enter.native="handleQuery" -->
|
|
</el-form-item>
|
|
<el-form-item label="寄件日期" prop="dateTimeRange">
|
|
<elDateAdvPicker clearable v-model="dateTimeRange" @dateTimeChange="onDateSelect" ></elDateAdvPicker>
|
|
</el-form-item>
|
|
|
|
<el-form-item label="寄件网点" prop="productType">
|
|
<EmisSiteSimplePicker1 v-model="queryParams.sendSiteCode" ></EmisSiteSimplePicker1>
|
|
</el-form-item>
|
|
|
|
<el-form-item label="目的网点" prop="dispatchUnderlingSiteCode">
|
|
<EmisSiteSimplePicker2 v-model="queryParams.dispatchUnderlingSiteCode" ></EmisSiteSimplePicker2>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="寄件人" prop="sendName">
|
|
<el-input
|
|
v-model="queryParams.sendName"
|
|
:placeholder="$t('寄件人')"
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
|
|
<el-form-item label="收件人" prop="receiveName">
|
|
<el-input
|
|
v-model="queryParams.receiveName"
|
|
:placeholder="$t('收件人')"
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="支付方式" prop="paymentType" >
|
|
<el-select clearable v-model="queryParams.paymentType" placeholder="请选择">
|
|
<el-option
|
|
v-for="dict in dict.type.emis_payment_type"
|
|
:key="dict.value"
|
|
:label="dict.label"
|
|
:value="dict.value"
|
|
></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
|
|
<el-form-item label="打印状态" prop="blPrint" >
|
|
<el-select clearable v-model="queryParams.blPrint" placeholder="请选择">
|
|
<el-option label="已打印" :value="1">已打印</el-option>
|
|
<el-option label="未打印" :value="0">未打印</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
|
|
</SearchForm>
|
|
|
|
|
|
<XdTable
|
|
slot="pageContent"
|
|
slot-scope="slotProps"
|
|
:height="(slotProps.contentHeight)+'px'"
|
|
|
|
ref="refTable"
|
|
|
|
storageName="A4WaybillIPrinted_main"
|
|
v-loading="loading"
|
|
border
|
|
size="small"
|
|
:data="emisWaybillList"
|
|
:showSearch.sync="showSearch"
|
|
:queryParams="queryParams"
|
|
:total="total"
|
|
@queryTable="getList"
|
|
@selection-change="handleSelectionChange"
|
|
@sort-change="handleSortChange"
|
|
>
|
|
|
|
<div slot="toolbar">
|
|
<el-row :gutter="10" class="mb8" style="display: flex;flex-wrap: wrap;">
|
|
|
|
<!-- <el-col :span="1.5">
|
|
<el-button
|
|
type="primary"
|
|
plain
|
|
icon="el-icon-print"
|
|
size="mini"
|
|
:disabled="multiple"
|
|
@click="handleBatchPrint"
|
|
>打印</el-button>
|
|
</el-col> -->
|
|
<!-- <el-col :span="1.5">
|
|
<el-button
|
|
type="success"
|
|
plain
|
|
icon="el-icon-edit"
|
|
size="mini"
|
|
:disabled="single"
|
|
@click="handleView"
|
|
>查看</el-button>
|
|
</el-col> -->
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
type="primary"
|
|
plain
|
|
size="mini"
|
|
:disabled="multiple"
|
|
@click="handlePrintPreview"
|
|
>预览</el-button>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
type="primary"
|
|
plain
|
|
size="mini"
|
|
:disabled="multiple"
|
|
@click="handleDownPDF"
|
|
>下载pdf</el-button>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
type="warning"
|
|
plain
|
|
icon="el-icon-download"
|
|
size="mini"
|
|
@click="handleExport"
|
|
v-hasPermi="['emis:emisWaybill:export']"
|
|
>导出</el-button>
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
<TanexPrinterPanel ref="tanexPrinter" :isShowPinters="false" :isShowTpl="false" :isShowSubBillRange="false" @onPrint="handleBatchPrint"></TanexPrinterPanel>
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
</div>
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column :label="$t('运单编号')" align="center" prop="billCode" min-width="120" :show-overflow-tooltip="true" />
|
|
<el-table-column :label="$t('订单号')" align="center" prop="orderSn" width="100" :show-overflow-tooltip="true"/>
|
|
|
|
<el-table-column :label="$t('是否打印')" align="center" prop="blPrint" min-width="80" >
|
|
<template slot-scope="scope">
|
|
<el-tag v-if="scope.row.blPrint==1" type="success">已打印</el-tag>
|
|
<el-tag v-else type="danger">未打印</el-tag>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('打印次数')" align="center" prop="printCount" min-width="80" />
|
|
|
|
<el-table-column :label="$t('打印时间')" align="center" prop="printDate" min-width="80" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('打印人')" align="center" prop="printManName" min-width="80" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('打印站点')" align="center" prop="printSiteName" min-width="80" :show-overflow-tooltip="true"/>
|
|
|
|
|
|
<el-table-column :label="$t('进仓单号')" align="center" prop="warehouseInNo" width="80" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('寄件日期')" align="center" prop="sendDate" min-width="100" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('取件方式')" align="center" prop="pickupMethod" width="100" >
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.emis_qujian_fangshi" :value="scope.row.pickupMethod"/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('客户名称')" align="center" prop="customerName" min-width="80" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<span v-if="scope.row.paymentType==2 || scope.row.paymentType==4 || scope.row.paymentType==5">{{scope.row.customerName}}</span>
|
|
<span v-else></span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column :label="$t('销售回款人')" align="center" prop="payee" min-width="100" />
|
|
<el-table-column :label="$t('销售联系人')" align="center" prop="salesmen" min-width="100" />
|
|
|
|
<el-table-column :label="$t('起始国')" align="center" prop="sendCountryName" width="80" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('目的国')" align="center" prop="receiveCountryName" width="80" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('线路')" align="center" prop="transLineTypeName" min-width="80" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('产品类型')" align="center" prop="productTypeName" min-width="80" :show-overflow-tooltip="true"/>
|
|
|
|
<el-table-column :label="$t('清关方式')" align="center" prop="customsClear" min-width="80" >
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.emis_customs_clear" :value="scope.row.customsClear"/>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column :label="$t('报关方式')" align="center" prop="customsEclaration" min-width="80" >
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.emis_declare_mode" :value="scope.row.customsEclaration"/>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column :label="$t('寄件网点')" align="center" prop="sendSiteName" min-width="80" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('寄件人')" align="center" prop="sendName" min-width="80" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('寄件公司')" align="center" prop="sendCompany" min-width="80" :show-overflow-tooltip="true"/>
|
|
|
|
<el-table-column :label="$t('目的地')" align="center" prop="destinationName" min-width="80" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('目的网点')" align="center" prop="dispatchUnderlingSiteName" min-width="80" :show-overflow-tooltip="true"/>
|
|
|
|
<el-table-column :label="$t('收件人')" align="center" prop="receiveName" min-width="80" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('收件公司')" align="center" prop="receiveCompany" min-width="80" :show-overflow-tooltip="true"/>
|
|
|
|
<el-table-column :label="$t('货物名称')" align="center" prop="goodsInfo" min-width="80" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('包装类型')" align="center" prop="packType" min-width="80" >
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.emis_tab_packing_type" :value="scope.row.packType"/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('件数')" align="center" prop="parcelQty" min-width="80" />
|
|
<el-table-column :label="$t('实际重量')" align="center" prop="billWeight" min-width="80" />
|
|
<el-table-column :label="$t('体积')" align="center" prop="totalVolume" min-width="80" />
|
|
<el-table-column :label="$t('体积重量')" align="center" prop="volumeWeight" min-width="80" />
|
|
<el-table-column :label="$t('结算重量')" align="center" prop="settlementWeight" min-width="80" />
|
|
|
|
|
|
<el-table-column :label="$t('支付方式')" align="center" prop="paymentType" min-width="80" :show-overflow-tooltip="true" >
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.emis_payment_type" :value="scope.row.paymentType"/>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column :label="$t('运费')" align="center" prop="freight" min-width="80" />
|
|
|
|
<el-table-column :label="$t('录单人')" align="center" prop="registerManName" min-width="80" :show-overflow-tooltip="true" />
|
|
<el-table-column :label="$t('录单备注')" align="center" prop="remark" min-width="80" :show-overflow-tooltip="true" />
|
|
|
|
</XdTable>
|
|
|
|
</XdPageContainer>
|
|
</template>
|
|
|
|
<script>
|
|
import { listEmisWaybill, getEmisWaybill, delEmisWaybill, addEmisWaybill, updateEmisWaybill } from "@/api/emis/emisWaybill";
|
|
import emisWaybillForm from '@/views/emis/emisWaybill/emisWaybillForm';
|
|
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
|
import CountryPicker0 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
|
import CountryPicker1 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
|
|
|
import CountryPicker2 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
|
import ProvincePicker2 from '@/views/emis/EmisBaseTools/ProvincePicker.vue';
|
|
|
|
import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue';
|
|
import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue';
|
|
|
|
|
|
import PayeePicker from '@/views/emis/EmisBaseTools/PayeePicker.vue';
|
|
import SalemanPicker from '@/views/emis/EmisBaseTools/SalemanPicker.vue';
|
|
|
|
import EmisUserSimplePicker0 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
|
import EmisUserSimplePicker1 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
|
|
|
import EmisSiteSimplePicker1 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
|
import EmisSiteSimplePicker2 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
|
|
|
import ProblemTypePicker from '@/views/emis/EmisBaseTools/ProblemTypePicker.vue';
|
|
|
|
import TanexPrinterPanel from '@/views/emis/EmisBaseTools/TanexPrinterPanel.vue';
|
|
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
|
|
|
|
|
|
export default {
|
|
name: "A4WaybillIPrinted",
|
|
components: {
|
|
TanexPrinterPanel,
|
|
elDateAdvPicker,
|
|
emisWaybillForm,
|
|
CountryPicker1,
|
|
CountryPicker2,
|
|
ProvincePicker2,
|
|
TransLinePicker,
|
|
TransProductPicker,
|
|
PayeePicker,
|
|
SalemanPicker,
|
|
EmisUserSimplePicker0,
|
|
EmisUserSimplePicker1,
|
|
EmisSiteSimplePicker1,
|
|
EmisSiteSimplePicker2,
|
|
ProblemTypePicker
|
|
},
|
|
dicts: ['emis_qujian_fangshi','emis_declare_mode','emis_customs_clear',
|
|
'emis_tab_packing_type','emis_tab_dispatch_mode','emis_payment_type',
|
|
'emis_calc_fee_type','emis_print_type','emis_payment_status','emis_waybill_status'
|
|
],
|
|
data() {
|
|
return {
|
|
tableHeight: 200,
|
|
// 遮罩层
|
|
loading: true,
|
|
// 选中数组
|
|
ids: [],
|
|
// 非单个禁用
|
|
single: true,
|
|
// 非多个禁用
|
|
multiple: true,
|
|
// 显示搜索条件
|
|
showSearch: true,
|
|
// 创建时间搜索
|
|
dateTimeRange:[],
|
|
// 总条数
|
|
total: 0,
|
|
// 运单列表表格数据
|
|
emisWaybillList: [],
|
|
|
|
selectionList:[],
|
|
|
|
currentId:null,
|
|
openForm: false,
|
|
titleForm: "",
|
|
queryOrderType:null,
|
|
currentSelection:[],
|
|
|
|
// 弹出展示层
|
|
id:null,
|
|
titleView:"",
|
|
openView: false,
|
|
|
|
// 查询参数
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageSize: 20,
|
|
orderSn: null,
|
|
billCode: null,
|
|
billCodeSub: null,
|
|
orderStatus: null,
|
|
waybillStatus: null,
|
|
orderType: null,
|
|
orderDate: null,
|
|
customerCode: null,
|
|
customerName: null,
|
|
receiveCustomerCode: null,
|
|
receiveCustomerName: null,
|
|
thirdCustomerCode: null,
|
|
thirdCustomerName: null,
|
|
receiveName: null,
|
|
receiveCompany: null,
|
|
receiveMobile: null,
|
|
receiveTel: null,
|
|
receiveCountry: null,
|
|
receiveProvince: null,
|
|
receiveCity: null,
|
|
receiveCounty: null,
|
|
receiveTown: null,
|
|
receiveAddress: null,
|
|
receivePostcode: null,
|
|
receivePcd: null,
|
|
sendName: null,
|
|
sendCompany: null,
|
|
sendMobile: null,
|
|
sendTel: null,
|
|
sendCountry: null,
|
|
sendProvince: null,
|
|
sendCity: null,
|
|
sendCounty: null,
|
|
sendTown: null,
|
|
sendAddress: null,
|
|
sendPostcode: null,
|
|
sendPcd: null,
|
|
paymentType: null,
|
|
calcFeeType: null,
|
|
custNo: null,
|
|
transLineType: null,
|
|
productType: null,
|
|
timeType: null,
|
|
meterType: null,
|
|
customsClear: null,
|
|
customsEclaration: null,
|
|
estimateDate: null,
|
|
packType: null,
|
|
dispatchMethod: null,
|
|
pickupMethod: null,
|
|
pickStartDate: null,
|
|
pickFinishDate: null,
|
|
pickFailReason: null,
|
|
intoWarehouseCode: null,
|
|
intoWarehouseName: null,
|
|
intoWarehouseAddress: null,
|
|
intoWarehouseContact: null,
|
|
intoWarehousePhone: null,
|
|
intoWarehouseBillCode: null,
|
|
warehouseInNo: null,
|
|
customerDeliveryBeginTime: null,
|
|
customerDeliveryEndTime: null,
|
|
goodsType: null,
|
|
goodsInfo: null,
|
|
goodsPics: null,
|
|
blPrepareInFreight: null,
|
|
prepareInEstFee: null,
|
|
prepareInRealFee: null,
|
|
prepareInExpress: null,
|
|
prepareInBillCode: null,
|
|
prepareInRemark: null,
|
|
prepareInSupplier: null,
|
|
totalWeight: null,
|
|
totalVolume: null,
|
|
parcelQty: null,
|
|
billWeight: null,
|
|
volumeWeight: null,
|
|
currency: null,
|
|
settlementWeight: null,
|
|
feeWeight: null,
|
|
freight: null,
|
|
blOverLong: null,
|
|
blBill: null,
|
|
blOverWeight: null,
|
|
overWeightNumber: null,
|
|
feeRemark: null,
|
|
thirdCode: null,
|
|
realValue: null,
|
|
blInsure: null,
|
|
insureValue: null,
|
|
insureValueCurrency: null,
|
|
insureFeeCurrency: null,
|
|
insureFee: null,
|
|
insureRemark: null,
|
|
insureSiteCode: null,
|
|
insureDate: null,
|
|
blPrint: null,
|
|
printManCode: null,
|
|
printSite: null,
|
|
printDate: null,
|
|
printCount: null,
|
|
blDispFd: null,
|
|
transferCode: null,
|
|
transferBillcode: null,
|
|
dispFdDate: null,
|
|
dispFdReason: null,
|
|
currentSiteCode: null,
|
|
lastSiteCode: null,
|
|
registerSiteCode: null,
|
|
registerDate: null,
|
|
registerManCode: null,
|
|
takePieceEmployeeCode: null,
|
|
sendSiteCode: null,
|
|
sendDate: null,
|
|
dispatchManCode: null,
|
|
dispatchDate: null,
|
|
dispatchSiteCode: null,
|
|
produceBillDate: null,
|
|
produceBillSiteCode: null,
|
|
produceBillManCode: null,
|
|
destinationCode: null,
|
|
destinationProvince: null,
|
|
destinationCity: null,
|
|
destinationCounty: null,
|
|
dispatchUnderlingSiteCode: null,
|
|
destinationCenterCode: null,
|
|
marketManCode: null,
|
|
payee: null,
|
|
salesmen: null,
|
|
operateEmployeeCode: null,
|
|
blIsQuestion: null,
|
|
problemType: null,
|
|
problemCause: null,
|
|
problemDelayDays: null,
|
|
blMessage: null,
|
|
blAcceptMessage: null,
|
|
blGenSubbill: null,
|
|
signMan: null,
|
|
signManCode: null,
|
|
signSiteCode: null,
|
|
signDate: null,
|
|
billPicSendRmk: null,
|
|
billPicDispatchRmk: null,
|
|
timezoneOffset: null,
|
|
delFlag: null,
|
|
remark: null,
|
|
params:{
|
|
queryOrderType:1,
|
|
queryOrderDateType:1
|
|
}
|
|
},
|
|
};
|
|
},
|
|
created() {
|
|
const end = new Date()
|
|
const start = new Date()
|
|
start.setHours(0,0,0,0)
|
|
end.setHours(23,59,59,0)
|
|
this.dateTimeRange=[timeFormat(start), timeFormat(end)]
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
methods: {
|
|
handleBatchPrint(){
|
|
this.$confirm("确定打印?", "提示", {
|
|
cancelButtonText: "不打印",
|
|
confirmButtonText: "确定打印",
|
|
type: "warning",
|
|
distinguishCancelAndClose: true,
|
|
closeOnClickModal: false
|
|
}).then(() => {
|
|
let orderList=[];
|
|
this.currentSelection.forEach(item=>{
|
|
orderList.push(item.billCode);
|
|
});
|
|
this.$refs.tanexPrinter.batchPrint(orderList,null,true);
|
|
}).catch(() => {});
|
|
|
|
},
|
|
handlePrintPreview(){
|
|
let orderList=[];
|
|
this.currentSelection.forEach(item=>{
|
|
orderList.push(item.billCode);
|
|
});
|
|
this.$refs.tanexPrinter.printPreview(orderList,true,"A4-EP");
|
|
},
|
|
handleDownPDF(){
|
|
let orderList=[];
|
|
this.currentSelection.forEach(item=>{
|
|
orderList.push(item.billCode);
|
|
});
|
|
this.$refs.tanexPrinter.downPDF(orderList,true,"A4-EP");
|
|
},
|
|
initQueryParams(){
|
|
this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"sendDate");
|
|
let qParam=null;
|
|
if(this.queryParams.billCode){
|
|
qParam={
|
|
pageNum:this.queryParams.pageNum,
|
|
pageSize:this.queryParams.pageSize,
|
|
billCode:this.queryParams.billCode,
|
|
}
|
|
}else{
|
|
|
|
if(this.$store.getters.ownerSiteCode!='88888'&&(this.queryParams.salesmen==null||this.queryParams.salesmen=='')&&(this.queryParams.custNo==null||this.queryParams.salesmen=='') ){
|
|
this.queryParams.sendSiteCode=this.$store.getters.ownerSiteCode;
|
|
}
|
|
|
|
qParam=this.queryParams
|
|
}
|
|
|
|
return qParam;
|
|
},
|
|
/** 查询运单列表列表 */
|
|
getList() {
|
|
this.loading = true;
|
|
let qParam=this.initQueryParams();
|
|
listEmisWaybill(qParam).then(response => {
|
|
this.emisWaybillList = response.rows;
|
|
this.total = response.total;
|
|
this.loading = false;
|
|
});
|
|
},
|
|
|
|
onDateSelect(value){
|
|
// console.log("date picker---->", value)
|
|
this.dateTimeRange=value;
|
|
// scanDate
|
|
},
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
this.queryParams.pageNum = 1;
|
|
this.getList();
|
|
},
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
this.resetForm("queryForm");
|
|
this.handleQuery();
|
|
},
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
this.currentSelection=selection;
|
|
|
|
this.selectionList=selection;
|
|
|
|
this.ids = selection.map(item => item.id)
|
|
this.single = selection.length!==1
|
|
this.multiple = !selection.length
|
|
},
|
|
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
|
handleSortChange(column) {
|
|
this.queryParams.orderByColumn = column.prop;
|
|
this.queryParams.isAsc = column.order;
|
|
this.getList();
|
|
},
|
|
/** 新增按钮操作 */
|
|
handleAdd(row) {
|
|
this.currentId=null;
|
|
this.openForm= true;
|
|
this.titleForm = "新增";
|
|
},
|
|
handleShowMoreInput(){
|
|
this.moreInputVisible = !this.moreInputVisible;
|
|
},
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
this.currentId= row.id;
|
|
this.openForm = true;
|
|
this.titleForm = "修改";
|
|
},
|
|
handleView(row) {
|
|
this.id=row.id;
|
|
this.titleView="查看";
|
|
this.openView=true;
|
|
// this.router.push({ path: '/emis/emisWaybill/viewDetail', query: { id: row.id }})
|
|
},
|
|
handleFormChanged(){
|
|
this.openForm = false;
|
|
this.getList();
|
|
},
|
|
cancelForm(){
|
|
this.openForm = false;
|
|
},
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
const ids = row.id || this.ids;
|
|
this.$modal.confirm('是否确认删除').then(function() {
|
|
return delEmisWaybill(ids);
|
|
}).then(() => {
|
|
this.getList();
|
|
this.$modal.msgSuccess("删除成功");
|
|
}).catch(() => {});
|
|
},
|
|
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
const loadingInstance = this.$loading({
|
|
text: '正在导出...'
|
|
})
|
|
|
|
var qParam = {...this.queryParams};
|
|
// 增加导出记录
|
|
let postExportRecord={
|
|
menuName: 'A4纸运单打印导出',
|
|
dateRange: qParam.params.beginSendDate+"~"+qParam.params.endSendDate,
|
|
}
|
|
|
|
this.addExportAuditRecord(postExportRecord);
|
|
|
|
if(this.selectionList&&this.selectionList.length>0){
|
|
this.exportData(this.selectionList,loadingInstance);
|
|
}
|
|
else{
|
|
let qParam=this.initQueryParams();
|
|
let qExportParam={...qParam};
|
|
qExportParam.pageNum=1;
|
|
qExportParam.pageSize=20000;
|
|
|
|
listEmisWaybill(qExportParam).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: 'A4纸运单列表',
|
|
autoWidth: true
|
|
})
|
|
loadingInstance.close()
|
|
})
|
|
},
|
|
formatJson(filterVal, jsonData, resData) {
|
|
let index = 0
|
|
return jsonData.map(v => filterVal.map(j => {
|
|
|
|
if (j === 'index') {
|
|
return ++index
|
|
}
|
|
if (j === 'kjlx') {
|
|
return v['sendSiteName']+'--'+v['dispatchUnderlingSiteName'];
|
|
}
|
|
if (j === 'fjr') {
|
|
return v['sendName']+'--'+v['receiveName'];
|
|
}
|
|
if (j === 'custName') {
|
|
let paymentType=v['paymentType'];
|
|
if(paymentType==2 || paymentType==4 || paymentType==5 ){
|
|
return v['custName'];
|
|
}else{
|
|
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 '自提';
|
|
}
|
|
}
|
|
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
|
|
},
|
|
/** 时间搜索响应函数 */
|
|
dateTimeChange(value){
|
|
this.dateTimeRange=value;
|
|
},
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
|
|
.query-label {
|
|
.el-radio{
|
|
display: block;
|
|
line-height: 23px;
|
|
white-space: normal;
|
|
margin-right: 0;
|
|
}
|
|
}
|
|
|
|
.printPreDialog .el-dialog__body {
|
|
margin: 0px!important;
|
|
}
|
|
|
|
|
|
</style>
|