|
@@ -51,7 +51,7 @@
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</el-main>
|
|
</el-main>
|
|
|
<el-footer class="sa-footer--submit" :class="modal.params.multiple ? 'sa-row-between' : 'sa-row-right'">
|
|
<el-footer class="sa-footer--submit" :class="modal.params.multiple ? 'sa-row-between' : 'sa-row-right'">
|
|
|
- <sa-pagination :pageData="pageData" layout="total, prev, pager, next" @updateFn="getData" />
|
|
|
|
|
|
|
+ <sa-pagination :pageData="pageData" @updateFn="getData" />
|
|
|
<el-button v-if="modal.params.multiple" type="primary" @click="confirm">{{
|
|
<el-button v-if="modal.params.multiple" type="primary" @click="confirm">{{
|
|
|
t('common.confirm')
|
|
t('common.confirm')
|
|
|
}}</el-button>
|
|
}}</el-button>
|
|
@@ -65,6 +65,7 @@
|
|
|
* @param {Boolean} multiple - 是否多选
|
|
* @param {Boolean} multiple - 是否多选
|
|
|
* @param {Number} max - 多选时最大数量(0 代表限制数量)
|
|
* @param {Number} max - 多选时最大数量(0 代表限制数量)
|
|
|
* @param {String} ftype - 打开来源(score_shop)
|
|
* @param {String} ftype - 打开来源(score_shop)
|
|
|
|
|
+ * @param {Number} pageSize - 每页显示条数,默认20
|
|
|
*/
|
|
*/
|
|
|
import { nextTick, onMounted, reactive, ref } from 'vue';
|
|
import { nextTick, onMounted, reactive, ref } from 'vue';
|
|
|
import { api } from '../goods.service';
|
|
import { api } from '../goods.service';
|
|
@@ -117,7 +118,7 @@ async function getData(page, searchParams = null) {
|
|
|
|
|
|
|
|
const params = {
|
|
const params = {
|
|
|
page: pageData.page,
|
|
page: pageData.page,
|
|
|
- size: 20,
|
|
|
|
|
|
|
+ size: pageData.size,
|
|
|
isShow: 1,
|
|
isShow: 1,
|
|
|
...finalSearchParams,
|
|
...finalSearchParams,
|
|
|
};
|
|
};
|
|
@@ -361,6 +362,10 @@ function confirm() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
|
|
+ // 如果传入了pageSize参数,设置分页大小
|
|
|
|
|
+ if (props.modal.params.pageSize) {
|
|
|
|
|
+ pageData.size = props.modal.params.pageSize;
|
|
|
|
|
+ }
|
|
|
// 先预加载已选中的商品数据
|
|
// 先预加载已选中的商品数据
|
|
|
await preloadSelectedGoods();
|
|
await preloadSelectedGoods();
|
|
|
// 再获取第一页数据
|
|
// 再获取第一页数据
|