chenrui 4 yıl önce
ebeveyn
işleme
6fbf9ebbf6

+ 17 - 7
src/views/productManagement/productInfo/edit.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="productInfoEdit-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="productInfoEdit-cont">
+    <a-page-header :ghost="false" :backIcon="false" class="productInfoEdit-cont" >
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
-        <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
+        <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
       </template>
     </a-page-header>
     <a-form-model
@@ -186,11 +186,16 @@
           </a-col>
         </a-row>
       </a-card>
-
     </a-form-model>
-    <a-affix :offset-bottom="0" style="z-index: 100;">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 30px 0;box-shadow: 0 0 20px #dcdee2;z-index: 100;">
-        <a-button type="primary" id="productInfoEdit-submit-btn" size="large" @click="handleSubmit" style="padding: 0 60px;">提交</a-button>
+    <a-affix :offset-bottom="0" class="affix">
+      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+        <a-button
+          type="primary"
+          class="button-primary"
+          id="productInfoEdit-submit-btn"
+          size="large"
+          @click="handleSubmit"
+          style="padding: 0 60px;">提交</a-button>
       </div>
     </a-affix>
   </div>
@@ -234,7 +239,7 @@ export default {
     handleSubmit () {},
     // 返回
     handleBack () {
-      this.$router.push({ path: '/dealerManagement/productInfo/list' })
+      this.$router.push({ path: '/productManagement/productInfo/list' })
     },
     // 产品图片上传
     changeHomeImage (file) {
@@ -341,5 +346,10 @@ export default {
         z-index: 0;
       }
     }
+    .affix{
+      .ant-affix{
+        z-index: 101;
+      }
+    }
   }
 </style>

+ 11 - 3
src/views/productManagement/productInfo/list.vue

@@ -72,9 +72,9 @@
     <!-- 操作按钮 -->
     <div class="table-operator">
       <a-button id="productInfoList-add" type="primary" @click="handleEdit()">新增产品</a-button>
-      <a-button id="productInfoList-import" :disabled="!hasSelected" :loading="loading" @click="handleBatchAudit" style="margin: 0 15px;">批量审核</a-button>
-      <a-button id="productInfoList-import" :disabled="!hasSelected" :loading="loading" @click="handleBatchLaunch" style="margin: 0 15px;">批量上线</a-button>
-      <a-button id="productInfoList-import" :disabled="!hasSelected" :loading="loading" @click="handleBatchDownline" style="margin: 0 15px;">批量下线</a-button>
+      <a-button id="productInfoList-import" :loading="loading" @click="handleBatchAudit" style="margin: 0 15px;">批量审核</a-button>
+      <a-button id="productInfoList-import" :loading="loading" @click="handleBatchLaunch" style="margin: 0 15px;">批量上线</a-button>
+      <a-button id="productInfoList-import" :loading="loading" @click="handleBatchDownline" style="margin: 0 15px;">批量下线</a-button>
       <span style="margin-left: 8px">
         <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
       </span>
@@ -254,6 +254,10 @@ export default {
     },
     // 批量审核
     handleBatchAudit () {
+      if (this.selectedRowKeys.length < 1) {
+        this.$message.warning('请在列表勾选后再进行批量操作!')
+        return
+      }
       const _this = this
       this.$confirm({
         title: '提示',
@@ -271,6 +275,10 @@ export default {
     },
     // 批量上线
     handleBatchLaunch () {
+      if (this.selectedRowKeys.length < 1) {
+        this.$message.warning('请在列表勾选后再进行批量操作!')
+        return
+      }
       const _this = this
       this.$confirm({
         title: '提示',