Commit 6b7d0f83 authored by dragondean@qq.com's avatar dragondean@qq.com
parents cfcfa44c 8cc706aa
{
"ExpandedNodes": [
"",
"\\src"
],
"SelectedNode": "\\src\\main.js",
"PreviewInSolutionExplorer": false
}
\ No newline at end of file
File added
......@@ -63,6 +63,15 @@ export function getReceivableDiscountLogById(query) {
})
}
// 根据订单ID获得需要预付应收款列表
export function getFirstReceivableListByOrderId(query) {
return request({
url: '/ecw/receivable/getFirstReceivableListByOrderId',
method: 'get',
params: query
})
}
// 核销收款单
// export function receiptVerification(id) {
// return request({
......
......@@ -303,6 +303,21 @@ export const constantRoutes = [
name: 'discount',
meta: {title: '订单优惠申请', icon: '', activeMenu: '/order/index'}
},
{
path: 'specialWeight/:orderId(\\d+)',
component: (resolve) => import('@/views/ecw/order/special/weight'),
props: true,
name: 'special-weight',
meta: {title: '申请重货优惠', icon: '', activeMenu: '/order/index'}
},
{
path: 'specialCommission/:orderItemId(\\d+)',
component: (resolve) => import('@/views/ecw/order/special/commission'),
props: true,
name: 'special-commission',
meta: {title: '修改佣金规则', icon: '', activeMenu: '/order/index'}
},
{
path: 'associated-order/:orderId(\\d+)',
component: (resolve) => require(['@/views/ecw/order/associatedOrder'],resolve),
......
......@@ -171,7 +171,7 @@ export const DICT_TYPE = {
NEED_KNOW_TYPE:'need_know_type',//需知类型
NEED_KNOW_STATUS:'need_know_status',//需知状态
MANUAL_EXCEPTION_TYPE:'manual_exception_type',
APPLY_STATUS:'apply_status',//特价申请审核状态
ECASH_INIT:'ecash_init', //e-cash
FEE_TYPE:'receivable_fee_type',
......
......@@ -117,7 +117,7 @@
<el-button type="primary" @click="handlerClick('modifyCabinet','修改柜信息')">修改柜信息</el-button>
</div>
<div v-if="isUnderReview">
<el-button type="primary" :disabled=true>封柜审核中</el-button>
<el-button type="primary" @click="jumpReviewDetail">封柜审核中</el-button>
<el-button plain type="primary" @click="canclAudit">取消审核</el-button>
<el-button plain type="primary" @click="$emit('closeDialog')">返回</el-button>
</div>
......@@ -220,6 +220,7 @@ import {
serviceMsg,
getCapacity,
sumStatistics,
toReviewDetail,
} from "../../utils";
import splitOrder from "./splitOrder.vue";
import WorkFlow from "@/components/WorkFlow";
......@@ -519,6 +520,11 @@ export default {
});
});
},
jumpReviewDetail() {
const { cabinetApprovalInfo } = this.shipmentObj;
toReviewDetail.apply(this, [cabinetApprovalInfo.bpmProcessId]);
this.$emit("closeDialog", "close");
},
},
computed: {
/* 是否审核中 */
......
......@@ -30,7 +30,7 @@
<el-date-picker type="datetime" placeholder="请选择日期" v-model="cusDeclarationObj.dcCutOffTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item label="状态" prop="dcCustomsStatus">
<el-radio-group v-model="cusDeclarationObj.dcCustomsStatus">
<el-radio-group v-model="cusDeclarationObj.dcCustomsStatus" :disabled="inReview">
<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>
......@@ -38,7 +38,7 @@
<!-- 查验 -->
<div v-show="cusDeclarationObj.dcCustomsStatus === '3'">
<el-form-item label="查验">
<el-radio-group v-model="cusDeclarationObj.dcCheckStatus">
<el-radio-group v-model="cusDeclarationObj.dcCheckStatus" :disabled="inReview">
<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>
......@@ -70,9 +70,13 @@
</el-form-item>
</el-form>
<el-row class="operate-button" v-if="inReview">
<el-button type="primary" @click="jumpReviewDetail">{{cusDeclarationObj.dcCheckStatus === '1' ? '部分退场审核中' : '全部退场审核中'}}</el-button>
<el-button type="primary" plain @click="canclAudit">{{cusDeclarationObj.dcCheckStatus === '1' ? '取消部分退场审核' : '取消全部退场审核'}}</el-button>
</el-row>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit(2)">提交</el-button>
<el-button type="success" v-if="!inReview" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button>
<el-button type="primary" @click="extraCost" v-show="cusDeclarationObj.dcCustomsStatus === '2' || cusDeclarationObj.dcCustomsStatus === '3'">额外费用</el-button>
</el-row>
......@@ -141,7 +145,12 @@ import {
extraCostUpdate,
approvalCreate,
} from "@/api/ecw/boxSea";
import { formatNumberString, formatDateStr, serviceMsg } from "../utils";
import {
formatNumberString,
formatDateStr,
serviceMsg,
toReviewDetail,
} from "../utils";
import ImageUpload from "@/components/ImageUpload";
/**
......@@ -151,6 +160,9 @@ export default {
name: "cusDeclaration",
inheritAttrs: false,
components: { supplierSelect, ImageUpload },
props: {
shipmentObj: Object,
},
data() {
return {
// 报关对象
......@@ -160,7 +172,9 @@ export default {
dcBoxWgt: [{ required: true, message: "必填", trigger: "change" }],
dcGoodsWgt: [{ required: true, message: "必填", trigger: "change" }],
dcCustomsType: [{ required: true, message: "必填", trigger: "change" }],
dcCustomsStatus: [{ required: true, message: "必填", trigger: "change" }],
dcCustomsStatus: [
{ required: true, message: "必填", trigger: "change" },
],
},
// 弹窗配置
dialogConfig: {
......@@ -173,14 +187,16 @@ export default {
costOrderList: [],
// 额外费用列表
costList: [],
// 是否审核中
inReview: false,
};
},
created() {
const { currNode, shipmentObj } = this.$attrs;
const { currNode } = this.$attrs;
const { voName } = currNode;
let oldData = {
...shipmentObj[voName],
documentInfo: shipmentObj.documentInfo?.split(",") ?? [],
...this.shipmentObj[voName],
documentInfo: this.shipmentObj.documentInfo?.split(",") ?? [],
};
oldData = formatDateStr(oldData, [
"dcCutOffTime",
......@@ -199,36 +215,73 @@ export default {
const newList = Array.from(new Set(documentInfo));
return newList.length > 2 ? "混合报关" : "VGM声明";
},
submitCustomsCreate(operateType) {
customsCreate({
...this.cusDeclarationObj,
shipmentId: this.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
},
/** 提交 */
onSubmit(operateType) {
this.$refs["cusDeclarationForm"].validate((valid) => {
if (valid) {
if (operateType === 1) {
this.submitCustomsCreate(operateType);
return;
// 保存
}
// 提交
const { dcCustomsStatus, dcCheckStatus } = this.cusDeclarationObj;
// 1.状态 报关中/放行 直接提交
if (dcCustomsStatus !== "3") {
this.submitCustomsCreate(operateType);
return;
}
// 2.查验状态,空 直接提交
if (!dcCheckStatus) {
this.submitCustomsCreate(operateType);
return;
}
// 3.查验状态,查验后放行 直接提交
if (dcCheckStatus === "3") {
const { checkExamineStatus } = this.shipmentObj;
// 没有退场审核中的状态
if (checkExamineStatus !== 1) {
this.submitCustomsCreate(operateType);
return;
}
}
// 4.查验状态,退场/部分退场 提示
if (["1", "2"].includes(dcCheckStatus)) {
const { checkExamineStatus } = this.shipmentObj;
// 退场审核状态,1-审核中,2-审核成功,3-审核失败,4-取消
if ([0, 3, 4].includes(checkExamineStatus)) {
this.$modal
.confirm(
`您确认提交${
dcCheckStatus === "1" ? "全部退场" : "部分退场"
}审核吗?`
)
.then(() => {
customsCreate({
...this.cusDeclarationObj,
shipmentId: this.$attrs.shipmentObj.id,
shipmentId: this.shipmentObj.id,
operateType,
}).then((res) => {
// 查验
const { dcCustomsStatus, dcCheckStatus } = this.cusDeclarationObj;
if (dcCustomsStatus === "3") {
// 退场/部分退场
if (["1", "2"].includes(dcCheckStatus)) {
approvalCreate({
approvalStatus: 0,
approvalType: dcCheckStatus === "1" ? 5 : 6, // 5报关全退,6报关部分退
shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
// 触发外层重新查询出货信息
this.$emit("getBoxInfo");
});
});
})
.catch(() => {});
}
} else {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
}
});
}
});
},
......@@ -239,7 +292,7 @@ export default {
return;
}
extraCostOrder({
shipmentId: this.$attrs.shipmentObj.id,
shipmentId: this.shipmentObj.id,
orderNo: this.orderNo,
}).then((res) => {
this.costOrderList = [
......@@ -254,7 +307,7 @@ export default {
/* 查询额外费用订单 */
searchCostList(orderId) {
extraCostList({
shipmentId: this.$attrs.shipmentObj.id,
shipmentId: this.shipmentObj.id,
orderId: orderId,
}).then((res) => {
this.costList = res.data.map((item) => {
......@@ -272,7 +325,7 @@ export default {
fee: row.fee,
orderId: row.orderId,
orderNo: row.orderNo,
shipmentId: this.$attrs.shipmentObj.id,
shipmentId: this.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.searchCostList(row.orderId);
......@@ -321,12 +374,15 @@ export default {
},
// 额外费用
extraCost() {
const { shipmentObj } = this.$attrs;
// 清空额外费用
this.orderNo = "";
this.costOrderList = [];
this.costList = [];
this.$set(this.dialogConfig, "title", `${shipmentObj.selfNo} 报关费用`);
this.$set(
this.dialogConfig,
"title",
`${this.shipmentObj.selfNo} 报关费用`
);
this.$set(this.dialogConfig, "dialogVisible", true);
},
// 计算VGM重量
......@@ -345,6 +401,27 @@ export default {
dcBoxWgtTmp + dcGoodsWgtTmp
);
},
// 审核详情
jumpReviewDetail() {
const { customsApprovalInfo } = this.shipmentObj;
toReviewDetail.apply(this, [customsApprovalInfo.bpmProcessId]);
this.cancel("close");
},
/* 取消审核 */
canclAudit() {
const { currNode, shipmentObj } = this.$attrs;
const { voName } = currNode;
approvalCancel({
applyReason: "取消审核",
id: shipmentObj[voName].id,
shipmentId: shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
// 触发外层重新查询出货信息
this.$emit("getBoxInfo");
});
});
},
},
watch: {
"cusDeclarationObj.dcBoxWgt"(dcBoxWgt) {
......@@ -358,6 +435,18 @@ export default {
this.$set(this.cusDeclarationObj, "dcCheckStatus", "");
}
},
shipmentObj: {
deep: true,
immediate: true,
handler: function (val) {
// 监听查验状态变化
let { checkExamineStatus } = val;
if (checkExamineStatus === 1) {
// 按钮变成审核中
this.inReview = true;
}
},
},
},
};
</script>
......
......@@ -277,7 +277,7 @@
<work-flow xmlkey="shipment_preassemble" v-model="selectedUsers"></work-flow>
</div>
<div v-show="isAudit">
<el-button type="primary" :disabled=true>审核中</el-button>
<el-button type="primary" @click="jumpReviewDetail">审核中</el-button>
<el-button plain type="primary" @click="canclAudit">取消审核</el-button>
<el-button plain type="primary" @click="closeDialog">返回</el-button>
</div>
......@@ -302,7 +302,13 @@ import {
approvalCancel,
} from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
import { formatDate, getTotlContent, serviceMsg, getCapacity } from "../utils";
import {
formatDate,
getTotlContent,
serviceMsg,
getCapacity,
toReviewDetail,
} from "../utils";
import dayjs from "dayjs";
import WorkFlow from "@/components/WorkFlow";
......@@ -613,6 +619,11 @@ export default {
});
});
},
jumpReviewDetail() {
const { currNode, shipmentObj } = this.$attrs;
toReviewDetail.apply(this, [shipmentObj[currNode.voName].bpmProcessId]);
this.$emit("closeDialog");
},
},
};
</script>
......
......@@ -56,7 +56,7 @@
</el-table-column>
<el-table-column label="异常状态" align="center" prop="">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleError(scope.row)" icon="el-icon-edit">{{getOrderError(scope.row, 'errorStatus')}}</el-button>
<el-button v-if="scope.row.exceptionList" type="text" size="small" @click="handleError(scope.row)" icon="el-icon-edit">{{getOrderError(scope.row, 'errorStatus')}}</el-button>
</template>
</el-table-column>
<el-table-column label="异常类型" align="center" prop="">
......@@ -100,7 +100,7 @@
<el-button plain type="primary" @click="$emit('closeStart')">返回</el-button>
</div>
<div v-if="isUnderReview">
<el-button type="primary" :disabled=true>卸柜审核中</el-button>
<el-button type="primary" @click="jumpReviewDetail">卸柜审核中</el-button>
<el-button plain type="primary" @click="canclAudit">取消审核</el-button>
<el-button plain type="primary" @click="$emit('closeStart')">返回</el-button>
</div>
......@@ -123,7 +123,7 @@ import {
approvalCancel,
getSectionList,
} from "@/api/ecw/boxSea";
import { serviceMsg, getTotlContent } from "../../utils";
import { serviceMsg, getTotlContent, toReviewDetail } from "../../utils";
import WorkFlow from "@/components/WorkFlow";
/**
......@@ -277,7 +277,7 @@ export default {
});
},
// 获取异常类型
getUnloadError(exceptionList) {
getUnloadError(exceptionList = []) {
const codes = this.getDictDatas(this.DICT_TYPE.ORDER_ERROR_TYPE);
let errorLabels = [];
exceptionList.forEach((item) => {
......@@ -302,6 +302,11 @@ export default {
path: `/order/pending?id=${row.orderId}`,
});
},
jumpReviewDetail() {
const { cabinetUnloadApprovalInfo } = this.$attrs.shipmentObj;
toReviewDetail.apply(this, [cabinetUnloadApprovalInfo.bpmProcessId]);
this.$emit("closeStart", "close");
},
},
computed: {
/* 是否审核中 */
......
......@@ -20,7 +20,7 @@
<!-- 弹窗 -->
<el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :width="dialogConfig.width" :fullscreen="dialogConfig.fullscreen" :close-on-click-modal=false :modal-append-to-body=false append-to-body>
<component v-bind:is="currentComponent" v-if="dialogConfig.dialogVisible" @closeDialog="closeDialog" v-bind="$attrs" :shipmentObj="shipmentObj" :currNode="currNode"></component>
<component v-bind:is="currentComponent" v-if="dialogConfig.dialogVisible" @closeDialog="closeDialog" v-bind="$attrs" v-on="$listeners" :shipmentObj="shipmentObj" :currNode="currNode"></component>
</el-dialog>
</div>
</template>
......@@ -178,7 +178,8 @@ export default {
watch: {
/* 监听发货对象 */
shipmentObj(val) {
let newNodes = [];
let newNodes = [],
finish = 0;
// 迭代每个节点
for (let i = 0; i < this.seaBaseData.length; i++) {
const nodes = this.seaBaseData[i];
......@@ -187,6 +188,7 @@ export default {
const node = nodes[j];
const { keyName, voName, status, type } = node;
// agent
if (!keyName && type === "agent") {
if (val[voName]) {
// 已完成agent节点
......@@ -212,6 +214,20 @@ export default {
if (end.includes(val[keyName])) {
node.currStatus = "end";
// 报关
if (type === "cusDeclaration") {
const { dcCustomsStatus, dcCheckStatus } = val;
// 查验状态并且是退场/部分退场
if (dcCustomsStatus === 3 && [1, 2].includes(dcCheckStatus)) {
// 只有审核通过并且已处理才算完成
if (val.checkExamineStatus === 2 && val.checkDealStatus === 1) {
// 已完成节点个数
++nodeIndex;
} else {
continue;
}
}
}
// 已完成节点个数
++nodeIndex;
}
......@@ -219,10 +235,11 @@ export default {
// 如果相等标识该步骤已完成
if (nodeIndex === nodes.length) {
// 加1表示为已完成步骤后一步
this.currIndex = i + 1;
finish = finish + 1;
}
newNodes.push(nodes);
}
this.currIndex = finish;
this.processData = newNodes;
},
},
......
......@@ -1030,6 +1030,18 @@ function serviceMsg(result, _vue) {
});
}
/**
* 跳转审核详情
*
* @param {*} bpmProcessId
*/
function toReviewDetail(bpmProcessId) {
this.$router.push({
path: "/bpm/process-instance/detail",
query: { id: bpmProcessId },
});
}
export {
getStatusName,
getColmnMapping,
......@@ -1044,4 +1056,5 @@ export {
getCapacity,
sumStatistics,
serviceMsg,
toReviewDetail,
};
......@@ -147,6 +147,7 @@ import {DICT_TYPE} from '@/utils/dict'
import { userList } from "@/api/system/user"
import CustomerSelector from '@/components/CustomerSelector'
import ProductSelector from '@/components/ProductSelector'
import getProduct from '@/api/ecw/product'
export default {
name: "Exception",
......
......@@ -14,17 +14,17 @@
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="orderData.status" />
</el-descriptions-item>
<el-descriptions-item label="送货日期">
{{orderData.consigneeVO?orderData.consigneeVO.deliveryDate||'':''}}
{{orderData.deliveryDate||''}}
<!-- <span v-if="orderData">{{orderData.status>=5?(orderData.orderItemVOList.length>0?parseTime(orderData.orderItemVOList[0].warehouseInInfoVO.firstInTime):''):(orderData.consigneeVO?orderData.consigneeVO.deliveryDate:'')}}</span> -->
</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
</el-descriptions-item>
<el-descriptions-item label="始发地">
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.startTitleZh:''}}
<el-descriptions-item label="始发地" :span="2">
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.startAddressZh:''}}
</el-descriptions-item>
<el-descriptions-item label="目的地">
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.destTitleZh:''}}
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.destAddressZh:''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4">
......@@ -91,7 +91,7 @@
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.orderExceptionStatus>0">已完成</el-tag>
<el-button v-else size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.id,scope.row.orderExceptionType)">处理</el-button>
<el-button v-else size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">处理</el-button>
</template>
</el-table-column>
</el-table>
......@@ -150,14 +150,24 @@ export default {
});
},
handEdit(id, type){
if(type == 8||type==15){
handEdit(row){
if(row.orderExceptionType=='order_no_quote_exception'){
getProduct(row.orderItemId).then(res=>{
this.$router.push({
path:"/order/weightDeal?id="+id,
name: 'ProductPrice',
query: {
product_id: row.orderItemId,
product_type: res.data.typeId
}
})
})
}else if(row.orderExceptionType == 'order_heavy_cargo_exception'||row.orderExceptionType=='order_bulky_cargo_exception'){
this.$router.push({
path:"/order/weightDeal?id="+row.id+'&type='+row.orderExceptionType,
})
}else{
this.$router.push({
path:"/order/prepayDeal?id="+id,
path:"/order/prepayDeal?id="+row.id,
})
}
......
......@@ -11,14 +11,14 @@
{{orderData?orderData.orderNo:''}}
</el-form-item>
</el-row>
<div v-if="orderExceptionData.orderExceptionType==1||orderExceptionData.orderExceptionType==2">
<div v-if="orderExceptionData.orderExceptionType=='order_superfluous_box_exception'||orderExceptionData.orderExceptionType=='order_lack_box_exception'||orderExceptionData.orderExceptionType=='order_miss_exception'||orderExceptionData.orderExceptionType=='order_superfluous_goods_exception'||orderExceptionData.orderExceptionType=='order_in_water_exception'||orderExceptionData.orderExceptionType=='order_damage_exception'">
<el-row>
<el-form-item label="产品名称:" >
{{shopData?shopData.prodTitleZh:''}}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="产品名称英文名称:">
<el-form-item label="产品英文名称:">
{{shopData?shopData.prodTitleEn:''}}
</el-form-item>
</el-row>
......@@ -29,22 +29,27 @@
{{orderData?getRouterNameById():''}}
</el-form-item>
</el-row>
<div v-if="orderExceptionData.orderExceptionType!=3||orderExceptionData.orderExceptionType!=9||orderExceptionData.orderExceptionType!=10||orderExceptionData.orderExceptionType!=11">
<div v-if="orderExceptionData.orderExceptionType!='order_doc_exception'&&orderExceptionData.orderExceptionType!='order_consignor_exception'&&orderExceptionData.orderExceptionType!='order_other_exception'">
<el-row>
<el-form-item label="填单参数:">
{{(orderData.costVO?orderData.costVO.totalNum:0)+''+(orderData.costVO?orderData.costVO.totalVolume:0)+''+(orderData.costVO?orderData.costVO.totalWeight:0)+'kg'}}
{{(shopData.num||0)+''+(shopData.volume||0)+''+(shopData.weight||0)+'kg'}}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="入仓参数:">
{{(orderData.sumNum||0)+''+(orderData.sumVolume||0)+''+(orderData.sumWeight||0)+'kg'}}
{{(shopData.warehouseInInfoVO?shopData.warehouseInInfoVO.cartonsNum:0)+''+(shopData.warehouseInInfoVO?shopData.warehouseInInfoVO.volume:0)+''+(shopData.warehouseInInfoVO?shopData.warehouseInInfoVO.weight:0)+'kg'}}
</el-form-item>
</el-row>
<el-row :span="12">
<el-form-item label="异常描述:">
{{orderData.totalMoney||''}}
{{orderExceptionData.orderExceptionDescVO?orderExceptionData.orderExceptionDescVO.descZh:''}}
</el-form-item>
<el-button v-if="orderExceptionData.orderExceptionType=='order_pay_exception'" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">新增收款单</el-button>
</el-row>
<el-row>
<el-form-item label="入仓参数:">
<span>{{order.entryNum||0}}{{order.entryWeight||0}}Kg {{order.entryVolume||0}}</span>
</el-form-item>
<el-button v-if="orderExceptionData.orderExceptionType==3" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">新增收款单</el-button>
</el-row>
<!-- <el-row :span="12">
<el-form-item label="详细内容:">
......@@ -53,13 +58,11 @@
<el-button v-if="orderExceptionData.orderExceptionStatus==3" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">新增收款单</el-button>
</el-row> -->
</div>
</el-form>
<el-table v-if="orderExceptionData.orderExceptionType==3" v-loading="loading" border :data="orderData.orderItemVOList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55">
</el-table-column> -->
</el-form> {{order.entryNum}}{{order.entryWeight}}Kg {{order.entryVolume}}
<el-table v-if="orderExceptionData.orderExceptionType=='order_pay_exception'" v-loading="loading" border :data="preException">
<el-table-column label="品名" align="center">
<template slot-scope="scope">
{{scope.row.prodTitleZh+'('+scope.row.prodTitleEn+')'}}
{{scope.row.titleZh+'('+scope.row.titleEn+')'}}
</template>
</el-table-column>
<el-table-column label="箱数" prop="num" />
......@@ -78,13 +81,21 @@
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.feeType"></dict-tag>
</template>
</el-table-column>
<el-table-column label="应收金额" prop="num" />
<el-table-column label="总金额美元" align="center" prop="totalAmount" />
<el-table-column label="总金额RMB" align="center" prop="totalAmount" />
<el-table-column label="实收金额" prop="volume" />
<el-table-column label="应收金额" prop="totalAmount" />
<!-- <el-table-column label="总金额美元" align="center" prop="totalAmount">
<template slot-scope="{row}">
{{row.totalAmount}}({{row.exchangeRate}})
</template>
</el-table-column>
<el-table-column label="总金额RMB" align="center" prop="totalAmount">
<template slot-scope="{row}">
{{row.totalAmount}}({{row.exchangeRate}})
</template>
</el-table-column>
<el-table-column label="实收金额" prop="volume" /> -->
<el-table-column label="付款人">
<template slot-scope="scope">
<span>{{srope.row.consigneeVO.name}}(收货人)</span>
<span>{{srope.row.consigneeName}}(收货人)</span>
</template>
</el-table-column>
<el-table-column label="付款状态" prop="worth">
......@@ -93,7 +104,12 @@
</template>
</el-table-column>
</el-table>
<el-table v-if="orderExceptionData.orderExceptionType==9||orderExceptionData.orderExceptionType==10||orderExceptionData.orderExceptionType==11" v-loading="loading" border :data="orderData.orderItemVOList">
<el-table v-if="orderExceptionData.orderExceptionType=='order_doc_exception'||orderExceptionData.orderExceptionType=='order_consignor_exception'||orderExceptionData.orderExceptionType=='order_other_exception'" v-loading="loading" border :data="orderData.orderItemVOList">
<el-table-column label="序号" align="center" prop="id" type="index">
<template slot-scope="scope">
<span>{{scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="中文名" align="center" prop="prodTitleZh" />
<el-table-column label="英文名" align="center" prop="prodTitleEn" />
<el-table-column label="品牌" align="center" prop="brand" />
......@@ -109,53 +125,103 @@
<el-table-column label="货值" prop="worth" />
</el-table>
<el-form :model="handlerParams" ref="queryForms" size="small" :inline="true" label-width="120px" class="card">
<el-row v-if="orderExceptionData.orderExceptionType==3">
<el-form-item label="应付金额:">
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'">
<el-form-item label="订单总金额:">
{{orderData.totalMoney}}
</el-form-item>
</el-row>
<el-row v-if="orderExceptionData.orderExceptionType==3">
<el-form-item label="核销金额:">
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'">
<el-form-item label="应付预付金额:">
{{orderData.totalMoney}}
</el-form-item>
</el-row>
<el-row v-if="orderExceptionData.orderExceptionType==3">
<el-form-item label="核销比例:">
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'">
<el-col :span="6">
<el-form-item label="已核销预付金额:">
{{orderData.totalMoney}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="已核销预付金额占总金额比例:" label-width="200px">
{{orderData.totalMoney}}
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="处理结果:" >
<el-select v-model="handlerParams.orderExceptionHandlerResult">
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'" >
<el-col :span="6">
<el-form-item label="预付商品货值:">
{{orderData.totalMoney}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="预付商品货值占佣金额比例:" label-width="200px">
{{orderData.totalMoney}}
</el-form-item>
</el-col>
</el-row>
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'">
<el-form-item label="预付商品方数:">
{{orderData.totalMoney}}
</el-form-item>
</el-row>
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'">
<el-col :span="6">
<el-form-item label="订单总方数:">
{{orderData.totalMoney}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="预付商品方数占总方数比例:" label-width="200px">
{{orderData.totalMoney}}
</el-form-item>
</el-col>
</el-row>
<el-row :span="8" v-if="orderExceptionData.orderExceptionType=='order_doc_exception'">
<el-form-item label="报关资料:" size="medium">
<file-upload v-model="handlerParams.fileList" :value="orderExceptionData.file" ></file-upload>
</el-form-item>
</el-row>
<el-row v-if="orderExceptionData.orderExceptionType!='order_miss_exception'&&orderExceptionData.orderExceptionType!='order_superfluous_goods_exception'&&orderExceptionData.orderExceptionType!='order_in_water_exception'&&orderExceptionData.orderExceptionType!='order_damage_exception'">
<el-form-item label="*处理结果:" >
<el-select v-model="handlerParams.orderExceptionHandlerResult" placeholder="请选择">
<el-option v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
</el-row>
<el-row :span="8">
<el-form-item label="备注:" size="medium">
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" />
<el-row :span="8" v-if="orderExceptionData.orderExceptionType=='order_pick_up_exception'&&handlerParams.orderExceptionHandlerResult=='cost_required'">
<el-form-item label="送货费用:" size="medium">
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" />
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;">
<el-option v-for="dict in getDictDatas('shipping_price_unit')"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
</el-row>
<el-row :span="8" v-if="orderExceptionData.orderExceptionType==9">
<el-form-item label="报关资料:" size="medium">
<file-upload v-model="handlerParams.fileList" :value="orderExceptionData.file" ></file-upload>
<el-row :span="8" v-if="orderExceptionData.orderExceptionType!='order_lack_box_exception'&&orderExceptionData.orderExceptionType!='order_miss_exception'&&orderExceptionData.orderExceptionType!='order_superfluous_goods_exception'&&orderExceptionData.orderExceptionType!='order_in_water_exception'&&orderExceptionData.orderExceptionType!='order_damage_exception'&&orderExceptionData.orderExceptionType!='order_other_exception'&&orderExceptionData.orderExceptionType!='order_lack_box_exception'">
<el-form-item label="备注:" size="medium">
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" />
</el-form-item>
</el-row>
<div v-if="orderExceptionData.orderExceptionType==4||orderExceptionData.orderExceptionType==5||orderExceptionData.orderExceptionType==6||orderExceptionData.orderExceptionType==7">
<el-row >
<div v-if="orderExceptionData.orderExceptionType=='order_miss_exception'||orderExceptionData.orderExceptionType=='order_superfluous_goods_exception'||orderExceptionData.orderExceptionType=='order_in_water_exception'||orderExceptionData.orderExceptionType=='order_damage_exception'">
<el-row>
<el-form-item label="详细内容:">
{{orderExceptionData.content}}
{{orderExceptionData.orderExceptionDetails||'无'}}
</el-form-item>
</el-row>
<el-row >
<el-form-item label="状态:">
<dict-selector :type="DICT_TYPE.ORDER_ERROR_TYPE" v-model="handlerParams.orderExceptionStatus" />
<el-radio v-model="handlerParams.orderExceptionStatus" label="1">处理中</el-radio>
<el-radio v-model="handlerParams.orderExceptionStatus" label="2">已处理</el-radio>
</el-form-item>
</el-row>
<el-row >
<el-row>
<el-form-item label="*查明原因:">
{{orderExceptionData.content}}
<el-select v-model="handlerParams.orderExceptionHandlerResult">
<el-option v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
</el-row>
</div>
......@@ -166,7 +232,7 @@
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button plain type="primary" @click="$router.back()">取消</el-button>
</div>
<el-button v-if="orderExceptionData.orderExceptionStatus==3" type="primary" @click="submitForm">转交</el-button>
<el-button v-if="orderExceptionData.orderExceptionStatus=='order_pay_exception'" type="primary" @click="submitForm">转交</el-button>
</div>
</div>
</template>
......@@ -176,6 +242,7 @@
import {getDictData, getDictDatas} from '@/utils/dict'
import {getOrder} from '@/api/ecw/order'
import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById} from "@/api/ecw/orderException"
import {getFirstReceivableListByOrderId} from '@/api/ecw/financial'
export default {
name: "PrepayDeal",
......@@ -194,13 +261,15 @@
orderId:0,
orderExceptionId:0,
handlerParams:{
orderExceptionId:0
orderExceptionId:0,
orderExceptionStatus:"1"
},
shopData:{},
//发货/收货人信息
consigneeData:[],
routerList:[],
multipleSelection:[],
preException:[]
};
},
created() {
......@@ -217,13 +286,16 @@
that.loading = true;
getExceptionById(that.orderExceptionId).then(response => {
that.orderExceptionData = response.data;
that.handlerParams.orderExceptionStatus = response.data.orderExceptionStatus
// that.orderExceptionData.orderExceptionType = 'order_other_exception'
// that.orderExceptionData.orderExceptionType = 'order_pick_up_exception'
that.orderExceptionData.orderExceptionType = 'order_pay_exception'
that.loading = false;
that.orderId = response.data.orderId
that.getOrderData()
if(response.data.hasOwnProperty('orderItemId')){
that.getShopData(response.data.orderItemId)
}
that.getPreExceptionData()
});
},
getOrderData(){
......@@ -231,6 +303,18 @@
this.orderData = response.data
});
},
getPreExceptionData(){
getFirstReceivableListByOrderId({id:this.orderId}).then(response => {
this.preException = response.data
this.preException.forEach(item=>{
var curr = getDictData('shipping_price_unit', item.currencyId)
if(curr.label == '美元'){
item.doller = item.totalAmount
}
})
});
},
getShopData(id){
getOrderItemById(id).then(res=>{
this.shopData = res.data
......@@ -247,7 +331,9 @@
return ''
},
submitForm(){
console.log(this.handlerParams)
if(!this.handlerParams.orderExceptionHandlerResult){
this.$modal.msgError("请选择处理结果");
}
handlerExceptionByExceptionId(this.handlerParams).then(res=>{
this.$modal.msgSuccess("提交成功");
this.$router.back()
......@@ -256,7 +342,7 @@
/** 跟进按钮操作 */
handleAdd() {
this.$router.push({
path: "/financial/creatCollection",
path: "/financial/creatCollection?receiptId=0",
query:{
orderId:this.orderId,
}
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-card>
<div slot="header" class="card-title">修改佣金规则-{{form.orderNo||''}}</div>
<el-form :model="form" ref="queryForms" label-width="120px" class="card">
<el-form-item label="商品类型">
<span>{{form.prodType }}</span>
</el-form-item>
<el-form-item label="商品名称">
<span>{{ form.prodTitleZh }}</span>
</el-form-item>
<el-form-item label="英文名称">
<span>{{ form.prodTitleEn }}</span>
</el-form-item>
<el-form-item label="线路">
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${form.startTitleZh}】发往【${form.destTitleZh}】`}}
</el-form-item>
<el-form-item label="运费:" >
<span>{{ form.orgFreight }} {{ currentMap[form.orgFreightCurrency] }}</span>
</el-form-item>
<el-form-item label="清关费:">
<span>{{ form.orgClearanceFreight }} {{ currentMap[form.orgClearanceFreightCurrency] }}</span>
</el-form-item>
<el-form-item label="佣金类型:">
<el-radio v-model="form.commissionType" v-for="dict in getDictDatas('commission_type')"
:key="dict.value" :label="dict.label" :value="dict.value">
</el-radio>
</el-form-item>
<el-form-item v-if="form.commissionType==3" label="暗佣佣金:">
<el-input style="width: 100px;" type="text" v-model="form.lightCommissionAmount" />
<el-select v-model="form.commissionCurrencyId" style="width: 100px;margin-left: 10px;">
<el-option v-for="dict in getDictDatas('shipping_price_unit')"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
<el-select v-model="form.commissionCurrencyId" style="width: 100px;margin-left: 10px;">
<el-option v-for="dict in unitType"
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item >
<el-form-item v-if="form.commissionType==1||form.commissionType==3" label="明佣佣金:">
<el-input style="width: 100px;" type="text" v-model="form.lightCommissionAmount" />
<el-select v-model="form.commissionCurrencyId" style="width: 100px;margin-left: 10px;">
<el-option v-for="dict in getDictDatas('shipping_price_unit')"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
<el-select v-model="form.commissionCurrencyId" style="width: 100px;margin-left: 10px;">
<el-option v-for="dict in unitType"
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item >
<el-form-item v-if="form.commissionType==1" label="商品:">
<span>{{form.prodTitleZh }}</span>
<span>销售价:{{11}}美元/千克</span>
<span v-if="form.commissionType==3">成本价:190美元/千克</span>
<span v-if="form.commissionType==2" style="color: #1E98D7;" @click="$router.phsh(`/customer/customerCommission`)">去设置</span>
<span v-if="form.commissionType==3">实际佣金返点:40美元/千克</span>
</el-form-item>
<el-form-item label="审核状态:">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus"></dict-tag>
</el-form-item>
</el-form>
</el-card>
<div slot="header" class="card-title">审批流程</div>
<work-flow xmlkey="commission_config" v-model="selectedUsers" style="margin-top: 20px;"></work-flow>
<div slot="footer" class="card footer_btn">
<el-button type="primary" v-if="form.applyStatus==0" @click="submitForm">提交</el-button>
<el-button plain type="primary" v-if="form.applyStatus==0" @click="$router.back()">取消</el-button>
<el-button v-if="form.applyStatus==1" type="primary" disabled>审核中</el-button>
<el-button v-if="form.applyStatus==1" plain type="primary" @click="dialogVisible = true">取消审核</el-button>
<el-button v-if="form.applyStatus==1" plain type="primary" @click="$router.back()">返回</el-button>
</div>
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="30%">
<span class="cancel_notice">特价申请正在审核中,你确定取消特价申请吗?</span>
<div class="cancel_content">
<span>取消原因:</span>
<el-input v-model="reason" placeholder="请输入取消原因"></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="cancelSplit"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {getDictData, getDictDatas,DICT_TYPE,getDictDataLabel} from '@/utils/dict'
import WorkFlow from '@/components/WorkFlow'
import {getOrder,getOrderSpecial,createOrderSpecial} from '@/api/ecw/order'
import {getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency'
import { getProductAttrList } from '@/api/ecw/productAttr'
import {getUnitList} from '@/api/ecw/unit'
export default {
name: "specialCommission",
components: {
WorkFlow
},
props: {
orderItemId: [String, Number]
},
data() {
return {
reason:'',
dialogVisible:false,
loading:false,
form:{},
selectedUsers:[],
orderData:{},
channelList:[],
currencyList:[],
productAttrList:[],
unitType:[]
};
},
created() {
if(this.orderItemId){
this.form.orderItemId = this.orderItemId - 0
this.getOrderSpecialData()
}
// this.getOrderData()
// this.getList()
this.getUnitTypeData()
getChannelList().then(res => this.channelList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getProductAttrList().then(res => this.productAttrList = res.data)
},
computed:{
getDictData(){
return (type, value) => getDictData(type, value) || {}
},
getDictDatas(){
return getDictDatas
},
// 根据渠道id显示渠道名
getChannelNameById(){
return channelId => {
const s = this.channelList.find(item => item.channelId == channelId) ?. nameZh
return s ? '' + s + '' : ''
}
},
currentMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = item.titleZh
})
return map
}
},
methods: {
getUnitTypeData () {
getUnitList().then(res => {
if(res.code==0&&res.data&&res.data.length>0){
this.unitType = res.data
}
})
},
getOrderData(){
getOrder(this.queryParams.orderId).then(response => {
this.orderData = response.data
});
},
getProductAttrNameById(id){
return this.productAttrList.find(e => e.id === id)?.attrName || ''
},
/** 查询列表 */
getOrderSpecialData(){
getOrderSpecial(this.form.orderItemId,3).then(r => {
this.form = r.data
})
},
submitForm(){
createOrderSpecial({
applyType: this.form.applyType,
lineId: this.form.lineId,
commissionType: this.form.commissionType,
orderId: this.form.orderId,
orderNo: this.form.orderNo,
orderItemId: this.form.orderItemId,
prodId:this.form.prodId,
ccIds:this.selectedUsers.join(',')
}).then(r => {
this.$message.success(r.msg || '提交成功')
})
},
cancelSplit(){
let that = this
if(!that.reason){
that.$message.error("请输入取消原因");
return
}
cancelApply({orderId:that.queryParams.orderId,reason:that.reason}).then(res=>{
that.$message.success("取消成功");
that.$router.back()
})
},
}
}
</script>
<style>
.card-title{
font-size: 18px;
font-weight: bold;
margin-top: 10px;
}
.card-info{
font-size: 16px;
}
.card{
margin-top: 20px;
}
.btn-header{
width: 90%;
display: flex;
align-items: center;
justify-content: space-between;
margin: 20px 0;
}
.red{
color:#ff3430;
font-size: 15px;
}
.footer_btn{
padding-bottom: 60px;
}
.cancel_notice{
font-size: 16px;
font-weight: 600;
}
.cancel_content{
display: flex;
align-items: center;
padding-top: 20px;
}
.cancel_content span{
width: 100px;
}
</style>
......@@ -79,7 +79,7 @@
label="操作">
<template v-slot="{row}">
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/discount/${row.orderItemId}?orderId=${row.orderId}`)">优惠申请</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']">佣金规则</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/specialCommission/${row.orderItemId}`)">佣金规则</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']">管理折扣</el-button>
</template>
</el-table-column>
......@@ -87,7 +87,7 @@
</el-table>
<div style="text-align: center;margin-top: 80px">
<el-button type="primary">申请重货优惠</el-button>
<el-button type="primary" @click="toweight">申请重货优惠</el-button>
<el-button type="primary">申请泡货优惠</el-button>
<el-button type="primary">关闭窗口</el-button>
</div>
......@@ -152,6 +152,11 @@ export default {
this.order = response.data
})
},
toweight(){
this.$router.push({
path:"/order/specialWeight/"+this.params.orderId,
})
},
getProductNamesByIds(ids){
const result = []
ids.split(',').forEach(e => {
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-card>
<div slot="header" class="card-title">申请泡货优惠-{{queryParams.orderNo||''}}</div>
<el-form :model="queryParams" ref="queryForms" size="small" :inline="true" label-width="120px" class="card">
<el-row >
<el-form-item label="原泡货标准:" label-width="150px">
<span>{{queryParams.orgVWeight}}kg/cbm</span>
</el-form-item>
</el-row>
<el-row :span="8" >
<el-form-item label="* 现泡货申请标准:" size="medium" label-width="150px">
<el-input style="width: 100px;" type="text" v-model="queryParams.vweight" />
<span style="margin-left: 10px;">kg/cbm</span>
</el-form-item>
</el-row>
<el-row :span="8">
<el-form-item label="备注:" size="medium" label-width="150px">
<el-input style="width: 500px;" type="textarea" v-model="queryParams.orderExceptionHandlerRemark" />
</el-form-item>
</el-row>
</el-form>
</el-card>
<work-flow xmlkey="heavy_goods_discount" v-model="selectedUsers" style="margin-top: 20px;"></work-flow>
<div slot="footer" class="card footer_btn">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button plain type="primary" @click="$router.back()">取消</el-button>
<!-- <el-button v-if="orderData.inWarehouseState==207" type="primary" disabled>审核中</el-button> -->
<!-- <el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="dialogVisible = true">取消审核</el-button> -->
<!-- <el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="$router.back()">返回</el-button> -->
</div>
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="30%">
<span class="cancel_notice">申请泡货优惠正在审核中,你确定取消申请泡货优惠吗?</span>
<div class="cancel_content">
<span>取消原因:</span>
<el-input v-model="reason" placeholder="请输入取消原因"></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="cancelSplit">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {getDictData, getDictDatas,DICT_TYPE} from '@/utils/dict'
import WorkFlow from '@/components/WorkFlow'
import {getOrderSpecial,createOrderSpecial} from '@/api/ecw/order'
export default {
name: "specialWeight",
components: {
WorkFlow
},
props: {
orderId: [String, Number]
},
data() {
return {
reason:'',
dialogVisible:false,
loading:false,
queryParams:{
orderId:7,
lang:0
},
selectedUsers:[],
orderData:{},
};
},
created() {
if (this.orderId) {
this.queryParams.orderId = this.orderId
this.getOrderSpecialData()
}
// this.getList()
},
computed:{
getDictData(){
return (type, value) => getDictData(type, value) || {}
},
getDictDatas(){
return getDictDatas
}
},
methods: {
getOrderSpecialData(){
getOrderSpecial(this.queryParams.orderId,5).then(r => {
this.queryParams = r.data
})
},
submitForm(){
createOrderSpecial({
applyType: this.queryParams.applyType,
lineId: this.queryParams.lineId,
vweight: this.queryParams.vweight,
orderId: this.queryParams.orderId,
orderNo: this.queryParams.orderNo,
orderItemId: this.queryParams.orderItemId,
prodId:this.queryParams.prodId,
ccIds:this.selectedUsers.join(',')
}).then(r => {
this.$message.success(r.msg || '提交成功')
})
},
cancelSplit(){
let that = this
if(!that.reason){
that.$message.error("请输入取消原因");
return
}
cancelApply({orderId:that.queryParams.orderId,reason:that.reason}).then(res=>{
that.$message.success("取消成功");
that.$router.back()
})
},
}
}
</script>
<style>
.card-title{
font-size: 18px;
font-weight: bold;
margin-top: 10px;
}
.card-info{
font-size: 16px;
}
.card{
margin-top: 20px;
}
.btn-header{
width: 90%;
display: flex;
align-items: center;
justify-content: space-between;
margin: 20px 0;
}
.red{
color:#ff3430;
font-size: 15px;
}
.footer_btn{
padding-bottom: 60px;
}
.cancel_notice{
font-size: 16px;
font-weight: 600;
}
.cancel_content{
display: flex;
align-items: center;
padding-top: 20px;
}
.cancel_content span{
width: 100px;
}
</style>
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-card>
<div slot="header" class="card-title">申请重货优惠-{{queryParams.orderNo||''}}</div>
<el-form :model="queryParams" ref="queryForms" size="small" :inline="true" label-width="120px" class="card">
<el-row >
<el-form-item label="原重货标准:" label-width="150px">
<span>{{queryParams.orgWVolume}}kg/cbm</span>
</el-form-item>
</el-row>
<el-row :span="8" >
<el-form-item label="* 现重货申请标准:" size="medium" label-width="150px">
<el-input style="width: 100px;" type="text" v-model="queryParams.wvolume" />
<span style="margin-left: 10px;">kg/cbm</span>
</el-form-item>
</el-row>
<el-row :span="8">
<el-form-item label="备注:" size="medium" label-width="150px">
<el-input style="width: 500px;" type="textarea" v-model="queryParams.orderExceptionHandlerRemark" />
</el-form-item>
</el-row>
</el-form>
</el-card>
<work-flow xmlkey="heavy_goods_discount" v-model="selectedUsers" style="margin-top: 20px;"></work-flow>
<div slot="footer" class="card footer_btn">
<el-button type="primary" v-if="queryParams.applyStatus==0" @click="submitForm">提交</el-button>
<el-button plain type="primary" v-if="queryParams.applyStatus==0" @click="$router.back()">取消</el-button>
<el-button v-if="queryParams.applyStatus==1" type="primary" disabled>审核中</el-button>
<el-button v-if="queryParams.applyStatus==1" plain type="primary" @click="dialogVisible = true">取消审核</el-button>
<el-button v-if="queryParams.applyStatus==1" plain type="primary" @click="$router.back()">返回</el-button>
</div>
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="30%">
<span class="cancel_notice">申请重货优惠正在审核中,你确定取消申请重货优惠吗?</span>
<div class="cancel_content">
<span>取消原因:</span>
<el-input v-model="reason" placeholder="请输入取消原因"></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="cancelSplit">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {getDictData, getDictDatas,DICT_TYPE} from '@/utils/dict'
import WorkFlow from '@/components/WorkFlow'
import {getOrderSpecial,createOrderSpecial} from '@/api/ecw/order'
export default {
name: "specialWeight",
components: {
WorkFlow
},
props: {
orderId: [String, Number]
},
data() {
return {
reason:'',
dialogVisible:false,
loading:false,
queryParams:{
orderId:7,
lang:0
},
selectedUsers:[],
orderData:{}
};
},
created() {
if (this.orderId) {
this.queryParams.orderId = this.orderId
this.getOrderSpecialData()
}
// this.getList()
},
computed:{
getDictData(){
return (type, value) => getDictData(type, value) || {}
},
getDictDatas(){
return getDictDatas
}
},
methods: {
/** 查询列表 */
getOrderSpecialData(){
getOrderSpecial(this.queryParams.orderId,'4').then(r => {
this.queryParams = r.data
})
},
submitForm(){
createOrderSpecial({
applyType: this.queryParams.applyType,
lineId: this.queryParams.lineId,
wvolume: this.queryParams.wvolume,
orderId: this.queryParams.orderId,
orderNo: this.queryParams.orderNo,
orderItemId: this.queryParams.orderItemId,
prodId:this.queryParams.prodId,
ccIds:this.selectedUsers.join(',')
}).then(r => {
this.$message.success(r.msg || '提交成功')
})
},
cancelSplit(){
let that = this
if(!that.reason){
that.$message.error("请输入取消原因");
return
}
cancelApply({orderId:that.queryParams.orderId,reason:that.reason}).then(res=>{
that.$message.success("取消成功");
that.$router.back()
})
},
}
}
</script>
<style>
.card-title{
font-size: 18px;
font-weight: bold;
margin-top: 10px;
}
.card-info{
font-size: 16px;
}
.card{
margin-top: 20px;
}
.btn-header{
width: 90%;
display: flex;
align-items: center;
justify-content: space-between;
margin: 20px 0;
}
.red{
color:#ff3430;
font-size: 15px;
}
.footer_btn{
padding-bottom: 60px;
}
.cancel_notice{
font-size: 16px;
font-weight: 600;
}
.cancel_content{
display: flex;
align-items: center;
padding-top: 20px;
}
.cancel_content span{
width: 100px;
}
</style>
<template>
<div>
<el-dialog
title="入仓-货物入仓"
:visible.sync="opened"
width="960px"
>
<el-tabs v-model="activeName" type="card" @tab-click="handleTabs">
<el-tab-pane label="货物入仓" name="first">
<el-descriptions border :column="2">
<el-descriptions-item label="中文品名">{{ warehousing.prodTitleZh }}</el-descriptions-item>
<el-descriptions-item label="英文品名">{{ warehousing.prodTitleEn }}</el-descriptions-item>
......@@ -110,7 +111,116 @@
</el-table-column>
</el-table>
</el-card>
</el-tab-pane>
<el-tab-pane label="添加新品名" name="second">
<el-descriptions border :column="2">
<el-descriptions-item label="中文品名">
<product-selector v-model="form1.prodId" @change="onProductChange"/>
</el-descriptions-item>
<el-descriptions-item label="英文品名">
<product-selector lang="En" v-model="form1.prodId" @change="onProductChange"/>
</el-descriptions-item>
<el-descriptions-item label="品牌">
<span v-if="warehousing.orderWarehouseInBackItemDoList && warehousing.orderWarehouseInBackItemDoList.length">{{ form1.brand ? brand1 : '无' }}</span>
<el-select
v-else v-model="form1.brand"
placeholder="可修改"
filterable
@change="handleBrandChange"
allow-create>
<el-option
v-for="item in brandList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-descriptions-item>
<el-descriptions-item label="是否备案">{{ isBeian1 }}</el-descriptions-item>
<el-descriptions-item label="收费模式">{{ feeType1 }}</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">
<el-form-item label="材质">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form1.material"></dict-selector>
</el-form-item>
<el-form-item label="入仓时间">
<el-date-picker v-model="form1.inTime" type="datetime" placeholder="请选择入仓时间" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>入仓记录</span>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete(1)"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd(1)"></el-button>
</div>
<el-table
:data="tableData1"
style="width: 100%">
<el-table-column label="箱数">
<template v-slot="{r,c,$index}">
<span v-if="tableData1[$index].id">{{ tableData1[$index].cartonsNum }}</span>
<el-input v-else v-model="tableData1[$index].cartonsNum" placeholder=""></el-input>
<span>{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGE_TYPE, tableData1[$index].unit) }}</span>
</template>
</el-table-column>
<el-table-column label="包装类型">
<template v-slot="{r,c,$index}">
<span v-if="tableData1[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGE_TYPE, tableData1[$index].unit) }}</span>
<dict-selector v-else :type="DICT_TYPE.ECW_PACKAGE_TYPE" v-model="tableData1[$index].unit"></dict-selector>
</template>
</el-table-column>
<el-table-column label="长(cm)">
<template v-slot="{r,c,$index}">
<span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[0] : '' }}</span>
<el-input v-else v-model.number="tableData1[$index].boxGauge1" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<template v-slot="{r,c,$index}">
<span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[1] : '' }}</span>
<el-input v-else v-model.number="tableData1[$index].boxGauge2" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</template>
</el-table-column>
<el-table-column label="高(cm)">
<template v-slot="{r,c,$index}">
<span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[2] : '' }}</span>
<el-input v-else v-model.number="tableData1[$index].boxGauge3" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</template>
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot="{r,c,$index}">
<span v-if="tableData1[$index].id">{{ tableData1[$index].volume }}</span>
<el-input v-else v-model.number="tableData1[$index].volume" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot="{r,c,$index}">
<span v-if="tableData1[$index].id">{{ tableData1[$index].weight }}</span>
<el-input v-else v-model.number="tableData1[$index].weight" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="数量" width="130px">
<template v-slot="{r,c,$index}">
<span v-if="tableData1[$index].id">{{ tableData1[$index].quantityAll }}</span>
<el-input v-else v-model.number="tableData1[$index].quantityAll" placeholder="">
<template slot="append"></template>
</el-input>
</template>
</el-table-column>
<el-table-column label="快递单号">
<template v-slot="{r,c,$index}">
<span v-if="tableData1[$index].id">{{ tableData1[$index].expressNo }}</span>
<el-input v-else v-model="tableData1[$index].expressNo" placeholder=""></el-input>
</template>
</el-table-column>
</el-table>
</el-card>
</el-tab-pane>
</el-tabs>
<div v-if="edit">
<h2>审批流程</h2>
......@@ -133,13 +243,15 @@ import { orderWarehouseIn, orderWarehouseInUpdateApply } from '@/api/ecw/order'
import { getFeeTypeByCustomerProduct, getProductBrankPage } from '@/api/ecw/productBrank'
import WorkFlow from "@/components/WorkFlow"
import elSelect from '@/components/render/slots/el-select'
import ProductSelector from "@/components/ProductSelector"
export default {
name: 'editDialog',
components: {
dictSelector,
WorkFlow
WorkFlow,
ProductSelector
},
props: {
......@@ -216,9 +328,29 @@ export default {
feeType: 0,
recordMode: undefined
},
form1: {
"brand": "",
"brandType": 0,
"inTime": "",
"material": "",
"orderId": 0,
"orderItemId": 0,
"orderNo": "",
"orderWarehouseInItemDoList": [],
"prodAttrIds": "",
"prodId": 0,
"prodTitleEn": "",
"prodTitleZh": "",
"prodType": 0,
"type": 1,
feeType: 0,
recordMode: undefined
},
// orderItem: {},
selectedUsers: undefined
selectedUsers: undefined,
activeName: 'first'
};
},
......@@ -245,6 +377,12 @@ export default {
},
methods: {
onProductChange(product){
console.log(product)
this.form1.prodTitleZh = product.titleZh
this.form1.prodTitleEn = product.titleEn
},
handleTabs(){},
handleBrandChange(v){
getFeeTypeByCustomerProduct({
brandId: parseInt(v),
......@@ -252,17 +390,17 @@ export default {
customerId: this.customerId
}).then(r => {
if(r.code === 0){
this.form.feeType = parseInt(r.data.feeType)
this.form.recordMode = parseInt(r.data.recordMode)
(this.activeName === "first" ? this.form : this.form1).feeType = parseInt(r.data.feeType);
(this.activeName === "first" ? this.form : this.form1).recordMode = parseInt(r.data.recordMode)
}
})
},
handleVolume(index){
const {boxGauge1, boxGauge2, boxGauge3} = this.tableData[index]
handleVolume(index, val){
const {boxGauge1, boxGauge2, boxGauge3} = (val === 1 ? this.tableData1 : this.tableData)[index]
if (boxGauge1 && boxGauge2 && boxGauge3) {
this.tableData[index].volume = ((boxGauge1 * boxGauge2 * boxGauge3) / 1000000).toFixed(2)
(val === 1 ? this.tableData1 : this.tableData)[index].volume = ((boxGauge1 * boxGauge2 * boxGauge3) / 1000000).toFixed(2)
} else {
this.tableData[index].volume = 0
(val === 1 ? this.tableData1 : this.tableData)[index].volume = 0
}
},
handleSubmit() {
......@@ -275,7 +413,29 @@ export default {
}
})
]
if (this.edit)
if (this.activeName !== "first"){
return orderWarehouseIn({
...this.form1,
brandType: this.form1.brand ? 1 : 0,
orderId: this.warehousing.orderId,
orderItemId: undefined,
orderNo: this.warehousing.orderNo,
orderWarehouseInItemDoList: this.form1.orderWarehouseInItemDoList.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3
}
})
}).then(r => {
if (r.data){
this.$message.success('新增入仓成功')
this.handleClose()
}else {
this.$message.success('新增入仓失败')
}
})
}
else if (this.edit)
return orderWarehouseInUpdateApply({
...this.form,
brandType: this.form.brand ? 1 : 0,
......@@ -313,18 +473,18 @@ export default {
this.form.orderWarehouseInItemDoList = []
this.opened = false
},
handleDelete() {
this.form.orderWarehouseInItemDoList.pop()
handleDelete(val) {
(val === 1 ? this.form1 : this.form).orderWarehouseInItemDoList.pop()
},
handleAdd() {
this.form.orderWarehouseInItemDoList.push({
handleAdd(val) {
(val === 1 ? this.form1 : this.form).orderWarehouseInItemDoList.push({
"boxGauge1": "",
"boxGauge2": "",
"boxGauge3": "",
"cartonsNum": "",
"expressNo": "",
"quantityAll": "",
"unit": "",
"unit": "package",
"volume": '',
"weight": ''
})
......@@ -335,9 +495,15 @@ export default {
brandObject(){
return this.brandList.find(e => e.id === this.form.brand) || ''
},
brandObject1(){
return this.brandList.find(e => e.id === this.form1.brand) || ''
},
tableData() {
return [...this.warehousing.orderWarehouseInBackItemDoList, ...this.form.orderWarehouseInItemDoList]
},
tableData1() {
return this.form1.orderWarehouseInItemDoList
},
isBeian(){
if (this.form.recordMode !== undefined){
return ['无备案', '有备案', '中性'][this.form.recordMode]
......@@ -348,18 +514,34 @@ export default {
return ''
}
},
isBeian1(){
if (this.form1.recordMode !== undefined){
return ['无备案', '有备案', '中性'][this.form1.recordMode]
}
if (this.brandObject1.filing){
return ['无备案', '有备案', '中性'][this.brandObject1.filing]
} else {
return ''
}
},
/**
* 收费模式
* @returns {string}
* @returns {string} 无牌价0,有牌价1,中性品牌价2
*/
feeType(){
// 无牌价0,有牌价1,中性品牌价2
const feeType = parseInt(this.form.feeType)
if (feeType >= 0 && feeType < 3) {
return ['无牌价', '有牌价', '中性品牌价'][feeType]
}
return ''
},
feeType1(){
const feeType = parseInt(this.form1.feeType)
if (feeType >= 0 && feeType < 3) {
return ['无牌价', '有牌价', '中性品牌价'][feeType]
}
return ''
},
brand(){
if (!!this.form.brand){
const brand = this.brandList.find(e => e.id === this.form.brand)
......@@ -368,6 +550,15 @@ export default {
}
}
return ''
},
brand1(){
if (!!this.form1.brand){
const brand = this.brandList.find(e => e.id === this.form1.brand)
if (brand) {
return brand.titleZh
}
}
return ''
}
}
}
......
......@@ -14,16 +14,16 @@
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="orderData.status" />
</el-descriptions-item>
<el-descriptions-item label="送货日期">
<span v-if="orderData">{{orderData.status>=5?(orderData.orderItemVOList.length>0?orderData.orderItemVOList[0].warehouseInInfoVO.inTime:''):(orderData.consigneeVO?orderData.consigneeVO.deliveryDate:'')}}</span>
<span>{{orderData.deliveryDate||''}}</span>
</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
</el-descriptions-item>
<el-descriptions-item label="始发地">
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.startTitleZh:''}}
<el-descriptions-item label="始发地" :span="2">
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.startAddressZh:''}}
</el-descriptions-item>
<el-descriptions-item label="目的地">
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.destTitleZh:''}}
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.destAddressZh:''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4">
......@@ -76,16 +76,21 @@
<template slot-scope="scope">
<span>规格:{{scope.row.boxGauge||0}}</span>
<p>
<span>品牌:<dict-tag :value="scope.row.brand" :type="DICT_TYPE.ECW_IS_BRAND" /></span>
<span>箱数:{{scope.row.num||0}}</span>
<span>体积:{{scope.row.volume||0}}CBM</span>
<span>重量:{{scope.row.weight||0}}KG</span>
<span>品牌:<dict-tag :value="scope.row.brandType" :type="DICT_TYPE.ECW_IS_BRAND" /></span>
<span>箱数:{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.cartonsNum:0}}</span>
<span>体积:{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.volume:0}}CBM</span>
<span>重量:{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.weight:0}}KG</span>
</p>
</template>
</el-table-column>
<el-table-column label="重货方数" align="center" >
<el-table-column label="重货方数" align="center" v-if="type=='order_heavy_cargo_exception'">
<template slot-scope="scope">
<span>{{scope.row.ss||0}}CBM</span>
<span>{{ scope.row.warehouseInInfoVO?(scope.row.warehouseInInfoVO.heavyNumber||0):0}}CBM</span>
</template>
</el-table-column>
<el-table-column label="泡货方数" align="center" v-else >
<template slot-scope="scope">
<span>{{ scope.row.warehouseInInfoVO?(scope.row.warehouseInInfoVO.lightNumber||0):0}}CBM</span>
</template>
</el-table-column>
<el-table-column label="最后操作时间" scope="handlerTime" />
......@@ -119,13 +124,16 @@ export default {
orderData:{},
list: {},
orderId:0,
type:''
};
},
created() {
if(this.$route.query.id){
this.id = this.$route.query.id
this.getList()
}
if(this.$route.query.type){
this.type = this.$route.query.type
}
},
methods: {
......
......@@ -94,8 +94,10 @@
<el-table-column
prop="startTime"
width="200px"
:formatter="(row) => parseTime(row.startTime, '{y}-{m}-{d}') + ' - ' + parseTime(row.endTime, '{y}-{m}-{d}')"
label="授权时间">
<template v-slot="{row}">
<span>{{row.startTime?(parseTime(row.startTime, '{y}-{m}-{d}') + ' - ' + parseTime(row.endTime, '{y}-{m}-{d}')):'永久'}}</span>
</template>
</el-table-column>
<el-table-column
prop="feeScale"
......
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