emis-frontend/src/views/emis/emisWaybill/waybillIsPrinted.vue

690 lines
25 KiB
Vue
Raw Normal View History

2024-05-14 23:37:18 +00:00
<template>
2024-05-29 08:18:45 +00:00
<XdPageContainer class="app-container">
2024-08-04 12:32:15 +00:00
<!-- label-width="100px" -->
2024-07-05 12:01:45 +00:00
<SearchForm slot="pageHeader" :model="queryParams" ref="queryForm"
2024-08-04 12:32:15 +00:00
size="mini" :maxShow="8"
2024-07-05 12:01:45 +00:00
v-show="showSearch"
@search="handleQuery"
@reset="resetQuery"
:isShowSearchBtn="false"
>
2024-08-04 12:32:15 +00:00
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
<el-col :span="6">
<el-form-item label="" prop="billCode">
2024-06-04 14:31:32 +00:00
<div slot="label">
2024-05-24 05:11:59 +00:00
<el-radio-group class="query-label" v-model="queryOrderType">
<el-radio :key="1" label="1">运单号</el-radio>
2024-08-04 12:32:15 +00:00
<!-- <el-radio :key="0" label="0">订单号</el-radio> -->
2024-05-14 23:37:18 +00:00
</el-radio-group>
</div>
2024-05-24 05:11:59 +00:00
<XdTextareaInput
2024-05-14 23:37:18 +00:00
v-model="queryParams.billCode"
:placeholder="$t('多个流水号逗号或换行隔开')"
clearable
2024-05-24 05:11:59 +00:00
:rows="2"
2024-05-14 23:37:18 +00:00
/>
2024-05-24 05:11:59 +00:00
<!-- @keyup.enter.native="handleQuery" -->
2024-05-14 23:37:18 +00:00
</el-form-item>
2024-05-24 05:11:59 +00:00
<el-form-item label="发货时间" prop="dateTimeRange">
2024-05-17 00:50:17 +00:00
<elDateAdvPicker clearable v-model="dateTimeRange" @dateTimeChange="onDateSelect" ></elDateAdvPicker>
</el-form-item>
2024-08-04 12:32:15 +00:00
</el-col>
2024-05-14 23:37:18 +00:00
2024-05-24 05:11:59 +00:00
2024-08-04 12:32:15 +00:00
<el-col :span="18">
<el-form-item label="寄件客户" prop="custNo">
<EmisMonthpayAccountPicker v-model="queryParams.custNo" @onChange="handleQuery"></EmisMonthpayAccountPicker>
</el-form-item>
2024-08-05 16:01:28 +00:00
<el-form-item label="寄件网点" prop="sendSiteCode">
2024-05-24 05:11:59 +00:00
<EmisSiteSimplePicker1 v-model="queryParams.sendSiteCode" ></EmisSiteSimplePicker1>
</el-form-item>
2024-08-04 12:32:15 +00:00
<el-form-item label="寄件公司" prop="sendCompany">
<el-input
v-model="queryParams.sendCompany"
:placeholder="$t('寄件公司')"
clearable
/>
</el-form-item>
<el-form-item :label="$t('取件业务员')" prop="takePieceEmployeeCode">
<EmisUserSimplePicker1 :placeholder="$t('取件员')" v-model="queryParams.takePieceEmployeeCode"></EmisUserSimplePicker1>
</el-form-item>
<el-form-item label="线路" prop="transLineType">
<TransLinePicker v-model="queryParams.transLineType" isInitiated="true" ></TransLinePicker>
</el-form-item>
<el-form-item label="产品类型" prop="productType">
<TransProductPicker placeholder="产品类型" v-model="queryParams.productType" :transLineCode="queryParams.transLineType"></TransProductPicker>
</el-form-item>
2024-05-24 05:11:59 +00:00
<el-form-item label="目的网点" prop="dispatchUnderlingSiteCode">
<EmisSiteSimplePicker2 v-model="queryParams.dispatchUnderlingSiteCode" ></EmisSiteSimplePicker2>
</el-form-item>
2024-08-04 12:32:15 +00:00
<el-form-item :label="$t('操作员')" prop="operateEmployeeCode">
<EmisUserSimplePicker0 :placeholder="$t('操作员')" v-model="queryParams.operateEmployeeCode"></EmisUserSimplePicker0>
</el-form-item>
</el-col>
2024-05-24 05:11:59 +00:00
2024-08-04 12:32:15 +00:00
</el-row>
2024-05-24 05:11:59 +00:00
</SearchForm>
2024-05-19 16:31:11 +00:00
2024-05-19 04:07:15 +00:00
2024-05-29 08:18:45 +00:00
<XdTable
slot="pageContent"
slot-scope="slotProps"
:height="(slotProps.contentHeight)+'px'"
2024-07-31 23:25:43 +00:00
ref="refQueryTable"
2024-07-21 03:43:45 +00:00
:row-key="rowKey"
2024-06-23 07:22:16 +00:00
storageName="waybillIsPrinted_main"
2024-05-29 08:18:45 +00:00
v-loading="loading"
2024-06-24 01:22:55 +00:00
border
2024-05-14 23:37:18 +00:00
size="small"
:data="emisWaybillList"
:showSearch.sync="showSearch"
:queryParams="queryParams"
:total="total"
@queryTable="getList"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
>
<div slot="toolbar">
2024-05-14 23:56:59 +00:00
<el-row :gutter="10" class="mb8" style="display: flex;flex-wrap: wrap;">
2024-07-05 12:01:45 +00:00
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询</el-button>
</el-col>
2024-05-14 23:37:18 +00:00
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-print"
size="mini"
2024-05-24 05:11:59 +00:00
:disabled="multiple"
2024-05-14 23:37:18 +00:00
@click="handleBatchPrint"
2024-05-19 16:31:11 +00:00
>打印</el-button>
2024-05-14 23:37:18 +00:00
</el-col>
2024-06-19 05:41:45 +00:00
2024-05-14 23:37:18 +00:00
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
2024-05-24 05:11:59 +00:00
:disabled="multiple"
2024-05-14 23:37:18 +00:00
@click="handlePrintPreview"
>预览面单</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
2024-05-24 05:11:59 +00:00
:disabled="multiple"
2024-05-14 23:37:18 +00:00
@click="handleDownPDF"
>下载pdf</el-button>
</el-col>
<el-col :span="1.5">
2024-06-07 02:26:05 +00:00
<TanexPrinterPanel ref="tanexPrinter" :isShowPinters="true" :isShowTpl="true" :isShowSubBillRange="true" @onPrint="handleBatchPrint"></TanexPrinterPanel>
2024-05-14 23:37:18 +00:00
</el-col>
2024-07-02 02:25:06 +00:00
2024-05-14 23:37:18 +00:00
</el-row>
</div>
2024-08-01 04:06:32 +00:00
<el-table-column label="序号" align="center" min-width="60">
<template slot-scope="scope">
<span v-text="getIndex(scope.$index)"> </span>
</template>
</el-table-column>
2024-07-21 03:43:45 +00:00
<el-table-column type="selection" width="55" :reserve-selection="true" align="center" />
2024-05-17 00:50:17 +00:00
<el-table-column :label="$t('运单编号')" align="center" prop="billCode" min-width="120" :show-overflow-tooltip="true" />
2024-08-04 12:32:15 +00:00
<!-- <el-table-column :label="$t('订单号')" align="center" prop="orderSn" width="100" :show-overflow-tooltip="true"/> -->
2024-05-23 00:05:58 +00:00
2024-05-18 10:19:01 +00:00
<el-table-column :label="$t('是否打印')" align="center" prop="blPrint" min-width="80" >
2024-05-23 00:05:58 +00:00
<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" />
2024-05-17 00:50:17 +00:00
2024-05-23 00:05:58 +00:00
<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"/>
2024-05-17 00:50:17 +00:00
2024-05-18 10:19:01 +00:00
2024-05-23 00:05:58 +00:00
<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" >
2024-05-17 00:50:17 +00:00
<template slot-scope="scope">
2024-05-23 00:05:58 +00:00
<dict-tag :options="dict.type.emis_qujian_fangshi" :value="scope.row.pickupMethod"/>
2024-05-17 00:50:17 +00:00
</template>
2024-05-23 00:05:58 +00:00
</el-table-column>
2024-07-31 02:55:07 +00:00
<el-table-column :label="$t('客户名称')" align="center" prop="custName" min-width="80" :show-overflow-tooltip="true">
2024-05-23 00:05:58 +00:00
<template slot-scope="scope">
2024-07-31 02:55:07 +00:00
<span v-if="scope.row.paymentType==2 || scope.row.paymentType==4 || scope.row.paymentType==5">{{scope.row.custName}}</span>
2024-05-23 00:05:58 +00:00
<span v-else></span>
2024-05-14 23:37:18 +00:00
</template>
2024-05-23 00:05:58 +00:00
</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" />
2024-05-23 00:20:39 +00:00
2024-05-17 00:50:17 +00:00
<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"/>
2024-06-19 05:41:45 +00:00
2024-05-23 00:05:58 +00:00
<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>
2024-05-17 00:50:17 +00:00
<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"/>
2024-05-23 00:05:58 +00:00
<el-table-column :label="$t('目的地')" align="center" prop="destinationName" min-width="80" :show-overflow-tooltip="true"/>
2024-05-17 00:50:17 +00:00
<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"/>
2024-08-10 03:37:58 +00:00
<el-table-column :label="$t('收件电话')" align="center" prop="receiveMobile" min-width="80" :show-overflow-tooltip="true"/>
2024-05-17 00:50:17 +00:00
<el-table-column :label="$t('收件公司')" align="center" prop="receiveCompany" min-width="80" :show-overflow-tooltip="true"/>
2024-08-10 03:37:58 +00:00
<el-table-column :label="$t('收件国家')" align="center" prop="receiveCountryName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('收件省')" align="center" prop="receiveProvinceName" min-width="80" :show-overflow-tooltip="true"/>
<!-- <el-table-column :label="$t('收件市')" align="center" prop="receiveCityName" min-width="80" :show-overflow-tooltip="true"/> -->
<!-- <el-table-column :label="$t('收件区')" align="center" prop="receiveCountyName" min-width="80" :show-overflow-tooltip="true"/> -->
2024-05-18 10:19:01 +00:00
2024-05-23 00:05:58 +00:00
<el-table-column :label="$t('货物名称')" align="center" prop="goodsInfo" min-width="80" :show-overflow-tooltip="true"/>
2024-05-17 00:50:17 +00:00
<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" />
2024-05-23 00:05:58 +00:00
<el-table-column :label="$t('支付方式')" align="center" prop="paymentType" min-width="80" :show-overflow-tooltip="true" >
2024-05-17 00:50:17 +00:00
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_payment_type" :value="scope.row.paymentType"/>
</template>
</el-table-column>
2024-05-23 00:05:58 +00:00
2024-06-19 05:41:45 +00:00
<el-table-column :label="$t('运费')" align="center" prop="freight" min-width="80" />
2024-05-23 00:05:58 +00:00
<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" />
2024-05-17 00:50:17 +00:00
2024-05-23 00:05:58 +00:00
2024-05-14 23:37:18 +00:00
</XdTable>
2024-05-29 08:18:45 +00:00
</XdPageContainer>
2024-05-14 23:37:18 +00:00
</template>
<script>
2024-07-02 02:25:06 +00:00
import { listEmisWaybill, getEmisWaybill, delEmisWaybill, addEmisWaybill, updateEmisWaybill,queryPrintListSimple } from "@/api/emis/emisWaybill";
2024-05-14 23:37:18 +00:00
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';
2024-05-19 16:31:11 +00:00
2024-05-24 05:11:59 +00:00
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';
2024-08-04 12:32:15 +00:00
import EmisMonthpayAccountPicker from '@/views/emis/EmisBaseTools/EmisMonthpayAccountPicker.vue';
2024-05-24 05:11:59 +00:00
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';
2024-06-21 17:54:53 +00:00
import { formatSearchStr,deepClone } from '@/utils/index'
2024-07-25 12:41:53 +00:00
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
2024-05-24 05:11:59 +00:00
2024-05-14 23:37:18 +00:00
export default {
name: "WaybillIsPrinted",
2024-05-24 05:11:59 +00:00
components: {
TanexPrinterPanel,
elDateAdvPicker,
emisWaybillForm,
CountryPicker1,
CountryPicker2,
ProvincePicker2,
TransLinePicker,
TransProductPicker,
PayeePicker,
SalemanPicker,
EmisUserSimplePicker0,
EmisUserSimplePicker1,
EmisSiteSimplePicker1,
EmisSiteSimplePicker2,
2024-08-04 12:32:15 +00:00
ProblemTypePicker,
EmisMonthpayAccountPicker
2024-05-24 05:11:59 +00:00
},
2024-05-23 00:17:19 +00:00
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'
2024-05-14 23:37:18 +00:00
],
data() {
return {
2024-05-23 00:05:58 +00:00
tableHeight: 200,
2024-05-14 23:37:18 +00:00
// 遮罩层
2024-07-02 02:25:06 +00:00
loading: false,
2024-05-14 23:37:18 +00:00
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 创建时间搜索
dateTimeRange:[],
// 总条数
total: 0,
// 运单列表表格数据
emisWaybillList: [],
currentId:null,
openForm: false,
titleForm: "",
2024-05-24 05:11:59 +00:00
queryOrderType:null,
2024-05-14 23:37:18 +00:00
currentSelection:[],
// 弹出展示层
id:null,
titleView:"",
openView: false,
// 更新网点时间范围
daterangeOrderDate: [],
// 更新网点时间范围
daterangeEstimateDate: [],
// 更新网点时间范围
daterangePickStartDate: [],
// 更新网点时间范围
daterangePickFinishDate: [],
// 更新网点时间范围
daterangeDispFdDate: [],
// 更新网点时间范围
daterangeRegisterDate: [],
// 更新网点时间范围
daterangeSendDate: [],
// 更新网点时间范围
daterangeProduceBillDate: [],
// 更新网点时间范围
daterangeCreateTime: [],
// 更新网点时间范围
daterangeUpdateTime: [],
// 查询参数
queryParams: {
pageNum: 1,
2024-08-08 23:33:09 +00:00
pageSize: 100,
2024-05-14 23:37:18 +00:00
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,
2024-06-08 07:20:21 +00:00
feeRemark: null,
2024-05-14 23:37:18 +00:00
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,
2024-08-09 06:24:07 +00:00
queryOrderDateType:1,
isQueryPrintOrder:null,
2024-05-14 23:37:18 +00:00
}
},
};
},
created() {
2024-07-02 02:25:06 +00:00
// this.getList();
2024-05-24 05:11:59 +00:00
this.queryOrderType="1";
2024-07-25 12:41:53 +00:00
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)]
2024-08-04 12:32:15 +00:00
if(this.$store.getters.ownerSiteCode!='88888'){
this.queryParams.sendSiteCode=this.$store.getters.ownerSiteCode;
}
2024-05-14 23:37:18 +00:00
},
2024-05-24 05:11:59 +00:00
methods: {
2024-07-21 03:43:45 +00:00
rowKey (row) {
return row.id;
},
2024-05-14 23:37:18 +00:00
handleBatchPrint(){
2024-05-19 16:31:11 +00:00
this.$confirm("确定打印?", "提示", {
2024-05-14 23:37:18 +00:00
cancelButtonText: "不打印",
confirmButtonText: "确定打印",
type: "warning",
distinguishCancelAndClose: true,
closeOnClickModal: false
}).then(() => {
let orderList=[];
this.currentSelection.forEach(item=>{
orderList.push(item.billCode);
});
2024-06-08 07:20:21 +00:00
2024-07-02 11:39:24 +00:00
// batchPrint(orderList,tplCode,orderDetailList)
this.$refs.tanexPrinter.batchPrint(orderList,null,this.currentSelection);
2024-05-14 23:37:18 +00:00
}).catch(() => {});
},
2024-05-24 05:11:59 +00:00
handlePrintPreview(){
let orderList=[];
2024-05-23 13:41:55 +00:00
this.currentSelection.forEach(item=>{
orderList.push(item.billCode);
});
2024-07-02 11:39:24 +00:00
// printPreview(orderList,isA4,tplCode,orderDetailList)
this.$refs.tanexPrinter.printPreview(orderList,false,null,this.currentSelection);
2024-05-14 23:37:18 +00:00
},
handleDownPDF(){
2024-05-24 05:11:59 +00:00
let orderList=[];
this.currentSelection.forEach(item=>{
orderList.push(item.billCode);
2024-05-19 04:07:15 +00:00
});
2024-07-02 11:39:24 +00:00
this.$refs.tanexPrinter.downPDF(orderList,false,null,this.currentSelection);
2024-05-14 23:37:18 +00:00
},
2024-08-04 12:32:15 +00:00
initQueryParams(){
2024-08-05 01:14:17 +00:00
this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"sendDate");
2024-08-04 12:32:15 +00:00
let qParam=null;
2024-05-24 05:11:59 +00:00
if(this.queryParams.billCode){
2024-08-04 12:32:15 +00:00
qParam={
pageNum:this.queryParams.pageNum,
pageSize:this.queryParams.pageSize,
billCode:this.queryParams.billCode,
}
2024-08-01 04:06:32 +00:00
}else{
2024-08-05 01:14:17 +00:00
qParam={...this.queryParams}
2024-08-09 07:52:45 +00:00
qParam.params.isQueryPrintOrder=1;
2024-08-03 01:50:09 +00:00
}
2024-05-24 05:11:59 +00:00
2024-08-04 12:32:15 +00:00
return qParam;
},
/** 查询运单列表列表 */
getList() {
this.loading = true;
let qParam=this.initQueryParams();
queryPrintListSimple(qParam).then(response => {
2024-05-14 23:37:18 +00:00
this.emisWaybillList = response.rows;
this.total = response.total;
this.loading = false;
});
},
onDateSelect(value){
2024-05-19 16:31:11 +00:00
// console.log("date picker---->", value)
2024-05-14 23:37:18 +00:00
this.dateTimeRange=value;
// scanDate
},
/** 搜索按钮操作 */
handleQuery() {
2024-07-31 23:25:43 +00:00
// 清除已选择
2024-08-01 04:06:32 +00:00
if(this.ids&&this.ids.length>0){
this.$refs.refQueryTable.clearSelection();
}
2024-08-01 01:23:45 +00:00
2024-05-14 23:37:18 +00:00
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.currentSelection=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(() => {});
},
2024-07-02 02:25:06 +00:00
2024-05-14 23:37:18 +00:00
/** 列索引函数 */
getIndex($index) {
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
},
/** 时间搜索响应函数 */
dateTimeChange(value){
this.dateTimeRange=value;
},
}
};
</script>
2024-05-24 05:11:59 +00:00
<style lang="scss">
2024-05-14 23:37:18 +00:00
2024-05-24 05:11:59 +00:00
.query-label {
2024-05-14 23:37:18 +00:00
.el-radio{
display: block;
line-height: 23px;
white-space: normal;
margin-right: 0;
}
}
2024-05-24 05:11:59 +00:00
.printPreDialog .el-dialog__body {
margin: 0px!important;
2024-05-19 16:31:11 +00:00
}
2024-05-24 05:11:59 +00:00
2024-05-14 23:37:18 +00:00
</style>