Commit 5386a888 authored by dragondean@qq.com's avatar dragondean@qq.com

Merge branch 'feature/cargo_control' into dev

# Conflicts:
#	src/components/FileUpload/index.vue
#	src/views/ecw/order/cargoControl.vue
parents ee8648e6 6a1c3792
......@@ -165,3 +165,12 @@ export function getControlLogList(orderId){
method: 'get'
})
}
// 控货业务审批申请
export function applyCargoControlApproval(data){
return request({
url: 'ecw/order-cargo-control/update/apply',
method: 'put',
data
})
}
......@@ -94,8 +94,7 @@ export default {
number: 0,
uploadList: [],
baseUrl: process.env.VUE_APP_BASE_API,
uploadFileUrl:
process.env.VUE_APP_BASE_API + "/admin-api/infra/file/org-name/up", // 上传的文件服务器地址
uploadFileUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/upload", // 上传的文件服务器地址
headers: {
Authorization: "Bearer " + getToken(),
},
......
......@@ -64,6 +64,15 @@
<el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select>
</el-form-item>
<!--<el-form-item :label="$t('订单放货锁定收货人到期时间')" prop="lockConsigneeTime">
</el-form-item>-->
<el-form-item :label="$t('订单限制修改收货人')" prop="isLimitUpdateConsignee">
<el-select v-model="queryParams.isLimitUpdateConsignee" :placeholder="$t('请选择')" clearable @change="handleQuery">
<el-option :label="$t('是')" :value="1"></el-option>
<el-option :label="$t('否')" :value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
......@@ -102,7 +111,21 @@
{{row.statusMsg}}
</template>
</el-table-column>
<el-table-column :label="$t('已卸柜/已到仓时间')" align="center" prop="unloadTime" />
<el-table-column :label="$t('已卸柜/已到仓时间')" align="left" prop="status">
<template slot-scope="{row}">
{{row.unloadTime}}
</template>
</el-table-column>
<el-table-column :label="$t('放货锁定收货人到期时间')" align="left" prop="status">
<template slot-scope="{row}">
{{row.lockConsigneeTime}}
</template>
</el-table-column>
<el-table-column :label="$t('订单限制修改收货人')" align="left" prop="status">
<template slot-scope="{row}">
{{row.isLimitUpdateConsignee ? $t('') : $t('')}}
</template>
</el-table-column>
<el-table-column :label="$t('提单号')" align="center" prop="status">
<template slot-scope="scope">
{{scope.row.tidanNo}}
......@@ -120,6 +143,8 @@
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="150px">
<template slot-scope="scope">
<!--修改放货限制-->
<el-button type="text" size="mini" @click="showUpdateReleaseLimit=scope.row" v-hasPermi="['ecw:cargo_control:update']">{{$t('修改放货限制')}}</el-button>
<!--控货中,已入仓-->
<template v-if="[0,2].indexOf(scope.row.cargoControlStatus) > -1 && scope.row.sumNum > 0">
<el-button type="text" size="mini" @click="showReleaseOrderId=scope.row.orderId" v-hasPermi="['ecw:cargo_control:release']">{{$t('放货')}}</el-button>
......@@ -161,6 +186,14 @@
<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" />
<!--修改放货限制-->
<update-release-limit
v-if="showUpdateReleaseLimit"
:order="showUpdateReleaseLimit"
@close="showUpdateReleaseLimit=null"
@success="onUpdateReleaseLimitSuccess"
/>
</div>
</template>
......@@ -169,6 +202,7 @@ import Selector from '@/components/Selector'
import ProductSelector from '@/components/ProductSelector'
import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector'
import UpdateReleaseLimit from '@/views/ecw/order/components/updateReleaseLimit.vue'
/* import { getTradeCityList } from '@/api/ecw/region' */
import Transfer from '@/views/ecw/order/components/Transfer'
import Release from './components/Release'
......@@ -181,6 +215,7 @@ import CargoLogList from "@/views/ecw/order/components/CargoLogList.vue";
export default {
name: "EcwOrderCargocontrol",
components: {
UpdateReleaseLimit,
CargoLogList,
CustomerSelector, ProductSelector, Selector, Transfer, Release,CargoControlEdit, TransferCargo, Fallback
},
......@@ -222,6 +257,7 @@ export default {
showFallbackOrder: null, // 调货订单
pickInfo: null, // 当前操作的提货信息
showLogOrderId: null, // 显示控货日志的订单ID
showUpdateReleaseLimit: null, // 显示修改放货限制的订单
};
},
computed: {
......@@ -349,6 +385,11 @@ export default {
onTransferCargoSuccess(){
this.showTransferCargoOrderId = null
this.getList()
},
// 修改放货审批限制成功
onUpdateReleaseLimitSuccess(){
this.showUpdateReleaseLimit = null
this.getList()
}
}
};
......
......@@ -33,6 +33,18 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('到仓日期/卸柜日期')" label-width="200px">
{{detail.unloadTime}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('放货锁定收货人到期')" label-width="200px">
{{detail.lockConsigneeTime || '-'}}
</el-form-item>
</el-col>
</el-row>
<div class="title">{{$t('请填写放货信息')}}</div>
<div class="flex">
<el-form-item :label="$t('收货人')" prop="consigneeName">
......
<script>
import imageUpload from '@/components/ImageUpload/index.vue'
import { batchException } from '@/api/ecw/order'
export default {
name: 'TurnException',
components: { imageUpload },
props:{
orderNo: {
type: String,
default: ''
},
orderId: {
type: [String, Number],
default: ''
}
},
data(){
return {
showDialog: false,
form: {
manualExceptionType: [],
exceptionUrls: "",
descZh: ''
}
}
},
computed:{
rules(){
return {
manualExceptionType: [
{ required: true, message: this.$t("请勾选原因类型"), trigger: "change" },
{
validator: (rule, value, callback) => {
if (value.length <= 0) {
callback(new Error("请勾选原因类型"));
}
callback();
},
trigger: "change",
},
],
}
}
},
methods:{
handleException(){
this.$refs.form.validate((valid) => {
if (valid) {
this.handleSubmit();
}
});
},
async handleSubmit(){
this.showDialog = false
await batchException({
orderNo: this.orderNo,
manualExceptionType: this.form.manualExceptionType.join(','),
exceptionUrls: this.form.exceptionUrls?.split(",") || [],
descZh: this.form.descZh,
orderIds: [this.orderId]
})
this.$message.success(this.$t('操作成功'))
this.$emit('done')
},
handleCancel(){
this.showDialog = false
this.$emit('cancel')
},
show(){
this.showDialog = true
// 初始化表单
for(const key in Object.keys(this.form)){
this.form[key] = this.form[key] instanceof Array ? [] : ''
}
}
}
}
</script>
<template>
<el-dialog
:title="orderNo + $t('订单转异')"
center
:visible="showDialog"
@close="handleCancel"
>
<el-form
label-position="top"
label-width="200"
ref="form"
:model="form"
:rules="rules"
>
<el-form-item :label="$t('原因类型')" prop="manualExceptionType">
<dict-selector
v-model="form.manualExceptionType"
form-type="checkbox"
:type="DICT_TYPE.MANUAL_EXCEPTION_TYPE"
multiple
></dict-selector>
</el-form-item>
<el-form-item :label="$t('附件')">
<image-upload v-model="form.exceptionUrls"></image-upload>
</el-form-item>
<el-form-item :label="$t('详细信息')">
<el-input v-model="form.descZh" type="textarea"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleException">{{
$t("确认转异")
}}</el-button>
<el-button @click="handleCancel">{{ $t("取消") }}</el-button>
</span>
</el-dialog>
</template>
<style scoped lang="scss">
</style>
<template>
<el-dialog :visible="show" @close="handleClose" :title="$t('收货人限制修改申请')" width="1000px">
<el-form label-position="left" label-width="150px" :model="form">
<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="shipment_change_release_goods_limit" 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 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 } from '@/api/ecw/orderCargoControl'
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'],
form: {
// 申请类型:此处应该是 61 放货限制修改申请 62 海外仓修改申请
applyType: 61,
// 新的是否限制修改收货人
newIsLimitUpdateConsignee: false,
// 新的放货锁定收货人天数
newLockConsigneeDay: '',
// 修改原因
reasonZh: '',
// 附件
annex: '',
ccIds: []
}
}
},
computed:{
// 当订单已卸柜/到仓,则时间为卸柜/到仓时间 + 锁定收货人天数,否则为空
newLockConsigneeTime(){
if(!this.order.unloadTime || !this.form.newIsLimitUpdateConsignee || !this.form.newLockConsigneeDay){
return '-'
}
return new Date(new Date().getTime() + this.form.newLockConsigneeDay * 86400 * 1000).toLocaleString()
}
},
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
}
},
methods:{
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>
......@@ -668,15 +668,6 @@
>{{ $t("取消订单") }}</el-dropdown-item
>
</template>
<!--lanbm 2024-06-19 添加的转异功能-->
<template v-if="false">
<el-dropdown-item
@click.native="oprateOrder2(scope.row, 'cancelOrder')"
>{{ $t("转异") }}</el-dropdown-item
>
</template>
<!--lanbm 2024-06-19 添加的转异功能-->
<!-- 恢复 -->
<!-- <el-dropdown-item @click.native="oprateOrder(scope.row.orderId, 'recoveryOrder')" >{{$t('恢复订单')}}</el-dropdown-item>-->
<!-- 费用申请 -->
......@@ -873,6 +864,13 @@
>{{ $t("不可出") }}</el-dropdown-item
>
</template>
<!--转异-->
<el-dropdown-item
@click.native="handleException(scope.row)"
v-hasPermi="['ecw:order:turnException']"
>{{ $t("转异") }}</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
......@@ -1217,43 +1215,13 @@
getList();
"
></SplitRevoke>
<!--转异对话框 lanbm 2024-06-19 添加注释-->
<el-dialog
:title="order.orderNo + $t('订单转异')"
center
:visible.sync="errorShow"
>
<el-form
label-position="top"
label-width="200"
ref="exceptionForm"
:model="form2"
:rules="exceptionRules"
>
<el-form-item :label="$t('原因类型')" prop="manualExceptionType">
<dict-selector
v-model="form2.manualExceptionType"
form-type="checkbox"
:type="DICT_TYPE.MANUAL_EXCEPTION_TYPE"
multiple
></dict-selector>
</el-form-item>
<el-form-item :label="$t('附件')">
<image-upload v-model="form2.exceptionUrls"></image-upload>
</el-form-item>
<el-form-item :label="$t('详细信息')">
<el-input v-model="form2.descZh" type="textarea"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleException">{{
$t("提交保存")
}}</el-button>
<el-button @click="handleExceptionClose">{{ $t("取消") }}</el-button>
</span>
</el-dialog>
<!--转异对话框 lanbm 2024-06-19 添加注释-->
<turn-exception
v-if="!!tureExceptionOrder"
ref="turnException"
:order-no="tureExceptionOrder.orderNo"
:order-id="tureExceptionOrder.orderId"
@done="handleTurnExceptionDone"
@cancel="handleExceptionClose"></turn-exception>
</div>
</template>
......@@ -1315,9 +1283,11 @@ import SplitRevoke from "@/views/ecw/order/components/SplitRevoke";
import { getChannelList } from "@/api/ecw/channel";
import Template from "@/views/cms/template/index.vue";
import { getDictDatas } from "@/utils/dict";
import TurnException from '@/views/ecw/order/components/TurnException.vue'
export default {
name: "EcwOrderIndex",
components: {
TurnException,
Template,
UserSelector,
FeeApplication,
......@@ -1428,21 +1398,8 @@ export default {
key: "prodKey",
value: "",
},
//转异用到的参数信息 lanbm 2024-06-19 add
order: {
orderNo: undefined,
},
form2: {
orderSpecialNeedReceivableReqVoList: [],
orderLocationCreateReqVOList: [],
exceptionUrls: [],
descZh: "",
manualExceptionType: [],
urls: [],
sumVolume: "",
sumWeight: "",
},
//转异用到的参数信息 lanbm 2024-06-19 add
// 当前操作转异的订单
tureExceptionOrder: null
};
},
watch: {
......@@ -2126,12 +2083,17 @@ export default {
this.order.orderNo = row.orderNo;
this.errorShow = true;
},
handleException() {
//保存异常信息 lanbm 2024-06-19 add
async handleException(order) {
this.tureExceptionOrder = order
await this.$nextTick()
this.$refs.turnException?.show()
},
handleTurnExceptionDone(){
this.tureExceptionOrder = null
this.getList()
},
handleExceptionClose() {
//关闭异常对话框
this.errorShow = false;
this.tureExceptionOrder = null;
},
},
};
......
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