工艺编制逻辑调整

dev-scheduling
zhangdi 3 months ago
parent bb0c8bb0c8
commit 89ebb82491
  1. 4
      src/views/processManagement/components/processMainte/dsPartBasicInfo.vue
  2. 30
      src/views/processManagement/components/processMainte/processPlanning.vue
  3. 52
      src/views/processManagement/components/processMainte/reworkProcessPlanning.vue
  4. 5
      src/views/processManagement/taskProcessing.vue

@ -117,8 +117,8 @@
> >
<el-option <el-option
v-for="item in plateList" v-for="item in plateList"
:label="item.label" :label="item.plating"
:value="item.value" :value="item.id"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>

@ -520,6 +520,7 @@ import {
getStandardList, getStandardList,
} from '@/api/processManagement/taskProcessing'; } from '@/api/processManagement/taskProcessing';
import { getPqList } from '@/api/qualityManagement/remindRedeem/remindRedeem'; import { getPqList } from '@/api/qualityManagement/remindRedeem/remindRedeem';
import { getDictionary } from '@/api/system/dict';
export default { export default {
name: 'CraftIndex', name: 'CraftIndex',
components: {}, components: {},
@ -624,8 +625,11 @@ export default {
projectOptions: [], // projectOptions: [], //
standardList: [], // standardList: [], //
filteredList:[], filteredList:[],
dictionaryData:[],
}; };
}, },
mounted() { mounted() {
this.getModelList(); this.getModelList();
this.getDetails(); this.getDetails();
@ -635,8 +639,15 @@ export default {
this.getPqList(); this.getPqList();
this.getProject(); this.getProject();
this.getStandardList(); this.getStandardList();
this.getDictionary()
}, },
methods: { methods: {
//
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); let selectName = this.projectOptions.find(item => item.id == row.projectCode);
@ -661,6 +672,25 @@ 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){
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
}
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
}
console.log(sum_,'sum_');
this.form1.tableData1[index].proHours = sum_
}
}, },
// //
craftChange(row, index) { craftChange(row, index) {

@ -42,9 +42,10 @@
style="width: 220px; margin-right: 12px" style="width: 220px; margin-right: 12px"
clearable clearable
filterable filterable
:filter-method="handleFilter"
> >
<el-option <el-option
v-for="(item, index) in modelOption" v-for="(item, index) in filteredList"
:key="index" :key="index"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
@ -525,6 +526,7 @@ import {
getStandardList, getStandardList,
} from '@/api/processManagement/taskProcessing'; } from '@/api/processManagement/taskProcessing';
// import {getPartList} from '@/api/orderManagement/getPartList'; // import {getPartList} from '@/api/orderManagement/getPartList';
import { getDictionary } from '@/api/system/dict';
export default { export default {
name: 'CraftIndex', name: 'CraftIndex',
@ -652,6 +654,8 @@ export default {
teamOptions: [], // teamOptions: [], //
standardList: [], // standardList: [], //
tempId: 0, tempId: 0,
filteredList: [],
dictionaryData:[],
}; };
}, },
mounted() { mounted() {
@ -662,6 +666,7 @@ export default {
this.getProject(); this.getProject();
this.getTeamSetList(); this.getTeamSetList();
this.getStandardList(); this.getStandardList();
this.getDictionary()
}, },
methods: { methods: {
// getPartList(){ // getPartList(){
@ -669,6 +674,12 @@ export default {
// this.partInfoData = res.data.data; // this.partInfoData = 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.projecCode); let selectName = this.projectOptions.find(item => item.id == row.projecCode);
@ -698,6 +709,25 @@ export default {
processChange(row, index) { processChange(row, index) {
let selectName = this.processSetOption.find(item => item.id == row.processInfo.ppsId); let selectName = this.processSetOption.find(item => item.id == row.processInfo.ppsId);
this.form1.tableData1[index].processInfo.ppsName = selectName.name; this.form1.tableData1[index].processInfo.ppsName = selectName.name;
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
}
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
}
console.log(sum_,'sum_');
this.form1.tableData1[index].proHours = sum_
}
}, },
// //
craftChange(row, index) { craftChange(row, index) {
@ -727,6 +757,26 @@ export default {
this.modelOption = res.data.data; this.modelOption = res.data.data;
}); });
}, },
handleFilter(keyword) {
// 1.
if (!keyword) {
this.filteredList = [...this.originList];
return;
}
// 2.
const lowerKeyword = keyword.toLowerCase();
// 3. name pinyin
this.filteredList = this.originList.filter(item => {
// 1
const matchName = item.name.toLowerCase().includes(lowerKeyword);
// 2
const matchPinyin = item.modelNameStr.toLowerCase().includes(lowerKeyword);
//
return matchName || matchPinyin;
});
},
// //
modelLevelChange() { modelLevelChange() {
getModelDetailList({ modelId: this.modelLevel }).then(res => { getModelDetailList({ modelId: this.modelLevel }).then(res => {

@ -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 已完成 --> <!-- 0 待分派 1 待接收 2 进行中 3 已完成 v-if="scope.row.taskStatus == 2" -->
<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
@ -383,7 +383,6 @@ export default {
}, },
// //
completedFn(row) { completedFn(row) {
console.log(898989, row);
this.$confirm('确认任务是否完成?', { this.$confirm('确认任务是否完成?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',

Loading…
Cancel
Save