Compare commits

..

No commits in common. "a9e60dbe82111ca525844096b86c74dbba4ac225" and "ce528f18b69dfaa38b4af3f8ced0dee799c5738e" have entirely different histories.

4 changed files with 47 additions and 87 deletions

View File

@ -2,7 +2,7 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:38:12 * @Date: 2023-11-06 15:38:12
* @LastEditTime: 2024-04-11 14:57:02 * @LastEditTime: 2024-04-09 15:14:40
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
*/ */
@ -94,7 +94,7 @@ export function getWorkerList(query) {
export function getMaterialCheckList(query) { export function getMaterialCheckList(query) {
return request({ return request({
url: 'base/quality-hot-material-det/filterList', url: '/base/core-hot-material-check/listByMaterial',
method: 'get', method: 'get',
params: query params: query
}) })
@ -102,7 +102,7 @@ export function getMaterialCheckList(query) {
export function createQualityHotMaterialDet(query){ export function createQualityHotMaterialDet(query){
return request({ return request({
url: 'base/quality-hot-material-det/createBatch', url: '/base/quality-hot-material-det/create',
method: 'post', method: 'post',
data: query data: query
}) })
@ -110,7 +110,7 @@ export function createQualityHotMaterialDet(query){
export function updateQualityHotMaterialDet(query){ export function updateQualityHotMaterialDet(query){
return request({ return request({
url: 'base/quality-hot-material-det/updateBatch', url: '/base/quality-hot-material-det/listbyfilter',
method: 'put', method: 'put',
data: query data: query
}) })
@ -118,7 +118,7 @@ export function updateQualityHotMaterialDet(query){
export function getQualityHotMaterialDetList(query){ export function getQualityHotMaterialDetList(query){
return request({ return request({
url: '/base/quality-hot-material-det/filterList', url: '/base/quality-hot-material-det/listbyfilter',
method: 'get', method: 'get',
params: query params: query
}) })

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-04-11 13:35:46 * @LastEditTime: 2024-04-11 09:10:16
* @Description: * @Description:
--> -->
<template> <template>
@ -62,8 +62,7 @@
<div v-if="!isdetail" class="action_btn"> <div v-if="!isdetail" class="action_btn">
<template> <template>
<span style="display: inline-block;"> <span style="display: inline-block;">
<el-button v-if="this.$auth.hasPermi('extend:process-equ-material-bom-det:add')" type="text" <el-button type="text" @click="addNew()" icon="el-icon-plus">新增</el-button>
@click="addNew()" icon="el-icon-plus">新增</el-button>
</span> </span>
</template> </template>
</div> </div>
@ -102,15 +101,11 @@ import attrAdd from './attr-add';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
const tableBtn = [ const tableBtn = [
{ {
type: this.$auth.hasPermi('extend:process-equ-material-bom-det:update') type: 'edit',
? 'edit'
: '',
btnName: '编辑', btnName: '编辑',
}, },
{ {
type: this.$auth.hasPermi('extend:process-equ-material-bom-det:delete') type: 'delete',
? 'delete'
: '',
btnName: '删除', btnName: '删除',
}, },
]; ];

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-04-11 13:35:42 * @LastEditTime: 2024-04-11 09:10:35
* @Description: * @Description:
--> -->
<template> <template>
@ -72,8 +72,7 @@
<div v-if="!isdetail" class="action_btn"> <div v-if="!isdetail" class="action_btn">
<template> <template>
<span style="display: inline-block;"> <span style="display: inline-block;">
<el-button v-if="this.$auth.hasPermi('extend:process-equ-value-bom-det:add')" type="text" <el-button type="text" @click="addNew()" icon="el-icon-plus">新增</el-button>
@click="addNew()" icon="el-icon-plus">新增</el-button>
</span> </span>
</template> </template>
</div> </div>
@ -112,15 +111,11 @@ import attrAdd from './attr-add';
const tableBtn = [ const tableBtn = [
{ {
type: this.$auth.hasPermi('extend:process-equ-value-bom-det:update') type: 'edit',
? 'edit'
: '',
btnName: '编辑', btnName: '编辑',
}, },
{ {
type: this.$auth.hasPermi('extend:process-equ-value-bom-det:delete') type: 'delete',
? 'delete'
: '',
btnName: '删除', btnName: '删除',
}, },
]; ];
@ -161,9 +156,7 @@ const tableProps = [
const topBtnConfig = [ const topBtnConfig = [
{ {
type: this.$auth.hasPermi('extend:process-equ-value-bom-det:add') type: 'add',
? 'add'
: '',
btnName: 'btn.add' btnName: 'btn.add'
} }
] ]

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-08 13:46:17 * @Date: 2023-12-08 13:46:17
* @LastEditTime: 2024-04-11 15:25:51 * @LastEditTime: 2024-04-10 16:46:44
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -75,7 +75,7 @@
<el-row :gutter="24" v-for="(item,index) in ingredientList" :key="item.id"> <el-row :gutter="24" v-for="(item,index) in ingredientList" :key="item.id">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="成分"> <el-form-item label="成分">
{{ item.checkName }} {{ item.name }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -83,11 +83,11 @@
:rules="[{ required: true, message: '成分含量不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '成分含量不能为空', trigger: 'blur' }]">
<el-input oninput="value=value.replace(/[^\d]/g,'')" :disabled="isdetail" <el-input oninput="value=value.replace(/[^\d]/g,'')" :disabled="isdetail"
style="width: 90%;margin-right: 10px;" :max="item.maxValue" :min='item.minValue' style="width: 90%;margin-right: 10px;" :max="item.maxValue" :min='item.minValue'
v-model.number="dataForm.checkValueList[index].minCheckValue" v-model.number="dataForm.checkValueList[index].checkValue"
@change="judgeMinValue(arguments[0],item.minValue,item.maxValue,index)"></el-input> @change="judgeValue(arguments[0],item.minValue,item.maxValue,index)"></el-input>
<span v-if="dataForm.checkValueList[index].showIcon"> <span v-if="dataForm.checkValueList[index].showIcon">
<!-- <i class="el-icon-success"></i> --> <!-- <i class="el-icon-success"></i> -->
<svg-icon v-if="dataForm.checkValueList[index].isMinStandard" icon-class="standards" /> <svg-icon v-if="dataForm.checkValueList[index].isStandard" icon-class="standards" />
<svg-icon v-else icon-class="noStandards" /> <svg-icon v-else icon-class="noStandards" />
</span> </span>
</el-form-item> </el-form-item>
@ -97,11 +97,11 @@
:rules="[{ required: true, message: '成分含量不能为空', trigger: 'blur' }]"> :rules="[{ required: true, message: '成分含量不能为空', trigger: 'blur' }]">
<el-input oninput="value=value.replace(/[^\d]/g,'')" :disabled="isdetail" <el-input oninput="value=value.replace(/[^\d]/g,'')" :disabled="isdetail"
style="width: 90%;margin-right: 10px;" :max="item.maxValue" :min='item.minValue' style="width: 90%;margin-right: 10px;" :max="item.maxValue" :min='item.minValue'
v-model.number="dataForm.checkValueList[index].maxCheckValue" v-model.number="dataForm.checkValueList[index].checkValue"
@change="judgeMaxValue(arguments[0],item.minValue,item.maxValue,index)"></el-input> @change="judgeValue(arguments[0],item.minValue,item.maxValue,index)"></el-input>
<span v-if="dataForm.checkValueList[index].showIcon"> <span v-if="dataForm.checkValueList[index].showIcon">
<!-- <i class="el-icon-success"></i> --> <!-- <i class="el-icon-success"></i> -->
<svg-icon v-if="dataForm.checkValueList[index].isMaxStandard" icon-class="standards" /> <svg-icon v-if="dataForm.checkValueList[index].isStandard" icon-class="standards" />
<svg-icon v-else icon-class="noStandards" /> <svg-icon v-else icon-class="noStandards" />
</span> </span>
</el-form-item> </el-form-item>
@ -274,25 +274,14 @@ export default {
onInput() { onInput() {
this.$forceUpdate(); this.$forceUpdate();
}, },
judgeMinValue(val, minValue, maxValue, index) { judgeValue(val, minValue, maxValue, index) {
// console.log(cal);
if (val >= minValue && val <= maxValue) { if (val >= minValue && val <= maxValue) {
console.log(val) console.log(val)
this.dataForm.checkValueList[index].showIcon = true this.dataForm.checkValueList[index].showIcon = true
this.dataForm.checkValueList[index].isMinStandard = true this.dataForm.checkValueList[index].isStandard = true
} else { } else {
this.dataForm.checkValueList[index].showIcon = true this.dataForm.checkValueList[index].showIcon = true
this.dataForm.checkValueList[index].isMinStandard = false this.dataForm.checkValueList[index].isStandard = false
}
},
judgeMaxValue(val, minValue, maxValue, index) {
if (val >= minValue && val <= maxValue) {
console.log(val)
this.dataForm.checkValueList[index].showIcon = true
this.dataForm.checkValueList[index].isMaxStandard = true
} else {
this.dataForm.checkValueList[index].showIcon = true
this.dataForm.checkValueList[index].isMaxStandard = false
} }
}, },
handleClose() { handleClose() {
@ -315,7 +304,7 @@ export default {
checkerId: this.dataForm.checkerId, checkerId: this.dataForm.checkerId,
checkTime: this.dataForm.checkTime, checkTime: this.dataForm.checkTime,
appearance: this.dataForm.appearance, appearance: this.dataForm.appearance,
// checkResult: this.dataForm.checkResult, checkResult: this.dataForm.checkResult,
materialGrade: this.dataForm.materialGrade, materialGrade: this.dataForm.materialGrade,
// checkValueList: [], // checkValueList: [],
checkResult: this.dataForm.checkResult, checkResult: this.dataForm.checkResult,
@ -360,7 +349,7 @@ export default {
checkResult: this.dataForm.checkResult, checkResult: this.dataForm.checkResult,
materialGrade: this.dataForm.materialGrade, materialGrade: this.dataForm.materialGrade,
// checkValueList: [], // checkValueList: [],
// checkResult: this.dataForm.checkResult, checkResult: this.dataForm.checkResult,
materialGrade: this.dataForm.materialGrade, materialGrade: this.dataForm.materialGrade,
remark:this.dataForm.remark remark:this.dataForm.remark
} }
@ -368,15 +357,13 @@ export default {
// this.idAttrShow = true; // this.idAttrShow = true;
let array = [] let array = []
this.dataForm.checkValueList.forEach(ele => { this.dataForm.checkValueList.forEach(ele => {
array.push(this.createDet([ array.push(this.createDet({
{
mainId: response.data, mainId: response.data,
checkDetId: ele.checkDetId, checkDetId: ele.checkDetId,
minCheckValue: ele.minCheckValue, minCheckValue: ele.minCheckValue,
maxCheckValue: ele.maxCheckValue maxCheckValue: ele.maxCheckValue
} }))
]))
}) })
Promise.all(array).then(res => { Promise.all(array).then(res => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
@ -407,17 +394,15 @@ export default {
getMaterialCheckList({ getMaterialCheckList({
materialId:val materialId:val
}).then((res) => { }).then((res) => {
console.log('aaaaaaaa', res.data);
this.ingredientList = res.data this.ingredientList = res.data
this.ingredientFlag = true this.ingredientFlag = true
this.dataForm.checkValueList = res.data.map((ele) => { this.dataForm.checkValueList = res.data.map((ele) => {
return { return {
mainId: null, mainId: null,
checkDetId: ele.checkDetId, checkDetId: ele.id,
minCheckValue:undefined, minCheckValue:null,
maxCheckValue: undefined, maxCheckValue: null,
isMinStandard: true, isStandard: true,
isMaxStandard: true,
showIcon:false, showIcon:false,
} }
}) })
@ -511,31 +496,28 @@ export default {
this.urlOptions.infoURL(id).then(response => { this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data this.dataForm = response.data
getMaterialCheckList({ getMaterialCheckList({
materialId: response.data.materialId, materialId: response.data.materialId
mainId:id,
}).then((res) => { }).then((res) => {
console.log(res.data); console.log(res.data);
let arr = res.data let arr = res.data
valueList = arr.map((ele) => { valueList = arr.map((ele) => {
// console.log(ele) // console.log(ele)
return { return {
checkDetId: ele.checkDetId, checkDetId:ele.id,
maxValue: ele.maxValue, maxValue: ele.maxValue,
minValue: ele.minValue minValue: ele.minValue
} }
}) })
console.log(valueList); console.log(valueList);
getQualityHotMaterialDetList({ getQualityHotMaterialDetList({
mainId: response.data.id, mainId: response.data.id
materialId: response.data.materialId,
}).then((result) => { }).then((result) => {
this.ingredientList = result.data.map((ele) => { this.ingredientList = result.data.map((ele) => {
return { return {
checkName: ele.checkName, name: ele.checkName,
id: ele.id, id: ele.id,
checkDetId: ele.checkDetId, checkDetId: ele.checkDetId,
minCheckValue: ele.minCheckValue, checkValue: ele.checkValue,
maxCheckValue: ele.maxCheckValue,
maxValue:null, maxValue:null,
minValue: null minValue: null
} }
@ -546,10 +528,8 @@ export default {
mainId: ele.mainId, mainId: ele.mainId,
id: ele.id, id: ele.id,
checkDetId: ele.checkDetId, checkDetId: ele.checkDetId,
minCheckValue: ele.minCheckValue, checkValue: ele.checkValue,
maxCheckValue: ele.maxCheckValue, isStandard: true,
isMinStandard: true,
isMaxStandard: true,
showIcon: false, showIcon: false,
} }
}) })
@ -563,21 +543,13 @@ export default {
}) })
valueList.forEach((ele, index) => { valueList.forEach((ele, index) => {
this.dataForm.checkValueList.forEach((item, i) => { this.dataForm.checkValueList.forEach((item, i) => {
if (ele.checkDetId == item.checkDetId && item.minCheckValue >= ele.minValue && item.minCheckValue <= ele.maxValue) { if (ele.checkDetId == item.checkDetId && item.checkValue >= ele.minValue && item.checkValue <= ele.maxValue) {
console.log(1111) console.log(1111)
item.showIcon = true item.showIcon = true
item.isMinStandard = true item.isStandard = true
} else { } else {
item.showIcon = true item.showIcon = true
item.isMinStandard = false item.isStandard = false
}
if (ele.checkDetId == item.checkDetId && item.maxCheckValue >= ele.minValue && item.maxCheckValue <= ele.maxValue) {
console.log(1111)
item.showIcon = true
item.isMaxStandard = true
} else {
item.showIcon = true
item.isMaxStandard = false
} }
}) })
}) })