Merge branch 'dev-scheduling' of http://42.192.7.176:3000/suojin/jonhon-mes-web into dev-scheduling

dev-scheduling
zhangdi 3 months ago
commit 170e184f43
  1. 38
      src/api/equiptManagement/maintenancetools.js
  2. 11
      src/api/equiptManagement/measurementRecords.js
  3. 18
      src/api/equiptManagement/recorderList.js
  4. 47
      src/api/equiptManagement/reminderConfiguration.js
  5. 1
      src/api/qualityManagement/periodicTesting/testTask.js
  6. 13
      src/views/equiptManagement/equipmentLedger/index.vue
  7. 411
      src/views/equiptManagement/measurementRecords/index.vue
  8. 245
      src/views/equiptManagement/measurementRecords/reminderConfiguration.vue
  9. 6
      src/views/equiptManagement/workwearManagement/columnData.js
  10. 18
      src/views/equiptManagement/workwearManagement/index.vue
  11. 8
      src/views/qualityManagement/tankSolutionSystem/components/addEditInfoDialog.vue
  12. 2
      src/views/qualityManagement/tankSolutionSystem/info.vue
  13. 8
      src/views/qualityManagement/tankSolutionSystem/tankSolutionTaskDispose.vue
  14. 397
      src/views/recorderList/index.vue
  15. 4
      src/views/recorderList/js/recorderColumnData.js
  16. 291
      src/views/warehouseManagement/maintenancetools/index.vue

@ -0,0 +1,38 @@
// 量具保养
import request from '@/axios';
// 量具保养记录
export const getRecorderList = (params) => {
return request({
url: '/blade-desk/measuringUpkeep/page',
method: 'get',
params,
});
};
// 量具保养新增列表数据
export const addRecorderList = (params) => {
return request({
url: '/blade-desk/measuringUpkeep/newlyAddedList',
method: 'get',
params,
});
};
// 加入保养
export const addRecorder = (params) => {
return request({
url: '/blade-desk/measuringUpkeep/addMaintenance',
method: 'post',
params,
});
};
// 量具保养申请
export const applyRecorder = (params) => {
return request({
url: '/blade-desk/measuringUpkeep/maintenanceAppFun',
method: 'post',
params,
});
};

@ -0,0 +1,11 @@
// 计量记录
import request from '@/axios';
// 计量记录列表
export const getRecorderList = (params) => {
return request({
url: '/blade-desk/measurementRecords/page',
method: 'get',
params,
});
};

@ -124,4 +124,22 @@ export const deleteRecorderLineSetting = (params) =>{
method: 'post',
params
});
}
// 记录仪历史曲线
export const getRecorderHistoryLine = (data) =>{
return request({
url: '/api/blade-desk/recorder/loadCalRecorder',
method: 'post',
data
});
}
// 记录仪明细
export const getRecorderHistoryDetail = (params) =>{
return request({
url: '/api/blade-desk/recorder/page',
method: 'get',
params
});
}

@ -0,0 +1,47 @@
// 提醒配置
import request from '@/axios';
// 列表
export const getList = (params) => {
return request({
url: '/blade-desk/meteringRemindSet/page',
method: 'get',
params,
});
};
// 新增
export const addRemind = (data) => {
return request({
url: '/blade-desk/meteringRemindSet/save',
method: 'post',
data,
});
};
// 详情
export const getDetail = (params) => {
return request({
url: '/blade-desk/meteringRemindSet/detail',
method: 'get',
params,
});
};
// 修改
export const updateRemind = (data) => {
return request({
url: '/blade-desk/meteringRemindSet/update',
method: 'post',
data,
});
};
// 删除
export const removeRemind = params => {
return request({
url: '/blade-desk/meteringRemindSet/remove',
method: 'post',
params,
});
};

@ -107,3 +107,4 @@ export const exportExcel = (data) =>{
responseType: "blob",
})
}

@ -98,7 +98,7 @@ export default {
border: true,
selection: true,
viewBtn: true,
menuWidth: 240,
menuWidth: 180,
dialogClickModal: false,
excelBtn: true,
viewBtn: false,
@ -191,9 +191,13 @@ export default {
label: "正常服役",
value: 1,
},
// {
// label: "",
// value: 2,
// },
{
label: "暂停服役",
value: 2,
value: 3,
},
],
rules: [
@ -373,6 +377,10 @@ export default {
virtualMac: row.virtualMac ? 1 : 0,
attachLink:row.attachLink.length > 0 ? row.attachLink[0] : ''
}
console.log('link----------',row.attachLink && row.attachLink != '' && typeof(row.attachLink) == String ? row.attachLink : row.attachLink.length > 0 ? row.attachLink[0] : '')
console.log('row------------',row)
console.log('params------------',params)
editDevice(params).then(res => {
if(res.data.code == 200){
this.$message.success('修改成功')
@ -428,6 +436,7 @@ export default {
if (["edit", "view"].includes(type)) {
getDetail({id:this.form.id}).then(res =>{
this.form = res.data.data
this.form.attachLink = [this.form.attachLink]
this.form.virtualMac = this.form.virtualMac == 1 ? true : false
})
}

@ -34,7 +34,8 @@
@setCrewOpeSancel="setCrewOpeSancel" />
<!-- 提醒配置 -->
<alertConfigDialog v-if="isConfigOpen" :showDialog="isConfigOpen" @closeDialog="setCrewOpeSancel"></alertConfigDialog>
<reminder-configuration v-if="isConfigOpen" :showDialog="isConfigOpen" @closeDialog="setCrewOpeSancel"></reminder-configuration>
<!-- <alertConfigDialog v-if="isConfigOpen" :showDialog="isConfigOpen" @closeDialog="setCrewOpeSancel"></alertConfigDialog> -->
</basic-container>
</template>
<script>
@ -42,13 +43,16 @@
import { getLazyList, remove, update, add, getMenu } from '@/api/system/menu';
import { mapGetters } from 'vuex';
import {getRecorderList} from "@/api/equiptManagement/measurementRecords"
import setPersonnel from "@/components/dialogCom/setPersonnel.vue"
import alertConfigDialog from './alertConfigDialog.vue'
import reminderConfiguration from './reminderConfiguration.vue'
export default {
components: {
setPersonnel,
alertConfigDialog
alertConfigDialog,
reminderConfiguration
},
data() {
return {
@ -123,6 +127,13 @@ export default {
overHidden: true,
width: 120,
},
// {
// label: '',
// prop: 'labelNo',
// sortable: true,
// overHidden: true,
// width: 120,
// },
{
label: '型号',
prop: 'mcType',
@ -153,7 +164,7 @@ export default {
},
{
label: '检定部门',
prop: 'testDept.deptName',
prop: 'testDept',
sortable: true,
overHidden: true,
width: 120,
@ -174,7 +185,7 @@ export default {
},
{
label: '生产厂家',
prop: 'mcOem.ocName',
prop: 'mcOem',
sortable: true,
overHidden: true,
width: 120,
@ -196,9 +207,14 @@ export default {
{
label: '是否送检',
prop: 'censorship',
type: 'select',
sortable: true,
overHidden: true,
width: 120,
dicData:[
{label:"是",value:1},
{label:"否",value:0},
]
},
{
label: '检验结果',
@ -214,13 +230,13 @@ export default {
overHidden: true,
width: 120,
},
{
label: '检验结果',
prop: 'testMethod',
sortable: true,
overHidden: true,
width: 120,
},
// {
// label: '',
// prop: 'testMethod',
// sortable: true,
// overHidden: true,
// width: 120,
// },
],
},
@ -398,85 +414,302 @@ export default {
//
onLoad(page, params = {}) {
this.loading = true;
getRecorderList({
current:this.page.currentPage,
size:this.page.pageSize,
cmType:1,
...this.query
}).then(res =>{
this.data = res.data.data.records
this.page.total = res.data.data.total
this.loading = false
getLazyList(this.parentId, Object.assign(params, this.query)).then(res => {
// this.data = res.data.data;
this.data = [
{
"bcId": 21,
"code": "A1",
"deleted": false,
"keyValue": 21,
"memo": "镀金",
"name": "A类",
"type": 5,
"updateTime": null
},
{
"bcId": 22,
"code": "B类",
"deleted": false,
"keyValue": 22,
"memo": "镀银",
"name": "B类",
"type": 5,
"updateTime": null
},
{
"bcId": 23,
"code": "C类",
"deleted": false,
"keyValue": 23,
"memo": "镀镍、锌镍、镀锡",
"name": "C类",
"type": 5,
"updateTime": null
},
{
"bcId": 24,
"code": "D类",
"deleted": false,
"keyValue": 24,
"memo": "镀锌、镀镉、复合材料",
"name": "D类",
"type": 5,
"updateTime": null
},
{
"bcId": 25,
"code": "E类",
"deleted": false,
"keyValue": 25,
"memo": "氧化、喷漆",
"name": "E类",
"type": 5,
"updateTime": null
},
{
"bcId": 26,
"code": "F类",
"deleted": false,
"keyValue": 26,
"memo": "钝化、综合",
"name": "F类",
"type": 5,
"updateTime": null
},
{
"bcId": 27,
"code": "G类",
"deleted": false,
"keyValue": 27,
"memo": "镀铬、杂项",
"name": "G类",
"type": 5,
"updateTime": null
}
]
this.loading = false;
this.page.total = this.data.length
this.selectionClear();
});
// this.data = [
// {
// "id": "",
// "createUser": -1,
// "createDept": -1,
// "createTime": "",
// "updateUser": -1,
// "updateTime": "",
// "status": -1,
// "isDeleted": -1,
// "mcName": "",
// "norms": "0-50cm",
// "mcClass": "C",
// "labelNo": "",
// "str2": "",
// "mcCode": "LS321295",
// "useUnit": "",
// "accuracy": "",
// "oemCode": "",
// "mcOem": "",
// "enableDate": "",
// "whenDccept": "",
// "mcType": "",
// "testCycle": 0,
// "dueDate": "",
// "date2": "",
// "belong": "",
// "whenBuy": "",
// "testDept": "",
// "testMethod": "JJG1",
// "str9": "",
// "str10": "",
// "assetsNo": "",
// "str6": "",
// "purposeClass": "",
// "isOverStr": "",
// "cmType": -1,
// "censorship": false,
// "checkStatus": false,
// "checkResult": false
// },
// {
// "id": "",
// "createUser": -1,
// "createDept": -1,
// "createTime": "",
// "updateUser": -1,
// "updateTime": "",
// "status": -1,
// "isDeleted": -1,
// "mcName": "",
// "norms": "0-30cm",
// "mcClass": "C",
// "labelNo": "",
// "str2": "",
// "mcCode": "LS321294",
// "useUnit": "",
// "accuracy": "",
// "oemCode": "",
// "mcOem": "",
// "enableDate": "",
// "whenDccept": "",
// "mcType": "",
// "testCycle": 0,
// "dueDate": "",
// "date2": "",
// "belong": "",
// "whenBuy": "",
// "testDept": "",
// "testMethod": "JJG1",
// "str9": "",
// "str10": "",
// "assetsNo": "",
// "str6": "",
// "purposeClass": "",
// "isOverStr": "",
// "cmType": -1,
// "censorship": false,
// "checkStatus": false,
// "checkResult": false
// },
// {
// "id": "",
// "createUser": -1,
// "createDept": -1,
// "createTime": "",
// "updateUser": -1,
// "updateTime": "",
// "status": -1,
// "isDeleted": -1,
// "mcName": "",
// "norms": "0-50cm",
// "mcClass": "C",
// "labelNo": "",
// "str2": "",
// "mcCode": "LS321296",
// "useUnit": "",
// "accuracy": "",
// "oemCode": "",
// "mcOem": "",
// "enableDate": "",
// "whenDccept": "",
// "mcType": "",
// "testCycle": 0,
// "dueDate": "",
// "date2": "",
// "belong": "",
// "whenBuy": "",
// "testDept": "",
// "testMethod": "",
// "str9": "",
// "str10": "",
// "assetsNo": "",
// "str6": "",
// "purposeClass": "",
// "isOverStr": "",
// "cmType": -1,
// "censorship": false,
// "checkStatus": false,
// "checkResult": false
// },
// {
// "id": "",
// "createUser": -1,
// "createDept": -1,
// "createTime": "",
// "updateUser": -1,
// "updateTime": "",
// "status": -1,
// "isDeleted": -1,
// "mcName": "",
// "norms": "0-50cm",
// "mcClass": "C",
// "labelNo": "",
// "str2": "",
// "mcCode": "LS321296",
// "useUnit": "",
// "accuracy": "",
// "oemCode": "",
// "mcOem": "",
// "enableDate": "",
// "whenDccept": "",
// "mcType": "",
// "testCycle": 0,
// "dueDate": "",
// "date2": "",
// "belong": "",
// "whenBuy": "",
// "testDept": "",
// "testMethod": "",
// "str9": "",
// "str10": "",
// "assetsNo": "",
// "str6": "",
// "purposeClass": "",
// "isOverStr": "",
// "cmType": -1,
// "censorship": false,
// "checkStatus": false,
// "checkResult": false
// },
// {
// "id": "",
// "createUser": -1,
// "createDept": -1,
// "createTime": "",
// "updateUser": -1,
// "updateTime": "",
// "status": -1,
// "isDeleted": -1,
// "mcName": "",
// "norms": "MAGNETOSCOP1.070",
// "mcClass": "B",
// "labelNo": "",
// "str2": "",
// "mcCode": "YQ202512057",
// "useUnit": "",
// "accuracy": "±5%",
// "oemCode": "17175",
// "mcOem": "FOERSTER",
// "enableDate": "2025-11-28 00:00:00",
// "whenDccept": "",
// "mcType": "1.068/1.069",
// "testCycle": 12,
// "dueDate": "2026-11-27 00:00:00",
// "date2": "",
// "belong": "",
// "whenBuy": "",
// "testDept": "FOERSTER",
// "testMethod": "",
// "str9": "",
// "str10": "",
// "assetsNo": "",
// "str6": "",
// "purposeClass": "",
// "isOverStr": "",
// "cmType": -1,
// "censorship": false,
// "checkStatus": false,
// "checkResult": false
// }
// ]
// this.page = this.data.length
// this.loading = false
})
// getLazyList(this.parentId, Object.assign(params, this.query)).then(res => {
// // this.data = res.data.data;
// this.data = [
// {
// "bcId": 21,
// "code": "A1",
// "deleted": false,
// "keyValue": 21,
// "memo": "",
// "name": "A",
// "type": 5,
// "updateTime": null
// },
// {
// "bcId": 22,
// "code": "B",
// "deleted": false,
// "keyValue": 22,
// "memo": "",
// "name": "B",
// "type": 5,
// "updateTime": null
// },
// {
// "bcId": 23,
// "code": "C",
// "deleted": false,
// "keyValue": 23,
// "memo": "",
// "name": "C",
// "type": 5,
// "updateTime": null
// },
// {
// "bcId": 24,
// "code": "D",
// "deleted": false,
// "keyValue": 24,
// "memo": "",
// "name": "D",
// "type": 5,
// "updateTime": null
// },
// {
// "bcId": 25,
// "code": "E",
// "deleted": false,
// "keyValue": 25,
// "memo": "",
// "name": "E",
// "type": 5,
// "updateTime": null
// },
// {
// "bcId": 26,
// "code": "F",
// "deleted": false,
// "keyValue": 26,
// "memo": "",
// "name": "F",
// "type": 5,
// "updateTime": null
// },
// {
// "bcId": 27,
// "code": "G",
// "deleted": false,
// "keyValue": 27,
// "memo": "",
// "name": "G",
// "type": 5,
// "updateTime": null
// }
// ]
// this.loading = false;
// this.page.total = this.data.length
// this.selectionClear();
// });
},
},
}

@ -0,0 +1,245 @@
<template>
<el-dialog title="新增" append-to-body :modelValue="openShow" width="80%" @close="closeDialog" fullscreen>
<avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud"
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
@row-save="rowSave" @row-update="rowUpdate" :before-open="beforeOpen"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" >
<template #menu-left>
<el-button type="danger" plain @click="removeFn">删除</el-button>
</template>
</avue-crud>
</el-dialog>
</template>
<script>
import {getList,addRemind,getDetail,updateRemind,removeRemind} from "@/api/equiptManagement/reminderConfiguration"
export default {
props: {
showDialog: {
type: Boolean,
default: false
},
moldAddMore: {
type: Boolean,
default: false
}
},
data() {
return {
openShow:false,
loading:false,
data:[],
form:{},
selectionList:[],
page:{
pageSize: 10,
currentPage: 1,
total: 0,
},
option:{
columnSort: true,
tip: false,
height: 'auto',
calcHeight: 32,
simplePage: false,
searchShow: true,
searchMenuSpan: 6,
dialogWidth: 600,
border: true,
selection: true,
menuWidth: 120,
dialogClickModal: false,
excelBtn: true,
viewBtn: false,
addBtn: true,
editBtn: true,
editBtnText: '修改',
refreshBtn: false,
searchShowBtn: false,
gridBtn: false,
searchIndex: 3,
searchIcon: true,
menu: true,
searchLabelPosition: 'left',
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
align: 'center',
column: [
{
label: '类别',
prop: 'category',
type:'select',
span: 24,
search: true,
sortable: true,
overHidden: true,
// 12
dicData:[
{label:"仪表计量",value:1},
{label:"设备计量",value:2},
],
rules: [
{
required: true,
message: '请选择类别',
trigger: 'blur',
},
],
},
{
label: '天数',
prop: 'days',
span: 24,
type: 'number',
sortable: true,
overHidden: true,
rules: [
{
required: true,
message: '请输入天数',
trigger: 'blur',
},
],
},
{
label: '颜色',
prop: 'color',
type:'select',
span: 24,
search: true,
sortable: true,
overHidden: true,
dicData:[
// 12
{label:'黄色',value:1},
{label:'浅红色',value:2},
],
rules: [
{
required: true,
message: '请选择颜色',
trigger: 'blur',
},
],
}
]
}
}
},
mounted(){
this.openShow = this.showDialog
this.onload()
},
methods:{
closeDialog(){
this.openShow = false
this.$emit('closeDialog');
},
selectionChange(list){
this.selectionList = list
},
searchChange(params, done){
this.page.currentPage = 1
this.query = params
this.onload()
done()
},
searchReset(){
this.query = {}
this.onload()
},
currentChange(currentPage){
this.page.currentPage = currentPage
},
sizeChange(pageSize){
this.page.pageSize = pageSize
},
beforeOpen(done, type){
// if(['edit', 'view'].includes(type)){
// getDetail({id:this.form.id}).then(res =>{
// console
// })
// }
done()
},
rowSave(row, done, loading){
addRemind(row).then(res =>{
if(res.data.code == 200){
this.$message.success('新增成功')
done()
this.onload()
}
})
},
rowUpdate(row, index, done, loading){
updateRemind(row).then(res =>{
if(res.data.code == 200){
this.$message.success('修改成功')
done()
this.onload()
}
})
},
rowDel(row){
this.$confirm('确定删除数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
removeRemind({ids:row.id}).then(res =>{
if(res.data.code == 200){
this.$message.success('删除成功')
this.onload()
}
})
})
},
removeFn(){
if(this.selectionList.length == 0){
this.$message.error('请至少选择一条数据')
return
}
this.$confirm('确定删除选中数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
removeRemind({
ids:this.selectionList.map(item => item.id).join(',')
}).then(res =>{
if(res.data.code == 200){
this.$message.success('删除成功')
this.onload()
}
})
})
},
onload(){
this.loading = true
getList({
current:this.page.currentPage,
size:this.page.pageSize,
...this.query
}).then(res => {
this.data = res.data.data.records
this.page.total = res.data.data.total
this.loading = false
})
}
}
}
</script>
<style>
</style>

@ -110,7 +110,8 @@ export const feiBaOption = {
delBtn: false,
labelWidth: 120,
searchLabelWidth: 120,
menuWidth: 140,
menuWidth: 80,
menuAlign:"center",
dialogWidth: 600,
dialogClickModal: false,
searchEnter: true,
@ -192,7 +193,8 @@ export const rackOption = {
delBtn: false,
labelWidth: 120,
searchLabelWidth: 120,
menuWidth: 140,
menuWidth: 80,
menuAlign:"center",
dialogWidth: 600,
dialogClickModal: false,
searchEnter: true,

@ -4,8 +4,9 @@
<el-tab-pane label="飞靶设置" name="feiBaSet">
<!-- 表格数据 -->
<avue-crud
:height="460"
:option="feiBaOption"
:table-loading="loading"
:table-loading="feibaLoading"
:data="data"
v-model="form"
v-model:page="page"
@ -27,8 +28,9 @@
</el-tab-pane>
<el-tab-pane label="挂具设置" name="rackSet">
<avue-crud
:height="460"
:option="rackOption"
:table-loading="loading"
:table-loading="gjLoading"
:data="data"
v-model="form"
v-model:page="page"
@ -63,6 +65,8 @@ export default {
return {
loading: false,
tabPosition: "feiBaSet",
feibaLoading:false,
gjLoading:false,
feiBaOption:feiBaOption,
rackOption:rackOption,
selectionList: [],
@ -93,7 +97,7 @@ export default {
delBtn: false,
labelWidth: 120,
searchLabelWidth: 120,
menuWidth: 140,
menuWidth: 100,
dialogWidth: 600,
dialogClickModal: false,
searchEnter: true,
@ -242,6 +246,7 @@ export default {
}
},
getFeiBa(){
// this.feibaLoading = true
getFeiBaSetList({
current:this.page.currentPage,
size:this.page.pageSize,
@ -249,9 +254,13 @@ export default {
}).then(res =>{
this.data = res.data.data.records
this.page.total = res.data.data.total
// setTimeout(() => {
// this.feibaLoading = false
// }, 50);
})
},
getRackSet(){
// this.gjLoading = true
getRackSetList({
current:this.page.currentPage,
size:this.page.pageSize,
@ -259,6 +268,9 @@ export default {
}).then(res =>{
this.data = res.data.data.records
this.page.total = res.data.data.total
// setTimeout(() => {
// this.gjLoading = false
// }, 50);
})
},
tabPositionChange(value, event) {

@ -1,6 +1,6 @@
<template>
<el-dialog title="新增" append-to-body :modelValue="openShow" width="70%" @close="closeDialog">
<el-form ref="form" :model="form" label-width="140px" :rules="rules">
<el-form ref="form" :model="form" label-width="150px" :rules="rules">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="作业中心:" prop="workCenterId">
@ -72,7 +72,7 @@
<el-col :span="8">
<el-form-item label="加药量计算公式:" prop="addDrugFormulaId" label-width="140px">
<el-form-item label="加药量计算公式:" prop="addDrugFormulaId" label-width="150px">
<el-select v-model="form.addDrugFormulaId" :disabled="type == 'view'" placeholder="请选择">
<el-option v-for="item in drugList" :key="item.id" :label="item.name" :value="item.id" />
<!-- <el-option label="计算公式2" value="2" /> -->
@ -80,7 +80,7 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="添加后理论值公式:" prop="afterTheoryFormulaId" label-width="140px">
<el-form-item label="添加后理论值公式:" prop="afterTheoryFormulaId" label-width="150px">
<el-select v-model="form.afterTheoryFormulaId" :disabled="type == 'view'" placeholder="请选择">
<el-option v-for="item in afterTheoryList" :key="item.id" :label="item.name" :value="item.id" />
<!-- <el-option label="计算公式2" value="2" /> -->
@ -117,7 +117,7 @@
<el-form-item label="PH值范围:">
<div style="display: flex;">
<el-radio-group v-model="form.phType" :disabled="type == 'view'">
<el-radio :value="1">温度</el-radio>
<el-radio :value="1">PH值</el-radio>
<el-radio :value="2">PH值范围</el-radio>
</el-radio-group>
<div style="margin-left: 32px;display: flex;" v-if="form.phType == 2">

@ -607,7 +607,7 @@ export default {
prop: 'updateTime',
search: false,
sortable: true,
width: 120,
width: 160,
addDisplay: false,
viewDisplay: false,
editDisplay: false,

@ -383,7 +383,7 @@ export default {
sortable: true,
filter: true,
span: 24,
width: 140,
width: 160,
},
{
label: '槽液到期时间',
@ -392,7 +392,7 @@ export default {
sortable: true,
filter: true,
span: 24,
width: 140,
width: 160,
},
// {
// label: '',
@ -482,7 +482,7 @@ export default {
filter: true,
addDisplay: false,
span: 24,
width: 140,
width: 160,
},
{
@ -494,7 +494,7 @@ export default {
filter: true,
addDisplay: false,
span: 24,
width: 140,
width: 160,
},
]

@ -4,6 +4,7 @@
<el-tabs v-model="tabPosition" class="demo-tabs" @tab-change="tabPositionChange">
<el-tab-pane label="记录仪" name="recorder">
<avue-crud
:height="460"
:option="option"
:table-loading="loading"
:data="data"
@ -32,13 +33,13 @@
>
</template>
<template #menu-left>
<el-button
<!-- <el-button
type="primary"
icon="el-icon-plus"
@click="handleAdd"
v-if="tabPosition == 'recorderLineSetting'"
>新增</el-button
>
> -->
<el-button
type="primary"
icon="el-icon-setting"
@ -58,6 +59,7 @@
</el-tab-pane>
<el-tab-pane label="记录仪曲线配置" name="recorderLineSetting">
<avue-crud
:height="460"
:option="option"
:table-loading="loading"
:data="data"
@ -121,7 +123,9 @@
<el-form-item label="统计日期" prop="queryDate">
<el-date-picker
v-model="searchForm.queryDate"
type="datetimerange"
type="daterange"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@ -138,17 +142,23 @@
</div>
</el-tab-pane>
</el-tabs>
<el-dialog append-to-body title="详情" width="80%" v-model="detailDialog">
<el-dialog append-to-body title="详情" width="80%" v-model="detailDialog" >
<avue-crud
class="detail-crud-option"
:option="detailOption"
:table-loading="detailLoading"
:data="detailData"
v-model="detailForm"
v-model:page="detailPage"
@current-change="currentChange"
@size-change="sizeChange"
@current-change="detailCurrentChange"
@size-change="detailSizeChange"
>
</avue-crud>
<template #footer>
<span class="dialog-footer">
<el-button @click="detailDialog = false"> </el-button>
</span>
</template>
</el-dialog>
<el-dialog append-to-body title="打包周期配置" v-model="settingDialog">
<el-form ref="setForm" :model="setForm" :rules="setRules" label-width="120px">
@ -278,7 +288,7 @@
import recorderColumnData from './js/recorderColumnData';
import { getRecorderList,addRecorder,updateRecorder,deleteRecorder,getRecorderDetail,addpackCycle,
getpackCycleList,updatepackCycle,getRecorderLineSetting,addRecorderLineSetting,getRecorderLineSettingDetail,
updateRecorderLineSetting,deleteRecorderLineSetting } from '@/api/equiptManagement/recorderList';
updateRecorderLineSetting,deleteRecorderLineSetting,getRecorderHistoryLine,getRecorderHistoryDetail } from '@/api/equiptManagement/recorderList';
export default {
data() {
return {
@ -339,7 +349,7 @@ export default {
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
addBtn: true,
addBtn: false,
labelWidth: 120,
searchLabelWidth: 120,
menu: true,
@ -363,7 +373,7 @@ export default {
detailOption: {
columnSort: true,
tip: false,
height: 'auto',
height: 450,
align: 'center',
calcHeight: 32,
simplePage: false,
@ -387,8 +397,10 @@ export default {
dialogWidth: 600,
dialogClickModal: false,
searchEnter: true,
excelBtn: true,
excelBtn: false,
gridBtn: false,
refreshBtn:false,
columnBtn:false,
searchShowBtn: false,
showOverflowTooltip: true,
searchLabelPosition: 'left',
@ -436,6 +448,7 @@ export default {
lineQuery:{},
selectLoading:false,
detailForm: {},
detailId:null,
selectionList:[],
//
formRules: {
@ -467,155 +480,171 @@ export default {
};
},
mounted() {
this.tabPositionChange();
this.option.column = recorderColumnData[this.tabPosition];
this.tabPositionChange('recorder');
// this.option.column = recorderColumnData[this.tabPosition];
},
methods: {
//
onSubmit() {
this.$refs.searchForm.validate(valid => {
if (valid) {
let chartData = {
yArray: [
{
showName: '压力',
yData: [
11.75, 1.0, 0.15, 1.9, 11.75, 0.15, 1.75, 1.9, 1.0, 1.75, 1.0, 0.15, 0.15, 1.9,
1.0, 1.75, 1.9, 11.75, 1.75, 11.75, 11.75, 1.0, 0.15, 1.9, 11.75, 0.15, 1.75, 1.9,
1.0, 1.75, 1.0, 0.15, 0.15, 1.9, 1.0, 1.75, 1.9, 11.75, 1.75, 11.75, 11.75, 1.0,
0.15, 1.9, 11.75, 0.15, 1.75, 1.9, 1.0, 1.75, 1.0, 0.15, 0.15, 1.9, 1.0, 1.75,
1.9, 11.75, 1.75, 11.75, 11.75, 1.0, 0.15, 1.9, 11.75, 0.15, 1.75, 1.9, 1.0, 1.75,
1.0, 0.15, 0.15, 1.9, 1.0, 1.75, 1.9, 11.75, 1.75, 11.75,
],
crcY: 0.25,
},
{
showName: '温度',
yData: [
85.0, 500.0, 30.0, 500.0, 85.0, 30.0, 65.0, 500.0, 500.0, 65.0, 500.0, 30.0, 30.0,
500.0, 500.0, 65.0, 500.0, 85.0, 65.0, 85.0, 85.0, 500.0, 30.0, 500.0, 85.0, 30.0,
65.0, 500.0, 500.0, 65.0, 500.0, 30.0, 30.0, 500.0, 500.0, 65.0, 500.0, 85.0,
65.0, 85.0, 85.0, 500.0, 30.0, 500.0, 85.0, 30.0, 65.0, 500.0, 500.0, 65.0, 500.0,
30.0, 30.0, 500.0, 500.0, 65.0, 500.0, 85.0, 65.0, 85.0, 85.0, 500.0, 30.0, 500.0,
85.0, 30.0, 65.0, 500.0, 500.0, 65.0, 500.0, 30.0, 30.0, 500.0, 500.0, 65.0,
500.0, 85.0, 65.0, 85.0,
],
crcY: 65.0,
},
{
showName: '低真空',
yData: [
12.0, 7.8, 1.0, 7.5, 12.0, 1.0, 6.0, 7.5, 7.8, 6.0, 7.8, 1.0, 1.0, 7.5, 7.8, 6.0,
7.5, 12.0, 6.0, 12.0, 12.0, 7.8, 1.0, 7.5, 12.0, 1.0, 6.0, 7.5, 7.8, 6.0, 7.8,
1.0, 1.0, 7.5, 7.8, 6.0, 7.5, 12.0, 6.0, 12.0, 12.0, 7.8, 1.0, 7.5, 12.0, 1.0,
6.0, 7.5, 7.8, 6.0, 7.8, 1.0, 1.0, 7.5, 7.8, 6.0, 7.5, 12.0, 6.0, 12.0, 12.0, 7.8,
1.0, 7.5, 12.0, 1.0, 6.0, 7.5, 7.8, 6.0, 7.8, 1.0, 1.0, 7.5, 7.8, 6.0, 7.5, 12.0,
6.0, 12.0,
],
crcY: 1.0,
},
{
showName: '高真空',
yData: [
1.875, 0.875, 0.101, 0.375, 1.875, 0.101, 0.875, 0.375, 0.875, 0.875, 0.875,
0.101, 0.101, 0.375, 0.875, 0.875, 0.375, 1.875, 0.875, 1.875, 1.875, 0.875,
0.101, 0.375, 1.875, 0.101, 0.875, 0.375, 0.875, 0.875, 0.875, 0.101, 0.101,
0.375, 0.875, 0.875, 0.375, 1.875, 0.875, 1.875, 1.875, 0.875, 0.101, 0.375,
1.875, 0.101, 0.875, 0.375, 0.875, 0.875, 0.875, 0.101, 0.101, 0.375, 0.875,
0.875, 0.375, 1.875, 0.875, 1.875, 1.875, 0.875, 0.101, 0.375, 1.875, 0.101,
0.875, 0.375, 0.875, 0.875, 0.875, 0.101, 0.101, 0.375, 0.875, 0.875, 0.375,
1.875, 0.875, 1.875,
],
crcY: 0.125,
},
],
xData: [
'2024-03-16 12:01:17.0',
'2024-03-16 12:13:11.0',
'2024-03-16 12:20:12.0',
'2024-03-16 12:20:25.0',
'2024-03-16 12:21:27.0',
'2024-03-16 12:30:00.0',
'2024-03-16 12:30:27.0',
'2024-03-16 12:40:15.0',
'2024-03-16 12:43:10.0',
'2024-03-16 12:50:17.0',
'2024-03-16 16:13:11.0',
'2024-03-16 16:20:12.0',
'2024-03-16 16:30:00.0',
'2024-03-16 16:40:15.0',
'2024-03-16 16:43:10.0',
'2024-03-16 16:50:17.0',
'2024-03-16 17:20:25.0',
'2024-03-16 17:21:27.0',
'2024-03-16 17:30:27.0',
'2024-03-16 17:41:17.0',
'2024-03-17 12:01:17.0',
'2024-03-17 12:13:11.0',
'2024-03-17 12:20:12.0',
'2024-03-17 12:20:25.0',
'2024-03-17 12:21:27.0',
'2024-03-17 12:30:00.0',
'2024-03-17 12:30:27.0',
'2024-03-17 12:40:15.0',
'2024-03-17 12:43:10.0',
'2024-03-17 12:50:17.0',
'2024-03-17 16:13:11.0',
'2024-03-17 16:20:12.0',
'2024-03-17 16:30:00.0',
'2024-03-17 16:40:15.0',
'2024-03-17 16:43:10.0',
'2024-03-17 16:50:17.0',
'2024-03-17 17:20:25.0',
'2024-03-17 17:21:27.0',
'2024-03-17 17:30:27.0',
'2024-03-17 17:41:17.0',
'2024-03-18 12:01:17.0',
'2024-03-18 12:13:11.0',
'2024-03-18 12:20:12.0',
'2024-03-18 12:20:25.0',
'2024-03-18 12:21:27.0',
'2024-03-18 12:30:00.0',
'2024-03-18 12:30:27.0',
'2024-03-18 12:40:15.0',
'2024-03-18 12:43:10.0',
'2024-03-18 12:50:17.0',
'2024-03-18 16:13:11.0',
'2024-03-18 16:20:12.0',
'2024-03-18 16:30:00.0',
'2024-03-18 16:40:15.0',
'2024-03-18 16:43:10.0',
'2024-03-18 16:50:17.0',
'2024-03-18 17:20:25.0',
'2024-03-18 17:21:27.0',
'2024-03-18 17:30:27.0',
'2024-03-18 17:41:17.0',
'2024-03-19 12:01:17.0',
'2024-03-19 12:13:11.0',
'2024-03-19 12:20:12.0',
'2024-03-19 12:20:25.0',
'2024-03-19 12:21:27.0',
'2024-03-19 12:30:00.0',
'2024-03-19 12:30:27.0',
'2024-03-19 12:40:15.0',
'2024-03-19 12:43:10.0',
'2024-03-19 12:50:17.0',
'2024-03-19 16:13:11.0',
'2024-03-19 16:20:12.0',
'2024-03-19 16:30:00.0',
'2024-03-19 16:40:15.0',
'2024-03-19 16:43:10.0',
'2024-03-19 16:50:17.0',
'2024-03-19 17:20:25.0',
'2024-03-19 17:21:27.0',
'2024-03-19 17:30:27.0',
'2024-03-19 17:41:17.0',
],
crcX: 2,
};
this.$nextTick(() => {
this.setEchart(chartData);
});
let params = {
code: this.searchForm.code,
startDate: this.searchForm.queryDate[0],
endDate: this.searchForm.queryDate[1]
}
getRecorderHistoryLine(params).then(res =>{
console.log('res-----------',res)
let chartData = {
yArray:res.data.data.yarray,
crcX:res.data.data.x,
xData:res.data.data.xdata
}
this.$nextTick(() => {
this.setEchart(chartData);
});
})
// let chartData = {
// yArray: [
// {
// showName: '',
// yData: [
// 11.75, 1.0, 0.15, 1.9, 11.75, 0.15, 1.75, 1.9, 1.0, 1.75, 1.0, 0.15, 0.15, 1.9,
// 1.0, 1.75, 1.9, 11.75, 1.75, 11.75, 11.75, 1.0, 0.15, 1.9, 11.75, 0.15, 1.75, 1.9,
// 1.0, 1.75, 1.0, 0.15, 0.15, 1.9, 1.0, 1.75, 1.9, 11.75, 1.75, 11.75, 11.75, 1.0,
// 0.15, 1.9, 11.75, 0.15, 1.75, 1.9, 1.0, 1.75, 1.0, 0.15, 0.15, 1.9, 1.0, 1.75,
// 1.9, 11.75, 1.75, 11.75, 11.75, 1.0, 0.15, 1.9, 11.75, 0.15, 1.75, 1.9, 1.0, 1.75,
// 1.0, 0.15, 0.15, 1.9, 1.0, 1.75, 1.9, 11.75, 1.75, 11.75,
// ],
// crcY: 0.25,
// },
// {
// showName: '',
// yData: [
// 85.0, 500.0, 30.0, 500.0, 85.0, 30.0, 65.0, 500.0, 500.0, 65.0, 500.0, 30.0, 30.0,
// 500.0, 500.0, 65.0, 500.0, 85.0, 65.0, 85.0, 85.0, 500.0, 30.0, 500.0, 85.0, 30.0,
// 65.0, 500.0, 500.0, 65.0, 500.0, 30.0, 30.0, 500.0, 500.0, 65.0, 500.0, 85.0,
// 65.0, 85.0, 85.0, 500.0, 30.0, 500.0, 85.0, 30.0, 65.0, 500.0, 500.0, 65.0, 500.0,
// 30.0, 30.0, 500.0, 500.0, 65.0, 500.0, 85.0, 65.0, 85.0, 85.0, 500.0, 30.0, 500.0,
// 85.0, 30.0, 65.0, 500.0, 500.0, 65.0, 500.0, 30.0, 30.0, 500.0, 500.0, 65.0,
// 500.0, 85.0, 65.0, 85.0,
// ],
// crcY: 65.0,
// },
// {
// showName: '',
// yData: [
// 12.0, 7.8, 1.0, 7.5, 12.0, 1.0, 6.0, 7.5, 7.8, 6.0, 7.8, 1.0, 1.0, 7.5, 7.8, 6.0,
// 7.5, 12.0, 6.0, 12.0, 12.0, 7.8, 1.0, 7.5, 12.0, 1.0, 6.0, 7.5, 7.8, 6.0, 7.8,
// 1.0, 1.0, 7.5, 7.8, 6.0, 7.5, 12.0, 6.0, 12.0, 12.0, 7.8, 1.0, 7.5, 12.0, 1.0,
// 6.0, 7.5, 7.8, 6.0, 7.8, 1.0, 1.0, 7.5, 7.8, 6.0, 7.5, 12.0, 6.0, 12.0, 12.0, 7.8,
// 1.0, 7.5, 12.0, 1.0, 6.0, 7.5, 7.8, 6.0, 7.8, 1.0, 1.0, 7.5, 7.8, 6.0, 7.5, 12.0,
// 6.0, 12.0,
// ],
// crcY: 1.0,
// },
// {
// showName: '',
// yData: [
// 1.875, 0.875, 0.101, 0.375, 1.875, 0.101, 0.875, 0.375, 0.875, 0.875, 0.875,
// 0.101, 0.101, 0.375, 0.875, 0.875, 0.375, 1.875, 0.875, 1.875, 1.875, 0.875,
// 0.101, 0.375, 1.875, 0.101, 0.875, 0.375, 0.875, 0.875, 0.875, 0.101, 0.101,
// 0.375, 0.875, 0.875, 0.375, 1.875, 0.875, 1.875, 1.875, 0.875, 0.101, 0.375,
// 1.875, 0.101, 0.875, 0.375, 0.875, 0.875, 0.875, 0.101, 0.101, 0.375, 0.875,
// 0.875, 0.375, 1.875, 0.875, 1.875, 1.875, 0.875, 0.101, 0.375, 1.875, 0.101,
// 0.875, 0.375, 0.875, 0.875, 0.875, 0.101, 0.101, 0.375, 0.875, 0.875, 0.375,
// 1.875, 0.875, 1.875,
// ],
// crcY: 0.125,
// },
// ],
// xData: [
// '2024-03-16 12:01:17.0',
// '2024-03-16 12:13:11.0',
// '2024-03-16 12:20:12.0',
// '2024-03-16 12:20:25.0',
// '2024-03-16 12:21:27.0',
// '2024-03-16 12:30:00.0',
// '2024-03-16 12:30:27.0',
// '2024-03-16 12:40:15.0',
// '2024-03-16 12:43:10.0',
// '2024-03-16 12:50:17.0',
// '2024-03-16 16:13:11.0',
// '2024-03-16 16:20:12.0',
// '2024-03-16 16:30:00.0',
// '2024-03-16 16:40:15.0',
// '2024-03-16 16:43:10.0',
// '2024-03-16 16:50:17.0',
// '2024-03-16 17:20:25.0',
// '2024-03-16 17:21:27.0',
// '2024-03-16 17:30:27.0',
// '2024-03-16 17:41:17.0',
// '2024-03-17 12:01:17.0',
// '2024-03-17 12:13:11.0',
// '2024-03-17 12:20:12.0',
// '2024-03-17 12:20:25.0',
// '2024-03-17 12:21:27.0',
// '2024-03-17 12:30:00.0',
// '2024-03-17 12:30:27.0',
// '2024-03-17 12:40:15.0',
// '2024-03-17 12:43:10.0',
// '2024-03-17 12:50:17.0',
// '2024-03-17 16:13:11.0',
// '2024-03-17 16:20:12.0',
// '2024-03-17 16:30:00.0',
// '2024-03-17 16:40:15.0',
// '2024-03-17 16:43:10.0',
// '2024-03-17 16:50:17.0',
// '2024-03-17 17:20:25.0',
// '2024-03-17 17:21:27.0',
// '2024-03-17 17:30:27.0',
// '2024-03-17 17:41:17.0',
// '2024-03-18 12:01:17.0',
// '2024-03-18 12:13:11.0',
// '2024-03-18 12:20:12.0',
// '2024-03-18 12:20:25.0',
// '2024-03-18 12:21:27.0',
// '2024-03-18 12:30:00.0',
// '2024-03-18 12:30:27.0',
// '2024-03-18 12:40:15.0',
// '2024-03-18 12:43:10.0',
// '2024-03-18 12:50:17.0',
// '2024-03-18 16:13:11.0',
// '2024-03-18 16:20:12.0',
// '2024-03-18 16:30:00.0',
// '2024-03-18 16:40:15.0',
// '2024-03-18 16:43:10.0',
// '2024-03-18 16:50:17.0',
// '2024-03-18 17:20:25.0',
// '2024-03-18 17:21:27.0',
// '2024-03-18 17:30:27.0',
// '2024-03-18 17:41:17.0',
// '2024-03-19 12:01:17.0',
// '2024-03-19 12:13:11.0',
// '2024-03-19 12:20:12.0',
// '2024-03-19 12:20:25.0',
// '2024-03-19 12:21:27.0',
// '2024-03-19 12:30:00.0',
// '2024-03-19 12:30:27.0',
// '2024-03-19 12:40:15.0',
// '2024-03-19 12:43:10.0',
// '2024-03-19 12:50:17.0',
// '2024-03-19 16:13:11.0',
// '2024-03-19 16:20:12.0',
// '2024-03-19 16:30:00.0',
// '2024-03-19 16:40:15.0',
// '2024-03-19 16:43:10.0',
// '2024-03-19 16:50:17.0',
// '2024-03-19 17:20:25.0',
// '2024-03-19 17:21:27.0',
// '2024-03-19 17:30:27.0',
// '2024-03-19 17:41:17.0',
// ],
// crcX: 2,
// };
// this.$nextTick(() => {
// this.setEchart(chartData);
// });
}
});
},
@ -770,7 +799,11 @@ export default {
this.selectLoading = false
})
} else {
this.codeArr = []
getRecorderList({ crtCode: '' }).then(res =>{
this.codeArr = res.data.data.records
this.selectLoading = false
})
// this.codeArr = []
}
},
searchReset(){
@ -831,13 +864,18 @@ export default {
},
// tab
tabPositionChange(val) {
console.log('val----------------',val);
console.log('tabPosition----------------',this.tabPosition);
this.option.column = recorderColumnData[val];
if (this.tabPosition == 'recorderLineSetting') {
this.option.addBtn = false;
this.option.menuAlign = "center"
this.option.menuWidth = 70
this.option.selection = true
this.getRecorderLine()
} else if (this.tabPosition == 'recorder') {
this.option.addBtn = true
this.option.menuWidth = 150
this.option.selection = false
this.getRecorder();
}
@ -861,6 +899,8 @@ export default {
done()
this.getRecorder()
}
}).catch(err =>{
done()
})
}
},
@ -881,11 +921,14 @@ export default {
}
},
beforeOpen(done, type){
console.log('type=============',type)
if (['edit', 'view'].includes(type)) {
getRecorderDetail({ id: this.form.id }).then(res => {
this.form = res.data.data;
done()
});
}else if(['add'].includes(type)){
done()
}
},
remove() {
@ -967,6 +1010,7 @@ export default {
if (this.tabPosition == 'recorder') {
this.$refs.crud.rowEdit(row, index);
} else if (this.tabPosition == 'recorderLineSetting') {
this.lineForm.settingData = []
this.addType = 'edit';
getRecorderLineSettingDetail({
id:row.id
@ -974,12 +1018,16 @@ export default {
console.log('res00000000000000000',res)
res.data.data.showGraph = res.data.data.showGraph == 1 ? true : false
this.lineForm.settingData[0] = res.data.data
this.addDialog = true;
setTimeout(() =>{
this.addDialog = true;
},100)
})
}
},
showDetail(row) {
this.loadData();
// this.detailId = row.id;
this.detailId = row.crtCode;
this.loadData(row);
// getRecorderDetail({id:row.id}).then(res =>{
// console.log('res----------------',res)
// })
@ -1035,15 +1083,26 @@ export default {
}
});
},
loadData() {
this.detailData = [
{ recorder: '1302022', recordDate: '2025-07-26 16:04:43' },
{ recorder: '1302022', recordDate: '2025-07-26 16:04:43' },
{ recorder: '1302022', recordDate: '2025-07-26 16:04:43' },
{ recorder: '1302022', recordDate: '2025-07-26 16:04:43' },
];
this.detailPage.total = this.detailData.length;
this.detailDialog = true;
loadData(row) {
getRecorderHistoryDetail({
// id:this.detailId,
recorder:this.detailId,
current:this.detailPage.currentPage,
size:this.detailPage.pageSize
}).then(res =>{
console.log('res',res)
this.detailData = res.data.data.records
this.detailPage.total = res.data.data.total
this.detailDialog = true;
})
},
detailCurrentChange(currentPage){
this.detailPage.currentPage = currentPage
this.loadData()
},
detailSizeChange(pageSize){
this.detailPage.pageSize = pageSize
this.loadData()
},
onLoad() {
this.data = [
@ -1057,4 +1116,10 @@ export default {
};
</script>
<style></style>
<style lang="scss">
.detail-crud-option{
.avue-crud__header{
min-height: 0;
}
}
</style>

@ -104,8 +104,8 @@ export default {
},
],
dicData: [
{ label: '', value: false },
{ label: '', value: true }
{ label: '', value: '1' },
{ label: '', value: '0' },
],
},
{

@ -9,22 +9,25 @@
<!-- <el-button type="warning" @click="handleAdd" plain>待申请</el-button>
<el-button type="success" @click="handleAdd" plain>已申请</el-button> -->
</template>
<template #goodsName="{ row }">{{ row.stRealtimeStock.coGoods.goodsName }}</template>
<!-- <template #goodsName="{ row }">{{ row.stRealtimeStock.coGoods.goodsName }}</template>
<template #specifications="{ row }">{{ row.stRealtimeStock.coGoods.specifications }}</template>
<template #piNo="{ row }">{{ row.stRealtimeStock.piNo }}</template>
<template #shName="{ row }">{{ row.stRealtimeStock.coStorehouse.shName }}</template>
<template #location="{ row }">{{ row.stRealtimeStock.storageLocation.location }}</template>
<template #quantity="{ row }">{{ row.stRealtimeStock.quantity }}</template>
<template #quantity="{ row }">{{ row.stRealtimeStock.quantity }}</template> -->
<template #menu-left>
<el-button type="primary" @click="handleAdd">新增</el-button>
<el-button type="primary" @click="handleAdd">保养申请</el-button>
<el-button type="primary" @click="addApply">保养申请</el-button>
</template>
</avue-crud>
<el-dialog v-model="addDialog" append-to-body width="80%" title="新增">
<div style="display: flex;justify-content: flex-end;margin-bottom: 10px;">
<el-button type="primary">加入保养</el-button>
<el-button type="primary" @click="addMaintain">加入保养</el-button>
</div>
<el-table :data="addData">
<avue-crud class="addOption-box" :option="addOption" :table-loading="loading" :data="addData" v-model="form" v-model:page="addPage" ref="addCrud"
@selection-change="addSelectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange"></avue-crud>
<!-- <el-table :data="addData">
<el-table-column type="selection"></el-table-column>
<el-table-column label="物料名称" align="center" prop="coGoods.goodsName"></el-table-column>
<el-table-column label="物料规格" align="center" prop="coGoods.specifications"></el-table-column>
@ -35,12 +38,13 @@
<el-table-column label="等级" align="center" prop="quantityLevel"></el-table-column>
<el-table-column label="金额" align="center" prop="balanceMoney"></el-table-column>
<el-table-column label="累计使用次数" align="center" prop="sumNum"></el-table-column>
</el-table>
</el-table> -->
</el-dialog>
</basic-container>
</template>
<script>
import {getRecorderList,addRecorderList,addRecorder,applyRecorder} from "@/api/equiptManagement/maintenancetools"
export default {
data() {
return {
@ -49,6 +53,14 @@ export default {
loading: false,
data: [],
form: {},
query:{},
selectionList:[],
addSelectionList:[],
addPage:{
pageSize: 10,
currentPage: 1,
total: 0,
},
page: {
pageSize: 10,
currentPage: 1,
@ -145,6 +157,7 @@ export default {
span: 24,
overflow: true,
search: true,
width:150,
searchLabelWidth:100,
rules: [
{
@ -199,7 +212,7 @@ export default {
},
{
label: '等级',
prop: 'quantity',
prop: 'quantityLevel',
span: 24,
overflow: true,
search: false,
@ -213,7 +226,7 @@ export default {
},
{
label: '金额',
prop: 'quantity',
prop: 'balanceMoney',
span: 24,
overflow: true,
search: false,
@ -227,7 +240,7 @@ export default {
},
{
label: '累计使用次数',
prop: 'quantity',
prop: 'sumNum',
span: 24,
overflow: true,
search: false,
@ -241,7 +254,7 @@ export default {
},
{
label: '当前状态',
prop: 'quantity',
prop: 'status',
type: 'select',
span: 24,
labelWidth: 140,
@ -254,12 +267,188 @@ export default {
trigger: 'blur',
},
],
// 0 1
dicData: [
{ label: "待申请", value: '1' },
{ label: "已申请", value: '2' },
{ label: "新建", value: 0 },
{ label: "已申请", value: 1 },
]
},
]
},
addOption: {
columnSort: true,
tip: false,
refreshBtn:false,
height: 'auto',
align: 'center',
calcHeight: 32,
simplePage: false,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: false,
selection: true,
viewBtn: false,
delBtn: false,
columnBtn:false,
editBtn: false,
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
addBtn: false,
labelWidth: 120,
menu: false,
menuWidth: 200,
dialogWidth: 600,
dialogClickModal: false,
searchEnter: true,
excelBtn: false,
gridBtn: false,
searchShowBtn: false,
showOverflowTooltip: true,
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
column: [
{
label: '物料名称',
prop: 'goodsName',
span: 24,
labelWidth: 140,
overflow: true,
search: false,
rules: [
{
required: true,
message: '请输入物料名称',
trigger: 'blur',
},
],
},
{
label: '物料规格',
prop: 'specifications',
span: 24,
labelWidth: 140,
overflow: true,
search: false,
rules: [
{
required: true,
message: '请输入物料规格',
trigger: 'blur',
},
],
},
{
label: '生产批次号',
prop: 'piNo',
span: 24,
overflow: true,
search: false,
width:150,
searchLabelWidth:100,
rules: [
{
required: true,
message: '请输入生产批次号',
trigger: 'blur',
},
],
},
{
label: '仓库',
prop: 'shName',
span: 24,
overflow: true,
search: false,
searchLabelWidth:60,
rules: [
{
required: true,
message: '请输入仓库',
trigger: 'blur',
},
],
},
{
label: '库位号',
prop: 'location',
span: 24,
overflow: true,
search: false,
rules: [
{
required: true,
message: '请输入库位号',
trigger: 'blur',
},
],
},
{
label: '库存数量',
prop: 'quantity',
span: 24,
overflow: true,
search: false,
rules: [
{
required: true,
message: '请输入库存数量',
trigger: 'blur',
},
],
},
{
label: '等级',
prop: 'quantityLevel',
span: 24,
overflow: true,
search: false,
rules: [
{
required: true,
message: '请输入等级',
trigger: 'blur',
},
],
},
{
label: '金额',
prop: 'balanceMoney',
span: 24,
overflow: true,
search: false,
rules: [
{
required: true,
message: '请输入金额',
trigger: 'blur',
},
],
},
{
label: '累计使用次数',
prop: 'sumNum',
span: 24,
overflow: true,
search: false,
rules: [
{
required: true,
message: '请输入累计使用次数',
trigger: 'blur',
},
],
},
]
}
}
},
@ -268,14 +457,84 @@ export default {
},
methods: {
handleAdd() {
this.addDialog = true
addRecorderList().then(res =>{
console.log('res-----------',res)
this.addData = res.data.data.records
this.addPage.total = res.data.data.total
this.addDialog = true
})
},
addApply(){
if(this.selectionList.length == 0){
this.$message.error('请至少选择一条数据')
return
}
this.$confirm('确定进行保养申请吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
applyRecorder({
ids:this.selectionList.map(item => item.id).join(',')
}).then(res =>{
if(res.data.code == 200){
this.$message.success('申请成功')
this.onLoad()
}
})
})
},
selectionChange(list){
this.selectionList = list
},
addSelectionChange(list){
this.addSelectionList = list
},
addMaintain(){
if(this.addSelectionList.length == 0){
this.$message.error('请至少选择一条数据')
return
}
addRecorder({
ids:this.addSelectionList.map(item => item.id).join(',')
}).then(res =>{
if(res.data.code == 200){
this.$message.success('新增成功')
this.addDialog = false
this.onLoad()
}
})
},
searchChange(params, done){
this.page.currentPage = 1
this.query = params
this.onLoad()
done()
},
searchReset(){
this.query = {}
this.onLoad()
},
onLoad() {
this.data = []
this.page.total = this.data.length
this.loading = true
getRecorderList({
current:this.page.currentPage,
size:this.page.pageSize,
...this.query
}).then(res =>{
this.data = res.data.data.records
this.page.total = res.data.data.total
this.loading = false
})
}
}
}
</script>
<style></style>
<style lang="scss">
.addOption-box{
.avue-crud__header{
min-height: 0;
}
}
</style>
Loading…
Cancel
Save