Commit 8904cd8a authored by 我在何方's avatar 我在何方

添加订单异常UI

parent c0604e3b
import request from '@/utils/request'
// 创建订单异常
export function createOrderException(data) {
return request({
url: '/ecw/order-exception/create',
method: 'post',
data: data
})
}
// 更新订单异常
export function updateOrderException(data) {
return request({
url: '/ecw/order-exception/update',
method: 'put',
data: data
})
}
// 删除订单异常
export function deleteOrderException(id) {
return request({
url: '/ecw/order-exception/delete?id=' + id,
method: 'delete'
})
}
// 获得订单异常
export function getOrderException(id) {
return request({
url: '/ecw/order-exception/get?id=' + id,
method: 'get'
})
}
// 获得订单异常分页
export function getOrderExceptionPage(query) {
return request({
url: '/ecw/order-exception/page',
method: 'get',
params: query
})
}
// 导出订单异常 Excel
export function exportOrderExceptionExcel(query) {
return request({
url: '/ecw/order-exception/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
......@@ -138,6 +138,8 @@ export const DICT_TYPE = {
DRAWEE: 'drawee', // 付款人
ORDER_STATUS:'order_status',//订单状态
BEGINTIME_TYPE_ENDTIME:'begintime_type_endtime',//订单日期筛选类别
ORDER_ERROR_TYPE:'order_error_type',//订单异常类型
ORDER_EXCEPTION_STATUS:'order_exception_status',//异常订单状态
}
/**
......
......@@ -57,7 +57,7 @@
<el-table-column label="箱数" align="center" prop="sumNum" />
<el-table-column label="体积/重量" align="center" prop="sumVolume">
<template slot-scope="scope">
{{scope.row.sumVolume/scope.row.sumWeight}}
{{scope.row.sumVolume+'/'+scope.row.sumWeight}}
</template>
</el-table-column>
......@@ -212,9 +212,9 @@
import {getTradeCityList} from '@/api/ecw/region'
export default {
name: "CreatCollection",
components: {
components: {
CustomerSelector
},
},
data() {
return {
loadings: false,
......
......@@ -10,14 +10,14 @@
<!-- 搜索工作栏 -->
<el-card v-show="showSearch">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="80px" class="card">
<el-row :column="4" >
<el-row>
<el-form-item label="始发城市:">
<el-select v-model="queryParams.departureId" placeholder="请选择始发">
<el-select v-model="queryParams.departureId" placeholder="请选择始发城市">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的城市:">
<el-select v-model="queryParams.objectiveId" placeholder="请选择始发地">
<el-select v-model="queryParams.objectiveId" placeholder="请选择目的城市">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
......@@ -28,7 +28,7 @@
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" v-model="queryParams.control" />
</el-form-item>
</el-row>
<el-row :column="4" >
<el-row>
<el-form-item label="订单状态:">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.control" />
</el-form-item>
......@@ -42,7 +42,7 @@
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入品名" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
</el-row>
<el-row :column="4" >
<el-row>
<el-form-item label="提单号:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入提单号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
......@@ -52,11 +52,14 @@
<el-form-item label="费用类型:" >
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.feeType"></dict-selector>
</el-form-item>
<el-form-item label="发货人:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入发货人" clearable @keyup.enter.native="handleQuery"/>
<el-form-item label="发货人:" prop="consignorId">
<customer-selector v-model="queryParams.consignorId" @change="consignor = $event" />
</el-form-item>
</el-row>
<el-row :column="4" >
<!-- <el-form-item label="发货人:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入发货人" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
</el-row>
<el-row>
<el-form-item label="收货人:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入收货人" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
......@@ -121,11 +124,12 @@
</template>
<script>
import { userList } from "@/api/system/user"
import {DICT_TYPE} from '@/utils/dict'
import CustomerSelector from '@/components/CustomerSelector'
import {getTradeCityList} from '@/api/ecw/region'
export default {
import { userList } from "@/api/system/user"
import {DICT_TYPE} from '@/utils/dict'
import CustomerSelector from '@/components/CustomerSelector'
import {getTradeCityList} from '@/api/ecw/region'
export default {
name: "Receivable",
components: {
CustomerSelector
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-row>
<el-form-item >
<el-select v-model="queryParams.beginCreateTime" style="width: 172px;">
<el-option label="入仓时间" value="0"/>
<el-option label="处理时间" value="1"/>
</el-select>
<el-date-picker
v-model="queryParams.date"
type="datetimerange"
style="margin-left: 10px;"
range-separator="到"
start-placeholder="请选择日期"
end-placeholder="请选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="始发地:">
<el-select v-model="queryParams.startWarehouseId" placeholder="请选择始发地">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的地:" >
<el-select v-model="queryParams.destWarehouseId" placeholder="请选择目的地">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id" ></el-option>
</el-select>
</el-form-item>
<el-form-item label="运输方式:" >
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number"/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="控货:">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" v-model="queryParams.control" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="异常状态:">
<dict-selector :type="DICT_TYPE.ORDER_EXCEPTION_STATUS" v-model="queryParams.orderExceptionStatus" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="异常类型" prop="orderExceptionType">
<dict-selector :type="DICT_TYPE.ORDER_ERROR_TYPE" v-model="queryParams.orderExceptionType" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="订单号" prop="orderNumber">
<el-input v-model="queryParams.orderNumber" placeholder="请输入订单号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="发货人:" prop="consignorId">
<customer-selector v-model="queryParams.consignorId" @change="consignor = $event" />
</el-form-item>
<el-form-item label="唛头:" prop="marks">
<el-input v-model="queryParams.marks" placeholder="请输入唛头" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="品名:" prop="orderExceptionAmount">
<el-input v-model="queryParams.orderExceptionAmount" placeholder="请输入品名" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="备案:">
<dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" v-model="queryParams.productRecord" @keyup.enter.native="handleQuery"/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="跟进业务">
<el-select v-model="queryParams.followUpSalesmanId" placeholder="请选择跟进业务">
<el-option v-for="item in creatorData" :key="item.id" :label="item.nickname" :value="item.id"/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
</el-form-item>
</el-row>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" border :data="list">
<el-table-column label="序号" align="center" prop="id" type="index">
<template slot-scope="scope">
<span>{{scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="订单号" align="center" prop="orderNumber" />
<el-table-column label="唛头" align="center" prop="marks" />
<el-table-column label="总箱数/入仓箱数" align="center" >
<template slot-scope="scope">
<span>{{scope.row.sumNum+'/'+scope.row.sumNum}}</span>
</template>
</el-table-column>
<el-table-column label="体积/重量" align="center">
<template slot-scope="scope">
<span>{{scope.row.sumVolume+"/"+scope.row.sumWeight}}</span>
</template>
</el-table-column>
<el-table-column label="运输方式/目的地" align="center">
<template slot-scope="scope">
<span><dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId"></dict-tag>
{{'/'+importCityName(scope.row.logisticsInfoDto.destWarehouseId)}}</span>
</template>
</el-table-column>
<el-table-column label="控货" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.control" />
</template>
</el-table-column>
<el-table-column label="订单状态" align="center" prop="orderExceptionAmount" >
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="异常状态" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_EXCEPTION_STATUS" :value="scope.row.orderExceptionStatus" />
</template>
</el-table-column>
<el-table-column label="异常类型" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_EXCEPTION_STATUS" :value="scope.row.orderExceptionType" />
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" >处理</el-button>
<el-button size="mini" type="text" icon="el-icon-share">查看</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"/>
</div>
</template>
<script>
import {getOrderExceptionPage} from "@/api/ecw/orderException"
import {getTradeCityList} from '@/api/ecw/region'
import {DICT_TYPE} from '@/utils/dict'
import { userList } from "@/api/system/user"
import CustomerSelector from '@/components/CustomerSelector'
export default {
name: "Exception",
components: {
CustomerSelector
},
data() {
return {
// 遮罩层
loading: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 订单异常列表
list: [],
dateRangeCreateTime: [],
creatorData:[],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
orderId: null,
orderNumber: null,
orderExceptionType: null,
orderExceptionRemark: null,
orderExceptionAmount: null,
orderExceptionAttr: null,
orderExceptionStatus: null,
},
tradeCityList:[],
};
},
created() {
this.getList();
getTradeCityList().then(res => this.tradeCityList = res.data)
userList('salesman').then(res =>this.creatorData = res.data)
},
computed:{
expoerCityList(){
return this.tradeCityList.filter(item => item.type == 2)
},
importCityList(){
return this.tradeCityList.filter(item => item.type == 1)
}
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams}
// 执行查询
getOrderExceptionPage(params).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
importCityName(id){
return this.tradeCityList.filter(item => item.id == id)
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.handleQuery();
},
}
}
</script>
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-card>
<div slot="header" class="card-title">报价单详情</div>
<el-descriptions :column="4">
<el-descriptions-item label="唛头">
{{orderData.marks?orderData.marks:''}}
</el-descriptions-item>
<el-descriptions-item label="已到箱数/总箱数">
{{orderData.sumNum?orderData.sumNum:0+'/'+orderData.sumNum?orderData.sumNum:0}}
</el-descriptions-item>
<el-descriptions-item label="订单状态">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="orderData.status" />
</el-descriptions-item>
<el-descriptions-item label="送货日期">
{{orderData.date?orderData.date:''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="3">
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
</el-descriptions-item>
<el-descriptions-item label="始发地">
{{importCityName(orderData.startWarehouseId)}}
</el-descriptions-item>
<el-descriptions-item label="目的地">
{{importCityName(orderData.startWarehouseId)}}
</el-descriptions-item>
<el-descriptions-item label="发货人">
{{orderData.consignorVO?orderData.consignorVO.name||'':''}}
</el-descriptions-item>
<el-descriptions-item label="发货公司">
{{orderData.consignorVO?orderData.consignorVO.company||'':''}}
</el-descriptions-item>
<el-descriptions-item label="发货电话">
{{orderData.consignorVO?orderData.consignorVO.phone||'':''}}
</el-descriptions-item>
<el-descriptions-item label="收货人">
{{orderData.consigneeVO?orderData.consigneeVO.name||'':''}}
</el-descriptions-item>
<el-descriptions-item label="收货公司">
{{orderData.consigneeVO?orderData.consigneeVO.company||'':''}}
</el-descriptions-item>
<el-descriptions-item label="收货电话">
{{orderData.consigneeVO?orderData.consigneeVO.phone||'':''}}
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="card">
<!-- 列表 -->
<div slot="header" class="card-title">问题详情</div>
<el-table v-loading="loading" border :data="list">
<el-table-column label="序号" align="center" prop="id" type="index">
<template slot-scope="scope">
<span>{{scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="异常类型" align="center" >
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_EXCEPTION_STATUS" :value="scope.row.orderExceptionType" />
</template>
</el-table-column>
<el-table-column label="异常描述" align="center">
<template slot-scope="scope">
<span>{{scope.row.orderExceptionRemark}}</span>
</template>
</el-table-column>
<el-table-column label="金额" align="center" scope="orderExceptionAmount" />
<el-table-column label="异常状态" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_EXCEPTION_STATUS" :value="scope.row.orderExceptionStatus" />
</template>
</el-table-column>
<el-table-column label="附件" align="center">
<template slot-scope="scope">
<span>{{scope.row.orderExceptionRemark}}</span>
</template>
</el-table-column>
<el-table-column label="处理人" align="center" prop="orderExceptionAmount" />
<el-table-column label="处理时间" align="center" prop='orderExceptionTime' />
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" >处理</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
</el-card>
</div>
</template>
<script>
import {getOrderExceptionPage} from "@/api/ecw/orderException"
import {getTradeCityList} from '@/api/ecw/region'
import {DICT_TYPE} from '@/utils/dict'
export default {
name: "Pending",
components: {
},
data() {
return {
// 遮罩层
loading: false,
// 总条数
total: 0,
// 显示搜索条件
showSearch: true,
orderData:{},
// 订单异常列表
list: [],
tradeCityList:[],
queryParams: {
page: 1,
rows: 10,
orderExceptionStatus: 0,
},
};
},
created() {
this.getList();
getTradeCityList().then(res => this.tradeCityList = res.data)
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 执行查询
getOrderExceptionPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.orderData = response.data
this.loading = false;
});
},
importCityName(id){
var arr = this.tradeCityList.filter(item => item.id == id)
return arr.length>0?arr[0].titleZh:''
},
}
}
</script>
<style>
.card-title{
font-size: 18px;
font-weight: bold;
margin-top: 10px;
}
.card{
margin-top: 20px;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment