fix:禅道011、012
This commit is contained in:
parent
43df3085e2
commit
d843a84353
|
|
@ -256,12 +256,9 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="table_in_edit(scope.row)"
|
@click="table_in_edit(scope.row)"
|
||||||
v-if="mlogItem.submit_time== null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==10"
|
v-if="mlogItem.submit_time== null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==10"
|
||||||
>
|
>编辑</el-button>
|
||||||
编辑
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
v-if="mlogItem.submit_time == null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==20"
|
|
||||||
@click="table_out_check_single(scope.row,'ins')"
|
@click="table_out_check_single(scope.row,'ins')"
|
||||||
>详情</el-button>
|
>详情</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -269,9 +266,7 @@
|
||||||
type="danger"
|
type="danger"
|
||||||
style="margin-left: 10px;"
|
style="margin-left: 10px;"
|
||||||
@click="table_in_del(scope.row)"
|
@click="table_in_del(scope.row)"
|
||||||
>
|
>删除</el-button>
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
:hideAdd="hideAdd"
|
:hideAdd="hideAdd"
|
||||||
@add="rowAdd"
|
@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">
|
<template #default="scope">
|
||||||
<span v-if="!scope.row.isEdit&&mode == 'outs'">{{ scope.row.number }}</span>
|
<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>
|
<el-input v-if="scope.row.isEdit&&mode == 'outs'" v-model="scope.row.number" placeholder="物料编号"></el-input>
|
||||||
|
|
@ -55,8 +55,7 @@
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.number"
|
:label="item.number"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
<span v-if="!scope.row.isEdit&&mode == 'ins'">{{ scope.row.number }}</span>
|
<span v-if="!scope.row.isEdit&&mode == 'ins'">{{ scope.row.number }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -77,8 +76,8 @@
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
<span style="float:left">{{item.name}}</span>
|
<span style="float:left">{{item.name}}</span>
|
||||||
<span style="float:right">{{item.number}}</span>
|
<span style="float:right">{{item.number}}</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -95,16 +94,27 @@
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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'">
|
<el-table-column label="结束时间" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="scope.row.work_end_time"
|
v-model="scope.row.work_end_time"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
:disabled="!scope.row.isEdit"
|
:disabled="!scope.row.isEdit"
|
||||||
popper-append-to-body
|
popper-append-to-body
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id" width="150px">
|
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id" width="150px">
|
||||||
|
|
@ -116,8 +126,7 @@
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
@change="defectCountSun(scope.row)"
|
@change="defectCountSun(scope.row)"
|
||||||
>
|
></el-input-number>
|
||||||
</el-input-number>
|
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-if="item.testitem_field_type=='input-int'"
|
v-if="item.testitem_field_type=='input-int'"
|
||||||
v-model="scope.row[item.testitem_name]"
|
v-model="scope.row[item.testitem_name]"
|
||||||
|
|
@ -126,16 +135,14 @@
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
@change="defectCountSun(scope.row)"
|
@change="defectCountSun(scope.row)"
|
||||||
>
|
></el-input-number>
|
||||||
</el-input-number>
|
|
||||||
<el-input
|
<el-input
|
||||||
v-if="item.testitem_field_type=='input-text'"
|
v-if="item.testitem_field_type=='input-text'"
|
||||||
v-model="scope.row[item.testitem_name]"
|
v-model="scope.row[item.testitem_name]"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
:disabled="!scope.row.isEdit||!item.canEdit"
|
:disabled="!scope.row.isEdit||!item.canEdit"
|
||||||
@change="defectCountSun(scope.row)"
|
@change="defectCountSun(scope.row)"
|
||||||
>
|
></el-input>
|
||||||
</el-input>
|
|
||||||
<el-select
|
<el-select
|
||||||
v-if="item.testitem_field_type=='select-text'"
|
v-if="item.testitem_field_type=='select-text'"
|
||||||
v-model="scope.row[item.testitem_name]"
|
v-model="scope.row[item.testitem_name]"
|
||||||
|
|
@ -149,8 +156,7 @@
|
||||||
:key="item0"
|
:key="item0"
|
||||||
:label="item0"
|
:label="item0"
|
||||||
:value="item0"
|
:value="item0"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select
|
<el-select
|
||||||
v-if="item.testitem_field_type=='selects-text'"
|
v-if="item.testitem_field_type=='selects-text'"
|
||||||
|
|
@ -166,8 +172,7 @@
|
||||||
:key="item1"
|
:key="item1"
|
||||||
:label="item1"
|
:label="item1"
|
||||||
:value="item1"
|
:value="item1"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -193,42 +198,36 @@
|
||||||
v-if="scope.row.isEdit"
|
v-if="scope.row.isEdit"
|
||||||
type="success"
|
type="success"
|
||||||
@click="formTableSave(scope.row)"
|
@click="formTableSave(scope.row)"
|
||||||
>保存</el-button
|
>保存</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.isEdit&&scope.row.id"
|
v-if="scope.row.isEdit&&scope.row.id"
|
||||||
type="danger"
|
type="danger"
|
||||||
style="margin-left: 5px;"
|
style="margin-left: 5px;"
|
||||||
@click="formTableCancel(scope.row)"
|
@click="formTableCancel(scope.row)"
|
||||||
>取消</el-button
|
>取消</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.isEdit&&setForm.cd_req_addr!=null"
|
v-if="scope.row.isEdit&&setForm.cd_req_addr!=null"
|
||||||
type="warning"
|
type="warning"
|
||||||
style="margin-left: 5px;"
|
style="margin-left: 5px;"
|
||||||
@click="getEqData(scope.$index)"
|
@click="getEqData(scope.$index)"
|
||||||
>重取数据</el-button
|
>重取数据</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!scope.row.isEdit&&(mode=='outs'||route_code=='niuzhuan')"
|
v-if="!scope.row.isEdit&&(mode=='outs'||route_code=='niuzhuan')"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="formTableEdit(scope.row)"
|
@click="formTableEdit(scope.row)"
|
||||||
>编辑</el-button
|
>编辑</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.isEdit&&!scope.row.id"
|
v-if="scope.row.isEdit&&!scope.row.id"
|
||||||
type="danger"
|
type="danger"
|
||||||
style="margin-left: 5px;"
|
style="margin-left: 5px;"
|
||||||
@click="formTableDelet(scope.row)"
|
@click="formTableDelet(scope.row)"
|
||||||
>删除</el-button
|
>删除</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!scope.row.isEdit"
|
v-if="!scope.row.isEdit"
|
||||||
type="danger"
|
type="danger"
|
||||||
style="margin-left: 5px;"
|
style="margin-left: 5px;"
|
||||||
@click="formTableDel(scope.row.id)"
|
@click="formTableDel(scope.row.id)"
|
||||||
>删除</el-button
|
>删除</el-button>
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</sc-form-table>
|
</sc-form-table>
|
||||||
|
|
@ -276,8 +275,8 @@
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
<span style="float:left">{{item.name}}</span>
|
<span style="float:left">{{item.name}}</span>
|
||||||
<span style="float:right">{{item.number}}</span>
|
<span style="float:right">{{item.number}}</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -298,8 +297,7 @@
|
||||||
:key="item.testitem"
|
:key="item.testitem"
|
||||||
:label="item.testitem_name"
|
:label="item.testitem_name"
|
||||||
:value="item.testitem"
|
:value="item.testitem"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -319,17 +317,14 @@
|
||||||
v-model="checkAll"
|
v-model="checkAll"
|
||||||
:indeterminate="indeterminate"
|
:indeterminate="indeterminate"
|
||||||
@change="handleCheckAll"
|
@change="handleCheckAll"
|
||||||
>
|
>全部</el-checkbox>
|
||||||
全部
|
|
||||||
</el-checkbox>
|
|
||||||
</template>
|
</template>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in qct_defects"
|
v-for="item in qct_defects"
|
||||||
:key="item.defect"
|
:key="item.defect"
|
||||||
:label="item.defect_name"
|
:label="item.defect_name"
|
||||||
:value="item.defect"
|
:value="item.defect"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -377,10 +372,10 @@
|
||||||
{{ item2.value }}
|
{{ item2.value }}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="90" align="center" fixed="right">
|
<el-table-column label="操作" width="90" align="center" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="danger" size="small" @click="selectWprDel(scope.row)">删除</el-button>
|
<el-button type="danger" size="small" @click="selectWprDel(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
|
|
@ -603,6 +598,16 @@ export default {
|
||||||
that.addTemplate.number = years+ months + that.material_model+num;
|
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() {
|
getEquipment4() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.em.equipment.list.req({page:0,cate__code:"4"}).then((res) => {
|
that.$API.em.equipment.list.req({page:0,cate__code:"4"}).then((res) => {
|
||||||
|
|
@ -677,6 +682,12 @@ export default {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj = Object.assign({},item);
|
obj = Object.assign({},item);
|
||||||
obj.isEdit = false;
|
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(that.qct!=''){
|
||||||
if(item.ftest!=null){
|
if(item.ftest!=null){
|
||||||
if(item.ftest.ftestdefects!==undefined&&item.ftest.ftestdefects!==''&&item.ftest.ftestdefects!==null&&item.ftest.ftestdefects.length>0){
|
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.equip = row.equip;
|
||||||
obj.work_start_time = row.work_start_time;
|
obj.work_start_time = row.work_start_time;
|
||||||
obj.work_end_time = row.work_end_time;
|
obj.work_end_time = row.work_end_time;
|
||||||
|
obj.work_time = row.work_time;
|
||||||
}
|
}
|
||||||
if(row.id!==''&&row.id!==undefined&&row.id!==null){
|
if(row.id!==''&&row.id!==undefined&&row.id!==null){
|
||||||
obj.id = row.id;
|
obj.id = row.id;
|
||||||
|
|
@ -796,8 +808,14 @@ export default {
|
||||||
formTableEdit(row) {
|
formTableEdit(row) {
|
||||||
this.mlogbwlist.forEach((item, index) => {
|
this.mlogbwlist.forEach((item, index) => {
|
||||||
if (item.id == row.id) {
|
if (item.id == row.id) {
|
||||||
// console.log('row',row);
|
console.log('row',row);
|
||||||
|
console.log('new Date()',new Date());
|
||||||
this.mlogbwlist[index].isEdit = true;
|
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