Commit 7386277b authored by 332784038@qq.com's avatar 332784038@qq.com

6

parent 541ade3b
import request from '@/utils/request'
import request from "@/utils/request"
// 获得控货分页
export function getCargoControlOrderPage(params){
return request({
url:'ecw/order-cargo-control/cargo/control/order',
method:'get',
params
})
export function getCargoControlOrderPage(params) {
return request({
url: "ecw/order-cargo-control/cargo/control/order",
method: "get",
params
})
}
export function getWarningCargoControlOrderPage(params){
export function getWarningCargoControlOrderPage(params) {
return request({
url:'ecw/order-cargo-control/warning/cargo/control/order',
method:'get',
url: "ecw/order-cargo-control/warning/cargo/control/order",
method: "get",
params
})
}
// 发送手机验证码
export function sendSmsCode(data){
return request({
url: '/ecw/order-cargo-control/send-sms-code',
method: 'post',
data
})
export function sendSmsCode(data) {
return request({
url: "/ecw/order-cargo-control/send-sms-code",
method: "post",
data
})
}
// 创建订单控货人信息
export function create(data){
return request({
url: '/ecw/order-cargo-control/create',
method: 'post',
data
})
export function create(data) {
return request({
url: "/ecw/order-cargo-control/create",
method: "post",
data
})
}
// 创建订单控货人放货记录
export function createPick(data){
export function createPick(data) {
return request({
url: '/ecw/order-cargo-control-pick/create',
method: 'post',
url: "/ecw/order-cargo-control-pick/create",
method: "post",
data
})
}
//获得控货订单放货编辑详情
export function getReleaseInfo(orderId){
export function getReleaseInfo(orderId) {
return request({
url:'/ecw/order-cargo-control/release/info/' + orderId,
method:'get'
url: "/ecw/order-cargo-control/release/info/" + orderId,
method: "get"
})
}
// 获得控货订单放货详情
export function getPickRleaseInfo(orderId){
export function getPickRleaseInfo(orderId) {
return request({
url:'/ecw/order-cargo-control-pick/release/info/' + orderId,
method:'get'
url: "/ecw/order-cargo-control-pick/release/info/" + orderId,
method: "get"
})
}
// 放货修改与反复核申请
export function updateApply(data){
export function updateApply(data) {
return request({
url: '/ecw/order-cargo-control-pick/update/apply',
method: 'put',
url: "/ecw/order-cargo-control-pick/update/apply",
method: "put",
data
})
}
// 复核(放货复核)
export function review(id){
export function review(id) {
return request({
url: '/ecw/order-cargo-control-pick/review/' + id,
method: 'put'
url: "/ecw/order-cargo-control-pick/review/" + id,
method: "put"
})
}
// 取消放货
export function cancel(id){
export function cancel(id) {
return request({
url: '/ecw/order-cargo-control-pick/cancel/' + id,
method: 'put'
url: "/ecw/order-cargo-control-pick/cancel/" + id,
method: "put"
})
}
// 取消审批
export function cancelApproval(approvalId, params){
export function cancelApproval(approvalId, params) {
return request({
url: '/ecw/order-cargo-control-pick/cancel/approval/' + approvalId,
method: 'get',
url: "/ecw/order-cargo-control-pick/cancel/approval/" + approvalId,
method: "get",
params
})
}
// 订单复核
export function orderReview(orderId){
export function orderReview(orderId) {
return request({
url: '/ecw/order-cargo-control/review/' + orderId,
method: 'put'
url: "/ecw/order-cargo-control/review/" + orderId,
method: "put"
})
}
// 根据订单id批量复合订单控货人放货
export function batchReview(data){
export function batchReview(data) {
return request({
url: '/ecw/order-cargo-control-pick/review/',
method: 'put',
url: "/ecw/order-cargo-control-pick/review/",
method: "put",
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
"Content-Type": "application/x-www-form-urlencoded"
},
data
})
}
// 获得可调货的控货订单列表
export function seasoningCondimentsSelect(params){
export function seasoningCondimentsSelect(params) {
return request({
url: '/ecw/order-cargo-control-pick/seasoning-condiments/cargo-control/order/select',
method: 'get',
url: "/ecw/order-cargo-control-pick/seasoning-condiments/cargo-control/order/select",
method: "get",
params
})
}
// 根据放货ID查询控货订单放货修改审核详情
export function getPickUpdateInfo(id){
export function getPickUpdateInfo(id) {
return request({
url: '/ecw/order-cargo-control-pick/update/info/' + id,
method: 'get'
url: "/ecw/order-cargo-control-pick/update/info/" + id,
method: "get"
})
}
// 获得控货订单放货修改申请详情 {approveId: 1}
export function getPickUpdateApproveInfo(params){
export function getPickUpdateApproveInfo(params) {
return request({
url: '/ecw/order-cargo-control-pick/update/info',
method: 'get',
url: "/ecw/order-cargo-control-pick/update/info",
method: "get",
params
})
}
export function getCondimentsIno(cargoControlPickId){
export function getCondimentsIno(cargoControlPickId) {
return request({
url: '/ecw/order-cargo-control-pick/seasoning/condiments/info/' + cargoControlPickId,
method: 'get'
url: "/ecw/order-cargo-control-pick/seasoning/condiments/info/" + cargoControlPickId,
method: "get"
})
}
// 参数搜索导出控货订单列表
export function exportCargoControl(params){
export function exportCargoControl(params) {
return request({
url: '/ecw/order/export/cargo/control/search',
method: 'get',
responseType: 'arraybuffer',
url: "/ecw/order/export/cargo/control/search",
method: "get",
responseType: "arraybuffer",
params
})
}
// 控货日志
export function getControlLogList(orderId){
export function getControlLogList(orderId) {
return request({
url: '/order/order-control-log/list/' + orderId,
method: 'get'
url: "/order/order-control-log/list/" + orderId,
method: "get"
})
}
// 控货业务审批申请
export function applyCargoControlApproval(data){
export function applyCargoControlApproval(data) {
return request({
url: 'ecw/order-cargo-control/update/apply',
method: 'put',
url: "ecw/order-cargo-control/update/apply",
method: "put",
data
})
}
//根据订单ID查询控货订单放货限制修改审核详情
export function getLimitUpdateInfo(orderId){
export function getLimitUpdateInfo(orderId) {
return request({
url: "/ecw/order-cargo-control/limit-update/info/" + orderId,
method: "get"
})
}
//根据订单ID查询海外仓模式修改审核详情
export function getReleaseTypeUpdateInfo(orderId) {
return request({
url: '/ecw/order-cargo-control/limit-update/info/' + orderId,
method: 'get'
url: "/ecw/order-cargo-control/overseas-warehouse-update/info/" + orderId,
method: "get"
})
}
<template>
<div class="app-container">
<!-- 审批信息 -->
<el-card
class="box-card"
v-loading="processInstanceLoading"
v-for="(item, index) in runningTasks"
:key="index"
>
<el-card class="box-card" v-loading="processInstanceLoading" v-for="(item, index) in runningTasks" :key="index">
<div slot="header" class="clearfix">
<span class="el-icon-picture-outline"
>{{ $t("审批任务") }}{{ item.name }}</span
>
<span class="el-icon-picture-outline">{{ $t("审批任务") }}{{ item.name }}</span>
</div>
<el-col :span="16" :offset="6">
<el-form
:ref="'form' + index"
:model="auditForms[index]"
:rules="auditRule2"
label-width="100px"
>
<el-form-item
:label="$t('流程名')"
v-if="processInstance && processInstance.name"
>
<el-form :ref="'form' + index" :model="auditForms[index]" :rules="auditRule2" label-width="100px">
<el-form-item :label="$t('流程名')" v-if="processInstance && processInstance.name">
{{ processInstance.name }}
</el-form-item>
<el-form-item
:label="$t('流程发起人')"
v-if="processInstance && processInstance.startUser"
>
<el-form-item :label="$t('流程发起人')" v-if="processInstance && processInstance.startUser">
{{ processInstance.startUser.nickname }}
<el-tag type="info" size="mini">{{
processInstance.startUser.deptName
}}</el-tag>
<el-tag type="info" size="mini">{{ processInstance.startUser.deptName }}</el-tag>
</el-form-item>
<el-form-item :label="$t('抄送人')" prop="copyUserIds">
<el-select
v-model="auditForms[index].copyUserIds"
clearable
multiple
filterable
style="width: 100%"
>
<el-option
v-for="item in userOptions"
:key="parseInt(item.id)"
:label="item.nickname"
:value="parseInt(item.id)"
/>
<el-select v-model="auditForms[index].copyUserIds" clearable multiple filterable style="width: 100%">
<el-option v-for="item in userOptions" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item :label="$t('审批建议')" prop="comment">
<el-input
type="textarea"
v-model="auditForms[index].comment"
:placeholder="$t('请输入审批建议')"
/>
<el-input type="textarea" v-model="auditForms[index].comment" :placeholder="$t('请输入审批建议')" />
</el-form-item>
</el-form>
<div style="margin-left: 10%; margin-bottom: 20px; font-size: 14px">
<el-button
:loading="loading"
icon="el-icon-edit-outline"
type="success"
size="mini"
@click="handleAudit(item, true)"
>{{ $t("通过") }}
</el-button>
<el-button
:loading="loading"
icon="el-icon-circle-close"
type="danger"
size="mini"
@click="handleAudit(item, false)"
>{{ $t("不通过") }}
</el-button>
<el-button
:loading="loading"
icon="el-icon-edit-outline"
type="primary"
size="mini"
@click="handleUpdateAssignee(item)"
>{{ $t("转办") }}
</el-button>
<el-button :loading="loading" icon="el-icon-edit-outline" type="success" size="mini" @click="handleAudit(item, true)">{{ $t("通过") }} </el-button>
<el-button :loading="loading" icon="el-icon-circle-close" type="danger" size="mini" @click="handleAudit(item, false)">{{ $t("不通过") }} </el-button>
<el-button :loading="loading" icon="el-icon-edit-outline" type="primary" size="mini" @click="handleUpdateAssignee(item)">{{ $t("转办") }} </el-button>
<!-- <el-button icon="el-icon-edit-outline" type="primary" size="mini" @click="handleDelegate(item)">{{ $t('委派') }}</el-button>-->
<!-- <el-button icon="el-icon-refresh-left" type="warning" size="mini" @click="handleBack(item)">{{ $t('退回') }}</el-button>-->
</div>
......@@ -92,46 +36,18 @@
<!-- 申请信息 -->
<el-card class="box-card mt-10" v-loading="processInstanceLoading">
<div slot="header" class="clearfix">
<span class="el-icon-document"
>{{ $t("申请信息") }}{{ processInstance.name }}</span
>
<span class="el-icon-document">{{ $t("申请信息") }}{{ processInstance.name }}</span>
</div>
<el-col
v-if="
this.processInstance.processDefinition &&
this.processInstance.processDefinition.formType === 10
"
:span="16"
:offset="6"
>
<el-col v-if="this.processInstance.processDefinition && this.processInstance.processDefinition.formType === 10" :span="16" :offset="6">
<div>
<parser
:key="new Date().getTime()"
:form-conf="detailForm"
@submit="submitForm"
/>
<parser :key="new Date().getTime()" :form-conf="detailForm" @submit="submitForm" />
</div>
</el-col>
<div
v-if="
this.processInstance.processDefinition &&
this.processInstance.processDefinition.formType === 20
"
>
<component
v-if="businessKeyToComponent"
:is="businessKeyToComponent.component"
v-bind="businessKeyToComponent"
/>
<div v-if="this.processInstance.processDefinition && this.processInstance.processDefinition.formType === 20">
<component v-if="businessKeyToComponent" :is="businessKeyToComponent.component" v-bind="businessKeyToComponent" />
<div v-else>
<router-link
:to="
this.processInstance.processDefinition.formCustomViewPath +
'?id=' +
this.processInstance.businessKey
"
>
<router-link :to="this.processInstance.processDefinition.formCustomViewPath + '?id=' + this.processInstance.businessKey">
<el-button type="primary">{{ $t("点击查看") }}</el-button>
</router-link>
</div>
......@@ -144,55 +60,23 @@
<el-col :span="16" :offset="4">
<div class="block">
<el-timeline>
<el-timeline-item
v-for="(item, index) in tasks"
:key="index"
:icon="getTimelineItemIcon(item)"
:type="getTimelineItemType(item)"
>
<el-timeline-item v-for="(item, index) in tasks" :key="index" :icon="getTimelineItemIcon(item)" :type="getTimelineItemType(item)">
<p style="font-weight: 700">{{ $t("任务") }}{{ item.name }}</p>
<el-card :body-style="{ padding: '10px' }">
<label
v-if="item.assigneeUser"
style="font-weight: normal; margin-right: 30px"
>
<label v-if="item.assigneeUser" style="font-weight: normal; margin-right: 30px">
{{ $t("审批人") }}{{ item.assigneeUser.nickname }}
<el-tag type="info" size="mini">{{
item.assigneeUser.deptName
}}</el-tag>
<el-tag type="info" size="mini">{{ item.assigneeUser.deptName }}</el-tag>
</label>
<label style="font-weight: normal"
>{{ $t("创建时间") }}</label
>
<label style="color: #8a909c; font-weight: normal">{{
parseTime(item.createTime)
}}</label>
<label
v-if="item.endTime"
style="margin-left: 30px; font-weight: normal"
>{{ $t("审批时间") }}</label
>
<label
v-if="item.endTime"
style="color: #8a909c; font-weight: normal"
>
{{ parseTime(item.endTime) }}</label
>
<label
v-if="item.durationInMillis"
style="margin-left: 30px; font-weight: normal"
>{{ $t("耗时") }}</label
>
<label
v-if="item.durationInMillis"
style="color: #8a909c; font-weight: normal"
>
<label style="font-weight: normal">{{ $t("创建时间") }}</label>
<label style="color: #8a909c; font-weight: normal">{{ parseTime(item.createTime) }}</label>
<label v-if="item.endTime" style="margin-left: 30px; font-weight: normal">{{ $t("审批时间") }}</label>
<label v-if="item.endTime" style="color: #8a909c; font-weight: normal"> {{ parseTime(item.endTime) }}</label>
<label v-if="item.durationInMillis" style="margin-left: 30px; font-weight: normal">{{ $t("耗时") }}</label>
<label v-if="item.durationInMillis" style="color: #8a909c; font-weight: normal">
{{ getDateStar(item.durationInMillis) }}
</label>
<p v-if="item.comment">
<el-tag :type="getTimelineItemType(item)">{{
item.comment
}}</el-tag>
<el-tag :type="getTimelineItemType(item)">{{ item.comment }}</el-tag>
</p>
</el-card>
</el-timeline-item>
......@@ -206,82 +90,44 @@
<div slot="header" class="clearfix">
<span class="el-icon-picture-outline">{{ $t("流程图") }}</span>
</div>
<my-process-viewer
key="designer"
v-model="bpmnXML"
v-bind="bpmnControlForm"
:activityData="activityList"
:processInstanceData="processInstance"
:taskData="tasks"
/>
<my-process-viewer key="designer" v-model="bpmnXML" v-bind="bpmnControlForm" :activityData="activityList" :processInstanceData="processInstance" :taskData="tasks" />
</el-card>
<!-- 对话框(转派审批人) -->
<el-dialog
:title="$t('转派审批人')"
:visible.sync="updateAssignee.open"
width="500px"
append-to-body
>
<el-form
ref="updateAssigneeForm"
:model="updateAssignee.form"
:rules="updateAssignee.rules"
label-width="110px"
>
<el-dialog :title="$t('转派审批人')" :visible.sync="updateAssignee.open" width="500px" append-to-body>
<el-form ref="updateAssigneeForm" :model="updateAssignee.form" :rules="updateAssignee.rules" label-width="110px">
<el-form-item :label="$t('新审批人')" prop="assigneeUserId">
<el-select
v-model="updateAssignee.form.assigneeUserId"
clearable
style="width: 100%"
>
<el-option
v-for="item in userOptions"
:key="parseInt(item.id)"
:label="item.nickname"
:value="parseInt(item.id)"
/>
<el-select v-model="updateAssignee.form.assigneeUserId" clearable style="width: 100%">
<el-option v-for="item in userOptions" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitUpdateAssigneeForm">{{
$t("确定")
}}</el-button>
<el-button @click="cancelUpdateAssigneeForm">{{
$t("取消")
}}</el-button>
<el-button type="primary" @click="submitUpdateAssigneeForm">{{ $t("确定") }}</el-button>
<el-button @click="cancelUpdateAssigneeForm">{{ $t("取消") }}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getProcessDefinitionBpmnXML } from "@/api/bpm/definition";
import { DICT_TYPE, getDictDatas } from "@/utils/dict";
import store from "@/store";
import { decodeFields } from "@/utils/formGenerator";
import Parser from "@/components/parser/Parser";
import {
createProcessInstance,
getProcessInstance,
} from "@/api/bpm/processInstance";
import {
approveTask,
getTaskListByProcessInstanceId,
rejectTask,
updateTaskAssignee,
} from "@/api/bpm/task";
import { getDate } from "@/utils/dateUtils";
import { listSimpleUsers } from "@/api/system/user";
import { getActivityList } from "@/api/bpm/activity";
import OfferSpecialDetail from "@/views/ecw/offer/components/SpecialDetail";
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
import shippingDetail from "@/views/ecw/box/shippingDetail";
import SplitDetail from "@/views/ecw/order/components/SplitDetail";
import MergeDetail from "@/views/ecw/order/components/MergeDetail";
import CargoControlDetail from "@/views/ecw/order/components/CargoControlDetail";
import BoxSplitDetail from "@/views/ecw/order/components/BoxSplitDetail";
import { getProcessDefinitionBpmnXML } from "@/api/bpm/definition"
import { DICT_TYPE, getDictDatas } from "@/utils/dict"
import store from "@/store"
import { decodeFields } from "@/utils/formGenerator"
import Parser from "@/components/parser/Parser"
import { createProcessInstance, getProcessInstance } from "@/api/bpm/processInstance"
import { approveTask, getTaskListByProcessInstanceId, rejectTask, updateTaskAssignee } from "@/api/bpm/task"
import { getDate } from "@/utils/dateUtils"
import { listSimpleUsers } from "@/api/system/user"
import { getActivityList } from "@/api/bpm/activity"
import OfferSpecialDetail from "@/views/ecw/offer/components/SpecialDetail"
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails"
import shippingDetail from "@/views/ecw/box/shippingDetail"
import SplitDetail from "@/views/ecw/order/components/SplitDetail"
import MergeDetail from "@/views/ecw/order/components/MergeDetail"
import CargoControlDetail from "@/views/ecw/order/components/CargoControlDetail"
import BoxSplitDetail from "@/views/ecw/order/components/BoxSplitDetail"
// 流程实例的详情页,可用于审批
export default {
name: "ProcessInstanceDetail",
......@@ -293,7 +139,7 @@ export default {
SplitDetail,
MergeDetail,
CargoControlDetail,
BoxSplitDetail,
BoxSplitDetail
},
computed: {
auditRule2() {
......@@ -303,385 +149,349 @@ export default {
{
required: true,
message: this.$t("审批建议不能为空"),
trigger: "blur",
},
],
};
return obj;
trigger: "blur"
}
]
}
return obj
} else {
return {};
return {}
}
},
matterNum() {
return this.$store.state.user.matterNum;
return this.$store.state.user.matterNum
},
businessKeyToComponent() {
if (
!this.processInstance.processDefinition ||
!this.processInstance.processDefinition.formCustomViewPath
) {
return false;
if (!this.processInstance.processDefinition || !this.processInstance.processDefinition.formCustomViewPath) {
return false
}
const map = {
shippingDetail: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
// 报价单特价审核,原来配置的组件名
"special-discount": {
component: "OfferSpecialDetail",
id: this.processInstance.businessKey,
type: 1,
type: 1
},
// 报价单特价审核,符合命名规则的组件名
offer_special: {
component: "OfferSpecialDetail",
id: this.processInstance.businessKey,
type: 1,
type: 1
},
offer_commission: {
component: "OfferSpecialDetail",
id: this.processInstance.businessKey,
type: 2,
type: 2
},
// 原来的费用申请
free_apply: {
component: "warehouseDetails",
processId: this.processInstance.businessKey,
type: 2,
type: 2
},
// 2.0空运加的批量申请
batch_free_apply: {
component: () =>
import("@/views/ecw/order/components/BatchFeeApplication"),
component: () => import("@/views/ecw/order/components/BatchFeeApplication"),
businessId: this.processInstance.businessKey,
processInstanceId: this.$route.query.id,
processInstanceId: this.$route.query.id
},
retired_warehouse: {
component: "warehouseDetails",
processId: this.processInstance.businessKey,
type: 3,
type: 3
},
warehouse_transfer: {
component: "warehouseDetails",
processId: this.processInstance.businessKey,
type: 1,
type: 1
},
warehouse_update: {
component: "warehouseDetails",
processId: this.processInstance.businessKey,
type: 4,
type: 4
},
container_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
trailer_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
ship_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
customs_declare_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
arrival_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
customs_clearance_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
customs_exit_part: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
customs_exit_all: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
start_port_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
book_space_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
sorting_apply_no: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
sorting_apply: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
unload_container_no: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
unload_container: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
type: "unload_container",
type: "unload_container"
},
close_container: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
type: "close_container",
type: "close_container"
},
shipment_preassemble: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
close_container_no: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
// 拆单审核
split_detail: {
component: "SplitDetail",
id: this.processInstance.businessKey,
id: this.processInstance.businessKey
},
// 出货拆单审核
shipment_split_detail: {
component: "BoxSplitDetail",
id: this.processInstance.businessKey,
id: this.processInstance.businessKey
},
// 退场拆单,跟出货装柜拆单一样
exit_split: {
component: "BoxSplitDetail",
id: this.processInstance.businessKey,
id: this.processInstance.businessKey
},
merge_detail: {
component: "MergeDetail",
id: this.processInstance.businessKey,
id: this.processInstance.businessKey
},
// 放货修改
order_update_release: {
component: "CargoControlDetail",
id: this.processInstance.businessKey,
applyType: 7,
applyType: 7
},
// 反复核
order_fallback: {
component: "CargoControlDetail",
id: this.processInstance.businessKey,
applyType: 8,
applyType: 8
},
// 调货审核
order_transfer: {
component: "CargoControlDetail",
id: this.processInstance.businessKey,
applyType: 9,
applyType: 9
},
// 取消放货审核
order_cancel_release: {
component: "CargoControlDetail",
id: this.processInstance.businessKey,
applyType: 10,
applyType: 10
},
// 提单审核
order_landing_bill: {
component: () =>
import("@/views/ecw/order/components/LandingBillDetail"),
component: () => import("@/views/ecw/order/components/LandingBillDetail"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
// 订单审核详情
order_approval: {
component: () =>
import("@/views/ecw/order/components/ApprovalDetail"),
component: () => import("@/views/ecw/order/components/ApprovalDetail"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
// 订单修改审批
order_update: {
component: () => import("@/views/ecw/order/components/UpdateDetail"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
// 预付异常审核
prepay_excetion: {
component: () =>
import("@/views/ecw/order/components/PrepayExceptionDetail"),
component: () => import("@/views/ecw/order/components/PrepayExceptionDetail"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
// 客户延期
customer_delay: {
component: () => import("@/views/ecw/customer/components/Delay"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//付款单审核-所有审核流程详情组件
finance_payment_approve: {
component: () =>
import("@/views/ecw/financial/components/PaymentApproval"),
component: () => import("@/views/ecw/financial/components/PaymentApproval"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单审核
finance_receipt_approve: {
component: () =>
import("@/views/ecw/financial/components/CollectionApproval"),
component: () => import("@/views/ecw/financial/components/CollectionApproval"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单核销
finance_receipt_write_off: {
component: () =>
import("@/views/ecw/financial/components/CollectionWriteoff"),
component: () => import("@/views/ecw/financial/components/CollectionWriteoff"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单反核销审核
finance_receipt_write_off_no: {
component: () =>
import("@/views/ecw/financial/components/CollectionApproval"),
component: () => import("@/views/ecw/financial/components/CollectionApproval"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单核销反审核
finance_receipt_approve_no: {
component: () =>
import("@/views/ecw/financial/components/CollectionApproval"),
component: () => import("@/views/ecw/financial/components/CollectionApproval"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单银行实收明细核销
finance_receipt_item_write_off: {
component: () =>
import("@/views/ecw/financial/components/CollectionBankDetail"),
component: () => import("@/views/ecw/financial/components/CollectionBankDetail"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单银行实收反核销
finance_receipt_item_write_off_no: {
component: () =>
import("@/views/ecw/financial/components/CollectionBankDetail"),
component: () => import("@/views/ecw/financial/components/CollectionBankDetail"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//佣金付款单审核详情-关于佣金付款单所有审核详情
commissionPaymentDetails: {
component: () =>
import(
"@/views/ecw/financial/components/commissionPaymentDetails.vue"
),
component: () => import("@/views/ecw/financial/components/commissionPaymentDetails.vue"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
/*撤销拆单*/
split_revoke: {
component: () =>
import("@/views/ecw/order/components/SplitRevokeDetail"),
id: this.processInstance.businessKey,
component: () => import("@/views/ecw/order/components/SplitRevokeDetail"),
id: this.processInstance.businessKey
},
// 不可出渠道异常审核
not_shiping_channel: {
component: () =>
import("@/views/ecw/order/components/NotShipingChannel"),
component: () => import("@/views/ecw/order/components/NotShipingChannel"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
// 出货批量加价审核
box_batch_markup: {
component: () =>
import("@/views/ecw/box/components/batchMakeUpDetail.vue"),
component: () => import("@/views/ecw/box/components/batchMakeUpDetail.vue"),
processId: this.processInstance.businessKey,
type: this.processInstance.processDefinition?.formCustomViewPath,
type: this.processInstance.processDefinition?.formCustomViewPath
},
// 可获移交详情
customer_handover_details: {
component: () =>
import(
"@/views/ecw/customer/components/customer-handover-details.vue"
),
component: () => import("@/views/ecw/customer/components/customer-handover-details.vue"),
processId: this.processInstance.businessKey,
type: this.processInstance.processDefinition?.formCustomViewPath,
type: this.processInstance.processDefinition?.formCustomViewPath
},
// 出货审核
air_shipment: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
type: "shipment",
type: "shipment"
},
//排单分拣审核
shipment_order_sorting: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
// 出货反审
shipment_review: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
processId: this.processInstance.businessKey
},
// 删单退场
customs_declare_remove: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
type: "deleteExit",
type: "deleteExit"
},
// 空运到仓审核
air_warehouse: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
type: "air_warehouse",
type: "air_warehouse"
},
// 空运到仓审核
air_warehouse_no: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
type: "air_warehouse",
type: "air_warehouse"
},
revoke_clear: {
component: () => import("@/views/ecw/box/components/RevokeClear"),
id: this.processInstance.businessKey,
id: this.processInstance.businessKey
},
// 重量超限
over_weight_exception: {
component: () =>
import(
"@/views/ecw/order/exception/components/overweightException"
),
component: () => import("@/views/ecw/order/exception/components/overweightException"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
// 线路重量超限
line_weight_exception: {
component: () =>
import(
"@/views/ecw/order/exception/components/overweightException"
),
component: () => import("@/views/ecw/order/exception/components/overweightException"),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath,
path: this.processInstance.processDefinition?.formCustomViewPath
},
// 收货人限制修改申请
order_consignee_limit_change: {
component: () =>
import("@/views/ecw/order/components/updateReleaseLimitApproval"),
id: this.processInstance.businessKey,
component: () => import("@/views/ecw/order/components/updateReleaseLimitApproval"),
id: this.processInstance.businessKey
},
// 海外仓修改申请,下面的组件待改
order_overseas_warehouse_change: {
component: () =>
import("@/views/ecw/order/components/updateReleaseLimitApproval"),
id: this.processInstance.businessKey,
},
};
console.log(
"formCustomViewPath",
this.processInstance.processDefinition.formCustomViewPath.trim()
);
return map[
this.processInstance.processDefinition.formCustomViewPath.trim()
];
},
component: () => import("@/views/ecw/order/components/updateReleaseTypeApproval"),
id: parseInt(this.processInstance.businessKey)
}
}
console.log("formCustomViewPath", this.processInstance.processDefinition.formCustomViewPath.trim())
return map[this.processInstance.processDefinition.formCustomViewPath.trim()]
}
},
data() {
return {
......@@ -694,13 +504,13 @@ export default {
processInstance: {},
// 流程表单详情
detailForm: {
fields: [],
fields: []
},
isMust: true,
// BPMN 数据
bpmnXML: null,
bpmnControlForm: {
prefix: "activiti",
prefix: "activiti"
},
activityList: [],
// 审批记录
......@@ -714,9 +524,9 @@ export default {
{
required: this.isMust,
message: this.$t("审批建议不能为空"),
trigger: "blur",
},
],
trigger: "blur"
}
]
},
// 转派审批人
......@@ -724,67 +534,59 @@ export default {
updateAssignee: {
open: false,
form: {
assigneeUserId: undefined,
assigneeUserId: undefined
},
rules: {
assigneeUserId: [
{
required: true,
message: this.$t("新审批人不能为空"),
trigger: "change",
},
],
},
trigger: "change"
}
]
}
},
// 数据字典
categoryDictDatas: getDictDatas(DICT_TYPE.BPM_MODEL_CATEGORY),
};
categoryDictDatas: getDictDatas(DICT_TYPE.BPM_MODEL_CATEGORY)
}
},
created() {
this.id = this.$route.query.id;
this.id = this.$route.query.id
if (!this.id) {
this.$message.error("未传递 id 参数,无法查看流程信息");
return;
this.$message.error("未传递 id 参数,无法查看流程信息")
return
}
this.getDetail();
this.getDetail()
// 获得用户列表
this.userOptions = [];
this.userOptions = []
listSimpleUsers().then((response) => {
this.userOptions.push(...response.data);
});
this.userOptions.push(...response.data)
})
},
methods: {
/** 获得流程实例 */
getDetail() {
// 获得流程实例相关
this.processInstanceLoading = true;
this.processInstanceLoading = true
getProcessInstance(this.id).then((response) => {
if (!response.data) {
this.$message.error("查询不到流程信息!");
return;
this.$message.error("查询不到流程信息!")
return
}
// 设置流程信息
this.processInstance = response.data;
console.log(this.processInstance);
this.processInstance = response.data
console.log(this.processInstance)
//银行实收明细核销不限制必填 lanbm 2024-05-24 add
if (
this.processInstance.processDefinition.formCustomViewPath ==
undefined ||
this.processInstance.processDefinition.formCustomViewPath == null ||
this.processInstance.processDefinition.formCustomViewPath == ""
) {
this.isMust = true;
if (this.processInstance.processDefinition.formCustomViewPath == undefined || this.processInstance.processDefinition.formCustomViewPath == null || this.processInstance.processDefinition.formCustomViewPath == "") {
this.isMust = true
} else {
if (
this.processInstance.processDefinition.formCustomViewPath.trim() ==
"finance_receipt_item_write_off"
) {
this.isMust = false;
if (this.processInstance.processDefinition.formCustomViewPath.trim() == "finance_receipt_item_write_off") {
this.isMust = false
} else {
this.isMust = true;
this.isMust = true
}
}
//end 银行实收明细核销不限制必填 lanbm 2024-05-24 add
......@@ -795,240 +597,236 @@ export default {
...JSON.parse(this.processInstance.processDefinition.formConf),
disabled: true, // 表单禁用
formBtns: false, // 按钮隐藏
fields: decodeFields(
this.processInstance.processDefinition.formFields
),
};
fields: decodeFields(this.processInstance.processDefinition.formFields)
}
// 设置表单的值
this.detailForm.fields.forEach((item) => {
const val = this.processInstance.formVariables[item.__vModel__];
const val = this.processInstance.formVariables[item.__vModel__]
if (val) {
item.__config__.defaultValue = val;
item.__config__.defaultValue = val
}
});
})
}
// 加载流程图
getProcessDefinitionBpmnXML(
this.processInstance.processDefinition.id
).then((response) => {
this.bpmnXML = response.data;
});
getProcessDefinitionBpmnXML(this.processInstance.processDefinition.id).then((response) => {
this.bpmnXML = response.data
})
// 加载活动列表
getActivityList({
processInstanceId: this.processInstance.id,
processInstanceId: this.processInstance.id
}).then((response) => {
this.activityList = response.data;
});
this.activityList = response.data
})
// 取消加载中
this.processInstanceLoading = false;
});
this.processInstanceLoading = false
})
// 获得流程任务列表(审批记录)
this.tasksLoad = true;
this.runningTasks = [];
this.auditForms = [];
this.tasksLoad = true
this.runningTasks = []
this.auditForms = []
getTaskListByProcessInstanceId(this.id).then((response) => {
// 审批记录
this.tasks = response.data;
this.tasks = response.data
// 排序,将未完成的排在前面,已完成的排在后面;
this.tasks.sort((a, b) => {
// 有已完成的情况,按照完成时间倒序
if (a.endTime && b.endTime) {
return b.endTime - a.endTime;
return b.endTime - a.endTime
} else if (a.endTime) {
return 1;
return 1
} else if (b.endTime) {
return -1;
return -1
// 都是未完成,按照创建时间倒序
} else {
return b.createTime - a.createTime;
return b.createTime - a.createTime
}
});
})
// 需要审核的记录
const userId = store.getters.userId;
const userId = store.getters.userId
this.tasks.forEach((task) => {
if (task.result !== 1) {
// 只有待处理才需要
return;
return
}
if (!task.assigneeUser || task.assigneeUser.id !== userId) {
// 自己不是处理人
return;
return
}
this.runningTasks.push({ ...task });
this.runningTasks.push({ ...task })
this.auditForms.push({
comment: "",
});
});
comment: ""
})
})
// 取消加载中
this.tasksLoad = false;
});
this.tasksLoad = false
})
},
/** 处理选择流程的按钮操作 **/
handleSelect(row) {
// 设置选择的流程
this.selectProcessInstance = row;
this.selectProcessInstance = row
// 流程表单
if (row.formId) {
// 设置对应的表单
this.detailForm = {
...JSON.parse(row.formConf),
fields: decodeFields(row.formFields),
};
fields: decodeFields(row.formFields)
}
} else if (row.formCustomCreatePath) {
this.$router.push({ path: row.formCustomCreatePath });
this.$router.push({ path: row.formCustomCreatePath })
// 这里暂时无需加载流程图,因为跳出到另外个 Tab;
}
},
/** 提交按钮 */
submitForm(params) {
if (!params) {
return;
return
}
// 设置表单禁用
const conf = params.conf;
conf.disabled = true; // 表单禁用
conf.formBtns = false; // 按钮隐藏
const conf = params.conf
conf.disabled = true // 表单禁用
conf.formBtns = false // 按钮隐藏
// 提交表单,创建流程
const variables = params.values;
const variables = params.values
createProcessInstance({
processDefinitionId: this.selectProcessInstance.id,
variables: variables,
variables: variables
})
.then((response) => {
this.$modal.msgSuccess("发起流程成功");
this.$modal.msgSuccess("发起流程成功")
// 关闭当前窗口
this.$tab.closeOpenPage();
this.$router.go(-1);
this.$tab.closeOpenPage()
this.$router.go(-1)
})
.catch(() => {
conf.disabled = false; // 表单开启
conf.formBtns = true; // 按钮展示
});
conf.disabled = false // 表单开启
conf.formBtns = true // 按钮展示
})
},
getDateStar(ms) {
return getDate(ms);
return getDate(ms)
},
getTimelineItemIcon(item) {
if (item.result === 1) {
return "el-icon-time";
return "el-icon-time"
}
if (item.result === 2) {
return "el-icon-check";
return "el-icon-check"
}
if (item.result === 3) {
return "el-icon-close";
return "el-icon-close"
}
if (item.result === 4) {
return "el-icon-remove-outline";
return "el-icon-remove-outline"
}
return "";
return ""
},
getTimelineItemType(item) {
if (item.result === 1) {
return "primary";
return "primary"
}
if (item.result === 2) {
return "success";
return "success"
}
if (item.result === 3) {
return "danger";
return "danger"
}
if (item.result === 4) {
return "info";
return "info"
}
return "";
return ""
},
/** 处理审批通过和不通过的操作 */
handleAudit(task, pass) {
const index = this.runningTasks.indexOf(task);
const index = this.runningTasks.indexOf(task)
this.$refs["form" + index][0].validate((valid) => {
if (!valid) {
return;
return
}
const data = {
id: task.id,
comment: this.auditForms[index].comment,
copyUserIds: this.auditForms[index].copyUserIds,
};
this.loading = true;
copyUserIds: this.auditForms[index].copyUserIds
}
this.loading = true
if (pass) {
approveTask(data)
.then((response) => {
let p = this.matterNum;
let p = this.matterNum
//this.$store.commit('GET_MAATER', --p)
this.$modal.msgSuccess("审批通过成功!");
this.getDetail(); // 获得最新详情
this.$modal.msgSuccess("审批通过成功!")
this.getDetail() // 获得最新详情
})
.finally(() => {
this.loading = false;
});
this.loading = false
})
} else {
rejectTask(data)
.then((response) => {
let p = this.matterNum;
let p = this.matterNum
//this.$store.commit('GET_MAATER', --p)
this.$modal.msgSuccess("审批不通过成功!");
this.getDetail(); // 获得最新详情
this.$modal.msgSuccess("审批不通过成功!")
this.getDetail() // 获得最新详情
})
.finally(() => {
this.loading = false;
});
this.loading = false
})
}
});
})
},
/** 处理转派审批人 */
handleUpdateAssignee(task) {
// 设置表单
this.resetUpdateAssigneeForm();
this.updateAssignee.form.id = task.id;
this.resetUpdateAssigneeForm()
this.updateAssignee.form.id = task.id
// 设置为打开
this.updateAssignee.open = true;
this.updateAssignee.open = true
},
/** 提交转派审批人 */
submitUpdateAssigneeForm() {
this.$refs["updateAssigneeForm"].validate((valid) => {
if (!valid) {
return;
return
}
updateTaskAssignee(this.updateAssignee.form).then((response) => {
this.$modal.msgSuccess("转派任务成功!");
let p = this.matterNum;
this.$modal.msgSuccess("转派任务成功!")
let p = this.matterNum
// this.$store.commit('GET_MAATER', --p)
this.updateAssignee.open = false;
this.getDetail(); // 获得最新详情
});
});
this.updateAssignee.open = false
this.getDetail() // 获得最新详情
})
})
},
/** 取消转派审批人 */
cancelUpdateAssigneeForm() {
this.updateAssignee.open = false;
this.resetUpdateAssigneeForm();
this.updateAssignee.open = false
this.resetUpdateAssigneeForm()
},
/** 重置转派审批人 */
resetUpdateAssigneeForm() {
this.updateAssignee.form = {
id: undefined,
assigneeUserId: undefined,
};
this.resetForm("updateAssigneeForm");
assigneeUserId: undefined
}
this.resetForm("updateAssigneeForm")
},
/** 处理审批退回的操作 */
handleDelegate(task) {
this.$modal.msgError("暂不支持【委派】功能,可以使用【转派】替代!");
this.$modal.msgError("暂不支持【委派】功能,可以使用【转派】替代!")
},
/** 处理审批退回的操作 */
handleBack(task) {
this.$modal.msgError("暂不支持【退回】功能!");
},
},
};
this.$modal.msgError("暂不支持【退回】功能!")
}
}
}
</script>
<style lang="scss" scoped>
......
<template>
<el-dialog :visible="show" @close="handleClose" :title="$t('海外仓模式修改')" width="1000px">
<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">
<!-- 订单号 -->
......@@ -62,6 +62,11 @@
<span>{{ order.lockConsigneeDay }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('增值服务')">
<span>{{ order.orgIsOverseasWarehouse ? $t("海外仓") : $t("非海外仓") }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" v-if="order.isLimitUpdateConsignee">
......@@ -76,28 +81,10 @@
<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-col :span="24">
<el-form-item :label="$t('增值服务')">
<el-tag>{{ form.newIsOverseasWarehouse ? $t("海外仓") : $t("非海外仓") }}</el-tag>
</el-form-item>
</el-col>
</el-row>
......@@ -126,7 +113,7 @@
<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>
<el-button v-else type="primary" @click="handleSubmit" :loading="loading">{{ $t("确定") }}</el-button>
</span>
</el-dialog>
</template>
......@@ -134,7 +121,7 @@
<script>
import WorkFlow from "@/components/WorkFlow/index.vue"
import FileUpload from "@/components/FileUpload/index.vue"
import { applyCargoControlApproval, getLimitUpdateInfo } from "@/api/ecw/orderCargoControl"
import { applyCargoControlApproval, getReleaseTypeUpdateInfo } from "@/api/ecw/orderCargoControl"
import dayjs from "dayjs"
import { getApproval } from "@/api/ecw/order"
export default {
......@@ -154,11 +141,8 @@ export default {
bpmId: null, // 审批流程ID
form: {
// 申请类型:此处应该是 61 放货限制修改申请 62 海外仓修改申请
applyType: 61,
// 新的是否限制修改收货人
newIsLimitUpdateConsignee: false,
// 新的放货锁定收货人天数
newLockConsigneeDay: "",
applyType: 62,
newIsOverseasWarehouse: null,
// 修改原因
reasonZh: "",
// 附件
......@@ -166,31 +150,11 @@ export default {
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 = ""
}
approvalDetail: null,
loading: false
}
},
mounted() {
this.form.newIsLimitUpdateConsignee = !!this.order.isLimitUpdateConsignee
if (this.form.newIsLimitUpdateConsignee) {
this.form.newLockConsigneeDay = this.order.lockConsigneeDay
}
// 根据订单获取审批详情
this.getApply()
},
......@@ -198,27 +162,21 @@ export default {
getApply() {
// 先重置
this.applyStatus = 0
getLimitUpdateInfo(this.order.orderId).then((res) => {
getReleaseTypeUpdateInfo(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.form.applyType = 62
this.form.newIsOverseasWarehouse = data.newIsOverseasWarehouse
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()
} */
}
this.applyStatus = data.applyStatus
this.bpmId = data.formId
})
},
/* getApproval(){
......@@ -246,10 +204,16 @@ export default {
ccIds: this.form.ccIds.join(","),
orderId: this.order.orderId
}
applyCargoControlApproval(data).then((res) => {
this.$message.success(this.$t("操作成功"))
this.$emit("success")
})
this.loading = true
applyCargoControlApproval(data)
.then((res) => {
this.$message.success(this.$t("操作成功"))
this.$emit("success")
this.handleClose()
})
.catch(() => {
this.loading = false
})
}
}
}
......
<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'
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',
name: "updateReleaseTypeApproval",
components: { Template },
props: {
// 审批ID
id: Number
},
data(){
data() {
return {
detail: null,
releaseInfo: null
......@@ -20,30 +20,30 @@ export default {
mounted() {
this.getApprovalDetail()
},
computed:{
showExpireTime(){
computed: {
showExpireTime() {
return (days) => {
if(!this.releaseInfo?.unloadTime || !days){
return '-'
if (!this.releaseInfo?.unloadTime || !days) {
return "-"
}
return dayjs(this.releaseInfo.unloadTime).add(this.detail.newLockConsigneeDay, "day").format('YYYY-MM-DD HH:mm:ss')
return dayjs(this.releaseInfo.unloadTime).add(this.detail.newLockConsigneeDay, "day").format("YYYY-MM-DD HH:mm:ss")
}
}
},
methods:{
getApprovalDetail(){
getApproval(this.id).then(res => {
methods: {
getApprovalDetail() {
getApproval(this.id).then((res) => {
try {
this.detail = JSON.parse(res.data?.details)
this.getPickRleaseInfo(this.detail.orderId)
}catch (e) {
} catch (e) {
console.error("审核详情解析失败", e)
this.$message.error("审核详情数据解析失败")
}
})
},
getPickRleaseInfo(orderId){
getPickRleaseInfo(orderId).then(res => {
getPickRleaseInfo(orderId) {
getPickRleaseInfo(orderId).then((res) => {
this.releaseInfo = res.data
})
}
......@@ -55,55 +55,44 @@ export default {
<div v-if="detail && releaseInfo">
<el-descriptions>
<el-descriptions-item :label="$t('订单号')">
{{detail.orderNo}}
{{ 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
{{ 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}}
{{ detail.sumNum }}
</el-descriptions-item>
<el-descriptions-item :label="$t('剩余放货箱数')">
{{detail.sumNum - detail.releaseNum}}
{{ detail.sumNum - detail.releaseNum }}
</el-descriptions-item>
<el-descriptions-item :label="$t('卸柜/到仓时间')">
{{releaseInfo.unloadTime || '-'}}
{{ releaseInfo.unloadTime || "-" }}
</el-descriptions-item>
<el-descriptions-item :label="$t('订单限制修改收货人')">
{{releaseInfo.isLimitUpdateConsignee ? $t('') : $t('')}}
{{ releaseInfo.isLimitUpdateConsignee ? $t("") : $t("") }}
</el-descriptions-item>
<el-descriptions-item :label="$t('订单锁定收货人天数')" v-if="releaseInfo.isLimitUpdateConsignee">
{{releaseInfo.lockConsigneeDay}}
{{ releaseInfo.lockConsigneeDay }}
</el-descriptions-item>
<el-descriptions-item :label="$t('放货锁定收货人到期时间')" v-if="releaseInfo.isLimitUpdateConsignee">
{{showExpireTime(releaseInfo.lockConsigneeDay)}}
{{ showExpireTime(releaseInfo.lockConsigneeDay) }}
</el-descriptions-item>
</el-descriptions>
<el-divider>{{$t('修改内容')}}</el-divider>
<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 :label="$t('增值服务')">
{{ detail.newIsLimitUpdateConsignee ? $t("海外仓") : $t("非海外仓") }}
</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}}
{{ 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 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>
......@@ -111,6 +100,4 @@ export default {
</div>
</template>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>
......@@ -136,7 +136,7 @@
<template slot-scope="scope">
<!--修改放货限制-->
<!-- <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="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>
......
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