Commit fd3591d3 authored by dragondean@qq.com's avatar dragondean@qq.com
parents b5aa9c18 0ab4078e
import request from "@/utils/request";
import {param} from "@/utils";
//获得可用仓
export function warehouseAdjustmentList(params){
return request({
url:'/ecw/warehouse/adjustmentList',
method:'post',
params:params
})
}
//发起调仓请求
export function orderWarehouseInAdjustApply(data){
return request({
url:'/order/order-warehouse-in/adjust-apply',
method:'put',
data:data,
})
}
//获取订单列表
export function ecwOrderList(params){
return request({
url:'/ecw/order/list',
method:'get',
params:params,
})
}
//申请退仓
export function orderWarehouseInDelete(data){
return request({
url:'/order/order-warehouse-in/rollback-apply',
method:'put',
data:data,
})
}
//通过bpmFormId 获得仓库审核单详情
export function warehouseApprovalGetByFormId(params){
return request({
url:'order/order-warehouse-approval/get-by-form-id',
method:'get',
params:params
})
}
export function warehouseAreaPositionList(params){
return request({
url:'/ecw/warehouse/list',
method:'get',
params:params
})
}
// 根据审核ID获得仓库审核单详情
export function warehouseApprovalGetById(params){
return request({
url:'/order/order-warehouse-approval/get-by-id',
method:'get',
params,
})
}
......@@ -61,6 +61,50 @@ export function agentSet(data) {
});
}
/**
* 装柜
*
* @export
* @param {*} data
* @return {*}
*/
export function cabinetCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-cabinet/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-cabinet/create",
method: "post",
data,
});
}
/**
* 报关
*
* @export
* @param {*} data
* @return {*}
*/
export function customsCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-customs/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-customs/create",
method: "post",
data,
});
}
/**
* 配船
*
......@@ -85,6 +129,13 @@ export function shipConfigure(data) {
* @return {*}
*/
export function billCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-lading-bill/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-lading-bill/create",
method: "post",
......@@ -100,6 +151,13 @@ export function billCreate(data) {
* @return {*}
*/
export function bargeCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-barge/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-barge/create",
method: "post",
......@@ -115,6 +173,13 @@ export function bargeCreate(data) {
* @return {*}
*/
export function shippingCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-shipping/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-shipping/create",
method: "post",
......@@ -130,6 +195,13 @@ export function shippingCreate(data) {
* @return {*}
*/
export function ladingCopyCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-lading-copy/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-lading-copy/create",
method: "post",
......@@ -145,6 +217,13 @@ export function ladingCopyCreate(data) {
* @return {*}
*/
export function clearanceDocCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-clearance-doc/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-clearance-doc/create",
method: "post",
......@@ -160,6 +239,13 @@ export function clearanceDocCreate(data) {
* @return {*}
*/
export function arrivalCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-arrival/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-arrival/create",
method: "post",
......@@ -175,6 +261,13 @@ export function arrivalCreate(data) {
* @return {*}
*/
export function clearanceCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-clearance/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-clearance/create",
method: "post",
......@@ -182,6 +275,28 @@ export function clearanceCreate(data) {
});
}
/**
* 卸柜
*
* @export
* @param {*} data
* @return {*}
*/
export function unloadCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-cabinet-unload/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-cabinet-unload/create",
method: "post",
data,
});
}
/**
* 结算
*
......@@ -190,6 +305,13 @@ export function clearanceCreate(data) {
* @return {*}
*/
export function settlementCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-settlement/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-settlement/create",
method: "post",
......@@ -197,6 +319,21 @@ export function settlementCreate(data) {
});
}
/**
* 出货审核
*
* @export
* @param {*} data
* @return {*}
*/
export function approvalCreate(data) {
return request({
url: "/ecw/box-approval/create",
method: "post",
data,
});
}
/***************************** 预装 start **********************************/
/**
......
import request from '@/utils/request'
import query from "@/views/ecw/customer/query";
import * as url from "url";
// 创建客户
export function createCustomer(data) {
......@@ -147,3 +148,10 @@ export function getMyCustomerService(query){
params:query,
})
}
//获取会员列表
export function userMemberUserList(){
return request({
url:'/member/user/member-user-list',
method:'get'
})
}
import request from '@/utils/request'
// 创建部门业绩目标设置
export function createDeptTarget(data) {
return request({
url: '/sale/dept-target/create',
method: 'post',
data: data
})
}
// 更新部门业绩目标设置
export function updateDeptTarget(data) {
return request({
url: '/sale/dept-target/update',
method: 'put',
data: data
})
}
// 删除部门业绩目标设置
export function deleteDeptTarget(id) {
return request({
url: '/sale/dept-target/delete?id=' + id,
method: 'delete'
})
}
export function getCreateInitData() {
return request({
url: '/sale/dept-target/getCreateInitData',
method: 'get'
})
}
// 获得部门业绩目标设置
export function getDeptTarget(id) {
return request({
url: '/sale/dept-target/get?id=' + id,
method: 'get'
})
}
// 获得部门业绩目标设置分页
export function getDeptTargetPage(query) {
return request({
url: '/sale/dept-target/statistics/page',
method: 'get',
params: query
})
}
// 导出部门业绩目标设置 Excel
export function exportDeptTargetExcel(query) {
return request({
url: '/sale/dept-target/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
......@@ -129,6 +129,14 @@ export function getLadingBill(query){
params: query,
})
}
//调仓申请
export function orderWarehouseInAdjustApply(data){
return request({
url:'/order/order-warehouse-in/adjust-apply',
method:'put',
data:data,
})
}
// 获得入仓货物详情
export function getOrderWarehouseIn(id) {
......@@ -156,6 +164,15 @@ export function orderWarehouseInFinish(data){
})
}
// 退仓
export function rollbackApply(data){
return request({
url: '/order/order-warehouse-in/rollback-apply',
method: 'put',
data
})
}
//取消订单
export function cancelOrder(orderId){
return request({
......@@ -181,6 +198,7 @@ export function getMyOrderPage(query) {
})
}
// 创建提货
export function createOrderPickup(data){
return request({
......@@ -207,3 +225,18 @@ export function createOrderPickupSplitBatch(data){
data
})
}
//根据流程ID获得订单信息
export function applicationGetOrderByProcessId(params){
return request({
url:'/order/fee-application/getOrderByProcessId',
method:'get',
params
})
}
export function feeApplicationGet(params){
return request({
url:'/order/fee-application/get',
method:'get',
params
})
}
......@@ -309,25 +309,15 @@ export const constantRoutes = [
}
},
{
path:'single-application/:orderId',
component:(resolve)=>require(['@/views/ecw/order/singleApplication'],resolve),
props: true,
name: 'singleApplication',
meta: {
title: '调仓申请',
icon: '',
activeMenu: '/order/singleApplication'
}
},
{
path: 'batch-single-application/:orderId',
path: 'batch-single-application',
component:(resolve)=> require(['@/views/ecw/order/batchSingleApplication'],resolve),
name: 'batchSingleApplication',
props: route => ({orderList:route.query.list}),
meta: {
title: '批量调仓申请',
icon:'',
activeMenu: '/order/batchSingleApplication'
activeMenu: '/order/batchSingleApplication',
noCache:true
}
},
{
......@@ -364,6 +354,30 @@ export const constantRoutes = [
activeMenu: '/order/notMutexOrder',
noCache: true,
}
},
{
path: 'withdrawal/:orderId',
component:()=>import ('@/views/ecw/order/withdrawal'),
name:'withdrawal',
props: true,
meta:{
title:'退仓',
icon:'',
activeMenu:'order/withdrawal',
noCache:true,
}
},
{
path: 'transfer-warehousing/:orderId',
component:()=>import('@/views/ecw/order/transferWarehousing'),
name:'transferWarehousing',
props: true,
meta:{
title:'调拨出仓',
icon:'',
activeMenu:'order/transferWarehousing',
noCache:true,
}
}
],
},
......
......@@ -153,9 +153,12 @@ export const DICT_TYPE = {
COMDINED_VALUE_ADDED_FEE:'combined_value_added_fee',
ORDER_SPECIAL_NEEDS:'order_special_needs', // 订单特殊需求
ORDER_ABNORMAL_STATE:'order_abnormal_state',
TARGET_TYPE:'target_type',//部门业绩目标类型
// ========== 出货模块 ==========
BOX_SHIPMENT_TRAILER_STATUS: 'shipment_trailer_status', // 拖车状态
BOX_SHIPPING_TRAILER_STATUS: 'shipping_trailer_status', // 拖车状态
BOX_SHIPPING_CUSTOMS_TYPE: 'shipping_customs_type', // 报关方式
BOX_SHIPPING_DCCUSTOMS_STATUS: 'shipping_dcCustoms_status', // 报关放行状态
BOX_SHIPPING_CHECK_STATUS: 'shipping_check_status', // 查验状态
}
/**
......
......@@ -50,9 +50,18 @@
<div v-if="this.processInstance.processDefinition && this.processInstance.processDefinition.formType === 20">
<!-- <span>{{this.processInstance.processDefinition.formCustomViewPath}}</span>-->
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='special-discount'">
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='special-discount'"><!--特价审核-->
<special-discount :id="this.processInstance.businessKey" readonly="true"></special-discount>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='free_apply'"><!--费用审核-->
<warehouseDetails :processId="this.processInstance.businessKey" :type="2" ></warehouseDetails>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='retired_warehouse'"><!--退仓申请-->
<warehouseDetails :processId="this.processInstance.businessKey" :type="3" ></warehouseDetails>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='warehouse_transfer'"><!--调仓申请-->
<warehouseDetails :processId="this.processInstance.businessKey" :type="1" ></warehouseDetails>
</div>
<div v-else>
<router-link :to="this.processInstance.processDefinition.formCustomViewPath + '?id='
+ this.processInstance.businessKey">
......@@ -135,13 +144,15 @@ import {getDate} from "@/utils/dateUtils";
import {listSimpleUsers} from "@/api/system/user";
import {getActivityList} from "@/api/bpm/activity";
import specialDiscount from "@/views/ecw/offer/specialDiscount"
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
// 流程实例的详情页,可用于审批
export default {
name: "ProcessInstanceDetail",
components: {
Parser,
specialDiscount
specialDiscount,
warehouseDetails
},
data() {
return {
......
......@@ -2,7 +2,7 @@
<div>
<el-form ref="agentForm" :model="agentObj" :rules="rules" label-width="120px">
<el-form-item label="代理商Agent" prop="agentId">
<supplierSelect v-model="agentObj.agentId" placeholder="请选择代理商" :allSupplier="this.$attrs.allSupplier" />
<supplierSelect v-model="agentObj.agentId" :companyType="'1'" placeholder="请选择代理商" :allSupplier="this.$attrs.allSupplier" />
</el-form-item>
</el-form>
<el-row class="operate-button">
......@@ -15,6 +15,7 @@
<script>
import { agentSet, serviceMsg } from "@/api/ecw/boxSea";
import supplierSelect from "./common/supplierSelect.vue";
import { formatStringNumber } from "../utils";
/**
* agent
*/
......@@ -32,6 +33,13 @@ export default {
},
};
},
created() {
const { currNode, shipmentObj } = this.$attrs;
const voName = currNode.voName;
let oldData = { ...shipmentObj[voName] };
oldData = formatStringNumber(oldData, ["agentId"]);
this.agentObj = oldData;
},
methods: {
/** 提交 */
onSubmit() {
......@@ -42,15 +50,15 @@ export default {
...this.agentObj,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
......
<template>
<div>
<el-form ref="arrivalForm" :rules="rules" :model="arrivalObj" label-width="120px">
<el-form-item label="预计到港时间">{{arrivalObj.expectedTime}}</el-form-item>
<el-form-item label="预计到港时间">{{getExpectedTime()}}</el-form-item>
<el-form-item label="实际到港时间" prop="apRealTime">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="arrivalObj.apRealTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
......@@ -33,6 +33,7 @@
import regError from "./regError";
import dayjs from "dayjs";
import { arrivalCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatDateStr } from "../utils";
/**
* 到港
......@@ -57,17 +58,29 @@ export default {
showMsg: false,
};
},
watch: {
// 预计到港时间
"arrivalObj.expectedTime"(val) {
this.compareDate(val, this.arrivalObj.apConfirmTime);
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, [
"apRealTime",
"apConfirmTime",
"apUnloadPortTime",
]);
this.arrivalObj = oldData;
},
watch: {
// 确认到港时间
"arrivalObj.apConfirmTime"(val) {
this.compareDate(this.arrivalObj.expectedTime, val);
this.compareDate(this.getExpectedTime(), val);
},
},
methods: {
// 获取预计到港时间
getExpectedTime() {
return dayjs(
this.$attrs.shipmentObj.shippingInfo.dtEstArrivalTime
).format("YYYY-MM-DD");
},
// 时间比较
compareDate(expectedTime, apConfirmTime) {
this.showMsg = false;
......@@ -76,7 +89,7 @@ export default {
if (expectedTime) date1 = dayjs(expectedTime);
if (apConfirmTime) date2 = dayjs(apConfirmTime);
if (date1 && date2) {
const days = date2.date() - date1.date();
const days = date2.diff(date1, "day");
if (days > 5) {
this.showMsg = true;
}
......@@ -96,15 +109,15 @@ export default {
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
......
......@@ -37,6 +37,7 @@
<script>
import { bargeCreate, serviceMsg } from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
import { constantDict, formatDateStr, formatNumberString } from "../utils";
/**
* 驳船
......@@ -49,23 +50,21 @@ export default {
return {
// 驳船对象
bargeObj: {},
// 驳船
bargeStatus: [
{
value: "1",
label: "无驳船",
},
{
value: "2",
label: "有驳船",
},
],
// 驳船状态
bargeStatus: constantDict.bgExmtStatus,
// 校验
rules: {
bgExmtStatus: [{ required: true, message: "必填", trigger: "change" }],
},
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, ["bgEstShipTime", "bgRealShipTime"]);
oldData = formatNumberString(oldData, ["bgExmtStatus"]);
this.bargeObj = oldData;
},
methods: {
/** 提交 */
onSubmit(operateType) {
......@@ -77,15 +76,15 @@ export default {
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
......
......@@ -29,6 +29,12 @@ export default {
blCopyObj: {},
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
this.blCopyObj = oldData;
this.blCopyObj.copyUrl = [];
},
methods: {
/** 提交 */
onSubmit(operateType) {
......@@ -40,15 +46,15 @@ export default {
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
......
<template>
<div>
<el-form ref="cabinetForm" :rules="rules" :model="cabinet" label-width="80px">
<el-form ref="cabinetForm" :rules="rules" :model="cabinetObj" label-width="80px">
<el-form-item label="到仓时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cabinet.arrivalTime" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="cabinetObj.ldInWarehouseTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="仓库">
<el-select v-model="cabinet.warehouse" placeholder="请选择仓库">
<el-select v-model="cabinetObj.ldWarehouseType" placeholder="请选择仓库" filterable>
<el-option v-for="warehouse in $attrs.warehouseList" :key="warehouse.id" :label="warehouse.titleZh" :value="warehouse.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="装柜时间" prop="time">
<el-date-picker type="date" placeholder="请选择日期" v-model="cabinet.cabinetTime" value-format="yyyy-MM-dd"></el-date-picker>
<el-form-item label="装柜时间" prop="ldBoxTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="cabinetObj.ldBoxTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="出仓时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cabinet.outTime" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="cabinetObj.ldOutWarehouseTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="装柜图片">
<el-upload action="" :limit="1" :file-list="cabinet.fileList">
<el-upload action="" :limit="1" :file-list="cabinetObj.ldPictures">
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
</el-form-item>
......@@ -28,8 +29,8 @@
<!-- 操作 -->
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit">保存</el-button>
<el-button type="success">封柜</el-button>
<el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit(2)">封柜</el-button>
<el-button @click="cancel">关闭</el-button>
<el-button type="danger" @click="startCabinet">开始装柜</el-button>
</el-row>
......@@ -38,6 +39,8 @@
<script>
import startPacking from "./startPacking.vue";
import { cabinetCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatDateStr } from "../../utils";
/**
* 装柜
......@@ -46,35 +49,48 @@ export default {
name: "cabinet",
inheritAttrs: false,
components: { startPacking },
props: {
boxId: String,
},
data() {
return {
// 弹窗
dialogVisible: false,
// 装柜对象
cabinet: {
fileList: [],
},
cabinetObj: {},
// 校验
rules: {
time: [{ required: true, message: "请选择时间", trigger: "change" }],
ldBoxTime: [{ required: true, message: "必填", trigger: "change" }],
},
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, [
"ldInWarehouseTime",
"ldBoxTime",
"ldOutWarehouseTime",
]);
this.cabinetObj = oldData;
},
methods: {
/** 提交 */
onSubmit() {
onSubmit(operateType) {
this.$refs["cabinetForm"].validate((valid) => {
if (valid) {
alert("submit!");
cabinetCreate({
shipmentId: this.$attrs.shipmentObj.id,
...this.cabinetObj,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
cancel(type) {
this.$emit("closeDialog", type);
},
/** 开始装柜 */
startCabinet() {
......
......@@ -72,6 +72,7 @@
<script>
import { clearanceDocCreate, serviceMsg } from "@/api/ecw/boxSea";
import { constantDict, formatDateStr, formatNumberString } from "../utils";
/**
* 清关文件
*/
......@@ -83,29 +84,27 @@ export default {
// 清关文件对象
cDocObj: {},
// 出单方式
method: [
{
value: "1",
label: "电放",
},
{
value: "2",
label: "正本",
},
],
method: constantDict.billingMethod,
// 选项
status: [
{
value: "1",
label: "无需",
},
{
value: "2",
label: "已做",
},
],
status: constantDict.isFile,
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, [
"cdElectricTime",
"cdSendTime",
"cdAgentlistTime",
"cdSoncapTime",
]);
oldData = formatNumberString(oldData, [
"cdOutBillType",
"cdAgentlistType",
"cdSoncapType",
]);
this.cDocObj = oldData;
},
methods: {
/** 提交 */
onSubmit(operateType) {
......@@ -117,15 +116,15 @@ export default {
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
......
......@@ -20,9 +20,7 @@ export default {
event: "change",
},
data() {
return {
supplier: [],
};
return {};
},
computed: {
getDock() {
......
......@@ -20,9 +20,7 @@ export default {
event: "change",
},
data() {
return {
supplier: [],
};
return {};
},
computed: {
getSuppliers() {
......
<template>
<el-select filterable :value="value" @change="change" v-bind="$attrs">
<el-option v-for="user in getUser" :key="user.id" :value="user.id">{{user.nickname}}</el-option>
<el-option v-for="user in getUser" :key="user.id" :value="user.id" :label="user.nickname"></el-option>
</el-select>
</template>
......@@ -20,9 +20,7 @@ export default {
event: "change",
},
data() {
return {
supplier: [],
};
return {};
},
computed: {
getUser() {
......
<template>
<div>
<el-form ref="cusClearanceForm" :rules="rules" :model="cusClearanceObj" label-width="120px">
<el-form-item label="清关代理">{{cusClearanceObj.clAgentId}}</el-form-item>
<el-form-item label="清关代理">{{getClAgent('label')}}</el-form-item>
<el-form-item label="预计清关时间" prop="clEstTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusClearanceObj.clEstTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
......@@ -29,6 +29,7 @@
import regError from "./regError";
import dayjs from "dayjs";
import { clearanceCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatDateStr } from "../utils";
/**
* 清关
......@@ -54,6 +55,12 @@ export default {
showMsg: false,
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, ["clEstTime", "clClearTime"]);
this.cusClearanceObj = oldData;
},
watch: {
// 预计清关时间
"cusClearanceObj.clEstTime"(val) {
......@@ -65,6 +72,16 @@ export default {
},
},
methods: {
getClAgent(type) {
const agentId = this.$attrs.shipmentObj.agentInfo.agentId;
if (type === "label") {
return (
this.$attrs.allSupplier.find((item) => item.id === agentId)
?.companyZh ?? agentId
);
}
return agentId;
},
// 时间比较
compareDate(clEstTime, clClearTime) {
this.showMsg = false;
......@@ -72,7 +89,7 @@ export default {
date2 = null;
if (clEstTime) date1 = dayjs(clEstTime);
if (clClearTime) date2 = dayjs(clClearTime);
if (date1 && date2 && date2 !== date1) {
if (date1 && date2 && !date2.isSame(date1)) {
this.showMsg = true;
}
},
......@@ -87,18 +104,19 @@ export default {
clearanceCreate({
...this.cusClearanceObj,
shipmentId: this.$attrs.shipmentObj.id,
clAgentId: this.getClAgent(),
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
......
<template>
<div>
<el-form ref="cusDeclarationForm" :rules="rules" :model="cusDeclaration" label-width="120px">
<el-form ref="cusDeclarationForm" :rules="rules" :model="cusDeclarationObj" label-width="120px">
<el-form-item label="单证要求">我司全代 <el-button type="primary" style="margin-left:10px;" @click="downloadVGM">VGM声明</el-button>
</el-form-item>
<el-form-item label="柜重" prop="cabinetWeight">
<el-input v-model="cusDeclaration.cabinetWeight" placeholder="请输入柜重" clearable />
<el-form-item label="柜重" prop="dcBoxWgt">
<el-input v-model="cusDeclarationObj.dcBoxWgt" placeholder="请输入柜重" clearable />
</el-form-item>
<el-form-item label="货重" prop="cargoWeight">
<el-input v-model="cusDeclaration.cargoWeight" placeholder="请输入货重" clearable />
<el-form-item label="货重" prop="dcGoodsWgt">
<el-input v-model="cusDeclarationObj.dcGoodsWgt" placeholder="请输入货重" clearable />
</el-form-item>
<el-form-item label="VGM重量(柜重+货重)">
<el-input v-model="cusDeclaration.vgmWeight" placeholder="请输入VGM重量" clearable />
<el-form-item label="VGM重量">
<el-input v-model="cusDeclarationObj.dcVgmWgt" placeholder="请输入VGM重量" clearable />
</el-form-item>
<el-form-item label="报关方式" prop="method">
<el-select v-model="cusDeclaration.method" placeholder="请选择报关方式">
<el-option v-for="item in methods" :key="item.value" :label="item.label" :value="item.value"></el-option>
<el-form-item label="报关方式" prop="dcCustomsType">
<el-select v-model="cusDeclarationObj.dcCustomsType" placeholder="请选择报关方式">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_CUSTOMS_TYPE)" :key="type.value" :label="type.label" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="正常报关订单">
</el-form-item>
<el-form-item label="报关公司名称">
<el-select v-model="cusDeclaration.companyName" placeholder="请选择报关公司名称">
</el-select>
<supplierSelect v-model="cusDeclarationObj.dcCompanyId" :companyType="'2'" placeholder="请选择报关公司名称" :allSupplier="this.$attrs.allSupplier" />
</el-form-item>
<el-form-item label="截关时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclaration.cutTime" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclarationObj.dcCutOffTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="cusDeclaration.status">
<el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
<el-radio-group v-model="cusDeclarationObj.dcCustomsStatus">
<el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_DCCUSTOMS_STATUS)" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
<!-- 查验 -->
<div v-show="cusDeclaration.status === '3'">
<div v-show="cusDeclarationObj.dcCustomsStatus === '3'">
<el-form-item label="查验">
<el-radio-group v-model="cusDeclaration.check">
<el-radio v-for="item in checkItems" :key="item.value" :label="item.value">{{item.label}}</el-radio>
<el-radio-group v-model="cusDeclarationObj.dcCheckStatus">
<el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_CHECK_STATUS)" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
</div>
<!-- 退场 -->
<div v-show="cusDeclaration.check === '1' || cusDeclaration.check === '2'">
<div v-show="cusDeclarationObj.dcCheckStatus === '1' || cusDeclarationObj.dcCheckStatus === '2'">
<el-form-item label="查验时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclaration.checkTime" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclarationObj.dcCheckTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="查验前图片">
<el-upload action="" :limit="1" :file-list="cusDeclaration.checkFile">
<el-upload action="" :limit="1" :file-list="cusDeclarationObj.dcCheckPreImg">
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
</el-form-item>
<el-form-item label="新封条">
<el-input v-model="cusDeclaration.newSeal" placeholder="请输入新封条" clearable />
<el-input v-model="cusDeclarationObj.dcStripSeal" placeholder="请输入新封条" clearable />
</el-form-item>
</div>
<!-- 放行 -->
<el-form-item label="放行时间" v-show="cusDeclaration.status === '2' || cusDeclaration.check === '2'">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclaration.releaseTime" value-format="yyyy-MM-dd"></el-date-picker>
<el-form-item label="放行时间" v-show="cusDeclarationObj.dcCustomsStatus === '2' || cusDeclarationObj.dcCheckStatus === '2'">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclarationObj.dcPassTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="装箱单">
......@@ -70,8 +69,8 @@
</el-form>
<el-row class="operate-button">
<el-button type="primary">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button>
<el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button>
<el-button type="primary" @click="extraCost">额外费用</el-button>
</el-row>
......@@ -131,66 +130,25 @@
</template>
<script>
import supplierSelect from "./common/supplierSelect.vue";
import { customsCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatNumberString, formatDateStr } from "../utils";
/**
* 报关
*/
export default {
name: "cusDeclaration",
inheritAttrs: false,
components: { supplierSelect },
data() {
return {
// 报关方式
methods: [
{
value: "1",
label: "整柜买单报关",
},
{
value: "2",
label: "整柜正常报关",
},
{
value: "3",
label: "买单报关+正常报关",
},
],
// 状态
status: [
{
value: "1",
label: "报关中",
},
{
value: "2",
label: "放行",
},
{
value: "3",
label: "查验",
},
],
// check
checkItems: [
{
value: "1",
label: "退场",
},
{
value: "2",
label: "部分退场",
},
{
value: "3",
label: "查验后放行",
},
],
// 报关对象
cusDeclaration: {},
cusDeclarationObj: {},
// 校验
rules: {
cabinetWeight: [{ required: true, message: "必填", trigger: "change" }],
cargoWeight: [{ required: true, message: "必填", trigger: "change" }],
method: [{ required: true, message: "必填", trigger: "change" }],
dcBoxWgt: [{ required: true, message: "必填", trigger: "change" }],
dcGoodsWgt: [{ required: true, message: "必填", trigger: "change" }],
dcCustomsType: [{ required: true, message: "必填", trigger: "change" }],
},
// 弹窗配置
dialogConfig: {
......@@ -201,25 +159,41 @@ export default {
orderNo: "",
};
},
watch: {
"cusDeclaration.status"(val) {
if (val !== "3") {
this.$set(this.cusDeclaration, "check", "");
}
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, [
"dcCutOffTime",
"dcCheckTime",
"dcPassTime",
]);
oldData = formatNumberString(oldData, [
"dcCustomsType",
"dcCustomsStatus",
"dcCheckStatus",
]);
this.cusDeclarationObj = oldData;
},
methods: {
/** 提交 */
onSubmit() {
onSubmit(operateType) {
this.$refs["cusDeclarationForm"].validate((valid) => {
if (valid) {
alert("submit!");
customsCreate({
...this.cusDeclarationObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
cancel(type) {
this.$emit("closeDialog", type);
},
// 下载VGM
downloadVGM() {
......@@ -232,6 +206,35 @@ export default {
this.$set(this.dialogConfig, "title", "自编号");
this.$set(this.dialogConfig, "dialogVisible", true);
},
// 计算VGM重量
calcVGM(dcBoxWgt, dcGoodsWgt) {
let dcBoxWgtTmp = 0,
dcGoodsWgtTmp = 0;
if (!Number.isNaN(Number(dcBoxWgt))) {
dcBoxWgtTmp = Number(dcBoxWgt);
}
if (!Number.isNaN(Number(dcGoodsWgt))) {
dcGoodsWgtTmp = Number(dcGoodsWgt);
}
this.$set(
this.cusDeclarationObj,
"dcVgmWgt",
dcBoxWgtTmp + dcGoodsWgtTmp
);
},
},
watch: {
"cusDeclarationObj.dcBoxWgt"(dcBoxWgt) {
this.calcVGM(dcBoxWgt, this.cusDeclarationObj.dcGoodsWgt);
},
"cusDeclarationObj.dcGoodsWgt"(dcGoodsWgt) {
this.calcVGM(this.cusDeclarationObj.dcBoxWgt, dcGoodsWgt);
},
"cusDeclarationObj.dcCustomsStatus"(val) {
if (val !== "3") {
this.$set(this.cusDeclarationObj, "dcCheckStatus", "");
}
},
},
};
</script>
......
......@@ -2,6 +2,7 @@
<div class="app-departure">
<el-form ref="departureForm" :rules="rules" :model="departureObj" label-width="120px">
<el-form-item label="预计开船时间">
{{getSailingTime()}}
</el-form-item>
<el-form-item label="实际开船时间">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="departureObj.dtRealShipTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
......@@ -31,6 +32,8 @@
<script>
import regError from "./regError";
import { shippingCreate, serviceMsg } from "@/api/ecw/boxSea";
import dayjs from "dayjs";
import { formatDateStr } from "../utils";
/**
* 起运
......@@ -55,25 +58,27 @@ export default {
showMsg: false,
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, ["dtRealShipTime", "dtEstArrivalTime"]);
this.departureObj = oldData;
},
watch: {
// 实际开船时间
"departureObj.dtRealShipTime"(val) {
this.compareDate(val, this.departureObj.dtEstArrivalTime);
},
// 预计到港时间
"departureObj.dtEstArrivalTime"(val) {
this.compareDate(this.departureObj.dtRealShipTime, val);
this.compareDate(val, this.getSailingTime());
},
},
methods: {
// 时间比较
compareDate(dtRealShipTime, dtEstArrivalTime) {
compareDate(dtRealShipTime, sailTime) {
this.showMsg = false;
let date1 = null,
date2 = null;
if (dtRealShipTime) date1 = new Date(dtRealShipTime);
if (dtEstArrivalTime) date2 = new Date(dtEstArrivalTime);
if (date1 && date2 && date1 > date2) {
if (dtRealShipTime) date1 = dayjs(dtRealShipTime);
if (sailTime) date2 = dayjs(sailTime);
if (date1 && date2 && date1.isAfter(date2)) {
this.showMsg = true;
}
},
......@@ -91,15 +96,21 @@ export default {
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
cancel(type) {
this.$emit("closeDialog", type);
},
// 预计开船时间
getSailingTime() {
return dayjs(this.$attrs.shipmentObj.bookSeaInfo.sailTime).format(
"YYYY-MM-DD"
);
},
},
};
......
......@@ -247,8 +247,8 @@
<el-row style="margin-top: 15px">
<el-row>
<el-form ref="operatorForm" :model="operatorData" size="small" :inline="true" label-width="120px" :rules="rules">
<el-form-item label="目的地操作员" prop="operator">
<userSelect v-model="operatorData.operator" placeholder="请选择目的地操作员" :allUsers="this.$attrs.allUsers" size="small" />
<el-form-item label="目的地操作员" prop="noticeUser">
<userSelect v-model="operatorData.noticeUser" placeholder="请选择目的地操作员" :allUsers="this.$attrs.allUsers" size="small" />
</el-form-item>
</el-form>
</el-row>
......@@ -261,7 +261,6 @@
<script>
import { DICT_TYPE } from "@/utils/dict";
import { getWarehouseList } from "@/api/ecw/warehouse";
import {
secGoodsList,
preloadPage,
......@@ -270,6 +269,7 @@ import {
serviceMsg,
createGoods,
deleteGoods,
approvalCreate,
} from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
......@@ -291,8 +291,6 @@ export default {
filingOps: this.getDictDatas(DICT_TYPE.COMMISSION_PRODUCT_APPROVAL),
// 报关方式
declarationMethodOps: this.getDictDatas(DICT_TYPE.ECW_CUSTOMS_TYPE),
// 仓库
warehouseList: [],
// 查询标识
type: "",
// 已预装 遮罩层
......@@ -313,12 +311,10 @@ export default {
queryParams: {},
pageParam: { pageNo: 1, pageSize: 5 },
// 目的地操作员
operatorData: {
operator: null,
},
operatorData: {},
// 校验
rules: {
operator: [{ required: true, message: "必填", trigger: "change" }],
noticeUser: [{ required: true, message: "必填", trigger: "change" }],
},
// 出货信息
shipmentObj: this.$attrs.shipmentObj,
......@@ -327,27 +323,25 @@ export default {
computed: {
/** 始发地 */
exportWarehouseList() {
return this.warehouseList.filter(
return this.$attrs.warehouseList.filter(
(item) => item.tradeType == "2" || item.type == "3"
);
},
/** 目的地 */
importWarehouseList() {
return this.warehouseList.filter(
return this.$attrs.warehouseList.filter(
(item) => item.tradeType == "1" || item.type == "3"
);
},
},
created() {
// 查询仓库数据
getWarehouseList().then((res) => (this.warehouseList = res.data));
// 查询待预装
this.handleQuery("toBePre");
},
methods: {
/* 获取城市 */
importCityName(id) {
var arr = this.warehouseList.filter((item) => item.id == id);
var arr = this.$attrs.warehouseList.filter((item) => item.id == id);
return arr.length > 0 ? arr[0].titleZh : "";
},
/* 选中行 */
......@@ -397,7 +391,16 @@ export default {
onSubmit() {
this.$refs["operatorForm"].validate((valid) => {
if (valid) {
alert("submit!");
approvalCreate({
...this.operatorData,
shipmentId: this.$attrs.shipmentObj.id,
approvalStatus: 0,
approvalType: 1,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "submit");
});
});
}
});
},
......
<template>
<div>
<el-form ref="reviewForm" :model="reviewObj" label-width="120px">
<el-form-item label="申请理由">
<el-input v-model="reviewObj.remark" type="textarea" rows="2" placeholder="请输入申请理由"></el-input>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="success" @click="onSubmit">发起申请</el-button>
<el-button @click="cancel">关闭</el-button>
</el-row>
</div>
</template>
<script>
import { approvalCreate } from "@/api/ecw/boxSea";
/**
* 预装反审
*/
export default {
name: "review",
inheritAttrs: false,
data() {
return {
// 反审对象
reviewObj: {},
};
},
methods: {
/** 提交 */
onSubmit() {
this.$refs["reviewForm"].validate((valid) => {
if (valid) {
approvalCreate({
shipmentId: this.$attrs.shipmentObj.id,
...this.reviewObj,
approvalStatus: -1,
approvalType: 1,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
</script>
......@@ -19,6 +19,7 @@
<script>
import { settlementCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatDateStr } from "../utils";
/**
* 结算
*/
......@@ -31,6 +32,12 @@ export default {
settlementObj: {},
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, ["slSettlementTime", "slSettledTime"]);
this.settlementObj = oldData;
},
methods: {
/** 提交 */
onSubmit(operateType) {
......@@ -42,15 +49,15 @@ export default {
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
......
......@@ -21,6 +21,7 @@
<script>
import { shipConfigure, serviceMsg } from "@/api/ecw/boxSea";
import { formatNumberString, constantDict } from "../utils";
/**
* 配船
*/
......@@ -35,22 +36,19 @@ export default {
// 配船对象
shipObj: {},
// 状态
status: [
{
value: "1",
label: "免配",
},
{
value: "2",
label: "已配",
},
],
status: constantDict.saExmtStatus,
// 校验
rules: {
saExmtStatus: [{ required: true, message: "必填", trigger: "change" }],
},
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.shipmentObj[voName] };
oldData = formatNumberString(oldData, ["saExmtStatus"]);
this.shipObj = oldData;
},
methods: {
/** 提交 */
onSubmit(operateType) {
......@@ -62,15 +60,15 @@ export default {
...this.shipObj,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
......
......@@ -2,7 +2,7 @@
<div>
<el-form ref="subMaterialForm" :model="subMaterialObj" label-width="140px">
<el-form-item label="代理商AGENT">
<supplierSelect v-model="subMaterialObj.agentId" placeholder="请选择供应商" :allSupplier="this.$attrs.allSupplier" />
<supplierSelect v-model="subMaterialObj.agentId" :companyType="'1'" placeholder="请选择供应商" :allSupplier="this.$attrs.allSupplier" />
</el-form-item>
<el-form-item label="提单号M/BL NO." class="two-element">
<el-input v-model="subMaterialObj.blMblNo" placeholder="请输入提单号"></el-input>
......@@ -51,7 +51,7 @@
<el-input v-model="subMaterialObj.containerSealNo" placeholder="请输入柜号/封条"></el-input>
</el-form-item>
<el-form-item label="柜型">
{{getCabinetName(shipmentObj.cabinetId)}}
{{cabinetType}}
</el-form-item>
<el-form-item label="出单方式">
<el-radio-group v-model="subMaterialObj.issueType">
......@@ -78,6 +78,8 @@ import userSelect from "./common/userSelect.vue";
import { getUnitList } from "@/api/ecw/unit";
import { getCabinetPage } from "@/api/ecw/cabinet";
import { billCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatNumberString, constantDict } from "../utils";
/**
* 提单补料
*/
......@@ -107,6 +109,8 @@ export default {
],
// 单位
units: [],
// 柜型
cabinetType: "/",
};
},
created() {
......@@ -117,10 +121,19 @@ export default {
});
// 柜型
getCabinetPage(null).then((response) => {
this.cabinetList = response.data.list;
const cabinetList = response.data.list;
for (let index in cabinetList) {
let cabinetItem = cabinetList[index];
if (cabinetItem.id == this.shipmentObj.cabinetId) {
this.cabinetType = cabinetItem.name;
}
}
});
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.shipmentObj[voName] };
this.subMaterialObj = oldData;
},
computed: {},
methods: {
/** 提交 */
onSubmit(operateType) {
......@@ -132,25 +145,15 @@ export default {
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
},
/* 获取柜名 */
getCabinetName(cabinetId) {
for (let index in this.cabinetList) {
let cabinetItem = this.cabinetList[index];
if (cabinetItem.id == cabinetId) {
return cabinetItem.name;
}
}
return "/";
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
......
......@@ -3,7 +3,7 @@
<el-form ref="trailerForm" :rules="rules" :model="trailerObj" label-width="120px">
<el-form-item label="状态">
<el-select v-model="trailerObj.tlContainerStatus" placeholder="请选择状态">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_TRAILER_STATUS)" :key="type.value" :label="type.label" :value="type.value"></el-option>
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_TRAILER_STATUS)" :key="type.value" :label="type.label" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="拖车公司">
......
......@@ -2,20 +2,19 @@
<div>
<el-form ref="unloadingForm" :model="unloadingObj" label-width="100px">
<el-form-item label="网点">
<el-select v-model="unloadingObj.outlets" placeholder="请选择网点">
</el-select>
<dockSelect v-model="unloadingObj.ulOutletsId" placeholder="请选择网点" :allDocks="this.$attrs.allDocks" />
</el-form-item>
<el-form-item label="到仓时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="unloadingObj.warehouseTime" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="unloadingObj.ulWarehouseTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="卸柜时间">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="unloadingObj.unloadingTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker type="datetime" placeholder="请选择日期" v-model="unloadingObj.ulBoxTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button>
<el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type=" success" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button>
<el-button type="danger" @click="startUnloading">开始卸柜</el-button>
</el-row>
......@@ -29,6 +28,9 @@
<script>
import startUnloading from "./startUnloading.vue";
import { unloadCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatDateStr } from "../../utils";
import dockSelect from "../common/dockSelect.vue";
/**
* 卸柜
......@@ -36,31 +38,48 @@ import startUnloading from "./startUnloading.vue";
export default {
name: "unloading",
inheritAttrs: false,
components: { startUnloading },
components: { startUnloading, dockSelect },
data() {
return {
// 清关对象
unloadingObj: {
agent: "test111",
},
unloadingObj: {},
// 弹窗状态
dialogVisible: false,
};
},
watch: {},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, ["ulWarehouseTime", "ulBoxTime"]);
this.unloadingObj = oldData;
},
methods: {
/** 提交 */
onSubmit() {
onSubmit(operateType) {
this.$refs["unloadingForm"].validate((valid) => {
if (valid) {
// TODO 判断是否已经卸柜
if (operateType === 2) {
const { ulStatus } = this.$attrs.shipmentObj;
if (ulStatus !== 145) {
this.$message.warning("请先通过卸柜审批");
return;
}
}
unloadCreate({
...this.unloadingObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
cancel(type) {
this.$emit("closeDialog", type);
},
// 开始卸柜
startUnloading() {
......
......@@ -32,6 +32,7 @@
import bookingWidget from "./nodePage/booking.vue";
import trailerWidget from "./nodePage/trailer.vue";
import preinstallWidget from "./nodePage/preinstall.vue";
import preinstallReviewWidget from "./nodePage/preinstallReview.vue";
import agentWidget from "./nodePage/agent.vue";
import cabinetWidget from "./nodePage/cabinet/index.vue";
import cusDeclarationWidget from "./nodePage/cusDeclaration.vue";
......@@ -69,6 +70,7 @@ export default {
cusClearanceWidget,
unloadingWidget,
settlementWidget,
preinstallReviewWidget,
},
props: {
shipmentObj: Object,
......@@ -87,8 +89,6 @@ export default {
currentComponent: "",
// 当前步骤节点坐标
currIndex: 0,
// 当前步骤节点状态
currNodeStatus: "",
// 当前节点
currNode: {},
};
......@@ -128,8 +128,16 @@ export default {
break;
// 预装
case "preinstall":
// 预装反审
const status = this.shipmentObj[node.keyName];
if ([23, 24].includes(status)) {
this.currentComponent = `preinstallReviewWidget`;
this.$set(this.dialogConfig, "width", "700px");
this.$set(this.dialogConfig, "title", "预装反审");
} else {
this.$set(this.dialogConfig, "fullscreen", true);
this.$set(this.dialogConfig, "title", "出货安排(预装)");
}
break;
}
this.$set(this.dialogConfig, "dialogVisible", true);
......@@ -158,17 +166,14 @@ export default {
if (start.includes(val[keyName]) && val[voName]) {
node.currStatus = "wait";
this.currNodeStatus = val[keyName];
}
if (wait.includes(val[keyName])) {
node.currStatus = "wait";
this.currNodeStatus = val[keyName];
}
if (end.includes(val[keyName])) {
node.currStatus = "end";
this.currNodeStatus = val[keyName];
// 已完成节点个数
++nodeIndex;
}
......@@ -180,10 +185,6 @@ export default {
}
}
},
/* 监听当前状态 */
currNodeStatus(val) {
this.$emit("setStatus", val);
},
},
};
</script>
......
......@@ -18,6 +18,7 @@
<script>
import dayjs from "dayjs";
import * as _C from "./utils";
export default {
name: "seaStepDetail",
......@@ -126,6 +127,7 @@ export default {
{
title: "代理商",
key: "agentId",
type: "supplier",
},
{
title: "业务员",
......@@ -141,6 +143,7 @@ export default {
{
title: "仓库类型",
key: "ldWarehouseType",
type: "warehouse",
},
{
title: "装柜时间",
......@@ -161,10 +164,12 @@ export default {
{
title: "报关方式",
key: "dcCustomsType",
type: "shipping_customs_type",
},
{
title: "报关行公司",
key: "dcCompanyId",
type: "supplier",
},
{
title: "截关时间",
......@@ -174,10 +179,12 @@ export default {
{
title: "状态",
key: "dcCustomsStatus",
type: "shipping_dcCustoms_status",
},
{
title: "放行时间",
key: "dcPassTime",
type: "date",
},
{
title: "新封条",
......@@ -204,6 +211,7 @@ export default {
{
title: "已配/免配",
key: "saExmtStatus",
type: "saExmtStatus",
},
{
title: "业务员",
......@@ -214,6 +222,7 @@ export default {
{
title: "清关代理",
key: "agentId",
type: "supplier",
},
{
title: "提单品名",
......@@ -244,6 +253,7 @@ export default {
{
title: "驳船",
key: "bgExmtStatus",
type: "bgExmtStatus",
},
{
title: "业务员",
......@@ -270,14 +280,17 @@ export default {
{
title: "agent list",
key: "cdAgentlistType",
type: "isFile",
},
{
title: "soncap",
key: "cdSoncapType",
type: "isFile",
},
{
title: "出单方式",
key: "cdOutBillType",
type: "billingMethod",
},
{
title: "寄送时间",
......@@ -293,14 +306,17 @@ export default {
{
title: "实际到港时间",
key: "apRealTime",
type: "date",
},
{
title: "确认到港",
key: "apConfirmTime",
type: "date",
},
{
title: "卸港时间",
key: "apUnloadPortTime",
type: "date",
},
{
title: "业务员",
......@@ -373,6 +389,19 @@ export default {
case "dock":
val = this.getDock(Number(val));
break;
case "warehouse":
val = this.getWarehouse(Number(val));
break;
case "shipping_dcCustoms_status":
case "shipping_customs_type":
val = this.getDict(type, String(val));
break;
case "saExmtStatus":
case "bgExmtStatus":
case "isFile":
case "billingMethod":
val = this.getConstant(type, String(val));
break;
}
}
return val;
......@@ -383,8 +412,21 @@ export default {
);
},
getDock(id) {
return this.$attrs.allDocks.find((item) => item.id === id)?.titleZh ?? id;
},
getWarehouse(id) {
return (
this.$attrs.warehouseList.find((item) => item.id === id)?.titleZh ?? id
);
},
getDict(code, id) {
return (
this.getDictDatas(code).find((item) => item.value === id)?.label ?? id
);
},
getConstant(code, id) {
return (
this.$attrs.allSupplier.find((item) => item.id === id)?.countryZh ?? id
_C.constantDict[code].find((item) => item.value === id)?.label ?? id
);
},
},
......
......@@ -26,10 +26,10 @@
</el-card>
<!-- 海运流程图 -->
<seaProcess :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" @setStatus="setStatus" @getBoxInfo="getBoxInfo" />
<seaProcess :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :warehouseList="warehouseList" @getBoxInfo="getBoxInfo" />
<!-- 海运步骤图 -->
<seaStepDetail :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" />
<seaStepDetail :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :warehouseList="warehouseList" />
</el-col>
</el-row>
</div>
......@@ -106,10 +106,6 @@ export default {
var arr = this.warehouseList.filter((item) => item.id == id);
return arr.length > 0 ? arr[0].titleZh : "";
},
/* 设置状态值 */
setStatus(status) {
this.statusLabel = statusName.get(status);
},
// 出货
getBoxInfo() {
getbox(this.shipmentId).then((res) => {
......@@ -118,6 +114,39 @@ export default {
});
},
},
watch: {
/* 监听发货对象 */
shipmentObj(val) {
let currNodeStatus = 11,
isBreak = false;
// 迭代每个节点
for (let i = 0; i < this.seaBaseData.length; i++) {
const nodes = this.seaBaseData[i];
for (let j = 0; j < nodes.length; j++) {
const node = nodes[j];
const { keyName, voName, status } = node;
if (!keyName) continue;
const { start, wait, end } = status;
if (start.includes(val[keyName]) && val[voName]) {
currNodeStatus = val[keyName];
}
if (wait.includes(val[keyName])) {
currNodeStatus = val[keyName];
isBreak = true;
break;
}
if (end.includes(val[keyName])) {
currNodeStatus = val[keyName];
}
}
if (isBreak) break;
}
this.statusLabel = statusName.get(currNodeStatus);
},
},
};
</script>
......
......@@ -379,6 +379,53 @@ const seaBaseData = [
],
];
const constantDict = {
// 配船状态
saExmtStatus: [
{
value: "1",
label: "免配",
},
{
value: "2",
label: "已配",
},
],
// 驳船
bgExmtStatus: [
{
value: "1",
label: "无驳船",
},
{
value: "2",
label: "有驳船",
},
],
// 出单方式
billingMethod: [
{
value: "1",
label: "电放",
},
{
value: "2",
label: "正本",
},
],
// 是否有文件
isFile: [
{
value: "1",
label: "无需",
},
{
value: "2",
label: "已做",
},
],
};
function formatStringNumber(obj, keys) {
for (const [key, value] of Object.entries(obj)) {
if (keys.includes(key) && !Number.isNaN(Number(value))) {
......@@ -409,6 +456,7 @@ function formatDateStr(obj, keys) {
export {
statusName,
seaBaseData,
constantDict,
formatStringNumber,
formatDateStr,
formatNumberString,
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="部门" prop="deptId">
<el-select v-model="queryParams.deptId" style="width: 300px;" placeholder="请选择部门">
<el-option v-for="item in this.deptData" :key="item.id" :label="item.name" :value="item.id"/>
</el-select>
</el-form-item>
<el-form-item label="目标类型" prop="targetType">
<dict-selector :type="DICT_TYPE.TARGET_TYPE" v-model="queryParams.targetType" formatter="number" />
</el-form-item>
<el-form-item label="运输方式" prop="transportType">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportType" formatter="number" />
</el-form-item>
<el-form-item label="出货渠道" prop="shippingChannel">
<el-select v-model="queryParams.shippingChannel" placeholder="请选择出货渠道">
<el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId" :key="item.channelId"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['ecw:dept-target:create']">目标设置</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="目标名称" align="center" width="180">
<template slot-scope="scope">
<span>{{scope.row.deptName}}{{scope.row.targetPeriodName}}目标</span>
</template>
</el-table-column>
<el-table-column label="部门" align="center" prop="deptName" />
<el-table-column label="目标类型" align="center" prop="targetType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.TARGET_TYPE" :value="scope.row.targetType"/>
</template>
</el-table-column>
<el-table-column label="时间范围" align="center" prop="targetPeriodName">
<template slot-scope="scope">
<span>{{scope.row.startTime}}~{{scope.row.endTime}}</span>
</template>
</el-table-column>
<el-table-column label="部门人数" align="center" prop="deptEmpCount"/>
<el-table-column label="目标方数" align="center" prop="cubeNum" />
<el-table-column label="运输方式" align="center" prop="transportType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.TRANSPORT_TYPE" :value="scope.row.transportType"/>
</template>
</el-table-column>
<el-table-column label="出货渠道" align="center" prop="shippingChannel">
<template slot-scope="scope">
<span>{{ getShipChannelName(scope.row.shippingChannel) }}</span>
</template>
</el-table-column>
<el-table-column label="已完成方数" align="center" prop="completeCubeNum" />
<el-table-column label="完成比例" align="center">
<template slot-scope="scope">
<span>{{ (scope.row.completeCubeNum/scope.row.cubeNum*100).toFixed(2)+'%' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:dept-target:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:dept-target:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="部门" prop="deptId">
<el-select v-model="form.deptId" style="width: 300px;" placeholder="请选择部门">
<el-option v-for="item in this.deptData" :key="item.id" :label="item.name" :value="item.id"/>
</el-select>
</el-form-item>
<el-form-item label="目标类型" prop="targetType">
<el-select v-model="form.targetType" placeholder="请选择运输方式" @change="changeList">
<el-option v-for="dict in getDictDatas(DICT_TYPE.TARGET_TYPE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
<el-form-item label="计算周期" prop="targetPeriodName">
<el-select v-model="form.targetPeriodName" placeholder="请选择计算周期" @change="setTime">
<el-option v-for="item in targetPeriod" :label="item.name" :value="item.name" :key="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item label="运输方式" prop="transportType">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportType" formatter="number" />
</el-form-item>
<el-form-item label="出货渠道" prop="shippingChannel">
<el-select v-model="form.shippingChannel" placeholder="请选择出货渠道">
<el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId" :key="item.channelId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="立方数" prop="cubeNum">
<el-input v-model="form.cubeNum" placeholder="请输入立方数" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createDeptTarget, updateDeptTarget, deleteDeptTarget, getDeptTarget, getDeptTargetPage, exportDeptTargetExcel,getCreateInitData } from "@/api/ecw/deptTarget";
import { listSimpleDepts } from "@/api/system/dept";
import { getChannelList } from '@/api/ecw/channel';
export default {
name: "DeptTarget",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 部门业绩目标设置列表
list: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
dateRangeStartTime: [],
dateRangeEndTime: [],
deptData:[],
deptArr:[],
channelList:[],
monthList:[],
quarterList:[],
yearList:[],
targetPeriod:[],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
deptId: null,
targetType: null,
targetPeriodName: null,
transportType: null,
shippingChannel: null,
cubeNum: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
deptId: [{ required: true, message: "部门ID不能为空", trigger: "blur" }],
targetType: [{ required: true, message: "目标类型不能为空", trigger: "change" }],
cubeNum: [{ required: true, message: "立方数不能为空", trigger: "blur" }],
}
};
},
computed:{
getShipChannelName() {
return shippingChannelId => {
for (let index in this.channelList) {
let channelItem = this.channelList[index];
if (channelItem.channelId == shippingChannelId) {
return channelItem.nameZh;
}
}
return '/'
}
}
},
created() {
listSimpleDepts().then(res =>{
res.data.forEach((item)=>{
if(item.parentId==0){
this.deptArr.push(item)
}else{
this.deptData.push(item)
}
})
this.deptData.forEach((value)=>{
var dept = this.deptArr.filter(itt=>itt.id==value.parentId)
if(dept.length>0){
value.name =dept[0].name+' | '+ value.name
}
})
});
this.getChannelList();
this.getList();
},
methods: {
getChannelList(){
getChannelList().then(res => this.channelList = res.data)
},
changeList(val){
if(val===1){
this.form.targetPeriodName=undefined;
this.targetPeriod = this.monthList;
} else if (val ===2 ){
this.form.targetPeriodName=undefined;
this.targetPeriod = this.quarterList;
} else{
this.form.targetPeriodName=undefined;
this.targetPeriod = this.yearList;
}
},
setTime(item){
this.targetPeriod.forEach((i,index)=>{
if(i.name===item){
this.form.startTime = i.startDate;
this.form.endTime = i.endDate;
}
})
},
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
this.addBeginAndEndTime(params, this.dateRangeStartTime, 'startTime');
this.addBeginAndEndTime(params, this.dateRangeEndTime, 'endTime');
// 执行查询
getDeptTargetPage(params).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
deptId: undefined,
targetType: undefined,
targetPeriodName: undefined,
startTime: undefined,
endTime: undefined,
transportType: undefined,
shippingChannel: undefined,
cubeNum: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.dateRangeStartTime = [];
this.dateRangeEndTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
getCreateInitData().then(res=>{
this.monthList = res.data.month;
this.quarterList = res.data.quarter;
this.yearList = res.data.year;
})
this.targetPeriod = this.monthList;
this.reset();
this.open = true;
this.title = "添加部门业绩目标设置";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getDeptTarget(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改部门业绩目标设置";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
// 修改的提交
if (this.form.id != null) {
updateDeptTarget(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createDeptTarget(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除部门业绩目标设置编号为"' + id + '"的数据项?').then(function() {
return deleteDeptTarget(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
this.addBeginAndEndTime(params, this.dateRangeStartTime, 'startTime');
this.addBeginAndEndTime(params, this.dateRangeEndTime, 'endTime');
// 执行导出
this.$modal.confirm('是否确认导出所有部门业绩目标设置数据项?').then(() => {
this.exportLoading = true;
return exportDeptTargetExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
......@@ -24,8 +24,10 @@
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="订单号" prop="orderNo"></el-table-column>
<el-table-column label="唛头" prop="marks"></el-table-column>
<el-table-column label="货物数据"></el-table-column>
<el-table-column label="入仓时间" prop="rucangtime"></el-table-column>
<el-table-column label="货物数据">
</el-table-column>
<el-table-column label="入仓时间" prop="rucangTime"></el-table-column>
<el-table-column label="状态">
<template v-slot:default="scope">
<dict-tag :value="scope.row.status" :type="DICT_TYPE.ORDER_STATUS"></dict-tag>
......
......@@ -42,7 +42,11 @@
</template>
</el-table-column>
<el-table-column label="操作人"></el-table-column>
<el-table-column label="操作时间" prop="createTime"></el-table-column>
<el-table-column label="操作时间">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
</template>
</el-table-column>
<el-table-column label="操作">
<template v-slot:default='scope'>
<el-button type="text" @click ="guanlianOrderByOrderId(scope.row.orderId)">
......@@ -72,6 +76,16 @@ export default {
components:{
ordeDetailsForm
},
computed:{
check(){
let flag = true;
if(this.list.length === 1 && this.list[0].status === 5){
flag = false
}else {
}
}
},
data(){
return {
orderDetails:{},
......
<template>
<div class="batch-single-application">
<h1 class="title">批量调仓申请</h1>
<el-table>
<el-table-column label="订单编号"></el-table-column>
<el-table-column label="唛头"></el-table-column>
<el-table-column label="已到箱数/总箱数"></el-table-column>
<el-table-column label="下单统计"></el-table-column>
<el-table-column label="入仓统计"></el-table-column>
<el-table-column label="运输方式"></el-table-column>
<el-table-column label="出货渠道"></el-table-column>
<el-table-column label="始发仓"></el-table-column>
<el-table-column label="目的地"></el-table-column>
<el-table-column label="送货时间"></el-table-column>
<h1 class="title">调仓申请</h1>
<el-table :data="list">
<el-table-column label="订单编号" prop="orderNo"></el-table-column>
<el-table-column label="唛头" prop="marks"></el-table-column>
<el-table-column label="已到箱数/总箱数">
<template v-slot = {row}>
{{row.sumQuantity || 0}}/{{row.totalNum}}
</template>
</el-table-column>
<el-table-column label="下单统计">
</el-table-column>
<el-table-column label="入仓统计" width="150">
<template v-slot="{row}">
<div>总箱数:{{row.sumNum || 0}}</div>
<div>体积:{{row.sumVolume || 0}}CBM</div>
<div>重量:{{row.sumWeight || 0}}KG</div>
</template>
</el-table-column>
<el-table-column label="入仓时间">
</el-table-column>
<el-table-column label="运输方式">
<template v-slot = {row}>
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId"></dict-tag>
</template>
</el-table-column>
<el-table-column label="出货渠道">
</el-table-column>
<el-table-column label="始发仓" prop="startWarehouseName"></el-table-column>
<el-table-column label="目的地" prop="objectiveName"></el-table-column>
<el-table-column label="发货人">
<template v-slot="{row}">
<div>
<p>
</p>
</div>
</template>
</el-table-column>
<el-table-column label="收货人">
<template v-slot="{row}">
<div>
<p>
{{row.consigneeName}}
</p>
<p>
{{row.consigneePhone}}
</p>
</div>
</template>
</el-table-column>
</el-table>
<div style="display: flex;justify-content:center; margin-top: 20px">
<div style="width: 300px;height: 50px;border: 1px solid; margin: 0 10px"></div>
<div style="width: 300px;height: 50px;border: 1px solid;"></div>
<div style="width: 200px; margin: 0 10px">
{{list[0].startWarehouseName}}
</div>
<div style="width: 200px;">
<el-select v-model="params.warehouseInId">
<el-option v-for="(item ,index) in availableWarehouse" :value="item.id" :label="item.titleZh" :key="index"></el-option>
</el-select>
</div>
</div>
<el-divider></el-divider>
<h1 class="title">
审批流程
</h1>
<div style="padding: 20px">
<my-process-viewer key="designer" v-model="bpmnXML" v-bind="bpmnControlForm" />
</div>
<div style="height: 100px"></div>
<el-form label-width="200px">
<el-form-item label="抄送"></el-form-item>
<el-form-item label="抄送人"></el-form-item>
</el-form>
<!-- <el-form label-width="200px">-->
<!-- <el-form-item label="抄送"></el-form-item>-->
<!-- <el-form-item label="抄送人"></el-form-item>-->
<!-- </el-form>-->
<div style="text-align: center">
<el-button style="margin-right: 50px">提交申请</el-button>
<el-button>取消</el-button>
<el-button style="margin-right: 50px" @click="submit" :disabled="isSubmit">提交申请</el-button>
<el-button @click="$router.push('/order/order')">取消</el-button>
</div>
<!-- <warehouseDetails></warehouseDetails>-->
</div>
</template>
<script>
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import {
ecwOrderList,
orderWarehouseInAdjustApply,
warehouseAdjustmentList,
} from "@/api/ecw/batchSingleApplication";
import {getProcessDefinitionBpmnXMLByKey} from "@/api/bpm/definition";
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
import {getOrderPage} from "@/api/ecw/order";
export default {
name: "batchSingleApplication"
name: "batchSingleApplication",
props:{
orderList:String,
},
components:{
warehouseDetails
},
created() {
getOrderPage({orderIdList:this.orderList}).then(r =>{
this.list = r.data.list
warehouseAdjustmentList({id:this.list[0].startWarehouseId}).then( r => this.availableWarehouse = r.data)
})
getProcessDefinitionBpmnXMLByKey("warehouse_transfer").then(response => {
this.bpmnXML = response.data
})
},
computed:{
isSubmit(){
let flag = true;
if(this.list.length === 1 && this.list[0].status === 5){
flag = false
}else {
let l = this.list.map(e => e.startWarehouseId)
if(this.list.every(e => e.status === 5) && [...new Set(l)].length === 1) flag = false
}
return flag;
}
},
data(){
return {
list:[],
availableWarehouse:[],
DICT_TYPE,
departureWarehouse:undefined,
adjustment:undefined,
params:{
orderIds:undefined,
warehouseInId:undefined,
warehouseOutId: undefined
},
bpmnXML: null,
bpmnControlForm: {
prefix: "activiti"
},
}
},
methods:{
submit(){
let p = this.list.map(e => e.orderId).join(',');
this.params.orderIds = p;
this.params.warehouseOutId = this.list[0].startWarehouseId;
this.params.orderNo = this.list[0].orderNo
orderWarehouseInAdjustApply(this.params).then( r=>{
if(r.code === 0){
this.$message.success('调仓成功');
}
})
}
}
}
</script>
......@@ -45,6 +162,15 @@ export default {
box-sizing: border-box;
.title{
font-weight: 600;
text-align: left;
}
}
.my-process-designer {
height: calc(100vh - 200px);
}
.box-card {
width: 100%;
margin-bottom: 20px;
}
</style>
......@@ -2,24 +2,24 @@
<div>
<el-descriptions class="margin-top" border :column="4">
<el-descriptions-item label="唛头">{{details.marks}}</el-descriptions-item>
<el-descriptions-item label="已到箱数/总箱数">{{details.sumQuantity}}/{{details.sumNum}}</el-descriptions-item>
<el-descriptions-item label="已到箱数/总箱数">{{details.sumQuantity || 0}}/{{details.totalsumNum || 0}}</el-descriptions-item>
<el-descriptions-item label="订单状态">
<dict-tag :type="DICT_TYPE.ORDER_ABNORMAL_STATE" :value="details.status" />
</el-descriptions-item>
<el-descriptions-item label="送货日期">{{}}</el-descriptions-item>
<el-descriptions-item label="送货日期"></el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="details.transportId"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="出货渠道">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="details.channelId"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="始发地">{{details.logisticsInfoDto.startWarehouseId}}</el-descriptions-item>
<el-descriptions-item label="目的地">{{details.logisticsInfoDto.destWarehouseId}}</el-descriptions-item>
<el-descriptions-item label="发货人姓名">{{details.consignorVO.customerId}}</el-descriptions-item>
<el-descriptions-item label="始发地">{{details.logisticsInfoDto.startTitleZh}}</el-descriptions-item>
<el-descriptions-item label="目的地">{{details.logisticsInfoDto.destTitleZh}}</el-descriptions-item>
<el-descriptions-item label="发货人姓名">{{details.consignorVO.name}}</el-descriptions-item>
<el-descriptions-item label="发货人公司">{{details.consignorVO.company}}</el-descriptions-item>
<el-descriptions-item label="发货人电话">{{details.consignorVO.phone}}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item label="收货人姓名">{{details.consigneeVO.customerId}}</el-descriptions-item>
<el-descriptions-item label="收货人姓名">{{details.consigneeVO.name}}</el-descriptions-item>
<el-descriptions-item label="收货人公司">{{details.consigneeVO.company}}</el-descriptions-item>
<el-descriptions-item label="收货人电话">{{details.consigneeVO.phone}}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
......
<template>
<div>
<h1>
申请信息【订单信息】
</h1>
<el-table :data="list" v-if="type === 1">
<el-table-column
prop="orderNo"
label="订单编号">
</el-table-column>
<el-table-column
prop="marks"
label="唛头">
</el-table-column>
<el-table-column
label="已到箱数/总箱数">
<template v-slot="{row}">
{{row.sumNum}}/{{row.totalNum}}
</template>
</el-table-column>
<el-table-column
label="下单统计">
<template v-slot="{row}">
<div v-if="row.costVO">
箱数:{{row.costVO.totalNum}}
{{row.costVO.totalVolume}}
{{row.costVO.totalWeight}}kg
</div>
</template>
</el-table-column>
<el-table-column
label="入仓统计">
<template v-slot="{row}">
<div>总箱数:{{row.totalNum}}</div>
<div>体积:{{row.sumVolume}}CBM </div>
<div>重量:{{row.sumWeight}}kg</div>
</template>
</el-table-column>
<el-table-column
label="入仓时间">
</el-table-column>
<el-table-column
label="运输方式">
<template v-slot = {row}>
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId"></dict-tag>
</template>
</el-table-column>
<el-table-column
label="出货渠道">
</el-table-column>
<el-table-column label="始发仓" prop="startWarehouseName"></el-table-column>
<el-table-column label="目的地" prop="objectiveName"></el-table-column>
<el-table-column
label="发货人">
</el-table-column>
<el-table-column
label="收货人">
<template v-slot="{row}">
<p>
{{row.consigneeName}}
</p>
<p>
{{row.consigneePhone}}
</p>
</template>
</el-table-column>
</el-table>
<el-descriptions v-else :column="4" border>
<el-descriptions-item label="订单号">{{FeeDetails.orderNo}}</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="FeeDetails.transportId"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="出货方式">
{{selectChannel(FeeDetails.channelId)}}
</el-descriptions-item>
<el-descriptions-item label="订单状态">
<dict-tag :type="DICT_TYPE.ORDER_ABNORMAL_STATE" :value="FeeDetails.abnormalState"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="唛头">
{{FeeDetails.marks}}
</el-descriptions-item>
<el-descriptions-item label="始发仓">{{FeeDetails.startWarehouse}}</el-descriptions-item>
<el-descriptions-item label="目的仓">{{FeeDetails.destWarehouse}}</el-descriptions-item>
</el-descriptions>
<div v-if="type === 1">
<p>
申请说明
</p>
<div >
从【{{selectWarehouse(FeeDetails.details && FeeDetails.details.warehouseInId ? FeeDetails.details.warehouseInId : '' )}}】 调到
【{{selectWarehouse(FeeDetails.details && FeeDetails.details.warehouseOutId ? FeeDetails.details.warehouseOutId : '' )}}】
</div>
</div>
<div v-if="type === 2">
<p>申请理由</p>
<div>
{{FeeDetails.remarks}}
</div>
</div>
<div v-if="type === 3">
<p>申请理由</p>
<div>
{{ FeeDetails.details && FeeDetails.details.reason ? FeeDetails.details.reason :''}}
</div>
</div>
</div>
</template>
<script>
import {
warehouseApprovalGetByFormId,
warehouseApprovalGetById,
warehouseAreaPositionList
} from "@/api/ecw/batchSingleApplication";
import {applicationGetOrderByProcessId, feeApplicationGet, getOrder, getOrderPage,} from "@/api/ecw/order";
import { getChannelList } from '@/api/ecw/channel';
import Template from "@/views/cms/template";
export default {
components: {Template},
props:{
type:{
type: Number,
default:1,
},
processId:{
type:[Number,String],
}
},
name: "warehouseDetails",
data(){
return{
FeeDetails:{},
transfer:{},
warehouseList:[],
channelList:[],
processInstanceID:undefined,
list:[]
}
},
created() {
getChannelList().then(r => this.channelList = r.data);
warehouseAreaPositionList().then(r => this.warehouseList = r.data)
if(this.type === 2){
feeApplicationGet({id:this.processId}).then(r => {
if(r.code === 0){
this.processInstanceID = r.data.bpmProcessId;
this.getDetails()
}
})
}else {
warehouseApprovalGetById({id:this.processId}).then(r => {
if(r.code === 0){
this.processInstanceID = r.data.formId;
this.getDetails()
}
})
}
},
methods:{
selectWarehouse(val){
if(this.warehouseList.length > 0 && !!val){
return this.warehouseList.find(e => e.id === val).titleZh
}
return ''
},
selectChannel(val){
if(this.channelList.length > 0 && !!val) return this.channelList.find(e => e.channelId === val).nameEn
return ''
},
getDetails(){
switch (this.type){
case 1:
//调仓
warehouseApprovalGetByFormId({formId:this.processInstanceID}).then( r => {
this.FeeDetails = r.data
this.FeeDetails.details = JSON.parse(r.data.details)
getOrderPage({orderIdList:r.data.orderIds}).then(res=>{
this.list = res.data.list
})
});
break;
case 2:
// 费用申请
applicationGetOrderByProcessId({processId:this.processInstanceID}).then(r => {
this.FeeDetails = r.data
})
break;
case 3:
//退仓
warehouseApprovalGetByFormId({formId:this.processInstanceID}).then( res => {
getOrder(res.data.orderIds).then(r =>{
this.FeeDetails = r.data
this.FeeDetails.details = JSON.parse(res.data.details)
})
});
break;
}
}
}
}
</script>
<style scoped>
</style>
......@@ -59,6 +59,9 @@
<el-button style="margin-right: 30px;" @click="submit">提交</el-button>
<el-button>取消</el-button>
</div>
<div style="padding: 20px">
<my-process-viewer key="designer" v-model="bpmnXML" v-bind="bpmnControlForm" />
</div>
</div>
</template>
......@@ -66,6 +69,7 @@
import {getOrder, feeApplicationCreate, ApplicationListByOrderId, applicationUpdate} from "@/api/ecw/order";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import Template from "@/views/cms/template";
import { getProcessDefinitionBpmnXMLByKey} from "@/api/bpm/definition";
export default {
name: "feeApplication",
components: {Template},
......@@ -80,7 +84,11 @@ export default {
getDictDatas,
STATUS:{},
isModify:[],
isModifyIf:false
isModifyIf:false,
bpmnXML: null,
bpmnControlForm: {
prefix: "activiti"
},
}
},
created() {
......@@ -92,6 +100,9 @@ export default {
this.getOrderList()
this.getDictDatas(this.DICT_TYPE.AUDIT_STATUS).forEach( e =>{
this.STATUS[e.value] = e.label
}),
getProcessDefinitionBpmnXMLByKey("free_apply").then(response => {
this.bpmnXML = response.data
})
},
computed:{
......@@ -145,13 +156,14 @@ export default {
if(r.code === 0){
this.list = r.data;
this.list.forEach(()=>this.isModify.push(true))
let p = this.list.find(e => e.status === 1)
}
})
},
modify(row){
this.isModifyIf = true;
this.$set(this.isModify, this.list.findIndex(e => e.id = row.id), false )
}
},
}
}
</script>
......@@ -167,4 +179,12 @@ export default {
width: 200px;
}
}
.my-process-designer {
height: calc(100vh - 200px);
}
.box-card {
width: 100%;
margin-bottom: 20px;
}
</style>
......@@ -178,7 +178,16 @@
</div>
</el-popover>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:order:update']">编辑</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="$router.push('/order/warehousing?id=' + scope.row.orderId)"
v-hasPermi="['ecw:order:update']">入仓</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:order:update']">退仓</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="$router.push('/order/special?id=' + scope.row.orderId)"
v-hasPermi="['ecw:order:update']">特价</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:order:delete']">删除</el-button>
<!--仓库相关的-->
<el-popover
style="margin-left: 10px;"
......@@ -189,8 +198,9 @@
<div style=" display:flex; flex-direction:column">
<el-button size="mini" type="text" icon="el-icon-edit" @click="$router.push('/order/warehousing?id=' + scope.row.orderId)"
v-hasPermi="['ecw:order:update']">入仓</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
<el-button size="mini" type="text" icon="el-icon-edit" @click= "$router.push(`/order/withdrawal/${scope.row.orderId}`)"
v-hasPermi="['ecw:order:update']">退仓</el-button>
<el-button type="text" v-if="scope.row.status === 5" size="mini" @click="$router.push({path:'/order/batch-single-application',query:{list:scope.row.orderId}})" >调仓</el-button>
</div>
</el-popover>
......@@ -334,6 +344,7 @@ export default {
orderId:undefined,
/* DICT_TYPE,
getDictDatas */
adjustmentList:[]
};
},
computed: {
......@@ -385,6 +396,7 @@ export default {
this.getList()
})
},
/** 查询列表 */
getList() {
this.loading = true;
......@@ -441,7 +453,12 @@ export default {
this.single = selection.length !== 1
this.multiple = !selection.length
},
handleEdit() { },
handleEdit() {
this.$router.push({
path:'/order/batch-single-application',
query:{list:this.ids.join(',')}
})
},
moleculeChange() { },
denominatorChange() { },
specialRendering(val){
......@@ -461,7 +478,7 @@ export default {
}
}
)
}
},
}
};
</script>
<template>
<div style="padding: 0 20px">
<h1>调拨出仓</h1>
<el-divider content-position="left">
订单信息
</el-divider>
<ordeDetailsForm :details="{}"></ordeDetailsForm>
<el-divider content-position="left">
货物信息
</el-divider>
<el-table>
<el-table-column label="序号"></el-table-column>
<el-table-column label="品名"></el-table-column>
<el-table-column label="填单货物属性"></el-table-column>
<el-table-column label="入库货物属性"></el-table-column>
<el-table-column label="最后操作时间"></el-table-column>
<el-table-column label="状态"></el-table-column>
</el-table>
<el-divider content-position="left">
调仓明细
</el-divider>
<el-table>
<el-table-column label="调仓编号"></el-table-column>
<el-table-column label="调出仓库"></el-table-column>
<el-table-column label="调入仓库"></el-table-column>
<el-table-column label="申请人"></el-table-column>
<el-table-column label="申请时间"></el-table-column>
<el-table-column label="状态"></el-table-column>
<el-table-column label="操作"></el-table-column>
</el-table>
<el-descriptions :column="4" border>
<el-descriptions-item label="集运仓库">kooriookami</el-descriptions-item>
<el-descriptions-item label="储位">18100000000</el-descriptions-item>
<el-descriptions-item label="调拨目标仓">苏州市</el-descriptions-item>
<el-descriptions-item label="物流公司"></el-descriptions-item>
<el-descriptions-item label="物流单号"> 1188 号</el-descriptions-item>
<el-descriptions-item label="联系电话"> 1188 号</el-descriptions-item>
<el-descriptions-item label="出仓日期"> 1188 号</el-descriptions-item>
<el-descriptions-item label="到仓日期"> 1188 号</el-descriptions-item>
</el-descriptions>
<el-divider content-position="left">
出仓影像
</el-divider>
<el-from>
<el-form-item label="备注"></el-form-item>
</el-from>
<div>
<el-button>确认出仓</el-button>
<el-button>返回</el-button>
</div>
</div>
</template>
<script>
import ordeDetailsForm from "@/views/ecw/order/components/ordeDetailsForm";
export default {
name: "transferWarehousing",
components:{
ordeDetailsForm
},
}
</script>
<style scoped>
</style>
......@@ -7,10 +7,25 @@
width="960px"
>
<el-descriptions border :column="2">
<el-descriptions-item label="中文品名"></el-descriptions-item>
<el-descriptions-item label="英文品名"></el-descriptions-item>
<el-descriptions-item label="品牌">{{['无牌', '有牌', '中性'][warehousing.brandType]}}</el-descriptions-item>
<el-descriptions-item label="是否备案"></el-descriptions-item>
<el-descriptions-item label="中文品名">{{ warehousing.prodTitleZh }}</el-descriptions-item>
<el-descriptions-item label="英文品名">{{ warehousing.prodTitleEn }}</el-descriptions-item>
<el-descriptions-item label="品牌">
<span v-if="warehousing.orderWarehouseInBackItemDoList && warehousing.orderWarehouseInBackItemDoList.length">{{ form.brand || '' }}</span>
<el-select
v-else v-model="form.brand"
placeholder="可修改"
filterable
@change="handleChangeBrand"
allow-create>
<el-option
v-for="item in brandList"
:key="item.id"
:label="item.titleZh"
:value="item.titleZh">
</el-option>
</el-select>
</el-descriptions-item>
<el-descriptions-item label="是否备案">{{ isBeian }}</el-descriptions-item>
<el-descriptions-item label="填单参数"></el-descriptions-item>
</el-descriptions>
<el-form ref="form" :model="form" label-width="80px" style="margin-top: 20px">
......@@ -29,73 +44,59 @@
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button>
</div>
<el-table
:data="warehousing.orderWarehouseInBackItemDoList"
style="width: 100%">
<el-table-column label="箱数" prop="cartonsNum">
</el-table-column>
<el-table-column label="包装类型" prop="boxGauge">
</el-table-column>
<el-table-column label="长(cm)" prop="">
</el-table-column>
<el-table-column label="款(cm)" prop="">
</el-table-column>
<el-table-column label="高(cm)" prop="">
</el-table-column>
<el-table-column label="体积(m³)" prop="">
</el-table-column>
<el-table-column label="重量(Kg)" prop="">
</el-table-column>
<el-table-column label="数量" prop="quantityAll">
</el-table-column>
<el-table-column label="快递单号" prop="expressNo">
</el-table-column>
</el-table>
<el-table
:data="form.orderWarehouseInItemDoList"
:data="tableData"
style="width: 100%">
<el-table-column label="箱数">
<template v-slot="{r,c,$index}">
<el-input v-model="form.orderWarehouseInItemDoList[$index].cartonsNum" placeholder=""></el-input>
<span v-if="tableData[$index].id">{{ tableData[$index].cartonsNum }}</span>
<el-input v-else v-model="tableData[$index].cartonsNum" placeholder=""></el-input>
<span>{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGE_TYPE, tableData[$index].boxGauge) }}</span>
</template>
</el-table-column>
<el-table-column label="包装类型">
<template v-slot="{r,c,$index}">
<el-input v-model="form.orderWarehouseInItemDoList[$index].boxGauge" placeholder=""></el-input>
<span v-if="tableData[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGE_TYPE, tableData[$index].boxGauge) }}</span>
<!-- <el-input v-else v-model="tableData[$index].boxGauge" placeholder=""></el-input>-->
<dict-selector v-else :type="DICT_TYPE.ECW_PACKAGE_TYPE" v-model="tableData[$index].boxGauge"></dict-selector>
</template>
</el-table-column>
<el-table-column label="长(cm)">
<!-- <template v-slot="{r,c,$index}">-->
<!-- <el-input v-model="form.orderWarehouseInItemDoList[$index].cartonsNum" placeholder=""></el-input>-->
<!-- <el-input v-model="tableData[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="(cm)">
<el-table-column label="(cm)">
<!-- <template v-slot="{r,c,$index}">-->
<!-- <el-input v-model="form.orderWarehouseInItemDoList[$index].cartonsNum" placeholder=""></el-input>-->
<!-- <el-input v-model="tableData[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="高(cm)">
<!-- <template v-slot="{r,c,$index}">-->
<!-- <el-input v-model="form.orderWarehouseInItemDoList[$index].cartonsNum" placeholder=""></el-input>-->
<!-- <el-input v-model="tableData[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot="{r,c,$index}">
<el-input v-model="form.orderWarehouseInItemDoList[$index].volume" placeholder=""></el-input>
<span v-if="tableData[$index].id">{{ tableData[$index].volume }}</span>
<el-input v-else v-model="tableData[$index].volume" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot="{r,c,$index}">
<el-input v-model="form.orderWarehouseInItemDoList[$index].weight" placeholder=""></el-input>
<span v-if="tableData[$index].id">{{ tableData[$index].weight }}</span>
<el-input v-else v-model="tableData[$index].weight" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="数量">
<template v-slot="{r,c,$index}">
<el-input v-model="form.orderWarehouseInItemDoList[$index].quantityAll" placeholder=""></el-input>
<span v-if="tableData[$index].id">{{ tableData[$index].quantityAll }}</span>
<el-input v-else v-model="tableData[$index].quantityAll" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="快递单号">
<template v-slot="{r,c,$index}">
<el-input v-model="form.orderWarehouseInItemDoList[$index].expressNo" placeholder=""></el-input>
<span v-if="tableData[$index].id">{{ tableData[$index].expressNo }}</span>
<el-input v-else v-model="tableData[$index].expressNo" placeholder=""></el-input>
</template>
</el-table-column>
</el-table>
......@@ -111,9 +112,10 @@
<script>
import dictSelector from "@/components/DictSelector"
import {DICT_TYPE} from "@/utils/dict"
import {DICT_TYPE, getDictDataLabel} from "@/utils/dict"
import warehousing from "@/views/ecw/order/warehousing"
import {orderWarehouseIn} from "@/api/ecw/order"
import {getProductBrankPage} from "@/api/ecw/productBrank"
export default {
name: 'editDialog',
......@@ -140,12 +142,17 @@ export default {
},
mounted() {
getProductBrankPage({pageSize: 100000}).then(r => {
this.brandList = r.data.list
})
},
data() {
return {
DICT_TYPE,
getDictDataLabel,
opened: false,
brandList: [],
form: {
"brand": "",
"brandType": 0,
......@@ -179,7 +186,8 @@ export default {
},
opened(val) {
if (val) {
this.form.material = warehousing.material
this.form.material = this.warehousing.material
this.form.brand = this.warehousing.brand
} else {
this.$emit('update:visible', false)
}
......@@ -187,6 +195,13 @@ export default {
},
methods: {
handleChangeBrand(b){
if (this.brandList.find(e => e.titleZh === b)){
this.isBeian = '有备案'
} else {
this.isBeian = '无备案'
}
},
handleSubmit() {
// Promise.all(
// this.form.orderWarehouseInItemDoList.map(e => {
......@@ -205,14 +220,17 @@ export default {
// })
return orderWarehouseIn({
...this.form,
inTime: this.form.inTime,
material: this.form.material,
brandType: this.warehousing.brandType,
brandType: this.form.brand ? 1 : 0,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo
}).then(() => {
}).then(r => {
if (r.data){
this.$message.success('入仓成功')
this.handleClose()
}else {
this.$message.success('入仓失败')
}
})
},
handleClose() {
......@@ -225,14 +243,23 @@ export default {
handleAdd() {
this.form.orderWarehouseInItemDoList.push({
"boxGauge": "",
"cartonsNum": 0,
"cartonsNum": "",
"expressNo": "",
"quantityAll": 0,
"quantityAll": "",
"unit": "",
"volume": 0,
"weight": 0
"volume": '',
"weight": ''
})
}
},
computed: {
tableData() {
return [...this.warehousing.orderWarehouseInBackItemDoList, ...this.form.orderWarehouseInItemDoList]
},
isBeian(){
return this.brandList.find(e => e.titleZh === this.form.brand) ? '有备案' : '无备案'
}
}
}
</script>
......
......@@ -5,7 +5,7 @@
<order-base-info :order="order"></order-base-info>
<div style="margin-top: 20px">
<span>储位:</span><el-button type="primary" size="mini" @click="areaVisible = true">选择</el-button>
<span>储位:{{ locationName }}</span><el-button type="primary" size="mini" @click="areaVisible = true" style="margin-left: 15px">选择</el-button>
</div>
<h2>货物信息</h2>
......@@ -44,8 +44,11 @@
label="快递单号">
</el-table-column>
<el-table-column
prop="address"
prop="updateTime"
label="最后操作时间">
<template v-slot="{row}">
{{ row.updateTime }}
</template>
</el-table-column>
<el-table-column
prop="address"
......@@ -55,8 +58,8 @@
prop="address"
label="操作">
<template v-slot="{ row, column, $index }">
<el-button size="mini" type="text" @click="handleWarehousing($index)">入仓</el-button>
<el-button size="mini" type="text" @click="handleWarehousing(row.prodId)">追加</el-button>
<el-button v-if="orderItemList[$index].orderWarehouseInBackItemDoList && orderItemList[$index].orderWarehouseInBackItemDoList.length > 0" size="mini" type="text" @click="handleWarehousing($index)">追加</el-button>
<el-button v-else size="mini" type="text" @click="handleWarehousing($index)">入仓</el-button>
<el-button size="mini" type="text" @click="handleWarehousingReturn(row)">退仓</el-button>
</template>
</el-table-column>
......@@ -151,19 +154,34 @@
<div style="text-align: center">
<el-button type="primary">转异</el-button>
<el-button type="primary" @click="handleSubmit()">完成入仓</el-button>
<el-button type="primary" @click="finishVisible = true">完成入仓</el-button>
</div>
</el-form>
<warehouse-area-dialog :visible.sync="areaVisible" v-model="locationName"></warehouse-area-dialog>
<edit-dialog :visible.sync="warehousingVisible" :warehousing="warehousing"></edit-dialog>
<!-- 完成入仓 -->
<el-dialog
title="确认入仓"
:visible.sync="finishVisible"
width="300px">
<div style="text-align: center">在完成入仓前,您还可以</div>
<div style="text-align: center;padding: 15px 0">
<el-button type="info" @click="areaVisible = true">选择储位</el-button>
<el-button type="info">打印标签</el-button>
</div>
<div style="text-align: center">
<el-button type="primary" @click="handleSubmit()">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {getCurrencyList} from "@/api/ecw/currency"
import {getOrder, getOrderWarehouseIn, orderWarehouseInFinish} from "@/api/ecw/order"
import {getOrder, getOrderWarehouseIn, orderWarehouseInFinish, rollbackApply} from "@/api/ecw/order"
import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
import editDialog from '@/views/ecw/order/warehousing/components/editDialog'
......@@ -189,6 +207,7 @@ export default {
data() {
return {
areaVisible: false,
finishVisible: false,
locationName: '',
warehousingVisible: false,
form: {
......@@ -207,6 +226,20 @@ export default {
orderWarehouseInFinish({
"locationName": this.locationName,
"orderId": this.order.orderId
}).then(r => {
if (r.data) {
this.$confirm(
'该订单已成功入仓,是否打印?',
'货物已入仓',
{
confirmButtonClass: '',
cancelButtonText: ''
}
).then().catch(() => {
// this.$store.dispatch('tagsView/delVisitedView')
this.$message.success('入仓成功')
})
}
})
},
handleWarehousing(index) {
......@@ -219,16 +252,19 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log(item.id)
console.log(item)
rollbackApply({
"orderId": item.orderId,
"orderNo": item.orderNo,
"reason": ""
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
message: '申请退仓成功!'
});
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
}
},
......
<template>
<div style="padding: 0 20px">
<h1>申请退仓-{{orderDetails.orderNo}}</h1>
<el-divider></el-divider>
<el-form label-width="150px">
<el-form-item label="退仓原因">
<el-input v-model="params.reason" style="width:500px" type="textarea"></el-input>
</el-form-item>
</el-form>
<el-divider></el-divider>
<h2>审批流程</h2>
<div style="padding: 20px">
<my-process-viewer key="designer" v-model="bpmnXML" v-bind="bpmnControlForm" />
</div>
<div>
<el-button @click="submit" type="primary" style="margin-right: 20px;">确定退仓</el-button>
<el-button @click="$router.push('/order/order')">不,再考虑考虑</el-button>
</div>
</div>
</template>
<!--退仓-->
<script>
import {getOrder} from "@/api/ecw/order";
import {orderWarehouseInDelete} from "@/api/ecw/batchSingleApplication";
import {getProcessDefinitionBpmnXMLByKey} from "@/api/bpm/definition";
export default {
name: "withdrawal",
props:{
orderId:String
},
data(){
return {
orderDetails:{},
bpmnXML: null,
bpmnControlForm: {
prefix: "activiti"
},
params:{
orderId:undefined,
orderNo:undefined,
reason:'',
}
}
},
created() {
getOrder(this.orderId).then(r => this.orderDetails = r.data);
getProcessDefinitionBpmnXMLByKey("retired_warehouse").then(response => {
this.bpmnXML = response.data
})
},
methods:{
submit(){
this.params.orderId = this.orderDetails.orderId;
this.params.orderNo =this.orderDetails.orderNo;
orderWarehouseInDelete(this.params).then(r => {
if(r.code === 0){
this.$message.success('退仓成功');
}
})
}
}
}
</script>
<style scoped>
</style>
......@@ -11,6 +11,10 @@
<ueditor />
</el-row>
<el-row>
<my-process-viewer key="designer" v-model="bpmnXML" v-bind="bpmnControlForm" />
</el-row>
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
......@@ -30,6 +34,8 @@
</el-row>
</div>
</template>
......@@ -40,6 +46,9 @@ import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart'
import Ueditor from '@/components/Ueditor'
import {
getProcessDefinitionBpmnXMLByKey
} from "@/api/bpm/definition";
const lineChartData = {
newVisitis: {
......@@ -72,12 +81,26 @@ export default {
},
data() {
return {
lineChartData: lineChartData.newVisitis
lineChartData: lineChartData.newVisitis,
// BPMN 数据
bpmnXML: null,
bpmnControlForm: {
prefix: "activiti"
},
}
},
created() {
this.handlerBpm();
},
methods: {
handleSetLineChartData(type) {
this.lineChartData = lineChartData[type]
},
handlerBpm(){
getProcessDefinitionBpmnXMLByKey("free_apply").then(response => {
this.bpmnXML = response.data
})
}
}
}
......@@ -101,4 +124,12 @@ export default {
padding: 8px;
}
}
.my-process-designer {
height: calc(100vh - 200px);
}
.box-card {
width: 100%;
margin-bottom: 20px;
}
</style>
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