Compare commits
13 Commits
a44f29dec6
...
caolc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8753577bdf | ||
|
|
d8870ea6a0 | ||
| d50155cd95 | |||
|
|
992fb5ebc1 | ||
|
|
d031b27f49 | ||
| 42f06ace84 | |||
|
|
62eb5ecf81 | ||
|
|
10058dcc5d | ||
|
|
f9687b9e0f | ||
|
|
22c8d4d6dc | ||
|
|
29c97a4251 | ||
|
|
c501324ce0 | ||
| 107e67758c |
@@ -1,4 +1,4 @@
|
||||
ENV = 'development'
|
||||
|
||||
VUE_APP_BASE_API = '/api'
|
||||
VUE_APP_ENV = 'development'
|
||||
VUE_APP_ENV = 'production'
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"bcryptjs": "^2.4.3",
|
||||
"better-scroll": "1.8.0",
|
||||
"clipboard": "^2.0.11",
|
||||
"core-js": "3.6.5",
|
||||
"core-js": "^3.29.1",
|
||||
"crypto-js": "^4.1.1",
|
||||
"element-ui": "^2.15.12",
|
||||
"js-cookie": "2.2.0",
|
||||
|
||||
@@ -21,7 +21,7 @@ const save = (params) => {
|
||||
};
|
||||
// 修改
|
||||
const update = (params) => {
|
||||
return request.postPut(
|
||||
return request.putJson(
|
||||
"/oil-finance/oilCompanyAccountReverse/update",
|
||||
params
|
||||
);
|
||||
|
||||
@@ -15,6 +15,10 @@ const billSave = (params) => {
|
||||
const update = (params) => {
|
||||
return request.putJson("/oil-refinery/xoilRefineryDelivery/update", params);
|
||||
};
|
||||
//取消提货单
|
||||
const cancel = (params) => {
|
||||
return request.putJson("/oil-refinery/xoilRefineryOrder/update", params);
|
||||
};
|
||||
//查看订单信息
|
||||
const findByOrderId = (id) => {
|
||||
return request.get(`/oil-refinery/xoilRefineryDelivery/findByOrderId/${id}`);
|
||||
@@ -36,6 +40,7 @@ const orderLock = (params) => {
|
||||
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
getByPage,
|
||||
findDeliveryByOrderId,
|
||||
@@ -44,5 +49,6 @@ export default {
|
||||
update,
|
||||
deleteBill,
|
||||
orderSuccess,
|
||||
orderLock
|
||||
orderLock,
|
||||
cancel
|
||||
};
|
||||
|
||||
@@ -11,13 +11,31 @@
|
||||
:disabled="isDisabled"
|
||||
@change="change"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in list"
|
||||
:key="item.id + index"
|
||||
:label="item[config.labelKey]"
|
||||
:value="item[config.valueKey]"
|
||||
>
|
||||
</el-option>
|
||||
<template v-if="labelIsMore">
|
||||
<el-option
|
||||
v-for="(item, index) in list"
|
||||
:key="item.id + index"
|
||||
:label="
|
||||
item[config.labelKey[0]] +
|
||||
'(' +
|
||||
item[config.labelKey[1]] +
|
||||
'-' +
|
||||
item[config.labelKey[2]] +
|
||||
')'
|
||||
"
|
||||
:value="item[config.valueKey]"
|
||||
>
|
||||
</el-option>
|
||||
</template>
|
||||
<template>
|
||||
<el-option
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
:label="item[config.labelKey]"
|
||||
:value="item[config.valueKey]"
|
||||
>
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
@@ -37,6 +55,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
text: "",
|
||||
labelIsMore: false,
|
||||
// labelKeyArr:[],
|
||||
list: [],
|
||||
isDisabled: false,
|
||||
};
|
||||
@@ -44,48 +64,68 @@ export default {
|
||||
watch: {
|
||||
"config.echoId": {
|
||||
handler(nval, oval) {
|
||||
this.list = [];
|
||||
// this.isDisabled = !!this.config.isDisabled;
|
||||
if (nval) {
|
||||
this.remoteMethod(this.config.echoName);
|
||||
let resultName = this.config.echoName.replace(/\s*/g, "");
|
||||
if (!resultName) return;
|
||||
this.remoteMethod(resultName);
|
||||
}
|
||||
this.isDisabled = !!this.config.isDisabled;
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
"config.isDisabled": {
|
||||
handler(nval, oval) {
|
||||
let type = this.$utils.typeJudgment(nval);
|
||||
if (["Boolean", "String"].includes(type)) {
|
||||
this.isDisabled = !!this.config.isDisabled;
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
created() {
|
||||
let { labelKey } = this.config;
|
||||
let type = this.$utils.typeJudgment(labelKey);
|
||||
// console.log(type);
|
||||
if (type === "Array") {
|
||||
// let
|
||||
this.labelIsMore = true;
|
||||
// console.log(this.labelIsMore);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 远程搜索
|
||||
remoteMethod(query) {
|
||||
if (query !== "") {
|
||||
this.loading = true;
|
||||
let params = {};
|
||||
let type = this.$utils.typeJudgment(this.config.autocompleteKey);
|
||||
if (!type.includes("Object") && !type.includes("String")) return;
|
||||
|
||||
if (type.includes("Object")) {
|
||||
let params = {};
|
||||
if (["Object"].includes(type)) {
|
||||
params[this.config.autocompleteKey.key] = query;
|
||||
params["enableMark"] = this.config.autocompleteKey.enableMark;
|
||||
}
|
||||
if (type.includes("String")) {
|
||||
if (["String", "Undefined", "Null"].includes(type)) {
|
||||
// 接口为get类型时需将autocompleteKey值设为空
|
||||
this.config.autocompleteKey
|
||||
? (params[this.config.autocompleteKey] = query)
|
||||
: (params["queryTypeGet"] = query);
|
||||
: (params = query);
|
||||
}
|
||||
this.config.serveTarget(params).then((res) => {
|
||||
let timeInstance = setTimeout(() => {
|
||||
this.loading = false;
|
||||
clearTimeout(timeInstance);
|
||||
if (res.data.length) {
|
||||
this.list = res.data;
|
||||
} else this.list = [];
|
||||
}, 1000 * Math.random());
|
||||
this.loading = false;
|
||||
if (res.data.length) {
|
||||
this.list = res.data;
|
||||
} else this.list = [];
|
||||
});
|
||||
} else {
|
||||
this.list = [];
|
||||
}
|
||||
},
|
||||
change(val) {
|
||||
this.$emit("change", val);
|
||||
this.$emit("change", val, this.list);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -11,11 +11,7 @@
|
||||
<div class="generalDetails_card_container">
|
||||
<div v-for="(item, index) in dataPage" :key="index">
|
||||
<el-card class="generalDetails_card">
|
||||
<div
|
||||
@click="isShow(item)"
|
||||
class="generalDetails_card_header"
|
||||
slot="header"
|
||||
>
|
||||
<div @click="isShow(item)" class="generalDetails_card_header" slot="header">
|
||||
<div>
|
||||
<span class="generalDetails-card-header-icon">
|
||||
<svg-icon style="color: #118dde" :icon-class="item.iconClass" />
|
||||
@@ -25,30 +21,18 @@
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="fold">
|
||||
<i
|
||||
:style="{
|
||||
transform: `rotate(${item.isFold ? 0 : 180}deg)`,
|
||||
}"
|
||||
class="el-icon-arrow-down generalDetails_card_arrow_down"
|
||||
></i>
|
||||
<i :style="{
|
||||
transform: `rotate(${item.isFold ? 0 : 180}deg)`,
|
||||
}" class="el-icon-arrow-down generalDetails_card_arrow_down"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
:style="{ maxHeight: item.isFold ? '100vh' : '0px' }"
|
||||
class="my-cell"
|
||||
>
|
||||
<template
|
||||
v-if="item.listData.length && item.listData[0].field !== 'table'"
|
||||
>
|
||||
<div :style="{ maxHeight: item.isFold ? '100vh' : '0px' }" class="my-cell">
|
||||
<template v-if="item.listData.length && item.listData[0].field !== 'table'">
|
||||
<div v-for="(i, x) in item.listData" :key="x" class="cell-item">
|
||||
<span :title="i.remark" class="color-999 test-tst">
|
||||
{{ i.label }}
|
||||
<i v-if="i.remark" class="header-icon el-icon-info"></i>
|
||||
<i
|
||||
@click="isCopy($event)"
|
||||
v-if="i.isCopy"
|
||||
class="el-icon-document-copy"
|
||||
></i>
|
||||
<i @click="isCopy($event)" v-if="i.isCopy" class="el-icon-document-copy"></i>
|
||||
</span>
|
||||
<br />
|
||||
<slot class="inner-data" :name="`${i.field}`">
|
||||
@@ -126,7 +110,7 @@ export default {
|
||||
let value =
|
||||
(typeof carItem.value == "function" &&
|
||||
carItem.value(shineData)) ||
|
||||
shineData[carItem.value] == 0
|
||||
shineData[carItem.value] == 0
|
||||
? 0
|
||||
: shineData[carItem.value] || carItem.fieldDefault || "";
|
||||
return {
|
||||
@@ -172,6 +156,7 @@ export default {
|
||||
.title_bottom {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.fold {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import store from "@/store";
|
||||
import { mapGetters } from "vuex";
|
||||
import Breadcrumb from "@/components/Breadcrumb";
|
||||
import Hamburger from "@/components/Hamburger";
|
||||
@@ -47,6 +48,7 @@ export default {
|
||||
serve.loginOut().then((res) => {
|
||||
if (res.code === 20000) {
|
||||
localStorage.removeItem("customerToken");
|
||||
store.dispatch("user/remove");
|
||||
this.$router.push("/login");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -28,7 +28,6 @@ router.beforeEach(async (to, from, next) => {
|
||||
try {
|
||||
let infoRes = await serve.info();
|
||||
infoRes.data.authList = [1];
|
||||
|
||||
store.dispatch("user/info", infoRes.data);
|
||||
|
||||
let routerRes = await serve.getCustomerRouters();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
module.exports = {
|
||||
|
||||
title: 'Vue Admin Template',
|
||||
title: "油批客户管理系统",
|
||||
|
||||
/**
|
||||
* @type {boolean} true | false
|
||||
@@ -12,5 +11,5 @@ module.exports = {
|
||||
* @type {boolean} true | false
|
||||
* @description Whether show the logo in sidebar
|
||||
*/
|
||||
sidebarLogo: false
|
||||
}
|
||||
sidebarLogo: false,
|
||||
};
|
||||
|
||||
@@ -32,6 +32,10 @@ const actions = {
|
||||
commit("SET_NAME", data.name);
|
||||
commit("SET_COMPANYTYPE", data);
|
||||
},
|
||||
remove({ commit }, data) {
|
||||
commit("SET_AUTH", null);
|
||||
commit("SET_COMPANYTYPE", "");
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
@@ -52,7 +52,9 @@ export function isLicensePlate(no) {
|
||||
return instance.test(no);
|
||||
}
|
||||
|
||||
// 类型判断
|
||||
export function typeJudgment(object) {
|
||||
let res = {}.__proto__.toString.call(object);
|
||||
return res ? res : "";
|
||||
let type = /(?<= ).+(?=\])/.exec(res);
|
||||
return type.length ? type[0] : "";
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Vue from "vue";
|
||||
import axios from "axios";
|
||||
import utils from "@/utils/encode";
|
||||
import store from "@/store";
|
||||
//加密白名单
|
||||
const encryptWhite = [];
|
||||
const env = process.env.VUE_APP_ENV;
|
||||
@@ -21,6 +22,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;
|
||||
@@ -63,7 +65,8 @@ service.interceptors.response.use(
|
||||
if (res && res.code) {
|
||||
if (res.code === 42011) {
|
||||
Vue.prototype.$message.error(res.msg || "您的登录已失效,请重新登录");
|
||||
localStorage.removeItem("removeItem");
|
||||
localStorage.removeItem("customerToken");
|
||||
store.dispatch("user/remove");
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 1000);
|
||||
|
||||
@@ -145,6 +145,7 @@ export default {
|
||||
networkId,
|
||||
})
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res && res.code === 42014) {
|
||||
serve
|
||||
.getRefineryByCustomerId(this.loginForm.username)
|
||||
@@ -154,7 +155,6 @@ export default {
|
||||
});
|
||||
return;
|
||||
}
|
||||
console.log()
|
||||
localStorage.setItem("customerToken", res.data.accessToken);
|
||||
this.$router.replace("/");
|
||||
})
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
direction="ltr"
|
||||
size="40%"
|
||||
:visible="controlWindows.bill"
|
||||
@opened="openDrawer"
|
||||
:before-close="closeWindow"
|
||||
:show-close = false
|
||||
>
|
||||
<el-drawer direction="ltr" size="40%" :visible="controlWindows.bill" @opened="openDrawer" :before-close="closeWindow"
|
||||
:show-close=false>
|
||||
<div class="create" v-if="controlWindows.bill">
|
||||
<el-form label-width="100px">
|
||||
<div class="billTop">
|
||||
@@ -15,36 +9,37 @@
|
||||
<el-form-item label="订单信息">
|
||||
</el-form-item>
|
||||
<el-form-item label="提货单数量:">
|
||||
<span>{{billData.orderInfo.deliveryAccount}}</span>
|
||||
<span>{{ billData.orderInfo.deliveryAccount }}</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<div>
|
||||
<div class="billTop-top-left">
|
||||
<el-form-item label="预订数量:">
|
||||
<span>{{billData.orderInfo.preQuantity}}</span>
|
||||
<span>{{ billData.orderInfo.preQuantity }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单金额:">
|
||||
<span>{{billData.orderInfo.preAmount}}</span>
|
||||
<span>{{ billData.orderInfo.preAmount }}</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="billTop-top-left">
|
||||
<el-form-item label="已提数量:">
|
||||
<span>{{billData.orderInfo.alreadyQuantity}}</span>
|
||||
<span>{{ billData.orderInfo.alreadyQuantity }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="已提金额:">
|
||||
<span>{{billData.orderInfo.alreadyAmount}}</span>
|
||||
<span>{{ billData.orderInfo.alreadyAmount }}</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="billTop-top-left">
|
||||
<el-form-item label="剩余数量:">
|
||||
<span>{{billData.orderInfo.surplusQuantity}}</span>
|
||||
<span>{{ billData.orderInfo.surplusQuantity }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="剩余金额:">
|
||||
<span>{{billData.orderInfo.surplusAmount}}</span>
|
||||
<span>{{ billData.orderInfo.surplusAmount }}</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
@@ -55,12 +50,13 @@
|
||||
<el-button type="primary" @click="billAdd()">创建提货单</el-button>
|
||||
</div>
|
||||
<div class="" style="height: 58vh;overflow: auto;">
|
||||
<div class="billBottom-body" v-for="(item,index) in billData.list" :key="index">
|
||||
<div class="billBottom-body" v-for="(item, index) in billData.list" :key="index">
|
||||
<div class="billBottom-body-top">
|
||||
<el-form-item label="提货单">
|
||||
<span>{{item.id}}</span>
|
||||
<span>{{ item.id }}</span>
|
||||
</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 class="billBottom-body-middle">
|
||||
<div class="billBottom-body-middle-info">
|
||||
@@ -68,7 +64,7 @@
|
||||
<span>{{ item.preDeliveryQuantity }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="提货人">
|
||||
<span>{{item.driverName}}</span>
|
||||
<span>{{ item.driverName }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号">
|
||||
<span>{{ item.plateNumber }}</span>
|
||||
@@ -83,7 +79,8 @@
|
||||
</el-form-item>
|
||||
</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>
|
||||
<el-form-item label="创建时间">
|
||||
@@ -94,11 +91,16 @@
|
||||
</el-form-item>
|
||||
</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 :effect="orderTagType(item.deliveryStatus).effect" :disabled="item.deliveryStatus!=='SUBMITED'" @click="billAddSave(2,item)" :type="orderTagType(item.deliveryStatus).type1">{{orderTagType(item.deliveryStatus).info}}</el-button>
|
||||
<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>
|
||||
</el-form>
|
||||
@@ -107,10 +109,11 @@
|
||||
<el-button @click="controlWindows.bill = false">取消 </el-button>
|
||||
<!-- <el-button @click="submit">订单确认</el-button> -->
|
||||
</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-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 label="提货人" prop="driverName">
|
||||
<el-input v-model="billAddData.driverName"></el-input>
|
||||
@@ -129,12 +132,8 @@
|
||||
<!-- <el-button v-show="billTitle" type="primary" @click="billAddSave(2)">修改并锁定</el-button> -->
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
destroy-on-close
|
||||
title="提示"
|
||||
:close-on-click-modal="false" :append-to-body="true"
|
||||
:visible.sync="dialogDelivery"
|
||||
width="30%">
|
||||
<el-dialog destroy-on-close title="提示" :close-on-click-modal="false" :append-to-body="true"
|
||||
:visible.sync="dialogDelivery" width="30%">
|
||||
<el-form v-if="dialogDelivery">
|
||||
<el-form-item label="实际提货量" prop="plateNumber">
|
||||
<el-input v-model="deliveryQuantity"></el-input>
|
||||
@@ -158,9 +157,9 @@ export default {
|
||||
components: {
|
||||
autocomplete,
|
||||
},
|
||||
filters:{
|
||||
orderTagType(val){
|
||||
switch(val){
|
||||
filters: {
|
||||
orderTagType(val) {
|
||||
switch (val) {
|
||||
case 'SUBMITED': return '订单提交'
|
||||
case 'ORDER_LOCKED': return '订单锁定'
|
||||
case 'ORDER_SUCCESS': return '下单成功'
|
||||
@@ -168,29 +167,29 @@ export default {
|
||||
case 'COMPLETE': return '提货单完成'
|
||||
case 'CANCELED': return '订单取消'
|
||||
}
|
||||
return {label:val?val:'暂无数据',type:'info'}
|
||||
return { label: val ? val : '暂无数据', type: 'info' }
|
||||
},
|
||||
},
|
||||
props: {
|
||||
controlWindows: Object,
|
||||
billData:Array
|
||||
billData: Array
|
||||
// refineryTypeEnum: Array,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
billTitle:'',
|
||||
quantity:'',
|
||||
deliveryQuantity:'',
|
||||
dialogDelivery:false,
|
||||
customList:[],
|
||||
billTitle: '',
|
||||
quantity: '',
|
||||
deliveryQuantity: '',
|
||||
dialogDelivery: false,
|
||||
customList: [],
|
||||
form: {
|
||||
actAmount:0
|
||||
actAmount: 0
|
||||
},
|
||||
billAddData:{},
|
||||
dialogBillAdd:false,
|
||||
productNameList:[],
|
||||
billAddData: {},
|
||||
dialogBillAdd: false,
|
||||
productNameList: [],
|
||||
refineryList: [],
|
||||
productRowData:{},
|
||||
productRowData: {},
|
||||
configAutocomplete: {
|
||||
serveTarget: refineryInfoServe.findByEntity,
|
||||
autocompleteKey: "refineryName",
|
||||
@@ -217,110 +216,126 @@ export default {
|
||||
},
|
||||
};
|
||||
},
|
||||
created(){
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
billdelivery(){
|
||||
this.billAddData.deliveryStatus = 'COMPLETE'
|
||||
this.billAddData.accDeliveryQuantity = this.deliveryQuantity
|
||||
order.update(this.billAddData).then(res=>{
|
||||
if(res.code == 20000){
|
||||
this.billListMeth()
|
||||
// this.$set(this.billData.list,this.billData.index,this.billAddData)
|
||||
this.$message.success(res.msg)
|
||||
this.dialogDelivery = false
|
||||
}
|
||||
})
|
||||
billdelivery() {
|
||||
this.billAddData.deliveryStatus = 'COMPLETE'
|
||||
this.billAddData.accDeliveryQuantity = this.deliveryQuantity
|
||||
order.update(this.billAddData).then(res => {
|
||||
if (res.code == 20000) {
|
||||
this.billListMeth()
|
||||
// this.$set(this.billData.list,this.billData.index,this.billAddData)
|
||||
this.$message.success(res.msg)
|
||||
this.dialogDelivery = false;
|
||||
console.log('更新前',this.billData)
|
||||
this.$emit('billOfLading', this.billData, 2);
|
||||
this.$forceUpdate()
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
billSubmit(e,index){
|
||||
if(e.deliveryStatus=='PLATENUM_SUCCESS'){
|
||||
billSubmit(e, index) {
|
||||
if (e.deliveryStatus == 'PLATENUM_SUCCESS') {
|
||||
this.billAddData = JSON.parse(JSON.stringify(e))
|
||||
this.billData.index = index
|
||||
this.dialogDelivery = true
|
||||
}else if(e.deliveryStatus=='PLATENUM_LOCKED'){
|
||||
} else if (e.deliveryStatus == 'PLATENUM_LOCKED') {
|
||||
this.billAddData = JSON.parse(JSON.stringify(e))
|
||||
this.billAddData.deliveryStatus = 'PLATENUM_SUCCESS'
|
||||
this.$confirm('是否确认?', '提示', { type: 'info' }).then(() => {
|
||||
console.log(this.billData.list,index,this.billAddData,'aaaaaaaaaaa')
|
||||
order.update(this.billAddData).then(res=>{
|
||||
if(res.code == 20000){
|
||||
console.log(this.billData.list, index, this.billAddData, 'aaaaaaaaaaa')
|
||||
order.update(this.billAddData).then(res => {
|
||||
if (res.code == 20000) {
|
||||
this.billListMeth()
|
||||
// this.$set(this.billData.list,index,this.billAddData)
|
||||
this.$message.success(res.msg)
|
||||
this.dialogBillAdd = false
|
||||
this.dialogBillAdd = false;
|
||||
this.$emit('billOfLading', this.billData, 2)
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
orderTagType(val){
|
||||
switch(val){
|
||||
case 'SUBMITED': return {orderLabel:'订单提交',label:'等待信息',info:'锁定提货信息',type:'warning',type1:'',orderType:'warning',}
|
||||
case 'PLATENUM_LOCKED': return {orderLabel:'下单中',label:'信息锁定',info:'信息待确认',type:'info',type1:'info',orderType:'warning'}
|
||||
case 'PLATENUM_SUCCESS': return {orderLabel:'下单成功',label:'提货中',info:'提货中',type:'',type1:'info',orderType:''}
|
||||
case 'DELIVERING': return {orderLabel:'提货中',label:'提货中', type: '',orderType:'info'}
|
||||
case 'COMPLETE': return {orderLabel:'订单完成',label:'提货完成',info:'提货完成',type:'success',type1:'info',orderType:'success'}
|
||||
case 'CANCELED': return {orderLabel:'订单取消',label:'订单取消',info:'订单取消',type:'info',type1:'dark',orderType:'info'}
|
||||
orderTagType(val) {
|
||||
switch (val) {
|
||||
case 'SUBMITED': return { orderLabel: '订单提交', label: '等待信息', info: '锁定提货信息', type: 'warning', type1: '', orderType: 'warning', }
|
||||
case 'PLATENUM_LOCKED': return { orderLabel: '下单中', label: '信息锁定', info: '信息待确认', type: 'info', type1: 'info', orderType: 'warning' }
|
||||
case 'PLATENUM_SUCCESS': return { orderLabel: '下单成功', label: '提货中', info: '提货中', type: '', type1: 'info', orderType: '' }
|
||||
case 'DELIVERING': return { orderLabel: '提货中', label: '提货中', type: '', orderType: 'info' }
|
||||
case 'COMPLETE': return { orderLabel: '订单完成', label: '提货完成', info: '提货完成', type: 'success', type1: 'info', orderType: 'success' }
|
||||
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' }
|
||||
},
|
||||
//创建修改提货单弹窗
|
||||
billAdd(e,index){
|
||||
this.billTitle = e?true:false
|
||||
this.billAddData = e?JSON.parse(JSON.stringify(e)):{}
|
||||
billAdd(e, index) {
|
||||
this.billTitle = e ? true : false
|
||||
this.billAddData = e ? JSON.parse(JSON.stringify(e)) : {}
|
||||
this.billData.index = index
|
||||
this.dialogBillAdd = true
|
||||
},
|
||||
//创建修改提货单
|
||||
billAddSave(e,item){
|
||||
if(!e){
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.billAddData.orderId=this.controlWindows.addInfo.id
|
||||
this.billAddData.productMeasurement=this.controlWindows.addInfo.productMeasurement
|
||||
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
|
||||
}
|
||||
})}})
|
||||
}else{
|
||||
this.$confirm('确定锁定提货单?', '提示', { type: 'error' }).then(() => {
|
||||
this.billAddData = item?JSON.parse(JSON.stringify(item)):{}
|
||||
this.billAddData.deliveryStatus = e==2?'PLATENUM_LOCKED':''
|
||||
order.update(this.billAddData).then(res=>{
|
||||
if(res.code == 20000){
|
||||
this.billListMeth()
|
||||
this.$message.success(res.msg)
|
||||
this.dialogBillAdd = false
|
||||
}
|
||||
})
|
||||
async billAddSave(e, item) {
|
||||
if (!e) {
|
||||
this.$refs["form"].validate( async (valid) => {
|
||||
if (valid) {
|
||||
this.billAddData.orderId = this.controlWindows.addInfo.id
|
||||
this.billAddData.productMeasurement = this.controlWindows.addInfo.productMeasurement
|
||||
await 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;
|
||||
this.$emit('billOfLading', this.billData.orderInfo, 2)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$confirm(`确定${e == 1 ? '修改' : '锁定'}提货单?`, '提示', { type: 'error' }).then( async () => {
|
||||
// this.billAddData = item ? JSON.parse(JSON.stringify(item)) : {};
|
||||
this.billAddData.deliveryStatus = e == 2 ? 'PLATENUM_LOCKED' : '';
|
||||
console.log(this.billAddData, 'this.billAddData')
|
||||
await order.update(this.billAddData).then(res => {
|
||||
if (res.code == 20000) {
|
||||
this.billListMeth()
|
||||
this.$message.success(res.msg)
|
||||
this.dialogBillAdd = false;
|
||||
this.$emit('billOfLading', this.billData.orderInfo, 2)
|
||||
}
|
||||
})
|
||||
})
|
||||
};
|
||||
console.log('代码底部');
|
||||
|
||||
},
|
||||
//更新提货单数据
|
||||
billListMeth(){
|
||||
setTimeout(()=>{
|
||||
billListMeth() {
|
||||
setTimeout(() => {
|
||||
order.findDeliveryByOrderId(this.controlWindows.addInfo.id).then((res) => {
|
||||
this.billData.list = res.data
|
||||
this.$forceUpdate()
|
||||
this.$forceUpdate()
|
||||
});
|
||||
},200)
|
||||
}, 200)
|
||||
},
|
||||
//删除提货单
|
||||
billDelete(e,index){
|
||||
billDelete(e, index) {
|
||||
this.$confirm('确定删除提货单?', '提示', { type: 'error' }).then(() => {
|
||||
order.deleteBill({id:e.id}).then(res=>{
|
||||
if(res.code == 20000){
|
||||
order.deleteBill({ id: e.id }).then(res => {
|
||||
if (res.code == 20000) {
|
||||
this.$message.success(res.msg)
|
||||
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, '')
|
||||
})
|
||||
},
|
||||
openDrawer() {
|
||||
@@ -339,18 +354,18 @@ export default {
|
||||
this.quantity += element.accDeliveryQuantity
|
||||
});
|
||||
this.$confirm('确定下单?', '提示', { type: 'success' }).then(() => {
|
||||
let data={
|
||||
id:this.controlWindows.addInfo.id,
|
||||
actQuantity:this.quantity,
|
||||
customerId:this.controlWindows.addInfo.customerId
|
||||
let data = {
|
||||
id: this.controlWindows.addInfo.id,
|
||||
actQuantity: this.quantity,
|
||||
customerId: this.controlWindows.addInfo.customerId
|
||||
}
|
||||
order.orderSuccess(data).then((res) => {
|
||||
if (res.code === 20000) {
|
||||
this.$message.success(res.msg);
|
||||
this.closeWindow();
|
||||
}
|
||||
});
|
||||
})
|
||||
if (res.code === 20000) {
|
||||
this.$message.success(res.msg);
|
||||
this.closeWindow();
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
judgeInterface(form) {
|
||||
// let { id } = this.controlWindows.addInfo;
|
||||
@@ -371,6 +386,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.create {
|
||||
padding: 40px;
|
||||
|
||||
.el-input,
|
||||
.el-select,
|
||||
.el-textarea,
|
||||
@@ -378,6 +394,7 @@ export default {
|
||||
width: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
@@ -389,61 +406,78 @@ export default {
|
||||
line-height: 80px;
|
||||
text-align: right;
|
||||
border-top: 1px solid #f2f3f5;
|
||||
|
||||
.el-button {
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
.billTop{
|
||||
|
||||
.billTop {
|
||||
background: #f0f0f0;
|
||||
padding: 15px 35px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.billTop-top,.billBottom-title,.billBottom-body-top,.billBottom-body-bottom{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.billTop-top,
|
||||
.billBottom-title,
|
||||
.billBottom-body-top,
|
||||
.billBottom-body-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.billTop-top-left {
|
||||
display: flex;
|
||||
|
||||
::v-deep .el-form-item {
|
||||
margin-bottom: 0
|
||||
}
|
||||
.billTop-top-left{
|
||||
display: flex;
|
||||
::v-deep .el-form-item{
|
||||
margin-bottom:0
|
||||
}
|
||||
}
|
||||
.billBottom{
|
||||
.billBottom-title{
|
||||
align-items: center;
|
||||
margin: 20px 0;
|
||||
}
|
||||
}
|
||||
.billBottom-body-middle {
|
||||
::v-deep .el-form-item{
|
||||
margin-bottom:0
|
||||
}
|
||||
.billBottom-body-middle-info{
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
.billBottom-body{
|
||||
padding: 20px;
|
||||
box-shadow: 0 1px 4px rgba(0,21,41,.50);
|
||||
margin: 25px 0px;
|
||||
}
|
||||
.billBottom-body-bottom{
|
||||
::v-deep .el-form-item{
|
||||
margin-bottom:0
|
||||
}
|
||||
}
|
||||
|
||||
.billBottom {
|
||||
.billBottom-title {
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
::v-deep .el-drawer__header{
|
||||
}
|
||||
|
||||
.billBottom-body-middle {
|
||||
::v-deep .el-form-item {
|
||||
margin-bottom: 0
|
||||
}
|
||||
|
||||
.billBottom-body-middle-info {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.billBottom-body {
|
||||
padding: 20px;
|
||||
box-shadow: 0 1px 4px rgba(0, 21, 41, .50);
|
||||
margin: 25px 0px;
|
||||
}
|
||||
|
||||
.billBottom-body-bottom {
|
||||
::v-deep .el-form-item {
|
||||
margin-bottom: 0
|
||||
}
|
||||
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
::v-deep .el-drawer__header {
|
||||
display: none;
|
||||
}
|
||||
::v-deep .billBottom .el-form-item__label{
|
||||
|
||||
::v-deep .billBottom .el-form-item__label {
|
||||
line-height: 20px;
|
||||
color: #999;
|
||||
}
|
||||
::v-deep .billBottom .el-form-item__content{
|
||||
|
||||
::v-deep .billBottom .el-form-item__content {
|
||||
line-height: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
<el-popconfirm
|
||||
title="是否确认取消订单?"
|
||||
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
|
||||
@@ -192,7 +192,7 @@
|
||||
</general-details>
|
||||
</el-drawer>
|
||||
<!-- 提货单 -->
|
||||
<billOfLading :billData="billData" :controlWindows="controlWindows" @closeWindow="handleCurrentChange" />
|
||||
<billOfLading @billOfLading="billOfLading" :billData="billData" :controlWindows="controlWindows" @closeWindow="handleCurrentChange" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -253,7 +253,8 @@ export default {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
params: {},
|
||||
params: {
|
||||
},
|
||||
},
|
||||
oilCompanyMatch: {},
|
||||
billData:[],
|
||||
@@ -335,6 +336,7 @@ export default {
|
||||
},
|
||||
//table list
|
||||
getByPage() {
|
||||
this.parameter.params.customerId=this.$store.state.user.companyId
|
||||
order.getByPage(this.parameter).then((res) => {
|
||||
this.tableData = res.data.list;
|
||||
this.total = res.data.totalCount;
|
||||
@@ -352,14 +354,19 @@ export default {
|
||||
this.controlWindows.add = true;
|
||||
},
|
||||
//提货单
|
||||
async billOfLading(row){
|
||||
async billOfLading(row,selectIndex){
|
||||
this.controlWindows.addInfo.title = "";
|
||||
await order.findDeliveryByOrderId(row.id).then((res) => {
|
||||
if(!selectIndex||selectIndex==1){
|
||||
await order.findDeliveryByOrderId(row.id).then((res) => {
|
||||
this.billData.list = res.data
|
||||
});
|
||||
await order.findByOrderId(row.id).then((res) => {
|
||||
this.billData.orderInfo = res.data
|
||||
}
|
||||
if(!selectIndex||selectIndex==2){
|
||||
await order.findByOrderId(row.id).then((res) => {
|
||||
console.log('更新',res)
|
||||
this.billData.orderInfo = Object.assign(res.data,{id:row.id})
|
||||
});
|
||||
}
|
||||
this.controlWindows.addInfo = row
|
||||
this.controlWindows.bill = true
|
||||
},
|
||||
@@ -369,8 +376,11 @@ export default {
|
||||
this.controlWindows.detail = true;
|
||||
},
|
||||
//订单锁定
|
||||
deleteRow(row) {
|
||||
order.orderLock({id:row.id}).then((res) => {
|
||||
deleteRow(row,type) {
|
||||
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){
|
||||
this.getByPage()
|
||||
}
|
||||
|
||||
@@ -107,14 +107,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)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<autocomplete :params="parameter.params" :config="configAutocomplete" />
|
||||
<!-- <el-input
|
||||
v-model="parameter.params.belongLibrary"
|
||||
@@ -72,12 +73,6 @@
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="productType" label="产品类型"> </el-table-column>
|
||||
<el-table-column
|
||||
prop="productType"
|
||||
label="产品类型"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="refineryName"
|
||||
label="炼厂名称"
|
||||
@@ -109,7 +104,9 @@
|
||||
<template slot-scope="{ row }">
|
||||
<span class="el-dropdown-link" @click="detail(row)">详情</span>
|
||||
|
||||
<span class="el-dropdown-link" @click="updateCreate(row)">下单</span>
|
||||
<span class="el-dropdown-link" @click="updateCreate(row)"
|
||||
>下单</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -187,7 +184,7 @@ export default {
|
||||
],
|
||||
configAutocomplete: {
|
||||
serveTarget: serve.findByEntity,
|
||||
autocomplateKey: "name",
|
||||
autocompleteKey: "refineryName",
|
||||
valueKey: "refineryName",
|
||||
placeholder: "炼厂名称",
|
||||
querykey: "refineryId",
|
||||
@@ -241,26 +238,27 @@ export default {
|
||||
},
|
||||
//table list
|
||||
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.parameter.total = res.data.totalCount;
|
||||
});
|
||||
},
|
||||
//下单
|
||||
createOrder(row) {
|
||||
this.controlWindows.addInfo = {}
|
||||
this.controlWindows.addInfo = {};
|
||||
this.controlWindows.addInfo.title = "创建订单";
|
||||
this.controlWindows.create = true;
|
||||
console.log(this.controlWindows,'新增')
|
||||
console.log(this.controlWindows, "新增");
|
||||
},
|
||||
//修改订单
|
||||
updateCreate(row){
|
||||
updateCreate(row) {
|
||||
this.controlWindows.addInfo = {
|
||||
title: "创建订单",
|
||||
...row,
|
||||
};
|
||||
this.controlWindows.create = true;
|
||||
console.log('修改')
|
||||
title: "创建订单",
|
||||
...row,
|
||||
};
|
||||
this.controlWindows.create = true;
|
||||
console.log("修改");
|
||||
},
|
||||
//详情
|
||||
detail(row) {
|
||||
|
||||
@@ -30,7 +30,7 @@ module.exports = {
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
// target: `https://3816t6291y.oicp.vip`,
|
||||
// target: 'https://6l438d1757.zicp.fun',
|
||||
target: "http://192.168.0.23:38080",
|
||||
target: "http://uat.xingoil.com/adminapi",
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
["^" + process.env.VUE_APP_BASE_API]: "",
|
||||
|
||||
Reference in New Issue
Block a user