Commit 80da72cf authored by liuzeheng's avatar liuzeheng
parents f34ae302 31d93922
......@@ -59,6 +59,15 @@ export function getCustomerContactsSelect(query) {
params: query
})
}
export function getCustomerContactsSelect2(query) {
return request({
url: '/ecw/customer-contacts/select2',
method: 'get',
params: query
})
}
// 导出客户联系人 Excel
export function exportCustomerContactsExcel(query) {
return request({
......
<template>
<el-dialog :title="$t('选择联系人')" visible :before-close="closeDialog" :close-on-click-modal="false">
<div class="header mb-10 flex-center">
<div class="flex-center">{{$t('关键字')}}</div>
<el-input v-model="form.searchKey" clearable class="w-200"></el-input>
<el-button type="primary" class="ml-10" @click="handleQuery">{{$t('搜索')}}</el-button>
</div>
<div class="list">
<div class="list-item" v-for="item in list" :key="item.customerContactsId" @click="choose(item)">
<div class="item-box">
<div class="line">
<div class="label">{{$t('姓名')}}</div>
<div class="value">{{item.contactsName}}</div>
<el-tag v-if="item.isInOpenSea" type="danger" effect="dark">{{$t('')}}</el-tag>
</div>
<!-- v1.7新增 -->
<div class="line">
<div class="label">{{$t('姓名(英文)')}}</div>
<div class="value">{{item.contactsNameEn}}</div>
</div>
<div class="line">
<div class="label">{{$t('电话')}}</div>
<div class="value">+{{item.areaCode}} {{item.phoneNew}}</div>
</div>
<div class="line">
<div class="label">{{$t('邮箱')}}</div>
<div class="value">{{item.email}}</div>
</div>
<div class="line">
<div class="label">{{$t('公司')}}</div>
<div class="value">{{item.company}}</div>
</div>
<!-- v1.7新增 -->
<div class="line">
<div class="label">{{$t('公司(英文)')}}</div>
<div class="value">{{item.companyEn}}</div>
</div>
</div>
<el-dialog
:title="$t('选择联系人')"
visible
:before-close="closeDialog"
:close-on-click-modal="false"
>
<div class="header mb-10 flex-center">
<div class="flex-center">{{ $t("关键字") }}</div>
<el-input v-model="form.searchKey" clearable class="w-200"></el-input>
<el-button type="primary" class="ml-10" @click="handleQuery">{{
$t("搜索")
}}</el-button>
</div>
<div class="list">
<div
class="list-item"
v-for="item in list"
:key="item.customerContactsId"
@click="choose(item)"
>
<div class="item-box">
<div class="line">
<div class="label">{{ $t("姓名") }}</div>
<div class="value">{{ item.contactsName }}</div>
<el-tag v-if="item.isInOpenSea" type="danger" effect="dark">{{
$t("")
}}</el-tag>
</div>
<!-- v1.7新增 -->
<div class="line">
<div class="label">{{ $t("姓名(英文)") }}</div>
<div class="value">{{ item.contactsNameEn }}</div>
</div>
<div class="line">
<div class="label">{{ $t("电话") }}</div>
<div class="value">+{{ item.areaCode }} {{ item.phoneNew }}</div>
</div>
<div class="line">
<div class="label">{{ $t("邮箱") }}</div>
<div class="value">{{ item.email }}</div>
</div>
<div class="line">
<div class="label">{{ $t("公司") }}</div>
<div class="value">{{ item.company }}</div>
</div>
<!-- v1.7新增 -->
<div class="line">
<div class="label">{{ $t("公司(英文)") }}</div>
<div class="value">{{ item.companyEn }}</div>
</div>
</div>
</div>
<pagination v-show="total > 0" :total="total" :page.sync="form.pageNo" :limit.sync="form.pageSize"
@pagination="loadList" />
</el-dialog>
</div>
<pagination
v-show="total > 0"
:total="total"
:page.sync="form.pageNo"
:limit.sync="form.pageSize"
@pagination="loadList"
/>
</el-dialog>
</template>
<script>
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
import {
getCustomerContactsSelect,
getCustomerContactsSelect2,
} from "@/api/ecw/customerContacts";
export default {
props:{
type: Number
props: {
type: Number,
},
data() {
return {
show: true,
form: {
pageNo: 1,
pageSize: 10,
searchKey: "",
},
list: [],
total: 0,
};
},
created() {
this.show = true;
this.loadList();
},
methods: {
handleQuery() {
this.form.pageNo = 1;
this.loadList();
},
data(){
return {
show: true,
form:{
pageNo: 1,
pageSize: 10,
searchKey: ''
},
list:[],
total: 0
}
loadList() {
//加载联系人数据,怎样使用属性
if (this.type == "1") {
getCustomerContactsSelect2(this.form).then((res) => {
this.list = res.data.list;
this.total = res.data.total;
});
} else {
getCustomerContactsSelect(this.form).then((res) => {
this.list = res.data.list;
this.total = res.data.total;
});
}
},
created(){
this.show = true
this.loadList()
closeDialog() {
this.show = false;
this.$emit("close");
},
methods:{
handleQuery(){
this.form.pageNo = 1
this.loadList()
},
loadList(){
getCustomerContactsSelect(this.form).then(res => {
this.list = res.data.list
this.total = res.data.total
})
},
closeDialog(){
this.show = false
this.$emit('close');
},
choose(contact){
this.$emit('choose', contact)
}
}
}
choose(contact) {
this.$emit("choose", contact);
},
},
};
</script>
<style lang="scss" scoped>
.header{
display: flex;
.header {
display: flex;
}
.list{
display: flex;
flex-wrap: wrap;
justify-content: center;
&-item{
background: #eee;
width: 300px;
margin: 10px;
padding: 5px;
border-radius: 10px;
border: 5px solid transparent;
background: linear-gradient(white,white) padding-box,repeating-linear-gradient(-45deg, red 0, red 12.5%, transparent 0, transparent 25%, #58a 0, #58a 37.5%, transparent 0, transparent 50%) 0/5em 5em;
.item-box{
/* background: #fbfaf5; */
padding: 20px;
}
.line{
display: flex;
/* .label{
.list {
display: flex;
flex-wrap: wrap;
justify-content: center;
&-item {
background: #eee;
width: 300px;
margin: 10px;
padding: 5px;
border-radius: 10px;
border: 5px solid transparent;
background: linear-gradient(white, white) padding-box,
repeating-linear-gradient(
-45deg,
red 0,
red 12.5%,
transparent 0,
transparent 25%,
#58a 0,
#58a 37.5%,
transparent 0,
transparent 50%
)
0/5em 5em;
.item-box {
/* background: #fbfaf5; */
padding: 20px;
}
.line {
display: flex;
/* .label{
width: 100px;
} */
.value{
flex: 1;
margin-left: 10px;
}
}
.value {
flex: 1;
margin-left: 10px;
}
}
}
}
</style>
......@@ -224,6 +224,7 @@ import { getCabinetPage } from "@/api/ecw/cabinet";
import { getWarehouseList } from "@/api/ecw/warehouse";
import { getListTree } from "@/api/ecw/region";
import costForm from "./costForm.vue";
//异常登记对话框
import regError from "./regError.vue";
import editForm from "./editForm.vue";
import ladingBill from "./ladingBill/index.vue";
......
......@@ -228,6 +228,24 @@
:label="$t('报关费用')"
align="center"
></el-table-column>
<!--
<el-table-column
prop=""
:label="$t('异常操作')"
align="center"
width="120px"
>
lanbm 2024-05-23 添加异常登记功能
<template slot-scope="scope">
<el-button
type="primary"
size="small"
@click="() => updateStatus_2('single', scope.row)"
>{{ $t("异常登记") }}</el-button
>
</template>
</el-table-column>-->
<el-table-column
prop=""
:label="$t('操作')"
......@@ -476,7 +494,6 @@
</el-tabs>
</el-col>
</el-row>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title="dialogConfig.title"
......@@ -522,6 +539,23 @@
/>
</template>
</el-dialog>
<!-- 对话框 lanbm 2024-05-23 add异常登记对话框 -->
<el-dialog
custom-class="shipping-dialog"
:title="$t('异常')"
:visible.sync="dialogVisible"
width="600px"
:modal-append-to-body="false"
append-to-body
>
<unloadingError
v-if="dialogVisible"
@closeDialog="closeDialog_2"
v-bind="$attrs"
:currRow="currRow"
/>
</el-dialog>
</div>
</template>
......@@ -554,6 +588,7 @@ import updateError from "./updateError.vue";
import { listUser } from "@/api/system/user";
//lanbm 2024-05-16 add
import { getCurrencyList } from "@/api/ecw/currency";
import unloadingError from "@/views/ecw/box/shippingSea/nodePage/unloading/unloadingError.vue";
export default {
name: "EcwBoxQuery",
......@@ -565,6 +600,8 @@ export default {
regError,
editForm,
updateError,
//lanbm 2024-05-23 异常登记对话框
unloadingError,
},
created() {
this.transportTypes = this.getDictDatas(
......@@ -677,6 +714,9 @@ export default {
},
//币种信息 lanbm 2024-05-16 add
currencyList: [],
// 当前行
currRow: {},
dialogVisible: false,
};
},
methods: {
......@@ -696,6 +736,15 @@ export default {
handleSelectionChange(selected) {
this.selectedRows = selected;
},
closeDialog_2() {
//关闭异常对话框
this.dialogVisible = false;
},
updateStatus_2(type, row) {
//lanbm 2024-05-23 添加的异常登记功能
this.currRow = row;
this.dialogVisible = true;
},
/* 更新状态 */
updateStatus(type, row) {
let orders = [];
......
<template>
<div class="app-container shipping-detail">
<el-row type="flex" style="margin-top: 15px; margin-bottom: 15px" justify="center">
<el-row
type="flex"
style="margin-top: 15px; margin-bottom: 15px"
justify="center"
>
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="22">
<div style="display: flex; justify-content: space-between;align-items: flex-end;">
<h2>{{$t('出货详情')}}</h2>
<div
style="
display: flex;
justify-content: space-between;
align-items: flex-end;
"
>
<h2>{{ $t("出货详情") }}</h2>
<div>
<!-- <el-button size="small" @click="handleCommand('edit')">{{$t('编辑')}}</el-button> -->
<el-button size="small" v-hasPermi="['shipment:box:action:sea']" @click="handleCommand('router')">{{$t('操作')}}</el-button>
<el-button type="primary" v-hasPermi="['shipment:box:action:error']" size="small" @click="handleCommand('error')">{{$t('异常登记')}}</el-button>
<el-button type="primary" v-hasPermi="['shipment:box:action:cost']" size="small" @click="handleCommand('cost')">{{$t('费用登记')}}</el-button>
<el-button
size="small"
v-hasPermi="['shipment:box:action:sea']"
@click="handleCommand('router')"
>{{ $t("操作") }}</el-button
>
<el-button
type="primary"
v-hasPermi="['shipment:box:action:error']"
size="small"
@click="handleCommand('error')"
>{{ $t("异常登记") }}</el-button
>
<el-button
type="primary"
v-hasPermi="['shipment:box:action:cost']"
size="small"
@click="handleCommand('cost')"
>{{ $t("费用登记") }}</el-button
>
<!-- <el-button type="danger" size="small" @click="handleCommand('delete')">{{$t('删除')}}</el-button> -->
</div>
</div>
<el-card style="margin-top: 15px">
<el-descriptions :column="4" border>
<el-descriptions-item :label="$t('自编号')">
{{shipmentObj.selfNo}}
{{ shipmentObj.selfNo }}
</el-descriptions-item>
<el-descriptions-item :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="shipmentObj.transportType" />
<dict-tag
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
:value="shipmentObj.transportType"
/>
</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')">
{{getShipChannelName(shipmentObj.shippingChannelId)}}
{{ getShipChannelName(shipmentObj.shippingChannelId) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('状态')">
{{shipmentObj.shipmentStatusText}}
{{ shipmentObj.shipmentStatusText }}
</el-descriptions-item>
<el-descriptions-item :label="$t('总计')">
{{getBoxSum(shipmentObj.boxStatistics)}}
{{ getBoxSum(shipmentObj.boxStatistics) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('始发地')">
{{getCityName(shipmentObj.startWarehouseId)}}
{{ getCityName(shipmentObj.startWarehouseId) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('目的地')">
{{getCityName(shipmentObj.destWarehouseId)}}
{{ getCityName(shipmentObj.destWarehouseId) }}
</el-descriptions-item>
<el-descriptions-item label="SO NO">
{{shipmentObj.bookSeaInfo ? shipmentObj.bookSeaInfo.sono : '' }}
{{ shipmentObj.bookSeaInfo ? shipmentObj.bookSeaInfo.sono : "" }}
</el-descriptions-item>
<el-descriptions-item :label="$t('目的港清关')">
{{getClearance(shipmentObj.destinationClearance)}}
{{ getClearance(shipmentObj.destinationClearance) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('发货方式')">
{{getdeliveryType(shipmentObj.deliveryType)}}
{{ getdeliveryType(shipmentObj.deliveryType) }}
</el-descriptions-item>
</el-descriptions>
</el-card>
......@@ -50,108 +80,345 @@
<el-tabs style="margin-top: 15px" type="border-card" value="detail">
<el-tab-pane :label="$t('明细')" name="detail">
<div class="detail-pane">
<div>{{$t('当前部分')}}</div>
<el-select :placeholder="$t('请选择')" v-model="sectionId" @change="sectionChange">
<div>{{ $t("当前部分") }}</div>
<el-select
:placeholder="$t('请选择')"
v-model="sectionId"
@change="sectionChange"
>
<el-option key="0" :label="$t('全部')" value="0"></el-option>
<el-option v-for="item in sectionList" :key="item.id" :label="item.title" :value="item.id"></el-option>
<el-option
v-for="item in sectionList"
:key="item.id"
:label="item.title"
:value="item.id"
></el-option>
</el-select>
<p class="box-weight">
{{getSectionInfo}}
{{ getSectionInfo }}
</p>
<div class="document-status">
<p>{{$t('单证状态')}}</p>
<template v-for="(item, index) in getDocStatus(sectionObj.sectionOrderList)">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item" :key="index" />
<p>{{ $t("单证状态") }}</p>
<template
v-for="(item, index) in getDocStatus(
sectionObj.sectionOrderList
)"
>
<dict-tag
:type="DICT_TYPE.ECW_CUSTOMS_TYPE"
:value="item"
:key="index"
/>
</template>
</div>
</div>
<div style="margin:20px 0 20px 0;">
<el-button type="primary" v-hasPermi="['shipment:box:order:select']" size="small" @click="()=>updateStatus('selected')">{{$t('更新所选订单状态')}}</el-button>
<el-button type="primary" v-hasPermi="['shipment:box:order:all']" size="small" @click="()=>updateStatus('all')">{{$t('更新全部订单状态')}}</el-button>
<el-button type="primary" v-if="shipmentObj.sapStatus==152&&(shipmentObj.airArrivalInfo&&shipmentObj.airArrivalInfo.arriveType==1)" v-hasPermi="['shipment:box:order:select']" size="small" @click="()=>updateArrivalStatus('selected')">{{$t('更新所选订单到港状态')}}</el-button>
<el-button type="primary" v-if="shipmentObj.sapStatus==152&&(shipmentObj.airArrivalInfo&&shipmentObj.airArrivalInfo.arriveType==1)" v-hasPermi="['shipment:box:order:all']" size="small" @click="()=>updateArrivalStatus('all')">{{$t('更新全部订单到港状态')}}</el-button>
<el-button type="primary" v-if="shipmentObj.clStatus==132&&(shipmentObj.clearanceInfo&&shipmentObj.clearanceInfo.clearanceType==1)" v-hasPermi="['shipment:box:order:select']" size="small" @click="()=>updateClearStatus('selected')">{{$t('更新所选订单清关状态')}}</el-button>
<el-button type="primary" v-if="shipmentObj.clStatus==132&&(shipmentObj.clearanceInfo&&shipmentObj.clearanceInfo.clearanceType==1)" v-hasPermi="['shipment:box:order:all']" size="small" @click="()=>updateClearStatus('all')">{{$t('更新全部订单清关状态')}}</el-button>
<div style="margin: 20px 0 20px 0">
<el-button
type="primary"
v-hasPermi="['shipment:box:order:select']"
size="small"
@click="() => updateStatus('selected')"
>{{ $t("更新所选订单状态") }}</el-button
>
<el-button
type="primary"
v-hasPermi="['shipment:box:order:all']"
size="small"
@click="() => updateStatus('all')"
>{{ $t("更新全部订单状态") }}</el-button
>
<el-button
type="primary"
v-if="
shipmentObj.sapStatus == 152 &&
shipmentObj.airArrivalInfo &&
shipmentObj.airArrivalInfo.arriveType == 1
"
v-hasPermi="['shipment:box:order:select']"
size="small"
@click="() => updateArrivalStatus('selected')"
>{{ $t("更新所选订单到港状态") }}</el-button
>
<el-button
type="primary"
v-if="
shipmentObj.sapStatus == 152 &&
shipmentObj.airArrivalInfo &&
shipmentObj.airArrivalInfo.arriveType == 1
"
v-hasPermi="['shipment:box:order:all']"
size="small"
@click="() => updateArrivalStatus('all')"
>{{ $t("更新全部订单到港状态") }}</el-button
>
<el-button
type="primary"
v-if="
shipmentObj.clStatus == 132 &&
shipmentObj.clearanceInfo &&
shipmentObj.clearanceInfo.clearanceType == 1
"
v-hasPermi="['shipment:box:order:select']"
size="small"
@click="() => updateClearStatus('selected')"
>{{ $t("更新所选订单清关状态") }}</el-button
>
<el-button
type="primary"
v-if="
shipmentObj.clStatus == 132 &&
shipmentObj.clearanceInfo &&
shipmentObj.clearanceInfo.clearanceType == 1
"
v-hasPermi="['shipment:box:order:all']"
size="small"
@click="() => updateClearStatus('all')"
>{{ $t("更新全部订单清关状态") }}</el-button
>
</div>
<el-table :data="sectionObj.sectionOrderList" style="width: 100%" border @selection-change="handleSelectionChange">
<el-table
:data="sectionObj.sectionOrderList"
style="width: 100%"
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="50"></el-table-column>>
<el-table-column align="center" :label="$t('序号')" width="50" prop="tidanNum" />
<el-table-column prop="orderNo" :label="$t('订单号')" align="center">
<el-table-column
align="center"
:label="$t('序号')"
width="50"
prop="tidanNum"
/>
<el-table-column
prop="orderNo"
:label="$t('订单号')"
align="center"
>
<template v-slot="scope">
<a href="javascript:void(0)" @click="jumpOrderDetail(scope.row)">{{ scope.row.orderNo }}</a>
<a
href="javascript:void(0)"
@click="jumpOrderDetail(scope.row)"
>{{ scope.row.orderNo }}</a
>
</template>
</el-table-column>
<el-table-column prop="goodsList" :label="$t('货物信息')" width="230px" align="center">
<template v-slot="{row}">
<el-table-column
prop="goodsList"
:label="$t('货物信息')"
width="230px"
align="center"
>
<template v-slot="{ row }">
<section>
<div v-for="(item, index) in row.goodsList" :key="index">
{{index+1}}{{item.prodTitleZh}}
{{ index + 1 }}{{ item.prodTitleZh }}
</div>
</section>
</template>
</el-table-column>
<el-table-column prop="num" :label="$t('计划箱数')" align="center"></el-table-column>
<el-table-column prop="installNum" :label="$t('实装箱数')" align="center"></el-table-column>
<el-table-column prop="unloadNum" :label="$t('卸柜箱数')" align="center"></el-table-column>
<el-table-column prop="destWarehouseName" :label="$t('提货点')" align="center"></el-table-column>
<el-table-column prop="volume" :label="$t('体积')" align="center"></el-table-column>
<el-table-column prop="weight" :label="$t('重量')" align="center"></el-table-column>
<el-table-column prop="totalWorth" :label="$t('货值')" align="center"></el-table-column>
<el-table-column prop="customsType" :label="$t('报关方式')" align="center">
<el-table-column
prop="num"
:label="$t('计划箱数')"
align="center"
></el-table-column>
<el-table-column
prop="installNum"
:label="$t('实装箱数')"
align="center"
></el-table-column>
<el-table-column
prop="unloadNum"
:label="$t('卸柜箱数')"
align="center"
></el-table-column>
<el-table-column
prop="destWarehouseName"
:label="$t('提货点')"
align="center"
></el-table-column>
<el-table-column
prop="volume"
:label="$t('体积')"
align="center"
></el-table-column>
<el-table-column
prop="weight"
:label="$t('重量')"
align="center"
></el-table-column>
<el-table-column
prop="totalWorth"
:label="$t('货值')"
align="center"
></el-table-column>
<el-table-column
prop="customsType"
:label="$t('报关方式')"
align="center"
>
<template slot-scope="scope">
<div :class="scope.row.customsType !== 1 ? 'customsType-red' : ''">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" />
<div
:class="
scope.row.customsType !== 1 ? 'customsType-red' : ''
"
>
<dict-tag
:type="DICT_TYPE.ECW_CUSTOMS_TYPE"
:value="scope.row.customsType"
/>
</div>
</template>
</el-table-column>
<el-table-column prop="customsFee" :label="$t('报关费用')" align="center"></el-table-column>
<el-table-column prop="" :label="$t('操作')" align="center" width="120px">
<el-table-column
prop="customsFee"
:label="$t('报关费用')"
align="center"
></el-table-column>
<!--
<el-table-column
prop=""
:label="$t('异常操作')"
align="center"
width="120px"
>
<template slot-scope="scope">
<el-button
type="primary"
size="small"
@click="() => updateStatus_2('single', scope.row)"
style="margin-top: 5px"
>{{ $t("异常登记") }}</el-button
>
</template>
</el-table-column>-->
<el-table-column
prop=""
:label="$t('操作')"
align="center"
width="120px"
>
<template slot-scope="scope">
<el-button type="primary" size="small" :disabled="scope.row.abnormalDealStatus === 1" @click="()=>updateStatus('single', scope.row)" style="margin-top: 5px;">{{$t('更新状态')}}</el-button>
<el-button type="primary" size="small" style="margin-top: 5px;" :disabled="shipmentObj.clStatus==132|| (shipmentObj.clearanceInfo == null) || (shipmentObj.clearanceInfo&&shipmentObj.clearanceInfo.clearanceOrderList.findIndex(ff=>ff.orderId == scope.row.orderId) == -1)" @click="()=>cancleClear(scope.row)">{{$t('撤销清关申请')}}</el-button>
<el-button
type="primary"
size="small"
:disabled="scope.row.abnormalDealStatus === 1"
@click="() => updateStatus('single', scope.row)"
style="margin-top: 5px"
>{{ $t("更新状态") }}</el-button
>
<el-button
type="primary"
size="small"
style="margin-top: 5px"
:disabled="
shipmentObj.clStatus == 132 ||
shipmentObj.clearanceInfo == null ||
(shipmentObj.clearanceInfo &&
shipmentObj.clearanceInfo.clearanceOrderList.findIndex(
(ff) => ff.orderId == scope.row.orderId
) == -1)
"
@click="() => cancleClear(scope.row)"
>{{ $t("撤销清关申请") }}</el-button
>
<!-- <el-button type="danger" style="margin-top: 5px;" size="small" @click="openError(scope.row)">{{$t('异常')}}</el-button> -->
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane :label="$t('状态')" name="status">
<div v-for="(item, index) in logList" :key="item.id" :class="`shipping-status ${index === 0 ? 'curr-status' : '' }`">
<div
v-for="(item, index) in logList"
:key="item.id"
:class="`shipping-status ${index === 0 ? 'curr-status' : ''}`"
>
<div class="status-line"></div>
<div class="status-number">{{logList.length - index}}</div>
<div class="status-number">{{ logList.length - index }}</div>
<div class="status-info">
<div>{{$l(item, 'title')}} <el-button v-if="item.approvalId>0" type="text" @click="handleApproval(item.bpmProcessId)">{{$t('查看审批')}}</el-button></div>
<div>
<p>{{formatDate(item.createTime)}}</p>
<p>{{item.operator}}</p>
{{ $l(item, "title") }}
<el-button
v-if="item.approvalId > 0"
type="text"
@click="handleApproval(item.bpmProcessId)"
>{{ $t("查看审批") }}</el-button
>
</div>
<div>
<p>{{ formatDate(item.createTime) }}</p>
<p>{{ item.operator }}</p>
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane :label="$t('费用')" name="fee">
<el-table :data="costList" style="width: 100%" border>
<el-table-column type="index" align="center" :label="$t('序号')" width="50" />
<el-table-column prop="costType" :label="$t('费用类型')" align="center">
<el-table-column
type="index"
align="center"
:label="$t('序号')"
width="50"
/>
<el-table-column
prop="costType"
:label="$t('费用类型')"
align="center"
>
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="scope.row.costType" />
<dict-tag
:type="DICT_TYPE.FEE_TYPE"
:value="scope.row.costType"
/>
</template>
</el-table-column>
<el-table-column prop="supplierId" :label="$t('供应商')" align="center">
<el-table-column
prop="supplierId"
:label="$t('供应商')"
align="center"
>
<template slot-scope="scope">
{{getSupplier(scope.row.supplierId)}}
{{ getSupplier(scope.row.supplierId) }}
</template>
</el-table-column>
<el-table-column prop="price" :label="$t('金额')" align="center"></el-table-column>
<el-table-column
prop="price"
:label="$t('金额')"
align="center"
></el-table-column>
<!--lanbm 2024-05-16 修改-->
<el-table-column prop="priceUnitName" :label="$t('币种')" align="center"></el-table-column>
<el-table-column prop="payPrice" :label="$t('实付金额')" align="center"></el-table-column>
<el-table-column prop="payPriceBz" :label="$t('实付币种')" align="center"></el-table-column>
<el-table-column prop="payTime" :label="$t('实付日期')" align="center">
<el-table-column
prop="priceUnitName"
:label="$t('币种')"
align="center"
></el-table-column>
<el-table-column
prop="payPrice"
:label="$t('实付金额')"
align="center"
></el-table-column>
<el-table-column
prop="payPriceBz"
:label="$t('实付币种')"
align="center"
></el-table-column>
<el-table-column
prop="payTime"
:label="$t('实付日期')"
align="center"
>
<template slot-scope="scope">
<span v-if="scope.row.payTime">{{formatDate(scope.row.payTime)}}</span>
<span v-if="scope.row.payTime">{{
formatDate(scope.row.payTime)
}}</span>
</template>
</el-table-column>
<el-table-column prop="payableNo" :label="$t('付款单号')" align="center">
<el-table-column
prop="payableNo"
:label="$t('付款单号')"
align="center"
>
<template slot-scope="scope">
<span
style="color: #1890ff"
......@@ -160,17 +427,53 @@
>
</template>
</el-table-column>
<el-table-column prop="creator" :label="$t('创建人')" align="center"></el-table-column>
<el-table-column prop="createTime" :label="$t('创建日期')" align="center"></el-table-column>
<el-table-column prop="updater" :label="$t('修改人')" align="center"></el-table-column>
<el-table-column prop="updateTime" :label="$t('修改日期')" align="center"></el-table-column>
<el-table-column
prop="creator"
:label="$t('创建人')"
align="center"
></el-table-column>
<el-table-column
prop="createTime"
:label="$t('创建日期')"
align="center"
></el-table-column>
<el-table-column
prop="updater"
:label="$t('修改人')"
align="center"
></el-table-column>
<el-table-column
prop="updateTime"
:label="$t('修改日期')"
align="center"
></el-table-column>
<!--添加备注信息列 lanbm 2024-05-16 add-->
<el-table-column prop="remarks" :label="$t('备注')" align="center"></el-table-column>
<el-table-column
prop="remarks"
:label="$t('备注')"
align="center"
></el-table-column>
<el-table-column :label="$t('操作')" align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="editCostClick(scope.row)" style="marginRight:10px;" v-hasPermi="['ecw:box-cost:update']">{{$t('编辑')}}</el-button>
<el-popconfirm :title="$t('确定是否删除')" @confirm="deleteCostClick(scope.row)">
<el-button type="danger" size="small" slot="reference" v-hasPermi="['ecw:box-cost:delete']">{{$t('删除')}}</el-button>
<el-button
type="primary"
size="small"
@click="editCostClick(scope.row)"
style="marginright: 10px"
v-hasPermi="['ecw:box-cost:update']"
>{{ $t("编辑") }}</el-button
>
<el-popconfirm
:title="$t('确定是否删除')"
@confirm="deleteCostClick(scope.row)"
>
<el-button
type="danger"
size="small"
slot="reference"
v-hasPermi="['ecw:box-cost:delete']"
>{{ $t("删除") }}</el-button
>
</el-popconfirm>
</template>
</el-table-column>
......@@ -178,34 +481,76 @@
</el-tab-pane>
<el-tab-pane :label="$t('异常')" name="error">
<el-table :data="errorList" style="width: 100%" border>
<el-table-column type="index" align="center" :label="$t('序号')" width="50" />
<el-table-column
type="index"
align="center"
:label="$t('序号')"
width="50"
/>
<el-table-column prop="opStep" :label="$t('操作')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_AIR_SHIPMENT_PROCESS" :value="scope.row.opStep" />
<dict-tag
:type="DICT_TYPE.BOX_AIR_SHIPMENT_PROCESS"
:value="scope.row.opStep"
/>
</template>
</el-table-column>
<el-table-column prop="billAbnId" :label="$t('异常')" align="center">
<el-table-column
prop="billAbnId"
:label="$t('异常')"
align="center"
>
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE[getregprocess(scope.row.opStep)]" :value="scope.row.billAbnId" />
<dict-tag
:type="DICT_TYPE[getregprocess(scope.row.opStep)]"
:value="scope.row.billAbnId"
/>
</template>
</el-table-column>
<el-table-column prop="abnDetail" :label="$t('异常描述')" align="center" width="300"></el-table-column>
<el-table-column prop="delayDays" :label="$t('异常延迟天数')" align="center"></el-table-column>
<el-table-column prop="" :label="$t('异常时间')" align="center" width="200">
<el-table-column
prop="abnDetail"
:label="$t('异常描述')"
align="center"
width="300"
></el-table-column>
<el-table-column
prop="delayDays"
:label="$t('异常延迟天数')"
align="center"
></el-table-column>
<el-table-column
prop=""
:label="$t('异常时间')"
align="center"
width="200"
>
<template slot-scope="scope">
<span v-if="scope.row.abnStartTime">{{formatDate(scope.row.abnStartTime)}} - </span>
<span v-if="scope.row.abnEndTime">{{formatDate(scope.row.abnEndTime)}}</span>
<span v-if="scope.row.abnStartTime"
>{{ formatDate(scope.row.abnStartTime) }} -
</span>
<span v-if="scope.row.abnEndTime">{{
formatDate(scope.row.abnEndTime)
}}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane :label="$t('表单')" name="download">
<el-table :data="downloadList" style="width: 50%">
<el-table-column prop="title" :label="$t('文件类型')"></el-table-column>
<el-table-column
prop="title"
:label="$t('文件类型')"
></el-table-column>
<el-table-column prop="" :label="$t('下载链接')">
<template slot-scope="scope">
<a v-if="scope.row.serviceName" href="javascript:void(0)" @click="downloadDetailFile(scope.row)" v-hasPermi="[`${scope.row.hasPermi}`]">{{$t('下载')}}</a>
<div v-else>{{$t('未完成')}}</div>
<a
v-if="scope.row.serviceName"
href="javascript:void(0)"
@click="downloadDetailFile(scope.row)"
v-hasPermi="[`${scope.row.hasPermi}`]"
>{{ $t("下载") }}</a
>
<div v-else>{{ $t("未完成") }}</div>
</template>
</el-table-column>
</el-table>
......@@ -215,40 +560,100 @@
</el-row>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="dialogConfig.title" :visible.sync="dialogConfig.visible" :width="dialogConfig.width" append-to-body class="shippingSea-dialog">
<el-dialog
:title="dialogConfig.title"
:visible.sync="dialogConfig.visible"
:width="dialogConfig.width"
append-to-body
class="shippingSea-dialog"
>
<template v-if="dialogConfig.type === 'edit'">
<editForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" />
<editForm
v-if="dialogConfig.visible"
@closeDialog="closeDialog"
:shipmentObj="shipmentObj"
:warehouseList="warehouseList"
:transportTypes="transportTypes"
:cabinetList="cabinetList"
/>
</template>
<template v-if="dialogConfig.type === 'cost'">
<costForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :costDetail="costDetail" flag="air" />
<costForm
v-if="dialogConfig.visible"
@closeDialog="closeDialog"
:shipmentObj="shipmentObj"
:costDetail="costDetail"
flag="air"
/>
</template>
<template v-if="dialogConfig.type === 'error'">
<regError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :allUsers="allUsers" flag="air" />
<regError
v-if="dialogConfig.visible"
@closeDialog="closeDialog"
:shipmentObj="shipmentObj"
:allUsers="allUsers"
flag="air"
/>
</template>
<template v-if="dialogConfig.type === 'updateError'">
<updateError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :errorInfo="errorInfo" />
<updateError
v-if="dialogConfig.visible"
@closeDialog="closeDialog"
:shipmentObj="shipmentObj"
:errorInfo="errorInfo"
/>
</template>
<template v-if="dialogConfig.type === 'updateArrival'">
<updateArrival v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :arrivalInfo="arrivalInfo" />
<updateArrival
v-if="dialogConfig.visible"
@closeDialog="closeDialog"
:shipmentObj="shipmentObj"
:arrivalInfo="arrivalInfo"
/>
</template>
<template v-if="dialogConfig.type === 'updateClear'">
<updateClear v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :clearInfo="clearInfo" />
<updateClear
v-if="dialogConfig.visible"
@closeDialog="closeDialog"
:shipmentObj="shipmentObj"
:clearInfo="clearInfo"
/>
</template>
<template v-if="dialogConfig.type === 'cancelClear'">
<cancelClear v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :cancelClearInfo="cancelClearInfo" />
<cancelClear
v-if="dialogConfig.visible"
@closeDialog="closeDialog"
:shipmentObj="shipmentObj"
:cancelClearInfo="cancelClearInfo"
/>
</template>
<template v-if="dialogConfig.type === 'unloadingError'">
<unloadingError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :unloadingError="unloadingError" />
<unloadingError
v-if="dialogConfig.visible"
@closeDialog="closeDialog"
:shipmentObj="shipmentObj"
:unloadingError="unloadingError"
/>
</template>
</el-dialog>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="$t('异常')" :visible.sync="dialogVisible" width="600px" :modal-append-to-body=false append-to-body>
<unloadingError v-if="dialogVisible" @closeDialog="closeDialog1" v-bind="$attrs" :currRow="currRow" />
<el-dialog
custom-class="shipping-dialog"
:title="$t('异常')"
:visible.sync="dialogVisible"
width="600px"
:modal-append-to-body="false"
append-to-body
>
<unloadingError
v-if="dialogVisible"
@closeDialog="closeDialog1"
v-bind="$attrs"
:currRow="currRow"
/>
</el-dialog>
</div>
</template>
......@@ -259,7 +664,8 @@ import {
getCostList,
getAbnormalList,
deleteCost,
deletebox,getPaymentId
deletebox,
getPaymentId,
} from "@/api/ecw/box";
import { getChannelList } from "@/api/ecw/channel";
import { getCabinetPage } from "@/api/ecw/cabinet";
......@@ -296,7 +702,7 @@ export default {
updateArrival,
updateClear,
cancelClear,
unloadingError
unloadingError,
},
created() {
this.transportTypes = this.getDictDatas(
......@@ -351,16 +757,15 @@ export default {
fullscreen: false,
},
// // 弹窗配置
// dialogConfig: {
// title: "",
// dialogVisible: false,
// width: "30%",
// type: "",
// fullscreen: false,
// },
dialogVisible: false,
// // 弹窗配置
// dialogConfig: {
// title: "",
// dialogVisible: false,
// width: "30%",
// type: "",
// fullscreen: false,
// },
dialogVisible: false,
// 运输方式
transportTypes: [],
......@@ -368,40 +773,53 @@ export default {
costDetail: {},
// 下载
downloadList: [
{ title: this.$t("预装单"), serviceName: "downloadPreloadGoodsList", hasPermi: "shipment:air:download:downloadPreloadGoodsList" },
{
title: this.$t("预装单"),
serviceName: "downloadPreloadGoodsList",
hasPermi: "shipment:air:download:downloadPreloadGoodsList",
},
// { title: this.$t("已装单"), serviceName: "downloadLoadGoodsList", hasPermi: "shipment:box:download:downloadLoadGoodsList" },
{ title: this.$t("应收汇总表"), serviceName: "downloadReceivableList", hasPermi: "shipment:air:download:downloadReceivableList" },
{
title: this.$t("应收汇总表"),
serviceName: "downloadReceivableList",
hasPermi: "shipment:air:download:downloadReceivableList",
},
{
title: this.$t("提货单"),
serviceName: "zipDownload",
fileFormat: "zip",
hasPermi: "shipment:air:download:zipDownload"
hasPermi: "shipment:air:download:zipDownload",
},
{
title: "agent list",
serviceName: "downloadAgentListFiles",
type: "url",
hasPermi: "shipment:air:download:downloadAgentListFiles"
hasPermi: "shipment:air:download:downloadAgentListFiles",
},
{
title: "soncap",
serviceName: "downloadSoncapFiles",
type: "url",
hasPermi: "shipment:air:download:downloadSoncapFiles",
},
{ title: "soncap", serviceName: "downloadSoncapFiles", type: "url", hasPermi: "shipment:air:download:downloadSoncapFiles" },
{
title: this.$t("AWB文件"),
serviceName: "cdAwbFile",
type: "url",
hasPermi: "shipment:air:download:cdAwbFile"
hasPermi: "shipment:air:download:cdAwbFile",
},
{
title: this.$t("提单Copy"),
serviceName: "downloadLadingCopy",
type: "url",
hasPermi: "shipment:air:download:downloadLadingCopy"
hasPermi: "shipment:air:download:downloadLadingCopy",
},
{
title: this.$t("已装单"),
serviceName: "downloadLoadGoods",
type: "url",
hasPermi: "shipment:air:download:downloadLoadGoods"
hasPermi: "shipment:air:download:downloadLoadGoods",
},
],
// 选中行
......@@ -413,12 +831,12 @@ export default {
operate: "",
},
arrivalInfo: {
orderList: []
orderList: [],
},
clearInfo: {
orderList: []
orderList: [],
},
cancelClearInfo: {}
cancelClearInfo: {},
};
},
methods: {
......@@ -431,37 +849,37 @@ export default {
});
},
getregprocess(val) {
var data = ''
switch(val){
var data = "";
switch (val) {
case 10:
data = 'FLYING_TICKET_EXCEPTION'
data = "FLYING_TICKET_EXCEPTION";
break;
case 12:
data = 'ARRIVAL_TICKET_EXCEPTION'
break
data = "ARRIVAL_TICKET_EXCEPTION";
break;
case 13:
data = 'CLEARANCE_TICKET_EXCEPTION'
break
data = "CLEARANCE_TICKET_EXCEPTION";
break;
default:
data = 'BOX_SHIPPING_TICKET_EXCEPTION'
break
data = "BOX_SHIPPING_TICKET_EXCEPTION";
break;
}
return data
return data;
},
selectable(row, index) {
if (row.abnormalDealStatus === 1) return false;
return true;
},
/* 关闭弹窗 */
closeDialog1(type) {
/* 关闭弹窗 */
closeDialog1(type) {
this.dialogVisible = false;
// if (type === "query") this.getLoadGoodsList();
},
/* 打开异常 */
openError(row) {
console.log(row)
console.log(row);
this.currRow = row;
this.dialogVisible = true;
},
......@@ -470,6 +888,12 @@ export default {
handleSelectionChange(selected) {
this.selectedRows = selected;
},
updateStatus_2(type, row) {
//异常登记 lanbm 2024-05-23 add
this.$set(this.dialogConfig, "visible", true);
this.$set(this.dialogConfig, "title", this.$t("异常登记"));
this.$set(this.dialogConfig, "type", "error");
},
/* 更新状态 */
updateStatus(type, row) {
let orders = [];
......@@ -491,7 +915,7 @@ export default {
} else if (type === "single") {
orders = [row];
}
console.log('getErrorType', type)
console.log("getErrorType", type);
this.getErrorType();
this.$set(this.errorInfo, "orderList", orders);
this.$set(this.errorInfo, "operate", type);
......@@ -499,8 +923,6 @@ export default {
this.handleCommand("updateError");
},
/* 更新到港状态 */
updateArrivalStatus(type) {
let orders = [];
......@@ -509,7 +931,9 @@ export default {
this.$message.error("请选择需要更新的订单");
return;
}
orders = this.selectedRows.map(item=>{return item.orderId});
orders = this.selectedRows.map((item) => {
return item.orderId;
});
}
this.$set(this.arrivalInfo, "orderList", orders);
this.$set(this.arrivalInfo, "type", type);
......@@ -523,7 +947,9 @@ export default {
this.$message.error("请选择需要更新的订单");
return;
}
orders = this.selectedRows.map(item=>{return item.orderId});
orders = this.selectedRows.map((item) => {
return item.orderId;
});
}
this.$set(this.clearInfo, "orderList", orders);
this.$set(this.clearInfo, "type", type);
......@@ -531,7 +957,7 @@ export default {
},
/* 更新清关状态 */
cancleClear(val) {
this.cancelClearInfo = val
this.cancelClearInfo = val;
this.handleCommand("cancelClear");
},
getErrorType() {
......@@ -556,7 +982,7 @@ export default {
this.$set(this.errorInfo, "errorType", "flight");
this.$set(this.dialogConfig, "title", this.$t("更新起飞异常状态"));
}
console.log(key, value)
console.log(key, value);
}
},
// 初始化字典数据
......@@ -614,7 +1040,7 @@ export default {
},
// 获取费用
getCost() {
//空运费用 lanbm 2024-05-16
//空运费用 lanbm 2024-05-16
getCostList({ shipmentId: this.shipmentId }).then((res) => {
this.costList = res.data;
});
......@@ -745,10 +1171,10 @@ export default {
},
formatDate,
downloadDetailFile(row) {
if(row.serviceName == 'downloadLoadGoods'){
if(this.shipmentObj.tyStatus < 2112){
this.$message.error('请先完成理货后,再下载已装单')
return
if (row.serviceName == "downloadLoadGoods") {
if (this.shipmentObj.tyStatus < 2112) {
this.$message.error("请先完成理货后,再下载已装单");
return;
}
}
const { fileFormat, type } = row;
......@@ -765,11 +1191,14 @@ export default {
fileFormat ?? "xlsx"
);
}
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
this.$message.success(this.$t("已加入导出队列,请稍后在下载日志中下载"));
},
handleApproval(id) {
this.$router.push({path: '/bpm/process-instance/detail', query: {id: id}})
}
this.$router.push({
path: "/bpm/process-instance/detail",
query: { id: id },
});
},
},
computed: {
visitedViews() {
......@@ -835,16 +1264,16 @@ export default {
},
getClearance() {
return (id) => {
let data = ['','我司清关','合作方清关','客户']
return data[id]
}
let data = ["", "我司清关", "合作方清关", "客户"];
return data[id];
};
},
getdeliveryType() {
return (id) => {
let data = ['','多票','单票']
return data[id]
}
}
let data = ["", "多票", "单票"];
return data[id];
};
},
},
};
</script>
......
<template>
<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="$t('客户编号')" prop="number">
<el-input v-model="queryParams.number" :placeholder="$t('请输入客户编号')" clearable @keyup.enter.native="handleQuery"/>
<el-input
v-model="queryParams.number"
:placeholder="$t('请输入客户编号')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('客户名称')" prop="name">
<el-input v-model="queryParams.name" :placeholder="$t('请输入客户名称')" clearable @keyup.enter.native="handleQuery"/>
<el-input
v-model="queryParams.name"
:placeholder="$t('请输入客户名称')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('客户等级')" prop="level">
<el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
<el-select
clearable
v-model="queryParams.level"
:placeholder="$t('请选择客户等级')"
clearable
size="small"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('联系方式')">
<el-input :placeholder="$t('请输入联系方式')" v-model="queryParams.defaultContactPhone"></el-input>
<el-input
:placeholder="$t('请输入联系方式')"
v-model="queryParams.defaultContactPhone"
></el-input>
</el-form-item>
<el-form-item :label="$t('客户类别')" prop="level">
<dict-selector clearable :type="DICT_TYPE.CUSTOMER_TYPE" v-model="queryParams.type" ></dict-selector>
<dict-selector
clearable
:type="DICT_TYPE.CUSTOMER_TYPE"
v-model="queryParams.type"
></dict-selector>
</el-form-item>
<el-form-item :label="$t('客户经理')" prop="customerService">
<el-select clearable v-model="queryParams.customerService" :placeholder="$t('请选择客户经理')" clearable size="small">
<el-option v-for="dict in customerServiceList"
:key="dict.id" :label="dict.nickname" :value="dict.id"/>
<el-select
clearable
v-model="queryParams.customerService"
:placeholder="$t('请选择客户经理')"
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="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
<el-select
clearable
v-model="queryParams.source"
:placeholder="$t('请选择客户来源')"
size="small"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('国家')" prop="source">
<el-select clearable v-model="queryParams.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList"
:key="dict.id" :label=" isChinese ? dict.nameZh : dict.nameEn" :value="parseInt(dict.id)" />
<el-select
clearable
v-model="queryParams.country"
:placeholder="$t('请选择国家')"
>
<el-option
v-for="dict in countryList"
:key="dict.id"
:label="isChinese ? dict.nameZh : dict.nameEn"
:value="parseInt(dict.id)"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('客户状态')" prop="status">
<el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
<el-select
clearable
v-model="queryParams.status"
:placeholder="$t('请选择客户状态')"
clearable
size="small"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker
type="datetimerange"
clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
clearable
v-model="dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
/>
</el-form-item>
<el-form-item :label="$t('信用等级')" prop="department">
<el-select clearable v-model="queryParams.creditLevel" >
<el-option v-for="(item,index) in creditList" :label="isChinese ? item.nameZh : item.nameEn" :key="index" :value="item.id" ></el-option>
<el-select clearable v-model="queryParams.creditLevel">
<el-option
v-for="(item, index) in creditList"
:label="isChinese ? item.nameZh : item.nameEn"
:key="index"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('市场获客')" prop="department">
<dict-selector clearable :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" v-model="queryParams.resourceType" formatter="number"></dict-selector>
<el-form-item :label="$t('市场获客')" prop="department">
<dict-selector
clearable
:type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE"
v-model="queryParams.resourceType"
formatter="number"
></dict-selector>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{
$t("搜索")
}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{
$t("重置")
}}</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<div v-if="path === '/customer/customer'" style="color: red;margin-bottom: 5px;">
<div
v-if="path === '/customer/customer'"
style="color: red; margin-bottom: 5px"
>
注意:创建的客户需接收
</div>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button v-if="path === '/customer/potential'" type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddPotential">{{$t('新增潜在客户')}}</el-button>
<el-button v-else type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="[ selectAuthorityFn('ecw:customer:create')]">{{$t('新增')}}
<el-button
v-if="path === '/customer/potential'"
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAddPotential"
>{{ $t("新增潜在客户") }}</el-button
>
<el-button
v-else
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="[selectAuthorityFn('ecw:customer:create')]"
>{{ $t("新增") }}
</el-button>
</el-col>
<el-col :span="1.5" >
<el-button :disabled="selectCustomerList.length === 0" type="primary" size="mini" @click="transferShow = true;"
v-hasPermi="[selectAuthorityFn('ecw:customer:batch-transfer')]">{{$t('批量移交')}}</el-button>
<el-col :span="1.5">
<el-button
:disabled="selectCustomerList.length === 0"
type="primary"
size="mini"
@click="transferShow = true"
v-hasPermi="[selectAuthorityFn('ecw:customer:batch-transfer')]"
>{{ $t("批量移交") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="[selectAuthorityFn('ecw:customer:export')]">{{$t('导出')}}</el-button>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
:loading="exportLoading"
v-hasPermi="[selectAuthorityFn('ecw:customer:export')]"
>{{ $t("导出") }}</el-button
>
</el-col>
<el-col :span="1.5">
<!-- <el-button :disabled="!selectCustomerList.length" @click="setChangeCustomerAir(true)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"-->
<!-- v-hasPermi="['ecw:customer:transport']" >{{$t('设为空运客户')}}</el-button>-->
<!-- <el-button :disabled="!selectCustomerList.length" @click="setChangeCustomerAir(true)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"-->
<!-- v-hasPermi="['ecw:customer:transport']" >{{$t('设为空运客户')}}</el-button>-->
</el-col>
<el-col :span="1.5">
<!-- <el-button :disabled="!selectCustomerList.length" @click="setChangeCustomerAir(false)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"-->
<!-- v-hasPermi="['ecw:customer:transport']">{{$t('设为非空运客户')}}</el-button>-->
<!-- <el-button :disabled="!selectCustomerList.length" @click="setChangeCustomerAir(false)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"-->
<!-- v-hasPermi="['ecw:customer:transport']">{{$t('设为非空运客户')}}</el-button>-->
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['ecw:customer:fcl']" :disabled="!selectCustomerList.length" @click="setFullContainerLoad(true)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading">{{$t('设置海运整柜客户')}}</el-button>
<el-button
v-hasPermi="['ecw:customer:fcl']"
:disabled="!selectCustomerList.length"
@click="setFullContainerLoad(true)"
v-if="$route.path === '/customer/customer'"
type="primary"
plain
size="mini"
:loading="exportLoading"
>{{ $t("设置海运整柜客户") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['ecw:customer:fcl-mistake']" :disabled="!selectCustomerList.length" @click="setFullContainerLoad(false)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"
>{{$t('设置海运非整柜客户')}}</el-button>
<el-button
v-hasPermi="['ecw:customer:fcl-mistake']"
:disabled="!selectCustomerList.length"
@click="setFullContainerLoad(false)"
v-if="$route.path === '/customer/customer'"
type="primary"
plain
size="mini"
:loading="exportLoading"
>{{ $t("设置海运非整柜客户") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button v-has-permi="[selectAuthorityFn('ecw:customer:create-potential')]" v-if="path === '/customer/customer'" type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddPotential">{{$t('新增潜在客户')}}</el-button>
<el-button
v-has-permi="[selectAuthorityFn('ecw:customer:create-potential')]"
v-if="path === '/customer/customer'"
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAddPotential"
>{{ $t("新增潜在客户") }}</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-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="$t('客户编号')" align="center" prop="number" >
<template v-slot="{row}">
{{row.number}}
<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="$t('客户编号')" align="center" prop="number">
<template v-slot="{ row }">
{{ row.number }}
</template>
</el-table-column>
<el-table-column :label="$t('客户名称')" align="center" prop="name">
<template slot-scope="{row}">
<p style="display:inline-block;white-space:pre-wrap;">{{$l(row, 'name')}}</p>
<el-tag v-if="row.isInOpenSea" size="mini">{{ $t('') }}</el-tag>
<template slot-scope="{ row }">
<p style="display: inline-block; white-space: pre-wrap">
{{ $l(row, "name") }}
</p>
<el-tag v-if="row.isInOpenSea" size="mini">{{ $t("") }}</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('客户等级')" align="center" prop="vipLevelNameZh">
<el-table-column
:label="$t('客户等级')"
align="center"
prop="vipLevelNameZh"
>
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column :label="$t('信用等级')" :prop="isChinese ? 'creditLevelNameZh' : 'creditLevelNameEn'"></el-table-column>
<el-table-column
:label="$t('信用等级')"
:prop="isChinese ? 'creditLevelNameZh' : 'creditLevelNameEn'"
></el-table-column>
<el-table-column :label="$t('客户状态')" align="center" prop="status">
<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>
</el-table-column>
<el-table-column :label="$t('主联系人')" prop="defaultContactName"></el-table-column>
<el-table-column
:label="$t('主联系人')"
prop="defaultContactName"
></el-table-column>
<el-table-column :label="$t('主联系方式')" prop="defaultContactPhone">
<template v-slot="{row}">
+{{row.defaultContactPhone}} <br/>
<contacts :id="row.id" >
<el-button type="text">更多</el-button>
<template v-slot="{ row }">
+{{ row.defaultContactPhone }} <br />
<contacts :id="row.id">
<el-button type="text">更多</el-button>
</contacts>
</template>
</el-table-column>
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="180">
<el-table-column
:label="$t('创建时间')"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('入公海时间')" align="center" prop="createTime" width="180">
<template v-slot = {row}>
<span>{{ parseTime(row.enterOpenSeaTime ? row.enterOpenSeaTime : row.estimateEnterOpenSeaTime ) }}</span>
<el-table-column
:label="$t('入公海时间')"
align="center"
prop="createTime"
width="180"
>
<template v-slot="{ row }">
<span>{{
parseTime(
row.enterOpenSeaTime
? row.enterOpenSeaTime
: row.estimateEnterOpenSeaTime
)
}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName">
<el-table-column
:label="$t('客户经理')"
align="center"
prop="customerServiceName"
></el-table-column>
<!--
<el-table-column
:label="$t('客户经理ID')"
align="center" v-show="false"
prop="customerService"
>-->
</el-table-column>
<el-table-column :label="$t('出货渠道')">
<template slot-scope="{row}">
{{channel(row.transportType)}}
<template slot-scope="{ row }">
{{ channel(row.transportType) }}
</template>
</el-table-column>
<el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
<el-table-column width="200px" :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<el-table-column
:label="$t('国家')"
align="center"
prop="country"
:formatter="countryFormatter"
></el-table-column>
<el-table-column
width="200px"
:label="$t('操作')"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<!-- <el-button size="mini" type="text" v-show="'development' === env && scope.row.isInOpenSea" @click="seasPond(scope.row)"-->
<!-- v-hasPermi="['ecw:customer:query']">{{$t('掉入公海池')}}</el-button>-->
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"
v-hasPermi="[selectAuthorityFn('ecw:customer:index-query')]">{{$t('查看')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="[selectAuthorityFn('ecw:customer:update')]">{{$t('修改')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="[selectAuthorityFn('ecw:customer:delete')]">{{$t('删除')}}</el-button>
<el-button size="mini" v-has-permi="[selectAuthorityFn('ecw:customer:follow-up')]" type="text" icon="el-icon-collection" @click="followUp(scope.row)">{{$t('跟进')}}</el-button>
<el-button size="mini" v-has-permi="[selectAuthorityFn('ecw:customer:customer-complaint')]" type="text" icon="el-icon-user" @click="complaint(scope.row)">{{$t('客诉')}}</el-button>
<el-button :disabled="scope.row.isInOpenSea" v-has-permi="[selectAuthorityFn('ecw:customer:postpone')]" size="mini" type="text" icon="el-icon-user" @click="delay(scope.row)">{{$t('延期')}}</el-button>
<el-button v-has-permi="['ecw:customer:treat-recovery']" v-if="scope.row.customerService !== null && scope.row.customerServiceAssignedTime !== null && !scope.row.isCustomerServiceConfirmed && !scope.row.isInOpenSea && path === '/customer/customer'" size="mini" type="text" @click="recovery(scope.row)" > {{$t('回收客户')}} </el-button>
<el-button v-has-permi="['ecw:customer:performanceType']" v-if="path === '/customer/customer'" size="mini" type="text" @click="dialogVisible = true; customData = scope.row;currentisNew = scope.row.isNew" > {{$t('业绩类型')}} </el-button>
<el-button v-has-permi="[selectAuthorityFn('ecw:customer:treat-quoted-price')]" size="mini" type="text" icon="el-icon-user" @click="quote(scope.row)">{{$t('报价')}}</el-button>
<!-- <el-button size="mini" type="text" v-show="'development' === env && scope.row.isInOpenSea" @click="seasPond(scope.row)"-->
<!-- v-hasPermi="['ecw:customer:query']">{{$t('掉入公海池')}}</el-button>-->
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row)"
v-hasPermi="[selectAuthorityFn('ecw:customer:index-query')]"
>{{ $t("查看") }}</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="[selectAuthorityFn('ecw:customer:update')]"
>{{ $t("修改") }}</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="[selectAuthorityFn('ecw:customer:delete')]"
>{{ $t("删除") }}</el-button
>
<el-button
size="mini"
v-has-permi="[selectAuthorityFn('ecw:customer:follow-up')]"
type="text"
icon="el-icon-collection"
@click="followUp(scope.row)"
>{{ $t("跟进") }}</el-button
>
<el-button
size="mini"
v-has-permi="[selectAuthorityFn('ecw:customer:customer-complaint')]"
type="text"
icon="el-icon-user"
@click="complaint(scope.row)"
>{{ $t("客诉") }}</el-button
>
<el-button
:disabled="scope.row.isInOpenSea"
v-has-permi="[selectAuthorityFn('ecw:customer:postpone')]"
size="mini"
type="text"
icon="el-icon-user"
@click="delay(scope.row)"
>{{ $t("延期") }}</el-button
>
<el-button
v-has-permi="['ecw:customer:treat-recovery']"
v-if="
scope.row.customerService !== null &&
scope.row.customerServiceAssignedTime !== null &&
!scope.row.isCustomerServiceConfirmed &&
!scope.row.isInOpenSea &&
path === '/customer/customer'
"
size="mini"
type="text"
@click="recovery(scope.row)"
>
{{ $t("回收客户") }}
</el-button>
<el-button
v-has-permi="['ecw:customer:performanceType']"
v-if="path === '/customer/customer'"
size="mini"
type="text"
@click="
dialogVisible = true;
customData = scope.row;
currentisNew = scope.row.isNew;
"
>
{{ $t("业绩类型") }}
</el-button>
<!--lanbm 2024-05-23 添加报价按钮逻辑控制-->
<el-button
v-has-permi="[selectAuthorityFn('ecw:customer:treat-quoted-price')]"
size="mini"
type="text"
icon="el-icon-user"
@click="quote(scope.row)"
>{{ $t("报价") }}</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<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="90%" append-to-body :close-on-click-modal="false">
<el-dialog
:title="title"
:visible.sync="open"
width="90%"
append-to-body
:close-on-click-modal="false"
>
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-row :gutter="10">
<el-col :span="12">
<el-form-item :label="$t('客户名称')" prop="name">
<el-input v-model="form.name" :placeholder="$t('请输入客户名称')" />
<el-input
v-model="form.name"
:placeholder="$t('请输入客户名称')"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('国家')" prop="country">
<el-select v-model="form.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.COUNTRY)"
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
<el-option
v-for="dict in getDictDatas(DICT_TYPE.COUNTRY)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户等级')" prop="level">
<el-select v-model="form.level" :placeholder="$t('请选择客户等级')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
<el-select
v-model="form.level"
:placeholder="$t('请选择客户等级')"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('联系地址')" prop="address">
<el-input v-model="form.address" :placeholder="$t('请输入联系地址')" />
<el-input
v-model="form.address"
:placeholder="$t('请输入联系地址')"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户类别')" prop="type">
<el-select v-model="form.type" :placeholder="$t('请选择客户类别')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_TYPE)"
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" />
<el-select
v-model="form.type"
:placeholder="$t('请选择客户类别')"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_TYPE)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item :label="$t('所属代理')" prop="agentId">-->
<!-- <el-select v-model="form.agentId" :placeholder="$t('请选择所属代理')">-->
<!-- <el-option v-for="dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"-->
<!-- :key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item :label="$t('所属代理')" prop="agentId">-->
<!-- <el-select v-model="form.agentId" :placeholder="$t('请选择所属代理')">-->
<!-- <el-option v-for="dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"-->
<!-- :key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item :label="$t('常用提货网点')" prop="pickupPoint">
<el-select v-model="form.pickupPoint" :placeholder="$t('请输入常用提货网点')">
<el-option v-for="node in nodeList"
:key="node.value" :label="node.label" :value="node.value" />
<el-select
v-model="form.pickupPoint"
:placeholder="$t('请输入常用提货网点')"
>
<el-option
v-for="node in nodeList"
:key="node.value"
:label="node.label"
:value="node.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('公司名称')" prop="company">
<el-input v-model="form.company" :placeholder="$t('请输入公司名称')" />
<el-input
v-model="form.company"
:placeholder="$t('请输入公司名称')"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户生日')" prop="birthday">
<el-date-picker
v-model="form.birthday"
type="date"
value-format="timestamp"
:placeholder="$t('请输入客户生日')">
:placeholder="$t('请输入客户生日')"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('主营类别')" prop="productType">
<el-row :gutter="10">
<el-col :span="11">
<el-select v-model="form.productType" :placeholder="$t('请选择产品类别')">
<!-- <el-option :label="$t('请选择字典生成')" value="" />-->
</el-select>
</el-col>
<el-col :span="11">
<el-select v-model="form.productType" :placeholder="$t('请选择主营类别')">
<!-- <el-option :label="$t('请选择字典生成')" value="" />-->
<el-select
v-model="form.productType"
:placeholder="$t('请选择产品类别')"
>
<!-- <el-option :label="$t('请选择字典生成')" value="" />-->
</el-select>
</el-col>
<el-col :span="11">
<el-select
v-model="form.productType"
:placeholder="$t('请选择主营类别')"
>
<!-- <el-option :label="$t('请选择字典生成')" value="" />-->
</el-select>
</el-col>
</el-row>
......@@ -274,25 +603,46 @@
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户来源')" prop="source">
<el-select v-model="form.source" :placeholder="$t('请选择客户来源')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
<el-select
v-model="form.source"
:placeholder="$t('请选择客户来源')"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('结算方式')" prop="balance">
<el-select v-model="form.balance" :placeholder="$t('请选择结算方式')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
<el-select
v-model="form.balance"
:placeholder="$t('请选择结算方式')"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户经理')" prop="customerService">
<el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')">
<el-option v-for="dict in customerServiceList"
:key="dict.id" :label="dict.nickname" :value="dict.id" />
<el-select
v-model="form.customerService"
:placeholder="$t('请选择客户经理')"
>
<el-option
v-for="dict in customerServiceList"
:key="dict.id"
:label="dict.nickname"
:value="dict.id"
/>
</el-select>
</el-form-item>
</el-col>
......@@ -300,25 +650,36 @@
<el-form-item :label="$t('图片')" prop="picture">
<upload v-model="form.picture" :limit="1"></upload>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户状态')" prop="status">
<el-select v-model="form.status" :placeholder="$t('请选择客户状态')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
<el-select
v-model="form.status"
:placeholder="$t('请选择客户状态')"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('推介人')" prop="promoter">
<el-input v-model="form.promoter" :placeholder="$t('请输入推介人')" />
<el-input
v-model="form.promoter"
:placeholder="$t('请输入推介人')"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('创建人')" prop="founder">
<el-input v-model="form.founder" :placeholder="$t('请输入创建人')" />
<el-input
v-model="form.founder"
:placeholder="$t('请输入创建人')"
/>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -327,23 +688,34 @@
v-model="form.createTime"
type="datetime"
value-format="timestamp"
:placeholder="$t('选择创建时间')">
:placeholder="$t('选择创建时间')"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('备注')" prop="remarks">
<el-input v-model="form.remarks" :placeholder="$t('请输入备注')" />
<el-input
v-model="form.remarks"
:placeholder="$t('请输入备注')"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('到仓确认')" prop="arrivalConfirm">
<el-switch v-model="form.arrivalConfirm" :active-value="0" :inactive-value="1" />
<el-switch
v-model="form.arrivalConfirm"
:active-value="0"
:inactive-value="1"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('重货标准(CBM)')" prop="weightUnit">
<el-input v-model="form.weightUnit" :placeholder="$t('请输入重货标准(CBM)')" />
<el-input
v-model="form.weightUnit"
:placeholder="$t('请输入重货标准(CBM)')"
/>
</el-form-item>
</el-col>
<el-col :span="24">
......@@ -353,14 +725,11 @@
v-show="showLine"
border
:data="form.customerLines"
style="width: 500px">
<el-table-column
prop="departureId"
:label="$t('始发地')">
style="width: 500px"
>
<el-table-column prop="departureId" :label="$t('始发地')">
</el-table-column>
<el-table-column
prop="objectiveId"
:label="$t('目的地')">
<el-table-column prop="objectiveId" :label="$t('目的地')">
</el-table-column>
</el-table>
</el-form-item>
......@@ -369,113 +738,132 @@
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>{{ $t('联系人') }}</span>
<el-button style="float: right;" size="small" type="primary" @click="form.customerContacts.push({department: undefined})">+</el-button>
</div>
<el-table
:data="form.customerContacts"
style="width: 100%"
>
<el-table-column
prop="department"
:label="$t('部门')"
width=""
<span>{{ $t("联系人") }}</span>
<el-button
style="float: right"
size="small"
type="primary"
@click="form.customerContacts.push({ department: undefined })"
>+</el-button
>
</div>
<el-table :data="form.customerContacts" style="width: 100%">
<el-table-column prop="department" :label="$t('部门')" width="">
<template v-slot="{ row, column, $index }">
<el-input v-model="row.department" :placeholder="$t('请输入部门')" size="mini"/>
<el-input
v-model="row.department"
:placeholder="$t('请输入部门')"
size="mini"
/>
</template>
</el-table-column>
<el-table-column
prop="position"
:label="$t('职位')"
width=""
>
<template v-slot="{row}">
<el-input v-model="row.position" :placeholder="$t('请输入职位')" size="mini"/>
<el-table-column prop="position" :label="$t('职位')" width="">
<template v-slot="{ row }">
<el-input
v-model="row.position"
:placeholder="$t('请输入职位')"
size="mini"
/>
</template>
</el-table-column>
<el-table-column
prop="name"
:label="$t('联系人')"
>
<template v-slot:header>{{ $t('联系人') }}<span style="color: #ff0000">*</span>
<el-table-column prop="name" :label="$t('联系人')">
<template v-slot:header
>{{ $t("联系人") }}<span style="color: #ff0000">*</span>
</template>
<template v-slot="{row}">
<el-input v-model="row.name" :placeholder="$t('请输入联系人')" size="mini"/>
<template v-slot="{ row }">
<el-input
v-model="row.name"
:placeholder="$t('请输入联系人')"
size="mini"
/>
</template>
</el-table-column>
<el-table-column
prop="areaCode"
:label="$t('区号')"
>
<template v-slot:header>{{ $t('区号') }}<span style="color: #ff0000">*</span>
<el-table-column prop="areaCode" :label="$t('区号')">
<template v-slot:header
>{{ $t("区号") }}<span style="color: #ff0000">*</span>
</template>
<template v-slot="{row}">
<el-select v-model="row.areaCode" :placeholder="$t('请选择区号')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.AREA_CODE)"
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
<template v-slot="{ row }">
<el-select
v-model="row.areaCode"
:placeholder="$t('请选择区号')"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.AREA_CODE)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select>
</template>
</el-table-column>
<el-table-column
prop="phoneNew"
:label="$t('联系方式')"
>
<template v-slot:header>{{ $t('联系方式') }}<span style="color: #ff0000">*</span>
<el-table-column prop="phoneNew" :label="$t('联系方式')">
<template v-slot:header
>{{ $t("联系方式") }}<span style="color: #ff0000">*</span>
</template>
<template v-slot="{row}">
<el-input v-model="row.phoneNew" :placeholder="$t('请输入联系方式')" size="mini"/>
<template v-slot="{ row }">
<el-input
v-model="row.phoneNew"
:placeholder="$t('请输入联系方式')"
size="mini"
/>
</template>
</el-table-column>
<el-table-column
prop=""
:label="$t('关联账号')"
>
</el-table-column>
<el-table-column
prop="social"
:label="$t('社交软件')"
>
<template v-slot="{row}">
<el-select v-model="row.social" :placeholder="$t('请选择社交软件')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
<el-table-column prop="" :label="$t('关联账号')"> </el-table-column>
<el-table-column prop="social" :label="$t('社交软件')">
<template v-slot="{ row }">
<el-select
v-model="row.social"
:placeholder="$t('请选择社交软件')"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select>
</template>
</el-table-column>
<el-table-column
prop="socialNumber"
:label="$t('社交软件号码')"
>
<template v-slot="{row}">
<el-input v-model="row.socialNumber" :placeholder="$t('请输入社交软件号码')" size="mini"/>
<el-table-column prop="socialNumber" :label="$t('社交软件号码')">
<template v-slot="{ row }">
<el-input
v-model="row.socialNumber"
:placeholder="$t('请输入社交软件号码')"
size="mini"
/>
</template>
</el-table-column>
<el-table-column
prop="email"
:label="$t('邮箱')"
>
<template v-slot="{row}">
<el-input v-model="row.email" :placeholder="$t('请输入邮箱')" size="mini"/>
<el-table-column prop="email" :label="$t('邮箱')">
<template v-slot="{ row }">
<el-input
v-model="row.email"
:placeholder="$t('请输入邮箱')"
size="mini"
/>
</template>
</el-table-column>
<el-table-column
prop="isDefault"
:label="$t('设为默认')"
>
<template v-slot="{row}">
<el-select v-model="row.isDefault" :placeholder="$t('设为默认')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.isDefault)" />
<el-table-column prop="isDefault" :label="$t('设为默认')">
<template v-slot="{ row }">
<el-select
v-model="row.isDefault"
:placeholder="$t('设为默认')"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.isDefault)"
/>
</el-select>
</template>
</el-table-column>
<el-table-column
prop="name"
:label="$t('操作')"
>
<el-table-column prop="name" :label="$t('操作')">
<template v-slot="{ row, column, $index }">
<el-button type="danger" @click="form.customerContacts.splice($index, 1)">{{ $t('删除') }}</el-button>
<el-button
type="danger"
@click="form.customerContacts.splice($index, 1)"
>{{ $t("删除") }}</el-button
>
</template>
</el-table-column>
</el-table>
......@@ -484,12 +872,18 @@
<el-row :gutter="10" style="margin-top: 15px">
<el-col :span="12">
<el-form-item :label="$t('发票抬头')" prop="invoiceTitle">
<el-input v-model="form.invoiceTitle" :placeholder="$t('请输入发票抬头')" />
<el-input
v-model="form.invoiceTitle"
:placeholder="$t('请输入发票抬头')"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('纳税人识别号')" prop="licenseNumber">
<el-input v-model="form.licenseNumber" :placeholder="$t('请输入纳税人识别号')" />
<el-input
v-model="form.licenseNumber"
:placeholder="$t('请输入纳税人识别号')"
/>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -499,95 +893,131 @@
</el-col>
<el-col :span="12">
<el-form-item :label="$t('账户')" prop="bankNumber">
<el-input v-model="form.bankNumber" :placeholder="$t('请输入账户')" />
<el-input
v-model="form.bankNumber"
:placeholder="$t('请输入账户')"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('项目')" prop="project">
<el-input v-model="form.project" :placeholder="$t('请输入项目')" />
<el-input
v-model="form.project"
:placeholder="$t('请输入项目')"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('开票地址')" prop="billingAddress">
<el-input v-model="form.billingAddress" :placeholder="$t('请输入开票地址')" />
<el-input
v-model="form.billingAddress"
:placeholder="$t('请输入开票地址')"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('开票电话')" prop="billingTell">
<el-input v-model="form.billingTell" :placeholder="$t('请输入开票电话')" />
<el-input
v-model="form.billingTell"
:placeholder="$t('请输入开票电话')"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('税率')" prop="taxRate">
<el-input v-model="form.taxRate" :placeholder="$t('请输入税率')" />
<el-input
v-model="form.taxRate"
:placeholder="$t('请输入税率')"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{$t('确 定')}}</el-button>
<el-button @click="cancel">{{$t('取 消')}}</el-button>
<el-button type="primary" @click="submitForm">{{
$t("确 定")
}}</el-button>
<el-button @click="cancel">{{ $t("取 消") }}</el-button>
</div>
</el-dialog>
<customer-follow-list :customer-id="customerId" :id="customerId" ref="CustomerFollowList"></customer-follow-list>
<customer-complaints :customer-id="customerId" ref="customerComplaints"></customer-complaints>
<transfer-customer :show.sync="transferShow" :customer-ids.sync="selectCustomerList"></transfer-customer>
<add-potential-custom ref="potentialCustom" @change="getList" ></add-potential-custom>
<customer-follow-list
:customer-id="customerId"
:id="customerId"
ref="CustomerFollowList"
></customer-follow-list>
<customer-complaints
:customer-id="customerId"
ref="customerComplaints"
></customer-complaints>
<transfer-customer
:show.sync="transferShow"
:customer-ids.sync="selectCustomerList"
></transfer-customer>
<add-potential-custom
ref="potentialCustom"
@change="getList"
></add-potential-custom>
<!--业绩类型 -->
<el-dialog
title="业绩类型"
:visible.sync="dialogVisible"
width="30%">
<div>
<el-form>
<el-form-item label="客户编号">{{customData.number}}</el-form-item>
<el-form-item label="客户名称">{{customData.name}}</el-form-item>
<el-form-item label="业绩类型">
<el-radio-group v-model="currentisNew">
<el-radio :label="true" >{{$t('新客户')}}</el-radio>
<el-radio :label="false" >{{$t('老客户')}}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button :disabled="customData.isNew === currentisNew" type="primary" @click="modifyCustomer">修改</el-button>
</span>
</el-dialog>
<el-dialog title="业绩类型" :visible.sync="dialogVisible" width="30%">
<div>
<el-form>
<el-form-item label="客户编号">{{ customData.number }}</el-form-item>
<el-form-item label="客户名称">{{ customData.name }}</el-form-item>
<el-form-item label="业绩类型">
<el-radio-group v-model="currentisNew">
<el-radio :label="true">{{ $t("新客户") }}</el-radio>
<el-radio :label="false">{{ $t("老客户") }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button
:disabled="customData.isNew === currentisNew"
type="primary"
@click="modifyCustomer"
>修改</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
import {
createCustomer,
updateCustomer,
deleteCustomer,
getCustomer,
getCustomerPage,
exportCustomerExcel,
testEnterToOpenSea,
getCustomerDeptPage,
changeCustomerAir,
getPotential,
setChangeCustomerFcl, potentialExportExcel, deptExportExcel, recycleUnconfirmedCustomer, updatecustomerToOld
createCustomer,
updateCustomer,
deleteCustomer,
getCustomer,
getCustomerPage,
exportCustomerExcel,
testEnterToOpenSea,
getCustomerDeptPage,
changeCustomerAir,
getPotential,
setChangeCustomerFcl,
potentialExportExcel,
deptExportExcel,
recycleUnconfirmedCustomer,
updatecustomerToOld,
} from "@/api/ecw/customer";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {CommonStatusEnum} from '@/utils/constants'
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { CommonStatusEnum } from "@/utils/constants";
import { uploadFile } from "@/api/infra/file";
import upload from '@/components/ImageUpload'
import {getNodeList} from "@/api/ecw/node"
import CustomerFollowList from "@/components/CustomerFollowList"
import customerComplaints from "@/components/customerComplaints"
import {listServiceUser} from "@/api/system/user";
import { getCountryListAll } from '@/api/ecw/country'
import {getCreditPage} from "@/api/customer/credit";
import {customerExportExcel} from "@/api/ecw/customer";
import upload from "@/components/ImageUpload";
import { getNodeList } from "@/api/ecw/node";
import CustomerFollowList from "@/components/CustomerFollowList";
import customerComplaints from "@/components/customerComplaints";
import { listServiceUser } from "@/api/system/user";
import { getCountryListAll } from "@/api/ecw/country";
import { getCreditPage } from "@/api/customer/credit";
import { customerExportExcel } from "@/api/ecw/customer";
import transferCustomer from "@/views/ecw/customer/transferCustomer";
import Template from "@/views/cms/template/index.vue";
import AddPotentialCustom from "@/views/ecw/customer/addPotentialCustom.vue";
import Contacts from "@/views/ecw/customer/components/contacts.vue";
import { getUserProfile } from "@/api/system/user";
export default {
name: "EcwCustomerIndex",
......@@ -598,11 +1028,11 @@ export default {
upload,
CustomerFollowList,
customerComplaints,
transferCustomer
transferCustomer,
},
data() {
return {
env:process.env.NODE_ENV,
env: process.env.NODE_ENV,
getDictDatas,
DICT_TYPE,
// 遮罩层
......@@ -631,254 +1061,330 @@ export default {
customerService: null,
status: null,
department: null,
creditLevel:null,
country:null,
resourceType:null,
creditLevel: null,
country: null,
resourceType: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
name: [{ required: true, message: this.$t('客户名称不能为空'), trigger: "blur" }],
country: [{ required: true, message: this.$t('国家不能为空'), trigger: "blur" }],
level: [{ required: true, message: this.$t('客户等级不能为空'), trigger: "blur" }],
type: [{ required: true, message: this.$t('客户类别不能为空'), trigger: "blur" }],
name: [
{
required: true,
message: this.$t("客户名称不能为空"),
trigger: "blur",
},
],
country: [
{ required: true, message: this.$t("国家不能为空"), trigger: "blur" },
],
level: [
{
required: true,
message: this.$t("客户等级不能为空"),
trigger: "blur",
},
],
type: [
{
required: true,
message: this.$t("客户类别不能为空"),
trigger: "blur",
},
],
// createTime: [{ required: true, message: this.$t("创建时间不能为空"), trigger: "blur" }],
source: [{ required: true, message: this.$t('客户来源不能为空'), trigger: "blur" }],
customerService: [{ required: true, message: this.$t('客户经理不能为空'), trigger: "blur" }],
status: [{ required: true, message: this.$t('客户状态不能为空'), trigger: "blur" }],
founder: [{ required: true, message: this.$t('创建人不能为空'), trigger: "blur" }],
source: [
{
required: true,
message: this.$t("客户来源不能为空"),
trigger: "blur",
},
],
customerService: [
{
required: true,
message: this.$t("客户经理不能为空"),
trigger: "blur",
},
],
status: [
{
required: true,
message: this.$t("客户状态不能为空"),
trigger: "blur",
},
],
founder: [
{
required: true,
message: this.$t("创建人不能为空"),
trigger: "blur",
},
],
},
// 网点
nodeList: [],
showLine: false,
customerId:undefined,
customerServiceList:[],
customerId: undefined,
customerServiceList: [],
countryList: [],
creditList:[],
selectCustomerList:[],
transferShow:false,
dialogVisible:false,
customData:{
},
currentisNew:false
creditList: [],
selectCustomerList: [],
transferShow: false,
dialogVisible: false,
customData: {},
currentisNew: false,
userId: undefined, //lanbm 2024-05-23 add
};
},
computed:{
path(){
return this.$route.path
computed: {
path() {
return this.$route.path;
},
channel(){
return (val)=>{
return !!val ? this.getDictDatas(this.DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE).filter(i => (val.split(',') || []).includes(i.value)).map(i => this.isChinese ? i.label : i.labelEn ).join('') :''
}
channel() {
return (val) => {
return !!val
? this.getDictDatas(this.DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE)
.filter((i) => (val.split(",") || []).includes(i.value))
.map((i) => (this.isChinese ? i.label : i.labelEn))
.join("")
: "";
};
},
isChinese(){
return this.$i18n.locale === 'zh_CN'
isChinese() {
return this.$i18n.locale === "zh_CN";
},
authorityFn(){
let i = ''
switch (this.$route.path){
case '/customer/department-customers':
i = 'dep-'
authorityFn() {
let i = "";
switch (this.$route.path) {
case "/customer/department-customers":
i = "dep-";
break;
case '/customer/potential':
i = 'pot-'
case "/customer/potential":
i = "pot-";
break;
}
return i
return i;
},
selectAuthorityFn() {
return (val) => {
let t = val.split(":");
t[t.length - 1] = this.authorityFn + t[t.length - 1];
console.log(t.join(":"));
return t.join(":");
};
},
selectAuthorityFn(){
return (val)=>{
let t = val.split(":")
t[t.length - 1] = this.authorityFn + t[t.length - 1]
console.log( t.join(":"))
return t.join(":")
}
}
},
watch:{
selectCustomerList(val){
if(val.length === 0){
this.getList()
watch: {
selectCustomerList(val) {
if (val.length === 0) {
this.getList();
this.$refs.multipleTable.clearSelection();
}
},
},
created() {
getCreditPage({page:1,rows:999}).then(r => {
this.creditList = r.data.list
})
getCreditPage({ page: 1, rows: 999 }).then((r) => {
this.creditList = r.data.list;
});
this.getList();
listServiceUser().then(r=>{
listServiceUser().then((r) => {
this.customerServiceList = r.data;
})
getCountryListAll().then(r => {
this.countryList = r.data
})
});
getCountryListAll().then((r) => {
this.countryList = r.data;
});
//获取用户id信息 lanbm 2024-05-23 add
getUserProfile().then((res) => {
this.userId = res.data.id;
});
},
activated(){
activated() {
this.getList();
},
methods: {
recovery(row){
this.$confirm(this.$t('是否要回收当前{name}',row), '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
recycleUnconfirmedCustomer({customerId:row.id}).then(r =>{
this.$message.success(this.$t('回收成功。'))
this.getList()
recovery(row) {
this.$confirm(this.$t("是否要回收当前{name}", row), "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
recycleUnconfirmedCustomer({ customerId: row.id }).then((r) => {
this.$message.success(this.$t("回收成功。"));
this.getList();
});
})
}).catch(() => {
this.$message.info(this.$t('已取消'))
});
.catch(() => {
this.$message.info(this.$t("已取消"));
});
},
// 设置整柜
setFullContainerLoad(isFcl){
setFullContainerLoad(isFcl) {
setChangeCustomerFcl({
"customerIdList": this.selectCustomerList,
isFcl
}).then(r =>{
if(r.code === 0){
this.$message.success(isFcl ? '设置客户为海运整柜成功!' : '设置客户为非海运整柜成功!')
this.selectCustomerList = []
this.getList()
customerIdList: this.selectCustomerList,
isFcl,
}).then((r) => {
if (r.code === 0) {
this.$message.success(
isFcl ? "设置客户为海运整柜成功!" : "设置客户为非海运整柜成功!"
);
this.selectCustomerList = [];
this.getList();
}
})
});
},
// 设置空运客户
setChangeCustomerAir(isAir){
setChangeCustomerAir(isAir) {
changeCustomerAir({
customerIdList:this.selectCustomerList,
isAir
}).then(r =>{
console.log(r)
if(r.code === 0){
this.$message.success(isAir ? '设为空运客户成功!' : '设为非空运客户成功!')
this.selectCustomerList = []
this.getList()
customerIdList: this.selectCustomerList,
isAir,
}).then((r) => {
console.log(r);
if (r.code === 0) {
this.$message.success(
isAir ? "设为空运客户成功!" : "设为非空运客户成功!"
);
this.selectCustomerList = [];
this.getList();
}
})
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
complaint(row){
complaint(row) {
this.customerId = row.id;
this.$nextTick(()=>{
this.$refs.customerComplaints.handleAdd();
})
this.$nextTick(() => {
this.$refs.customerComplaints.handleAdd();
});
},
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return this.isChinese ? country?.nameZh : country?.nameEn
const country = this.countryList.find((e) => e.id === cellValue);
return this.isChinese ? country?.nameZh : country?.nameEn;
},
delay(row){
this.$router.push({path:'/customer/delay',query:{id:row.id}})
delay(row) {
this.$router.push({ path: "/customer/delay", query: { id: row.id } });
},
followUp(row){
followUp(row) {
this.customerId = row.id;
this.$nextTick(()=>{
this.$refs.CustomerFollowList.customerFollow.dialogVisible = true;
})
this.$nextTick(() => {
this.$refs.CustomerFollowList.customerFollow.dialogVisible = true;
});
},
//报价
quote(row){
//this.$router.push({path:'/offer/create',query:{id:row.id}})
this.$router.push({path:'/offer/create' , query:{customer:row,type:1}}).then({
//this.$refs.push({path:'/customer-contacts/select',query:{pageNo:1,pageSize:10,searchKey:row.defaultContactPhone}})
})
quote(row) {
//lanbm 2024-05-23 添加报价是判断客户所属客户经理,不是就不能报价
if (row.customerService != this.userId) {
this.$message.error(this.$t("此客户属于其他客户经理名下的客户。"));
return;
}
//this.$router.push({path:'/offer/create',query:{id:row.id}})
this.$router
.push({ path: "/offer/create", query: { customer: row, type: 1 } })
.then({
//this.$refs.push({path:'/customer-contacts/select',query:{pageNo:1,pageSize:10,searchKey:row.defaultContactPhone}})
});
},
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime', false);
let params = { ...this.queryParams };
this.addBeginAndEndTime(
params,
this.dateRangeCreateTime,
"createTime",
false
);
// 执行查询
switch (this.$route.path){
case '/customer/customer' :
switch (this.$route.path) {
case "/customer/customer":
getCustomerPage(params).then(this.setData);
break;
case '/customer/department-customers':
case "/customer/department-customers":
getCustomerDeptPage(params).then(this.setData);
break;
case '/customer/potential':
getPotential(params).then(this.setData)
case "/customer/potential":
getPotential(params).then(this.setData);
break;
}
},
/** 新增按钮操作 */
handleAdd() {
this.$router.push('/customer/add-edit/0')
this.$router.push("/customer/add-edit/0");
// this.reset();
// this.open = true;
// this.title = this.$t("添加客户");
},
// 新增潜在客户
handleAddPotential(){
this.$refs.potentialCustom.dialogTableVisible = true;
handleAddPotential() {
this.$refs.potentialCustom.dialogTableVisible = true;
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
const name = row.name;
const number = row.number;
this.$modal.confirm(this.$t('是否确认删除客户编号为"') + number + this.$t('"的数据项?')).then(function() {
this.$modal
.confirm(
this.$t('是否确认删除客户编号为"') + number + this.$t('"的数据项?')
)
.then(function () {
return deleteCustomer(id);
}).then(() => {
})
.then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('删除成功'));
}).catch(() => {});
this.$modal.msgSuccess(this.$t("删除成功"));
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
let func = null;
let title = ''
switch (this.$route.path){
case '/customer/customer' :
func = customerExportExcel
title = '是否确认导出所有客户数据项?'
let title = "";
switch (this.$route.path) {
case "/customer/customer":
func = customerExportExcel;
title = "是否确认导出所有客户数据项?";
break;
case '/customer/department-customers':
func = deptExportExcel
title = '是否确认导出部门客户数据项?'
case "/customer/department-customers":
func = deptExportExcel;
title = "是否确认导出部门客户数据项?";
break;
case '/customer/potential':
func = potentialExportExcel
title = '是否确认导出潜在客户数据项?'
case "/customer/potential":
func = potentialExportExcel;
title = "是否确认导出潜在客户数据项?";
break;
}
// // 执行导出
this.$modal.confirm(this.$t(title)).then(() => {
func().then(r =>{
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
this.$modal
.confirm(this.$t(title))
.then(() => {
func().then((r) => {
this.$message.success(
this.$t("已加入导出队列,请稍后在下载日志中下载")
);
});
})
}).catch(() => {});
.catch(() => {});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
handleSelectionChange(val){
this.selectCustomerList = val.map(i => i.id);
handleSelectionChange(val) {
this.selectCustomerList = val.map((i) => i.id);
},
/** 修改按钮操作 */
handleUpdate(row) {
console.log(row.id)
this.$router.push('/customer/add-edit/' + row.id)
console.log(row.id);
this.$router.push("/customer/add-edit/" + row.id);
// this.reset();
// const id = row.id;
// getCustomer(id).then(response => {
......@@ -889,7 +1395,7 @@ export default {
},
/** 查看按钮操作 */
handleView(row) {
this.$router.push('/customer/query/' + row.id)
this.$router.push("/customer/query/" + row.id);
},
/** 表单重置 */
reset() {
......@@ -946,66 +1452,72 @@ export default {
customerService: null,
status: null,
department: null,
creditLevel:null,
country:null,
}
creditLevel: null,
country: null,
};
this.handleQuery();
},
/** 调入公海池测试用 */
seasPond(row) {
testEnterToOpenSea(row.id).then(r => {
if(r.code === 0){
this.$t('调入公海池成功!')
this.getList();
}
})
testEnterToOpenSea(row.id).then((r) => {
if (r.code === 0) {
this.$t("调入公海池成功!");
this.getList();
}
});
},
setData(response){
console.log(response,'response')
setData(response) {
console.log(response, "response");
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (!valid) {
// return;
}
// 修改的提交
if (this.form.id != null) {
updateCustomer(this.form).then(response => {
this.$modal.msgSuccess(this.$t('修改成功'));
updateCustomer(this.form).then((response) => {
this.$modal.msgSuccess(this.$t("修改成功"));
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createCustomer(this.form).then(response => {
this.$modal.msgSuccess(this.$t('新增成功'));
createCustomer(this.form).then((response) => {
this.$modal.msgSuccess(this.$t("新增成功"));
this.open = false;
this.getList();
});
});
},
// 修改客户类型
modifyCustomer(){
this.$confirm(this.$t('修改业绩类型后,将会影响客户新订单业绩计算,请问确定吗?'), this.$t('提示'), {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
}).then(() => {
updatecustomerToOld({customerId:this.customData.id,isNew:this.currentisNew}).then((r) =>{
this.$message.success(this.$t('修改成功'));
this.dialogVisible = false
this.getList()
})
}).catch(() => {
// 修改客户类型
modifyCustomer() {
this.$confirm(
this.$t("修改业绩类型后,将会影响客户新订单业绩计算,请问确定吗?"),
this.$t("提示"),
{
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
type: "warning",
}
)
.then(() => {
updatecustomerToOld({
customerId: this.customData.id,
isNew: this.currentisNew,
}).then((r) => {
this.$message.success(this.$t("修改成功"));
this.dialogVisible = false;
this.getList();
});
}
}
})
.catch(() => {});
},
},
};
</script>
......@@ -90,7 +90,7 @@
v-model="queryParams.dateRangeCreateTime"
style="width: 300px"
value-format="yyyy-MM-dd"
type="datetimerange"
type="daterange"
range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
......@@ -366,13 +366,15 @@ export default {
page: 1,
rows: 20,
dateRangeCreateTime: undefined,
beginCreateTime: undefined,
endCreateTime: undefined,
},
allSupplier: [],
currencyList: [],
warehouseList: [],
//lanbm 2024-05-17 add
dateTypes: [
{ value: "0", label: this.$t("费用产生时间") },
{ value: "7", label: this.$t("费用产生时间") },
{ value: "1", label: this.$t("预装时间") },
{ value: "2", label: this.$t("装柜时间") },
{ value: "3", label: this.$t("起运时间") },
......@@ -426,6 +428,13 @@ export default {
let params = { ...this.queryParams };
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行查询
if (
params.dateRangeCreateTime != null &&
params.dateRangeCreateTime.length == 2
) {
params.beginCreateTime = params.dateRangeCreateTime[0];
params.endCreateTime = params.dateRangeCreateTime[1];
}
getPayableList(params).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
......
......@@ -77,6 +77,7 @@
<el-button type="primary" @click="handleQuery">{{
$t("查找")
}}</el-button>
<!--
<el-button type="primary" @click="handleQuery2">{{
$t("批量反审核")
}}</el-button>
......@@ -85,7 +86,8 @@
}}</el-button>
<el-button type="primary" @click="handleQuery3">{{
$t("批量核销")
}}</el-button>
}}</el-button>-->
</el-form-item>
</el-row>
</el-form>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -694,7 +694,8 @@ export default {
components: {
ImageDisplay,
OperateLogDetail,
PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail, WarehouseAreaSelect,DeclarationDocuments,
PrintWarehouseReceipt, PrintLadingBill,
WarehouseDetail, WarehouseAreaSelect,DeclarationDocuments,
FeeDetail,PackHistory,PackHistoryDetail
},
filters: {
......
......@@ -626,7 +626,7 @@
</div>
</el-dialog>
<choose-contact-dialog v-if="!!contactChooseType" @choose="onContactChoose" @close="contactChooseType=null" />
<choose-contact-dialog v-if="!!contactChooseType" :type="2" @choose="onContactChoose" @close="contactChooseType=null" />
<quick-create-customer v-if="quickCreateType" :type="quickCreateType" @success="onContactChoose" @close="quickCreateType=null" />
</div>
</template>
......
......@@ -4,83 +4,97 @@
<order-base-info :order="order"></order-base-info>
<div style="margin-top: 20px;display: none">
<span>{{$t('储位')}}{{ ($refs.area ? $refs.area.selected : []).join(',') }}</span>
<el-button type="primary" size="mini" @click="areaVisible = true" style="margin-left: 15px">{{$t('选择')}}</el-button>
<div style="margin-top: 20px; display: none">
<span
>{{ $t("储位") }}{{
($refs.area ? $refs.area.selected : []).join(",")
}}</span
>
<el-button
type="primary"
size="mini"
@click="areaVisible = true"
style="margin-left: 15px"
>{{ $t("选择") }}</el-button
>
</div>
<h2>{{$t('货物信息')}}</h2>
<h2>{{ $t("货物信息") }}</h2>
<el-table
v-if="order.orderItemVOList && order.orderItemVOList.length > 0 && orderItemList && orderItemList.length > 0"
v-if="
order.orderItemVOList &&
order.orderItemVOList.length > 0 &&
orderItemList &&
orderItemList.length > 0
"
:data="order.orderItemVOList || []"
style="width: 100%">
<el-table-column
type="index"
width="50"
:label="$t('序号')">
style="width: 100%"
>
<el-table-column type="index" width="50" :label="$t('序号')">
</el-table-column>
<el-table-column
prop="prodTitleZh"
:label="$t('品名')">
<template v-slot="{row}">
{{ row.prodTitleZh }}<br>
<el-table-column prop="prodTitleZh" :label="$t('品名')">
<template v-slot="{ row }">
{{ row.prodTitleZh }}<br />
{{ row.prodTitleEn }}
</template>
</el-table-column>
<el-table-column
:label="$t('填单货物属性')">
<template v-slot="{row}">
<span v-if="row.isWarehouseInAdd">{{$t('非填单货物信息')}}</span>
<el-table-column :label="$t('填单货物属性')">
<template v-slot="{ row }">
<span v-if="row.isWarehouseInAdd">{{ $t("非填单货物信息") }}</span>
<template v-else>
{{$t('品牌')}}{{ [$t('无牌'), $t('有牌'), $t('中性')][row.brandType] }}<br>
{{$t('箱数')}}{{ row.num }}<br>
{{$t('体积')}}{{ row.volume }}<br>
{{$t('重量')}}{{ row.weight }}Kg
{{ $t("品牌") }}{{
[$t("无牌"), $t("有牌"), $t("中性")][row.brandType]
}}<br />
{{ $t("箱数") }}{{ row.num }}<br />
{{ $t("体积") }}{{ row.volume }}<br />
{{ $t("重量") }}{{ row.weight }}Kg
</template>
</template>
</el-table-column>
<el-table-column
:label="$t('入库货物属性')">
<template v-slot="{row}">
<el-table-column :label="$t('入库货物属性')">
<template v-slot="{ row }">
<template v-if="row.warehouseInInfoVO">
{{$t('品牌')}}{{ row.brandName }}<br>
{{$t('箱数')}}{{ row.warehouseInInfoVO.cartonsNum }}<br>
{{$t('体积')}}{{ row.warehouseInInfoVO.volume }}<br>
{{$t('重量')}}{{ row.warehouseInInfoVO.weight }}Kg
{{ $t("品牌") }}{{ row.brandName }}<br />
{{ $t("箱数") }}{{ row.warehouseInInfoVO.cartonsNum }}<br />
{{ $t("体积") }}{{ row.warehouseInInfoVO.volume }}<br />
{{ $t("重量") }}{{ row.warehouseInInfoVO.weight }}Kg
</template>
<span v-else>{{$t('暂无入仓信息')}}</span>
<span v-else>{{ $t("暂无入仓信息") }}</span>
</template>
</el-table-column>
<el-table-column
prop="expressNo"
v-slot="{row}"
:label="$t('快递单号')">
{{ row.expressNo || (row.warehouseInInfoVO ? row.warehouseInInfoVO.expressNo : '') }}
v-slot="{ row }"
:label="$t('快递单号')"
>
{{
row.expressNo ||
(row.warehouseInInfoVO ? row.warehouseInInfoVO.expressNo : "")
}}
</el-table-column>
<el-table-column
prop="createTime"
:label="$t('最后操作时间')">
<template v-slot="{row}">
<el-table-column prop="createTime" :label="$t('最后操作时间')">
<template v-slot="{ row }">
{{ parseTime(row.updateTime) }}
</template>
</el-table-column>
<el-table-column
prop="diffType"
v-slot="{row}"
:label="$t('状态')">
<el-table-column prop="diffType" v-slot="{ row }" :label="$t('状态')">
<dict-tag
v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.diffType"
:type="DICT_TYPE.ORDER_WAREHOUSE_IN_STATUS"
:value="row.warehouseInInfoVO.diffType"
class="red"
:class="{green: row.warehouseInInfoVO.diffType === 4}"
:class="{ green: row.warehouseInInfoVO.diffType === 4 }"
/>
<span :class="{red: row.itemStatus === 3}" v-else>{{ row.itemStatus === 3 ? ($t('少了') + row.num + $t('箱')) : $t('待入仓') }}</span>
<span class="red" v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.cartonsNumDiff">{{ row.warehouseInInfoVO.cartonsNumDiff }}{{$t('箱')}}</span>
<span :class="{ red: row.itemStatus === 3 }" v-else>{{
row.itemStatus === 3 ? $t("少了") + row.num + $t("箱") : $t("待入仓")
}}</span>
<span
class="red"
v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.cartonsNumDiff"
>{{ row.warehouseInInfoVO.cartonsNumDiff }}{{ $t("箱") }}</span
>
</el-table-column>
<el-table-column
prop="address"
:label="$t('操作')">
<el-table-column prop="address" :label="$t('操作')">
<template v-slot="{ row, column, $index }">
<warehouse
v-if="isEdit"
......@@ -89,21 +103,32 @@
:order-item-b="orderItemList[$index]"
:title="$t('修改')"
:order="order"
@close="getList"></warehouse>
<template v-else-if="
wareItem(row.orderItemId)
&& wareItem(row.orderItemId).orderWarehouseInBackItemDoList
&& wareItem(row.orderItemId).orderWarehouseInBackItemDoList.length > 0">
<!-- <template v-if="!order.parentOrderId">-->
@close="getList"
></warehouse>
<template
v-else-if="
wareItem(row.orderItemId) &&
wareItem(row.orderItemId).orderWarehouseInBackItemDoList &&
wareItem(row.orderItemId).orderWarehouseInBackItemDoList.length >
0
"
>
<!-- <template v-if="!order.parentOrderId">-->
<warehouse
v-if="!isEdit"
:order-item-a="order.orderItemVOList[$index]"
:order-item-b="orderItemList[$index]"
:title="$t('追加')"
:order="order"
@close="getList"></warehouse>
<el-button size="mini" type="text" @click="handleWarehousingReturn(row)">{{$t('退仓')}}</el-button>
<!-- </template>-->
@close="getList"
></warehouse>
<el-button
size="mini"
type="text"
@click="handleWarehousingReturn(row)"
>{{ $t("退仓") }}</el-button
>
<!-- </template>-->
</template>
<warehouse
v-else
......@@ -111,88 +136,182 @@
:order-item-b="orderItemList[$index]"
:title="$t('入仓')"
:order="order"
@close="getList"></warehouse>
@close="getList"
></warehouse>
</template>
</el-table-column>
</el-table>
<el-card v-if="order.parentOrderId" style="margin-top: 20px">
<div slot="header" class="clearfix">
<span style="font-size: 18px">{{$t('标签箱号')}}</span>
<span style="font-size: 18px">{{ $t("标签箱号") }}</span>
</div>
<div v-for="(item, index) in label.orderLabelDtoList" :key="index" style="margin-bottom: 10px">
<el-input-number v-model="item.start" controls-position="right"></el-input-number> -
<el-input-number v-model="item.end" controls-position="right"></el-input-number>
<el-button icon="el-icon-minus" circle v-show="index !== 0" @click="label.orderLabelDtoList.splice(index, 1)" style="margin-left: 10px"></el-button>
<el-button icon="el-icon-plus" circle @click="handleLabelAdd(index)"></el-button>
<div
v-for="(item, index) in label.orderLabelDtoList"
:key="index"
style="margin-bottom: 10px"
>
<el-input-number
v-model="item.start"
controls-position="right"
></el-input-number>
-
<el-input-number
v-model="item.end"
controls-position="right"
></el-input-number>
<el-button
icon="el-icon-minus"
circle
v-show="index !== 0"
@click="label.orderLabelDtoList.splice(index, 1)"
style="margin-left: 10px"
></el-button>
<el-button
icon="el-icon-plus"
circle
@click="handleLabelAdd(index)"
></el-button>
</div>
<div style="text-align: center">
<el-button type="primary" @click="handleLabelSubmit">{{$t('修改箱号')}}</el-button>
<el-button type="primary" @click="handleLabelSubmit">{{
$t("修改箱号")
}}</el-button>
</div>
</el-card>
<h2 v-if="orderSpecialNeeds.length > 0">{{$t('特殊需求')}}</h2>
<h2 v-if="orderSpecialNeeds.length > 0">{{ $t("特殊需求") }}</h2>
<el-form ref="form" :model="form" label-width="200px">
<el-form-item :label="$i18n.locale === 'en_US' ? item.labelEn : item.label" v-for="(item, index) in orderSpecialNeeds" :key="item.value" style="width: 600px">
<el-input-number v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoney" type="number" :min="0" step-strictly :placeholder="$t('请输入') + ($i18n.locale === 'en_US' ? item.labelEn : item.label)"></el-input-number>
<el-select v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoneyCurrency" :placeholder="$t('请选择')" style="width: 100px">
<el-form-item
:label="$i18n.locale === 'en_US' ? item.labelEn : item.label"
v-for="(item, index) in orderSpecialNeeds"
:key="item.value"
style="width: 600px"
>
<el-input-number
v-model="
form.orderSpecialNeedReceivableReqVoList[index].receivableMoney
"
type="number"
:min="0"
step-strictly
:placeholder="
$t('请输入') +
($i18n.locale === 'en_US' ? item.labelEn : item.label)
"
></el-input-number>
<el-select
v-model="
form.orderSpecialNeedReceivableReqVoList[index]
.receivableMoneyCurrency
"
:placeholder="$t('请选择')"
style="width: 100px"
>
<el-option
v-for="item in currencyList"
:key="item.id"
:label="$i18n.locale === 'en_US' ? item.titleEn : item.titleZh"
:value="item.id">
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<h2>{{$t('订单数据')}}</h2>
<h2>{{ $t("订单数据") }}</h2>
<el-form-item :label="$t('总方数')" style="width: 380px">
<el-input v-model="form.sumVolume" :placeholder="$t('请输入总方数')" readonly>
<el-input
v-model="form.sumVolume"
:placeholder="$t('请输入总方数')"
readonly
>
<span slot="append"></span>
</el-input>
</el-form-item>
<el-form-item :label="$t('总重量')" style="width: 380px">
<el-input v-model="form.sumWeight" :placeholder="$t('请输入总重量')" readonly>
<el-input
v-model="form.sumWeight"
:placeholder="$t('请输入总重量')"
readonly
>
<span slot="append">kg</span>
</el-input>
</el-form-item>
<el-card style="margin-top: 15px;">
<el-card style="margin-top: 15px">
<div slot="header" class="clearfix">
<span style="font-size: 18px">{{$t('入仓影像')}}</span>
<span style="font-size: 18px">{{ $t("入仓影像") }}</span>
</div>
<div>
<image-and-video-upload readonly :fileSize="50" :isShowTip="true" :value="form.urls" ></image-and-video-upload>
<image-and-video-upload
readonly
:fileSize="50"
:isShowTip="true"
:value="form.urls"
></image-and-video-upload>
</div>
</el-card>
<div style="text-align: center;margin-top: 15px" v-if="!(order.status !== 3 && isEdit)">
<el-button @click="escapeBol = true;" type="primary">{{$t('转异')}}</el-button>
<el-button type="primary" @click="finishVisible = true">{{$t('完成入仓')}}</el-button>
<div
style="text-align: center; margin-top: 15px"
v-if="!(order.status !== 3 && isEdit)"
>
<el-button @click="escapeBol = true" type="primary">{{
$t("转异")
}}</el-button>
<el-button type="primary" @click="finishVisible = true">{{
$t("完成入仓")
}}</el-button>
</div>
</el-form>
<warehouse-area-dialog ref="area" :visible.sync="areaVisible" v-model="form.orderLocationCreateReqVOList"
:order-id="orderId" :warehouse-id="warehouseId" :is-editing="isEdit"></warehouse-area-dialog>
<warehouse-area-dialog
ref="area"
:visible.sync="areaVisible"
v-model="form.orderLocationCreateReqVOList"
:order-id="orderId"
:warehouse-id="warehouseId"
:is-editing="isEdit"
></warehouse-area-dialog>
<!-- 完成入仓 -->
<!-- 完成入仓 -->
<el-dialog
:title="$t('确认入仓')"
:visible.sync="finishVisible"
width="300px">
<div style="text-align: center">{{$t('在完成入仓前,您还可以')}}</div>
<div style="text-align: center;padding: 15px 0">
<!-- <el-button type="info" @click="areaVisible = true">{{$t('选择储位')}}</el-button>-->
<el-button type="info" @click="isShowPrintTag = true">{{$t('打印标签')}}</el-button>
width="300px"
>
<div style="text-align: center">{{ $t("在完成入仓前,您还可以") }}</div>
<div style="text-align: center; padding: 15px 0">
<!-- <el-button type="info" @click="areaVisible = true">{{$t('选择储位')}}</el-button>-->
<el-button type="info" @click="isShowPrintTag = true">{{
$t("打印标签")
}}</el-button>
</div>
<div style="text-align: center">
<el-button type="primary" @click="handleSubmit()">{{$t('确 定')}}</el-button>
<el-button type="primary" @click="handleSubmit()">{{
$t("确 定")
}}</el-button>
</div>
</el-dialog>
<el-dialog :title="order.orderNo + $t('订单转异')" center :visible.sync="escapeBol">
<el-form label-position="top" label-width="200" ref="exceptionForm" :model="form" :rules="exceptionRules">
<el-dialog
:title="order.orderNo + $t('订单转异')"
center
:visible.sync="escapeBol"
>
<el-form
label-position="top"
label-width="200"
ref="exceptionForm"
:model="form"
:rules="exceptionRules"
>
<el-form-item :label="$t('原因类型')" prop="manualExceptionType">
<dict-selector v-model="form.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector>
<dict-selector
v-model="form.manualExceptionType"
form-type="checkbox"
:type="DICT_TYPE.MANUAL_EXCEPTION_TYPE"
multiple
></dict-selector>
</el-form-item>
<el-form-item :label="$t('附件')">
<image-upload v-model="form.exceptionUrls"></image-upload>
......@@ -202,39 +321,51 @@
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleException">{{$t('确认并完成入仓')}}</el-button>
<el-button @click="escapeBol = false">{{$t('取消')}}</el-button>
<el-button type="primary" @click="handleException">{{
$t("确认并完成入仓")
}}</el-button>
<el-button @click="escapeBol = false">{{ $t("取消") }}</el-button>
</span>
</el-dialog>
<print-tag v-if="isShowPrintTag" :order-id="orderId" @close="isShowPrintTag = false"></print-tag>
<print-tag
v-if="isShowPrintTag"
:order-id="orderId"
@close="isShowPrintTag = false"
></print-tag>
<print-warehouse-receipt v-if="isShowPrint" :order-id="orderId" @close="isShowPrint = false" />
<print-warehouse-receipt
v-if="isShowPrint"
:order-id="orderId"
@close="isShowPrint = false"
/>
</div>
</template>
<script>
import {getCurrencyList} from "@/api/ecw/currency"
import { getCurrencyList } from "@/api/ecw/currency";
import {
getLabelByOrder, getLabelWaitInByOrder,
getLabelByOrder,
getLabelWaitInByOrder,
getOrder,
getOrderWarehouseIn,
getSpecialListByOrderId, listByOrderId,
orderWarehouseInFinish, orderWarehouseInUpdateLabel,
rollbackDelete, warehousePictureList
} from '@/api/ecw/order'
import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
import {DICT_TYPE} from "@/utils/dict"
import PrintTag from "@/views/ecw/order/components/PrintTag"
import PrintWarehouseReceipt from "@/views/ecw/order/components/PrintWarehouseReceipt"
getSpecialListByOrderId,
listByOrderId,
orderWarehouseInFinish,
orderWarehouseInUpdateLabel,
rollbackDelete,
warehousePictureList,
} from "@/api/ecw/order";
import orderBaseInfo from "@/components/OrderBaseInfo";
import WarehouseAreaDialog from "@/components/WarehouseAreaDialog";
import { DICT_TYPE } from "@/utils/dict";
import PrintTag from "@/views/ecw/order/components/PrintTag";
import PrintWarehouseReceipt from "@/views/ecw/order/components/PrintWarehouseReceipt";
import imageUpload from "@/components/ImageUpload";
import {parseTime} from "@/utils/ruoyi"
import ImageAndVideoUpload from '@/components/ImageAndVideoUpload'
import Warehouse from "@/views/ecw/order/warehousing/components/Warehouse"
import { parseTime } from "@/utils/ruoyi";
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload";
import Warehouse from "@/views/ecw/order/warehousing/components/Warehouse";
export default {
name: "Warehousing",
components: {
orderBaseInfo,
WarehouseAreaDialog,
......@@ -242,28 +373,30 @@ export default {
PrintWarehouseReceipt,
imageUpload,
ImageAndVideoUpload,
Warehouse
Warehouse,
},
mounted() {
if(this.$route.query.id){
this.orderId = parseInt(this.$route.query.id || undefined)
this.getOrderItemList()
getSpecialListByOrderId(this.orderId).then(r => this.specialList = r.data)
if (this.$route.query.id) {
this.orderId = parseInt(this.$route.query.id || undefined);
this.getOrderItemList();
getSpecialListByOrderId(this.orderId).then(
(r) => (this.specialList = r.data)
);
Promise.all([
this.getOrder(),
listByOrderId({ orderId: this.orderId }).then(r => {
this.form.orderLocationCreateReqVOList = r.data
})
listByOrderId({ orderId: this.orderId }).then((r) => {
this.form.orderLocationCreateReqVOList = r.data;
}),
]).then(() => {
// 等待仓库id和已选的储位后初始化储位信息
this.$nextTick(() => {
this.$refs.area.updateArea()
})
})
this.$refs.area.updateArea();
});
});
}
getCurrencyList().then(res => this.currencyList = res.data)
getCurrencyList().then((res) => (this.currencyList = res.data));
},
data() {
......@@ -276,14 +409,14 @@ export default {
form: {
orderSpecialNeedReceivableReqVoList: [],
orderLocationCreateReqVOList: [],
exceptionUrls:[],
descZh:'',
manualExceptionType:[],
exceptionUrls: [],
descZh: "",
manualExceptionType: [],
urls: [],
sumVolume: '',
sumWeight: '',
sumVolume: "",
sumWeight: "",
},
currencyList:[],
currencyList: [],
order: {},
orderId: undefined,
orderItemList: [],
......@@ -291,262 +424,287 @@ export default {
warehousing: undefined,
isShowPrintTag: false,
isShowPrint: false,
escapeBol:false,
escapeBol: false,
label: {
"orderId": 0,
"orderLabelDtoList": [
orderId: 0,
orderLabelDtoList: [
{
"end": 0,
"start": 0
}
]
end: 0,
start: 0,
},
],
},
exceptionRules: {
manualExceptionType: [
{ required: true, message: '请勾选原因类型', trigger: 'change' },
{ required: true, message: "请勾选原因类型", trigger: "change" },
{
validator: (rule, value, callback) => {
if (value.length <= 0) {
callback(new Error('请勾选原因类型'))
callback(new Error("请勾选原因类型"));
}
callback()
}, trigger: 'change'
}
]
}
}
callback();
},
trigger: "change",
},
],
},
};
},
methods: {
getOrderItemList(){
this.orderItemList = []
return getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
getOrderItemList() {
this.orderItemList = [];
return getOrderWarehouseIn(this.orderId).then(
(r) => (this.orderItemList = r.data)
);
},
getList(){
this.getOrder()
this.getOrderItemList()
getList() {
this.getOrder();
this.getOrderItemList();
},
getWarehousePictureList(){
getWarehousePictureList() {
return warehousePictureList({
bizId: this.order.orderId,
type: 1
}).then(r =>{
this.form.urls = r.data.map(i =>i.url)
})
type: 1,
}).then((r) => {
this.form.urls = r.data.map((i) => i.url);
});
},
include(){
include() {
return (state, arr) => {
return arr.indexOf(state) > -1
}
return arr.indexOf(state) > -1;
};
},
exclude(){
exclude() {
return (state, arr) => {
return arr.indexOf(state) == -1
}
return arr.indexOf(state) == -1;
};
},
handleLabelSubmit(){
handleLabelSubmit() {
orderWarehouseInUpdateLabel({
...this.label,
orderId: this.orderId
}).then(r => {
if (r.code === 0){
this.$message.success(r.msg || this.$t('修改标签箱号成功'))
orderId: this.orderId,
}).then((r) => {
if (r.code === 0) {
this.$message.success(r.msg || this.$t("修改标签箱号成功"));
}
})
});
},
// 箱号标签回显
getLabelByOrder(){
getLabelByOrder(this.orderId).then(r => {
if (r.code === 0 && !! r.data && r.data.length > 0) {
this.label.orderLabelDtoList = r.data
getLabelByOrder() {
getLabelByOrder(this.orderId).then((r) => {
if (r.code === 0 && !!r.data && r.data.length > 0) {
this.label.orderLabelDtoList = r.data;
} else {
// 没有历史数据,查默认值
getLabelWaitInByOrder(this.orderId).then(r => {
console.log(r)
if (r.code === 0 && !! r.data) {
this.label.orderLabelDtoList = [r.data]
getLabelWaitInByOrder(this.orderId).then((r) => {
console.log(r);
if (r.code === 0 && !!r.data) {
this.label.orderLabelDtoList = [r.data];
}
})
});
}
})
});
},
handleLabelAdd(index){
handleLabelAdd(index) {
this.label.orderLabelDtoList.splice(index + 1, 0, {
"end": '',
"start": ''
})
end: "",
start: "",
});
},
getTowSum(){
getTowSum() {
// let sumVolume = 0
// let sumWeight = 0
// this.order.orderItemVOList.forEach(e => {
// if (e?.warehouseInInfoVO?.volume) sumVolume += e.warehouseInInfoVO.volume
// if (e?.warehouseInInfoVO?.weight) sumWeight += e.warehouseInInfoVO.weight
// })
this.form.sumVolume = this.order.sumVolume// || sumVolume
this.form.sumWeight = this.order.sumWeight// || sumWeight
this.form.sumVolume = this.order.sumVolume; // || sumVolume
this.form.sumWeight = this.order.sumWeight; // || sumWeight
},
getOrder(){
return getOrder(this.orderId).then(r => {
this.order = r.data
this.getTowSum()
}).then(() => {
this.getLabelByOrder()
this.getWarehousePictureList()
})
getOrder() {
return getOrder(this.orderId)
.then((r) => {
this.order = r.data;
this.getTowSum();
})
.then(() => {
this.getLabelByOrder();
this.getWarehousePictureList();
});
},
specialHas0(){
let result = false
this.form.orderSpecialNeedReceivableReqVoList.forEach(e => {
if (e.receivableMoney === '0' || e.receivableMoney === ''){
result = true
specialHas0() {
let result = false;
this.form.orderSpecialNeedReceivableReqVoList.forEach((e) => {
if (e.receivableMoney === "0" || e.receivableMoney === "") {
result = true;
}
})
return result
});
return result;
},
handleException() {
this.$refs.exceptionForm.validate((valid) => {
if (valid) {
this.handleSubmit()
this.handleSubmit();
} else {
this.$message.warning('请勾选原因类型')
this.$message.warning("请勾选原因类型");
}
})
});
},
async handleSubmit() {
if (this.specialHas0()) {
const confirm = await this.$confirm(this.$t('有特需费用为0或未填写,请问是否继续?'), this.$t('注意'), {
confirmButtonText: this.$t('继续'),
cancelButtonText: this.$t('取消'),
type: 'warning'
})
if (confirm !== 'confirm'){
return
const confirm = await this.$confirm(
this.$t("有特需费用为0或未填写,请问是否继续?"),
this.$t("注意"),
{
confirmButtonText: this.$t("继续"),
cancelButtonText: this.$t("取消"),
type: "warning",
}
);
if (confirm !== "confirm") {
return;
}
}
let form = {
orderSpecialNeedReceivableReqVoList: this.form.orderSpecialNeedReceivableReqVoList,
"orderLocationCreateReqVOList": this.form.orderLocationCreateReqVOList,
"orderId": this.order.orderId,
orderSpecialNeedReceivableReqVoList:
this.form.orderSpecialNeedReceivableReqVoList,
orderLocationCreateReqVOList: this.form.orderLocationCreateReqVOList,
orderId: this.order.orderId,
// urls: this.form.urls,
sumVolume: this.form.sumVolume,
sumWeight: this.form.sumWeight,
isAppend: this.isAdd
}
isAppend: this.isAdd,
};
// 标签箱号
if (this.order.parentOrderId) {
form.labelList = this.label.orderLabelDtoList || []
form.labelList = this.label.orderLabelDtoList || [];
}
if (this.escapeBol) {
form.exceptionUrls = this.form.exceptionUrls.length !== 0 ? this.form.exceptionUrls?.split(',') : []
form.exceptionUrls =
this.form.exceptionUrls.length !== 0
? this.form.exceptionUrls?.split(",")
: [];
form.descZh = this.form.descZh;
form.manualExceptionType = this.form.manualExceptionType.join(',')
form.manualExceptionType = this.form.manualExceptionType.join(",");
}
orderWarehouseInFinish(form).then(r => {
orderWarehouseInFinish(form).then((r) => {
if (r.code === 0) {
this.escapeBol = false;
this.finishVisible = false
const message = !r.data ? this.$t('该订单已成功入仓,是否打印?') : `<h3>${this.$t('货物已入仓,存在异常')}</h3>${this.$t('该订单已成功入仓,是否打印?')}`
this.$confirm(
message,
this.$t('货物已入仓'),
{
confirmButtonText: this.$t(''),
cancelButtonText: this.$t(''),
dangerouslyUseHTMLString: true
}
).then(() => {
this.isShowPrint = true
}).catch(() => {
// this.$store.dispatch('tagsView/delVisitedView')
this.$message.success(this.$t('入仓成功'))
this.$tab.closePage()
this.finishVisible = false;
const message = !r.data
? this.$t("该订单已成功入仓,是否打印?")
: `<h3>${this.$t("货物已入仓,存在异常")}</h3>${this.$t(
"该订单已成功入仓,是否打印?"
)}`;
this.$confirm(message, this.$t("货物已入仓"), {
confirmButtonText: this.$t(""),
cancelButtonText: this.$t(""),
dangerouslyUseHTMLString: true,
})
.then(() => {
this.isShowPrint = true;
})
.catch(() => {
// this.$store.dispatch('tagsView/delVisitedView')
this.$message.success(this.$t("入仓成功"));
this.$tab.closePage();
});
}
})
});
},
handleWarehousingReturn(item){
this.$confirm(item.prodTitleZh + this.$t('退仓后不可恢复,是否确认退仓?'), this.$t('确定要退仓?'), {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
}).then(() => {
rollbackDelete({
"orderId": item.orderId,
"orderItemId": item.orderItemId
}).then(() => {
this.$message({
type: 'success',
message: this.$t('货物退仓成功!')
});
handleWarehousingReturn(item) {
this.$confirm(
item.prodTitleZh + this.$t("退仓后不可恢复,是否确认退仓?"),
this.$t("确定要退仓?"),
{
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
type: "warning",
}
)
.then(() => {
rollbackDelete({
orderId: item.orderId,
orderItemId: item.orderItemId,
}).then(() => {
this.$message({
type: "success",
message: this.$t("货物退仓成功!"),
});
this.getOrderItemList()
this.getOrder()
this.getOrderItemList();
this.getOrder();
});
})
}).catch(e => {
});
}
.catch((e) => {});
},
},
watch: {
orderSpecialNeeds(val){
val.forEach(e => {
orderSpecialNeeds(val) {
val.forEach((e) => {
this.form.orderSpecialNeedReceivableReqVoList.push({
"id": e.id,
"receivableMoney": e.transFee || '',
"receivableMoneyCurrency": e.transCurrency || 3
})
})
}
id: e.id,
receivableMoney: e.transFee || "",
receivableMoneyCurrency: e.transCurrency || 3,
});
});
},
},
computed: {
// 根据orderItemId获取入仓item
wareItem(){
return orderItemId => {
return this.orderItemList.find(item => item.orderItemId == orderItemId)
}
wareItem() {
return (orderItemId) => {
return this.orderItemList.find(
(item) => item.orderItemId == orderItemId
);
};
},
isAdd() {
return this.$route.path === "/order/warehousing-add"
return this.$route.path === "/order/warehousing-add";
},
isEdit() {
return this.$route.path === "/order/warehousing-update"
return this.$route.path === "/order/warehousing-update";
},
title() {
return this.$i18n.locale === 'en_US' ? this.$route.meta.titleEn : this.$route.name
return this.$i18n.locale === "en_US"
? this.$route.meta.titleEn
: this.$route.name;
},
orderSpecialNeedsDict() {
return this.$store.state.dict.dictDatas.order_special_needs
return this.$store.state.dict.dictDatas.order_special_needs;
},
orderSpecialNeeds(){
const result = []
this.specialList.forEach(e => {
const t = this.orderSpecialNeedsDict.find(f => f.value === e.advanceType)
if(t) {
result.push({...e, label: t.label, labelEn: t.labelEn})
orderSpecialNeeds() {
const result = [];
this.specialList.forEach((e) => {
const t = this.orderSpecialNeedsDict.find(
(f) => f.value === e.advanceType
);
if (t) {
result.push({ ...e, label: t.label, labelEn: t.labelEn });
}
})
return result
});
return result;
},
warehouseId(){
return this.order?.logisticsInfoDto?.startWarehouseId
}
}
}
warehouseId() {
return this.order?.logisticsInfoDto?.startWarehouseId;
},
},
};
</script>
<style scoped lang="scss">
@import "src/assets/styles/element-variables";
.red{
.red {
color: $--color-danger;
}
.green{
.green {
color: $--color-success;
}
</style>
<template>
<!-- 订单获取入仓记录 -->
<el-dialog
:title="title"
visible
:before-close="closeDialog"
:close-on-click-modal="false"
width="1000px"
>
<el-table :data="warehouseItem">
<el-table-column type="index" :label="$t('序号')" />
<el-table-column :label="$t('箱数')" prop="cartonsNum">
<template slot-scope="{ row }">
<template
v-if="
row.orderWarehouseInDetailsVOList &&
row.orderWarehouseInDetailsVOList.length
"
>
<WarehouseRecordDetail
v-model="row.orderWarehouseInDetailsVOList"
:num="row.cartonsNum"
text
readonly
/>
</template>
<template v-else>{{ row.cartonsNum }}</template>
</template>
</el-table-column>
<el-table-column :label="$t('入仓类型')" prop="cartonsNum">
<template slot-scope="{ row }">
<dict-tag
:type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
:value="row.specificationType"
/>
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" prop="unit">
<template slot-scope="{ row }">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="row.unit" />
</template>
</el-table-column>
<el-table-column :label="$t('长')" prop="boxGauge">
<template slot-scope="{ row }">
{{ row.boxGauge.split("*")[0] }}
</template>
</el-table-column>
<el-table-column :label="$t('宽')" prop="boxGauge">
<template slot-scope="{ row }">
{{ row.boxGauge.split("*")[1] }}
</template>
</el-table-column>
<el-table-column :label="$t('高')" prop="boxGauge">
<template slot-scope="{ row }">
{{ row.boxGauge.split("*")[2] }}
</template>
</el-table-column>
<el-table-column :label="$t('体积') + '(m³)'" prop="volume" />
<el-table-column :label="$t('重量') + '(kg)'" prop="weight" />
<el-table-column :label="$t('数量(个)')" prop="quantityAll" />
<el-table-column :label="$t('入仓快递单号')" prop="expressNo" />
<el-table-column :label="$t('首次入仓时间')" prop="inTime">
<template slot-scope="{ row }">{{ row.inTime | parseTime }}</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList">
<template slot-scope="{ row }">
{{ getLocationName(row.orderLocationBackVOList) }}
</template>
</el-table-column>
<el-table-column :label="$t('入仓影像')" prop="orderLocationBackVOList">
<template slot-scope="{ row }">
<image-display :pictureUrls="warehouseItem.pictureUrls" :type="5">
<el-button type="text"> 查看 </el-button>
</image-display>
</template>
</el-table-column>
<el-table-column :label="$t('备注')" prop="remark">
<template slot-scope="{ row }">
{{ row.remark }}
</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import { getOrderWarehouseIn } from "@/api/ecw/order";
import { parseTime } from "@/utils/ruoyi";
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect";
import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue";
import WarehouseRecordDetail from "@/views/ecw/order/warehousing/components/WarehouseRecordDetail.vue";
export default {
components: {
WarehouseRecordDetail,
ImageDisplay,
WarehouseAreaSelect,
},
filters: { parseTime },
props: {
order: Object, // order 和 orderId 二选一
orderId: Number,
orderItemId: Number,
type: Number,
},
data() {
return {
warehouseItem: [],
};
},
computed: {
title() {
return this.$l(this.order, "orderNo") + " - " + this.$t("入仓记录");
},
},
created() {
this.show = true;
getOrderWarehouseIn(this.order.orderId).then((res) => {
this.warehouseItem = [];
for (var i = 0; i < res.data.length; i++) {
for (
var j = 0;
j < res.data[i].orderWarehouseInBackItemDoList.length;
j++
) {
this.warehouseItem.push(
res.data[i].orderWarehouseInBackItemDoList[j]
);
}
}
});
},
methods: {
// 获取储位名称
getLocationName(locationArr) {
if (!locationArr || !locationArr.length) return "";
let arr = [];
locationArr.forEach((item) => {
arr.push(`${item.areaName}${item.locationName || ""}`);
});
return Array.from(new Set(arr)).join(",");
},
closeDialog() {
this.show = false;
this.$emit("close");
},
seePackLog() {
this.$emit("openPackHistory", this.orderItemId);
},
},
};
</script>
......@@ -318,13 +318,19 @@
<tr>
<td><div class="cell"></div></td>
<td>
<div class="cell">总箱数:{{ StatisticalSummary.sumBox }}</div>
<div class="cell">
总箱数:{{ StatisticalSummary.sumBox }}
</div>
</td>
<td>
<div class="cell">总方数:{{ StatisticalSummary.sumM3 }}</div>
<div class="cell">
总方数:{{ StatisticalSummary.sumM3 }}
</div>
</td>
<td>
<div class="cell">总重量:{{ StatisticalSummary.sumKG }}</div>
<div class="cell">
总重量:{{ StatisticalSummary.sumKG }}
</div>
</td>
<td>
<div class="cell">总V值:{{ StatisticalSummary.sumV }}</div>
......@@ -333,31 +339,47 @@
<tr>
<td><div class="cell">新客户</div></td>
<td>
<div class="cell">总箱数:{{ StatisticalSummary.sumBoxNew }}</div>
<div class="cell">
总箱数:{{ StatisticalSummary.sumBoxNew }}
</div>
</td>
<td>
<div class="cell">总方数:{{ StatisticalSummary.sumM3New }}</div>
<div class="cell">
总方数:{{ StatisticalSummary.sumM3New }}
</div>
</td>
<td>
<div class="cell">总重量:{{ StatisticalSummary.sumKGNew }}</div>
<div class="cell">
总重量:{{ StatisticalSummary.sumKGNew }}
</div>
</td>
<td>
<div class="cell">总V值:{{ StatisticalSummary.sumVNew }}</div>
<div class="cell">
总V值:{{ StatisticalSummary.sumVNew }}
</div>
</td>
</tr>
<tr>
<td><div class="cell">旧客户</div></td>
<td>
<div class="cell">总箱数:{{ StatisticalSummary.sumBoxOld }}</div>
<div class="cell">
总箱数:{{ StatisticalSummary.sumBoxOld }}
</div>
</td>
<td>
<div class="cell">总方数:{{ StatisticalSummary.sumM3Old }}</div>
<div class="cell">
总方数:{{ StatisticalSummary.sumM3Old }}
</div>
</td>
<td>
<div class="cell">总重量:{{ StatisticalSummary.sumKGOld }}</div>
<div class="cell">
总重量:{{ StatisticalSummary.sumKGOld }}
</div>
</td>
<td>
<div class="cell">总V值:{{ StatisticalSummary.sumVOld }}</div>
<div class="cell">
总V值:{{ StatisticalSummary.sumVOld }}
</div>
</td>
</tr>
</tbody>
......@@ -465,9 +487,15 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<WarehouseDetail-detail :order="order" :orderItemId="showWarehouseInItemId"
v-if="showWarehouseInItemId" @close="showWarehouseInItemId=null">
</WarehouseDetail-detail>
<warehouse-detail
:order="order"
:orderItemId="showWarehouseInItemId"
:type="type"
@openPackHistory="openPackHistory"
v-if="showWarehouseInItemId"
@close="showWarehouseInItemId = null"
/>
</div>
</template>
......@@ -477,13 +505,17 @@ import { getCountryListAll } from "@/api/ecw/country";
import Treeselect from "@riophae/vue-treeselect";
import "@/assets/styles/vue-treeselect.css";
import { getWarehouseList } from "@/api/ecw/warehouse";
import { getListPage, exportExcel,getStatisticalSummary } from "@/api/report/salesanalysis";
import {
getListPage,
exportExcel,
getStatisticalSummary,
} from "@/api/report/salesanalysis";
import { getCurUserPermission } from "@/api/report/EcwReportPermission";
import { getAllChannelList, getChannelList } from "@/api/ecw/channel";
import { listSimpleDepts } from "@/api/system/dept";
import {getOrder} from "@/api/ecw/order";
import { getOrder } from "@/api/ecw/order";
//入仓记录页面
import WarehouseDetail from "@/views/ecw/order/components/WarehouseDetail";
import WarehouseDetail from "@/views/report/WarehouseInDetail/index.vue";
//2024-05-01合并
export default {
......@@ -509,6 +541,7 @@ export default {
title: "",
// 是否显示弹出层
open: false,
showDetail: false,
deptOptions: undefined,
dateRangeCreateTime: [],
SearchType: [
......@@ -563,20 +596,20 @@ export default {
showWarehouseInItemId: undefined,
order: null,
type: 1,
StatisticalSummary:{
sumBox:0,
sumM3:0,
sumKG:0,
sumV:0,
sumBoxNew:0,
sumM3New:0,
sumKGNew:0,
sumVNew:0,
sumBoxOld:0,
sumM3Old:0,
sumKGOld:0,
sumVOld:0,
}
StatisticalSummary: {
sumBox: 0,
sumM3: 0,
sumKG: 0,
sumV: 0,
sumBoxNew: 0,
sumM3New: 0,
sumKGNew: 0,
sumVNew: 0,
sumBoxOld: 0,
sumM3Old: 0,
sumKGOld: 0,
sumVOld: 0,
},
};
},
created() {
......@@ -631,7 +664,6 @@ export default {
getStatisticalSummary(params).then((response) => {
this.StatisticalSummary = response.data;
});
},
/** 表单重置 */
......@@ -685,10 +717,15 @@ export default {
// 显示入仓记录
showWarehouseLogs(row, type) {
getOrder(row.orderId).then((response) => {
this.order = response.data;
this.showWarehouseInItemId = row.orderItemId;
this.order = response.data;//组件中只用到了此参数
this.type = 2;
this.showWarehouseInItemId = 1;
});
},
openPackHistory(id) {
//查询打包历史
//this.shopPackId = id
},
/** 查询部门下拉树结构 + 岗位下拉 */
getTreeselect() {
if (this.objEcwReportPermission.permissionFw == 3) {
......
......@@ -44,7 +44,7 @@
>
{{ $t("新增") }}</el-button
>
<el-button type="primary" @click="test" v-show="true">测试</el-button>
<el-button type="primary" @click="test" v-show="false">测试</el-button>
</el-col>
<el-col :span="1.5">
<el-button
......@@ -170,6 +170,7 @@ import "@/assets/styles/vue-treeselect.css";
import { MessageBox } from "element-ui";
//日期库函数
import dayjs from "dayjs";
import { getToken } from "@/utils/auth";
//2024-05-01合并
export default {
......@@ -356,10 +357,13 @@ export default {
},
test() {
//单元测试函数
/*
var p = 12;
test(p).then((response) => {
this.$modal.msgSuccess("测试成功");
});
});*/
var s = getToken();
alert(s);
},
TestFun() {
var bR = dayjs("2024-05-11").isBefore(dayjs("2024-05-12"));
......
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