|
|
@@ -157,12 +157,12 @@
|
|
|
</div>
|
|
|
<table class="table table-sm text-nowrap table-bordered td-min-width-80" id="table">
|
|
|
<template>
|
|
|
- <tr v-for="(processOne,i) in processes" :class="[(count(i,processes)%2===0?'row-even':'' ),selectTr===i+1?'focusing':'']" :id="processOne.id?processOne.id:processes[i-1].id+'-2'"
|
|
|
- :name="'process_table_'+count(i,processes)" @click="selectTr===i+1?(selectTr=0):selectTr=i+1">
|
|
|
+ <tr v-for="(processOne,i) in processes" :class="[(i%2===0?'row-even':'' ),selectTr===i+1?'focusing':'']" :id="processOne.id?processOne.id:processes[i-1].id+'-2'"
|
|
|
+ :name="'process_table_'+i" @click="selectTr===i+1?(selectTr=0):selectTr=i+1">
|
|
|
<td v-if="processOne.id" :rowspan="processOne.is_multi_row?2:''">
|
|
|
<input class="checkItem" type="checkbox" :value="processOne.id">
|
|
|
</td>
|
|
|
- <td v-if="processOne.id" class="text-muted" :rowspan="processOne.is_multi_row?2:''" >@{{ count(i,processes) }}</td>
|
|
|
+ <td v-if="processOne.id" class="text-muted" :rowspan="processOne.is_multi_row?2:''" >@{{ i+1 }}</td>
|
|
|
<td v-if="processOne.id" style="min-width:200px;" :rowspan="processOne.is_multi_row?2:''">
|
|
|
@can("二次加工管理-审核")
|
|
|
<button v-if="!processOne.openProcessHour && (processOne.status=='待审核' || processOne.status=='已驳回')" class="btn btn-sm btn-outline-success" @click="audit(processOne)"><span>审核</span></button>@endcan
|
|
|
@@ -295,7 +295,8 @@
|
|
|
<div v-else :style="[{background: (!processOne.id || processOne.is_multi_row) ? (!processOne.id) ? '#e8eef6' :'rgb(246, 238, 232)' : (processOne.processesContents.length>0 ? ((processOne.processesContents[0].type==='成品单') ? '#e8eef6' : 'rgb(246, 238, 232)') :'')}
|
|
|
,{'-webkit-transform':'scale('+(1/Math.ceil(processOne.array.length/2))+')'},{height: (35*Math.ceil(processOne.array.length/2))+'px'}
|
|
|
,{width: (100*Math.ceil(processOne.array.length/2))+'%'},{'margin-left': (-100*((Math.ceil(processOne.array.length/2))-1)/2)+'%'}
|
|
|
- ,{'margin-top': (-35*((Math.ceil(processOne.array.length/2))-1)/2)+'px'},{'margin-bottom': (-35*((Math.ceil(processOne.array.length/2))-1)/2)+'px'}]">
|
|
|
+ ,{'margin-top': (-35*((Math.ceil(processOne.array.length/2))-1)/2)+'px'},
|
|
|
+ {'margin-bottom': (-35*((Math.ceil(processOne.array.length/2))-1)/2)+'px'}]">
|
|
|
<div v-for="(processesContent,i) in processOne.array" class=" row p-1" style="float: left;margin-right: 10px;-webkit-transform-origin: 0" :style="[{opacity:1/0.7},
|
|
|
{'margin-left': processOne.array.length >3 ? (parseInt(processOne.array.length/3))+'px' : '0px'}]">
|
|
|
<span>@{{ processesContent.bill_type }}</span>
|
|
|
@@ -571,6 +572,7 @@
|
|
|
},
|
|
|
methods: {
|
|
|
arrayFilter: function (processOne) {
|
|
|
+ console.log("arrayFilter")
|
|
|
if (!processOne.is_multi_row && processOne.id) return processOne.processesContents;
|
|
|
let array = [];
|
|
|
let type = '成品单';
|
|
|
@@ -582,6 +584,7 @@
|
|
|
},
|
|
|
//重组数据
|
|
|
resetProcessData: function () {
|
|
|
+ console.log("resetProcessData")
|
|
|
let indexs = [];
|
|
|
let count = 0;
|
|
|
for (let i = 0; i < this.processes.length; i++) {
|
|
|
@@ -646,6 +649,7 @@
|
|
|
|
|
|
//重组加工单加工日记录数据
|
|
|
resetProcessDaily(processDailies,process_id){
|
|
|
+ console.log("resetProcessDaily")
|
|
|
let _this=this;
|
|
|
_this.processDailies = [];
|
|
|
_this.processDailyParticipants = [];
|
|
|
@@ -791,7 +795,6 @@
|
|
|
if (!confirm('确定驳回该单吗?')) {
|
|
|
return
|
|
|
}
|
|
|
- ;
|
|
|
let url = "{{url('process/reject')}}" + "/" + id;
|
|
|
let _this = this;
|
|
|
axios.post(url)
|
|
|
@@ -840,7 +843,6 @@
|
|
|
if (!confirm('确定“' + process.code + '”交接完成吗?')) {
|
|
|
return
|
|
|
}
|
|
|
- ;
|
|
|
let url = "{{url('process/accomplish')}}";
|
|
|
axios.post(url, {id: process.id})
|
|
|
.then(function (response) {
|
|
|
@@ -984,6 +986,7 @@
|
|
|
},
|
|
|
//验证时间合法性
|
|
|
hourFilter(processDailyParticipant, is_create) {
|
|
|
+ console.log("hourFilter")
|
|
|
let start = new Date('2020/1/1 12:00:00').getTime();
|
|
|
let end = new Date('2020/1/1 13:00:00').getTime();
|
|
|
if (is_create) {
|
|
|
@@ -1004,6 +1007,7 @@
|
|
|
},
|
|
|
//提交参与人
|
|
|
submitProcessDailyParticipant(e) {
|
|
|
+ console.log("submitProcessDailyParticipant")
|
|
|
let request = {};
|
|
|
request['user_id'] = $("#" + e + "user_id").val();
|
|
|
request['started_at'] = $("#" + e + "started_at").val();
|
|
|
@@ -1153,34 +1157,6 @@
|
|
|
tempTip.show('修改参与人发生了一些严重错误:' + err);
|
|
|
})
|
|
|
},
|
|
|
- {{--//登记工时参与人审核
|
|
|
- processDailyParticipantAudit(id) {
|
|
|
- if (!confirm('审核后不能撤销及修改,确定通过审核吗?')) {
|
|
|
- return
|
|
|
- }
|
|
|
- ;
|
|
|
- let _this = this;
|
|
|
- axios.post("{{url('process/processDailyParticipantAudit')}}" + "/" + id)
|
|
|
- .then(function (response) {
|
|
|
- if (response.data.success) {
|
|
|
- _this.processDailyParticipants.every(function (processDailyParticipant) {
|
|
|
- if (processDailyParticipant.id == response.data.processDailyParticipant.id) {
|
|
|
- processDailyParticipant.status = response.data.processDailyParticipant.status;
|
|
|
- return false;
|
|
|
- }
|
|
|
- return true;
|
|
|
- });
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.showSuccess('参与人审核通过!');
|
|
|
- return;
|
|
|
- }
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show('参与人失败!');
|
|
|
- }).catch(function (err) {
|
|
|
- tempTip.setDuration(5000);
|
|
|
- tempTip.show('审核参与人发生了一些严重错误:' + err);
|
|
|
- });
|
|
|
- },--}}
|
|
|
//临时工详情
|
|
|
showUserDetail(id) {
|
|
|
window.open("{{url('maintenance/userLabor')}}/" + id);
|
|
|
@@ -1474,6 +1450,7 @@
|
|
|
})
|
|
|
},
|
|
|
resetProcessDailyParticipants(index){
|
|
|
+ console.log("resetProcessDailyParticipants")
|
|
|
if (this.processDailyParticipants[index].daily_id){
|
|
|
if (this.processDailyParticipants[index+1] && !this.processDailyParticipants[index+1].daily_id){
|
|
|
this.processDailyParticipants[index+1].daily_id=this.processDailyParticipants[index].daily_id;
|