4 次代碼提交 d8c58343a4 ... f76731c3c8

作者 SHA1 備註 提交日期
  Twelve615 f76731c3c8 :memo: 商品图片以及图片列表可上传多个 1 年之前
  Twelve615 6a5ee545fb :memo: 优化导入数据时刷新列表与自动关闭弹窗 1 年之前
  Twelve615 4145d00df2 :package: 首页轮播图查询接口增加升序排序 1 年之前
  Twelve615 78b423f61f :memo: 优化上传数量、新增时的逻辑等细节 1 年之前

+ 1 - 1
jlsb-vue/src/views/aa/AaCommodityCodeList.vue

@@ -36,7 +36,7 @@
 <!--      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
       </a-upload>-->
-      <AaCommodityCodeImportModal></AaCommodityCodeImportModal>
+      <AaCommodityCodeImportModal :load-data="this.loadData"></AaCommodityCodeImportModal>
       <a-button type="primary" icon="" v-has="'aa:commodity:code:sync'" :loading="loadingSyncBtn" @click="asyncOldCode">同步旧防伪码</a-button>
       <!-- 高级查询区域 -->
 <!--      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->

+ 2 - 2
jlsb-vue/src/views/aa/AaCommodityList.vue

@@ -232,8 +232,8 @@
         fieldList.push({type:'BigDecimal',value:'price',text:'价格',dictCode:''})
         fieldList.push({type:'string',value:'typeId',text:'分类'})
         fieldList.push({type:'Text',value:'introduce',text:'介绍',dictCode:''})
-        fieldList.push({type:'string',value:'introducePic',text:'介绍图片',dictCode:''})
-        fieldList.push({type:'string',value:'pics',text:'图片集',dictCode:''})
+        // fieldList.push({type:'string',value:'introducePic',text:'介绍图片',dictCode:''})
+        // fieldList.push({type:'string',value:'pics',text:'图片集',dictCode:''})
         fieldList.push({type:'string',value:'modelNumber',text:'型号',dictCode:''})
         fieldList.push({type:'Text',value:'copyWriter',text:'文案',dictCode:''})
         fieldList.push({type:'datetime',value:'createTime',text:'创建时间'})

+ 4 - 4
jlsb-vue/src/views/aa/AaNewsFlList.vue

@@ -27,12 +27,12 @@
     <!-- 操作按钮区域 -->
     <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增一级</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('新闻分类')">导出</a-button>
+<!--      <a-button type="primary" icon="download" @click="handleExportXls('新闻分类')">导出</a-button>-->
 <!--      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
 <!--        <a-button type="primary" icon="import">导入</a-button>-->
 <!--      </a-upload>-->
       <!-- 高级查询区域 -->
-      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+<!--      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
           <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
@@ -130,12 +130,12 @@
             align:"left",
             dataIndex: 'name'
           },
-          {
+/*           {
             title:'分类图片',
             align:"left",
             dataIndex: 'pic',
             scopedSlots: {customRender: 'imgSlot'}
-          },
+          }, */
           {
             title:'分类名称英语',
             align:"left",

+ 8 - 1
jlsb-vue/src/views/aa/modules/AaCommodityCodeImportModal.vue

@@ -42,6 +42,12 @@ import { downloadCodeImpXls } from '@/api/aaApi'
 const IMP_CODE = `${window._CONFIG['domianURL']}aa/aaCommodityCode/importCodeExcel/`;
 export default {
   name: 'AaCommodityCodeImportModal',
+  props: {
+    //查询
+    loadData: {
+      type: Function
+    }
+  },
   data () {
     return {
       visible: false,
@@ -106,7 +112,8 @@ export default {
           } else {
             this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
           }
-          this.loadData()
+          this.loadData(1)
+          this.handleOk()
         } else {
           this.$message.error(`${info.file.name} ${info.file.response.message}.`);
         }

+ 11 - 7
jlsb-vue/src/views/aa/modules/AaCommonProblemForm.vue

@@ -110,13 +110,17 @@
         this.edit(this.modelDefault);
       },
       edit (record) {
-        getAction(this.url.queryById,{id:record.id}).then(res=>{
-          if (res.success) {
-            this.model = res.result;
-          } else {
-            this.model = Object.assign({}, record);
-          }
-        })
+        if (record.id) {
+          getAction(this.url.queryById,{id:record.id}).then(res=>{
+            if (res.success) {
+              this.model = res.result;
+            } else {
+              this.model = Object.assign({}, record);
+            }
+          })
+        } else {
+          this.model = Object.assign({}, record);
+        }
         this.visible = true;
       },
       submitForm () {

+ 2 - 2
jlsb-vue/src/views/aa/modules/AaNewsFlModal.vue

@@ -10,9 +10,9 @@
     cancelText="关闭">
     <a-spin :spinning="confirmLoading">
       <a-form-model ref="form" :model="model" :rules="validatorRules">
-        <a-form-model-item label="分类图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pic">
+<!--        <a-form-model-item label="分类图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pic">
           <j-image-upload isMultiple  v-model="model.pic" ></j-image-upload>
-        </a-form-model-item>
+        </a-form-model-item>-->
         <a-form-model-item label="分类名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
           <a-input v-model="model.name" placeholder="请输入分类名称" ></a-input>
         </a-form-model-item>

+ 12 - 8
jlsb-vue/src/views/aa/modules/AaNewsForm.vue

@@ -5,7 +5,7 @@
         <a-row>
           <a-col :span="24">
             <a-form-model-item label="新闻缩略图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pic">
-              <j-image-upload isMultiple  v-model="model.pic" ></j-image-upload>
+              <j-image-upload isMultiple :number="1"  v-model="model.pic" ></j-image-upload>
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
@@ -138,13 +138,17 @@
         this.edit(this.modelDefault);
       },
       edit (record) {
-        getAction(this.url.queryById,{id:record.id}).then(res=>{
-          if (res.success) {
-            this.model = res.result;
-          } else {
-            this.model = Object.assign({}, record);
-          }
-        })
+        if (record.id) {
+          getAction(this.url.queryById,{id:record.id}).then(res=>{
+            if (res.success) {
+              this.model = res.result;
+            } else {
+              this.model = Object.assign({}, record);
+            }
+          })
+        } else {
+          this.model = Object.assign({}, record);
+        }
         this.visible = true;
       },
       submitForm () {

+ 5 - 4
jlsb/jeecg-boot-module-system/src/main/java/org/jeecg/modules/aa/controller/APIIndexenterController.java

@@ -86,6 +86,7 @@ public class APIIndexenterController {
     public Result<List<AaSlideshow>> getEnableList() {
         LambdaQueryWrapper<AaSlideshow> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(AaSlideshow::getEnable, "1");
+        queryWrapper.orderByAsc(AaSlideshow::getSort);
         List<AaSlideshow> list = aaSlideshowService.list(queryWrapper);
         if (list != null && list.size() > 0) {
             for (AaSlideshow aaSlideshow : list) {
@@ -293,9 +294,9 @@ public class APIIndexenterController {
                 }
             }
 
-            for (int i = 0;i<list.size();i++){
-                list.get( i ).setPic( host + "/sys/common/static/"+list.get( i ).getPic() );
-            }
+            //for (int i = 0;i<list.size();i++){
+            //    list.get( i ).setPic( host + "/sys/common/static/"+list.get( i ).getPic() );
+            //}
             result.setMessage( "获取商品列表成功" );
             result.setResult( list );
             result.setCode( 200 );
@@ -315,7 +316,7 @@ public class APIIndexenterController {
         Result<AaCommodity> result = new Result<AaCommodity>();
         try {
             AaCommodity byId = aaCommodityService.getById( aaCommodityDTO.getId() );
-            byId.setPic( host + "/sys/common/static/"+byId.getPic() );
+            //byId.setPic( host + "/sys/common/static/"+byId.getPic() );
             byId.setVideo( host + "/sys/common/static/"+byId.getVideo() );
             result.setMessage( "获取商品详细成功" );
             result.setResult( byId );