Commit ecd0d244 authored by chenzj's avatar chenzj

修改台账数据

parent bd2d1e8d
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
<dict-tag :options="dict.type.mes_mainten_type" :value="scope.row.maintenType"/> <dict-tag :options="dict.type.mes_mainten_type" :value="scope.row.maintenType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="下次保养周期" width="100px" align="center" prop="nextMaintenPeriod" /> <el-table-column label="最低寿命" width="100px" align="center" prop="nextMaintenPeriod" />
<el-table-column label="下次保养日期" align="center" prop="nextMaintenDate" width="180"> <el-table-column label="下次保养日期" align="center" prop="nextMaintenDate" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.nextMaintenDate, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.nextMaintenDate, '{y}-{m}-{d}') }}</span>
...@@ -207,6 +207,28 @@ ...@@ -207,6 +207,28 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item label="物料编码" prop="itemCode">
<el-input v-model="form.itemCode" placeholder="请选择物料编码">
<el-button
slot="append"
icon="el-icon-search"
@click="handleBrandSelect"
></el-button>
</el-input>
<BrandSelect
ref="brSelect"
@onSelected="onBrandSelected"
></BrandSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="存放位置" prop="location">
<el-input v-model="form.location" placeholder="请输入存放位置" />
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="品牌" prop="brand"> <el-form-item label="品牌" prop="brand">
...@@ -221,8 +243,8 @@ ...@@ -221,8 +243,8 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="工装夹具编号" prop="toolCode"> <el-form-item label="SN码" prop="toolCode">
<el-input v-model="form.toolCode" placeholder="请输入工装夹具编号" /> <el-input v-model="form.toolCode" placeholder="请输入SN码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
...@@ -270,11 +292,18 @@ ...@@ -270,11 +292,18 @@
placeholder="请选择下一次保养日期"> placeholder="请选择下一次保养日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-else label="下一次保养周期" prop="nextMaintenPeriod"> <el-form-item v-else label="最低寿命" prop="nextMaintenPeriod">
<el-input v-model="form.nextMaintenPeriod" placeholder="请输入下一次保养周期" /> <el-input v-model="form.nextMaintenPeriod" placeholder="请输入最低寿命" />
</el-form-item > </el-form-item >
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="剩余寿命" prop="lifeTime">
<el-input v-model="form.lifeTime" placeholder="请输入剩余寿命" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="状态"> <el-form-item label="状态">
<el-radio-group disabled="disabled" v-model="form.status"> <el-radio-group disabled="disabled" v-model="form.status">
<el-radio <el-radio
...@@ -307,7 +336,9 @@ ...@@ -307,7 +336,9 @@
import { listTool, getTool, delTool, addTool, updateTool } from "@/api/mes/tm/tool"; import { listTool, getTool, delTool, addTool, updateTool } from "@/api/mes/tm/tool";
import { listAllTooltype } from "@/api/mes/tm/tooltype" import { listAllTooltype } from "@/api/mes/tm/tooltype"
import {genCode} from "@/api/system/autocode/rule" import {genCode} from "@/api/system/autocode/rule"
import BrandSelect from "@/components/itemSelect/single.vue";
export default { export default {
components:{BrandSelect},
name: "Tool", name: "Tool",
dicts: ['mes_tool_status', 'mes_mainten_type'], dicts: ['mes_tool_status', 'mes_mainten_type'],
data() { data() {
...@@ -341,6 +372,10 @@ export default { ...@@ -341,6 +372,10 @@ export default {
pageSize: 10, pageSize: 10,
toolCode: null, toolCode: null,
toolName: null, toolName: null,
itemId: null,
itemCode: null,
lifeTime: null,
location: null,
brand: null, brand: null,
spec: null, spec: null,
toolTypeId: null, toolTypeId: null,
...@@ -399,6 +434,10 @@ export default { ...@@ -399,6 +434,10 @@ export default {
toolId: null, toolId: null,
toolCode: null, toolCode: null,
toolName: null, toolName: null,
itemId: null,
itemCode: null,
lifeTime: null,
location: null,
brand: null, brand: null,
spec: null, spec: null,
toolTypeId: null, toolTypeId: null,
...@@ -529,7 +568,23 @@ export default { ...@@ -529,7 +568,23 @@ export default {
}else{ }else{
this.form.toolCode = null; this.form.toolCode = null;
} }
} },
handleBrandSelect(){
this.$refs.brSelect.showFlag = true;
},
onBrandSelected(row){
if(row != undefined && row != null){
this.form.itemId = row.itemId;
this.form.itemCode = row.itemCode;
this.form.itemName = row.itemName;
this.form.specification = row.specification;
this.form.sapItemCode = row.sapItemCode;
this.form.unitOfMeasure = row.unitOfMeasure;
}
},
} }
}; };
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment