fix:bx中扭转日志添加设备和开始结束时间

This commit is contained in:
shijing 2025-04-09 16:20:58 +08:00
parent 6662406d6e
commit ad24cbd250
3 changed files with 74 additions and 17 deletions

View File

@ -234,13 +234,11 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作人" prop="handle_user" v-if="route_code=='niuzhuan'">
</el-table-column>
<el-table-column label="开始时间" prop="work_start_time" show-overflow-tooltip v-if="route_code=='niuzhuan'">
</el-table-column>
<el-table-column label="结束时间" prop="work_end_time" show-overflow-tooltip v-if="route_code=='niuzhuan'">
</el-table-column>
<el-table-column label="创建时间" prop="create_time" show-overflow-tooltip>
<el-table-column
label="创建时间"
prop="create_time"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
label="操作"
@ -523,7 +521,6 @@ export default {
tracking:10,
mlogb:"",
mgroup: "",
route_code:"",
mlogItem: {},
saveInForm: {
count_use: 0,
@ -578,7 +575,6 @@ export default {
this.paramsIn.mlog = this.mlogId;
this.paramsOut.mlog = this.mlogId;
this.apiObj = this.$API.wpm.mlogb.list;
this.route_code = this.$route.path.split("/")[2];
that.$API.wpm.mlogb.list.req(that.paramsIn).then((res) => {
that.tableData = res;
})

View File

@ -67,7 +67,7 @@
<el-input-number ref="codeInput" v-model="form.count_use" :min="0" clearable class="width-100"></el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="12" :xs="24" v-if="route_code=='niuzhuan'">
<!-- <el-col :md="12" :sm="12" :xs="24" v-if="route_code=='niuzhuan'">
<el-form-item label="生产设备">
<el-select
v-model="form.equipment"
@ -125,7 +125,7 @@
popper-append-to-body
/>
</el-form-item>
</el-col>
</el-col> -->
<el-col :md="12" :sm="12" :xs="24">
<el-form-item label="主要批次" v-if="!isfix">
<el-select
@ -436,8 +436,6 @@ export default {
that.form.batch = '';
that.form.parent = '';
that.form.count_use = 0;
// that.scanKyes!=='mat'&&that.mlogbInCount>1
// that.bwItemForm.wpr!=""
if(that.scanKyes!=='mat'&&that.mlogbInCount>1){
that.bwItemForm.mlogb = res.id;
that.$API.wpm.mlogbw.create.req(that.bwItemForm).then((res) => {

View File

@ -42,7 +42,7 @@
<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-select
v-if="scope.row.isEdit&&mode == 'ins'"
v-if="scope.row.isEdit&&mode == 'ins'&&route_code!=='niuzhuan'"
v-model="scope.row.wpr"
placeholder="动态成品"
clearable
@ -60,6 +60,53 @@
<span v-if="!scope.row.isEdit&&mode == 'ins'">{{ scope.row.number }}</span>
</template>
</el-table-column>
<el-table-column label="生产设备" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
<template #default="scope">
<el-select
v-model="scope.row.equip"
placeholder="生产设备"
clearable
filterable
:disabled="!scope.row.isEdit"
style="width: 100%"
>
<el-option
v-for="item in optionsEq"
:key="item.id"
:label="item.name"
:value="item.id"
>
<span style="float:left">{{item.name}}</span>
<span style="float:right">{{item.number}}</span>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="开始时间" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
<template #default="scope">
<el-date-picker
:disabled="!scope.row.isEdit"
v-model="scope.row.work_start_time"
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
style="width: 100%;"
popper-append-to-body
/>
</template>
</el-table-column>
<el-table-column label="结束时间" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
<template #default="scope">
<el-date-picker
v-model="scope.row.work_end_time"
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
style="width: 100%;"
:disabled="!scope.row.isEdit"
popper-append-to-body
/>
</template>
</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">
<el-input-number
@ -158,7 +205,7 @@
>取消</el-link
>
<el-link
v-if="!scope.row.isEdit&&mode=='outs'"
v-if="!scope.row.isEdit&&(mode=='outs'||route_code=='niuzhuan')"
type="primary"
size="small"
@click="formTableEdit(scope.row)"
@ -328,7 +375,6 @@
</el-drawer>
</template>
<script>
import mockData from "./mock.json";
export default {
props: {
mlogb: {
@ -393,6 +439,7 @@ export default {
qct:"",
values:"",
wprNumber:"",
route_code:"",
wprInputText:"",
params: {mlogb:'',page:0},
hideAdd: true,
@ -425,6 +472,7 @@ export default {
equipment:[{ required: true, message: "请选择设备" }],
},
optionsEq:[],
defectlists:[],
testitemlists:[],
qct_defects_origin:[],
@ -436,6 +484,10 @@ export default {
},
mounted() {
let that = this;
this.route_code = this.$route.path.split("/")[2];
if(this.route_code=='niuzhuan'){
this.getEquipment4();
}
that.hideAdd = that.isSubmit;
if(that.mgroupName!=='排板'){
that.addTemplate.number = that.batchNumber;
@ -467,6 +519,12 @@ export default {
this.tableHeight = document.getElementById('mlogbwMain').clientHeight-20;
},500)
},
getEquipment4() {
let that = this;
that.$API.em.equipment.list.req({page:0,cate__code:"4"}).then((res) => {
that.optionsEq = res;
})
},
getEquipments(){
let that = this;
that.$API.em.equipment.list.req({page:0,cate__code:"6"}).then((res) => {
@ -619,7 +677,12 @@ export default {
})
}
}
console.log('obj',obj);
// console.log('obj',obj);
if(that.mode == 'ins'&&that.route_code=='niuzhuan'){
obj.equip = row.equip;
obj.work_start_time = row.work_start_time;
obj.work_end_time = row.work_end_time;
}
if(row.id!==''&&row.id!==undefined&&row.id!==null){
obj.id = row.id;
that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => {