Browse Source

商品组管理、合作伙伴档案、产品技术资料、企业信息调整

qymljy 1 year ago
parent
commit
9b08b4b3e6

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

@@ -70,7 +70,10 @@
             </el-col>
             <el-col :span="col">
 <!--              <selectTable :all="true" @addProduct="addProduct"></selectTable>-->
-              <tableNewLayout :layout="tablecolsAdd" :data="productList" :opwidth="200" height="calc(100vh - 300px)" :width="true" :custom="true" fixedName="operation">
+              <div class="flex-align-center">
+                <el-input size="small"  suffix-icon="el-icon-search" style="width: 200px;margin-bottom: 10px" v-model="params.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="productData(params.content.pageNumber = 1)" @clear="productData(params.content.pageNumber = 1)" clearable></el-input>&nbsp;
+              </div>
+              <tableNewLayout :layout="tablecolsAdd" :data="productList" :opwidth="200" height="calc(100vh - 350px)" :width="true" :custom="true" fixedName="operation">
                 <template v-slot:customcol="scope">
                   <div v-if="scope.column.columnname === 'itemclass'">
                      <span v-for="(item,index) in scope.column.data.itemclass" :key="index">
@@ -102,7 +105,7 @@
                   <el-button type="text" size="small" @click="addProduct(scope.data)">添 加</el-button>
                 </template>
               </tableNewLayout>
-              <div style="margin-top:16px;float:right">
+              <div style="float:right">
                 <el-pagination
                     background
                     @size-change="handleSizeChange"
@@ -208,6 +211,7 @@ export default {
         tag: []
       }
       this.tableData = []
+      this.params.content.where.condition  = ''
     },
     async productData(){
       this.params.content.where.type = true

+ 2 - 3
src/HDrpManagement/prodectFileData/components/relationDel.vue

@@ -16,9 +16,8 @@ export default {
     async deleteRow() {
       const res = await this.$api.requested({
         "id": "20220926102203",
-        "version":1,
         "content": {
-          "plm_technicalinfo_itemid":this.data.plm_technicalinfo_itemid
+          "plm_technicalinfo_itemids":[this.data.plm_technicalinfo_itemid]
         }
       })
       this.tool.showMessage(res, () => {
@@ -31,4 +30,4 @@ export default {
 
 <style scoped>
 
-</style>
+</style>

+ 5 - 2
src/HDrpManagement/prodectFileData/components/relationList.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <search :placeholder="placeholder" @searchActive="searchActive"></search>
-    <table-new-layout :layout="tablecols" :data="list" :opwidth="200" :custom="true" :width="true" :height="list.length <= 5?'300px':tableHieght">
+    <table-new-layout :layout="tablecols" :data="list" :checkbox="checkbox" :opwidth="200" :custom="true" :width="true" :height="list.length <= 5?'300px':tableHieght" @selectionChange="selectionChange">
       <template v-slot:customcol="scope">
         <div v-if="scope.column.columnname === 'isonsale' ">
           <span v-if="scope.column.data[scope.column.columnname] === 0"
@@ -52,7 +52,7 @@
 import search from './search'
 export default {
   name: "relationList",
-  props:["id"],
+  props:["id","checkbox"],
   data(){
     return {
       placeholder:'商品名称',
@@ -104,6 +104,9 @@ export default {
     searchActive(data){
       this.params.content.where.condition = data
       this.listData()
+    },
+    selectionChange(list){
+      this.$emit('selectionChange',list)
     }
   },
   created() {

+ 32 - 4
src/HDrpManagement/prodectFileData/modules/relation.vue

@@ -1,10 +1,11 @@
 <template>
   <div >
     <div class="container normal-panel normal-margin">
-      <add :plm_technicalinfoid="this.$route.query.id" @addSuccess="onSuccess"></add>
+      <add :plm_technicalinfoid="this.$route.query.id" @addSuccess="onSuccess" class="inline-16"></add>
+      <el-button type="primary" @click="onDeletes" size="small" :disabled="selectList.length == 0">批量删除</el-button>
     </div>
     <div class="container normal-panel " style="padding-top: 0px">
-      <relation_list ref="list" :id="this.$route.query.id">
+      <relation_list ref="list" :id="this.$route.query.id" :checkbox="true" @selectionChange="selectionChange">
         <template v-slot:del="scope">
           <relationDel v-if="tool.checkAuth($route.name,'delete')" :data="scope.data" :type="'text'" @deleteSuccess="onSuccess"></relationDel>
         </template>
@@ -21,7 +22,7 @@ export default {
   name: "relation",
   data() {
     return {
-
+      selectList:[]
     }
   },
   components:{
@@ -31,7 +32,34 @@ export default {
   },
   methods:{
     onSuccess(){
-      this.$refs.list.listData()
+      this.$refs.list.listData(this.$refs.list.params.content.pageNumber = 1)
+    },
+    selectionChange(data){
+      this.selectList = []
+      this.selectList = data.map(item=>item.plm_technicalinfo_itemid)
+    },
+    onDeletes(){
+      this.$confirm('是否确认批量删除关联商品?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        const res = await this.$api.requested({
+          "id": "20220926102203",
+          "content": {
+            "plm_technicalinfo_itemids": this.selectList
+          },
+        })
+        this.tool.showMessage(res,()=>{
+          this.selectList = []
+          this.onSuccess()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
     }
   }
 }

+ 2 - 2
src/HManagement/marketing2/agent/details/index.vue

@@ -9,7 +9,7 @@
     turnPageId="20221011144903"
     idname="sa_agentsid"
     :tags="[]"
-    :tabs="['经销商团队','授权营销类别','授权领域','授权标准','账户余额查询','地址管理','财务信息','银行卡信息','关联合同','联系人管理','业绩目标','代理区域']"
+    :tabs="['经销商团队','授权营销类别','授权领域','授权标准','账户余额查询','地址管理','财务信息','银行卡信息','关联合同','联系人管理','业绩目标','管辖区域']"
     @pageChange="pageChange"
     @onEditSuccess="queryMainData($route.query.id)">
     <div slot="tags">
@@ -90,7 +90,7 @@
       <agent-address :mainData="mainData"></agent-address>
     </div>
     <div slot="slot6">
-      <financial :mainData="mainData"></financial>
+      <financial :mainData="mainData" height="calc(100vh - 445px)"></financial>
     </div>
     <div slot="slot7">
        <bankInfo :data="mainData" ref="bank">

+ 6 - 6
src/HManagement/marketing2/agent/details/modules/saleclass/index.vue

@@ -1,10 +1,10 @@
 <template>
   <div>
-    <add-sale-class class="normal-margin inline-16" :data="data" @addSuccess="getClassList" v-if="tool.checkAuth($route.name,'classAdd') "/>
-    <el-button type="primary" size="mini" v-if="tool.checkAuth($route.name,'classAdd')" :disabled="!selectRows.length" @click="deleteRow(selectRows,true)">删 除</el-button>
+    <add-sale-class  class="normal-margin inline-16" :data="data" @addSuccess="getClassList" v-if="tool.checkAuth($route.name,'classAdd') && data.saleclassauth"/>
+    <el-button type="primary" size="mini" v-if="tool.checkAuth($route.name,'classAdd') && data.saleclassauth" :disabled="!selectRows.length" @click="deleteRow(selectRows,true)">删 除</el-button>
     <el-table
         :data="saleClassList"
-        @select="selectRow" 
+        @select="selectRow"
         @select-all="selectAll"
         style="width: 100%"
         size="small"
@@ -26,8 +26,8 @@
         <el-table-column
           label="操作">
           <template slot-scope="scope">
-            <Del v-if="tool.checkAuth($route.name,'classDel')" :id="scope.row.sys_enterprise_saleclassid" @onSuccess="getClassList"/>
-          </template> 
+            <Del v-if="tool.checkAuth($route.name,'classDel') && data.saleclassauth" :id="scope.row.sys_enterprise_saleclassid" @onSuccess="getClassList"/>
+          </template>
         </el-table-column>
     </el-table>
   </div>
@@ -92,7 +92,7 @@ export default {
           })
         })
       })
-      
+
     },
   },
   mounted() {

+ 3 - 2
src/HManagement/marketing2/agent/details/modules/salescope/modules/add.vue

@@ -31,6 +31,7 @@ export default {
   },
   methods:{
     async query_arealist() {
+      this.value = []
       const res = await this.$api.requested({
         "classname": "system.tools",
         "method": "query_arealist",
@@ -58,7 +59,7 @@ export default {
             "county":this.value[2]?this.value[2]:''
         }
       })
-      
+
       this.tool.showMessage(res,()=>{
         this.dialogVisible = false
         this.$emit('onSuccess')
@@ -72,4 +73,4 @@ export default {
 /deep/.el-dialog__body {
   padding-bottom: 0;
 }
-</style>
+</style>

+ 2 - 2
src/HManagement/marketing2/agent/details/modules/salescope/modules/edit.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="inline-16">
     <el-button size="small" type="text" @click="query_arealist(dialogVisible = true)">编 辑</el-button>
-    <el-dialog title="编辑管辖区域" :visible.sync="dialogVisible" width="400px">
+    <el-dialog title="编辑管辖区域" append-to-body :visible.sync="dialogVisible" width="400px">
       <el-cascader
         style="width:100%"
         class="width-240"
@@ -70,4 +70,4 @@ export default {
 
 </script>
 <style>
-</style>
+</style>

+ 1 - 1
src/SManagement/setenterpriseInfo/index.vue

@@ -40,7 +40,7 @@
             <setAddress :mainData="enterpriseInfo"></setAddress>
           </el-tab-pane>
           <el-tab-pane label="财务信息" name="second">
-            <financial :mainData="enterpriseInfo"></financial>
+            <financial :mainData="enterpriseInfo" height="calc(100vh - 500px)"></financial>
           </el-tab-pane>
           <el-tab-pane label="附件" name="third">
             <attachment :mainData="enterpriseInfo"></attachment>

+ 23 - 51
src/components/financialInfo/index.vue

@@ -12,53 +12,21 @@
         @keyup.enter.native="queryClick()">
       <i slot="prefix" class="el-icon-search" @click="queryClick()"></i>
     </el-input>
-    <el-table
-        :header-cell-style="{background:'#EEEEEE',color:'#333'}"
-      :data="tableData"
-      stripe
-      size="mini"
-      style="width: 100%"
-      border>
-      <el-table-column
-        prop="address"
-        label="开票地址">
-        <template slot-scope="scope">
-          {{scope.row.address}}&nbsp;<i style="color:red" v-if="scope.row.isdefault === 1" class="el-icon-place"></i>
-        </template>
-      </el-table-column>
-      <el-table-column
-        prop="enterprisename"
-        label="抬头">
-      </el-table-column>
-      <el-table-column
-        prop="taxno"
-        label="税号">
-      </el-table-column>
-      <el-table-column
-        prop="bank"
-        label="开户行">
-      </el-table-column>
-      <el-table-column
-        prop="bankcardno"
-        label="开户账号">
-      </el-table-column>
-      <el-table-column
-        prop="phonenumber"
-        label="联系电话">
-      </el-table-column>
-      <el-table-column
-        prop="remarks"
-        label="备注说明">
-      </el-table-column>
-      <el-table-column
-        label="操作"
-        width="100">
-        <template slot-scope="scope">
-          <edit class="inline-16" :data="scope.row" @onSuccess="queryfinancialinfo"></edit>
-          <el-button type="text" size="mini" @click="deleteRow(scope.row)">删 除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
+    <tableNewLayout :layout="tablecols" :data="tableData" :opwidth="200" :height="height" :width="true" :custom="true">
+      <template v-slot:customcol="scope">
+        <div v-if="scope.column.data[[scope.column.columnname]] == 'address'">
+          {{scope.column.data[[scope.column.columnname]]}}
+          <i style="color:red" v-if="scope.row.isdefault === 1" class="el-icon-place"></i>
+        </div>
+        <div v-else>
+          {{scope.column.data[[scope.column.columnname]] || scope.column.columnname === 'operation'?scope.column.data[[scope.column.columnname]]:'--'}}
+        </div>
+      </template>
+      <template v-slot:opreation="scope">
+        <edit class="inline-16" :data="scope.data" @onSuccess="queryfinancialinfo"></edit>
+        <el-button type="text" size="mini" @click="deleteRow(scope.data)">删 除</el-button>
+      </template>
+    </tableNewLayout>
     <div class="container normal-panel" style="text-align:right">
       <el-pagination
         background
@@ -79,10 +47,11 @@ import add from './modules/add.vue'
 import edit from './modules/edit.vue'
 
 export default {
-  props:['mainData'],
+  props:['mainData','height'],
   data () {
     return {
       search:'',
+      tablecols:[],
       tableData:[],
       param:{
         "id": 20221013160602,
@@ -129,12 +98,12 @@ export default {
         },
       })
       this.tool.showMessage(res,()=>{
-        this.queryfinancialinfo()
+        this.queryfinancialinfo(this.param.content.pageNumber = 1)
       })
     },
     clearData(){
       this.search = ""
-      this.queryfinancialinfo()
+      this.queryfinancialinfo(this.param.content.pageNumber = 1)
     },
     queryClick(){
       this.param.content.where.condition = this.search
@@ -144,6 +113,9 @@ export default {
   },
   mounted () {
     this.queryfinancialinfo()
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).FinancialInforTable.tablecols
   }
 }
 
@@ -153,4 +125,4 @@ export default {
   display: flex;
   align-items: center;
 }
-</style>
+</style>