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 @@ ...@@ -4707,5 +4707,6 @@
"下次跟进时间": "Next follow-up time", "下次跟进时间": "Next follow-up time",
"提交结果": "Submit result", "提交结果": "Submit result",
"增加计划": "add plan", "增加计划": "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 { ...@@ -662,15 +662,17 @@ export default {
path: this.processInstance.processDefinition?.formCustomViewPath, path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
// 收货人限制修改申请 // 收货人限制修改申请
order_consignee_limit_change:{ order_consignee_limit_change: {
component: () => import("@/views/ecw/order/components/updateReleaseLimitApproval"), component: () =>
import("@/views/ecw/order/components/updateReleaseLimitApproval"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
}, },
// 海外仓修改申请,下面的组件待改 // 海外仓修改申请,下面的组件待改
order_overseas_warehouse_change:{ order_overseas_warehouse_change: {
component: () => import("@/views/ecw/order/components/updateReleaseLimitApproval"), component: () =>
import("@/views/ecw/order/components/updateReleaseLimitApproval"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
} },
}; };
console.log( console.log(
"formCustomViewPath", "formCustomViewPath",
......
...@@ -3,97 +3,43 @@ ...@@ -3,97 +3,43 @@
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item :label="$t('编号')" prop="orderNo"> <el-form-item :label="$t('编号')" prop="orderNo">
<el-input <el-input v-model.trim="noParam.value" :placeholder="$t('请输入订单号、唛头、提单号')" clearable @keyup.enter.native="handleQuery" @input="noParam.value = noParam.value.replace(/\s+/g, '')">
v-model.trim="noParam.value"
:placeholder="$t('请输入订单号、唛头、提单号')"
clearable
@keyup.enter.native="handleQuery"
@input="noParam.value=noParam.value.replace(/\s+/g, '')"
>
<template slot="prepend"> <template slot="prepend">
<dict-selector <dict-selector :type="DICT_TYPE.ORDER_QUERY_NO_FIELD" defaultable v-model="noParam.key" class="w-50" />
:type="DICT_TYPE.ORDER_QUERY_NO_FIELD"
defaultable
v-model="noParam.key"
class="w-50"
/>
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('日期筛选')"> <el-form-item :label="$t('日期筛选')">
<dict-selector defaultable :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" class="w-100 mr-10" /> <dict-selector defaultable :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" class="w-100 mr-10" />
<el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"></el-date-picker> <el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"></el-date-picker>
</el-form-item> </el-form-item>
<div> <div>
<el-form-item :label="$t('始发仓')" prop="startWarehouseIds"> <el-form-item :label="$t('始发仓')" prop="startWarehouseIds">
<el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable @change="handleQuery"> <el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable @change="handleQuery">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的国')" prop="destCountryId"> <el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select <el-select v-model="destCountryId" multiple :label="destCountryId" :placeholder="$t('请选择目的国')" clearable @change="handleQuery">
v-model="destCountryId" <el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
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-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的城市')" prop="objectiveId"> <el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select <el-select v-model="objectiveId" multiple :placeholder="$t('请选择目的城市')" style="width: 200px" clearable @change="handleQuery">
v-model="objectiveId" <el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
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-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId"> <el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select <el-select v-model="destWarehouseId" multiple :placeholder="$t('请选择目的仓')" style="width: 200px" clearable @change="handleQuery">
v-model="destWarehouseId" <el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
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-select>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item :label="$t('客户经理')"> <el-form-item :label="$t('客户经理')">
<user-selector <user-selector manage v-model="queryParams.salesmanIds" multiple clearable @change="handleQuery" :prepend="{ id: 0, nickname: $t('未分配客户经理') }" />
manage
v-model="queryParams.salesmanIds"
multiple
clearable
@change="handleQuery"
:prepend="{ id: 0, nickname: $t('未分配客户经理') }"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportId" v-show="showSearch"> <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>
<el-form-item :label="$t('出货渠道')" prop="channelIds"> <el-form-item :label="$t('出货渠道')" prop="channelIds">
<selector clearable :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelIds" multiple></selector> <selector clearable :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelIds" multiple></selector>
...@@ -102,39 +48,27 @@ ...@@ -102,39 +48,27 @@
<el-input v-model="queryParams.orderNo" :placeholder="$t('订单编号')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" /> <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>-->
<el-form-item :label="$t('商品') + ':'" v-show="showSearch"> <el-form-item :label="$t('商品') + ':'" v-show="showSearch">
<el-input <el-input v-model.trim="prodParam.value" :placeholder="$t('请输入商品类型、品名或品牌')" clearable @keyup.enter.native="handleQuery" @input="replaceSpace(prodParam, 'value')">
v-model.trim="prodParam.value"
:placeholder="$t('请输入商品类型、品名或品牌')"
clearable
@keyup.enter.native="handleQuery"
@input="replaceSpace(prodParam, 'value')"
>
<template slot="prepend"> <template slot="prepend">
<dict-selector <dict-selector :type="DICT_TYPE.ORDER_QUERY_PROD_FIELD" defaultable v-model="prodParam.key" class="w-50" />
:type="DICT_TYPE.ORDER_QUERY_PROD_FIELD"
defaultable
v-model="prodParam.key"
class="w-50"
/>
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('控货状态')" prop="isCargoControl"> <el-form-item :label="$t('控货状态')" prop="isCargoControl">
<dict-selector v-model="queryParams.cargoControlStatusList" multiple :type="DICT_TYPE.CONTROL_GOODS_STATUS" clearable @change="handleQuery" /> <dict-selector v-model="queryParams.cargoControlStatusList" multiple :type="DICT_TYPE.CONTROL_GOODS_STATUS" clearable @change="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('订单状态')" prop="statusList" v-show="showSearch"> <el-form-item :label="$t('订单状态')" prop="statusList" v-show="showSearch">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" multiple v-model="queryParams.statusList" <dict-selector :type="DICT_TYPE.ORDER_STATUS" multiple v-model="queryParams.statusList" @keyup.enter.native="handleQuery" clearable @change="handleQuery" />
@keyup.enter.native="handleQuery" clearable @change="handleQuery" />
</el-form-item> </el-form-item>
<!--<el-form-item :label="$t('提单号')" prop="tidanNo"> <!--<el-form-item :label="$t('提单号')" prop="tidanNo">
<el-input v-model.trim="queryParams.tidanNo" :placeholder="$t('提单号')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model.trim="queryParams.tidanNo" :placeholder="$t('提单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>--> </el-form-item>-->
<el-form-item :label="$t('发货人')" prop="consignorKey"> <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>
<el-form-item :label="$t('收货人')" prop="consigneeKey"> <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>
<el-form-item :label="$t('报关方式')" prop="customsTypes"> <el-form-item :label="$t('报关方式')" prop="customsTypes">
...@@ -145,13 +79,7 @@ ...@@ -145,13 +79,7 @@
<el-input v-model="queryParams.marks" :placeholder="$t('唛头')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.marks" :placeholder="$t('唛头')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>--> </el-form-item>-->
<el-form-item :label="$t('备案属性')" prop="productRecords" v-show="showSearch"> <el-form-item :label="$t('备案属性')" prop="productRecords" v-show="showSearch">
<dict-selector <dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" multiple v-model="queryParams.productRecords" clearable @change="handleQuery" />
:type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE"
multiple
v-model="queryParams.productRecords"
clearable
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('外部仓')" prop="isExternalWarehouse" v-show="showSearch"> <el-form-item :label="$t('外部仓')" prop="isExternalWarehouse" v-show="showSearch">
<el-select v-model="queryParams.isExternalWarehouse" :placeholder="$t('请选择')" clearable @change="handleQuery"> <el-select v-model="queryParams.isExternalWarehouse" :placeholder="$t('请选择')" clearable @change="handleQuery">
...@@ -160,61 +88,32 @@ ...@@ -160,61 +88,32 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('增值服务')" prop="types" v-show="showSearch"> <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="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option> <el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option> <el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('商品类型')" prop="goodsTypes" v-show="showSearch"> <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 v-model="queryParams.goodsTypes" multiple :options="productAttrList" label-field="attrName" value-field="id"> </selector>
</selector>
</el-form-item> </el-form-item>
<!--<el-form-item :label="$t('订单放货锁定收货人到期时间')" prop="lockConsigneeTime"> <!--<el-form-item :label="$t('订单放货锁定收货人到期时间')" prop="lockConsigneeTime">
</el-form-item>--> </el-form-item>-->
<el-form-item :label="$t('提货状态')" v-show="showSearch"> <el-form-item :label="$t('提货状态')" v-show="showSearch">
<dict-selector <dict-selector :type="DICT_TYPE.PICK_STATE" multiple v-model="queryParams.pickStateList" clearable @change="handleQuery" />
:type="DICT_TYPE.PICK_STATE"
multiple
v-model="queryParams.pickStateList"
clearable
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('放货率')" v-show="showSearch"> <el-form-item :label="$t('放货率')" v-show="showSearch">
<el-input <el-input type="number" v-model.trim="releaseRatio.value" :placeholder="$t('请输入数字')" clearable @keyup.enter.native="handleQuery">
type="number"
v-model.trim="releaseRatio.value"
:placeholder="$t('请输入数字')"
clearable
@keyup.enter.native="handleQuery"
>
<template slot="prepend"> <template slot="prepend">
<dict-selector <dict-selector :type="DICT_TYPE.RELEASE_RATIO_FIELD" defaultable v-model="releaseRatio.key" class="w-50" />
:type="DICT_TYPE.RELEASE_RATIO_FIELD"
defaultable
v-model="releaseRatio.key"
class="w-50"
/>
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('提货率')" v-show="showSearch"> <el-form-item :label="$t('提货率')" v-show="showSearch">
<el-input <el-input type="number" v-model.trim="pickRatio.value" :placeholder="$t('请输入数字')" clearable @keyup.enter.native="handleQuery">
type="number"
v-model.trim="pickRatio.value"
:placeholder="$t('请输入数字')"
clearable
@keyup.enter.native="handleQuery"
>
<template slot="prepend"> <template slot="prepend">
<dict-selector <dict-selector :type="DICT_TYPE.PICK_RATIO_FIELD" defaultable v-model="pickRatio.key" class="w-50" />
:type="DICT_TYPE.PICK_RATIO_FIELD"
defaultable
v-model="pickRatio.key"
class="w-50"
/>
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -225,31 +124,22 @@ ...@@ -225,31 +124,22 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('特需')" prop="packageType" v-show="showSearch"> <el-form-item :label="$t('特需')" prop="packageType" v-show="showSearch">
<el-select <el-select v-model="queryParams.packageTypeArr" multiple :placeholder="$t('请选择')" clearable>
v-model="queryParams.packageTypeArr"
multiple
:placeholder="$t('请选择')"
clearable
>
<template v-for="item in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)"> <template v-for="item in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)">
<el-option <el-option :label="$l(item, 'label')" :value="item.value"></el-option>
:label="$l(item, 'label')"
:value="item.value"
></el-option>
</template> </template>
</el-select> </el-select>
</el-form-item> </el-form-item>
<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-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['ecw:cargo:export:search']">{{ $t("导出") }}</el-button>
:loading="exportLoading" v-hasPermi="['ecw:cargo:export:search']">{{$t('导出')}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="2"> <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> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
...@@ -258,38 +148,38 @@ ...@@ -258,38 +148,38 @@
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <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"> <template slot-scope="scope">
<router-link :to="`detail?orderId=` + scope.row.orderId">{{ scope.row.orderNo }}</router-link> <router-link :to="`detail?orderId=` + scope.row.orderId">{{ scope.row.orderNo }}</router-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('唛头')" align="center" prop="marks" /> <el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('箱数')" align="center" prop="sumNum" > <el-table-column :label="$t('箱数')" align="center" prop="sumNum">
<template v-slot="{row}"> <template v-slot="{ row }">
{{row.sumNum > 0 ? row.sumNum : row.totalNum}} {{ row.sumNum > 0 ? row.sumNum : row.totalNum }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('已放箱数')" align="center" prop="sumWeight"> <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>
<el-table-column :label="$t('订单状态')" align="left" prop="status"> <el-table-column :label="$t('订单状态')" align="left" prop="status">
<template slot-scope="{row}"> <template slot-scope="{ row }">
{{row.statusMsg}} {{ row.statusMsg }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('已卸柜/已到仓时间')" align="left" prop="status"> <el-table-column :label="$t('已卸柜/已到仓时间')" align="left" prop="status">
<template slot-scope="{row}"> <template slot-scope="{ row }">
{{row.unloadTime}} {{ row.unloadTime }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('放货锁定收货人到期时间')" align="left" prop="status"> <el-table-column :label="$t('放货锁定收货人到期时间')" align="left" prop="status">
<template slot-scope="{row}"> <template slot-scope="{ row }">
{{row.lockConsigneeTime}} {{ row.lockConsigneeTime }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('订单限制修改收货人')" align="left" prop="status"> <el-table-column :label="$t('订单限制修改收货人')" align="left" prop="status">
<template slot-scope="{row}"> <template slot-scope="{ row }">
{{row.isLimitUpdateConsignee ? $t('') : $t('')}} {{ row.isLimitUpdateConsignee ? $t("") : $t("") }}
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column :label="$t('提单号')" align="center" prop="status"> <!--<el-table-column :label="$t('提单号')" align="center" prop="status">
...@@ -298,11 +188,11 @@ ...@@ -298,11 +188,11 @@
</template> </template>
</el-table-column>--> </el-table-column>-->
<el-table-column :label="$t('放货人')" align="center" prop="sumWeight"> <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>
<el-table-column :label="$t('控货状态')" align="center" prop="transportId"> <el-table-column :label="$t('控货状态')" align="center" prop="transportId">
<template slot-scope="{row}"> <template slot-scope="{ row }">
<template v-if="row.cargoControlStatus == 1 && row.isToReview">{{$t('放货中')}}</template> <template v-if="row.cargoControlStatus == 1 && row.isToReview">{{ $t("放货中") }}</template>
<dict-tag v-else :type="DICT_TYPE.CONTROL_GOODS_STATUS" :value="row.cargoControlStatus" /> <dict-tag v-else :type="DICT_TYPE.CONTROL_GOODS_STATUS" :value="row.cargoControlStatus" />
</template> </template>
</el-table-column> </el-table-column>
...@@ -314,100 +204,89 @@ ...@@ -314,100 +204,89 @@
https://czxy.cpolar.cn/task-view-266.html https://czxy.cpolar.cn/task-view-266.html
--> -->
<!--修改放货限制--> <!--修改放货限制-->
<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>
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新需求,如果有修改放货限制审批 和 海外仓修改申请在途则置灰 2408新需求,如果有修改放货限制审批 和 海外仓修改申请在途则置灰
https://czxy.cpolar.cn/task-view-266.html https://czxy.cpolar.cn/task-view-266.html
--> -->
<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>
type="text" <el-button type="text" size="mini" @click="showTransferOrder = scope.row" v-hasPermi="['ecw:cargo_control:transfer']">{{ $t("控货权转移") }}</el-button>
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>
<!--部分控货--> <!--部分控货-->
<template v-if="scope.row.cargoControlStatus == 2"> <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: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="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="review(scope.row)" v-if="scope.row.isToReview" v-hasPermi="['ecw:cargo_control:review']">{{ $t("放货复核") }}</el-button>
</template> </template>
<!--已全部放货,但是未复核--> <!--已全部放货,但是未复核-->
<template v-if="scope.row.cargoControlStatus == 1 && scope.row.isToReview"> <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="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: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="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:cancel']">{{ $t("取消") }}</el-button>
</template> </template>
<!--已完成放货,且没有待复核;真正的放货完成--> <!--已完成放货,且没有待复核;真正的放货完成-->
<template v-if="scope.row.cargoControlStatus == 1 && !scope.row.isToReview"> <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="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="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="showFallbackOrder = scope.row" v-if="scope.row.isReleaseAfterGoods" v-hasPermi="['ecw:cargo_control:fallback']">{{ $t("反复核") }}</el-button>
</template> </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="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="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:show']">{{ $t("查看") }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
@pagination="getList" />
<transfer v-if="showTransferOrder" v-bind="showTransferOrder" @close="showTransferOrder=null" /> <transfer v-if="showTransferOrder" v-bind="showTransferOrder" @close="showTransferOrder = null" />
<release v-if="showReleaseOrderId" :order-id="showReleaseOrderId" @close="showReleaseOrderId=null" @success="onReleaseSuccess" /> <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" /> <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" /> <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 <update-release-limit v-if="showUpdateReleaseLimit" :order="showUpdateReleaseLimit" @close="showUpdateReleaseLimit = null" @success="onUpdateReleaseLimitSuccess" />
v-if="showUpdateReleaseLimit"
:order="showUpdateReleaseLimit"
@close="showUpdateReleaseLimit=null"
@success="onUpdateReleaseLimitSuccess"
/>
</div> </div>
</template> </template>
<script> <script>
import Selector from '@/components/Selector' import Selector from "@/components/Selector"
import ProductSelector from '@/components/ProductSelector' import ProductSelector from "@/components/ProductSelector"
import { getProductAttrList } from '@/api/ecw/productAttr' import { getProductAttrList } from "@/api/ecw/productAttr"
import CustomerSelector from '@/components/CustomerSelector' import CustomerSelector from "@/components/CustomerSelector"
import UpdateReleaseLimit from '@/views/ecw/order/components/updateReleaseLimit.vue' import UpdateReleaseLimit from "@/views/ecw/order/components/updateReleaseLimit.vue"
/* import { getTradeCityList } from '@/api/ecw/region' */ /* import { getTradeCityList } from '@/api/ecw/region' */
import Transfer from '@/views/ecw/order/components/Transfer' import Transfer from "@/views/ecw/order/components/Transfer"
import Release from './components/Release' import Release from "./components/Release"
import CargoControlEdit from './components/CargoControlEdit' import CargoControlEdit from "./components/CargoControlEdit"
import { getCargoControlOrderPage, batchReview, orderReview, getPickRleaseInfo, exportCargoControl } from "@/api/ecw/orderCargoControl" import { getCargoControlOrderPage, batchReview, orderReview, getPickRleaseInfo, exportCargoControl } from "@/api/ecw/orderCargoControl"
import TransferCargo from '@/views/ecw/order/components/TransferCargo' import TransferCargo from "@/views/ecw/order/components/TransferCargo"
import Fallback from './components/Fallback' import Fallback from "./components/Fallback"
import {getWarehouseList} from '@/api/ecw/warehouse' import { getWarehouseList } from "@/api/ecw/warehouse"
import CargoLogList from "@/views/ecw/order/components/CargoLogList.vue"; import CargoLogList from "@/views/ecw/order/components/CargoLogList.vue"
import {getRegionList} from "@/api/ecw/order" import { getRegionList } from "@/api/ecw/order"
import UserSelector from "@/components/UserSelector"; import UserSelector from "@/components/UserSelector"
import {getChannelList} from "@/api/ecw/channel"; import { getChannelList } from "@/api/ecw/channel"
export default { export default {
name: "EcwOrderCargocontrol", name: "EcwOrderCargocontrol",
components: { components: {
UpdateReleaseLimit, UpdateReleaseLimit,
CargoLogList, CargoLogList,
UserSelector, UserSelector,
CustomerSelector, ProductSelector, Selector, Transfer, Release,CargoControlEdit, TransferCargo, Fallback CustomerSelector,
ProductSelector,
Selector,
Transfer,
Release,
CargoControlEdit,
TransferCargo,
Fallback
}, },
data() { data() {
return { return {
...@@ -436,10 +315,10 @@ export default { ...@@ -436,10 +315,10 @@ export default {
}, },
tradeCityList: [], tradeCityList: [],
warehouseList: [], warehouseList: [],
productAttrList: [], // 商品属性 productAttrList: [], // 商品属性
molecule: '', //重货比分子 molecule: "", //重货比分子
denominator: '', //重货比分母 denominator: "", //重货比分母
dateFilterType: '', //日期筛选类别 dateFilterType: "", //日期筛选类别
dateFilter: [], //筛选日期 dateFilter: [], //筛选日期
showTransferOrder: null, // 控制权转移操作订单 showTransferOrder: null, // 控制权转移操作订单
showReleaseOrderId: null, // 放货ID showReleaseOrderId: null, // 放货ID
...@@ -451,17 +330,17 @@ export default { ...@@ -451,17 +330,17 @@ export default {
// 编号搜索条件 // 编号搜索条件
noParam: { noParam: {
key: "numberKey", key: "numberKey",
value: "", value: ""
}, },
// 商品搜索条件 // 商品搜索条件
prodParam: { prodParam: {
key: "prodKey", key: "prodKey",
value: "", value: ""
}, },
// 放货率 // 放货率
releaseRatio:{ releaseRatio: {
key: 'geReleaseRatio', key: "geReleaseRatio",
value: '' value: ""
}, },
channelList: [], channelList: [],
AddressProvince: [], AddressProvince: [],
...@@ -472,57 +351,57 @@ export default { ...@@ -472,57 +351,57 @@ export default {
destWarehouseId: null, destWarehouseId: null,
pickRatio: { pickRatio: {
key: "gePickRatio", key: "gePickRatio",
value: "", value: ""
} }
}; }
}, },
computed: { computed: {
expoerCityList() { expoerCityList() {
return this.tradeCityList.filter(item => item.type == 2) return this.tradeCityList.filter((item) => item.type == 2)
}, },
importCityList() { importCityList() {
return this.tradeCityList.filter(item => item.type == 1) return this.tradeCityList.filter((item) => item.type == 1)
}, },
exportWarehouseList(){ exportWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3) return this.warehouseList.filter((item) => item.tradeType == 2 || item.tradeType == 3)
}, },
importWarehouseList(){ importWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3) return this.warehouseList.filter((item) => item.tradeType == 1 || item.tradeType == 3)
}, },
combinedQueryParams(){ combinedQueryParams() {
let timeParams = {} let timeParams = {}
if(this.dateFilterType && this.dateFilter){ if (this.dateFilterType && this.dateFilter) {
timeParams['begin' + this.dateFilterType] = this.dateFilter[0] timeParams["begin" + this.dateFilterType] = this.dateFilter[0]
timeParams['end' + this.dateFilterType] = this.dateFilter[1] timeParams["end" + this.dateFilterType] = this.dateFilter[1]
} }
let queryParams = {...this.queryParams} let queryParams = { ...this.queryParams }
if (this.noParam.value) { if (this.noParam.value) {
queryParams[this.noParam.key] = this.noParam.value; queryParams[this.noParam.key] = this.noParam.value
} }
//目的国 //目的国
if (this.destCountryId != null && this.destCountryId != "") { if (this.destCountryId != null && this.destCountryId != "") {
queryParams.destCountryIds = this.destCountryId; queryParams.destCountryIds = this.destCountryId
} }
//目的城市 //目的城市
if (this.objectiveId != null && this.objectiveId != "") { if (this.objectiveId != null && this.objectiveId != "") {
queryParams.objectiveIds = this.objectiveId; queryParams.objectiveIds = this.objectiveId
} }
//目的仓 //目的仓
if (this.destWarehouseId != null && this.destWarehouseId != "") { if (this.destWarehouseId != null && this.destWarehouseId != "") {
queryParams.destWarehouseIds = this.destWarehouseId; queryParams.destWarehouseIds = this.destWarehouseId
} }
// 提货率 // 提货率
if (this.pickRatio.value) { if (this.pickRatio.value) {
queryParams[this.pickRatio.key] = 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 queryParams[this.releaseRatio.key] = this.releaseRatio.value
} }
if(this.prodParam.value){ if (this.prodParam.value) {
queryParams[this.prodParam.key] = this.prodParam.value queryParams[this.prodParam.key] = this.prodParam.value
} }
if(queryParams.statusList?.length){ if (queryParams.statusList?.length) {
queryParams.statusString = queryParams.statusList.join(",") queryParams.statusString = queryParams.statusList.join(",")
delete queryParams.statusList delete queryParams.statusList
} }
...@@ -535,82 +414,58 @@ export default { ...@@ -535,82 +414,58 @@ export default {
deep: true, //深度监听 deep: true, //深度监听
handler() { handler() {
//每当值省份值改变时其下地区值进行清空 //每当值省份值改变时其下地区值进行清空
this.AddressCity = []; this.AddressCity = []
this.AddressTown = []; this.AddressTown = []
this.objectiveId = ""; this.objectiveId = ""
this.destWarehouseId = ""; this.destWarehouseId = ""
this.findByprovinceCode(); this.findByprovinceCode()
if (this.destCountryId == "") { if (this.destCountryId == "") {
this.getAddressCity() this.getAddressCity()
this.getAddressTown() this.getAddressTown()
} else if ( } else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown() this.getAddressTown()
} }
}, }
}, },
objectiveId: { objectiveId: {
deep: true, //深度监听 deep: true, //深度监听
handler() { handler() {
this.AddressTown = []; this.AddressTown = []
this.destWarehouseId = ""; this.destWarehouseId = ""
this.findBycityCode(); this.findBycityCode()
if ( if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
} else if ( } else if (this.destCountryId == "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.destCountryId == "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown() this.getAddressTown()
} else if ( } else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.destCountryId != "" && this.findByprovinceCode()
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.findByprovinceCode();
this.getAddressTown() this.getAddressTown()
} }
}, }
}, },
destWarehouseId: { destWarehouseId: {
deep: true, //深度监听 deep: true, //深度监听
handler() { handler() {
if ( if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
this.findBycityCode(); this.findBycityCode()
} else if ( } else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown() this.getAddressTown()
} }
}, }
}, }
}, },
activated(){ activated() {
// 要求保留页码 https://zentao.test.jdshangmen.com/bug-view-3079.html // 要求保留页码 https://zentao.test.jdshangmen.com/bug-view-3079.html
this.getList() this.getList()
}, },
created() { created() {
this.getList(); this.getList()
getProductAttrList().then(res => this.productAttrList = res.data) getProductAttrList().then((res) => (this.productAttrList = res.data))
// getTradeCityList().then(res => this.tradeCityList = res.data) // getTradeCityList().then(res => this.tradeCityList = res.data)
getWarehouseList().then(res => this.warehouseList = res.data) getWarehouseList().then((res) => (this.warehouseList = res.data))
getChannelList().then(res => this.channelList = res.data) getChannelList().then((res) => (this.channelList = res.data))
this.getAddressProvince() this.getAddressProvince()
this.getAddressCity() this.getAddressCity()
this.getAddressTown() this.getAddressTown()
...@@ -618,102 +473,108 @@ export default { ...@@ -618,102 +473,108 @@ export default {
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true
// 执行查询 // 执行查询
getCargoControlOrderPage(this.combinedQueryParams).then(response => { getCargoControlOrderPage(this.combinedQueryParams).then((response) => {
this.list = [] this.list = []
// 直接更细数据,可能因为elTable的部分渲染产生bug,比如权限控制异常 // 直接更细数据,可能因为elTable的部分渲染产生bug,比如权限控制异常
this.$nextTick( () => { this.$nextTick(() => {
this.list = response.data.list; this.list = response.data.list
this.total = response.data.total; this.total = response.data.total
}) })
this.loading = false; this.loading = false
}); })
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.page = 1; this.queryParams.page = 1
this.$nextTick(this.getList) this.$nextTick(this.getList)
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm")
this.prodParam.value = '' this.prodParam.value = ""
this.releaseRatio.value = '' this.releaseRatio.value = ""
this.pickRatio.value = '' this.pickRatio.value = ""
this.handleQuery(); this.handleQuery()
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
// 处理查询参数 // 处理查询参数
// 执行导出 // 执行导出
this.$modal.confirm('是否确认导出所有订单数据项?').then(() => { this.$modal
this.exportLoading = true; .confirm("是否确认导出所有订单数据项?")
return exportCargoControl(this.combinedQueryParams); .then(() => {
}).then(response => { this.exportLoading = true
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载')) return exportCargoControl(this.combinedQueryParams)
this.exportLoading = false; })
}).catch(() => { }); .then((response) => {
this.$message.success(this.$t("已加入导出队列,请稍后在下载日志中下载"))
this.exportLoading = false
})
.catch(() => {})
}, },
// 表格多选 // 表格多选
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.orderId) this.ids = selection.map((item) => item.orderId)
this.single = selection.length !== 1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
toDetail(row){ toDetail(row) {
this.$router.push('cargo_control/detail?id=' + row.orderId) 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) return this.toDetail(row)
} }
this.$confirm('已核实放货信息,确认放货?') this.$confirm("已核实放货信息,确认放货?")
.then(res => { .then((res) => {
return orderReview(row.orderId) return orderReview(row.orderId)
}) })
.then(res => { .then((res) => {
this.$message.success('操作成功') this.$message.success("操作成功")
this.getList() this.getList()
}) })
}, },
// 批量复核 // 批量复核
batchReview(){ batchReview() {
this.$confirm(this.$t('确定复核选中的订单么?')).then(() => { this.$confirm(this.$t("确定复核选中的订单么?"))
return batchReview("orderIds=" + this.ids.join(',')) .then(() => {
}).then(() => { return batchReview("orderIds=" + this.ids.join(","))
this.$message.success(this.$t('操作成功')) })
this.getList() .then(() => {
}) this.$message.success(this.$t("操作成功"))
this.getList()
})
}, },
cargoTransfer(row){ cargoTransfer(row) {
getPickRleaseInfo(row.orderId).then(res => { getPickRleaseInfo(row.orderId).then((res) => {
if(res.data.cargoControlPickBackVOList && res.data.cargoControlPickBackVOList.length > 1){ if (res.data.cargoControlPickBackVOList && res.data.cargoControlPickBackVOList.length > 1) {
this.toDetail(row) this.toDetail(row)
} }
this.pickInfo = res.data.cargoControlPickBackVOList[0] this.pickInfo = res.data.cargoControlPickBackVOList[0]
this.showTransferCargoOrderId=row.orderId this.showTransferCargoOrderId = row.orderId
}) })
}, },
onReleaseSuccess(){ onReleaseSuccess() {
this.showReleaseOrderId = null this.showReleaseOrderId = null
this.getList() this.getList()
}, },
onFallbackSuccess(){ onFallbackSuccess() {
this.showFallbackOrder = null this.showFallbackOrder = null
this.getList() this.getList()
}, },
onTransferCargoSuccess(){ onTransferCargoSuccess() {
this.showTransferCargoOrderId = null this.showTransferCargoOrderId = null
this.getList() this.getList()
}, },
// 修改放货审批限制成功 // 修改放货审批限制成功
onUpdateReleaseLimitSuccess(){ onUpdateReleaseLimitSuccess() {
this.showUpdateReleaseLimit = null this.showUpdateReleaseLimit = null
this.getList() this.getList()
}, },
...@@ -722,39 +583,39 @@ export default { ...@@ -722,39 +583,39 @@ export default {
this.countryList = response.data; this.countryList = response.data;
})*/ })*/
getRegionList(1, 1).then(({ data }) => { getRegionList(1, 1).then(({ data }) => {
this.AddressProvince = data; this.AddressProvince = data
}) })
}, },
getAddressCity() { getAddressCity() {
getRegionList(4, 4).then(({ data }) => { getRegionList(4, 4).then(({ data }) => {
this.AddressCity = data; this.AddressCity = data
}) })
}, },
getAddressTown() { getAddressTown() {
getRegionList(5, 5).then(({ data }) => { getRegionList(5, 5).then(({ data }) => {
this.AddressTown = data; this.AddressTown = data
}) })
}, },
findByprovinceCode() { findByprovinceCode() {
if (this.destCountryId != null && this.destCountryId != '') { if (this.destCountryId != null && this.destCountryId != "") {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode //获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId).then(({ data }) => { getRegionList(2, this.destCountryId).then(({ data }) => {
this.AddressCity = data; this.AddressCity = data
}) })
} }
}, },
findBycityCode() { findBycityCode() {
if (this.objectiveId != null && this.objectiveId != '') { if (this.objectiveId != null && this.objectiveId != "") {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId).then(({ data }) => { getRegionList(3, this.objectiveId).then(({ data }) => {
this.AddressTown = data; this.AddressTown = data
}) })
} }
}, },
// 自动去除空格 // 自动去除空格
replaceSpace(obj, field){ replaceSpace(obj, field) {
obj[field] = obj[field].replace(/\s+/g, ''); obj[field] = obj[field].replace(/\s+/g, "")
} }
} }
}; }
</script> </script>
<template> <template>
<div class="app-container" v-if="detail"> <div class="app-container" v-if="detail">
<div class="page-title">{{$t('控货订单')}}</div> <div class="page-title">{{ $t("控货订单") }}</div>
<el-form ref="elForm" :model="formData" :rules="rules" size="small" label-width="100px" > <el-form ref="elForm" :model="formData" :rules="rules" size="small" label-width="100px">
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('订单号')"> <el-form-item :label="$t('订单号')">
{{detail.orderNo}} {{ detail.orderNo }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('总控货数')"> <el-form-item :label="$t('总控货数')">
{{detail.sumNum}} {{ detail.sumNum }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('体积')"> <el-form-item :label="$t('体积')"> {{ detail.sumVolume }}</el-form-item>
{{detail.sumVolume}} </el-col>
</el-form-item> <el-col :span="6">
</el-col> <el-form-item :label="$t('重量')"> {{ detail.sumWeight }} kg </el-form-item>
<el-col :span="6"> </el-col>
<el-form-item :label="$t('重量')"> <el-col :span="6">
{{detail.sumWeight}} kg <el-form-item :label="$t('可放货箱数')">
</el-form-item> {{ detail.sumNum - detail.releaseNum }}
</el-col> </el-form-item>
<el-col :span="6"> </el-col>
<el-form-item :label="$t('可放货箱数')"> <el-col :span="6">
{{detail.sumNum - detail.releaseNum}} <el-form-item :label="$t('已放货箱数')">
</el-form-item> {{ detail.releaseNum }}
</el-col> </el-form-item>
<el-col :span="6"> </el-col>
<el-form-item :label="$t('已放货箱数')"> </el-row>
{{detail.releaseNum}} </el-form>
</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 :data="detail.cargoControlPickBackVOList || []" border>
<el-table-column :label="$t('序号')" width="50px"> <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>
<el-table-column :label="$t('收货人')" prop="consigneeName" /> <el-table-column :label="$t('收货人')" prop="consigneeName" />
<el-table-column :label="$t('收货人电话')" prop="consigneePhone"> <el-table-column :label="$t('收货人电话')" prop="consigneePhone">
<template slot-scope="{row}"> <template slot-scope="{ row }"> +{{ row.consigneeCountryCode }} {{ row.consigneePhone }} </template>
+{{row.consigneeCountryCode}} {{row.consigneePhone}} </el-table-column>
</template> <el-table-column :label="$t('控货箱数')" prop="controlNum"></el-table-column>
</el-table-column> <el-table-column :label="$t('放货箱数')" prop="pickNum"></el-table-column>
<el-table-column :label="$t('控货箱数')" prop="controlNum"></el-table-column> <el-table-column :label="$t('体积') + '(m³)'" prop="pickVolume"></el-table-column>
<el-table-column :label="$t('放货箱数')" prop="pickNum"></el-table-column> <el-table-column :label="$t('提单号')" prop="tidanNo"></el-table-column>
<el-table-column :label="$t('体积') + '(m³)'" prop="pickVolume"></el-table-column> <el-table-column :label="$t('备注')" prop="remarks"></el-table-column>
<el-table-column :label="$t('提单号')" prop="tidanNo"></el-table-column> <el-table-column :label="$t('操作人')" prop="operator"></el-table-column>
<el-table-column :label="$t('备注')" prop="remarks"></el-table-column> <el-table-column :label="$t('放货日期')" prop="createTime">
<el-table-column :label="$t('操作人')" prop="operator"></el-table-column> <template slot-scope="{ row }">
<el-table-column :label="$t('放货日期')" prop="createTime"> {{ row.createTime | parseTime }}
<template slot-scope="{row}"> </template>
{{row.createTime|parseTime}} </el-table-column>
</template> <el-table-column :label="$t('复核日期')" prop="createTime">
</el-table-column> <template slot-scope="{ row }">
<el-table-column :label="$t('复核日期')" prop="createTime"> {{ row.checkTime | parseTime }}
<template slot-scope="{row}"> </template>
{{row.checkTime|parseTime}} </el-table-column>
</template> <el-table-column :label="$t('状态')" prop="status">
</el-table-column> <template slot-scope="{ row }">
<el-table-column :label="$t('状态')" prop="status"> <dict-tag :type="DICT_TYPE.ECW_RELEASE_STATUS" :value="row.status" />
<template slot-scope="{row}"> </template>
<dict-tag :type="DICT_TYPE.ECW_RELEASE_STATUS" :value="row.status" /> </el-table-column>
</template> <el-table-column :label="$t('操作')" width="300px">
</el-table-column> <template slot-scope="scope">
<el-table-column :label="$t('操作')" width="300px"> <el-button v-if="scope.row.status == 1" type="primary" size="mini" @click="editIndex = scope.$index">{{ $t("修改") }}</el-button>
<template slot-scope="scope"> <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="primary" size="mini" @click="editIndex=scope.$index">{{$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 == 1" type="danger" size="mini" @click="cancelCargoPickId = 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 == 1" type="success" size="mini" @click="review(scope.row.id)">{{$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 == 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="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="danger" size="mini" @click="cancelApproval(scope.row.id)">{{ $t("取消审核") }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <div class="page-title">{{ $t('历史放货记录') }}</div> <!-- <div class="page-title">{{ $t('历史放货记录') }}</div>
<el-table :data="[1]" border> <el-table :data="[1]" border>
<el-table-column :label="$t('序号')" width="50px"> <el-table-column :label="$t('序号')" width="50px">
...@@ -112,120 +106,109 @@ ...@@ -112,120 +106,109 @@
<el-input v-model="formData.field110" :placeholder="$t('请输入收货人邮箱')" clearable></el-input> <el-input v-model="formData.field110" :placeholder="$t('请输入收货人邮箱')" clearable></el-input>
</el-table-column> </el-table-column>
</el-table> --> </el-table> -->
<fallback v-if="fallbackIndex !== null" :order="detail" :index="fallbackIndex" @close="fallbackIndex=null" @success="onFallbackSuccess" /> <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" /> <edit v-if="editIndex !== null" @close="editIndex = null" :order="detail" :index="editIndex" @success="onEditSuccess" />
<transfer-cargo <transfer-cargo v-if="cargoControlPickId !== null" :order-id="detail.orderId" :cargo-control-pick-id="cargoControlPickId" @close="cargoControlPickId = null" @success="onTransferCargoSuccess" />
v-if="cargoControlPickId !== null" <cancel-cargo v-if="!!cancelCargoPickId" :order="detail" :cargo-control-pick-id="cancelCargoPickId" @close="cancelCargoPickId = null" @success="onCancelCargoSuccess" />
:order-id="detail.orderId" </div>
: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> </template>
<script> <script>
import edit from './components/CargoControlEdit.vue' import edit from "./components/CargoControlEdit.vue"
import {createPick, getPickRleaseInfo, review, cancel, cancelApproval} from '@/api/ecw/orderCargoControl' import { createPick, getPickRleaseInfo, review, cancel, cancelApproval } from "@/api/ecw/orderCargoControl"
import {parseTime} from '@/utils/ruoyi' import { parseTime } from "@/utils/ruoyi"
import Fallback from './components/Fallback' import Fallback from "./components/Fallback"
import TransferCargo from '@/views/ecw/order/components/TransferCargo' import TransferCargo from "@/views/ecw/order/components/TransferCargo"
import CancelCargo from './components/CancelCargo.vue' import CancelCargo from "./components/CancelCargo.vue"
export default { export default {
filters: {parseTime}, filters: { parseTime },
components: {edit, Fallback, TransferCargo, CancelCargo, CancelCargo}, components: { edit, Fallback, TransferCargo, CancelCargo, CancelCargo },
data(){ data() {
return { return {
detail: null, detail: null,
formData:{}, formData: {},
rules: {}, rules: {},
editIndex: null, // 修改索引 editIndex: null, // 修改索引
fallbackIndex: null, // 反复核索引 fallbackIndex: null, // 反复核索引
cargoControlPickId: null, // 调货ID cargoControlPickId: null, // 调货ID
cancelCargoPickId: null, // 取消返货ID cancelCargoPickId: null // 取消返货ID
} }
},
created() {
this.loadData()
},
methods: {
loadData() {
console.log("loadData")
getPickRleaseInfo(this.$route.query.id).then((res) => (this.detail = res.data))
}, },
created(){ review(id) {
this.loadData() this.$confirm(this.$t("已核实放货信息,确认放货?"))
.then((res) => {
return review(id)
})
.then((res) => {
this.$message.success(this.$t("操作成功"))
this.loadData()
})
}, },
methods:{ unReview() {},
loadData(){ cancel(id) {
console.log('loadData') this.$confirm(this.$t("确定取消这条放货么?"))
getPickRleaseInfo(this.$route.query.id).then(res => this.detail = res.data) .then((res) => {
}, return cancel(id)
review(id){ })
this.$confirm(this.$t('已核实放货信息,确认放货?')) .then((res) => {
.then(res => { this.$message.success(this.$t("操作成功"))
return review(id) this.loadData()
}) })
.then(res => { },
this.$message.success(this.$t('操作成功')) onEditSuccess() {
this.loadData() console.log("onEditSuccess")
}) this.loadData()
}, this.editIndex = null
unReview(){ },
onFallbackSuccess() {
}, this.fallbackIndex = null
cancel(id){ this.loadData()
this.$confirm(this.$t('确定取消这条放货么?')) },
.then(res => { // 查看审核详情
return cancel(id) showApprovalDetail(formId) {
}) this.$router.push("/bpm/process-instance/detail?id=" + formId)
.then(res => { },
this.$message.success(this.$t('操作成功')) // 取消审核
this.loadData() cancelApproval(id) {
}) this.$confirm(this.$t("确定取消此申请么?"))
}, .then((res) => {
onEditSuccess(){ let approvalId = this.getApproval(id)
console.log('onEditSuccess') return cancelApproval(approvalId, { reason: this.$t("") })
this.loadData() })
this.editIndex = null .then((res) => {
}, this.$message.success(this.$t("操作成功"))
onFallbackSuccess(){ this.loadData()
this.fallbackIndex = null })
this.loadData() },
}, // 根据id查找审核id
// 查看审核详情 getApproval(id, field = "orderApprovalId") {
showApprovalDetail(formId){ if (!this.detail.orderApprovalBackVOList || !this.detail.orderApprovalBackVOList.length) {
this.$router.push('/bpm/process-instance/detail?id=' + formId) this.$message.error(this.$t("未找到审批ID"))
}, Promise.reject(this.$t("未找到审批ID"))
// 取消审核 }
cancelApproval(id){ let item = this.detail.orderApprovalBackVOList.find((item) => {
this.$confirm(this.$t('确定取消此申请么?')) let details = JSON.parse(item.details)
.then(res => { return details.cargoControlPickId == id && details.applyStatus == 1
let approvalId = this.getApproval(id) })
return cancelApproval(approvalId, {reason: this.$t('')}) console.log({ item })
}) return item[field]
.then(res => { },
this.$message.success(this.$t('操作成功')) onTransferCargoSuccess() {
this.loadData() this.cargoControlPickId = null
}) this.loadData()
}, },
// 根据id查找审核id onCancelCargoSuccess() {
getApproval(id, field = 'orderApprovalId'){ this.cancelCargoPickId = null
if(!this.detail.orderApprovalBackVOList || !this.detail.orderApprovalBackVOList.length){ this.loadData()
this.$message.error(this.$t('未找到审批ID'))
Promise.reject(this.$t('未找到审批ID'))
}
let item = this.detail.orderApprovalBackVOList.find(item => {
let details = JSON.parse(item.details)
return details.cargoControlPickId == id && details.applyStatus == 1
})
console.log({item})
return item[field]
},
onTransferCargoSuccess(){
this.cargoControlPickId = null
this.loadData()
},
onCancelCargoSuccess(){
this.cancelCargoPickId = null
this.loadData()
}
} }
}
} }
</script> </script>
<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>
...@@ -4,78 +4,35 @@ ...@@ -4,78 +4,35 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item :label="$t('日期筛选')"> <el-form-item :label="$t('日期筛选')">
<dict-selector defaultable :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" class="w-100 mr-10" /> <dict-selector defaultable :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" class="w-100 mr-10" />
<el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"></el-date-picker> <el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"></el-date-picker>
</el-form-item> </el-form-item>
<div> <div>
<el-form-item :label="$t('始发仓')" prop="startWarehouseIds"> <el-form-item :label="$t('始发仓')" prop="startWarehouseIds">
<el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable @change="handleQuery"> <el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable @change="handleQuery">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的国')" prop="destCountryId"> <el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select <el-select v-model="destCountryId" multiple :label="destCountryId" :placeholder="$t('请选择目的国')" clearable @change="handleQuery">
v-model="destCountryId" <el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
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-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的城市')" prop="objectiveId"> <el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select <el-select v-model="objectiveId" multiple :placeholder="$t('请选择目的城市')" style="width: 200px" clearable @change="handleQuery">
v-model="objectiveId" <el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
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-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId"> <el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select <el-select v-model="destWarehouseId" multiple :placeholder="$t('请选择目的仓')" style="width: 200px" clearable @change="handleQuery">
v-model="destWarehouseId" <el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
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-select>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item :label="$t('客户经理')"> <el-form-item :label="$t('客户经理')">
<user-selector <user-selector manage v-model="queryParams.salesmanIds" multiple clearable @change="handleQuery" :prepend="{ id: 0, nickname: $t('未分配客户经理') }" />
manage
v-model="queryParams.salesmanIds"
multiple
clearable
@change="handleQuery"
:prepend="{ id: 0, nickname: $t('未分配客户经理') }"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportId" v-show="showSearch"> <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>
<el-form-item :label="$t('出货渠道')" prop="channelIds"> <el-form-item :label="$t('出货渠道')" prop="channelIds">
<selector clearable :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelIds" multiple></selector> <selector clearable :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelIds" multiple></selector>
...@@ -84,16 +41,15 @@ ...@@ -84,16 +41,15 @@
<el-input v-model="queryParams.orderNo" :placeholder="$t('订单编号')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" /> <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>
<el-form-item :label="$t('商品')" prop="prodId" v-show="showSearch"> <el-form-item :label="$t('商品')" prop="prodId" v-show="showSearch">
<product-selector v-model="queryParams.prodId" @keyup.enter.native="handleQuery" clearable @change="handleQuery" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" /> <product-selector v-model="queryParams.prodId" @keyup.enter.native="handleQuery" clearable @change="handleQuery" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('控货状态')" prop="isCargoControl"> <el-form-item :label="$t('控货状态')" prop="isCargoControl">
<dict-selector v-model="queryParams.cargoControlStatusList" multiple :type="DICT_TYPE.CONTROL_GOODS_STATUS" clearable @change="handleQuery" /> <dict-selector v-model="queryParams.cargoControlStatusList" multiple :type="DICT_TYPE.CONTROL_GOODS_STATUS" clearable @change="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('订单状态')" prop="statusList" v-show="showSearch"> <el-form-item :label="$t('订单状态')" prop="statusList" v-show="showSearch">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" multiple v-model="queryParams.statusList" <dict-selector :type="DICT_TYPE.ORDER_STATUS" multiple v-model="queryParams.statusList" @keyup.enter.native="handleQuery" clearable @change="handleQuery" />
@keyup.enter.native="handleQuery" clearable @change="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('提单号')" prop="tidanNo"> <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, '')" /> <el-input v-model="queryParams.tidanNo" :placeholder="$t('提单号')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('发货人')" prop="consignorKey"> <el-form-item :label="$t('发货人')" prop="consignorKey">
...@@ -112,13 +68,7 @@ ...@@ -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-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>
<el-form-item :label="$t('备案属性')" prop="productRecords" v-show="showSearch"> <el-form-item :label="$t('备案属性')" prop="productRecords" v-show="showSearch">
<dict-selector <dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" multiple v-model="queryParams.productRecords" clearable @change="handleQuery" />
:type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE"
multiple
v-model="queryParams.productRecords"
clearable
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('外部仓')" prop="isExternalWarehouse" v-show="showSearch"> <el-form-item :label="$t('外部仓')" prop="isExternalWarehouse" v-show="showSearch">
<el-select v-model="queryParams.isExternalWarehouse" :placeholder="$t('请选择')" clearable @change="handleQuery"> <el-select v-model="queryParams.isExternalWarehouse" :placeholder="$t('请选择')" clearable @change="handleQuery">
...@@ -127,14 +77,14 @@ ...@@ -127,14 +77,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('增值服务')" prop="type" v-show="showSearch"> <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="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option> <el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option> <el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<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-item>
</el-form> </el-form>
...@@ -147,84 +97,98 @@ ...@@ -147,84 +97,98 @@
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <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"> <template slot-scope="scope">
<router-link :to="`detail?orderId=` + scope.row.orderId">{{ scope.row.orderNo }}</router-link> <router-link :to="`detail?orderId=` + scope.row.orderId">{{ scope.row.orderNo }}</router-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('唛头')" align="center" prop="marks" /> <el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('箱数')" align="center" prop="sumNum" > <el-table-column :label="$t('箱数')" align="center" prop="sumNum">
<template v-slot="{row}"> <template v-slot="{ row }">
{{row.sumNum > 0 ? row.sumNum : row.totalNum}} {{ row.sumNum > 0 ? row.sumNum : row.totalNum }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('已放箱数')" align="center" prop="sumWeight"> <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>
<el-table-column :label="$t('订单状态')" align="left" prop="status"> <el-table-column :label="$t('订单状态')" align="left" prop="status">
<template slot-scope="{row}"> <template slot-scope="{ row }">
{{row.statusMsg}} {{ row.statusMsg }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('已卸柜/已到仓时间')" align="center" prop="unloadTime" /> <el-table-column :label="$t('已卸柜/已到仓时间')" align="center" prop="unloadTime" />
<el-table-column :label="$t('提单号')" align="center" prop="status"> <el-table-column :label="$t('提单号')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.tidanNo}} {{ scope.row.tidanNo }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('放货人')" align="center" prop="sumWeight"> <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>
<el-table-column :label="$t('控货状态')" align="center" prop="transportId"> <el-table-column :label="$t('控货状态')" align="center" prop="transportId">
<template slot-scope="{row}"> <template slot-scope="{ row }">
<template v-if="row.cargoControlStatus == 1 && row.isToReview">{{$t('放货中')}}</template> <template v-if="row.cargoControlStatus == 1 && row.isToReview">{{ $t("放货中") }}</template>
<dict-tag v-else :type="DICT_TYPE.CONTROL_GOODS_STATUS" :value="row.cargoControlStatus" /> <dict-tag v-else :type="DICT_TYPE.CONTROL_GOODS_STATUS" :value="row.cargoControlStatus" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="150px"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="150px">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
@pagination="getList" />
<transfer v-if="showTransferOrder" v-bind="showTransferOrder" @close="showTransferOrder=null" /> <transfer v-if="showTransferOrder" v-bind="showTransferOrder" @close="showTransferOrder = null" />
<release v-if="showReleaseOrderId" :order-id="showReleaseOrderId" @close="showReleaseOrderId=null" @success="onReleaseSuccess" /> <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" /> <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" /> <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> </div>
</template> </template>
<script> <script>
import Selector from '@/components/Selector' import Selector from "@/components/Selector"
import ProductSelector from '@/components/ProductSelector' import ProductSelector from "@/components/ProductSelector"
import { getProductAttrList } from '@/api/ecw/productAttr' import { getProductAttrList } from "@/api/ecw/productAttr"
import CustomerSelector from '@/components/CustomerSelector' import CustomerSelector from "@/components/CustomerSelector"
/* import { getTradeCityList } from '@/api/ecw/region' */ /* import { getTradeCityList } from '@/api/ecw/region' */
import Transfer from '@/views/ecw/order/components/Transfer' import Transfer from "@/views/ecw/order/components/Transfer"
import Release from './components/Release' import Release from "./components/Release"
import CargoControlEdit from './components/CargoControlEdit' import CargoControlEdit from "./components/CargoControlEdit"
import { getWarningCargoControlOrderPage, batchReview, orderReview, getPickRleaseInfo, exportCargoControl } from "@/api/ecw/orderCargoControl" import { getWarningCargoControlOrderPage, batchReview, orderReview, getPickRleaseInfo, exportCargoControl } from "@/api/ecw/orderCargoControl"
import TransferCargo from '@/views/ecw/order/components/TransferCargo' import TransferCargo from "@/views/ecw/order/components/TransferCargo"
import Fallback from './components/Fallback' import Fallback from "./components/Fallback"
import {getWarehouseList} from '@/api/ecw/warehouse' import { getWarehouseList } from "@/api/ecw/warehouse"
import CargoLogList from "@/views/ecw/order/components/CargoLogList.vue"; import CargoLogList from "@/views/ecw/order/components/CargoLogList.vue"
import {getRegionList} from "@/api/ecw/order" import { getRegionList } from "@/api/ecw/order"
import UserSelector from "@/components/UserSelector"; import UserSelector from "@/components/UserSelector"
import {getChannelList} from "@/api/ecw/channel"; import { getChannelList } from "@/api/ecw/channel"
export default { export default {
name: "EcwOrderWarningCargocontrol", name: "EcwOrderWarningCargocontrol",
components: { components: {
CargoLogList, CargoLogList,
UserSelector, 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() { data() {
return { return {
...@@ -253,10 +217,10 @@ export default { ...@@ -253,10 +217,10 @@ export default {
}, },
tradeCityList: [], tradeCityList: [],
warehouseList: [], warehouseList: [],
productAttrList: [], // 商品属性 productAttrList: [], // 商品属性
molecule: '', //重货比分子 molecule: "", //重货比分子
denominator: '', //重货比分母 denominator: "", //重货比分母
dateFilterType: '', //日期筛选类别 dateFilterType: "", //日期筛选类别
dateFilter: [], //筛选日期 dateFilter: [], //筛选日期
showTransferOrder: null, // 控制权转移操作订单 showTransferOrder: null, // 控制权转移操作订单
showReleaseOrderId: null, // 放货ID showReleaseOrderId: null, // 放货ID
...@@ -271,39 +235,40 @@ export default { ...@@ -271,39 +235,40 @@ export default {
destCountryId: null, destCountryId: null,
objectiveId: null, objectiveId: null,
destWarehouseId: null, destWarehouseId: null,
}; showUpdateReleaseType: null
}
}, },
computed: { computed: {
expoerCityList() { expoerCityList() {
return this.tradeCityList.filter(item => item.type == 2) return this.tradeCityList.filter((item) => item.type == 2)
}, },
importCityList() { importCityList() {
return this.tradeCityList.filter(item => item.type == 1) return this.tradeCityList.filter((item) => item.type == 1)
}, },
exportWarehouseList(){ exportWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3) return this.warehouseList.filter((item) => item.tradeType == 2 || item.tradeType == 3)
}, },
importWarehouseList(){ importWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3) return this.warehouseList.filter((item) => item.tradeType == 1 || item.tradeType == 3)
}, },
combinedQueryParams(){ combinedQueryParams() {
let timeParams = {} let timeParams = {}
if(this.dateFilterType && this.dateFilter){ if (this.dateFilterType && this.dateFilter) {
timeParams['begin' + this.dateFilterType] = this.dateFilter[0] timeParams["begin" + this.dateFilterType] = this.dateFilter[0]
timeParams['end' + this.dateFilterType] = this.dateFilter[1] timeParams["end" + this.dateFilterType] = this.dateFilter[1]
} }
let queryParams = {} let queryParams = {}
//目的国 //目的国
if (this.destCountryId != null && this.destCountryId != "") { if (this.destCountryId != null && this.destCountryId != "") {
queryParams.destCountryIds = this.destCountryId; queryParams.destCountryIds = this.destCountryId
} }
//目的城市 //目的城市
if (this.objectiveId != null && this.objectiveId != "") { if (this.objectiveId != null && this.objectiveId != "") {
queryParams.objectiveIds = this.objectiveId; queryParams.objectiveIds = this.objectiveId
} }
//目的仓 //目的仓
if (this.destWarehouseId != null && this.destWarehouseId != "") { if (this.destWarehouseId != null && this.destWarehouseId != "") {
queryParams.destWarehouseIds = this.destWarehouseId; queryParams.destWarehouseIds = this.destWarehouseId
} }
return Object.assign({}, this.queryParams, timeParams, queryParams) return Object.assign({}, this.queryParams, timeParams, queryParams)
} }
...@@ -314,82 +279,58 @@ export default { ...@@ -314,82 +279,58 @@ export default {
deep: true, //深度监听 deep: true, //深度监听
handler() { handler() {
//每当值省份值改变时其下地区值进行清空 //每当值省份值改变时其下地区值进行清空
this.AddressCity = []; this.AddressCity = []
this.AddressTown = []; this.AddressTown = []
this.objectiveId = ""; this.objectiveId = ""
this.destWarehouseId = ""; this.destWarehouseId = ""
this.findByprovinceCode(); this.findByprovinceCode()
if (this.destCountryId == "") { if (this.destCountryId == "") {
this.getAddressCity() this.getAddressCity()
this.getAddressTown() this.getAddressTown()
} else if ( } else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown() this.getAddressTown()
} }
}, }
}, },
objectiveId: { objectiveId: {
deep: true, //深度监听 deep: true, //深度监听
handler() { handler() {
this.AddressTown = []; this.AddressTown = []
this.destWarehouseId = ""; this.destWarehouseId = ""
this.findBycityCode(); this.findBycityCode()
if ( if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
} else if ( } else if (this.destCountryId == "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.destCountryId == "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown() this.getAddressTown()
} else if ( } else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.destCountryId != "" && this.findByprovinceCode()
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.findByprovinceCode();
this.getAddressTown() this.getAddressTown()
} }
}, }
}, },
destWarehouseId: { destWarehouseId: {
deep: true, //深度监听 deep: true, //深度监听
handler() { handler() {
if ( if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
this.findBycityCode(); this.findBycityCode()
} else if ( } else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown() this.getAddressTown()
} }
}, }
}, }
}, },
activated(){ activated() {
// 要求保留页码 https://zentao.test.jdshangmen.com/bug-view-3079.html // 要求保留页码 https://zentao.test.jdshangmen.com/bug-view-3079.html
this.getList() this.getList()
}, },
created() { created() {
this.getList(); this.getList()
getProductAttrList().then(res => this.productAttrList = res.data) getProductAttrList().then((res) => (this.productAttrList = res.data))
// getTradeCityList().then(res => this.tradeCityList = res.data) // getTradeCityList().then(res => this.tradeCityList = res.data)
getWarehouseList().then(res => this.warehouseList = res.data) getWarehouseList().then((res) => (this.warehouseList = res.data))
getChannelList().then(res => this.channelList = res.data) getChannelList().then((res) => (this.channelList = res.data))
this.getAddressProvince() this.getAddressProvince()
this.getAddressCity() this.getAddressCity()
this.getAddressTown() this.getAddressTown()
...@@ -397,128 +338,134 @@ export default { ...@@ -397,128 +338,134 @@ export default {
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true
// 执行查询 // 执行查询
getWarningCargoControlOrderPage(this.combinedQueryParams).then(response => { getWarningCargoControlOrderPage(this.combinedQueryParams).then((response) => {
this.list = [] this.list = []
// 直接更细数据,可能因为elTable的部分渲染产生bug,比如权限控制异常 // 直接更细数据,可能因为elTable的部分渲染产生bug,比如权限控制异常
this.$nextTick( () => { this.$nextTick(() => {
this.list = response.data.list; this.list = response.data.list
this.total = response.data.total; this.total = response.data.total
}) })
this.loading = false; this.loading = false
}); })
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.page = 1; this.queryParams.page = 1
this.$nextTick(this.getList) this.$nextTick(this.getList)
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm")
this.handleQuery(); this.handleQuery()
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
// 处理查询参数 // 处理查询参数
// 执行导出 // 执行导出
this.$modal.confirm('是否确认导出所有订单数据项?').then(() => { this.$modal
this.exportLoading = true; .confirm("是否确认导出所有订单数据项?")
return exportCargoControl(this.combinedQueryParams); .then(() => {
}).then(response => { this.exportLoading = true
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载')) return exportCargoControl(this.combinedQueryParams)
this.exportLoading = false; })
}).catch(() => { }); .then((response) => {
this.$message.success(this.$t("已加入导出队列,请稍后在下载日志中下载"))
this.exportLoading = false
})
.catch(() => {})
}, },
// 表格多选 // 表格多选
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.orderId) this.ids = selection.map((item) => item.orderId)
this.single = selection.length !== 1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
toDetail(row){ toDetail(row) {
this.$router.push('cargo_control/detail?id=' + row.orderId) 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) return this.toDetail(row)
} }
this.$confirm('已核实放货信息,确认放货?') this.$confirm("已核实放货信息,确认放货?")
.then(res => { .then((res) => {
return orderReview(row.orderId) return orderReview(row.orderId)
}) })
.then(res => { .then((res) => {
this.$message.success('操作成功') this.$message.success("操作成功")
this.getList() this.getList()
}) })
}, },
// 批量复核 // 批量复核
batchReview(){ batchReview() {
this.$confirm(this.$t('确定复核选中的订单么?')).then(() => { this.$confirm(this.$t("确定复核选中的订单么?"))
return batchReview("orderIds=" + this.ids.join(',')) .then(() => {
}).then(() => { return batchReview("orderIds=" + this.ids.join(","))
this.$message.success(this.$t('操作成功')) })
this.getList() .then(() => {
}) this.$message.success(this.$t("操作成功"))
this.getList()
})
}, },
cargoTransfer(row){ cargoTransfer(row) {
getPickRleaseInfo(row.orderId).then(res => { getPickRleaseInfo(row.orderId).then((res) => {
if(res.data.cargoControlPickBackVOList && res.data.cargoControlPickBackVOList.length > 1){ if (res.data.cargoControlPickBackVOList && res.data.cargoControlPickBackVOList.length > 1) {
this.toDetail(row) this.toDetail(row)
} }
this.pickInfo = res.data.cargoControlPickBackVOList[0] this.pickInfo = res.data.cargoControlPickBackVOList[0]
this.showTransferCargoOrderId=row.orderId this.showTransferCargoOrderId = row.orderId
}) })
}, },
onReleaseSuccess(){ onReleaseSuccess() {
this.showReleaseOrderId = null this.showReleaseOrderId = null
this.getList() this.getList()
}, },
onFallbackSuccess(){ onFallbackSuccess() {
this.showFallbackOrder = null this.showFallbackOrder = null
this.getList() this.getList()
}, },
onTransferCargoSuccess(){ onTransferCargoSuccess() {
this.showTransferCargoOrderId = null this.showTransferCargoOrderId = null
this.getList() this.getList()
}, },
getAddressProvince() { getAddressProvince() {
getRegionList(1, 1).then(({ data }) => { getRegionList(1, 1).then(({ data }) => {
this.AddressProvince = data; this.AddressProvince = data
}) })
}, },
getAddressCity() { getAddressCity() {
getRegionList(4, 4).then(({ data }) => { getRegionList(4, 4).then(({ data }) => {
this.AddressCity = data; this.AddressCity = data
}) })
}, },
getAddressTown() { getAddressTown() {
getRegionList(5, 5).then(({ data }) => { getRegionList(5, 5).then(({ data }) => {
this.AddressTown = data; this.AddressTown = data
}) })
}, },
findByprovinceCode() { findByprovinceCode() {
if (this.destCountryId != null && this.destCountryId != '') { if (this.destCountryId != null && this.destCountryId != "") {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode //获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId).then(({ data }) => { getRegionList(2, this.destCountryId).then(({ data }) => {
this.AddressCity = data; this.AddressCity = data
}) })
} }
}, },
findBycityCode() { findBycityCode() {
if (this.objectiveId != null && this.objectiveId != '') { if (this.objectiveId != null && this.objectiveId != "") {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId).then(({ data }) => { getRegionList(3, this.objectiveId).then(({ data }) => {
this.AddressTown = data; this.AddressTown = data
}) })
} }
} }
} }
}; }
</script> </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