fix:bx中扭转日志添加设备和开始结束时间
This commit is contained in:
parent
6662406d6e
commit
ad24cbd250
|
@ -234,13 +234,11 @@
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作人" prop="handle_user" v-if="route_code=='niuzhuan'">
|
<el-table-column
|
||||||
</el-table-column>
|
label="创建时间"
|
||||||
<el-table-column label="开始时间" prop="work_start_time" show-overflow-tooltip v-if="route_code=='niuzhuan'">
|
prop="create_time"
|
||||||
</el-table-column>
|
show-overflow-tooltip
|
||||||
<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>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
|
@ -523,7 +521,6 @@ export default {
|
||||||
tracking:10,
|
tracking:10,
|
||||||
mlogb:"",
|
mlogb:"",
|
||||||
mgroup: "",
|
mgroup: "",
|
||||||
route_code:"",
|
|
||||||
mlogItem: {},
|
mlogItem: {},
|
||||||
saveInForm: {
|
saveInForm: {
|
||||||
count_use: 0,
|
count_use: 0,
|
||||||
|
@ -578,7 +575,6 @@ export default {
|
||||||
this.paramsIn.mlog = this.mlogId;
|
this.paramsIn.mlog = this.mlogId;
|
||||||
this.paramsOut.mlog = this.mlogId;
|
this.paramsOut.mlog = this.mlogId;
|
||||||
this.apiObj = this.$API.wpm.mlogb.list;
|
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.$API.wpm.mlogb.list.req(that.paramsIn).then((res) => {
|
||||||
that.tableData = res;
|
that.tableData = res;
|
||||||
})
|
})
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
<el-input-number ref="codeInput" v-model="form.count_use" :min="0" clearable class="width-100"></el-input-number>
|
<el-input-number ref="codeInput" v-model="form.count_use" :min="0" clearable class="width-100"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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-form-item label="生产设备">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.equipment"
|
v-model="form.equipment"
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
popper-append-to-body
|
popper-append-to-body
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :md="12" :sm="12" :xs="24">
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
<el-form-item label="主要批次" v-if="!isfix">
|
<el-form-item label="主要批次" v-if="!isfix">
|
||||||
<el-select
|
<el-select
|
||||||
|
@ -436,8 +436,6 @@ export default {
|
||||||
that.form.batch = '';
|
that.form.batch = '';
|
||||||
that.form.parent = '';
|
that.form.parent = '';
|
||||||
that.form.count_use = 0;
|
that.form.count_use = 0;
|
||||||
// that.scanKyes!=='mat'&&that.mlogbInCount>1
|
|
||||||
// that.bwItemForm.wpr!=""
|
|
||||||
if(that.scanKyes!=='mat'&&that.mlogbInCount>1){
|
if(that.scanKyes!=='mat'&&that.mlogbInCount>1){
|
||||||
that.bwItemForm.mlogb = res.id;
|
that.bwItemForm.mlogb = res.id;
|
||||||
that.$API.wpm.mlogbw.create.req(that.bwItemForm).then((res) => {
|
that.$API.wpm.mlogbw.create.req(that.bwItemForm).then((res) => {
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<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>
|
||||||
<el-select
|
<el-select
|
||||||
v-if="scope.row.isEdit&&mode == 'ins'"
|
v-if="scope.row.isEdit&&mode == 'ins'&&route_code!=='niuzhuan'"
|
||||||
v-model="scope.row.wpr"
|
v-model="scope.row.wpr"
|
||||||
placeholder="动态成品"
|
placeholder="动态成品"
|
||||||
clearable
|
clearable
|
||||||
|
@ -60,6 +60,53 @@
|
||||||
<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>
|
||||||
</el-table-column>
|
</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">
|
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id" width="150px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
@ -158,7 +205,7 @@
|
||||||
>取消</el-link
|
>取消</el-link
|
||||||
>
|
>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="!scope.row.isEdit&&mode=='outs'"
|
v-if="!scope.row.isEdit&&(mode=='outs'||route_code=='niuzhuan')"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="formTableEdit(scope.row)"
|
@click="formTableEdit(scope.row)"
|
||||||
|
@ -328,7 +375,6 @@
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import mockData from "./mock.json";
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
mlogb: {
|
mlogb: {
|
||||||
|
@ -393,6 +439,7 @@ export default {
|
||||||
qct:"",
|
qct:"",
|
||||||
values:"",
|
values:"",
|
||||||
wprNumber:"",
|
wprNumber:"",
|
||||||
|
route_code:"",
|
||||||
wprInputText:"",
|
wprInputText:"",
|
||||||
params: {mlogb:'',page:0},
|
params: {mlogb:'',page:0},
|
||||||
hideAdd: true,
|
hideAdd: true,
|
||||||
|
@ -425,6 +472,7 @@ export default {
|
||||||
equipment:[{ required: true, message: "请选择设备" }],
|
equipment:[{ required: true, message: "请选择设备" }],
|
||||||
|
|
||||||
},
|
},
|
||||||
|
optionsEq:[],
|
||||||
defectlists:[],
|
defectlists:[],
|
||||||
testitemlists:[],
|
testitemlists:[],
|
||||||
qct_defects_origin:[],
|
qct_defects_origin:[],
|
||||||
|
@ -436,6 +484,10 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
this.route_code = this.$route.path.split("/")[2];
|
||||||
|
if(this.route_code=='niuzhuan'){
|
||||||
|
this.getEquipment4();
|
||||||
|
}
|
||||||
that.hideAdd = that.isSubmit;
|
that.hideAdd = that.isSubmit;
|
||||||
if(that.mgroupName!=='排板'){
|
if(that.mgroupName!=='排板'){
|
||||||
that.addTemplate.number = that.batchNumber;
|
that.addTemplate.number = that.batchNumber;
|
||||||
|
@ -467,6 +519,12 @@ export default {
|
||||||
this.tableHeight = document.getElementById('mlogbwMain').clientHeight-20;
|
this.tableHeight = document.getElementById('mlogbwMain').clientHeight-20;
|
||||||
},500)
|
},500)
|
||||||
},
|
},
|
||||||
|
getEquipment4() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.em.equipment.list.req({page:0,cate__code:"4"}).then((res) => {
|
||||||
|
that.optionsEq = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
getEquipments(){
|
getEquipments(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.em.equipment.list.req({page:0,cate__code:"6"}).then((res) => {
|
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){
|
if(row.id!==''&&row.id!==undefined&&row.id!==null){
|
||||||
obj.id = row.id;
|
obj.id = row.id;
|
||||||
that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => {
|
that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => {
|
||||||
|
|
Loading…
Reference in New Issue