修改bug
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-10 16:26:08
|
||||
* @LastEditTime: 2023-11-22 16:50:55
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -100,7 +100,8 @@ import {
|
||||
updateProcessEquMaterialBom,
|
||||
getEquipmentList,
|
||||
processEquMaterialBomDetPage,
|
||||
deleteProcessEquMaterialBomDet
|
||||
deleteProcessEquMaterialBomDet,
|
||||
getMaterialCode
|
||||
} from '@/api/extend/processEquMaterialBom';
|
||||
import SmallTitle from './SmallTitle';
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
@@ -197,7 +198,6 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getCode(val) {
|
||||
@@ -223,6 +223,9 @@ export default {
|
||||
// console.log(response);
|
||||
this.equipmentList = res.data
|
||||
})
|
||||
getMaterialCode().then(res => {
|
||||
this.dataForm.code = res.data
|
||||
})
|
||||
},
|
||||
handleClick(raw) {
|
||||
if (raw.type === 'delete') {
|
||||
@@ -267,7 +270,8 @@ export default {
|
||||
});
|
||||
},
|
||||
init(id, isdetail) {
|
||||
this.initData();
|
||||
this.initData()
|
||||
this.getDict()
|
||||
this.isdetail = isdetail || false;
|
||||
this.dataForm.id = id || undefined;
|
||||
this.visible = true;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-08 15:30:27
|
||||
* @LastEditTime: 2023-11-09 14:11:02
|
||||
* @LastEditTime: 2023-11-23 14:27:59
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -18,13 +18,16 @@
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
|
||||
@keyup.enter.native="dataFormSubmit()">
|
||||
<el-form-item label="物料名称" prop="materialId">
|
||||
<el-select v-model="dataForm.materialId" filterable placeholder="请选择物料名称">
|
||||
<el-select v-model="dataForm.materialId" filterable placeholder="请选择物料名称" multiple>
|
||||
<el-option v-for="dict in materialList" :key=" dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="num">
|
||||
<el-input v-model="dataForm.num" placeholder="请输入数量" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="请输入备注" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row style="text-align: right">
|
||||
@@ -37,7 +40,7 @@
|
||||
<script>
|
||||
import {
|
||||
getProcessEquMaterialBomDet,
|
||||
createProcessEquMaterialBomDet,
|
||||
createProcessEquMaterialBomDetList,
|
||||
updateProcessEquMaterialBomDet,
|
||||
getMaterialList
|
||||
} from '@/api/extend/processEquMaterialBom';
|
||||
@@ -56,11 +59,13 @@ export default {
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
bomId: undefined,
|
||||
materialId:null,
|
||||
materialId:[],
|
||||
num: undefined,
|
||||
remark:undefined
|
||||
},
|
||||
dataRule: {
|
||||
attrName: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
materialId: [{ required: true, message: '名称不能为空', trigger: 'change' }],
|
||||
num: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
|
||||
},
|
||||
};
|
||||
},
|
||||
@@ -79,8 +84,11 @@ export default {
|
||||
getProcessEquMaterialBomDet({
|
||||
id: this.dataForm.id
|
||||
}).then((res) => {
|
||||
this.dataForm = res.data;
|
||||
// this.dataForm.materialId = materialId;
|
||||
this.dataForm = res.data
|
||||
const arr = []
|
||||
arr.push(res.data.materialId)
|
||||
this.dataForm.materialId =arr
|
||||
console.log(this.dataForm.materialId);
|
||||
// this.dataForm.value = value;
|
||||
});
|
||||
}
|
||||
@@ -97,10 +105,16 @@ export default {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
if (this.dataForm.id) {
|
||||
const dataObj = {
|
||||
materialId: this.dataForm.materialId.toString(),
|
||||
bomId: this.dataForm.bomId,
|
||||
num: this.dataForm.num,
|
||||
id: this.dataForm.id,
|
||||
remark: this.dataForm.remark
|
||||
}
|
||||
updateProcessEquMaterialBomDet({
|
||||
...this.dataForm,
|
||||
productId: this.productId,
|
||||
...dataObj
|
||||
}).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.visible = false;
|
||||
@@ -108,11 +122,16 @@ export default {
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
createProcessEquMaterialBomDet({
|
||||
...this.dataForm,
|
||||
productId: this.productId,
|
||||
}).then((response) => {
|
||||
// 添加的提交
|
||||
const dataArr = this.dataForm.materialId.map(ele => {
|
||||
return {
|
||||
materialId: ele,
|
||||
bomId: this.dataForm.bomId,
|
||||
num: this.dataForm.num,
|
||||
remark: this.dataForm.remark
|
||||
}
|
||||
});
|
||||
createProcessEquMaterialBomDetList(dataArr).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-09 14:49:16
|
||||
* @LastEditTime: 2023-11-23 09:20:12
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -53,7 +53,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="drawer-body__footer">
|
||||
<div v-if="isdetail" class="drawer-body__footer">
|
||||
<el-button style="" @click="goback()">取消</el-button>
|
||||
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||
编辑
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
<div class="attr-list" v-if="idAttrShow">
|
||||
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
||||
设备物料明细
|
||||
设备参数
|
||||
</small-title>
|
||||
|
||||
<div v-if="!isdetail" class="action_btn">
|
||||
@@ -100,7 +100,8 @@ import {
|
||||
updateProcessEquValueBom,
|
||||
getEquipmentList,
|
||||
processEquValueBomDetPage,
|
||||
deleteProcessEquValueBomDet
|
||||
deleteProcessEquValueBomDet,
|
||||
getValueCode
|
||||
} from '@/api/extend/processEquValueBom';
|
||||
import SmallTitle from './SmallTitle';
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
@@ -208,7 +209,6 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getCode(val) {
|
||||
@@ -234,6 +234,9 @@ export default {
|
||||
// console.log(response);
|
||||
this.equipmentList = res.data
|
||||
})
|
||||
getValueCode().then(res => {
|
||||
this.dataForm.code = res.data
|
||||
})
|
||||
},
|
||||
handleClick(raw) {
|
||||
if (raw.type === 'delete') {
|
||||
@@ -277,8 +280,9 @@ export default {
|
||||
this.listQuery.total = response.data.total;
|
||||
});
|
||||
},
|
||||
init(id, isdetail) {
|
||||
this.initData();
|
||||
init(id, isdetail) {
|
||||
this.getDict()
|
||||
this.initData()
|
||||
console.log(isdetail);
|
||||
this.isdetail = isdetail || false;
|
||||
this.dataForm.id = id || undefined;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-08 15:30:27
|
||||
* @LastEditTime: 2023-11-09 14:44:49
|
||||
* @LastEditTime: 2023-11-23 14:26:54
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -18,19 +18,19 @@
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
|
||||
@keyup.enter.native="dataFormSubmit()">
|
||||
<el-form-item label="参数名称" prop="paramId">
|
||||
<el-select v-model="dataForm.paramId" filterable placeholder="参数名称" @change="getData">
|
||||
<el-select v-model="dataForm.paramId" filterable placeholder="参数名称" @change="getData" multiple >
|
||||
<el-option v-for="dict in materialList" :key=" dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="参数编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="请输入参数编码" clearable />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="标准最小值" prop="standardMinValue">
|
||||
<!-- <el-form-item label="标准最小值" prop="standardMinValue">
|
||||
<el-input v-model="dataForm.standardMinValue" placeholder="请输入标准最小值" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="标准最大值" prop="standardMaxValue">
|
||||
<el-input v-model="dataForm.standardMaxValue" placeholder="请输入标准最大值" clearable />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="工艺最小值" prop="minValue">
|
||||
<el-input v-model="dataForm.minValue" placeholder="请输入工艺最小值" clearable />
|
||||
</el-form-item>
|
||||
@@ -55,7 +55,7 @@
|
||||
<script>
|
||||
import {
|
||||
getProcessEquValueBomDet,
|
||||
createProcessEquValueBomDet,
|
||||
createProcessEquValueBomDetList,
|
||||
updateProcessEquValueBomDet,
|
||||
getValueList
|
||||
} from '@/api/extend/processEquValueBom';
|
||||
@@ -74,7 +74,7 @@ export default {
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
bomId: undefined,
|
||||
paramId:undefined,
|
||||
paramId:[],
|
||||
minValue:undefined,
|
||||
maxValue: undefined,
|
||||
defaultValue: undefined,
|
||||
@@ -117,6 +117,10 @@ export default {
|
||||
id: this.dataForm.id
|
||||
}).then((res) => {
|
||||
this.dataForm = res.data;
|
||||
const arr = []
|
||||
arr.push(res.data.paramId)
|
||||
this.dataForm.paramId = arr
|
||||
console.log(this.dataForm.paramId);
|
||||
// this.dataForm.materialId = materialId;
|
||||
// this.dataForm.value = value;
|
||||
});
|
||||
@@ -137,22 +141,41 @@ export default {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
if (this.dataForm.id) {
|
||||
const dataObj = {
|
||||
paramId: this.dataForm.paramId.toString(),
|
||||
bomId: this.dataForm.bomId,
|
||||
minValue: this.dataForm.minValue,
|
||||
maxValue: this.dataForm.maxValue,
|
||||
defaultValue: this.dataForm.defaultValue,
|
||||
standardMinValue: this.dataForm.standardMinValue,
|
||||
standardMaxValue: this.dataForm.standardMaxValue,
|
||||
remark: this.dataForm.remark,
|
||||
id: this.dataForm.id
|
||||
}
|
||||
updateProcessEquValueBomDet({
|
||||
...this.dataForm,
|
||||
productId: this.productId,
|
||||
...dataObj,
|
||||
}).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
const dataArr = this.dataForm.paramId.map(ele => {
|
||||
return {
|
||||
paramId: ele,
|
||||
bomId: this.dataForm.bomId,
|
||||
minValue: this.dataForm.minValue,
|
||||
maxValue: this.dataForm.maxValue,
|
||||
defaultValue: this.dataForm.defaultValue,
|
||||
standardMinValue: this.dataForm.standardMinValue,
|
||||
standardMaxValue: this.dataForm.standardMaxValue,
|
||||
remark: this.dataForm.remark
|
||||
}
|
||||
});
|
||||
// 添加的提交
|
||||
createProcessEquValueBomDet({
|
||||
...this.dataForm,
|
||||
productId: this.productId,
|
||||
}).then((response) => {
|
||||
createProcessEquValueBomDetList(dataArr).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 14:55:51
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-10 10:23:33
|
||||
* @LastEditTime: 2023-11-22 14:23:40
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -70,7 +70,7 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'yield',
|
||||
label: '成品率'
|
||||
label: '合格率'
|
||||
}
|
||||
];
|
||||
|
||||
@@ -115,19 +115,19 @@ export default {
|
||||
valueField: 'id',
|
||||
param: 'orderName'
|
||||
},
|
||||
// {
|
||||
// type: 'datePicker',
|
||||
// label: '时间段',
|
||||
// dateType: 'daterange',
|
||||
// format: 'yyyy-MM-dd',
|
||||
// valueFormat: "yyyy-MM-dd",
|
||||
// rangeSeparator: '-',
|
||||
// startPlaceholder: '开始时间',
|
||||
// endPlaceholder: '结束时间',
|
||||
// param: 'timeVal',
|
||||
// defaultSelect: [],
|
||||
// width: 250
|
||||
// },
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '工单开始时间',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: "yyyy-MM-dd",
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'timeVal',
|
||||
defaultSelect: [],
|
||||
width: 250
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
@@ -238,13 +238,13 @@ export default {
|
||||
if (val.btnName === 'search') {
|
||||
this.listQuery.orderName = val.orderName ? val.orderName :undefined
|
||||
// this.queryParams.status = val.status
|
||||
// if (val.timeVal && val.timeVal.length != 0 ) {
|
||||
// this.listQuery.startTime = val.timeVal[0] + ' 00:00:00'
|
||||
// this.listQuery.endTime = val.timeVal[1] + ' 23:59:59'
|
||||
// } else {
|
||||
// this.listQuery.startTime = undefined
|
||||
// this.listQuery.endTime = undefined
|
||||
// }
|
||||
if (val.timeVal && val.timeVal.length != 0 ) {
|
||||
this.listQuery.startTime = val.timeVal[0] + ' 00:00:00'
|
||||
this.listQuery.endTime = val.timeVal[1] + ' 23:59:59'
|
||||
} else {
|
||||
this.listQuery.startTime = undefined
|
||||
this.listQuery.endTime = undefined
|
||||
}
|
||||
this.getList()
|
||||
} else {
|
||||
// this.handleExport()
|
||||
|
||||
Reference in New Issue
Block a user