浏览代码

商品页面查询优化

yjwang 6 天之前
父节点
当前提交
034156c580
共有 2 个文件被更改,包括 63 次插入2 次删除
  1. 1 1
      src/api/hisStore/storeOrder.js
  2. 62 1
      src/views/hisStore/storeProduct/index.vue

+ 1 - 1
src/api/hisStore/storeOrder.js

@@ -344,4 +344,4 @@ export function updateCommentInfo(data) {
     method: 'put',
     data: data
   })
-}
+}

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

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
 
       <el-form-item label="商品分类" prop="cateId">
         <treeselect  v-model="queryParams.cateId"  style="width:205.4px" :options="categoryOptions" :normalizer="normalizer" placeholder="请选择分类" />
@@ -211,6 +211,35 @@
           size="small"
         />
       </el-form-item>
+
+        <el-form-item label="交易状态" prop="transactionStatus">
+          <el-select v-model="queryParams.transactionStatus" placeholder="请选择" clearable>
+            <el-option
+              v-for="item in orderOptions"
+              :key="item.dictValue"
+              :label="item.dictLabel"
+              :value="item.dictValue"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="商品评价" prop="commentContent">
+          <el-input
+            v-model="queryParams.commentContent"
+            placeholder="商品评价"
+            clearable
+            size="small"
+          />
+        </el-form-item>
+        <el-form-item label="咨询/投诉" prop="complaint">
+          <el-input
+            v-model="queryParams.complaint"
+            placeholder="咨询/投诉"
+            clearable
+            size="small"
+          />
+        </el-form-item>
       </div>
       <!-- <el-form-item label="状态" prop="isShow">
          <el-select style="width: 240px" v-model="queryParams.isShow" placeholder="请选择状态" clearable size="small" >
@@ -970,6 +999,9 @@ export default {
     singleImg,
   },
   created() {
+    this.getDicts("sys_order_status").then(response => {
+      this.orderOptions = response.data;
+    });
     this.getDicts("store_product_tui_cate").then((response) => {
       this.productTuiCateOptions = response.data;
     });
@@ -1024,6 +1056,7 @@ export default {
   },
   data() {
     return {
+      orderOptions:[],
       medicalMallConfig:{},
       companyId: null,
       storeId: null,
@@ -1455,6 +1488,9 @@ export default {
     /** 查询商品列表 */
     getList() {
       this.loading = true;
+      if(this.queryParams.storeIds !== null && this.queryParams.storeIds.length === 0){
+        this.queryParams.storeIds = null;
+      }
       listStoreProduct(this.queryParams).then(response => {
         this.storeProductList = response.rows;
         this.total = response.total;
@@ -1561,6 +1597,31 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      // 查询参数
+      this.queryParams={
+          pageNum: 1,
+          pageSize: 10,
+          productName: null,
+          productType: null,
+          isShow: "1",
+          barCode:null,
+          // companyIds: null,
+          storeIds: 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.handleQuery();
     },
     // 多选框选中数据