fix:新日志详情输出物料刷新
This commit is contained in:
parent
7641469088
commit
f997f8d449
|
@ -366,6 +366,7 @@
|
|||
<el-card v-else style="width: 100%;margin-bottom:1vh" header="输出物料" shadow="never">
|
||||
<check-table
|
||||
v-if="checkTableShow"
|
||||
ref="checkTable"
|
||||
:mlogId="mlogId"
|
||||
:qct="mlogItem.qct"
|
||||
:wm = "wm"
|
||||
|
@ -376,127 +377,11 @@
|
|||
:mgroupName= "mlogItem.mgroup_name"
|
||||
:isSubmit="isSubmit"
|
||||
:batchNumber="batchNumber"
|
||||
:handle_user="handle_user"
|
||||
:handle_date="handle_date"
|
||||
:handle_user="mlogItem.handle_user"
|
||||
:handle_date="mlogItem.handle_date"
|
||||
:processType="processType"
|
||||
style="width: 100%;height: 500px;"
|
||||
></check-table>
|
||||
<!-- <sc-form-table
|
||||
hideDelete
|
||||
id="mlogbwlist"
|
||||
v-model="mlogbwlist"
|
||||
:addTemplate="addTemplate"
|
||||
placeholder="暂无数据"
|
||||
:hideAdd="hideAdd"
|
||||
>
|
||||
<el-table-column prop="mlogb__batch" label="物料批次" fixed min-width="80px">
|
||||
</el-table-column>
|
||||
<el-table-column prop="number" label="物料编号" fixed min-width="80px">
|
||||
</el-table-column>
|
||||
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id" width="150px">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">{{ scope.row[item.testitem_name] }}</span>
|
||||
<el-input-number
|
||||
v-if="item.testitem_field_type=='input-number'&&scope.row.isEdit"
|
||||
v-model="scope.row[item.testitem_name]"
|
||||
class="width-100"
|
||||
controls-position="right"
|
||||
@change="defectCountSun(scope.row)"
|
||||
></el-input-number>
|
||||
<el-input-number
|
||||
v-if="item.testitem_field_type=='input-int'&&scope.row.isEdit"
|
||||
v-model="scope.row[item.testitem_name]"
|
||||
:min="0"
|
||||
class="width-100"
|
||||
controls-position="right"
|
||||
@change="defectCountSun(scope.row)"
|
||||
></el-input-number>
|
||||
<el-input
|
||||
v-if="item.testitem_field_type=='input-text'&&scope.row.isEdit"
|
||||
v-model="scope.row[item.testitem_name]"
|
||||
class="width-100"
|
||||
@change="defectCountSun(scope.row)"
|
||||
></el-input>
|
||||
<el-select
|
||||
v-if="item.testitem_field_type=='select-text'&&scope.row.isEdit"
|
||||
v-model="scope.row[item.testitem_name]"
|
||||
clearable
|
||||
class="width-100"
|
||||
@change="defectCountSun(scope.row)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item0 in item.testitem_choices"
|
||||
:key="item0"
|
||||
:label="item0"
|
||||
:value="item0"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-if="item.testitem_field_type=='selects-text'&&scope.row.isEdit"
|
||||
v-model="scope.row[item.testitem_name]"
|
||||
clearable
|
||||
multiple
|
||||
class="width-100"
|
||||
@change="defectCountSun(scope.row)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item1 in item.testitem_choices"
|
||||
:key="item1"
|
||||
:label="item1"
|
||||
:value="item1"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="note" :label="item.defect_name" v-for="item in qct_defects" :key="item.id" width="120px">
|
||||
<template #default="scope">
|
||||
<el-switch
|
||||
:disabled="!scope.row.isEdit"
|
||||
v-model="scope.row[item.defect_name]"
|
||||
style="--el-switch-on-color: red"
|
||||
@change="switchChange(scope.row, item)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="note" label="备注" width="80px">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">{{ scope.row.note }}</span>
|
||||
<el-input v-else v-model="scope.row.note" placeholder="备注"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="160" align="center" fixed="right" v-if="!isSubmit">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="scope.row.isEdit"
|
||||
type="success"
|
||||
@click="formTableSave(scope.row)"
|
||||
>保存</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
|
||||
v-if="!scope.row.isEdit"
|
||||
type="primary"
|
||||
@click="formTableEdit(scope.row)"
|
||||
>编辑</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
|
||||
v-if="!scope.row.isEdit"
|
||||
type="danger"
|
||||
style="margin-left: 5px;"
|
||||
@click="formTableDel(scope.row.id)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</sc-form-table> -->
|
||||
</el-card>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
|
@ -1008,7 +893,11 @@ export default {
|
|||
that.$API.wpm.mlogb.delIn.req(row.id).then((res) => {
|
||||
that.$message.success("操作成功");
|
||||
that.$refs.tableIn.refresh();
|
||||
if(that.mlogItem.material_out_&&that.mlogItem.material_out_.tracking==10){
|
||||
that.$refs.tableOut.refresh();
|
||||
}else{
|
||||
that.$refs.checkTable.refreshfun();
|
||||
}
|
||||
//删除in记录后,out也要删除相应的记录
|
||||
});
|
||||
});
|
||||
|
@ -1084,7 +973,11 @@ export default {
|
|||
},
|
||||
handleSaveSuccess() {
|
||||
this.$refs.tableIn.refresh();
|
||||
if(this.mlogItem.material_out_&&this.mlogItem.material_out_.tracking==10){
|
||||
this.$refs.tableOut.refresh();
|
||||
}else{
|
||||
this.$refs.checkTable.refreshfun();
|
||||
}
|
||||
},
|
||||
handleCheckSuccess() {
|
||||
this.$refs.tableOut.refresh();
|
||||
|
@ -1101,7 +994,12 @@ export default {
|
|||
saveMlogbInClose(){
|
||||
this.dialog.save = false;
|
||||
this.$refs.tableIn.refresh();
|
||||
if(this.mlogItem.material_out_&&this.mlogItem.material_out_.tracking==10){
|
||||
this.$refs.tableOut.refresh();
|
||||
}else{
|
||||
this.$refs.checkTable.refreshfun();
|
||||
}
|
||||
|
||||
},
|
||||
//编辑成功后的方法调用
|
||||
handleEditSuccess() {
|
||||
|
|
|
@ -453,6 +453,9 @@ export default {
|
|||
that.currentDate = that.$TOOL.dateFormat2(new Date());
|
||||
},
|
||||
methods: {
|
||||
refreshfun(){
|
||||
this.getList();
|
||||
},
|
||||
rowAdd(data){
|
||||
let that = this;
|
||||
let years = that.year+'';
|
||||
|
|
Loading…
Reference in New Issue