Compare commits
36 Commits
xiaozy_产品列
...
03bc343e78
| Author | SHA1 | Date | |
|---|---|---|---|
| 03bc343e78 | |||
|
|
38fd12cb33 | ||
| 2834cfc639 | |||
|
|
f56dc7bde9 | ||
| bac5da12a8 | |||
|
|
865abd6b3e | ||
|
|
704f3f56d9 | ||
|
|
5f73c912e1 | ||
|
|
8d4e877949 | ||
|
|
69ec812147 | ||
|
|
402316d8af | ||
| 367204d3c6 | |||
|
|
19ab9eec78 | ||
|
|
bfb9fc7761 | ||
|
|
0ff8937579 | ||
|
|
d4f33ff63c | ||
|
|
ed47372ad5 | ||
| b4a92e8395 | |||
|
|
1126906b5e | ||
|
|
479879ef38 | ||
|
|
a28edee556 | ||
| fbb1742fc2 | |||
|
|
6928ce33a0 | ||
|
|
10047d1f4a | ||
| 3f1030fe8a | |||
|
|
fe2721936a | ||
|
|
2e4498069c | ||
|
|
9f1b7e7a9a | ||
|
|
bed6901627 | ||
|
|
c7a585e69a | ||
| 1c68dc3c2a | |||
|
|
b82a898e3d | ||
|
|
78e3d77a0f | ||
| 2f54891e52 | |||
|
|
f1155ab567 | ||
|
|
f0013e66a4 |
@@ -34,14 +34,14 @@ const modifyPrice = (params) => {
|
|||||||
};
|
};
|
||||||
// 搜索客户
|
// 搜索客户
|
||||||
const getRefineryCompanyList = (params) => {
|
const getRefineryCompanyList = (params) => {
|
||||||
return request.postJson("/oil-user/oilCompanyInfo/getLikeByCompanyType", params);
|
return request.postJson(
|
||||||
|
"/oil-user/oilCompanyInfo/getLikeByCompanyType",
|
||||||
|
params
|
||||||
|
);
|
||||||
};
|
};
|
||||||
// 下单
|
// 下单
|
||||||
const orderSave = (params) => {
|
const orderSave = (params) => {
|
||||||
return request.postJson(
|
return request.postJson("/oil-refinery/xoilRefineryOrder/save", params);
|
||||||
"/oil-refinery/xoilRefineryOrder/save",
|
|
||||||
params
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
//查看企业产品
|
//查看企业产品
|
||||||
const getRefineryProductList = (params) => {
|
const getRefineryProductList = (params) => {
|
||||||
@@ -50,13 +50,13 @@ const getRefineryProductList = (params) => {
|
|||||||
params
|
params
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
//查看炼厂信息
|
// //查看炼厂信息
|
||||||
const findByEntity = (params) => {
|
// const findByEntity = (params) => {
|
||||||
return request.postJson(
|
// return request.postJson(
|
||||||
"/oil-refinery/xoilRefineryInfo/findByEntity",
|
// "/oil-refinery/xoilRefineryInfo/findByEntity",
|
||||||
params
|
// params
|
||||||
);
|
// );
|
||||||
};
|
// };
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
getByPage,
|
getByPage,
|
||||||
@@ -68,5 +68,5 @@ export default {
|
|||||||
getRefineryCompanyList,
|
getRefineryCompanyList,
|
||||||
orderSave,
|
orderSave,
|
||||||
getRefineryProductList,
|
getRefineryProductList,
|
||||||
findByEntity
|
// findByEntity
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ service.interceptors.request.use(
|
|||||||
const JSESSIONID = utils.uuid();
|
const JSESSIONID = utils.uuid();
|
||||||
config.headers["JSESSIONID"] = JSESSIONID;
|
config.headers["JSESSIONID"] = JSESSIONID;
|
||||||
config.headers["token"] = utils.bcrypt(JSESSIONID);
|
config.headers["token"] = utils.bcrypt(JSESSIONID);
|
||||||
|
config.headers['dataSources'] = 'WEB'
|
||||||
if (env === "development") {
|
if (env === "development") {
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in companyNatureTypeEnum"
|
v-for="(item, index) in companyNatureTypeEnum.slice(1)"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in auditMarkEnum"
|
v-for="(item, index) in auditMarkEnum.slice(1)"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@@ -300,7 +300,7 @@
|
|||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<add
|
<add
|
||||||
:controlWindows="controlWindows"
|
:controlWindows="controlWindows"
|
||||||
:companyNatureTypeEnum="companyNatureTypeEnum"
|
:companyNatureTypeEnum="companyNatureTypeEnum.slice(1)"
|
||||||
@closeWindow="search"
|
@closeWindow="search"
|
||||||
/>
|
/>
|
||||||
<!-- 认证 -->
|
<!-- 认证 -->
|
||||||
@@ -332,16 +332,17 @@
|
|||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
<template #companyNature>
|
<template #companyNature>
|
||||||
<p v-if="oilCompanyMatch[0]">
|
<p>
|
||||||
{{
|
<!-- {{
|
||||||
companyNatureEnum.find(
|
companyNatureTypeEnum.find(
|
||||||
(item) => item.value === oilCompanyMatch[0].companyNature
|
(item) => item.value === oilCompanyMatch[0].companyNature
|
||||||
).label
|
).label
|
||||||
}}
|
}} -->
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
<template #companyDockType>
|
<template #companyDockType>
|
||||||
<p>
|
<p v-if="oilCompanyMatch[0].companyDockType === null"></p>
|
||||||
|
<p v-else>
|
||||||
{{
|
{{
|
||||||
oilCompanyMatch[0].companyDockType == 0 ? "对接客户" : "平台客户"
|
oilCompanyMatch[0].companyDockType == 0 ? "对接客户" : "平台客户"
|
||||||
}}
|
}}
|
||||||
@@ -356,7 +357,7 @@
|
|||||||
<p>
|
<p>
|
||||||
{{
|
{{
|
||||||
auditMarkEnum.find(
|
auditMarkEnum.find(
|
||||||
(item) => item.value == oilCompanyMatch[0].enableMark
|
(item) => item.value == oilCompanyMatch[0].auditMark
|
||||||
).label
|
).label
|
||||||
}}
|
}}
|
||||||
</p>
|
</p>
|
||||||
@@ -386,7 +387,7 @@
|
|||||||
<template #accountState>
|
<template #accountState>
|
||||||
<p v-if="oilCompanyMatch[3]">
|
<p v-if="oilCompanyMatch[3]">
|
||||||
{{
|
{{
|
||||||
accountStatusEnum.find(
|
companyTypeEnum.find(
|
||||||
(item) => item.value === oilCompanyMatch[3].accountState
|
(item) => item.value === oilCompanyMatch[3].accountState
|
||||||
).label
|
).label
|
||||||
}}
|
}}
|
||||||
@@ -545,6 +546,10 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
auditMarkEnum: [
|
auditMarkEnum: [
|
||||||
|
{
|
||||||
|
value: null,
|
||||||
|
label: "",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "未提交",
|
label: "未提交",
|
||||||
value: "0",
|
value: "0",
|
||||||
@@ -567,6 +572,10 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
companyNatureTypeEnum: [
|
companyNatureTypeEnum: [
|
||||||
|
{
|
||||||
|
value: null,
|
||||||
|
label: "",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "零售客户",
|
label: "零售客户",
|
||||||
value: "0",
|
value: "0",
|
||||||
|
|||||||
@@ -104,13 +104,13 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons">
|
<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>
|
<el-button v-show="billData.orderInfo&&billData.orderInfo.orderStatus&&billData.orderInfo.orderStatus=='DELIVERING'" @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>
|
||||||
@@ -286,7 +286,6 @@ export default {
|
|||||||
order.billSave(this.billAddData).then(res=>{
|
order.billSave(this.billAddData).then(res=>{
|
||||||
if(res.code == 20000){
|
if(res.code == 20000){
|
||||||
this.billAddData.deliveryStatus = 'SUBMITED'
|
this.billAddData.deliveryStatus = 'SUBMITED'
|
||||||
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
|
||||||
@@ -305,14 +304,19 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.$emit('billOfLading',this.billAddData.orderId)
|
||||||
},
|
},
|
||||||
//更新提货单数据
|
//更新提货单数据
|
||||||
billListMeth(){
|
billListMeth(){
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
order.findDeliveryByOrderId(this.controlWindows.addInfo.id).then((res) => {
|
order.findDeliveryByOrderId(this.controlWindows.addInfo.id).then((res) => {
|
||||||
this.billData.list = res.data
|
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)
|
},200)
|
||||||
},
|
},
|
||||||
//删除提货单
|
//删除提货单
|
||||||
@@ -325,7 +329,6 @@ export default {
|
|||||||
this.billListMeth()
|
this.billListMeth()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.$set(this.billData.list,index,'')
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openDrawer() {
|
openDrawer() {
|
||||||
@@ -348,18 +351,34 @@ export default {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.$confirm('确定下单?', '提示', { type: 'success' }).then(() => {
|
let titleConfirm = ['是否确认订单已完成?','一旦确认,该订单无法再被提货,且未提货的金额将自行退回。']
|
||||||
let data={
|
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,
|
id:this.controlWindows.addInfo.id,
|
||||||
actQuantity:this.quantity,
|
actQuantity:this.quantity,
|
||||||
}
|
}
|
||||||
order.orderComplete(data).then((res) => {
|
order.orderComplete(data).then((res) => {
|
||||||
if (res.code === 20000) {
|
if (res.code === 20000) {
|
||||||
this.$message.success(res.msg);
|
this.$message.success(res.msg);
|
||||||
this.closeWindow();
|
this.closeWindow();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
judgeInterface(form) {
|
judgeInterface(form) {
|
||||||
// let { id } = this.controlWindows.addInfo;
|
// let { id } = this.controlWindows.addInfo;
|
||||||
@@ -371,7 +390,6 @@ export default {
|
|||||||
this.$emit("closeWindow");
|
this.$emit("closeWindow");
|
||||||
this.form = {};
|
this.form = {};
|
||||||
this.controlWindows.bill = false;
|
this.controlWindows.bill = false;
|
||||||
this.$refs.form.clearValidate();
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order">
|
<div class="order">
|
||||||
<div class="frame">
|
<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
|
<autocomplete
|
||||||
class="mr20"
|
class="mr20"
|
||||||
:params="parameter.params"
|
:params="parameter.params"
|
||||||
:config="configAutocomplete"
|
:config="configAutocomplete"
|
||||||
/>
|
/>
|
||||||
<!-- <el-select style="margin-right: 20px;" v-model="parameter.params.id" placeholder="用户名称" clearable>
|
<!-- <el-select style="margin-right: 20px;" v-model="parameter.params.id" placeholder="用户名称" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in refineryList"
|
v-for="item in refineryList"
|
||||||
@@ -56,13 +61,13 @@
|
|||||||
:data="tableData"
|
:data="tableData"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="id"
|
prop="id"
|
||||||
label="订单ID"
|
label="订单ID"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
minWidth="250"
|
minWidth="250"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="购方客户信息" minWidth="250">
|
<el-table-column label="购方客户信息" minWidth="250">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<p class="gray">
|
<p class="gray">
|
||||||
@@ -84,29 +89,44 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column prop="salePrice" label="价格" minWidth="90">
|
||||||
prop="salePrice" label="价格" minWidth="90">
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
<el-table-column prop="payStatus" label="支付状态" minWidth="120" show-overflow-tooltip>
|
prop="payStatus"
|
||||||
|
label="支付状态"
|
||||||
|
minWidth="120"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
<template slot-scope="{ row }">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="orderStatus" label="订单状态" minWidth="120">
|
<el-table-column prop="orderStatus" label="订单状态" minWidth="120">
|
||||||
<template slot-scope="{ row }">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="orderSerialNumber"
|
prop="orderSerialNumber"
|
||||||
label="订单提货量(实际/预约)"
|
label="订单提货量(实际/预约)"
|
||||||
minWidth="180"
|
minWidth="180"
|
||||||
>
|
>
|
||||||
<template slot-scope="{ row }">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@@ -116,7 +136,10 @@
|
|||||||
minWidth="180"
|
minWidth="180"
|
||||||
>
|
>
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<span>{{ row.actAmount|toNumberFixed}} / {{ row.preAmount|toNumberFixed }} 元</span>
|
<span
|
||||||
|
>{{ row.actAmount | toNumberFixed }} /
|
||||||
|
{{ row.preAmount | toNumberFixed }} 元</span
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="时间" minWidth="235">
|
<el-table-column label="时间" minWidth="235">
|
||||||
@@ -129,30 +152,71 @@
|
|||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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 }">
|
<template slot-scope="{ row }">
|
||||||
<el-link type="primary" :underline="false" @click="detail(row)"
|
<el-link type="primary" :underline="false" @click="detail(row)"
|
||||||
>详情</el-link
|
>详情</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-link
|
||||||
>
|
>
|
||||||
<el-popconfirm
|
<el-popconfirm
|
||||||
:title="row.orderStatus=='SUBMITED'?'是否确认订单锁定?':'是否确认下单?'"
|
:title="
|
||||||
|
row.orderStatus == 'SUBMITED'
|
||||||
|
? '是否确认订单锁定?'
|
||||||
|
: '是否确认下单?'
|
||||||
|
"
|
||||||
icon-color="red"
|
icon-color="red"
|
||||||
@confirm="Locked(row)"
|
@confirm="Locked(row)"
|
||||||
>
|
>
|
||||||
<el-link v-show="row.orderStatus=='SUBMITED'||row.orderStatus=='ORDER_LOCKED'" slot="reference" type="primary" :underline="false"
|
<el-link
|
||||||
>{{row.orderStatus=='SUBMITED'?'订单锁定':'下单确认'}}</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>
|
||||||
<el-popconfirm
|
<el-popconfirm
|
||||||
:title="row.orderStatus=='SUBMITED'||row.orderStatus=='ORDER_LOCKED'?'是否确认取消订单?':'是否确认退款?'"
|
:title="
|
||||||
|
row.orderStatus == 'SUBMITED' ||
|
||||||
|
row.orderStatus == 'ORDER_LOCKED'
|
||||||
|
? '是否确认取消订单?'
|
||||||
|
: '是否确认退款?'
|
||||||
|
"
|
||||||
icon-color="red"
|
icon-color="red"
|
||||||
@confirm="orderCencle(row)"
|
@confirm="orderCencle(row)"
|
||||||
>
|
>
|
||||||
<el-link v-show="row.orderStatus!=='CANCELED'&&row.payStatus!=='REFUNDED'" slot="reference" type="primary" :underline="false"
|
<el-link
|
||||||
>{{row.orderStatus=='SUBMITED'||row.orderStatus=='ORDER_LOCKED'?'订单取消':'订单退款'}}</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>
|
</el-popconfirm>
|
||||||
</template>
|
</template>
|
||||||
@@ -190,7 +254,11 @@
|
|||||||
</general-details>
|
</general-details>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
<!-- 提货单 -->
|
<!-- 提货单 -->
|
||||||
<billOfLading :billData="billData" :controlWindows="controlWindows" @closeWindow="handleCurrentChange" />
|
<billOfLading
|
||||||
|
:billData="billData"
|
||||||
|
:controlWindows="controlWindows"
|
||||||
|
@closeWindow="handleCurrentChange"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -204,20 +272,20 @@ import autocomplete from "components/autocomplete/index.vue";
|
|||||||
import billOfLading from "./components/billOfLading.vue";
|
import billOfLading from "./components/billOfLading.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
filters:{
|
filters: {
|
||||||
toNumberFixed(val){
|
toNumberFixed(val) {
|
||||||
if(val){
|
if (val) {
|
||||||
return Number(val).toFixed(2)
|
return Number(val).toFixed(2);
|
||||||
}else{return '--'}
|
} else {
|
||||||
}
|
return "--";
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
controlWindows: {
|
controlWindows: {
|
||||||
add: false,
|
add: false,
|
||||||
addInfo: {
|
addInfo: {},
|
||||||
|
|
||||||
},
|
|
||||||
detail: false,
|
detail: false,
|
||||||
bill: false,
|
bill: false,
|
||||||
},
|
},
|
||||||
@@ -231,7 +299,7 @@ export default {
|
|||||||
},
|
},
|
||||||
configAutocompleteLc: {
|
configAutocompleteLc: {
|
||||||
serveTarget: serve.findByEntity,
|
serveTarget: serve.findByEntity,
|
||||||
autocompleteKey: "name",
|
autocompleteKey: "refineryName",
|
||||||
labelKey: "refineryName",
|
labelKey: "refineryName",
|
||||||
valueKey: "id",
|
valueKey: "id",
|
||||||
placeholder: "炼厂名称",
|
placeholder: "炼厂名称",
|
||||||
@@ -262,7 +330,7 @@ export default {
|
|||||||
params: {},
|
params: {},
|
||||||
},
|
},
|
||||||
oilCompanyMatch: {},
|
oilCompanyMatch: {},
|
||||||
billData:[],
|
billData: [],
|
||||||
mappingData: [
|
mappingData: [
|
||||||
{
|
{
|
||||||
carTitle: "",
|
carTitle: "",
|
||||||
@@ -285,7 +353,7 @@ export default {
|
|||||||
generalDetails,
|
generalDetails,
|
||||||
billOfLading,
|
billOfLading,
|
||||||
autocomplete,
|
autocomplete,
|
||||||
productApi
|
productApi,
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -301,29 +369,43 @@ export default {
|
|||||||
this.getByPage();
|
this.getByPage();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
payTagType(val){
|
payTagType(val) {
|
||||||
switch(val){
|
switch (val) {
|
||||||
case 'PREPAID': return {label:'预支付',type:'info'}
|
case "PREPAID":
|
||||||
case 'PAYING': return {label:'支付中',type:'warning'}
|
return { label: "预支付", type: "info" };
|
||||||
case 'SUCCESS': return {label:'支付成功',type:'success',effect:'dark'}
|
case "PAYING":
|
||||||
case 'FAILURE': return {label:'支付失败',type:'danger',effect:'dark'}
|
return { label: "支付中", type: "warning" };
|
||||||
case 'CANCELED': return {label:'支付取消',type:'info'}
|
case "SUCCESS":
|
||||||
case 'REFUNDED': return {label:'退款成功',type:'danger',effect:'dark'}
|
return { label: "支付成功", type: "success", effect: "dark" };
|
||||||
case 'REFUNDING': return{label:'退款中',type:'warning'}
|
case "FAILURE":
|
||||||
case 'REFUNDFAIL': return{label:'退款失败',type:'info',effect:'dark'}
|
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){
|
orderTagType(val) {
|
||||||
switch(val){
|
switch (val) {
|
||||||
case 'SUBMITED': return {label:'订单提交 ',type:'info'}
|
case "SUBMITED":
|
||||||
case 'ORDER_LOCKED': return {label:'订单锁定',type:'warning'}
|
return { label: "订单提交 ", type: "info" };
|
||||||
case 'ORDER_SUCCESS': return {label:'下单成功',type:'success',effect:'dark'}
|
case "ORDER_LOCKED":
|
||||||
case 'DELIVERING': return {label:'提货中', type: ''}
|
return { label: "订单锁定", type: "warning" };
|
||||||
case 'COMPLETE': return {label:'订单完成',type:'success',effect:'dark'}
|
case "ORDER_SUCCESS":
|
||||||
case 'CANCELED': return {label:'订单取消',type:'info'}
|
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
|
// currentPage change
|
||||||
handleCurrentChange(page) {
|
handleCurrentChange(page) {
|
||||||
@@ -350,17 +432,19 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
//下单取消
|
//下单取消
|
||||||
orderCencle(row){
|
orderCencle(row) {
|
||||||
if(row.orderStatus=='SUBMITED'||row.orderStatus=='ORDER_LOCKED'){
|
if (row.orderStatus == "SUBMITED" || row.orderStatus == "ORDER_LOCKED") {
|
||||||
order.orderUpdate({id:row.id,orderStatus:'CANCELED'}).then((res) => {
|
order
|
||||||
if(res.code==20000){
|
.orderUpdate({ id: row.id, orderStatus: "CANCELED" })
|
||||||
this.getByPage()
|
.then((res) => {
|
||||||
}
|
if (res.code == 20000) {
|
||||||
});
|
this.getByPage();
|
||||||
}else{
|
}
|
||||||
order.orderRefund({id:row.id}).then((res) => {
|
});
|
||||||
if(res.code==20000){
|
} else {
|
||||||
this.getByPage()
|
order.orderRefund({ id: row.id }).then((res) => {
|
||||||
|
if (res.code == 20000) {
|
||||||
|
this.getByPage();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -371,16 +455,16 @@ export default {
|
|||||||
this.controlWindows.add = true;
|
this.controlWindows.add = true;
|
||||||
},
|
},
|
||||||
//提货单
|
//提货单
|
||||||
async billOfLading(row){
|
async billOfLading(row) {
|
||||||
this.controlWindows.addInfo.title = "";
|
this.controlWindows.addInfo.title = "";
|
||||||
await order.findDeliveryByOrderId(row.id).then((res) => {
|
await order.findDeliveryByOrderId(row.id).then((res) => {
|
||||||
this.billData.list = res.data
|
this.billData.list = res.data;
|
||||||
});
|
});
|
||||||
await order.findByOrderId(row.id).then((res) => {
|
await order.findByOrderId(row.id).then((res) => {
|
||||||
this.billData.orderInfo = res.data
|
this.billData.orderInfo = res.data;
|
||||||
});
|
});
|
||||||
this.controlWindows.addInfo = row
|
this.controlWindows.addInfo = row;
|
||||||
this.controlWindows.bill = true
|
this.controlWindows.bill = true;
|
||||||
},
|
},
|
||||||
//详情
|
//详情
|
||||||
detail(row) {
|
detail(row) {
|
||||||
@@ -389,16 +473,16 @@ export default {
|
|||||||
},
|
},
|
||||||
//订单锁定
|
//订单锁定
|
||||||
Locked(row) {
|
Locked(row) {
|
||||||
if(row.orderStatus=='SUBMITED'){
|
if (row.orderStatus == "SUBMITED") {
|
||||||
order.orderLock({id:row.id}).then((res) => {
|
order.orderLock({ id: row.id }).then((res) => {
|
||||||
if(res.code == 20000){
|
if (res.code == 20000) {
|
||||||
this.getByPage()
|
this.getByPage();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
order.orderSuccess({id:row.id}).then((res) => {
|
order.orderSuccess({ id: row.id }).then((res) => {
|
||||||
if(res.code == 20000){
|
if (res.code == 20000) {
|
||||||
this.getByPage()
|
this.getByPage();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in productTypeList"
|
v-for="(item, index) in productTypeList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.label"
|
:label="item"
|
||||||
:value="item.value"
|
:value="item"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -72,10 +72,14 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<el-form-item label="计量单位" prop="measurement">
|
<el-form-item label="计量单位" prop="measurement">
|
||||||
<el-input
|
<!-- <el-input
|
||||||
v-model="form.measurement"
|
v-model="form.measurement"
|
||||||
placeholder="请输入计量单位"
|
placeholder="请输入计量单位"
|
||||||
></el-input>
|
disabled
|
||||||
|
></el-input> -->
|
||||||
|
<el-radio-group v-model="form.measurement">
|
||||||
|
<el-radio :label="'吨'">吨</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="启用状态" prop="enableMark">
|
<el-form-item label="启用状态" prop="enableMark">
|
||||||
<el-radio-group v-model="form.enableMark">
|
<el-radio-group v-model="form.enableMark">
|
||||||
@@ -110,7 +114,9 @@ export default {
|
|||||||
else callback("请选择炼厂");
|
else callback("请选择炼厂");
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
form: {},
|
form: {
|
||||||
|
measurement: "吨",
|
||||||
|
},
|
||||||
refineryList: [],
|
refineryList: [],
|
||||||
configAutocomplete: {
|
configAutocomplete: {
|
||||||
serveTarget: refineryInfoServe.findByEntity,
|
serveTarget: refineryInfoServe.findByEntity,
|
||||||
@@ -125,24 +131,7 @@ export default {
|
|||||||
echoId: "",
|
echoId: "",
|
||||||
echoName: "",
|
echoName: "",
|
||||||
},
|
},
|
||||||
productTypeList: [
|
productTypeList: ["0#柴", "-10#柴", "92#汽", "95#汽"],
|
||||||
{
|
|
||||||
label: "0#柴",
|
|
||||||
value: "0#",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "-10#柴",
|
|
||||||
value: "-10#",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "92#汽",
|
|
||||||
value: "92#",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "95#汽",
|
|
||||||
value: "95#",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
rules: {
|
rules: {
|
||||||
productName: [
|
productName: [
|
||||||
{ required: true, message: "请输入产品名称", trigger: "blur" },
|
{ required: true, message: "请输入产品名称", trigger: "blur" },
|
||||||
@@ -205,6 +194,7 @@ export default {
|
|||||||
closeWindow() {
|
closeWindow() {
|
||||||
this.$emit("closeWindow");
|
this.$emit("closeWindow");
|
||||||
this.form = {};
|
this.form = {};
|
||||||
|
this.form.measurement = "吨";
|
||||||
this.controlWindows.addInfo = {};
|
this.controlWindows.addInfo = {};
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.autocomplete.list = [];
|
this.$refs.autocomplete.list = [];
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export default {
|
|||||||
};
|
};
|
||||||
let validatorSalePrice2company = (rule, value, callback) => {
|
let validatorSalePrice2company = (rule, value, callback) => {
|
||||||
if (!value || !+value) return callback("企业销售价不能为0或空");
|
if (!value || !+value) return callback("企业销售价不能为0或空");
|
||||||
if (value < this.form.floorPrice)
|
if (+value < +this.form.floorPrice)
|
||||||
return callback("企业销售价不能低于成本价");
|
return callback("企业销售价不能低于成本价");
|
||||||
callback();
|
callback();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,7 +10,14 @@
|
|||||||
<div class="create" v-if="controlWindows.create">
|
<div class="create" v-if="controlWindows.create">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="客户名称" prop="customerId">
|
<el-form-item label="客户名称" prop="customerId">
|
||||||
<el-select v-model="form.customerId" reserve-keyword remote :remote-method="customData" filterable placeholder="请选择客户">
|
<el-select
|
||||||
|
v-model="form.customerId"
|
||||||
|
reserve-keyword
|
||||||
|
remote
|
||||||
|
:remote-method="customData"
|
||||||
|
filterable
|
||||||
|
placeholder="请选择客户"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in customList"
|
v-for="(item, index) in customList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -38,17 +45,26 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="产品类型" prop="productType">
|
<el-form-item label="产品类型" prop="productType">
|
||||||
<!-- <autocomplete :params="form" :config="configAutocompleteCp" /> -->
|
<!-- <autocomplete :params="form" :config="configAutocompleteCp" /> -->
|
||||||
<el-select v-model="form.productType" @change="productChange" placeholder="请选择产品类型">
|
<el-select
|
||||||
|
v-model="form.productType"
|
||||||
|
@change="productChange"
|
||||||
|
placeholder="请选择产品类型"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in productTypeList"
|
v-for="(item, index) in productTypeList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.label"
|
:label="item"
|
||||||
:value="item.value"
|
:value="item"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="产品名称" prop="productId">
|
<el-form-item label="产品名称" prop="productId">
|
||||||
<el-select :disabled="rowCreate" v-model="form.productId" @change="productDataList" placeholder="请选择产品类型">
|
<el-select
|
||||||
|
:disabled="rowCreate"
|
||||||
|
v-model="form.productId"
|
||||||
|
@change="productDataList"
|
||||||
|
placeholder="请选择产品类型"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in productNameList"
|
v-for="(item, index) in productNameList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -71,7 +87,7 @@
|
|||||||
></el-input>
|
></el-input>
|
||||||
元/吨
|
元/吨
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="预约提货量">
|
<el-form-item prop="preQuantity" label="预约提货量">
|
||||||
<el-input
|
<el-input
|
||||||
maxlength="50"
|
maxlength="50"
|
||||||
v-model="form.preQuantity"
|
v-model="form.preQuantity"
|
||||||
@@ -80,11 +96,7 @@
|
|||||||
吨
|
吨
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="订单金额">
|
<el-form-item label="订单金额">
|
||||||
<el-input
|
<el-input maxlength="50" v-model="form.preAmount" disabled></el-input>
|
||||||
maxlength="50"
|
|
||||||
v-model="form.preAmount"
|
|
||||||
disabled
|
|
||||||
></el-input>
|
|
||||||
元
|
元
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -98,6 +110,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import serve from "api/product.js";
|
import serve from "api/product.js";
|
||||||
|
import refineryInfoServe from "api/refineryInfo.js";
|
||||||
|
|
||||||
import autocomplete from "components/autocomplete/index.vue";
|
import autocomplete from "components/autocomplete/index.vue";
|
||||||
export default {
|
export default {
|
||||||
@@ -108,38 +121,61 @@ export default {
|
|||||||
controlWindows: Object,
|
controlWindows: Object,
|
||||||
// refineryTypeEnum: Array,
|
// refineryTypeEnum: Array,
|
||||||
},
|
},
|
||||||
watch:{
|
watch: {
|
||||||
"form.salePrice": {
|
"form.salePrice": {
|
||||||
handler(n, o) {
|
handler(n, o) {
|
||||||
if(n){
|
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.productId": {
|
||||||
|
handler(n, o) {
|
||||||
|
if (n) {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"form.preQuantity": {
|
"form.preQuantity": {
|
||||||
handler(n, o) {
|
handler(n, o) {
|
||||||
if(n){
|
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);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
let validatorRefineryId = (rule, value, callback) => {
|
let validatorRefineryId = (rule, value, callback) => {
|
||||||
if (this.form.refineryId) callback();
|
if (this.form.refineryId) callback();
|
||||||
else callback("请选择炼厂");
|
else callback("请选择炼厂");
|
||||||
};
|
};
|
||||||
|
var validatePass = (rule, value, callback) => {
|
||||||
|
if (value==''||Number(value)<=0) {
|
||||||
|
callback(new Error('预约提货量不能为空或零'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
customList:[],
|
customList: [],
|
||||||
form: {
|
form: {
|
||||||
preAmount:0
|
preAmount: 0,
|
||||||
},
|
},
|
||||||
productNameList:[],
|
productNameList: [],
|
||||||
refineryList: [],
|
refineryList: [],
|
||||||
productRowData:{},
|
productRowData: {},
|
||||||
configAutocomplete: {
|
configAutocomplete: {
|
||||||
serveTarget: serve.findByEntity,
|
serveTarget: refineryInfoServe.findByEntity,
|
||||||
autocompleteKey: "refineryName",
|
autocompleteKey: {
|
||||||
|
key: "refineryName",
|
||||||
|
enableMark: "ENABLE",
|
||||||
|
},
|
||||||
labelKey: "refineryName",
|
labelKey: "refineryName",
|
||||||
valueKey: "id",
|
valueKey: "id",
|
||||||
placeholder: "炼厂名称",
|
placeholder: "炼厂名称",
|
||||||
@@ -147,25 +183,8 @@ export default {
|
|||||||
echoId: "",
|
echoId: "",
|
||||||
echoName: "",
|
echoName: "",
|
||||||
},
|
},
|
||||||
rowCreate:false,
|
rowCreate: false,
|
||||||
productTypeList: [
|
productTypeList: ["0#柴", "-10#柴", "92#汽", "95#汽"],
|
||||||
{
|
|
||||||
label: "0#柴",
|
|
||||||
value: "0#",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "-10#柴",
|
|
||||||
value: "-10#",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "92#汽",
|
|
||||||
value: "92#",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "95#汽",
|
|
||||||
value: "95#",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
rules: {
|
rules: {
|
||||||
customerId: [
|
customerId: [
|
||||||
{ required: true, message: "请输入客户名称", trigger: "blur" },
|
{ required: true, message: "请输入客户名称", trigger: "blur" },
|
||||||
@@ -179,6 +198,9 @@ export default {
|
|||||||
enableMark: [
|
enableMark: [
|
||||||
{ required: true, message: "请选择启用状态", trigger: "change" },
|
{ required: true, message: "请选择启用状态", trigger: "change" },
|
||||||
],
|
],
|
||||||
|
preQuantity:[
|
||||||
|
{ required: true, validator:validatePass, trigger: "blur" }
|
||||||
|
],
|
||||||
productType: [
|
productType: [
|
||||||
{ required: true, message: "请选择产品类型", trigger: "change" },
|
{ required: true, message: "请选择产品类型", trigger: "change" },
|
||||||
],
|
],
|
||||||
@@ -186,77 +208,64 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
productDataList(e){
|
|
||||||
console.log(e,'ppppppppppppppp')
|
|
||||||
this.productRowData = this.productNameList.filter(
|
|
||||||
(item) => item.id == e
|
|
||||||
);
|
|
||||||
this.form.salePrice = this.productRowData[0].salePrice2company
|
|
||||||
this.form.floorPrice = this.productRowData[0].floorPrice
|
|
||||||
this.form.productMeasurement = this.productRowData[0].measurement
|
|
||||||
},
|
|
||||||
productChange(){
|
|
||||||
this.productData()
|
|
||||||
},
|
|
||||||
//搜索炼厂
|
|
||||||
refineryData(value){
|
|
||||||
if (value) {
|
|
||||||
serve.findByEntity({refineryName:value}).then((res) => {
|
|
||||||
this.refineryList = res.data;
|
|
||||||
});
|
|
||||||
this.productData()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//搜索产品
|
|
||||||
async productData(){
|
|
||||||
let data = {
|
|
||||||
refineryId:this.form.refineryId,
|
|
||||||
productType:this.form.productType,
|
|
||||||
enableMark:'ENABLE'
|
|
||||||
}
|
|
||||||
await serve.getRefineryProductList(data).then((res) => {
|
|
||||||
if(res.data.length>0){
|
|
||||||
this.productNameList = res.data;
|
|
||||||
}else{
|
|
||||||
this.productNameList = []
|
|
||||||
this.form.productId = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
// this.form.productId = this.productNameList[0].productId
|
|
||||||
console.log(this.productRowData,this.productNameList,'aaaaaaaaaa')
|
|
||||||
},
|
|
||||||
//搜索客户
|
|
||||||
customData(value){
|
|
||||||
if (value) {
|
|
||||||
serve.getRefineryCompanyList({name:value}).then((res) => {
|
|
||||||
this.customList = res.data;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
openDrawer() {
|
openDrawer() {
|
||||||
this.form = {}
|
this.form = {};
|
||||||
let { id } = this.controlWindows.addInfo;
|
let { id } = this.controlWindows.addInfo;
|
||||||
if (id) {
|
if (id) {
|
||||||
//回显
|
//回显
|
||||||
this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
|
this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
|
||||||
this.configAutocomplete.echoId = id;
|
this.configAutocomplete.echoId = id;
|
||||||
this.configAutocomplete.echoName = this.form.refineryName;
|
this.configAutocomplete.echoName = this.form.refineryName;
|
||||||
this.form.salePrice = this.form.salePrice2company
|
this.form.salePrice = this.form.salePrice2company;
|
||||||
this.form.productId = this.form.id
|
this.form.productId = this.form.id;
|
||||||
delete this.form.id
|
// delete this.form.id;
|
||||||
this.rowCreate = true
|
this.rowCreate = true;
|
||||||
this.productChange()
|
this.productChange();
|
||||||
|
} else {
|
||||||
console.log("this.form", this.form);
|
this.rowCreate = false;
|
||||||
}else{
|
|
||||||
this.rowCreate = false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
productDataList(e) {
|
||||||
|
console.log(e,'******************')
|
||||||
|
this.productRowData = this.productNameList.filter((item) => item.id == e);
|
||||||
|
this.form.salePrice = this.productRowData[0].salePrice2company;
|
||||||
|
this.form.floorPrice = this.productRowData[0].floorPrice;
|
||||||
|
},
|
||||||
|
productChange() {
|
||||||
|
this.productData();
|
||||||
|
},
|
||||||
|
//搜索产品
|
||||||
|
async productData() {
|
||||||
|
let data = {
|
||||||
|
refineryId: this.form.refineryId,
|
||||||
|
productType: this.form.productType,
|
||||||
|
enableMark: "ENABLE",
|
||||||
|
};
|
||||||
|
await serve.getRefineryProductList(data).then((res) => {
|
||||||
|
if (res.data.length > 0) {
|
||||||
|
this.productNameList = res.data;
|
||||||
|
} else {
|
||||||
|
this.productNameList = [];
|
||||||
|
this.form.productId = "";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// this.form.productId = this.productNameList[0].productId
|
||||||
|
},
|
||||||
|
//搜索客户
|
||||||
|
customData(value) {
|
||||||
|
if (value) {
|
||||||
|
serve.getRefineryCompanyList({ name: value }).then((res) => {
|
||||||
|
this.customList = res.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.productDataList(this.form.productId);
|
||||||
|
this.form.productMeasurement = this.productRowData[0].measurement;
|
||||||
|
delete this.form.id;
|
||||||
this.judgeInterface(this.form).then((res) => {
|
this.judgeInterface(this.form).then((res) => {
|
||||||
if (res.code === 20000) {
|
if (res.code === 20000) {
|
||||||
this.$message.success(res.msg);
|
this.$message.success(res.msg);
|
||||||
@@ -269,16 +278,16 @@ export default {
|
|||||||
judgeInterface(form) {
|
judgeInterface(form) {
|
||||||
// let { id } = this.controlWindows.addInfo;
|
// let { id } = this.controlWindows.addInfo;
|
||||||
// if (id) return serve.update(form);
|
// if (id) return serve.update(form);
|
||||||
// else
|
// else
|
||||||
return serve.orderSave(form);
|
return serve.orderSave(form);
|
||||||
},
|
},
|
||||||
closeWindow() {
|
closeWindow() {
|
||||||
this.$emit("closeWindow");
|
this.$emit("closeWindow");
|
||||||
this.form = {};
|
this.form = {};
|
||||||
this.customList = []
|
this.customList = [];
|
||||||
this.controlWindows.addInfo = {};
|
this.controlWindows.addInfo = {};
|
||||||
this.configAutocomplete = {}
|
// this.configAutocomplete = {};
|
||||||
this.productNameList = []
|
this.productNameList = [];
|
||||||
this.$refs.form.clearValidate();
|
this.$refs.form.clearValidate();
|
||||||
this.controlWindows.create = false;
|
this.controlWindows.create = false;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in productTypeList"
|
v-for="(item, index) in productTypeList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.label"
|
:label="item"
|
||||||
:value="item.value"
|
:value="item"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
<!--新增产品 -->
|
<!--新增产品 -->
|
||||||
<add :controlWindows="controlWindows" @closeWindow="search" />
|
<add :controlWindows="controlWindows" @closeWindow="search" />
|
||||||
<!-- 下单 -->
|
<!-- 下单 -->
|
||||||
<create :controlWindows="controlWindows" @closeWindow="search" />
|
<create :controlWindows="controlWindows" @closeWindow="search" />
|
||||||
<!-- 调价记录 -->
|
<!-- 调价记录 -->
|
||||||
<record :controlWindows="controlWindows" />
|
<record :controlWindows="controlWindows" />
|
||||||
<!-- 批量 -->
|
<!-- 批量 -->
|
||||||
@@ -257,28 +257,11 @@ export default {
|
|||||||
batch: false,
|
batch: false,
|
||||||
adjust: false,
|
adjust: false,
|
||||||
},
|
},
|
||||||
productTypeList: [
|
productTypeList: ["0#柴", "-10#柴", "92#汽", "95#汽"],
|
||||||
{
|
|
||||||
label: "0#柴",
|
|
||||||
value: "0#",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "-10#柴",
|
|
||||||
value: "-10#",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "92#汽",
|
|
||||||
value: "92#",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "95#汽",
|
|
||||||
value: "95#",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
configAutocomplete: {
|
configAutocomplete: {
|
||||||
serveTarget: serve.findByEntity,
|
serveTarget: refineryInfoServe.findByEntity,
|
||||||
autocomplateKey: "refineryName",
|
autocompleteKey: "refineryName",
|
||||||
valueKey: "refineryName",
|
labelKey: "refineryName",
|
||||||
valueKey: "id",
|
valueKey: "id",
|
||||||
placeholder: "炼厂名称",
|
placeholder: "炼厂名称",
|
||||||
querykey: "refineryId",
|
querykey: "refineryId",
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<div class="table">
|
<div class="table">
|
||||||
<div class="operation">
|
<div class="operation">
|
||||||
<!-- <el-button @click="addition">新增炼厂账户</el-button> -->
|
<!-- <el-button @click="addition">新增炼厂账户</el-button> -->
|
||||||
<el-button @click="addition">充值</el-button>
|
<!-- <el-button @click="addition">充值</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-if="tableHeight"
|
v-if="tableHeight"
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
<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>
|
||||||
|
|||||||
Reference in New Issue
Block a user