Commit ae3dea08 authored by 332784038@qq.com's avatar 332784038@qq.com

Merge branch 'dev-zs' of...

Merge branch 'dev-zs' of http://110.41.143.128:8081/lanbaoming/jiedao-app-operator-master into dev-zs
parents 20e5d52a 40c6242f
...@@ -1074,9 +1074,8 @@ export function copyOrder(orderId) { ...@@ -1074,9 +1074,8 @@ export function copyOrder(orderId) {
// 强制到仓 // 强制到仓
export function order_warehouse_check_force(data) { export function order_warehouse_check_force(data) {
return request({ return request({
url: "/order/order-warehouse-check/force", url: "/order/order-warehouse-check/force/" + data.orderId,
method: "post", method: "post"
data
}) })
} }
...@@ -1090,9 +1089,8 @@ export function order_warehouse_check_query(id) { ...@@ -1090,9 +1089,8 @@ export function order_warehouse_check_query(id) {
// 撤销到仓 // 撤销到仓
export function order_warehouse_check_revoke(data) { export function order_warehouse_check_revoke(data) {
return request({ return request({
url: "/order/order-warehouse-check/revoke", url: "/order/order-warehouse-check/revoke/" + data.orderId,
method: "post", method: "post"
data
}) })
} }
// 到仓修改 // 到仓修改
......
...@@ -301,11 +301,13 @@ export default { ...@@ -301,11 +301,13 @@ export default {
order_warehouse_check_revoke(orderId) { order_warehouse_check_revoke(orderId) {
this.$confirm(this.$t("确定要撤销到仓么?")).then(async () => { this.$confirm(this.$t("确定要撤销到仓么?")).then(async () => {
let r = await order_warehouse_check_revoke({ orderId }) let r = await order_warehouse_check_revoke({ orderId })
this.getLoadGoodsList()
}) })
}, },
order_warehouse_check_force(orderId) { order_warehouse_check_force(orderId) {
this.$confirm(this.$t("确定要强制到仓么?")).then(async () => { this.$confirm(this.$t("确定要强制到仓么?")).then(async () => {
let r = await order_warehouse_check_force({ orderId }) let r = await order_warehouse_check_force({ orderId })
this.getLoadGoodsList()
}) })
}, },
getTotlContent, getTotlContent,
......
<template> <template>
<div class="app-startUnloading"> <div class="app-startUnloading">
<el-row class="number-area"> <el-row class="number-area">
<p class="label-font"><span style="color:red">*</span>{{$t('卸柜时间')}}</p> <p class="label-font"><span style="color: red">*</span>{{ $t("卸柜时间") }}</p>
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="ulWarehouseTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="ulWarehouseTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-row> </el-row>
<!-- 自编号 --> <!-- 自编号 -->
<el-row class="number-area"> <el-row class="number-area">
<p class="label-font">{{$t('自编号')}}</p> <p class="label-font">{{ $t("自编号") }}</p>
<p class="label-font">{{selfNo}}</p> <p class="label-font">{{ selfNo }}</p>
<el-input v-model="labelNo" :placeholder="$t('请输入')"></el-input> <el-input v-model="labelNo" :placeholder="$t('请输入')"></el-input>
<div> <div>
<el-button type="primary" :disabled="isSuccessReview" @click="modifyUnload">{{$t('提交')}}</el-button> <el-button type="primary" :disabled="isSuccessReview" @click="modifyUnload">{{ $t("提交") }}</el-button>
<el-button type="primary" :disabled="isSuccessReview" @click="modifyBatchUnload">{{$t('批量输入')}}</el-button> <el-button type="primary" :disabled="isSuccessReview" @click="modifyBatchUnload">{{ $t("批量输入") }}</el-button>
<el-button type="primary" :disabled="isSuccessReview" @click="modifyAllUnload">{{$t('一键卸柜')}}</el-button> <el-button type="primary" :disabled="isSuccessReview" @click="modifyAllUnload">{{ $t("一键卸柜") }}</el-button>
</div> </div>
</el-row> </el-row>
<!-- 当前部分 --> <!-- 当前部分 -->
<el-row class="number-area"> <el-row class="number-area">
<p class="label-font">{{$t('当前部分')}}</p> <p class="label-font">{{ $t("当前部分") }}</p>
<el-select :placeholder="$t('请选择')" v-model="sectionId" @change="sectionChange"> <el-select :placeholder="$t('请选择')" v-model="sectionId" @change="sectionChange">
<el-option key="0" :label="$t('全部')" value="0"></el-option> <el-option key="0" :label="$t('全部')" value="0"></el-option>
<el-option v-for="item in sectionList" :key="item.id" :label="item.title" :value="item.id"></el-option> <el-option v-for="item in sectionList" :key="item.id" :label="item.title" :value="item.id"></el-option>
</el-select> </el-select>
<p> <p>
{{getSectionInfo}} {{ getSectionInfo }}
</p> </p>
</el-row> </el-row>
<el-row> <el-row>
<el-form inline> <el-form inline>
<el-form-item :label="$t('订单号')"> <el-form-item :label="$t('订单号')">
...@@ -48,7 +47,7 @@ ...@@ -48,7 +47,7 @@
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status" :filter="statusDictFilter" clearable /> <dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status" :filter="statusDictFilter" clearable />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="batchUnLoad" :disabled="!multipleSelection.length">{{$t('选中订单一键卸柜')}}</el-button> <el-button @click="batchUnLoad" :disabled="!multipleSelection.length">{{ $t("选中订单一键卸柜") }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
...@@ -61,20 +60,21 @@ ...@@ -61,20 +60,21 @@
<el-table-column :label="$t('订单号')" align="center" prop="orderNo"> <el-table-column :label="$t('订单号')" align="center" prop="orderNo">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.orderNo }}</a> <a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.orderNo }}</a>
</div> </div>
<div style="color:blue;fontWeight:bold;"> <div style="color: blue; fontweight: bold">
{{ scope.row.isExternalWarehouse === 1 ? '(' + $t('外部仓') + ')' : ''}} {{ scope.row.isExternalWarehouse === 1 ? "(" + $t("外部仓") + ")" : "" }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('商品信息')" align="center" prop="goodsList" width="200px"> <el-table-column :label="$t('商品信息')" align="center" prop="goodsList" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<section class="table-goodList"> <section class="table-goodList">
<div v-for="(item, index) in scope.row.goodsList" :key="index" class="goodList-div"> <div v-for="(item, index) in scope.row.goodsList" :key="index" class="goodList-div">
<p>{{$t('品名')}}{{$l(item, 'prodTitle')}}</p> <p>{{ $t("品名") }}{{ $l(item, "prodTitle") }}</p>
<p>{{$t('品牌')}}:【<template v-if="item.brandName">{{item.brandName}}</template> <p>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="item.feeType" />{{ $t('】') }}</p> {{ $t("品牌") }}:【<template v-if="item.brandName">{{ item.brandName }}</template> <dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="item.feeType" />{{ $t("】") }}
</p>
</div> </div>
</section> </section>
</template> </template>
...@@ -89,25 +89,25 @@ ...@@ -89,25 +89,25 @@
<el-table-column :label="$t('实装箱数')" align="center" prop="installNum"> <el-table-column :label="$t('实装箱数')" align="center" prop="installNum">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.installNum }}</a> <a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.installNum }}</a>
</div> </div>
<div style="color:blue;fontWeight:bold;"> <div style="color: blue; fontweight: bold">
{{ scope.row.isExternalWarehouse === 1 ? '(' + $t('外部仓') + ')' : ''}} {{ scope.row.isExternalWarehouse === 1 ? "(" + $t("外部仓") + ")" : "" }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('卸柜箱数')" align="center" prop="unloadNum"> <el-table-column :label="$t('卸柜箱数')" align="center" prop="unloadNum">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.unloadNum }}</a> <a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.unloadNum }}</a>
</div> </div>
<div style="color:blue;fontWeight:bold;"> <div style="color: blue; fontweight: bold">
{{ scope.row.isExternalWarehouse === 1 ? '(' + $t('外部仓') + ')' : ''}} {{ scope.row.isExternalWarehouse === 1 ? "(" + $t("外部仓") + ")" : "" }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('清关状态')" align="center" prop=""> <el-table-column :label="$t('清关状态')" align="center" prop="">
<template slot-scope="scope">{{clearStatus(scope.row)}}</template> <template slot-scope="scope">{{ clearStatus(scope.row) }}</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('始发仓')" align="center" prop="startWarehouseName" /> <el-table-column :label="$t('始发仓')" align="center" prop="startWarehouseName" />
<el-table-column :label="$t('目的仓')" align="center" prop="destWarehouseName" /> <el-table-column :label="$t('目的仓')" align="center" prop="destWarehouseName" />
...@@ -115,22 +115,27 @@ ...@@ -115,22 +115,27 @@
<el-table-column :label="$t('重量')" align="center" prop="weight" /> <el-table-column :label="$t('重量')" align="center" prop="weight" />
<el-table-column :label="$t('订单状态')" align="center" prop=""> <el-table-column :label="$t('订单状态')" align="center" prop="">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.statusMsg}} {{ scope.row.statusMsg }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('异常状态')" align="center" prop=""> <el-table-column :label="$t('异常状态')" align="center" prop="">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.exceptionList" type="text" size="small" @click="handleError(scope.row)" icon="el-icon-edit">{{getOrderError(scope.row, 'errorStatus')}}</el-button> <el-button v-if="scope.row.exceptionList" type="text" size="small" @click="handleError(scope.row)" icon="el-icon-edit">{{ getOrderError(scope.row, "errorStatus") }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('异常类型')" align="center" prop=""> <el-table-column :label="$t('异常类型')" align="center" prop="">
<template slot-scope="scope"> <template slot-scope="scope">
{{getUnloadError(scope.row.exceptionList)}} {{ getUnloadError(scope.row.exceptionList) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="danger" size="small" @click="openError(scope.row)">{{$t('异常')}}</el-button> <div class="btns">
<el-button type="danger" size="small" @click="openError(scope.row)">{{ $t("异常") }}</el-button>
<el-button plain type="primary" size="small" @click="order_warehouse_check_revoke(scope.row.orderId)" v-if="scope.row.inWarehouseState == 218">{{ $t("撤销到仓") }}</el-button>
<el-button plain type="primary" size="small" @click="order_warehouse_check_force(scope.row.orderId)" v-if="scope.row.installNum > scope.row.unloadNum">{{ $t("强制到仓") }}</el-button>
<el-button plain type="primary" size="small" @click="$router.push('/order/warehousingTo-update?id=' + scope.row.orderId)" v-if="scope.row.inWarehouseState == 218">{{ $t("到仓修改") }}</el-button>
</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -140,14 +145,14 @@ ...@@ -140,14 +145,14 @@
<el-row> <el-row>
<div class="label-font"> <div class="label-font">
<p> <p>
<span>{{$t('总计')}}:</span> <span>{{ $t("总计") }}:</span>
<span>{{getTotlContent(pageData.totalStatistics)}}</span> <span>{{ getTotlContent(pageData.totalStatistics) }}</span>
</p> </p>
</div> </div>
<div class="label-font"> <div class="label-font">
<p> <p>
<span>{{$t('已卸')}}:</span> <span>{{ $t("已卸") }}:</span>
<span>{{getUnLoadNumCount}}</span> <span>{{ getUnLoadNumCount }}</span>
</p> </p>
</div> </div>
</el-row> </el-row>
...@@ -155,23 +160,23 @@ ...@@ -155,23 +160,23 @@
<!-- 审核流程 --> <!-- 审核流程 -->
<el-row class="process-area"> <el-row class="process-area">
<div class="process"> <div class="process">
<div>{{$t('审批流程')}}</div> <div>{{ $t("审批流程") }}</div>
<work-flow xmlkey="unload_container" v-model="selectedUsers"></work-flow> <work-flow xmlkey="unload_container" v-model="selectedUsers"></work-flow>
</div> </div>
<!-- 操作 --> <!-- 操作 -->
<div v-if="!isUnderReview"> <div v-if="!isUnderReview">
<el-button type="success" :disabled="isSuccessReview" @click="onSubmit">{{$t('卸柜完成')}}</el-button> <el-button type="success" :disabled="isSuccessReview" @click="onSubmit">{{ $t("卸柜完成") }}</el-button>
<el-button plain type="primary" @click="$emit('closeStart')">{{$t('返回')}}</el-button> <el-button plain type="primary" @click="$emit('closeStart')">{{ $t("返回") }}</el-button>
</div> </div>
<div v-if="isUnderReview"> <div v-if="isUnderReview">
<el-button type="primary" @click="jumpReviewDetail">{{$t('卸柜审核中')}}</el-button> <el-button type="primary" @click="jumpReviewDetail">{{ $t("卸柜审核中") }}</el-button>
<el-button plain type="primary" @click="canclAudit">{{$t('取消审核')}}</el-button> <el-button plain type="primary" @click="canclAudit">{{ $t("取消审核") }}</el-button>
<el-button plain type="primary" @click="$emit('closeStart')">{{$t('返回')}}</el-button> <el-button plain type="primary" @click="$emit('closeStart')">{{ $t("返回") }}</el-button>
</div> </div>
</el-row> </el-row>
<!-- 对话框 --> <!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :fullscreen="dialogConfig.fullscreen" :width="dialogConfig.width" :modal-append-to-body=false append-to-body> <el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :fullscreen="dialogConfig.fullscreen" :width="dialogConfig.width" :modal-append-to-body="false" append-to-body>
<template v-if="dialogConfig.type === 'orderTable'"> <template v-if="dialogConfig.type === 'orderTable'">
<el-table :data="orderList" height="500px" border> <el-table :data="orderList" height="500px" border>
<el-table-column :label="$t('实装')" align="center" prop="loadTag" /> <el-table-column :label="$t('实装')" align="center" prop="loadTag" />
...@@ -180,35 +185,26 @@ ...@@ -180,35 +185,26 @@
</template> </template>
</el-dialog> </el-dialog>
<!-- 对话框 --> <!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="$t('异常')" :visible.sync="dialogVisible" width="600px" :modal-append-to-body=false append-to-body> <el-dialog custom-class="shipping-dialog" :title="$t('异常')" :visible.sync="dialogVisible" width="600px" :modal-append-to-body="false" append-to-body>
<unloadingError v-if="dialogVisible" @closeDialog="closeDialog" v-bind="$attrs" :currRow="currRow" /> <unloadingError v-if="dialogVisible" @closeDialog="closeDialog" v-bind="$attrs" :currRow="currRow" />
</el-dialog> </el-dialog>
<el-dialog :title="$t('批量卸柜选中订单')" :visible="batchUnloading" :before-close="handleCloseBatchUnloading" append-to-body> <el-dialog :title="$t('批量卸柜选中订单')" :visible="batchUnloading" :before-close="handleCloseBatchUnloading" append-to-body>
<template v-for="item in batchLogs"> <template v-for="item in batchLogs">
<div>{{item}}</div> <div>{{ item }}</div>
</template> </template>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import unloadingError from "./unloadingError.vue"; import unloadingError from "./unloadingError.vue"
import { import { loadGoodsList, batchUnload, orderTagList, allUnload, approvalCreate, approvalCancel, getSectionList, singleUnload } from "@/api/ecw/boxSea"
loadGoodsList, import { serviceMsg, getTotlContent, toReviewDetail } from "../../utils"
batchUnload, import WorkFlow from "@/components/WorkFlow"
orderTagList, import Decimal from "decimal.js"
allUnload, import { getWarehouseList } from "@/api/ecw/warehouse"
approvalCreate, import Template from "@/views/cms/template/index.vue"
approvalCancel, import { order_warehouse_check_revoke, order_warehouse_check_force } from "@/api/ecw/order"
getSectionList,
singleUnload,
} from "@/api/ecw/boxSea";
import { serviceMsg, getTotlContent, toReviewDetail } from "../../utils";
import WorkFlow from "@/components/WorkFlow";
import Decimal from "decimal.js";
import { getWarehouseList } from '@/api/ecw/warehouse'
import Template from '@/views/cms/template/index.vue'
/** /**
* 开始卸柜 * 开始卸柜
*/ */
...@@ -236,30 +232,30 @@ export default { ...@@ -236,30 +232,30 @@ export default {
sectionList: [], sectionList: [],
// 已选部分 // 已选部分
sectionId: "0", sectionId: "0",
// 已卸/未卸 // 已卸/未卸
orderList: [], orderList: [],
// 弹窗配置 // 弹窗配置
dialogConfig: { dialogConfig: {
title: "", title: "",
dialogVisible: false, dialogVisible: false,
width: "30%", width: "30%",
type: "", type: "",
fullscreen: false, fullscreen: false
}, },
// 部分订单商品 // 部分订单商品
sectionObj: { sectionObj: {
secStatistics: {}, secStatistics: {},
sectionOrderList: [], sectionOrderList: [],
totalStatistics: {}, totalStatistics: {}
}, },
selectedUsers: [], selectedUsers: [],
ulWarehouseTime: null, ulWarehouseTime: null,
warehouseList:[], warehouseList: [],
// 筛选参数 // 筛选参数
queryParams:{ queryParams: {
orderNo: '', orderNo: "",
startWarehouseIds:[], startWarehouseIds: [],
destWarehouseIds:[], destWarehouseIds: [],
status: null status: null
}, },
// 表格选中的 // 表格选中的
...@@ -267,62 +263,74 @@ export default { ...@@ -267,62 +263,74 @@ export default {
// 是否正在批量卸柜 // 是否正在批量卸柜
batchUnloading: false, batchUnloading: false,
// 批量操作的日志 // 批量操作的日志
batchLogs:[] batchLogs: []
}; }
}, },
created() { created() {
getWarehouseList().then(res => this.warehouseList = res.data) getWarehouseList().then((res) => (this.warehouseList = res.data))
this.getLoadGoodsList(); this.getLoadGoodsList()
// 部分 // 部分
getSectionList({ shipmentId: this.$attrs.shipmentObj.id }).then((res) => { getSectionList({ shipmentId: this.$attrs.shipmentObj.id }).then((res) => {
this.sectionList = res.data.map((item, index) => { this.sectionList = res.data.map((item, index) => {
return { return {
...item, ...item,
title: this.$t("第{index}部分", { index: index + 1 }), title: this.$t("第{index}部分", { index: index + 1 })
}; }
}); })
}); })
}, },
methods: { methods: {
order_warehouse_check_revoke(orderId) {
this.$confirm(this.$t("确定要撤销到仓么?")).then(async () => {
let r = await order_warehouse_check_revoke({ orderId })
this.getLoadGoodsList()
})
},
order_warehouse_check_force(orderId) {
this.$confirm(this.$t("确定要强制到仓么?")).then(async () => {
let r = await order_warehouse_check_force({ orderId })
this.getLoadGoodsList()
})
},
getTotlContent, getTotlContent,
/* 获取卸柜数据 */ /* 获取卸柜数据 */
getLoadGoodsList() { getLoadGoodsList() {
this.loading = true; this.loading = true
let params = { let params = {
secId: this.sectionId, secId: this.sectionId,
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id
}; }
loadGoodsList(params).then((res) => { loadGoodsList(params).then((res) => {
const { data } = res; const { data } = res
this.pageData = data; this.pageData = data
this.loading = false; this.loading = false
}); })
}, },
/* 单个卸柜 */ /* 单个卸柜 */
modifyUnload() { modifyUnload() {
if (!this.labelNo) { if (!this.labelNo) {
this.$message.error(this.$t("请输入箱号标签")); this.$message.error(this.$t("请输入箱号标签"))
return; return
} }
singleUnload({ singleUnload({
orderNumCode: this.labelNo, orderNumCode: this.labelNo,
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then((res) => { serviceMsg(res, this).then((res) => {
this.labelNo = ""; this.labelNo = ""
this.getLoadGoodsList(); this.getLoadGoodsList()
}); })
}); })
}, },
/* 批量输入 */ /* 批量输入 */
modifyBatchUnload() { modifyBatchUnload() {
if (!this.labelNo) { if (!this.labelNo) {
this.$message.error(this.$t("请输入订单号")); this.$message.error(this.$t("请输入订单号"))
return; return
} }
if (!this.ulWarehouseTime) { if (!this.ulWarehouseTime) {
this.$message.error(this.$t("请选择卸柜时间")); this.$message.error(this.$t("请选择卸柜时间"))
return; return
} }
batchUnload({ batchUnload({
orderNo: this.labelNo, orderNo: this.labelNo,
...@@ -330,28 +338,28 @@ export default { ...@@ -330,28 +338,28 @@ export default {
unloadTime: this.ulWarehouseTime unloadTime: this.ulWarehouseTime
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then((res) => { serviceMsg(res, this).then((res) => {
this.labelNo = ""; this.labelNo = ""
this.getLoadGoodsList(); this.getLoadGoodsList()
}); })
}); })
}, },
/* 一键卸柜 */ /* 一键卸柜 */
modifyAllUnload() { modifyAllUnload() {
if (!this.ulWarehouseTime) { if (!this.ulWarehouseTime) {
this.$message.error(this.$t("请选择卸柜时间")); this.$message.error(this.$t("请选择卸柜时间"))
return; return
} }
this.$confirm(this.$t("确认卸柜?"), this.$t("提示"), { this.$confirm(this.$t("确认卸柜?"), this.$t("提示"), {
type: "warning", type: "warning"
}) })
.then((_) => { .then((_) => {
allUnload({ shipmentId: this.$attrs.shipmentObj.id, unloadTime: this.ulWarehouseTime }).then((res) => { allUnload({ shipmentId: this.$attrs.shipmentObj.id, unloadTime: this.ulWarehouseTime }).then((res) => {
serviceMsg(res, this).then((res) => { serviceMsg(res, this).then((res) => {
this.getLoadGoodsList(); this.getLoadGoodsList()
}); })
}); })
}) })
.catch((_) => {}); .catch((_) => {})
}, },
/** 提交 */ /** 提交 */
onSubmit() { onSubmit() {
...@@ -359,211 +367,211 @@ export default { ...@@ -359,211 +367,211 @@ export default {
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
approvalStatus: 0, approvalStatus: 0,
approvalType: 3, // 卸柜 approvalType: 3, // 卸柜
copyUserId: this.selectedUsers, copyUserId: this.selectedUsers
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.cancel(); this.cancel()
}); })
}); })
}, },
/** 表格订单号点击 */ /** 表格订单号点击 */
orderClick(row) { orderClick(row) {
orderTagList({ orderId: row.orderId }).then((res) => { orderTagList({ orderId: row.orderId }).then((res) => {
const { data = {} } = res; const { data = {} } = res
this.orderList = []; this.orderList = []
// 取最长的list // 取最长的list
let dataLength = data.loadList.length; let dataLength = data.loadList.length
if (data.unLoadList.length > dataLength) { if (data.unLoadList.length > dataLength) {
dataLength = data.unLoadList.length; dataLength = data.unLoadList.length
} }
// 组装数据,用一个table组件渲染 // 组装数据,用一个table组件渲染
for (let index = 0; index < dataLength; index++) { for (let index = 0; index < dataLength; index++) {
this.orderList.push({ this.orderList.push({
loadTag: data.loadList[index], loadTag: data.loadList[index],
unloadTag: data.unloadCabinetList[index], unloadTag: data.unloadCabinetList[index]
}); })
} }
}); })
this.shwoDialog({ this.shwoDialog({
type: "orderTable", type: "orderTable",
title: row.selfNo, title: row.selfNo
}); })
}, },
/** 取消 */ /** 取消 */
cancel() { cancel() {
this.$emit("closeStart", "submit"); this.$emit("closeStart", "submit")
}, },
/** 弹窗事件 */ /** 弹窗事件 */
shwoDialog(config) { shwoDialog(config) {
this.$set(this.dialogConfig, "title", config.title); this.$set(this.dialogConfig, "title", config.title)
this.$set(this.dialogConfig, "type", config.type); this.$set(this.dialogConfig, "type", config.type)
switch (config.type) { switch (config.type) {
case "orderTable": case "orderTable":
this.$set(this.dialogConfig, "fullscreen", false); this.$set(this.dialogConfig, "fullscreen", false)
break; break
case "supplementOrder": case "supplementOrder":
this.$set(this.dialogConfig, "fullscreen", true); this.$set(this.dialogConfig, "fullscreen", true)
break; break
case "batchInput": case "batchInput":
this.$set(this.dialogConfig, "fullscreen", false); this.$set(this.dialogConfig, "fullscreen", false)
this.batchObj = { boxNum: 0 }; this.batchObj = { boxNum: 0 }
this.boxOrderInfo = {}; this.boxOrderInfo = {}
break; break
case "correction": case "correction":
this.$set(this.dialogConfig, "fullscreen", false); this.$set(this.dialogConfig, "fullscreen", false)
this.correctionObj = {}; this.correctionObj = {}
break; break
case "correctionOrder": case "correctionOrder":
this.$set(this.dialogConfig, "fullscreen", false); this.$set(this.dialogConfig, "fullscreen", false)
this.orderObj = {}; this.orderObj = {}
break; break
case "modifyCabinet": case "modifyCabinet":
this.$set(this.dialogConfig, "fullscreen", false); this.$set(this.dialogConfig, "fullscreen", false)
this.modifyCabinetObj = {}; this.modifyCabinetObj = {}
this.$set(this.modifyCabinetObj,'cabinetId',this.shipmentObj.cabinetId) this.$set(this.modifyCabinetObj, "cabinetId", this.shipmentObj.cabinetId)
this.$set(this.modifyCabinetObj,'cubNo',this.shipmentObj.cubNo) this.$set(this.modifyCabinetObj, "cubNo", this.shipmentObj.cubNo)
break; break
case "splitOrder": case "splitOrder":
this.$set(this.dialogConfig, "fullscreen", true); this.$set(this.dialogConfig, "fullscreen", true)
break; break
} }
this.$set(this.dialogConfig, "dialogVisible", true); this.$set(this.dialogConfig, "dialogVisible", true)
}, },
/* 关闭弹窗 */ /* 关闭弹窗 */
closeDialog(type) { closeDialog(type) {
this.dialogVisible = false; this.dialogVisible = false
if (type === "query") this.getLoadGoodsList(); if (type === "query") this.getLoadGoodsList()
}, },
/* 打开异常 */ /* 打开异常 */
openError(row) { openError(row) {
this.currRow = row; this.currRow = row
this.dialogVisible = true; this.dialogVisible = true
}, },
/* 清关状态 */ /* 清关状态 */
clearStatus(row) { clearStatus(row) {
const { installNum, unloadNum } = row; const { installNum, unloadNum } = row
if (installNum === unloadNum) { if (installNum === unloadNum) {
return this.$t("全部清关"); return this.$t("全部清关")
} }
if (installNum >= unloadNum) { if (installNum >= unloadNum) {
return this.$t("部分清关"); return this.$t("部分清关")
} }
if (unloadNum === 0) { if (unloadNum === 0) {
return this.$t("未清关"); return this.$t("未清关")
} }
}, },
// 部分切换 // 部分切换
sectionChange() { sectionChange() {
this.getLoadGoodsList(); this.getLoadGoodsList()
}, },
/* 取消审核 */ /* 取消审核 */
canclAudit() { canclAudit() {
const { shipmentObj } = this.$attrs; const { shipmentObj } = this.$attrs
approvalCancel({ approvalCancel({
applyReason: this.$t("取消审核"), applyReason: this.$t("取消审核"),
id: shipmentObj["cabinetUnloadApprovalInfo"].id, id: shipmentObj["cabinetUnloadApprovalInfo"].id,
shipmentId: shipmentObj.id, shipmentId: shipmentObj.id
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.cancel(); this.cancel()
}); })
}); })
}, },
// 获取异常类型 // 获取异常类型
getUnloadError(exceptionList) { getUnloadError(exceptionList) {
if (!exceptionList) return exceptionList; if (!exceptionList) return exceptionList
const codes = this.getDictDatas(this.DICT_TYPE.ORDER_ERROR_TYPE); const codes = this.getDictDatas(this.DICT_TYPE.ORDER_ERROR_TYPE)
let errorLabels = []; let errorLabels = []
exceptionList.forEach((item) => { exceptionList.forEach((item) => {
const errObj = codes.find( const errObj = codes.find((cItem) => cItem.value === item.orderExceptionType)
(cItem) => cItem.value === item.orderExceptionType if (errObj) errorLabels.push(errObj.label)
); })
if (errObj) errorLabels.push(errObj.label); return errorLabels.join(",")
});
return errorLabels.join(",");
}, },
// 订单异常 // 订单异常
getOrderError(row, type) { getOrderError(row, type) {
if (row.exceptionList && row.exceptionList.length) { if (row.exceptionList && row.exceptionList.length) {
return type === "orderStatus" ? this.$t("卸柜异常") : this.$t("待处理"); return type === "orderStatus" ? this.$t("卸柜异常") : this.$t("待处理")
} }
return type === "orderStatus" ? this.$t("已到港") : ""; return type === "orderStatus" ? this.$t("已到港") : ""
}, },
// 处理异常 // 处理异常
handleError(row) { handleError(row) {
this.$emit("closeStart", "close"); this.$emit("closeStart", "close")
this.$router.push({ this.$router.push({
path: `/order/pending?id=${row.orderId}`, path: `/order/pending?id=${row.orderId}`
}); })
}, },
jumpReviewDetail() { jumpReviewDetail() {
const { cabinetUnloadApprovalInfo } = this.$attrs.shipmentObj; const { cabinetUnloadApprovalInfo } = this.$attrs.shipmentObj
toReviewDetail.apply(this, [cabinetUnloadApprovalInfo.bpmProcessId]); toReviewDetail.apply(this, [cabinetUnloadApprovalInfo.bpmProcessId])
this.$emit("closeStart", "close"); this.$emit("closeStart", "close")
}, },
// 表格多选 // 表格多选
handleSelectionChange(selection) { handleSelectionChange(selection) {
console.log({selection}) console.log({ selection })
this.multipleSelection = selection this.multipleSelection = selection
}, },
async batchUnLoad(){ async batchUnLoad() {
if(!this.multipleSelection?.length){ if (!this.multipleSelection?.length) {
return this.$message(this.$t('请先选择订单')) return this.$message(this.$t("请先选择订单"))
} }
if(!this.ulWarehouseTime){ if (!this.ulWarehouseTime) {
return this.$message(this.$t('请选择卸柜时间')) return this.$message(this.$t("请选择卸柜时间"))
} }
console.log('批量卸柜') console.log("批量卸柜")
this.batchUnloading = true this.batchUnloading = true
this.batchLogs = [] this.batchLogs = []
for(const item of this.multipleSelection){ for (const item of this.multipleSelection) {
if(!this.batchUnloading)break; if (!this.batchUnloading) break
const time = new Date() const time = new Date()
const timeStr = [time.getHours(), time.getMinutes(), time.getSeconds()].map(item => item.toString().padStart(2, '0')).join(':') const timeStr = [time.getHours(), time.getMinutes(), time.getSeconds()].map((item) => item.toString().padStart(2, "0")).join(":")
await batchUnload({ await batchUnload({
orderNo: item.orderNo, orderNo: item.orderNo,
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
unloadTime: this.ulWarehouseTime unloadTime: this.ulWarehouseTime
}).then((res) => { })
this.batchLogs.push(`${timeStr} 订单号:${item.orderNo}卸柜成功`) .then((res) => {
}).catch((err) => { this.batchLogs.push(`${timeStr} 订单号:${item.orderNo}卸柜成功`)
this.batchLogs.push(`${timeStr} 订单号:${item.orderNo}卸柜失败` + JSON.stringify(err)) })
}); .catch((err) => {
this.batchLogs.push(`${timeStr} 订单号:${item.orderNo}卸柜失败` + JSON.stringify(err))
})
} }
this.batchLogs.push("批量卸柜完成") this.batchLogs.push("批量卸柜完成")
this.getLoadGoodsList(); this.getLoadGoodsList()
}, },
handleCloseBatchUnloading(){ handleCloseBatchUnloading() {
this.batchUnloading = false this.batchUnloading = false
}, },
// 过滤订单状态筛选字典内容 // 过滤订单状态筛选字典内容
statusDictFilter(item){ statusDictFilter(item) {
if(item.cssClass && item.cssClass != 'sea'){ if (item.cssClass && item.cssClass != "sea") {
return false return false
} }
return true return true
}, }
}, },
computed: { computed: {
exportWarehouseList(){ exportWarehouseList() {
/* tradeType 1 进口,2出口,3进出口 */ /* tradeType 1 进口,2出口,3进出口 */
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)
}, },
filteredOrderList(){ filteredOrderList() {
if(!this.pageData?.sectionOrderList?.length) return [] if (!this.pageData?.sectionOrderList?.length) return []
return this.pageData.sectionOrderList.filter((item) => { return this.pageData.sectionOrderList.filter((item) => {
if(this.queryParams.orderNo && item.orderNo.indexOf(this.queryParams.orderNo) == -1 )return false if (this.queryParams.orderNo && item.orderNo.indexOf(this.queryParams.orderNo) == -1) return false
if(this.queryParams.startWarehouseIds?.length && this.queryParams.startWarehouseIds.indexOf(item.startWarehouseName) === -1){ if (this.queryParams.startWarehouseIds?.length && this.queryParams.startWarehouseIds.indexOf(item.startWarehouseName) === -1) {
return false return false
} }
if(this.queryParams.destWarehouseIds?.length && this.queryParams.destWarehouseIds.indexOf(item.destWarehouseName) === -1){ if (this.queryParams.destWarehouseIds?.length && this.queryParams.destWarehouseIds.indexOf(item.destWarehouseName) === -1) {
return false return false
} }
if(this.queryParams.status && this.queryParams.status != item.status){ if (this.queryParams.status && this.queryParams.status != item.status) {
return false return false
} }
return true return true
...@@ -571,38 +579,47 @@ export default { ...@@ -571,38 +579,47 @@ export default {
}, },
/* 是否审核中 */ /* 是否审核中 */
isUnderReview() { isUnderReview() {
const { currNode, shipmentObj } = this.$attrs; const { currNode, shipmentObj } = this.$attrs
return shipmentObj[currNode.keyName] === 183 ? true : false; return shipmentObj[currNode.keyName] === 183 ? true : false
}, },
/* 是否卸柜审核成功 */ /* 是否卸柜审核成功 */
isSuccessReview() { isSuccessReview() {
const { currNode, shipmentObj } = this.$attrs; const { currNode, shipmentObj } = this.$attrs
return shipmentObj[currNode.keyName] === 185 ? true : false; return shipmentObj[currNode.keyName] === 185 ? true : false
}, },
// 部分信息 // 部分信息
getSectionInfo() { getSectionInfo() {
const { totalStatistics, secStatistics } = this.pageData; const { totalStatistics, secStatistics } = this.pageData
if (!this.sectionId) { if (!this.sectionId) {
return getTotlContent(totalStatistics); return getTotlContent(totalStatistics)
} else { } else {
return getTotlContent(secStatistics); return getTotlContent(secStatistics)
} }
}, },
/* 已卸总数 */ /* 已卸总数 */
getUnLoadNumCount() { getUnLoadNumCount() {
let count = 0; let count = 0
if (this.pageData.sectionOrderList) { if (this.pageData.sectionOrderList) {
this.pageData.sectionOrderList.forEach((item) => { this.pageData.sectionOrderList.forEach((item) => {
count = Decimal.add(count, item.unloadNum).toNumber(); count = Decimal.add(count, item.unloadNum).toNumber()
}); })
} }
return count; return count
}, }
}, }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.btns {
& > * {
&:nth-child(n + 1) {
margin: 0 auto;
margin-top: 6px;
display: block;
}
}
}
.app-startUnloading { .app-startUnloading {
p { p {
margin: 0; margin: 0;
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
<el-input-number v-model="form.weightYearly" :min="1" /> <el-input-number v-model="form.weightYearly" :min="1" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('主要竞争对手')" prop="competitorIds"> <el-form-item :label="$t('主要竞争对手')" prop="competitorIds">
<el-select clearable v-model="form.competitorIds" :placeholder="$t('请选择')" @change="changeCompetitor"> <el-select clearable v-model="form.competitorIds" :placeholder="$t('请选择')" @change="changeCompetitor">
<el-option v-for="item in competitorList" :key="item.id" :label="item.name" :value="item.id" /> <el-option v-for="item in competitorList" :key="item.id" :label="item.name" :value="item.id" />
......
...@@ -411,8 +411,9 @@ ...@@ -411,8 +411,9 @@
</div> </div>
<div class="form-section"> <div class="form-section">
<el-form-item :label="$t('竞争对手')" prop="competitor"> <el-form-item :label="$t('竞争对手')" prop="competitor">
<el-select clearable v-model="form.competitor" :placeholder="$t('请选择')" class="w-200"> <el-select clearable v-model="form.competitor" :placeholder="$t('请选择')" class="w-200" @change="changeCompetitor">
<el-option v-for="item in competitorList" :key="item.id" :label="item.name" :value="item.id" /> <el-option v-for="item in competitorList" :key="item.id" :label="item.name" :value="item.id" />
<el-option :label="$t('其他')" :value="0" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('重要程度')" prop="importance"> <el-form-item :label="$t('重要程度')" prop="importance">
...@@ -563,7 +564,7 @@ import { getCustomerContactsSelect } from "@/api/ecw/customerContacts" ...@@ -563,7 +564,7 @@ import { getCustomerContactsSelect } from "@/api/ecw/customerContacts"
import Decimal from "decimal.js" import Decimal from "decimal.js"
import getQuote from "@/views/ecw/customer/index.vue" import getQuote from "@/views/ecw/customer/index.vue"
import { getRegionList } from "@/api/ecw/order" import { getRegionList } from "@/api/ecw/order"
import { competitorListAll } from "@/api/ecw/customer" import { competitorListAll, addCompetitor } from "@/api/ecw/customer"
import { getCustomerContactsListByCustomer } from "@/api/ecw/customerContacts" import { getCustomerContactsListByCustomer } from "@/api/ecw/customerContacts"
import { parse } from "querystring" import { parse } from "querystring"
...@@ -1435,6 +1436,27 @@ export default { ...@@ -1435,6 +1436,27 @@ export default {
arr.push(tmp) arr.push(tmp)
}) })
return arr return arr
},
changeCompetitor(val) {
if (val == 0) {
this.$prompt("请输入主要竞争对手", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then((data) => {
console.log(data)
addCompetitor({
name: data.value
}).then((r) => {
this.$message.success("添加成功!")
competitorListAll().then((res) => {
this.competitorList = res.data
this.$nextTick(() => {
this.form.competitor = r.data
})
})
})
})
}
} }
} }
} }
......
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px"> <el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index }">
<warehouse-area-select v-if="visible" v-model="form.table[$index].orderLocationBackVOList" :order-id="orderId" :order-item-id="warehousing.orderItemId" :warehouse-in-id="form.table[$index].id" :warehouse-id="warehouseId" :is-editing="false"></warehouse-area-select> <warehouse-area-select v-if="visible" v-model="form.table[$index].orderLocationBackVOList" :order-id="orderId" :order-item-id="warehousing.orderItemId" :warehouse-in-id="form.table[$index].id" :warehouse-id="warehouseId" :is-editing="false" readonly></warehouse-area-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('备注')"> <el-table-column :label="$t('备注')">
......
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