|
|
|
@ -22,7 +22,7 @@ |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="模板名称:" prop="name"> |
|
|
|
<el-form-item label="模板名称:" prop="name"> |
|
|
|
<el-input v-model="ruleForm.name"></el-input> |
|
|
|
<el-input v-model="ruleForm.name" @change="nameChange"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-col :span="8"> |
|
|
|
@ -91,7 +91,11 @@ |
|
|
|
<span><i style="color: red">*</i>工序号</span> |
|
|
|
<span><i style="color: red">*</i>工序号</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item :prop="`tableData[${scope.$index}].processNo`" :rules="rules.processNo" label-width="0"> |
|
|
|
<el-form-item |
|
|
|
|
|
|
|
:prop="`tableData[${scope.$index}].processNo`" |
|
|
|
|
|
|
|
:rules="rules.processNo" |
|
|
|
|
|
|
|
label-width="0" |
|
|
|
|
|
|
|
> |
|
|
|
<el-input v-model="scope.row.processNo" placeholder="请输入内容"></el-input> |
|
|
|
<el-input v-model="scope.row.processNo" placeholder="请输入内容"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
@ -129,10 +133,14 @@ |
|
|
|
<span><i style="color: red">*</i>工艺能力</span> |
|
|
|
<span><i style="color: red">*</i>工艺能力</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item :prop="`tableData[${scope.$index}].craftCode`" :rules="rules.craftCode" label-width="0"> |
|
|
|
<el-form-item |
|
|
|
|
|
|
|
:prop="`tableData[${scope.$index}].craftCode`" |
|
|
|
|
|
|
|
:rules="rules.craftCode" |
|
|
|
|
|
|
|
label-width="0" |
|
|
|
|
|
|
|
> |
|
|
|
<el-select v-model="scope.row.craftCode" placeholder="请选择" clearable filterable> |
|
|
|
<el-select v-model="scope.row.craftCode" placeholder="请选择" clearable filterable> |
|
|
|
<el-option v-for="item in craftCodeList" :label="item.name" :value="item.id"> </el-option> |
|
|
|
<el-option v-for="item in craftCodeList" :label="item.name" :value="item.id"> |
|
|
|
|
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
@ -142,11 +150,14 @@ |
|
|
|
<span><i style="color: red">*</i>工时(分钟)</span> |
|
|
|
<span><i style="color: red">*</i>工时(分钟)</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item :prop="`tableData[${scope.$index}].workHours`" :rules="rules.workHours" label-width="0"> |
|
|
|
<el-form-item |
|
|
|
|
|
|
|
:prop="`tableData[${scope.$index}].workHours`" |
|
|
|
|
|
|
|
:rules="rules.workHours" |
|
|
|
|
|
|
|
label-width="0" |
|
|
|
|
|
|
|
> |
|
|
|
<el-input-number |
|
|
|
<el-input-number |
|
|
|
v-model="scope.row.workHours" |
|
|
|
v-model="scope.row.workHours" |
|
|
|
controls-position="right" |
|
|
|
controls-position="right" |
|
|
|
|
|
|
|
|
|
|
|
:min="1" |
|
|
|
:min="1" |
|
|
|
:max="10" |
|
|
|
:max="10" |
|
|
|
></el-input-number> |
|
|
|
></el-input-number> |
|
|
|
@ -158,7 +169,11 @@ |
|
|
|
<span><i style="color: red">*</i>工序描述</span> |
|
|
|
<span><i style="color: red">*</i>工序描述</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item :prop="`tableData[${scope.$index}].proDes`" :rules="rules.proDes" label-width="0"> |
|
|
|
<el-form-item |
|
|
|
|
|
|
|
:prop="`tableData[${scope.$index}].proDes`" |
|
|
|
|
|
|
|
:rules="rules.proDes" |
|
|
|
|
|
|
|
label-width="0" |
|
|
|
|
|
|
|
> |
|
|
|
<el-input v-model="scope.row.proDes" placeholder="请输入内容"></el-input> |
|
|
|
<el-input v-model="scope.row.proDes" placeholder="请输入内容"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
@ -168,7 +183,11 @@ |
|
|
|
<span><i style="color: red">*</i>主工序</span> |
|
|
|
<span><i style="color: red">*</i>主工序</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item :prop="`tableData[${scope.$index}].isMain`" :rules="rules.isMain" label-width="0"> |
|
|
|
<el-form-item |
|
|
|
|
|
|
|
:prop="`tableData[${scope.$index}].isMain`" |
|
|
|
|
|
|
|
:rules="rules.isMain" |
|
|
|
|
|
|
|
label-width="0" |
|
|
|
|
|
|
|
> |
|
|
|
<el-select v-model="scope.row.isMain" placeholder="请选择" clearable filterable> |
|
|
|
<el-select v-model="scope.row.isMain" placeholder="请选择" clearable filterable> |
|
|
|
<el-option label="是" value="1"> </el-option> |
|
|
|
<el-option label="是" value="1"> </el-option> |
|
|
|
<el-option label="否" value="2"> </el-option> |
|
|
|
<el-option label="否" value="2"> </el-option> |
|
|
|
@ -189,9 +208,16 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { getDictionary } from '@/api/system/dict'; |
|
|
|
import { getDictionary } from '@/api/system/dict'; |
|
|
|
import { getProcessesTeams, add, update, getDetail,getProcessAbilityList } from '@/api/processManagement/processTemplate'; |
|
|
|
import { |
|
|
|
|
|
|
|
getProcessesTeams, |
|
|
|
|
|
|
|
add, |
|
|
|
|
|
|
|
update, |
|
|
|
|
|
|
|
getDetail, |
|
|
|
|
|
|
|
getProcessAbilityList, |
|
|
|
|
|
|
|
} from '@/api/processManagement/processTemplate'; |
|
|
|
import { getList } from '@/api/processManagement/basicProcesses'; |
|
|
|
import { getList } from '@/api/processManagement/basicProcesses'; |
|
|
|
import { getWorkCenterList } from '@/api/processManagement/addQuantity'; |
|
|
|
import { getWorkCenterList } from '@/api/processManagement/addQuantity'; |
|
|
|
|
|
|
|
import pinyin from 'pinyin'; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
showDialog: { |
|
|
|
showDialog: { |
|
|
|
@ -209,11 +235,11 @@ export default { |
|
|
|
title: { |
|
|
|
title: { |
|
|
|
type: String, |
|
|
|
type: String, |
|
|
|
default: '新增', |
|
|
|
default: '新增', |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
craftCodeList:[],//工艺能力列表 |
|
|
|
craftCodeList: [], //工艺能力列表 |
|
|
|
formError: '', // 全局错误提示 |
|
|
|
formError: '', // 全局错误提示 |
|
|
|
processTemplateList: [], |
|
|
|
processTemplateList: [], |
|
|
|
platingTypeList: [], |
|
|
|
platingTypeList: [], |
|
|
|
@ -271,13 +297,14 @@ export default { |
|
|
|
this.getProcessesTeams(); |
|
|
|
this.getProcessesTeams(); |
|
|
|
this.getProcessList(); |
|
|
|
this.getProcessList(); |
|
|
|
this.getWorkCenterList(); |
|
|
|
this.getWorkCenterList(); |
|
|
|
this.getProcessAbilityList() |
|
|
|
this.getProcessAbilityList(); |
|
|
|
if (this.title == '修改') { |
|
|
|
if (this.title == '修改') { |
|
|
|
this.getDetail(); |
|
|
|
this.getDetail(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 获取工序号 |
|
|
|
nameChange() {}, |
|
|
|
|
|
|
|
// 获取工序号 |
|
|
|
getProcessNo(table) { |
|
|
|
getProcessNo(table) { |
|
|
|
const len = table; |
|
|
|
const len = table; |
|
|
|
let processNo = (len.length + 1) * 5; |
|
|
|
let processNo = (len.length + 1) * 5; |
|
|
|
@ -294,9 +321,9 @@ export default { |
|
|
|
return processNo; |
|
|
|
return processNo; |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取工艺能力 |
|
|
|
// 获取工艺能力 |
|
|
|
getProcessAbilityList(){ |
|
|
|
getProcessAbilityList() { |
|
|
|
getProcessAbilityList().then(res => { |
|
|
|
getProcessAbilityList().then(res => { |
|
|
|
console.log('99999',res.data.data); |
|
|
|
console.log('99999', res.data.data); |
|
|
|
this.craftCodeList = res.data.data; |
|
|
|
this.craftCodeList = res.data.data; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -356,10 +383,16 @@ export default { |
|
|
|
submit() { |
|
|
|
submit() { |
|
|
|
this.$refs.ruleForm.validate(valid => { |
|
|
|
this.$refs.ruleForm.validate(valid => { |
|
|
|
if (valid) { |
|
|
|
if (valid) { |
|
|
|
|
|
|
|
const pinyinArr = pinyin(this.ruleForm.name, { |
|
|
|
|
|
|
|
style: pinyin.STYLE_NORMAL, // 无声调(STYLE_TONE 带声调) |
|
|
|
|
|
|
|
heteronym: false, // 不考虑多音字 |
|
|
|
|
|
|
|
}); |
|
|
|
let query = { |
|
|
|
let query = { |
|
|
|
...this.ruleForm, |
|
|
|
...this.ruleForm, |
|
|
|
|
|
|
|
modelNameStr: pinyinArr.flat().join(''), |
|
|
|
tableData: this.ruleForm.tableData, |
|
|
|
tableData: this.ruleForm.tableData, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// 修改 |
|
|
|
// 修改 |
|
|
|
if (!this.moldAddMore) { |
|
|
|
if (!this.moldAddMore) { |
|
|
|
update(query).then(res => { |
|
|
|
update(query).then(res => { |
|
|
|
|