Commit 7754a4ef by zhouzy

增加新的需求

1 parent 61176ba3
...@@ -2,8 +2,10 @@ import request from './request' ...@@ -2,8 +2,10 @@ import request from './request'
export const commonApi = { export const commonApi = {
/**图片上传接口*/ /**图片上传接口*/
upLoadImg(data = {}) { upLoadImg(data = {}) {
return request(data, 'scrm.api.equity.common.upload.image', 'post', ['file']) return request(data, 'scrm.api.equity.common.upload.image', 'post', [
}, 'file'
])
}
} }
export const orderApi = { export const orderApi = {
/**获取财务管理列表*/ /**获取财务管理列表*/
...@@ -59,10 +61,12 @@ export const orderApi = { ...@@ -59,10 +61,12 @@ export const orderApi = {
return request(data, 'scrm.api.equity.goods.get.by.id') return request(data, 'scrm.api.equity.goods.get.by.id')
}, },
/** 第三方商品分页查询*/ /** 第三方商品分页查询*/
getListWithPageOutGoods(data = { getListWithPageOutGoods(
supplier: 'HW', data = {
pageSize: 99999 supplier: 'HW',
}) { pageSize: 99999
}
) {
return request(data, 'scrm.api.equity.goods.out.list.with.page') return request(data, 'scrm.api.equity.goods.out.list.with.page')
}, },
/**商品编号获取商品信息(第三方)*/ /**商品编号获取商品信息(第三方)*/
...@@ -91,15 +95,22 @@ export const orderApi = { ...@@ -91,15 +95,22 @@ export const orderApi = {
}, },
/** 获取渠道下所有品牌 */ /** 获取渠道下所有品牌 */
getAllBrandList(data = {}) { getAllBrandList(data = {}) {
return request({ return request(
...data, {
supplier: 'HW', ...data,
pageNum: 1, supplier: 'HW',
pageSize: 9999, pageNum: 1,
}, 'scrm.api.equity.goods.brand.list.all') pageSize: 9999
}, },
'scrm.api.equity.goods.brand.list.all'
)
}
} }
export const carEquityManageApi = { export const carEquityManageApi = {
/** 更改汽车展示状态*/
cardsDisplay(data = {}) {
return request(data, 'scrm.api.equity.car.service.main.page.flag.update')
},
/** 获取汽车权益列表*/ /** 获取汽车权益列表*/
getCarList(data = { pageSize: 9999, pageNum: 1 }) { getCarList(data = { pageSize: 9999, pageNum: 1 }) {
return request(data, 'scrm.api.equity.car.service.list') return request(data, 'scrm.api.equity.car.service.list')
...@@ -119,16 +130,23 @@ export const carEquityManageApi = { ...@@ -119,16 +130,23 @@ export const carEquityManageApi = {
/** 更新汽车权益*/ /** 更新汽车权益*/
updateEquity(data = {}) { updateEquity(data = {}) {
return request(data, 'scrm.api.equity.car.service.update') return request(data, 'scrm.api.equity.car.service.update')
}, }
} }
export const goodsEquityManageApi = { export const goodsEquityManageApi = {
/** 商品首页展示*/
goodsDisplay(data = {}) {
return request(data, 'scrm.api.equity.goods.group.main.page.flag.update')
},
/**获取商品权益列表*/ /**获取商品权益列表*/
getGoodsList(data) { getGoodsList(data) {
return request({ return request(
...data, {
pageSize: 9999, ...data,
pageNum: 1 pageSize: 9999,
}, 'scrm.api.equity.goods.group.list') pageNum: 1
},
'scrm.api.equity.goods.group.list'
)
}, },
/**获取商品权益分类列表*/ /**获取商品权益分类列表*/
getCategoryList(data = { pageSize: 9999, pageNum: 1 }) { getCategoryList(data = { pageSize: 9999, pageNum: 1 }) {
...@@ -167,16 +185,20 @@ export const goodsEquityManageApi = { ...@@ -167,16 +185,20 @@ export const goodsEquityManageApi = {
return request(data, 'scrm.api.equity.goods.group.update') return request(data, 'scrm.api.equity.goods.group.update')
}, },
/** 获取品牌列表*/ /** 获取品牌列表*/
getGoodsBrandList(data = { getGoodsBrandList(
supplier: 'HW' data = {
}) { supplier: 'HW'
}
) {
return request(data, 'scrm.api.equity.goods.brand.list') return request(data, 'scrm.api.equity.goods.brand.list')
}, },
/* 获取品牌下商品形态列表*/ /* 获取品牌下商品形态列表*/
getAppearanceList(data = {}) { getAppearanceList(data = {}) {
return request({ ...data, supplier: 'HW' }, 'scrm.api.equity.goods.appearance.list') return request(
}, { ...data, supplier: 'HW' },
'scrm.api.equity.goods.appearance.list'
)
}
} }
export const equityApi = { export const equityApi = {
/*获取权益卡管理列表*/ /*获取权益卡管理列表*/
...@@ -219,8 +241,8 @@ export const equityApi = { ...@@ -219,8 +241,8 @@ export const equityApi = {
getCollectionMerchantList(data = {}) { getCollectionMerchantList(data = {}) {
return request(data, 'scrm.api.equity.card.get.by.merchant.name') return request(data, 'scrm.api.equity.card.get.by.merchant.name')
}, },
/*获取推广信息*/
getQrUrl(data = {}) {
return request(data, 'scrm.api.equity.card.class.generate.try.url')
},
}
\ No newline at end of file \ No newline at end of file
/*获取推广信息*/
getQrUrl(data = {}) {
return request(data, 'scrm.api.equity.card.class.generate.try.url')
}
}
...@@ -41,6 +41,12 @@ export default { ...@@ -41,6 +41,12 @@ export default {
}[cell.supplier] }[cell.supplier]
} }
}, },
{
label: '排序展示',
prop: 'mainPageFlag',
minWidth: '200',
addHtml: 'mainPageFlag'
}
] ]
}, },
......
...@@ -43,6 +43,12 @@ export default { ...@@ -43,6 +43,12 @@ export default {
return '海威' return '海威'
} }
}, },
{
label: '排序展示',
prop: 'mainPageFlag',
minWidth: '200',
addHtml: 'mainPageFlag'
},
] ]
} }
} }
......
...@@ -268,6 +268,17 @@ ...@@ -268,6 +268,17 @@
maxlength="500" maxlength="500"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item
label=" 售价:"
prop="price"
>
<el-input-number
v-model="ruleForm.price"
controls-position="right"
size="mini"
:min="1"
></el-input-number>元
</el-form-item>
</div> </div>
<div class="baseinformation2"> <span class="titleText">其他信息</span> </div> <div class="baseinformation2"> <span class="titleText">其他信息</span> </div>
<div class="form"> <div class="form">
...@@ -370,54 +381,6 @@ export default { ...@@ -370,54 +381,6 @@ export default {
src: './images/yiquan.jpg', src: './images/yiquan.jpg',
inputSwitch: true, inputSwitch: true,
dataSwitch: true, dataSwitch: true,
// storeOptions: [
// {
// id: '21',
// name: '辛巴克'
// }, {
// id: '22',
// name: '必胜客'
// },
// {
// id: '23',
// name: '肯德基'
// },
// {
// id: '24',
// name: '汉堡王'
// },
// {
// id: '27',
// name: '太平洋咖啡'
// },
// {
// id: '28',
// name: 'COSTA咖啡'
// },
// {
// id: '26',
// name: '哈根达斯'
// },
// {
// id: '25',
// name: 'CoCo都可'
// },
// {
// id: '30',
// name: '百果园 '
// },
// {
// id: '31',
// name: '腾讯会员'
// }, {
// id: '4',
// name: '淘票票'
// },
// {
// id: '2',
// name: '淘票票2'
// }
// ],
tryNum: '', tryNum: '',
effectiveNum: '', effectiveNum: '',
data: '', data: '',
...@@ -429,7 +392,8 @@ export default { ...@@ -429,7 +392,8 @@ export default {
effectiveType: '1', effectiveType: '1',
platformGoodsId: +'', platformGoodsId: +'',
merchantName: '', merchantName: '',
id: '' id: '',
price: ''
}, },
editForm: { editForm: {
url: '', url: '',
...@@ -441,21 +405,6 @@ export default { ...@@ -441,21 +405,6 @@ export default {
imgSrc: require("./images/card0.png"), imgSrc: require("./images/card0.png"),
src: "./images/card0.png" src: "./images/card0.png"
}, },
// {
// id: "secondImg",
// imgSrc: require("./images/card1.png"),
// src: "./images/card1.png"
// },
// {
// id: "thirdImg",
// imgSrc: require("./images/card2.png"),
// src: "./images/card2.png"
// },
// {
// id: "forthImg",
// imgSrc: require("./images/card3.png"),
// src: "./images/card3.png"
// },
], ],
rules: { rules: {
cardClassName: [ cardClassName: [
...@@ -476,6 +425,9 @@ export default { ...@@ -476,6 +425,9 @@ export default {
], ],
tryNum: [ tryNum: [
{ required: true, message: '请选择试用天数', trigger: 'blur' } { required: true, message: '请选择试用天数', trigger: 'blur' }
],
price: [
{ required: true, message: '请选择售价', trigger: 'blur' }
] ]
}, },
//权益卡管理界面 //权益卡管理界面
...@@ -519,6 +471,13 @@ export default { ...@@ -519,6 +471,13 @@ export default {
} }
}, },
{ {
label: '售价',
prop: 'price',
formatter: (cellValue) => {
return cellValue.price + '元'
}
},
{
label: '领卡用户', label: '领卡用户',
prop: 'recipientCount' prop: 'recipientCount'
// width: 110, // width: 110,
......
...@@ -16,6 +16,15 @@ ...@@ -16,6 +16,15 @@
:hasPage="false" :hasPage="false"
:hasNum="false" :hasNum="false"
> >
<div
slot="mainPageFlag"
slot-scope="scope"
>
<el-button
type="text"
@click="carsDisplay(scope.scope)"
>{{scope.scope.mainPageFlag==1?'取消首页展示':'首页展示'}}</el-button>
</div>
<span <span
slot="auth-button" slot="auth-button"
slot-scope="scope" slot-scope="scope"
...@@ -98,6 +107,15 @@ ...@@ -98,6 +107,15 @@
:hasPage="false" :hasPage="false"
:hasNum="false" :hasNum="false"
> >
<div
slot="mainPageFlag"
slot-scope="scope"
>
<el-button
type="text"
@click="goodsDisplay(scope.scope)"
>{{scope.scope.mainPageFlag==1?'取消首页展示':'首页展示'}}</el-button>
</div>
<span <span
slot="auth-button" slot="auth-button"
slot-scope="scope" slot-scope="scope"
...@@ -105,10 +123,6 @@ ...@@ -105,10 +123,6 @@
> >
<el-button <el-button
type="text" type="text"
@click="editEquity(scope.scope,2)"
>编辑</el-button>
<el-button
type="text"
@click="updateShelves(scope.scope,'goods')" @click="updateShelves(scope.scope,'goods')"
>{{scope.scope.status == 0?'上架':'下架'}}</el-button> >{{scope.scope.status == 0?'上架':'下架'}}</el-button>
<el-button <el-button
...@@ -128,13 +142,12 @@ ...@@ -128,13 +142,12 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import { goodsMixin, carMixin } from '@/mixins' import { goodsMixin, carMixin } from '@/mixins'
import { goodsEquityManageApi, carEquityManageApi } from '@api/api' import { goodsEquityManageApi, carEquityManageApi } from '@api/api'
export default { export default {
name: '', name: '',
mixins: [carMixin, goodsMixin], mixins: [carMixin, goodsMixin],
data () { data() {
return { return {
showDialog: false, showDialog: false,
isEdit: false, isEdit: false,
...@@ -142,19 +155,45 @@ export default { ...@@ -142,19 +155,45 @@ export default {
editData: {} editData: {}
} }
}, },
mounted () { mounted() {
// this.init() this.init()
}, },
methods: { methods: {
init () { /*更改汽车展示状态 */
carsDisplay(row) {
if (row.mainPageFlag == 0) {
carEquityManageApi
.cardsDisplay({ id: row.id, mainPageFlag: 1 })
.then(res => {})
} else {
carEquityManageApi
.cardsDisplay({ id: row.id, mainPageFlag: 0 })
.then(res => {})
}
this.getCarList() this.getCarList()
},
/*改变商品展示状态 */
goodsDisplay(row) {
if (row.mainPageFlag == 0) {
goodsEquityManageApi
.goodsDisplay({ id: row.id, mainPageFlag: 1 })
.then(res => {})
} else {
goodsEquityManageApi
.goodsDisplay({ id: row.id, mainPageFlag: 0 })
.then(res => {})
}
this.getCategoryList() this.getCategoryList()
}, },
addEquity (type) { init() {
this.getCarList()
this.getCategoryList()
},
addEquity(type) {
this.dialogType = type this.dialogType = type
this.showDialog = true this.showDialog = true
}, },
setTop (id, type) { setTop(id, type) {
let target = type == 'car' ? carEquityManageApi : goodsEquityManageApi let target = type == 'car' ? carEquityManageApi : goodsEquityManageApi
target.setTop({ id }).then(({ code, message }) => { target.setTop({ id }).then(({ code, message }) => {
if (code == 0) { if (code == 0) {
...@@ -165,12 +204,12 @@ export default { ...@@ -165,12 +204,12 @@ export default {
} }
}) })
}, },
editEquity (data, type) { editEquity(data, type) {
this.editData = data this.editData = data
this.isEdit = true this.isEdit = true
this.addEquity(type) this.addEquity(type)
}, },
updateShelves ({ id, status }, type) { updateShelves({ id, status }, type) {
let target = type == 'car' ? carEquityManageApi : goodsEquityManageApi let target = type == 'car' ? carEquityManageApi : goodsEquityManageApi
status = status == 1 ? 0 : 1 status = status == 1 ? 0 : 1
const callBack = () => { const callBack = () => {
...@@ -195,12 +234,12 @@ export default { ...@@ -195,12 +234,12 @@ export default {
} else { } else {
callBack() callBack()
} }
}
},
} }
} }
</script> </script>
<style src="@a/css/tao.css"></style> <style src="@a/css/tao.css">
</style>
<style > <style >
.equity-title { .equity-title {
height: 44px; height: 44px;
...@@ -261,4 +300,4 @@ export default { ...@@ -261,4 +300,4 @@ export default {
.opacity { .opacity {
opacity: 0.5; opacity: 0.5;
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!