Commit eb27aea0 by wangql

提交联调接口代码

1 parent a98c8277
import request from './request'
const path = 'dj.api.'
/**获取服务门店列表 */
export function getServiceStore(data) {
data.method = `${path}servicemerchantref.list`
return request(data)
}
/**根据门店商户号获取员工列表 */
export function getStaff(data) {
data.method = `${path}employee.getByMerchantId`
return request(data)
}
/**获取车型车系 */
export function getCarInfo(data) {
data.method = `${path}car.series.list`
return request(data)
}
/**根据车系id获取车辆类型 */
export function getCarType(data) {
data.method = `${path}car.type.list`
return request(data)
}
/**根据门店商户号获取基础商品列表 */
export function getGoods(data) {
data.method = `${path}basegoods.list.byServiceMerchantId`
return request(data)
}
/**预录订单 */
export function addOrder(data) {
data.method = `${path}order.advanceCreate`
return request(data, 'post')
}
......@@ -73,6 +73,8 @@
<script>
import { getList, getType } from '@api/product'
import { BaseData } from '@/common/constants.js'
import { mapActions } from 'vuex'
export default {
name: 'product',
data() {
......@@ -96,10 +98,10 @@ export default {
prop: 'thumbUrl',
addHtml: 'img'
}, {
label: '素材名称',
label: '产品名称',
prop: 'goodsName'
}, {
label: '商品ID',
label: '产品ID',
prop: 'id'
}, {
label: '分类',
......@@ -133,15 +135,20 @@ export default {
},
mounted() {
this.getProductType()
// this.getProductType()
this.getBaseData()
},
methods: {
getProductType(){
let prarms = {}
getType(prarms).then(res => {
this.baseData.productTypeList = res || []
});
// getProductType(){
// let prarms = {}
// getType(prarms).then(res => {
// this.baseData.productTypeList = res || []
// });
// },
...mapActions('d2admin/base', ['get']),
async getBaseData() {
this.baseData.productTypeList = await this.get(BaseData.productType)
},
beforeSearchFn() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!