浏览代码

暂存任务调整

qymljy 2 年之前
父节点
当前提交
1278a80923

+ 35 - 0
src/HManagement/task/components/applicationData.vue

@@ -170,6 +170,18 @@
             <el-button type="text" @click="onSelect(scope.data)">选择</el-button>
           </template>
         </table-new-layout>
+        <div class="container normal-panel" style="text-align:right;padding-bottom: 0">
+          <el-pagination
+              background
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="20"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="total">
+          </el-pagination>
+        </div>
       </div>
 
     </el-dialog>
@@ -282,6 +294,7 @@ export default {
       }else if (this.value === 'sa_porject'){
         this.$emit('selectApplication',data.sa_projectid,this.value)
       }
+      this.dialogTableVisible = false
     },
     searchData(){
       if (this.value === 'sat_orderclue'){
@@ -296,6 +309,28 @@ export default {
       }
       this.listData()
     },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      if (this.value === 'sat_orderclue'){
+        this.clueParam.content.pageSize = val
+      }else if (this.value === 'sa_customers'){
+        this.customerParam.content.pageSize = val
+      }else if (this.value === 'sa_porject'){
+        this.projectParam.content.pageSize = val
+      }
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      if (this.value === 'sat_orderclue'){
+        this.clueParam.content.pageNumber = val
+      }else if (this.value === 'sa_customers'){
+        this.customerParam.content.pageNumber = val
+      }else if (this.value === 'sa_porject'){
+        this.projectParam.content.pageNumber = val
+      }
+      this.listData()
+    },
   },
   mounted() {
   },

+ 70 - 4
src/HManagement/task/components/followData.vue

@@ -1,7 +1,34 @@
 <template>
   <div>
-    <el-dialog title="收货地址" :visible.sync="dialogTableVisible">
-
+    <el-dialog title="同步跟进内容" :visible.sync="dialogTableVisible" append-to-body width="70%">
+      <el-divider></el-divider>
+      <div style="display: flex;justify-content: space-between;padding: 16px">
+        <div>
+          <span >总计:{{total}}</span>
+        </div>
+      </div>
+      <div style="padding: 0px 16px 16px 16px">
+        <table-new-layout :layout="tablecols" :checkbox="false"  :data="list" :opwidth="200" height="calc(100vh - 550px)" :width="true" :custom="true" fixedName="operation">
+          <template v-slot:customcol="scope">
+            <p>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:scope.column.columnname == 'operation'?'':'--'}}</p>
+          </template>
+          <template v-slot:opreation="scope">
+            <el-button type="text" @click="onSelect(scope.data)">选择</el-button>
+          </template>
+        </table-new-layout>
+        <div class="container normal-panel" style="text-align:right;padding-bottom: 0">
+          <el-pagination
+              background
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="20"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="total">
+          </el-pagination>
+        </div>
+      </div>
     </el-dialog>
   </div>
 </template>
@@ -9,14 +36,53 @@
 <script>
 export default {
   name: "followData",
+  props:['param'],
   data(){
     return {
-      dialogTableVisible:false
+      dialogTableVisible:false,
+      tablecols:[],
+      list:[],
+      total:0,
+      currentPage:0,
     }
+  },
+  methods:{
+    async listData(){
+      const res = await this.$api.requested(this.param)
+      console.log(res.data,'跟进内容')
+      this.list = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    onSelect(data){
+      console.log(data)
+      this.$emit('follow',data.content)
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).followTable.tablecols
   }
 }
 </script>
 
 <style scoped>
-
+/deep/ .el-dialog__body {
+  padding: 0px !important;
+}
+/deep/ .el-divider--horizontal {
+  display: block;
+  height: 1px;
+  width: 100%;
+  margin: 0;
+}
 </style>

+ 9 - 1
src/HManagement/task/modules/add.vue

@@ -25,7 +25,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="4">
-              <el-button type="primary" size="mini">同步跟进内容</el-button>
+              <el-button type="primary" size="mini" @click="$refs.followRef.dialogTableVisible = true;$refs.followRef.listData()" :disabled="followParam.content.ownerid === ''">同步跟进内容</el-button>
             </el-col>
             <el-col :span="24">
               <el-form-item label="任务内容:" prop="remarks">
@@ -105,6 +105,7 @@
       </div>
     </el-drawer>
     <applicationData ref="applicationRef" @selectApplication="selectApplication"></applicationData>
+    <followData ref="followRef" :param="followParam" @follow="follow"></followData>
   </div>
 </template>
 <script>
@@ -282,8 +283,15 @@ export default {
       this.$refs.form.resetFields()
     },
     selectApplication(ownerid,ownertable){
+      console.log("11111",ownerid)
       this.followParam.content.ownertable = ownertable
       this.followParam.content.ownerid = ownerid
+      this.form.ownertable = ownertable
+      this.form.ownerid = ownerid
+      this.form.tableName = ownertable === 'sat_orderclue'?'销售线索':ownertable === 'sa_customers'?'我的客户':ownertable === 'sa_porject'?'项目商机':''
+    },
+    follow(data){
+      this.form.remarks = data
     }
 	}
 }

+ 13 - 1
src/components/dynamic-newTable/index.vue

@@ -7,7 +7,7 @@
           type="selection"
           width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column v-for="col in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :width="width && col.width === 0 ? 150 : col.width" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
+      <el-table-column v-for="col in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :width="!width ? 150 : col.width" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
         <template v-slot:header="{ column,$index }" v-if="customHeader">
           <slot name="header" :data="column"></slot>
         </template>
@@ -46,6 +46,11 @@ export default {
       loading:'loading'
     })
   },
+  watch:{
+    data(val){
+      this.doLayout()
+    }
+  },
   methods:{
     rowClick (row) {
       this.$emit('rowClick',row)
@@ -55,6 +60,13 @@ export default {
     },
     selectionChange(row){
       this.$emit('selectionChange',row)
+    },
+    doLayout(){
+      if (this.$refs.table){
+        this.$nextTick(()=>{
+          this.$refs.table.doLayout()
+        })
+      }
     }
   },
   mounted () {