Procházet zdrojové kódy

店铺、商品审核页面展示、商品证书长期按钮

yjwang před 1 týdnem
rodič
revize
d042ee3434

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

@@ -7,3 +7,12 @@ export function getStoreInfo() {
     method: 'get'
   })
 }
+
+
+// 查询商品详细
+export function getAuthInfo() {
+  return request({
+    url: '/store/store/auditLog',
+    method: 'get'
+  })
+}

+ 11 - 0
src/api/store/storeProduct.js

@@ -196,3 +196,14 @@ export function qualifications() {
 }
 
 
+// 查询商品详细
+export function getProductrAuthInfo(query) {
+  return request({
+    url: '/store/storeProduct/auditLog',
+    method: 'get',
+    params: query
+  })
+}
+
+
+

+ 50 - 0
src/views/store/storeConfig/authInfo.vue

@@ -0,0 +1,50 @@
+<script>
+import { getAuthInfo } from '@/api/hisStore/store'
+export default {
+  data(){
+    return{
+      auditLogs:[],
+    }
+  },
+  created() {
+    this.selectAuthList()
+  },
+  methods:{
+    selectAuthList(){
+      getAuthInfo().then(response=>{
+        this.auditLogs = response.auditLog;
+      })
+    }
+  }
+}
+</script>
+
+<template>
+  <div>
+    <el-table :data="auditLogs" height="350" border>
+      <el-table-column label="描述" align="center" prop="des" :show-overflow-tooltip="true" />
+      <el-table-column label="操作人员" align="center" prop="operName" width="100" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
+      <el-table-column label="操作日期" align="center" prop="operTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.operTime) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="审核理由" align="center" prop="reason" ></el-table-column>
+      <el-table-column label="图片" align="center" prop="attachImage" width="100" >
+        <template slot-scope="scope">
+          <el-image
+            style="width: 100px"
+            :src="scope.row.attachImage"
+            :preview-src-list="[scope.row.attachImage]"
+            v-if="scope.row.attachImage">
+          </el-image>
+          <span v-else >无图片</span >
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<style scoped lang="scss">
+
+</style>

+ 5 - 1
src/views/store/storeConfig/index.vue

@@ -10,6 +10,9 @@
             <el-tab-pane label="基本资料" name="userinfo">
               <userInfo/>
             </el-tab-pane>
+            <el-tab-pane label="店铺审核日志" name="authInfo">
+              <authInfo/>
+            </el-tab-pane>
             <el-tab-pane label="修改密码" name="resetPwd">
               <resetPwd :user="user" />
             </el-tab-pane>
@@ -23,11 +26,12 @@
 <script>
 import userInfo from "./userInfo";
 import resetPwd from "./resetPwd";
+import authInfo from "./authInfo";
 import { getUserProfile } from "@/api/store/store";
 
 export default {
   name: "storeConfig",
-  components: {  userInfo, resetPwd },
+  components: { authInfo, userInfo, resetPwd },
   data() {
     return {
       user: {},

+ 174 - 28
src/views/store/storeProduct/index.vue

@@ -401,7 +401,7 @@
           </el-tag>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300px">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -415,8 +415,6 @@
             type="text"
             icon="el-icon-edit"
             @click="showOperLog(scope.row)"
-            v-hasPermi="['store:storeProduct:list']"
-            v-if="scope.row.isAudit===1"
           >审核记录
           </el-button>
           <el-button
@@ -966,7 +964,17 @@
         <el-form-item v-if="form.isShow === '1'" label="生产企业营业执照" prop="business">
           <Material v-model="businessArr" type="image" :num="1" :width="150" :height="150"/>
         </el-form-item>
-        <el-form-item v-if="form.isShow === '1' && businessArr.length > 0" prop="businessExpire">
+
+        <el-form-item v-if="form.isShow === '1' && businessArr.length > 0" label="生产企业营业执照是否长期有效" prop="isBusinessPermanent">
+          <el-switch
+            @change="switchChange()"
+            v-model="businessValue"
+            active-color="#13ce66"
+            inactive-color="#ff4949">
+          </el-switch>
+        </el-form-item>
+
+        <el-form-item v-if="form.isShow === '1' && businessArr.length > 0 && !businessValue" prop="businessExpire">
           <el-date-picker
             v-model="form.businessExpire"
             type="daterange"
@@ -980,7 +988,17 @@
         <el-form-item v-if="form.isShow === '1'" label="生产企业的生产许可证/备案凭证" prop="license">
           <Material v-model="licenseArr" type="image" :num="1" :width="150" :height="150"/>
         </el-form-item>
-        <el-form-item v-if="form.isShow === '1' && licenseArr.length > 0" prop="licenseExpire">
+
+        <el-form-item v-if="form.isShow === '1' && licenseArr.length > 0" label="生产企业的生产许可证/备案凭证是否长期有效" prop="isLicensePermanent">
+          <el-switch
+            @change="switchChange()"
+            v-model="licenseValue"
+            active-color="#13ce66"
+            inactive-color="#ff4949">
+          </el-switch>
+        </el-form-item>
+
+        <el-form-item v-if="form.isShow === '1' && licenseArr.length > 0 && !licenseValue" prop="licenseExpire">
           <el-date-picker
             v-model="form.licenseExpire"
             type="daterange"
@@ -994,7 +1012,17 @@
         <el-form-item v-if="form.isShow === '1'" label="商品注册证/备案凭证" prop="certificate">
           <Material v-model="certificateArr" type="image" :num="1" :width="150" :height="150"/>
         </el-form-item>
-        <el-form-item v-if="form.isShow === '1' && certificateArr.length > 0" prop="certificateExpire">
+
+        <el-form-item v-if="form.isShow === '1' && licenseArr.length > 0" label="商品注册证/备案凭证是否长期有效" prop="isCertificatePermanent">
+          <el-switch
+            @change="switchChange()"
+            v-model="certificateValue"
+            active-color="#13ce66"
+            inactive-color="#ff4949">
+          </el-switch>
+        </el-form-item>
+
+        <el-form-item v-if="form.isShow === '1' && certificateArr.length > 0 && !certificateValue" prop="certificateExpire">
           <el-date-picker
             v-model="form.certificateExpire"
             type="daterange"
@@ -1005,24 +1033,34 @@
           </el-date-picker>
         </el-form-item>
 
-<!--        <el-form-item v-if="form.isShow === '1' && displayDemo" label="Ⅰ类Ⅱ类备案凭证" prop="voucher">-->
-<!--          <Material v-model="voucherArr" type="image" :num="1" :width="150" :height="150"/>-->
-<!--        </el-form-item>-->
-<!--        <el-form-item v-if="form.isShow === '1' && voucherArr.length > 0 && displayDemo" prop="voucherExpire">-->
-<!--          <el-date-picker-->
-<!--            v-model="form.voucherExpire"-->
-<!--            type="daterange"-->
-<!--            value-format="yyyy-MM-dd"-->
-<!--            range-separator="至"-->
-<!--            start-placeholder="开始日期"-->
-<!--            end-placeholder="结束日期">-->
-<!--          </el-date-picker>-->
-<!--        </el-form-item>-->
+        <!--        <el-form-item v-if="form.isShow === '1' && displayDemo" label="Ⅰ类Ⅱ类备案凭证" prop="voucher">-->
+        <!--          <Material v-model="voucherArr" type="image" :num="1" :width="150" :height="150"/>-->
+        <!--        </el-form-item>-->
+        <!--        <el-form-item v-if="form.isShow === '1' && voucherArr.length > 0 && displayDemo" prop="voucherExpire">-->
+        <!--          <el-date-picker-->
+        <!--            v-model="form.voucherExpire"-->
+        <!--            type="daterange"-->
+        <!--            value-format="yyyy-MM-dd"-->
+        <!--            range-separator="至"-->
+        <!--            start-placeholder="开始日期"-->
+        <!--            end-placeholder="结束日期">-->
+        <!--          </el-date-picker>-->
+        <!--        </el-form-item>-->
 
         <el-form-item v-if="form.isShow === '1'" label="GMP/GSP认证证书" prop="gmpAuth">
           <Material v-model="gmpAuthArr" type="image" :num="1" :width="150" :height="150"/>
         </el-form-item>
-        <el-form-item v-if="form.isShow === '1' && gmpAuthArr.length > 0" prop="gmpAuthExpire">
+
+        <el-form-item v-if="form.isShow === '1' && businessArr.length > 0" label="GMP/GSP认证证书是否长期有效" prop="isGmpAuthPermanent">
+          <el-switch
+            @change="switchChange()"
+            v-model="gmpAuthValue"
+            active-color="#13ce66"
+            inactive-color="#ff4949">
+          </el-switch>
+        </el-form-item>
+
+        <el-form-item v-if="form.isShow === '1' && gmpAuthArr.length > 0 && !gmpAuthValue" prop="gmpAuthExpire">
           <el-date-picker
             v-model="form.gmpAuthExpire"
             type="daterange"
@@ -1091,7 +1129,37 @@
        <el-button type="primary" @click="dialogVisible = false">已 知 晓</el-button>
       </span>
     </el-dialog>
-
+    <el-dialog
+      :title=titleValue
+      :visible.sync="authVisible"
+      width="50%"
+      :before-close="handleClose"
+      center>
+      <el-table :data="auditLogs" border>
+        <el-table-column label="描述" align="center" prop="des" :show-overflow-tooltip="true" />
+        <el-table-column label="操作人员" align="center" prop="operName" width="100" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
+        <el-table-column label="操作日期" align="center" prop="operTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.operTime) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="审核理由" align="center" prop="reason" ></el-table-column>
+        <el-table-column label="图片" align="center" prop="attachImage" width="100" >
+          <template slot-scope="scope">
+            <el-image
+              style="width: 100px"
+              :src="scope.row.attachImage"
+              :preview-src-list="[scope.row.attachImage]"
+              v-if="scope.row.attachImage">
+            </el-image>
+            <span v-else >无图片</span >
+          </template>
+        </el-table-column>
+      </el-table>
+      <span slot="footer" class="dialog-footer">
+    <el-button type="primary" @click="authVisible = false">关 闭</el-button>
+  </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -1106,7 +1174,8 @@ import {
   importTemplate,
   batchModify,
   sync580,
-  updateIsShow
+  updateIsShow,
+  getProductrAuthInfo
 } from "@/api/store/storeProduct";
 import {getAllStoreProductCategory} from "@/api/store/storeProductCategory";
 import {getAllStoreProductRule} from "@/api/store/storeProductRule";
@@ -1154,11 +1223,11 @@ export default {
     });
     this.getDicts("store_product_type").then((response) => {
       this.productTypeOptions = response.data;
-      if (!this.medicalMallConfig.isMedicalMall &&
-        this.productTypeOptions.length === 4) {
-        //删除后两项
-        this.productTypeOptions.splice(2, 2);
-      }
+      // if (!this.medicalMallConfig.isMedicalMall &&
+      //   this.productTypeOptions.length === 4) {
+      //   //删除后两项
+      //   this.productTypeOptions.splice(2, 2);
+      // }
     });
     this.getDicts("store_product_is_show").then((response) => {
       this.isShowOptions = response.data;
@@ -1258,6 +1327,13 @@ export default {
   },
   data() {
     return {
+      authVisible:false,
+      auditLogs:[],
+      titleValue:null,
+      gmpAuthValue:false,
+      certificateValue:false,
+      licenseValue:false,
+      businessValue:false,
       displayDemo: false,
       cateIdToNameMap: {},
       businessArr: [],
@@ -1412,6 +1488,10 @@ export default {
         gmpAuth:null,
         gmpAuthExpire:null,
         businessLink:null,
+        isGmpAuthPermanent:null,
+        isCertificatePermanent:null,
+        isLicensePermanent:null,
+        isBusinessPermanent:null,
       },
       // 表单校验
       rules: {
@@ -2027,6 +2107,31 @@ export default {
         if (this.form.qualificationCertificate != null) {
           this.qualificationArr = this.form.qualificationCertificate.split(",");
         }
+
+        if(this.form.isBusinessPermanent == 1){
+          this.businessValue = true
+        }else {
+          this.businessValue = false
+        }
+
+        if(this.form.isLicensePermanent == 1){
+          this.licenseValue = true
+        }else {
+          this.licenseValue = false
+        }
+
+        if(this.form.isCertificatePermanent == 1){
+          this.certificateValue = true
+        }else {
+          this.certificateValue = false
+        }
+
+        if(this.form.isGmpAuthPermanent == 1){
+          this.gmpAuthValue = true
+        }else {
+          this.gmpAuthValue = false
+        }
+
         const expireFieldMap = [
           { expireKey: 'businessExpire', startKey: 'businessStart', endKey: 'businessEnd' },
           { expireKey: 'licenseExpire', startKey: 'licenseStart', endKey: 'licenseEnd' },
@@ -2144,9 +2249,33 @@ export default {
             this.form.qualificationCertificateEnd = this.form.qualificationExpire[1];
           }
 
+          if(!!this.businessValue){
+            this.form.isBusinessPermanent=1;
+          }else {
+            this.form.isBusinessPermanent=0;
+          }
+
+          if(!!this.licenseValue){
+            this.form.isLicensePermanent=1;
+          }else {
+            this.form.isLicensePermanent=0;
+          }
+
+          if(!!this.certificateValue){
+            this.form.isCertificatePermanent=1;
+          }else {
+            this.form.isCertificatePermanent=0;
+          }
+
+          if(!!this.gmpAuthValue){
+            this.form.isGmpAuthPermanent=1;
+          }else {
+            this.form.isGmpAuthPermanent=0;
+          }
+
           addOrEdit(this.form).then(response => {
             if (response.code === 200) {
-              this.msgSuccess("修改成功");
+              this.msgSuccess("操作成功!");
               this.open = false;
               this.getList();
             }
@@ -2215,6 +2344,23 @@ export default {
     },
     handleReviewAudit(){
       console.log("aaaaaaaaaaaaaaa->",this.form.reviewAudit);
+    },
+    switchChange(){
+      console.log(this.form.isBusinessLicensePermanent);
+    },
+    showOperLog(row){
+      getProductrAuthInfo({productId : row.productId}).then(response => {
+        this.auditLogs = response.auditLog;
+        this.titleValue ="商品:" +"《" +row.productName+"》"+ "审核记录";
+        this.authVisible = true;
+      })
+    },
+    handleClose(done) {
+      this.$confirm('确认关闭?')
+        .then(_ => {
+          done();
+        })
+        .catch(_ => {});
     }
   }
 };