fix:禅道011、012
This commit is contained in:
parent
43df3085e2
commit
d843a84353
|
|
@ -256,12 +256,9 @@
|
|||
type="primary"
|
||||
@click="table_in_edit(scope.row)"
|
||||
v-if="mlogItem.submit_time== null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==10"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
v-if="mlogItem.submit_time == null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==20"
|
||||
@click="table_out_check_single(scope.row,'ins')"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
|
|
@ -269,9 +266,7 @@
|
|||
type="danger"
|
||||
style="margin-left: 10px;"
|
||||
@click="table_in_del(scope.row)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
:hideAdd="hideAdd"
|
||||
@add="rowAdd"
|
||||
>
|
||||
<el-table-column prop="number" label="物料编号" fixed min-width="120px">
|
||||
<el-table-column prop="number" label="物料编号" fixed min-width="80px">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit&&mode == 'outs'">{{ scope.row.number }}</span>
|
||||
<el-input v-if="scope.row.isEdit&&mode == 'outs'" v-model="scope.row.number" placeholder="物料编号"></el-input>
|
||||
|
|
@ -55,8 +55,7 @@
|
|||
:key="item.id"
|
||||
:label="item.number"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
<span v-if="!scope.row.isEdit&&mode == 'ins'">{{ scope.row.number }}</span>
|
||||
</template>
|
||||
|
|
@ -95,6 +94,17 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="扭转时间" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
|
||||
<template #default="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.work_time"
|
||||
style="width: 100%;"
|
||||
controls-position="right"
|
||||
:disabled="!scope.row.isEdit"
|
||||
@change="workTimeCountSun(scope.row)"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
|
||||
<template #default="scope">
|
||||
<el-date-picker
|
||||
|
|
@ -116,8 +126,7 @@
|
|||
class="width-100"
|
||||
controls-position="right"
|
||||
@change="defectCountSun(scope.row)"
|
||||
>
|
||||
</el-input-number>
|
||||
></el-input-number>
|
||||
<el-input-number
|
||||
v-if="item.testitem_field_type=='input-int'"
|
||||
v-model="scope.row[item.testitem_name]"
|
||||
|
|
@ -126,16 +135,14 @@
|
|||
class="width-100"
|
||||
controls-position="right"
|
||||
@change="defectCountSun(scope.row)"
|
||||
>
|
||||
</el-input-number>
|
||||
></el-input-number>
|
||||
<el-input
|
||||
v-if="item.testitem_field_type=='input-text'"
|
||||
v-model="scope.row[item.testitem_name]"
|
||||
class="width-100"
|
||||
:disabled="!scope.row.isEdit||!item.canEdit"
|
||||
@change="defectCountSun(scope.row)"
|
||||
>
|
||||
</el-input>
|
||||
></el-input>
|
||||
<el-select
|
||||
v-if="item.testitem_field_type=='select-text'"
|
||||
v-model="scope.row[item.testitem_name]"
|
||||
|
|
@ -149,8 +156,7 @@
|
|||
:key="item0"
|
||||
:label="item0"
|
||||
:value="item0"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-if="item.testitem_field_type=='selects-text'"
|
||||
|
|
@ -166,8 +172,7 @@
|
|||
:key="item1"
|
||||
:label="item1"
|
||||
:value="item1"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -193,42 +198,36 @@
|
|||
v-if="scope.row.isEdit"
|
||||
type="success"
|
||||
@click="formTableSave(scope.row)"
|
||||
>保存</el-button
|
||||
>
|
||||
>保存</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.isEdit&&scope.row.id"
|
||||
type="danger"
|
||||
style="margin-left: 5px;"
|
||||
@click="formTableCancel(scope.row)"
|
||||
>取消</el-button
|
||||
>
|
||||
>取消</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.isEdit&&setForm.cd_req_addr!=null"
|
||||
type="warning"
|
||||
style="margin-left: 5px;"
|
||||
@click="getEqData(scope.$index)"
|
||||
>重取数据</el-button
|
||||
>
|
||||
>重取数据</el-button>
|
||||
<el-button
|
||||
v-if="!scope.row.isEdit&&(mode=='outs'||route_code=='niuzhuan')"
|
||||
type="primary"
|
||||
@click="formTableEdit(scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.isEdit&&!scope.row.id"
|
||||
type="danger"
|
||||
style="margin-left: 5px;"
|
||||
@click="formTableDelet(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
v-if="!scope.row.isEdit"
|
||||
type="danger"
|
||||
style="margin-left: 5px;"
|
||||
@click="formTableDel(scope.row.id)"
|
||||
>删除</el-button
|
||||
>
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</sc-form-table>
|
||||
|
|
@ -298,8 +297,7 @@
|
|||
:key="item.testitem"
|
||||
:label="item.testitem_name"
|
||||
:value="item.testitem"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -319,17 +317,14 @@
|
|||
v-model="checkAll"
|
||||
:indeterminate="indeterminate"
|
||||
@change="handleCheckAll"
|
||||
>
|
||||
全部
|
||||
</el-checkbox>
|
||||
>全部</el-checkbox>
|
||||
</template>
|
||||
<el-option
|
||||
v-for="item in qct_defects"
|
||||
:key="item.defect"
|
||||
:label="item.defect_name"
|
||||
:value="item.defect"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -603,6 +598,16 @@ export default {
|
|||
that.addTemplate.number = years+ months + that.material_model+num;
|
||||
}
|
||||
},
|
||||
workTimeCountSun(row){
|
||||
let that = this;
|
||||
let time = row.work_time*60*1000;
|
||||
let index = that.mlogbwlist.indexOf(row);
|
||||
let end = new Date(row.work_start_time).getTime()+time;
|
||||
let end_time = that.$TOOL.dateFormat(new Date(end), 'yyyy-MM-dd hh:mm:ss');
|
||||
console.log('index',index);
|
||||
console.log('end_time',end_time);
|
||||
that.mlogbwlist[index].work_end_time = end_time;
|
||||
},
|
||||
getEquipment4() {
|
||||
let that = this;
|
||||
that.$API.em.equipment.list.req({page:0,cate__code:"4"}).then((res) => {
|
||||
|
|
@ -677,6 +682,12 @@ export default {
|
|||
let obj = {};
|
||||
obj = Object.assign({},item);
|
||||
obj.isEdit = false;
|
||||
if(obj.work_start_time!==null&&obj.work_start_time!==''&&obj.work_end_time!==null&&obj.work_end_time!==''){
|
||||
let start = new Date(obj.work_start_time).getTime();
|
||||
let end = new Date(obj.work_end_time).getTime();
|
||||
let time = (end-start)/60000;
|
||||
obj.work_time = time;
|
||||
}
|
||||
if(that.qct!=''){
|
||||
if(item.ftest!=null){
|
||||
if(item.ftest.ftestdefects!==undefined&&item.ftest.ftestdefects!==''&&item.ftest.ftestdefects!==null&&item.ftest.ftestdefects.length>0){
|
||||
|
|
@ -766,6 +777,7 @@ export default {
|
|||
obj.equip = row.equip;
|
||||
obj.work_start_time = row.work_start_time;
|
||||
obj.work_end_time = row.work_end_time;
|
||||
obj.work_time = row.work_time;
|
||||
}
|
||||
if(row.id!==''&&row.id!==undefined&&row.id!==null){
|
||||
obj.id = row.id;
|
||||
|
|
@ -796,8 +808,14 @@ export default {
|
|||
formTableEdit(row) {
|
||||
this.mlogbwlist.forEach((item, index) => {
|
||||
if (item.id == row.id) {
|
||||
// console.log('row',row);
|
||||
console.log('row',row);
|
||||
console.log('new Date()',new Date());
|
||||
this.mlogbwlist[index].isEdit = true;
|
||||
let date = new Date();
|
||||
console.log('new Date()',this.$TOOL.dateFormat(date));
|
||||
if(this.mlogbwlist[index].work_start_time==''||this.mlogbwlist[index].work_start_time==null){
|
||||
this.mlogbwlist[index].work_start_time = this.$TOOL.dateFormat(date, 'yyyy-MM-dd hh:mm:ss');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue