23 Commits

Author SHA1 Message Date
xiaozhiyong
bfb9fc7761 更新 2023-03-16 16:21:36 +08:00
xiaozhiyong
0ff8937579 更新 2023-03-16 16:14:11 +08:00
xiaozhiyong
d4f33ff63c Merge branch 'master' of http://121.196.213.68:3000/xiaozhiyong/refinery-admin 2023-03-16 15:44:52 +08:00
xiaozhiyong
ed47372ad5 更新 2023-03-16 15:44:44 +08:00
b4a92e8395 Merge pull request 'xiugai' (#7) from lixuan into master
Reviewed-on: #7
2023-03-16 07:18:30 +00:00
lixuan
1126906b5e xiugai 2023-03-16 15:12:24 +08:00
xiaozhiyong
479879ef38 Merge branch 'master' of http://121.196.213.68:3000/xiaozhiyong/refinery-admin 2023-03-09 11:52:00 +08:00
xiaozhiyong
a28edee556 更新 2023-03-09 11:51:18 +08:00
fbb1742fc2 Merge pull request 'lixuan' (#6) from lixuan into master
Reviewed-on: #6
2023-03-02 09:38:36 +00:00
lixuan
6928ce33a0 Merge branch 'master' of http://121.196.213.68:3000/xiaozhiyong/refinery-admin into lixuan 2023-03-02 17:38:17 +08:00
lixuan
10047d1f4a xiugai 2023-03-02 17:38:02 +08:00
3f1030fe8a Merge pull request 'lixuan' (#5) from lixuan into master
Reviewed-on: #5
2023-03-02 03:32:44 +00:00
lixuan
fe2721936a Merge branch 'master' of http://121.196.213.68:3000/xiaozhiyong/refinery-admin into lixuan 2023-03-02 11:32:27 +08:00
lixuan
2e4498069c xiugai 2023-03-02 11:32:19 +08:00
xiaozhiyong
9f1b7e7a9a 更新 2023-03-01 17:14:09 +08:00
xiaozhiyong
bed6901627 Merge remote-tracking branch 'origin/xiaozy_产品列表' 2023-03-01 16:43:25 +08:00
xiaozhiyong
c7a585e69a Merge remote-tracking branch 'origin/xiaozy_产品列表' 2023-03-01 14:01:55 +08:00
1c68dc3c2a Merge pull request 'lixuan' (#4) from lixuan into master
Reviewed-on: #4
2023-02-28 07:18:04 +00:00
lixuan
b82a898e3d Merge branch 'master' of http://121.196.213.68:3000/xiaozhiyong/refinery-admin into lixuan 2023-02-28 15:02:17 +08:00
lixuan
78e3d77a0f xiugai 2023-02-28 15:02:08 +08:00
2f54891e52 Merge pull request 'lixuan' (#3) from lixuan into master
Reviewed-on: #3
2023-02-28 03:22:52 +00:00
lixuan
f1155ab567 Merge branch 'master' of http://121.196.213.68:3000/xiaozhiyong/refinery-admin into lixuan 2023-02-28 11:22:18 +08:00
lixuan
f0013e66a4 xiugai 2023-02-28 11:22:08 +08:00
9 changed files with 229 additions and 114 deletions

View File

@@ -21,7 +21,7 @@ service.interceptors.request.use(
const JSESSIONID = utils.uuid();
config.headers["JSESSIONID"] = JSESSIONID;
config.headers["token"] = utils.bcrypt(JSESSIONID);
config.headers['dataSources'] = 'WEB'
if (env === "development") {
return config;
}

View File

@@ -28,7 +28,7 @@
clearable
>
<el-option
v-for="(item, index) in companyNatureTypeEnum"
v-for="(item, index) in companyNatureTypeEnum.slice(1)"
:key="index"
:label="item.label"
:value="item.value"
@@ -49,7 +49,7 @@
clearable
>
<el-option
v-for="(item, index) in auditMarkEnum"
v-for="(item, index) in auditMarkEnum.slice(1)"
:key="index"
:label="item.label"
:value="item.value"
@@ -300,7 +300,7 @@
<!-- 新增 -->
<add
:controlWindows="controlWindows"
:companyNatureTypeEnum="companyNatureTypeEnum"
:companyNatureTypeEnum="companyNatureTypeEnum.slice(1)"
@closeWindow="search"
/>
<!-- 认证 -->
@@ -332,16 +332,17 @@
</p>
</template>
<template #companyNature>
<p v-if="oilCompanyMatch[0]">
{{
companyNatureEnum.find(
<p>
<!-- {{
companyNatureTypeEnum.find(
(item) => item.value === oilCompanyMatch[0].companyNature
).label
}}
}} -->
</p>
</template>
<template #companyDockType>
<p>
<p v-if="oilCompanyMatch[0].companyDockType === null"></p>
<p v-else>
{{
oilCompanyMatch[0].companyDockType == 0 ? "对接客户" : "平台客户"
}}
@@ -356,7 +357,7 @@
<p>
{{
auditMarkEnum.find(
(item) => item.value == oilCompanyMatch[0].enableMark
(item) => item.value == oilCompanyMatch[0].auditMark
).label
}}
</p>
@@ -386,7 +387,7 @@
<template #accountState>
<p v-if="oilCompanyMatch[3]">
{{
accountStatusEnum.find(
companyTypeEnum.find(
(item) => item.value === oilCompanyMatch[3].accountState
).label
}}
@@ -545,6 +546,10 @@ export default {
},
],
auditMarkEnum: [
{
value: null,
label: "",
},
{
label: "未提交",
value: "0",
@@ -567,6 +572,10 @@ export default {
},
],
companyNatureTypeEnum: [
{
value: null,
label: "",
},
{
label: "零售客户",
value: "0",

View File

@@ -104,7 +104,7 @@
</el-form>
</div>
<div class="buttons">
<el-button @click="controlWindows.bill = false">取消 </el-button>
<el-button @click="closeWindow()">取消 </el-button>
<el-button v-show="billData.orderInfo&&billData.orderInfo.orderStatus&&billData.orderInfo.orderStatus=='DELIVERING'" @click="submit">订单确认</el-button>
</div>
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="提货单信息" width="400px" :visible.sync="dialogBillAdd">
@@ -286,7 +286,6 @@ export default {
order.billSave(this.billAddData).then(res=>{
if(res.code == 20000){
this.billAddData.deliveryStatus = 'SUBMITED'
this.billData.list.push(this.billAddData)
this.billListMeth()
this.$message.success(res.msg)
this.dialogBillAdd = false
@@ -305,14 +304,19 @@ export default {
}
}
})
this.$emit('billOfLading',this.billAddData.orderId)
},
//更新提货单数据
billListMeth(){
setTimeout(()=>{
order.findDeliveryByOrderId(this.controlWindows.addInfo.id).then((res) => {
this.billData.list = res.data
this.$forceUpdate()
this.$forceUpdate()
});
order.findByOrderId(this.controlWindows.addInfo.id).then((res) => {
this.billData.orderInfo = res.data
this.$forceUpdate()
});
},200)
},
//删除提货单
@@ -325,7 +329,6 @@ export default {
this.billListMeth()
}
})
this.$set(this.billData.list,index,'')
})
},
openDrawer() {
@@ -348,18 +351,34 @@ export default {
throw new Error()
}
});
this.$confirm('确定下单?', '提示', { type: 'success' }).then(() => {
let data={
let titleConfirm = ['是否确认订单已完成?','一旦确认,该订单无法再被提货,且未提货的金额将自行退回。']
const newDatas = []
const h = this.$createElement
for (const i in titleConfirm) {
newDatas.push(h('p', null, titleConfirm[i]))
}
this.$confirm(
'提示',
{
title: '提示',
message: h('div', null, newDatas),
showCancelButton: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success'
}
).then(() => {
let data={
id:this.controlWindows.addInfo.id,
actQuantity:this.quantity,
}
order.orderComplete(data).then((res) => {
order.orderComplete(data).then((res) => {
if (res.code === 20000) {
this.$message.success(res.msg);
this.closeWindow();
}
});
})
})
},
judgeInterface(form) {
// let { id } = this.controlWindows.addInfo;
@@ -371,7 +390,6 @@ export default {
this.$emit("closeWindow");
this.form = {};
this.controlWindows.bill = false;
this.$refs.form.clearValidate();
},
},
};

View File

@@ -1,13 +1,18 @@
<template>
<div class="order">
<div class="frame">
<el-input class="mr20" v-model="parameter.params.id" placeholder="订单编号" clearable></el-input>
<!-- 公司名称 -->
<el-input
class="mr20"
v-model="parameter.params.id"
placeholder="订单编号"
clearable
></el-input>
<!-- 公司名称 -->
<autocomplete
class="mr20"
:params="parameter.params"
:config="configAutocomplete"
/>
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"
@@ -56,13 +61,13 @@
:data="tableData"
style="width: 100%"
>
<el-table-column
<el-table-column
prop="id"
label="订单ID"
show-overflow-tooltip
minWidth="250"
>
</el-table-column>
</el-table-column>
<el-table-column label="购方客户信息" minWidth="250">
<template slot-scope="{ row }">
<p class="gray">
@@ -84,29 +89,44 @@
</template>
</el-table-column>
<el-table-column
prop="salePrice" label="价格" minWidth="90">
<el-table-column prop="salePrice" label="价格" minWidth="90">
</el-table-column>
<el-table-column prop="payStatus" label="支付状态" minWidth="120" show-overflow-tooltip>
<el-table-column
prop="payStatus"
label="支付状态"
minWidth="120"
show-overflow-tooltip
>
<template slot-scope="{ row }">
<el-tag :effect="payTagType(row.payStatus).effect" :type="payTagType(row.payStatus).type">{{ payTagType(row.payStatus).label }}</el-tag>
<el-tag
:effect="payTagType(row.payStatus).effect"
:type="payTagType(row.payStatus).type"
>{{ payTagType(row.payStatus).label }}</el-tag
>
</template>
</el-table-column>
<el-table-column prop="orderStatus" label="订单状态" minWidth="120">
<template slot-scope="{ row }">
<el-tag :effect="orderTagType(row.orderStatus).effect" :type="orderTagType(row.orderStatus).type">{{ orderTagType(row.orderStatus).label }}</el-tag>
<el-tag
:effect="orderTagType(row.orderStatus).effect"
:type="orderTagType(row.orderStatus).type"
>{{ orderTagType(row.orderStatus).label }}</el-tag
>
</template>
</el-table-column>
<el-table-column
prop="orderSerialNumber"
label="订单提货量(实际/预约)"
minWidth="180"
>
<template slot-scope="{ row }">
<span>{{ row.actQuantity|toNumberFixed }} / {{ row.preQuantity|toNumberFixed }} {{row.productMeasurement}}</span>
<span
>{{ row.actQuantity | toNumberFixed }} /
{{ row.preQuantity | toNumberFixed }}
{{ row.productMeasurement }}</span
>
</template>
</el-table-column>
@@ -116,7 +136,10 @@
minWidth="180"
>
<template slot-scope="{ row }">
<span>{{ row.actAmount|toNumberFixed}} / {{ row.preAmount|toNumberFixed }} </span>
<span
>{{ row.actAmount | toNumberFixed }} /
{{ row.preAmount | toNumberFixed }} </span
>
</template>
</el-table-column>
<el-table-column label="时间" minWidth="235">
@@ -129,30 +152,71 @@
</p>
</template>
</el-table-column>
<el-table-column prop="orderSerialNumber" fixed="right" label="操作" width="250">
<el-table-column
prop="orderSerialNumber"
fixed="right"
label="操作"
width="250"
>
<template slot-scope="{ row }">
<el-link type="primary" :underline="false" @click="detail(row)"
>详情</el-link
>
<el-link v-show="row.orderStatus!=='SUBMITED'&&row.orderStatus!=='ORDER_LOCKED'&&row.payStatus!=='REFUNDED'" 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="row.orderStatus=='SUBMITED'?'是否确认订单锁定?':'是否确认下单?'"
:title="
row.orderStatus == 'SUBMITED'
? '是否确认订单锁定?'
: '是否确认下单?'
"
icon-color="red"
@confirm="Locked(row)"
>
<el-link v-show="row.orderStatus=='SUBMITED'||row.orderStatus=='ORDER_LOCKED'" slot="reference" type="primary" :underline="false"
>{{row.orderStatus=='SUBMITED'?'订单锁定':'下单确认'}}</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'?'是否确认取消订单?':'是否确认退款?'"
:title="
row.orderStatus == 'SUBMITED' ||
row.orderStatus == 'ORDER_LOCKED'
? '是否确认取消订单?'
: '是否确认退款?'
"
icon-color="red"
@confirm="orderCencle(row)"
>
<el-link v-show="row.orderStatus!=='CANCELED'&&row.payStatus!=='REFUNDED'" slot="reference" type="primary" :underline="false"
>{{row.orderStatus=='SUBMITED'||row.orderStatus=='ORDER_LOCKED'?'订单取消':'订单退款'}}</el-link
<el-link
v-show="
row.orderStatus !== 'CANCELED' && row.payStatus !== 'REFUNDED'
"
slot="reference"
type="primary"
:underline="false"
>{{
row.orderStatus == "SUBMITED" ||
row.orderStatus == "ORDER_LOCKED"
? "订单取消"
: "订单退款"
}}</el-link
>
</el-popconfirm>
</template>
@@ -190,7 +254,11 @@
</general-details>
</el-drawer>
<!-- 提货单 -->
<billOfLading :billData="billData" :controlWindows="controlWindows" @closeWindow="handleCurrentChange" />
<billOfLading
:billData="billData"
:controlWindows="controlWindows"
@closeWindow="handleCurrentChange"
/>
</div>
</template>
@@ -204,20 +272,20 @@ import autocomplete from "components/autocomplete/index.vue";
import billOfLading from "./components/billOfLading.vue";
export default {
filters:{
toNumberFixed(val){
if(val){
return Number(val).toFixed(2)
}else{return '--'}
}
filters: {
toNumberFixed(val) {
if (val) {
return Number(val).toFixed(2);
} else {
return "--";
}
},
},
data() {
return {
controlWindows: {
add: false,
addInfo: {
},
addInfo: {},
detail: false,
bill: false,
},
@@ -231,7 +299,7 @@ export default {
},
configAutocompleteLc: {
serveTarget: serve.findByEntity,
autocompleteKey: "name",
autocompleteKey: "refineryName",
labelKey: "refineryName",
valueKey: "id",
placeholder: "炼厂名称",
@@ -262,7 +330,7 @@ export default {
params: {},
},
oilCompanyMatch: {},
billData:[],
billData: [],
mappingData: [
{
carTitle: "",
@@ -285,7 +353,7 @@ export default {
generalDetails,
billOfLading,
autocomplete,
productApi
productApi,
},
mounted() {
this.$nextTick(() => {
@@ -301,29 +369,43 @@ export default {
this.getByPage();
},
methods: {
payTagType(val){
switch(val){
case 'PREPAID': return {label:'预支付',type:'info'}
case 'PAYING': return {label:'支付中',type:'warning'}
case 'SUCCESS': return {label:'支付成功',type:'success',effect:'dark'}
case 'FAILURE': return {label:'支付失败',type:'danger',effect:'dark'}
case 'CANCELED': return {label:'支付取消',type:'info'}
case 'REFUNDED': return {label:'退款成功',type:'danger',effect:'dark'}
case 'REFUNDING': return{label:'退款中',type:'warning'}
case 'REFUNDFAIL': return{label:'退款失败',type:'info',effect:'dark'}
payTagType(val) {
switch (val) {
case "PREPAID":
return { label: "预支付", type: "info" };
case "PAYING":
return { label: "支付中", type: "warning" };
case "SUCCESS":
return { label: "支付成功", type: "success", effect: "dark" };
case "FAILURE":
return { label: "支付失败", type: "danger", effect: "dark" };
case "CANCELED":
return { label: "支付取消", type: "info" };
case "REFUNDED":
return { label: "退款成功", type: "danger", effect: "dark" };
case "REFUNDING":
return { label: "退款中", type: "warning" };
case "REFUNDFAIL":
return { label: "退款失败", type: "info", effect: "dark" };
}
return {label:val?val:'暂无数据',type:'info',effect:'plain'}
return { label: val ? val : "暂无数据", type: "info", effect: "plain" };
},
orderTagType(val){
switch(val){
case 'SUBMITED': return {label:'订单提交 ',type:'info'}
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'}
case 'CANCELED': return {label:'订单取消',type:'info'}
orderTagType(val) {
switch (val) {
case "SUBMITED":
return { label: "订单提交 ", type: "info" };
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" };
case "CANCELED":
return { label: "订单取消", type: "info" };
}
return {label:val?val:'暂无数据',type:'info'}
return { label: val ? val : "暂无数据", type: "info" };
},
// currentPage change
handleCurrentChange(page) {
@@ -350,17 +432,19 @@ export default {
});
},
//下单取消
orderCencle(row){
if(row.orderStatus=='SUBMITED'||row.orderStatus=='ORDER_LOCKED'){
order.orderUpdate({id:row.id,orderStatus:'CANCELED'}).then((res) => {
if(res.code==20000){
this.getByPage()
}
});
}else{
order.orderRefund({id:row.id}).then((res) => {
if(res.code==20000){
this.getByPage()
orderCencle(row) {
if (row.orderStatus == "SUBMITED" || row.orderStatus == "ORDER_LOCKED") {
order
.orderUpdate({ id: row.id, orderStatus: "CANCELED" })
.then((res) => {
if (res.code == 20000) {
this.getByPage();
}
});
} else {
order.orderRefund({ id: row.id }).then((res) => {
if (res.code == 20000) {
this.getByPage();
}
});
}
@@ -371,16 +455,16 @@ export default {
this.controlWindows.add = true;
},
//提货单
async billOfLading(row){
async billOfLading(row) {
this.controlWindows.addInfo.title = "";
await order.findDeliveryByOrderId(row.id).then((res) => {
this.billData.list = res.data
this.billData.list = res.data;
});
await order.findByOrderId(row.id).then((res) => {
this.billData.orderInfo = res.data
this.billData.orderInfo = res.data;
});
this.controlWindows.addInfo = row
this.controlWindows.bill = true
this.controlWindows.addInfo = row;
this.controlWindows.bill = true;
},
//详情
detail(row) {
@@ -389,16 +473,16 @@ export default {
},
//订单锁定
Locked(row) {
if(row.orderStatus=='SUBMITED'){
order.orderLock({id:row.id}).then((res) => {
if(res.code == 20000){
this.getByPage()
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()
} else {
order.orderSuccess({ id: row.id }).then((res) => {
if (res.code == 20000) {
this.getByPage();
}
});
}

View File

@@ -75,7 +75,9 @@
<el-input
v-model="form.measurement"
placeholder="请输入计量单位"
disabled
></el-input>
<el-radio v-model="form.measurementEnableMark" label="ENABLE" style="margin-left:10px">启用</el-radio>
</el-form-item>
<el-form-item label="启用状态" prop="enableMark">
<el-radio-group v-model="form.enableMark">
@@ -110,7 +112,10 @@ export default {
else callback("请选择炼厂");
};
return {
form: {},
form: {
measurement:'吨',
measurementEnableMark:'ENABLE'
},
refineryList: [],
configAutocomplete: {
serveTarget: refineryInfoServe.findByEntity,
@@ -128,19 +133,19 @@ export default {
productTypeList: [
{
label: "0#柴",
value: "0#",
value: "0#",
},
{
label: "-10#柴",
value: "-10#",
value: "-10#",
},
{
label: "92#汽",
value: "92#",
value: "92#",
},
{
label: "95#汽",
value: "95#",
value: "95#",
},
],
rules: {

View File

@@ -47,7 +47,7 @@ export default {
};
let validatorSalePrice2company = (rule, value, callback) => {
if (!value || !+value) return callback("企业销售价不能为0或空");
if (value < this.form.floorPrice)
if (+value < +this.form.floorPrice)
return callback("企业销售价不能低于成本价");
callback();
};

View File

@@ -112,14 +112,14 @@ export default {
"form.salePrice": {
handler(n, o) {
if(n){
this.form.preAmount = this.form.salePrice*(this.form.preQuantity?this.form.preQuantity:0)
this.form.preAmount = (this.form.salePrice*(this.form.preQuantity?this.form.preQuantity:0)).toFixed(2)
}
},
},
"form.preQuantity": {
handler(n, o) {
if(n){
this.form.preAmount = this.form.preQuantity*(this.form.salePrice?this.form.salePrice:0)
this.form.preAmount = (this.form.preQuantity*(this.form.salePrice?this.form.salePrice:0)).toFixed(2)
}
},
}
@@ -193,7 +193,6 @@ export default {
);
this.form.salePrice = this.productRowData[0].salePrice2company
this.form.floorPrice = this.productRowData[0].floorPrice
this.form.productMeasurement = this.productRowData[0].measurement
},
productChange(){
this.productData()
@@ -256,7 +255,7 @@ export default {
submit() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.productMeasurement = this.productRowData[0].measurement
this.judgeInterface(this.form).then((res) => {
if (res.code === 20000) {
this.$message.success(res.msg);

View File

@@ -277,7 +277,7 @@ export default {
],
configAutocomplete: {
serveTarget: serve.findByEntity,
autocomplateKey: "refineryName",
autocompleteKey: "refineryName",
valueKey: "refineryName",
valueKey: "id",
placeholder: "炼厂名称",

View File

@@ -36,7 +36,7 @@
<div class="table">
<div class="operation">
<!-- <el-button @click="addition">新增炼厂账户</el-button> -->
<el-button @click="addition">充值</el-button>
<!-- <el-button @click="addition">充值</el-button> -->
</div>
<el-table
v-if="tableHeight"