Browse Source

工具的属性模版代码

master
DouDou 1 year ago
parent
commit
8dcdd4fb7c
  1. 81
      src/views/modules/tooling/components/com_tool_info_add_update.vue
  2. 34
      src/views/modules/tooling/components/com_tool_instance_add_update.vue
  3. 36
      src/views/modules/tooling/manuf_tool.vue

81
src/views/modules/tooling/components/com_tool_info_add_update.vue

@ -1,28 +1,28 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag :visible.sync="visible" :close-on-click-modal="false"
width="600px" style="height: 650px;" class="customer-dialog">
<el-container style="height: 265px;">
width="660px" style="height: 650px;" class="customer-dialog">
<el-container style="height: 275px;">
<el-form :inline="true" :model="pageData" :rules="rules" label-position="top" label-width="80px" >
<!-- 第一行 -->
<el-row class="customer-row">
<el-col :span="6">
<el-row class="customer-row" >
<el-col :span="6" class="first-col">
<el-form-item :label=labels.toolId prop="toolId">
<el-input v-model="pageData.toolId" :disabled="!this.addFlag"></el-input>
<el-input v-model="pageData.toolId" style="width: 180px;" :disabled="!this.addFlag"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="5">
<el-form-item :label=labels.toolDesc prop="toolDesc">
<el-input v-model="pageData.toolDesc" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="5">
<el-form-item :label=labels.site prop="site">
<span slot="label" style="" @click="getBaseList(1017)"><a herf="#"></a></span>
<el-input v-model="pageData.site" :disabled="!this.addFlag"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="5">
<el-form-item :label=labels.state>
<el-input ref="toolInstanceId" v-model="pageData.state" disabled></el-input>
</el-form-item>
@ -30,26 +30,26 @@
</el-row>
<!-- 第二行 -->
<el-row class="customer-row">
<el-col :span="6">
<el-col :span="6" class="first-col">
<el-form-item :label=labels.toolType prop="toolType">
<span slot="label" style="" @click="getBaseList(1016)"><a herf="#">工具类型</a></span>
<el-input v-model="pageData.toolType" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="5">
<el-form-item :label=labels.toolTypeDesc>
<el-input v-model="pageData.toolTypeDesc" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="5">
<el-form-item :label=labels.calendarId prop="calendarId">
<span slot="label" style="" @click="getBaseList(1018)"><a herf="#">日历标识</a></span>
<el-input v-model="pageData.calendarId" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="5">
<el-form-item :label=labels.schedCapacity>
<el-select filterable v-model="pageData.schedCapacity" style="width: 135px">
<el-select filterable v-model="pageData.schedCapacity" style="width: 130px">
<el-option label="Infinite capacity" value="Infinite capacity"></el-option>
<el-option label="Finite capacity" value="Finite capacity"></el-option>
</el-select>
@ -58,50 +58,54 @@
</el-row>
<!-- 第三行 -->
<el-row class="customer-row">
<el-col :span="6">
<el-col :span="6" class="first-col">
<el-form-item :label=labels.calibrationControl>
<el-select filterable v-model="pageData.calibrationControl" style="width: 135px">
<el-select filterable v-model="pageData.calibrationControl" style="width: 150px">
<el-option label="No Calibration Required" value="No Calibration Required"></el-option>
<el-option label="Calibration Required" value="Calibration Required"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="5">
<el-form-item :label=labels.calibrationTime>
<el-input v-model="pageData.calibrationTime" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="5">
<el-form-item :label=labels.lastUsed>
<el-input v-model="pageData.lastUsed" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="5">
<el-checkbox style="margin-left: 10px; margin-top: 18px;" v-model="pageData.enabledForControlPlanDb" true-label="TRUE" false-label="FALSE"
:label=labels.enabledForControlPlanDb ></el-checkbox>
</el-col>
</el-row>
<!-- 第四行 -->
<el-row class="customer-row">
<el-col :span="6">
<el-col :span="6" class="first-col">
<el-form-item :label=labels.alternateToolId>
<span slot="label" style="" @click="getBaseList(1019)"><a herf="#">备选工具标识号</a></span>
<el-input v-model="pageData.alternateToolId"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="5">
<el-form-item :label=labels.alternateToolDesc>
<el-input v-model="pageData.alternateToolDesc" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item :label=labels.propertyNo>
<span slot="label" style="" @click="getBaseList(1023)"><a herf="#">属性模版</a></span>
<el-input v-model="pageData.propertyNo" ></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 第五行 -->
<el-row>
<el-row style="margin-left: 15px;">
<el-col :span="24">
<el-form-item :label=labels.noteText class="auto">
<el-input type="textarea" v-model="pageData.noteText" :rows="2" style="width: 570px;height: 20px"></el-input>
<el-input type="textarea" v-model="pageData.noteText" :rows="3" style="width: 600px;height: 20px"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -155,6 +159,7 @@ export default {
enabledForControlPlanDb: 'TRUE',
lastUsed: '',
noteText: '',
propertyNo: '',
ifsRowId: 0,
ifsRowVersion: '',
},
@ -175,6 +180,7 @@ export default {
noteText: '备注',
alternateToolId: '备选工具标识号',
alternateToolDesc: '备选工具说明',
propertyNo: '属性模版',
},
buttons: {
confirmButton: '确定',
@ -329,6 +335,7 @@ export default {
this.pageData.calibrationControl = 'No Calibration Required';
this.pageData.calibrationTime = 0;
this.pageData.enabledForControlPlanDb = 'FALSE';
this.pageData.propertyNo = '';
this.pageData.lastUsed = '';
this.pageData.noteText = '';
}else{
@ -352,7 +359,7 @@ export default {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if(val === 1019){
if(val === 1019 || val === 1023){
let strCon = ' AND site = \''+ this.pageData.site+'\'';
this.$refs.baseList.init(val, strVal, strCon)
}else{
@ -373,6 +380,19 @@ export default {
}else if (this.tagNo === 1019) {
this.pageData.alternateToolId = val.tool_id;
this.pageData.alternateToolDesc = val.tool_description;
}else if (this.tagNo === 1023) {
//
if(this.pageData.propertyNo && this.pageData.propertyNo !== '' && this.pageData.propertyNo !== val.Code_no){
this.$confirm('已经存在属性,确认要更改吗?', '提示', {
confirmButtonText: '更改',
cancelButtonText: '取消',
type: 'warning'
}).then(() =>{
this.pageData.propertyNo = val.Code_no;
});
}else{
this.pageData.propertyNo = val.Code_no;
}
}
},
@ -430,7 +450,16 @@ export default {
<style scoped lang="scss">
.customer-row .el-input--medium {
width: 135px !important;
width: 130px !important;
}
/*两个列间距*/
.customer-row .el-col{
margin-left: 15px;
}
/*下第一列单独设置宽度*/
.customer-row .first-col .el-input--medium {
width: 150px !important;
}
</style>

34
src/views/modules/tooling/components/com_tool_instance_add_update.vue

@ -2,7 +2,7 @@
<div class="customer-css">
<el-dialog :title="titleCon" v-drag :visible.sync="visible" :close-on-click-modal="false"
width="750px" style="height: 650px;" class="customer-dialog">
<el-container style="height: 265px;">
<el-container style="height: 295px;">
<el-form :inline="true" :model="pageData" :rules="rules" label-position="top" label-width="80px">
<!-- 第一行 -->
<el-row class="customer-row">
@ -126,6 +126,15 @@
</el-col>
</el-row>
<!-- 第五行 -->
<el-row class="customer-row">
<el-col :span="4">
<el-form-item label="属性模版">
<span slot="label" style="" @click="getBaseList(1024)"><a herf="#">属性模版</a></span>
<el-input v-model="pageData.propertyNo" ></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 第六行 -->
<el-row>
<el-col :span="24">
<el-form-item label="备注">
@ -192,6 +201,7 @@ export default {
toolStability: '',
toolReproducibility: '',
noteText: '',
propertyNo: '',
ifsRowId: 0,
ifsRowVersion: '',
},
@ -332,6 +342,7 @@ export default {
this.pageData.toolStability = '';
this.pageData.toolReproducibility = '';
this.pageData.noteText = '';
this.pageData.propertyNo = '';
}else{
this.titleCon = '工具修改';
this.pageData = JSON.parse(JSON.stringify(toolInfo));
@ -353,13 +364,7 @@ export default {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if(val === 1020){
let strCon = ' AND site = \''+ this.pageData.site+'\'';
this.$refs.baseList.init(val, strVal, strCon)
}else if(val === 1021){
let strCon = ' AND site = \''+ this.pageData.site+'\'';
this.$refs.baseList.init(val, strVal, strCon)
}else if(val === 1022){
if(val === 1020 || val === 1021 || val === 1022 || val === 1024){
let strCon = ' AND site = \''+ this.pageData.site+'\'';
this.$refs.baseList.init(val, strVal, strCon)
}else{
@ -379,6 +384,19 @@ export default {
}else if (this.tagNo === 1022) {
this.pageData.normalProductionLine = val.production_line;
this.pageData.normalProductionLineDesc = val.description;
}else if (this.tagNo === 1024) {
//
if(this.pageData.propertyNo && this.pageData.propertyNo !== '' && this.pageData.propertyNo !== val.Code_no){
this.$confirm('已经存在属性,确认要更改吗?', '提示', {
confirmButtonText: '更改',
cancelButtonText: '取消',
type: 'warning'
}).then(() =>{
this.pageData.propertyNo = val.Code_no;
});
}else{
this.pageData.propertyNo = val.Code_no;
}
}
},

36
src/views/modules/tooling/manuf_tool.vue

@ -282,6 +282,24 @@ export default {
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 106003,
serialNumber: '106003TablePropertyNo',
tableId: "106003Table1",
tableName: "刀具信息主表",
columnProp: "propertyNo",
headerAlign: "center",
align: "left",
columnLabel: "属性模版",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 106003,
@ -464,6 +482,24 @@ export default {
fixed: '',
columnWidth: 70
},
{
userId: this.$store.state.user.name,
functionId: 106003,
serialNumber: '106003Table2LastPropertyNo',
tableId: '106003Table2',
tableName: '工具实例明细',
columnProp: 'propertyNo',
headerAlign: 'center',
align: 'center',
columnLabel: '属性模版',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 106003,

Loading…
Cancel
Save