Browse Source

数据报表

zhengjinyi 1 year ago
parent
commit
87892f375e

+ 2 - 2
.env.development

@@ -4,8 +4,8 @@ ENV = 'development'
 # base api
 # VUE_APP_BASE_API = 'http://192.168.2.67:18015'
 # VUE_APP_BASE_API = 'http://localhost:18015'
-VUE_APP_BASE_API = 'http://192.168.2.102:18015'
-# VUE_APP_BASE_API = 'https://mapi-b.caimei365.com'
+# VUE_APP_BASE_API = 'http://192.168.2.102:18015'
+VUE_APP_BASE_API = 'https://mapi-b.caimei365.com'
 # 图片上传,索引更新等
 VUE_APP_CORE_API = 'https://core-b.caimei365.com'
 

+ 1 - 1
.env.staging

@@ -9,7 +9,7 @@ VUE_APP_BASE_API = 'https://mapi-b.caimei365.com'
 VUE_APP_CORE_API = 'https://core-b.caimei365.com'
 
 # 采美网站url
-VUE_APP_CAIMEI_URL = 'https://www.caimei365.com'
+VUE_APP_CAIMEI_URL = 'http://120.79.25.27:8009'
 
 # 采美旧后台
 VUE_APP_ADMIN_URL = 'https://admin-b.caimei365.com'

BIN
public/temp/market-import.xlsx


BIN
public/temp/供应商报表文件上传模板.zip


+ 0 - 3
src/views/library/tag/tag-form.vue

@@ -168,9 +168,6 @@ export default {
   line-height: 20px;
   color: red;
   text-align: left;
-  position: absolute;
-  right: -50%;
-  bottom: 0;
 }
 .span_tip {
   font-size: 12px;

+ 0 - 3
src/views/user/customer/advertis-edit.vue

@@ -285,9 +285,6 @@ export default {
   line-height: 20px;
   color: red;
   text-align: left;
-  position: absolute;
-  right: -50%;
-  bottom: 0;
 }
 .span_tip {
   font-size: 12px;

+ 0 - 3
src/views/user/customer/customer-ambition-edit.vue

@@ -196,9 +196,6 @@ export default {
   line-height: 20px;
   color: red;
   text-align: left;
-  position: absolute;
-  right: -50%;
-  bottom: 0;
 }
 .span_tip {
   font-size: 12px;

+ 0 - 3
src/views/user/customer/customer-ambition-sum.vue

@@ -150,9 +150,6 @@ export default {
   line-height: 20px;
   color: red;
   text-align: left;
-  position: absolute;
-  right: -50%;
-  bottom: 0;
 }
 .span_tip {
   font-size: 12px;

+ 0 - 3
src/views/user/customer/customer-popup-edit.vue

@@ -192,9 +192,6 @@ export default {
   line-height: 20px;
   color: red;
   text-align: left;
-  position: absolute;
-  right: -50%;
-  bottom: 0;
 }
 .span_tip {
   font-size: 12px;

+ 0 - 3
src/views/user/customer/customer-remarks-add .vue

@@ -273,9 +273,6 @@ export default {
   line-height: 20px;
   color: red;
   text-align: left;
-  position: absolute;
-  right: -50%;
-  bottom: 0;
 }
 .span_tip {
   font-size: 12px;

+ 7 - 6
src/views/user/customer/list.vue

@@ -96,8 +96,8 @@
     <!-- 页码 -->
     <pagination
       :total="total"
-      :page-sizes="[100]"
-      :page-size="100"
+      :page-sizes="[10, 20, 30, 100]"
+      :page-size="20"
       :page.sync="listQuery.pageNum"
       :limit.sync="listQuery.pageSize"
       @pagination="getCustomerShopList"
@@ -121,7 +121,7 @@
     <el-dialog title="上传LOGO" :visible.sync="logoFormVisible" width="500px">
       <el-form ref="logoForm" :model="logoForm" :rules="rules" label-position="right">
         <el-form-item prop="logo" label="logo">
-          <div class="form-el-upload" style="width: 148px; height: 148px">
+          <div class="form-el-upload" style="width: 126px; height: 126px">
             <el-upload
               class="avatar-uploader"
               :action="actionUrl"
@@ -130,18 +130,18 @@
               :on-success="handleSuccess"
               :before-upload="beforeUpload"
             >
-              <div v-loading="loadImgLoading" class="avatar" style="width: 148px; height: 148px; display: block">
+              <div v-loading="loadImgLoading" class="avatar" style="width: 126px; height: 126px; display: block">
                 <img
                   v-if="logoForm.logo"
                   :src="logoForm.logo"
-                  style="width: 148px; height: 148px; display: block"
+                  style="width: 126px; height: 126px; display: block"
                   @error="reloadImage"
                   @load="loadSucess"
                 />
                 <i
                   v-else
                   class="el-icon-plus avatar-uploader-icon"
-                  style="width: 148px; height: 148px; line-height: 148px"
+                  style="width: 126px; height: 126px; line-height: 126px"
                 ></i>
               </div>
             </el-upload>
@@ -288,6 +288,7 @@ export default {
         await uploadShopLogo(params)
         this.logoFormVisible = false
         this.$message.success('操作成功')
+        this.$refs['logoForm'].clearValidate()
         this.getList()
       } catch (error) {
         console.log(error)

+ 9 - 4
src/views/user/customer/market-edit.vue

@@ -34,11 +34,11 @@
         </el-upload>
         <input v-show="false" v-model="form.filePath" type="text" />
       </el-form-item>
+      <el-form-item>
+        <el-button type="primary" @click="handleImportConfirm"> 保存 </el-button>
+        <el-button plain @click="backToList"> 返回 </el-button>
+      </el-form-item>
     </el-form>
-    <div class="el-dialog__footer" style="text-align: left; margin-top: 100px">
-      <el-button type="primary" @click="handleImportConfirm"> 保存 </el-button>
-      <el-button plain @click="backToList"> 返回 </el-button>
-    </div>
   </div>
 </template>
 
@@ -86,6 +86,11 @@ export default {
       try {
         const res = await getMarketReportById(params)
         this.form = { ...this.form, ...res.data }
+        const file = {
+          name: res.data.fileName,
+          url: ''
+        }
+        this.fileList.push(file)
       } catch (error) {
         console.log('error', error)
       }

+ 14 - 4
src/views/user/customer/market-report-list.vue

@@ -28,7 +28,18 @@
       </el-table-column>
       <el-table-column prop="reportDate" label="报表数据日期" align="center" width="200" />
       <el-table-column prop="reportName" label="报表名称" align="center" />
-      <el-table-column prop="addTime" label="添加时间" align="center" width="200">
+      <el-table-column prop="visible" label="报表生成状态" align="center">
+        <template slot-scope="{ row }">
+          <el-tag v-if="row.visible === 1" type="success" size="small">已生成</el-tag>
+          <el-tag v-if="row.visible === 2" type="danger" size="small">未生成</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column prop="reportTime" label="最近生成时间" align="center">
+        <template slot-scope="{ row }">
+          {{ row.reportTime ? row.reportTime : '---' }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="addTime" label="添加时间" align="center">
         <template slot-scope="{ row }">
           {{ row.addTime ? row.addTime : '---' }}
         </template>
@@ -139,12 +150,11 @@ export default {
     },
     // 下载数据报表模板
     handleDownloadTemp() {
-      downloadWithUrl('/temp/market-import.xlsx', '供应商数据报表.xlsx')
+      downloadWithUrl('/temp/供应商报表文件上传模板.zip', '供应商报表文件上传模板.zip')
     },
     // 跳转预览
     handlePreview(row) {
-      console.log('row', row)
-      const urls = `${process.env.VUE_APP_CAIMEI_URL}/supplier/charts.html?shopId=${1634}&mouth=11`
+      const urls = `${process.env.VUE_APP_CAIMEI_URL}/supplier/charts.html?type=1&shopId=${row.shopId}&marketReportId=${row.id}`
       window.open(urls, '_blank')
     },
     // 添加/编辑