Commit 6b5ab41c authored by dragondean@qq.com's avatar dragondean@qq.com
parents 33e62754 44775d65
import request from "@/utils/request"; import request from "@/utils/request";
/** /**
* 起飞 * 二程起飞
* *
* @export * @export
* @param {*} data * @param {*} data
...@@ -23,7 +23,7 @@ import request from "@/utils/request"; ...@@ -23,7 +23,7 @@ import request from "@/utils/request";
} }
/** /**
* 到港 * 二程到港
* *
* @export * @export
* @param {*} data * @param {*} data
...@@ -32,13 +32,13 @@ import request from "@/utils/request"; ...@@ -32,13 +32,13 @@ import request from "@/utils/request";
export function arrivalCreate(data) { export function arrivalCreate(data) {
if (data.id) { if (data.id) {
return request({ return request({
url: "/ecw/box-arrival/update", url: "/ecw/box-arrival-air/update",
method: "put", method: "put",
data, data,
}); });
} }
return request({ return request({
url: "/ecw/box-arrival/create", url: "/ecw/box-arrival-air/create",
method: "post", method: "post",
data, data,
}); });
......
<template>
<div class="shippingSea-dialog">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="运输方式" prop="transportType">
<el-radio-group v-model="form.transportType">
<el-radio v-for="dict in transportTypes" :key="dict.value" :label="dict.value">{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="出货渠道" prop="shippingChannelId">
<el-select v-model="form.shippingChannelId" placeholder="请选择出货渠道">
<el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId" :key="item.channelId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="柜型" prop="cabinetId">
<el-select v-model="form.cabinetId" placeholder="请选择柜型">
<el-option v-for="item in cabinetList" :label="item.name" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="始发地" prop="startWarehouseId">
<el-select v-model="form.startWarehouseId" placeholder="请选择始发地">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的地" prop="destWarehouseId">
<el-select v-model="form.destWarehouseId" placeholder="请选择目的地">
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</div>
</template>
<script>
import { createbox, updatebox } from "@/api/ecw/box";
import { getChannelList } from '@/api/ecw/channel'
export default {
name: "editForm",
inheritAttrs: false,
props: {
transportTypes: Array,
warehouseList: Array,
cabinetList: Array,
shipmentObj: Object,
},
created() {
this.form = { ...this.shipmentObj };
this.getChannelList()
},
data() {
return {
// 表单参数
form: { transportType: '4' },
channelList: [],
// 表单校验
rules: {
shippingChannelId: [
{ required: true, message: '出货渠道不能为空', trigger: 'blur' }
],
cabinetId: [
{ required: true, message: '柜型不能为空', trigger: 'blur' }
],
startWarehouseId: [
{ required: true, message: '始发地不能为空', trigger: 'blur' }
],
destWarehouseId: [
{ required: true, message: '目的地不能为空', trigger: 'blur' }
]
}
};
},
methods: {
getChannelList() {
getChannelList().then((res) => (this.channelList = res.data))
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate((valid) => {
if (!valid) {
return
}
this.form.transportType = 4
// 修改的提交
if (this.form.id != null) {
updatebox(this.form).then((response) => {
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
return
}
// 添加的提交
createbox(this.form).then((response) => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
})
},
/** 取消按钮 */
cancel() {
this.$emit("closeDialog");
},
},
computed: {
exportWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == "2" || item.type == "3"
);
},
importWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == "1" || item.type == "3"
);
},
},
};
</script>
<style lang="scss">
// 海运操作统一弹窗样式
.shippingSea-dialog {
// 页面内元素弹窗form控件宽度设置
.el-form-item__content {
> div:not(.el-input-number) {
width: 100%;
}
}
.operate-button {
text-align: center;
}
.two-element-formItem {
display: flex;
> :last-child {
width: 100%;
margin-left: 10px;
}
}
.two-element {
.el-form-item__content {
display: flex;
> :last-child {
margin-left: 10px;
}
}
}
}
</style>
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="自编号" prop="selfNo"> <el-form-item label="自编号" prop="selfNo">
<el-input v-model="queryParams.selfNo" placeholder="请输入自编号" clearable @keyup.enter.native="handleQuery"/> <el-input
v-model="queryParams.selfNo"
placeholder="请输入自编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="柜号" prop="cubNo"> <el-form-item label="柜号" prop="cubNo">
<el-input v-model="queryParams.cubNo" placeholder="请输入柜号" clearable @keyup.enter.native="handleQuery"/> <el-input
v-model="queryParams.cubNo"
placeholder="请输入柜号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="柜型" prop="cabinetId"> <el-form-item label="柜型" prop="cabinetId">
<el-select v-model="queryParams.cabinetId" placeholder="请选择柜型"> <el-select v-model="queryParams.cabinetId" placeholder="请选择柜型">
<el-option v-for="item in cabinetList" :label="item.name" :value="item.name" :key="item.id"></el-option> <el-option
v-for="item in cabinetList"
:label="item.name"
:value="item.name"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="始发地" prop="startWarehouseId"> <el-form-item label="始发地" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" placeholder="请选择始发地"> <el-select
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> v-model="queryParams.startWarehouseId"
placeholder="请选择始发地"
>
<el-option
v-for="item in exportWarehouseList"
:label="item.titleZh"
:value="item.id"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="目的地" prop="destWarehouseId"> <el-form-item label="目的地" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" placeholder="请选择目的地"> <el-select
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> v-model="queryParams.destWarehouseId"
placeholder="请选择目的地"
>
<el-option
v-for="item in importWarehouseList"
:label="item.titleZh"
:value="item.id"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="" prop="date"> <el-form-item label="" prop="date">
<el-select v-model="queryParams.dateType" placeholder="请选择时间类型" clearable size="small"> <el-select
<el-option v-for="item in dateTypes" :key="item.value" :label="item.label" :value="item.value" /> v-model="queryParams.dateType"
placeholder="请选择时间类型"
clearable
size="small"
>
<el-option
v-for="item in dateTypes"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" <el-date-picker
type="datetimerange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"/> v-model="queryParams.dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="boxStatus"> <el-form-item label="状态" prop="boxStatus">
<el-select v-model="queryParams.boxStatus" placeholder="请选择状态" clearable size="small"> <el-select
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_STATUS)" v-model="queryParams.boxStatus"
:key="dict.value" :label="dict.label" :value="dict.value"/> placeholder="请选择状态"
clearable
size="small"
>
<el-option
v-for="dict in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -56,23 +119,38 @@ ...@@ -56,23 +119,38 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button
v-hasPermi="['shipment:box:create']">出货安排 type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['shipment:box:create']"
>出货安排
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" <el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
:loading="exportLoading" :loading="exportLoading"
v-hasPermi="['shipment:box:export']">导出 v-hasPermi="['shipment:box:export']"
>导出
</el-button> </el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column label="自编号" align="center" prop="selfNo"/> <el-table-column label="自编号" align="center" prop="selfNo" />
<el-table-column label="柜号" align="center" prop="cubNo"/> <el-table-column label="柜号" align="center" prop="cubNo" />
<el-table-column label="柜型" align="center" prop="cabinetId"> <el-table-column label="柜型" align="center" prop="cabinetId">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getCabinetName(scope.row.cabinetId) }}</span> <span>{{ getCabinetName(scope.row.cabinetId) }}</span>
...@@ -80,7 +158,10 @@ ...@@ -80,7 +158,10 @@
</el-table-column> </el-table-column>
<el-table-column label="运输方式" align="center" prop="transportType"> <el-table-column label="运输方式" align="center" prop="transportType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportType"/> <dict-tag
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
:value="scope.row.transportType"
/>
</template> </template>
</el-table-column> </el-table-column>
...@@ -90,25 +171,36 @@ ...@@ -90,25 +171,36 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="方数(预装/已装)" align="center" prop="squareNumber"> <el-table-column
<template slot-scope="{row}"> label="方数(预装/已装)"
{{row.boxStatistics.volume}}/{{row.boxStatistics.loadVolume}} align="center"
prop="squareNumber"
>
<template slot-scope="{ row }">
{{ row.boxStatistics.volume }}/{{ row.boxStatistics.loadVolume }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="重量(预装/已装)" align="center" prop="weight"> <el-table-column label="重量(预装/已装)" align="center" prop="weight">
<template slot-scope="{row}"> <template slot-scope="{ row }">
{{row.boxStatistics.weight}}/{{row.boxStatistics.loadWeight}} {{ row.boxStatistics.weight }}/{{ row.boxStatistics.loadWeight }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" prop="shipmentStatusText" /> <el-table-column label="状态" align="center" prop="shipmentStatusText" />
<el-table-column label="日期" align="center" prop="createTime" width="180"> <el-table-column
label="日期"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss') }}</span> <span>{{
new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss')
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)" <!-- <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"
v-hasPermi="['shipment:box:query']">查看</el-button> v-hasPermi="['shipment:box:query']">查看</el-button>
...@@ -116,89 +208,123 @@ ...@@ -116,89 +208,123 @@
v-hasPermi="['shipment:box:update']">修改</el-button> v-hasPermi="['shipment:box:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['shipment:box:delete']">删除</el-button> --> v-hasPermi="['shipment:box:delete']">删除</el-button> -->
<el-dropdown trigger="click" @command="(command)=>handleCommand(scope.row, command)"> <el-dropdown
trigger="click"
@command="(command) => handleCommand(scope.row, command)"
style="marginRight:10px;"
>
<el-button type="primary"> <el-button type="primary">
操作<i class="el-icon-arrow-down el-icon--right"></i> 操作<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="edit">编辑</el-dropdown-item> <el-dropdown-item command="edit">编辑</el-dropdown-item>
<el-dropdown-item command="seaAir">操作-海空联运</el-dropdown-item> <el-dropdown-item command="seaAir"
>操作-海空联运</el-dropdown-item
>
<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-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-dropdown trigger="click">
<el-button type="primary">
下载<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="">预装单</el-dropdown-item>
<el-dropdown-item command="">已装单</el-dropdown-item>
<el-dropdown-item command="">应收汇总表</el-dropdown-item>
<el-dropdown-item command="">agent list</el-dropdown-item>
<el-dropdown-item command="">son cap</el-dropdown-item>
<el-dropdown-item command="">提货单</el-dropdown-item>
<el-dropdown-item command="">提单Copy</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" <pagination
@pagination="getList"/> v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <el-dialog
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> :title="dialogCfg.title"
:visible.sync="dialogCfg.open"
<el-form-item label="运输方式" prop="transportType"> :width="dialogCfg.width"
<el-radio-group v-model="form.transportType"> :fullscreen="dialogCfg.fullscreen"
<el-radio v-for="dict in transportTypes" :key="dict.value" :label="dict.value">{{dict.label}}</el-radio> append-to-body
</el-radio-group> class="shippingSea-dialog"
</el-form-item> >
<template
<el-form-item label="出货渠道" prop="shippingChannelId"> v-if="
<el-select v-model="form.shippingChannelId" placeholder="请选择出货渠道"> dialogCfg.dialogType === 'edit' || dialogCfg.dialogType === 'add'
<el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId" :key="item.channelId"></el-option> "
</el-select> >
</el-form-item> <editForm
v-if="dialogCfg.open"
<el-form-item label="柜型" prop="cabinetId"> @closeDialog="closeDialog"
<el-select v-model="form.cabinetId" placeholder="请选择柜型"> :shipmentObj="currRow"
<el-option v-for="item in cabinetList" :label="item.name" :value="item.id" :key="item.id"></el-option> :warehouseList="warehouseList"
</el-select> :transportTypes="transportTypes"
</el-form-item> :cabinetList="cabinetList"
/>
<el-form-item label="始发地" prop="startWarehouseId"> </template>
<el-select v-model="form.startWarehouseId" placeholder="请选择始发地"> <template v-if="dialogCfg.dialogType === 'cost'">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <costForm
</el-select> v-if="dialogCfg.open"
</el-form-item> @closeDialog="closeDialog"
:shipmentObj="currRow"
<el-form-item label="目的地" prop="destWarehouseId"> />
<el-select v-model="form.destWarehouseId" placeholder="请选择目的地"> </template>
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <template v-if="dialogCfg.dialogType === 'error'">
</el-select> <regError
</el-form-item> v-if="dialogCfg.open"
@closeDialog="closeDialog"
</el-form> :shipmentObj="currRow"
<div slot="footer" class="dialog-footer"> />
<el-button type="primary" @click="submitForm">确 定</el-button> </template>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {createbox, updatebox, deletebox, getbox, getboxPage, exportboxExcel} from "@/api/ecw/box"; import {
import {getCabinetPage} from "@/api/ecw/cabinet"; deletebox,
import { getChannelList } from '@/api/ecw/channel'; getbox,
import { getWarehouseList } from "@/api/ecw/warehouse" getboxPage,
exportboxExcel
export default { } from '@/api/ecw/box'
name: "box", import { getCabinetPage } from '@/api/ecw/cabinet'
components: {}, import { getChannelList } from '@/api/ecw/channel'
import { getWarehouseList } from '@/api/ecw/warehouse'
import costForm from './costForm.vue'
import regError from './regError.vue'
import editForm from './editSeaAirForm.vue'
export default {
name: 'box',
components: {
costForm,
regError,
editForm
},
data() { data() {
return { return {
dateTypes:[ dateTypes: [
{value:'1', label:'预装时间'}, { value: '1', label: '预装时间' },
{value:'2', label:'装柜时间'}, { value: '2', label: '装柜时间' },
{value:'3', label:'起运时间'}, { value: '3', label: '起运时间' },
{value:'4', label:'到港时间'}, { value: '4', label: '到港时间' },
{value:'5', label:'清关时间'}, { value: '5', label: '清关时间' },
{value:'6', label:'提货时间'}, { value: '6', label: '提货时间' }
], ],
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -210,9 +336,19 @@ ...@@ -210,9 +336,19 @@
// 出货列表 // 出货列表
list: [], list: [],
// 弹出层标题 // 弹出层标题
title: '',
// 是否显示弹出层
open: false,
dialogCfg: {
title: "", title: "",
dialogType: "",
width: "600px",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
fullscreen: false,
},
// 当前行
currRow: {},
dateRangeCreateTime: [], dateRangeCreateTime: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {
...@@ -225,37 +361,31 @@ ...@@ -225,37 +361,31 @@
boxStatus: null, boxStatus: null,
startWarehouseId: null, startWarehouseId: null,
destWarehouseId: null, destWarehouseId: null,
transportType: null, transportType: null
}, },
cabinetList:[], cabinetList: [],
channelList:[], channelList: [],
warehouseList: [], warehouseList: [],
// 表单参数
form: {transportType:"4"},
// 表单校验
rules: {
shippingChannelId: [{ required: true, message: "出货渠道不能为空", trigger: "blur" }],
cabinetId: [{ required: true, message: "柜型不能为空", trigger: "blur" }],
startWarehouseId: [{ required: true, message: "始发地不能为空", trigger: "blur" }],
destWarehouseId: [{ required: true, message: "目的地不能为空", trigger: "blur" }],
} }
};
}, },
computed: { computed: {
exportWarehouseList() { exportWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == '2' || item.type == '3') return this.warehouseList.filter(
(item) => item.tradeType == '2' || item.type == '3'
)
}, },
importWarehouseList() { importWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == '1' || item.type == '3') return this.warehouseList.filter(
(item) => item.tradeType == '1' || item.type == '3'
)
}, },
getCabinetName() { getCabinetName() {
return cabinetId => { return (cabinetId) => {
for (let index in this.cabinetList) { for (let index in this.cabinetList) {
let cabinetItem = this.cabinetList[index]; let cabinetItem = this.cabinetList[index]
if (cabinetItem.id == cabinetId) { if (cabinetItem.id == cabinetId) {
return cabinetItem.name; return cabinetItem.name
} }
} }
return '/' return '/'
...@@ -263,53 +393,51 @@ ...@@ -263,53 +393,51 @@
}, },
getShipChannelName() { getShipChannelName() {
return shippingChannelId => { return (shippingChannelId) => {
for (let index in this.channelList) { for (let index in this.channelList) {
let channelItem = this.channelList[index]; let channelItem = this.channelList[index]
if (channelItem.channelId == shippingChannelId) { if (channelItem.channelId == shippingChannelId) {
return channelItem.nameZh; return channelItem.nameZh
} }
} }
return '/' return '/'
} }
} }
}, },
created() { created() {
this.transportTypes = this.getDictDatas( this.transportTypes = this.getDictDatas(
this.DICT_TYPE.ECW_TRANSPORT_TYPE this.DICT_TYPE.ECW_TRANSPORT_TYPE
).filter((item) => item.value == "4"); ).filter((item) => item.value == '4')
getWarehouseList().then(res => this.warehouseList = res.data); getWarehouseList().then((res) => (this.warehouseList = res.data))
getCabinetPage(null).then(response => { getCabinetPage(null).then((response) => {
this.cabinetList = response.data.list; this.cabinetList = response.data.list
}); })
this.getList(); this.getList()
this.getChannelList(); this.getChannelList()
}, },
methods: { methods: {
getChannelList(){ getChannelList() {
getChannelList().then(res => this.channelList = res.data) getChannelList().then((res) => (this.channelList = res.data))
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true
// 处理查询参数 // 处理查询参数
let params = {...this.queryParams}; let params = { ...this.queryParams }
params.transportType = 4; params.transportType = 4
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime')
// 执行查询 // 执行查询
getboxPage(params).then(response => { getboxPage(params).then((response) => {
this.list = response.data.list; this.list = response.data.list
this.total = response.data.total; this.total = response.data.total
this.loading = false; this.loading = false
}); })
}, },
/** 取消按钮 */ /** 取消按钮 */
cancel() { cancel() {
this.open = false; this.open = false
this.reset(); this.reset()
}, },
/** 表单重置 */ /** 表单重置 */
reset() { reset() {
...@@ -318,107 +446,113 @@ ...@@ -318,107 +446,113 @@
cabinetId: undefined, cabinetId: undefined,
startWarehouseId: undefined, startWarehouseId: undefined,
destWarehouseId: undefined, destWarehouseId: undefined,
transportType: "4", transportType: '4'
}; }
this.resetForm("form"); this.resetForm('form')
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1; this.queryParams.pageNo = 1
this.getList(); this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRangeCreateTime = []; this.dateRangeCreateTime = []
this.resetForm("queryForm"); this.resetForm('queryForm')
this.handleQuery(); this.handleQuery()
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.$set(this.dialogCfg, "title", "添加出货");
this.open = true; this.$set(this.dialogCfg, "dialogType", "add");
this.title = "添加出货"; this.$set(this.dialogCfg, "width", "600px");
this.$set(this.dialogCfg, "fullscreen", false);
this.$set(this.dialogCfg, "open", true);
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset();
const id = row.id; const id = row.id;
getbox(id).then(response => { getbox(id).then((response) => {
this.form = response.data; this.currRow = response.data;
this.open = true; this.$set(this.dialogCfg, "title", "修改出货");
this.title = "修改出货"; this.$set(this.dialogCfg, "dialogType", "edit");
this.$set(this.dialogCfg, "width", "600px");
this.$set(this.dialogCfg, "open", true);
}); });
}, },
/** 提交按钮 */ /* 关闭弹窗 */
submitForm() { closeDialog(type) {
this.$refs["form"].validate(valid => { this.$set(this.dialogCfg, "open", false);
if (!valid) { if (type === "add" || type === "edit") {
return;
}
this.form.transportType = 4;
// 修改的提交
if (this.form.id != null) {
updatebox(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList(); this.getList();
});
return;
} }
// 添加的提交
createbox(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id
this.$modal.confirm('是否确认删除出货编号为"' + id + '"的数据项?').then(function () { this.$modal
return deletebox(id); .confirm('是否确认删除出货编号为"' + id + '"的数据项?')
}).then(() => { .then(function () {
this.getList(); return deletebox(id)
this.$modal.msgSuccess("删除成功"); })
}).catch(() => { .then(() => {
}); this.getList()
this.$modal.msgSuccess('删除成功')
})
.catch(() => {})
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
// 处理查询参数 // 处理查询参数
let params = {...this.queryParams}; let params = { ...this.queryParams }
params.pageNo = undefined; params.pageNo = undefined
params.pageSize = undefined; params.pageSize = undefined
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime')
// 执行导出 // 执行导出
this.$modal.confirm('是否确认导出所有出货数据项?').then(() => { this.$modal
this.exportLoading = true; .confirm('是否确认导出所有出货数据项?')
return exportboxExcel(params); .then(() => {
}).then(response => { this.exportLoading = true
this.$download.excel(response, '${table.classComment}.xls'); return exportboxExcel(params)
this.exportLoading = false; })
}).catch(() => { .then((response) => {
}); this.$download.excel(response, '${table.classComment}.xls')
this.exportLoading = false
})
.catch(() => {})
}, },
/** 查看按钮操作 */ /** 查看按钮操作 */
handleCommand(row, command) { handleCommand(row, command) {
this.$set(this.dialogCfg, "fullscreen", false);
switch (command) { switch (command) {
case 'seaAir': case 'seaAir':
this.$router.push('/boxSeaAir/shippingSeaAir/' + row.id) this.$router.push('/boxSeaAir/shippingSeaAir/' + row.id)
break; break
case 'edit': case 'edit':
this.handleUpdate(row); this.handleUpdate(row)
break; break
case 'delete': case 'delete':
this.handleDelete(row); this.handleDelete(row)
break; break
case 'cost':
this.$set(this.dialogCfg, 'title', '费用登记')
break
case 'error':
this.$set(this.dialogCfg, 'title', '异常登记')
break
}
if (["editLadingBill", "cost", "error"].includes(command)) {
this.currRow = row;
this.$set(this.dialogCfg, "dialogType", command);
this.$set(this.dialogCfg, "width", "600px");
this.$set(this.dialogCfg, "open", true);
}
} }
},
} }
}; }
</script> </script>
<template> <template>
<div> <div>
<el-form ref="twoWayArrivalForm" :rules="rules" :model="twoWayArrivalObj" label-width="120px"> <el-form ref="twoWayArrivalForm" :rules="rules" :model="twoWayArrivalObj" label-width="120px">
<el-form-item label="实际到港时间" prop="apRealTime"> <el-form-item label="预计到达时间" prop="estTime">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="twoWayArrivalObj.apRealTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" placeholder="请选择日期" v-model="twoWayArrivalObj.estTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="确认到港时间" prop="apConfirmTime"> <el-form-item label="实际到达时间" prop="actTime">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="twoWayArrivalObj.apConfirmTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" placeholder="请选择日期" v-model="twoWayArrivalObj.actTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="卸港时间" prop="apUnloadPortTime"> <el-form-item label="实际二程时间" prop="actSecondTime">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="twoWayArrivalObj.apUnloadPortTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" placeholder="请选择日期" v-model="twoWayArrivalObj.actSecondTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -46,9 +46,7 @@ export default { ...@@ -46,9 +46,7 @@ export default {
twoWayArrivalObj: {}, twoWayArrivalObj: {},
// 校验 // 校验
rules: { rules: {
actHeadTime: [{ required: true, message: "必填", trigger: "blur" }], actTime: [{ required: true, message: "必填", trigger: "blur" }]
estHeadTime: [{ required: true, message: "必填", trigger: "blur" }],
estSecondTime: [{ required: true, message: "必填", trigger: "blur" }],
}, },
// 弹窗配置 // 弹窗配置
dialogVisible: false, dialogVisible: false,
...@@ -59,9 +57,9 @@ export default { ...@@ -59,9 +57,9 @@ export default {
created() { created() {
const voName = this.$attrs.currNode.voName; const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] }; let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, ["apConfirmTime"], "YYYY-MM-DD HH:mm:ss"); oldData = formatDateStr(oldData, ["actTime"], "YYYY-MM-DD HH:mm:ss");
oldData = formatDateStr(oldData, ["apRealTime"], "YYYY-MM-DD HH:mm:ss"); oldData = formatDateStr(oldData, ["actSecondTime"], "YYYY-MM-DD HH:mm:ss");
oldData = formatDateStr(oldData, ["apUnloadPortTime"], "YYYY-MM-DD HH:mm:ss"); oldData = formatDateStr(oldData, ["estTime"], "YYYY-MM-DD HH:mm:ss");
this.twoWayArrivalObj = oldData; this.twoWayArrivalObj = oldData;
}, },
watch: { watch: {
......
...@@ -789,7 +789,7 @@ function seaBaseData() { ...@@ -789,7 +789,7 @@ function seaBaseData() {
/** /**
* 清关状态:131、未清关;132、已清关 * 清关状态:131、未清关;132、已清关
*/ */
voName: "arrivalInfo", voName: "airArrivalInfo",
keyName: "sapStatus", keyName: "sapStatus",
status: { status: {
start: [151], start: [151],
...@@ -1172,6 +1172,48 @@ function getColmnMapping() { ...@@ -1172,6 +1172,48 @@ function getColmnMapping() {
key: "operator", key: "operator",
}, },
], ],
takeOffInfo: [
{
title: "预计头程时间",
key: "estHeadTime",
type: "datetime",
},
{
title: "实际头程时间",
key: "actHeadTime",
type: "datetime",
},
{
title: "预计二程时间",
key: "estSecondTime",
type: "date",
},
{
title: "业务员",
key: "operator",
},
],
airArrivalInfo: [
{
title: "预计到达时间",
key: "estTime",
type: "datetime",
},
{
title: "实际到达时间",
key: "actTime",
type: "datetime",
},
{
title: "实际二程时间",
key: "actSecondTime",
type: "datetime",
},
{
title: "业务员",
key: "operator",
},
],
cabinetUnloadInfo: [ cabinetUnloadInfo: [
{ {
title: "到仓时间", title: "到仓时间",
......
...@@ -15,16 +15,28 @@ ...@@ -15,16 +15,28 @@
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="联系方式">
<el-input placeholder="请输入联系方式" v-model="queryParams.defaultContactPhone"></el-input>
</el-form-item>
<el-form-item label="客户类别" prop="level">
<dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" multiple v-model="queryParams.type"></dict-selector>
</el-form-item>
<el-form-item label="客户经理" prop="customerService">
<el-select v-model="queryParams.customerService" placeholder="请选择客户经理" clearable size="small">
<el-option v-for="dict in customerServiceList"
:key="dict.id" :label="dict.nickname" :value="dict.id"/>
</el-select>
</el-form-item>
<el-form-item label="客户来源" prop="source"> <el-form-item label="客户来源" prop="source">
<el-select v-model="queryParams.source" placeholder="请选择客户来源" clearable size="small"> <el-select v-model="queryParams.source" placeholder="请选择客户来源" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户经理" prop="customerService"> <el-form-item label="国家" prop="source">
<el-select v-model="queryParams.customerService" placeholder="请选择客户经理" clearable size="small"> <el-select v-model="form.country" placeholder="请选择国家">
<el-option v-for="dict in customerServiceList" <el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nickname" :value="dict.id"/> :key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户状态" prop="status"> <el-form-item label="客户状态" prop="status">
...@@ -33,13 +45,15 @@ ...@@ -33,13 +45,15 @@
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="部门" prop="department">
<el-input v-model="queryParams.department" placeholder="请输入部门" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="创建时间"> <el-form-item label="创建时间">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd" <el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" /> type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item> </el-form-item>
<el-form-item label="信用等级" prop="department">
<el-select v-model="form.ww" >
<el-option v-for="(item,index) in creditList" :label="item.nameZh" :key="index" :value="item.id" ></el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
...@@ -56,36 +70,42 @@ ...@@ -56,36 +70,42 @@
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['ecw:customer:export']">导出</el-button> v-hasPermi="['ecw:customer:export']">导出</el-button>
</el-col> </el-col>
<el-col :span="1.5" >
<el-button :disabled="selectCustomerList.length === 0" type="warning" plain icon="el-icon-download" size="mini" @click="transferShow = true;" :loading="exportLoading"
v-hasPermi="['ecw:customer:export']">批量移交</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table ref="multipleTable" v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column label="客户编号" align="center" prop="number" /> <el-table-column label="客户编号" align="center" prop="number" />
<el-table-column label="客户名称" align="center" prop="name" /> <el-table-column label="客户名称" align="center" prop="name" />
<el-table-column label="客户等级" align="center" prop="level"> <el-table-column label="客户等级" align="center" prop="vipLevelNameZh">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" /> <dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="国家" align="center" prop="country" :formatter="countryFormatter"></el-table-column> <el-table-column label="信用等级" prop="creditLevelNameZh"></el-table-column>
<el-table-column label="客户经理" align="center" prop="customerService" :formatter="customerServiceFn">
</el-table-column>
<el-table-column label="客户状态" align="center" prop="status"> <el-table-column label="客户状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="部门" align="center" prop="department"> <el-table-column label="主联系人" prop="defaultContactName"></el-table-column>
<template v-slot:default="scope"> <el-table-column label="主联系方式" prop="defaultContactPhone"></el-table-column>
{{scope.row.department}}
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="客户经理" align="center" prop="customerService" :formatter="customerServiceFn">
</el-table-column>
<el-table-column label="国家" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)" <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"
...@@ -451,6 +471,7 @@ ...@@ -451,6 +471,7 @@
</el-dialog> </el-dialog>
<customer-follow-list :customer-id="customerId" :id="customerId" ref="CustomerFollowList"></customer-follow-list> <customer-follow-list :customer-id="customerId" :id="customerId" ref="CustomerFollowList"></customer-follow-list>
<customer-complaints :customer-id="customerId" ref="customerComplaints"></customer-complaints> <customer-complaints :customer-id="customerId" ref="customerComplaints"></customer-complaints>
<transfer-customer :show.sync="transferShow" :customer-ids.sync="selectCustomerList"></transfer-customer>
</div> </div>
</template> </template>
...@@ -467,13 +488,16 @@ import CustomerFollowList from "@/components/CustomerFollowList" ...@@ -467,13 +488,16 @@ import CustomerFollowList from "@/components/CustomerFollowList"
import customerComplaints from "@/components/customerComplaints" import customerComplaints from "@/components/customerComplaints"
import {listServiceUser} from "@/api/system/user"; import {listServiceUser} from "@/api/system/user";
import { getCountryListAll } from '@/api/ecw/country' import { getCountryListAll } from '@/api/ecw/country'
import {getCreditPage} from "@/api/customer/credit";
import transferCustomer from "@/views/ecw/customer/transferCustomer";
export default { export default {
name: "Customer", name: "Customer",
components: { components: {
upload, upload,
CustomerFollowList, CustomerFollowList,
customerComplaints customerComplaints,
transferCustomer
}, },
data() { data() {
return { return {
...@@ -525,11 +549,16 @@ export default { ...@@ -525,11 +549,16 @@ export default {
showLine: false, showLine: false,
customerId:undefined, customerId:undefined,
customerServiceList:[], customerServiceList:[],
countryList: [],
countryList: [] creditList:[],
selectCustomerList:[],
transferShow:false
}; };
}, },
created() { created() {
getCreditPage({page:1,rows:999}).then(r => {
this.creditList = r.data.list
})
this.getList(); this.getList();
// getNodeList().then(r => { // getNodeList().then(r => {
// this.nodeList = r.data // this.nodeList = r.data
...@@ -682,7 +711,6 @@ export default { ...@@ -682,7 +711,6 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
// 处理查询参数 // 处理查询参数
let params = {...this.queryParams}; let params = {...this.queryParams};
params.pageNo = undefined; params.pageNo = undefined;
params.pageSize = undefined; params.pageSize = undefined;
...@@ -693,6 +721,8 @@ export default { ...@@ -693,6 +721,8 @@ export default {
return exportCustomerExcel(params); return exportCustomerExcel(params);
}).then(response => { }).then(response => {
this.$download.excel(response, '客户信息.xls'); this.$download.excel(response, '客户信息.xls');
console.log(response,'response')
this.$download.excel(response, '全部客户信息.xls');
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); }).catch(() => {});
}, },
...@@ -707,7 +737,18 @@ export default { ...@@ -707,7 +737,18 @@ export default {
this.$nextTick(()=>{ this.$nextTick(()=>{
this.$refs.customerComplaints.handleAdd(); this.$refs.customerComplaints.handleAdd();
}) })
},
handleSelectionChange(val){
this.selectCustomerList = val.map(i => i.id);
} }
},
watch:{
selectCustomerList(val){
if(val.length === 0){
this.$refs.multipleTable.clearSelection();
}
},
} }
}; };
</script> </script>
<template>
<el-dialog
center
title="客服"
:visible.sync="show"
width="30%">
<div style="width: 100%;min-height: 200px;text-align: center">
<el-select filterable v-model="service">
<el-option v-for="(item,index) in customerServiceList" :key="index" :label="item.nickname" :value="item.id"></el-option>
</el-select>
</div>
<span slot="footer" class="dialog-footer">
<el-button >取 消</el-button>
<el-button type="primary" @click="submit">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import {listServiceUser} from "@/api/system/user";
import {handOverCustomer} from "@/api/ecw/customer";
export default {
name: "transferCustomer",
props:{
show:{
type:Boolean ,
default:false
},
customerIds:[Array,String],
tableName:String
},
created() {
listServiceUser().then(r=>{
this.customerServiceList = r.data;
})
},
computed:{
getCustomerIds(){
if(this.customerIds instanceof Array) return this.customerIds
else return this.customerIds.split(',')
}
},
data(){
return {
customerServiceList:[],
service:'',
}
},
methods:{
submit(){
if(!this.service){
return this.$message.warning('请选择客户经理!');
}
handOverCustomer({
customerServiceId:this.service,
customerIdList:this.getCustomerIds
}).then(r=>{
if(r.code === 0){
this.$emit('update:show',false)
this.$emit('update:customerIds',[])
this.$message.success('用户批量转移成功!')
}
})
},
}
}
</script>
<style scoped>
</style>
...@@ -22,50 +22,50 @@ ...@@ -22,50 +22,50 @@
</div> </div>
<el-descriptions :column="3" border class="card"> <el-descriptions :column="3" border class="card">
<el-descriptions-item :label="$t('发货人:')"> <el-descriptions-item :label="$t('发货人:')">
{{consigneeData.length>0?consigneeData[0].customerName||$t(''):$t('')}} {{consignorData.contactsName||$t('')}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('手机号:')"> <el-descriptions-item :label="$t('手机号:')">
{{consigneeData.length>0?(checkCode(consigneeData[0].areaCode)+consigneeData[0].phoneNew)||$t(''):$t('')}} {{consignorData?(checkCode(consignorData.areaCode)+consignorData.phoneNew)||$t(''):$t('')}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('联系地址:')"> <el-descriptions-item :label="$t('联系地址:')">
{{consigneeData.length>0?consigneeData[0].address||$t(''):$t('')}} {{consignorData.address||$t('')}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('客户来源:')"> <el-descriptions-item :label="$t('客户来源:')">
{{consigneeData.length>0?consigneeData[0].source||$t(''):$t('')}} {{consignorData.source||$t('')}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('发货人公司名称:')"> <el-descriptions-item :label="$t('发货人公司名称:')">
{{consigneeData.length>0?consigneeData[0].company||$t(''):$t('')}} {{consignorData.company||$t('')}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('社交软件:')"> <el-descriptions-item :label="$t('社交软件:')">
{{consigneeData.length>0?consigneeData[0].social||$t(''):$t('')+' '+consigneeData.length>0?consigneeData[0].socialNumber||'':''}} {{consignorData.social||$t('')+' '+consignorData.socialNumber||''}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="3" border class="card"> <el-descriptions :column="3" border class="card">
<el-descriptions-item :label="$t('收货人:')"> <el-descriptions-item :label="$t('收货人:')">
{{consigneeData.length>1?consigneeData[1].customerName||$t(''):$t('')}} {{consigneeData.contactsName||$t('')}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('手机号:')"> <el-descriptions-item :label="$t('手机号:')">
{{consigneeData.length>1?(checkCode(consigneeData[1].areaCode)+consigneeData[1].phoneNew)||$t(''):$t('')}} {{consigneeData?(checkCode(consigneeData.areaCode)+consigneeData.phoneNew)||$t(''):$t('')}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('联系地址:')"> <el-descriptions-item :label="$t('联系地址:')">
{{consigneeData.length>1?consigneeData[1].address||$t(''):$t('')}} {{consigneeData.address||$t('')}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('客户来源:')"> <el-descriptions-item :label="$t('客户来源:')">
{{consigneeData.length>1?consigneeData[1].source||$t(''):$t('')}} {{consigneeData.source||$t('')}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('收货人公司名称:')"> <el-descriptions-item :label="$t('发货人公司名称:')">
{{consigneeData.length>1?consigneeData[1].company||$t(''):$t('')}} {{consigneeData.company||$t('')}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('社交软件:')"> <el-descriptions-item :label="$t('社交软件:')">
{{consigneeData.length>1?consigneeData[1].social||$t(''):$t('')+' '+consigneeData.length>1?consigneeData[1].socialNumber||'':''}} {{consigneeData.social||$t('')+' '+consigneeData.socialNumber||''}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="4" class="card"> <el-descriptions :column="4" class="card">
<el-descriptions-item :label="$t('运输方式')"> <el-descriptions-item :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="list.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="list.transportId" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')"> <el-descriptions-item :label="$t('出货渠道')" v-if="[3,4].indexOf(list.transportId) > -1">
{{channelName}} {{channelName}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
...@@ -339,7 +339,7 @@ ...@@ -339,7 +339,7 @@
</template> </template>
<script> <script>
import {DICT_TYPE} from '@/utils/dict' import {DICT_TYPE,getDictDatas} from '@/utils/dict'
import {getOffer,deleteOffer} from '@/api/ecw/offer' import {getOffer,deleteOffer} from '@/api/ecw/offer'
import {getProductAttrList} from '@/api/ecw/productAttr' import {getProductAttrList} from '@/api/ecw/productAttr'
import {getCustomerList,getCustomer} from '@/api/ecw/customer' import {getCustomerList,getCustomer} from '@/api/ecw/customer'
...@@ -364,7 +364,7 @@ ...@@ -364,7 +364,7 @@
productAttrList:[], productAttrList:[],
offerId:0, offerId:0,
//发货/收货人信息 //发货/收货人信息
consigneeData:[], consigneeData:{},
routerList:[], routerList:[],
channelName:'/', channelName:'/',
tradeCityList:[], tradeCityList:[],
...@@ -372,6 +372,8 @@ ...@@ -372,6 +372,8 @@
currencyList:[], currencyList:[],
unitList:[], unitList:[],
orderData:[], orderData:[],
consignorData:{},
customerSource: getDictDatas(DICT_TYPE.CUSTOMER_SOURCE),
couponAvailableGroupDtoList: [], // 可用优惠 couponAvailableGroupDtoList: [], // 可用优惠
couponTotalAmountList: [], // 优惠总额 couponTotalAmountList: [], // 优惠总额
}; };
...@@ -391,7 +393,6 @@ ...@@ -391,7 +393,6 @@
}) })
return map return map
}, },
// 总有优惠金额 // 总有优惠金额
couponList(){ couponList(){
let arr = [] let arr = []
...@@ -414,7 +415,11 @@ ...@@ -414,7 +415,11 @@
}, },
// 计算返回的费用清单 // 计算返回的费用清单
feeDtoList(){ feeDtoList(){
if(this.list&&this.list.estCostVO){
return this.list.estCostVO.feeDtoList || [] return this.list.estCostVO.feeDtoList || []
}else{
return []
}
}, },
// 清关费 // 清关费
clearanceFeeList(){ clearanceFeeList(){
...@@ -466,7 +471,16 @@ ...@@ -466,7 +471,16 @@
} }
}, },
methods: { methods: {
sourceLabel(data){
let label=''
var source = this.customerSource.find(item=>item.value==data)
if(source) label = source.label
return label
},
checkCode(data){ checkCode(data){
if(!data){
return ''
}
if(data.indexOf('+')==-1){ if(data.indexOf('+')==-1){
return '+'+data return '+'+data
} }
...@@ -524,9 +538,11 @@ ...@@ -524,9 +538,11 @@
if(that.list.orderId){ if(that.list.orderId){
that.getOrderData(that.list.orderId) that.getOrderData(that.list.orderId)
} }
getCustomerContactsSelect({ids: [that.list.consigneeId, that.list.consignorId].join(',')}).then((res) => { getCustomerContactsSelect({ids: [that.list.consignorId, that.list.consigneeId].join(',')}).then((res) => {
that.consigneeData.push(res.data.list.find(item => item.customerContactsId == that.list.consignorId)) let consignor = res.data.list.find(item => item.customerContactsId == that.list.consignorId)
that.consigneeData.push(res.data.list.find(item => item.customerContactsId == that.list.consigneeId)) if(consignor) that.consignorData=consignor
let consignee = res.data.list.find(item => item.customerContactsId == that.list.consigneeId)
if(consignee) that.consigneeData=consignee
that.getCnsigneeData() that.getCnsigneeData()
}) })
that.list.offerProdRespVOList.forEach((item)=>{ that.list.offerProdRespVOList.forEach((item)=>{
...@@ -588,12 +604,19 @@ ...@@ -588,12 +604,19 @@
// 获取发货/收货人 // 获取发货/收货人
getCnsigneeData(){ getCnsigneeData(){
let that = this let that = this
if(that.consigneeData.length>0){ if(that.consigneeData&&that.consigneeData.customerId){
getCustomer(that.consigneeData[0].customerId).then(result=>{ getCustomer(that.consigneeData.customerId).then(result=>{
that.consigneeData[0] = Object.assign(that.consigneeData[0],result.data) result.data.source = this.sourceLabel(result.data.source)
that.$set(that.consigneeData,'source',result.data.source)
that.$set(that.consigneeData,'address',result.data.address)
}) })
getCustomer(that.consigneeData[1].customerId).then(ress=>{ }
that.consigneeData[1] = Object.assign(that.consigneeData[1],ress.data) if(that.consignorData&&that.consignorData.customerId){
getCustomer(that.consignorData.customerId).then(ress=>{
ress.data.source = this.sourceLabel(ress.data.source)
that.$set(that.consignorData,'source',ress.data.source)
that.$set(that.consignorData,'address',ress.data.address)
}) })
} }
}, },
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
{{ row.consignorName }} {{ row.consignorName }}
</p> </p>
<p> <p>
{{row.consignorPhone}} +{{row.consignorCountryCode}}{{row.consignorPhone}}
</p> </p>
</div> </div>
</div> </div>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
{{ row.consigneeName }} {{ row.consigneeName }}
</p> </p>
<p> <p>
{{ row.consigneePhone}} +{{row.consigneeCountryCode}}{{ row.consigneePhone}}
</p> </p>
</div> </div>
</template> </template>
......
...@@ -187,6 +187,7 @@ ...@@ -187,6 +187,7 @@
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="$router.push('/order/warehousing?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓')}}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('/order/warehousing?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓')}}</el-dropdown-item>
<el-dropdown-item @click.native="show = true;orderId = scope.row.orderId; " v-hasPermi="['ecw:order:update']">{{$t('退仓')}}</el-dropdown-item> <el-dropdown-item @click.native="show = true;orderId = scope.row.orderId; " v-hasPermi="['ecw:order:update']">{{$t('退仓')}}</el-dropdown-item>
<el-dropdown-item v-show="scope.row.statusMsg === '已入仓'" @click.native="$router.push('/order/warehousing?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓修改')}}</el-dropdown-item>
<el-dropdown-item @click.native="orderId = scope.row.orderId;warehouseBol=true;" >{{$t('调仓')}}</el-dropdown-item> <el-dropdown-item @click.native="orderId = scope.row.orderId;warehouseBol=true;" >{{$t('调仓')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push({path:'/order/transfer-warehousing/' + scope.row.orderId + '/' + 1 })" >{{$t('调拨出仓')}}</el-dropdown-item> <el-dropdown-item @click.native="$router.push({path:'/order/transfer-warehousing/' + scope.row.orderId + '/' + 1 })" >{{$t('调拨出仓')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push({path:'/order/transfer-to-warehouse/' + scope.row.orderId + '/' + 2 })" >{{$t('调拨到仓')}}</el-dropdown-item> <el-dropdown-item @click.native="$router.push({path:'/order/transfer-to-warehouse/' + scope.row.orderId + '/' + 2 })" >{{$t('调拨到仓')}}</el-dropdown-item>
......
...@@ -214,6 +214,8 @@ export default { ...@@ -214,6 +214,8 @@ export default {
getOrderSpecial(){ getOrderSpecial(){
getOrderSpecial(this.form.orderItemId).then(r => { getOrderSpecial(this.form.orderItemId).then(r => {
this.form = r.data this.form = r.data
this.form.freight = ''
this.form.clearanceFreight = ''
}) })
}, },
getOrderSpecialByApproveId(){ getOrderSpecialByApproveId(){
......
...@@ -79,10 +79,12 @@ ...@@ -79,10 +79,12 @@
prop="address" prop="address"
label="操作"> label="操作">
<template v-slot="{row}"> <template v-slot="{row}">
<template v-if="row.originalSeaFreight !== 0 && row.originalClearanceFreight !== 0">
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/discount/${row.orderItemId}?orderId=${row.orderId}`)">优惠申请</el-button> <el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/discount/${row.orderItemId}?orderId=${row.orderId}`)">优惠申请</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/specialCommission/${row.orderItemId}`)">佣金规则</el-button> <el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/specialCommission/${row.orderItemId}`)">佣金规则</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/discount1/${row.orderItemId}?orderId=${row.orderId}&discount=1`)">管理折扣</el-button> <el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/discount1/${row.orderItemId}?orderId=${row.orderId}&discount=1`)">管理折扣</el-button>
</template> </template>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -76,11 +76,12 @@ ...@@ -76,11 +76,12 @@
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index }">
<el-button v-if="order.status === 5" size="mini" type="text" @click="handleWarehousing($index)">修改</el-button> <el-button v-if="order.status === 5" size="mini" type="text" @click="handleWarehousing($index)">修改</el-button>
<template v-else> <template v-else>
<el-button v-if="orderItemList[$index] && orderItemList[$index].orderWarehouseInBackItemDoList && orderItemList[$index].orderWarehouseInBackItemDoList.length > 0" size="mini" type="text" @click="handleWarehousing($index)">追加</el-button> <template v-if="orderItemList[$index] && orderItemList[$index].orderWarehouseInBackItemDoList && orderItemList[$index].orderWarehouseInBackItemDoList.length > 0">
<el-button v-else size="mini" type="text" @click="handleWarehousing($index)">入仓</el-button> <el-button size="mini" type="text" @click="handleWarehousing($index)">追加</el-button>
<el-button size="mini" type="text" @click="handleWarehousingReturn(row)">退仓</el-button> <el-button size="mini" type="text" @click="handleWarehousingReturn(row)">退仓</el-button>
</template> </template>
<el-button v-else size="mini" type="text" @click="handleWarehousing($index)">入仓</el-button>
</template>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -43,7 +43,11 @@ ...@@ -43,7 +43,11 @@
</el-table-column> </el-table-column>
<el-table-column label="手机号" show-overflow-tooltip align="center" prop="mobile" > <el-table-column label="手机号" show-overflow-tooltip align="center" prop="mobile" >
</el-table-column> </el-table-column>
<el-table-column label="成交" align="center" prop="" show-overflow-tooltip /> <el-table-column label="成交" align="center" prop="customerStatus" show-overflow-tooltip >
<template v-slot="{row}">
{{row.customerStatus === 3 ? '成交' : '非成交'}}
</template>
</el-table-column>
<el-table-column label="认证" align="center" :formatter="authentication" /> <el-table-column label="认证" align="center" :formatter="authentication" />
<el-table-column label="状态" align="center" prop="status" > <el-table-column label="状态" align="center" prop="status" >
<template slot-scope="scope"> <template slot-scope="scope">
......
...@@ -41,7 +41,11 @@ ...@@ -41,7 +41,11 @@
</el-table-column> </el-table-column>
<el-table-column label="手机号" show-overflow-tooltip align="center" prop="mobile" > <el-table-column label="手机号" show-overflow-tooltip align="center" prop="mobile" >
</el-table-column> </el-table-column>
<el-table-column label="成交" align="center" prop="" show-overflow-tooltip /> <el-table-column label="成交" align="center" prop="" show-overflow-tooltip >
<template v-slot="{row}">
{{row.customerStatus === 3 ? '成交' : '非成交'}}
</template>
</el-table-column>
<el-table-column label="认证" align="center" :formatter="authentication" /> <el-table-column label="认证" align="center" :formatter="authentication" />
<el-table-column label="状态" align="center" prop="status" > <el-table-column label="状态" align="center" prop="status" >
<template slot-scope="scope"> <template slot-scope="scope">
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="来源" prop="fromId"> <!-- <el-form-item label="来源" prop="fromId">
<el-input v-model="queryParams.fromId" placeholder="请输入站内信来源" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.fromId" placeholder="请输入站内信来源" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>-->
<el-form-item label="发送时间"> <el-form-item label="发送时间">
<el-date-picker v-model="dateRangeSendTime" style="width: 240px" value-format="yyyy-MM-dd" <el-date-picker v-model="dateRangeSendTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" /> type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column label="" align="center" prop="id" /> <el-table-column label="" align="center" prop="id" />
<el-table-column label="来源" align="center" prop="fromId" /> <!-- <el-table-column label="来源" align="center" prop="fromId" />-->
<el-table-column label="发送时间" align="center" prop="sendTime" width="180"> <el-table-column label="发送时间" align="center" prop="sendTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.sendTime) }}</span> <span>{{ parseTime(scope.row.sendTime) }}</span>
......
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