Commit 37165ac9 authored by 我在何方's avatar 我在何方
parents b7744091 325c8c1c
...@@ -155,3 +155,11 @@ export function userMemberUserList(){ ...@@ -155,3 +155,11 @@ export function userMemberUserList(){
method:'get' method:'get'
}) })
} }
//查看某客户授权的品牌
export function getBrankByCustomer(data){
return request({
url:'/ecw/product-brank/getBrankByCustomer',
method:'post',
data,
})
}
...@@ -326,3 +326,29 @@ export function getApproval(id){ ...@@ -326,3 +326,29 @@ export function getApproval(id){
method:'get' method:'get'
}) })
} }
// 特价申请
export function createOrderSpecial(data) {
return request({
url: '/ecw/order/special/apply',
method: 'put',
data: data
})
}
// 获得订单特价申请详情
export function getOrderSpecial(offerProdId, type = 1) {
return request({
url: '/ecw/order/special/info/' + offerProdId + '/' + type,
method: 'get'
})
}
// 根据订单项商品ID与审批类型获得订单商品的特价申请详情
export function getOrderSpecialByApproveId(approveId) {
return request({
url: '/ecw/order/special/info?approveId=' + approveId,
method: 'get'
})
}
...@@ -43,3 +43,53 @@ export function getRleaseInfo(orderId){ ...@@ -43,3 +43,53 @@ export function getRleaseInfo(orderId){
method:'get' method:'get'
}) })
} }
// 获得控货订单放货详情
export function getPickRleaseInfo(orderId){
return request({
url:'/ecw/order-cargo-control-pick/release/info/' + orderId,
method:'get'
})
}
// 放货修改与反复核申请
export function updateApply(data){
return request({
url: '/ecw/order-cargo-control-pick/update/apply',
method: 'put',
data
})
}
// 复核(放货复核)
export function review(id){
return request({
url: '/ecw/order-cargo-control-pick/review/' + id,
method: 'put'
})
}
// 取消放货
export function cancel(id){
return request({
url: '/ecw/order-cargo-control-pick/cancel/' + id,
method: 'put'
})
}
// 取消审批
export function cancelApproval(approvalId, params){
return request({
url: '/ecw/order-cargo-control-pick/cancel/approval/' + approvalId,
method: 'get',
params
})
}
// 订单复核
export function orderReview(orderId){
return request({
url: '/ecw/order-cargo-control/review/' + orderId,
method: 'put'
})
}
...@@ -119,3 +119,12 @@ export function deleteSplitItem(id) { ...@@ -119,3 +119,12 @@ export function deleteSplitItem(id) {
method: 'delete' method: 'delete'
}) })
} }
// 根据合并编号获得订单信息、已合单列表和待合单列表
export function getMergeListByMergeId(params){
return request({
url: '/order/merge/getMergeListByMergeId',
method: 'get',
params
})
}
\ No newline at end of file
...@@ -49,6 +49,9 @@ export default { ...@@ -49,6 +49,9 @@ export default {
return this.list.map(item => { return this.list.map(item => {
item.label = item.contactsName item.label = item.contactsName
let more = [] let more = []
if(item.customerName){
more.push(item.customerName)
}
if(item.phoneNew){ if(item.phoneNew){
more.push(item.phoneNew) more.push(item.phoneNew)
} }
......
...@@ -289,6 +289,20 @@ export const constantRoutes = [ ...@@ -289,6 +289,20 @@ export const constantRoutes = [
hidden: true, hidden: true,
redirect: 'noredirect', redirect: 'noredirect',
children: [ children: [
{
path: 'special/:orderId(\\d+)',
component: (resolve) => import('@/views/ecw/order/special'),
props: true,
name: 'order-special',
meta: {title: '订单特价申请', icon: '', activeMenu: '/order/index'}
},
{
path: 'discount/:offerProdId(\\d+)',
component: (resolve) => import('@/views/ecw/order/special/discount'),
props: true,
name: 'discount',
meta: {title: '订单优惠申请', icon: '', activeMenu: '/order/index'}
},
{ {
path: 'associated-order/:orderId(\\d+)', path: 'associated-order/:orderId(\\d+)',
component: (resolve) => require(['@/views/ecw/order/associatedOrder'],resolve), component: (resolve) => require(['@/views/ecw/order/associatedOrder'],resolve),
......
...@@ -106,6 +106,8 @@ export const DICT_TYPE = { ...@@ -106,6 +106,8 @@ export const DICT_TYPE = {
ECW_PAYMENT_STATE: 'payment_state',//付款单状态 ECW_PAYMENT_STATE: 'payment_state',//付款单状态
ECW_INVOICING_TYPE: 'invoicing_type', ECW_INVOICING_TYPE: 'invoicing_type',
ECW_PRICE_TYPE: 'price_type', ECW_PRICE_TYPE: 'price_type',
ECW_RELEASE_STATUS: 'release_status', // 放货状态
ECW_PICK_RECURRENT_NUCLEAR_TYPE: 'PICK_RECURRENT_NUCLEAR_TYPE', // 放货反复核类型
//--------ecw--------- //--------ecw---------
CUSTOMER_STATUS: 'customer_status', CUSTOMER_STATUS: 'customer_status',
CUSTOMER_SOURCE: 'customer_source', CUSTOMER_SOURCE: 'customer_source',
......
...@@ -135,6 +135,7 @@ import specialDiscount from "@/views/ecw/offer/specialDiscount" ...@@ -135,6 +135,7 @@ import specialDiscount from "@/views/ecw/offer/specialDiscount"
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails"; import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
import shippingDetail from '@/views/ecw/box/shippingDetail' import shippingDetail from '@/views/ecw/box/shippingDetail'
import SplitDetail from '@/views/ecw/order/components/SplitDetail' import SplitDetail from '@/views/ecw/order/components/SplitDetail'
import MergeDetail from '@/views/ecw/order/components/MergeDetail'
// 流程实例的详情页,可用于审批 // 流程实例的详情页,可用于审批
export default { export default {
...@@ -144,7 +145,8 @@ export default { ...@@ -144,7 +145,8 @@ export default {
specialDiscount, specialDiscount,
warehouseDetails, warehouseDetails,
shippingDetail, shippingDetail,
SplitDetail SplitDetail,
MergeDetail
}, },
computed:{ computed:{
matterNum(){ matterNum(){
...@@ -240,7 +242,11 @@ export default { ...@@ -240,7 +242,11 @@ export default {
processId: this.processInstance.businessKey, processId: this.processInstance.businessKey,
}, },
split_detail: { split_detail: {
component: "splitDetail", component: "SplitDetail",
id: this.processInstance.businessKey,
},
merge_detail: {
component: "MergeDetail",
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
} }
} }
......
...@@ -120,6 +120,7 @@ ...@@ -120,6 +120,7 @@
<el-dropdown-item command="error">异常登记</el-dropdown-item> <el-dropdown-item command="error">异常登记</el-dropdown-item>
<el-dropdown-item command="cost">费用登记</el-dropdown-item> <el-dropdown-item command="cost">费用登记</el-dropdown-item>
<el-dropdown-item command="delete">删除</el-dropdown-item> <el-dropdown-item command="delete">删除</el-dropdown-item>
<el-dropdown-item command="editLadingBill">编辑提货单</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-dropdown trigger="click"> <el-dropdown trigger="click">
...@@ -143,15 +144,18 @@ ...@@ -143,15 +144,18 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList" /> <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="600px" append-to-body class="shippingSea-dialog"> <el-dialog :title="dialogCfg.title" :visible.sync="dialogCfg.open" :width="dialogCfg.width" append-to-body class="shippingSea-dialog">
<template v-if="dialogType === 'edit' || dialogType === 'add'"> <template v-if="dialogCfg.dialogType === 'edit' || dialogCfg.dialogType === 'add'">
<editForm v-if="open" @closeDialog="closeDialog" :shipmentObj="currRow" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" /> <editForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" />
</template> </template>
<template v-if="dialogType === 'cost'"> <template v-if="dialogCfg.dialogType === 'cost'">
<costForm v-if="open" @closeDialog="closeDialog" :shipmentObj="currRow" /> <costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
</template> </template>
<template v-if="dialogType === 'error'"> <template v-if="dialogCfg.dialogType === 'error'">
<regError v-if="open" @closeDialog="closeDialog" :shipmentObj="currRow" /> <regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
</template>
<template v-if="dialogCfg.dialogType === 'editLadingBill'">
<ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
</template> </template>
</el-dialog> </el-dialog>
</div> </div>
...@@ -165,6 +169,7 @@ import { getListTree } from "@/api/ecw/region"; ...@@ -165,6 +169,7 @@ import { getListTree } from "@/api/ecw/region";
import costForm from "./costForm.vue"; import costForm from "./costForm.vue";
import regError from "./regError.vue"; import regError from "./regError.vue";
import editForm from "./editForm.vue"; import editForm from "./editForm.vue";
import ladingBill from "./ladingBill.vue";
export default { export default {
name: "indexSea", name: "indexSea",
...@@ -172,6 +177,7 @@ export default { ...@@ -172,6 +177,7 @@ export default {
costForm, costForm,
regError, regError,
editForm, editForm,
ladingBill,
}, },
data() { data() {
return { return {
...@@ -194,13 +200,16 @@ export default { ...@@ -194,13 +200,16 @@ export default {
// 出货列表 // 出货列表
list: [], list: [],
// 弹出层标题 // 弹出层标题
title: "",
// 弹出类型 // 弹出类型
dialogCfg: {
title: "",
dialogType: "", dialogType: "",
// 当前行 width: "600px",
currRow: {},
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
},
// 当前行
currRow: {},
dateRangeCreateTime: [], dateRangeCreateTime: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {
...@@ -281,18 +290,20 @@ export default { ...@@ -281,18 +290,20 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.open = true; this.$set(this.dialogCfg, "open", true);
this.title = "添加出货"; this.$set(this.dialogCfg, "title", "添加出货");
this.dialogType = "add"; this.$set(this.dialogCfg, "dialogType", "add");
this.$set(this.dialogCfg, "width", "600px");
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
const id = row.id; const id = row.id;
getbox(id).then((response) => { getbox(id).then((response) => {
this.currRow = response.data; this.currRow = response.data;
this.open = true; this.$set(this.dialogCfg, "open", true);
this.title = "修改出货"; this.$set(this.dialogCfg, "title", "修改出货");
this.dialogType = "edit"; this.$set(this.dialogCfg, "dialogType", "edit");
this.$set(this.dialogCfg, "width", "600px");
}); });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
...@@ -330,7 +341,7 @@ export default { ...@@ -330,7 +341,7 @@ export default {
}, },
/* 关闭弹窗 */ /* 关闭弹窗 */
closeDialog(type) { closeDialog(type) {
this.open = false; this.$set(this.dialogCfg, "open", false);
if (type === "add" || type === "edit") { if (type === "add" || type === "edit") {
this.getList(); this.getList();
} }
...@@ -346,22 +357,36 @@ export default { ...@@ -346,22 +357,36 @@ export default {
this.handleUpdate(row); this.handleUpdate(row);
break; break;
case "editLadingBill":
const cabinetLabel = this.getCabinetName(row.cabinetId);
const title = `查看提单 ${row.selfNo} 柜号:${row.cubNo} 柜型:${cabinetLabel}`;
this.$set(this.dialogCfg, "open", true);
this.$set(this.dialogCfg, "title", title);
this.$set(this.dialogCfg, "dialogType", "editLadingBill");
this.$set(this.dialogCfg, "width", "60%");
this.currRow = row;
break;
case "delete": case "delete":
this.handleDelete(row); this.handleDelete(row);
break; break;
case "cost": case "cost":
this.title = "费用登记"; this.$set(this.dialogCfg, "open", true);
this.dialogType = "cost"; this.$set(this.dialogCfg, "title", "费用登记");
this.open = true; this.$set(this.dialogCfg, "dialogType", "cost");
this.$set(this.dialogCfg, "width", "600px");
this.currRow = row; this.currRow = row;
break; break;
case "error": case "error":
this.title = "异常登记"; this.$set(this.dialogCfg, "open", true);
this.dialogType = "error"; this.$set(this.dialogCfg, "title", "异常登记");
this.open = true; this.$set(this.dialogCfg, "dialogType", "error");
this.$set(this.dialogCfg, "width", "600px");
this.currRow = row; this.currRow = row;
break; break;
case "detail": case "detail":
this.$router.push("/boxSea/query/" + row.id); this.$router.push("/boxSea/query/" + row.id);
break; break;
......
<template>
</template>
<script>
export default {
name: "ladingBill",
};
</script>
<style lang="scss" scoped>
</style>
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
<el-button type="primary" @click="showOrder">订单列表</el-button> <el-button type="primary" @click="showOrder">订单列表</el-button>
</el-row> </el-row>
<div v-if="boxBackVO.preInstallInfo && boxBackVO.preInstallInfo.applyReason"> <div v-if="approvalInfo.applyReason">
<p>申请原因</p> <h1>申请原因</h1>
<div> <div>
{{boxBackVO.preInstallInfo.applyReason}} {{approvalInfo.applyReason}}
</div> </div>
</div> </div>
...@@ -110,6 +110,7 @@ export default { ...@@ -110,6 +110,7 @@ export default {
}, },
data() { data() {
return { return {
approvalInfo: {},
boxBackVO: {}, boxBackVO: {},
loadDetail: {}, loadDetail: {},
// 柜型 // 柜型
...@@ -131,6 +132,7 @@ export default { ...@@ -131,6 +132,7 @@ export default {
/* 获取详情 */ /* 获取详情 */
getApprovalDetail(processId) { getApprovalDetail(processId) {
approvalDetail({ approvalId: processId }).then((res) => { approvalDetail({ approvalId: processId }).then((res) => {
this.approvalInfo = res.data.approvalInfo;
this.boxBackVO = res.data.boxBackVO; this.boxBackVO = res.data.boxBackVO;
this.loadDetail = res.data.loadDetail; this.loadDetail = res.data.loadDetail;
}); });
......
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
<!-- 开始装柜 --> <!-- 开始装柜 -->
<el-dialog title="开始装柜" :visible.sync="dialogVisible" fullscreen :modal-append-to-body=false append-to-body> <el-dialog title="开始装柜" :visible.sync="dialogVisible" fullscreen :modal-append-to-body=false append-to-body>
<startPacking v-bind="$attrs" v-if="dialogVisible" /> <startPacking v-bind="$attrs" v-if="dialogVisible" @closeDialog="closeDialog" />
</el-dialog> </el-dialog>
<!-- 操作 --> <!-- 操作 -->
<el-row class="operate-button"> <el-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)">保存</el-button> <el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit(2)">封柜</el-button> <el-button type="success" @click="onSubmit(2)" :disabled="isStartCabinet">封柜</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
<el-button type="danger" @click="startCabinet" :disabled="isStartCabinet">开始装柜</el-button> <el-button type="danger" @click="startCabinet" :disabled="isStartCabinet">开始装柜</el-button>
</el-row> </el-row>
...@@ -99,6 +99,10 @@ export default { ...@@ -99,6 +99,10 @@ export default {
} }
}); });
}, },
closeDialog(type) {
this.dialogVisible = false;
if (type) this.cancel(type);
},
/** 取消 */ /** 取消 */
cancel(type) { cancel(type) {
this.$emit("closeDialog", type); this.$emit("closeDialog", type);
...@@ -112,7 +116,7 @@ export default { ...@@ -112,7 +116,7 @@ export default {
isStartCabinet() { isStartCabinet() {
const { currNode, shipmentObj } = this.$attrs; const { currNode, shipmentObj } = this.$attrs;
const status = shipmentObj[currNode.keyName]; const status = shipmentObj[currNode.keyName];
return status === 46 ? true : false; return status === 47 ? true : false;
}, },
}, },
}; };
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<!-- 表格 --> <!-- 表格 -->
<el-row class="table-content"> <el-row class="table-content">
<el-table :data="tableData.sectionOrderList" border> <el-table :data="tableData.sectionOrderList" border max-height="500px">
<el-table-column label="序号" type="index" align="center" width="50" /> <el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column label="订单号" align="center" prop="orderNo"> <el-table-column label="订单号" align="center" prop="orderNo">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -100,16 +100,27 @@ ...@@ -100,16 +100,27 @@
<p>容量:</p> <p>容量:</p>
<p>{{calcCapacity}}</p> <p>{{calcCapacity}}</p>
</div> </div>
<div>已装 无返回</div> <div>已装 {{getInstallNumCount}}</div>
</el-col> </el-col>
</el-row> </el-row>
<!-- 审核流程 -->
<el-row class="process-area">
<div class="process">
<div>审批流程</div>
<work-flow xmlkey="close_container" v-model="selectedUsers"></work-flow>
</div>
<!-- 操作 --> <!-- 操作 -->
<el-row class="button-area"> <div v-if="!isUnderReview">
<el-button type="primary" @click="handlerClick('supplementOrder','补单')" v-if="!isUnderReview">补单</el-button> <el-button type="primary" @click="handlerClick('supplementOrder','补单')">补单</el-button>
<el-button type="primary" v-if="!isUnderReview" @click="applyCloseCabinet">申请封柜</el-button> <el-button type="primary" @click="applyCloseCabinet">封柜申请</el-button>
<el-button type="primary" @click="handlerClick('modifyCabinet','修改柜信息')" v-if="!isUnderReview">修改柜信息</el-button> <el-button type="primary" @click="handlerClick('modifyCabinet','修改柜信息')">修改柜信息</el-button>
<el-button type="primary" v-if="isUnderReview">封柜审核中</el-button> </div>
<div v-if="isUnderReview">
<el-button type="primary" :disabled=true>封柜审核中</el-button>
<el-button plain type="primary" @click="canclAudit">取消审核</el-button>
<el-button plain type="primary" @click="$emit('closeDialog')">返回</el-button>
</div>
</el-row> </el-row>
<!-- 对话框 --> <!-- 对话框 -->
...@@ -202,6 +213,7 @@ import { ...@@ -202,6 +213,7 @@ import {
remove, remove,
boxUpdate, boxUpdate,
approvalCreate, approvalCreate,
approvalCancel,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import { import {
getTotlContent, getTotlContent,
...@@ -210,6 +222,7 @@ import { ...@@ -210,6 +222,7 @@ import {
sumStatistics, sumStatistics,
} from "../../utils"; } from "../../utils";
import splitOrder from "./splitOrder.vue"; import splitOrder from "./splitOrder.vue";
import WorkFlow from "@/components/WorkFlow";
/** /**
* 开始装柜 * 开始装柜
...@@ -220,6 +233,7 @@ export default { ...@@ -220,6 +233,7 @@ export default {
components: { components: {
supplementOrder, supplementOrder,
splitOrder, splitOrder,
WorkFlow,
}, },
props: { props: {
shipmentObj: Object, shipmentObj: Object,
...@@ -230,10 +244,6 @@ export default { ...@@ -230,10 +244,6 @@ export default {
listData: [], listData: [],
// 表格数据 // 表格数据
tableData: {}, tableData: {},
// 统计数据
sumData: {
count: { num: 0, volume: 0, weight: 0 },
},
// 弹窗配置 // 弹窗配置
dialogConfig: { dialogConfig: {
title: "", title: "",
...@@ -267,6 +277,7 @@ export default { ...@@ -267,6 +277,7 @@ export default {
}, },
// 当前行 // 当前行
currRow: {}, currRow: {},
selectedUsers: [],
}; };
}, },
created() { created() {
...@@ -408,6 +419,7 @@ export default { ...@@ -408,6 +419,7 @@ export default {
params.orderNumCode = this.qrCode; params.orderNumCode = this.qrCode;
singleCreate(params).then((res) => { singleCreate(params).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.qrCode = "";
this.getLoadSecGoodsList(); this.getLoadSecGoodsList();
}); });
}); });
...@@ -415,6 +427,7 @@ export default { ...@@ -415,6 +427,7 @@ export default {
params.orderNo = this.batchObj.qrCode; params.orderNo = this.batchObj.qrCode;
batchCreate(params).then((res) => { batchCreate(params).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.closeDialog();
this.getLoadSecGoodsList(); this.getLoadSecGoodsList();
}); });
}); });
...@@ -431,12 +444,14 @@ export default { ...@@ -431,12 +444,14 @@ export default {
if (type === "single") { if (type === "single") {
singleDelete(params).then((res) => { singleDelete(params).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.closeDialog();
this.getLoadSecGoodsList(); this.getLoadSecGoodsList();
}); });
}); });
} else { } else {
batchDelete(params).then((res) => { batchDelete(params).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.closeDialog();
this.getLoadSecGoodsList(); this.getLoadSecGoodsList();
}); });
}); });
...@@ -474,11 +489,15 @@ export default { ...@@ -474,11 +489,15 @@ export default {
/* 申请封柜 */ /* 申请封柜 */
applyCloseCabinet() { applyCloseCabinet() {
approvalCreate({ approvalCreate({
shipmentId: this.shipmentObj.id, applyReason: "封柜审核",
approvalStatus: 0, approvalStatus: 0,
approvalType: 2, // 封柜 approvalType: 2, // 封柜
copyUserId: this.selectedUsers,
shipmentId: this.shipmentObj.id,
}).then((res) => { }).then((res) => {
serviceMsg(res, this); serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "submit");
});
}); });
}, },
/* 是否显示拆单 */ /* 是否显示拆单 */
...@@ -488,11 +507,17 @@ export default { ...@@ -488,11 +507,17 @@ export default {
} }
return false; return false;
}, },
}, /* 取消审核 */
watch: { canclAudit() {
listData(val) { approvalCancel({
const count = sumStatistics(val); applyReason: "取消审核",
this.$set(this.sumData, "count", count); id: this.shipmentObj["cabinetApprovalInfo"].id,
shipmentId: this.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "submit");
});
});
}, },
}, },
computed: { computed: {
...@@ -517,6 +542,19 @@ export default { ...@@ -517,6 +542,19 @@ export default {
getSumData() { getSumData() {
return sumStatistics(this.listData); return sumStatistics(this.listData);
}, },
/* 已装总数 */
getInstallNumCount() {
let count = 0;
if (Array.isArray(this.listData)) {
this.listData.forEach((item) => {
const { sectionOrderList } = item;
sectionOrderList.forEach((item) => {
count = count + item.installNum;
});
});
}
return count;
},
}, },
}; };
</script> </script>
...@@ -613,8 +651,19 @@ export default { ...@@ -613,8 +651,19 @@ export default {
} }
} }
} }
.button-area {
text-align: center; .process-area {
margin-top: 15px;
padding-bottom: 30px;
.process {
display: flex;
flex-direction: column;
> :first-child {
color: #606266;
font-weight: bolder;
font-size: 16px;
}
}
} }
} }
</style> </style>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<el-form-item label="截关时间"> <el-form-item label="截关时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclarationObj.dcCutOffTime" 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>
<el-form-item label="状态"> <el-form-item label="状态" prop="dcCustomsStatus">
<el-radio-group v-model="cusDeclarationObj.dcCustomsStatus"> <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 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-radio-group>
...@@ -160,6 +160,7 @@ export default { ...@@ -160,6 +160,7 @@ export default {
dcBoxWgt: [{ required: true, message: "必填", trigger: "change" }], dcBoxWgt: [{ required: true, message: "必填", trigger: "change" }],
dcGoodsWgt: [{ required: true, message: "必填", trigger: "change" }], dcGoodsWgt: [{ required: true, message: "必填", trigger: "change" }],
dcCustomsType: [{ required: true, message: "必填", trigger: "change" }], dcCustomsType: [{ required: true, message: "必填", trigger: "change" }],
dcCustomsStatus: [{ required: true, message: "必填", trigger: "change" }],
}, },
// 弹窗配置 // 弹窗配置
dialogConfig: { dialogConfig: {
......
...@@ -268,23 +268,24 @@ ...@@ -268,23 +268,24 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
<el-row>
<el-button type="primary" @click="onSubmit">提交申请</el-button>
</el-row>
</el-row> </el-row>
<!-- 审核流程 --> <!-- 审核流程 -->
<el-row class="process-area" v-show="isAudit"> <el-row class="process-area">
<div class="process"> <div class="process">
<div>审批流程</div> <div>审批流程</div>
<work-flow xmlkey="shipment_preassemble" v-model="selectedUsers"></work-flow> <work-flow xmlkey="shipment_preassemble" v-model="selectedUsers"></work-flow>
</div> </div>
<div> <div v-show="isAudit">
<el-button type="primary" :disabled=true>审核中</el-button> <el-button type="primary" :disabled=true>审核中</el-button>
<el-button plain type="primary" @click="canclAudit">取消审核</el-button> <el-button plain type="primary" @click="canclAudit">取消审核</el-button>
<el-button plain type="primary" @click="closeDialog">返回</el-button> <el-button plain type="primary" @click="closeDialog">返回</el-button>
</div> </div>
<div v-show="!isAudit">
<el-button type="primary" @click="onSubmit">提交申请</el-button>
</div>
</el-row> </el-row>
</div> </div>
</template> </template>
...@@ -447,9 +448,11 @@ export default { ...@@ -447,9 +448,11 @@ export default {
if (valid) { if (valid) {
approvalCreate({ approvalCreate({
...this.operatorData, ...this.operatorData,
shipmentId: this.$attrs.shipmentObj.id, applyReason: "预装审核",
approvalStatus: 0, approvalStatus: 0,
approvalType: 1, // 预装 approvalType: 1, // 预装
copyUserId: this.selectedUsers,
shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "submit"); this.$emit("closeDialog", "submit");
...@@ -599,9 +602,9 @@ export default { ...@@ -599,9 +602,9 @@ export default {
const { currNode, shipmentObj } = this.$attrs; const { currNode, shipmentObj } = this.$attrs;
const { voName } = currNode; const { voName } = currNode;
approvalCancel({ approvalCancel({
applyReason: "取消审核",
id: shipmentObj[voName].id, id: shipmentObj[voName].id,
shipmentId: shipmentObj.id, shipmentId: shipmentObj.id,
applyReason: "取消审核",
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "submit"); this.$emit("closeDialog", "submit");
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<el-button size="small" @click="$emit('closeDialog')">关闭</el-button> <el-button size="small" @click="$emit('closeDialog')">关闭</el-button>
</el-row> </el-row>
<warehouse-area-dialog ref="area" :visible.sync="visible" v-model="storageSpaces" :order-id="orderId" :modal-append-to-body=false append-to-body v-if="visible" /> <warehouse-area-dialog ref="area" :visible.sync="visible" v-model="storageSpaces" :order-id="orderId" :modal-append-to-body=false append-to-body />
</div> </div>
</template> </template>
......
...@@ -83,8 +83,9 @@ export default { ...@@ -83,8 +83,9 @@ export default {
this.$emit("closeDialog", type); this.$emit("closeDialog", type);
}, },
/* 关闭弹窗 */ /* 关闭弹窗 */
closeStart() { closeStart(type) {
this.dialogVisible = false; this.dialogVisible = false;
if (type) this.cancel(type);
}, },
// 开始卸柜 // 开始卸柜
startUnloading() { startUnloading() {
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<!-- 表格 --> <!-- 表格 -->
<el-row class="table-area"> <el-row class="table-area">
<el-table v-loading="loading" :data="pageData.sectionOrderList" border> <el-table v-loading="loading" :data="pageData.sectionOrderList" border max-height="500px">
<el-table-column label="序号" type="index" align="center" width="50" /> <el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column label="订单号" align="center" prop="orderNo"> <el-table-column label="订单号" align="center" prop="orderNo">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -73,8 +73,22 @@ ...@@ -73,8 +73,22 @@
</div> </div>
</el-row> </el-row>
<el-row> <!-- 审核流程 -->
<el-row class="process-area">
<div class="process">
<div>审批流程</div>
<work-flow xmlkey="unload_container" v-model="selectedUsers"></work-flow>
</div>
<!-- 操作 -->
<div v-if="!isUnderReview">
<el-button type="success" @click="onSubmit">卸柜完成</el-button> <el-button type="success" @click="onSubmit">卸柜完成</el-button>
<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 plain type="primary" @click="canclAudit">取消审核</el-button>
<el-button plain type="primary" @click="$emit('closeStart')">返回</el-button>
</div>
</el-row> </el-row>
<!-- 对话框 --> <!-- 对话框 -->
...@@ -91,9 +105,11 @@ import { ...@@ -91,9 +105,11 @@ import {
batchUnload, batchUnload,
allUnload, allUnload,
approvalCreate, approvalCreate,
approvalCancel,
getSectionList, getSectionList,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import { serviceMsg, getTotlContent } from "../../utils"; import { serviceMsg, getTotlContent } from "../../utils";
import WorkFlow from "@/components/WorkFlow";
/** /**
* 开始卸柜 * 开始卸柜
...@@ -101,7 +117,7 @@ import { serviceMsg, getTotlContent } from "../../utils"; ...@@ -101,7 +117,7 @@ import { serviceMsg, getTotlContent } from "../../utils";
export default { export default {
name: "startUnloading", name: "startUnloading",
inheritAttrs: false, inheritAttrs: false,
components: { unloadingError }, components: { unloadingError, WorkFlow },
data() { data() {
return { return {
// 标签号 // 标签号
...@@ -128,6 +144,7 @@ export default { ...@@ -128,6 +144,7 @@ export default {
sectionOrderList: [], sectionOrderList: [],
totalStatistics: {}, totalStatistics: {},
}, },
selectedUsers: [],
}; };
}, },
created() { created() {
...@@ -168,6 +185,7 @@ export default { ...@@ -168,6 +185,7 @@ export default {
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then((res) => { serviceMsg(res, this).then((res) => {
this.labelNo = "";
this.getLoadGoodsList(); this.getLoadGoodsList();
}); });
}); });
...@@ -192,6 +210,7 @@ export default { ...@@ -192,6 +210,7 @@ export default {
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
approvalStatus: 0, approvalStatus: 0,
approvalType: 3, // 卸柜 approvalType: 3, // 卸柜
copyUserId: this.selectedUsers,
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.cancel(); this.cancel();
...@@ -200,7 +219,7 @@ export default { ...@@ -200,7 +219,7 @@ export default {
}, },
/** 取消 */ /** 取消 */
cancel() { cancel() {
this.$emit("closeStart"); this.$emit("closeStart", "submit");
}, },
/* 关闭弹窗 */ /* 关闭弹窗 */
closeDialog(type) { closeDialog(type) {
...@@ -229,8 +248,26 @@ export default { ...@@ -229,8 +248,26 @@ export default {
sectionChange() { sectionChange() {
this.getLoadGoodsList(); this.getLoadGoodsList();
}, },
/* 取消审核 */
canclAudit() {
const { shipmentObj } = this.$attrs;
approvalCancel({
applyReason: "取消审核",
id: shipmentObj['cabinetUnloadApprovalInfo'].id,
shipmentId: shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
},
}, },
computed: { computed: {
/* 是否审核中 */
isUnderReview() {
const { currNode, shipmentObj } = this.$attrs;
return shipmentObj[currNode.keyName] === 183 ? true : false;
},
// 部分信息 // 部分信息
getSectionInfo() { getSectionInfo() {
const { totalStatistics, secStatistics } = this.pageData; const { totalStatistics, secStatistics } = this.pageData;
......
...@@ -29,6 +29,7 @@ function getStatusName(statu) { ...@@ -29,6 +29,7 @@ function getStatusName(statu) {
statusName.set(44, "封柜审核中"); statusName.set(44, "封柜审核中");
statusName.set(45, "封柜审核失败"); statusName.set(45, "封柜审核失败");
statusName.set(46, "封柜审核成功"); statusName.set(46, "封柜审核成功");
statusName.set(47, "已封柜,待出仓");
statusName.set(51, "未报关"); statusName.set(51, "未报关");
statusName.set(52, "报关中"); statusName.set(52, "报关中");
...@@ -186,14 +187,14 @@ function seaBaseData() { ...@@ -186,14 +187,14 @@ function seaBaseData() {
type: "cabinet", type: "cabinet",
dataKey: "4", // 字典数据键值 dataKey: "4", // 字典数据键值
/** /**
* 装柜状态:41、未装柜;42、装柜中;43、已装柜、待封柜;44、封柜审核中;45、封柜审核失败;46、封柜审核成功 * 装柜状态:41、未装柜;42、装柜中;43、已装柜、待封柜;44、封柜审核中;45、封柜审核失败;46、封柜审核成功;47、已封柜,待出仓
*/ */
voName: "cabinetInfo", voName: "cabinetInfo",
keyName: "ldStatus", keyName: "ldStatus",
status: { status: {
start: [41], start: [41],
wait: [42, 43, 44, 45], wait: [42, 43, 44, 45, 46],
end: [46], end: [47],
}, },
}, },
], ],
......
...@@ -159,7 +159,23 @@ ...@@ -159,7 +159,23 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="品牌授权"> <el-tab-pane label="品牌授权">
<el-table border style="width:100%" :data="brandAuthorizationList">
<el-table-column type="index" prop="序号"></el-table-column>
<el-table-column label="中文标题" prop="titleZh" ></el-table-column>
<el-table-column prop="titleEn" label="英文标题"></el-table-column>
<el-table-column label="有无备案">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.BRAND_REG_TYPE" :value="row.filing" />
</template>
</el-table-column>
<el-table-column label="创建时间">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
</template>
</el-table-column>
</el-table>
<pagination v-show="brandAuthorizationTotal > 0" :total="brandAuthorizationTotal" :page.sync="brandAuthorizationFrom.pageNo" :limit.sync="brandAuthorizationFrom.pageSize"
@pagination="getBrankByCustomerList"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="信用日志"> <el-tab-pane label="信用日志">
...@@ -175,7 +191,7 @@ ...@@ -175,7 +191,7 @@
</template> </template>
<script> <script>
import { getCustomer, getCustomerSelect } from '@/api/ecw/customer' import { getCustomer, getCustomerSelect,getBrankByCustomer } from '@/api/ecw/customer'
import { DICT_TYPE, getDictDataLabel } from '@/utils/dict' import { DICT_TYPE, getDictDataLabel } from '@/utils/dict'
import { getProductTypeList } from '@/api/ecw/productType' import { getProductTypeList } from '@/api/ecw/productType'
import { getNodeList } from '@/api/ecw/node' import { getNodeList } from '@/api/ecw/node'
...@@ -215,6 +231,7 @@ export default { ...@@ -215,6 +231,7 @@ export default {
listServiceUser().then(r => { listServiceUser().then(r => {
this.serviceUserList = r.data this.serviceUserList = r.data
}) })
this.getBrankByCustomerList()
}, },
data() { data() {
return { return {
...@@ -263,6 +280,12 @@ export default { ...@@ -263,6 +280,12 @@ export default {
weightUnit: undefined, weightUnit: undefined,
createTime: undefined createTime: undefined
}, },
brandAuthorizationFrom:{
pageNo:1,
pageSize:10,
},
brandAuthorizationList:[],
brandAuthorizationTotal:0,
} }
}, },
computed: { computed: {
...@@ -283,6 +306,11 @@ export default { ...@@ -283,6 +306,11 @@ export default {
id() { id() {
return this.customerId ? parseInt(this.customerId) : undefined return this.customerId ? parseInt(this.customerId) : undefined
} }
},
methods:{
getBrankByCustomerList(){
getBrankByCustomer({...this.brandAuthorizationFrom,customerId:this.id}).then(r => {this.brandAuthorizationList = r.data.list; this.brandAuthorizationTotal = r.data.total})
}
} }
} }
</script> </script>
......
...@@ -78,9 +78,7 @@ ...@@ -78,9 +78,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="唛头" align="center" prop="marks" /> <el-table-column label="唛头" align="center" prop="marks" />
<el-table-column label="箱数" align="center" prop="sumNum"> <el-table-column label="箱数" align="center" prop="sumNum" />
<template slot-scope="{row}">{{row.totalNum}}</template>
</el-table-column>
<el-table-column label="已放箱数" align="center" prop="sumWeight"> <el-table-column label="已放箱数" align="center" prop="sumWeight">
<template slot-scope="{row}">{{row.releaseNum}}</template> <template slot-scope="{row}">{{row.releaseNum}}</template>
</el-table-column> </el-table-column>
...@@ -105,15 +103,29 @@ ...@@ -105,15 +103,29 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<!--控货中,已入仓-->
<template v-if="[0,2].indexOf(scope.row.cargoControlStatus) > -1 && scope.row.sumNum > 0">
<el-button type="text" size="mini" @click="showReleaseOrderId=scope.row.orderId">放货</el-button> <el-button type="text" size="mini" @click="showReleaseOrderId=scope.row.orderId">放货</el-button>
<el-button type="text" size="mini" @click="showTransferOrder = scope.row" >控货权转移</el-button>
<el-button type="text" size="mini" @click="showEditOrderId=scope.row.orderId" >修改</el-button> </template>
<el-button type="text" size="mini" >取消</el-button> <!--部分控货-->
<template v-if="scope.row.cargoControlStatus == 2">
<el-button type="text" size="mini" @click="toDetail(scope.row)" >修改</el-button>
<el-button type="text" size="mini" @click="toDetail(scope.row)" >取消</el-button>
<el-button type="text" size="mini" @click="review(scope.row)" >放货复核</el-button> <el-button type="text" size="mini" @click="review(scope.row)" >放货复核</el-button>
<el-button type="text" size="mini" @click="$router.push('cargo_control/detail?id=' + scope.row.orderId)" >查看</el-button> </template>
<!--已完成放货-->
<template v-if="scope.row.cargoControlStatus == 1">
<el-button type="text" size="mini" @click="toDetail(scope.row)" >查看</el-button>
<el-button type="text" size="mini" @click="showTransferCargoOrderId=scope.row.orderId" >调货</el-button> <el-button type="text" size="mini" @click="showTransferCargoOrderId=scope.row.orderId" >调货</el-button>
<el-button type="text" size="mini" >反复核</el-button> <el-button type="text" size="mini" @click="$alert('//TODO')">反复核</el-button>
<el-button type="text" size="mini" @click="showTransferOrder = scope.row" >控货权转移</el-button> </template>
<!-- <el-button type="text" size="mini" >取消</el-button>
<el-button type="text" size="mini" @click="$router.push('cargo_control/detail?id=' + scope.row.orderId)" >查看</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -122,8 +134,7 @@ ...@@ -122,8 +134,7 @@
@pagination="getList" /> @pagination="getList" />
<transfer v-if="showTransferOrder" v-bind="showTransferOrder" @close="showTransferOrder=null" /> <transfer v-if="showTransferOrder" v-bind="showTransferOrder" @close="showTransferOrder=null" />
<release v-if="showReleaseOrderId" :order-id="showReleaseOrderId" @close="showReleaseOrderId=null" /> <release v-if="showReleaseOrderId" :order-id="showReleaseOrderId" @close="showReleaseOrderId=null" @success="onReleaseSuccess" />
<release v-if="showEditOrderId" :order-id="showEditOrderId" @close="showEditOrderId=null" />
<transfer-cargo v-if="showTransferCargoOrderId" :order-id="showTransferCargoOrderId" @close="showTransferCargoOrderId=null" /> <transfer-cargo v-if="showTransferCargoOrderId" :order-id="showTransferCargoOrderId" @close="showTransferCargoOrderId=null" />
</div> </div>
</template> </template>
...@@ -179,7 +190,6 @@ export default { ...@@ -179,7 +190,6 @@ export default {
dateFilter: [], //筛选日期 dateFilter: [], //筛选日期
showTransferOrder: null, // 控制权转移操作订单 showTransferOrder: null, // 控制权转移操作订单
showReleaseOrderId: null, // 放货ID showReleaseOrderId: null, // 放货ID
showEditOrderId: null, // 修改ID
showTransferCargoOrderId: null, // 调货ID showTransferCargoOrderId: null, // 调货ID
}; };
}, },
...@@ -245,12 +255,27 @@ export default { ...@@ -245,12 +255,27 @@ export default {
this.single = selection.length !== 1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
toDetail(row){
this.$router.push('cargo_control/detail?id=' + row.orderId)
},
// 复核 // 复核
review(row){ review(row){
// 未放货完成则打开详情,已完成放货则弹窗
if(row.releaseNum < row.sumNum){
return this.toDetail(row)
}
this.$confirm('已核实放货信息,确认放货?') this.$confirm('已核实放货信息,确认放货?')
.then(res => { .then(res => {
this.$alert('// TODO ') return orderReview(row.orderId)
})
.then(res => {
this.$message.success('操作成功')
this.handleQuery()
}) })
},
onReleaseSuccess(){
this.showReleaseOrderId = null
this.handleQuery()
} }
} }
}; };
......
...@@ -4,80 +4,76 @@ ...@@ -4,80 +4,76 @@
<el-form ref="elForm" :model="formData" :rules="rules" size="small" label-width="100px" > <el-form ref="elForm" :model="formData" :rules="rules" size="small" label-width="100px" >
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="订单号" prop="field101"> <el-form-item label="订单号">
{{detail.orderNo}} {{detail.orderNo}}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="总控货数" prop="field104"> <el-form-item label="总控货数">
{{detail.sumNum}} {{detail.sumNum}}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="体积" prop="field103"> <el-form-item label="体积">
{{detail.sumVolume}} {{detail.sumVolume}}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="重量" prop="field102"> <el-form-item label="重量">
{{detail.sumWeight}} kg {{detail.sumWeight}} kg
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="可放货箱数" prop="field105"> <el-form-item label="可放货箱数">
{{detail.sumNum - detail.pickNum}} {{detail.sumNum - detail.releaseNum}}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="已放货箱数" prop="field106"> <el-form-item label="已放货箱数">
{{detail.pickNum}} {{detail.releaseNum}}
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="page-title">放货详情</div> <div class="page-title">放货详情</div>
<el-table :data="[1]" border> <el-table :data="detail.cargoControlPickBackVOList || []" border>
<el-table-column label="序号" width="50px"> <el-table-column label="序号" width="50px">
<template slot-scope="scope">{{scope.$index + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column label="收货人"> <el-table-column label="收货人" prop="consigneeName" />
1 <el-table-column label="收货人电话" prop="consigneePhone" />
</el-table-column> <el-table-column label="控货箱数" prop="controlNum"></el-table-column>
<el-table-column label="控货箱数"> <el-table-column label="放货箱数" prop="pickNum"></el-table-column>
1 <el-table-column label="体积(m³)" prop="pickVolume"></el-table-column>
</el-table-column> <el-table-column label="提单号" prop="tidanNo"></el-table-column>
<el-table-column label="放货箱数"> <el-table-column label="备注" prop="remarks"></el-table-column>
1 <el-table-column label="操作人" prop="name"></el-table-column>
</el-table-column> <el-table-column label="日期" prop="createTime">
<el-table-column label="体积(m³)"> <template slot-scope="{row}">
1 {{row.createTime|parseTime}}
</el-table-column> </template>
<el-table-column label="提单号">
1
</el-table-column>
<el-table-column label="备注">
1
</el-table-column>
<el-table-column label="操作人">
1
</el-table-column>
<el-table-column label="日期">
1
</el-table-column> </el-table-column>
<el-table-column label="状态"> <el-table-column label="状态" prop="status">
1 <template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_RELEASE_STATUS" :value="row.status" />
</template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="300px"> <el-table-column label="操作" width="300px">
<template slot-scope="{row}"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="showEdit=true">修改</el-button> <el-button v-if="scope.row.status == 1" type="primary" size="mini" @click="editIndex=scope.$index">修改</el-button>
<el-button type="danger" size="mini">取消</el-button> <el-button v-if="scope.row.status == 1" type="danger" size="mini" @click="cancel(scope.row.id)">取消</el-button>
<el-button type="success" size="mini" @click="review">放货复核</el-button> <el-button v-if="scope.row.status == 1" type="success" size="mini" @click="review(scope.row.id)">放货复核</el-button>
<el-button v-if="scope.row.status == 3" type="danger" size="mini" @click="fallbackIndex=scope.$index">反复核</el-button>
<el-button v-if="scope.row.status == 3" type="success" size="mini" @click="$alert('// TODO')">调货</el-button>
<el-button v-if="[2,4].indexOf(scope.row.status) > -1" type="primary" size="mini" @click="showApprovalDetail(scope.row.id)">审核详情</el-button>
<el-button v-if="[2,4].indexOf(scope.row.status) > -1" type="danger" size="mini" @click="cancelApproval(scope.row.id)">取消审核</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="page-title">历史放货记录</div> <!-- <div class="page-title">历史放货记录</div>
<el-table :data="[1]" border> <el-table :data="[1]" border>
<el-table-column label="序号" width="50px"> <el-table-column label="序号" width="50px">
...@@ -106,33 +102,96 @@ ...@@ -106,33 +102,96 @@
<el-table-column label="备注"> <el-table-column label="备注">
<el-input v-model="formData.field110" placeholder="请输入收货人邮箱" clearable></el-input> <el-input v-model="formData.field110" placeholder="请输入收货人邮箱" clearable></el-input>
</el-table-column> </el-table-column>
</el-table> </el-table> -->
<fallback v-if="fallbackIndex !== null" :order="detail" :index="fallbackIndex" @close="fallbackIndex=null" @success="onFallbackSuccess" />
<edit v-if="showEdit" @close="showEdit=false" /> <edit v-if="editIndex !== null" @close="editIndex=null" :order="detail" :index="editIndex" @success="onEditSuccess" />
</div> </div>
</template> </template>
<script> <script>
import edit from './components/CargoControlEdit.vue' import edit from './components/CargoControlEdit.vue'
import {createPick, getRleaseInfo} from '@/api/ecw/orderCargoControl' import {createPick, getPickRleaseInfo, review, cancel, cancelApproval} from '@/api/ecw/orderCargoControl'
import {parseTime} from '@/utils/ruoyi'
import Fallback from './components/Fallback'
export default { export default {
components: {edit}, filters: {parseTime},
components: {edit, Fallback},
data(){ data(){
return { return {
showEdit: false,
detail: null, detail: null,
formData:{}, formData:{},
rules: {} rules: {},
editIndex: null, // 修改索引
fallbackIndex: null, // 反复核索引
} }
}, },
created(){ created(){
getRleaseInfo(this.$route.query.id).then(res => this.detail = res.data) this.loadData()
}, },
methods:{ methods:{
review(){ loadData(){
console.log('loadData')
getPickRleaseInfo(this.$route.query.id).then(res => this.detail = res.data)
},
review(id){
this.$confirm('已核实放货信息,确认放货?') this.$confirm('已核实放货信息,确认放货?')
.then(res => { .then(res => {
this.$alert('// TODO ') return review(id)
})
.then(res => {
this.$message.success('操作成功')
this.loadData()
})
},
unReview(){
},
cancel(id){
this.$confirm('确定取消这条放货么?')
.then(res => {
return cancel(id)
})
.then(res => {
this.$message.success('操作成功')
this.loadData()
})
},
onEditSuccess(){
console.log('onEditSuccess')
this.loadData()
this.editIndex = null
},
onFallbackSuccess(){
this.fallbackIndex = null
this.loadData()
},
// 查看审核详情
showApprovalDetail(id){
this.$router.push('/bpm/process-instance/detail?id=' + this.getApproval(id, 'formId'))
},
// 取消审核
cancelApproval(id){
this.$confirm('确定取消此申请么?')
.then(res => {
let approvalId = this.getApproval(id)
return cancelApproval(approvalId, {reason: ''})
})
.then(res => {
this.$message.success('操作成功')
this.loadData()
})
},
// 根据id查找审核id
getApproval(id, field = 'orderApprovalId'){
if(!this.detail.orderApprovalBackVOList || !this.detail.orderApprovalBackVOList.length){
this.$message.error('未找到审批ID')
Promise.reject('未找到审批ID')
}
let item = this.detail.orderApprovalBackVOList.find(item => {
let details = JSON.parse(item.details)
return details.cargoControlPickId == id && details.applyStatus == 1
}) })
console.log({item})
return item[field]
} }
} }
} }
......
...@@ -2,53 +2,52 @@ ...@@ -2,53 +2,52 @@
<el-dialog :title="title" visible :before-close="closeDialog" :close-on-click-modal="false"> <el-dialog :title="title" visible :before-close="closeDialog" :close-on-click-modal="false">
<el-form v-if="agreement" ref="elForm" :model="formData" size="small" label-width="100px" > <el-form v-if="agreement" ref="elForm" :model="formData" size="small" label-width="100px" >
<el-form-item label="订单号" prop="field101"> <el-form-item label="订单号" prop="field101">
111 {{order.orderNo}}
</el-form-item> </el-form-item>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="收货人" prop="field104"> <el-form-item label="收货人" prop="field104">
111 {{info.consigneeName}}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="收货人电话" prop="field103"> <el-form-item label="收货人电话" prop="field103">
111 {{info.consigneePhone}}
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="总控货箱数" prop="field105"> <el-form-item label="总控货箱数" prop="field105">
111 {{order.sumNum}}
</el-form-item> </el-form-item>
<el-form-item label="原放货箱数" prop="field106"> <el-form-item label="原放货箱数" prop="field106">
111 {{info.pickNum}}
</el-form-item> </el-form-item>
<el-form-item label="现放货箱数" prop="field106"> <el-form-item label="现放货箱数" prop="field106">
<el-input v-model="formData.cnt" placeholder=""></el-input> <el-input v-model="formData.currentPickNum" placeholder=""></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="field106"> <el-form-item label="备注" prop="field106">
<el-input v-model="formData.cnt" placeholder=""></el-input> <el-input v-model="formData.remarks" placeholder=""></el-input>
</el-form-item> </el-form-item>
<el-form-item label="控货手机号" prop="field106"> <el-form-item label="控货手机号" prop="field106">
13000000000 {{info.phone}}
</el-form-item> </el-form-item>
<el-form-item label="手机验证码" prop="field106"> <el-form-item label="手机验证码" prop="field106">
<el-input v-model="formData.cnt" placeholder="" style="width: 100px; margin-right:10px"></el-input> <el-input v-model="formData.code" placeholder="" style="width: 100px; margin-right:10px"></el-input>
<el-button type="default">获取验证码</el-button> <send-sms-code :order-id="order.orderId" :scene="5" />
</el-form-item> </el-form-item>
<div class="title">审批流程</div> <div class="title">审批流程</div>
<work-flow bmpkey="free_apple" /> <work-flow xmlkey="release_goods" v-model="ccIdArr" />
<el-form-item label=""> <el-form-item label="">
<el-button type="primary" @click="$alert('// TODO')">提交申请</el-button> <el-button type="primary" @click="submit">提交申请</el-button>
<el-button @click="closeDialog">关闭</el-button> <el-button @click="closeDialog">关闭</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div v-else> <div v-else>
<need-know keyname="control" /> <need-know keyname="control" />
<div style="margin-top:30px"> <div style="margin-top:30px">
...@@ -61,16 +60,23 @@ ...@@ -61,16 +60,23 @@
<script> <script>
import WorkFlow from '@/components/WorkFlow' import WorkFlow from '@/components/WorkFlow'
import NeedKnow from '@/components/NeedKnow' import NeedKnow from '@/components/NeedKnow'
import SendSmsCode from '@/views/ecw/order/components/SendSmsCode'
import {updateApply} from '@/api/ecw/orderCargoControl'
export default { export default {
props:{ props:{
orderId: [String, Number] orderId: [String, Number],
order: Object,
index: Number
}, },
components: {NeedKnow, WorkFlow}, components: {NeedKnow, WorkFlow, SendSmsCode},
data(){ data(){
return { return {
show: false, show: false,
detail: null, ccIdArr:[],
formData:{}, formData:{
applyType: 7, // 放货修改
ccIds: ''
},
agreement: false, // 是否同意协议 agreement: false, // 是否同意协议
} }
}, },
...@@ -78,20 +84,41 @@ export default { ...@@ -78,20 +84,41 @@ export default {
title(){ title(){
let t = '放货修改' let t = '放货修改'
return t return t
},
info(){
return this.order.cargoControlPickBackVOList[this.index]
}
},
watch:{
ccIdArr(val){
this.$set(this.formData, 'ccIds', val.join(','))
} }
}, },
created(){ created(){
this.show = true this.show = true
this.loadData() /* this.loadData() */
}, },
methods:{ methods:{
loadData(){ /* loadData(){
}, }, */
closeDialog(){ closeDialog(){
this.show = false this.show = false
this.$emit('close'); this.$emit('close');
}, },
submit(){
let data = Object.assign({}, this.formData, {
cargoControlPickId: this.info.id,
orderId: this.order.orderId,
orderNo: this.order.orderNo
})
updateApply(data).then(res => {
this.$message.success('修改成功')
this.show = false
this.$emit('success')
})
}
} }
} }
......
<template>
<el-dialog :title="title" visible :before-close="closeDialog" :close-on-click-modal="false">
<el-form ref="form" :model="formData" :rules="rules" size="small" label-width="100px" >
<el-form-item label="订单号">
{{order.orderNo}}
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="收货人">
{{info.consigneeName}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="收货人电话">
+{{info.consigneeCountryCode}} {{info.consigneePhone}}
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="总控货箱数">
{{order.sumNum}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="原放货箱数">
{{info.pickNum}}
</el-form-item>
</el-col>
</el-row>
<el-form-item label="反复核原因" prop="recurrentNuclearType">
<dict-selector :type="DICT_TYPE.ECW_PICK_RECURRENT_NUCLEAR_TYPE" v-model="formData.recurrentNuclearType" form-type="radio" />
</el-form-item>
<el-form-item label="控货手机号">
+{{info.countryCode}} {{info.phone}}
</el-form-item>
<el-form-item label="手机验证码" prop="code">
<el-input v-model="formData.code" placeholder="" style="width: 100px; margin-right:10px"></el-input>
<send-sms-code :order-id="order.orderId" :scene="5" />
</el-form-item>
<div class="title">审批流程</div>
<work-flow xmlkey="release_goods" v-model="ccIdArr" />
<el-form-item label="">
<el-button type="primary" @click="submit">提交申请</el-button>
<el-button @click="closeDialog">关闭</el-button>
</el-form-item>
</el-form>
</el-dialog>
</template>
<script>
import WorkFlow from '@/components/WorkFlow'
import SendSmsCode from '@/views/ecw/order/components/SendSmsCode'
import {updateApply} from '@/api/ecw/orderCargoControl'
export default {
props:{
order: Object,
index: Number
},
components: {WorkFlow, SendSmsCode},
data(){
return {
show: false,
ccIdArr:[],
formData:{
applyType: 8, // 放货反复核申请
ccIds: ''
},
rules:{
recurrentNuclearType: [{required: true, message: '请选择反复核原因'}],
code: [{required: true, message: '请填写验证码'}]
}
}
},
computed:{
title(){
let t = '反复核'
return t
},
info(){
return this.order.cargoControlPickBackVOList[this.index]
}
},
watch:{
ccIdArr(val){
this.$set(this.formData, 'ccIds', val.join(','))
}
},
created(){
this.show = true
/* this.loadData() */
},
methods:{
/* loadData(){
}, */
closeDialog(){
this.show = false
this.$emit('close');
},
submit(){
this.$refs.form.validate().then(res => {
let data = Object.assign({}, this.formData, {
cargoControlPickId: this.info.id,
orderId: this.order.orderId,
orderNo: this.order.orderNo
})
updateApply(data).then(res => {
this.$message.success('修改成功')
this.show = false
this.$emit('success');
})
})
}
}
}
</script>
<style lang="scss" scoped>
.title{
font-size:16px;
margin:20px 0;
display:flex;
align-items:center;
&:before{
content: '';
width:5px;
height: 15px;
background:#666;
margin-right:10px;
}
}
</style>
<!--拆单审核中的申请信息部分-->
<template>
<div v-if="detail">
<el-table :data="detail.unMergeList.list">
<el-table-column label="订单编号">
<template slot-scope="scope">{{scope.row.orderNo}}</template>
</el-table-column>
<el-table-column label="唛头">
<template slot-scope="{row}">{{row.marks}}</template>
</el-table-column>
<el-table-column label="已到箱数/总箱数">
<template slot-scope="{row}">// TODO/{{row.sumNum}}</template>
</el-table-column>
<el-table-column label="下单统计">
<template slot-scope="{row}">
22箱 44m³ 50kg
</template>
</el-table-column>
<el-table-column label="入仓你统计">
<template slot-scope="{row}">总箱数:1 总体积:m³ 总重量 110kg</template>
</el-table-column>
<el-table-column label="入仓时间">
<template slot-scope="{row}">
// TODO
</template>
</el-table-column>
<el-table-column label="运输方式">
<template slot-scope="{row}">{{row.num}}</template>
</el-table-column>
<el-table-column label="出货渠道">
<template slot-scope="{row}">{{row.num}}</template>
</el-table-column>
<el-table-column label="始发仓">
<template slot-scope="{row}">{{row.num}}</template>
</el-table-column>
<el-table-column label="目的仓">
<template slot-scope="{row}">{{row.num}}</template>
</el-table-column>
<el-table-column label="发货人">
<template slot-scope="{row}">{{row.num}}</template>
</el-table-column>
<el-table-column label="收货人">
<template slot-scope="{row}">{{row.num}}</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {getApproval, getOrder} from '@/api/ecw/order'
import {getMergeListByMergeId} from '@/api/ecw/orderHandle'
import {getChannel} from '@/api/ecw/channel'
export default {
name: 'MergeDetail',
props:{
id: [String, Number]
},
data(){
return {
detail: null,
order: null,
channel: null
}
},
watch:{
id(){
this.getData()
},
/* detail(){
this.getOrder()
}, */
/* order(){
if(this.order.channelId){
this.getChannel()
}
} */
},
created(){
if(this.id){
this.getData()
}
},
methods:{
getData(){
getMergeListByMergeId({id: this.id}).then(res => {
this.detail = res.data
})
},
/* getOrder(){
getOrder(this.detail.orderId).then(res => {
this.order = res.data
})
},
getChannel(){
getChannel(this.order.channelId).then(res => {
this.channel = res.data
})
} */
}
}
</script>
<style scoped lang="scss">
.title{
padding: 10px 0;
span{
font-size: 14px;
font-weight: bold;
}
}
</style>
\ No newline at end of file
...@@ -156,7 +156,8 @@ export default { ...@@ -156,7 +156,8 @@ export default {
console.log('submit') console.log('submit')
createPick(Object.assign({orderId: this.orderId}, this.formData)).then(res => { createPick(Object.assign({orderId: this.orderId}, this.formData)).then(res => {
this.$message.success(res.msg || '操作成功') this.$message.success(res.msg || '操作成功')
this.closeDialog() this.show = false
this.$emit('success')
}) })
}) })
......
...@@ -486,7 +486,7 @@ export default { ...@@ -486,7 +486,7 @@ export default {
}, },
// 表单校验 // 表单校验
rules: { rules: {
marks: [{required: true, message: '请填写唛头'}]
}, },
labelStyle: 'width:120px', labelStyle: 'width:120px',
showBatchImportDialog: false, // 显示批量导入弹窗 showBatchImportDialog: false, // 显示批量导入弹窗
......
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
<el-button type="text" size="mini" @click="orderId = scope.row.orderId;isShow = true" >特需</el-button> <el-button type="text" size="mini" @click="orderId = scope.row.orderId;isShow = true" >特需</el-button>
<el-button type="text" size="mini" @click="$router.push(`/order/associated-order/${scope.row.orderId}`)" >关联</el-button> <el-button type="text" size="mini" @click="$router.push(`/order/associated-order/${scope.row.orderId}`)" >关联</el-button>
<el-button type="text" size="mini" @click="$router.push(`/order/mutex-order/${scope.row.orderId}`)" >互斥</el-button> <el-button type="text" size="mini" @click="$router.push(`/order/mutex-order/${scope.row.orderId}`)" >互斥</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="$router.push('/order/special?id=' + scope.row.orderId)" <el-button size="mini" type="text" icon="el-icon-edit" @click="$router.push('/order/special/' + scope.row.orderId)"
v-hasPermi="['ecw:order:update']">特价</el-button> v-hasPermi="['ecw:order:update']">特价</el-button>
<el-button type="text" size="mini" @click="$router.push(`/order/release?orderId=${scope.row.orderId}`)">确认放货</el-button> <el-button type="text" size="mini" @click="$router.push(`/order/release?orderId=${scope.row.orderId}`)">确认放货</el-button>
......
<template>
<div class="app-container">
<el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16">
<el-card class="box-card">
<div slot="header" class="clearfix" v-if="!readonly">
<span>优惠申请</span>
</div>
<el-form v-if="!readonly" ref="form" :model="form" label-width="80px">
<el-form-item label="商品类型">
<span>{{ getProductAttrNameById(form.productType) }}</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.departureName}】发往【${form.objectiveName}】`}}
</el-form-item>
<el-form-item label="是否预付">
{{ form.isPayAdvance === 0 ? '' : '' }}
</el-form-item>
<el-form-item label="旧运费">
<el-input v-model="form.orgSeaFreight" readonly>
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgSeaFreightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.orgSeaFreightVolume] }}</div>
</el-input>
</el-form-item>
<el-form-item label="旧清关费">
<el-input v-model="form.orgClearanceFreight" readonly>
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgClearanceFreightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.orgClearanceFreightVolume] }}</div>
</el-input>
</el-form-item>
<el-form-item label="新运费" required>
<el-input v-model.number="form.seaFreight">
<el-select v-model="form.seaFreightCurrency" placeholder="请选择" slot="prepend" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
<el-select v-model="form.seaFreightVolume" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in unitList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="新清关费" required>
<el-input v-model.number="form.clearanceFreight">
<el-select v-model="form.clearanceFreightCurrency" placeholder="请选择" slot="prepend" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
<el-select v-model="form.clearanceFreightVolume" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in unitList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
</el-form>
<div v-if="!readonly">
<el-button type="primary" @click="handleSubmit">提交</el-button>
</div>
<el-descriptions border v-if="readonly" :column="1">
<el-descriptions-item label="商品类型">{{ form.productType }}</el-descriptions-item>
<el-descriptions-item label="商品名称">{{ form.prodTitleZh }}</el-descriptions-item>
<el-descriptions-item label="英文名称">{{ form.prodTitleEn }}</el-descriptions-item>
<el-descriptions-item label="线路">
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${form.departureName}】发往【${form.objectiveName}】`}}
</el-descriptions-item>
<el-descriptions-item label="是否预付">{{ form.isPayAdvance === 0 ? '' : '' }}</el-descriptions-item>
<el-descriptions-item label="旧运费">{{ form.orgSeaFreight }} {{ currentMap[form.orgSeaFreightCurrency] }}/{{ unitMap[form.orgSeaFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="旧清关费">{{ form.orgClearanceFreight }} {{ currentMap[form.orgClearanceFreightCurrency] }}/{{ unitMap[form.orgClearanceFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="新运费">{{ form.seaFreight }} {{ currentMap[form.seaFreightCurrency] }}/{{ unitMap[form.seaFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="新清关费">{{ form.clearanceFreight }} {{ currentMap[form.clearanceFreightCurrency] }}/{{ unitMap[form.clearanceFreightVolume] }}</el-descriptions-item>
</el-descriptions>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import {createOrderSpecial, getOrderSpecial, getOrderSpecialByApproveId} from "@/api/ecw/order"
import {DICT_TYPE, getDictDataLabel} from "@/utils/dict"
import DictSelector from "@/components/DictSelector"
import {getUnitList} from "@/api/ecw/unit"
import {getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency'
import { getProductAttrList } from '@/api/ecw/productAttr'
export default {
name: "specialDiscount",
props: {
offerProdId: String,
id: Number,
readonly: {
type: Boolean,
default: false
}
},
components: {
DictSelector
},
created() {
// 临时
if(this.$route.query.offerId){
this.form.offerId = this.$route.query.offerId - 0
// this.getOrder()
}
// 查看详情,列表进来的
if(this.offerProdId){
this.form.offerProdId = this.offerProdId - 0
this.getOrderSpecial()
}
// 从流程查看详情
if(this.id)
this.getOrderSpecialByApproveId()
getUnitList().then(res => this.unitList = res.data)
getChannelList().then(res => this.channelList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getProductAttrList().then(res => this.productAttrList = res.data)
},
data() {
return {
getDictDataLabel,
DICT_TYPE,
unitList:[],
channelList:[],
currencyList:[],
productAttrList:[],
form: {
"abnormalState": 0,
"applyResult": "",
"applyStatus": 0,
"applyType": 0,
"ccIds": "",
"channelId": 0,
"charging": 0,
"clearanceFreight": 0,
"clearanceFreightCurrency": 0,
"clearanceFreightVolume": 0,
"commissionCurrencyId": 0,
"commissionType": 0,
"commission_id": 0,
"destAddressEn": "",
"destAddressZh": "",
"destTitleEn": "",
"destTitleZh": "",
"destVolume": "",
"destWarehouseId": 0,
"freight": 0,
"freightCurrency": 0,
"freightVolume": 0,
"inWarehouseState": 0,
"isPayAdvance": 0,
"lightCommissionAmount": 0,
"lineId": 0,
"orderId": 0,
"orderItemId": 0,
"orderNo": "",
"orgClearanceFreight": 0,
"orgClearanceFreightCurrency": 0,
"orgClearanceFreightVolume": 0,
"orgFreight": 0,
"orgFreightCurrency": 0,
"orgFreightVolume": 0,
"orgVWeight": "",
"orgWVolume": "",
"prodId": 0,
"prodTitleEn": "",
"prodTitleZh": "",
"prodType": 0,
"shadeCommissionAmount": 0,
"shipmentState": 0,
"startAddressEn": "",
"startAddressZh": "",
"startTitleEn": "",
"startTitleZh": "",
"startVolume": "",
"startWarehouseId": 0,
"status": 0,
"toWarehouseState": 0,
"transportId": 0,
"vweight": "",
"wvolume": ""
}
}
},
methods: {
handleSubmit(){
createOrderSpecial({
clearanceFreight: this.form.clearanceFreight,
clearanceFreightCurrency: this.form.clearanceFreightCurrency,
clearanceFreightVolume: this.form.clearanceFreightVolume,
offerId: this.form.offerId,
offerProdId: this.form.offerProdId,
seaFreight: this.form.seaFreight,
seaFreightCurrency: this.form.seaFreightCurrency,
seaFreightVolume: this.form.seaFreightVolume,
}).then(r => {
this.$message.success(r.msg || '提交成功')
})
},
getOrderSpecial(){
getOrderSpecial(this.form.offerProdId).then(r => {
this.form = r.data
})
},
getOrderSpecialByApproveId(){
getOrderSpecialByApproveId(this.id).then(r => {
this.form = r.data
})
},
getProductAttrNameById(id){
return this.productAttrList.find(e => e.id === id)?.attrName || ''
}
},
computed: {
// 根据渠道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
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = item.titleZh
})
return map
}
}
}
</script>
<style scoped>
</style>
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
<el-card> <el-card>
<div slot="header" class="card-title">申请特价</div> <div slot="header" class="card-title">申请特价</div>
<!-- 列表 --> <!-- 列表 -->
<div class="offer-header"> <div class="order-header">
<span style="font-size: 15px;">订单号:{{ offer.number }}</span> <span style="font-size: 15px;">订单号:{{ order.number }}</span>
</div> </div>
<el-table v-loading="loading" :data="offer.offerProdRespVOList"> <el-table v-loading="loading" :data="order.orderItemVOList">
<el-table-column label="序号" align="center" prop="id" type="index"></el-table-column> <el-table-column label="序号" align="center" prop="id" type="index"></el-table-column>
<el-table-column <el-table-column
prop="prodTitleZh" prop="prodTitleZh"
...@@ -20,17 +20,22 @@ ...@@ -20,17 +20,22 @@
prop="prodAttrIds" prop="prodAttrIds"
label="填单货物属性"> label="填单货物属性">
<template v-slot="{row}"> <template v-slot="{row}">
{{ getProductNamesByIds(row.prodAttrIds) }} 品牌:{{ ['无牌', '有牌', '中性'][row.brandType] }}<br>
箱数:{{ row.num }}<br>
体积:{{ row.volume }}<br>
重量:{{ row.weight }}Kg
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
label="入库货物属性"> label="入库货物属性">
<template v-slot="{row}"> <template v-slot="{row}">
品牌:{{ row.brand ? '' : '' }}<br> <template v-if="row.warehouseInInfoVO">
箱数:{{ row.num }}<br> 品牌:{{ ['无牌', '有牌', '中性'][row.brandType] }}<br>
体积:{{ row.volume }}<br> 箱数:{{ row.warehouseInInfoVO.cartonsNum }}<br>
重量:{{ row.weight }}Kg 体积:{{ row.warehouseInInfoVO.volume }}<br>
重量:{{ row.warehouseInInfoVO.weight }}Kg
</template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -64,18 +69,18 @@ ...@@ -64,18 +69,18 @@
清关费:{{ row.clearanceFreight }} {{ currentMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }} 清关费:{{ row.clearanceFreight }} {{ currentMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column-->
prop="status" <!-- prop="status"-->
:formatter="(v) => ['取消报价', '特价审批中', '需求确认(草稿)', '跟进中', '赢单', '输单', '报价完成', '审批通过', '审批拒绝'][v.status]" <!-- :formatter="(v) => ['取消报价', '特价审批中', '需求确认(草稿)', '跟进中', '赢单', '输单', '报价完成', '审批通过', '审批拒绝'][v.status]"-->
label="审核状态"> <!-- label="审核状态">-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column <el-table-column
prop="address" prop="address"
label="操作"> label="操作">
<template v-slot="{row}"> <template v-slot="{row}">
<el-button size="mini" type="text" v-hasPermi="['ecw:offer:update']" @click="$router.push(`/offer/discount/${row.offerProdId}?offerId=${row.offerId}`)">优惠申请</el-button> <el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/discount/${row.prodId}?orderId=${row.orderId}`)">优惠申请</el-button>
<!-- <el-button size="mini" type="text" v-hasPermi="['ecw:offer:update']">佣金规则</el-button>--> <el-button size="mini" type="text" v-hasPermi="['ecw:order:update']">佣金规则</el-button>
<!-- <el-button size="mini" type="text" v-hasPermi="['ecw:offer:update']">管理折扣</el-button>--> <el-button size="mini" type="text" v-hasPermi="['ecw:order:update']">管理折扣</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -102,7 +107,7 @@ export default { ...@@ -102,7 +107,7 @@ export default {
components: { components: {
}, },
props: { props: {
offerId: String orderId: [String, Number]
}, },
data() { data() {
return { return {
...@@ -116,14 +121,14 @@ export default { ...@@ -116,14 +121,14 @@ export default {
params:{ params:{
page:1, page:1,
rows:20, rows:20,
offerId:0, orderId:0,
type:2 type:2
}, },
relationId:0, relationId:0,
creatorName:'test', creatorName:'test',
offer: { order: {
number: '', number: '',
offerProdRespVOList: [] orderItemVOList: []
}, },
unitList:[], unitList:[],
currencyList:[], currencyList:[],
...@@ -131,8 +136,8 @@ export default { ...@@ -131,8 +136,8 @@ export default {
}; };
}, },
created() { created() {
if(this.offerId){ if(this.orderId){
this.params.offerId = this.offerId this.params.orderId = this.orderId
this.getOrder() this.getOrder()
} }
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
...@@ -142,9 +147,9 @@ export default { ...@@ -142,9 +147,9 @@ export default {
methods: { methods: {
getOrder(){ getOrder(){
this.loading = true this.loading = true
getOrder(this.offerId).then(response => { getOrder(this.orderId).then(response => {
this.loading = false this.loading = false
this.offer = response.data this.order = response.data
}) })
}, },
getProductNamesByIds(ids){ getProductNamesByIds(ids){
...@@ -183,7 +188,7 @@ export default { ...@@ -183,7 +188,7 @@ export default {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
} }
.offer-header{ .order-header{
padding-bottom: 16px; padding-bottom: 16px;
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
<div> <div>
<el-button v-if="type == 1" @click="submit">确认出仓</el-button> <el-button v-if="type == 1" @click="submit">确认出仓</el-button>
<el-button v-else @click="submit2">确认到仓</el-button> <el-button v-else @click="submit2">确认到仓</el-button>
<el-button @click="$router.back()">返回</el-button> <el-button @click="$tab.closeOpenPage({path:'/order/order'})">返回</el-button>
</div> </div>
</div> </div>
</template> </template>
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<el-table-column label="商品编码" align="center" prop="productCode" > <el-table-column label="商品编码" align="center" prop="productCode" >
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-link type="primary" @click.native="handleUpdate(scope.row)"> <el-link type="primary" @click.native="handleUpdate(row)">
{{ row.productDO ? row.productDO.productCode : '无productDO字段' }} {{ row.productDO ? row.productDO.productCode : '无productDO字段' }}
</el-link> </el-link>
</template> </template>
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<el-table-column label="商品名称" align="center" prop="productName"> <el-table-column label="商品名称" align="center" prop="productName">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-link type="primary" @click.native="handleUpdate(scope.row)"> <el-link type="primary" @click.native="handleUpdate(row)">
{{ row.productDO ? row.productDO.titleZh + '/' + row.productDO.titleEn : '无productDO字段' }} {{ row.productDO ? row.productDO.titleZh + '/' + row.productDO.titleEn : '无productDO字段' }}
</el-link> </el-link>
</template> </template>
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="!scope.row.identityAuditStatus">未提交</div> <div v-if="!scope.row.identityAuditStatus">未提交</div>
<dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.identityAuditStatus" ></dict-tag> <dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.identityAuditStatus" ></dict-tag>
<el-tooltip v-if="scope.row.identityAuditStatus === 3" class="item" effect="dark" :content="scope.identityAuditRemark" placement="bottom"> <el-tooltip v-if="scope.row.identityAuditStatus === 3" class="item" effect="dark" :content="scope.row.identityAuditRemark" placement="bottom">
<i class="el-icon-question"></i> <i class="el-icon-question"></i>
</el-tooltip> </el-tooltip>
</template> </template>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="!scope.row.enterpriseAuditStatus">未提交</div> <div v-if="!scope.row.enterpriseAuditStatus">未提交</div>
<dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.enterpriseAuditStatus" ></dict-tag> <dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.enterpriseAuditStatus" ></dict-tag>
<el-tooltip v-if="scope.row.enterpriseAuditStatus === 3" class="item" effect="dark" :content="scope.rowenterpriseAuditRemark" placement="bottom"> <el-tooltip v-if="scope.row.enterpriseAuditStatus === 3" class="item" effect="dark" :content="scope.row.rowenterpriseAuditRemark" placement="bottom">
<i class="el-icon-question"></i> <i class="el-icon-question"></i>
</el-tooltip> </el-tooltip>
</template> </template>
...@@ -409,7 +409,7 @@ export default { ...@@ -409,7 +409,7 @@ export default {
},//清空企业 },//清空企业
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1; this.queryParams.page = 1;
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
...@@ -645,10 +645,5 @@ export default { ...@@ -645,10 +645,5 @@ export default {
.el-textarea{ .el-textarea{
width: 300px; width: 300px;
} }
.el-button{
width: 180px;
height: 50px;
margin: 0 10px;
}
} }
</style> </style>
<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="nickname">
<el-input v-model="queryParams.searchKey" placeholder="搜索昵称、姓名、手机、Email" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="成交" prop="mobile">
<el-select v-model="queryParams.isDeal">
<el-option v-for="item in [{label:'全部',value:''},{label:'是',value:true},{label:'否',value:false}]" :value="item.value" :label="item.label" :key="item.value" ></el-option>
</el-select>
</el-form-item>
<el-form-item label="认证" prop="password">
<el-select v-model="queryParams.authType">
<el-option v-for="item in [{label: '全部',value: ''},{label:'营业执照认证',value:1},{label:'身份证认证',value:2},{label:'双认证',value:3}]" :key="item.value" :value="item.value" :label="item.label"></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-button :loading="exportLoading" type="primary" @click="exportFn">导 出</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="公司名称" align="center" prop="enterpriseName" />
<el-table-column label="用户昵称" align="center" prop="nickname" />
<el-table-column label="真实姓名" align="center" prop="identityName" />
<el-table-column label="区号">
<template v-slot:default = 'scope'>
{{scope.row.areaCode ? `${scope.row.areaCode}`:''}}
</template>
</el-table-column>
<el-table-column label="手机号" show-overflow-tooltip align="center" prop="mobile" >
</el-table-column>
<el-table-column label="成交" align="center" prop="" show-overflow-tooltip />
<el-table-column label="认证" align="center" :formatter="authentication" />
<el-table-column label="状态" align="center" prop="status" >
<template slot-scope="scope">
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" @change="handleStatusChange(scope.row)" />
</template>
</el-table-column>
<el-table-column label="身份证审核状态" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<div v-if="!scope.row.identityAuditStatus">未提交</div>
<dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.identityAuditStatus" ></dict-tag>
<el-tooltip v-if="scope.row.identityAuditStatus === 3" class="item" effect="dark" :content="scope.row.identityAuditRemark" placement="bottom">
<i class="el-icon-question"></i>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="营业执照审核状态" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<div v-if="!scope.row.enterpriseAuditStatus">未提交</div>
<dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.enterpriseAuditStatus" ></dict-tag>
<el-tooltip v-if="scope.row.enterpriseAuditStatus === 3" class="item" effect="dark" :content="scope.row.rowenterpriseAuditRemark" placement="bottom">
<i class="el-icon-question"></i>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200px">
<template slot-scope="scope" >
<el-button size="mini" type="text" @click="guarantee(scope.row)">保函/证书</el-button>
<el-button size="mini" type="text" @click="operationLogFn(scope.row)">操作日志</el-button>
<el-button v-if="scope.row.identityAuditStatus !== 0 && scope.row.identityAuditStatus !== undefined" size="mini" type="text" @click="identityFn(scope.row , '1')">身份证</el-button>
<el-button size="mini" type="text" @click="identityFn(scope.row, '2')">营业执照</el-button>
<el-button size="mini" type="text" @click="deleteFn(scope.row)"> </el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList"/>
<el-dialog
title="保函/证书"
:visible.sync="guaranteeShow"
:before-close="()=>{guaranteeUrl = ''; guaranteeShow = false;}"
width="50%">
<el-form>
<el-form-item label="保函/证书">
<el-row :gutter="20" type="flex" justify="center" >
<el-col :span="12"><el-input v-model="guaranteeUrl" ></el-input></el-col>
<el-col :span="4"><div style="height: 45px;overflow: hidden;">
<file-upload v-model="guaranteeUrl" :fileType="['png', 'jpg', 'jpeg','pdf']" :limit="1" :isShowTip="false"></file-upload>
</div></el-col>
<el-col :span="6">
<div>可上传图片,pdf文档</div>
</el-col>
</el-row>
</el-form-item>
</el-form>
<div style="text-align: center;"><el-button @click="setGuarantee"> </el-button></div>
</el-dialog>
<el-dialog
title="操作日志"
:visible.sync="operationLogShow"
width="50%">
<el-table :data="operationLogList">
<el-table-column label="标题" prop="title"></el-table-column>
<el-table-column label="操作内容" prop="content"></el-table-column>
<el-table-column label="操作人" prop="userId"></el-table-column>
<el-table-column label="操作时间">
<template v-slot:default ="scope">
{{parseTime(scope.row.createTime) }}
</template>
</el-table-column>
<el-table-column label="操作ip" prop="ip"></el-table-column>
</el-table>
<pagination v-show="totalLog > 0" :total="totalLog" :page.sync="operationLogFrom.page" :limit.sync="operationLogFrom.row"
@pagination="getOperationLogList"/>
</el-dialog>
<el-dialog
title="认证"
:visible.sync="attestationShow"
width="80%">
<div class="details">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="身份证" name="1" v-if="this.publicObj && this.publicObj.identityAuditStatus !== 0 && this.publicObj.identityAuditStatus !== undefined">
<div style="padding:0 40px;box-sizing: border-box;">
<el-form ref="formId" label-position="left" label-width="100px" :rules="rulesId" :model="IdDetails" >
<el-form-item label="姓名" prop="name">
<el-input v-model="IdDetails.name"></el-input>
</el-form-item>
<el-form-item label="证件类型" prop="cardType">
<dict-selector v-model="IdDetails.cardType" :type="DICT_TYPE.CERTIFICATE_TYPE" ></dict-selector>
</el-form-item>
<el-form-item label="证件号码" prop="cardNumber">
<el-input v-model="IdDetails.cardNumber"></el-input>
</el-form-item>
<el-form-item label="证件正面照" prop="img1">
<div>
<el-input readonly style="margin-bottom: 20px" v-model="IdDetails.img1"></el-input>
<ImageUpload :isShowTip="false" v-model="IdDetails.img1" :limit="1"></ImageUpload>
</div>
</el-form-item>
<el-form-item label="证件背面照" prop="img2">
<div>
<el-input readonly style="margin-bottom: 20px" v-model="IdDetails.img2"></el-input>
<ImageUpload :isShowTip="false" :limit="1" v-model="IdDetails.img2"></ImageUpload>
</div>
</el-form-item>
<el-form-item label="审核状态">
{{getDictDatas(DICT_TYPE.AUDIT_STATUS)[IdDetails.status].label}}
</el-form-item>
<el-form-item label="审核时间" v-if="IdDetails.status === 2 || IdDetails.status === 3">
{{parseTime(IdDetails.auditTime)}}
</el-form-item>
<el-form-item v-if="IdDetails.status === 1 || IdDetails.status === 3" label="审核备注">
<el-input v-model="IdDetails.auditRemark" :disabled="IdDetails.status === 3" type="textarea"></el-input>
</el-form-item>
</el-form>
<div v-if="IdDetails.status === 1" style="text-align: center;margin-top: 20px;">
<el-button type="primary" @click="idCardAuditFn(2)">审核通过</el-button>
<el-button type="primary" @click="idCardAuditFn(3)">审核不通过</el-button>
<el-button @click="attestationShow = false"> </el-button>
</div>
<div v-if="IdDetails.status === 2 || IdDetails.status === 3" style="text-align: center;margin-top: 20px;">
<el-button type="primary" @click="setMemberUserUpdateIdCard"> </el-button>
<el-button @click="attestationShow = false"> </el-button>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="营业执照" name="2" >
<div style="width: 500px;padding:0 40px;box-sizing: border-box;">
<el-form :rules="rulesEnterprise" :model="enterpriseFrom" label-position="left" ref="formEnter" label-width="100px">
<el-form-item label="企业名称" prop="name">
<el-input v-model="enterpriseFrom.name" ></el-input>
</el-form-item>
<el-form-item label="企业法人" prop="legalName">
<el-input v-model="enterpriseFrom.legalName" ></el-input>
</el-form-item>
<el-form-item label="证件号码" prop="cardNumber">
<el-input v-model="enterpriseFrom.cardNumber"></el-input>
</el-form-item>
<el-form-item label="证件照" prop="img1">
<div>
<el-input readonly style="margin-bottom: 20px" v-model="enterpriseFrom.img1"></el-input>
<ImageUpload :isShowTip="false" :limit="1" v-model="enterpriseFrom.img1"></ImageUpload>
</div>
</el-form-item>
<el-form-item label="附件">
<el-input readonly v-model="enterpriseFrom.img2"></el-input>
<ImageUpload :isShowTip="false" :limit="1" v-model="enterpriseFrom.img2"></ImageUpload>
</el-form-item>
<el-form-item label="审核状态">{{getDictDatas(DICT_TYPE.AUDIT_STATUS)[enterpriseFrom.status].label}}</el-form-item>
<el-form-item v-if="enterpriseFrom.status === 2 || enterpriseFrom.status === 3" label="审核时间">{{parseTime(enterpriseFrom.auditTime)}}</el-form-item>
<el-form-item v-if="enterpriseFrom.status === 1 || enterpriseFrom.status === 3" label="审核备注">
<el-input v-model="enterpriseFrom.auditRemark" :disabled="enterpriseFrom.status === 3" type="textarea"></el-input>
</el-form-item>
</el-form>
<div v-if="enterpriseFrom.status === 1" style="text-align: center;margin-top: 20px;">
<el-button type="primary" @click="certificateVerificationFn(2)">审核通过</el-button>
<el-button type="primary" @click="certificateVerificationFn(3)">审核不通过</el-button>
<el-button @click="attestationShow = false"> </el-button>
</div>
<div v-if="enterpriseFrom.status === 2 || enterpriseFrom.status === 3" style="text-align: center;margin-top: 20px;">
<el-button type="primary" @click="setMemberUserUpdateEnterprise"> </el-button>
<el-button @click="attestationShow = false"> </el-button>
</div>
<div v-if="enterpriseFrom.status === 0" style="text-align: center;margin-top: 20px;">
<el-button type="primary" @click="submit"> </el-button>
<el-button @click="attestationShow = false"> </el-button>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</el-dialog>
</div>
</template>
<script>
import {
createUser,
updateUser,
deleteUser,
getUserPage,
exportUserExcel,
operationLogApi,
seTupdateBackletter,
memberGetAuthIdcardInfo,
memberGetAuthEnterpriseInfo,
memberUserAuditIdCard,
memberUserUpdateIdCard,
memberUserUpdateEnterprise, setUserUpdateStatus, userCreateAuditEnterprise
} from "@/api/member/user";
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import FileUpload from "@/components/FileUpload"
import ImageUpload from "@/components/ImageUpload";
import uploadImage from "@/components/UploadImage";
import {CommonStatusEnum} from "@/utils/constants";
import {changeUserStatus, listServiceUser, listSimpleUsers} from "@/api/system/user";
let stateId = {
0:'审核中',
1:'审核通过',
2:'审核不通过',
3:'已过期'
}
export default {
name: "underReview",
components: {
FileUpload,
ImageUpload,uploadImage
},
data() {
return {
totalLog:0,
stateId,
IdDetails:{},
enterpriseFrom:{},
guaranteeUrl:undefined,
DICT_TYPE,
getDictDatas,
// audit_status
activeName:"1",
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 用户列表
list: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeLoginDate: [],
dateRangeCreateTime: [],
// 查询参数
queryParams: {
page: 1,
rows: 10,
isDeal:undefined,// 是否成交
searchKey:undefined,//关键字
auditStatus:1,//审核状态
authType:undefined,//关键字
},
// 表单参数
form: {},
// 表单校验
rulesId: {
name: [{ required: true, message: "用户昵称不能为空", trigger: "blur" }],
cardType: [{ required: true, message: "证件类型不能为空", trigger: "blur" }],
cardNumber: [{ required: true, message: "证件号码不能为空", trigger: "blur" }],
img1: [{ required: true, message: "身份正面照不能为空", trigger: ['blur','change'] }],
img2: [{ required: true, message: "身份正面照不能为空", trigger: ['blur','change'] }],
},
rulesEnterprise: {
name: [{required: true, message: "企业名称不能为空", trigger: "blur"}],
legalName: [{required: true, message: "企业法人不能为空", trigger: "blur"}],
cardNumber: [{required: true, message: "证件号码不能为空", trigger: "blur"}],
img1: [{required: true, message: "证件照不能为空", trigger: ['blur','change']}],
},
publicObj:undefined,
operationLogShow:false,
guaranteeShow:false,
operationLogFrom:{
page:1,
row:10,
userId:undefined
},
operationLogList:[],
attestationShow:false
};
},
created() {
this.resetId();
this.resetEnterprise()
this.getList();
},
methods: {
deleteFn(row){
console.log(row)
this.$modal.confirm(`是否要删除昵称为${row.nickname}的会员`).then(function (){
return deleteUser(row.id)
}).then( res => {
if(res.code === 0) this.getList(); this.$message.success('删除成功')
}).catch(() =>{
this.$message.success('删除失败')
}
)
},
//导出
exportFn(){
this.$modal.confirm('是否确认导出所有用户数据项?').then(() => {
this.exportLoading = true;
return exportUserExcel(this.queryParams);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.exportLoading = false;
}).catch(() => {});
},
// 用户状态修改
handleStatusChange(row) {
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
this.$modal.confirm('确认要"' + text + '""' + row.nickname + '"用户吗?').then(function() {
return setUserUpdateStatus({id:row.id,status:row.status})
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
: CommonStatusEnum.ENABLE;
});
},
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeLoginDate, 'loginDate');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行查询
getUserPage(params).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 表单重置 */
resetId(){
this.IdDetails = {
auditRemark: undefined,
auditTime: undefined,
cardNumber: undefined,
cardType: 0,
createTime: undefined,
id: 0,
img1: undefined,
img2: undefined,
name: '',
status: 0,
userId: 0
}
},//清空身份证
resetEnterprise(){
this.enterpriseFrom = {
auditRemark: undefined,
auditTime: undefined,
cardNumber: undefined,
createTime: undefined,
id: undefined,
img1: undefined,
img2: undefined,
legalName: undefined,
name: undefined,
status: 0,
userId: undefined
}
},//清空企业
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeLoginDate = [];
this.dateRangeCreateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
// 保函证书
guarantee(row) {
this.publicObj = row;
this.guaranteeShow = true;
this.guaranteeUrl = row.backLetterImg;
},
// 操作日志
operationLogFn(row){
this.publicObj = row;
this.operationLogFrom.page = 1;
this.operationLogFrom.userId = row.id
this.operationLogShow = true;
this.operationLogList = [];
this.getOperationLogList();
},
getOperationLogList(){
operationLogApi(this.operationLogFrom).then(r=>{
if(r.code === 0){
this.operationLogList = r.data.list
this.totalLog = r.data.total
}
})
},
setGuarantee(){
seTupdateBackletter({userId:this.publicObj.id,backLetter:this.guaranteeUrl}).then(r=>{
if(r.code === 0){
this.publicObj.backLetterImg = this.guaranteeUrl;
this.guaranteeShow = false;
this.$message.success('保存成功');
}
})
},
identityFn(row,val){
this.attestationShow = true;
this.activeName = val;
this.publicObj = row;
if(val == 1){
this.getIdentityDetails();
}else {
this.getEnterpriseFn();
}
},
handleClick(val){
if(val.name == 1){
this.getIdentityDetails();
}else {
this.getEnterpriseFn();
}
},
getIdentityDetails(){
this.resetId();
memberGetAuthIdcardInfo({userId:this.publicObj.id}).then(r=>{
if(r.code === 0 && !!r.data){
this.IdDetails = r.data
}
})
},
getEnterpriseFn(){
this.resetEnterprise();
memberGetAuthEnterpriseInfo({userId:this.publicObj.id}).then(r => {
if(r.code === 0 && !!r.data){
this.enterpriseFrom = r.data
}
})
},
//身份证审核
idCardAuditFn(val){
let p = {
auditStatus:val,
userCardAuthId:this.IdDetails.id,
auditRemark:this.IdDetails.auditRemark
}
if(val === 2){
p.auditRemark = undefined
}
memberUserAuditIdCard(p).then(r => {
if(r.code === 0){
this.$message.success('修改成功');
this.getList()
this.getIdentityDetails()
}
})
},
// 企业证书审核
certificateVerificationFn(val){
let p = {
auditStatus:val,
userCardAuthId:this.enterpriseFrom.id,
auditRemark:this.enterpriseFrom.auditRemark
}
if(val === 2){
p.auditRemark = undefined
}
memberUserAuditEnterprise(p).then(r => {
if(r.code === 0){
this.getList()
this.getEnterpriseFn();
}
})
},
setMemberUserUpdateIdCard(){
this.$refs.formId.validate(async valid =>{
let p ={
cardNumber:this.IdDetails.cardNumber,
cardType:this.IdDetails.cardType,
img1:this.IdDetails.img1,
img2:this.IdDetails.img2,
name:this.IdDetails.name,
userCardAuthId:this.IdDetails.id,
};
if(valid && this.IdDetails.status === 3){
let res = await new Promise((resolve)=>{
this.$confirm('是否要将当前状态修改为审核成功?', '状态修改', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(r =>{
resolve(r)
}).catch((r)=>{
resolve(r)
})
})
p.auditPass = res === 'confirm' ? true : false;
} else if(valid) {
p.auditPass = false;
} else {
return
}
memberUserUpdateIdCard(p).then(r => {
if(r.code === 0){
this.$message.success('修改成功')
if(p.auditPass === true ){
this.getIdentityDetails()
}
this.getList()
}
})
})
},
setMemberUserUpdateEnterprise(){
this.$refs.formEnter.validate(async valid =>{
let p = {
cardNumber:this.enterpriseFrom.cardNumber,
img1:this.enterpriseFrom.img1,
img2:this.enterpriseFrom.img2,
legalName:this.enterpriseFrom.legalName,
name:this.enterpriseFrom.name,
userEnterpriseAuthId:this.enterpriseFrom.id,
}
if(valid && this.enterpriseFrom.status === 3){
let res = await new Promise((resolve)=>{
this.$confirm('是否要将当前状态修改为审核成功?', '状态修改', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(r =>resolve(r)).catch(r => resolve(r))
})
p.auditPass = res === 'confirm' ? true : false;
}else if(valid){
p.auditPass = false;
}else {
return
}
memberUserUpdateEnterprise(p).then(r =>{
if(r.code === 0){
if(p.auditPass === 3){
this.getEnterpriseFn();
}
this.getList()
this.$message.success('修改成功');
}
})
})
},
authentication(row){
if(!row.identityAuditStatus && !row.enterpriseAuditRemark){
return ''
}else if(row.identityAuditStatus >= 0 && row.enterpriseAuditRemark >= 0){
return '双认证'
} else if(row.identityAuditStatus >= 0){
return '身份'
}else if(row.enterpriseAuditRemark >= 0){
return '营业'
}
},
submit(){
let p = {
cardNumber:this.enterpriseFrom.cardNumber,
img1:this.enterpriseFrom.img1,
img2:this.enterpriseFrom.img2,
legalName:this.enterpriseFrom.legalName,
name:this.enterpriseFrom.name,
userEnterpriseAuthId:this.enterpriseFrom.id,
userId:this.publicObj.id
}
userCreateAuditEnterprise(p).then(r => {
console.log(r);
if(r.code === 0){
this.$message.success('添加成功!');
this.enterpriseFrom.status = 2
this.enterpriseFrom.auditTime = new Date().getTime()
this.getEnterpriseFn();
}
})
}
},
watch:{
attestationShow(newVal){
if(!newVal){
this.resetId();
this.resetEnterprise()
this.publicObj = undefined;
}
}
}
};
</script>
<style lang="scss" scoped>
.details{
.el-input {
width: 300px;
}
.el-textarea{
width: 300px;
}
}
</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