工艺管理问题修改

dev-scheduling
jinna 3 months ago
parent 89ebb82491
commit 59d685b012
  1. 24
      src/views/processManagement/components/addTemplateDialog.vue
  2. 60
      src/views/processManagement/components/processMainte/dsPartBasicInfo.vue
  3. 98
      src/views/processManagement/components/processMainte/processPlanning.vue
  4. 11
      src/views/processManagement/components/processMainte/reworkProcessPlanning.vue
  5. 24
      src/views/processManagement/taskDispatch.vue
  6. 4
      src/views/processManagement/taskProcessing.vue

@ -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" @change="nameChange"></el-input> <el-input v-model="ruleForm.name"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -100,9 +100,9 @@
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="processCode" label="工序代码" align="left"> <el-table-column prop="processCode" label="工序名称" align="left">
<template #header> <template #header>
<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 <el-form-item
@ -117,17 +117,17 @@
clearable clearable
filterable filterable
> >
<el-option v-for="(item, index) in processList" :label="item.code" :value="item.id"> <el-option v-for="(item, index) in processList" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="processName" label="工序名称" align="left"> <!-- <el-table-column prop="processName" label="工序名称" align="left">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.processName }}</span> <span>{{ scope.row.processName }}</span>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column prop="craftCode" label="工艺能力" align="left"> <el-table-column prop="craftCode" label="工艺能力" align="left">
<template #header> <template #header>
<span><i style="color: red">*</i>工艺能力</span> <span><i style="color: red">*</i>工艺能力</span>
@ -201,7 +201,7 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="closeDialog"> </el-button> <el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit"> </el-button> <el-button type="primary" @click="submit" :loading="formLoading"> </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
@ -239,6 +239,7 @@ export default {
}, },
data() { data() {
return { return {
formLoading:false,
craftCodeList: [], // craftCodeList: [], //
formError: '', // formError: '', //
processTemplateList: [], processTemplateList: [],
@ -383,33 +384,42 @@ export default {
submit() { submit() {
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
this.formLoading = true
const pinyinArr = pinyin(this.ruleForm.name, { const pinyinArr = pinyin(this.ruleForm.name, {
style: pinyin.STYLE_NORMAL, // STYLE_TONE style: pinyin.STYLE_NORMAL, // STYLE_TONE
heteronym: false, // heteronym: false, //
}); });
let query = { let query = {
promodel: {
...this.ruleForm, ...this.ruleForm,
modelNameStr: pinyinArr.flat().join(''), 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 => {
this.formLoading = false
this.$message({ this.$message({
type: 'success', type: 'success',
message: '操作成功!', message: '操作成功!',
}); });
this.$emit('closeDialog'); this.$emit('closeDialog');
}).catch(err=>{
this.formLoading = false
}); });
} else { } else {
// //
add(query).then(res => { add(query).then(res => {
this.formLoading = false
this.$message({ this.$message({
type: 'success', type: 'success',
message: '操作成功!', message: '操作成功!',
}); });
this.$emit('closeDialog'); this.$emit('closeDialog');
}).catch(err=>{
this.formLoading = false
}); });
} }
} else { } else {

@ -516,10 +516,38 @@ export default {
search: false, search: false,
sortable: true, sortable: true,
overHidden: true, overHidden: true,
cell: true,
rules: [
{
required: true,
message: '请输入面积',
trigger: 'blur',
}, },
{
validator: (rule, value, callback) => {
const row = rule.$row; // avue $row
const type = row.sinTerType;
const area = parseFloat(value);
if (type !== 2) {
//
if (isNaN(area) || area > 1) {
callback(new Error('非壳体面积不能大于1'));
} else {
callback();
}
} else {
callback(); //
}
},
trigger: 'blur',
},
],
},
{ {
label: '总面积', label: '总面积',
prop: 'totalArea', prop: 'totalArea',
cell: true,
search: false, search: false,
sortable: true, sortable: true,
overHidden: true, overHidden: true,
@ -557,6 +585,23 @@ export default {
}, },
], ],
}, },
{
label: '是否电镀',
prop: 'isElectroplating',
cell: true,
search: false,
sortable: true,
overHidden: true,
type: 'select', // 使
dicData: [
{ label: '是', value: '是' },
{ label: '否', value: '否' },
],
// partCode A1 sinTerType === 1
editDisplay: row => {
return row.sinTerType === 1 && row.partCode && /A1/.test(row.partCode);
},
},
{ {
label: '修改人', label: '修改人',
prop: 'updateUser', prop: 'updateUser',
@ -722,9 +767,24 @@ export default {
return this.$message.warning('一级路线包含涂色,请填写涂色数据'); return this.$message.warning('一级路线包含涂色,请填写涂色数据');
} }
} }
for (const item of this.data) {
if (item.sinTerType === 1 && item.partCode && /A1/.test(item.partCode)) {
if (!item.isElectroplating) {
this.$message.warning(`子件【${item.partName}】为A1插针,必须填写“是否电镀”`);
this.submitLoading = false;
return;
}
}
}
this.formData.childPage = this.childPage; this.formData.childPage = this.childPage;
this.formData.psId = this.psId; this.formData.psId = this.psId;
// 1 A1
// this.data.forEach(item=>{
// if(item.type=='2'){
// }
// })
authorizedAccomplish({ dsPart: this.formData, partList: this.data }).then(res => { authorizedAccomplish({ dsPart: this.formData, partList: this.data }).then(res => {
this.$message.success('操作成功'); this.$message.success('操作成功');
this.cancel(flag, res.data); this.cancel(flag, res.data);

@ -544,7 +544,7 @@ export default {
}, },
data() { data() {
return { return {
craftLoading:false, craftLoading: false,
rank: '2', rank: '2',
processLevel: '2', processLevel: '2',
data: [], data: [],
@ -624,9 +624,8 @@ export default {
tempId: 0, tempId: 0,
projectOptions: [], // projectOptions: [], //
standardList: [], // standardList: [], //
filteredList:[], filteredList: [],
dictionaryData:[], dictionaryData: [],
}; };
}, },
@ -639,22 +638,22 @@ export default {
this.getPqList(); this.getPqList();
this.getProject(); this.getProject();
this.getStandardList(); this.getStandardList();
this.getDictionary() this.getDictionary();
}, },
methods: { methods: {
// //
getDictionary(){ getDictionary() {
getDictionary({code:'part_info'}).then(res=>{ getDictionary({ code: 'part_info' }).then(res => {
this.dictionaryData = res.data.data this.dictionaryData = res.data.data;
}) });
}, },
// //
projectChange(row,index) { projectChange(row, index) {
let selectName = this.projectOptions.find(item => item.id == row.projectCode); let selectName = this.projectOptions.find(item => item.id == row.projectCode);
this.form2.tableData2[index].projectName = selectName.name; this.form2.tableData2[index].projectName = selectName.name;
}, },
// //
standardChange(row,index) { standardChange(row, index) {
let selectName = this.standardList.find(item => item.id == row.projectStandard); let selectName = this.standardList.find(item => item.id == row.projectStandard);
this.form2.tableData2[index].projectStandardName = selectName.name; this.form2.tableData2[index].projectStandardName = selectName.name;
}, },
@ -672,24 +671,24 @@ export default {
processChange(row, index) { processChange(row, index) {
let selectName = this.processSetOption.find(item => item.id == row.processCode); let selectName = this.processSetOption.find(item => item.id == row.processCode);
this.form1.tableData1[index].processName = selectName.name; this.form1.tableData1[index].processName = selectName.name;
if(this.form1.tableData1[index].processName.indexOf('涂色标') > -1){ if (this.form1.tableData1[index].processName.indexOf('涂色标') > -1) {
console.log(this.partInfoData,this.dictionaryData,'this.partInfoData'); console.log(this.partInfoData, this.dictionaryData, 'this.partInfoData');
// tsbNum tsdNum // tsbNum tsdNum
let sum_ = 0 let sum_ = 0;
if(this.partInfoData.tsbNum){ if (this.partInfoData.tsbNum) {
let tsb=this.dictionaryData.find(item => item.dictValue == '涂色标') let tsb = this.dictionaryData.find(item => item.dictValue == '涂色标');
sum_ += parseInt(this.partInfoData.tsbNum)*tsb.dictKey sum_ += parseInt(this.partInfoData.tsbNum) * tsb.dictKey;
} }
if(this.partInfoData.tsdNum){ if (this.partInfoData.tsdNum) {
let tsd=this.dictionaryData.find(item => item.dictValue == '涂色带') let tsd = this.dictionaryData.find(item => item.dictValue == '涂色带');
sum_ += parseInt(this.partInfoData.tsdNum)*tsd.dictKey sum_ += parseInt(this.partInfoData.tsdNum) * tsd.dictKey;
} }
if(this.partInfoData.tsjNum){ if (this.partInfoData.tsjNum) {
let tsj=this.dictionaryData.find(item => item.dictValue == '涂箭头') let tsj = this.dictionaryData.find(item => item.dictValue == '涂箭头');
sum_ += parseInt(this.partInfoData.tsjNum)*tsj.dictKey sum_ += parseInt(this.partInfoData.tsjNum) * tsj.dictKey;
} }
console.log(sum_,'sum_'); console.log(sum_, 'sum_');
this.form1.tableData1[index].proHours = sum_ this.form1.tableData1[index].proHours = sum_;
} }
}, },
// //
@ -703,31 +702,31 @@ export default {
this.rankList = res.data.data; this.rankList = res.data.data;
}); });
}, },
handleFilter(keyword){ handleFilter(keyword) {
// 1. // 1.
if (!keyword) { if (!keyword) {
this.filteredList = [...this.originList] this.filteredList = [...this.modelOption];
return return;
} }
// 2. // 2.
const lowerKeyword = keyword.toLowerCase() const lowerKeyword = keyword;
// 3. name pinyin // 3. name pinyin
this.filteredList = this.originList.filter(item => { this.filteredList = this.modelOption.filter(item => {
// 1 // 1
const matchName = item.name.toLowerCase().includes(lowerKeyword) const matchName = item.name.includes(lowerKeyword);
// 2 // 2
const matchPinyin = item.modelNameStr.toLowerCase().includes(lowerKeyword) const matchPinyin = item.modelNameStr.includes(lowerKeyword);
// //
return matchName || matchPinyin return matchName || matchPinyin;
}) });
}, },
// //
async getModelList() { async getModelList() {
await getModelList().then(res => { await getModelList().then(res => {
this.modelOption = res.data.data; this.modelOption = res.data.data;
this.filteredList = [...this.modelOption] this.filteredList = [...this.modelOption];
}); });
}, },
// //
@ -777,7 +776,7 @@ export default {
partId: this.partId, partId: this.partId,
taskId: this.updateRow.id, taskId: this.updateRow.id,
rank: this.rank, rank: this.rank,
version:this.updateRow.version version: this.updateRow.version,
}).then(res => { }).then(res => {
this.data = this.transformCraftTree(res.data.data); this.data = this.transformCraftTree(res.data.data);
this.partInfoData = res.data.data.partInfo; this.partInfoData = res.data.data.partInfo;
@ -1042,7 +1041,6 @@ export default {
} }
}, },
saveInfo() { saveInfo() {
if (this.activeName == '1') { if (this.activeName == '1') {
// Form // Form
this.$refs.tableForm1.validate(async (isValid, invalidFields) => { this.$refs.tableForm1.validate(async (isValid, invalidFields) => {
@ -1081,7 +1079,7 @@ export default {
if (isReturn == 1) { if (isReturn == 1) {
return this.$message.warning('涂色标的工时定额必须大于0,请修改!'); return this.$message.warning('涂色标的工时定额必须大于0,请修改!');
} }
console.log(898989,this.partInfoData) console.log(898989, this.partInfoData);
// const res = await getPartDetail(this.partId); // const res = await getPartDetail(this.partId);
// console.log(res); // console.log(res);
let dsCraftMold = this.partInfoData; let dsCraftMold = this.partInfoData;
@ -1231,7 +1229,7 @@ export default {
// }); // });
// } // }
// } // }
this.craftLoading = true this.craftLoading = true;
// //
if (this.treeNodes.rawData.qualityGradeCode) { if (this.treeNodes.rawData.qualityGradeCode) {
@ -1247,12 +1245,14 @@ export default {
deleteIds: this.form1.deleteIds, //ids deleteIds: this.form1.deleteIds, //ids
}; };
authorizedAccomplish2(query_).then(res => { authorizedAccomplish2(query_)
.then(res => {
this.$message.success('保存成功'); this.$message.success('保存成功');
this.craftLoading = false this.craftLoading = false;
this.getDetails(); this.getDetails();
}).catch(err=>{ })
this.craftLoading = false .catch(err => {
this.craftLoading = false;
}); });
} }
}); });
@ -1260,7 +1260,7 @@ export default {
if (this.activeName == '2') { if (this.activeName == '2') {
this.$refs.tableForm2.validate((isValid, invalidFields) => { this.$refs.tableForm2.validate((isValid, invalidFields) => {
if (isValid) { if (isValid) {
this.craftLoading = true this.craftLoading = true;
let query_ = { let query_ = {
processEntity: this.treeNodes.rawData.processInfo, // processEntity: this.treeNodes.rawData.processInfo, //
processProjectEntityList: this.form2.tableData2, // processProjectEntityList: this.form2.tableData2, //
@ -1269,7 +1269,7 @@ export default {
saveProcessProjectSave(query_).then(res => { saveProcessProjectSave(query_).then(res => {
this.$message.success('保存成功'); this.$message.success('保存成功');
this.craftLoading = false this.craftLoading = false;
this.getDetails(); this.getDetails();
}); });
} }
@ -1278,7 +1278,7 @@ export default {
if (this.activeName == '3') { if (this.activeName == '3') {
this.$refs.tableForm3.validate((isValid, invalidFields) => { this.$refs.tableForm3.validate((isValid, invalidFields) => {
if (isValid) { if (isValid) {
this.craftLoading = true this.craftLoading = true;
let query_ = { let query_ = {
processEntity: this.treeNodes.rawData.processInfo, // processEntity: this.treeNodes.rawData.processInfo, //
processMeasuringToolEntities: this.form3.tableData3, // processMeasuringToolEntities: this.form3.tableData3, //
@ -1286,7 +1286,7 @@ export default {
}; };
saveProcessMeasuringTool(query_).then(res => { saveProcessMeasuringTool(query_).then(res => {
this.$message.success('保存成功'); this.$message.success('保存成功');
this.craftLoading = false this.craftLoading = false;
this.getDetails(); this.getDetails();
}); });
} }
@ -1295,7 +1295,7 @@ export default {
if (this.activeName == '4') { if (this.activeName == '4') {
this.$refs.tableForm4.validate((isValid, invalidFields) => { this.$refs.tableForm4.validate((isValid, invalidFields) => {
if (isValid) { if (isValid) {
this.craftLoading = true this.craftLoading = true;
let query_ = { let query_ = {
processEntity: this.treeNodes.rawData.processInfo, // processEntity: this.treeNodes.rawData.processInfo, //
processMoldToolEntities: this.form4.tableData4, // processMoldToolEntities: this.form4.tableData4, //
@ -1303,7 +1303,7 @@ export default {
}; };
saveProcessMoldTool(query_).then(res => { saveProcessMoldTool(query_).then(res => {
this.$message.success('保存成功'); this.$message.success('保存成功');
this.craftLoading = false this.craftLoading = false;
this.getDetails(); this.getDetails();
}); });
} }

@ -755,24 +755,25 @@ export default {
getModelList() { getModelList() {
getModelList().then(res => { getModelList().then(res => {
this.modelOption = res.data.data; this.modelOption = res.data.data;
this.filteredList = [...this.modelOption];
}); });
}, },
handleFilter(keyword) { handleFilter(keyword) {
// 1. // 1.
if (!keyword) { if (!keyword) {
this.filteredList = [...this.originList]; this.filteredList = [...this.modelOption];
return; return;
} }
// 2. // 2.
const lowerKeyword = keyword.toLowerCase(); const lowerKeyword = keyword;
// 3. name pinyin // 3. name pinyin
this.filteredList = this.originList.filter(item => { this.filteredList = this.modelOption.filter(item => {
// 1 // 1
const matchName = item.name.toLowerCase().includes(lowerKeyword); const matchName = item.name.includes(lowerKeyword);
// 2 // 2
const matchPinyin = item.modelNameStr.toLowerCase().includes(lowerKeyword); const matchPinyin = item.modelNameStr.includes(lowerKeyword);
// //
return matchName || matchPinyin; return matchName || matchPinyin;
}); });

@ -22,7 +22,9 @@
<template #menu-right="{ size }"> </template> <template #menu-right="{ size }"> </template>
<template #menu="scope"> <template #menu="scope">
<el-button type="primary" link @click="setCrew(scope.row)">分派</el-button> <el-button v-if="scope.row.children" type="primary" link @click="setCrew(scope.row)"
>分派</el-button
>
</template> </template>
<template #bsWorkType.wtName="scope"> <template #bsWorkType.wtName="scope">
<span> <span>
@ -85,6 +87,7 @@ export default {
border: true, border: true,
index: true, index: true,
selection: true, selection: true,
selectable: (row, index) => row.children,
viewBtn: false, viewBtn: false,
delBtn: false, delBtn: false,
editBtn: false, editBtn: false,
@ -220,12 +223,26 @@ export default {
return; return;
} }
this.updateRow = this.selectionList; this.updateRow = this.selectionList;
this.selectionList.forEach(item => {
if (item.children && item.children.length > 0) {
item.children.forEach(element => {
this.updateRow.push(element);
});
}
});
// console.log(5555, this.updateRow);
this.setCrewOpen = true; this.setCrewOpen = true;
this.title = '批量分派'; this.title = '批量分派';
}, },
// //
setCrew(row) { setCrew(row) {
this.updateRow = [row]; this.updateRow = [row];
if (row.children.length > 0) {
row.children.forEach(element => {
this.updateRow.push(element);
});
}
// console.log(999999, this.updateRow);
this.setCrewOpen = true; this.setCrewOpen = true;
this.title = '分派'; this.title = '分派';
}, },
@ -288,3 +305,8 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
:deep(.el-checkbox .is-disabled){
display: none;
}
</style>

@ -25,12 +25,12 @@
<el-button type="primary" link @click="viewDetails(scope.row.partId, scope.row)" <el-button type="primary" link @click="viewDetails(scope.row.partId, scope.row)"
>详情</el-button >详情</el-button
> >
<!-- 0 待分派 1 待接收 2 进行中 3 已完成 v-if="scope.row.taskStatus == 2" --> <!-- 0 待分派 1 待接收 2 进行中 3 已完成 " -->
<el-button <el-button
type="primary" type="primary"
link link
@click="organization(scope.row.partId, scope.row)" @click="organization(scope.row.partId, scope.row)"
v-if="scope.row.taskStatus == 2"
>编制</el-button >编制</el-button
> >
<!-- <el-button <!-- <el-button

Loading…
Cancel
Save