pull/5/head
caolc 2 years ago
parent d50155cd95
commit d8870ea6a0
  1. 2
      .env.development
  2. 2
      package.json
  3. 8
      src/api/order.js
  4. 91
      src/views/order/components/billOfLading.vue
  5. 20
      src/views/order/index.vue
  6. 3
      src/views/product/index.vue
  7. 2
      vue.config.js

@ -1,4 +1,4 @@
ENV = 'development' ENV = 'development'
VUE_APP_BASE_API = '/api' VUE_APP_BASE_API = '/api'
VUE_APP_ENV = 'development' VUE_APP_ENV = 'production'

@ -13,7 +13,7 @@
"bcryptjs": "^2.4.3", "bcryptjs": "^2.4.3",
"better-scroll": "1.8.0", "better-scroll": "1.8.0",
"clipboard": "^2.0.11", "clipboard": "^2.0.11",
"core-js": "3.6.5", "core-js": "^3.29.1",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"element-ui": "^2.15.12", "element-ui": "^2.15.12",
"js-cookie": "2.2.0", "js-cookie": "2.2.0",

@ -15,6 +15,10 @@ const billSave = (params) => {
const update = (params) => { const update = (params) => {
return request.putJson("/oil-refinery/xoilRefineryDelivery/update", params); return request.putJson("/oil-refinery/xoilRefineryDelivery/update", params);
}; };
//取消提货单
const cancel = (params) => {
return request.putJson("/oil-refinery/xoilRefineryOrder/update", params);
};
//查看订单信息 //查看订单信息
const findByOrderId = (id) => { const findByOrderId = (id) => {
return request.get(`/oil-refinery/xoilRefineryDelivery/findByOrderId/${id}`); return request.get(`/oil-refinery/xoilRefineryDelivery/findByOrderId/${id}`);
@ -36,6 +40,7 @@ const orderLock = (params) => {
export default { export default {
getByPage, getByPage,
findDeliveryByOrderId, findDeliveryByOrderId,
@ -44,5 +49,6 @@ export default {
update, update,
deleteBill, deleteBill,
orderSuccess, orderSuccess,
orderLock orderLock,
cancel
}; };

@ -1,12 +1,6 @@
<template> <template>
<el-drawer <el-drawer direction="ltr" size="40%" :visible="controlWindows.bill" @opened="openDrawer" :before-close="closeWindow"
direction="ltr" :show-close=false>
size="40%"
:visible="controlWindows.bill"
@opened="openDrawer"
:before-close="closeWindow"
:show-close = false
>
<div class="create" v-if="controlWindows.bill"> <div class="create" v-if="controlWindows.bill">
<el-form label-width="100px"> <el-form label-width="100px">
<div class="billTop"> <div class="billTop">
@ -19,7 +13,8 @@
</el-form-item> </el-form-item>
</div> </div>
<el-form-item label="订单状态"> <el-form-item label="订单状态">
<el-tag effect='dark' :type="orderTagType(billData.orderInfo.orderStatus).orderType">{{orderTagType(billData.orderInfo.orderStatus).orderLabel}}</el-tag> <el-tag effect='dark' :type="orderTagType(billData.orderInfo.orderStatus).orderType">{{
orderTagType(billData.orderInfo.orderStatus).orderLabel }}</el-tag>
</el-form-item> </el-form-item>
</div> </div>
<div> <div>
@ -60,7 +55,8 @@
<el-form-item label="提货单"> <el-form-item label="提货单">
<span>{{ item.id }}</span> <span>{{ item.id }}</span>
</el-form-item> </el-form-item>
<el-tag :type="orderTagType(item.deliveryStatus).type">{{orderTagType(item.deliveryStatus).label}}</el-tag> <el-tag :type="orderTagType(item.deliveryStatus).type">{{ orderTagType(item.deliveryStatus).label
}}</el-tag>
</div> </div>
<div class="billBottom-body-middle"> <div class="billBottom-body-middle">
<div class="billBottom-body-middle-info"> <div class="billBottom-body-middle-info">
@ -83,7 +79,8 @@
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
<div v-show="item.deliveryStatus=='SUBMITED'" style="text-align: right;color: #409EFF;" @click="billAdd(item,index)">修改信息</div> <div v-show="item.deliveryStatus == 'SUBMITED'" style="text-align: right;color: #409EFF;"
@click="billAdd(item, index)">修改信息</div>
<div class="billBottom-body-bottom"> <div class="billBottom-body-bottom">
<div> <div>
<el-form-item label="创建时间"> <el-form-item label="创建时间">
@ -94,8 +91,13 @@
</el-form-item> </el-form-item>
</div> </div>
<div> <div>
<el-button v-show="item.deliveryStatus=='SUBMITED'&&billData.orderInfo.orderStatus=='DELIVERING'&&billData.orderInfo.payStatus!=='REFUNDED'" type="danger" @click="billDelete(item,index)">删除提货单</el-button> <el-button
<el-button :effect="orderTagType(item.deliveryStatus).effect" :disabled="item.deliveryStatus!=='SUBMITED'" @click="billAddSave(2,item)" :type="orderTagType(item.deliveryStatus).type1">{{orderTagType(item.deliveryStatus).info}}</el-button> v-show="item.deliveryStatus == 'SUBMITED' && billData.orderInfo.orderStatus == 'DELIVERING' && billData.orderInfo.payStatus !== 'REFUNDED'"
type="danger" @click="billDelete(item, index)">删除提货单</el-button>
<el-button :effect="orderTagType(item.deliveryStatus).effect"
:disabled="item.deliveryStatus !== 'SUBMITED'" @click="billAddSave(2, item)"
:type="orderTagType(item.deliveryStatus).type1">{{ orderTagType(item.deliveryStatus).info
}}</el-button>
</div> </div>
</div> </div>
</div> </div>
@ -107,10 +109,11 @@
<el-button @click="controlWindows.bill = false">取消 </el-button> <el-button @click="controlWindows.bill = false">取消 </el-button>
<!-- <el-button @click="submit">订单确认</el-button> --> <!-- <el-button @click="submit">订单确认</el-button> -->
</div> </div>
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="提货单信息" width="400px" :visible.sync="dialogBillAdd"> <el-dialog :close-on-click-modal="false" :append-to-body="true" title="提货单信息" width="400px"
:visible.sync="dialogBillAdd">
<el-form v-if="dialogBillAdd" :model="billAddData" ref="form" :rules="rules"> <el-form v-if="dialogBillAdd" :model="billAddData" ref="form" :rules="rules">
<el-form-item label="预约提货量" prop="preDeliveryQuantity"> <el-form-item label="预约提货量" prop="preDeliveryQuantity">
<el-input v-model="billAddData.preDeliveryQuantity"></el-input>/ <el-input v-model="billAddData.preDeliveryQuantity"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="提货人" prop="driverName"> <el-form-item label="提货人" prop="driverName">
<el-input v-model="billAddData.driverName"></el-input> <el-input v-model="billAddData.driverName"></el-input>
@ -129,12 +132,8 @@
<!-- <el-button v-show="billTitle" type="primary" @click="billAddSave(2)">修改并锁定</el-button> --> <!-- <el-button v-show="billTitle" type="primary" @click="billAddSave(2)">修改并锁定</el-button> -->
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <el-dialog destroy-on-close title="提示" :close-on-click-modal="false" :append-to-body="true"
destroy-on-close :visible.sync="dialogDelivery" width="30%">
title="提示"
:close-on-click-modal="false" :append-to-body="true"
:visible.sync="dialogDelivery"
width="30%">
<el-form v-if="dialogDelivery"> <el-form v-if="dialogDelivery">
<el-form-item label="实际提货量" prop="plateNumber"> <el-form-item label="实际提货量" prop="plateNumber">
<el-input v-model="deliveryQuantity"></el-input> <el-input v-model="deliveryQuantity"></el-input>
@ -230,7 +229,8 @@ export default {
this.$message.success(res.msg) this.$message.success(res.msg)
this.dialogDelivery = false this.dialogDelivery = false
} }
}) });
this.$emit('billOfLading', this.billData, 2)
}, },
billSubmit(e, index) { billSubmit(e, index) {
if (e.deliveryStatus == 'PLATENUM_SUCCESS') { if (e.deliveryStatus == 'PLATENUM_SUCCESS') {
@ -247,7 +247,9 @@ export default {
this.billListMeth() this.billListMeth()
// this.$set(this.billData.list,index,this.billAddData) // this.$set(this.billData.list,index,this.billAddData)
this.$message.success(res.msg) this.$message.success(res.msg)
this.dialogBillAdd = false this.dialogBillAdd = false;
this.$emit('billOfLading', this.billData, 2)
} }
}) })
}) })
@ -261,6 +263,7 @@ export default {
case 'DELIVERING': return { orderLabel: '提货中', label: '提货中', type: '', orderType: 'info' } case 'DELIVERING': return { orderLabel: '提货中', label: '提货中', type: '', orderType: 'info' }
case 'COMPLETE': return { orderLabel: '订单完成', label: '提货完成', info: '提货完成', type: 'success', type1: 'info', orderType: 'success' } case 'COMPLETE': return { orderLabel: '订单完成', label: '提货完成', info: '提货完成', type: 'success', type1: 'info', orderType: 'success' }
case 'CANCELED': return { orderLabel: '订单取消', label: '订单取消', info: '订单取消', type: 'info', type1: 'dark', orderType: 'info' } case 'CANCELED': return { orderLabel: '订单取消', label: '订单取消', info: '订单取消', type: 'info', type1: 'dark', orderType: 'info' }
default: return { orderLabel: '暂无数据', label: '暂无数据', info: '暂无数据', type: 'info', type1: 'dark', orderType: 'info' }
} }
return { label: val ? val : '暂无数据', info: val ? val : '暂无数据', type: 'info' } return { label: val ? val : '暂无数据', info: val ? val : '暂无数据', type: 'info' }
}, },
@ -284,22 +287,27 @@ export default {
this.billData.list.push(this.billAddData) this.billData.list.push(this.billAddData)
this.billListMeth() this.billListMeth()
this.$message.success(res.msg) this.$message.success(res.msg)
this.dialogBillAdd = false this.dialogBillAdd = false;
}
})
} }
})}}) })
} else { } else {
this.$confirm('确定锁定提货单?', '提示', { type: 'error' }).then(() => { this.$confirm(`确定${e==1?'修改':'锁定'}提货单?`, '提示', { type: 'error' }).then(() => {
this.billAddData = item?JSON.parse(JSON.stringify(item)):{} // this.billAddData = item ? JSON.parse(JSON.stringify(item)) : {};
this.billAddData.deliveryStatus = e==2?'PLATENUM_LOCKED':'' this.billAddData.deliveryStatus = e == 2 ? 'PLATENUM_LOCKED' : '';
console.log(this.billAddData,'this.billAddData')
order.update(this.billAddData).then(res => { order.update(this.billAddData).then(res => {
if (res.code == 20000) { if (res.code == 20000) {
this.billListMeth() this.billListMeth()
this.$message.success(res.msg) this.$message.success(res.msg)
this.dialogBillAdd = false this.dialogBillAdd = false;
} }
}) })
}) })
} }
this.$emit('billOfLading', this.billData.orderInfo, 2)
}, },
// //
billListMeth() { billListMeth() {
@ -317,7 +325,9 @@ export default {
if (res.code == 20000) { if (res.code == 20000) {
this.$message.success(res.msg) this.$message.success(res.msg)
this.dialogBillAdd = false; this.dialogBillAdd = false;
this.billListMeth() this.billListMeth();
this.$emit('billOfLading', this.billData, 2)
} }
}) })
this.$set(this.billData.list, index, '') this.$set(this.billData.list, index, '')
@ -371,6 +381,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.create { .create {
padding: 40px; padding: 40px;
.el-input, .el-input,
.el-select, .el-select,
.el-textarea, .el-textarea,
@ -378,6 +389,7 @@ export default {
width: 300px; width: 300px;
} }
} }
.buttons { .buttons {
background: #fff; background: #fff;
position: absolute; position: absolute;
@ -389,60 +401,77 @@ export default {
line-height: 80px; line-height: 80px;
text-align: right; text-align: right;
border-top: 1px solid #f2f3f5; border-top: 1px solid #f2f3f5;
.el-button { .el-button {
text-align: right; text-align: right;
font-size: 14px; font-size: 14px;
border-radius: 5px; border-radius: 5px;
} }
} }
.billTop { .billTop {
background: #f0f0f0; background: #f0f0f0;
padding: 15px 35px; padding: 15px 35px;
border-radius: 5px; border-radius: 5px;
} }
.billTop-top,.billBottom-title,.billBottom-body-top,.billBottom-body-bottom{
.billTop-top,
.billBottom-title,
.billBottom-body-top,
.billBottom-body-bottom {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.billTop-top-left { .billTop-top-left {
display: flex; display: flex;
::v-deep .el-form-item { ::v-deep .el-form-item {
margin-bottom: 0 margin-bottom: 0
} }
} }
.billBottom { .billBottom {
.billBottom-title { .billBottom-title {
align-items: center; align-items: center;
margin: 20px 0; margin: 20px 0;
} }
} }
.billBottom-body-middle { .billBottom-body-middle {
::v-deep .el-form-item { ::v-deep .el-form-item {
margin-bottom: 0 margin-bottom: 0
} }
.billBottom-body-middle-info { .billBottom-body-middle-info {
display: flex; display: flex;
} }
} }
.billBottom-body { .billBottom-body {
padding: 20px; padding: 20px;
box-shadow: 0 1px 4px rgba(0, 21, 41, .50); box-shadow: 0 1px 4px rgba(0, 21, 41, .50);
margin: 25px 0px; margin: 25px 0px;
} }
.billBottom-body-bottom { .billBottom-body-bottom {
::v-deep .el-form-item { ::v-deep .el-form-item {
margin-bottom: 0 margin-bottom: 0
} }
align-items: center; align-items: center;
margin-top: 20px; margin-top: 20px;
} }
::v-deep .el-drawer__header { ::v-deep .el-drawer__header {
display: none; display: none;
} }
::v-deep .billBottom .el-form-item__label { ::v-deep .billBottom .el-form-item__label {
line-height: 20px; line-height: 20px;
color: #999; color: #999;
} }
::v-deep .billBottom .el-form-item__content { ::v-deep .billBottom .el-form-item__content {
line-height: 20px; line-height: 20px;
} }

@ -151,7 +151,7 @@
<el-popconfirm <el-popconfirm
title="是否确认取消订单?" title="是否确认取消订单?"
icon-color="red" icon-color="red"
@confirm="deleteRow(row)" @confirm="deleteRow(row,'delete')"
> >
<el-link v-show="row.orderStatus=='SUBMITED'" slot="reference" type="primary" :underline="false" <el-link v-show="row.orderStatus=='SUBMITED'" slot="reference" type="primary" :underline="false"
>订单取消</el-link >订单取消</el-link
@ -192,7 +192,7 @@
</general-details> </general-details>
</el-drawer> </el-drawer>
<!-- 提货单 --> <!-- 提货单 -->
<billOfLading :billData="billData" :controlWindows="controlWindows" @closeWindow="handleCurrentChange" /> <billOfLading @billOfLading="billOfLading" :billData="billData" :controlWindows="controlWindows" @closeWindow="handleCurrentChange" />
</div> </div>
</template> </template>
@ -254,7 +254,6 @@ export default {
pageSize: 10, pageSize: 10,
total: 0, total: 0,
params: { params: {
}, },
}, },
oilCompanyMatch: {}, oilCompanyMatch: {},
@ -355,14 +354,18 @@ export default {
this.controlWindows.add = true; this.controlWindows.add = true;
}, },
// //
async billOfLading(row){ async billOfLading(row,selectIndex){
this.controlWindows.addInfo.title = ""; this.controlWindows.addInfo.title = "";
if(!selectIndex||selectIndex==1){
await order.findDeliveryByOrderId(row.id).then((res) => { await order.findDeliveryByOrderId(row.id).then((res) => {
this.billData.list = res.data this.billData.list = res.data
}); });
}
if(!selectIndex||selectIndex==2){
await order.findByOrderId(row.id).then((res) => { await order.findByOrderId(row.id).then((res) => {
this.billData.orderInfo = res.data this.billData.orderInfo = Object.assign(res.data,{id:row.id})
}); });
}
this.controlWindows.addInfo = row this.controlWindows.addInfo = row
this.controlWindows.bill = true this.controlWindows.bill = true
}, },
@ -372,8 +375,11 @@ export default {
this.controlWindows.detail = true; this.controlWindows.detail = true;
}, },
// //
deleteRow(row) { deleteRow(row,type) {
order.orderLock({id:row.id}).then((res) => { let api = type&&type=='delete'?'cancel':'orderLock';
let data = {id:row.id};
(api=='cancel')&&(data['orderStatus']='CANCELED');
order[api](data).then((res) => {
if(res.code == 20000){ if(res.code == 20000){
this.getByPage() this.getByPage()
} }

@ -238,7 +238,8 @@ export default {
}, },
//table list //table list
getByPage() { getByPage() {
serve.getByPage(this.parameter).then((res) => { let data = Object.assign(this.parameter,{enableMark: 'ENABLE'});
serve.getByPage(data).then((res) => {
this.tableData = res.data.list; this.tableData = res.data.list;
this.parameter.total = res.data.totalCount; this.parameter.total = res.data.totalCount;
}); });

@ -30,7 +30,7 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `https://3816t6291y.oicp.vip`, // target: `https://3816t6291y.oicp.vip`,
// target: 'https://6l438d1757.zicp.fun', // target: 'https://6l438d1757.zicp.fun',
target: "http://192.168.0.23:38080", target: "http://uat.xingoil.com/adminapi",
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",

Loading…
Cancel
Save