2024-11-15 06:56:01 +00:00
|
|
|
|
<template>
|
|
|
|
|
|
<div style="margin-bottom: 20px;">
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<el-form ref="formCo" size="mini" :model="coData" :rules="coRules" :disabled="disabled" label-width="80px" class="overflowhidden" >
|
|
|
|
|
|
<el-row :gutter="20" style="display: flex;flex-wrap: wrap;">
|
|
|
|
|
|
<el-col :span="16" style="border-right: 1px solid #e4e1e1;">
|
|
|
|
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
2024-11-20 02:31:43 +00:00
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<el-form-item :label="$t('批次号')" prop="batchNo">
|
|
|
|
|
|
<el-input v-model="coData.batchNo" placeholder="自动生成" disabled />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<el-form-item :label="$t('批次名称')" prop="batchName">
|
2024-11-19 08:21:51 +00:00
|
|
|
|
<el-input v-model="coData.batchName" clearable="" placeholder=""></el-input>
|
2024-11-16 00:39:39 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-11-20 02:31:43 +00:00
|
|
|
|
<el-col :span="6">
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<el-form-item :label="$t('批次类型')" prop="batchType">
|
|
|
|
|
|
<el-select v-model="coData.batchType" placeholder="" style="width:100%">
|
|
|
|
|
|
<el-option key="1" label="一程批次" value="1"></el-option>
|
|
|
|
|
|
<el-option key="2" label="二程批次" value="2"></el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-11-19 11:39:21 +00:00
|
|
|
|
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item :label="$t('起始网点')" prop="startSiteCode">
|
2024-11-25 05:09:21 +00:00
|
|
|
|
<EmisSiteSimplePicker :placeholder="$t('请选择')" @change="onSiteSelect" v-model="coData.startSiteCode" ></EmisSiteSimplePicker>
|
2024-11-16 00:39:39 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item :label="$t('下一网点')" prop="nextSiteCode">
|
|
|
|
|
|
<EmisSiteSimplePicker :placeholder="$t('请选择')" @change="onNextSiteSelect" v-model="coData.nextSiteCode" ></EmisSiteSimplePicker>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-11-19 08:21:51 +00:00
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item :label="$t('承运重量')" prop="transWeight">
|
|
|
|
|
|
<el-input v-model="coData.transWeight" clearable="" placeholder="" >
|
|
|
|
|
|
<span slot="suffix">(kg)</span>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item :label="$t('包裹数')" prop="packNum">
|
|
|
|
|
|
<el-input v-model="coData.packNum" clearable="" placeholder="" ></el-input>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item label="运输方式" prop="transType">
|
|
|
|
|
|
<el-select v-model="coData.transType" placeholder="运输方式" clearable filterable >
|
|
|
|
|
|
<el-option
|
2024-11-19 07:40:01 +00:00
|
|
|
|
v-for="dict in dict.type.emis_biz_shipping_method"
|
2024-11-16 00:39:39 +00:00
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-11-19 11:39:21 +00:00
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
|
<el-form-item :label="$t('运输号')" prop="carNo">
|
2024-11-25 01:25:50 +00:00
|
|
|
|
<el-input v-model="coData.carNo" clearable="" placeholder="车牌号/船次号/提单号"></el-input>
|
2024-11-16 00:39:39 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-11-19 11:39:21 +00:00
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
|
<el-form-item label="发出时间" prop="carTime">
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
|
v-model="coData.carTime"
|
|
|
|
|
|
type="date"
|
|
|
|
|
|
value-format="yyyy-MM-dd"
|
2024-11-19 11:39:21 +00:00
|
|
|
|
placeholder="请选择发出时间"
|
|
|
|
|
|
style="width:100%"
|
|
|
|
|
|
|
|
|
|
|
|
>
|
2024-11-16 00:39:39 +00:00
|
|
|
|
</el-date-picker>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-11-19 11:39:21 +00:00
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item :label="$t('目的国')" prop="destCountry">
|
|
|
|
|
|
<CountryPicker :placeholder="$t('选择国')" v-model="coData.destCountry" ></CountryPicker>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-11-16 00:39:39 +00:00
|
|
|
|
</el-row>
|
2024-11-15 06:56:01 +00:00
|
|
|
|
</el-col>
|
2024-11-16 00:39:39 +00:00
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
<el-col :span="8">
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item style="font-weight:600;" label-width="0px">
|
|
|
|
|
|
<span>{{$t('总票数') + ': ' + (coData.totalWaybillQty || 0)}}</span>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item style="font-weight:600;" label-width="0px">
|
|
|
|
|
|
<span>{{$t('总件数') + ': ' + (coData.totalParcelQty || 0)}}</span>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item style="font-weight:600;" label-width="0px">
|
|
|
|
|
|
<span>{{$t('总重量') + ': ' + (coData.totalWeight || 0)}}</span>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item style="font-weight:600;" label-width="0px">
|
|
|
|
|
|
<span>{{$t('总体积') + ': ' + (coData.totalVolume || 0)}}</span>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
2024-11-15 06:56:01 +00:00
|
|
|
|
</el-col>
|
2024-11-16 00:39:39 +00:00
|
|
|
|
|
2024-11-19 08:21:51 +00:00
|
|
|
|
<el-col :span="24" style="" v-if="['3','4','5'].indexOf(coData.transType) > -1">
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<div style="margin-top:20px;padding: 3px 5px;font-size: 14px;">
|
|
|
|
|
|
装柜示意图
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<el-table :data="tableData"
|
|
|
|
|
|
border
|
|
|
|
|
|
style="width:100%;border:2px solid #e2e2e2"
|
|
|
|
|
|
>
|
2024-11-15 06:56:01 +00:00
|
|
|
|
<!-- 表头1 -->
|
|
|
|
|
|
<el-table-column label="柜头" colspan="2">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-input v-model="scope.row[1]"></el-input>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-input v-model="scope.row[2]"></el-input>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<!-- 表头2 -->
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<el-table-column label="柜中" colspan="2">
|
2024-11-15 06:56:01 +00:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-input v-model="scope.row[3]"></el-input>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-input v-model="scope.row[4]"></el-input>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<!-- 表头3 -->
|
|
|
|
|
|
<el-table-column label="柜尾" colspan="2">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-input v-model="scope.row[5]"></el-input>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-input v-model="scope.row[6]"></el-input>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<div style="margin-top:20px;padding: 3px 5px;font-size: 14px;">
|
|
|
|
|
|
装柜运单列表
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<XdTable
|
|
|
|
|
|
max-height="400px"
|
|
|
|
|
|
v-loading="loading"
|
2024-11-15 06:56:01 +00:00
|
|
|
|
border
|
2024-11-16 00:39:39 +00:00
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
|
|
|
|
storageName="emisCoPackDetail_main_240702"
|
|
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
id="emisCoPackDetail"
|
|
|
|
|
|
:data="emisCoPackDetail"
|
|
|
|
|
|
:showSearch.sync="showSearch"
|
|
|
|
|
|
:queryParams="queryParams"
|
2024-11-16 00:39:39 +00:00
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
@queryTable="getWaybillList"
|
|
|
|
|
|
@selection-change="handleCoPackSelectionChange"
|
|
|
|
|
|
@sort-change="handleSortChange"
|
2024-11-16 00:39:39 +00:00
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
>
|
2024-12-13 09:38:35 +00:00
|
|
|
|
<div slot="toolbar">
|
2024-11-15 06:56:01 +00:00
|
|
|
|
<el-row :gutter="10" class="mb8">
|
2024-12-13 09:38:35 +00:00
|
|
|
|
<el-col :span="1.5" v-if="!disabled">
|
2024-11-15 06:56:01 +00:00
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
plain
|
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
@click="handleAddWayBill"
|
2024-11-16 00:39:39 +00:00
|
|
|
|
>加入运单</el-button>
|
2024-11-15 06:56:01 +00:00
|
|
|
|
</el-col>
|
2024-12-13 09:38:35 +00:00
|
|
|
|
<el-col :span="1.5" v-if="!disabled">
|
2024-11-15 06:56:01 +00:00
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
plain
|
|
|
|
|
|
size="mini"
|
2024-11-16 00:39:39 +00:00
|
|
|
|
@click="handleCoPackListDelete"
|
|
|
|
|
|
:disabled="coMultiple"
|
|
|
|
|
|
>移除运单</el-button>
|
2024-11-15 06:56:01 +00:00
|
|
|
|
</el-col>
|
2024-12-13 09:38:35 +00:00
|
|
|
|
<el-col :span="1.5" v-if="this.coData.id!=null">
|
|
|
|
|
|
<el-button style="margin-right: 5px;"
|
|
|
|
|
|
type="warning"
|
|
|
|
|
|
plain
|
|
|
|
|
|
:disabled="single"
|
|
|
|
|
|
icon="el-icon-download"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
@click="handleDownBatchDtl"
|
|
|
|
|
|
>导出批次明细</el-button>
|
|
|
|
|
|
</el-col>
|
2024-11-15 06:56:01 +00:00
|
|
|
|
</el-row>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
|
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="170" />
|
2024-11-16 05:49:23 +00:00
|
|
|
|
<el-table-column :label="$t('寄件网点')" align="center" prop="sendSiteName" min-width="80" :show-overflow-tooltip="true"/>
|
2024-11-15 06:56:01 +00:00
|
|
|
|
<el-table-column :label="$t('寄件国家')" align="center" prop="sendCountryName" min-width="100">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span class="ellipsis">{{ scope.row.sendCountryName }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column :label="$t('目的国家')" align="center" prop="receiveCountryName" min-width="100">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span class="ellipsis">{{ scope.row.receiveCountryName }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column :label="$t('线路')" align="center" prop="transLineTypeName" min-width="100" />
|
|
|
|
|
|
<el-table-column :label="$t('产品类型')" align="center" prop="productTypeName" min-width="100" />
|
|
|
|
|
|
<el-table-column :label="$t('预计到达时间')" align="center" prop="estimateDate" min-width="170">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span>{{ parseTime(scope.row.estimateDate || '') }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-11-19 08:21:51 +00:00
|
|
|
|
|
2024-11-19 12:21:57 +00:00
|
|
|
|
|
|
|
|
|
|
<el-table-column :label="$t('总件数')" align="center" prop="parcelQty" min-width="100" />
|
2024-11-15 06:56:01 +00:00
|
|
|
|
<el-table-column :label="$t('实际重量')" align="center" prop="billWeight" min-width="100" />
|
|
|
|
|
|
<!-- <el-table-column :label="$t('总重量')" align="center" prop="totalWeight" min-width="100" /> -->
|
|
|
|
|
|
<el-table-column :label="$t('总体积')" align="center" prop="totalVolume" min-width="100" />
|
|
|
|
|
|
<el-table-column :label="$t('体积重量')" align="center" prop="volumeWeight" min-width="100" />
|
|
|
|
|
|
<el-table-column :label="$t('结算重量')" align="center" prop="settlementWeight" min-width="100" />
|
|
|
|
|
|
<el-table-column :label="$t('收件人')" align="center" prop="receiveName" min-width="150" />
|
|
|
|
|
|
<el-table-column :label="$t('收件公司')" align="center" prop="receiveCompany" min-width="100">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span class="ellipsis">{{ scope.row.receiveCompany }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-12-13 09:38:35 +00:00
|
|
|
|
<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="customsClear" min-width="80" >
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<dict-tag :options="dict.type.emis_customs_clear" :value="scope.row.customsClear"/>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<!-- <el-table-column :label="$t('取件员')" align="center" prop="takePieceEmployeeName" min-width="80" /> -->
|
|
|
|
|
|
<el-table-column :label="$t('取件方式')" align="center" prop="pickupMethod" min-width="80">
|
2024-11-15 06:56:01 +00:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<dict-tag :options="dict.type.emis_qujian_fangshi" :value="scope.row.pickupMethod"/>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<el-table-column :label="$t('付款方式')" align="center" prop="paymentType" min-width="80">
|
2024-11-15 06:56:01 +00:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<dict-tag :options="dict.type.emis_payment_type" :value="scope.row.paymentType"/>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<el-table-column :label="$t('运费')" align="center" prop="freight" min-width="80" />
|
|
|
|
|
|
<el-table-column :label="$t('寄件人')" align="center" prop="sendName" min-width="150" :show-overflow-tooltip="true" />
|
|
|
|
|
|
<el-table-column :label="$t('寄件公司')" align="center" prop="sendCompany" min-width="100" :show-overflow-tooltip="true" >
|
2024-11-15 06:56:01 +00:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span class="ellipsis">{{ scope.row.sendCompany }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<el-table-column :label="$t('录单备注')" align="center" prop="remark" min-width="100" :show-overflow-tooltip="true" >
|
2024-11-15 06:56:01 +00:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span class="ellipsis">{{ scope.row.remark }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</XdTable>
|
|
|
|
|
|
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<div style="text-align: center;margin-bottom: 10px;" v-if="!disabled">
|
2024-11-22 23:52:01 +00:00
|
|
|
|
<el-button type="primary" @click="submitAddCoPackForm">保存批次</el-button>
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<el-button @click="handleCancelCo">取 消</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2024-11-22 23:52:01 +00:00
|
|
|
|
<el-dialog :title="titleBatch" :visible.sync="openBatch" width="50%" v-dialogDrag :close-on-click-modal="false" append-to-body>
|
|
|
|
|
|
<el-form ref="formBatch" size="mini" label-width="60px">
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
<el-form-item :label="$t('运单号')" prop="formBatchBillList">
|
|
|
|
|
|
<el-input v-model="formBatchBillList" type="textarea" :rows="8" placeholder="运单号" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer" style="text-align:center">
|
|
|
|
|
|
<el-button type="primary" @click="submitFormBatch">确定</el-button>
|
|
|
|
|
|
<el-button @click="cancelBatch">取 消</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import { listEmisTmsSiteBatch, getTmsGroupBatchNo, getEmisTmsSiteBatch, delEmisTmsSiteBatch, addEmisTmsSiteBatch, updateEmisTmsSiteBatch } from "@/api/emis/emisTmsSiteBatch";
|
|
|
|
|
|
import { listEmisTmsSiteBatchDtl, delEmisTmsSiteBatchDtl, addEmisTmsSiteBatchDtl } from "@/api/emis/emisTmsSiteBatchDtl";
|
|
|
|
|
|
import { addEmisTmsSiteBatchLoading, listEmisTmsSiteBatchLoading, updateEmisTmsSiteBatchLoading } from "@/api/emis/emisTmsSiteBatchLoading";
|
2024-11-16 05:49:23 +00:00
|
|
|
|
import { listEmisWaybill } from "@/api/emis/emisWaybill";
|
2024-11-15 06:56:01 +00:00
|
|
|
|
import emisTmsPackForm from '@/views/emis/emisTmsPack/emisTmsPackForm';
|
|
|
|
|
|
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
|
|
|
|
|
import CountryPicker from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
|
|
|
|
|
import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
|
|
|
|
|
import EmisGetNextSitePicker from '@/views/emis/EmisBaseTools/EmisGetNextSitePicker.vue';
|
|
|
|
|
|
import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue';
|
|
|
|
|
|
import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue';
|
|
|
|
|
|
import { parseTime, dateToStr } from "@/utils/custom";
|
|
|
|
|
|
import { formatSearchStr } from '@/utils/index'
|
|
|
|
|
|
|
|
|
|
|
|
import PackListView from '@/views/emis/emisTmsSiteBatch/packListView';
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
2024-11-16 00:39:39 +00:00
|
|
|
|
name: "BigBatchEditForm",
|
2024-11-15 06:56:01 +00:00
|
|
|
|
props: {
|
|
|
|
|
|
batchId: {
|
|
|
|
|
|
type:[Number,Array],
|
|
|
|
|
|
required: false
|
2024-11-16 00:39:39 +00:00
|
|
|
|
},
|
|
|
|
|
|
disabled: {
|
|
|
|
|
|
type:[Boolean],
|
|
|
|
|
|
required: false
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
},
|
|
|
|
|
|
components: { EmisGetNextSitePicker, CountryPicker, EmisSiteSimplePicker, elDateAdvPicker, emisTmsPackForm, TransLinePicker, TransProductPicker, PackListView},
|
2024-12-13 09:38:35 +00:00
|
|
|
|
dicts: ['emis_waybill_status', 'emis_payment_type', 'emis_biz_shipping_method', 'emis_qujian_fangshi', 'cebp_return_status','emis_declare_mode','emis_customs_clear'],
|
2024-11-15 06:56:01 +00:00
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
// 遮罩层
|
|
|
|
|
|
loading: false,
|
|
|
|
|
|
loading2: false,
|
|
|
|
|
|
loadingWait: false,
|
|
|
|
|
|
loadingDone: false,
|
|
|
|
|
|
// 选中数组
|
|
|
|
|
|
ids: [],
|
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
|
single: true,
|
|
|
|
|
|
// 非多个禁用
|
|
|
|
|
|
multiple: true,
|
|
|
|
|
|
|
|
|
|
|
|
coSingle: true,
|
|
|
|
|
|
coMultiple: true,
|
|
|
|
|
|
|
|
|
|
|
|
addWayBillDisabled: true,
|
|
|
|
|
|
// packDisabled: true,
|
|
|
|
|
|
activeName:'third',
|
|
|
|
|
|
|
|
|
|
|
|
// 显示搜索条件
|
|
|
|
|
|
showSearch: true,
|
|
|
|
|
|
// 创建时间搜索
|
|
|
|
|
|
dateTimeRange:[],
|
|
|
|
|
|
// 总条数
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
// TMS组批次表格数据
|
|
|
|
|
|
emisTmsPackList: [],
|
|
|
|
|
|
|
|
|
|
|
|
// 待组批次列表
|
|
|
|
|
|
emisTmsWaitPackList:[],
|
|
|
|
|
|
waitTotal:0,
|
|
|
|
|
|
|
|
|
|
|
|
// 已组批次列表
|
|
|
|
|
|
emisTmsDonePackList:[],
|
|
|
|
|
|
doneTotal:0,
|
|
|
|
|
|
waitPackList:[],//选择未组包的运单先保存起来,在后续新增组批次的弹框中使用
|
|
|
|
|
|
// 新增/修改弹窗数据
|
2024-11-16 00:39:39 +00:00
|
|
|
|
coData: {},
|
|
|
|
|
|
|
|
|
|
|
|
coRules: {
|
|
|
|
|
|
batchType: [
|
|
|
|
|
|
{ required: true, message: "批次类型不能为空", trigger: ["blur","change"] },
|
|
|
|
|
|
],
|
|
|
|
|
|
batchName: [
|
|
|
|
|
|
{ required: true, message: "批次名称不能为空", trigger: ["blur","change"] },
|
|
|
|
|
|
],
|
2024-11-19 11:39:21 +00:00
|
|
|
|
// destCountry: [
|
|
|
|
|
|
// { required: true, message: "目的国不能为空", trigger: ["blur","change"] },
|
|
|
|
|
|
// ],
|
2024-11-16 00:39:39 +00:00
|
|
|
|
startSiteCode: [
|
|
|
|
|
|
{ required: true, message: "起始网点不能为空", trigger: ["blur","change"] },
|
|
|
|
|
|
],
|
|
|
|
|
|
nextSiteCode: [
|
|
|
|
|
|
{ required: true, message: "下一网点不能为空", trigger: ["blur","change"] },
|
|
|
|
|
|
],
|
|
|
|
|
|
transType: [
|
|
|
|
|
|
{ required: true, message: "运输方式不能为空", trigger: ["blur","change"] },
|
|
|
|
|
|
],
|
|
|
|
|
|
airBilllNo: [
|
|
|
|
|
|
{ required: true, message: "航空单号不能为空", trigger: ["blur","change"] },
|
|
|
|
|
|
],
|
|
|
|
|
|
airTime: [
|
|
|
|
|
|
{ required: true, message: "起飞时间不能为空", trigger: ["blur","change"] },
|
|
|
|
|
|
],
|
|
|
|
|
|
shipNo: [
|
|
|
|
|
|
{ required: true, message: "船次号不能为空", trigger: ["blur","change"] },
|
|
|
|
|
|
],
|
|
|
|
|
|
shipTime: [
|
|
|
|
|
|
{ required: true, message: "开船时间不能为空", trigger: ["blur","change"] },
|
|
|
|
|
|
],
|
|
|
|
|
|
carNo: [
|
|
|
|
|
|
{ required: true, message: "车牌号不能为空", trigger: ["blur","change"] },
|
|
|
|
|
|
],
|
|
|
|
|
|
carTime: [
|
|
|
|
|
|
{ required: true, message: "发车时间不能为空", trigger: ["blur","change"] },
|
|
|
|
|
|
],
|
2024-11-19 08:21:51 +00:00
|
|
|
|
transWeight: [
|
|
|
|
|
|
{ required: true, message: "承运重量不能为空", trigger: ["blur","change"] },
|
|
|
|
|
|
],
|
|
|
|
|
|
packNum: [
|
|
|
|
|
|
{ required: true, message: "包裹数量不能为空", trigger: ["blur","change"] },
|
|
|
|
|
|
],
|
2024-11-16 00:39:39 +00:00
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
openBatch: false,
|
|
|
|
|
|
titleBatch: "",
|
|
|
|
|
|
formBatchBillList:"",
|
|
|
|
|
|
|
|
|
|
|
|
// 新增/修改包详情数据
|
|
|
|
|
|
emisCoPackDetail:[],
|
|
|
|
|
|
blUnpack:"1",
|
|
|
|
|
|
// 追加的运单查询数据
|
|
|
|
|
|
wayBillData: {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
|
params:{
|
|
|
|
|
|
dataTimeType: '1',
|
|
|
|
|
|
queryOrderType: '1'
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
// 追加的运单数据
|
|
|
|
|
|
emisWayBillList:[],
|
|
|
|
|
|
wayBillotal:0,
|
|
|
|
|
|
|
|
|
|
|
|
currentId:null,
|
|
|
|
|
|
openForm: false,
|
|
|
|
|
|
titleForm: "",
|
|
|
|
|
|
|
|
|
|
|
|
titleWayBill:null,
|
|
|
|
|
|
openWayBillForm:false,
|
|
|
|
|
|
|
|
|
|
|
|
tempCoPackList:[],
|
|
|
|
|
|
coSelection:[],
|
|
|
|
|
|
//区分当前是新增还是修改
|
|
|
|
|
|
coPackType:'',
|
|
|
|
|
|
|
|
|
|
|
|
// 临时存储已有组批次的运单号
|
|
|
|
|
|
tempExistCoPackWayBillList:[],
|
|
|
|
|
|
tempCoPackInfo:{},
|
|
|
|
|
|
|
|
|
|
|
|
// 弹出展示层
|
|
|
|
|
|
id:null,
|
|
|
|
|
|
titleView:"",
|
|
|
|
|
|
openView: false,
|
|
|
|
|
|
// 更新网点时间范围
|
|
|
|
|
|
daterangeCreateTime: [],
|
|
|
|
|
|
// 更新网点时间范围
|
|
|
|
|
|
daterangeUpdateTime: [],
|
|
|
|
|
|
tableData:[
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }
|
|
|
|
|
|
],
|
|
|
|
|
|
tableDataId:[
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }
|
|
|
|
|
|
],
|
|
|
|
|
|
// 查询参数
|
|
|
|
|
|
queryParams: {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
|
billCode:null,
|
|
|
|
|
|
orderSN:null,
|
|
|
|
|
|
batchNo:null,
|
|
|
|
|
|
// packNo: null,
|
|
|
|
|
|
// packName: null,
|
|
|
|
|
|
// packDate: null,
|
|
|
|
|
|
destCountry: null,
|
|
|
|
|
|
destCountryName: null,
|
|
|
|
|
|
// blUnpack: null,
|
|
|
|
|
|
// sendSiteCode: null,
|
|
|
|
|
|
// totalParcelQty: null,
|
|
|
|
|
|
// totalWaybillQty: null,
|
|
|
|
|
|
// totalVolume: null,
|
|
|
|
|
|
// totalWeight: null,
|
|
|
|
|
|
// packStatus: null,
|
|
|
|
|
|
// opMan: null,
|
|
|
|
|
|
// remark: null,
|
|
|
|
|
|
// delFlag: null,
|
|
|
|
|
|
params:{
|
|
|
|
|
|
queryOrderType: '0',
|
|
|
|
|
|
queryOrderDateType: '1'
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
queryCoParams: {
|
|
|
|
|
|
params:{}
|
|
|
|
|
|
},
|
|
|
|
|
|
// 查询参数
|
|
|
|
|
|
queryWaitParams: {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
|
packNo: null,
|
|
|
|
|
|
beginCreateTime: null,
|
|
|
|
|
|
endCreateTime: null,
|
|
|
|
|
|
params:{}
|
|
|
|
|
|
},
|
|
|
|
|
|
// 查询参数
|
|
|
|
|
|
queryDoneParams: {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
|
packNo: null,
|
|
|
|
|
|
params:{}
|
|
|
|
|
|
},
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
|
|
|
this.initData();
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
2024-11-20 02:31:43 +00:00
|
|
|
|
async initData() {
|
2024-11-15 06:56:01 +00:00
|
|
|
|
|
|
|
|
|
|
if(this.batchId !=null) {
|
|
|
|
|
|
this.showBatchInfo(this.batchId);
|
2024-11-16 10:36:48 +00:00
|
|
|
|
this.coPackType = "edit";
|
2024-11-15 06:56:01 +00:00
|
|
|
|
}else{
|
|
|
|
|
|
this.reset();
|
2024-11-20 02:31:43 +00:00
|
|
|
|
|
2024-11-16 00:39:39 +00:00
|
|
|
|
this.coData.startSiteCode=this.$store.getters.ownerSiteCode;
|
|
|
|
|
|
this.coData.batchType='1';
|
2024-11-16 10:36:48 +00:00
|
|
|
|
this.coPackType = "add";
|
2024-11-20 02:31:43 +00:00
|
|
|
|
|
|
|
|
|
|
let resPack = await getTmsGroupBatchNo();
|
|
|
|
|
|
this.coData.batchNo = resPack.data;
|
|
|
|
|
|
|
|
|
|
|
|
this.coData.batchDate=parseTime(new Date());
|
|
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2024-11-16 00:39:39 +00:00
|
|
|
|
// 表单重置
|
|
|
|
|
|
reset() {
|
|
|
|
|
|
this.coData = {
|
|
|
|
|
|
id: null,
|
|
|
|
|
|
batchNo: null,
|
|
|
|
|
|
batchName: null,
|
|
|
|
|
|
batchDate: null,
|
2024-11-19 08:21:51 +00:00
|
|
|
|
transLineType: null,
|
|
|
|
|
|
productType: null,
|
2024-11-16 00:39:39 +00:00
|
|
|
|
batchType: null,
|
|
|
|
|
|
transType: null,
|
|
|
|
|
|
startSiteCode: null,
|
2024-11-19 08:21:51 +00:00
|
|
|
|
sendCountry: null,
|
2024-11-16 00:39:39 +00:00
|
|
|
|
nextSiteCode: null,
|
|
|
|
|
|
airBilllNo: null,
|
|
|
|
|
|
etd: null,
|
|
|
|
|
|
eta: null,
|
|
|
|
|
|
carNo: null,
|
|
|
|
|
|
shipNo: null,
|
|
|
|
|
|
clearanceResStatus: null,
|
|
|
|
|
|
declareResStatus: null,
|
|
|
|
|
|
destCountry: null,
|
|
|
|
|
|
destCountryName: null,
|
2024-11-19 08:21:51 +00:00
|
|
|
|
transWeight: null,
|
|
|
|
|
|
packNum: null,
|
2024-11-16 00:39:39 +00:00
|
|
|
|
totalParcelQty: null,
|
|
|
|
|
|
totalWaybillQty: null,
|
|
|
|
|
|
totalVolume: null,
|
|
|
|
|
|
totalWeight: null,
|
|
|
|
|
|
opMan: null,
|
|
|
|
|
|
remark: null,
|
|
|
|
|
|
tenantId: null,
|
2024-11-19 12:21:57 +00:00
|
|
|
|
|
2024-11-16 00:39:39 +00:00
|
|
|
|
};
|
|
|
|
|
|
this.resetForm("formCo");
|
|
|
|
|
|
},
|
2024-11-15 06:56:01 +00:00
|
|
|
|
|
|
|
|
|
|
async showBatchInfo(batchId){
|
|
|
|
|
|
this.coPackType="edit";
|
|
|
|
|
|
let response = await getEmisTmsSiteBatch(batchId);
|
|
|
|
|
|
if(!response || response.code != 200){
|
|
|
|
|
|
this.$modal.msgError(response && response.msg || "未知错误");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2024-11-20 02:31:43 +00:00
|
|
|
|
// let resData = response.data;
|
|
|
|
|
|
// let time = {};
|
|
|
|
|
|
// time.carTime = resData.etd;
|
|
|
|
|
|
this.coData = {...response.data};
|
2024-11-19 12:21:57 +00:00
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
this.emisCoPackDetail=[];
|
2024-11-20 03:03:16 +00:00
|
|
|
|
let resList = await listEmisTmsSiteBatchDtl({batchNo: this.coData.batchNo});
|
2024-11-15 06:56:01 +00:00
|
|
|
|
if(!resList || resList.code != 200){
|
|
|
|
|
|
this.$modal.msgError(resList && resList.msg || "未知错误");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2024-11-19 12:21:57 +00:00
|
|
|
|
this.tempExistCoPackWayBillList = resList.rows;
|
|
|
|
|
|
//临时存储,用于运单号校验
|
2024-11-20 03:03:16 +00:00
|
|
|
|
this.tempCoPackInfo = this.coData;
|
2024-11-15 06:56:01 +00:00
|
|
|
|
for(let p = 0; p < resList.rows.length;p++){
|
|
|
|
|
|
this.emisCoPackDetail.push(resList.rows[p].waybillDetail);
|
|
|
|
|
|
}
|
|
|
|
|
|
this.coData.packStatus = this.tempCoPackInfo.packStatus;
|
|
|
|
|
|
this.coData.scanDate = this.tempCoPackInfo.scanDate;
|
|
|
|
|
|
|
2024-11-20 03:03:16 +00:00
|
|
|
|
let resLoadingList = await listEmisTmsSiteBatchLoading({batchNo: this.coData.batchNo});
|
2024-11-15 06:56:01 +00:00
|
|
|
|
if(!resLoadingList || resLoadingList.code != 200){
|
|
|
|
|
|
this.$modal.msgError(resLoadingList && resLoadingList.msg || "未知错误");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.tempCoPackInfo.tableData = [
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }
|
|
|
|
|
|
];
|
|
|
|
|
|
this.tempCoPackInfo.tableDataId=[
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }
|
|
|
|
|
|
];
|
|
|
|
|
|
for(let p = 0; p < resLoadingList.rows.length;p++){
|
|
|
|
|
|
this.tempCoPackInfo.tableDataId[resLoadingList.rows[p].row][resLoadingList.rows[p].col] = resLoadingList.rows[p].id;
|
|
|
|
|
|
this.tempCoPackInfo.tableData[resLoadingList.rows[p].row][resLoadingList.rows[p].col] = resLoadingList.rows[p].posDesc;
|
|
|
|
|
|
this.tableData[resLoadingList.rows[p].row][resLoadingList.rows[p].col] = resLoadingList.rows[p].posDesc;
|
|
|
|
|
|
// this.emisCoPackDetail.push(resLoadingList.rows[p].waybillDetail);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.computeTotal();
|
|
|
|
|
|
this.currentId=null;
|
|
|
|
|
|
this.openForm= true;
|
|
|
|
|
|
this.titleForm = "修改组批次";
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
getWaybillList(){
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
handleQueryWait(){
|
|
|
|
|
|
this.single = true;
|
|
|
|
|
|
this.multiple = true;
|
|
|
|
|
|
if(null != this.dateTimeRange && '' != this.dateTimeRange){
|
|
|
|
|
|
this.queryWaitParams.params.beginCreateTime = dateToStr(new Date(this.dateTimeRange[0]));
|
|
|
|
|
|
this.queryWaitParams.params.endCreateTime = dateToStr(new Date(this.dateTimeRange[1]));
|
|
|
|
|
|
}
|
|
|
|
|
|
// this.queryWaitParams.packNo = this.queryParams.packNo;
|
|
|
|
|
|
this.queryWaitParams.receiveCountry = this.queryParams.receiveCountry;
|
|
|
|
|
|
this.queryWaitParams.sendCountry = this.queryParams.sendCountry;
|
|
|
|
|
|
|
|
|
|
|
|
if(this.queryParams.billCode){
|
|
|
|
|
|
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 if(item == ""){
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
newBillCodeStr=newBillCodeStr+item+",";
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
if(this.queryParams.params.queryOrderType == "0"){
|
|
|
|
|
|
this.queryWaitParams.batchNo=newBillCodeStr;
|
|
|
|
|
|
this.queryWaitParams.billCode=null;
|
|
|
|
|
|
}else{
|
|
|
|
|
|
// 处理子单号
|
|
|
|
|
|
this.queryWaitParams.billCode=newBillCodeStr;
|
|
|
|
|
|
this.queryWaitParams.batchNo=null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.loadingWait = true;
|
|
|
|
|
|
this.queryWaitParams.params.isNeedBatch = 1;
|
2024-11-16 00:39:39 +00:00
|
|
|
|
this.queryWaitParams.params.batchType = this.coData.batchType;
|
|
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
listEmisWaybill(this.queryWaitParams).then(response => {
|
|
|
|
|
|
this.loadingWait = false;
|
|
|
|
|
|
if(response.code != 200){
|
|
|
|
|
|
this.$modal.msgError(response.msg);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.emisTmsWaitPackList = response.rows;
|
|
|
|
|
|
// this.emisCoPackDetail = response.rows;
|
|
|
|
|
|
console.log(this)
|
|
|
|
|
|
this.waitTotal = response.total;
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
handleWaitSelectionChange(selection){
|
|
|
|
|
|
// selection.length > 0 ? this.packDisabled = false : this.packDisabled=true;
|
|
|
|
|
|
this.waitPackList = selection;
|
|
|
|
|
|
},
|
|
|
|
|
|
async handleQueryDone(){
|
|
|
|
|
|
this.single = true;
|
|
|
|
|
|
this.multiple = true;
|
|
|
|
|
|
this.loadingDone = true;
|
|
|
|
|
|
if(null != this.dateTimeRange && '' != this.dateTimeRange){
|
|
|
|
|
|
this.queryDoneParams.params.beginCreateTime = dateToStr(new Date(this.dateTimeRange[0]));
|
|
|
|
|
|
this.queryDoneParams.params.endCreateTime = dateToStr(new Date(this.dateTimeRange[1]));
|
|
|
|
|
|
}
|
|
|
|
|
|
// this.queryDoneParams.packNo = this.queryParams.packNo;
|
|
|
|
|
|
if(this.queryParams.billCode){
|
|
|
|
|
|
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 if(item == ""){
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
newBillCodeStr=newBillCodeStr+item+",";
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
if(this.queryParams.params.queryOrderType == "0"){
|
|
|
|
|
|
this.queryDoneParams.batchNo=newBillCodeStr;
|
|
|
|
|
|
this.queryDoneParams.billCode=null;
|
|
|
|
|
|
}else{
|
|
|
|
|
|
// 处理子单号
|
|
|
|
|
|
this.queryDoneParams.billCode=newBillCodeStr;
|
|
|
|
|
|
this.queryDoneParams.batchNo=null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.queryDoneParams.receiveCountry = this.queryParams.receiveCountry;
|
|
|
|
|
|
this.queryDoneParams.sendCountry = this.queryParams.sendCountry;
|
|
|
|
|
|
let resList = await listEmisTmsSiteBatchDtl(this.queryDoneParams);
|
|
|
|
|
|
this.loadingDone = false;
|
|
|
|
|
|
if(!resList || resList.code != 200){
|
|
|
|
|
|
this.$modal.msgError(resList && resList.msg || "未知错误");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
//this.tempExistCoPackWayBillList = resList.rows;//临时存储,用于运单号校验
|
|
|
|
|
|
this.doneTotal = resList.total;
|
|
|
|
|
|
this.emisTmsDonePackList = [];
|
|
|
|
|
|
for(let p = 0; p < resList.rows.length;p++){
|
|
|
|
|
|
let obj = {...resList.rows[p].waybillDetail};
|
|
|
|
|
|
obj.packNo = resList.rows[p].packNo;
|
|
|
|
|
|
this.emisTmsDonePackList.push(obj);
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
handleDoneSelectionChange(){
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
handleQueryWayBill(){
|
|
|
|
|
|
this.loading2 = true;
|
|
|
|
|
|
if (null != this.wayBillData.dateTimeRange && '' != this.wayBillData.dateTimeRange) {
|
|
|
|
|
|
if(this.wayBillData.dataTimeType == '1'){
|
|
|
|
|
|
// 下单时间
|
|
|
|
|
|
this.wayBillData.params.beginOrderDate = dateToStr(new Date(this.wayBillData.dateTimeRange[0]));
|
|
|
|
|
|
this.wayBillData.params.endOrderDate = dateToStr(new Date(this.wayBillData.dateTimeRange[1]));
|
|
|
|
|
|
}else if(this.wayBillData.dataTimeType == '0'){
|
|
|
|
|
|
// 录单时间
|
|
|
|
|
|
this.wayBillData.params.beginCreateTime = dateToStr(new Date(this.wayBillData.dateTimeRange[0]));
|
|
|
|
|
|
this.wayBillData.params.endCreateTime = dateToStr(new Date(this.wayBillData.dateTimeRange[1]));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if(this.wayBillData.billCode){
|
|
|
|
|
|
let qBillCode=formatSearchStr(this.wayBillData.billCode);
|
|
|
|
|
|
let billArr = qBillCode.split(",");
|
|
|
|
|
|
let newBillCodeStr="";
|
|
|
|
|
|
billArr.forEach(item=>{
|
|
|
|
|
|
if(item.startsWith("T")){
|
|
|
|
|
|
let mainBillCode=item.substr(0,14);
|
|
|
|
|
|
newBillCodeStr=newBillCodeStr+mainBillCode+",";
|
|
|
|
|
|
}else if(item == ""){
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
newBillCodeStr=newBillCodeStr+item+",";
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
if(this.wayBillData.params.queryOrderType == "0"){
|
|
|
|
|
|
this.wayBillData.orderSN=newBillCodeStr;
|
|
|
|
|
|
this.wayBillData.billCode=null;
|
|
|
|
|
|
}else{
|
|
|
|
|
|
// 处理子单号
|
|
|
|
|
|
this.wayBillData.billCode=newBillCodeStr;
|
|
|
|
|
|
this.wayBillData.orderSN=null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.wayBillData.params.isNeedBatch = 1;
|
2024-11-16 05:17:23 +00:00
|
|
|
|
this.wayBillData.params.batchType = this.coData.batchType;
|
2024-11-15 06:56:01 +00:00
|
|
|
|
listEmisWaybill(this.wayBillData).then(response => {
|
|
|
|
|
|
this.loading2 = false;
|
|
|
|
|
|
if(response.code != 200){
|
|
|
|
|
|
this.$modal.msgError(response.msg);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.emisWayBillList = response.rows;
|
|
|
|
|
|
// this.emisCoPackDetail = response.rows;
|
|
|
|
|
|
console.log(this)
|
|
|
|
|
|
this.wayBillotal = response.total;
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
onSiteSelect(item){
|
|
|
|
|
|
if(!item){
|
|
|
|
|
|
this.coData.startSiteCode = null;
|
|
|
|
|
|
this.coData.startSiteName = null;
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.coData.startSiteCode=item && item.siteCode;
|
|
|
|
|
|
this.coData.startSiteName=item && item.siteName;
|
|
|
|
|
|
},
|
|
|
|
|
|
onNextSiteSelect(item){
|
|
|
|
|
|
if(!item){
|
|
|
|
|
|
this.coData.nextSiteCode = null;
|
|
|
|
|
|
this.coData.nextSiteName = null;
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.coData.nextSiteCode=item && item.siteCode;
|
|
|
|
|
|
this.coData.nextSiteName=item && item.siteName;
|
|
|
|
|
|
},
|
|
|
|
|
|
onDateSelect(value){
|
|
|
|
|
|
console.log("date picker---->", value)
|
|
|
|
|
|
this.dateTimeRange=value;
|
|
|
|
|
|
if(this.queryParams.params.queryOrderDateType == '1'){
|
|
|
|
|
|
// 下单时间
|
|
|
|
|
|
this.queryParams.params.beginCreateTime = dateToStr(new Date(this.dateTimeRange[0]));
|
|
|
|
|
|
this.queryParams.params.endCreateTime = dateToStr(new Date(this.dateTimeRange[1]));
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onWayBillDateSelect(value){
|
|
|
|
|
|
console.log("date picker---->", value)
|
|
|
|
|
|
this.wayBillData.dateTimeRange=value;
|
|
|
|
|
|
},
|
2024-11-22 23:52:01 +00:00
|
|
|
|
|
|
|
|
|
|
submitAddCoPackForm() {
|
|
|
|
|
|
this.$refs["formCo"].validate(valid => {
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
this.handleAddCoPack();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
async handleAddCoPack(){
|
2024-11-19 12:21:57 +00:00
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
if(this.emisCoPackDetail.length == 0){
|
|
|
|
|
|
this.$modal.msgError("请先选择至少一条运单信息")
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-11-19 11:39:21 +00:00
|
|
|
|
this.coData.etd = parseTime(this.coData.carTime, '{y}-{m}-{d} {h}:{i}:{s}');
|
|
|
|
|
|
|
2024-11-19 12:21:57 +00:00
|
|
|
|
// 新增
|
|
|
|
|
|
if(this.coPackType == "add")
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
let response = await addEmisTmsSiteBatch(this.coData);
|
2024-11-15 06:56:01 +00:00
|
|
|
|
if(!response || response.code != 200){
|
|
|
|
|
|
this.$modal.msgError(response && response.msg || '新增组批次失败')
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2024-11-19 12:21:57 +00:00
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
for(let i = 0; i< this.emisCoPackDetail.length;i++){
|
|
|
|
|
|
let packDetail = {
|
2024-11-20 02:31:43 +00:00
|
|
|
|
batchNo:this.coData.batchNo,
|
2024-11-15 06:56:01 +00:00
|
|
|
|
billCode: this.emisCoPackDetail[i].billCode,
|
|
|
|
|
|
scanDate: this.emisCoPackDetail[i].scanDate,
|
|
|
|
|
|
scanStatus: this.emisCoPackDetail[i].scanStatus,
|
|
|
|
|
|
groupStatus: "1",//已组批次
|
|
|
|
|
|
scanMan: this.emisCoPackDetail[i].scanMan,
|
|
|
|
|
|
scanSite: this.emisCoPackDetail[i].scanSite,
|
|
|
|
|
|
};
|
2024-11-20 02:31:43 +00:00
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
let response = await addEmisTmsSiteBatchDtl(packDetail);
|
|
|
|
|
|
if(!response || response.code != 200){
|
|
|
|
|
|
this.$modal.msgError(response && response.msg || '组批次明细新增失败')
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.waitPackList=[];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 新增配载数据 tableData
|
|
|
|
|
|
for(let lr = 0; lr < 3; lr++){
|
|
|
|
|
|
for(let ll = 0; ll < 6; ll++){
|
|
|
|
|
|
let batchLoadingData = {
|
2024-11-20 02:31:43 +00:00
|
|
|
|
batchNo: this.coData.batchNo,
|
2024-11-15 06:56:01 +00:00
|
|
|
|
posNo:lr+":"+ll+":1",
|
|
|
|
|
|
row: lr,
|
|
|
|
|
|
col: ll,
|
|
|
|
|
|
layer: 1,
|
|
|
|
|
|
posDesc:this.tableData[lr][ll],
|
|
|
|
|
|
remark:"",
|
|
|
|
|
|
tenantId:"",
|
|
|
|
|
|
}
|
|
|
|
|
|
let resLD = await addEmisTmsSiteBatchLoading(batchLoadingData);
|
|
|
|
|
|
if(!resLD || resLD.code != 200){
|
|
|
|
|
|
this.$modal.msgError(resLD && resLD.msg || '组批次配载明细新增失败')
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-11-19 12:21:57 +00:00
|
|
|
|
}
|
|
|
|
|
|
else if(this.coPackType == "edit"){// 修改
|
|
|
|
|
|
let res = await updateEmisTmsSiteBatch(this.coData);
|
|
|
|
|
|
if(!res || res.code != 200){
|
|
|
|
|
|
this.$modal.msgError(res && res.msg || '未知错误')
|
|
|
|
|
|
return;
|
2024-11-15 06:56:01 +00:00
|
|
|
|
}
|
2024-11-19 12:21:57 +00:00
|
|
|
|
|
2024-11-15 06:56:01 +00:00
|
|
|
|
// 修改配载数据
|
|
|
|
|
|
for(let lr = 0; lr < 3; lr++){
|
|
|
|
|
|
for(let ll = 0; ll < 6; ll++){
|
|
|
|
|
|
if(this.tempCoPackInfo.tableData[lr][ll] != this.tableData[lr][ll]){
|
|
|
|
|
|
let batchLoadingData = {
|
|
|
|
|
|
id: this.tempCoPackInfo.tableDataId[lr][ll],
|
|
|
|
|
|
posDesc:this.tableData[lr][ll],
|
|
|
|
|
|
}
|
|
|
|
|
|
let resLD = await updateEmisTmsSiteBatchLoading(batchLoadingData);
|
|
|
|
|
|
if(!resLD || resLD.code != 200){
|
|
|
|
|
|
this.$modal.msgError(resLD && resLD.msg || '组批次配载明细新增失败')
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.$modal.msgSuccess('操作成功!');
|
|
|
|
|
|
this.$emit("on-changed");
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
handleCancelCo(){
|
|
|
|
|
|
this.coData={};
|
|
|
|
|
|
this.blUnpack="1";
|
|
|
|
|
|
this.emisCoPackDetail=[];
|
|
|
|
|
|
this.$emit("on-cancel");
|
|
|
|
|
|
},
|
|
|
|
|
|
handleWayBillSelectionChange(selection){
|
|
|
|
|
|
this.tempCoPackList = selection;
|
|
|
|
|
|
this.tempCoPackList.length > 0 ? this.addWayBillDisabled = false : this.addWayBillDisabled = true;
|
|
|
|
|
|
},
|
|
|
|
|
|
async submitFormBatch(){
|
|
|
|
|
|
if(this.formBatchBillList==null || this.formBatchBillList==''){
|
|
|
|
|
|
this.$modal.msgError("请输入单号");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
let bcList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[];
|
|
|
|
|
|
|
|
|
|
|
|
for(let i = 0; i < bcList.length; i++){
|
|
|
|
|
|
let billcode = bcList[i].trim();
|
|
|
|
|
|
if(this.emisCoPackDetail.filter(wb => wb.billCode == billcode).length == 0){
|
2024-11-16 05:17:23 +00:00
|
|
|
|
|
|
|
|
|
|
let billRes = await listEmisWaybill(
|
|
|
|
|
|
{
|
|
|
|
|
|
billCode:billcode,
|
|
|
|
|
|
params:{
|
|
|
|
|
|
isNeedBatch:1,
|
|
|
|
|
|
batchType:this.coData.batchType
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
);
|
2024-11-15 06:56:01 +00:00
|
|
|
|
if(!billRes || billRes.code != 200){
|
|
|
|
|
|
this.$modal.msgError(billRes && billRes.msg)
|
|
|
|
|
|
return;
|
|
|
|
|
|
}else if(!billRes.rows || billRes.rows.length < 1){
|
2024-11-26 07:21:34 +00:00
|
|
|
|
this.$modal.msgError('运单不存在或状态异常(已签收,已占用,已派送),不能组批次: ' + billcode)
|
2024-11-15 06:56:01 +00:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
let item = billRes.rows[0];
|
|
|
|
|
|
this.emisCoPackDetail.push(item);
|
|
|
|
|
|
if(this.coPackType=="edit"){
|
|
|
|
|
|
let packDetail = {
|
|
|
|
|
|
batchNo: this.coData.batchNo,
|
|
|
|
|
|
billCode: item.billCode,
|
|
|
|
|
|
scanDate: item.scanDate,
|
|
|
|
|
|
scanStatus: item.scanStatus,
|
|
|
|
|
|
groupStatus: "1",//已组批次
|
|
|
|
|
|
scanMan: item.scanMan,
|
|
|
|
|
|
scanSite: item.scanSite,
|
|
|
|
|
|
createBy: this.$store.getters.empCode,
|
|
|
|
|
|
createTime: parseTime(new Date())
|
|
|
|
|
|
};
|
|
|
|
|
|
let response = await addEmisTmsSiteBatchDtl(packDetail);
|
|
|
|
|
|
if(!response || response.code != 200){
|
|
|
|
|
|
this.$modal.msgError(response && response.msg || '组批次明细新增失败')
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.titleBatch="";
|
|
|
|
|
|
this.openBatch=false;
|
|
|
|
|
|
this.formBatchBillList = "";
|
|
|
|
|
|
this.wayBillData = {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
|
params:{}
|
|
|
|
|
|
};
|
|
|
|
|
|
this.emisWayBillList=[];
|
|
|
|
|
|
this.tempCoPackList=[];
|
|
|
|
|
|
this.addWayBillDisabled = true;
|
|
|
|
|
|
this.wayBillotal=0;
|
|
|
|
|
|
this.computeTotal();
|
|
|
|
|
|
// 更新主表
|
|
|
|
|
|
if(this.coPackType=="edit"){
|
2024-11-19 12:21:57 +00:00
|
|
|
|
let res = await updateEmisTmsSiteBatch(this.coData);
|
2024-11-15 06:56:01 +00:00
|
|
|
|
if(!res || res.code != 200){
|
|
|
|
|
|
this.$modal.msgError(res && res.msg || '未知错误')
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
async handleCoAdd(){
|
|
|
|
|
|
this.tempCoPackList.forEach(async (item) => {
|
|
|
|
|
|
if(this.emisCoPackDetail.filter(wb => wb.billCode == item.billCode).length == 0){
|
|
|
|
|
|
this.emisCoPackDetail.push(item);
|
|
|
|
|
|
if(this.coPackType=="edit"){
|
|
|
|
|
|
let packDetail = {
|
|
|
|
|
|
batchNo: this.coData.batchNo,
|
|
|
|
|
|
billCode: item.billCode,
|
|
|
|
|
|
scanDate: item.scanDate,
|
|
|
|
|
|
scanStatus: item.scanStatus,
|
|
|
|
|
|
groupStatus: "1",//已组批次
|
|
|
|
|
|
scanMan: item.scanMan,
|
|
|
|
|
|
scanSite: item.scanSite,
|
|
|
|
|
|
createBy: this.$store.getters.empCode,
|
|
|
|
|
|
createTime: parseTime(new Date())
|
|
|
|
|
|
};
|
|
|
|
|
|
let response = await addEmisTmsSiteBatchDtl(packDetail);
|
|
|
|
|
|
if(!response || response.code != 200){
|
|
|
|
|
|
this.$modal.msgError(response && response.msg || '组批次明细新增失败')
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
this.titleWayBill="";
|
|
|
|
|
|
this.openWayBillForm=false;
|
|
|
|
|
|
this.wayBillData = {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
|
params:{}
|
|
|
|
|
|
};
|
|
|
|
|
|
this.emisWayBillList=[];
|
|
|
|
|
|
this.tempCoPackList=[];
|
|
|
|
|
|
this.addWayBillDisabled = true;
|
|
|
|
|
|
this.wayBillotal=0;
|
|
|
|
|
|
this.computeTotal();
|
|
|
|
|
|
// 更新主表
|
|
|
|
|
|
if(this.coPackType=="edit"){
|
2024-11-19 12:21:57 +00:00
|
|
|
|
let res = await updateEmisTmsSiteBatch(this.coData);
|
2024-11-15 06:56:01 +00:00
|
|
|
|
if(!res || res.code != 200){
|
|
|
|
|
|
this.$modal.msgError(res && res.msg || '未知错误')
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
handleCloseWayBill(){
|
|
|
|
|
|
this.titleWayBill="";
|
|
|
|
|
|
this.openWayBillForm=false;
|
|
|
|
|
|
this.wayBillData = {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
|
params:{}
|
|
|
|
|
|
};
|
|
|
|
|
|
this.emisWayBillList=[];
|
|
|
|
|
|
this.tempCoPackList=[];
|
|
|
|
|
|
this.addWayBillDisabled = true;
|
|
|
|
|
|
this.wayBillotal=0;
|
|
|
|
|
|
},
|
|
|
|
|
|
handleCoPackListDelete(){
|
|
|
|
|
|
|
|
|
|
|
|
if(this.coPackType == "edit"){
|
|
|
|
|
|
this.$confirm('确认删除该条数据吗?', '确认信息')
|
|
|
|
|
|
.then(async (isPass) => {
|
|
|
|
|
|
if (isPass) {
|
|
|
|
|
|
//计算要删除的运单, “删除”按钮的操作逻辑
|
|
|
|
|
|
// let tempDelList = [];
|
|
|
|
|
|
// 计算出选中的数据是已存在还是新增的;
|
|
|
|
|
|
let idsArrTemp=[];
|
|
|
|
|
|
for(let gti=0; gti < this.tempExistCoPackWayBillList.length;gti++){
|
|
|
|
|
|
if(this.coSelection.filter(item => {
|
|
|
|
|
|
return this.tempExistCoPackWayBillList[gti].billCode == item.billCode
|
|
|
|
|
|
}).length > 0){
|
|
|
|
|
|
// 已存在
|
|
|
|
|
|
let res = await delEmisTmsSiteBatchDtl(this.tempExistCoPackWayBillList[gti].id);
|
|
|
|
|
|
if(!res || res.code != 200){
|
|
|
|
|
|
this.$modal.msgError(res && res.msg || '未知错误')
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
idsArrTemp.push(this.tempExistCoPackWayBillList[gti].id)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
let newList =[];
|
|
|
|
|
|
this.emisCoPackDetail.forEach(item=>{
|
|
|
|
|
|
if(this.coSelection.filter(cs => cs.billCode == item.billCode) == 0){
|
|
|
|
|
|
newList.push(item);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
this.emisCoPackDetail = newList;
|
|
|
|
|
|
let afterList=[];
|
|
|
|
|
|
for(let ai = 0; ai < this.tempExistCoPackWayBillList.length; ai++){
|
|
|
|
|
|
console.log(idsArrTemp)
|
|
|
|
|
|
console.log(this.tempExistCoPackWayBillList[ai])
|
|
|
|
|
|
if(idsArrTemp.indexOf(this.tempExistCoPackWayBillList[ai].id) == -1){
|
|
|
|
|
|
afterList.push(this.tempExistCoPackWayBillList[ai]);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.tempExistCoPackWayBillList = afterList;//this.tempExistCoPackWayBillList.filter(item => {idsArrTemp.indexOf(item.id) == -1})
|
|
|
|
|
|
|
|
|
|
|
|
this.computeTotal();
|
|
|
|
|
|
// 更新主表
|
|
|
|
|
|
this.tempCoPackInfo.destCountry = this.coData.destCountry;
|
|
|
|
|
|
// this.tempCoPackInfo.sendStiteCode = this.coData.sendStiteCode;
|
|
|
|
|
|
// this.tempCoPackInfo.sendStiteName = this.coData.sendStiteName || null;
|
|
|
|
|
|
this.tempCoPackInfo.nextSiteCode = this.coData.nextSiteCode;
|
|
|
|
|
|
this.tempCoPackInfo.nextSiteName = this.coData.nextSiteName;
|
|
|
|
|
|
this.tempCoPackInfo.blUnpack = this.blUnpack;
|
|
|
|
|
|
this.tempCoPackInfo.totalWaybillQty = this.coData.totalWaybillQty;
|
|
|
|
|
|
this.tempCoPackInfo.totalParcelQty = this.coData.totalParcelQty;
|
|
|
|
|
|
this.tempCoPackInfo.totalWeight = this.coData.totalWeight;
|
|
|
|
|
|
this.tempCoPackInfo.totalVolume = this.coData.totalVolume;
|
|
|
|
|
|
let res = await updateEmisTmsSiteBatch(this.tempCoPackInfo);
|
|
|
|
|
|
if(!res || res.code != 200){
|
|
|
|
|
|
this.$modal.msgError(res && res.msg || '未知错误')
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.$modal.msgSuccess('删除成功')
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
.catch()
|
|
|
|
|
|
}else{
|
|
|
|
|
|
let newList =[];
|
|
|
|
|
|
this.emisCoPackDetail.forEach(item=>{
|
|
|
|
|
|
if(this.coSelection.filter(cs => cs.billCode == item.billCode) == 0){
|
|
|
|
|
|
newList.push(item);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
this.emisCoPackDetail = newList;
|
|
|
|
|
|
this.computeTotal();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
|
handleQuery() {
|
|
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
|
|
// this.queryParams.pageSize = 20;
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
|
resetQuery() {
|
|
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
|
|
this.handleQuery();
|
|
|
|
|
|
},
|
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
|
|
|
this.selection = selection;
|
|
|
|
|
|
this.single = selection.length!==1
|
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
|
},
|
|
|
|
|
|
handleCoPackSelectionChange(selection){
|
|
|
|
|
|
// this.coSelection = selection.map(item => item.id)
|
|
|
|
|
|
this.coSelection = selection;
|
|
|
|
|
|
this.coSingle = selection.length!==1
|
|
|
|
|
|
this.coMultiple = !selection.length
|
|
|
|
|
|
},
|
|
|
|
|
|
computeTotal(){
|
|
|
|
|
|
let totalParcelQty=0;
|
|
|
|
|
|
let totalWeight=0;
|
|
|
|
|
|
let totalVolume=0;
|
|
|
|
|
|
this.emisCoPackDetail.forEach(item =>{
|
|
|
|
|
|
totalParcelQty +=item.parcelQty;
|
|
|
|
|
|
totalWeight +=item.billWeight;
|
|
|
|
|
|
totalVolume +=item.totalVolume;
|
|
|
|
|
|
item.destCountry = this.coData.destCountry;
|
|
|
|
|
|
// item.sendSiteCode = this.coData.sendSiteCode;
|
|
|
|
|
|
item.startSiteCode = this.coData.startSiteCode;
|
|
|
|
|
|
item.startSiteName = this.coData.startSiteName;
|
|
|
|
|
|
// item.nextSiteCode = this.coData.nextSiteCode;
|
|
|
|
|
|
item.nextSiteCode = this.coData.nextSiteCode;
|
|
|
|
|
|
item.nextSiteName = this.coData.nextSiteName;
|
|
|
|
|
|
item.blUnpack = this.blUnpack;
|
|
|
|
|
|
})
|
|
|
|
|
|
this.coData.totalWaybillQty=this.emisCoPackDetail.length;
|
|
|
|
|
|
this.coData.totalParcelQty=totalParcelQty;
|
2024-11-20 02:31:43 +00:00
|
|
|
|
this.coData.totalWeight=totalWeight.toFixed(2);
|
|
|
|
|
|
this.coData.totalVolume=totalVolume.toFixed(4);
|
2024-11-15 06:56:01 +00:00
|
|
|
|
},
|
|
|
|
|
|
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
|
|
|
|
|
handleSortChange(column) {
|
|
|
|
|
|
this.queryParams.orderByColumn = column.prop;
|
|
|
|
|
|
this.queryParams.isAsc = column.order;
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
|
handleAdd() {
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
handleAddWayBill(){
|
|
|
|
|
|
this.openBatch = true;
|
|
|
|
|
|
this.titleBatch = "批量输入运单号";
|
|
|
|
|
|
},
|
|
|
|
|
|
cancelBatch(){
|
|
|
|
|
|
this.openBatch=false;
|
|
|
|
|
|
this.titleBatch = "";
|
|
|
|
|
|
this.formBatchBillList = "";
|
|
|
|
|
|
},
|
|
|
|
|
|
handleShowMoreInput(){
|
|
|
|
|
|
this.moreInputVisible = !this.moreInputVisible;
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
|
async handleUpdate() {
|
|
|
|
|
|
// this.coData={};
|
|
|
|
|
|
let id = this.ids[0]
|
|
|
|
|
|
this.coPackType="edit";
|
|
|
|
|
|
let response = await getEmisTmsSiteBatch(id);
|
|
|
|
|
|
if(!response || response.code != 200){
|
|
|
|
|
|
this.$modal.msgError(response && response.msg || "未知错误");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
let resData = response.data;
|
|
|
|
|
|
let time = {};
|
2024-11-19 11:39:21 +00:00
|
|
|
|
|
|
|
|
|
|
time.carTime = resData.etd;
|
2024-11-15 06:56:01 +00:00
|
|
|
|
this.coData = {...resData, ...{batchDate:resData.createTime}, ...time};
|
|
|
|
|
|
|
|
|
|
|
|
this.emisCoPackDetail=[];
|
|
|
|
|
|
let resList = await listEmisTmsSiteBatchDtl({batchNo: resData.batchNo});
|
|
|
|
|
|
if(!resList || resList.code != 200){
|
|
|
|
|
|
this.$modal.msgError(resList && resList.msg || "未知错误");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.tempExistCoPackWayBillList = resList.rows;//临时存储,用于运单号校验
|
|
|
|
|
|
this.tempCoPackInfo = resData;
|
|
|
|
|
|
for(let p = 0; p < resList.rows.length;p++){
|
|
|
|
|
|
this.emisCoPackDetail.push(resList.rows[p].waybillDetail);
|
|
|
|
|
|
}
|
|
|
|
|
|
this.coData.packStatus = this.tempCoPackInfo.packStatus;
|
|
|
|
|
|
this.coData.scanDate = this.tempCoPackInfo.scanDate;
|
|
|
|
|
|
|
|
|
|
|
|
let resLoadingList = await listEmisTmsSiteBatchLoading({batchNo: resData.batchNo});
|
|
|
|
|
|
if(!resLoadingList || resLoadingList.code != 200){
|
|
|
|
|
|
this.$modal.msgError(resLoadingList && resLoadingList.msg || "未知错误");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.tempCoPackInfo.tableData = [
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }
|
|
|
|
|
|
];
|
|
|
|
|
|
this.tempCoPackInfo.tableDataId=[
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
|
|
|
|
|
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }
|
|
|
|
|
|
];
|
|
|
|
|
|
for(let p = 0; p < resLoadingList.rows.length;p++){
|
|
|
|
|
|
this.tempCoPackInfo.tableDataId[resLoadingList.rows[p].row][resLoadingList.rows[p].col] = resLoadingList.rows[p].id;
|
|
|
|
|
|
this.tempCoPackInfo.tableData[resLoadingList.rows[p].row][resLoadingList.rows[p].col] = resLoadingList.rows[p].posDesc;
|
|
|
|
|
|
this.tableData[resLoadingList.rows[p].row][resLoadingList.rows[p].col] = resLoadingList.rows[p].posDesc;
|
|
|
|
|
|
// this.emisCoPackDetail.push(resLoadingList.rows[p].waybillDetail);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.computeTotal();
|
|
|
|
|
|
this.currentId=null;
|
|
|
|
|
|
this.openForm= true;
|
|
|
|
|
|
this.titleForm = "修改组批次";
|
|
|
|
|
|
},
|
|
|
|
|
|
handleView(row) {
|
|
|
|
|
|
this.id=row.id;
|
|
|
|
|
|
this.titleView="查看";
|
|
|
|
|
|
this.openView=true;
|
|
|
|
|
|
// this.router.push({ path: '/emis/emisTmsPack/viewDetail', query: { id: row.id }})
|
|
|
|
|
|
},
|
|
|
|
|
|
handleFormChanged(){
|
|
|
|
|
|
this.openForm = false;
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
},
|
|
|
|
|
|
cancelForm(){
|
|
|
|
|
|
this.openForm = false;
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
|
CoPack(row) {
|
|
|
|
|
|
const ids = row.id || this.ids;
|
|
|
|
|
|
this.$modal.confirm('是否确认删除').then(function() {
|
|
|
|
|
|
return delEmisTmsSiteBatch(ids);
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
|
handleExport() {
|
|
|
|
|
|
// this.download('emis/emisTmsPack/export', {
|
|
|
|
|
|
// ...this.queryParams
|
|
|
|
|
|
// }, `emisTmsPack_${new Date().getTime()}.xlsx`)
|
|
|
|
|
|
const loadingInstance = this.$loading({
|
|
|
|
|
|
text: '正在导出...'
|
|
|
|
|
|
})
|
|
|
|
|
|
var qParam = {...this.queryParams};
|
|
|
|
|
|
qParam.pageNum=1;
|
|
|
|
|
|
qParam.pageSize=5000;
|
|
|
|
|
|
|
|
|
|
|
|
listEmisTmsSiteBatch(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','组批次号','组批次名称','组批次时间','目的国家','目的国家名称','是否可拆','发出网点','下一网点','下一站','总件数','总运单数','总体积','总重量','组批次状态','扩展数据','操作员','ext1','ext2','ext3','ext4','备注','租户ID','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建网点','更新网点',];
|
|
|
|
|
|
const filterVal = ['id','packNo','packName','packDate','destCountry','destCountryName','blUnpack','sendSiteCode','nextSiteCode','nextStation','totalParcelQty','totalWaybillQty','totalVolume','totalWeight','packStatus','extData','opMan','ext1','ext2','ext3','ext4','remark','tenantId','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',];
|
|
|
|
|
|
const data = this.formatJson(filterVal, curList, response.rows)
|
|
|
|
|
|
excel.export_json_to_excel({
|
|
|
|
|
|
header: tHeader,
|
|
|
|
|
|
data,
|
|
|
|
|
|
filename: 'TMS组批次',
|
|
|
|
|
|
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 === 'status') {
|
|
|
|
|
|
var statusStr='xxx'
|
|
|
|
|
|
if(v[j] == 10){
|
|
|
|
|
|
statusStr='xxx'
|
|
|
|
|
|
}
|
|
|
|
|
|
return statusStr;
|
|
|
|
|
|
}
|
|
|
|
|
|
return v[j]
|
|
|
|
|
|
}))
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 列索引函数 */
|
|
|
|
|
|
getIndex($index) {
|
|
|
|
|
|
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 时间搜索响应函数 */
|
|
|
|
|
|
dateTimeChange(value){
|
|
|
|
|
|
this.dateTimeRange=value;
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
2024-11-16 00:39:39 +00:00
|
|
|
|
<style lang="scss">
|
2024-11-15 06:56:01 +00:00
|
|
|
|
.el-divider{
|
|
|
|
|
|
margin-top: 0px;
|
|
|
|
|
|
background: 0 0;
|
|
|
|
|
|
border-top: 1px solid #E6EBF5;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-divider__text {
|
|
|
|
|
|
color: #0955ee;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
.query-label {
|
|
|
|
|
|
.el-radio{
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
line-height: 23px;
|
|
|
|
|
|
white-space: normal;
|
|
|
|
|
|
margin-right: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.overflowhidden{
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ellipsis {
|
|
|
|
|
|
width: 100px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
2024-11-16 00:39:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.cargoList{
|
|
|
|
|
|
.el-input__inner {
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
background: #ffffcd;
|
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
|
padding: 0px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.el-input-number {
|
|
|
|
|
|
width: 100%!important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-input-number.is-without-controls .el-input__inner {
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
background: #ffffcd;
|
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
|
padding: 0px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-11-15 06:56:01 +00:00
|
|
|
|
</style>
|