Commit 541ade3b authored by 332784038@qq.com's avatar 332784038@qq.com

6

parent 79a51e7c
zall-sdk-javascript-master/
\ No newline at end of file
{
"printWidth": 800,
"semi": false,
"psingleQuote": true,
"trailingComma": "none"
}
\ No newline at end of file
......@@ -4707,5 +4707,6 @@
"下次跟进时间": "Next follow-up time",
"提交结果": "Submit result",
"增加计划": "add plan",
"是否确认导出客户跟进记录数据项?": "Are you sure to export all customer follow-up record data items?"
"是否确认导出客户跟进记录数据项?": "Are you sure to export all customer follow-up record data items?",
"海外仓模式修改": "Modify overseas warehouse mode"
}
......@@ -662,15 +662,17 @@ export default {
path: this.processInstance.processDefinition?.formCustomViewPath,
},
// 收货人限制修改申请
order_consignee_limit_change:{
component: () => import("@/views/ecw/order/components/updateReleaseLimitApproval"),
order_consignee_limit_change: {
component: () =>
import("@/views/ecw/order/components/updateReleaseLimitApproval"),
id: this.processInstance.businessKey,
},
// 海外仓修改申请,下面的组件待改
order_overseas_warehouse_change:{
component: () => import("@/views/ecw/order/components/updateReleaseLimitApproval"),
order_overseas_warehouse_change: {
component: () =>
import("@/views/ecw/order/components/updateReleaseLimitApproval"),
id: this.processInstance.businessKey,
}
},
};
console.log(
"formCustomViewPath",
......
......@@ -3,20 +3,9 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item :label="$t('编号')" prop="orderNo">
<el-input
v-model.trim="noParam.value"
:placeholder="$t('请输入订单号、唛头、提单号')"
clearable
@keyup.enter.native="handleQuery"
@input="noParam.value=noParam.value.replace(/\s+/g, '')"
>
<el-input v-model.trim="noParam.value" :placeholder="$t('请输入订单号、唛头、提单号')" clearable @keyup.enter.native="handleQuery" @input="noParam.value = noParam.value.replace(/\s+/g, '')">
<template slot="prepend">
<dict-selector
:type="DICT_TYPE.ORDER_QUERY_NO_FIELD"
defaultable
v-model="noParam.key"
class="w-50"
/>
<dict-selector :type="DICT_TYPE.ORDER_QUERY_NO_FIELD" defaultable v-model="noParam.key" class="w-50" />
</template>
</el-input>
</el-form-item>
......@@ -31,69 +20,26 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select
v-model="destCountryId"
multiple
:label="destCountryId"
:placeholder="$t('请选择目的国')"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressProvince"
:key="item.guojia"
:label="item.guojiaName"
:value="item.guojia"
></el-option>
<el-select v-model="destCountryId" multiple :label="destCountryId" :placeholder="$t('请选择目的国')" clearable @change="handleQuery">
<el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select
v-model="objectiveId"
multiple
:placeholder="$t('请选择目的城市')"
style="width: 200px"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressCity"
:key="item.shi"
:label="item.shiName"
:value="item.shi"
></el-option>
<el-select v-model="objectiveId" multiple :placeholder="$t('请选择目的城市')" style="width: 200px" clearable @change="handleQuery">
<el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select
v-model="destWarehouseId"
multiple
:placeholder="$t('请选择目的仓')"
style="width: 200px"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressTown"
:key="item.id"
:label="item.titleZh"
:value="item.id"
></el-option>
<el-select v-model="destWarehouseId" multiple :placeholder="$t('请选择目的仓')" style="width: 200px" clearable @change="handleQuery">
<el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
</el-select>
</el-form-item>
</div>
<el-form-item :label="$t('客户经理')">
<user-selector
manage
v-model="queryParams.salesmanIds"
multiple
clearable
@change="handleQuery"
:prepend="{ id: 0, nickname: $t('未分配客户经理') }"
/>
<user-selector manage v-model="queryParams.salesmanIds" multiple clearable @change="handleQuery" :prepend="{ id: 0, nickname: $t('未分配客户经理') }" />
</el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportId" v-show="showSearch">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model.number="queryParams.transportId" clearable @change="handleQuery"/>
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model.number="queryParams.transportId" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="channelIds">
<selector clearable :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelIds" multiple></selector>
......@@ -102,20 +48,9 @@
<el-input v-model="queryParams.orderNo" :placeholder="$t('订单编号')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item>-->
<el-form-item :label="$t('商品') + ':'" v-show="showSearch">
<el-input
v-model.trim="prodParam.value"
:placeholder="$t('请输入商品类型、品名或品牌')"
clearable
@keyup.enter.native="handleQuery"
@input="replaceSpace(prodParam, 'value')"
>
<el-input v-model.trim="prodParam.value" :placeholder="$t('请输入商品类型、品名或品牌')" clearable @keyup.enter.native="handleQuery" @input="replaceSpace(prodParam, 'value')">
<template slot="prepend">
<dict-selector
:type="DICT_TYPE.ORDER_QUERY_PROD_FIELD"
defaultable
v-model="prodParam.key"
class="w-50"
/>
<dict-selector :type="DICT_TYPE.ORDER_QUERY_PROD_FIELD" defaultable v-model="prodParam.key" class="w-50" />
</template>
</el-input>
</el-form-item>
......@@ -123,18 +58,17 @@
<dict-selector v-model="queryParams.cargoControlStatusList" multiple :type="DICT_TYPE.CONTROL_GOODS_STATUS" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('订单状态')" prop="statusList" v-show="showSearch">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" multiple v-model="queryParams.statusList"
@keyup.enter.native="handleQuery" clearable @change="handleQuery" />
<dict-selector :type="DICT_TYPE.ORDER_STATUS" multiple v-model="queryParams.statusList" @keyup.enter.native="handleQuery" clearable @change="handleQuery" />
</el-form-item>
<!--<el-form-item :label="$t('提单号')" prop="tidanNo">
<el-input v-model.trim="queryParams.tidanNo" :placeholder="$t('提单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>-->
<el-form-item :label="$t('发货人')" prop="consignorKey">
<el-input v-model.trim="queryParams.consignorKey" :placeholder="$t('发货人')" clearable @keyup.enter.native="handleQuery" @input="queryParams.consignorKey=queryParams.consignorKey.replace(/\s+/g, '')" />
<el-input v-model.trim="queryParams.consignorKey" :placeholder="$t('发货人')" clearable @keyup.enter.native="handleQuery" @input="queryParams.consignorKey = queryParams.consignorKey.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('收货人')" prop="consigneeKey">
<el-input v-model.trim="queryParams.consigneeKey" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" @input="queryParams.consigneeKey=queryParams.consigneeKey.replace(/\s+/g, '')" />
<el-input v-model.trim="queryParams.consigneeKey" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" @input="queryParams.consigneeKey = queryParams.consigneeKey.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('报关方式')" prop="customsTypes">
......@@ -145,13 +79,7 @@
<el-input v-model="queryParams.marks" :placeholder="$t('唛头')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>-->
<el-form-item :label="$t('备案属性')" prop="productRecords" v-show="showSearch">
<dict-selector
:type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE"
multiple
v-model="queryParams.productRecords"
clearable
@change="handleQuery"
/>
<dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" multiple v-model="queryParams.productRecords" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('外部仓')" prop="isExternalWarehouse" v-show="showSearch">
<el-select v-model="queryParams.isExternalWarehouse" :placeholder="$t('请选择')" clearable @change="handleQuery">
......@@ -160,61 +88,32 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('增值服务')" prop="types" v-show="showSearch">
<el-select v-model="queryParams.types" :placeholder="$t('请选择')" clearable multiple @change="handleQuery" >
<el-select v-model="queryParams.types" :placeholder="$t('请选择')" clearable multiple @change="handleQuery">
<el-option :label="$t('普通订单')" :value="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('商品类型')" prop="goodsTypes" v-show="showSearch">
<selector v-model="queryParams.goodsTypes" multiple :options="productAttrList" label-field="attrName" value-field="id">
</selector>
<selector v-model="queryParams.goodsTypes" multiple :options="productAttrList" label-field="attrName" value-field="id"> </selector>
</el-form-item>
<!--<el-form-item :label="$t('订单放货锁定收货人到期时间')" prop="lockConsigneeTime">
</el-form-item>-->
<el-form-item :label="$t('提货状态')" v-show="showSearch">
<dict-selector
:type="DICT_TYPE.PICK_STATE"
multiple
v-model="queryParams.pickStateList"
clearable
@change="handleQuery"
/>
<dict-selector :type="DICT_TYPE.PICK_STATE" multiple v-model="queryParams.pickStateList" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('放货率')" v-show="showSearch">
<el-input
type="number"
v-model.trim="releaseRatio.value"
:placeholder="$t('请输入数字')"
clearable
@keyup.enter.native="handleQuery"
>
<el-input type="number" v-model.trim="releaseRatio.value" :placeholder="$t('请输入数字')" clearable @keyup.enter.native="handleQuery">
<template slot="prepend">
<dict-selector
:type="DICT_TYPE.RELEASE_RATIO_FIELD"
defaultable
v-model="releaseRatio.key"
class="w-50"
/>
<dict-selector :type="DICT_TYPE.RELEASE_RATIO_FIELD" defaultable v-model="releaseRatio.key" class="w-50" />
</template>
</el-input>
</el-form-item>
<el-form-item :label="$t('提货率')" v-show="showSearch">
<el-input
type="number"
v-model.trim="pickRatio.value"
:placeholder="$t('请输入数字')"
clearable
@keyup.enter.native="handleQuery"
>
<el-input type="number" v-model.trim="pickRatio.value" :placeholder="$t('请输入数字')" clearable @keyup.enter.native="handleQuery">
<template slot="prepend">
<dict-selector
:type="DICT_TYPE.PICK_RATIO_FIELD"
defaultable
v-model="pickRatio.key"
class="w-50"
/>
<dict-selector :type="DICT_TYPE.PICK_RATIO_FIELD" defaultable v-model="pickRatio.key" class="w-50" />
</template>
</el-input>
</el-form-item>
......@@ -225,31 +124,22 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('特需')" prop="packageType" v-show="showSearch">
<el-select
v-model="queryParams.packageTypeArr"
multiple
:placeholder="$t('请选择')"
clearable
>
<el-select v-model="queryParams.packageTypeArr" multiple :placeholder="$t('请选择')" clearable>
<template v-for="item in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)">
<el-option
:label="$l(item, 'label')"
:value="item.value"
></el-option>
<el-option :label="$l(item, 'label')" :value="item.value"></el-option>
</template>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
:loading="exportLoading" v-hasPermi="['ecw:cargo:export:search']">{{$t('导出')}}</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['ecw:cargo:export:search']">{{ $t("导出") }}</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="2">
<el-button v-hasPermi="['ecw:cargo_control:batch_review']" type="primary" plain icon="el-icon-setting" size="mini" :disabled="multiple" @click="batchReview">{{$t('批量复核')}}</el-button>
<el-button v-hasPermi="['ecw:cargo_control:batch_review']" type="primary" plain icon="el-icon-setting" size="mini" :disabled="multiple" @click="batchReview">{{ $t("批量复核") }}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -258,38 +148,38 @@
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('订单编号')" width="120px" align="center" prop="orderNo" >
<el-table-column :label="$t('订单编号')" width="120px" align="center" prop="orderNo">
<template slot-scope="scope">
<router-link :to="`detail?orderId=` + scope.row.orderId">{{ scope.row.orderNo }}</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('箱数')" align="center" prop="sumNum" >
<template v-slot="{row}">
{{row.sumNum > 0 ? row.sumNum : row.totalNum}}
<el-table-column :label="$t('箱数')" align="center" prop="sumNum">
<template v-slot="{ row }">
{{ row.sumNum > 0 ? row.sumNum : row.totalNum }}
</template>
</el-table-column>
<el-table-column :label="$t('已放箱数')" align="center" prop="sumWeight">
<template slot-scope="{row}">{{row.releaseNum}}</template>
<template slot-scope="{ row }">{{ row.releaseNum }}</template>
</el-table-column>
<el-table-column :label="$t('订单状态')" align="left" prop="status">
<template slot-scope="{row}">
{{row.statusMsg}}
<template slot-scope="{ row }">
{{ row.statusMsg }}
</template>
</el-table-column>
<el-table-column :label="$t('已卸柜/已到仓时间')" align="left" prop="status">
<template slot-scope="{row}">
{{row.unloadTime}}
<template slot-scope="{ row }">
{{ row.unloadTime }}
</template>
</el-table-column>
<el-table-column :label="$t('放货锁定收货人到期时间')" align="left" prop="status">
<template slot-scope="{row}">
{{row.lockConsigneeTime}}
<template slot-scope="{ row }">
{{ row.lockConsigneeTime }}
</template>
</el-table-column>
<el-table-column :label="$t('订单限制修改收货人')" align="left" prop="status">
<template slot-scope="{row}">
{{row.isLimitUpdateConsignee ? $t('') : $t('')}}
<template slot-scope="{ row }">
{{ row.isLimitUpdateConsignee ? $t("") : $t("") }}
</template>
</el-table-column>
<!--<el-table-column :label="$t('提单号')" align="center" prop="status">
......@@ -298,11 +188,11 @@
</template>
</el-table-column>-->
<el-table-column :label="$t('放货人')" align="center" prop="sumWeight">
<template slot-scope="{row}">{{row.cargoControlName}}</template>
<template slot-scope="{ row }">{{ row.cargoControlName }}</template>
</el-table-column>
<el-table-column :label="$t('控货状态')" align="center" prop="transportId">
<template slot-scope="{row}">
<template v-if="row.cargoControlStatus == 1 && row.isToReview">{{$t('放货中')}}</template>
<template slot-scope="{ row }">
<template v-if="row.cargoControlStatus == 1 && row.isToReview">{{ $t("放货中") }}</template>
<dict-tag v-else :type="DICT_TYPE.CONTROL_GOODS_STATUS" :value="row.cargoControlStatus" />
</template>
</el-table-column>
......@@ -314,100 +204,89 @@
https://czxy.cpolar.cn/task-view-266.html
-->
<!--修改放货限制-->
<el-button
type="text"
size="mini"
@click="showUpdateReleaseLimit=scope.row"
v-hasPermi="['ecw:cargo_control:updateReleaseLimit']"
:disabled="scope.row.cargoControlStatus == 1 && !scope.row.isToReview"
>{{$t('修改放货限制')}}</el-button>
<el-button type="text" size="mini" @click="showUpdateReleaseLimit = scope.row" v-hasPermi="['ecw:cargo_control:updateReleaseLimit']" :disabled="scope.row.cargoControlStatus == 1 && !scope.row.isToReview">{{ $t("修改放货限制") }}</el-button>
<!--控货中,已入仓-->
<template v-if="[0,2].indexOf(scope.row.cargoControlStatus) > -1 && scope.row.sumNum > 0">
<template v-if="[0, 2].indexOf(scope.row.cargoControlStatus) > -1 && scope.row.sumNum > 0">
<!--
2408新需求,如果有修改放货限制审批 和 海外仓修改申请在途则置灰
https://czxy.cpolar.cn/task-view-266.html
-->
<el-button
type="text"
size="mini"
@click="showReleaseOrderId=scope.row.orderId"
v-hasPermi="['ecw:cargo_control:release']"
:disabled="scope.row.auditType == 61 || scope.row.auditType == 62"
>{{$t('放货')}}</el-button>
<el-button type="text" size="mini" @click="showTransferOrder = scope.row" v-hasPermi="['ecw:cargo_control:transfer']">{{$t('控货权转移')}}</el-button>
<el-button type="text" size="mini" @click="showReleaseOrderId = scope.row.orderId" v-hasPermi="['ecw:cargo_control:release']" :disabled="scope.row.auditType == 61 || scope.row.auditType == 62">{{ $t("放货") }}</el-button>
<el-button type="text" size="mini" @click="showTransferOrder = scope.row" v-hasPermi="['ecw:cargo_control:transfer']">{{ $t("控货权转移") }}</el-button>
</template>
<!--部分控货-->
<template v-if="scope.row.cargoControlStatus == 2">
<el-button type="text" size="mini" @click="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:update']">{{$t('修改')}}</el-button>
<el-button type="text" size="mini" @click="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:cancel']">{{$t('取消')}}</el-button>
<el-button type="text" size="mini" @click="review(scope.row)" v-if="scope.row.isToReview" v-hasPermi="['ecw:cargo_control:review']">{{$t('放货复核')}}</el-button>
<el-button type="text" size="mini" @click="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:update']">{{ $t("修改") }}</el-button>
<el-button type="text" size="mini" @click="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:cancel']">{{ $t("取消") }}</el-button>
<el-button type="text" size="mini" @click="review(scope.row)" v-if="scope.row.isToReview" v-hasPermi="['ecw:cargo_control:review']">{{ $t("放货复核") }}</el-button>
</template>
<!--已全部放货,但是未复核-->
<template v-if="scope.row.cargoControlStatus == 1 && scope.row.isToReview">
<el-button type="text" size="mini" @click="review(scope.row)" v-hasPermi="['ecw:cargo_control:review']">{{$t('放货复核')}}</el-button>
<el-button type="text" size="mini" @click="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:update']">{{$t('修改')}}</el-button>
<el-button type="text" size="mini" @click="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:cancel']">{{$t('取消')}}</el-button>
<el-button type="text" size="mini" @click="review(scope.row)" v-hasPermi="['ecw:cargo_control:review']">{{ $t("放货复核") }}</el-button>
<el-button type="text" size="mini" @click="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:update']">{{ $t("修改") }}</el-button>
<el-button type="text" size="mini" @click="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:cancel']">{{ $t("取消") }}</el-button>
</template>
<!--已完成放货,且没有待复核;真正的放货完成-->
<template v-if="scope.row.cargoControlStatus == 1 && !scope.row.isToReview">
<!-- <el-button type="text" size="mini" @click="toDetail(scope.row)" >{{$t('查看')}}</el-button> -->
<el-button type="text" size="mini" @click="cargoTransfer(scope.row)" v-hasPermi="['ecw:cargo_control:cargo_transfer']">{{$t('调货')}}</el-button>
<el-button type="text" size="mini" @click="showFallbackOrder=scope.row" v-if="scope.row.isReleaseAfterGoods" v-hasPermi="['ecw:cargo_control:fallback']">{{$t('反复核')}}</el-button>
<el-button type="text" size="mini" @click="cargoTransfer(scope.row)" v-hasPermi="['ecw:cargo_control:cargo_transfer']">{{ $t("调货") }}</el-button>
<el-button type="text" size="mini" @click="showFallbackOrder = scope.row" v-if="scope.row.isReleaseAfterGoods" v-hasPermi="['ecw:cargo_control:fallback']">{{ $t("反复核") }}</el-button>
</template>
<el-button type="text" size="mini" @click="showLogOrderId=scope.row.orderId" v-hasPermi="['ecw:cargo_control:log']">{{$t('控货日志')}}</el-button>
<el-button type="text" size="mini" @click="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:show']">{{$t('查看')}}</el-button>
<el-button type="text" size="mini" @click="showLogOrderId = scope.row.orderId" v-hasPermi="['ecw:cargo_control:log']">{{ $t("控货日志") }}</el-button>
<el-button type="text" size="mini" @click="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:show']">{{ $t("查看") }}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList" />
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
<transfer v-if="showTransferOrder" v-bind="showTransferOrder" @close="showTransferOrder=null" />
<release v-if="showReleaseOrderId" :order-id="showReleaseOrderId" @close="showReleaseOrderId=null" @success="onReleaseSuccess" />
<transfer-cargo v-if="showTransferCargoOrderId" :order-id="showTransferCargoOrderId" @close="showTransferCargoOrderId=null" @success="onTransferCargoSuccess" :cargoControlPickId="pickInfo ? pickInfo.id : 0" />
<fallback v-if="showFallbackOrder !== null" :order="showFallbackOrder" @close="showFallbackOrder=null" @success="onFallbackSuccess" :index="null" />
<transfer v-if="showTransferOrder" v-bind="showTransferOrder" @close="showTransferOrder = null" />
<release v-if="showReleaseOrderId" :order-id="showReleaseOrderId" @close="showReleaseOrderId = null" @success="onReleaseSuccess" />
<transfer-cargo v-if="showTransferCargoOrderId" :order-id="showTransferCargoOrderId" @close="showTransferCargoOrderId = null" @success="onTransferCargoSuccess" :cargoControlPickId="pickInfo ? pickInfo.id : 0" />
<fallback v-if="showFallbackOrder !== null" :order="showFallbackOrder" @close="showFallbackOrder = null" @success="onFallbackSuccess" :index="null" />
<!--控货日志-->
<cargo-log-list v-if="showLogOrderId" :order-id="showLogOrderId" @close="showLogOrderId=null" />
<cargo-log-list v-if="showLogOrderId" :order-id="showLogOrderId" @close="showLogOrderId = null" />
<!--修改放货限制-->
<update-release-limit
v-if="showUpdateReleaseLimit"
:order="showUpdateReleaseLimit"
@close="showUpdateReleaseLimit=null"
@success="onUpdateReleaseLimitSuccess"
/>
<update-release-limit v-if="showUpdateReleaseLimit" :order="showUpdateReleaseLimit" @close="showUpdateReleaseLimit = null" @success="onUpdateReleaseLimitSuccess" />
</div>
</template>
<script>
import Selector from '@/components/Selector'
import ProductSelector from '@/components/ProductSelector'
import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector'
import UpdateReleaseLimit from '@/views/ecw/order/components/updateReleaseLimit.vue'
import Selector from "@/components/Selector"
import ProductSelector from "@/components/ProductSelector"
import { getProductAttrList } from "@/api/ecw/productAttr"
import CustomerSelector from "@/components/CustomerSelector"
import UpdateReleaseLimit from "@/views/ecw/order/components/updateReleaseLimit.vue"
/* import { getTradeCityList } from '@/api/ecw/region' */
import Transfer from '@/views/ecw/order/components/Transfer'
import Release from './components/Release'
import CargoControlEdit from './components/CargoControlEdit'
import Transfer from "@/views/ecw/order/components/Transfer"
import Release from "./components/Release"
import CargoControlEdit from "./components/CargoControlEdit"
import { getCargoControlOrderPage, batchReview, orderReview, getPickRleaseInfo, exportCargoControl } from "@/api/ecw/orderCargoControl"
import TransferCargo from '@/views/ecw/order/components/TransferCargo'
import Fallback from './components/Fallback'
import {getWarehouseList} from '@/api/ecw/warehouse'
import CargoLogList from "@/views/ecw/order/components/CargoLogList.vue";
import {getRegionList} from "@/api/ecw/order"
import UserSelector from "@/components/UserSelector";
import {getChannelList} from "@/api/ecw/channel";
import TransferCargo from "@/views/ecw/order/components/TransferCargo"
import Fallback from "./components/Fallback"
import { getWarehouseList } from "@/api/ecw/warehouse"
import CargoLogList from "@/views/ecw/order/components/CargoLogList.vue"
import { getRegionList } from "@/api/ecw/order"
import UserSelector from "@/components/UserSelector"
import { getChannelList } from "@/api/ecw/channel"
export default {
name: "EcwOrderCargocontrol",
components: {
UpdateReleaseLimit,
CargoLogList,
UserSelector,
CustomerSelector, ProductSelector, Selector, Transfer, Release,CargoControlEdit, TransferCargo, Fallback
CustomerSelector,
ProductSelector,
Selector,
Transfer,
Release,
CargoControlEdit,
TransferCargo,
Fallback
},
data() {
return {
......@@ -437,9 +316,9 @@ export default {
tradeCityList: [],
warehouseList: [],
productAttrList: [], // 商品属性
molecule: '', //重货比分子
denominator: '', //重货比分母
dateFilterType: '', //日期筛选类别
molecule: "", //重货比分子
denominator: "", //重货比分母
dateFilterType: "", //日期筛选类别
dateFilter: [], //筛选日期
showTransferOrder: null, // 控制权转移操作订单
showReleaseOrderId: null, // 放货ID
......@@ -451,17 +330,17 @@ export default {
// 编号搜索条件
noParam: {
key: "numberKey",
value: "",
value: ""
},
// 商品搜索条件
prodParam: {
key: "prodKey",
value: "",
value: ""
},
// 放货率
releaseRatio:{
key: 'geReleaseRatio',
value: ''
releaseRatio: {
key: "geReleaseRatio",
value: ""
},
channelList: [],
AddressProvince: [],
......@@ -472,57 +351,57 @@ export default {
destWarehouseId: null,
pickRatio: {
key: "gePickRatio",
value: "",
value: ""
}
}
};
},
computed: {
expoerCityList() {
return this.tradeCityList.filter(item => item.type == 2)
return this.tradeCityList.filter((item) => item.type == 2)
},
importCityList() {
return this.tradeCityList.filter(item => item.type == 1)
return this.tradeCityList.filter((item) => item.type == 1)
},
exportWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
exportWarehouseList() {
return this.warehouseList.filter((item) => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
importWarehouseList() {
return this.warehouseList.filter((item) => item.tradeType == 1 || item.tradeType == 3)
},
combinedQueryParams(){
combinedQueryParams() {
let timeParams = {}
if(this.dateFilterType && this.dateFilter){
timeParams['begin' + this.dateFilterType] = this.dateFilter[0]
timeParams['end' + this.dateFilterType] = this.dateFilter[1]
if (this.dateFilterType && this.dateFilter) {
timeParams["begin" + this.dateFilterType] = this.dateFilter[0]
timeParams["end" + this.dateFilterType] = this.dateFilter[1]
}
let queryParams = {...this.queryParams}
let queryParams = { ...this.queryParams }
if (this.noParam.value) {
queryParams[this.noParam.key] = this.noParam.value;
queryParams[this.noParam.key] = this.noParam.value
}
//目的国
if (this.destCountryId != null && this.destCountryId != "") {
queryParams.destCountryIds = this.destCountryId;
queryParams.destCountryIds = this.destCountryId
}
//目的城市
if (this.objectiveId != null && this.objectiveId != "") {
queryParams.objectiveIds = this.objectiveId;
queryParams.objectiveIds = this.objectiveId
}
//目的仓
if (this.destWarehouseId != null && this.destWarehouseId != "") {
queryParams.destWarehouseIds = this.destWarehouseId;
queryParams.destWarehouseIds = this.destWarehouseId
}
// 提货率
if (this.pickRatio.value) {
queryParams[this.pickRatio.key] = this.pickRatio.value
}
// 放货率
if(this.releaseRatio.value){
if (this.releaseRatio.value) {
queryParams[this.releaseRatio.key] = this.releaseRatio.value
}
if(this.prodParam.value){
if (this.prodParam.value) {
queryParams[this.prodParam.key] = this.prodParam.value
}
if(queryParams.statusList?.length){
if (queryParams.statusList?.length) {
queryParams.statusString = queryParams.statusList.join(",")
delete queryParams.statusList
}
......@@ -535,82 +414,58 @@ export default {
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = [];
this.AddressTown = [];
this.objectiveId = "";
this.destWarehouseId = "";
this.findByprovinceCode();
this.AddressCity = []
this.AddressTown = []
this.objectiveId = ""
this.destWarehouseId = ""
this.findByprovinceCode()
if (this.destCountryId == "") {
this.getAddressCity()
this.getAddressTown()
} else if (
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.getAddressTown()
}
},
}
},
objectiveId: {
deep: true, //深度监听
handler() {
this.AddressTown = [];
this.destWarehouseId = "";
this.findBycityCode();
this.AddressTown = []
this.destWarehouseId = ""
this.findBycityCode()
if (
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
//获取当前城市值id,获取该城市下区域
} else if (
this.destCountryId == "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
} else if (this.destCountryId == "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.getAddressTown()
} else if (
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.findByprovinceCode();
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.findByprovinceCode()
this.getAddressTown()
}
},
}
},
destWarehouseId: {
deep: true, //深度监听
handler() {
if (
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
//获取当前城市值id,获取该城市下区域
this.findBycityCode();
} else if (
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.findBycityCode()
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.getAddressTown()
}
}
}
},
},
},
activated(){
activated() {
// 要求保留页码 https://zentao.test.jdshangmen.com/bug-view-3079.html
this.getList()
},
created() {
this.getList();
getProductAttrList().then(res => this.productAttrList = res.data)
this.getList()
getProductAttrList().then((res) => (this.productAttrList = res.data))
// getTradeCityList().then(res => this.tradeCityList = res.data)
getWarehouseList().then(res => this.warehouseList = res.data)
getChannelList().then(res => this.channelList = res.data)
getWarehouseList().then((res) => (this.warehouseList = res.data))
getChannelList().then((res) => (this.channelList = res.data))
this.getAddressProvince()
this.getAddressCity()
this.getAddressTown()
......@@ -618,102 +473,108 @@ export default {
methods: {
/** 查询列表 */
getList() {
this.loading = true;
this.loading = true
// 执行查询
getCargoControlOrderPage(this.combinedQueryParams).then(response => {
getCargoControlOrderPage(this.combinedQueryParams).then((response) => {
this.list = []
// 直接更细数据,可能因为elTable的部分渲染产生bug,比如权限控制异常
this.$nextTick( () => {
this.list = response.data.list;
this.total = response.data.total;
this.$nextTick(() => {
this.list = response.data.list
this.total = response.data.total
})
this.loading = false;
});
this.loading = false
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.queryParams.page = 1
this.$nextTick(this.getList)
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.prodParam.value = ''
this.releaseRatio.value = ''
this.pickRatio.value = ''
this.handleQuery();
this.resetForm("queryForm")
this.prodParam.value = ""
this.releaseRatio.value = ""
this.pickRatio.value = ""
this.handleQuery()
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
// 执行导出
this.$modal.confirm('是否确认导出所有订单数据项?').then(() => {
this.exportLoading = true;
return exportCargoControl(this.combinedQueryParams);
}).then(response => {
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
this.exportLoading = false;
}).catch(() => { });
this.$modal
.confirm("是否确认导出所有订单数据项?")
.then(() => {
this.exportLoading = true
return exportCargoControl(this.combinedQueryParams)
})
.then((response) => {
this.$message.success(this.$t("已加入导出队列,请稍后在下载日志中下载"))
this.exportLoading = false
})
.catch(() => {})
},
// 表格多选
handleSelectionChange(selection) {
this.ids = selection.map(item => item.orderId)
this.ids = selection.map((item) => item.orderId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
toDetail(row){
this.$router.push('cargo_control/detail?id=' + row.orderId)
toDetail(row) {
this.$router.push("cargo_control/detail?id=" + row.orderId)
},
// 复核
review(row){
review(row) {
// 未放货完成则打开详情,已完成放货则弹窗
if(row.releaseNum < row.sumNum){
if (row.releaseNum < row.sumNum) {
return this.toDetail(row)
}
this.$confirm('已核实放货信息,确认放货?')
.then(res => {
this.$confirm("已核实放货信息,确认放货?")
.then((res) => {
return orderReview(row.orderId)
})
.then(res => {
this.$message.success('操作成功')
.then((res) => {
this.$message.success("操作成功")
this.getList()
})
},
// 批量复核
batchReview(){
this.$confirm(this.$t('确定复核选中的订单么?')).then(() => {
return batchReview("orderIds=" + this.ids.join(','))
}).then(() => {
this.$message.success(this.$t('操作成功'))
batchReview() {
this.$confirm(this.$t("确定复核选中的订单么?"))
.then(() => {
return batchReview("orderIds=" + this.ids.join(","))
})
.then(() => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
},
cargoTransfer(row){
getPickRleaseInfo(row.orderId).then(res => {
if(res.data.cargoControlPickBackVOList && res.data.cargoControlPickBackVOList.length > 1){
cargoTransfer(row) {
getPickRleaseInfo(row.orderId).then((res) => {
if (res.data.cargoControlPickBackVOList && res.data.cargoControlPickBackVOList.length > 1) {
this.toDetail(row)
}
this.pickInfo = res.data.cargoControlPickBackVOList[0]
this.showTransferCargoOrderId=row.orderId
this.showTransferCargoOrderId = row.orderId
})
},
onReleaseSuccess(){
onReleaseSuccess() {
this.showReleaseOrderId = null
this.getList()
},
onFallbackSuccess(){
onFallbackSuccess() {
this.showFallbackOrder = null
this.getList()
},
onTransferCargoSuccess(){
onTransferCargoSuccess() {
this.showTransferCargoOrderId = null
this.getList()
},
// 修改放货审批限制成功
onUpdateReleaseLimitSuccess(){
onUpdateReleaseLimitSuccess() {
this.showUpdateReleaseLimit = null
this.getList()
},
......@@ -722,39 +583,39 @@ export default {
this.countryList = response.data;
})*/
getRegionList(1, 1).then(({ data }) => {
this.AddressProvince = data;
this.AddressProvince = data
})
},
getAddressCity() {
getRegionList(4, 4).then(({ data }) => {
this.AddressCity = data;
this.AddressCity = data
})
},
getAddressTown() {
getRegionList(5, 5).then(({ data }) => {
this.AddressTown = data;
this.AddressTown = data
})
},
findByprovinceCode() {
if (this.destCountryId != null && this.destCountryId != '') {
if (this.destCountryId != null && this.destCountryId != "") {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId).then(({ data }) => {
this.AddressCity = data;
this.AddressCity = data
})
}
},
findBycityCode() {
if (this.objectiveId != null && this.objectiveId != '') {
if (this.objectiveId != null && this.objectiveId != "") {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId).then(({ data }) => {
this.AddressTown = data;
this.AddressTown = data
})
}
},
// 自动去除空格
replaceSpace(obj, field){
obj[field] = obj[field].replace(/\s+/g, '');
replaceSpace(obj, field) {
obj[field] = obj[field].replace(/\s+/g, "")
}
}
};
}
</script>
<template>
<div class="app-container" v-if="detail">
<div class="page-title">{{$t('控货订单')}}</div>
<el-form ref="elForm" :model="formData" :rules="rules" size="small" label-width="100px" >
<div class="page-title">{{ $t("控货订单") }}</div>
<el-form ref="elForm" :model="formData" :rules="rules" size="small" label-width="100px">
<el-row>
<el-col :span="6">
<el-form-item :label="$t('订单号')">
{{detail.orderNo}}
{{ detail.orderNo }}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('总控货数')">
{{detail.sumNum}}
{{ detail.sumNum }}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('体积')">
{{detail.sumVolume}}
</el-form-item>
<el-form-item :label="$t('体积')"> {{ detail.sumVolume }}</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('重量')">
{{detail.sumWeight}} kg
</el-form-item>
<el-form-item :label="$t('重量')"> {{ detail.sumWeight }} kg </el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('可放货箱数')">
{{detail.sumNum - detail.releaseNum}}
{{ detail.sumNum - detail.releaseNum }}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('已放货箱数')">
{{detail.releaseNum}}
{{ detail.releaseNum }}
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="page-title">{{$t('放货详情')}}</div>
<div class="page-title">{{ $t("放货详情") }}</div>
<el-table :data="detail.cargoControlPickBackVOList || []" border>
<el-table-column :label="$t('序号')" width="50px">
<template slot-scope="scope">{{scope.$index + 1}}</template>
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column :label="$t('收货人')" prop="consigneeName" />
<el-table-column :label="$t('收货人电话')" prop="consigneePhone">
<template slot-scope="{row}">
+{{row.consigneeCountryCode}} {{row.consigneePhone}}
</template>
<template slot-scope="{ row }"> +{{ row.consigneeCountryCode }} {{ row.consigneePhone }} </template>
</el-table-column>
<el-table-column :label="$t('控货箱数')" prop="controlNum"></el-table-column>
<el-table-column :label="$t('放货箱数')" prop="pickNum"></el-table-column>
......@@ -54,30 +48,30 @@
<el-table-column :label="$t('备注')" prop="remarks"></el-table-column>
<el-table-column :label="$t('操作人')" prop="operator"></el-table-column>
<el-table-column :label="$t('放货日期')" prop="createTime">
<template slot-scope="{row}">
{{row.createTime|parseTime}}
<template slot-scope="{ row }">
{{ row.createTime | parseTime }}
</template>
</el-table-column>
<el-table-column :label="$t('复核日期')" prop="createTime">
<template slot-scope="{row}">
{{row.checkTime|parseTime}}
<template slot-scope="{ row }">
{{ row.checkTime | parseTime }}
</template>
</el-table-column>
<el-table-column :label="$t('状态')" prop="status">
<template slot-scope="{row}">
<template slot-scope="{ row }">
<dict-tag :type="DICT_TYPE.ECW_RELEASE_STATUS" :value="row.status" />
</template>
</el-table-column>
<el-table-column :label="$t('操作')" width="300px">
<template slot-scope="scope">
<el-button v-if="scope.row.status == 1" type="primary" size="mini" @click="editIndex=scope.$index">{{$t('修改')}}</el-button>
<el-button v-if="scope.row.status == 1" type="danger" size="mini" @click="cancelCargoPickId = scope.row.id">{{$t('取消')}}</el-button>
<el-button v-if="scope.row.status == 1" type="success" size="mini" @click="review(scope.row.id)">{{$t('放货复核')}}</el-button>
<el-button v-if="scope.row.status == 3" type="danger" size="mini" @click="fallbackIndex=scope.$index">{{$t('反复核')}}</el-button>
<el-button v-if="scope.row.status == 3" type="success" size="mini" @click="cargoControlPickId=scope.row.id">{{$t('调货')}}</el-button>
<el-button v-if="scope.row.status == 1" type="primary" size="mini" @click="editIndex = scope.$index">{{ $t("修改") }}</el-button>
<el-button v-if="scope.row.status == 1" type="danger" size="mini" @click="cancelCargoPickId = scope.row.id">{{ $t("取消") }}</el-button>
<el-button v-if="scope.row.status == 1" type="success" size="mini" @click="review(scope.row.id)">{{ $t("放货复核") }}</el-button>
<el-button v-if="scope.row.status == 3" type="danger" size="mini" @click="fallbackIndex = scope.$index">{{ $t("反复核") }}</el-button>
<el-button v-if="scope.row.status == 3" type="success" size="mini" @click="cargoControlPickId = scope.row.id">{{ $t("调货") }}</el-button>
<el-button v-if="[2,4, 5, 6].indexOf(scope.row.status) > -1" type="primary" size="mini" @click="showApprovalDetail(scope.row.formId)">{{$t('审核详情')}}</el-button>
<el-button v-if="[2,4, 5, 6].indexOf(scope.row.status) > -1" type="danger" size="mini" @click="cancelApproval(scope.row.id)">{{$t('取消审核')}}</el-button>
<el-button v-if="[2, 4, 5, 6].indexOf(scope.row.status) > -1" type="primary" size="mini" @click="showApprovalDetail(scope.row.formId)">{{ $t("审核详情") }}</el-button>
<el-button v-if="[2, 4, 5, 6].indexOf(scope.row.status) > -1" type="danger" size="mini" @click="cancelApproval(scope.row.id)">{{ $t("取消审核") }}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -112,117 +106,106 @@
<el-input v-model="formData.field110" :placeholder="$t('请输入收货人邮箱')" clearable></el-input>
</el-table-column>
</el-table> -->
<fallback v-if="fallbackIndex !== null" :order="detail" :index="fallbackIndex" @close="fallbackIndex=null" @success="onFallbackSuccess" />
<edit v-if="editIndex !== null" @close="editIndex=null" :order="detail" :index="editIndex" @success="onEditSuccess" />
<transfer-cargo
v-if="cargoControlPickId !== null"
:order-id="detail.orderId"
:cargo-control-pick-id="cargoControlPickId"
@close="cargoControlPickId=null"
@success="onTransferCargoSuccess" />
<cancel-cargo v-if="!!cancelCargoPickId"
:order="detail"
:cargo-control-pick-id="cancelCargoPickId"
@close="cancelCargoPickId=null"
@success="onCancelCargoSuccess" />
<fallback v-if="fallbackIndex !== null" :order="detail" :index="fallbackIndex" @close="fallbackIndex = null" @success="onFallbackSuccess" />
<edit v-if="editIndex !== null" @close="editIndex = null" :order="detail" :index="editIndex" @success="onEditSuccess" />
<transfer-cargo v-if="cargoControlPickId !== null" :order-id="detail.orderId" :cargo-control-pick-id="cargoControlPickId" @close="cargoControlPickId = null" @success="onTransferCargoSuccess" />
<cancel-cargo v-if="!!cancelCargoPickId" :order="detail" :cargo-control-pick-id="cancelCargoPickId" @close="cancelCargoPickId = null" @success="onCancelCargoSuccess" />
</div>
</template>
<script>
import edit from './components/CargoControlEdit.vue'
import {createPick, getPickRleaseInfo, review, cancel, cancelApproval} from '@/api/ecw/orderCargoControl'
import {parseTime} from '@/utils/ruoyi'
import Fallback from './components/Fallback'
import TransferCargo from '@/views/ecw/order/components/TransferCargo'
import CancelCargo from './components/CancelCargo.vue'
import edit from "./components/CargoControlEdit.vue"
import { createPick, getPickRleaseInfo, review, cancel, cancelApproval } from "@/api/ecw/orderCargoControl"
import { parseTime } from "@/utils/ruoyi"
import Fallback from "./components/Fallback"
import TransferCargo from "@/views/ecw/order/components/TransferCargo"
import CancelCargo from "./components/CancelCargo.vue"
export default {
filters: {parseTime},
components: {edit, Fallback, TransferCargo, CancelCargo, CancelCargo},
data(){
filters: { parseTime },
components: { edit, Fallback, TransferCargo, CancelCargo, CancelCargo },
data() {
return {
detail: null,
formData:{},
formData: {},
rules: {},
editIndex: null, // 修改索引
fallbackIndex: null, // 反复核索引
cargoControlPickId: null, // 调货ID
cancelCargoPickId: null, // 取消返货ID
cancelCargoPickId: null // 取消返货ID
}
},
created(){
created() {
this.loadData()
},
methods:{
loadData(){
console.log('loadData')
getPickRleaseInfo(this.$route.query.id).then(res => this.detail = res.data)
methods: {
loadData() {
console.log("loadData")
getPickRleaseInfo(this.$route.query.id).then((res) => (this.detail = res.data))
},
review(id){
this.$confirm(this.$t('已核实放货信息,确认放货?'))
.then(res => {
review(id) {
this.$confirm(this.$t("已核实放货信息,确认放货?"))
.then((res) => {
return review(id)
})
.then(res => {
this.$message.success(this.$t('操作成功'))
.then((res) => {
this.$message.success(this.$t("操作成功"))
this.loadData()
})
},
unReview(){
},
cancel(id){
this.$confirm(this.$t('确定取消这条放货么?'))
.then(res => {
unReview() {},
cancel(id) {
this.$confirm(this.$t("确定取消这条放货么?"))
.then((res) => {
return cancel(id)
})
.then(res => {
this.$message.success(this.$t('操作成功'))
.then((res) => {
this.$message.success(this.$t("操作成功"))
this.loadData()
})
},
onEditSuccess(){
console.log('onEditSuccess')
onEditSuccess() {
console.log("onEditSuccess")
this.loadData()
this.editIndex = null
},
onFallbackSuccess(){
onFallbackSuccess() {
this.fallbackIndex = null
this.loadData()
},
// 查看审核详情
showApprovalDetail(formId){
this.$router.push('/bpm/process-instance/detail?id=' + formId)
showApprovalDetail(formId) {
this.$router.push("/bpm/process-instance/detail?id=" + formId)
},
// 取消审核
cancelApproval(id){
this.$confirm(this.$t('确定取消此申请么?'))
.then(res => {
cancelApproval(id) {
this.$confirm(this.$t("确定取消此申请么?"))
.then((res) => {
let approvalId = this.getApproval(id)
return cancelApproval(approvalId, {reason: this.$t('')})
return cancelApproval(approvalId, { reason: this.$t("") })
})
.then(res => {
this.$message.success(this.$t('操作成功'))
.then((res) => {
this.$message.success(this.$t("操作成功"))
this.loadData()
})
},
// 根据id查找审核id
getApproval(id, field = 'orderApprovalId'){
if(!this.detail.orderApprovalBackVOList || !this.detail.orderApprovalBackVOList.length){
this.$message.error(this.$t('未找到审批ID'))
Promise.reject(this.$t('未找到审批ID'))
getApproval(id, field = "orderApprovalId") {
if (!this.detail.orderApprovalBackVOList || !this.detail.orderApprovalBackVOList.length) {
this.$message.error(this.$t("未找到审批ID"))
Promise.reject(this.$t("未找到审批ID"))
}
let item = this.detail.orderApprovalBackVOList.find(item => {
let item = this.detail.orderApprovalBackVOList.find((item) => {
let details = JSON.parse(item.details)
return details.cargoControlPickId == id && details.applyStatus == 1
})
console.log({item})
console.log({ item })
return item[field]
},
onTransferCargoSuccess(){
onTransferCargoSuccess() {
this.cargoControlPickId = null
this.loadData()
},
onCancelCargoSuccess(){
onCancelCargoSuccess() {
this.cancelCargoPickId = null
this.loadData()
}
......
<template>
<el-dialog :visible="show" @close="handleClose" :title="$t('海外仓模式修改')" width="1000px">
<el-form label-position="left" label-width="150px" :model="form" :disabled="applyStatus === 1">
<el-row :gutter="20">
<!-- 订单号 -->
<el-col :span="8">
<el-form-item :label="$t('订单号')">
<span>{{ order.orderNo }}</span>
</el-form-item>
</el-col>
<!-- 总箱数 -->
<el-col :span="8">
<el-form-item :label="$t('总箱数')">
<span>{{ order.sumNum }}</span>
</el-form-item>
</el-col>
<!-- 体积 -->
<el-col :span="8">
<el-form-item :label="$t('体积')">
<span>{{ order.sumVolume }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<!-- 重量 -->
<el-col :span="8">
<el-form-item :label="$t('重量')">
<span>{{ order.sumWeight }}Kg</span>
</el-form-item>
</el-col>
<!-- 总控箱数 -->
<el-col :span="8">
<el-form-item :label="$t('总控货箱数')">
<span>{{ order.sumNum }}</span>
</el-form-item>
</el-col>
<!-- 剩余放货箱数 -->
<el-col :span="8">
<el-form-item :label="$t('剩余放货箱数')">
<span>{{ order.sumNum - order.releaseNum }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<!-- 邮库/到仓时间 -->
<el-col :span="8">
<el-form-item :label="$t('卸柜/到仓时间')">
<span>{{ order.unloadTime }}</span>
</el-form-item>
</el-col>
<!-- 订单限制修改收货人 -->
<el-col :span="8">
<el-form-item :label="$t('订单限制修改收货人')">
<span>{{ order.isLimitUpdateConsignee ? $t("") : $t("") }}</span>
</el-form-item>
</el-col>
<!-- 订单锁定收货人天数 -->
<el-col :span="8" v-if="order.isLimitUpdateConsignee">
<el-form-item :label="$t('订单锁定收货人天数')">
<span>{{ order.lockConsigneeDay }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" v-if="order.isLimitUpdateConsignee">
<!-- 放货锁定收货人到期时间 -->
<el-col :span="12">
<el-form-item :label="$t('放货锁定收货人到期时间')" label-width="180px">
<span>{{ order.lockConsigneeTime }}</span>
</el-form-item>
</el-col>
</el-row>
<el-divider>{{ $t("修改信息") }}</el-divider>
<el-row :gutter="20">
<!-- 订单限制修改收货人 -->
<el-col :span="8">
<el-form-item :label="$t('订单限制修改收货人')">
<el-radio-group v-model="form.newIsLimitUpdateConsignee">
<el-radio :label="true">{{ $t("") }}</el-radio>
<el-radio :label="false">{{ $t("") }}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<!-- 订单锁定收货人天数 -->
<el-col :span="8">
<el-form-item :label="$t('订单锁定收货人天数')" required>
<el-input-number :min="0" v-model="form.newLockConsigneeDay" :disabled="!form.newIsLimitUpdateConsignee"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<!-- 放货锁定收货人到期时间 -->
<el-col :span="12">
<el-form-item :label="$t('放货锁定收货人到期时间')" label-width="180px">
<span>{{ newLockConsigneeTime }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<!-- 修改原因 -->
<el-col :span="24">
<el-form-item :label="$t('修改原因')">
<el-input type="textarea" v-model="form.reasonZh"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<!-- 附件 -->
<el-col :span="24">
<el-form-item :label="$t('附件')">
<file-upload v-model="form.annex" :fileType="fileType"></file-upload>
</el-form-item>
</el-col>
</el-row>
<el-row>
<work-flow xmlkey="order_consignee_limit_change" v-model="form.ccIds"></work-flow>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose">{{ $t("取消") }}</el-button>
<el-button v-if="applyStatus === 1" type="primary" @click="handleGoBpm">{{ $t("审批中") }}</el-button>
<el-button v-else type="primary" @click="handleSubmit">{{ $t("确定") }}</el-button>
</span>
</el-dialog>
</template>
<script>
import WorkFlow from "@/components/WorkFlow/index.vue"
import FileUpload from "@/components/FileUpload/index.vue"
import { applyCargoControlApproval, getLimitUpdateInfo } from "@/api/ecw/orderCargoControl"
import dayjs from "dayjs"
import { getApproval } from "@/api/ecw/order"
export default {
components: {
FileUpload,
WorkFlow
},
props: {
order: Object
},
data() {
return {
// 是否显示弹窗
show: true,
fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "pdf", "jpg", "jpeg", "png", "mp4", "mov", "avi", "mp3"],
applyStatus: 0, // 审批状态: 1 处理中 2 通过 3 不通过 4 已取消
bpmId: null, // 审批流程ID
form: {
// 申请类型:此处应该是 61 放货限制修改申请 62 海外仓修改申请
applyType: 61,
// 新的是否限制修改收货人
newIsLimitUpdateConsignee: false,
// 新的放货锁定收货人天数
newLockConsigneeDay: "",
// 修改原因
reasonZh: "",
// 附件
annex: "",
ccIds: []
},
// 审批信息
approvalDetail: null
}
},
computed: {
// 当订单已卸柜/到仓,则时间为卸柜/到仓时间 + 锁定收货人天数,否则为空
newLockConsigneeTime() {
if (!this.order.unloadTime || !this.form.newIsLimitUpdateConsignee || !this.form.newLockConsigneeDay) {
return "-"
}
return dayjs(this.order.unloadTime).add(this.form.newLockConsigneeDay, "day").format("YYYY-MM-DD HH:mm:ss")
}
},
watch: {
// 不限制则天数清空
"form.newIsLimitUpdateConsignee"(val) {
if (!val) {
this.form.newLockConsigneeDay = ""
}
}
},
mounted() {
this.form.newIsLimitUpdateConsignee = !!this.order.isLimitUpdateConsignee
if (this.form.newIsLimitUpdateConsignee) {
this.form.newLockConsigneeDay = this.order.lockConsigneeDay
}
// 根据订单获取审批详情
this.getApply()
},
methods: {
getApply() {
// 先重置
this.applyStatus = 0
getLimitUpdateInfo(this.order.orderId).then((res) => {
const data = res.data
console.log({ data })
if (data.applyType === this.form.applyType) {
this.form.newIsLimitUpdateConsignee = data.newIsLimitUpdateConsignee
this.form.newLockConsigneeDay = data.newLockConsigneeDay
this.form.reasonZh = data.reasonZh
this.form.annex = data.annex
this.form.ccIds =
data.ccIds
?.split(",")
.filter((item) => !!item)
.map((item) => Number(item)) || []
this.applyStatus = data.applyStatus
this.bpmId = data.formId
/* // 如果是申请中,则需要查询审批数据
if(this.applyStatus === 1){
this.getApproval()
} */
}
})
},
/* getApproval(){
getApproval(this.id).then(res => {
this.approvalDetail = res.data
})
}, */
handleGoBpm() {
console.log("跳转审批页面,待完善")
this.handleClose()
this.$router.push({
path: "/bpm/process-instance/detail",
query: {
id: this.bpmId
}
})
},
handleClose() {
this.show = false
this.$emit("close")
},
handleSubmit() {
const data = {
...this.form,
ccIds: this.form.ccIds.join(","),
orderId: this.order.orderId
}
applyCargoControlApproval(data).then((res) => {
this.$message.success(this.$t("操作成功"))
this.$emit("success")
})
}
}
}
</script>
<script>
import { getApproval, getOrderDetail } from '@/api/ecw/order'
import { getPickRleaseInfo } from '@/api/ecw/orderCargoControl'
import Template from '@/views/cms/template/index.vue'
import dayjs from 'dayjs'
export default {
name: 'updateReleaseLimitApproval',
components: { Template },
props: {
// 审批ID
id: Number
},
data(){
return {
detail: null,
releaseInfo: null
}
},
mounted() {
this.getApprovalDetail()
},
computed:{
showExpireTime(){
return (days) => {
if(!this.releaseInfo?.unloadTime || !days){
return '-'
}
return dayjs(this.releaseInfo.unloadTime).add(this.detail.newLockConsigneeDay, "day").format('YYYY-MM-DD HH:mm:ss')
}
}
},
methods:{
getApprovalDetail(){
getApproval(this.id).then(res => {
try {
this.detail = JSON.parse(res.data?.details)
this.getPickRleaseInfo(this.detail.orderId)
}catch (e) {
console.error("审核详情解析失败", e)
this.$message.error("审核详情数据解析失败")
}
})
},
getPickRleaseInfo(orderId){
getPickRleaseInfo(orderId).then(res => {
this.releaseInfo = res.data
})
}
}
}
</script>
<template>
<div v-if="detail && releaseInfo">
<el-descriptions>
<el-descriptions-item :label="$t('订单号')">
{{detail.orderNo}}
</el-descriptions-item>
<el-descriptions-item :label="$t('总箱数')">
{{detail.sumNum}}
</el-descriptions-item>
<el-descriptions-item :label="$t('总体积')">
{{detail.sumVolume}}
</el-descriptions-item>
<el-descriptions-item :label="$t('总重量')">
{{detail.sumWeight}}Kg
</el-descriptions-item>
<el-descriptions-item :label="$t('总控货箱数')">
{{detail.sumNum}}
</el-descriptions-item>
<el-descriptions-item :label="$t('剩余放货箱数')">
{{detail.sumNum - detail.releaseNum}}
</el-descriptions-item>
<el-descriptions-item :label="$t('卸柜/到仓时间')">
{{releaseInfo.unloadTime || '-'}}
</el-descriptions-item>
<el-descriptions-item :label="$t('订单限制修改收货人')">
{{releaseInfo.isLimitUpdateConsignee ? $t('') : $t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('订单锁定收货人天数')" v-if="releaseInfo.isLimitUpdateConsignee">
{{releaseInfo.lockConsigneeDay}}
</el-descriptions-item>
<el-descriptions-item :label="$t('放货锁定收货人到期时间')" v-if="releaseInfo.isLimitUpdateConsignee">
{{showExpireTime(releaseInfo.lockConsigneeDay)}}
</el-descriptions-item>
</el-descriptions>
<el-divider>{{$t('修改内容')}}</el-divider>
<el-descriptions :column="3">
<el-descriptions-item :label="$t('订单限制修改收货人')">
{{detail.newIsLimitUpdateConsignee ? $t('') : $t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('订单锁定收货人天数')" v-if="detail.newIsLimitUpdateConsignee">
{{detail.newLockConsigneeDay}}
</el-descriptions-item>
<el-descriptions-item :label="$t('放货锁定收货人到期时间')" v-if="detail.newIsLimitUpdateConsignee">
{{showExpireTime(detail.newLockConsigneeDay)}}
</el-descriptions-item>
<el-descriptions-item :label="$t('修改原因')" :span="3">
{{detail.reasonZh}}
</el-descriptions-item>
<el-descriptions-item :label="$t('附件')" :span="3">
<div v-if="detail.annex">
<div v-for="url in detail.annex.split(',').filter(item => !!item)">
<el-link :href="url" target="_blank">{{url.split("/").pop()}}</el-link>
</div>
</div>
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<style scoped lang="scss">
</style>
......@@ -13,69 +13,26 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select
v-model="destCountryId"
multiple
:label="destCountryId"
:placeholder="$t('请选择目的国')"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressProvince"
:key="item.guojia"
:label="item.guojiaName"
:value="item.guojia"
></el-option>
<el-select v-model="destCountryId" multiple :label="destCountryId" :placeholder="$t('请选择目的国')" clearable @change="handleQuery">
<el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select
v-model="objectiveId"
multiple
:placeholder="$t('请选择目的城市')"
style="width: 200px"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressCity"
:key="item.shi"
:label="item.shiName"
:value="item.shi"
></el-option>
<el-select v-model="objectiveId" multiple :placeholder="$t('请选择目的城市')" style="width: 200px" clearable @change="handleQuery">
<el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select
v-model="destWarehouseId"
multiple
:placeholder="$t('请选择目的仓')"
style="width: 200px"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressTown"
:key="item.id"
:label="item.titleZh"
:value="item.id"
></el-option>
<el-select v-model="destWarehouseId" multiple :placeholder="$t('请选择目的仓')" style="width: 200px" clearable @change="handleQuery">
<el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
</el-select>
</el-form-item>
</div>
<el-form-item :label="$t('客户经理')">
<user-selector
manage
v-model="queryParams.salesmanIds"
multiple
clearable
@change="handleQuery"
:prepend="{ id: 0, nickname: $t('未分配客户经理') }"
/>
<user-selector manage v-model="queryParams.salesmanIds" multiple clearable @change="handleQuery" :prepend="{ id: 0, nickname: $t('未分配客户经理') }" />
</el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportId" v-show="showSearch">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model.number="queryParams.transportId" clearable @change="handleQuery"/>
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model.number="queryParams.transportId" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="channelIds">
<selector clearable :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelIds" multiple></selector>
......@@ -90,8 +47,7 @@
<dict-selector v-model="queryParams.cargoControlStatusList" multiple :type="DICT_TYPE.CONTROL_GOODS_STATUS" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('订单状态')" prop="statusList" v-show="showSearch">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" multiple v-model="queryParams.statusList"
@keyup.enter.native="handleQuery" clearable @change="handleQuery" />
<dict-selector :type="DICT_TYPE.ORDER_STATUS" multiple v-model="queryParams.statusList" @keyup.enter.native="handleQuery" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('提单号')" prop="tidanNo">
<el-input v-model="queryParams.tidanNo" :placeholder="$t('提单号')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
......@@ -112,13 +68,7 @@
<el-input v-model="queryParams.marks" :placeholder="$t('唛头')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('备案属性')" prop="productRecords" v-show="showSearch">
<dict-selector
:type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE"
multiple
v-model="queryParams.productRecords"
clearable
@change="handleQuery"
/>
<dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" multiple v-model="queryParams.productRecords" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('外部仓')" prop="isExternalWarehouse" v-show="showSearch">
<el-select v-model="queryParams.isExternalWarehouse" :placeholder="$t('请选择')" clearable @change="handleQuery">
......@@ -127,14 +77,14 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('增值服务')" prop="type" v-show="showSearch">
<el-select v-model="queryParams.type" :placeholder="$t('请选择')" clearable @change="handleQuery" >
<el-select v-model="queryParams.type" :placeholder="$t('请选择')" clearable @change="handleQuery">
<el-option :label="$t('普通订单')" :value="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
</el-form-item>
</el-form>
......@@ -147,84 +97,98 @@
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('订单编号')" width="120px" align="center" prop="orderNo" >
<el-table-column :label="$t('订单编号')" width="120px" align="center" prop="orderNo">
<template slot-scope="scope">
<router-link :to="`detail?orderId=` + scope.row.orderId">{{ scope.row.orderNo }}</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('箱数')" align="center" prop="sumNum" >
<template v-slot="{row}">
{{row.sumNum > 0 ? row.sumNum : row.totalNum}}
<el-table-column :label="$t('箱数')" align="center" prop="sumNum">
<template v-slot="{ row }">
{{ row.sumNum > 0 ? row.sumNum : row.totalNum }}
</template>
</el-table-column>
<el-table-column :label="$t('已放箱数')" align="center" prop="sumWeight">
<template slot-scope="{row}">{{row.releaseNum}}</template>
<template slot-scope="{ row }">{{ row.releaseNum }}</template>
</el-table-column>
<el-table-column :label="$t('订单状态')" align="left" prop="status">
<template slot-scope="{row}">
{{row.statusMsg}}
<template slot-scope="{ row }">
{{ row.statusMsg }}
</template>
</el-table-column>
<el-table-column :label="$t('已卸柜/已到仓时间')" align="center" prop="unloadTime" />
<el-table-column :label="$t('提单号')" align="center" prop="status">
<template slot-scope="scope">
{{scope.row.tidanNo}}
{{ scope.row.tidanNo }}
</template>
</el-table-column>
<el-table-column :label="$t('放货人')" align="center" prop="sumWeight">
<template slot-scope="{row}">{{row.cargoControlName}}</template>
<template slot-scope="{ row }">{{ row.cargoControlName }}</template>
</el-table-column>
<el-table-column :label="$t('控货状态')" align="center" prop="transportId">
<template slot-scope="{row}">
<template v-if="row.cargoControlStatus == 1 && row.isToReview">{{$t('放货中')}}</template>
<template slot-scope="{ row }">
<template v-if="row.cargoControlStatus == 1 && row.isToReview">{{ $t("放货中") }}</template>
<dict-tag v-else :type="DICT_TYPE.CONTROL_GOODS_STATUS" :value="row.cargoControlStatus" />
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="150px">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:show']">{{$t('查看')}}</el-button>
<!--修改放货限制-->
<!-- <el-button type="text" size="mini" @click="showUpdateReleaseLimit = scope.row" v-hasPermi="['ecw:cargo_control:updateReleaseLimit']" :disabled="scope.row.cargoControlStatus == 1 && !scope.row.isToReview">{{ $t("修改海外仓") }}</el-button> -->
<el-button type="text" size="mini" @click="showUpdateReleaseType = scope.row">{{ $t("海外仓模式修改") }}</el-button>
<el-button type="text" size="mini" @click="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:show']">{{ $t("查看") }}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList" />
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
<transfer v-if="showTransferOrder" v-bind="showTransferOrder" @close="showTransferOrder=null" />
<release v-if="showReleaseOrderId" :order-id="showReleaseOrderId" @close="showReleaseOrderId=null" @success="onReleaseSuccess" />
<transfer-cargo v-if="showTransferCargoOrderId" :order-id="showTransferCargoOrderId" @close="showTransferCargoOrderId=null" @success="onTransferCargoSuccess" :cargoControlPickId="pickInfo ? pickInfo.id : 0" />
<fallback v-if="showFallbackOrder !== null" :order="showFallbackOrder" @close="showFallbackOrder=null" @success="onFallbackSuccess" :index="null" />
<transfer v-if="showTransferOrder" v-bind="showTransferOrder" @close="showTransferOrder = null" />
<release v-if="showReleaseOrderId" :order-id="showReleaseOrderId" @close="showReleaseOrderId = null" @success="onReleaseSuccess" />
<transfer-cargo v-if="showTransferCargoOrderId" :order-id="showTransferCargoOrderId" @close="showTransferCargoOrderId = null" @success="onTransferCargoSuccess" :cargoControlPickId="pickInfo ? pickInfo.id : 0" />
<fallback v-if="showFallbackOrder !== null" :order="showFallbackOrder" @close="showFallbackOrder = null" @success="onFallbackSuccess" :index="null" />
<!--控货日志-->
<cargo-log-list v-if="showLogOrderId" :order-id="showLogOrderId" @close="showLogOrderId=null" />
<cargo-log-list v-if="showLogOrderId" :order-id="showLogOrderId" @close="showLogOrderId = null" />
<!--修改放货限制-->
<update-release-type v-if="showUpdateReleaseType" :order="showUpdateReleaseType" @close="showUpdateReleaseType = null" @success="getList" />
</div>
</template>
<script>
import Selector from '@/components/Selector'
import ProductSelector from '@/components/ProductSelector'
import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector'
import Selector from "@/components/Selector"
import ProductSelector from "@/components/ProductSelector"
import { getProductAttrList } from "@/api/ecw/productAttr"
import CustomerSelector from "@/components/CustomerSelector"
/* import { getTradeCityList } from '@/api/ecw/region' */
import Transfer from '@/views/ecw/order/components/Transfer'
import Release from './components/Release'
import CargoControlEdit from './components/CargoControlEdit'
import Transfer from "@/views/ecw/order/components/Transfer"
import Release from "./components/Release"
import CargoControlEdit from "./components/CargoControlEdit"
import { getWarningCargoControlOrderPage, batchReview, orderReview, getPickRleaseInfo, exportCargoControl } from "@/api/ecw/orderCargoControl"
import TransferCargo from '@/views/ecw/order/components/TransferCargo'
import Fallback from './components/Fallback'
import {getWarehouseList} from '@/api/ecw/warehouse'
import CargoLogList from "@/views/ecw/order/components/CargoLogList.vue";
import {getRegionList} from "@/api/ecw/order"
import UserSelector from "@/components/UserSelector";
import {getChannelList} from "@/api/ecw/channel";
import TransferCargo from "@/views/ecw/order/components/TransferCargo"
import Fallback from "./components/Fallback"
import { getWarehouseList } from "@/api/ecw/warehouse"
import CargoLogList from "@/views/ecw/order/components/CargoLogList.vue"
import { getRegionList } from "@/api/ecw/order"
import UserSelector from "@/components/UserSelector"
import { getChannelList } from "@/api/ecw/channel"
export default {
name: "EcwOrderWarningCargocontrol",
components: {
CargoLogList,
UserSelector,
CustomerSelector, ProductSelector, Selector, Transfer, Release,CargoControlEdit, TransferCargo, Fallback
CustomerSelector,
ProductSelector,
Selector,
Transfer,
Release,
CargoControlEdit,
TransferCargo,
Fallback,
updateReleaseType: () => import("@/views/ecw/order/components/updateReleaseType")
},
data() {
return {
......@@ -254,9 +218,9 @@ export default {
tradeCityList: [],
warehouseList: [],
productAttrList: [], // 商品属性
molecule: '', //重货比分子
denominator: '', //重货比分母
dateFilterType: '', //日期筛选类别
molecule: "", //重货比分子
denominator: "", //重货比分母
dateFilterType: "", //日期筛选类别
dateFilter: [], //筛选日期
showTransferOrder: null, // 控制权转移操作订单
showReleaseOrderId: null, // 放货ID
......@@ -271,39 +235,40 @@ export default {
destCountryId: null,
objectiveId: null,
destWarehouseId: null,
};
showUpdateReleaseType: null
}
},
computed: {
expoerCityList() {
return this.tradeCityList.filter(item => item.type == 2)
return this.tradeCityList.filter((item) => item.type == 2)
},
importCityList() {
return this.tradeCityList.filter(item => item.type == 1)
return this.tradeCityList.filter((item) => item.type == 1)
},
exportWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
exportWarehouseList() {
return this.warehouseList.filter((item) => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
importWarehouseList() {
return this.warehouseList.filter((item) => item.tradeType == 1 || item.tradeType == 3)
},
combinedQueryParams(){
combinedQueryParams() {
let timeParams = {}
if(this.dateFilterType && this.dateFilter){
timeParams['begin' + this.dateFilterType] = this.dateFilter[0]
timeParams['end' + this.dateFilterType] = this.dateFilter[1]
if (this.dateFilterType && this.dateFilter) {
timeParams["begin" + this.dateFilterType] = this.dateFilter[0]
timeParams["end" + this.dateFilterType] = this.dateFilter[1]
}
let queryParams = {}
//目的国
if (this.destCountryId != null && this.destCountryId != "") {
queryParams.destCountryIds = this.destCountryId;
queryParams.destCountryIds = this.destCountryId
}
//目的城市
if (this.objectiveId != null && this.objectiveId != "") {
queryParams.objectiveIds = this.objectiveId;
queryParams.objectiveIds = this.objectiveId
}
//目的仓
if (this.destWarehouseId != null && this.destWarehouseId != "") {
queryParams.destWarehouseIds = this.destWarehouseId;
queryParams.destWarehouseIds = this.destWarehouseId
}
return Object.assign({}, this.queryParams, timeParams, queryParams)
}
......@@ -314,82 +279,58 @@ export default {
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = [];
this.AddressTown = [];
this.objectiveId = "";
this.destWarehouseId = "";
this.findByprovinceCode();
this.AddressCity = []
this.AddressTown = []
this.objectiveId = ""
this.destWarehouseId = ""
this.findByprovinceCode()
if (this.destCountryId == "") {
this.getAddressCity()
this.getAddressTown()
} else if (
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.getAddressTown()
}
},
}
},
objectiveId: {
deep: true, //深度监听
handler() {
this.AddressTown = [];
this.destWarehouseId = "";
this.findBycityCode();
this.AddressTown = []
this.destWarehouseId = ""
this.findBycityCode()
if (
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
//获取当前城市值id,获取该城市下区域
} else if (
this.destCountryId == "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
} else if (this.destCountryId == "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.getAddressTown()
} else if (
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.findByprovinceCode();
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.findByprovinceCode()
this.getAddressTown()
}
},
}
},
destWarehouseId: {
deep: true, //深度监听
handler() {
if (
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
//获取当前城市值id,获取该城市下区域
this.findBycityCode();
} else if (
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.findBycityCode()
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.getAddressTown()
}
}
}
},
},
},
activated(){
activated() {
// 要求保留页码 https://zentao.test.jdshangmen.com/bug-view-3079.html
this.getList()
},
created() {
this.getList();
getProductAttrList().then(res => this.productAttrList = res.data)
this.getList()
getProductAttrList().then((res) => (this.productAttrList = res.data))
// getTradeCityList().then(res => this.tradeCityList = res.data)
getWarehouseList().then(res => this.warehouseList = res.data)
getChannelList().then(res => this.channelList = res.data)
getWarehouseList().then((res) => (this.warehouseList = res.data))
getChannelList().then((res) => (this.channelList = res.data))
this.getAddressProvince()
this.getAddressCity()
this.getAddressTown()
......@@ -397,128 +338,134 @@ export default {
methods: {
/** 查询列表 */
getList() {
this.loading = true;
this.loading = true
// 执行查询
getWarningCargoControlOrderPage(this.combinedQueryParams).then(response => {
getWarningCargoControlOrderPage(this.combinedQueryParams).then((response) => {
this.list = []
// 直接更细数据,可能因为elTable的部分渲染产生bug,比如权限控制异常
this.$nextTick( () => {
this.list = response.data.list;
this.total = response.data.total;
this.$nextTick(() => {
this.list = response.data.list
this.total = response.data.total
})
this.loading = false;
});
this.loading = false
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.queryParams.page = 1
this.$nextTick(this.getList)
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
this.resetForm("queryForm")
this.handleQuery()
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
// 执行导出
this.$modal.confirm('是否确认导出所有订单数据项?').then(() => {
this.exportLoading = true;
return exportCargoControl(this.combinedQueryParams);
}).then(response => {
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
this.exportLoading = false;
}).catch(() => { });
this.$modal
.confirm("是否确认导出所有订单数据项?")
.then(() => {
this.exportLoading = true
return exportCargoControl(this.combinedQueryParams)
})
.then((response) => {
this.$message.success(this.$t("已加入导出队列,请稍后在下载日志中下载"))
this.exportLoading = false
})
.catch(() => {})
},
// 表格多选
handleSelectionChange(selection) {
this.ids = selection.map(item => item.orderId)
this.ids = selection.map((item) => item.orderId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
toDetail(row){
this.$router.push('cargo_control/detail?id=' + row.orderId)
toDetail(row) {
this.$router.push("cargo_control/detail?id=" + row.orderId)
},
// 复核
review(row){
review(row) {
// 未放货完成则打开详情,已完成放货则弹窗
if(row.releaseNum < row.sumNum){
if (row.releaseNum < row.sumNum) {
return this.toDetail(row)
}
this.$confirm('已核实放货信息,确认放货?')
.then(res => {
this.$confirm("已核实放货信息,确认放货?")
.then((res) => {
return orderReview(row.orderId)
})
.then(res => {
this.$message.success('操作成功')
.then((res) => {
this.$message.success("操作成功")
this.getList()
})
},
// 批量复核
batchReview(){
this.$confirm(this.$t('确定复核选中的订单么?')).then(() => {
return batchReview("orderIds=" + this.ids.join(','))
}).then(() => {
this.$message.success(this.$t('操作成功'))
batchReview() {
this.$confirm(this.$t("确定复核选中的订单么?"))
.then(() => {
return batchReview("orderIds=" + this.ids.join(","))
})
.then(() => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
},
cargoTransfer(row){
getPickRleaseInfo(row.orderId).then(res => {
if(res.data.cargoControlPickBackVOList && res.data.cargoControlPickBackVOList.length > 1){
cargoTransfer(row) {
getPickRleaseInfo(row.orderId).then((res) => {
if (res.data.cargoControlPickBackVOList && res.data.cargoControlPickBackVOList.length > 1) {
this.toDetail(row)
}
this.pickInfo = res.data.cargoControlPickBackVOList[0]
this.showTransferCargoOrderId=row.orderId
this.showTransferCargoOrderId = row.orderId
})
},
onReleaseSuccess(){
onReleaseSuccess() {
this.showReleaseOrderId = null
this.getList()
},
onFallbackSuccess(){
onFallbackSuccess() {
this.showFallbackOrder = null
this.getList()
},
onTransferCargoSuccess(){
onTransferCargoSuccess() {
this.showTransferCargoOrderId = null
this.getList()
},
getAddressProvince() {
getRegionList(1, 1).then(({ data }) => {
this.AddressProvince = data;
this.AddressProvince = data
})
},
getAddressCity() {
getRegionList(4, 4).then(({ data }) => {
this.AddressCity = data;
this.AddressCity = data
})
},
getAddressTown() {
getRegionList(5, 5).then(({ data }) => {
this.AddressTown = data;
this.AddressTown = data
})
},
findByprovinceCode() {
if (this.destCountryId != null && this.destCountryId != '') {
if (this.destCountryId != null && this.destCountryId != "") {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId).then(({ data }) => {
this.AddressCity = data;
this.AddressCity = data
})
}
},
findBycityCode() {
if (this.objectiveId != null && this.objectiveId != '') {
if (this.objectiveId != null && this.objectiveId != "") {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId).then(({ data }) => {
this.AddressTown = data;
this.AddressTown = data
})
}
}
}
};
}
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment