소스 검색

优化订单页面

yjwang 1 주 전
부모
커밋
9a38f05cb9
3개의 변경된 파일371개의 추가작업 그리고 330개의 파일을 삭제
  1. 12 1
      src/views/store/storeAfterSales/index.vue
  2. 357 327
      src/views/store/storeOrder/index.vue
  3. 2 2
      src/views/store/storeProduct/index.vue

+ 12 - 1
src/views/store/storeAfterSales/index.vue

@@ -46,6 +46,16 @@
         </el-select>
       </el-form-item>
 
+      <el-form-item label="处方编码" prop="serialNo">
+        <el-input
+          v-model="queryParams.serialNo"
+          clearable
+          placeholder="请输入处方编码"
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -73,6 +83,7 @@
     <el-table height="570" v-loading="loading" border :data="salesList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="订单编号" align="center" prop="orderCode" width="180px"/>
+      <el-table-column align="center" label="处方编码" prop="serialNo" width="180px"/>
       <el-table-column label="店铺" align="center" prop="storeName" />
       <el-table-column label="所属公司" align="center" prop="companyName" />
       <el-table-column label="所属员工" align="center" prop="companyUserNickName" />
@@ -89,7 +100,7 @@
         </template>
       </el-table-column>
       <el-table-column label="售后状态" align="center" prop="salesStatus" >
-    
+
         <template slot-scope="scope">
           <dict-tag :options="afterSalesStatusOptions" :value="scope.row.salesStatus"/>
         </template>

+ 357 - 327
src/views/store/storeOrder/index.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
+    <el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" label-width="80px">
 
       <el-form-item label="订单号" prop="orderCode">
         <el-input
           v-model="queryParams.orderCode"
-          placeholder="请输入订单号"
           clearable
+          placeholder="请输入订单号"
           size="small"
           @keyup.enter.native="handleQuery"
         />
@@ -14,8 +14,8 @@
       <el-form-item label="收货人" prop="userName">
         <el-input
           v-model="queryParams.userName"
-          placeholder="请输入收货人"
           clearable
+          placeholder="请输入收货人"
           size="small"
           @keyup.enter.native="handleQuery"
         />
@@ -23,8 +23,8 @@
       <el-form-item label="电话" prop="userPhone">
         <el-input
           v-model="queryParams.userPhone"
-          placeholder="请输入收货人电话"
           clearable
+          placeholder="请输入收货人电话"
           size="small"
           @keyup.enter.native="handleQuery"
         />
@@ -32,8 +32,8 @@
       <el-form-item label="医生姓名" prop="doctorName">
         <el-input
           v-model="queryParams.doctorName"
-          placeholder="请输入医生姓名"
           clearable
+          placeholder="请输入医生姓名"
           size="small"
           @keyup.enter.native="handleQuery"
         />
@@ -41,41 +41,56 @@
       <el-form-item label="患者姓名" prop="patientName">
         <el-input
           v-model="queryParams.patientName"
-          placeholder="请输入患者姓名"
           clearable
+          placeholder="请输入患者姓名"
           size="small"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
 
       <el-form-item label="订单类型" prop="orderType">
-        <el-select v-model="queryParams.orderType" placeholder="状态" clearable size="small">
-                <el-option
-                  v-for="dict in orderTypeOptions"
-                  :key="dict.dictValue"
-                  :label="dict.dictLabel"
-                  :value="dict.dictValue"
-                />
-              </el-select>
+        <el-select v-model="queryParams.orderType" clearable placeholder="状态" size="small">
+          <el-option
+            v-for="dict in orderTypeOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
       </el-form-item>
 
       <el-form-item label="快递单号" prop="deliverySn">
         <el-input
           v-model="queryParams.deliverySn"
+          clearable
           placeholder="请输入快递单号"
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="下单时间" prop="createTime">
+        <el-date-picker v-model="createTime" end-placeholder="结束日期" range-separator="-" size="small"
+                        start-placeholder="开始日期" style="width: 220px" type="daterange" value-format="yyyy-MM-dd"
+                        @change="changeTime"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item label="支付时间" prop="payTime">
+        <el-date-picker v-model="payTime" end-placeholder="结束日期" range-separator="-" size="small" start-placeholder="开始日期"
+                        style="width: 220px" type="daterange" value-format="yyyy-MM-dd"
+                        @change="changePayTime"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item label="处方编码" prop="serialNo">
+        <el-input
+          v-model="queryParams.serialNo"
           clearable
+          placeholder="请输入处方编码"
           size="small"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-    <el-form-item label="下单时间" prop="createTime">
-           <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeTime"></el-date-picker>
-    </el-form-item>
-    <el-form-item label="支付时间" prop="payTime">
-           <el-date-picker v-model="payTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="changePayTime"></el-date-picker>
-    </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
@@ -84,71 +99,74 @@
       <el-col :span="1.5">
 
         <el-button v-if="isExport"
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          :loading="exportLoading"
-          @click="handleExport"
-        >导出</el-button>
+                   :loading="exportLoading"
+                   icon="el-icon-download"
+                   plain
+                   size="mini"
+                   type="warning"
+                   @click="handleExport"
+        >导出
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
-          type="info"
-          plain
           icon="el-icon-upload2"
+          plain
           size="mini"
+          type="info"
           @click="handleImport"
-        >导入运单号</el-button>
+        >导入运单号
+        </el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
-    <el-tabs type="card" v-model="actName" @tab-click="handleClickX">
+    <el-tabs v-model="actName" type="card" @tab-click="handleClickX">
       <el-tab-pane label="全部订单" name="10"></el-tab-pane>
       <el-tab-pane v-for="(item,index) in orderOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
     </el-tabs>
     <el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-   <el-table-column label="药品订单号" align="center" prop="orderCode" width="180px"/>
-     <el-table-column label="所属店铺" align="center" prop="storeName" />
-<!--     <el-table-column label="员工" align="center" prop="companyUserName" />-->
-     <el-table-column label="就诊人" align="center" prop="patientName" />
-     <el-table-column label="应收金额" align="center" prop="payPrice" />
-     <el-table-column label="实收金额" align="center" prop="payMoney" />
-     <el-table-column label="支付方式" align="center" prop="payType" >
-       <template slot-scope="scope">
-             <dict-tag :options="PayOptions" :value="scope.row.payType"/>
+      <el-table-column align="center" type="selection" width="55"/>
+      <el-table-column align="center" label="药品订单号" prop="orderCode" width="180px"/>
+      <el-table-column align="center" label="处方编码" prop="serialNo" width="180px"/>
+      <el-table-column align="center" label="所属店铺" prop="storeName"/>
+      <!--     <el-table-column label="员工" align="center" prop="companyUserName" />-->
+      <el-table-column align="center" label="就诊人" prop="patientName"/>
+      <el-table-column align="center" label="应收金额" prop="payPrice"/>
+      <el-table-column align="center" label="实收金额" prop="payMoney"/>
+      <el-table-column align="center" label="支付方式" prop="payType">
+        <template slot-scope="scope">
+          <dict-tag :options="PayOptions" :value="scope.row.payType"/>
         </template>
-     </el-table-column>
+      </el-table-column>
 
-       <el-table-column label="下单时间" align="center" prop="createTime" width="180" />
-       <el-table-column label="支付时间" align="center" prop="payTime" width="180" />
-       <el-table-column label="订单状态" align="center" prop="status" >
-         <template slot-scope="scope">
-               <dict-tag :options="orderOptions" :value="scope.row.status"/>
-          </template>
-       </el-table-column>
-    <el-table-column label="物流状态" align="center" prop="deliveryStatus" >
-      <template slot-scope="scope">
-            <dict-tag :options="deliveryStatusOptions" :value="scope.row.deliveryStatus"/>
-       </template>
-    </el-table-column>
-   <el-table-column label="结算状态" align="center" prop="deliveryPayStatus" >
-     <template slot-scope="scope">
-           <dict-tag :options="deliveryPayStatusOptions" :value="scope.row.deliveryPayStatus"/>
-      </template>
-   </el-table-column>
-      <el-table-column label="创建时间" align="center" prop="createTime"  width="150px"/>
-      <el-table-column label="修改时间" align="center" prop="updateTime"  width="150px"/>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="100px">
+      <el-table-column align="center" label="下单时间" prop="createTime" width="180"/>
+      <el-table-column align="center" label="支付时间" prop="payTime" width="180"/>
+      <el-table-column align="center" label="订单状态" prop="status">
+        <template slot-scope="scope">
+          <dict-tag :options="orderOptions" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="物流状态" prop="deliveryStatus">
+        <template slot-scope="scope">
+          <dict-tag :options="deliveryStatusOptions" :value="scope.row.deliveryStatus"/>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="结算状态" prop="deliveryPayStatus">
+        <template slot-scope="scope">
+          <dict-tag :options="deliveryPayStatusOptions" :value="scope.row.deliveryPayStatus"/>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="创建时间" prop="createTime" width="150px"/>
+      <el-table-column align="center" label="修改时间" prop="updateTime" width="150px"/>
+      <el-table-column align="center" class-name="small-padding fixed-width" fixed="right" label="操作" width="100px">
         <template slot-scope="scope">
 
-   <el-button
-              size="mini"
-              type="text"
-              @click="handledetails(scope.row)"
-            >查看
-  </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            @click="handledetails(scope.row)"
+          >查看
+          </el-button>
 
 
         </template>
@@ -157,93 +175,106 @@
 
     <pagination
       v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
+      :page.sync="queryParams.pageNum"
+      :total="total"
       @pagination="getList"
     />
 
-   <el-drawer
-        :with-header="false"
-        size="75%"
-         :title="show.title" :visible.sync="show.open">
-     <storeOrderDetails  ref="Details" />
-   </el-drawer>
-  <!-- 用户导入对话框 -->
-<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+    <el-drawer
+      :title="show.title"
+      :visible.sync="show.open"
+      :with-header="false" size="75%"
+    >
+      <storeOrderDetails ref="Details"/>
+    </el-drawer>
+    <!-- 用户导入对话框 -->
+    <el-dialog :title="upload.title" :visible.sync="upload.open" append-to-body width="400px">
       <el-upload
         ref="upload"
-        :limit="1"
-        accept=".xlsx, .xls"
-        :headers="upload.headers"
         :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :auto-upload="false"
         :disabled="upload.isUploading"
+        :headers="upload.headers"
+        :limit="1"
         :on-progress="handleFileUploadProgress"
         :on-success="handleFileSuccess"
-        :auto-upload="false"
+        accept=".xlsx, .xls"
         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">
+        <div slot="tip" class="el-upload__tip text-center">
+          <div slot="tip" class="el-upload__tip">
           </div>
           <span>仅允许导入xls、xlsx格式文件。</span>
-          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+          <el-link :underline="false" style="font-size:12px;vertical-align: baseline;" type="primary"
+                   @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 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 { listOrder, getOrder, delOrder, addOrder, updateOrder, exportOrder,importTemplate } from "@/api/store/storeOrder";
-import storeOrderDetails from '../../components/store/storeOrderDetails.vue';
-import { getToken } from "@/utils/auth";
-import {listStore} from "@/api/store/storeProduct";
+import {
+  listOrder,
+  getOrder,
+  delOrder,
+  addOrder,
+  updateOrder,
+  exportOrder,
+  importTemplate
+} from '@/api/store/storeOrder'
+import storeOrderDetails from '../../components/store/storeOrderDetails.vue'
+import { getToken } from '@/utils/auth'
+import { listStore } from '@/api/store/storeProduct'
+
 export default {
-  name: "Order",
+  name: 'Order',
   components: { storeOrderDetails },
   data() {
     return {
-      isExport:false,
-      actName:"10",
-      show:{
-              title:"订单详情",
-              open:false,
-            },
+      isExport: false,
+      actName: '10',
+      show: {
+        title: '订单详情',
+        open: false
+      },
 
       importExpress: {
-              // 是否显示弹出层
-              open: false,
-              // 弹出层标题
-              title: "",
-              // 是否禁用上传
-              isUploading: false,
-              // 是否更新已经存在的用户数据
-              updateSupport: 0,
-              // 设置上传的请求头部
-              headers: { Authorization: "Bearer " + getToken() },
-              // 上传的地址
-              url: process.env.VUE_APP_BASE_API + "/store/storeOrder/importExpress"
-            },
+        // 是否显示弹出层
+        open: false,
+        // 弹出层标题
+        title: '',
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: 'Bearer ' + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + '/store/storeOrder/importExpress'
+      },
       upload: {
         // 是否显示弹出层
         open: false,
         // 弹出层标题
-        title: "",
+        title: '',
         // 是否禁用上传
         isUploading: false,
         // 是否更新已经存在的用户数据
         updateSupport: 0,
         // 设置上传的请求头部
-        headers: { Authorization: "Bearer " + getToken() },
+        headers: { Authorization: 'Bearer ' + getToken() },
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/store/storeOrder/importData"
+        url: process.env.VUE_APP_BASE_API + '/store/storeOrder/importData'
       },
       // 遮罩层
       loading: true,
@@ -262,9 +293,9 @@ export default {
       // 订单表格数据
       orderList: [],
       // 弹出层标题
-      title: "",
-      createTime:null,
-      payTime:null,
+      title: '',
+      createTime: null,
+      payTime: null,
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -305,160 +336,158 @@ export default {
         finishTime: null,
         patientName: null,
         doctorName: null,
-        sTime:null,
-        eTime:null,
-        paysTime:null,
-        payeTime:null,
+        sTime: null,
+        eTime: null,
+        paysTime: null,
+        payeTime: null,
         deliveryTime: null,
         tuiMoney: null,
         tuiMoneyStatus: null,
         tuiUserId: null,
         orderCreateType: null,
-        companyUserName:null,
-        companyName:null,
+        companyUserName: null,
+        companyName: null
       },
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      },
-       PayOptions:[],
-       orderOptions:[],
-       payStatusOptions:[],
-       refundOptions:[],
-       channelOptions:[],
-       orderTypeOptions:[],
-       tuiOptions:[],
-       orOptions:[],
-       storeOPtions:[],
-       deliveryPayStatusOptions:[],
-       deliveryStatusOptions:[],
-    };
+      rules: {},
+      PayOptions: [],
+      orderOptions: [],
+      payStatusOptions: [],
+      refundOptions: [],
+      channelOptions: [],
+      orderTypeOptions: [],
+      tuiOptions: [],
+      orOptions: [],
+      storeOPtions: [],
+      deliveryPayStatusOptions: [],
+      deliveryStatusOptions: []
+    }
   },
   created() {
-    this.isShow();
-    this.getstoreList();
-    this.getList();
-    this.getDicts("sys_store_pay_type").then(response => {
-        this.PayOptions = response.data;
-      });
-    this.getDicts("store_order_type").then(response => {
-        this.orderTypeOptions = response.data;
-      });
-    this.getDicts("sys_order_status").then(response => {
-        this.orderOptions = response.data;
-      });
-    this.getDicts("sys_order_pay").then(response => {
-        this.payStatusOptions = response.data;
-      });
-    this.getDicts("sys_refund_status").then(response => {
-        this.refundOptions = response.data;
-      });
-    this.getDicts("sys_channel").then(response => {
-        this.channelOptions = response.data;
-      });
-    this.getDicts("sys_tui_money_status").then(response => {
-          this.tuiOptions = response.data;
-        });
-    this.getDicts("sys_company_or").then(response => {
-          this.orOptions = response.data;
-        });
-    this.getDicts("sys_store_delivery_pay_status").then(response => {
-          this.deliveryPayStatusOptions = response.data;
-        });
-    this.getDicts("sys_store_order_delivery_status").then(response => {
-          this.deliveryStatusOptions = response.data;
-        });
-
+    this.isShow()
+    this.getstoreList()
+    this.getList()
+    this.getDicts('sys_store_pay_type').then(response => {
+      this.PayOptions = response.data
+    })
+    this.getDicts('store_order_type').then(response => {
+      this.orderTypeOptions = response.data
+    })
+    this.getDicts('sys_order_status').then(response => {
+      this.orderOptions = response.data
+    })
+    this.getDicts('sys_order_pay').then(response => {
+      this.payStatusOptions = response.data
+    })
+    this.getDicts('sys_refund_status').then(response => {
+      this.refundOptions = response.data
+    })
+    this.getDicts('sys_channel').then(response => {
+      this.channelOptions = response.data
+    })
+    this.getDicts('sys_tui_money_status').then(response => {
+      this.tuiOptions = response.data
+    })
+    this.getDicts('sys_company_or').then(response => {
+      this.orOptions = response.data
+    })
+    this.getDicts('sys_store_delivery_pay_status').then(response => {
+      this.deliveryPayStatusOptions = response.data
+    })
+    this.getDicts('sys_store_order_delivery_status').then(response => {
+      this.deliveryStatusOptions = response.data
+    })
 
   },
   methods: {
     handleImportExpress() {
-          this.importExpress.title = "导入";
-          this.importExpress.open = true;
-        },
-        /** 下载模板操作 */
-        importTemplateExpress() {
-          importExpressTemplate().then(response => {
-            this.download(response.msg);
-          });
-        },
-        // 文件上传中处理
-        handleFileUploadProgressExpress(event, file, fileList) {
-          this.upload.isUploading = true;
-        },
-        // 文件上传成功处理
-        handleFileSuccessExpress(response, file, fileList) {
-          this.importExpress.open = false;
-          this.importExpress.isUploading = false;
-          this.$refs.importExpress.clearFiles();
-          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
-          this.getList();
-        },
-        // 提交上传文件
-        submitFileFormExpress() {
-          this.$refs.importExpress.submit();
-        },
-        isShow(){
-          var id=this.$store.state.user.storeId
-                if(id!=30&&id!=31&&id!=33){
-                  this.isExport=true;
-                }
-        },
+      this.importExpress.title = '导入'
+      this.importExpress.open = true
+    },
+    /** 下载模板操作 */
+    importTemplateExpress() {
+      importExpressTemplate().then(response => {
+        this.download(response.msg)
+      })
+    },
+    // 文件上传中处理
+    handleFileUploadProgressExpress(event, file, fileList) {
+      this.upload.isUploading = true
+    },
+    // 文件上传成功处理
+    handleFileSuccessExpress(response, file, fileList) {
+      this.importExpress.open = false
+      this.importExpress.isUploading = false
+      this.$refs.importExpress.clearFiles()
+      this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true })
+      this.getList()
+    },
+    // 提交上传文件
+    submitFileFormExpress() {
+      this.$refs.importExpress.submit()
+    },
+    isShow() {
+      var id = this.$store.state.user.storeId
+      if (id != 30 && id != 31 && id != 33) {
+        this.isExport = true
+      }
+    },
 
     /** 导入按钮操作 */
     handleImport() {
-        this.upload.title = "导入";
-        this.upload.open = true;
-       },
+      this.upload.title = '导入'
+      this.upload.open = true
+    },
 
-      /** 下载模板操作 */
-      importTemplate() {
-        importTemplate().then(response => {
-          this.download(response.msg);
-        });
-      },
-      // 文件上传中处理
-      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();
-      },
-      // 提交上传文件
-      submitFileForm() {
-        this.$refs.upload.submit();
-      },
-    handledetails(row){
-        this.show.open=true;
-        setTimeout(() => {
-             this.$refs.Details.getOrder(row.id);
-        }, 1);
-        },
+    /** 下载模板操作 */
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg)
+      })
+    },
+    // 文件上传中处理
+    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()
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit()
+    },
+    handledetails(row) {
+      this.show.open = true
+      setTimeout(() => {
+        this.$refs.Details.getOrder(row.id)
+      }, 1)
+    },
     getstoreList() {
       listStore().then(response => {
-        this.storeOPtions = response.rows;
-      });
+        this.storeOPtions = response.rows
+      })
     },
     /** 查询订单列表 */
     getList() {
-      this.loading = true;
+      this.loading = true
       listOrder(this.queryParams).then(response => {
-        this.orderList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
+        this.orderList = response.rows
+        this.total = response.total
+        this.loading = false
+      })
 
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.reset();
+      this.open = false
+      this.reset()
     },
     // 表单重置
     reset() {
@@ -481,7 +510,7 @@ export default {
         createTime: null,
         updateTime: null,
         status: null,
-        refundStatus: "0",
+        refundStatus: '0',
         refundImg: null,
         refundExplain: null,
         refundTime: null,
@@ -504,126 +533,127 @@ export default {
         tuiMoneyStatus: 0,
         tuiUserId: null,
         orderCreateType: null
-      };
-      this.resetForm("form");
+      }
+      this.resetForm('form')
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
+      this.queryParams.pageNum = 1
+      this.getList()
     },
-   handleClickX(tab, event) {
-    if(tab.name=="10"){
-      this.queryParams.status=null;
-    }else{
-      this.queryParams.status=tab.name;
-    }
-     this.handleQuery();
-   },
-  changeTime(){
-        if(this.createTime!=null){
-          this.queryParams.sTime=this.createTime[0];
-          this.queryParams.eTime=this.createTime[1];
-        }else{
-          this.queryParams.sTime=null;
-          this.queryParams.eTime=null;
-        }
-
-      },
-  changePayTime(){
-      if(this.payTime!=null){
-        this.queryParams.sTime=this.payTime[0];
-        this.queryParams.eTime=this.payTime[1];
-      }else{
-        this.queryParams.paysTime=null;
-        this.queryParams.payeTime=null;
+    handleClickX(tab, event) {
+      if (tab.name == '10') {
+        this.queryParams.status = null
+      } else {
+        this.queryParams.status = tab.name
+      }
+      this.handleQuery()
+    },
+    changeTime() {
+      if (this.createTime != null) {
+        this.queryParams.sTime = this.createTime[0]
+        this.queryParams.eTime = this.createTime[1]
+      } else {
+        this.queryParams.sTime = null
+        this.queryParams.eTime = null
       }
 
     },
+    changePayTime() {
+      if (this.payTime != null) {
+        this.queryParams.sTime = this.payTime[0]
+        this.queryParams.eTime = this.payTime[1]
+      } else {
+        this.queryParams.paysTime = null
+        this.queryParams.payeTime = null
+      }
 
+    },
 
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-       this.createTime=null;
-      this.queryParams.sTime=null;
-      this.queryParams.eTime=null;
-       this.payTime=null;
-      this.queryParams.paysTime=null;
-      this.queryParams.payeTime=null;
-      this.handleQuery();
+      this.resetForm('queryForm')
+      this.createTime = null
+      this.queryParams.sTime = null
+      this.queryParams.eTime = null
+      this.payTime = null
+      this.queryParams.paysTime = null
+      this.queryParams.payeTime = null
+      this.handleQuery()
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.orderId)
-      this.single = selection.length!==1
+      this.single = selection.length !== 1
       this.multiple = !selection.length
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加订单";
+      this.reset()
+      this.open = true
+      this.title = '添加订单'
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset();
+      this.reset()
       const orderId = row.orderId || this.ids
       getOrder(orderId).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改订单";
-      });
+        this.form = response.data
+        this.open = true
+        this.title = '修改订单'
+      })
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs['form'].validate(valid => {
         if (valid) {
           if (this.form.orderId != null) {
             updateOrder(this.form).then(response => {
-              this.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
+              this.msgSuccess('修改成功')
+              this.open = false
+              this.getList()
+            })
           } else {
             addOrder(this.form).then(response => {
-              this.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+              this.msgSuccess('新增成功')
+              this.open = false
+              this.getList()
+            })
           }
         }
-      });
+      })
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const orderIds = row.orderId || this.ids;
-      this.$confirm('是否确认删除订单编号为"' + orderIds + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delOrder(orderIds);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(() => {});
+      const orderIds = row.orderId || this.ids
+      this.$confirm('是否确认删除订单编号为"' + orderIds + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delOrder(orderIds)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(() => {
+      })
     },
     /** 导出按钮操作 */
     handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有订单数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          this.exportLoading = true;
-          return exportOrder(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        }).catch(() => {});
+      const queryParams = this.queryParams
+      this.$confirm('是否确认导出所有订单数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.exportLoading = true
+        return exportOrder(queryParams)
+      }).then(response => {
+        this.download(response.msg)
+        this.exportLoading = false
+      }).catch(() => {
+      })
     }
   }
-};
+}
 </script>

+ 2 - 2
src/views/store/storeProduct/index.vue

@@ -1019,7 +1019,7 @@
 <!--          </el-date-picker>-->
 <!--        </el-form-item>-->
 
-        <el-form-item v-if="form.isShow === '1'" label="GMP认证" prop="gmpAuth">
+        <el-form-item v-if="form.isShow === '1'" label="GMP/GSP认证证书" prop="gmpAuth">
           <Material v-model="gmpAuthArr" type="image" :num="1" :width="150" :height="150"/>
         </el-form-item>
         <el-form-item v-if="form.isShow === '1' && gmpAuthArr.length > 0" prop="gmpAuthExpire">
@@ -1513,7 +1513,7 @@ export default {
           { required: true, message: "Ⅰ类Ⅱ类备案凭证有效期不能为空!", trigger: "change" }
         ],
         gmpAuth: [
-          { required: false, message: "GMP认证不能为空!", trigger: "change" }
+          { required: true, message: "GMP认证不能为空!", trigger: "change" }
         ],
         gmpAuthExpire: [
           { required: true, message: "GMP认证有效期不能为空!", trigger: "change" }