工艺编制逻辑调整

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
v-for="item in plateList"
:label="item.label"
:value="item.value"
:label="item.plating"
:value="item.id"
></el-option>
</el-select>
</el-form-item>

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

@ -42,9 +42,10 @@
style="width: 220px; margin-right: 12px"
clearable
filterable
:filter-method="handleFilter"
>
<el-option
v-for="(item, index) in modelOption"
v-for="(item, index) in filteredList"
:key="index"
:label="item.name"
:value="item.id"
@ -525,6 +526,7 @@ import {
getStandardList,
} from '@/api/processManagement/taskProcessing';
// import {getPartList} from '@/api/orderManagement/getPartList';
import { getDictionary } from '@/api/system/dict';
export default {
name: 'CraftIndex',
@ -652,6 +654,8 @@ export default {
teamOptions: [], //
standardList: [], //
tempId: 0,
filteredList: [],
dictionaryData:[],
};
},
mounted() {
@ -662,6 +666,7 @@ export default {
this.getProject();
this.getTeamSetList();
this.getStandardList();
this.getDictionary()
},
methods: {
// getPartList(){
@ -669,6 +674,12 @@ export default {
// this.partInfoData = res.data.data;
// });
// },
//
getDictionary(){
getDictionary({code:'part_info'}).then(res=>{
this.dictionaryData = res.data.data
})
},
//
projectChange(row, index) {
let selectName = this.projectOptions.find(item => item.id == row.projecCode);
@ -698,6 +709,25 @@ export default {
processChange(row, index) {
let selectName = this.processSetOption.find(item => item.id == row.processInfo.ppsId);
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) {
@ -727,6 +757,26 @@ export default {
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() {
getModelDetailList({ modelId: this.modelLevel }).then(res => {

@ -25,12 +25,12 @@
<el-button type="primary" link @click="viewDetails(scope.row.partId, scope.row)"
>详情</el-button
>
<!-- 0 待分派 1 待接收 2 进行中 3 已完成 -->
<!-- 0 待分派 1 待接收 2 进行中 3 已完成 v-if="scope.row.taskStatus == 2" -->
<el-button
type="primary"
link
@click="organization(scope.row.partId, scope.row)"
v-if="scope.row.taskStatus == 2"
>编制</el-button
>
<!-- <el-button
@ -383,7 +383,6 @@ export default {
},
//
completedFn(row) {
console.log(898989, row);
this.$confirm('确认任务是否完成?', {
confirmButtonText: '确定',
cancelButtonText: '取消',

Loading…
Cancel
Save