|
|
@@ -165,38 +165,15 @@
|
|
|
<input id="all" type="checkbox" @click="checkAll($event)">全选
|
|
|
</label>
|
|
|
</th>
|
|
|
- <th>序号</th>
|
|
|
- <th>操作</th>
|
|
|
- <th>状态</th>
|
|
|
- <th>
|
|
|
- <span class="fa" :class="sort.code ? (sort.code=='up' ? 'fa-sort-up' : 'fa-sort-down') : 'fa-sort'" @click="sortData('code')"></span>
|
|
|
- 任务号
|
|
|
- </th>
|
|
|
- <th>经手人</th>
|
|
|
- <th>
|
|
|
- <span class="fa" :class="sort.owner_name ? (sort.owner_name=='up' ? 'fa-sort-up' : 'fa-sort-down') : 'fa-sort'" @click="sortData('owner_name')"></span>
|
|
|
- 货主
|
|
|
- </th>
|
|
|
- <th>加工类型</th>
|
|
|
- <th>预期数量</th>
|
|
|
- <th class="text-center">教程</th>
|
|
|
- <th>单价</th>
|
|
|
- <th>完成数量</th>
|
|
|
- <th>提交日期</th>
|
|
|
- <th style="min-width: 200px">单据类型</th>
|
|
|
- <th style="min-width: 200px">单据号</th>
|
|
|
- <th style="min-width: 100px">本单数量</th>
|
|
|
- <th style="min-width: 200px">商品条码</th>
|
|
|
- <th style="min-width: 300px">商品名称 </th>
|
|
|
- <th>备注</th>
|
|
|
- <th></th>
|
|
|
</tr>
|
|
|
<template>
|
|
|
- <tr v-for="(processOne,i) in processes" :class="processOne.serial_number%2==0?'row-even':''" :id="processOne.id?processOne.id:processes[i-1].id+'-2'" :name="'process_table_'+processOne.serial_number" @mouseover="changeStyle('process_table_'+processOne.serial_number,true)" @mouseout="changeStyle('process_table_'+processOne.serial_number,false)">
|
|
|
+ <tr v-for="(processOne,i) in processes" :class="count(i,processes)%2==0?'row-even':''" :id="processOne.id?processOne.id:processes[i-1].id+'-2'"
|
|
|
+ :name="'process_table_'+count(i,processes)" @mouseover="changeStyle('process_table_'+count(i,processes),true)"
|
|
|
+ @mouseout="changeStyle('process_table_'+count(i,processes),false)">
|
|
|
<td v-if="processOne.id" :rowspan="processOne.is_multi_row?2:''">
|
|
|
<input class="checkItem" type="checkbox" :value="processOne.id" v-model="checkData">
|
|
|
</td>
|
|
|
- <td v-if="processOne.id" class="text-muted" :rowspan="processOne.is_multi_row?2:''">@{{ processOne.serial_number }}</td>
|
|
|
+ <td v-if="processOne.id" class="text-muted" :rowspan="processOne.is_multi_row?2:''" >@{{ count(i,processes) }}</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=='已驳回')" @mouseenter="processOne.buttonTexts.审核='审核'" @mouseleave="processOne.buttonTexts.审核='审'" class="btn btn-sm btn-outline-success" @click="audit(processOne)"><span>@{{ processOne.buttonTexts.审核 }}</span></button>@endcan
|
|
|
@@ -483,7 +460,7 @@
|
|
|
@section('lastScript')
|
|
|
<script type="text/javascript" src="{{asset('js/queryForm/export200804.js')}}"></script>
|
|
|
<script type="text/javascript" src="{{asset('js/queryForm/queryForm200804.js')}}"></script>
|
|
|
- <script type="text/javascript" src="{{asset('js/utilities/sort200810.js')}}"></script>
|
|
|
+ <script type="text/javascript" src="{{asset('js/queryForm/header.js')}}"></script>
|
|
|
<script>
|
|
|
new Vue({
|
|
|
el:"#process",
|
|
|
@@ -529,7 +506,6 @@
|
|
|
date:'',
|
|
|
dateTextMap:{'start_date':'起','end_date':'终'},
|
|
|
sum:{!! $processes->total() !!},
|
|
|
- sort : {},
|
|
|
},
|
|
|
watch:{
|
|
|
checkData:{
|
|
|
@@ -578,9 +554,44 @@
|
|
|
this.form = new query({
|
|
|
el:"#form_div",
|
|
|
condition:data,
|
|
|
- test : this.test,
|
|
|
});
|
|
|
this.form.init();
|
|
|
+ /**
|
|
|
+ * column :{customization : null || bool --是否自定义
|
|
|
+ * dom : null || element --自定义元素
|
|
|
+ * style : null || string --样式
|
|
|
+ * name : null || string --字段名,英文
|
|
|
+ * value : string --列名
|
|
|
+ * neglect : null || bool --是否忽略排序
|
|
|
+ * }
|
|
|
+ * */
|
|
|
+ let header = new Header({
|
|
|
+ el:"#header",
|
|
|
+ column:[
|
|
|
+ {value:'序号',neglect:true},
|
|
|
+ {value:'操作',neglect:true},
|
|
|
+ {name:'status',value:'状态'},
|
|
|
+ {name:'code',value:'任务号'},
|
|
|
+ {value:'经手人',neglect:true},
|
|
|
+ {name:'owner_name',value:'货主'},
|
|
|
+ {name:'process_method_name',value:'加工类型'},
|
|
|
+ {name:'amount',value:'预期数量'},
|
|
|
+ {value:'教程',neglect:true},
|
|
|
+ {name:'unit_price',value:'单价'},
|
|
|
+ {name:'completed_amount',value:'完成数量'},
|
|
|
+ {name:'created_at',value:'提交日期'},
|
|
|
+ {value:'单据类型',neglect:true,style:'min-width:200px;'},
|
|
|
+ {value:'单据号',neglect:true,style:'min-width:200px;'},
|
|
|
+ {value:'本单数量',neglect:true,style:'min-width:200px;'},
|
|
|
+ {value:'商品条码',neglect:true,style:'min-width:200px;'},
|
|
|
+ {value:'商品名称',neglect:true,style:'min-width:200px;'},
|
|
|
+ {name:'remark',value:'备注'},
|
|
|
+ {value:'',neglect:true},
|
|
|
+ ],
|
|
|
+ data:this.processes,
|
|
|
+ restorationColumn:'serial_number',
|
|
|
+ });
|
|
|
+ header.init();
|
|
|
},
|
|
|
methods: {
|
|
|
arrayFilter: function (processesContents, process) {
|
|
|
@@ -597,26 +608,30 @@
|
|
|
resetProcessData: function () {
|
|
|
let _this = this;
|
|
|
let indexs = [];
|
|
|
+ let count = 0;
|
|
|
for (let i = 0; i < this.processes.length; i++) {
|
|
|
let process = this.processes[i];
|
|
|
_this.$set(_this.signs,process.code,[]);
|
|
|
process.signs.forEach(function (sign) {
|
|
|
_this.$set(_this.signs[process.code],sign.mark,true);
|
|
|
});
|
|
|
- process.serial_number = i + 1;
|
|
|
+ process.serial_number = count;
|
|
|
process.processesContents.every(function (processesContent) {
|
|
|
if (processesContent.type === '成品单') _this.$set(_this.processFullSum, process.code, _this.processFullSum[process.code] ? _this.processFullSum[process.code] + 1 : 1);
|
|
|
return true;
|
|
|
});
|
|
|
if (_this.processFullSum[process.code] && _this.processFullSum[process.code] !== 0 && _this.processFullSum[process.code] !== process.processesContents.length) {
|
|
|
indexs.unshift(i);
|
|
|
+ count++;
|
|
|
process.is_multi_row = true;
|
|
|
}
|
|
|
+ count++;
|
|
|
}
|
|
|
indexs.forEach(function (index) {
|
|
|
let processTemp = Object.assign({}, _this.processes[index]);
|
|
|
processTemp.id = '';
|
|
|
processTemp.is_multi_row = false;
|
|
|
+ processTemp.serial_number = _this.processes[index].serial_number + 1;
|
|
|
_this.processes.splice(index + 1, 0, processTemp);
|
|
|
});
|
|
|
},
|
|
|
@@ -624,7 +639,8 @@
|
|
|
checkAll(e) {
|
|
|
if (e.target.checked) {
|
|
|
this.processes.forEach((el, i) => {
|
|
|
- if (this.checkData.indexOf(el.id) == '-1') {
|
|
|
+ if (!el.id) this.checkData.push(el.id);
|
|
|
+ if (el.id && this.checkData.indexOf(el.id) == '-1') {
|
|
|
this.checkData.push(el.id);
|
|
|
}
|
|
|
});
|
|
|
@@ -1585,13 +1601,15 @@
|
|
|
processDailyParticipant.readonly=true;
|
|
|
}
|
|
|
},
|
|
|
- //点击排序
|
|
|
- sortData(column){
|
|
|
- let type = 'up';
|
|
|
- if (this.sort[column]==='up') type = 'down';
|
|
|
- this.$set(this.sort,column,type);
|
|
|
- this.processes = sortInit(this.processes, column, type);
|
|
|
- },
|
|
|
+ count(value,processes){
|
|
|
+ let count=0;
|
|
|
+ processes.every(function (process,i) {
|
|
|
+ if (process.id)count++;
|
|
|
+ if (i == value) return false;
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ return count;
|
|
|
+ }
|
|
|
},
|
|
|
});
|
|
|
</script>
|