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){ export function getCargoControlOrderPage(params) {
return request({ return request({
url:'ecw/order-cargo-control/cargo/control/order', url: "ecw/order-cargo-control/cargo/control/order",
method:'get', method: "get",
params params
}) })
} }
export function getWarningCargoControlOrderPage(params){ export function getWarningCargoControlOrderPage(params) {
return request({ return request({
url:'ecw/order-cargo-control/warning/cargo/control/order', url: "ecw/order-cargo-control/warning/cargo/control/order",
method:'get', method: "get",
params params
}) })
} }
// 发送手机验证码 // 发送手机验证码
export function sendSmsCode(data){ export function sendSmsCode(data) {
return request({ return request({
url: '/ecw/order-cargo-control/send-sms-code', url: "/ecw/order-cargo-control/send-sms-code",
method: 'post', method: "post",
data data
}) })
} }
// 创建订单控货人信息 // 创建订单控货人信息
export function create(data){ export function create(data) {
return request({ return request({
url: '/ecw/order-cargo-control/create', url: "/ecw/order-cargo-control/create",
method: 'post', method: "post",
data data
}) })
} }
// 创建订单控货人放货记录 // 创建订单控货人放货记录
export function createPick(data){ export function createPick(data) {
return request({ return request({
url: '/ecw/order-cargo-control-pick/create', url: "/ecw/order-cargo-control-pick/create",
method: 'post', method: "post",
data data
}) })
} }
//获得控货订单放货编辑详情 //获得控货订单放货编辑详情
export function getReleaseInfo(orderId){ export function getReleaseInfo(orderId) {
return request({ return request({
url:'/ecw/order-cargo-control/release/info/' + orderId, url: "/ecw/order-cargo-control/release/info/" + orderId,
method:'get' method: "get"
}) })
} }
// 获得控货订单放货详情 // 获得控货订单放货详情
export function getPickRleaseInfo(orderId){ export function getPickRleaseInfo(orderId) {
return request({ return request({
url:'/ecw/order-cargo-control-pick/release/info/' + orderId, url: "/ecw/order-cargo-control-pick/release/info/" + orderId,
method:'get' method: "get"
}) })
} }
// 放货修改与反复核申请 // 放货修改与反复核申请
export function updateApply(data){ export function updateApply(data) {
return request({ return request({
url: '/ecw/order-cargo-control-pick/update/apply', url: "/ecw/order-cargo-control-pick/update/apply",
method: 'put', method: "put",
data data
}) })
} }
// 复核(放货复核) // 复核(放货复核)
export function review(id){ export function review(id) {
return request({ return request({
url: '/ecw/order-cargo-control-pick/review/' + id, url: "/ecw/order-cargo-control-pick/review/" + id,
method: 'put' method: "put"
}) })
} }
// 取消放货 // 取消放货
export function cancel(id){ export function cancel(id) {
return request({ return request({
url: '/ecw/order-cargo-control-pick/cancel/' + id, url: "/ecw/order-cargo-control-pick/cancel/" + id,
method: 'put' method: "put"
}) })
} }
// 取消审批 // 取消审批
export function cancelApproval(approvalId, params){ export function cancelApproval(approvalId, params) {
return request({ return request({
url: '/ecw/order-cargo-control-pick/cancel/approval/' + approvalId, url: "/ecw/order-cargo-control-pick/cancel/approval/" + approvalId,
method: 'get', method: "get",
params params
}) })
} }
// 订单复核 // 订单复核
export function orderReview(orderId){ export function orderReview(orderId) {
return request({ return request({
url: '/ecw/order-cargo-control/review/' + orderId, url: "/ecw/order-cargo-control/review/" + orderId,
method: 'put' method: "put"
}) })
} }
// 根据订单id批量复合订单控货人放货 // 根据订单id批量复合订单控货人放货
export function batchReview(data){ export function batchReview(data) {
return request({ return request({
url: '/ecw/order-cargo-control-pick/review/', url: "/ecw/order-cargo-control-pick/review/",
method: 'put', method: "put",
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded' "Content-Type": "application/x-www-form-urlencoded"
}, },
data data
}) })
} }
// 获得可调货的控货订单列表 // 获得可调货的控货订单列表
export function seasoningCondimentsSelect(params){ export function seasoningCondimentsSelect(params) {
return request({ return request({
url: '/ecw/order-cargo-control-pick/seasoning-condiments/cargo-control/order/select', url: "/ecw/order-cargo-control-pick/seasoning-condiments/cargo-control/order/select",
method: 'get', method: "get",
params params
}) })
} }
// 根据放货ID查询控货订单放货修改审核详情 // 根据放货ID查询控货订单放货修改审核详情
export function getPickUpdateInfo(id){ export function getPickUpdateInfo(id) {
return request({ return request({
url: '/ecw/order-cargo-control-pick/update/info/' + id, url: "/ecw/order-cargo-control-pick/update/info/" + id,
method: 'get' method: "get"
}) })
} }
// 获得控货订单放货修改申请详情 {approveId: 1} // 获得控货订单放货修改申请详情 {approveId: 1}
export function getPickUpdateApproveInfo(params){ export function getPickUpdateApproveInfo(params) {
return request({ return request({
url: '/ecw/order-cargo-control-pick/update/info', url: "/ecw/order-cargo-control-pick/update/info",
method: 'get', method: "get",
params params
}) })
} }
export function getCondimentsIno(cargoControlPickId){ export function getCondimentsIno(cargoControlPickId) {
return request({ return request({
url: '/ecw/order-cargo-control-pick/seasoning/condiments/info/' + cargoControlPickId, url: "/ecw/order-cargo-control-pick/seasoning/condiments/info/" + cargoControlPickId,
method: 'get' method: "get"
}) })
} }
// 参数搜索导出控货订单列表 // 参数搜索导出控货订单列表
export function exportCargoControl(params){ export function exportCargoControl(params) {
return request({ return request({
url: '/ecw/order/export/cargo/control/search', url: "/ecw/order/export/cargo/control/search",
method: 'get', method: "get",
responseType: 'arraybuffer', responseType: "arraybuffer",
params params
}) })
} }
// 控货日志 // 控货日志
export function getControlLogList(orderId){ export function getControlLogList(orderId) {
return request({ return request({
url: '/order/order-control-log/list/' + orderId, url: "/order/order-control-log/list/" + orderId,
method: 'get' method: "get"
}) })
} }
// 控货业务审批申请 // 控货业务审批申请
export function applyCargoControlApproval(data){ export function applyCargoControlApproval(data) {
return request({ return request({
url: 'ecw/order-cargo-control/update/apply', url: "ecw/order-cargo-control/update/apply",
method: 'put', method: "put",
data data
}) })
} }
//根据订单ID查询控货订单放货限制修改审核详情 //根据订单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({ return request({
url: '/ecw/order-cargo-control/limit-update/info/' + orderId, url: "/ecw/order-cargo-control/overseas-warehouse-update/info/" + orderId,
method: 'get' method: "get"
}) })
} }
This diff is collapsed.
<template> <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-form label-position="left" label-width="150px" :model="form" :disabled="applyStatus === 1">
<el-row :gutter="20"> <el-row :gutter="20">
<!-- 订单号 --> <!-- 订单号 -->
...@@ -62,6 +62,11 @@ ...@@ -62,6 +62,11 @@
<span>{{ order.lockConsigneeDay }}</span> <span>{{ order.lockConsigneeDay }}</span>
</el-form-item> </el-form-item>
</el-col> </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>
<el-row :gutter="20" v-if="order.isLimitUpdateConsignee"> <el-row :gutter="20" v-if="order.isLimitUpdateConsignee">
...@@ -76,28 +81,10 @@ ...@@ -76,28 +81,10 @@
<el-divider>{{ $t("修改信息") }}</el-divider> <el-divider>{{ $t("修改信息") }}</el-divider>
<el-row :gutter="20"> <el-row :gutter="20">
<!-- 订单限制修改收货人 --> <!-- 修改海外仓模式 -->
<el-col :span="8"> <el-col :span="24">
<el-form-item :label="$t('订单限制修改收货人')"> <el-form-item :label="$t('增值服务')">
<el-radio-group v-model="form.newIsLimitUpdateConsignee"> <el-tag>{{ form.newIsOverseasWarehouse ? $t("海外仓") : $t("非海外仓") }}</el-tag>
<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-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -126,7 +113,7 @@ ...@@ -126,7 +113,7 @@
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleClose">{{ $t("取消") }}</el-button> <el-button @click="handleClose">{{ $t("取消") }}</el-button>
<el-button v-if="applyStatus === 1" type="primary" @click="handleGoBpm">{{ $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> </span>
</el-dialog> </el-dialog>
</template> </template>
...@@ -134,7 +121,7 @@ ...@@ -134,7 +121,7 @@
<script> <script>
import WorkFlow from "@/components/WorkFlow/index.vue" import WorkFlow from "@/components/WorkFlow/index.vue"
import FileUpload from "@/components/FileUpload/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 dayjs from "dayjs"
import { getApproval } from "@/api/ecw/order" import { getApproval } from "@/api/ecw/order"
export default { export default {
...@@ -154,11 +141,8 @@ export default { ...@@ -154,11 +141,8 @@ export default {
bpmId: null, // 审批流程ID bpmId: null, // 审批流程ID
form: { form: {
// 申请类型:此处应该是 61 放货限制修改申请 62 海外仓修改申请 // 申请类型:此处应该是 61 放货限制修改申请 62 海外仓修改申请
applyType: 61, applyType: 62,
// 新的是否限制修改收货人 newIsOverseasWarehouse: null,
newIsLimitUpdateConsignee: false,
// 新的放货锁定收货人天数
newLockConsigneeDay: "",
// 修改原因 // 修改原因
reasonZh: "", reasonZh: "",
// 附件 // 附件
...@@ -166,31 +150,11 @@ export default { ...@@ -166,31 +150,11 @@ export default {
ccIds: [] ccIds: []
}, },
// 审批信息 // 审批信息
approvalDetail: null approvalDetail: null,
} loading: false
},
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() { mounted() {
this.form.newIsLimitUpdateConsignee = !!this.order.isLimitUpdateConsignee
if (this.form.newIsLimitUpdateConsignee) {
this.form.newLockConsigneeDay = this.order.lockConsigneeDay
}
// 根据订单获取审批详情 // 根据订单获取审批详情
this.getApply() this.getApply()
}, },
...@@ -198,27 +162,21 @@ export default { ...@@ -198,27 +162,21 @@ export default {
getApply() { getApply() {
// 先重置 // 先重置
this.applyStatus = 0 this.applyStatus = 0
getLimitUpdateInfo(this.order.orderId).then((res) => { getReleaseTypeUpdateInfo(this.order.orderId).then((res) => {
const data = res.data const data = res.data
console.log({ data }) console.log({ data })
if (data.applyType === this.form.applyType) { this.form.applyType = 62
this.form.newIsLimitUpdateConsignee = data.newIsLimitUpdateConsignee this.form.newIsOverseasWarehouse = data.newIsOverseasWarehouse
this.form.newLockConsigneeDay = data.newLockConsigneeDay this.form.reasonZh = data.reasonZh
this.form.reasonZh = data.reasonZh this.form.annex = data.annex
this.form.annex = data.annex this.form.ccIds =
this.form.ccIds = data.ccIds
data.ccIds ?.split(",")
?.split(",") .filter((item) => !!item)
.filter((item) => !!item) .map((item) => Number(item)) || []
.map((item) => Number(item)) || []
this.applyStatus = data.applyStatus this.applyStatus = data.applyStatus
this.bpmId = data.formId this.bpmId = data.formId
/* // 如果是申请中,则需要查询审批数据
if(this.applyStatus === 1){
this.getApproval()
} */
}
}) })
}, },
/* getApproval(){ /* getApproval(){
...@@ -246,10 +204,16 @@ export default { ...@@ -246,10 +204,16 @@ export default {
ccIds: this.form.ccIds.join(","), ccIds: this.form.ccIds.join(","),
orderId: this.order.orderId orderId: this.order.orderId
} }
applyCargoControlApproval(data).then((res) => { this.loading = true
this.$message.success(this.$t("操作成功")) applyCargoControlApproval(data)
this.$emit("success") .then((res) => {
}) this.$message.success(this.$t("操作成功"))
this.$emit("success")
this.handleClose()
})
.catch(() => {
this.loading = false
})
} }
} }
} }
......
<script> <script>
import { getApproval, getOrderDetail } from '@/api/ecw/order' import { getApproval, getOrderDetail } from "@/api/ecw/order"
import { getPickRleaseInfo } from '@/api/ecw/orderCargoControl' import { getPickRleaseInfo } from "@/api/ecw/orderCargoControl"
import Template from '@/views/cms/template/index.vue' import Template from "@/views/cms/template/index.vue"
import dayjs from 'dayjs' import dayjs from "dayjs"
export default { export default {
name: 'updateReleaseLimitApproval', name: "updateReleaseTypeApproval",
components: { Template }, components: { Template },
props: { props: {
// 审批ID // 审批ID
id: Number id: Number
}, },
data(){ data() {
return { return {
detail: null, detail: null,
releaseInfo: null releaseInfo: null
...@@ -20,30 +20,30 @@ export default { ...@@ -20,30 +20,30 @@ export default {
mounted() { mounted() {
this.getApprovalDetail() this.getApprovalDetail()
}, },
computed:{ computed: {
showExpireTime(){ showExpireTime() {
return (days) => { return (days) => {
if(!this.releaseInfo?.unloadTime || !days){ if (!this.releaseInfo?.unloadTime || !days) {
return '-' 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:{ methods: {
getApprovalDetail(){ getApprovalDetail() {
getApproval(this.id).then(res => { getApproval(this.id).then((res) => {
try { try {
this.detail = JSON.parse(res.data?.details) this.detail = JSON.parse(res.data?.details)
this.getPickRleaseInfo(this.detail.orderId) this.getPickRleaseInfo(this.detail.orderId)
}catch (e) { } catch (e) {
console.error("审核详情解析失败", e) console.error("审核详情解析失败", e)
this.$message.error("审核详情数据解析失败") this.$message.error("审核详情数据解析失败")
} }
}) })
}, },
getPickRleaseInfo(orderId){ getPickRleaseInfo(orderId) {
getPickRleaseInfo(orderId).then(res => { getPickRleaseInfo(orderId).then((res) => {
this.releaseInfo = res.data this.releaseInfo = res.data
}) })
} }
...@@ -55,55 +55,44 @@ export default { ...@@ -55,55 +55,44 @@ export default {
<div v-if="detail && releaseInfo"> <div v-if="detail && releaseInfo">
<el-descriptions> <el-descriptions>
<el-descriptions-item :label="$t('订单号')"> <el-descriptions-item :label="$t('订单号')">
{{detail.orderNo}} {{ detail.orderNo }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('总箱数')"> <el-descriptions-item :label="$t('总箱数')">
{{detail.sumNum}} {{ 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>
<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('总控货箱数')"> <el-descriptions-item :label="$t('总控货箱数')">
{{detail.sumNum}} {{ detail.sumNum }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('剩余放货箱数')"> <el-descriptions-item :label="$t('剩余放货箱数')">
{{detail.sumNum - detail.releaseNum}} {{ detail.sumNum - detail.releaseNum }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('卸柜/到仓时间')"> <el-descriptions-item :label="$t('卸柜/到仓时间')">
{{releaseInfo.unloadTime || '-'}} {{ releaseInfo.unloadTime || "-" }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('订单限制修改收货人')"> <el-descriptions-item :label="$t('订单限制修改收货人')">
{{releaseInfo.isLimitUpdateConsignee ? $t('') : $t('')}} {{ releaseInfo.isLimitUpdateConsignee ? $t("") : $t("") }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('订单锁定收货人天数')" v-if="releaseInfo.isLimitUpdateConsignee"> <el-descriptions-item :label="$t('订单锁定收货人天数')" v-if="releaseInfo.isLimitUpdateConsignee">
{{releaseInfo.lockConsigneeDay}} {{ releaseInfo.lockConsigneeDay }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('放货锁定收货人到期时间')" v-if="releaseInfo.isLimitUpdateConsignee"> <el-descriptions-item :label="$t('放货锁定收货人到期时间')" v-if="releaseInfo.isLimitUpdateConsignee">
{{showExpireTime(releaseInfo.lockConsigneeDay)}} {{ showExpireTime(releaseInfo.lockConsigneeDay) }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-divider>{{$t('修改内容')}}</el-divider> <el-divider>{{ $t("修改内容") }}</el-divider>
<el-descriptions :column="3"> <el-descriptions :column="3">
<el-descriptions-item :label="$t('订单限制修改收货人')"> <el-descriptions-item :label="$t('增值服务')">
{{detail.newIsLimitUpdateConsignee ? $t('') : $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>
<el-descriptions-item :label="$t('放货锁定收货人到期时间')" v-if="detail.newIsLimitUpdateConsignee">
{{showExpireTime(detail.newLockConsigneeDay)}}
</el-descriptions-item>
<el-descriptions-item :label="$t('修改原因')" :span="3"> <el-descriptions-item :label="$t('修改原因')" :span="3">
{{detail.reasonZh}} {{ detail.reasonZh }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('附件')" :span="3"> <el-descriptions-item :label="$t('附件')" :span="3">
<div v-if="detail.annex"> <div v-if="detail.annex">
<div v-for="url in detail.annex.split(',').filter(item => !!item)"> <div v-for="url in detail.annex.split(',').filter((item) => !!item)">
<el-link :href="url" target="_blank">{{url.split("/").pop()}}</el-link> <el-link :href="url" target="_blank">{{ url.split("/").pop() }}</el-link>
</div> </div>
</div> </div>
</el-descriptions-item> </el-descriptions-item>
...@@ -111,6 +100,4 @@ export default { ...@@ -111,6 +100,4 @@ export default {
</div> </div>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss"></style>
</style>
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
<template slot-scope="scope"> <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="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> <el-button type="text" size="mini" @click="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:show']">{{ $t("查看") }}</el-button>
</template> </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