This commit is contained in:
2024-11-22 17:38:55 +08:00
parent ee67f17957
commit 7c9962a45d
2 changed files with 17 additions and 15 deletions

View File

@@ -17,7 +17,7 @@
label-width="80px" label-width="80px"
> >
<el-form-item label="发布APP" prop="title"> <el-form-item label="发布APP" prop="title">
<el-select v-model="dataForm.appType" placeholder="请选择"> <el-select v-model="dataForm.appType" placeholder="请选择" @change="selectType">
<el-option <el-option
v-for="item in APPList" v-for="item in APPList"
:key="item.value" :key="item.value"
@@ -129,6 +129,7 @@
<el-button type="primary" @click="dataFormSubmit()">确定</el-button> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</span> </span>
<commonShopTable <commonShopTable
:type="dataForm.appType"
ref="commonShopTable" ref="commonShopTable"
currentType="courseLinkPro" currentType="courseLinkPro"
@submit="bindProduct" @submit="bindProduct"

View File

@@ -6,8 +6,8 @@
<div class="shop_drawer_box demo-drawer__content"> <div class="shop_drawer_box demo-drawer__content">
<div class="addFormBox"> <div class="addFormBox">
<el-form ref="addForm" label-width="80px" :model="dataForm"> <el-form ref="addForm" label-width="80px" :model="dataForm">
<el-form-item label="商品名称" prop="productName" class="form_item"> <el-form-item label="商品名称" prop="keywords" class="form_item">
<el-input size="small" placeholder="请输入商品名称" style="width: 100%" v-model="dataForm.productName" clearable> <el-input size="small" placeholder="请输入商品名称" style="width: 100%" v-model="dataForm.keywords" clearable>
</el-input> </el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="商品类型" prop="goodsType" class="form_item"> <!-- <el-form-item label="商品类型" prop="goodsType" class="form_item">
@@ -86,7 +86,7 @@
<script> <script>
export default { export default {
props: ["currentType", "currentId"], props: ["currentType", "currentId","type"],
data() { data() {
return { return {
timer: null, timer: null,
@@ -96,8 +96,8 @@ export default {
multipleSelection: [], // 当前页选中的数据 multipleSelection: [], // 当前页选中的数据
idKey: "productId", // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下) idKey: "productId", // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
dataForm: { dataForm: {
productName: "", keywords: "",
goodsType: "",
}, },
currentRow:null, currentRow:null,
bookMarketId: null, bookMarketId: null,
@@ -123,8 +123,8 @@ export default {
}, },
methods: { methods: {
handleReset() { handleReset() {
this.dataForm = { productName: "", this.dataForm = { keywords: "",
goodsType: "",}; };
this.pageIndex = 1; this.pageIndex = 1;
this.getDataList(); this.getDataList();
}, },
@@ -157,8 +157,8 @@ export default {
}, },
async open() { async open() {
this.drawer = true; this.drawer = true;
this.dataForm = { productName: "", this.dataForm = { keywords: "",
goodsType: "",}; };
this.pageIndex = 1; this.pageIndex = 1;
// await this.getGoodsTypeList(); // await this.getGoodsTypeList();
await this.getDataList(); await this.getDataList();
@@ -199,8 +199,9 @@ export default {
// 获取数据列表 // 获取数据列表
async getDataList() { async getDataList() {
var form = { var form = {
type: this.type,
...this.dataForm, ...this.dataForm,
current: this.pageIndex, page: this.pageIndex,
limit: this.pageSize, limit: this.pageSize,
// productId: "", // productId: "",
@@ -210,15 +211,15 @@ export default {
this.dataListLoading = true; this.dataListLoading = true;
this.clear(); this.clear();
await this.$http({ await this.$http({
url: this.$http.adornUrl(`/master/shopProduct/listByPage`), url: this.$http.adornUrl(`/master/shopProduct/getProductForApp`),
method: "post", method: "post",
data: this.$http.adornData(form), data: this.$http.adornData(form),
}).then(({ data }) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.result.records; this.dataList = data.page.records;
this.totalPage = data.result.total; this.totalPage = data.page.total;
} else { } else {
this.dataList = []; this.dataList = [];
this.totalPage = 0; this.totalPage = 0;