订单加商品搜索
This commit is contained in:
@@ -19,7 +19,7 @@ export async function pageGoods(params) {
|
||||
* @param params 查询条件
|
||||
*/
|
||||
export async function listGoods(params) {
|
||||
const res = await request.get('/sylive/goods', {
|
||||
const res = await request.get('/sylive/goods/items', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
|
||||
@@ -56,6 +56,23 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
|
||||
<el-form-item label="商品:">
|
||||
<el-select
|
||||
clearable
|
||||
v-model="where.itemId"
|
||||
placeholder="请选择"
|
||||
class="ele-fluid"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in goodsList"
|
||||
:key="item.itemId"
|
||||
:value="item.itemId"
|
||||
:label="item.title"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col
|
||||
v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }"
|
||||
v-show="where.cfrom == '1' ? false : true"
|
||||
@@ -112,6 +129,7 @@
|
||||
<script>
|
||||
import { listOrganizations } from '@/api/sylive/organization';
|
||||
import { listTeams } from '@/api/sylive/team';
|
||||
import { listGoods } from '@/api/sylive/goods';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -130,6 +148,8 @@
|
||||
organizationList: [],
|
||||
// 团队数据
|
||||
teamList: [],
|
||||
// 商品数据
|
||||
goodsList: [],
|
||||
// 表单数据
|
||||
where: { ...defaultWhere }
|
||||
};
|
||||
@@ -143,6 +163,7 @@
|
||||
created() {
|
||||
this.organizationQuery();
|
||||
this.teamQuery();
|
||||
this.goodsQuery();
|
||||
},
|
||||
methods: {
|
||||
/* 搜索 */
|
||||
@@ -181,6 +202,17 @@
|
||||
.catch((e) => {
|
||||
this.$message.error(e.message);
|
||||
});
|
||||
},
|
||||
/* 查询商品 */
|
||||
goodsQuery() {
|
||||
const activityId = this.$route.query.id;
|
||||
listGoods({ activityId: activityId })
|
||||
.then((list) => {
|
||||
this.goodsList = list;
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user