问题修改

dev-scheduling
zhangdi 1 month ago
parent d539a3f4ed
commit 07b0bca9c8
  1. 2
      src/api/orderManagement/moldPlan.js
  2. 14
      src/views/orderManagement/components/mold/addMoldDailog.vue
  3. 2
      src/views/orderManagement/components/mold/moldRequire.vue
  4. 1
      src/views/processManagement/processCapability.vue
  5. 164
      src/views/productionManagement/components/coatingAddDialog.vue
  6. 18
      src/views/productionManagement/components/coatingMater/abnormalOrder.vue
  7. 5
      src/views/productionManagement/components/coatingMater/materialRequirements.vue

@ -48,7 +48,7 @@ export const closeBatchs = ids => {
return request({
url: '/blade-desk/order/moldDemand/closeBatch',
method: 'post',
data: ids,
params: ids,
});
};

@ -131,9 +131,8 @@
<template #default="scope">
<el-form-item :prop="`moldPlan[${scope.$index}].mafType`" :rules="formRules.mafType">
<el-select v-model="scope.row.mafType" :filterable="true" allow-create>
<!-- 2仓库 -->
<el-option label="热表/烧结" :value="12001" />
<el-option label="仓库" :value="12002" />
<el-option v-for="(item,index) in planTypeData" :key="index" :label="item.dictValue" :value="item.dictKey" />
<!-- <el-option label="仓库" :value="12002" /> -->
</el-select>
</el-form-item>
</template>
@ -221,6 +220,7 @@
import { add,getPartList,getProdIdentList,getUserByRoleAlias,getMoldList,getToolList } from '@/api/orderManagement/moldPlan';
import { index } from '@/views/plugin/workflow/api/statistics';
import jhSelect from '@/components/jh-select/index.vue';
import { getDictionary } from '@/api/system/dict';
export default {
props: {
@ -282,6 +282,7 @@ export default {
keeper: [{ required: true, message: '请选择保管员', trigger: ['change', 'submit'] }],
},
partLoading:false,
planTypeData:[],
};
},
mounted() {
@ -298,6 +299,7 @@ export default {
this.getPart();
this.getQuaLevel()
this.getUser()
this.getDictionary()
},
watch: {
showDialog(newVal) {
@ -308,6 +310,12 @@ export default {
},
},
methods: {
//
getDictionary() {
getDictionary({ code: 'mold_plan_type' }).then(res => {
this.planTypeData = res.data.data;
});
},
queryPart(query){
this.partLoading = true
if(query){

@ -302,7 +302,7 @@ export default {
})
.then(() => {
const ids = this.selectionList.map(item => item.id).join(',');
closeBatchs(ids).then(res => {
closeBatchs({ids:ids}).then(res => {
if (res.data.code === 200) {
this.$message({
type: 'success',

@ -203,6 +203,7 @@ export default {
span: 12,
sortable: 'custom',
search: true,
width:150,
rules: [
{
required: true,

@ -7,6 +7,7 @@
@close="closeDialog"
@open="open"
fullscreen
class="content-box"
>
<el-form :inline="true" v-model="submitForm">
<el-form-item label="银钾系数" prop="coefficient" v-if="searchForm.materalType == 2">
@ -23,21 +24,26 @@
</el-form-item> -->
</el-form>
<el-tag type="primary" style="width: 100%; display: block; line-height: 22px"
>选择{{selectionList.length}}个订单 合计物料需求量{{this.totalNum}}</el-tag
>选择{{ selectionList.length }}个订单 合计物料需求量{{ this.totalNum }}</el-tag
>
<div style="border: 1px solid #ccc; padding: 20px 0px">
<div>
<el-form :inline="true" v-model="searchForm" label-width="90px">
<el-form-item label="作业中心" prop="wcId">
<el-select style="width: 182px" v-model="searchForm.wcId" placeholder="请选择作业中心">
<el-option v-for="item in workList" :key="item.id" :label="item.wcName" :value="item.id"></el-option>
<el-option
v-for="item in workList"
:key="item.id"
:label="item.wcName"
:value="item.id"
></el-option>
<!-- <el-option label="作业中心二" value="2"></el-option> -->
</el-select>
</el-form-item>
<el-form-item label="物料类型" prop="materalType">
<el-radio-group v-model="searchForm.materalType" @input="changeType">
<el-radio :label="1">金钾</el-radio>
<el-radio :label="2">银钾</el-radio>
<el-radio :label="1">金钾04-05-023</el-radio>
<el-radio :label="2">银钾04-05-024</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
@ -48,7 +54,13 @@
</el-form-item>
</el-form>
<el-table :data="tableData" @selection-change="handleSelectionChange" ref="multipleTable" :loading="loading">
<el-table
:data="tableData"
@selection-change="handleSelectionChange"
ref="multipleTable"
:loading="loading"
:height="tableHeight"
>
<el-table-column type="selection"></el-table-column>
<el-table-column
label="计划单号"
@ -56,7 +68,12 @@
width="150"
align="center"
></el-table-column>
<el-table-column label="生产订单号" prop="yoCode" width="150" align="center"></el-table-column>
<el-table-column
label="生产订单号"
prop="yoCode"
width="150"
align="center"
></el-table-column>
<el-table-column
label="零件号"
width="150"
@ -69,7 +86,13 @@
prop="partName"
align="center"
></el-table-column>
<el-table-column label="物料编码" width="150" prop="plateGoodsCode" align="center"></el-table-column>
<!-- <el-table-column label="物料编码" width="150" prop="plateGoodsCode" align="center"></el-table-column> -->
<el-table-column
label="流程卡号"
prop="cardNo"
width="80"
align="center"
></el-table-column>
<el-table-column
label="生产标识"
prop="productIdent"
@ -112,7 +135,12 @@
prop="quota2"
align="center"
></el-table-column>
<el-table-column label="计划下达时间" prop="releaseDate" width="150" align="center"></el-table-column>
<el-table-column
label="计划下达时间"
prop="releaseDate"
width="150"
align="center"
></el-table-column>
<!-- <el-table-column label="计划生产时间" prop="createTime" align="center"></el-table-column> -->
</el-table>
@ -140,7 +168,12 @@
</template>
<script>
import { getListlistNoFinished,getAddRequireList,getWorkCenter,add } from '@/api/productionManagement/coatingMaterial';
import {
getListlistNoFinished,
getAddRequireList,
getWorkCenter,
add,
} from '@/api/productionManagement/coatingMaterial';
export default {
props: {
showDialog: {
@ -159,23 +192,41 @@ export default {
tableData: [],
totalNum: null,
selectionList: [],
workList:[]
workList: [],
tableHeight: 0,
};
},
mounted() {
console.log('11111111111')
this.submitForm = {}
this.searchForm = {
console.log('11111111111');
this.submitForm = {};
this.searchForm = {
materalType: 1,
}
this.tableData = []
this.getWorkCenterList()
};
this.tableData = [];
this.getWorkCenterList();
window.addEventListener('resize', this.calculateTableHeight);
//
this.$nextTick(() => {
this.calculateTableHeight();
});
},
beforeDestroy() {
window.removeEventListener('resize', this.calculateTableHeight);
},
methods: {
getWorkCenterList() {
getWorkCenter().then((res) => {
this.workList = res.data.data
})
calculateTableHeight() {
this.$nextTick(() => {
const rightContainer = document.querySelector('.content-box');
if (!rightContainer) return;
const containerHeight = rightContainer.offsetHeight;
this.tableHeight =
containerHeight - 51 - 80 - 42 - 20 - 84 -20;
});
},
getWorkCenterList() {
getWorkCenter().then(res => {
this.workList = res.data.data;
});
},
// /
changeType(val) {
@ -188,17 +239,21 @@ export default {
},
//
async onSearch() {
if (!this.searchForm.wcId) {
this.$message.warning('请选择作业中心');
return;
}
this.loading = true;
try {
// const params = { ...this.submitForm, ...this.query };
console.log('params', this.searchForm);
let params = {
...this.searchForm,
overHalfMon:this.searchForm.overHalfMon ? 1 : 0,
current:1,
size:99999
}
const res = await getAddRequireList( params);
overHalfMon: this.searchForm.overHalfMon ? 1 : 0,
current: 1,
size: 99999,
};
const res = await getAddRequireList(params);
this.tableData = res.data.data.records;
// if (res && res.code === 200) {
// this.data = res.data?.data?.records || [];
@ -207,7 +262,7 @@ export default {
// console.warn(':', '');
// }
} finally {
this.loading = false;
this.loading = false;
}
},
//
@ -220,11 +275,11 @@ export default {
}
var total = eval(strarr.join('+'));
this.totalNum = total ? total.toFixed(2) : 0;
console.log('total-----------',total)
console.log('total-----------', total);
this.submitForm.goodsQuantity = total ? total.toFixed(2) : 0;
},
closeDialog(val) {
this.$emit('closeDialog',val);
this.$emit('closeDialog', val);
},
submit() {
// this.submitForm
@ -234,39 +289,40 @@ export default {
// list: this.selectionList,
// };
// console.log(form);
let plateCodeArr = this.selectionList.map(item => item.plateGoodsCode)
let plateCode = [...new Set(plateCodeArr)].join(',')
let plateCodeArr = this.selectionList.map(item => item.plateGoodsCode);
let plateCode = [...new Set(plateCodeArr)].join(',');
let params = {
assayContent:{
wcId:this.searchForm.wcId,
plateGoodsCode:plateCode,
goodsDemand:this.totalNum,
assayContent: {
wcId: this.searchForm.wcId,
plateGoodsCode: plateCode,
goodsDemand: this.totalNum,
// coefficient: this.searchForm.materalType == 2 && this.searchForm.coefficient ? this.searchForm.coefficient : 0
},
detailList:this.selectionList.map(item =>{
return {yoId :item.id}
})
}
if(this.searchForm.materalType != 2){
detailList: this.selectionList.map(item => {
return { yoId: item.id };
}),
};
if (this.searchForm.materalType != 2) {
// const { coefficient, ...validData } = params;
console.log('params------------',params)
add(params).then(res =>{
if(res.data.code == 200){
this.$message.success('新增成功')
this.closeDialog(true)
console.log('params------------', params);
add(params).then(res => {
if (res.data.code == 200) {
this.$message.success('新增成功');
this.closeDialog(true);
}
})
}else{
params.assayContent.coefficient = this.searchForm.coefficient ? this.searchForm.coefficient : 0
add(params).then(res =>{
if(res.data.code == 200){
this.$message.success('新增成功')
this.closeDialog(true)
});
} else {
params.assayContent.coefficient = this.searchForm.coefficient
? this.searchForm.coefficient
: 0;
add(params).then(res => {
if (res.data.code == 200) {
this.$message.success('新增成功');
this.closeDialog(true);
}
})
});
}
},
},
};

@ -61,7 +61,7 @@ export default {
calcHeight: 32,
simplePage: false,
searchShow: true,
searchMenuSpan: 12,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
@ -77,7 +77,7 @@ export default {
editBtnIcon: ' ',
addBtn: false,
labelWidth: 120,
searchLabelWidth: 120,
searchLabelWidth: 'auto',
menu: false,
menuWidth: 200,
dialogWidth: 600,
@ -89,7 +89,7 @@ export default {
showOverflowTooltip: true,
searchLabelPosition: 'left',
filterBtn: true,
searchLabelPosition: 'left',
searchLabelWidth: 'auto',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'center',
@ -124,7 +124,6 @@ export default {
search: true,
headerAlign: 'center',
align: 'center',
searchLabelWidth: 80,
rules: [
{
required: true,
@ -149,6 +148,17 @@ export default {
},
],
},
{
label: '流程卡号',
prop: 'cardNo',
search: true,
sortable: true,
// width: 150,
span: 12,
headerAlign: 'center',
align: 'center',
},
{
label: '零件号',
prop: 'partCode',

@ -114,7 +114,7 @@ export default {
editBtnIcon: ' ',
addBtn: false,
labelWidth: 120,
searchLabelWidth: 120,
searchLabelWidth: 'auto',
menu: true,
menuWidth: 200,
dialogWidth: 600,
@ -143,7 +143,6 @@ export default {
search: true,
headerAlign: 'center',
align: 'center',
searchLabelWidth: 80,
rules: [
{
required: true,
@ -176,6 +175,7 @@ export default {
value: 'id',
},
},
{
label: '物料编号',
prop: 'goodsCode',
@ -322,7 +322,6 @@ export default {
type: 'select',
headerAlign: 'center',
align: 'center',
searchLabelWidth: 50,
rules: [
{
required: true,

Loading…
Cancel
Save