Merge branch 'xiaozy_产品列表' of http://121.196.213.68:3000/xiaozhiyong/refinery-admin into lixuan
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
:title="controlWindows.addInfo.title"
|
||||
direction="ltr"
|
||||
size="40%"
|
||||
:visible="controlWindows.add"
|
||||
:visible.sync="controlWindows.add"
|
||||
@opened="openDrawer"
|
||||
:before-close="closeWindow"
|
||||
>
|
||||
@@ -175,11 +175,9 @@ export default {
|
||||
this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
|
||||
this.configAutocomplete.echoId = id;
|
||||
this.configAutocomplete.echoName = this.form.refineryName;
|
||||
console.log("this.form", this.form.floorPrice);
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
console.log("this.form", this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.judgeInterface(this.form).then((res) => {
|
||||
@@ -196,27 +194,7 @@ export default {
|
||||
if (id) return serve.update(form);
|
||||
else return serve.save(form);
|
||||
},
|
||||
//炼厂list
|
||||
// findByEntity() {
|
||||
// refineryServe.findByEntity().then((res) => {
|
||||
// this.refineryList = res.data;
|
||||
// });
|
||||
// },
|
||||
// 远程搜索
|
||||
// querySearchAsync(queryString, cb) {
|
||||
// if (queryString) {
|
||||
// refineryServe
|
||||
// .findByEntity({ refineryName: queryString })
|
||||
// .then((res) => {
|
||||
// let timeInstance = setTimeout(() => {
|
||||
// clearTimeout(timeInstance);
|
||||
// if (res.data.length) {
|
||||
// cb(res.data);
|
||||
// } else cb([]);
|
||||
// }, 1000 * Math.random());
|
||||
// });
|
||||
// } else cb([]);
|
||||
// },
|
||||
|
||||
closeWindow() {
|
||||
this.$emit("closeWindow");
|
||||
this.form = {};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="调价"
|
||||
:visible="controlWindows.adjust"
|
||||
:visible.sync="controlWindows.adjust"
|
||||
width="30%"
|
||||
:before-close="closeWindow"
|
||||
@opened="openDrawer"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="批量修改"
|
||||
:visible="controlWindows.batch"
|
||||
:visible.sync="controlWindows.batch"
|
||||
width="30%"
|
||||
:before-close="closeWindow"
|
||||
@opened="openDrawer"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
:title="controlWindows.addInfo.title"
|
||||
direction="ltr"
|
||||
size="40%"
|
||||
:visible="controlWindows.create"
|
||||
:visible.sync="controlWindows.create"
|
||||
@opened="openDrawer"
|
||||
:before-close="closeWindow"
|
||||
>
|
||||
@@ -226,13 +226,20 @@ export default {
|
||||
}
|
||||
},
|
||||
openDrawer() {
|
||||
this.form = {}
|
||||
let { id } = this.controlWindows.addInfo;
|
||||
if (id) {
|
||||
//回显
|
||||
this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
|
||||
this.configAutocomplete.echoId = id;
|
||||
this.configAutocomplete.echoName = this.form.refineryName;
|
||||
console.log("this.form", this.form.floorPrice);
|
||||
this.form.salePrice = this.form.salePrice2company
|
||||
this.productData()
|
||||
// this.productDataList(this.form.productName)
|
||||
this.productRowData = this.productNameList.filter(
|
||||
(item) => item.id == e
|
||||
);
|
||||
console.log("this.form", this.form,this.productRowData,this.productNameList);
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
@@ -278,6 +285,7 @@ export default {
|
||||
closeWindow() {
|
||||
this.$emit("closeWindow");
|
||||
this.form = {};
|
||||
this.controlWindows.addInfo = {};
|
||||
this.$refs.form.clearValidate();
|
||||
this.controlWindows.create = false;
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
title="调价记录"
|
||||
direction="ltr"
|
||||
size="60%"
|
||||
:visible="controlWindows.record"
|
||||
:visible.sync="controlWindows.record"
|
||||
:before-close="closeWindow"
|
||||
@opened="openDrawer"
|
||||
>
|
||||
|
||||
@@ -7,19 +7,8 @@
|
||||
placeholder="产品名称"
|
||||
clearable
|
||||
></el-input>
|
||||
|
||||
<!-- 炼厂名称 -->
|
||||
<autocomplete :params="parameter.params" :config="configAutocomplete" />
|
||||
|
||||
<!-- <el-autocomplete
|
||||
v-model="parameter.params.refineryName"
|
||||
:fetch-suggestions="querySearchAsync"
|
||||
@select="selectAutocomplete"
|
||||
value-key="refineryName"
|
||||
placeholder="炼厂名称"
|
||||
clearable
|
||||
@clear="parameter.params.refineryId = ''"
|
||||
></el-autocomplete> -->
|
||||
|
||||
<el-input
|
||||
v-model="parameter.params.belongLibrary"
|
||||
placeholder="所处炼厂库"
|
||||
@@ -181,7 +170,7 @@
|
||||
direction="ltr"
|
||||
size="60%"
|
||||
:withHeader="false"
|
||||
:visible="controlWindows.detail"
|
||||
:visible.sync="controlWindows.detail"
|
||||
>
|
||||
<general-details
|
||||
title="详情"
|
||||
@@ -211,6 +200,17 @@ import pagination from "components/pagination/index.vue";
|
||||
import generalDetails from "components/generalDetails/index.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
add,
|
||||
create,
|
||||
record,
|
||||
batch,
|
||||
adjust,
|
||||
|
||||
pagination,
|
||||
autocomplete,
|
||||
generalDetails,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
controlWindows: {
|
||||
@@ -264,17 +264,6 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
add,
|
||||
create,
|
||||
record,
|
||||
batch,
|
||||
adjust,
|
||||
|
||||
pagination,
|
||||
autocomplete,
|
||||
generalDetails,
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.heightHandle();
|
||||
@@ -303,25 +292,7 @@ export default {
|
||||
this.parameter.total = res.data.totalCount;
|
||||
});
|
||||
},
|
||||
// 远程搜索
|
||||
// querySearchAsync(queryString, cb) {
|
||||
// if (queryString) {
|
||||
// refineryServe
|
||||
// .findByEntity({ refineryName: queryString })
|
||||
// .then((res) => {
|
||||
// let timeInstance = setTimeout(() => {
|
||||
// clearTimeout(timeInstance);
|
||||
// if (res.data.length) {
|
||||
// console.log(res.data);
|
||||
// cb(res.data);
|
||||
// } else cb([]);
|
||||
// }, 1000 * Math.random());
|
||||
// });
|
||||
// } else cb([]);
|
||||
// },
|
||||
// selectAutocomplete(item) {
|
||||
// this.parameter.params.refineryId = item.id;
|
||||
// },
|
||||
|
||||
//新增
|
||||
addition() {
|
||||
this.controlWindows.addInfo.title = "产品新增";
|
||||
@@ -330,8 +301,10 @@ export default {
|
||||
|
||||
//下单
|
||||
createOrder(row) {
|
||||
this.controlWindows.addInfo = {}
|
||||
this.controlWindows.addInfo.title = "创建订单";
|
||||
this.controlWindows.create = true;
|
||||
console.log(this.controlWindows,'新增')
|
||||
},
|
||||
//修改订单
|
||||
updateCreate(row){
|
||||
@@ -340,6 +313,7 @@ export default {
|
||||
...row,
|
||||
};
|
||||
this.controlWindows.create = true;
|
||||
console.log('修改')
|
||||
},
|
||||
//详情
|
||||
detail(row) {
|
||||
@@ -392,12 +366,11 @@ export default {
|
||||
},
|
||||
//重置
|
||||
reset() {
|
||||
this.parameter = {
|
||||
Object.assign(this.parameter, {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
params: {},
|
||||
};
|
||||
});
|
||||
},
|
||||
// table height
|
||||
heightHandle() {
|
||||
|
||||
Reference in New Issue
Block a user