fix:扭转工段mlog中不填设备和人员;mlogb中选择设备、操作人、开始时间和结束时间
This commit is contained in:
parent
1bfb826443
commit
7afdc70107
|
@ -727,6 +727,9 @@ export default {
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
mlogSubmit() {
|
mlogSubmit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
if(that.mlogItem.work_end_time==''||that.mlogItem.work_end_time==null){
|
||||||
|
that.mlogItem.handle_date = that.$TOOL.dateFormat2(new Date());
|
||||||
|
}
|
||||||
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
that.visible = false;
|
that.visible = false;
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</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" 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"
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</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" v-if="route_code!=='niuzhuan'">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="开始时间"
|
label="开始时间"
|
||||||
prop="work_start_time"
|
prop="work_start_time"
|
||||||
|
@ -187,8 +187,7 @@
|
||||||
/>
|
/>
|
||||||
</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">
|
|
||||||
<el-form-item label="结束时间" prop="work_end_time">
|
<el-form-item label="结束时间" prop="work_end_time">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.work_end_time"
|
v-model="form.work_end_time"
|
||||||
|
@ -306,6 +305,13 @@ export default {
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
work_end_time: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择结束时间",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
route: [
|
route: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -326,6 +332,7 @@ export default {
|
||||||
{ id: 20, name: "外协" },
|
{ id: 20, name: "外协" },
|
||||||
],
|
],
|
||||||
mlogtype:"",
|
mlogtype:"",
|
||||||
|
route_code:"",
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
options: [],
|
options: [],
|
||||||
|
@ -338,6 +345,8 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.route_code = this.$route.path.split("/")[2];
|
||||||
|
this.form.work_start_time = this.$TOOL.dateFormat(new Date());
|
||||||
this.getRoute();
|
this.getRoute();
|
||||||
this.getUser();
|
this.getUser();
|
||||||
this.getSupplier();
|
this.getSupplier();
|
||||||
|
|
|
@ -17,63 +17,134 @@
|
||||||
label-width="80px"
|
label-width="80px"
|
||||||
style="padding: 0 10px"
|
style="padding: 0 10px"
|
||||||
>
|
>
|
||||||
<el-form-item label="关联任务" v-if="!isfix">
|
<el-row>
|
||||||
<el-select
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
v-model="form.mtask"
|
<el-form-item label="关联任务" v-if="!isfix">
|
||||||
placeholder="关联任务"
|
<el-select
|
||||||
clearable
|
v-model="form.mtask"
|
||||||
style="width: 100%"
|
placeholder="关联任务"
|
||||||
@change="getMaterial"
|
clearable
|
||||||
>
|
class="width-100"
|
||||||
<el-option
|
@change="getMaterial"
|
||||||
v-for="item in options"
|
>
|
||||||
:key="item.id"
|
<el-option
|
||||||
:label="item.number"
|
v-for="item in options"
|
||||||
:value="item.id"
|
:key="item.id"
|
||||||
|
:label="item.number"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="批次选择">
|
||||||
|
<el-select
|
||||||
|
v-model="batchs"
|
||||||
|
placeholder="批次选择"
|
||||||
|
clearable
|
||||||
|
class="width-100"
|
||||||
|
@change="changeMaterial"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in materialOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.batch"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="物料扫码" style="display: flex;">
|
||||||
|
<scScanner @scanResult="formWminChange"></scScanner>
|
||||||
|
<el-input ref="codeInput" v-model="wm_in" clearable @change="formWminChange(wm_in)" style="width: 200px;margin-left: 4px;"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="使用数量" prop="count_use">
|
||||||
|
<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-form-item label="生产设备">
|
||||||
|
<el-select
|
||||||
|
v-model="form.equipment"
|
||||||
|
placeholder="生产设备"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in optionsEq"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
<span style="float:left">{{item.name}}</span>
|
||||||
|
<span style="float:right">{{item.number}}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="12" :xs="24" v-if="route_code=='niuzhuan'">
|
||||||
|
<el-form-item label="操作人">
|
||||||
|
<ehsSelect
|
||||||
|
v-model="form.handle_user"
|
||||||
|
:showName="form.handle_user_name"
|
||||||
|
:apiObj="this.$API.system.user.list"
|
||||||
|
:params="{ depts: dept }"
|
||||||
|
class="width-100"
|
||||||
|
></ehsSelect>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="12" :xs="24" v-if="route_code=='niuzhuan'">
|
||||||
|
<el-form-item
|
||||||
|
label="开始时间"
|
||||||
|
prop="work_start_time"
|
||||||
>
|
>
|
||||||
</el-option>
|
<el-date-picker
|
||||||
</el-select>
|
:disabled="mode == 'edit'"
|
||||||
</el-form-item>
|
v-model="form.work_start_time"
|
||||||
<el-form-item label="批次选择">
|
type="datetime"
|
||||||
<el-select
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
v-model="batchs"
|
style="width: 100%;"
|
||||||
placeholder="批次选择"
|
popper-append-to-body
|
||||||
clearable
|
/>
|
||||||
style="width: 100%"
|
</el-form-item>
|
||||||
@change="changeMaterial"
|
</el-col>
|
||||||
>
|
<el-col :md="12" :sm="12" :xs="24" v-if="route_code=='niuzhuan'">
|
||||||
<el-option
|
<el-form-item label="结束时间" prop="work_end_time">
|
||||||
v-for="item in materialOptions"
|
<el-date-picker
|
||||||
:key="item.id"
|
v-model="form.work_end_time"
|
||||||
:label="item.batch"
|
type="datetime"
|
||||||
:value="item.id"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
>
|
style="width: 100%;"
|
||||||
</el-option>
|
:disabledDate="disabledDateFn"
|
||||||
</el-select>
|
popper-append-to-body
|
||||||
</el-form-item>
|
/>
|
||||||
<el-form-item label="物料扫码" style="display: flex;">
|
</el-form-item>
|
||||||
<scScanner @scanResult="formWminChange"></scScanner>
|
</el-col>
|
||||||
<el-input ref="codeInput" v-model="wm_in" clearable @change="formWminChange(wm_in)" style="width: 200px;margin-left: 4px;"></el-input>
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
</el-form-item>
|
<el-form-item label="主要批次" v-if="!isfix">
|
||||||
<el-form-item label="使用数量" prop="count_use">
|
<el-select
|
||||||
<el-input-number ref="codeInput" v-model="form.count_use" :min="0" clearable></el-input-number>
|
v-model="form.parent"
|
||||||
</el-form-item>
|
placeholder="主要批次"
|
||||||
<el-form-item label="主要批次" v-if="!isfix">
|
clearable
|
||||||
<el-select
|
class="width-100"
|
||||||
v-model="form.parent"
|
>
|
||||||
placeholder="主要批次"
|
<el-option
|
||||||
clearable
|
v-for="item in mlogbInOptions"
|
||||||
style="width: 100%"
|
:key="item.id"
|
||||||
>
|
:label="item.batch"
|
||||||
<el-option
|
:value="item.id"
|
||||||
v-for="item in mlogbInOptions"
|
>
|
||||||
:key="item.id"
|
</el-option>
|
||||||
:label="item.batch"
|
</el-select>
|
||||||
:value="item.id"
|
</el-form-item>
|
||||||
>
|
</el-col>
|
||||||
</el-option>
|
</el-row>
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
<el-button type="primary" :loading="isSaveing" @click="submit">提交</el-button>
|
<el-button type="primary" :loading="isSaveing" @click="submit">提交</el-button>
|
||||||
|
@ -144,8 +215,10 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
wm_in:'',
|
wm_in:'',
|
||||||
|
route_code:"",
|
||||||
mlogbIns:[],
|
mlogbIns:[],
|
||||||
options: [],
|
options: [],
|
||||||
|
optionsEq: [],
|
||||||
mlogbInOptions:[],
|
mlogbInOptions:[],
|
||||||
materialOptions: [],
|
materialOptions: [],
|
||||||
mgroup_code:'',
|
mgroup_code:'',
|
||||||
|
@ -168,6 +241,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.route_code = this.$route.path.split("/")[2];
|
||||||
this.form.mlog = this.mlog;
|
this.form.mlog = this.mlog;
|
||||||
this.params.mlog = this.mlog;
|
this.params.mlog = this.mlog;
|
||||||
let arr = this.$route.path.split("/");
|
let arr = this.$route.path.split("/");
|
||||||
|
@ -176,6 +250,7 @@ export default {
|
||||||
this.getMtask();
|
this.getMtask();
|
||||||
this.getMaterial();
|
this.getMaterial();
|
||||||
this.getParentList();
|
this.getParentList();
|
||||||
|
this.getEquipment();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
|
@ -195,6 +270,17 @@ export default {
|
||||||
that.mlogbIns = res;
|
that.mlogbIns = res;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getEquipment() {
|
||||||
|
let that = this;
|
||||||
|
this.$API.em.equipment.list.req({ page: 0, type: 10,mgroup:that.mgroup}).then((res) => {
|
||||||
|
res.forEach((item) => {
|
||||||
|
let obj = {};
|
||||||
|
Object.assign(obj, item);
|
||||||
|
obj.label = item.name+'-'+item.number;
|
||||||
|
that.optionsEq.push(obj);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
getParentList(){
|
getParentList(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.mlogb.list.req(that.params).then((res) => {
|
that.$API.wpm.mlogb.list.req(that.params).then((res) => {
|
||||||
|
|
Loading…
Reference in New Issue