pull/9/head
xiaozhiyong 2 years ago
parent 8d4e877949
commit 5f73c912e1
  1. 26
      src/api/product.js
  2. 16
      src/views/product/components/create.vue
  3. 2
      src/views/product/index.vue

@ -34,15 +34,15 @@ const modifyPrice = (params) => {
};
// 搜索客户
const getRefineryCompanyList = (params) => {
return request.postJson("/oil-user/oilCompanyInfo/getLikeByCompanyType", params);
};
// 下单
const orderSave = (params) => {
return request.postJson(
"/oil-refinery/xoilRefineryOrder/save",
"/oil-user/oilCompanyInfo/getLikeByCompanyType",
params
);
};
// 下单
const orderSave = (params) => {
return request.postJson("/oil-refinery/xoilRefineryOrder/save", params);
};
//查看企业产品
const getRefineryProductList = (params) => {
return request.postJson(
@ -50,13 +50,13 @@ const getRefineryProductList = (params) => {
params
);
};
//查看炼厂信息
const findByEntity = (params) => {
return request.postJson(
"/oil-refinery/xoilRefineryInfo/findByEntity",
params
);
};
// //查看炼厂信息
// const findByEntity = (params) => {
// return request.postJson(
// "/oil-refinery/xoilRefineryInfo/findByEntity",
// params
// );
// };
export default {
getByPage,
@ -68,5 +68,5 @@ export default {
getRefineryCompanyList,
orderSave,
getRefineryProductList,
findByEntity
// findByEntity
};

@ -110,6 +110,7 @@
<script>
import serve from "api/product.js";
import refineryInfoServe from "api/refineryInfo.js";
import autocomplete from "components/autocomplete/index.vue";
export default {
@ -156,7 +157,7 @@ export default {
refineryList: [],
productRowData: {},
configAutocomplete: {
serveTarget: serve.findByEntity,
serveTarget: refineryInfoServe.findByEntity,
autocompleteKey: "refineryName",
labelKey: "refineryName",
valueKey: "id",
@ -188,7 +189,6 @@ export default {
},
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;
@ -196,15 +196,6 @@ export default {
productChange() {
this.productData();
},
//
refineryData(value) {
if (value) {
serve.findByEntity({ refineryName: value }).then((res) => {
this.refineryList = res.data;
});
this.productData();
}
},
//
async productData() {
let data = {
@ -221,7 +212,6 @@ export default {
}
});
// this.form.productId = this.productNameList[0].productId
console.log(this.productRowData, this.productNameList, "aaaaaaaaaa");
},
//
customData(value) {
@ -244,8 +234,6 @@ export default {
delete this.form.id;
this.rowCreate = true;
this.productChange();
console.log("this.form", this.form);
} else {
this.rowCreate = false;
}

@ -259,7 +259,7 @@ export default {
},
productTypeList: ["0#柴", "-10#柴", "92#汽", "95#汽"],
configAutocomplete: {
serveTarget: serve.findByEntity,
serveTarget: refineryInfoServe.findByEntity,
autocompleteKey: "refineryName",
labelKey: "refineryName",
valueKey: "id",

Loading…
Cancel
Save