Commit ecd0d244 authored by chenzj's avatar chenzj

修改台账数据

parent bd2d1e8d
......@@ -146,7 +146,7 @@
<dict-tag :options="dict.type.mes_mainten_type" :value="scope.row.maintenType"/>
</template>
</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">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.nextMaintenDate, '{y}-{m}-{d}') }}</span>
......@@ -207,6 +207,28 @@
</el-form-item>
</el-col>
</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-col :span="12">
<el-form-item label="品牌" prop="brand">
......@@ -221,8 +243,8 @@
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="工装夹具编号" prop="toolCode">
<el-input v-model="form.toolCode" placeholder="请输入工装夹具编号" />
<el-form-item label="SN码" prop="toolCode">
<el-input v-model="form.toolCode" placeholder="请输入SN码" />
</el-form-item>
</el-col>
<el-col :span="4">
......@@ -270,11 +292,18 @@
placeholder="请选择下一次保养日期">
</el-date-picker>
</el-form-item>
<el-form-item v-else label="下一次保养周期" prop="nextMaintenPeriod">
<el-input v-model="form.nextMaintenPeriod" placeholder="请输入下一次保养周期" />
<el-form-item v-else label="最低寿命" prop="nextMaintenPeriod">
<el-input v-model="form.nextMaintenPeriod" placeholder="请输入最低寿命" />
</el-form-item >
</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-radio-group disabled="disabled" v-model="form.status">
<el-radio
......@@ -307,7 +336,9 @@
import { listTool, getTool, delTool, addTool, updateTool } from "@/api/mes/tm/tool";
import { listAllTooltype } from "@/api/mes/tm/tooltype"
import {genCode} from "@/api/system/autocode/rule"
import BrandSelect from "@/components/itemSelect/single.vue";
export default {
components:{BrandSelect},
name: "Tool",
dicts: ['mes_tool_status', 'mes_mainten_type'],
data() {
......@@ -341,6 +372,10 @@ export default {
pageSize: 10,
toolCode: null,
toolName: null,
itemId: null,
itemCode: null,
lifeTime: null,
location: null,
brand: null,
spec: null,
toolTypeId: null,
......@@ -399,6 +434,10 @@ export default {
toolId: null,
toolCode: null,
toolName: null,
itemId: null,
itemCode: null,
lifeTime: null,
location: null,
brand: null,
spec: null,
toolTypeId: null,
......@@ -529,7 +568,23 @@ export default {
}else{
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>
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