Commit 3c3b2707 authored by Smile's avatar Smile

任务88:客户端改造,页面状态显示及首页查询框

parent a2818de3
......@@ -102,6 +102,7 @@ export const DICT_TYPE = {
ECW_PAY_ADVANCE: "pay_advance", // 是否预付
ECW_CUSTOM_DRAWEE: "custom_drawee", // 自定义付款人费用类型
ECW_BEGINTIME_TYPE_ENDTIME: "begintime_type_endtime", // 时间筛选字段(订单)
APP_ORDER_STATUS: "app_order_status", // 订单状态筛选字段(订单)
// --------ecw---------
CUSTOMER_STATUS: "customer_status",
CUSTOMER_SOURCE: "customer_source",
......
......@@ -119,9 +119,9 @@
align="center"
header-align="center"
>
<!-- <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />
</template> -->
<template slot-scope="scope">
{{ getStatusName(scope.row) }}
</template>
</el-table-column>
<el-table-column
prop="sumNum"
......@@ -265,6 +265,14 @@ export default {
this.getList()
},
methods: {
getStatusName: function (item) {
const orderStatus = this.getRealStatus(item);
const special = this.getDictDatas(this.DICT_TYPE.APP_ORDER_STATUS);
const statusMsg=special.filter(e => {
return e.value.split(',').map(Number).includes(orderStatus)
});
return this.isChinese ? statusMsg[0].label : statusMsg[0].labelEn;
},
getList() {
getControl(this.combinedQueryParams).then((r) => {
this.orderList = r.data.list
......@@ -294,6 +302,33 @@ export default {
handleReleaseSuccess() {
this.showReleaseOrderId = null
this.getList()
},
getRealStatus(item){
let status = 0;
if (item.status === 12 && item.shipmentState === 325){
status = 12325
}else if (item.status === 5 && item.airShipment === 1 && item.abnormalState === 0 && item.auditType=== 0 && item.transportId === 3){
status = 10501
}else if (item.status === 5 && (item.airShipment === 2 || item.airShipment === 3) && item.abnormalState === 0 && item.auditType=== 0 && item.transportId === 3){
status = 10502
}else if (item.status === 5 && item.airShipment === 4 && item.transportId === 3) {
status = 10503;
} else if (item.status === 5 && item.abnormalState === 0 && item.auditType === 0 &&
((item.transportId === 3 && (item.airShipment === 2 || item.airShipment === 3 || item.airShipment === 4)) ||
(item.transportId === 1 && (item.airShipment === 0 || item.airShipment === 2 || item.airShipment === 3 || item.airShipment === 4)))) {
status = 10504;
} else if (item.status === 32 && item.shipmentState === 411 && item.transportId === 3) {
status = 132411;
} else if (item.status === 32 && item.shipmentState === 412 && item.transportId === 3) {
status = 132412;
} else if (item.status === 32 && item.shipmentState === 409 && item.transportId === 3) {
status = 132409;
} else if (item.status === 32 && item.shipmentState === 428 && item.transportId === 3) {
status = 118428;
}else {
status = item.status;
}
return status
}
}
}
......
......@@ -14,6 +14,20 @@
<img :src="item.bannerUrlWeb" alt style="width: 1120px;height: 450px;margin-top: 24px;object-fit:fill" @click="banner(item.id)">
</el-carousel-item>
</el-carousel>
<!-- 搜索工作栏 -->
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" style="margin-top: 20px;">
<el-form-item :label="$t('controlorder.No')" prop="searchKey">
<el-input v-model="queryParams.searchKey" style="width: 230px;" :placeholder="$t('controlorder.NoRules')"
clearable/>
</el-form-item>
<el-form-item :label="$t('postorder.status')" prop="dynamicStatusList">
<dict-selector v-model="dynamicStatusList" :type="DICT_TYPE.APP_ORDER_STATUS" style="width: 150px; margin-right: 5px" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('common.search') }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('common.reload') }}</el-button>
</el-form-item>
</el-form>
<div v-if="sendOrderList.length>0">
<div style="display: flex;margin-top: 28px;">
<img src="@/assets/profile/order3.png" alt style="width: 28px;height: 28px;margin-left: 2px;">
......@@ -61,13 +75,12 @@
/>
<el-table-column
:label="$t('profile.status')"
prop="statusMsg"
align="center"
header-align="center"
>
<!-- <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />
</template> -->
<template slot-scope="scope">
{{ getStatusName(scope.row) }}
</template>
</el-table-column>
<el-table-column
prop="createTime"
......@@ -190,15 +203,25 @@ import { getDialog, setDialog } from '@/utils/auth'
import { mapGetters } from 'vuex'
import {DICT_TYPE} from "@/utils/dict";
import { parseTime } from '@/utils'
import DictSelector from "@/components/DictSelector/index.vue";
export default {
name: 'Profile',
components: {
JdButton,
JdDialog,
DictTag
DictTag,
DictSelector
},
data() {
return {
// 显示搜索条件
showSearch: true,
// 查询参数
queryParams: {
page: 1,
rows: 10
},
dynamicStatusList: '', // 状态筛选类别
bannerVisible: false,
noticeVisble: false,
levelVisble: false,
......@@ -243,9 +266,15 @@ export default {
this.$i18n.locale = val
this.$store.dispatch('app/setLanguage', val)
}
},
isChinese() {
return this.$i18n.locale === 'zh_CN'
}
},
watch: {
isChinese() {
this.getList()
},
language() {
this.apiLang = this.langData[this.language]
this.apiContentLang = this.langContentData[this.language]
......@@ -277,9 +306,7 @@ export default {
getNoticeList({ page: 1, rows: 100 }).then(r => {
this.noticeList = r.data.list
})
getIssued().then((r) => {
this.sendOrderList = r.data.list.slice(0, 3)
})
this.getList()
getReceived(this.condition).then((r) => {
this.receivedOrderList = r.data.list
})
......@@ -291,6 +318,36 @@ export default {
clearInterval(this.intervalId) // 清除定时器
},
methods: {
getStatusName: function (item) {
const orderStatus = this.getRealStatus(item);
const special = this.getDictDatas(this.DICT_TYPE.APP_ORDER_STATUS);
const statusMsg=special.filter(e => {
return e.value.split(',').map(Number).includes(orderStatus)
});
return this.isChinese ? statusMsg[0].label : statusMsg[0].labelEn;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.dynamicStatusList = ''
this.queryParams = {
page: 1,
rows: 10
}
this.handleQuery()
},
getList() {
if (this.dynamicStatusList){
this.queryParams.dynamicStatusList=this.dynamicStatusList
}
getIssued(this.queryParams).then((r) => {
this.sendOrderList = r.data.list.slice(0, 3)
})
},
getUpdateOpenAd: function (data) {
//获取存储的会员等级信息
// const levelRule = this.levelRule;
......@@ -366,6 +423,33 @@ export default {
showDialog() {
this.bannerVisible = false
setDialog()
},
getRealStatus(item){
let status = 0;
if (item.status === 12 && item.shipmentState === 325){
status = 12325
}else if (item.status === 5 && item.airShipment === 1 && item.abnormalState === 0 && item.auditType=== 0 && item.transportId === 3){
status = 10501
}else if (item.status === 5 && (item.airShipment === 2 || item.airShipment === 3) && item.abnormalState === 0 && item.auditType=== 0 && item.transportId === 3){
status = 10502
}else if (item.status === 5 && item.airShipment === 4 && item.transportId === 3) {
status = 10503;
} else if (item.status === 5 && item.abnormalState === 0 && item.auditType === 0 &&
((item.transportId === 3 && (item.airShipment === 2 || item.airShipment === 3 || item.airShipment === 4)) ||
(item.transportId === 1 && (item.airShipment === 0 || item.airShipment === 2 || item.airShipment === 3 || item.airShipment === 4)))) {
status = 10504;
} else if (item.status === 32 && item.shipmentState === 411 && item.transportId === 3) {
status = 132411;
} else if (item.status === 32 && item.shipmentState === 412 && item.transportId === 3) {
status = 132412;
} else if (item.status === 32 && item.shipmentState === 409 && item.transportId === 3) {
status = 132409;
} else if (item.status === 32 && item.shipmentState === 428 && item.transportId === 3) {
status = 118428;
}else {
status = item.status;
}
return status
}
}
}
......
......@@ -50,6 +50,9 @@
<dict-selector v-model="dateFilterType" :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" style="width: 150px; margin-right: 5px" />
<el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-" :start-placeholder="$t('postorder.start')" :end-placeholder="$t('postorder.end')" value-format="yyyy-MM-dd HH:mm:ss" />
</el-form-item>
<el-form-item :label="$t('postorder.status')" prop="dynamicStatusList">
<dict-selector v-model="dynamicStatusList" :type="DICT_TYPE.APP_ORDER_STATUS" style="width: 150px; margin-right: 5px" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('common.search') }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('common.reload') }}</el-button>
......@@ -111,13 +114,12 @@
/>
<el-table-column
:label="$t('postorder.status')"
prop="statusMsg"
align="center"
header-align="center"
>
<!-- <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />
</template> -->
<template slot-scope="scope">
{{ getStatusName(scope.row) }}
</template>
</el-table-column>
<el-table-column
prop="createTime"
......@@ -233,6 +235,7 @@ export default {
// 显示搜索条件
showSearch: true,
dateFilterType: '', // 日期筛选类别
dynamicStatusList: '', // 状态筛选类别
dateFilter: [], // 筛选日期
printTagOrderId: null, // 显示打印标签的订单ID
// 总条数
......@@ -264,6 +267,9 @@ export default {
timeParams['begin' + this.dateFilterType] = this.dateFilter[0]
timeParams['end' + this.dateFilterType] = this.dateFilter[1]
}
if (this.dynamicStatusList){
this.queryParams.dynamicStatusList=this.dynamicStatusList
}
return Object.assign({}, this.queryParams, timeParams)
},
exclude() {
......@@ -284,6 +290,14 @@ export default {
this.getList()
},
methods: {
getStatusName: function (item) {
const orderStatus = this.getRealStatus(item);
const special = this.getDictDatas(this.DICT_TYPE.APP_ORDER_STATUS);
const statusMsg=special.filter(e => {
return e.value.split(',').map(Number).includes(orderStatus)
});
return this.isChinese ? statusMsg[0].label : statusMsg[0].labelEn;
},
getList() {
getIssued(this.combinedQueryParams).then((r) => {
this.orderList = r.data.list
......@@ -297,6 +311,7 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dynamicStatusList = ''
this.queryParams = {
page: 1,
rows: 10
......@@ -397,6 +412,33 @@ export default {
var uuid = s.join('')
return uuid
},
getRealStatus(item){
let status = 0;
if (item.status === 12 && item.shipmentState === 325){
status = 12325
}else if (item.status === 5 && item.airShipment === 1 && item.abnormalState === 0 && item.auditType=== 0 && item.transportId === 3){
status = 10501
}else if (item.status === 5 && (item.airShipment === 2 || item.airShipment === 3) && item.abnormalState === 0 && item.auditType=== 0 && item.transportId === 3){
status = 10502
}else if (item.status === 5 && item.airShipment === 4 && item.transportId === 3) {
status = 10503;
} else if (item.status === 5 && item.abnormalState === 0 && item.auditType === 0 &&
((item.transportId === 3 && (item.airShipment === 2 || item.airShipment === 3 || item.airShipment === 4)) ||
(item.transportId === 1 && (item.airShipment === 0 || item.airShipment === 2 || item.airShipment === 3 || item.airShipment === 4)))) {
status = 10504;
} else if (item.status === 32 && item.shipmentState === 411 && item.transportId === 3) {
status = 132411;
} else if (item.status === 32 && item.shipmentState === 412 && item.transportId === 3) {
status = 132412;
} else if (item.status === 32 && item.shipmentState === 409 && item.transportId === 3) {
status = 132409;
} else if (item.status === 32 && item.shipmentState === 428 && item.transportId === 3) {
status = 118428;
}else {
status = item.status;
}
return status
}
}
}
......
......@@ -50,6 +50,9 @@
<dict-selector v-model="dateFilterType" :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" style="width: 150px; margin-right: 5px" />
<el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-" :start-placeholder="$t('receiveorder.start')" :end-placeholder="$t('receiveorder.end')" value-format="yyyy-MM-dd HH:mm:ss" />
</el-form-item>
<el-form-item :label="$t('receiveorder.status')" prop="dynamicStatusList">
<dict-selector v-model="dynamicStatusList" :type="DICT_TYPE.APP_ORDER_STATUS" style="width: 150px; margin-right: 5px" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('common.search') }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('common.reload') }}</el-button>
......@@ -111,10 +114,12 @@
/>
<el-table-column
:label="$t('receiveorder.status')"
prop="statusMsg"
align="center"
header-align="center"
>
<template slot-scope="scope">
{{ getStatusName(scope.row) }}
</template>
<!-- <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />
</template> -->
......@@ -157,6 +162,7 @@ export default {
showSearch: true,
dateFilterType: '', // 日期筛选类别
dateFilter: [], // 筛选日期
dynamicStatusList: '', // 状态筛选类别
// 总条数
total: 0,
// 查询参数
......@@ -179,6 +185,9 @@ export default {
timeParams['begin' + this.dateFilterType] = this.dateFilter[0]
timeParams['end' + this.dateFilterType] = this.dateFilter[1]
}
if (this.dynamicStatusList){
this.queryParams.dynamicStatusList=this.dynamicStatusList
}
return Object.assign({}, this.queryParams, timeParams)
},
isChinese() {
......@@ -194,6 +203,14 @@ export default {
this.getList()
},
methods: {
getStatusName: function (item) {
const orderStatus = this.getRealStatus(item);
const special = this.getDictDatas(this.DICT_TYPE.APP_ORDER_STATUS);
const statusMsg=special.filter(e => {
return e.value.split(',').map(Number).includes(orderStatus)
});
return this.isChinese ? statusMsg[0].label : statusMsg[0].labelEn;
},
getList() {
getReceived(this.combinedQueryParams).then((r) => {
this.orderList = r.data.list
......@@ -207,11 +224,39 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dynamicStatusList = ''
this.queryParams = {
page: 1,
rows: 10
}
this.handleQuery()
},
getRealStatus(item){
let status = 0;
if (item.status === 12 && item.shipmentState === 325){
status = 12325
}else if (item.status === 5 && item.airShipment === 1 && item.abnormalState === 0 && item.auditType=== 0 && item.transportId === 3){
status = 10501
}else if (item.status === 5 && (item.airShipment === 2 || item.airShipment === 3) && item.abnormalState === 0 && item.auditType=== 0 && item.transportId === 3){
status = 10502
}else if (item.status === 5 && item.airShipment === 4 && item.transportId === 3) {
status = 10503;
} else if (item.status === 5 && item.abnormalState === 0 && item.auditType === 0 &&
((item.transportId === 3 && (item.airShipment === 2 || item.airShipment === 3 || item.airShipment === 4)) ||
(item.transportId === 1 && (item.airShipment === 0 || item.airShipment === 2 || item.airShipment === 3 || item.airShipment === 4)))) {
status = 10504;
} else if (item.status === 32 && item.shipmentState === 411 && item.transportId === 3) {
status = 132411;
} else if (item.status === 32 && item.shipmentState === 412 && item.transportId === 3) {
status = 132412;
} else if (item.status === 32 && item.shipmentState === 409 && item.transportId === 3) {
status = 132409;
} else if (item.status === 32 && item.shipmentState === 428 && item.transportId === 3) {
status = 118428;
}else {
status = item.status;
}
return status
}
}
}
......
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