|
|
|
@ -1,7 +1,13 @@ |
|
|
|
|
<template> |
|
|
|
|
<div class="order"> |
|
|
|
|
<div class="frame"> |
|
|
|
|
<el-select style="margin-right: 20px;" v-model="parameter.params.id" placeholder="用户名称" clearable> |
|
|
|
|
<!-- 公司名称 --> |
|
|
|
|
<autocomplete |
|
|
|
|
class="mr20" |
|
|
|
|
:params="parameter.params" |
|
|
|
|
:config="configAutocomplete" |
|
|
|
|
/> |
|
|
|
|
<!-- <el-select style="margin-right: 20px;" v-model="parameter.params.id" placeholder="用户名称" clearable> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in refineryList" |
|
|
|
|
:key="item.id" |
|
|
|
@ -9,16 +15,13 @@ |
|
|
|
|
:value="item.id" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select v-model="parameter.params.id" placeholder="炼厂名称" clearable> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in refineryList" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.refineryName" |
|
|
|
|
:value="item.id" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-select> --> |
|
|
|
|
<!-- 炼厂名称 --> |
|
|
|
|
<autocomplete |
|
|
|
|
class="mr20" |
|
|
|
|
:params="parameter.params" |
|
|
|
|
:config="configAutocompleteLc" |
|
|
|
|
/> |
|
|
|
|
<el-select v-model="parameter.params.id" placeholder="产品名称" clearable> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in refineryList" |
|
|
|
@ -124,16 +127,25 @@ |
|
|
|
|
<el-link type="primary" :underline="false" @click="detail(row)" |
|
|
|
|
>详情</el-link |
|
|
|
|
> |
|
|
|
|
<el-link type="primary" :underline="false" @click="billOfLading(row)" |
|
|
|
|
<el-link v-show="row.orderStatus!=='SUBMITED'&&row.orderStatus!=='ORDER_LOCKED'" type="primary" :underline="false" @click="billOfLading(row)" |
|
|
|
|
>提货单</el-link |
|
|
|
|
> |
|
|
|
|
<el-popconfirm |
|
|
|
|
title="是否确认订单?" |
|
|
|
|
:title="row.orderStatus=='SUBMITED'?'是否确认订单锁定?':'是否确认下单?'" |
|
|
|
|
icon-color="red" |
|
|
|
|
@confirm="deleteRow(row)" |
|
|
|
|
@confirm="Locked(row)" |
|
|
|
|
> |
|
|
|
|
<el-link slot="reference" type="primary" :underline="false" |
|
|
|
|
>订单确认</el-link |
|
|
|
|
<el-link v-show="row.orderStatus=='SUBMITED'||row.orderStatus=='ORDER_LOCKED'" slot="reference" type="primary" :underline="false" |
|
|
|
|
>{{row.orderStatus=='SUBMITED'?'订单锁定':'下单确认'}}</el-link |
|
|
|
|
> |
|
|
|
|
</el-popconfirm> |
|
|
|
|
<el-popconfirm |
|
|
|
|
:title="row.orderStatus=='SUBMITED'||row.orderStatus=='ORDER_LOCKED'?'是否确认取消订单?':'是否确认退款?'" |
|
|
|
|
icon-color="red" |
|
|
|
|
@confirm="orderCencle(row)" |
|
|
|
|
> |
|
|
|
|
<el-link v-show="row.orderStatus!=='CANCELED'" slot="reference" type="primary" :underline="false" |
|
|
|
|
>{{row.orderStatus=='SUBMITED'||row.orderStatus=='ORDER_LOCKED'?'订单取消':'订单退款'}}</el-link |
|
|
|
|
> |
|
|
|
|
</el-popconfirm> |
|
|
|
|
</template> |
|
|
|
@ -177,8 +189,10 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import serve from "api/refineryInfo.js"; |
|
|
|
|
import commonServe from "api/common.js"; |
|
|
|
|
import order from "api/order.js"; |
|
|
|
|
import generalDetails from "components/generalDetails/index.vue"; |
|
|
|
|
import autocomplete from "components/autocomplete/index.vue"; |
|
|
|
|
import billOfLading from "./components/billOfLading.vue"; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
@ -192,6 +206,22 @@ export default { |
|
|
|
|
detail: false, |
|
|
|
|
bill: false, |
|
|
|
|
}, |
|
|
|
|
configAutocomplete: { |
|
|
|
|
serveTarget: commonServe.getRefineryCompanyList, |
|
|
|
|
autocompleteKey: "name", |
|
|
|
|
labelKey: "name", |
|
|
|
|
valueKey: "id", |
|
|
|
|
placeholder: "企业名称", |
|
|
|
|
querykey: "customerId", |
|
|
|
|
}, |
|
|
|
|
configAutocompleteLc: { |
|
|
|
|
serveTarget: serve.findByEntity, |
|
|
|
|
autocompleteKey: "name", |
|
|
|
|
labelKey: "refineryName", |
|
|
|
|
valueKey: "id", |
|
|
|
|
placeholder: "炼厂名称", |
|
|
|
|
querykey: "refineryId", |
|
|
|
|
}, |
|
|
|
|
refineryTypeEnum: [ |
|
|
|
|
{ |
|
|
|
|
label: "普通炼厂", |
|
|
|
@ -214,15 +244,15 @@ export default { |
|
|
|
|
{ |
|
|
|
|
carTitle: "", |
|
|
|
|
carItems: [ |
|
|
|
|
{ label: "炼厂名称", value: "refineryName" }, |
|
|
|
|
{ label: "炼厂类型", value: "refineryType" }, |
|
|
|
|
{ label: "启用状态", value: "enableMark" }, |
|
|
|
|
{ label: "炼厂等级", value: "refineryLevel" }, |
|
|
|
|
{ label: "炼厂地址", value: "address" }, |
|
|
|
|
{ label: "创建用户ID", value: "createUser" }, |
|
|
|
|
{ label: "创建时间", value: "createTime" }, |
|
|
|
|
{ label: "修改用户ID", value: "updateUser" }, |
|
|
|
|
{ label: "修改时间", value: "updateTime" }, |
|
|
|
|
{ label: "订单ID", value: "id" }, |
|
|
|
|
{ label: "炼厂ID", value: "refineryId" }, |
|
|
|
|
{ label: "支付状态", value: "payStatus" }, |
|
|
|
|
{ label: "订单状态", value: "orderStatus" }, |
|
|
|
|
{ label: "提货单数量", value: "deliveryCount" }, |
|
|
|
|
// { label: "创建用户ID", value: "createUser" }, |
|
|
|
|
// { label: "创建时间", value: "createTime" }, |
|
|
|
|
// { label: "修改用户ID", value: "updateUser" }, |
|
|
|
|
// { label: "修改时间", value: "updateTime" }, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
@ -230,7 +260,8 @@ export default { |
|
|
|
|
}, |
|
|
|
|
components: { |
|
|
|
|
generalDetails, |
|
|
|
|
billOfLading |
|
|
|
|
billOfLading, |
|
|
|
|
autocomplete |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.$nextTick(() => { |
|
|
|
@ -262,7 +293,7 @@ export default { |
|
|
|
|
orderTagType(val){ |
|
|
|
|
switch(val){ |
|
|
|
|
case 'SUBMITED': return {label:'订单提交 ',type:'info'} |
|
|
|
|
case 'ORDER_LOCKED': return {label:'下单中',type:'warning'} |
|
|
|
|
case 'ORDER_LOCKED': return {label:'订单锁定',type:'warning'} |
|
|
|
|
case 'ORDER_SUCCESS': return {label:'下单成功',type:'success',effect:'dark'} |
|
|
|
|
case 'DELIVERING': return {label:'提货中', type: ''} |
|
|
|
|
case 'COMPLETE': return {label:'订单完成',type:'success',effect:'dark'} |
|
|
|
@ -294,6 +325,18 @@ export default { |
|
|
|
|
this.refineryList = res.data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//下单取消 |
|
|
|
|
orderCencle(row){ |
|
|
|
|
if(row.orderStatus=='SUBMITED'||row.orderStatus=='ORDER_LOCKED'){ |
|
|
|
|
order.update({id:row.id,orderStatus:'CANCELED'}).then((res) => { |
|
|
|
|
if(res.code==20000){ |
|
|
|
|
this.getByPage() |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}else{ |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//新增 |
|
|
|
|
addition() { |
|
|
|
|
this.controlWindows.addInfo.title = "炼厂入驻"; |
|
|
|
@ -313,19 +356,24 @@ export default { |
|
|
|
|
}, |
|
|
|
|
//详情 |
|
|
|
|
detail(row) { |
|
|
|
|
this.oilCompanyMatch = row; |
|
|
|
|
this.oilCompanyMatch = [row]; |
|
|
|
|
this.controlWindows.detail = true; |
|
|
|
|
}, |
|
|
|
|
//删除 |
|
|
|
|
deleteRow(row) { |
|
|
|
|
// serve |
|
|
|
|
// .deleteRow({ |
|
|
|
|
// id: row.id, |
|
|
|
|
// }) |
|
|
|
|
// .then((res) => { |
|
|
|
|
// this.$message.success(res.msg); |
|
|
|
|
// this.getByPage(); |
|
|
|
|
// }); |
|
|
|
|
//订单锁定 |
|
|
|
|
Locked(row) { |
|
|
|
|
if(row.orderStatus=='SUBMITED'){ |
|
|
|
|
order.orderLock({id:row.id}).then((res) => { |
|
|
|
|
if(res.code == 20000){ |
|
|
|
|
this.getByPage() |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}else{ |
|
|
|
|
order.orderSuccess({id:row.id}).then((res) => { |
|
|
|
|
if(res.code == 20000){ |
|
|
|
|
this.getByPage() |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//启用禁用 |
|
|
|
|
switchTrigger(val, row) { |
|
|
|
|