lilei 1 month ago
parent
commit
3af7e16063

+ 12 - 12
src/views/promotionRulesManagement/dealerPromotions/tableType1.vue

@@ -49,7 +49,7 @@
       <template slot="productBrand" slot-scope="text, record,index">
         <div v-if="!record.productThisList || record.productThisList.length==0">
           <div style="display: flex;align-items: center;" v-if="record.productBrandArr && record.productBrandArr.length>0">
-            <div :span="20" style="max-height:126px;overflow-y:auto;flex-grow: 1;display: flex;flex-wrap: wrap;">
+            <div style="max-height:126px;overflow-y:auto;flex-grow: 1;display: flex;flex-wrap: wrap;">
               <a-tag
                 v-for="item in record.productBrandArr"
                 :key="item.brandSn"
@@ -60,7 +60,7 @@
                 {{ item.brandName }}
               </a-tag>
             </div>
-            <div :span="4" style="text-align:center;padding-left:10px;">
+            <div style="text-align:center;padding-left:10px;">
               <a-tag style="background: #fff; borderStyle: dashed;cursor:pointer" title="添加品牌" :id="'tableType-addBrand'+record.productScopeSn" @click="addBrandTag(index, record)" color="blue">
                 <a-icon type="plus" />
               </a-tag>
@@ -81,13 +81,13 @@
       <!-- 产品 -->
       <template slot="product" slot-scope="text, record,index">
         <div v-if="(record.productBrandArr && record.productBrandArr.length>0)||(record.productTypeArr && record.productTypeArr.length>0)">
-          <a-tag style="background: #fff; borderStyle: dashed;" :style="{color:'grey',cursor:'not-allowed'}">
+          <a-tag style="background: #fff; borderStyle: dashed;cursor:pointer" title="添加产品" :style="{color:'grey',cursor:'not-allowed'}">
             <a-icon type="plus" />
           </a-tag>
         </div>
-        <div style="max-height:126px;overflow-y:scroll;" v-else>
-          <a-row v-if="record.productThisList && record.productThisList.length>0">
-            <a-col :span="20">
+        <div v-else>
+          <div style="display: flex;align-items: center;" v-if="record.productThisList && record.productThisList.length>0">
+            <div style="max-height:126px;overflow-y:auto;flex-grow: 1;display: flex;flex-wrap: wrap;">
               <a-tag
                 style="margin-bottom:10px;"
                 closable
@@ -97,16 +97,16 @@
                 :key="item.productSn">
                 {{ item.productCode }}
               </a-tag>
-            </a-col>
-            <a-col :span="4" style="text-align:right;">
-              <a-tag style="background: #fff; borderStyle: dashed;" :id="'tableType-addProduct'+record.productScopeSn" @click="addProductTag(index, record)" color="blue">
+            </div>
+            <div style="text-align:center;padding-left:10px;">
+              <a-tag style="background: #fff; borderStyle: dashed;cursor:pointer" title="添加产品" :id="'tableType-addProduct'+record.productScopeSn" @click="addProductTag(index, record)" color="blue">
                 <a-icon type="plus" />
               </a-tag>
-            </a-col>
-          </a-row>
+            </div>
+          </div>
           <a-row v-else>
             <a-col :span="24">
-              <a-tag style="background: #fff; borderStyle: dashed;" :id="'tableType-addProduct'+record.productScopeSn" @click="addProductTag(index, record)" color="blue">
+              <a-tag style="background: #fff; borderStyle: dashed;cursor:pointer" title="添加产品" :id="'tableType-addProduct'+record.productScopeSn" @click="addProductTag(index, record)" color="blue">
                 <a-icon type="plus" />
               </a-tag>
             </a-col>

+ 24 - 28
src/views/promotionRulesManagement/dealerPromotions/tableType3.vue

@@ -14,8 +14,8 @@
       <!-- 产品分类 -->
       <template slot="productType" slot-scope="text, record,index">
         <div style="max-height:126px;width:100%;overflow-y:auto;" v-if="record.dataSourceOrigin=='0'">
-          <a-row v-if="record.productTypeArr && record.productTypeArr.length>0">
-            <a-col :span="17">
+          <div style="display: flex;align-items: center;" v-if="record.productTypeArr && record.productTypeArr.length>0">
+            <div style="max-height:126px;overflow-y:auto;flex-grow: 1;display: flex;flex-wrap: wrap;">
               <div v-for="con in record.productTypeArr" :key="con.id">
                 <a-tooltip v-if="con.title&&con.title.length > 7" :title="con.title">
                   <a-tag style="margin-bottom:10px;" :id="'tableaaType-delType'+record.productScopeSn" closable @close.prevent="delLabel(record.productScopeSn,con,'typeList')">
@@ -26,28 +26,26 @@
                   {{ con.title }}
                 </a-tag>
               </div>
-            </a-col>
-            <a-col :span="6" style="text-align:right;">
-              <a-tag style="background: #fff; borderStyle: dashed;" :id="'tableaaType-addType'+record.productScopeSn" @click="addClassifyTag(index, record)" color="blue">
+            </div>
+            <div style="text-align:center;padding-left:10px;">
+              <a-tag style="background: #fff; borderStyle: dashed;cursor:pointer" title="添加分类" :id="'tableaaType-addType'+record.productScopeSn" @click="addClassifyTag(index, record)" color="blue">
                 <a-icon type="plus" />
               </a-tag>
-            </a-col>
-          </a-row>
-          <a-row v-else>
-            <a-col :span="24">
-              <a-tag style="background: #fff; borderStyle: dashed;" :id="'tableaaType-addType'+record.productScopeSn" @click="addClassifyTag(index, record)" color="blue">
-                <a-icon type="plus" />
-              </a-tag>
-            </a-col>
-          </a-row>
+            </div>
+          </div>
+          <div v-else>
+            <a-tag style="background: #fff; borderStyle: dashed;cursor:pointer" title="添加分类" :id="'tableaaType-addType'+record.productScopeSn" @click="addClassifyTag(index, record)" color="blue">
+              <a-icon type="plus" />
+            </a-tag>
+          </div>
         </div>
         <span v-else v-for="con in record.productTypeArr" :key="con.id">{{ con.title }}</span>
       </template>
       <!-- 品牌 -->
       <template slot="productBrand" slot-scope="text, record,index">
         <div v-if="record.dataSourceOrigin=='0'">
-          <a-row v-if="record.productBrandArr && record.productBrandArr.length>0">
-            <a-col :span="18" style="max-height:126px;width:100%;overflow-y:auto;">
+          <div style="display: flex;align-items: center;" v-if="record.productBrandArr && record.productBrandArr.length>0">
+            <div :span="18" style="max-height:126px;width:100%;overflow-y:auto;">
               <div v-for="item in record.productBrandArr" :key="item.brandSn">
                 <a-tooltip v-if="item.brandName&&item.brandName.length > 7" :title="item.brandName">
                   <a-tag style="margin-bottom:10px;" :id="'tableaaType-delBrand'+record.productScopeSn" closable @close.prevent="delLabel(record.productScopeSn,item,'brandList')">
@@ -58,20 +56,18 @@
                   {{ item.brandName }}
                 </a-tag>
               </div>
-            </a-col>
-            <a-col :span="6" style="text-align:right;">
-              <a-tag style="background: #fff; borderStyle: dashed;" :id="'tableaaType-addBrand'+record.productScopeSn" @click="addBrandTag(index, record)" color="blue">
+            </div>
+            <div style="text-align:center;padding-left:10px;">
+              <a-tag style="background: #fff; borderStyle: dashed;cursor:pointer" title="添加品牌" :id="'tableaaType-addBrand'+record.productScopeSn" @click="addBrandTag(index, record)" color="blue">
                 <a-icon type="plus" />
               </a-tag>
-            </a-col>
-          </a-row>
-          <a-row v-else>
-            <a-col :span="24">
-              <a-tag style="background: #fff; borderStyle: dashed;" :id="'tableaaType-addBrand'+record.productScopeSn" @click="addBrandTag(index, record)" color="blue">
-                <a-icon type="plus" />
-              </a-tag>
-            </a-col>
-          </a-row>
+            </div>
+          </div>
+          <div v-else>
+            <a-tag style="background: #fff; borderStyle: dashed;cursor:pointer" title="添加品牌" :id="'tableaaType-addBrand'+record.productScopeSn" @click="addBrandTag(index, record)" color="blue">
+              <a-icon type="plus" />
+            </a-tag>
+          </div>
         </div>
         <span v-else v-for="item in record.productBrandArr" :key="item.brandSn">{{ item.brandName }}</span>
       </template>

+ 1 - 1
vue.config.js

@@ -106,7 +106,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.10/ocs-admin',
+        // target: 'http://192.168.2.132/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
         target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,