|  | @@ -267,7 +267,7 @@
 | 
	
		
			
				|  |  |  				v-if="add_employee_show"
 | 
	
		
			
				|  |  |  				ref="Employee"
 | 
	
		
			
				|  |  |  				:user_no_select="false"
 | 
	
		
			
				|  |  | -				:can_select_dept="false"
 | 
	
		
			
				|  |  | +				:can_select_dept="true"
 | 
	
		
			
				|  |  |  				@confirm="add_employee_confirm"
 | 
	
		
			
				|  |  |  			></EmployeeSelector>
 | 
	
		
			
				|  |  |  			<span slot="footer">
 | 
	
	
		
			
				|  | @@ -286,16 +286,16 @@
 | 
	
		
			
				|  |  |  		  width="700px">
 | 
	
		
			
				|  |  |  		  <el-form label-width="160px" :model="integral_limit_form" ref="integral_limit_form" v-loading="integral_limit_loading">
 | 
	
		
			
				|  |  |  		    <span v-for="(item,index) in integral_limit_form.point_limit" :key="index" v-show="item.pt_id !== 1">
 | 
	
		
			
				|  |  | -		      <el-form-item :label="item.name+'权限(单次奖扣)'" :rules="[{required: true, message: '请输入', trigger: 'blur'}]">
 | 
	
		
			
				|  |  | -		        <el-input v-model="item.point" type="Number"></el-input>
 | 
	
		
			
				|  |  | +		      <el-form-item :label="item.name+'权限(单次奖扣)'"  :rules="[{ required: true, message: '分值不能为空'},{ type: 'number', message: '分值必须为数字值'}]">
 | 
	
		
			
				|  |  | +		        <el-input v-model.number="item.point" oninput="value=value.replace(/[^\d]/g,'')"></el-input>
 | 
	
		
			
				|  |  |  		      </el-form-item>
 | 
	
		
			
				|  |  |  		    </span>
 | 
	
		
			
				|  |  | -		    <el-form-item label="每月奖分上限" :rules="[{required: true, message: '请输入', trigger: 'blur'}]">
 | 
	
		
			
				|  |  | -		      <el-input v-model="integral_limit_form.entry_limit" type="Number"></el-input>
 | 
	
		
			
				|  |  | +		    <el-form-item label="每月奖分上限" prop="entry_limit" >
 | 
	
		
			
				|  |  | +		      <el-input v-model.number="integral_limit_form.entry_limit" oninput="value=value.replace(/[^\d]/g,'')"></el-input>
 | 
	
		
			
				|  |  |  		    </el-form-item>
 | 
	
		
			
				|  |  |  		    <el-form-item style="text-align: right; margin-bottom: 0">
 | 
	
		
			
				|  |  |  		      <el-button @click="integral_limit_show = false">取消</el-button>
 | 
	
		
			
				|  |  | -		      <el-button type="primary" :loading="integral_loading"  :disabled="integral_loading"  @click="sub_employee_limit">确定</el-button>
 | 
	
		
			
				|  |  | +		      <el-button type="primary" :loading="integral_loading"  :disabled="integral_loading"  @click="sub_employee_limit('integral_limit_form')">确定</el-button>
 | 
	
		
			
				|  |  |  		    </el-form-item>
 | 
	
		
			
				|  |  |  		  </el-form>
 | 
	
		
			
				|  |  |  		</el-dialog>
 | 
	
	
		
			
				|  | @@ -307,7 +307,7 @@
 | 
	
		
			
				|  |  |  		  :my_no_select="my_no_select"
 | 
	
		
			
				|  |  |  		  :user_no_select="false" 
 | 
	
		
			
				|  |  |  		  :selected="management_scope_arr" 
 | 
	
		
			
				|  |  | -		  :can_select_dept="false" 
 | 
	
		
			
				|  |  | +		  :can_select_dept="true" 
 | 
	
		
			
				|  |  |  		  @confirm="management_scope_confirm">
 | 
	
		
			
				|  |  |  		  </EmployeeSelector>
 | 
	
		
			
				|  |  |  		  <span slot="footer">
 | 
	
	
		
			
				|  | @@ -316,10 +316,7 @@
 | 
	
		
			
				|  |  |  		  </span>
 | 
	
		
			
				|  |  |  		</el-dialog>
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  | -		<el-dialog
 | 
	
		
			
				|  |  | -		  title="B分奖扣任务"
 | 
	
		
			
				|  |  | -		  :visible.sync="bonus_deducted_show"
 | 
	
		
			
				|  |  | -		  width="600px">
 | 
	
		
			
				|  |  | +		<el-dialog title="B分奖扣任务"  :visible.sync="bonus_deducted_show"  width="600px">
 | 
	
		
			
				|  |  |  		  <el-form :model="integral_limit_form" ref="integral_limit_form" :rules="integral_limit_rules" label-width="130px" v-loading="bonus_deducted_loading">
 | 
	
		
			
				|  |  |  		    <span v-for="(item,index) in integral_limit_form.reward_task_monthly" :key="index" v-show="item.name == 'B分'">
 | 
	
		
			
				|  |  |  		      <el-form-item>
 | 
	
	
		
			
				|  | @@ -330,11 +327,11 @@
 | 
	
		
			
				|  |  |  		            <span class="tips">?</span>
 | 
	
		
			
				|  |  |  		          </el-tooltip>
 | 
	
		
			
				|  |  |  		        </template>
 | 
	
		
			
				|  |  | -		        <el-input v-model="item.point" type="Number" placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  | +		        <el-input v-model.number="item.point"  type="number" oninput="value=value.replace(/[^\d]/g,'')"  placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  |  		      </el-form-item>
 | 
	
		
			
				|  |  |  		    </span>
 | 
	
		
			
				|  |  |  		    <span v-for="(item,index) in integral_limit_form.deduct_task_monthly" :key="item.name" v-show="item.name == 'B分'">
 | 
	
		
			
				|  |  | -		      <el-form-item style="margin-bottom: 0;">
 | 
	
		
			
				|  |  | +		      <el-form-item style="margin-bottom: 0;" prop="point">
 | 
	
		
			
				|  |  |  		        <template slot="label">
 | 
	
		
			
				|  |  |  		          <span>月扣分任务</span>
 | 
	
		
			
				|  |  |  		          <el-tooltip placement="top">
 | 
	
	
		
			
				|  | @@ -342,7 +339,7 @@
 | 
	
		
			
				|  |  |  		            <span class="tips">?</span>
 | 
	
		
			
				|  |  |  		          </el-tooltip>
 | 
	
		
			
				|  |  |  		        </template>
 | 
	
		
			
				|  |  | -		        <el-input v-model="item.point" type="Number" placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  | +		        <el-input v-model.number="item.point" type="number" oninput="value=value.replace(/[^\d]/g,'')"  placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  |  		      </el-form-item>
 | 
	
		
			
				|  |  |  		    </span>
 | 
	
		
			
				|  |  |  		    <el-form-item>
 | 
	
	
		
			
				|  | @@ -359,9 +356,9 @@
 | 
	
		
			
				|  |  |  		          <span class="tips">?</span>
 | 
	
		
			
				|  |  |  		        </el-tooltip>
 | 
	
		
			
				|  |  |  		      </template>
 | 
	
		
			
				|  |  | -		
 | 
	
		
			
				|  |  | -		      <el-input v-model="integral_limit_form.exec_count" type="Number" placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  | +		      <el-input v-model.number="integral_limit_form.exec_count" oninput="value=value.replace(/[^\d]/g,'')" type="number" placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  |  		    </el-form-item>
 | 
	
		
			
				|  |  | +			
 | 
	
		
			
				|  |  |  		    <el-form-item prop="exec_count_point">
 | 
	
		
			
				|  |  |  		      <template slot="label">
 | 
	
		
			
				|  |  |  		        <span>每少一次奖扣</span>
 | 
	
	
		
			
				|  | @@ -370,8 +367,9 @@
 | 
	
		
			
				|  |  |  		          <span class="tips">?</span>
 | 
	
		
			
				|  |  |  		        </el-tooltip>
 | 
	
		
			
				|  |  |  		      </template>
 | 
	
		
			
				|  |  | -		      <el-input v-model="integral_limit_form.exec_count_point" type="Number" placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  | +		      <el-input v-model.number="integral_limit_form.exec_count_point"  oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  |  		    </el-form-item>
 | 
	
		
			
				|  |  | +			
 | 
	
		
			
				|  |  |  		    <el-form-item prop="reward_ratio">
 | 
	
		
			
				|  |  |  		      <template slot="label">
 | 
	
		
			
				|  |  |  		        <span>月奖扣比例</span>
 | 
	
	
		
			
				|  | @@ -380,9 +378,10 @@
 | 
	
		
			
				|  |  |  		          <span class="tips">?</span>
 | 
	
		
			
				|  |  |  		        </el-tooltip>
 | 
	
		
			
				|  |  |  		      </template>
 | 
	
		
			
				|  |  | -		      <el-input style="width: 100px;" type="Number" disabled placeholder="1" ></el-input>:<el-input v-model="integral_limit_form.reward_ratio" style="width: 100px;" type="Number" placeholder="请输入数值" ></el-input>
 | 
	
		
			
				|  |  | +		      <el-input style="width: 100px;"   disabled placeholder="1" ></el-input>:<el-input v-model.number="integral_limit_form.reward_ratio" style="width: 100px;" oninput="value=value.replace(/[^\d]/g,'')"  placeholder="请输入数值" ></el-input>
 | 
	
		
			
				|  |  |  		    </el-form-item>
 | 
	
		
			
				|  |  | -		    <el-form-item prop="reward_ratio_point">
 | 
	
		
			
				|  |  | +		    
 | 
	
		
			
				|  |  | +			<el-form-item prop="reward_ratio_point">
 | 
	
		
			
				|  |  |  		      <template slot="label">
 | 
	
		
			
				|  |  |  		        <span>比例未达标</span>
 | 
	
		
			
				|  |  |  		        <el-tooltip placement="top">
 | 
	
	
		
			
				|  | @@ -390,12 +389,14 @@
 | 
	
		
			
				|  |  |  		          <span class="tips">?</span>
 | 
	
		
			
				|  |  |  		        </el-tooltip>
 | 
	
		
			
				|  |  |  		      </template>
 | 
	
		
			
				|  |  | -		      <el-input v-model="integral_limit_form.reward_ratio_point" type="Number" placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  | +		      <el-input v-model.number="integral_limit_form.reward_ratio_point" oninput="value=value.replace(/[^\d]/g,'')"  placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  |  		    </el-form-item>
 | 
	
		
			
				|  |  | -		    <el-form-item style=" text-align: right; margin-bottom: 0;">
 | 
	
		
			
				|  |  | +		    
 | 
	
		
			
				|  |  | +			<el-form-item style=" text-align: right; margin-bottom: 0;">
 | 
	
		
			
				|  |  |  		      <el-button @click="bonus_deducted_colse('integral_limit_form')">取消</el-button>
 | 
	
		
			
				|  |  |  		      <el-button type="primary" :loading="bonus_loading" :disabled="bonus_loading"  @click="sub_bonus_deducted('integral_limit_form')">确定</el-button>
 | 
	
		
			
				|  |  |  		    </el-form-item>
 | 
	
		
			
				|  |  | +		  
 | 
	
		
			
				|  |  |  		  </el-form>
 | 
	
		
			
				|  |  |  		</el-dialog>
 | 
	
		
			
				|  |  |  		<!-- 添加老板 -->
 | 
	
	
		
			
				|  | @@ -405,7 +406,7 @@
 | 
	
		
			
				|  |  |  			ref="boss" 
 | 
	
		
			
				|  |  |  			:multi="false"
 | 
	
		
			
				|  |  |  			:user_no_select="false" 
 | 
	
		
			
				|  |  | -			:can_select_dept="false" 
 | 
	
		
			
				|  |  | +			:can_select_dept="true" 
 | 
	
		
			
				|  |  |  			@confirm="selectBoss">
 | 
	
		
			
				|  |  |  			</EmployeeSelector>
 | 
	
		
			
				|  |  |  		  <div style="text-align: center;" class="fontColorT">创始人至少有一位,创始人不能删除自己</div>
 | 
	
	
		
			
				|  | @@ -443,7 +444,7 @@ import EmployeeSelector from '@/components/EmployeeSelector.vue';
 | 
	
		
			
				|  |  |  import noData from '@/components/noData';
 | 
	
		
			
				|  |  |    const minimum = (rule, value,callback)=>{
 | 
	
		
			
				|  |  |      if (value < 0){
 | 
	
		
			
				|  |  | -      callback(new Error('请输入正确的数值'))
 | 
	
		
			
				|  |  | +      callback(new Error('数值不能为负数'))
 | 
	
		
			
				|  |  |      }else {
 | 
	
		
			
				|  |  |        callback()
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -481,18 +482,23 @@ export default {
 | 
	
		
			
				|  |  |  			bonus_deducted_loading:false,
 | 
	
		
			
				|  |  |  			bonus_loading:false,
 | 
	
		
			
				|  |  |  			integral_limit_rules:{
 | 
	
		
			
				|  |  | -			  // exec_count:[
 | 
	
		
			
				|  |  | -			  //   { required: true, validator: minimum, trigger: 'blur' },
 | 
	
		
			
				|  |  | -			  // ],
 | 
	
		
			
				|  |  | -			  // exec_count_point:[
 | 
	
		
			
				|  |  | -			  //   { required: true, validator: minimum, trigger: 'blur' },
 | 
	
		
			
				|  |  | -			  // ],
 | 
	
		
			
				|  |  | -			  // reward_ratio:[
 | 
	
		
			
				|  |  | -			  //   { required: true, validator: minimum, trigger: 'blur' },
 | 
	
		
			
				|  |  | -			  // ],
 | 
	
		
			
				|  |  | -			  // reward_ratio_point:[
 | 
	
		
			
				|  |  | -			  //   { required: true, validator: minimum, trigger: 'blur' },
 | 
	
		
			
				|  |  | -			  // ],
 | 
	
		
			
				|  |  | +			  exec_count:[
 | 
	
		
			
				|  |  | +			    { required: true, validator: minimum, trigger: 'blur' },
 | 
	
		
			
				|  |  | +				{ type: 'number', message: '分值必须为数字值'}
 | 
	
		
			
				|  |  | +			  ],
 | 
	
		
			
				|  |  | +			  exec_count_point:[
 | 
	
		
			
				|  |  | +			    { required: true, validator: minimum, trigger: 'blur' },
 | 
	
		
			
				|  |  | +				{ type: 'number', message: '分值必须为数字值'}
 | 
	
		
			
				|  |  | +			  ],
 | 
	
		
			
				|  |  | +			  reward_ratio:[
 | 
	
		
			
				|  |  | +			    { required: true, validator: minimum, trigger: 'blur' },
 | 
	
		
			
				|  |  | +				{ type: 'number', message: '分值必须为数字值'}
 | 
	
		
			
				|  |  | +				
 | 
	
		
			
				|  |  | +			  ],
 | 
	
		
			
				|  |  | +			  reward_ratio_point:[
 | 
	
		
			
				|  |  | +			    { required: true, validator: minimum, trigger: 'blur' },
 | 
	
		
			
				|  |  | +				{ type: 'number', message: '分值必须为数字值'}
 | 
	
		
			
				|  |  | +			  ],
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  			my_no_select:'',//设置人的ID
 | 
	
		
			
				|  |  |  			isStart:false,//是否是创始人或者积分负责人
 | 
	
	
		
			
				|  | @@ -673,9 +679,21 @@ export default {
 | 
	
		
			
				|  |  |  		sub_bonus_deducted(fromName){
 | 
	
		
			
				|  |  |  		  this.bonus_loading=true;	
 | 
	
		
			
				|  |  |  		  this.integral_limit_form.employee_id = this.set_mployee_limit_id
 | 
	
		
			
				|  |  | +		  var data=this.integral_limit_form;
 | 
	
		
			
				|  |  | +		  data.reward_task_monthly[1].point=Number(data.reward_task_monthly[1].point);
 | 
	
		
			
				|  |  | +		  data.deduct_task_monthly[1].point=Number(data.deduct_task_monthly[1].point);
 | 
	
		
			
				|  |  | +		  if(!this.isNumber(data.reward_task_monthly[1].point)||data.reward_task_monthly[1].point<0){
 | 
	
		
			
				|  |  | +		  	  this.$message.error('月奖分任务必须为整数且不能为负分');	 
 | 
	
		
			
				|  |  | +		  		return;			  
 | 
	
		
			
				|  |  | +		  }
 | 
	
		
			
				|  |  | +		  if(!this.isNumber(data.deduct_task_monthly[1].point)||data.deduct_task_monthly[1].point<0){
 | 
	
		
			
				|  |  | +				this.$message.error('月扣分任务必须为整数且不能为负分');
 | 
	
		
			
				|  |  | +		  		return;
 | 
	
		
			
				|  |  | +		  }
 | 
	
		
			
				|  |  | +		  // return;
 | 
	
		
			
				|  |  |  		  this.$refs[fromName].validate((valid) => {
 | 
	
		
			
				|  |  |  		    if (valid) {
 | 
	
		
			
				|  |  | -		      this.$axios('post','/api/integral/employee/limit',this.integral_limit_form).then((res) => {
 | 
	
		
			
				|  |  | +		      this.$axios('post','/api/integral/employee/limit',data).then((res) => {
 | 
	
		
			
				|  |  |  		        if (res.data.code == 1) {
 | 
	
		
			
				|  |  |  		          this.$message.success(res.data.msg)
 | 
	
		
			
				|  |  |  		          setTimeout(() => {
 | 
	
	
		
			
				|  | @@ -684,7 +702,9 @@ export default {
 | 
	
		
			
				|  |  |  		          this.bonus_deducted_show = false
 | 
	
		
			
				|  |  |  		        }
 | 
	
		
			
				|  |  |  		      }).finally(() => { this.bonus_loading=false;})
 | 
	
		
			
				|  |  | -		    }
 | 
	
		
			
				|  |  | +		    }else{
 | 
	
		
			
				|  |  | +				this.bonus_loading=false;	
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  |  		  });
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  |  		bonus_deducted_colse(fromName){
 | 
	
	
		
			
				|  | @@ -727,16 +747,32 @@ export default {
 | 
	
		
			
				|  |  |  		    this.role_loading = false
 | 
	
		
			
				|  |  |  		  })
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  | -		sub_employee_limit(){
 | 
	
		
			
				|  |  | -		  this.integral_loading=true;
 | 
	
		
			
				|  |  | -		  this.integral_limit_form.employee_id = this.set_mployee_limit_id
 | 
	
		
			
				|  |  | -		  this.$axios('post','/api/integral/employee/limit',this.integral_limit_form).then((res) => {
 | 
	
		
			
				|  |  | -		    if (res.data.code == 1) {
 | 
	
		
			
				|  |  | -		      this.$message.success(res.data.msg)
 | 
	
		
			
				|  |  | -		      this.get_table_list()
 | 
	
		
			
				|  |  | -		      this.integral_limit_show = false
 | 
	
		
			
				|  |  | -		    }
 | 
	
		
			
				|  |  | -		  }).finally(() => {this.integral_loading = false;});
 | 
	
		
			
				|  |  | +		
 | 
	
		
			
				|  |  | +		isNumber(obj) {
 | 
	
		
			
				|  |  | +		    return obj === +obj
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +		sub_employee_limit(fromName){
 | 
	
		
			
				|  |  | +			this.$refs[fromName].validate((valid) => {
 | 
	
		
			
				|  |  | +			  if(!this.isNumber(this.integral_limit_form.point_limit[0].point)||this.integral_limit_form.point_limit[0].point<0){
 | 
	
		
			
				|  |  | +			  	  this.$message.error('权限分必须为整数且不能为负分');	 
 | 
	
		
			
				|  |  | +				return;			  
 | 
	
		
			
				|  |  | +			  }
 | 
	
		
			
				|  |  | +			  if(!this.isNumber(this.integral_limit_form.point_limit[1].point)||this.integral_limit_form.point_limit[1].point<0){
 | 
	
		
			
				|  |  | +				  this.$message.error('权限分必须为整数且不能为负分');
 | 
	
		
			
				|  |  | +				  return;
 | 
	
		
			
				|  |  | +			  }
 | 
	
		
			
				|  |  | +			  if(valid)	{
 | 
	
		
			
				|  |  | +				 this.integral_loading=true;
 | 
	
		
			
				|  |  | +				 this.integral_limit_form.employee_id = this.set_mployee_limit_id
 | 
	
		
			
				|  |  | +				 this.$axios('post','/api/integral/employee/limit',this.integral_limit_form).then((res) => {
 | 
	
		
			
				|  |  | +				 				if (res.data.code == 1) {
 | 
	
		
			
				|  |  | +				 				  this.$message.success(res.data.msg)
 | 
	
		
			
				|  |  | +				 				  this.get_table_list()
 | 
	
		
			
				|  |  | +				 				  this.integral_limit_show = false
 | 
	
		
			
				|  |  | +				 				}
 | 
	
		
			
				|  |  | +				 }).finally(() => {this.integral_loading = false;}); 
 | 
	
		
			
				|  |  | +			  }
 | 
	
		
			
				|  |  | +			});
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  |  		open_integral_limit(item){
 | 
	
		
			
				|  |  |  		  this.integral_limit_show = true
 | 
	
	
		
			
				|  | @@ -757,6 +793,11 @@ export default {
 | 
	
		
			
				|  |  |  				if (item.reward_task_monthly == null || item.reward_task_monthly == undefined||item.reward_task_monthly.length==0) {
 | 
	
		
			
				|  |  |  					item.reward_task_monthly = [{ name: 'A分', point: '0', pt_id: this.$getTyps('AF').id }, { name: 'B分', point: '0', pt_id: this.$getTyps('BF').id }];
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  | +				if(item.point_limit[0].point||item.point_limit[1].point){
 | 
	
		
			
				|  |  | +					item.point_limit[0].point=Number(item.point_limit[0].point)
 | 
	
		
			
				|  |  | +					item.point_limit[1].point=Number(item.point_limit[1].point)
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +				
 | 
	
		
			
				|  |  |  				this.integral_limit_form=item
 | 
	
		
			
				|  |  |  		    }
 | 
	
		
			
				|  |  |  		  }).finally(() => {
 |