瀏覽代碼

代码上传

zhangqiOMG 2 年之前
父節點
當前提交
2aa6888b8b

+ 20 - 2
src/HDrpManagement/contractManage/components/productList/addProduct.vue

@@ -67,9 +67,9 @@
           <div style="display:flex;align-items:center">
             <el-input size="small" style="width:200px" v-model="params.content.where.condition" placeholder="输入搜索内容" @clear="getProductList(params.content.pageNumber = 1)" @keyup.native.enter="getProductList(params.content.pageNumber = 1)" clearable></el-input>
           </div>
-          <el-button type="primary" size="small" :disabled="selectProductLength == 0" @click="onSumit">批 量 添 加</el-button>
+          <el-button type="primary" size="small" :disabled="selectProductLength == 0" @click="batchSelects">批 量 添 加</el-button>
         </div>
-        <Table  ref="table" fixedName="operation" v-model="itemno"  :data="productList" :custom="true" height="500px"   @selection="selectArr" @onSelect="addProduct">
+        <Table  ref="table" fixedName="operation" v-model="itemno"  :data="productList" :custom="true" height="500px"   @selection="selectArr" @onSelect="batchSelect">
         </Table>
         <div style="display:flex;justify-content:space-between;align-items:center;margin-top:10px">
           <span>已添加产品数:{{addProductLength}}</span>
@@ -115,6 +115,7 @@ export default {
       itemno:'',
       total:0,
       total2:0,
+      timer:0,
       ENlist:[],
       params: {
         "id": 20221123162902,
@@ -177,6 +178,13 @@ export default {
       this.drawer = true
       // this.getQuotationList()
     },
+    debounce (fn, wait) {
+      let that = this
+      return function () {
+        if (that.timer !== null) clearTimeout(that.timer)
+        that.timer = setTimeout(fn, wait)
+      }
+    },
     async getProductList (data) {
       this.params.content.sa_contractid = this.$route.query.id
       this.params.content.sa_quotedpriceid = this.currentQuotation.sa_quotedpriceid
@@ -190,6 +198,11 @@ export default {
     selectArr (data) {
       this.selectProductLength = data.length
     },
+    batchSelect(data){
+      this.debounce(() => {
+        this.addProduct(data)
+      },300)()
+    },
     async addProduct (data) {
       let res = await this.$api.requested({
         "id": 20221123164402,
@@ -210,6 +223,11 @@ export default {
         this.$emit('onSuccess')
       })
     },
+    batchSelects(){
+      this.debounce(() => {
+        this.onSumit()
+      },300)()
+    },
     async onSumit () {
       console.log(this.$refs.table.tableSelectData);
       let item = this.$refs.table.tableSelectData.map(item => {

+ 20 - 2
src/HDrpManagement/contractManage/components/toolList/addTool.vue

@@ -6,9 +6,9 @@
         <p class="normal-title normal-margin">工具清单</p>
         <div style="display:flex;justify-content:space-between;align-items:center">
           <el-input size="small" style="width:200px;margin-bottom:10px" v-model="params.content.where.condition" placeholder="输入搜索内容" @clear="getProductList(params.content.pageNumber = 1)" @keyup.native.enter="getProductList(params.content.pageNumber = 1)" clearable></el-input>
-          <el-button type="primary" size="small" :disabled="selectProductLength == 0" @click="onSumit">批 量 添 加</el-button>
+          <el-button type="primary" size="small" :disabled="selectProductLength == 0" @click="batchSelects">批 量 添 加</el-button>
         </div>
-        <Table  ref="table" v-model="itemno" :layout="tablecols" :data="productList" :custom="true" height="500px"  @upDateData="upDateData" @selection="selectArr" @onSelect="addProduct">
+        <Table  ref="table" v-model="itemno" :layout="tablecols" :data="productList" :custom="true" height="500px"  @upDateData="upDateData" @selection="selectArr" @onSelect="batchSelect">
         </Table>
         <div style="display:flex;justify-content:space-between;align-items:center;margin-top:10px">
           <span>已添加产品数:{{addProductLength}}</span>
@@ -51,6 +51,7 @@ export default {
       addProductLength:0,
       itemno:'',
       total:0,
+      timer:0,
       params: {
         "id": 20221124093602,
         "content": {
@@ -98,6 +99,23 @@ export default {
       console.log(this.productList);
       
     },
+    debounce (fn, wait) {
+      let that = this
+      return function () {
+        if (that.timer !== null) clearTimeout(that.timer)
+        that.timer = setTimeout(fn, wait)
+      }
+    },
+    batchSelect(data){
+      this.debounce(() => {
+        this.addProduct(data)
+      },300)()
+    },
+    batchSelects(){
+      this.debounce(() =>{
+        this.onSumit()
+      },300)()
+    },
     async addProduct (data) {
       let res = await this.$api.requested({
         "id": 20221123164402,

+ 60 - 12
src/HDrpManagement/contractManage/modules/detail.vue

@@ -248,7 +248,11 @@ export default {
           },
           {
             label:'合同有效期',
-            value:`${this.mainData.begdate}-${this.mainData.enddate}`
+            value:`${this.mainData.begdate}-${this.mainData.enddate}`,
+            style:function () {
+              let style = {color:'#3874f6'}
+              return style
+            }
           },
           {
             label:'签约日期',
@@ -331,7 +335,11 @@ export default {
           },
           {
             label:'合同有效期',
-            value:`${this.mainData.begdate}-${this.mainData.enddate}`
+            value:`${this.mainData.begdate}-${this.mainData.enddate}`,
+            style:function () {
+              let style = {color:'#3874f6'}
+              return style
+            }
           },
           {
             label:'签约日期',
@@ -407,7 +415,11 @@ export default {
           },
           {
             label:'合同有效期',
-            value:`${this.mainData.begdate}-${this.mainData.enddate}`
+            value:`${this.mainData.begdate}-${this.mainData.enddate}`,
+            style:function () {
+              let style = {color:'#3874f6'}
+              return style
+            }
           },
           {
             label:'签约日期',
@@ -479,7 +491,11 @@ export default {
           },
           {
             label:'合同有效期',
-            value:`${this.mainData.begdate}-${this.mainData.enddate}`
+            value:`${this.mainData.begdate}-${this.mainData.enddate}`,
+            style:function () {
+              let style = {color:'#3874f6'}
+              return style
+            }
           },
           {
             label:'签约日期',
@@ -558,7 +574,11 @@ export default {
           },
           {
             label:'合同有效期',
-            value:`${this.mainData.begdate}-${this.mainData.enddate}`
+            value:`${this.mainData.begdate}-${this.mainData.enddate}`,
+            style:function () {
+              let style = {color:'#3874f6'}
+              return style
+            }
           },
           {
             label:'签约日期',
@@ -566,7 +586,11 @@ export default {
           },
           {
             label:this.mainData.calculatemodel == 1 ? '订单金额比例(%)' : '居间产品折扣(%)',
-            value:this.mainData.calculatemodel == 1 ? Math.round((this.mainData.orderratio * 100)*100)/100 : Math.round((this.mainData.productdiscount *100)*100)/100
+            value:this.mainData.calculatemodel == 1 ? Math.round((this.mainData.orderratio * 100)*100)/100 : Math.round((this.mainData.productdiscount *100)*100)/100,
+            style:function () {
+              let style = {color:'#3874f6'}
+              return style
+            }
           },
           {
             label:'创建时间',
@@ -642,7 +666,11 @@ export default {
                   },
                   {
                     label:'合同有效期',
-                    value:`${this.mainData.begdate}-${this.mainData.enddate}`
+                    value:`${this.mainData.begdate}-${this.mainData.enddate}`,
+                    style:function () {
+                      let style = {color:'#3874f6'}
+                      return style
+                    }
                   },
                   {
                     label:'签约日期',
@@ -731,7 +759,11 @@ export default {
                   },
                   {
                     label:'合同有效期',
-                    value:`${this.mainData.begdate}-${this.mainData.enddate}`
+                    value:`${this.mainData.begdate}-${this.mainData.enddate}`,
+                    style:function () {
+                      let style = {color:'#3874f6'}
+                      return style
+                    }
                   },
                   {
                     label:'签约日期',
@@ -813,7 +845,11 @@ export default {
                   },
                   {
                     label:'合同有效期',
-                    value:`${this.mainData.begdate}-${this.mainData.enddate}`
+                    value:`${this.mainData.begdate}-${this.mainData.enddate}`,
+                    style:function () {
+                      let style = {color:'#3874f6'}
+                      return style
+                    }
                   },
                   {
                     label:'签约日期',
@@ -891,7 +927,11 @@ export default {
                       },
                       {
                         label:'合同有效期',
-                        value:`${this.mainData.begdate}-${this.mainData.enddate}`
+                        value:`${this.mainData.begdate}-${this.mainData.enddate}`,
+                        style:function () {
+                          let style = {color:'#3874f6'}
+                          return style
+                        }
                       },
                       {
                         label:'签约日期',
@@ -976,7 +1016,11 @@ export default {
                       },
                       {
                         label:'合同有效期',
-                        value:`${this.mainData.begdate}-${this.mainData.enddate}`
+                        value:`${this.mainData.begdate}-${this.mainData.enddate}`,
+                        style:function () {
+                          let style = {color:'#3874f6'}
+                          return style
+                        }
                       },
                       {
                         label:'签约日期',
@@ -984,7 +1028,11 @@ export default {
                       },
                       {
                         label:this.mainData.calculatemodel == 1 ? '订单金额比例(%)' : '居间产品折扣(%)',
-                        value:this.mainData.calculatemodel == 1 ? Math.round((this.mainData.orderratio * 100)*100)/100 : Math.round((this.mainData.productdiscount *100)*100)/100
+                        value:this.mainData.calculatemodel == 1 ? Math.round((this.mainData.orderratio * 100)*100)/100 : Math.round((this.mainData.productdiscount *100)*100)/100,
+                        style:function () {
+                          let style = {color:'#3874f6'}
+                          return style
+                        }
                       },
                       {
                         label:'状态',

+ 7 - 0
src/HManagement/clueManage/clue_private/modules/detail.vue

@@ -157,6 +157,9 @@ export default {
       console.log(this.mainData);
       
       this.changeDataStructure()
+
+      this.$refs['details'].$refs['group'].queryGroup()
+
     },
     changeDataStructure() {
       let that = this
@@ -318,6 +321,10 @@ export default {
             }
 
           },
+          /*{
+            label:'转手次数',
+            value:this.mainData.enterprisename
+          },*/
         ],
         systemInfo: [
           {label:'创建人',value:this.mainData.createBy},

+ 5 - 2
src/HManagement/clueManage/m_activity/index.vue

@@ -63,14 +63,17 @@
           <span style="color:#cccccc" v-else-if="scope.data.column.data[[scope.data.column.columnname]] == '结束'">{{scope.data.column.data[[scope.data.column.columnname]]}}</span>
           <span style="color: rgb(82, 196, 26)" v-else-if="scope.data.column.data[[scope.data.column.columnname]] == '发布'">{{scope.data.column.data[[scope.data.column.columnname]]}}</span>
         </div>
+        <div v-else-if="scope.data.column.columnname == 'director'">
+          <span >{{scope.data.column.data.leader.length !== 0?scope.data.column.data.leader[0].name:'--'}}</span>
+        </div>
         <div v-else-if="scope.data.column.columnname == 'allocationstatus'">
           <span style="color:#3874f6" v-if="scope.data.column.data[[scope.data.column.columnname]] == '待分配'">{{scope.data.column.data[[scope.data.column.columnname]]}}</span>
           <span style="color:#333333" v-else-if="scope.data.column.data[[scope.data.column.columnname]] == '已分配'">{{scope.data.column.data[[scope.data.column.columnname]]}}</span>
         </div>
         <div v-else>
-          {{scope.data.column.data[[scope.data.column.columnname]]}}
+          {{scope.data.column.data[[scope.data.column.columnname]]?scope.data.column.data[[scope.data.column.columnname]]:'--'}}
         </div>
-        <span v-if="!scope.data.column.data[scope.data.column.columnname] && scope.data.column.data[scope.data.column.columnname] !== 0">--</span>
+<!--        <span v-if="!scope.data.column.data[scope.data.column.columnname] && scope.data.column.data[scope.data.column.columnname] !== 0">&#45;&#45;</span>-->
       </template>
     </basicLayout>
   </div>

+ 6 - 2
src/HManagement/clueManage/m_activity/modules/details.vue

@@ -94,7 +94,7 @@ export default {
         },
         {
           label:'负责人',
-          value:this.mainData.director
+          value:this.mainData.leader[0].name
         },
         {
           label:'线索数',
@@ -131,7 +131,7 @@ export default {
         },
         {
           label:'负责人',
-          value:this.mainData.director
+          value:this.mainData.leader[0].name
         },
         {
           label:'线索数',
@@ -167,6 +167,10 @@ export default {
               return style
             }
           },
+          {
+            label:'转手次数',
+            value:this.mainData.leader[0].leadernum === 0?'0':this.mainData.leader[0].leadernum
+          },
         ],
         systemInfo: [
           {label:'创建人',value:this.mainData.createby},

+ 90 - 4
src/HManagement/department/staff/list/modules/add.vue

@@ -95,6 +95,36 @@
       <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
     </div>
   </el-drawer>
+  <el-dialog
+      title="授权角色"
+      :visible.sync="drawer"
+      width="564px"
+      append-to-body
+      :show-close="false"
+      @close="onClose">
+    <div>
+      <el-row :gutter="50">
+        <el-form :model="roleForm" :rules="roleRules" ref="roleForm"  size="mini" label-position="right">
+          <el-col :span="24">
+            <el-form-item label="授权角色" label-width="100px" prop="roleids">
+              <el-select v-model="roleForm.roleids" style="width:100%" placeholder="请选择" multiple>
+                <el-option
+                    v-for="item in options"
+                    :key="item.index"
+                    :label="item.rolename"
+                    :value="item.roleid">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+    </div>
+    <div class="dialog-footer">
+<!--      <el-button size="small" @click="drawer = false" class="normal-btn-width">取 消</el-button>-->
+      <el-button size="small" type="warning" @click="createUser" class="normal-btn-width btn-warning">确 定</el-button>
+    </div>
+  </el-dialog>
 </div>
 </template>
 
@@ -156,7 +186,23 @@ export default {
         "reporthrid":"",
         "userid":"0"
       },
-      value:[]
+      value:[],
+      drawer:false,
+      roleRules:{
+        roleids: [
+          { required: true, message: '请选择授权角色', trigger: 'change' }
+        ],
+      },
+      roleForm:{
+        "hrid":'',
+        "userid": 0,
+        "name": "",
+        "phonenumber": "",
+        "status": 1,
+        "remarks":"",
+        "roleids":[]
+      },
+      options:[]
     }
   },
   methods:{
@@ -194,9 +240,10 @@ export default {
             type: 'success'
           });
 
-          this.dialogFormVisible = false
-          this.refreshData()
-          this.$emit('onSuccess')
+          this.drawer = true
+          this.roleForm.hrid = res.data.hrid
+          this.rolelist()
+
       });
     },
     refreshData () {
@@ -221,6 +268,45 @@ export default {
     // 监听汇报对象选择
     selectMenber (data) {
       this.form.reporthrid = data.hrid
+    },
+    async rolelist () {
+      let param = {
+        "classname": "sysmanage.develop.optiontype.optiontype",
+        "method": "optiontypeselect",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "typename": "role",
+          "parameter": {
+          }
+        }
+      }
+      const res = await this.$api.requested(param)
+      this.options = res.data
+    },
+
+    createUser () {
+      this.$refs['roleForm'].validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "classname": "webmanage.hr.hr",
+          "method": "createUser",
+          "content": {
+            "hrid":this.roleForm.hrid,
+            "roleids":this.roleForm.roleids
+          }
+        })
+        this.tool.showMessage(res,()=>{
+          this.drawer = false
+          this.dialogFormVisible = false
+          this.refreshData()
+          this.$emit('onSuccess')
+        })
+
+      })
+    },
+    onClose () {
+      this.$refs['roleForm'].resetFields()
     }
   }
 }

+ 2 - 1
src/SManagement/personal_target/index.vue

@@ -125,7 +125,8 @@ export default {
         }
       })
       this.tool.showMessage(res,() => {
-        window.open(res.msg,'_self')
+       /* window.open(res.msg,'_self')*/
+        window.open(res.data,'_self')
       })
     }
   },

+ 2 - 1
src/SManagement/project_target/index.vue

@@ -90,7 +90,8 @@ export default {
         }
       })
       this.tool.showMessage(res,() => {
-        window.open(res.msg,'_self')
+        console.log(res)
+        window.open(res.data,'_self')
       })
     },
     refresh(){

+ 3 - 3
src/SManagement/project_target/modules/detailInfo.vue

@@ -29,7 +29,7 @@
 
     <div slot="slot0">
       <div class="mt-10">
-        <project_add v-if="tool.checkAuth($route.name,'editProjectTask') && mainData.status === '新建'"  :id="this.$route.query.id" :year="this.$route.query.year" @onSuccess="onSuccess" :disabled="disable" class="inline-16"></project_add>
+        <project_add v-if="tool.checkAuth($route.name,'editProjectTask') && mainData.status === '新建'"  :id="this.$route.query.hrid" :year="this.$route.query.year" @onSuccess="onSuccess" :disabled="disable" class="inline-16"></project_add>
         <el-input  style="width:200px;" placeholder="请输入搜索内容" suffix-icon="el-icon-search" @input="searchChange" v-model="params.content.where.condition" @keyup.native.enter="getprojectTargetList(params.content.pageNumber = 1)" @clear="getprojectTargetList(params.content.pageNumber = 1)" size="small" class="input-with-select inline-16" clearable>
         </el-input>
       </div>
@@ -127,7 +127,7 @@ export default {
         "id": 20220906104002,
         "content": {
           "year": this.$route.query.year,
-          "hrid": this.$route.query.id,
+          "hrid": this.$route.query.hrid,
           "where": {
             "condition": ""
           },
@@ -156,7 +156,7 @@ export default {
       })
       this.mainData = res.data
       console.log(this.mainData)
-      if (this.$route.query.id === this.$route.query.ownerHrid){
+      if (this.$route.query.hrid === this.$route.query.ownerHrid){
         this.disable = false
       }else{
         this.disable = true

+ 0 - 10
src/SManagement/sales_forecast/index.vue

@@ -28,20 +28,10 @@
           <span>{{scope.data.column.data.isrepeat == 1 ?'月度提报':'单次提报'}}</span>
         </div>
         <div v-else-if="scope.data.column.columnname == 'periodpoint'">
-          <span v-if="scope.data.column.data.isrepeat === 1">
             {{scope.data.column.data.periodstart?scope.data.column.data.periodstart.split(' ')[0]:'--'}}
-          </span>
-          <span v-else>
-            {{scope.data.column.data.reportingperiod?scope.data.column.data.reportingperiod.split(' ')[0]:'--'}}
-          </span>
         </div>
         <div v-else-if="scope.data.column.columnname == 'taskdays'">
-           <span v-if="scope.data.column.data.isrepeat === 1">
             {{scope.data.column.data.periodend?scope.data.column.data.periodend.split(' ')[0]:'--'}}
-          </span>
-          <span v-else>
-            {{scope.data.column.data.reportingtaskdays?scope.data.column.data.reportingtaskdays.split(' ')[0]:'--'}}
-          </span>
         </div>
         <div v-else>
           {{scope.data.column.data[[scope.data.column.columnname]]}}

+ 2 - 2
src/SManagement/sales_forecast/modules/modelDetail.vue

@@ -77,8 +77,8 @@ export default {
       this.mainAreaData = [
         {label:'提报要求',value:this.mainData.remarks},
         {label:'提报类型',value:this.mainData.isrepeat === 1 ?'月度提报':'单次提报'},
-        {label:'提报开始时间',value:this.mainData.isrepeat === 1?this.mainData.periodstart.split(' ')[0]:this.mainData.reportingperiod.split(' ')[0]},
-        {label:'提报截止时间',value:this.mainData.isrepeat === 1?this.mainData.periodend.split(' ')[0]:this.mainData.reportingtaskdays.split(' ')[0]},
+        {label:'提报开始时间',value:this.mainData.periodstart.split(' ')[0]},
+        {label:'提报截止时间',value:this.mainData.periodend.split(' ')[0]},
         {label:'预测金额(元)',value:this.mainData.sumamount},
         {label:'提报人',value:this.mainData.createby},
         {

+ 2 - 0
src/SManagement/sales_forecast/modules/project.vue

@@ -124,7 +124,9 @@ export default {
     },
     /*是否过期*/
     isOverdue(){
+      console.log(this.mainData,"获取数据")
       let date = new Date(this.mainData.periodend)
+      console.log(date)
       let now = Date.now()
       if (date.getTime() < now) {
         console.log('已过期')

+ 11 - 5
src/components/normal-basic-layout/details/modules/task/addTask.vue

@@ -168,12 +168,17 @@ export default {
         this.assistPerson = ''
         this.assist = []
         res.data[0].team.forEach((item,index)=>{
-          if (index === 1){
-            this.assistPerson = item.name
-          }else {
-            this.assistPerson = this.assistPerson + ',' + item.name
+          console.log(index,item,"获取协助")
+          console.log(res.data.length)
+          if (res.data.length !== 1){
+            if (index === 1){
+              this.assistPerson = item.name
+            }else {
+              this.assistPerson = this.assistPerson + ',' + item.name
+            }
+            this.assist[index] = item.userid
           }
-          this.assist[index] = item.userid
+
         })
       }
     },
@@ -199,6 +204,7 @@ export default {
       this.assistPerson = ''
       this.assist = []
       val.forEach((item,index)=>{
+
         if (index === 0){
           this.assistPerson = item.name
         }else {