diff --git a/src/api/product.js b/src/api/product.js index 59a448c..843b606 100644 --- a/src/api/product.js +++ b/src/api/product.js @@ -32,6 +32,31 @@ const modifyPrice = (params) => { params ); }; +// 搜索客户 +const getRefineryCompanyList = (params) => { + return request.postJson("/oil-user/oilCompanyInfo/getLikeByCompanyType", params); +}; +// 下单 +const orderSave = (params) => { + return request.postJson( + "/oil_refinery/xoilRefineryOrder/save", + params + ); +}; +//查看企业产品 +const getRefineryProductList = (params) => { + return request.postJson( + "/oil-refinery/oilRefineryProduct/getRefineryProductList", + params + ); +}; +//查看炼厂信息 +const findByEntity = (params) => { + return request.postJson( + "/oil-refinery/xoilRefineryInfo/findByEntity", + params + ); +}; export default { getByPage, @@ -40,4 +65,8 @@ export default { getByPageRecord, updateBatchEnable, modifyPrice, + getRefineryCompanyList, + orderSave, + getRefineryProductList, + findByEntity }; diff --git a/src/views/order/index.vue b/src/views/order/index.vue index 60265f6..70cbb99 100644 --- a/src/views/order/index.vue +++ b/src/views/order/index.vue @@ -1,7 +1,379 @@ - + - + diff --git a/src/views/product/components/create.vue b/src/views/product/components/create.vue index 08bfa40..f7679a2 100644 --- a/src/views/product/components/create.vue +++ b/src/views/product/components/create.vue @@ -10,14 +10,22 @@
- + + + - + - + - + - + 元/吨 - + + + +
@@ -78,6 +93,7 @@ export default { }, data() { return { + customList:[], form: {}, refineryList: [], productTypeList: [ @@ -115,9 +131,33 @@ export default { }; }, created() { - this.findByEntity(); + // this.findByEntity(); }, methods: { + //搜索炼厂 + refineryData(value){ + if (value) { + serve.findByEntity({refineryName:value}).then((res) => { + this.refineryList = res.data; + }); + } + }, + //搜索产品 + productData(value){ + if (value) { + serve.getRefineryProductList({productType:value}).then((res) => { + this.customList = res.data; + }); + } + }, + //搜索客户 + customData(value){ + if (value) { + serve.getRefineryCompanyList({name:value}).then((res) => { + this.customList = res.data; + }); + } + }, openDrawer() {}, submit() { this.$refs["form"].validate((valid) => { @@ -137,11 +177,11 @@ export default { else return serve.save(form); }, //炼厂list - findByEntity() { - refineryServe.findByEntity().then((res) => { - this.refineryList = res.data; - }); - }, + // findByEntity() { + // refineryServe.findByEntity().then((res) => { + // this.refineryList = res.data; + // }); + // }, closeWindow() { this.$emit("closeWindow"); this.form = {};