Explorar o código

总后台导出 店铺Id替换

wangxy hai 6 días
pai
achega
9c33e7fd1b

+ 8 - 0
src/api/hisStore/store.js

@@ -17,6 +17,14 @@ export function listStoreOptions(query) {
   })
 }
 
+export function exportFsStream(query) {
+  return request({
+    url: '/store/his/store/exportFsStream',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询店铺管理详细
 export function getStore(storeId) {
   return request({

+ 7 - 0
src/api/hisStore/storeProduct.js

@@ -66,6 +66,13 @@ export function exportStoreProduct(query) {
     params: query
   })
 }
+export function exportDrugProduct(query) {
+  return request({
+    url: '/store/store/storeProduct/exportProduct',
+    method: 'get',
+    params: query
+  })
+}
 
 export function genFormatAttr(productId,json) {
   return request({

+ 18 - 0
src/views/hisStore/store/audit.vue

@@ -48,6 +48,24 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="店铺Id" prop="storeSeq">
+        <el-input
+          v-model="queryParams.storeSeq"
+          placeholder="请输入店铺Id"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商家Id" prop="merchantId">
+        <el-input
+          v-model="queryParams.merchantId"
+          placeholder="请输入商家Id"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>

+ 37 - 1
src/views/hisStore/store/index.vue

@@ -57,6 +57,24 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="店铺Id" prop="storeSeq">
+        <el-input
+          v-model="queryParams.storeSeq"
+          placeholder="请输入店铺Id"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商家Id" prop="merchantId">
+        <el-input
+          v-model="queryParams.merchantId"
+          placeholder="请输入商家Id"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -198,6 +216,13 @@
             @click="handleRefresh(scope.row)"
             v-hasPermi="['his:store:refresh']"
           >重置密码</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-s-promotion"
+            @click="handleStoreExport(scope.row)"
+          >导出
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -724,7 +749,7 @@
 </template>
 
 <script>
-import { listStore, getStore, delStore, addStore, updateStore, exportStore, refreshPasWod } from '@/api/hisStore/store'
+import { listStore, getStore, delStore, addStore, updateStore, exportStore, refreshPasWod,exportFsStream } from '@/api/hisStore/store'
 import storeDetails from '../components/storeDetails.vue';
 import {getCitys} from "@/api/store/city";
 import { getConfigByKey } from '@/api/system/config'
@@ -1340,6 +1365,17 @@ export default {
       }).catch(() => {
       });
     },
+    handleStoreExport(row){
+      const queryStoreId = row.storeId;
+      this.exportLoading = true;
+      exportFsStream({ queryStoreId: queryStoreId }).then(response => {
+        this.download(response.msg);
+        this.exportLoading = false;
+      }).catch(() => {
+        this.exportLoading = false;
+      });
+
+    },
     //长期有效营业执照选择
     switchChange(){
       console.log(this.form.isBusinessLicensePermanent);

+ 2 - 2
src/views/hisStore/store/recommend.vue

@@ -148,9 +148,9 @@
     <!-- 添加或修改推荐店铺对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
-        <el-form-item label="推荐店铺Id" prop="storeName">
+        <el-form-item label="推荐店铺Id" prop="storeSeq">
           <el-select
-            v-model="form.storeId"
+            v-model="form.storeSeq"
             filterable
             remote
             :remote-method="searchStore"

+ 19 - 1
src/views/hisStore/storeProduct/index.vue

@@ -429,6 +429,14 @@
             v-hasPermi="['store:storeProduct:remove']"
           >删除
           </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDrugExport(scope.row)"
+            v-if="scope.row.cateId==224"
+          >导出
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -1109,7 +1117,7 @@ import {
   importTemplate,
   batchModify,
   sync580,
-  updateIsShow
+  updateIsShow, exportDrugProduct
 } from "@/api/hisStore/storeProduct";
 import {getAllStoreProductCategory} from "@/api/hisStore/storeProductCategory";
 import {getAllStoreProductRule} from "@/api/hisStore/storeProductRule";
@@ -2189,6 +2197,16 @@ export default {
       }).catch(function () {
       });
     },
+    handleDrugExport(row){
+      const productId = row.productId
+      this.exportLoading = true;
+      exportDrugProduct({ productId: productId }).then(response => {
+        this.download(response.msg);
+        this.exportLoading = false;
+      }).catch(() => {
+        this.exportLoading = false;
+      });
+    },
     /** 同步按钮操作 */
     handleSync(row) {
       const productIds = row.productId || this.ids;