|
@@ -138,7 +138,7 @@
|
|
<span v-if="item.point * 1 > 0">+{{ item.point }}</span>
|
|
<span v-if="item.point * 1 > 0">+{{ item.point }}</span>
|
|
<span v-if="item.point * 1 < 0">{{ item.point }}</span>
|
|
<span v-if="item.point * 1 < 0">{{ item.point }}</span>
|
|
</div>
|
|
</div>
|
|
- <div class="d_date fontColorF">{{ item.time }} <span class="delete_jfjl" v-if="workDetailData.employee_id == userId && workDetailData.status < 3 " @click="deletejf_cli(index,0)"><i class="el-icon-delete"></i></span> </div>
|
|
|
|
|
|
+ <div class="d_date fontColorF">{{ item.time }} <span class="delete_jfjl" v-if="item.recorder_id == userId && workDetailData.status < 3 " @click="deletejf_cli(index,0)"><i class="el-icon-delete"></i></span> </div>
|
|
</div>
|
|
</div>
|
|
<div class="fontColorB" style="margin-top: 5px;">{{ item.remark }}</div>
|
|
<div class="fontColorB" style="margin-top: 5px;">{{ item.remark }}</div>
|
|
</div>
|
|
</div>
|
|
@@ -165,7 +165,7 @@
|
|
<span class="red" v-if="item.point * 1 > 0">+{{ item.point }}</span>
|
|
<span class="red" v-if="item.point * 1 > 0">+{{ item.point }}</span>
|
|
<span class="green" v-if="item.point * 1 < 0">{{ item.point }}</span>
|
|
<span class="green" v-if="item.point * 1 < 0">{{ item.point }}</span>
|
|
</div>
|
|
</div>
|
|
- <div class="d_date fontColorF">{{ item.time }} <span class="delete_jfjl" v-if="keepTheScore" @click="deletejf_cli(index,1)"><i class="el-icon-delete"></i></span> </div>
|
|
|
|
|
|
+ <div class="d_date fontColorF">{{ item.time }} <span class="delete_jfjl" v-if="userId == item.recorder_id && workDetailData.status < 3" @click="deletejf_cli(index,1)"><i class="el-icon-delete"></i></span> </div>
|
|
</div>
|
|
</div>
|
|
<div class="fontColorB" style="margin-top: 5px;">{{ item.remark }}</div>
|
|
<div class="fontColorB" style="margin-top: 5px;">{{ item.remark }}</div>
|
|
</div>
|
|
</div>
|
|
@@ -212,7 +212,7 @@
|
|
<el-form-item label="记分" prop="num" >
|
|
<el-form-item label="记分" prop="num" >
|
|
<!-- <el-form-item label="记分" prop="num" :rules="[{ required: false, message: '记分不能为空'},{ type: 'number', message: '积分必须为数字值'}]"> -->
|
|
<!-- <el-form-item label="记分" prop="num" :rules="[{ required: false, message: '记分不能为空'},{ type: 'number', message: '积分必须为数字值'}]"> -->
|
|
<div class="num" :class="[integral.type=='1'?'add':'jian']"></div>
|
|
<div class="num" :class="[integral.type=='1'?'add':'jian']"></div>
|
|
- <el-input placeholder="请输入内容" v-model.number="integral.num">
|
|
|
|
|
|
+ <el-input placeholder="请输入内容" type="Number" v-model.number="integral.num" @input="(val)=>{integral.num = val.replace(/[^\d]/g, '')}" >
|
|
<el-select v-model="integral.type" slot="prepend" placeholder="请选择" style="width: 80px;">
|
|
<el-select v-model="integral.type" slot="prepend" placeholder="请选择" style="width: 80px;">
|
|
<el-option label="奖分" value="1"></el-option>
|
|
<el-option label="奖分" value="1"></el-option>
|
|
<el-option label="扣分" value="2"></el-option>
|
|
<el-option label="扣分" value="2"></el-option>
|
|
@@ -371,23 +371,23 @@ export default {
|
|
},
|
|
},
|
|
//记分记录
|
|
//记分记录
|
|
integralSend(formName){
|
|
integralSend(formName){
|
|
- var items = this.workDetailData.process.list || [];
|
|
|
|
- var process = {
|
|
|
|
- img_url: this.$getUserData().img_url,
|
|
|
|
- point: this.integral.type == "1" ? this.integral.num : '-' + this.integral.num,
|
|
|
|
- recorder_id: this.$getUserData().id,
|
|
|
|
- recorder: this.$getUserData().name,
|
|
|
|
- remark: this.integral.text,
|
|
|
|
- time: this.$moment().format('YYYY-MM-DD HH:mm')
|
|
|
|
- }
|
|
|
|
- var data = {
|
|
|
|
- work_id: this.workDetailData.id,
|
|
|
|
- process: [],
|
|
|
|
- }
|
|
|
|
- items.unshift(process);
|
|
|
|
- data.process = JSON.stringify(items);
|
|
|
|
this.$refs[formName].validate((valid) => {
|
|
this.$refs[formName].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
+ var items = this.workDetailData.process.list || [];
|
|
|
|
+ var process = {
|
|
|
|
+ img_url: this.$getUserData().img_url,
|
|
|
|
+ point: this.integral.type == "1" ? this.integral.num : '-' + this.integral.num,
|
|
|
|
+ recorder_id: this.$getUserData().id,
|
|
|
|
+ recorder: this.$getUserData().name,
|
|
|
|
+ remark: this.integral.text,
|
|
|
|
+ time: this.$moment().format('YYYY-MM-DD HH:mm')
|
|
|
|
+ }
|
|
|
|
+ var data = {
|
|
|
|
+ work_id: this.workDetailData.id,
|
|
|
|
+ process: [],
|
|
|
|
+ }
|
|
|
|
+ items.unshift(process);
|
|
|
|
+ data.process = JSON.stringify(items);
|
|
this.$axios('post','/api/integral/work',data).then(res => {
|
|
this.$axios('post','/api/integral/work',data).then(res => {
|
|
if (res.data.code == 1) {
|
|
if (res.data.code == 1) {
|
|
this.publicClose();
|
|
this.publicClose();
|
|
@@ -479,7 +479,9 @@ export default {
|
|
if (this.workDetailData.process.list[i].point != 0) {
|
|
if (this.workDetailData.process.list[i].point != 0) {
|
|
this.point_list.push(this.workDetailData.process.list[i])
|
|
this.point_list.push(this.workDetailData.process.list[i])
|
|
} else {
|
|
} else {
|
|
- this.text_list.push(this.workDetailData.process.list[i])
|
|
|
|
|
|
+ if(this.workDetailData.process.list[i].recorder_id == this.workDetailData.employee_id) {
|
|
|
|
+ this.text_list.push(this.workDetailData.process.list[i])
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|