工艺管理问题修改

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

@ -516,10 +516,38 @@ export default {
search: false,
sortable: 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: '总面积',
prop: 'totalArea',
cell: true,
search: false,
sortable: 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: '修改人',
prop: 'updateUser',
@ -722,9 +767,24 @@ export default {
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.psId = this.psId;
// 1 A1
// this.data.forEach(item=>{
// if(item.type=='2'){
// }
// })
authorizedAccomplish({ dsPart: this.formData, partList: this.data }).then(res => {
this.$message.success('操作成功');
this.cancel(flag, res.data);

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

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

@ -22,7 +22,9 @@
<template #menu-right="{ size }"> </template>
<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 #bsWorkType.wtName="scope">
<span>
@ -85,6 +87,7 @@ export default {
border: true,
index: true,
selection: true,
selectable: (row, index) => row.children,
viewBtn: false,
delBtn: false,
editBtn: false,
@ -220,12 +223,26 @@ export default {
return;
}
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.title = '批量分派';
},
//
setCrew(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.title = '分派';
},
@ -288,3 +305,8 @@ export default {
},
};
</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
>
<!-- 0 待分派 1 待接收 2 进行中 3 已完成 v-if="scope.row.taskStatus == 2" -->
<!-- 0 待分派 1 待接收 2 进行中 3 已完成 " -->
<el-button
type="primary"
link
@click="organization(scope.row.partId, scope.row)"
v-if="scope.row.taskStatus == 2"
>编制</el-button
>
<!-- <el-button

Loading…
Cancel
Save