新增商家发布商品同步描述按钮

master
学习很差啦 2022-08-04 14:40:50 +08:00
parent bf393181b8
commit 0355dcddde
2 changed files with 24 additions and 20 deletions

View File

@ -525,4 +525,8 @@ h2 {
display: "flex"; display: "flex";
justify-content: "space-between"; justify-content: "space-between";
align-items: "center"; align-items: "center";
} }
.promise-intro-btn{
margin: 10px 0;
text-align: left;
}

View File

@ -67,14 +67,12 @@
prop="goodsUnit" prop="goodsUnit"
> >
<Select v-model="baseInfoForm.goodsUnit" style="width: 100px"> <Select v-model="baseInfoForm.goodsUnit" style="width: 100px">
<Scroll :on-reach-bottom="handleReachBottom"> <Option
<Option v-for="(item, index) in goodsUnitList"
v-for="(item, index) in goodsUnitList" :key="index"
:key="index" :value="item"
:value="item" >{{ item }}
>{{ item }} </Option>
</Option>
</Scroll>
</Select> </Select>
</FormItem> </FormItem>
<FormItem <FormItem
@ -533,7 +531,7 @@
<FormItem <FormItem
style="width: 100%" style="width: 100%"
class="form-item-view-el" class="form-item-view-el"
label="商品描述" label="PC商品描述"
prop="intro" prop="intro"
> >
<editor <editor
@ -542,7 +540,13 @@
v-model="baseInfoForm.intro" v-model="baseInfoForm.intro"
:init="{ ...initEditor, height: '800px' }" :init="{ ...initEditor, height: '800px' }"
></editor> ></editor>
<div class="promise-intro-btn">
<Button type="primary" @click="promiseIntroEditor"
>将PC商品描述同步到移动端描述</Button
>
</div>
</FormItem> </FormItem>
<FormItem <FormItem
style="width: 100%" style="width: 100%"
class="form-item-view-el" class="form-item-view-el"
@ -860,7 +864,7 @@ export default {
}, },
params: { params: {
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 1000,
}, },
skuInfoRules: {}, skuInfoRules: {},
/** 品牌列表 */ /** 品牌列表 */
@ -1102,15 +1106,7 @@ export default {
} }
); );
}, },
//
handleReachBottom() {
setTimeout(() => {
if (this.params.pageNumber * this.params.pageSize <= this.total) {
this.params.pageNumber++;
this.GET_GoodsUnit();
}
}, 1000);
},
// //
GET_GoodsUnit() { GET_GoodsUnit() {
API_GOODS.getGoodsUnitList(this.params).then((res) => { API_GOODS.getGoodsUnitList(this.params).then((res) => {
@ -1253,6 +1249,10 @@ export default {
this.renderTableData(skus); this.renderTableData(skus);
this.skuTableData = skus; this.skuTableData = skus;
}, },
// pc
promiseIntroEditor() {
this.baseInfoForm.mobileIntro = this.baseInfoForm.intro;
},
/** 根据当前分类id查询商品应包含的参数 */ /** 根据当前分类id查询商品应包含的参数 */
GET_GoodsParams() { GET_GoodsParams() {