Compare commits

..

No commits in common. "7c8c584837c1af2baa323cd51c1e44268772928a" and "f8d033c97afc4804f827c004ea6541bebbd81deb" have entirely different histories.

24 changed files with 170 additions and 289 deletions

View File

@ -1,7 +1,7 @@
###
# @Author: Do not edit
# @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-02-29 15:53:50
# @LastEditTime: 2024-02-26 08:45:43
# @LastEditors: DY
# @Description:
###
@ -20,10 +20,10 @@ VUE_APP_TITLE = MES系统
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# VUE_APP_BASE_API = 'http://192.168.1.47:48082'
VUE_APP_BASE_API = 'http://192.168.1.47:48082'
# socket地址
VUE_APP_Socket_API = 'ws://192.168.0.30:8888'
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'

View File

@ -153,12 +153,3 @@ export function createConCoreWOr(data) {
data: data
})
}
// 修改分配产量
export function updateConCoreWOr(data) {
return request({
url: '/base/core-order-con-work-order/update',
method: 'put',
data: data
})
}

View File

@ -1,7 +1,7 @@
/*
* @Author: Do not edit
* @Date: 2023-11-08 15:56:52
* @LastEditTime: 2024-02-28 18:16:56
* @LastEditTime: 2024-02-26 09:29:53
* @LastEditors: DY
* @Description:
*/
@ -52,17 +52,6 @@ export function exportCheckLogExcel(query) {
})
}
// 导出设备巡检单记录
export function exportCheckOrderExcel(query) {
return request({
url: '/base/equipment-check-order/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 根据设备获得所有巡检配置列表
export function getcheckConfigByEqList(query) {
return request({

View File

@ -83,14 +83,20 @@
<el-col :span="12">
<el-form-item
label="工段排序"
prop="sort">
<el-input-number
prop="sort"
:rules="[
{
type: 'number',
trigger: 'change',
message: '请输入正确的数字类型',
transform: (val) => Number(val),
},
]">
<el-input
v-model="dataForm.sort"
clearable
controls-position="right"
@change="$emit('update', dataForm)"
placeholder="请输入工段排序"
style="width: 100%" />
placeholder="请输入工段排序" />
</el-form-item>
</el-col>
</el-row>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-29 15:01:25
* @LastEditTime: 2024-02-27 15:38:04
* @Description:
-->
<template>
@ -325,7 +325,7 @@ export default {
init(row, isdetail) {
this.initData();
this.isdetail = isdetail || false;
this.dataForm.id = row?.id || undefined;
this.dataForm.id = row.id || undefined;
this.isedit = row?.id && row?.externalCode ? true : false;
console.log('你好', this.isedit)
this.visible = true;

View File

@ -253,9 +253,7 @@ export default {
if (this.dataForm.priority !== undefined) {
this.dataForm.priority = String(this.dataForm.priority)
}
if (this.dataForm.roomNameDict !== undefined) {
this.dataForm.roomNameDict = String(this.dataForm.roomNameDict)
}
this.dataForm.priority
});
} else {
if (this.urlOptions.isGetCode) {

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-29 10:01:52
* @LastEditTime: 2023-11-16 09:14:35
* @Description:
-->
<template>
@ -41,12 +41,12 @@
<el-table-column prop="priority" label="优先级" />
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
<template slot-scope="scope">
<el-input v-model="scope.row.planAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
<el-input v-model="scope.row.planAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input>
</template>
</el-table-column>
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
<template slot-scope="scope">
<el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
<el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input>
</template>
</el-table-column>
<el-table-column label="操作">
@ -104,7 +104,7 @@
<script>
import basicAdd from '../../core/mixins/basic-add';
import { getConOrderList, updateConCoreWOr, getCoreWO } from '@/api/base/coreWorkOrder';
import { getConOrderList, createConCoreWOr, getCoreWO } from '@/api/base/coreWorkOrder';
import SmallTitle from '../material/SmallTitle';
// import { parseTime } from '../../core/mixins/code-filter';
// import attrAdd from './attr-add';
@ -159,8 +159,8 @@ export default {
// });
// return;
}
//
updateConCoreWOr({
//
createConCoreWOr({
...row,
workOrderId: this.dataForm.id
}).then((response) => {
@ -173,17 +173,16 @@ export default {
}
},
getList() {
//
// Bom
getConOrderList({
...this.listQuery,
workOrderId: this.dataForm.id
}).then((response) => {
this.tableData = response.data.map(item => {
item.isEdit = false
item.isallocation = item.actualAssignmentQuantity ? true : false
return item
});
this.listQuery.total = response.data.length;
this.listQuery.total = response.data.total;
});
},
//

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-29 15:35:02
* @LastEditTime: 2023-12-26 16:59:25
* @Description:
-->
<template>
@ -45,7 +45,7 @@
</el-col>
<el-col :span="3">
<div class="blodTip">工单来源</div>
<div class="lightTip">{{ dataForm.triggerOrigin === 1 ? 'MES-手动' : dataForm.triggerOrigin === 2 ? 'MES-订单下发' : 'ERP'}}</div>
<div class="lightTip">{{ dataForm.triggerOrigin === 1 ? 'MES' : dataForm.triggerOrigin === 2 ? 'ERP' : ''}}</div>
</el-col>
<el-col :span="3">
<div class="blodTip">所属订单</div>
@ -218,7 +218,7 @@
<script>
// import basicAdd from '../../core/mixins/basic-add';
import { getCoreWO, getCoreWOMaPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
import { getCoreWO, getMaterialBomPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
// import { orderList } from "@/api/base/orderManage";
import { getProcessFlowList } from '@/api/base/orderManage'
import SmallTitle from './SmallTitle';
@ -261,9 +261,8 @@ const tableProps = [
const tableProps1 = [
{
prop: 'material',
label: '物料名称',
filter: publicFormatter('material')
prop: 'materialName',
label: '物料名称'
},
{
prop: 'unit',
@ -271,7 +270,7 @@ const tableProps1 = [
filter: publicFormatter('unit_dict')
},
{
prop: 'remaining',
prop: 'num',
label: '剩余生产预计消耗'
},
];
@ -432,17 +431,11 @@ export default {
// this.listQuery.total = response.data.total;
});
// 使
console.log()
if (this.dataForm.id) {
getCoreWOMaPage({
workOrderId: this.dataForm.id,
pageNo: 1,
pageSize: 100
if (this.dataForm.planProductId) {
getMaterialBomPage({
productId: this.dataForm.planProductId,
}).then((response) => {
this.materialList = response.data.records.map((item) => {
item.remaining = item?.num * this.dataForm.remainingQuantity || 0
return item
});
this.materialList = response.data;
// this.listQuery.total = response.data.length;
});
}

View File

@ -197,7 +197,17 @@ export default {
{
name: 'status',
type: 'equal',
value: 1
value: 2
},
{
name: 'status',
type: 'equal',
value: 3
},
{
name: 'status',
type: 'equal',
value: 4
}
]
}
@ -231,11 +241,6 @@ export default {
name: 'status',
type: 'equal',
value: 2
},
{
name: 'status',
type: 'equal',
value: 3
}
]
}
@ -261,23 +266,23 @@ export default {
]
}
}
: undefined,
this.$auth.hasPermi(`base:core-work-order:delete`)
? {
type: 'delete',
btnName: '删除',
showParam: {
type: '|',
data: [
{
name: 'status',
type: 'equal',
value: 1
}
]
}
}
: undefined
// this.$auth.hasPermi(`base:core-work-order:delete`)
// ? {
// type: 'delete',
// btnName: '',
// showParam: {
// type: '|',
// data: [
// {
// name: 'status',
// type: 'equal',
// value: 1
// }
// ]
// }
// }
// : undefined
].filter((v)=>v),
tableData: [],
formConfig: [

View File

@ -233,6 +233,10 @@ export default {
//
emitButtonClick1() {
let n = this.tableData1.length
if (n >=3) {
this.$modal.msgWarning('最多可添加3档计价')
return false
}
let obj = {}
obj.startTime = n === 0 ? '' : this.tableData1[n-1].endTime
obj.endTime = ''
@ -241,6 +245,10 @@ export default {
},
emitButtonClick2() {
let n = this.tableData2.length
// if (n >=3) {
// this.$modal.msgWarning('3')
// return false
// }
let obj = {}
obj.startUsed = n === 0 ? 0 : this.tableData2[n-1].endUsed
obj.endUsed = 0

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-29 14:59:28
* @LastEditTime: 2024-02-28 16:05:10
* @Description:
-->
<template>
@ -57,8 +57,8 @@
<el-option
v-for="d in groupOptions"
:key="d.id"
:label="d.label"
:value="d.label" />
:label="d.name"
:value="d.id" />
</el-select>
</el-form-item>
</el-col>
@ -72,8 +72,7 @@
multiple
clearable
:disabled="isdetail"
filterable
style="width: 100%">
filterable>
<el-option
v-for="opt in inspectorOptions"
:key="opt.value"
@ -166,7 +165,6 @@ import attrAdd from './attr-add';
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
import { getDictDataLabel } from '@/utils/dict';
const tableBtn = [
{
@ -247,8 +245,8 @@ export default {
id: undefined,
name: '',
departmentId: undefined,
groupClass: [],
checkPerson: [],
groupClass: undefined,
checkPerson: undefined,
planCheckTime: undefined
},
detList: [],
@ -272,10 +270,7 @@ export default {
async getDict() {
//
const res = await groupClassesListAll();
this.groupOptions = res.data.map((item) => {
item.label = item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict)
return item
}) || [];
this.groupOptions = res.data || [];
//
const res1 = await getCoreDepartmentList();
this.departmentOptions = res1.data || []
@ -322,7 +317,6 @@ export default {
initData() {
this.detList.splice(0);
this.listQuery.total = 0;
this.isshowConfirm = false;
},
handleClick(raw) {
if (raw.type === 'delete') {
@ -382,16 +376,6 @@ export default {
//
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data
if (this.dataForm.groupClass && this.dataForm.groupClass !== ''){
this.dataForm.groupClass = response.data?.groupClass.split(',')
} else {
this.dataForm.groupClass = []
}
if (this.dataForm.checkPerson && this.dataForm.checkPerson !== '') {
this.dataForm.checkPerson = response.data?.checkPerson.split(',')
} else {
this.dataForm.checkPerson = []
}
});
//
this.getList();

View File

@ -63,7 +63,7 @@ import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import addRecord from './addRecord.vue';
import AddContent from './addContent.vue';
import { exportCheckOrderExcel, deleteEqCheckLog } from '@/api/equipment/base/inspection/record'
import { exportCheckLogExcel, deleteEqCheckLog } from '@/api/equipment/base/inspection/record'
import { parseTime } from '../../../../core/mixins/code-filter';
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
@ -130,25 +130,19 @@ export default {
// { prop: 'responsible', label: '' },
],
searchBarFormConfig: [
// {
// type: 'select',
// label: '',
// placeholder: '',
// param: 'name',
// filterable: true
// },
{
type: 'input',
type: 'select',
label: '巡检单名称',
placeholder: '请输入巡检单',
param: 'name'
placeholder: '请选择巡检单',
param: 'name',
filterable: true
},
//
{
type: 'datePicker',
label: '巡检时间',
dateType: 'datetimerange', // datetimerange
format: 'yyyy-MM-dd HH:mm:ss',
dateType: 'daterange', // datetimerange
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始日期',
@ -263,12 +257,7 @@ export default {
};
},
created() {
let end = moment().format('YYYY-MM-DD 08:00:00')
const current = new Date()
let start = parseTime(new Date(current.getFullYear(), current.getMonth(), current.getDate() - 3, 8, 0, 0))
this.searchBarFormConfig[1].defaultSelect = [start, end]
this.queryParams.actualCheckTime = [start, end]
// this.initSearchBar();
this.initSearchBar();
this.getList();
},
methods: {
@ -283,23 +272,22 @@ export default {
break;
}
},
// initSearchBar() {
// this.http('/base/equipment-check-order/page', 'get', {
// special: false,
// pageNo: 1,
// pageSize: 99,
// status: 2
// }).then(({ data }) => {
// this.$set(
// this.searchBarFormConfig[0],
// 'selectOptions',
// (data?.list || []).map((item) => ({
// name: item.name,
// id: item.id,
// }))
// );
// });
// },
initSearchBar() {
this.http('/base/core-equipment/page', 'get', {
special: false,
pageNo: 1,
pageSize: 99,
}).then(({ data }) => {
this.$set(
this.searchBarFormConfig[0],
'selectOptions',
(data?.list || []).map((item) => ({
name: item.name,
id: item.id,
}))
);
});
},
/** 查询列表 */
getList() {
this.loading = true;
@ -431,7 +419,7 @@ export default {
.confirm('是否确认导出所有设备巡检记录?')
.then(() => {
this.exportLoading = true;
return exportCheckOrderExcel(params);
return exportCheckLogExcel(params);
})
.then((response) => {
this.$download.excel(response, '设备巡检记录.xls');

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-29 14:58:37
* @LastEditTime: 2024-02-24 20:50:51
* @Description:
-->
<template>
@ -53,7 +53,6 @@
type="datetime"
:placeholder="`请选择计划巡检时间`"
value-format="timestamp"
:default-time="'8:00:00'"
style="width: 100%" />
</el-form-item>
</el-col>
@ -78,8 +77,8 @@
<el-option
v-for="d in groupOptions"
:key="d.id"
:label="d.label"
:value="d.label" />
:label="d.name"
:value="d.id" />
</el-select>
</el-form-item>
</el-col>
@ -99,7 +98,6 @@ import basicAdd from '../../../../core/mixins/basic-add';
import { getCheckOrder, getOrderCode, createCheckOrder, updateCheckOrder } from "@/api/equipment/base/inspection/settings";
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
import { getDictDataLabel } from '@/utils/dict';
// import { getEquipmentAll } from '@/api/base/equipment'
export default {
@ -141,48 +139,16 @@ export default {
}
};
},
created() {
const currenttime = new Date()
this.dataForm.planCheckTime = new Date(currenttime.getFullYear(), currenttime.getMonth(), currenttime.getDate(), 8, 0, 0).getTime()
console.log('11', this.dataForm.planCheckTime, currenttime)
},
mounted() {
this.getDict()
},
methods: {
init(id) {
this.dataForm.id = id || "";
this.visible = true;
if (this.urlOptions.getOption) {
this.getArr()
}
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data
if (response.data.groupClass === '') {
this.dataForm.groupClass = []
} else {
this.dataForm.groupClass = response.data?.groupClass.split(',') || undefined
}
});
} else {
if (this.urlOptions.isGetCode) {
this.getCode()
}
}
});
},
async getDict() {
//
const res = await getCoreDepartmentList();
this.departmentOptions = res.data || [];
const res1 = await groupClassesListAll();
this.groupOptions = res1.data.map((item) => {
item.label = item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict)
return item
}) || [];
this.groupOptions = res1.data || [];
// const res = await getEquipmentAll()
// this.eqList = res.data
},

View File

@ -97,11 +97,11 @@ export default {
{ prop: 'name', label: '巡检单名称', width: 110, showOverflowtooltip: true },
{ prop: 'code', label: '巡检单编码', minWidth: 150, showOverflowtooltip: true },
{ prop: 'department', label: '部门', showOverflowtooltip: true },
{ prop: 'planCheckTime', label: '计划巡检时间', width: 150, filter: parseTime },
{ prop: 'planCheckTime', label: '计划巡检时间', filter: parseTime },
{ prop: 'confirmTimeLimit', label: '确认时限', showOverflowtooltip: true },
{ prop: 'groupClass', label: '班次', showOverflowtooltip: true },
{ prop: 'creator', label: '创建人', showOverflowtooltip: true },
{ prop: 'createTime', label: '创建时间', width: 150, filter: parseTime },
{ prop: 'checkPerson', label: '创建人', minWidth: 150, showOverflowtooltip: true },
{ prop: 'createTime', label: '创建时间', filter: parseTime },
// { prop: 'responsible', label: '' },
{ prop: 'remark', label: '备注' } // TODO:
],
@ -195,20 +195,17 @@ export default {
pageSize: 10,
equipmentId: null,
name: null,
special: false,
status: 0
special: false
},
//
form: {},
basePath: '/base/equipment-check-order',
mode: null,
groupList: []
};
},
created() {
this.initSearchBar();
this.getList();
this.getGroup();
},
methods: {
handleConfirm() {
@ -230,11 +227,6 @@ export default {
);
});
},
getGroup() {
groupClassesListAll().then(res => {
this.groupList = res.data || []
})
},
/** 查询列表 */
getList() {
this.loading = true;

View File

@ -15,10 +15,10 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="设备保养单号"
label="保养计划单号"
prop="maintainOrderNumber"
:rules="[
{ required: true, message: '请输入设备保养单号', trigger: 'blur' },
{ required: true, message: '请输入保养计划单号', trigger: 'blur' },
]">
<el-input
v-model="form.maintainOrderNumber"
@ -227,6 +227,11 @@ export default {
return {
form: {},
formLoading: true,
equipmentTypeOptions: [
{ label: '安全设备', value: 1 },
{ label: '消防设备', value: 2 },
{ label: '特种设备', value: 3 },
],
lineList: [],
maintainerList: [],
departmentList: [],
@ -263,7 +268,7 @@ export default {
},
},
mounted() {
// !this.edit && this.getCode('/base/equipment-maintain-log/getCode');
// !this.edit && this.getCode('/base/equipment-maintain-plan/getCode');
this.getList('maintainer');
this.getList('department');
this.getList('line');
@ -304,7 +309,7 @@ export default {
this.formLoading = true;
const response = await this.$axios(url);
this.formLoading = false;
this.form.maintainOrderNumber = response.data || '';
this.form.code = response.data || '';
},
// initialize
async getEquipmentList() {

View File

@ -420,19 +420,11 @@ export default {
},
},
mounted() {
!this.edit && this.getCode('/base/equipment-maintain-plan/getCode');
this.getList('maintainer');
this.getList('department');
this.getList('line');
},
methods: {
// getCode
async getCode(url) {
this.formLoading = true;
const response = await this.$axios(url);
this.formLoading = false;
this.form.maintainOrderNumber = response.data || '';
},
handleSearchBarBtnClick(btn) {
console.log('btn', btn);
switch (btn.btnName) {

View File

@ -47,7 +47,6 @@
<add-content
v-if="addContent"
ref="addContent"
:plan="true"
@refreshDataList="addContent = false" />
</div>
</template>
@ -142,7 +141,7 @@ export default {
label: '上次实际保养时间',
filter: parseTime,
},
{ prop: 'nextPlanMaintainTime', label: '下次计划保养时间', filter: parseTime },
{ prop: 'nextMaintainTime', label: '下次计划保养时间', filter: parseTime },
{ prop: 'maintainer', label: '计划保养人员' },
// { prop: 'equipmentName', label: '' },
// { prop: 'equipmentCode', label: '' },
@ -220,13 +219,13 @@ export default {
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal
.confirm('是否确认导出所有设备保养计划数据项?')
.confirm('是否确认导出所有设备保养监控数据项?')
.then(() => {
this.exportLoading = true;
return exportMaintainMonitorExcel(params);
})
.then((response) => {
this.$download.excel(response, '设备保养计划.xls');
this.$download.excel(response, '设备保养监控.xls');
this.exportLoading = false;
})
.catch(() => { });

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-28 19:52:13
* @LastEditTime: 2024-02-27 10:33:31
* @Description:
-->
<template>
@ -22,6 +22,7 @@
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="100px"
label-position="top">
<el-row :gutter="20">
<el-col :span="8">
@ -61,19 +62,19 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="保养频率(天/次)" prop="maintenancePeriod">
<el-form-item label="保养频率" prop="maintenancePeriod">
<el-input-number v-model="dataForm.maintenancePeriod" :min="0" controls-position="right" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入保养频率" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="确认时限(h)" prop="confirmTimeLimit">
<el-form-item label="确认时限" prop="confirmTimeLimit">
<el-input-number v-model="dataForm.confirmTimeLimit" :min="0" controls-position="right" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="保养时长(h)" prop="maintainDuration">
<el-form-item label="保养时长" prop="maintainDuration">
<el-input-number v-model="dataForm.maintainDuration" :min="0" controls-position="right" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入保养时长" />
</el-form-item>
</el-col>
@ -219,12 +220,6 @@ export default {
//
this.urlOptions.infoURL({ id: this.dataForm.id }).then(response => {
this.dataForm = response.data
if (response.data?.maintainer) {
this.dataForm.maintainer = response.data?.maintainer.split(',') || undefined
} else {
this.$set(this.dataForm, 'maintainer', undefined)
this.dataForm.maintainer = undefined
}
});
//
// this.getList();

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-28 19:37:19
* @LastEditTime: 2024-02-23 19:48:12
* @Description:
-->
<template>
@ -13,7 +13,7 @@
class="drawer"
size="60%">
<small-title slot="title" :no-padding="true">
{{ plan ? '详情' : '添加内容' }}
{{ '添加内容' }}
</small-title>
<div class="content">
<div class="visual-part">
@ -62,7 +62,7 @@
</template>
</div>
<base-table
:table-props="plan ? tableProps1 : tableProps"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="planList">
@ -85,7 +85,7 @@
<div v-if="!isdetail" class="drawer-body__footer">
<el-button style="" @click="goback()">取消</el-button>
<el-button type="primary" @click="goback()">确定</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</div>
</div>
@ -128,35 +128,13 @@ const tableProps = [
},
];
const tableProps1 = [
{
prop: 'equipmentName',
label: '设备名称',
},
{
prop: 'program',
label: '保养项目',
},
{
prop: 'maintenanceDes',
label: '保养描述',
},
];
export default {
mixins: [basicAdd],
components: { SmallTitle, attrAdd },
props: {
plan: {
type: Boolean,
default: false
}
},
data() {
return {
tableBtn,
tableProps,
tableProps1,
addOrUpdateVisible: false,
urlOptions: {
isGetCode: false,

View File

@ -160,7 +160,6 @@ export default {
label: '保养计划名称',
placeholder: '请选择计划名称',
param: 'maintainPlanId',
filterable: true
},
//
{
@ -340,7 +339,6 @@ export default {
startTime: null,
relatePlan: null,
equipmentId: null,
confirmed: true
},
//
form: {},
@ -351,20 +349,20 @@ export default {
created() {
this.initSearchBar();
if (this.$route.query) {
// this.queryParams.equipmentId =
// this.$route.query?.equipmentId ?? undefined;
this.queryParams.equipmentId =
this.$route.query?.equipmentId ?? undefined;
this.queryParams.maintainPlanId =
this.$route.query?.maintainPlanId ?? undefined;
// this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined;
this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined;
this.queryParams.startTime = this.$route.query?.createTime ?? undefined;
// this.searchBarFormConfig[0].defaultSelect =
// this.$route.query.equipmentId ?? undefined;
this.searchBarFormConfig[0].defaultSelect =
this.$route.query.maintainPlanId ?? undefined;
this.$route.query.equipmentId ?? undefined;
this.searchBarFormConfig[1].defaultSelect =
this.$route.query.maintainPlanId ?? undefined;
this.searchBarFormConfig[2].defaultSelect =
this.$route.query?.createTime ?? undefined;
// this.searchBarFormConfig[3].defaultSelect =
// Number(this.$route.query.relatePlan) ?? undefined;
this.searchBarFormConfig[3].defaultSelect =
Number(this.$route.query.relatePlan) ?? undefined;
}
this.getList();
if (this.$route.query.addRecord) {
@ -385,24 +383,10 @@ export default {
}
},
initSearchBar() {
// this.http('/base/core-equipment/page', 'get', {
// special: false,
// pageNo: 1,
// pageSize: 99
// }).then(({ data }) => {
// this.$set(
// this.searchBarFormConfig[0],
// 'selectOptions',
// (data?.list || []).map((item) => ({
// name: item.name,
// id: item.id,
// }))
// );
// });
this.http('/base/equipment-maintain-plan/page', 'get', {
this.http('/base/core-equipment/page', 'get', {
special: false,
pageNo: 1,
pageSize: 100,
special: false
pageSize: 99
}).then(({ data }) => {
this.$set(
this.searchBarFormConfig[0],
@ -413,6 +397,19 @@ export default {
}))
);
});
this.http('/base/equipment-maintain-plan/page', 'get', {
pageNo: 1,
pageSize: 100,
}).then(({ data }) => {
this.$set(
this.searchBarFormConfig[1],
'selectOptions',
(data?.list || []).map((item) => ({
name: item.name,
id: item.id,
}))
);
});
},
/** 查询列表 */
getList() {
@ -547,7 +544,6 @@ export default {
let params = { ...this.queryParams };
params.pageNo = undefined;
params.pageSize = undefined;
params.confirmed = true;
this.$modal
.confirm('是否确认导出所有保养记录?')
.then(() => {

View File

@ -680,8 +680,7 @@ export default {
file.type === 'image/jpg';
return isJPG;
};
return checkFileSize();
// return checkFileSize() && checkFileType();
return checkFileSize() && checkFileType();
},
// handlers

View File

@ -17,7 +17,7 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="90"
:width="180"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
@ -111,13 +111,11 @@ export default {
{
prop: 'maintenanceStartTime',
label: '维修开始时间',
width: 150,
filter: parseTime,
},
{
prop: 'maintenanceFinishTime',
label: '维修结束时间',
width: 150,
filter: parseTime,
},
// { prop: 'maintenanceStartTime', label: '', filter: parseTime },
@ -130,7 +128,7 @@ export default {
{ prop: 'maintenanceDetail', label: '维修描述', subcomponent: htmls }, //
// { prop: 'repairman', label: '', minWidth: 100, showOverflowtooltip: true },
// { prop: 'repairmanPhone', label: '', minWidth: 100, showOverflowtooltip: true },
{ prop: 'remark', label: '备注', minWidth: 90, showOverflowtooltip: true }
{ prop: 'remark', label: '备注', minWidth: 120, showOverflowtooltip: true }
],
searchBarFormConfig: [
{

View File

@ -283,7 +283,7 @@ export default {
{
type: 'less',
name: 'status',
value: 2
value: 3
}
]
}
@ -383,9 +383,9 @@ export default {
},
// ,
handleEditStatus(val, tip, status) {
let _this = this
console.log(val)
if (val.orderIdNum > 0) {//
_this.$confirm('是否将"'+tip+'"操作同步至下级订单和工单?','确认信息', {
this.$confirm('是否将"'+tip+'"操作同步至下级订单和工单?','确认信息', {
type: 'warning',
distinguishCancelAndClose: true,
confirmButtonText: '同步',
@ -393,26 +393,26 @@ export default {
}).then(function() {
console.log('同步')
groupOrderStatusSet({ id: val.id, status: status, isSync: true}).then(() => {
_this.getList();
_this.$modal.msgSuccess("操作成功");
this.getList();
this.$modal.msgSuccess("操作成功");
})
}).catch(action => {
if (action === 'cancel') {
console.log('不同步')
groupOrderStatusSet({ id: val.id, status: status, isSync: false}).then(() => {
_this.getList();
_this.$modal.msgSuccess("操作成功");
this.getList();
this.$modal.msgSuccess("操作成功");
})
}else {
return console.log('关闭')
}
})
}else{//
_this.$modal.confirm('是否确认"'+tip+'"集团订单名称为"' + val.name + '"的数据项?').then(function() {
this.$modal.confirm('是否确认"'+tip+'"集团订单名称为"' + val.name + '"的数据项?').then(function() {
return groupOrderStatusSet({ id: val.id, status: status})
}).then(() => {
_this.getList();
_this.$modal.msgSuccess("操作成功");
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {});
}
},

View File

@ -293,7 +293,7 @@ export default {
{
type: 'less',
name: 'status',
value: 2
value: 3
}
]
}