diff --git a/src/api/login.js b/src/api/login.js index 7786ac1..d601769 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -9,6 +9,9 @@ const getRefineryByCustomerId = (phone) => { `/oil-user/oilCustomerRefineryRelation/getRefineryByCustomerId/${phone}` ); }; +const loginOut = () => { + return request.get("/oil-identity/authorization/logout"); +}; //路由 const getCustomerRouters = () => { return request.get( @@ -16,4 +19,4 @@ const getCustomerRouters = () => { ); }; -export default { login, getRefineryByCustomerId, getCustomerRouters }; +export default { login, getRefineryByCustomerId, getCustomerRouters,loginOut }; diff --git a/src/api/order.js b/src/api/order.js new file mode 100644 index 0000000..5c9f211 --- /dev/null +++ b/src/api/order.js @@ -0,0 +1,48 @@ +import request from "utils/axios.js"; +// table +const getByPage = (params) => { + return request.postJson("/oil-refinery/xoilRefineryOrder/getByPage", params); +}; +//查看提货单信息 +const findDeliveryByOrderId = (id) => { + return request.get(`/oil-refinery/xoilRefineryDelivery/findDeliveryByOrderId/${id}`); +}; +//创建提货单 +const billSave = (params) => { + return request.postJson("/oil-refinery/xoilRefineryDelivery/save", params); +}; +//修改提货单 +const update = (params) => { + return request.putJson("/oil-refinery/xoilRefineryDelivery/update", params); +}; +//查看订单信息 +const findByOrderId = (id) => { + return request.get(`/oil-refinery/xoilRefineryDelivery/findByOrderId/${id}`); +}; +//修改提货单 +const deleteBill = (params) => { + return request.putJson("/oil-refinery/xoilRefineryDelivery/delete", params); +}; +//下单 +const orderSuccess = (params) => { + return request.postJson("/oil-refinery/xoilRefineryOrder/orderSuccess", params); +}; +//订单锁定 +const orderLock = (params) => { + return request.postJson("/oil-refinery/xoilRefineryOrder/orderLock", params); +}; + + + + + +export default { + getByPage, + findDeliveryByOrderId, + billSave, + findByOrderId, + update, + deleteBill, + orderSuccess, + orderLock +}; diff --git a/src/api/refineryInfo.js b/src/api/refineryInfo.js new file mode 100644 index 0000000..0bd5767 --- /dev/null +++ b/src/api/refineryInfo.js @@ -0,0 +1,31 @@ +import request from "utils/axios.js"; +// table +const getByPage = (params) => { + return request.postJson("/oil-refinery/xoilRefineryInfo/getByPage", params); +}; +// 新增 +const save = (params) => { + return request.postJson("/oil-refinery/xoilRefineryInfo/save", params); +}; +// 修改 +const update = (params) => { + return request.postJson("/oil-refinery/xoilRefineryInfo/update", params); +}; +// 删除 +const deleteRow = (params) => { + return request.postJson("/oil-refinery/xoilRefineryInfo/delete", params); +}; +//炼厂list +const findByEntity = (params = {}) => { + return request.postJson( + "/oil-refinery/xoilRefineryInfo/findByEntity", + params + ); +}; +export default { + getByPage, + save, + update, + deleteRow, + findByEntity, +}; diff --git a/src/components/autocomplete/index.vue b/src/components/autocomplete/index.vue new file mode 100644 index 0000000..1d3b1dd --- /dev/null +++ b/src/components/autocomplete/index.vue @@ -0,0 +1,104 @@ + + + + + + + + + + + + diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 0ca5cf6..a33455a 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -23,7 +23,7 @@ Docs - Log Out + 注销登录 @@ -35,6 +35,7 @@ import { mapGetters } from 'vuex' import Breadcrumb from '@/components/Breadcrumb' import Hamburger from '@/components/Hamburger' +import serve from "api/login.js"; export default { components: { @@ -51,10 +52,18 @@ export default { toggleSideBar() { this.$store.dispatch('app/toggleSideBar') }, - async logout() { - await this.$store.dispatch('user/logout') - this.$router.push(`/login?redirect=${this.$route.fullPath}`) - } + // async logout() { + // await this.$store.dispatch('user/logout') + // this.$router.push(`/login?redirect=${this.$route.fullPath}`) + // } + logout() { + serve.loginOut().then((res) => { + if (res.code === 20000) { + localStorage.removeItem("token"); + this.$router.push("/login"); + } + }); + }, } } diff --git a/src/utils/axios.js b/src/utils/axios.js index b35ad86..3642e91 100644 --- a/src/utils/axios.js +++ b/src/utils/axios.js @@ -24,6 +24,13 @@ export default { data: data, }); }, + putJson(url, data) { + return axios({ + url: url, + method: "put", + data: data, + }); + }, postFromData(url, data) { return axios({ url: url, diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 69a5020..a1b5f59 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -159,6 +159,8 @@ export default { return; }); } + console.log + localStorage.setItem("companyIdData",this.loginForm.networkId); localStorage.setItem("token", res.data.accessToken); this.$router.replace("/"); }) diff --git a/src/views/order/components/billOfLading.vue b/src/views/order/components/billOfLading.vue new file mode 100644 index 0000000..a19915d --- /dev/null +++ b/src/views/order/components/billOfLading.vue @@ -0,0 +1,449 @@ + + + + + + + + + + + {{billData.orderInfo.deliveryAccount}} + + + + {{orderTagType(billData.orderInfo.orderStatus).orderLabel}} + + + + + + {{billData.orderInfo.preQuantity}} + + + {{billData.orderInfo.preAmount}} + + + + + {{billData.orderInfo.alreadyQuantity}} + + + {{billData.orderInfo.alreadyAmount}} + + + + + {{billData.orderInfo.surplusQuantity}} + + + {{billData.orderInfo.surplusAmount}} + + + + + + + 提货单列表 + 创建提货单 + + + + + + {{item.id}} + + {{orderTagType(item.deliveryStatus).label}} + + + + + {{ item.preDeliveryQuantity }} + + + {{item.driverName}} + + + {{ item.plateNumber }} + + + + + {{ item.accDeliveryQuantity }} + + + {{ item.identityCard }} + + + + 我来修改/锁定 + + + + {{ item.createTime }} + + + {{ item.updateTime }} + + + + 删除提货单 + {{orderTagType(item.deliveryStatus).info}} + + + + + + + + + 取消 + + + + + + 元/吨 + + + + + + + + + + + + + + + + + + + + + 取 消 + 确 定 + + + + + + + + diff --git a/src/views/order/index.vue b/src/views/order/index.vue new file mode 100644 index 0000000..60f9bc0 --- /dev/null +++ b/src/views/order/index.vue @@ -0,0 +1,436 @@ + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + + + + + + + + {{ row.customerName }} + + + {{ row.customerId || "暂无" }} + + + + + + + 炼厂名称 {{ row.refineryName }} + + + 产品名称 {{ row.productName }} + + + + + + + + + + + {{ payTagType(row.payStatus).label }} + + + + + {{ orderTagType(row.orderStatus).label }} + + + + + + {{ row.actQuantity?row.actQuantity:'--' }} / {{ row.preQuantity?row.preQuantity:'--' }} 吨 + + + + + + {{ row.actAmount }} / {{ row.preAmount }} 元 + + + + + + 创建时间 {{ row.createTime }} + + + 更新时间 {{ row.updateTime || "暂无" }} + + + + + + 详情 + 提货单 + + 订单锁定 + + + 订单取消 + + + + + + + + + + + + + + + + + + + +
+ {{ row.customerName }} +
+ {{ row.customerId || "暂无" }} +
+ 炼厂名称 {{ row.refineryName }} +
+ 产品名称 {{ row.productName }} +
+ 创建时间 {{ row.createTime }} +
+ 更新时间 {{ row.updateTime || "暂无" }} +