yjwang 2 napja
szülő
commit
97caaa7d79

+ 26 - 10
src/api/hisStore/platformProduct.js

@@ -71,6 +71,32 @@ export function copyProduct(data) {
   })
 }
 
+// 总库商品提交审核
+export function submitAudit(data) {
+  return request({
+    url: '/store/store/platformProduct/submitAudit',
+    method: 'post',
+    data: data
+  })
+}
+
+// 总库商品批量审核
+export function batchAudit(param) {
+  return request({
+    url: '/store/store/platformProduct/batchAudit',
+    method: 'post',
+    data: param
+  })
+}
+
+// 总库商品审核记录
+export function getAuthInfo(productId) {
+  return request({
+    url: '/store/store/platformProduct/auditLog/' + productId,
+    method: 'get'
+  })
+}
+
 
 
 
@@ -136,13 +162,3 @@ export function updateIsShow(productIds) {
   })
 }
 
-
-
-// 查询商品详细
-export function getAuthInfo(productId) {
-  return request({
-    url: '/store/store/storeProduct/auditLog/' + productId,
-    method: 'get'
-  })
-}
-

+ 26 - 0
src/api/hisStore/storeOrderComment.js

@@ -0,0 +1,26 @@
+import request from '@/utils/request'
+
+// 查询订单评价列表
+export function listStoreOrderComment(query) {
+  return request({
+    url: '/his/comment/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询订单评价详情
+export function getStoreOrderComment(commentId) {
+  return request({
+    url: '/his/comment/' + commentId,
+    method: 'get'
+  })
+}
+
+// 删除订单评价(逻辑删除)
+export function delStoreOrderComment(commentId) {
+  return request({
+    url: '/his/comment/' + commentId,
+    method: 'delete'
+  })
+}

+ 63 - 7
src/views/hisStore/platformProduct/index.vue

@@ -236,6 +236,8 @@
       <el-tab-pane label="已上线" name="1"></el-tab-pane>
       <el-tab-pane label="草稿" name="9"></el-tab-pane>
       <el-tab-pane label="已下线" name="0"></el-tab-pane>
+      <el-tab-pane v-if="medicalMallConfig.isPlatformProductAudit" label="待审核" name="audit0"></el-tab-pane>
+      <el-tab-pane v-if="medicalMallConfig.isPlatformProductAudit" label="已驳回" name="audit2"></el-tab-pane>
     </el-tabs>
 
     <el-table height="500" border v-loading="loading" :data="storeProductList"
@@ -286,6 +288,14 @@
           <dict-tag :options="isShowOptions" :value="scope.row.isShow"/>
         </template>
       </el-table-column>
+      <el-table-column v-if="medicalMallConfig.isPlatformProductAudit" label="审核状态" align="center" prop="isAudit" width="90">
+        <template slot-scope="scope">
+          <span v-if="scope.row.isShow == 9">-</span>
+          <el-tag v-else-if="scope.row.isAudit === '1' || scope.row.isAudit === 1" type="success">已通过</el-tag>
+          <el-tag v-else-if="scope.row.isAudit === '2' || scope.row.isAudit === 2" type="danger">已退回</el-tag>
+          <el-tag v-else type="warning">待审核</el-tag>
+        </template>
+      </el-table-column>
 
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200px">
         <template slot-scope="scope">
@@ -298,6 +308,7 @@
           >详情
           </el-button>
           <el-button
+            v-if="!isPendingAuditLocked(scope.row)"
             size="mini"
             type="text"
             icon="el-icon-edit"
@@ -1499,6 +1510,7 @@ export default {
       loading: true,
       // 选中数组
       ids: [],
+      selectedRows: [],
       // 非单个禁用
       single: false,
       // 非多个禁用
@@ -1523,6 +1535,7 @@ export default {
         productName: null,
         productType: null,
         isShow: "-1",
+        isAudit: null,
         barCode: null,
         // companyIds: null,
         storeIds: null,
@@ -1948,6 +1961,10 @@ export default {
       this.open1 = false;
     },
     submitForm1() {
+      if (this.selectedRows.some(item => this.isPendingAuditLocked(item))) {
+        this.$message.warning("审核中的商品无法修改");
+        return;
+      }
       let param = {}
       param.productId = this.ids;
       param.goodsStatus = this.form1.isShow;
@@ -2138,9 +2155,25 @@ export default {
       this.form.instructionManual = text
     },
     handleClick(tab, event) {
-      this.queryParams.isShow = tab.name;
+      this.applyTabQuery(tab.name);
       this.getList();
     },
+    /** 按页签设置查询条件:已上线 = 上架且审核通过;草稿只按 is_show=9 */
+    applyTabQuery(name) {
+      if (name === 'audit0') {
+        this.queryParams.isAudit = '0';
+        this.queryParams.isShow = '-1';
+      } else if (name === 'audit2') {
+        this.queryParams.isAudit = '2';
+        this.queryParams.isShow = '-1';
+      } else if (name === '1' && this.medicalMallConfig.isPlatformProductAudit) {
+        this.queryParams.isAudit = '1';
+        this.queryParams.isShow = '1';
+      } else {
+        this.queryParams.isAudit = null;
+        this.queryParams.isShow = name;
+      }
+    },
     /** 转换商品分类数据结构 */
     normalizer(node) {
       if (node.children && !node.children.length) {
@@ -2174,8 +2207,11 @@ export default {
       if (this.queryParams.storeIds !== null && this.queryParams.storeIds.length === 0) {
         this.queryParams.storeIds = null;
       }
-
-      listStoreProduct(this.queryParams).then(response => {
+      const params = Object.assign({}, this.queryParams);
+      if (params.isAudit === null || params.isAudit === '') {
+        delete params.isAudit;
+      }
+      listStoreProduct(params).then(response => {
         this.storeProductList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -2300,7 +2336,8 @@ export default {
         pageSize: 10,
         productName: null,
         productType: null,
-        isShow: "1",
+        isShow: "-1",
+        isAudit: null,
         barCode: null,
         // companyIds: null,
         storeIds: null,
@@ -2319,14 +2356,26 @@ export default {
         contraindications: null,
         precautions: null
       }
+      this.applyTabQuery(this.activeName);
       this.handleQuery();
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.productId)
+      this.selectedRows = selection || [];
+      this.ids = this.selectedRows.map(item => item.productId)
       this.single = selection.length !== 1
       this.multiple = !selection.length
     },
+    /** 审核中商品不可修改;草稿仍可编辑 */
+    isPendingAuditLocked(row) {
+      if (!this.medicalMallConfig.isPlatformProductAudit || !row) {
+        return false;
+      }
+      if (row.isShow == 9) {
+        return false;
+      }
+      return row.isAudit === '0' || row.isAudit === 0;
+    },
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
@@ -2342,6 +2391,11 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+      const targetRows = row && row.productId ? [row] : this.selectedRows;
+      if (targetRows.some(item => this.isPendingAuditLocked(item))) {
+        this.$message.warning("审核中的商品无法修改");
+        return;
+      }
       this.reset();
       if (this.ids.length > 1) {
         this.title = "批量修改商品";
@@ -2727,7 +2781,7 @@ export default {
       // 调用API提交数据
       addOrEdit(this.form).then(response => {
         if (response.code === 200) {
-          this.msgSuccess("操作成功!");
+          this.msgSuccess(response.msg || "操作成功!");
           this.open = false;
           this.getList();
         }
@@ -2788,7 +2842,9 @@ export default {
       }).then(() => {
         copyProduct(row).then(response => {
           if (response.code === 200) {
-            this.$message.success("操作成功!")
+            this.$message.success("复制成功,已生成草稿商品")
+            this.activeName = '9';
+            this.applyTabQuery('9');
             this.getList();
           }
         })

+ 1718 - 0
src/views/hisStore/platformProductAudit/index.vue

@@ -0,0 +1,1718 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+
+      <el-form-item label="商品分类" prop="cateId">
+         <treeselect  v-model="queryParams.cateId"  style="width:205.4px" :options="categoryOptions" :normalizer="normalizer" placeholder="请选择分类"/>
+      </el-form-item>
+
+      <el-form-item label="商品名称" prop="productName">
+        <el-input
+          v-model="queryParams.productName"
+          placeholder="请输入商品名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+       <el-form-item label="商品编号" prop="barCode">
+        <el-input
+          v-model="queryParams.barCode"
+          placeholder="请输入商品编号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+
+      <el-form-item label="商品类型" prop="productType">
+        <el-select   v-model="queryParams.productType" placeholder="请选择商品类型" clearable size="small" >
+         <el-option
+                v-for="item in productTypeOptions"
+                :key="item.dictValue"
+                :label="item.dictLabel"
+                :value="item.dictValue"
+              />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="multiple"
+          @click="handleUpdate"
+          v-hasPermi="['store:platformProduct:audit']"
+        >批量审核</el-button>
+      </el-col>
+
+	    <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table  height="700" border v-loading="loading" :data="storeProductList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="ID" align="center" prop="productId" />
+      <el-table-column label="商品图片" align="center" width="120">
+        <template slot-scope="scope">
+          <el-popover
+            placement="right"
+            title=""
+            trigger="hover">
+            <img slot="reference" :src="scope.row.image" width="100">
+            <img :src="scope.row.image" style="max-width: 150px;">
+          </el-popover>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="商品名称" show-overflow-tooltip align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.commonName && scope.row.commonName !== '-' ? scope.row.commonName : scope.row.productName }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="分类" align="center" prop="cateName" />
+      <el-table-column label="所属公司" align="center" prop="companyName" />
+      <el-table-column label="售价" align="center" prop="price" >
+          <template slot-scope="scope" >
+              <span v-if="scope.row.price!=null">{{scope.row.price.toFixed(2)}}</span>
+          </template>
+      </el-table-column>
+      <el-table-column label="原价" align="center" prop="otPrice" >
+          <template slot-scope="scope" >
+              <span v-if="scope.row.otPrice!=null">{{scope.row.otPrice.toFixed(2)}}</span>
+          </template>
+      </el-table-column>
+      <el-table-column label="销量" align="center" prop="sales" />
+      <el-table-column label="库存" align="center" prop="stock" />
+      <el-table-column label="类型" align="center" prop="productType" >
+          <template slot-scope="scope">
+              <el-tag prop="productType" v-for="(item, index) in productTypeOptions"    v-if="scope.row.productType==item.dictValue">{{item.dictLabel}}</el-tag>
+          </template>
+      </el-table-column>
+      <el-table-column label="状态" align="center" prop="isShow" >
+          <template slot-scope="scope">
+              <el-tag prop="status" v-for="(item, index) in isShowOptions"    v-if="scope.row.isShow==item.dictValue">{{item.dictLabel}}</el-tag>
+          </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['store:platformProduct:audit']"
+          >审核</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <el-dialog :title="title" :visible.sync="open1" width="580px" append-to-body>
+      <el-form ref="form1" :model="form1" :rules="rules1" label-width="80px">
+        <el-form-item label="审核理由" prop="reason">
+          <el-input v-model="form1.reason" type="textarea" placeholder="请输入审核理由" />
+        </el-form-item>
+        <el-form-item label="图片说明" prop="attachImage">
+          <ImageUpload  v-model="form1.attachImage" type="image" :limit=5 :width="150"
+                        :height="150"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="handleBatchUpdate(1)">审核通过</el-button>
+        <el-button type="primary" @click="handleBatchUpdate(2)">审核退回</el-button>
+        <el-button @click="cancel1">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 添加或修改商品对话框 -->
+    <el-dialog :title="title" v-if="open" :fullscreen="isFullscreen" :visible.sync="open" width="1000px" append-to-body :show-close="false">
+      <template v-slot:title>
+        <div style="display: flex; justify-content: space-between; align-items: center;">
+          <span>{{ title }}</span>
+          <div>
+            <!-- 全屏按钮 -->
+            <el-button type="text" @click="handleFullScreen" size="middle">
+              <i class="el-icon-full-screen"></i>
+            </el-button>
+            <!--关闭按钮-->
+            <el-button type="text" @click="open = false">
+              <i class="el-icon-close"></i>
+            </el-button>
+          </div>
+        </div>
+      </template>
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px" :disabled="isAuditMode">
+
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="商品分类" prop="cateId">
+              <treeselect v-model="form.cateId" :options="categoryOptions" :normalizer="normalizer"
+                          placeholder="请选择上级分类" :disabled="isAuditMode"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+          <el-form-item label="商品类型" prop="productType">
+            <el-select style="width: 240px" v-model="form.productType" placeholder="请选择商品类型" clearable
+                       size="small">
+              <el-option v-for="item in productTypeOptions" :key="item.dictValue"
+                :label="item.dictLabel" :value="item.dictValue"/>
+            </el-select>
+          </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="商品名称" prop="productName">
+              <el-input v-model="form.productName" placeholder="请输入商品名称"/>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="通用名称" prop="commonName" v-if="!isMedicalDeviceCategory">
+              <el-input v-model="form.commonName" placeholder="请输入通用名称"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="存储条件" prop="storageConditions" v-if="!isMedicalDeviceCategory">
+              <el-input v-model="form.storageConditions" placeholder="请输入存储条件"/>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="器械编码" prop="medicalDeviceCode" v-if="isMedicalDeviceCategory">
+              <el-input v-model="form.medicalDeviceCode" placeholder="请输入器械编码"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="关键字" prop="keyword">
+              <el-input v-model="form.keyword" placeholder="请输入关键字"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="单位名" prop="unitName">
+              <el-input v-model="form.unitName" placeholder="请输入单位名"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="10">
+          <el-col :span="12">
+            <el-form-item label="是否药品" prop="isDrug">
+              <el-radio-group v-model="form.isDrug">
+                <el-radio
+                  v-for="item in isDrugOptions"
+                  :key="item.dictValue"
+                  :label="item.dictValue"
+                >{{ item.dictLabel }}
+                </el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <div v-if="form.isDrug === '1' ">
+          <el-form-item label="头图展示" prop="drugImage">
+            <Material v-model="drugImageArr" type="image" :num="1" :width="150" :height="150"/>
+          </el-form-item>
+          <div v-if="medicalMallConfig.isMedicalMall">
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="药品注册证书编号" prop="drugRegCertNo">
+                  <el-input v-model="form.drugRegCertNo" placeholder="请输入药品注册证书编号"/>
+                </el-form-item>
+              </el-col>
+            </el-row>
+
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="剂型" prop="dosageForm" v-if="!isMedicalDeviceCategory">
+                  <el-input v-model="form.dosageForm" placeholder="请输入剂型"/>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="单价" prop="unitPrice">
+                  <el-input v-model="form.unitPrice" placeholder="请输入单价" type="number"/>
+                </el-form-item>
+              </el-col>
+            </el-row>
+
+            <el-row>
+              <el-col :span="12">
+                <el-form-item :label="isMedicalDeviceCategory ? '规格/型号' : '包装规格'" prop="prescribeSpec">
+                  <el-input v-model="form.prescribeSpec" placeholder="请输入包装规格/型号"/>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="规格" v-if="!isMedicalDeviceCategory" prop="specification">
+                  <el-input v-model="form.specification" placeholder="请输入规格"/>
+                </el-form-item>
+              </el-col>
+            </el-row>
+
+            <el-row>
+              <el-col :span="12">
+                <el-form-item :label="isMedicalDeviceCategory ? '注册人/备案人' : '上市许可持有人'" prop="mah">
+                  <el-input v-model="form.mah" placeholder="请输入上市许可持有人"/>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item :label="isMedicalDeviceCategory ? '注册人/备案人地址' : '持有人地址'" prop="mahAddress">
+                  <el-input v-model="form.mahAddress" placeholder="请输入上市许可持有人地址"/>
+                </el-form-item>
+              </el-col>
+            </el-row>
+
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="生产企业" prop="manufacturer">
+                  <el-input v-model="form.manufacturer" placeholder="请输入生产企业"/>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="企业地址" prop="manufacturerAddress">
+                  <el-input v-model="form.manufacturerAddress" placeholder="请输入生产企业地址"/>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-collapse v-model="activeValue" accordion>
+              <el-collapse-item title="" name="1">
+
+                <el-form-item label="生产许可证或者备案凭证编号" prop="prodLicenseNo" v-if="isMedicalDeviceCategory">
+                  <el-input v-model="form.prodLicenseNo" type="textarea" placeholder="请输入生产许可证或者备案凭证编号"/>
+                </el-form-item>
+
+                <el-form-item label="产品技术要求编号" prop="prodTechReqNo" v-if="isMedicalDeviceCategory">
+                  <el-input v-model="form.prodTechReqNo" type="textarea" placeholder="请输入产品技术要求编号"/>
+                </el-form-item>
+
+                <el-form-item label="结构及组成" prop="productStructure" v-if="isMedicalDeviceCategory">
+                  <el-input v-model="form.productStructure" type="textarea" placeholder="请输入结构及组成"/>
+                </el-form-item>
+
+                <el-form-item label="功能主治/适用范围" prop="indications">
+                  <el-input v-model="form.indications" type="textarea" placeholder="请输入功能主治/适用范围"/>
+                </el-form-item>
+
+                <el-form-item label="成分" prop="ingredient" v-if="!isMedicalDeviceCategory" >
+                  <el-input v-model="form.ingredient" type="textarea"/>
+                </el-form-item>
+
+                <el-form-item label="用法用量" prop="dosage" v-if="!isMedicalDeviceCategory" >
+                  <el-input v-model="form.dosage" type="textarea" placeholder="请输入用法用量"/>
+                </el-form-item>
+
+                <el-form-item label="不良反应" prop="adverseReactions" v-if="!isMedicalDeviceCategory" >
+                  <el-input v-model="form.adverseReactions" type="textarea" placeholder="请输入不良反应"/>
+                </el-form-item>
+
+                <el-form-item label="禁忌症" prop="contraindications">
+                  <el-input v-model="form.contraindications" type="textarea" placeholder="请输入禁忌症"/>
+                </el-form-item>
+
+                <el-form-item label="注意事项" prop="precautions"  v-if="!isMedicalDeviceCategory" >
+                  <el-input v-model="form.precautions" type="textarea" placeholder="请输入注意事项"/>
+                </el-form-item>
+              </el-collapse-item>
+            </el-collapse>
+          </div>
+        </div>
+
+        <el-form-item label="说明书" prop="instructionManual">
+          <editor ref="instructionManualRef" @on-text-change="updateInstructionManualText"/>
+        </el-form-item>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="商品简介" prop="productInfo">
+              <el-input v-model="form.productInfo" type="textarea" :rows="2" placeholder="请输入商品简介"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-form-item label="商品图片" prop="image">
+          <Material v-model="imageArr" type="image" :num="1" :width="150" :height="150"/>
+        </el-form-item>
+
+        <el-form-item label="轮播图" prop="sliderImage">
+          <Material v-model="photoArr" type="image" :num="10" :width="150" :height="150"/>
+        </el-form-item>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="商品规格:" props="specType">
+              <el-radio-group v-model="form.specType">
+                <el-radio :label="0" class="radio">单规格</el-radio>
+                <el-radio :label="1">多规格</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <!-- 多规格添加-->
+          <el-col :span="24" v-if="form.specType === 1" class="noForm">
+            <el-col :span="24">
+              <el-form-item label="选择规格:" prop="">
+                <div class="acea-row row-middle">
+                  <el-select v-model="form.selectRule" style="width: 23%;">
+                    <el-option v-for="(item, index) in ruleList" :value="item.ruleName" :key="index">{{
+                        item.ruleName
+                      }}
+                    </el-option>
+                  </el-select>
+                  <el-button style="margin-left:10px;" type="primary" class="mr20" @click="confirm">确认</el-button>
+                </div>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="24">
+              <el-form-item v-if="attrs!=null&&attrs.length!==0">
+                <div v-for="(item, index) in attrs" :key="index">
+                  <div class="acea-row row-middle"><span class="mr5">{{ item.value }}</span>
+                    <i class="el-icon-circle-close" @click="handleRemoveRole(index)"></i>
+                  </div>
+                  <div class="rulesBox">
+                    <el-tag type="dot" closable color="primary" v-for="(j, indexn) in item.detail" :key="indexn"
+                            :name="j" class="mr20" @close="handleRemove2(item.detail,indexn)">{{ j }}
+                    </el-tag>
+                    <el-input placeholder="请输入属性名称" v-model="item.detail.attrsVal"
+                              style="width: 200px">
+                      <el-button slot="append" type="primary" @click="createAttr(item.detail.attrsVal,index)">添加
+                      </el-button>
+                    </el-input>
+                  </div>
+                </div>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="24" v-if="createBnt">
+              <el-form-item>
+                <el-button type="primary" size="small" icon="md-add" @click="addBtn" class="mr15">添加新规格</el-button>
+                <el-button type="success" size="small" @click="generate">立即生成</el-button>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" v-if="showIput">
+              <el-col :xl="6" :lg="9" :md="10" :sm="24" :xs="24">
+                <el-form-item label="规格:">
+                  <el-input placeholder="请输入规格" v-model="formDynamic.attrsName"/>
+                </el-form-item>
+              </el-col>
+              <el-col :xl="6" :lg="9" :md="10" :sm="24" :xs="24">
+                <el-form-item label="规格值:">
+                  <el-input v-model="formDynamic.attrsVal" placeholder="请输入规格值"/>
+                </el-form-item>
+              </el-col>
+              <el-col :xl="6" :lg="5" :md="10" :sm="24" :xs="24">
+                <el-button type="primary" @click="createAttrName">确定</el-button>
+                <el-button type="danger" @click="closeAttrName">取消</el-button>
+              </el-col>
+            </el-col>
+            <!-- 多规格设置-->
+            <el-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24" v-if="manyFormValidate!=null&&manyFormValidate.length">
+              <!-- 多规格表格-->
+              <el-col :span="24">
+                <el-form-item label="商品属性:" class="labeltop">
+
+                  <el-table :data="manyFormValidate" size="small" style="width: 90%;" border>
+                    <el-table-column type="myindex" v-for="(item,index) in form.header" :key="index"
+                                     :width="item.minWidth" :label="item.title" :property="item.slot" align="center">
+                      <template slot-scope="scope">
+                        <div v-if="scope.column.property == 'image'" align="center">
+                          <single-img v-model="scope.row[scope.column.property]" type="image" :num="1" :width="60"
+                                      :height="60"/>
+                        </div>
+                        <div v-else-if="scope.column.property.indexOf('value') != -1" align="center">
+                          {{ scope.row[scope.column.property] }}
+                        </div>
+                        <div v-else-if="scope.column.property == 'action'" align="center">
+                          <a @click="delAttrTable(scope.$index)" align="center">删除</a>
+                        </div>
+                        <div v-else align="center">
+                          <el-input v-model="scope.row[scope.column.property]" align="center"/>
+                        </div>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+
+                </el-form-item>
+              </el-col>
+            </el-col>
+          </el-col>
+
+          <!-- 单规格表格-->
+          <el-col :xl="23" :lg="24" :md="24" :sm="24" :xs="24" v-if="form.specType === 0" style="">
+            <el-form-item>
+              <el-table :data="oneFormValidate" size="small" border>
+                <el-table-column prop="image" label="图片" align="center">
+                  <template slot-scope="scope">
+                    <single-img v-model="scope.row.image" type="image" :num="1" :width="60" :height="60"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="price" label="售价" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.price"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="agentPrice" label="代理价" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.agentPrice"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="cost" label="成本价" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.cost"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="otPrice" label="原价" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.otPrice"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="stock" label="库存" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.stock" maxlength="7"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="barCode" label="商品条码" width="130px" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.barCode"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="barCode" label="组合编号" width="130px" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.groupBarCode"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="weight" label="重量(KG)" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.weight"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="volume" label="体积(m³)" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.volume"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="volume" label="所需积分" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.integral"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="volume" label="一级返佣" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.brokerage"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="volume" label="二级返佣" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.brokerageTwo"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="volume" label="三级返佣" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.brokerageThree"/>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="运费模板:" prop="tempId">
+              <div class="acea-row">
+                <el-select v-model="form.tempId" class="mr20">
+                  <el-option v-for="(item,index) in templateList" :value="item.id" :key="index" :label="item.name">
+                  </el-option>
+                </el-select>
+              </div>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-form-item label="商品详情" prop="description">
+          <editor ref="myeditor" @on-text-change="updateText"/>
+        </el-form-item>
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="商品状态" prop="isShow">
+              <el-radio-group v-model="form.isShow">
+                <el-radio :label="item.dictValue" v-for="item in isShowOptions">{{ item.dictLabel }}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="是否热卖" prop="isHot">
+              <el-radio-group v-model="form.isHot">
+                <el-radio :label="item.dictValue" v-for="item in isHotOptions">{{ item.dictLabel }}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="猜你喜欢" prop="isGood">
+              <el-radio-group v-model="form.isGood">
+                <el-radio :label="item.dictValue" v-for="item in isGoodOptions">{{ item.dictLabel }}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="精品推荐" prop="isBest">
+              <el-radio-group v-model="form.isBest">
+                <el-radio :label="item.dictValue" v-for="item in isBestOptions">{{ item.dictLabel }}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="新品首发" prop="isNew">
+              <el-radio-group v-model="form.isNew">
+                <el-radio :label="item.dictValue" v-for="item in isNewOptions">{{ item.dictLabel }}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="返还积分">
+              <el-input-number v-model="form.giveIntegral" :min="0" placeholder="请输入积分"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="商城展示" prop="isDisplay">
+              <el-radio-group v-model="form.isDisplay">
+                <el-radio :label="item.dictValue" v-for="item in isDisplayOptions">{{ item.dictLabel }}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+
+            <el-form-item label="排序" prop="sort">
+              <el-input-number :min="0" v-model="form.sort" placeholder="请输入排序"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="销量" prop="sales">
+              <el-input-number :min="0" v-model="form.sales" placeholder="请输入销量"/>
+            </el-form-item>
+          </el-col>
+
+        </el-row>
+        <el-form-item label="推广分类" prop="tuiCateId">
+          <el-select style="width: 240px" v-model="form.tuiCateId" placeholder="请选择推广分类" clearable size="small">
+            <el-option
+              v-for="item in productTuiCateOptions"
+              :key="item.dictValue"
+              :label="item.dictLabel"
+              :value="item.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+
+
+        <el-form-item v-if="form.isShow==='1'" label="审核说明" prop="reviewAudit">
+          <el-select style="width: 240px" v-model="form.reviewAudit" placeholder="请选择审核说明" clearable
+                     @change="handleReviewAudit"  size="small">
+            <el-option
+              v-for="item in reviewAuditOptions"
+              :key="item.dictValue"
+              :label="item.dictLabel"
+              :value="item.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="非首营链接" prop="businessLink" v-if="form.reviewAudit === '1'">
+          <el-input :min="0" v-model="form.businessLink" placeholder="请输入非首营链接"/>
+        </el-form-item>
+        <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" 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"
+            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="生产企业的生产许可证/备案凭证" 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" 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"
+            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="商品注册证/备案凭证" 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' && 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"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期">
+          </el-date-picker>
+        </el-form-item>
+
+        <!--商品类型选择Rx时候会出现该-->
+        <!--        <el-form-item label="国药准字" v-if="form.productType==2" prop="prescribeCode">-->
+        <!--          <el-input v-model="form.prescribeCode" placeholder="请输入国药准字"/>-->
+        <!--        </el-form-item>-->
+        <!--        <el-form-item label="规格" v-if="form.productType==2" prop="prescribeSpec">-->
+        <!--          <el-input v-model="form.prescribeSpec" placeholder="请输入规格"/>-->
+        <!--        </el-form-item>-->
+        <!--        <el-form-item label="生产厂家" v-if="form.productType==2" prop="prescribeFactory">-->
+        <!--          <el-input v-model="form.prescribeFactory" placeholder="请输入生产厂家"/>-->
+        <!--        </el-form-item>-->
+        <!--        <el-form-item label="处方名" v-if="form.productType==2" prop="prescribeName">-->
+        <!--          <el-input v-model="form.prescribeName" placeholder="请输入处方名"/>-->
+        <!--        </el-form-item>-->
+      </el-form>
+      <el-divider content-position="left">审核</el-divider>
+      <el-form ref="form1" :model="form1" :rules="rules1" label-width="80px">
+        <el-form-item label="审核理由" prop="reason">
+          <el-input v-model="form1.reason" type="textarea" placeholder="请输入审核理由" />
+        </el-form-item>
+        <el-form-item label="图片说明" prop="attachment">
+          <ImageUpload  v-model="form1.attachImage" type="image" :limit=5 :width="150"
+                        :height="150"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="handleUpdate1(1)">审核通过</el-button>
+        <el-button type="primary" @click="handleUpdate1(2)">审核退回</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        <div class="el-upload__tip text-center" slot="tip">
+          <div class="el-upload__tip" slot="tip">
+       <!--     <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据 -->
+          </div>
+          <span>仅允许导入xls、xlsx格式文件。</span>
+          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+        </div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import {
+  genFormatAttr,
+  listStoreProduct,
+  getStoreProduct,
+  delStoreProduct,
+  addOrEdit,
+  exportStoreProduct,
+  importTemplate,
+  batchModify, batchAudit
+} from '@/api/hisStore/platformProduct'
+import { getAllStoreProductCategory } from "@/api/hisStore/storeProductCategory";
+import { getAllStoreProductRule } from "@/api/hisStore/storeProductRule";
+import { getAllShippingTemplates } from "@/api/hisStore/shippingTemplates";
+import { getToken } from "@/utils/auth";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import Editor from '@/components/Editor/wang';
+import Material from '@/components/Material'
+import singleImg from '@/components/Material/single'
+import { getCompanyList } from "@/api/company/company";
+import { getConfigByKey } from '@/api/system/config'
+export default {
+  name: "PlatformProductAudit",
+  components: {
+    Treeselect,
+    Editor,
+    Material,
+    singleImg,
+  },
+  computed: {
+    // 计算属性:是否显示显示器免按钮
+    shouldShowExemptDeviceButton() {
+      // 只有在显示器械编码输入框且不是III类器械时才显示按钮
+      return this.showMedicalDeviceCode &&
+        this.form.cateId &&
+        this.cateIdToNameMap[this.form.cateId] &&
+        !this.cateIdToNameMap[this.form.cateId].includes('III类器械');
+    },
+    // 判断当前分类是否为医疗器械分类
+    isMedicalDeviceCategory() {
+      const cateName = this.cateIdToNameMap[this.form.cateId];
+      return cateName !== undefined && cateName.includes('器械');
+    }
+  },
+  watch: {
+    imageArr: function(val) {
+      this.form.image = val.join(',')
+    },
+    photoArr: function(val) {
+      this.form.sliderImage = val.join(',')
+    },
+    drugImageArr: function(val) {
+      this.form.drugImage = val.join(',');
+    },
+    qualificationArr:function (val) {
+      this.form.qualificationCertificate = val.join(',');
+    },businessArr(val) {
+      this.form.business = val.join(',');
+      this.$nextTick(() => {
+        if (this.$refs.form1) {
+          this.$refs.form1.validateField('businessExpire');
+        }
+      });
+    },
+    licenseArr(val) {
+      this.form.license = val.join(',');
+      this.$nextTick(() => {
+        if (this.$refs.form1) {
+          this.$refs.form1.validateField('licenseExpire');
+        }
+      });
+    },
+    certificateArr(val) {
+      this.form.certificate = val.join(',');
+      this.$nextTick(() => {
+        if (this.$refs.form1) {
+          this.$refs.form1.validateField('certificateExpire');
+        }
+      });
+    },
+    voucherArr(val) {
+      this.form.voucher = val.join(',');
+      this.$nextTick(() => {
+        if (this.$refs.form1) {
+          this.$refs.form1.validateField('voucherExpire');
+        }
+      });
+    },
+    'form.cateId': {
+      handler(newVal) {
+        const cateName = this.cateIdToNameMap[newVal];
+        this.displayDemo = cateName !== undefined && cateName.includes('器械');
+      },
+      immediate: true
+    }
+  },
+  data() {
+    return {
+      isAuditMode: false, // 添加此标志位控制是否为审核模式
+      activeValue: '1',
+      gmpAuthValue:false,
+      certificateValue:false,
+      licenseValue:false,
+      businessValue:false,
+      businessArr: [],
+      licenseArr: [],
+      certificateArr: [],
+      voucherArr: [],
+      gmpAuthArr: [],
+      displayDemo: false,
+      cateIdToNameMap: {},
+      reviewAuditOptions: [
+        {dictValue: "0", dictLabel: "首营"},
+        {dictValue: "1", dictLabel: "非首营"}
+      ],
+      companyId: null,
+      storeId: null,
+      uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
+      //videoAccept:"video/*",
+      medicalMallConfig: {},
+      upload: {
+        // 是否显示弹出层
+        open: false,
+        // 弹出层标题
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/store/storeProduct/importData"
+      },
+      // 添加药品相关字段
+      isDrugOptions: [
+        { dictValue: "0", dictLabel: "否" },
+        { dictValue: "1", dictLabel: "是" }
+      ],
+
+      // 头图展示
+      drugImageArr: [],
+      //首营资质上传图
+      qualificationArr: [],
+      productTuiCateOptions:[],
+      showIput: false,
+      createBnt:true,
+      // 规格数据
+      formDynamic: {
+        attrsName: '',
+        attrsVal: ''
+      },
+      open1: false,
+      form1: {},
+      isBtn: false,
+      columns: [],
+      attrs:[],
+      templateList:[],
+      ruleList:[],
+      // 多规格表格data
+      manyFormValidate: [],
+      // 单规格表格data
+      oneFormValidate: [
+        {
+          image: '',
+          price: 0,
+          cost: 0,
+          agentPrice: 0,
+          otPrice: 0,
+          stock: 0,
+          barCode: '',
+          weight: 0,
+          volume: 0,
+          integral: 0
+        }
+      ],
+      photoArr:[],
+      imageArr:[],
+      activeName:"1",
+      productTypeOptions:[],
+      isDisplayOptions:[],
+      isGoodOptions:[],
+      isNewOptions:[],
+      isBestOptions:[],
+      isHotOptions:[],
+      isShowOptions:[],
+      categoryOptions:[],
+      // 企业列表
+      companyOptions:[],
+      storeOptions:[],
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: false,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      isFullscreen: false,
+      // 总条数
+      total: 0,
+      // 商品表格数据
+      storeProductList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        productName: null,
+        productType: null,
+        isShow: "-1",
+        isAudit: "0",
+        barCode:null,
+        // companyIds: null
+      },
+      // 表单参数
+      form: {
+        cateId: null,
+        businessExpire: null,
+        indications: '',
+        dosage: '',
+        instructionManual: '',
+        business:null,
+        licenseExpire:null,
+        license:null,
+        certificate:null,
+        certificateExpire:null,
+        voucher:null,
+        voucherExpire:null,
+        gmpAuth:null,
+        gmpAuthExpire:null,
+        businessLink:null,
+        isGmpAuthPermanent:null,
+        isCertificatePermanent:null,
+        isLicensePermanent:null,
+        isBusinessPermanent:null,},
+      rules1: {
+        reason: [
+          { required: true, message: "审核理由不能为空", trigger: "blur" }
+        ]
+      },
+      // 表单校验
+      rules: {
+        image: [
+          { required: true, message: "商品图片不能为空", trigger: "blur" }
+        ],
+        sliderImage: [
+          { required: true, message: "轮播图不能为空", trigger: "blur" }
+        ],
+        productName: [
+          { required: true, message: "商品名称不能为空", trigger: "blur" }
+        ],
+        productInfo: [
+          { required: true, message: "商品简介不能为空", trigger: "blur" }
+        ],
+        unitName: [
+          { required: true, message: "单位名不能为空", trigger: "blur" }
+        ],
+        keyword: [
+          { required: true, message: "关键字不能为空", trigger: "blur" }
+        ],
+        cateId: [
+          { required: true, message: "分类id不能为空", trigger: "blur" }
+        ],
+        price: [
+          { required: true, message: "商品价格不能为空", trigger: "blur" }
+        ],
+        prescribeCode: [
+          { required: true, message: "国药准字不能为空", trigger: "blur" }
+        ],
+        prescribeSpec: [
+          { required: true, message: "规格不能为空", trigger: "blur" }
+        ],
+        prescribeFactory: [
+          { required: true, message: "生产厂家不能为空", trigger: "blur" }
+        ],
+        prescribeName: [
+          { required: true, message: "处方药不能为空", trigger: "blur" }
+        ],
+        // companyIds: [
+        //   { required: true, message: "销售公司不能为空", trigger: "blur" }
+        // ],
+        // 药品相关字段校验(仅在是药品时必填)
+        drugImage: [
+          { required: true, message: "药品展示图不能为空", trigger: "blur" }
+        ],
+        drugRegCertNo: [
+          { required: true, message: "药品注册证书编号不能为空", trigger: "blur" }
+        ],
+        commonName: [
+          { required: true, message: "通用名称不能为空", trigger: "blur" }
+        ],
+        dosageForm: [
+          { required: true, message: "剂型不能为空", trigger: "blur" }
+        ],
+        unitPrice: [
+          { required: true, message: "单价不能为空", trigger: "blur" }
+        ],
+        // batchNumber: [
+        //   { required: true, message: "批号不能为空", trigger: "blur" }
+        // ],
+        mah: [
+          { required: true, message: "上市许可持有人不能为空", trigger: "blur" }
+        ],
+        mahAddress: [
+          { required: true, message: "上市许可持有人地址不能为空", trigger: "blur" }
+        ],
+        manufacturer: [
+          { required: true, message: "生产企业不能为空", trigger: "blur" }
+        ],
+        manufacturerAddress: [
+          { required: true, message: "生产企业地址不能为空", trigger: "blur" }
+        ],
+        indications: [
+          { required: true, message: "功能主治不能为空", trigger: "blur" }
+        ],
+        dosage: [
+          { required: true, message: "用法用量不能为空", trigger: "blur" }
+        ],
+        adverseReactions: [
+          { required: true, message: "不良反应不能为空", trigger: "blur" }
+        ],
+        contraindications: [
+          { required: true, message: "禁忌不能为空", trigger: "blur" }
+        ],
+        precautions: [
+          { required: true, message: "注意事项不能为空", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  created() {
+    getConfigByKey("medicalMall.func.switch").then(response => {
+      if (response.data && response.data.configValue) {
+        this.medicalMallConfig = JSON.parse(response.data.configValue);
+      }
+    });
+    this.getDicts("store_product_tui_cate").then((response) => {
+      this.productTuiCateOptions = response.data;
+    });
+    this.getDicts("store_product_enable").then((response) => {
+      this.isNewOptions = response.data;
+      this.isBestOptions = response.data;
+      this.isHotOptions = response.data;
+      this.isGoodOptions=response.data;
+      this.isDisplayOptions=response.data;
+    });
+    this.getDicts("store_product_type").then((response) => {
+      this.productTypeOptions = response.data;
+    });
+    this.getDicts("store_product_is_show").then((response) => {
+      this.isShowOptions = response.data;
+    });
+    getAllShippingTemplates().then(response => {
+      this.templateList =response.data;
+    });
+    getAllStoreProductRule().then(response => {
+      this.ruleList =response.data;
+    });
+    getCompanyList().then(response => {
+      this.companyOptions = response.data;
+    });
+    this.getTreeselect();
+    this.getList();
+  },
+  methods: {
+    cancel1(){
+      this.open1 = false;
+      this.form1.attachImage=null;
+      this.form1.reason=null;
+    },
+    handleFullScreen(){
+      this.isFullscreen = !this.isFullscreen;
+    },
+    handleSuccess(response, file) {
+      // 上传成功后的回调函数
+      this.myloading.close();
+      //this.form.video = response.url;
+      this.$refs.upload.clearFiles();
+    },
+    beforeUpload(file) {
+      const isLt2M = file.size / 1024 / 1024 < 2;
+      if (!isLt2M) {
+        this.$message.error('上传视频文件大小不能超过 2MB!');
+        return false;
+      }
+      this.myloading = this.$loading({
+        lock: true,
+        text: '上传中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+      this.getList();
+    },
+    handleImport() {
+      this.upload.title = "商品导入";
+      this.upload.open = true;
+    },
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg);
+      });
+    },
+    // 删除表格中的属性
+    delAttrTable (index) {
+      this.manyFormValidate.splice(index, 1);
+    },
+    addBtn () {
+      this.clearAttr();
+      this.createBnt = false;
+      this.showIput = true;
+    },
+    //生成SKU
+    generate () {
+      genFormatAttr(this.form.productId, { attrs: this.attrs }).then(res => {
+        if(this.form.specType === 0){
+            this.oneFormValidate = res.value;
+            this.form.header = res.header;
+            let header = res.header;
+            header.pop();
+            this.oneFormValidate.map((item) => {
+              if(this.imageArr.length>0){
+                item.image = this.imageArr[0]
+              }
+            });
+        }else if(this.form.specType === 1) {
+            this.manyFormValidate = res.value;
+            let headerdel = {
+              title: '操作',
+              slot: 'action',
+              fixed: 'right',
+              width: 220
+            };
+            res.header.push(headerdel);
+            this.form.header = res.header;
+            let header = res.header;
+            header.pop();
+            // this.manyFormValidate.map((item) => {
+            //   if(this.imageArr.length>0){
+            //     item.image = this.imageArr[0]
+            //   }
+            // });
+        }
+
+      }).catch(res => {
+      })
+    },
+    // 取消添加新规格
+    closeAttrName () {
+      this.showIput = false;
+      this.createBnt = true;
+    },
+    clearAttr () {
+      this.formDynamic.attrsName = '';
+      this.formDynamic.attrsVal = '';
+    },
+    // 删除规格
+    handleRemoveRole (index) {
+      this.attrs.splice(index, 1);
+      this.manyFormValidate.splice(index, 1);
+    },
+    // 删除属性
+    handleRemove2 (item, index) {
+      item.splice(index, 1);
+    },
+    // 添加规则名称
+    createAttrName () {
+      if (this.formDynamic.attrsName && this.formDynamic.attrsVal) {
+        let data = {
+          value: this.formDynamic.attrsName,
+          detail: [
+            this.formDynamic.attrsVal
+          ]
+        };
+        this.attrs.push(data);
+        var hash = {};
+        this.attrs = this.attrs.reduce(function (item, next) {
+          hash[next.value] ? '' : hash[next.value] = true && item.push(next);
+          return item
+        }, [])
+        this.clearAttr();
+        this.showIput = false;
+        this.createBnt = true;
+      } else {
+        this.$message.warning('请添加完整的规格!');
+      }
+    },
+    // 添加属性
+    createAttr (num, idx) {
+      if (num) {
+        this.attrs[idx].detail.push(num);
+        var hash = {};
+        this.attrs[idx].detail = this.attrs[idx].detail.reduce(function (item, next) {
+          hash[next] ? '' : hash[next] = true && item.push(next);
+          return item
+        }, [])
+      } else {
+        this.$message.warning('请添加属性!');
+      }
+    },
+    confirm () {
+      let that = this;
+      that.createBnt = true;
+      if (that.form.selectRule==null||that.form.selectRule.trim().length <= 0) {
+        return this.$message({
+          message:'请选择属性',
+          type: 'error'
+        });
+      }
+      that.ruleList.forEach(function (item, index) {
+        if (item.ruleName === that.form.selectRule) {
+          that.attrs =JSON.parse( item.ruleValue);
+
+        }
+      });
+
+    },
+    updateText(text){
+      this.form.description=text
+    },
+    handleClick(tab, event) {
+      this.queryParams.isShow=tab.name;
+      this.getList();
+    },
+    /** 转换商品分类数据结构 */
+    normalizer(node) {
+      if (node.children && !node.children.length) {
+        delete node.children;
+      }
+      return {
+        id: node.cateId,
+        label: node.cateName,
+        children: node.children
+      };
+    },
+    getTreeselect() {
+      getAllStoreProductCategory().then(response => {
+        this.categoryOptions = [];
+        const data = this.handleTree(response.data, "cateId", "pid");
+        this.categoryOptions=data;
+
+        this.buildCateMap(data);
+      });
+    },
+    /** 查询商品列表 */
+    getList() {
+      this.loading = true;
+      this.queryParams.isAudit= "0";
+      listStoreProduct(this.queryParams).then(response => {
+        this.storeProductList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+      this.isAuditMode = false; // 重置审核模式标志
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        productId: 0,
+        image: null,
+        video: null,
+        sliderImage: null,
+        productName: null,
+        productInfo: null,
+        keyword: null,
+        barCode: null,
+        cateId: null,
+        price: null,
+        vipPrice: null,
+        otPrice: null,
+        postage: null,
+        unitName: null,
+        sort: null,
+        sales: null,
+        stock: null,
+        isShow: "0",
+        isHot: "0",
+        isBenefit: "0",
+        isBest: "0",
+        isNew: "0",
+        description: null,
+        createTime: null,
+        updateTime: null,
+        isPostage: null,
+        isDel: null,
+        giveIntegral: null,
+        cost: null,
+        isGood: "0",
+        browse: null,
+        codePath: null,
+        tempId: "",
+        specType: 0,
+        isIntegral: null,
+        integral: null,
+        productType: "1",
+        prescribeCode: null,
+        prescribeSpec: null,
+        prescribeFactory: null,
+        prescribeName: null,
+        isDisplay:"1",
+        // companyIds:[],
+        isDrug: "0", // 是否药品
+        drugImage: null, // 头图展示
+        drugRegCertNo: null, // 药品注册证书编号
+        commonName: null, // 通用名称
+        dosageForm: null, // 剂型
+        unitPrice: null, // 单价
+        batchNumber: null, // 批号
+        mah: null, // 上市许可持有人
+        mahAddress: null, // 上市许可持有人地址
+        manufacturer: null, // 生产企业
+        manufacturerAddress: null, // 生产企业地址
+        indications: null, // 功能主治
+        dosage: null, // 用法用量
+        adverseReactions: null, // 不良反应
+        contraindications: null, // 禁忌
+        precautions: null // 注意事项
+      };
+      // 重置药品展示图
+      this.drugImageArr = [];
+      this.resetForm("form");
+      this.oneFormValidate = [
+        {
+          image: '',
+          price: 0,
+          agentPrice: 0,
+          cost: 0,
+          otPrice: 0,
+          stock: 0,
+          barCode: '',
+          weight: 0,
+          volume: 0,
+          integral: 0,
+          brokerage:0,
+          brokerageTwo:0
+        }
+      ]
+      this.attrs=[];
+      this.photoArr=[];
+      this.imageArr=[];
+      this.qualificationArr=[];
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      // this.queryParams.companyIds = this.companyId +''
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.productId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    handleUpdate(row) {
+      if (this.ids.length > 1) {
+        this.title = "审核商品";
+        this.open1 = true;
+        return;
+      }
+      var that = this;
+      this.reset();
+      const productId = row.productId || this.ids
+      getStoreProduct(productId).then(response => {
+        this.form = response.data;
+        this.form.isShow = response.data.isShow.toString();
+        this.form.isHot = response.data.isHot.toString();
+        this.form.isGood = response.data.isGood.toString();
+        this.form.isBest = response.data.isBest.toString();
+        this.form.isNew = response.data.isNew.toString();
+        this.form.productType = response.data.productType.toString();
+        this.form.isDisplay = response.data.isDisplay.toString();
+        if (this.form.business) {
+          this.businessArr = this.form.business.split(',');
+        }
+        if (this.form.license) {
+          this.licenseArr = this.form.license.split(',');
+        }
+        if (this.form.certificate) {
+          this.certificateArr = this.form.certificate.split(',');
+        }
+        if (this.form.voucher) {
+          this.voucherArr = this.form.voucher.split(',');
+        }
+        if (this.form.gmpAuth) {
+          this.gmpAuthArr = this.form.gmpAuth.split(',');
+        }
+        if (this.form.tuiCateId != null) {
+          this.form.tuiCateId = response.data.tuiCateId.toString();
+        }
+        if (this.form.reviewAudit != null) {
+          this.form.reviewAudit = response.data.reviewAudit.toString();
+        }
+        // this.form.isDrug = response.data.isDrug ? response.data.isDrug.toString() : "1";
+        this.form.isDrug = response.data.isDrug === 0 ? "0" : (response.data.isDrug ? response.data.isDrug.toString() : "1");
+        if (this.form.drugImage != null) {
+          this.drugImageArr = this.form.drugImage.split(",");
+        }
+        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' },
+          { expireKey: 'certificateExpire', startKey: 'certificateStart', endKey: 'certificateEnd' },
+          { expireKey: 'voucherExpire', startKey: 'voucherStart', endKey: 'voucherEnd' },
+          { expireKey: 'gmpAuthExpire', startKey: 'gmpAuthStart', endKey: 'gmpAuthEnd' },
+          { expireKey: 'qualificationExpire', startKey: 'qualificationCertificateStart', endKey: 'qualificationCertificateEnd' }
+        ];
+
+        expireFieldMap.forEach(item => {
+          const startVal = response.data[item.startKey];
+          const endVal = response.data[item.endKey];
+          if (startVal && endVal) {
+            this.$set(this.form, item.expireKey, [startVal, endVal]);
+          }
+        });
+
+        //组装attrs数据
+        if (response.attrs != null) {
+          this.attrs = [];
+          response.attrs.forEach(function (item, index) {
+            var data = {value: item.attrName, detail: item.attrValues.split(',')}
+            that.attrs.push(data);
+          });
+        }
+        const dateFields = [
+          'qualificationExpire'
+        ];
+        dateFields.forEach(field => {
+          const startField = field.replace('Expire', 'CertificateStart');  // qualificationCertificateStart
+          const endField = field.replace('Expire', 'CertificateEnd');      // qualificationCertificateEnd
+          if (this.form[startField] && this.form[endField]) {
+            this.$set(this.form, field, [this.form[startField], this.form[endField]]);
+          }
+        });
+        // // 组装companyIds
+        // if (response.data.companyIds != null && response.data.companyIds != undefined && response.data.companyIds.length > 0) {
+        //   this.form.companyIds = response.data.companyIds.split(',').map(Number);
+        // }
+        setTimeout(() => {
+          that.generate();
+        }, 200);
+        if (this.form.specType === 0) {
+          that.manyFormValidate = [];
+        } else {
+          that.createBnt = true;
+          that.oneFormValidate = [
+            {
+              image: '',
+              price: 0,
+              agentPrice: 0,
+              cost: 0,
+              otPrice: 0,
+              stock: 0,
+              barCode: '',
+              weight: 0,
+              volume: 0,
+              integral: 0,
+              brokerage: 0,
+              brokerageTwo: 0
+            }
+          ]
+        }
+        setTimeout(() => {
+          if (this.form.description == null) {
+            this.$refs.myeditor.setText("");
+          } else {
+            this.$refs.myeditor.setText(this.form.description);
+          }
+
+          if (this.form.instructionManual == null) {
+            this.$refs.instructionManualRef.setText("");
+          } else {
+            this.$refs.instructionManualRef.setText(this.form.instructionManual);
+          }
+        }, 200);
+        if (this.form.image != null) {
+          this.imageArr = this.form.image.split(",");
+        }
+        if (this.form.sliderImage != null) {
+          this.photoArr = this.form.sliderImage.split(",");
+        }
+        this.open = true;
+        this.title = "总库商品审核";
+        // 设置为审核模式,禁用商品信息表单
+        this.isAuditMode = true;
+      });
+    },
+    handleUpdate1(oper) {
+      let operStr = oper === 1 ? "审核通过" : "审核退回";
+      this.$confirm("是否确认"+operStr+"商品?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(()=> {
+        let param = {}
+        param.productIds = [this.form.productId];
+        param.reason = this.form1.reason;
+        param.attachImage = this.form1.attachImage;
+        param.isAudit=oper;
+        return batchAudit(param);
+      }).then(res => {
+        if(res.code === 200){
+          this.$message.success("审核成功");
+          this.open = false;
+          this.form = null;
+          this.form1.auditReason = null;
+          this.form1.attachment = null;
+          this.getList();
+          this.isAuditMode = false; // 重置审核模式标志
+        }else{
+          this.$message.error("审核失败",res.msg);
+        }
+      }).catch(function() {
+
+      }).finally(()=>{
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有商品数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportStoreProduct(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        }).catch(function() {});
+    },
+    /** 批量审核按钮操作 */
+    handleBatchUpdate(oper) {
+      let operStr = oper === 1 ? "审核通过" : "审核退回";
+      this.$confirm("是否确认批量"+operStr+"商品?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(()=> {
+        let param = {}
+        param.productIds = this.ids;
+        param.reason = this.form1.reason;
+        param.attachImage = this.form1.attachImage;
+        param.isAudit=oper;
+        return batchAudit(param);
+      }).then(res => {
+        if(res.code === 200){
+          this.$message.success("批量审核成功");
+          this.getList();
+        }else{
+          this.$message.error("批量审核失败",res.msg);
+        }
+      }).catch(function() {
+
+      }).finally(()=>{
+        this.open1 = false;
+        this.form1.reason = null;
+        this.form1.attachImage = null;
+      });
+    },
+    buildCateMap(nodes) {
+      nodes.forEach(node => {
+        this.cateIdToNameMap[node.cateId] = node.cateName;
+        if (node.children && node.children.length) {
+          this.buildCateMap(node.children);
+        }
+      });
+    },
+    updateInstructionManualText(text) {
+      this.form.instructionManual = text
+    },
+    handleReviewAudit(){
+      console.log("aaaaaaaaaaaaaaa->",this.form.reviewAudit);
+    },
+    switchChange(){
+      console.log(this.form.isBusinessLicensePermanent);
+    },
+  }
+};
+</script>
+<style scoped>::v-deep .el-upload-list__item-delete {
+  display: none !important;
+}
+</style>

+ 2 - 1
src/views/hisStore/storeOrder/healthStoreList.vue

@@ -396,7 +396,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleOrderDelete"
-          v-hasPermi="['store:storeOrder:remove']"
+          v-hasPermi="['store:healthStore:remove']"
         >删除
         </el-button>
       </el-col>
@@ -668,6 +668,7 @@
                   icon="el-icon-delete"
                   size="mini"
                   type="text"
+                  v-hasPermi="['store:healthStore:remove']"
                   @click="handleDelete(scope.row)"
                 >删除
                 </el-button>

+ 1 - 0
src/views/hisStore/storeOrder/index.vue

@@ -649,6 +649,7 @@
                       size="mini"
                       type="text"
                       icon="el-icon-delete"
+                      v-hasPermi="['store:storeOrder:remove']"
                       @click="handleDelete(scope.row)"
                     >删除</el-button>
                   </template>

+ 604 - 0
src/views/hisStore/storeOrderComment/index.vue

@@ -0,0 +1,604 @@
+<template>
+  <div class="app-container store-order-comment">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="88px" class="comment-query">
+      <el-form-item label="订单ID" prop="orderId">
+        <el-input
+          v-model="queryParams.orderId"
+          placeholder="请输入订单ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="订单编码" prop="orderCode">
+        <el-input
+          v-model="queryParams.orderCode"
+          placeholder="请输入订单编码"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商品名称" prop="productName">
+        <el-input
+          v-model="queryParams.productName"
+          placeholder="请输入商品名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商品ID" prop="productId">
+        <el-input
+          v-model="queryParams.productId"
+          placeholder="请输入商品ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="评价内容" prop="content">
+        <el-input
+          v-model="queryParams.content"
+          placeholder="请输入评价内容"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="评分" prop="rating">
+        <el-select v-model="queryParams.rating" placeholder="请选择评分" clearable size="small">
+          <el-option v-for="item in ratingOptions" :key="item" :label="item + ' 星'" :value="item"/>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="用户ID" prop="userId">
+        <el-input
+          v-model="queryParams.userId"
+          placeholder="请输入用户ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="用户昵称" prop="nickName">
+        <el-input
+          v-model="queryParams.nickName"
+          placeholder="请输入用户昵称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="店铺ID" prop="storeId">
+        <el-input
+          v-model="queryParams.storeId"
+          placeholder="请输入店铺ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="店铺名称" prop="storeName">
+        <el-input
+          v-model="queryParams.storeName"
+          placeholder="请输入店铺名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['his:comment:remove']"
+        >删除</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table
+      v-loading="loading"
+      :data="commentList"
+      border
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="50" align="center"/>
+      <el-table-column label="评价ID" align="center" prop="commentId" width="80"/>
+      <el-table-column label="订单信息" align="left" min-width="160">
+        <template slot-scope="scope">
+          <div class="cell-block">
+            <div class="cell-main">{{ scope.row.orderCode || '-' }}</div>
+            <div class="cell-sub">订单ID:{{ scope.row.orderId || '-' }}</div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="用户" align="left" min-width="120">
+        <template slot-scope="scope">
+          <div class="cell-block">
+            <div class="cell-main">{{ displayNickName(scope.row) }}</div>
+            <div class="cell-sub">UID:{{ scope.row.userId || '-' }}</div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="店铺" align="left" min-width="130">
+        <template slot-scope="scope">
+          <div class="cell-block">
+            <div class="cell-main">{{ scope.row.storeName || '-' }}</div>
+            <div class="cell-sub">店铺ID:{{ scope.row.storeId || '-' }}</div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="商品信息" align="left" min-width="180" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.productNames || '-' }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="评分" align="center" width="150">
+        <template slot-scope="scope">
+          <el-rate
+            :value="Number(scope.row.rating || 0)"
+            disabled
+            show-score
+            text-color="#ff9900"
+            score-template="{value}"
+          />
+        </template>
+      </el-table-column>
+      <el-table-column label="评价内容" align="left" min-width="200" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.content || '-' }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="图片" align="center" width="90">
+        <template slot-scope="scope">
+          <el-image
+            v-if="scope.row.imageUrl"
+            :src="firstImage(scope.row.imageUrl)"
+            :preview-src-list="splitImages(scope.row.imageUrl)"
+            fit="cover"
+            class="thumb-image"
+          />
+          <span v-else>-</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="商家回复" align="left" min-width="140" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.merchantReply || '-' }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="评价时间" align="center" prop="createTime" width="160"/>
+      <el-table-column label="操作" align="center" width="140" class-name="small-padding fixed-width" fixed="right">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleDetail(scope.row)"
+            v-hasPermi="['his:comment:query']"
+          >详情</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['his:comment:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 评价详情 -->
+    <el-drawer
+      title="订单评价详情"
+      :visible.sync="detailOpen"
+      size="640px"
+      append-to-body
+      custom-class="comment-detail-drawer"
+    >
+      <div v-loading="detailLoading" class="comment-detail">
+        <div class="detail-hero">
+          <div class="hero-top">
+            <div class="hero-user">
+              <div class="avatar">{{ avatarText(detail.nickName) }}</div>
+              <div>
+                <div class="hero-name">{{ displayNickName(detail) }}</div>
+                <div class="hero-meta">用户ID:{{ detail.userId || '-' }}</div>
+              </div>
+            </div>
+            <el-tag size="mini" :type="detail.isAnonymous == 1 ? 'info' : 'success'">
+              {{ detail.isAnonymous == 1 ? '匿名评价' : '实名评价' }}
+            </el-tag>
+          </div>
+          <div class="hero-rate">
+            <el-rate
+              :value="Number(detail.rating || 0)"
+              disabled
+              show-score
+              text-color="#ff9900"
+              score-template="{value} 分"
+            />
+          </div>
+          <div class="hero-content">{{ detail.content || '暂无评价内容' }}</div>
+          <div v-if="detail.imageUrl" class="hero-images">
+            <el-image
+              v-for="(img, idx) in splitImages(detail.imageUrl)"
+              :key="idx"
+              :src="img"
+              :preview-src-list="splitImages(detail.imageUrl)"
+              fit="cover"
+              class="detail-image"
+            />
+          </div>
+          <div v-if="detail.videoUrl" class="hero-video">
+            <a :href="detail.videoUrl" target="_blank" rel="noopener noreferrer">查看评价视频</a>
+          </div>
+        </div>
+
+        <div class="detail-section">
+          <div class="section-title">订单与店铺</div>
+          <el-descriptions :column="1" border size="small">
+            <el-descriptions-item label="评价ID">{{ detail.commentId || '-' }}</el-descriptions-item>
+            <el-descriptions-item label="订单ID">{{ detail.orderId || '-' }}</el-descriptions-item>
+            <el-descriptions-item label="订单编码">{{ detail.orderCode || '-' }}</el-descriptions-item>
+            <el-descriptions-item label="店铺ID">{{ detail.storeId || '-' }}</el-descriptions-item>
+            <el-descriptions-item label="店铺名称">{{ detail.storeName || '-' }}</el-descriptions-item>
+            <el-descriptions-item label="是否可见">{{ detail.isShow == 1 ? '可见' : '不可见' }}</el-descriptions-item>
+            <el-descriptions-item label="评价时间">{{ detail.createTime || '-' }}</el-descriptions-item>
+            <el-descriptions-item label="更新时间">{{ detail.updateTime || '-' }}</el-descriptions-item>
+          </el-descriptions>
+        </div>
+
+        <div class="detail-section">
+          <div class="section-title">商家回复</div>
+          <div class="reply-box">{{ detail.merchantReply || '暂无商家回复' }}</div>
+        </div>
+
+        <div class="detail-section">
+          <div class="section-title">关联商品</div>
+          <div v-if="detail.productList && detail.productList.length" class="product-list">
+            <div v-for="item in detail.productList" :key="item.productId" class="product-item">
+              <el-image
+                v-if="item.image"
+                :src="item.image"
+                fit="cover"
+                class="product-image"
+                :preview-src-list="[item.image]"
+              />
+              <div v-else class="product-image product-image-empty">无图</div>
+              <div class="product-info">
+                <div class="product-name">{{ item.productName || '-' }}</div>
+                <div class="product-meta">商品ID:{{ item.productId || '-' }}</div>
+                <div class="product-meta" v-if="item.price != null">售价:?{{ Number(item.price).toFixed(2) }}</div>
+              </div>
+            </div>
+          </div>
+          <div v-else class="empty-tip">{{ detail.productNames || '暂无关联商品' }}</div>
+        </div>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import { listStoreOrderComment, getStoreOrderComment, delStoreOrderComment } from '@/api/hisStore/storeOrderComment'
+
+export default {
+  name: 'HisStoreOrderComment',
+  data() {
+    return {
+      loading: true,
+      detailLoading: false,
+      ids: [],
+      multiple: true,
+      showSearch: true,
+      total: 0,
+      commentList: [],
+      detailOpen: false,
+      detail: {},
+      ratingOptions: [1, 2, 3, 4, 5],
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        orderId: null,
+        orderCode: null,
+        productName: null,
+        productId: null,
+        content: null,
+        rating: null,
+        userId: null,
+        nickName: null,
+        storeId: null,
+        storeName: null
+      }
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    getList() {
+      this.loading = true
+      listStoreOrderComment(this.queryParams).then(response => {
+        this.commentList = response.rows || []
+        this.total = response.total || 0
+        this.loading = false
+      }).catch(() => {
+        this.loading = false
+      })
+    },
+    handleQuery() {
+      this.queryParams.pageNum = 1
+      this.getList()
+    },
+    resetQuery() {
+      this.resetForm('queryForm')
+      this.handleQuery()
+    },
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.commentId)
+      this.multiple = !selection.length
+    },
+    handleDetail(row) {
+      this.detailOpen = true
+      this.detailLoading = true
+      this.detail = {}
+      getStoreOrderComment(row.commentId).then(response => {
+        this.detail = response.data || {}
+        this.detailLoading = false
+      }).catch(() => {
+        this.detailLoading = false
+      })
+    },
+    handleDelete(row) {
+      const commentIds = row.commentId || this.ids
+      this.$confirm('是否确认删除选中的订单评价?删除后列表将不再展示。', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        return delStoreOrderComment(commentIds)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(() => {})
+    },
+    displayNickName(row) {
+      if (!row) {
+        return '-'
+      }
+      if (row.isAnonymous == 1) {
+        return '匿名用户'
+      }
+      return row.nickName || '-'
+    },
+    firstImage(imageUrl) {
+      const list = this.splitImages(imageUrl)
+      return list.length ? list[0] : ''
+    },
+    splitImages(imageUrl) {
+      if (!imageUrl) {
+        return []
+      }
+      return String(imageUrl).split(',').map(item => item.trim()).filter(Boolean)
+    },
+    avatarText(name) {
+      const text = name || '评'
+      return String(text).substring(0, 1)
+    }
+  }
+}
+</script>
+
+<style scoped>
+.comment-query .el-input,
+.comment-query .el-select {
+  width: 200px;
+}
+
+.cell-block {
+  line-height: 1.4;
+}
+
+.cell-main {
+  color: #303133;
+  font-weight: 500;
+}
+
+.cell-sub {
+  margin-top: 2px;
+  color: #909399;
+  font-size: 12px;
+}
+
+.thumb-image {
+  width: 48px;
+  height: 48px;
+  border-radius: 4px;
+}
+
+.comment-detail {
+  padding: 0 20px 24px;
+}
+
+.detail-hero {
+  padding: 18px;
+  border-radius: 8px;
+  background: linear-gradient(135deg, #f7fafc 0%, #eef5ff 100%);
+  border: 1px solid #e4e7ed;
+}
+
+.hero-top {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.hero-user {
+  display: flex;
+  align-items: center;
+}
+
+.avatar {
+  width: 44px;
+  height: 44px;
+  margin-right: 12px;
+  border-radius: 50%;
+  background: #409eff;
+  color: #fff;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 18px;
+  font-weight: 600;
+}
+
+.hero-name {
+  font-size: 16px;
+  font-weight: 600;
+  color: #303133;
+}
+
+.hero-meta {
+  margin-top: 4px;
+  font-size: 12px;
+  color: #909399;
+}
+
+.hero-rate {
+  margin-top: 14px;
+}
+
+.hero-content {
+  margin-top: 12px;
+  line-height: 1.7;
+  color: #606266;
+  white-space: pre-wrap;
+  word-break: break-word;
+}
+
+.hero-images {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 8px;
+  margin-top: 12px;
+}
+
+.detail-image {
+  width: 88px;
+  height: 88px;
+  border-radius: 6px;
+}
+
+.hero-video {
+  margin-top: 10px;
+}
+
+.detail-section {
+  margin-top: 20px;
+}
+
+.section-title {
+  position: relative;
+  margin-bottom: 12px;
+  padding-left: 10px;
+  font-size: 14px;
+  font-weight: 600;
+  color: #303133;
+}
+
+.section-title::before {
+  content: '';
+  position: absolute;
+  left: 0;
+  top: 3px;
+  width: 3px;
+  height: 14px;
+  border-radius: 2px;
+  background: #409eff;
+}
+
+.reply-box {
+  min-height: 64px;
+  padding: 12px 14px;
+  border-radius: 6px;
+  background: #f5f7fa;
+  color: #606266;
+  line-height: 1.6;
+  white-space: pre-wrap;
+  word-break: break-word;
+}
+
+.product-list {
+  display: flex;
+  flex-direction: column;
+  gap: 10px;
+}
+
+.product-item {
+  display: flex;
+  align-items: center;
+  padding: 10px;
+  border: 1px solid #ebeef5;
+  border-radius: 6px;
+  background: #fff;
+}
+
+.product-image {
+  width: 56px;
+  height: 56px;
+  border-radius: 6px;
+  flex-shrink: 0;
+}
+
+.product-image-empty {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background: #f5f7fa;
+  color: #c0c4cc;
+  font-size: 12px;
+}
+
+.product-info {
+  margin-left: 12px;
+  min-width: 0;
+}
+
+.product-name {
+  color: #303133;
+  font-weight: 500;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.product-meta {
+  margin-top: 4px;
+  color: #909399;
+  font-size: 12px;
+}
+
+.empty-tip {
+  color: #909399;
+  font-size: 13px;
+}
+</style>

+ 33 - 2
src/views/hisStore/storeProductAudit/index.vue

@@ -26,6 +26,16 @@
         />
       </el-form-item>
 
+      <el-form-item label="来源标识" prop="sourceMark">
+        <el-input
+          v-model="queryParams.sourceMark"
+          placeholder="请输入来源标识,如库调"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
 
       <el-form-item label="商品类型" prop="productType">
         <el-select   v-model="queryParams.productType" placeholder="请选择商品类型" clearable size="small" >
@@ -99,6 +109,11 @@
           <span>{{ scope.row.commonName && scope.row.commonName !== '-' ? scope.row.commonName : scope.row.productName }}</span>
         </template>
       </el-table-column>
+      <el-table-column label="来源标识" align="center" prop="sourceMark" min-width="140" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.sourceMark || '-' }}</span>
+        </template>
+      </el-table-column>
 
       <el-table-column label="分类" align="center" prop="cateName" />
       <el-table-column label="所属公司" align="center" prop="companyName" />
@@ -167,7 +182,17 @@
     <el-dialog :title="title" v-if="open" :fullscreen="isFullscreen" :visible.sync="open" width="1000px" append-to-body :show-close="false">
       <template v-slot:title>
         <div style="display: flex; justify-content: space-between; align-items: center;">
-          <span>{{ title }}</span>
+          <div class="audit-dialog-title">
+            <span>{{ title }}</span>
+            <el-tag
+              v-if="form && form.sourceMark"
+              type="warning"
+              size="small"
+              effect="plain"
+              style="margin-left: 8px;">
+              {{ form.sourceMark }}
+            </el-tag>
+          </div>
           <div>
             <!-- 全屏按钮 -->
             <el-button type="text" @click="handleFullScreen" size="middle">
@@ -1024,6 +1049,7 @@ export default {
         productType: null,
         isShow: "1",
         barCode:null,
+        sourceMark: null,
         // companyIds: null
       },
       // 表单参数
@@ -1746,7 +1772,12 @@ export default {
   }
 };
 </script>
-<style scoped>::v-deep .el-upload-list__item-delete {
+<style scoped>
+::v-deep .el-upload-list__item-delete {
   display: none !important;
 }
+.audit-dialog-title {
+  display: flex;
+  align-items: center;
+}
 </style>

+ 25 - 0
src/views/system/config/config.vue

@@ -2292,6 +2292,31 @@
             >
             </el-switch>
           </el-form-item>
+          <el-form-item label="总商品库是否审核" prop="isPlatformProductAudit">
+            <el-switch
+              v-model="form27.isPlatformProductAudit"
+              active-color="#13ce66"
+              inactive-color="#ff4949"
+            >
+            </el-switch>
+          </el-form-item>
+          <el-form-item label="总库商品修改不重新审核字段" prop="platformProductColumns" v-if="form27.isPlatformProductAudit">
+            <el-select v-model="form27.platformProductColumns"
+                       filterable
+                       multiple
+                       clearable
+                       placeholder="请选择字段"
+                       size="small"
+                       style="width: 500px">
+              <el-option
+                v-for="column in storeProductScrmColumns"
+                :key="column.colName"
+                :label="column.colComment"
+                :value="column.colName"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="商品修改不重新审核字段" prop="productColumns" v-if="form27.isAudit">
             <el-select v-model="form27.productColumns"
                        filterable