Jelajahi Sumber

商品组调整,表格传参调整

qymljy 3 bulan lalu
induk
melakukan
4e3697c96a

+ 15 - 2
src/HDrpManagement/ProductGroupMag/modules/add.vue

@@ -31,6 +31,11 @@
                 </selectProduct>
               </el-form-item>
             </el-col>
+            <el-col :span="6" v-if="tradefields">
+              <el-form-item :label="$t(`领域`)+':'" prop="sequence">
+                {{tradefields}}
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <p class="normal-title normal-margin">
                 {{$t(`添加产品`)}}
@@ -191,7 +196,8 @@ export default {
       tableSelectData:[],
       productList: [],
       total:0,
-      currentPage:0
+      currentPage:0,
+      tradefields:''
     }
   },
   inject:['brandList'],
@@ -245,7 +251,11 @@ export default {
       this.tableData = this.tableData.filter((item) => !res.has(item['itemid']) && res.set(item['itemid'], 1));
       this.form.itemno = this.tableData[0].itemno
       this.form.itemid = this.tableData[0].itemid
-      this.form.itemname = this.tableData[0].itemname
+      this.form.itemname = this.tableData[0].itemnam
+      const all = this.tableData.flatMap(item => item.tradefields);
+      // 去重 + 用中文逗号连接
+      this.tradefields =  [...new Set(all)].join(',');
+
     },
     deleteProduct (row) {
       this.tableData = this.tableData.filter(e=>{
@@ -255,6 +265,9 @@ export default {
         this.form.itemno = ''
         this.form.itemname = ''
       }
+      const all = this.tableData.flatMap(item => item.tradefields);
+      // 去重 + 用中文逗号连接
+      this.tradefields =  [...new Set(all)].join(',');
     },
     async submit() {
       if (this.tableData.length === 0)

+ 4 - 0
src/HDrpManagement/ProductGroupMag/modules/details.vue

@@ -97,6 +97,10 @@ export default {
           label:'默认展示产品名称',
           value:this.mainData.itemname
         },
+        {
+          label:'领域',
+          value:this.mainData.tradefield
+        },
         /*{
           label:'产品类别',
           value:this.mainData.itemclassname

+ 1 - 1
src/components/normal-basic-layout-new/details/modules/followTable/index.vue

@@ -91,7 +91,7 @@
           <editLog v-if="userid === scope.row.createuserid && !disabled"  ref="edits" :data="scope.row" :ownertable="ownertable" @onSuccess="onSuccess" :isOperation="true"></editLog>
           <el-button type="text" size="small" class="inline-16" @click="onDelFollow(scope.row)" v-if="userid === scope.row.createuserid && !disabled">{{$t(`删除`)}}</el-button>
           <marketingExpenses  v-if="($route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail' || $route.path === '/phonebookDetail') && !disabled"
-                              class="inline-16" ownertable="sa_customers" :ownerid="scope.row.sys_datafollowupid" :dataTime="scope.row.createdate" :userid="scope.row.createuserid" :isOperation="true"
+                              class="inline-16" :ownertable="scope.row.ownertable" :ownerid="scope.row.sys_datafollowupid" :dataTime="scope.row.createdate" :userid="scope.row.createuserid" :isOperation="true"
                               @onSuccess="listData"></marketingExpenses>
         </template>
       </el-table-column>

+ 1 - 1
src/components/normal-basic-layout/details/modules/followTable/index.vue

@@ -101,7 +101,7 @@
           <editLog v-if="userid === scope.row.createuserid && !disabled"  ref="edits" :data="scope.row" :ownertable="ownertable" @onSuccess="onSuccess" :isOperation="true"></editLog>
           <el-button type="text" size="small" class="inline-16" @click="onDelFollow(scope.row)" v-if="userid === scope.row.createuserid && !disabled">{{$t(`删除`)}}</el-button>
           <marketingExpenses  v-if="($route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail') && !disabled"
-                              class="inline-16" ownertable="sa_customers" :ownerid="scope.row.sys_datafollowupid" :dataTime="scope.row.createdate" :userid="scope.row.createuserid" :isOperation="true"
+                              class="inline-16" :ownertable="scope.row.ownertable" :ownerid="scope.row.sys_datafollowupid" :dataTime="scope.row.createdate" :userid="scope.row.createuserid" :isOperation="true"
                               @onSuccess="listData"></marketingExpenses>
         </template>
       </el-table-column>

+ 1 - 1
src/components/normal-basic-layout/details/modules/followUp/followUp.vue

@@ -188,7 +188,7 @@
                 <span style="font-size: 14px;color: #3874F6;margin-left: 5px;vertical-align: middle">{{$t(`评论`)}}({{i.commentqty}})</span></el-button>
             </div>
             <div>
-              <marketingExpenses  v-if="($route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail') && !disabled"  class="inline-16" ownertable="sa_customers" :ownerid="i.sys_datafollowupid" :dataTime="i.createdate" :userid="i.createuserid" @onSuccess="onSuccess" :ownertable="ownertable"></marketingExpenses>
+              <marketingExpenses  v-if="($route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail') && !disabled"  class="inline-16"  :ownerid="i.sys_datafollowupid" :dataTime="i.createdate" :userid="i.createuserid" @onSuccess="onSuccess" :ownertable="i.ownertable"></marketingExpenses>
               <editLog v-if="nowUserid === i.createuserid && !disabled" :status="status" ref="edits" :data="i" :ownertable="ownertable" @onSuccess="queryLogs" :bindDataFile="bindData" :editData="editData"></editLog>
               <el-popconfirm
                   :confirm-button-text="$t('确定')" :cancel-button-text="$t('取消')"

+ 2 - 0
src/template/addProduct/index.vue

@@ -236,7 +236,9 @@ export default {
       this.listData(this.params.content.pageNumber = 1)
     },
     clickField (item) {
+
       this.params.content.where.tradefield = item.tradefield
+
       this.listData(this.params.content.pageNumber = 1)
     },
     clickAreaBase (item) {