Compare commits
No commits in common. "c66e82b1521ab6ee3da680e33dafa01067af724c" and "38668fca09ceca676690f2bdbf20e8589e7bec3e" have entirely different histories.
c66e82b152
...
38668fca09
6
.env.dev
6
.env.dev
@ -1,7 +1,7 @@
|
|||||||
###
|
###
|
||||||
# @Author: Do not edit
|
# @Author: Do not edit
|
||||||
# @Date: 2023-08-29 09:40:39
|
# @Date: 2023-08-29 09:40:39
|
||||||
# @LastEditTime: 2024-02-29 15:53:50
|
# @LastEditTime: 2024-02-26 08:45:43
|
||||||
# @LastEditors: DY
|
# @LastEditors: DY
|
||||||
# @Description:
|
# @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.1.8:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
# 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.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.62:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.78: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地址
|
# socket地址
|
||||||
VUE_APP_Socket_API = 'ws://192.168.0.30:8888'
|
VUE_APP_Socket_API = 'ws://192.168.0.30:8888'
|
||||||
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
|
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
|
||||||
|
@ -153,12 +153,3 @@ export function createConCoreWOr(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改分配产量
|
|
||||||
export function updateConCoreWOr(data) {
|
|
||||||
return request({
|
|
||||||
url: '/base/core-order-con-work-order/update',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-11-08 15:56:52
|
* @Date: 2023-11-08 15:56:52
|
||||||
* @LastEditTime: 2024-02-28 18:16:56
|
* @LastEditTime: 2024-02-26 09:29:53
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @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) {
|
export function getcheckConfigByEqList(query) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -83,14 +83,20 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="工段排序"
|
label="工段排序"
|
||||||
prop="sort">
|
prop="sort"
|
||||||
<el-input-number
|
:rules="[
|
||||||
|
{
|
||||||
|
type: 'number',
|
||||||
|
trigger: 'change',
|
||||||
|
message: '请输入正确的数字类型',
|
||||||
|
transform: (val) => Number(val),
|
||||||
|
},
|
||||||
|
]">
|
||||||
|
<el-input
|
||||||
v-model="dataForm.sort"
|
v-model="dataForm.sort"
|
||||||
clearable
|
clearable
|
||||||
controls-position="right"
|
|
||||||
@change="$emit('update', dataForm)"
|
@change="$emit('update', dataForm)"
|
||||||
placeholder="请输入工段排序"
|
placeholder="请输入工段排序" />
|
||||||
style="width: 100%" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-29 15:01:25
|
* @LastEditTime: 2024-02-27 15:38:04
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -325,7 +325,7 @@ export default {
|
|||||||
init(row, isdetail) {
|
init(row, isdetail) {
|
||||||
this.initData();
|
this.initData();
|
||||||
this.isdetail = isdetail || false;
|
this.isdetail = isdetail || false;
|
||||||
this.dataForm.id = row?.id || undefined;
|
this.dataForm.id = row.id || undefined;
|
||||||
this.isedit = row?.id && row?.externalCode ? true : false;
|
this.isedit = row?.id && row?.externalCode ? true : false;
|
||||||
console.log('你好', this.isedit)
|
console.log('你好', this.isedit)
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
@ -253,9 +253,7 @@ export default {
|
|||||||
if (this.dataForm.priority !== undefined) {
|
if (this.dataForm.priority !== undefined) {
|
||||||
this.dataForm.priority = String(this.dataForm.priority)
|
this.dataForm.priority = String(this.dataForm.priority)
|
||||||
}
|
}
|
||||||
if (this.dataForm.roomNameDict !== undefined) {
|
this.dataForm.priority
|
||||||
this.dataForm.roomNameDict = String(this.dataForm.roomNameDict)
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (this.urlOptions.isGetCode) {
|
if (this.urlOptions.isGetCode) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-29 10:01:52
|
* @LastEditTime: 2023-11-16 09:14:35
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -41,12 +41,12 @@
|
|||||||
<el-table-column prop="priority" label="优先级" />
|
<el-table-column prop="priority" label="优先级" />
|
||||||
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
|
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
|
||||||
<template slot-scope="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
|
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
|
||||||
<template slot-scope="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
@ -104,7 +104,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicAdd from '../../core/mixins/basic-add';
|
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 SmallTitle from '../material/SmallTitle';
|
||||||
// import { parseTime } from '../../core/mixins/code-filter';
|
// import { parseTime } from '../../core/mixins/code-filter';
|
||||||
// import attrAdd from './attr-add';
|
// import attrAdd from './attr-add';
|
||||||
@ -159,8 +159,8 @@ export default {
|
|||||||
// });
|
// });
|
||||||
// return;
|
// return;
|
||||||
}
|
}
|
||||||
// 修改的提交
|
// 添加的提交
|
||||||
updateConCoreWOr({
|
createConCoreWOr({
|
||||||
...row,
|
...row,
|
||||||
workOrderId: this.dataForm.id
|
workOrderId: this.dataForm.id
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
@ -173,17 +173,16 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
// 获取工单分配详细列表
|
// 获取产品Bom详细列表
|
||||||
getConOrderList({
|
getConOrderList({
|
||||||
...this.listQuery,
|
...this.listQuery,
|
||||||
workOrderId: this.dataForm.id
|
workOrderId: this.dataForm.id
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
this.tableData = response.data.map(item => {
|
this.tableData = response.data.map(item => {
|
||||||
item.isEdit = false
|
item.isEdit = false
|
||||||
item.isallocation = item.actualAssignmentQuantity ? true : false
|
|
||||||
return item
|
return item
|
||||||
});
|
});
|
||||||
this.listQuery.total = response.data.length;
|
this.listQuery.total = response.data.total;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 构造一行
|
// 构造一行
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-29 15:35:02
|
* @LastEditTime: 2023-12-26 16:59:25
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
<div class="blodTip">工单来源</div>
|
<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>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
<div class="blodTip">所属订单</div>
|
<div class="blodTip">所属订单</div>
|
||||||
@ -218,7 +218,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import basicAdd from '../../core/mixins/basic-add';
|
// 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 { orderList } from "@/api/base/orderManage";
|
||||||
import { getProcessFlowList } from '@/api/base/orderManage'
|
import { getProcessFlowList } from '@/api/base/orderManage'
|
||||||
import SmallTitle from './SmallTitle';
|
import SmallTitle from './SmallTitle';
|
||||||
@ -261,9 +261,8 @@ const tableProps = [
|
|||||||
|
|
||||||
const tableProps1 = [
|
const tableProps1 = [
|
||||||
{
|
{
|
||||||
prop: 'material',
|
prop: 'materialName',
|
||||||
label: '物料名称',
|
label: '物料名称'
|
||||||
filter: publicFormatter('material')
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'unit',
|
prop: 'unit',
|
||||||
@ -271,7 +270,7 @@ const tableProps1 = [
|
|||||||
filter: publicFormatter('unit_dict')
|
filter: publicFormatter('unit_dict')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'remaining',
|
prop: 'num',
|
||||||
label: '剩余生产预计消耗'
|
label: '剩余生产预计消耗'
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -432,17 +431,11 @@ export default {
|
|||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
});
|
});
|
||||||
// 获取预使用原料列表
|
// 获取预使用原料列表
|
||||||
console.log()
|
if (this.dataForm.planProductId) {
|
||||||
if (this.dataForm.id) {
|
getMaterialBomPage({
|
||||||
getCoreWOMaPage({
|
productId: this.dataForm.planProductId,
|
||||||
workOrderId: this.dataForm.id,
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 100
|
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
this.materialList = response.data.records.map((item) => {
|
this.materialList = response.data;
|
||||||
item.remaining = item?.num * this.dataForm.remainingQuantity || 0
|
|
||||||
return item
|
|
||||||
});
|
|
||||||
// this.listQuery.total = response.data.length;
|
// this.listQuery.total = response.data.length;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -197,7 +197,17 @@ export default {
|
|||||||
{
|
{
|
||||||
name: 'status',
|
name: 'status',
|
||||||
type: 'equal',
|
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',
|
name: 'status',
|
||||||
type: 'equal',
|
type: 'equal',
|
||||||
value: 2
|
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
|
: 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),
|
].filter((v)=>v),
|
||||||
tableData: [],
|
tableData: [],
|
||||||
formConfig: [
|
formConfig: [
|
||||||
|
@ -1,79 +1,72 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-10-17 16:50:19
|
* @Date: 2023-10-17 16:50:19
|
||||||
* @LastEditTime: 2024-02-28 10:07:29
|
* @LastEditTime: 2023-12-01 16:48:53
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-dialog class="baseDialog" :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="40%"
|
<el-dialog class="baseDialog" :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="40%" show-close="true">
|
||||||
show-close="true">
|
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ !dataForm.id ? '新增' : '编辑' }}
|
{{ !dataForm.id ? '新增' : '编辑' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
<!--
|
<!--
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="visual-part"> -->
|
<div class="visual-part"> -->
|
||||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
|
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
|
||||||
@keyup.enter.native="dataFormSubmit">
|
@keyup.enter.native="dataFormSubmit">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="包装流水号" prop="packagingCode">
|
<el-form-item label="包装流水号" prop="packagingCode">
|
||||||
<el-input v-model="dataForm.packagingCode" clearable placeholder="请输入包装流水号" />
|
<el-input v-model="dataForm.packagingCode" clearable placeholder="请输入包装流水号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="内容" prop="content">
|
<el-form-item label="内容" prop="content">
|
||||||
<el-input v-model="dataForm.content" clearable placeholder="请输入内容" />
|
<el-input v-model="dataForm.content" clearable placeholder="请输入内容" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="所属工单" prop="workOrderId">
|
<el-form-item label="所属工单" prop="workOrderId">
|
||||||
<el-select v-model="dataForm.workOrderId" style="width: 100%;" placeholder="请选择所属工单" clearable>
|
<el-select v-model="dataForm.workOrderId" style="width: 100%;" placeholder="请选择所属工单" clearable>
|
||||||
<el-option v-for="dict in workOrderList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
<el-option v-for="dict in workOrderList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="客户" prop="customerId">
|
<el-form-item label="客户" prop="customerId">
|
||||||
<el-select v-model="dataForm.customerId" style="width: 100%;" placeholder="请选择客户" clearable>
|
<el-select v-model="dataForm.customerId" style="width: 100%;" placeholder="请选择客户" clearable>
|
||||||
<el-option v-for="dict in customerList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
<el-option v-for="dict in customerList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
<el-col :span="12">
|
<el-form-item label="标签模板" prop="modelId">
|
||||||
<el-form-item label="包装条码" prop="packagingBarCode">
|
<el-select v-model="dataForm.modelId" style="width: 100%;" placeholder="请选择标签模板" clearable>
|
||||||
<el-input v-model="dataForm.packagingBarCode" clearable placeholder="请输入包装条码" />
|
<el-option v-for="dict in modelList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</el-form-item>
|
</el-select>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="12">
|
</el-col>
|
||||||
<el-form-item label="标签模板" prop="modelId">
|
<!-- <el-col :span="12">
|
||||||
<el-select v-model="dataForm.modelId" style="width: 100%;" placeholder="请选择标签模板" clearable>
|
|
||||||
<el-option v-for="dict in modelList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<!-- <el-col :span="12">
|
|
||||||
<el-form-item label="单位平方数" prop="area">
|
<el-form-item label="单位平方数" prop="area">
|
||||||
<el-input v-model="dataForm.area" placeholder="请输入单位平方数" />
|
<el-input v-model="dataForm.area" placeholder="请输入单位平方数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- <el-row :gutter="20">
|
<!-- <el-row :gutter="20">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="完成单位产品用时" prop="processTime">
|
<el-form-item label="完成单位产品用时" prop="processTime">
|
||||||
<el-input v-model="dataForm.processTime" placeholder="请输入完成单位产品用时" />
|
<el-input v-model="dataForm.processTime" placeholder="请输入完成单位产品用时" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row> -->
|
</el-row> -->
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<!-- <small-title
|
<!-- <small-title
|
||||||
style="margin: 16px 0; padding-left: 8px"
|
style="margin: 16px 0; padding-left: 8px"
|
||||||
:no-padding="true">
|
:no-padding="true">
|
||||||
产品属性列表
|
产品属性列表
|
||||||
@ -103,7 +96,7 @@
|
|||||||
:page-sizes="[5, 10, 15]"
|
:page-sizes="[5, 10, 15]"
|
||||||
@pagination="getList" />
|
@pagination="getList" />
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
|
|
||||||
<!-- <div style="position: absolute; bottom: 24px; right: 24px">
|
<!-- <div style="position: absolute; bottom: 24px; right: 24px">
|
||||||
@ -193,7 +186,6 @@ export default {
|
|||||||
workOrderId: null, // 单位产品用时 (s)
|
workOrderId: null, // 单位产品用时 (s)
|
||||||
customerId: '', // 规格
|
customerId: '', // 规格
|
||||||
content: '', // 单位id
|
content: '', // 单位id
|
||||||
packagingBarCode: null
|
|
||||||
},
|
},
|
||||||
listQuery: {
|
listQuery: {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 14:55:51
|
* @Date: 2023-08-01 14:55:51
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2024-02-28 10:38:34
|
* @LastEditTime: 2023-11-24 09:13:50
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -55,11 +55,7 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'packagingCode',
|
prop: 'packagingCode',
|
||||||
label: '包装流水号'
|
label: '包装流水号'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
prop: 'packagingBarCode',
|
|
||||||
label: '包装条码'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
prop: 'workOrderName',
|
prop: 'workOrderName',
|
||||||
label: '所属工单'
|
label: '所属工单'
|
||||||
|
@ -233,6 +233,10 @@ export default {
|
|||||||
// 增加
|
// 增加
|
||||||
emitButtonClick1() {
|
emitButtonClick1() {
|
||||||
let n = this.tableData1.length
|
let n = this.tableData1.length
|
||||||
|
if (n >=3) {
|
||||||
|
this.$modal.msgWarning('最多可添加3档计价')
|
||||||
|
return false
|
||||||
|
}
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.startTime = n === 0 ? '' : this.tableData1[n-1].endTime
|
obj.startTime = n === 0 ? '' : this.tableData1[n-1].endTime
|
||||||
obj.endTime = ''
|
obj.endTime = ''
|
||||||
@ -241,6 +245,10 @@ export default {
|
|||||||
},
|
},
|
||||||
emitButtonClick2() {
|
emitButtonClick2() {
|
||||||
let n = this.tableData2.length
|
let n = this.tableData2.length
|
||||||
|
// if (n >=3) {
|
||||||
|
// this.$modal.msgWarning('最多可添加3档计价')
|
||||||
|
// return false
|
||||||
|
// }
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.startUsed = n === 0 ? 0 : this.tableData2[n-1].endUsed
|
obj.startUsed = n === 0 ? 0 : this.tableData2[n-1].endUsed
|
||||||
obj.endUsed = 0
|
obj.endUsed = 0
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-29 14:59:28
|
* @LastEditTime: 2024-02-27 09:41:00
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -27,14 +27,13 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="巡检单名称" prop="name">
|
<el-form-item label="巡检单名称" prop="name">
|
||||||
<el-input v-model="dataForm.name" :disabled="isdetail" placeholder="请输入巡检单名称" />
|
<el-input v-model="dataForm.name" placeholder="请输入巡检单名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="部门" prop="departmentId">
|
<el-form-item label="部门" prop="departmentId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.departmentId"
|
v-model="dataForm.departmentId"
|
||||||
:disabled="isdetail"
|
|
||||||
:placeholder="`请选择部门`">
|
:placeholder="`请选择部门`">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="opt in departmentOptions"
|
v-for="opt in departmentOptions"
|
||||||
@ -51,14 +50,14 @@
|
|||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
multiple
|
multiple
|
||||||
:disabled="isdetail"
|
:disabled="isedit"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择班次">
|
placeholder="请选择班次">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="d in groupOptions"
|
v-for="d in groupOptions"
|
||||||
:key="d.id"
|
:key="d.id"
|
||||||
:label="d.label"
|
:label="d.name"
|
||||||
:value="d.label" />
|
:value="d.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -71,9 +70,8 @@
|
|||||||
:placeholder="`请选择巡检人`"
|
:placeholder="`请选择巡检人`"
|
||||||
multiple
|
multiple
|
||||||
clearable
|
clearable
|
||||||
:disabled="isdetail"
|
:disabled="isedit"
|
||||||
filterable
|
filterable>
|
||||||
style="width: 100%">
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="opt in inspectorOptions"
|
v-for="opt in inspectorOptions"
|
||||||
:key="opt.value"
|
:key="opt.value"
|
||||||
@ -87,7 +85,7 @@
|
|||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dataForm.planCheckTime"
|
v-model="dataForm.planCheckTime"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
:disabled="isdetail"
|
:disabled="isedit"
|
||||||
placeholder="请选择巡检时间"
|
placeholder="请选择巡检时间"
|
||||||
value-format="timestamp"></el-date-picker>
|
value-format="timestamp"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -144,8 +142,7 @@
|
|||||||
<div v-if="!isdetail" class="drawer-body__footer">
|
<div v-if="!isdetail" class="drawer-body__footer">
|
||||||
<el-button @click="goback()">取消</el-button>
|
<el-button @click="goback()">取消</el-button>
|
||||||
<!-- <el-button :disabled="isdetail" @click="init(dataForm.id)">重置</el-button> -->
|
<!-- <el-button :disabled="isdetail" @click="init(dataForm.id)">重置</el-button> -->
|
||||||
<el-button v-if="isshowConfirm" type="primary" @click="confirmIns()">保存</el-button>
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
<el-button v-else type="primary" @click="dataFormSubmit()">保存</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<attr-add
|
<attr-add
|
||||||
@ -166,7 +163,6 @@ import attrAdd from './attr-add';
|
|||||||
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||||
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
|
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
|
||||||
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
|
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
|
||||||
import { getDictDataLabel } from '@/utils/dict';
|
|
||||||
|
|
||||||
const tableBtn = [
|
const tableBtn = [
|
||||||
{
|
{
|
||||||
@ -209,7 +205,6 @@ export default {
|
|||||||
tableProps,
|
tableProps,
|
||||||
topBtnConfig,
|
topBtnConfig,
|
||||||
addOrUpdateVisible: false,
|
addOrUpdateVisible: false,
|
||||||
isshowConfirm: false,
|
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
isGetCode: false,
|
isGetCode: false,
|
||||||
createURL: createCheckOrder,
|
createURL: createCheckOrder,
|
||||||
@ -247,8 +242,8 @@ export default {
|
|||||||
id: undefined,
|
id: undefined,
|
||||||
name: '',
|
name: '',
|
||||||
departmentId: undefined,
|
departmentId: undefined,
|
||||||
groupClass: [],
|
groupClass: undefined,
|
||||||
checkPerson: [],
|
checkPerson: undefined,
|
||||||
planCheckTime: undefined
|
planCheckTime: undefined
|
||||||
},
|
},
|
||||||
detList: [],
|
detList: [],
|
||||||
@ -272,10 +267,7 @@ export default {
|
|||||||
async getDict() {
|
async getDict() {
|
||||||
// 班次列表
|
// 班次列表
|
||||||
const res = await groupClassesListAll();
|
const res = await groupClassesListAll();
|
||||||
this.groupOptions = res.data.map((item) => {
|
this.groupOptions = res.data || [];
|
||||||
item.label = item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict)
|
|
||||||
return item
|
|
||||||
}) || [];
|
|
||||||
// 部门列表
|
// 部门列表
|
||||||
const res1 = await getCoreDepartmentList();
|
const res1 = await getCoreDepartmentList();
|
||||||
this.departmentOptions = res1.data || []
|
this.departmentOptions = res1.data || []
|
||||||
@ -322,7 +314,6 @@ export default {
|
|||||||
initData() {
|
initData() {
|
||||||
this.detList.splice(0);
|
this.detList.splice(0);
|
||||||
this.listQuery.total = 0;
|
this.listQuery.total = 0;
|
||||||
this.isshowConfirm = false;
|
|
||||||
},
|
},
|
||||||
handleClick(raw) {
|
handleClick(raw) {
|
||||||
if (raw.type === 'delete') {
|
if (raw.type === 'delete') {
|
||||||
@ -382,16 +373,6 @@ export default {
|
|||||||
// 获取巡检单详情
|
// 获取巡检单详情
|
||||||
this.urlOptions.infoURL(id).then(response => {
|
this.urlOptions.infoURL(id).then(response => {
|
||||||
this.dataForm = response.data
|
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();
|
this.getList();
|
||||||
@ -417,41 +398,6 @@ export default {
|
|||||||
this.$refs.addOrUpdate.init(id);
|
this.$refs.addOrUpdate.init(id);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getConfirmed() {
|
|
||||||
return this.$confirm('是否直接确认巡检记录', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
async confirmIns() {
|
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.getConfirmed().then(confirm => {
|
|
||||||
this.$axios({
|
|
||||||
url:
|
|
||||||
'/base/equipment-check-order/confirm?confirmPerson=' +
|
|
||||||
this.$store.getters.userId,
|
|
||||||
method: 'put',
|
|
||||||
data: [this.dataForm.id],
|
|
||||||
}).then(res =>{
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.visible = false;
|
|
||||||
this.$emit("refreshDataList");
|
|
||||||
this.$message.success('已确认');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
this.visible = false;
|
|
||||||
this.$emit("refreshDataList");
|
|
||||||
this.$message.success('取消确认');
|
|
||||||
})
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs["dataForm"].validate((valid) => {
|
this.$refs["dataForm"].validate((valid) => {
|
||||||
@ -483,7 +429,6 @@ export default {
|
|||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.idAttrShow = true
|
this.idAttrShow = true
|
||||||
this.isshowConfirm = true
|
|
||||||
this.dataForm.id = response.data
|
this.dataForm.id = response.data
|
||||||
// this.visible = false;
|
// this.visible = false;
|
||||||
this.$emit("refreshDataList");
|
this.$emit("refreshDataList");
|
||||||
|
@ -172,27 +172,24 @@ export default {
|
|||||||
async searchBarClicked(btn) {
|
async searchBarClicked(btn) {
|
||||||
switch (btn.btnName) {
|
switch (btn.btnName) {
|
||||||
case 'batchConfirm':
|
case 'batchConfirm':
|
||||||
|
const ids = this.$refs['waiting-list-table'].selectedPlan.map(
|
||||||
|
(item) => item.id
|
||||||
|
)
|
||||||
if (this.$refs['waiting-list-table'].selectedPlan.length == 0) {
|
if (this.$refs['waiting-list-table'].selectedPlan.length == 0) {
|
||||||
this.$message.warning('请选择待确认的设备巡检单');
|
this.$message.warning('请选择待确认的设备巡检单');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$modal
|
const res = await this.$axios({
|
||||||
.confirm('是否确认所有选中巡检单"?')
|
url: '/base/equipment-check-order/confirm?confirmPerson=' + this.$store.getters.userId + '&ids=' + ids,
|
||||||
.then(() => {
|
method: 'put',
|
||||||
return this.$axios({
|
// data: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||||
url: '/base/equipment-check-order/confirm?confirmPerson=' + this.$store.getters.userId,
|
// (item) => item.id
|
||||||
method: 'put',
|
// ),
|
||||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
});
|
||||||
(item) => item.id
|
if (res.code == 0) {
|
||||||
),
|
this.$message.success('确认成功');
|
||||||
});
|
this.getList();
|
||||||
})
|
}
|
||||||
.then((res) => {
|
|
||||||
this.getList();
|
|
||||||
res.code == 0 && this.$modal.msgSuccess('确认成功');
|
|
||||||
res.code != 0 && this.$modal.msgError('确认失败');
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -331,7 +328,7 @@ export default {
|
|||||||
// },
|
// },
|
||||||
|
|
||||||
getConfirmed() {
|
getConfirmed() {
|
||||||
return this.$confirm('是否直接确认巡检记录', '提示', {
|
return this.$confirm('是否直接确认保养记录', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@ -391,16 +388,17 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 确认 */
|
/** 确认 */
|
||||||
async handleConfirm(row) {
|
async handleConfirm(row) {
|
||||||
|
console.log('111', this.$store.getters.userId)
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认巡检单"' + row.name + '"?')
|
.confirm('是否确认巡检单"' + row.name + '"?')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return this.$axios({
|
return this.$axios({
|
||||||
url:
|
url:
|
||||||
'/base/equipment-check-order/confirm?confirmPerson=' +
|
'/base/equipment-check-order/confirm?confirmPerson=' +
|
||||||
this.$store.getters.userId,
|
this.$store.getters.userId + '&ids=' + [row.id],
|
||||||
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
|
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: [row.id],
|
// data: [row.id],
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
@ -63,7 +63,7 @@ import moment from 'moment';
|
|||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import addRecord from './addRecord.vue';
|
import addRecord from './addRecord.vue';
|
||||||
import AddContent from './addContent.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';
|
import { parseTime } from '../../../../core/mixins/code-filter';
|
||||||
|
|
||||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
@ -130,25 +130,19 @@ export default {
|
|||||||
// { prop: 'responsible', label: '巡检人' },
|
// { prop: 'responsible', label: '巡检人' },
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
// {
|
|
||||||
// type: 'select',
|
|
||||||
// label: '巡检单名称',
|
|
||||||
// placeholder: '请选择巡检单',
|
|
||||||
// param: 'name',
|
|
||||||
// filterable: true
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'select',
|
||||||
label: '巡检单名称',
|
label: '巡检单名称',
|
||||||
placeholder: '请输入巡检单',
|
placeholder: '请选择巡检单',
|
||||||
param: 'name'
|
param: 'name',
|
||||||
|
filterable: true
|
||||||
},
|
},
|
||||||
// 开始结束时间
|
// 开始结束时间
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '巡检时间',
|
label: '巡检时间',
|
||||||
dateType: 'datetimerange', // datetimerange
|
dateType: 'daterange', // datetimerange
|
||||||
format: 'yyyy-MM-dd HH:mm:ss',
|
format: 'yyyy-MM-dd',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始日期',
|
startPlaceholder: '开始日期',
|
||||||
@ -263,12 +257,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
let end = moment().format('YYYY-MM-DD 08:00:00')
|
this.initSearchBar();
|
||||||
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.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -283,23 +272,22 @@ export default {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// initSearchBar() {
|
initSearchBar() {
|
||||||
// this.http('/base/equipment-check-order/page', 'get', {
|
this.http('/base/core-equipment/page', 'get', {
|
||||||
// special: false,
|
special: false,
|
||||||
// pageNo: 1,
|
pageNo: 1,
|
||||||
// pageSize: 99,
|
pageSize: 99,
|
||||||
// status: 2
|
}).then(({ data }) => {
|
||||||
// }).then(({ data }) => {
|
this.$set(
|
||||||
// this.$set(
|
this.searchBarFormConfig[0],
|
||||||
// this.searchBarFormConfig[0],
|
'selectOptions',
|
||||||
// 'selectOptions',
|
(data?.list || []).map((item) => ({
|
||||||
// (data?.list || []).map((item) => ({
|
name: item.name,
|
||||||
// name: item.name,
|
id: item.id,
|
||||||
// id: item.id,
|
}))
|
||||||
// }))
|
);
|
||||||
// );
|
});
|
||||||
// });
|
},
|
||||||
// },
|
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -431,7 +419,7 @@ export default {
|
|||||||
.confirm('是否确认导出所有设备巡检记录?')
|
.confirm('是否确认导出所有设备巡检记录?')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportCheckOrderExcel(params);
|
return exportCheckLogExcel(params);
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.$download.excel(response, '设备巡检记录.xls');
|
this.$download.excel(response, '设备巡检记录.xls');
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-29 14:58:37
|
* @LastEditTime: 2024-02-24 20:50:51
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -53,7 +53,6 @@
|
|||||||
type="datetime"
|
type="datetime"
|
||||||
:placeholder="`请选择计划巡检时间`"
|
:placeholder="`请选择计划巡检时间`"
|
||||||
value-format="timestamp"
|
value-format="timestamp"
|
||||||
:default-time="'8:00:00'"
|
|
||||||
style="width: 100%" />
|
style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -78,8 +77,8 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="d in groupOptions"
|
v-for="d in groupOptions"
|
||||||
:key="d.id"
|
:key="d.id"
|
||||||
:label="d.label"
|
:label="d.name"
|
||||||
:value="d.label" />
|
:value="d.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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 { getCheckOrder, getOrderCode, createCheckOrder, updateCheckOrder } from "@/api/equipment/base/inspection/settings";
|
||||||
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
|
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
|
||||||
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
|
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
|
||||||
import { getDictDataLabel } from '@/utils/dict';
|
|
||||||
// import { getEquipmentAll } from '@/api/base/equipment'
|
// import { getEquipmentAll } from '@/api/base/equipment'
|
||||||
|
|
||||||
export default {
|
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() {
|
mounted() {
|
||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
async getDict() {
|
||||||
// 部门列表
|
// 部门列表
|
||||||
const res = await getCoreDepartmentList();
|
const res = await getCoreDepartmentList();
|
||||||
this.departmentOptions = res.data || [];
|
this.departmentOptions = res.data || [];
|
||||||
const res1 = await groupClassesListAll();
|
const res1 = await groupClassesListAll();
|
||||||
this.groupOptions = res1.data.map((item) => {
|
this.groupOptions = res1.data || [];
|
||||||
item.label = item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict)
|
|
||||||
return item
|
|
||||||
}) || [];
|
|
||||||
// const res = await getEquipmentAll()
|
// const res = await getEquipmentAll()
|
||||||
// this.eqList = res.data
|
// this.eqList = res.data
|
||||||
},
|
},
|
||||||
|
@ -97,11 +97,11 @@ export default {
|
|||||||
{ prop: 'name', label: '巡检单名称', width: 110, showOverflowtooltip: true },
|
{ prop: 'name', label: '巡检单名称', width: 110, showOverflowtooltip: true },
|
||||||
{ prop: 'code', label: '巡检单编码', minWidth: 150, showOverflowtooltip: true },
|
{ prop: 'code', label: '巡检单编码', minWidth: 150, showOverflowtooltip: true },
|
||||||
{ prop: 'department', label: '部门', 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: 'confirmTimeLimit', label: '确认时限', showOverflowtooltip: true },
|
||||||
{ prop: 'groupClass', label: '班次', showOverflowtooltip: true },
|
{ prop: 'groupClass', label: '班次', showOverflowtooltip: true },
|
||||||
{ prop: 'creator', label: '创建人', showOverflowtooltip: true },
|
{ prop: 'checkPerson', label: '创建人', minWidth: 150, showOverflowtooltip: true },
|
||||||
{ prop: 'createTime', label: '创建时间', width: 150, filter: parseTime },
|
{ prop: 'createTime', label: '创建时间', filter: parseTime },
|
||||||
// { prop: 'responsible', label: '负责人' },
|
// { prop: 'responsible', label: '负责人' },
|
||||||
{ prop: 'remark', label: '备注' } // TODO: 操作 选项,四个,群里询问
|
{ prop: 'remark', label: '备注' } // TODO: 操作 选项,四个,群里询问
|
||||||
],
|
],
|
||||||
@ -195,20 +195,17 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
equipmentId: null,
|
equipmentId: null,
|
||||||
name: null,
|
name: null,
|
||||||
special: false,
|
special: false
|
||||||
status: 0
|
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
basePath: '/base/equipment-check-order',
|
basePath: '/base/equipment-check-order',
|
||||||
mode: null,
|
mode: null,
|
||||||
groupList: []
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initSearchBar();
|
this.initSearchBar();
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getGroup();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
@ -230,11 +227,6 @@ export default {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getGroup() {
|
|
||||||
groupClassesListAll().then(res => {
|
|
||||||
this.groupList = res.data || []
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="设备保养单号"
|
label="保养计划单号"
|
||||||
prop="maintainOrderNumber"
|
prop="maintainOrderNumber"
|
||||||
:rules="[
|
:rules="[
|
||||||
{ required: true, message: '请输入设备保养单号', trigger: 'blur' },
|
{ required: true, message: '请输入保养计划单号', trigger: 'blur' },
|
||||||
]">
|
]">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.maintainOrderNumber"
|
v-model="form.maintainOrderNumber"
|
||||||
@ -227,6 +227,11 @@ export default {
|
|||||||
return {
|
return {
|
||||||
form: {},
|
form: {},
|
||||||
formLoading: true,
|
formLoading: true,
|
||||||
|
equipmentTypeOptions: [
|
||||||
|
{ label: '安全设备', value: 1 },
|
||||||
|
{ label: '消防设备', value: 2 },
|
||||||
|
{ label: '特种设备', value: 3 },
|
||||||
|
],
|
||||||
lineList: [],
|
lineList: [],
|
||||||
maintainerList: [],
|
maintainerList: [],
|
||||||
departmentList: [],
|
departmentList: [],
|
||||||
@ -263,7 +268,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// !this.edit && this.getCode('/base/equipment-maintain-log/getCode');
|
// !this.edit && this.getCode('/base/equipment-maintain-plan/getCode');
|
||||||
this.getList('maintainer');
|
this.getList('maintainer');
|
||||||
this.getList('department');
|
this.getList('department');
|
||||||
this.getList('line');
|
this.getList('line');
|
||||||
@ -304,7 +309,7 @@ export default {
|
|||||||
this.formLoading = true;
|
this.formLoading = true;
|
||||||
const response = await this.$axios(url);
|
const response = await this.$axios(url);
|
||||||
this.formLoading = false;
|
this.formLoading = false;
|
||||||
this.form.maintainOrderNumber = response.data || '';
|
this.form.code = response.data || '';
|
||||||
},
|
},
|
||||||
// initialize
|
// initialize
|
||||||
async getEquipmentList() {
|
async getEquipmentList() {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
custom-class="mes-drawer"
|
custom-class="mes-drawer"
|
||||||
size="60%"
|
size="60%"
|
||||||
@closed="$emit('destroy')">
|
@closed="$emit('destroy')">
|
||||||
<SmallTitle slot="title">{{ showTable ? '编辑' : '新增' }}</SmallTitle>
|
<SmallTitle slot="title">编辑</SmallTitle>
|
||||||
|
|
||||||
<div class="drawer-body flex">
|
<div class="drawer-body flex">
|
||||||
<div class="drawer-body__content">
|
<div class="drawer-body__content">
|
||||||
@ -184,53 +184,49 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="showTable">
|
<SmallTitle>保养内容</SmallTitle>
|
||||||
<SmallTitle>保养内容</SmallTitle>
|
|
||||||
|
|
||||||
<div style="margin-top: 12px; position: relative">
|
<div style="margin-top: 12px; position: relative">
|
||||||
<SearchBar
|
<SearchBar
|
||||||
:formConfigs="searchBarFormConfig"
|
:formConfigs="searchBarFormConfig"
|
||||||
ref="attr-search-bar"
|
ref="attr-search-bar"
|
||||||
@headBtnClick="handleSearchBarBtnClick" />
|
@headBtnClick="handleSearchBarBtnClick" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-top: 12px; position: relative">
|
||||||
|
<div style="position: absolute; top: -40px; right: 0">
|
||||||
|
<el-button @click="handleAddAttr" type="text">
|
||||||
|
<i class="el-icon-plus"></i>
|
||||||
|
添加属性
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<base-table
|
||||||
|
v-loading="attrListLoading"
|
||||||
|
:table-props="attrTableProps"
|
||||||
|
:page="attrQuery?.params.pageNo || 1"
|
||||||
|
:limit="attrQuery?.params.pageSize || 10"
|
||||||
|
:table-data="attrList"
|
||||||
|
@emitFun="handleEmitFun">
|
||||||
|
<method-btn
|
||||||
|
slot="handleBtn"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleTableBtnClick" />
|
||||||
|
</base-table>
|
||||||
|
|
||||||
<div style="margin-top: 12px; position: relative">
|
<!-- 分页组件 -->
|
||||||
<div style="position: absolute; top: -40px; right: 0">
|
<pagination
|
||||||
<el-button @click="handleAddAttr" type="text">
|
v-show="attrTotal > 0"
|
||||||
<i class="el-icon-plus"></i>
|
:total="attrTotal"
|
||||||
添加属性
|
:page.sync="attrQuery.params.pageNo"
|
||||||
</el-button>
|
:limit.sync="attrQuery.params.pageSize"
|
||||||
</div>
|
@pagination="getAttrList" />
|
||||||
<base-table
|
|
||||||
v-loading="attrListLoading"
|
|
||||||
:table-props="attrTableProps"
|
|
||||||
:page="attrQuery?.params.pageNo || 1"
|
|
||||||
:limit="attrQuery?.params.pageSize || 10"
|
|
||||||
:table-data="attrList"
|
|
||||||
@emitFun="handleEmitFun">
|
|
||||||
<method-btn
|
|
||||||
slot="handleBtn"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleTableBtnClick" />
|
|
||||||
</base-table>
|
|
||||||
|
|
||||||
<!-- 分页组件 -->
|
|
||||||
<pagination
|
|
||||||
v-show="attrTotal > 0"
|
|
||||||
:total="attrTotal"
|
|
||||||
:page.sync="attrQuery.params.pageNo"
|
|
||||||
:limit.sync="attrQuery.params.pageSize"
|
|
||||||
@pagination="getAttrList" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div class="drawer-body__footer">
|
||||||
<el-button style="" @click="handleCancel">取消</el-button>
|
<el-button style="" @click="handleCancel">取消</el-button>
|
||||||
<!-- 新增可确认 -->
|
<el-button type="primary" @click="handleConfirm">保存</el-button>
|
||||||
<el-button v-if="isAdd" type="primary" @click="addConfirm">保存</el-button>
|
|
||||||
<el-button v-else type="primary" @click="handleConfirm">保存</el-button>
|
|
||||||
<!-- sections的第二项必须是 属性列表 -->
|
<!-- sections的第二项必须是 属性列表 -->
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
v-if="sections[1].allowAdd"
|
v-if="sections[1].allowAdd"
|
||||||
@ -296,8 +292,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
showTable: false,
|
|
||||||
isAdd: false,
|
|
||||||
form: {},
|
form: {},
|
||||||
formLoading: false,
|
formLoading: false,
|
||||||
lineList: [],
|
lineList: [],
|
||||||
@ -393,7 +387,7 @@ export default {
|
|||||||
attrListLoading: false,
|
attrListLoading: false,
|
||||||
// syncFileListFlag: null,
|
// syncFileListFlag: null,
|
||||||
tableBtn: [],
|
tableBtn: [],
|
||||||
row: {},
|
row: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -420,19 +414,11 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
!this.edit && this.getCode('/base/equipment-maintain-plan/getCode');
|
|
||||||
this.getList('maintainer');
|
this.getList('maintainer');
|
||||||
this.getList('department');
|
this.getList('department');
|
||||||
this.getList('line');
|
this.getList('line');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// getCode
|
|
||||||
async getCode(url) {
|
|
||||||
this.formLoading = true;
|
|
||||||
const response = await this.$axios(url);
|
|
||||||
this.formLoading = false;
|
|
||||||
this.form.maintainOrderNumber = response.data || '';
|
|
||||||
},
|
|
||||||
handleSearchBarBtnClick(btn) {
|
handleSearchBarBtnClick(btn) {
|
||||||
console.log('btn', btn);
|
console.log('btn', btn);
|
||||||
switch (btn.btnName) {
|
switch (btn.btnName) {
|
||||||
@ -452,106 +438,23 @@ export default {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async addConfirm() {
|
|
||||||
console.log('11', this.showTable)
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.getConfirmed().then(confirm => {
|
|
||||||
console.log('111', confirm)
|
|
||||||
this.$axios({
|
|
||||||
url:
|
|
||||||
'/base/equipment-maintain-log/confirm?confirmPerson=' +
|
|
||||||
this.$store.getters.userId,
|
|
||||||
method: 'put',
|
|
||||||
data: [this.form.id],
|
|
||||||
}).then(res =>{
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.visible = false;
|
|
||||||
this.$emit("refreshDataList");
|
|
||||||
this.$message.success('已确认');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
this.visible = false;
|
|
||||||
this.$emit("refreshDataList");
|
|
||||||
this.$message.success('取消确认');
|
|
||||||
})
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getConfirmed() {
|
|
||||||
return this.$confirm('是否直接确认保养记录', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
async handleConfirm() {
|
async handleConfirm() {
|
||||||
this.btnLoading = true;
|
this.btnLoading = true;
|
||||||
// this.$nextTick(async () => {
|
this.$nextTick(async () => {
|
||||||
// const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
// url: '/base/equipment-maintain-log/update',
|
url: '/base/equipment-maintain-log/update',
|
||||||
// method: 'put',
|
method: 'put',
|
||||||
// data: {
|
|
||||||
// ...this.form,
|
|
||||||
// maintainWorker: this.form.maintainWorker.join(',')
|
|
||||||
// },
|
|
||||||
// });
|
|
||||||
// if (code == 0) {
|
|
||||||
// this.$modal.msgSuccess('更新成功');
|
|
||||||
// }
|
|
||||||
// this.btnLoading = false;
|
|
||||||
// this.$emit('refreshDataList');
|
|
||||||
// this.handleCancel();
|
|
||||||
// });
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 修改的提交
|
|
||||||
if (this.form.id != null) {
|
|
||||||
this.$axios({
|
|
||||||
url: '/base/equipment-maintain-log/update',
|
|
||||||
method: 'put',
|
|
||||||
data: {
|
|
||||||
...this.form,
|
|
||||||
maintainWorker: this.form.maintainWorker.join(','),
|
|
||||||
special: false,
|
|
||||||
relatePlan: 2
|
|
||||||
}
|
|
||||||
}).then((response) => {
|
|
||||||
this.$modal.msgSuccess('修改成功');
|
|
||||||
this.btnLoading = false;
|
|
||||||
this.$emit('refreshDataList');
|
|
||||||
this.handleCancel();
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 添加的提交
|
|
||||||
this.$axios({
|
|
||||||
url: '/base/equipment-maintain-log/create',
|
|
||||||
method: 'post',
|
|
||||||
data: {
|
data: {
|
||||||
...this.form,
|
...this.form,
|
||||||
maintainWorker: this.form.maintainWorker.join(','),
|
maintainWorker: this.form.maintainWorker.join(',')
|
||||||
special: false,
|
},
|
||||||
relatePlan: 2,
|
|
||||||
confirmed: false,
|
|
||||||
}
|
|
||||||
}).then((response) => {
|
|
||||||
this.$modal.msgSuccess('新增成功');
|
|
||||||
this.btnLoading = false;
|
|
||||||
this.form.id = response.data
|
|
||||||
this.row.id = response.data
|
|
||||||
this.showTable = true
|
|
||||||
this.isAdd = true
|
|
||||||
this.$emit('refreshDataList');
|
|
||||||
// this.handleCancel();
|
|
||||||
});
|
});
|
||||||
|
if (code == 0) {
|
||||||
|
this.$modal.msgSuccess('更新成功');
|
||||||
|
}
|
||||||
|
this.btnLoading = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.handleCancel();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -561,22 +464,15 @@ export default {
|
|||||||
|
|
||||||
init(row) {
|
init(row) {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
if (row) {
|
this.row = row;
|
||||||
this.row = row;
|
this.getInfo(row);
|
||||||
this.showTable = row ? true : false;
|
this.getAttrList(row);
|
||||||
this.$nextTick(() => {
|
|
||||||
if (row.id) {
|
|
||||||
this.getInfo(row.id);
|
|
||||||
this.getAttrList(row.id);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async getInfo(id) {
|
async getInfo(row) {
|
||||||
this.formLoading = true;
|
this.formLoading = true;
|
||||||
const res = await this.$axios(
|
const res = await this.$axios(
|
||||||
'/base/equipment-maintain-log/get?id=' + id
|
'/base/equipment-maintain-log/get?id=' + row.id
|
||||||
);
|
);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.form = res.data;
|
this.form = res.data;
|
||||||
@ -586,15 +482,15 @@ export default {
|
|||||||
this.formLoading = false;
|
this.formLoading = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
async getAttrList(id, condition = {}) {
|
async getAttrList(row, condition = {}) {
|
||||||
if (!id) id = this.row.id;
|
if (!row) row = this.row;
|
||||||
this.attrListLoading = true;
|
this.attrListLoading = true;
|
||||||
const res = await this.$axios({
|
const res = await this.$axios({
|
||||||
url: '/base/equipment-maintain-log-det/page',
|
url: '/base/equipment-maintain-log-det/page',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
...this.attrQuery.params,
|
...this.attrQuery.params,
|
||||||
logId: id,
|
logId: row.id,
|
||||||
...condition,
|
...condition,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -258,27 +258,17 @@ export default {
|
|||||||
this.$message.warning('请选择待确认的设备保养记录');
|
this.$message.warning('请选择待确认的设备保养记录');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$modal
|
const res = await this.$axios({
|
||||||
.confirm('是否确认所有选中保养单"?')
|
url: '/base/equipment-maintain-log/confirm',
|
||||||
.then(() => {
|
method: 'put',
|
||||||
return this.$axios({
|
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||||
url: '/base/equipment-maintain-log/confirm',
|
(item) => item.id
|
||||||
method: 'put',
|
),
|
||||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
});
|
||||||
(item) => item.id
|
if (res.code == 0) {
|
||||||
),
|
this.$message.success('确认成功');
|
||||||
});
|
this.getList();
|
||||||
// if (res.code == 0) {
|
}
|
||||||
// this.$message.success('确认成功');
|
|
||||||
// this.getList();
|
|
||||||
// }
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
this.getList();
|
|
||||||
res.code == 0 && this.$modal.msgSuccess('确认成功');
|
|
||||||
res.code != 0 && this.$modal.msgError('确认失败');
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -422,13 +412,9 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
// this.reset();
|
this.reset();
|
||||||
// this.open = true;
|
this.open = true;
|
||||||
// this.title = '添加待确认保养记录';
|
this.title = '添加待确认保养记录';
|
||||||
this.openUnplannedDrawer = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.unplanned.init();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getConfirmed() {
|
getConfirmed() {
|
||||||
@ -492,25 +478,15 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 确认 */
|
/** 确认 */
|
||||||
async handleConfirm(row) {
|
async handleConfirm(row) {
|
||||||
this.$modal
|
const res = await this.$axios({
|
||||||
.confirm('是否确认保养单"' + row.maintainOrderNumber + '"?')
|
url: '/base/equipment-maintain-log/confirm',
|
||||||
.then(() => {
|
method: 'put',
|
||||||
return this.$axios({
|
data: [row.id],
|
||||||
url: '/base/equipment-maintain-log/confirm',
|
});
|
||||||
method: 'put',
|
if (res.code == 0) {
|
||||||
data: [row.id],
|
this.$message.success('确认成功');
|
||||||
});
|
this.getList();
|
||||||
// if (res.code == 0) {
|
}
|
||||||
// this.$message.success('确认成功');
|
|
||||||
// this.getList();
|
|
||||||
// }
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
this.getList();
|
|
||||||
res.code == 0 && this.$modal.msgSuccess('确认成功');
|
|
||||||
res.code != 0 && this.$modal.msgError('确认失败');
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
},
|
||||||
/** 编辑 */
|
/** 编辑 */
|
||||||
async handleEdit(row) {
|
async handleEdit(row) {
|
||||||
|
@ -47,7 +47,6 @@
|
|||||||
<add-content
|
<add-content
|
||||||
v-if="addContent"
|
v-if="addContent"
|
||||||
ref="addContent"
|
ref="addContent"
|
||||||
:plan="true"
|
|
||||||
@refreshDataList="addContent = false" />
|
@refreshDataList="addContent = false" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -142,7 +141,7 @@ export default {
|
|||||||
label: '上次实际保养时间',
|
label: '上次实际保养时间',
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
},
|
},
|
||||||
{ prop: 'nextPlanMaintainTime', label: '下次计划保养时间', filter: parseTime },
|
{ prop: 'nextMaintainTime', label: '下次计划保养时间', filter: parseTime },
|
||||||
{ prop: 'maintainer', label: '计划保养人员' },
|
{ prop: 'maintainer', label: '计划保养人员' },
|
||||||
// { prop: 'equipmentName', label: '设备名称' },
|
// { prop: 'equipmentName', label: '设备名称' },
|
||||||
// { prop: 'equipmentCode', label: '设备编码' },
|
// { prop: 'equipmentCode', label: '设备编码' },
|
||||||
@ -220,13 +219,13 @@ export default {
|
|||||||
params.pageNo = undefined;
|
params.pageNo = undefined;
|
||||||
params.pageSize = undefined;
|
params.pageSize = undefined;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认导出所有设备保养计划数据项?')
|
.confirm('是否确认导出所有设备保养监控数据项?')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportMaintainMonitorExcel(params);
|
return exportMaintainMonitorExcel(params);
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.$download.excel(response, '设备保养计划.xls');
|
this.$download.excel(response, '设备保养监控.xls');
|
||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => { });
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-28 19:52:13
|
* @LastEditTime: 2024-02-27 10:33:31
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -22,6 +22,7 @@
|
|||||||
:rules="dataRule"
|
:rules="dataRule"
|
||||||
ref="dataForm"
|
ref="dataForm"
|
||||||
@keyup.enter.native="dataFormSubmit()"
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
|
label-width="100px"
|
||||||
label-position="top">
|
label-position="top">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -61,19 +62,19 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<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-input-number v-model="dataForm.maintenancePeriod" :min="0" controls-position="right" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入保养频率" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<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-input-number v-model="dataForm.confirmTimeLimit" :min="0" controls-position="right" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<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-input-number v-model="dataForm.maintainDuration" :min="0" controls-position="right" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入保养时长" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -219,12 +220,6 @@ export default {
|
|||||||
// 获取计划详情
|
// 获取计划详情
|
||||||
this.urlOptions.infoURL({ id: this.dataForm.id }).then(response => {
|
this.urlOptions.infoURL({ id: this.dataForm.id }).then(response => {
|
||||||
this.dataForm = response.data
|
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();
|
// this.getList();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-02-28 19:37:19
|
* @LastEditTime: 2024-02-23 19:48:12
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
class="drawer"
|
class="drawer"
|
||||||
size="60%">
|
size="60%">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ plan ? '详情' : '添加内容' }}
|
{{ '添加内容' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="visual-part">
|
<div class="visual-part">
|
||||||
@ -62,7 +62,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<base-table
|
<base-table
|
||||||
:table-props="plan ? tableProps1 : tableProps"
|
:table-props="tableProps"
|
||||||
:page="listQuery.pageNo"
|
:page="listQuery.pageNo"
|
||||||
:limit="listQuery.pageSize"
|
:limit="listQuery.pageSize"
|
||||||
:table-data="planList">
|
:table-data="planList">
|
||||||
@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
<div v-if="!isdetail" class="drawer-body__footer">
|
<div v-if="!isdetail" class="drawer-body__footer">
|
||||||
<el-button style="" @click="goback()">取消</el-button>
|
<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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -128,35 +128,13 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const tableProps1 = [
|
|
||||||
{
|
|
||||||
prop: 'equipmentName',
|
|
||||||
label: '设备名称',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'program',
|
|
||||||
label: '保养项目',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'maintenanceDes',
|
|
||||||
label: '保养描述',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [basicAdd],
|
mixins: [basicAdd],
|
||||||
components: { SmallTitle, attrAdd },
|
components: { SmallTitle, attrAdd },
|
||||||
props: {
|
|
||||||
plan: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableBtn,
|
tableBtn,
|
||||||
tableProps,
|
tableProps,
|
||||||
tableProps1,
|
|
||||||
addOrUpdateVisible: false,
|
addOrUpdateVisible: false,
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
isGetCode: false,
|
isGetCode: false,
|
||||||
|
@ -160,7 +160,6 @@ export default {
|
|||||||
label: '保养计划名称',
|
label: '保养计划名称',
|
||||||
placeholder: '请选择计划名称',
|
placeholder: '请选择计划名称',
|
||||||
param: 'maintainPlanId',
|
param: 'maintainPlanId',
|
||||||
filterable: true
|
|
||||||
},
|
},
|
||||||
// 开始结束时间
|
// 开始结束时间
|
||||||
{
|
{
|
||||||
@ -340,7 +339,6 @@ export default {
|
|||||||
startTime: null,
|
startTime: null,
|
||||||
relatePlan: null,
|
relatePlan: null,
|
||||||
equipmentId: null,
|
equipmentId: null,
|
||||||
confirmed: true
|
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@ -351,20 +349,20 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.initSearchBar();
|
this.initSearchBar();
|
||||||
if (this.$route.query) {
|
if (this.$route.query) {
|
||||||
// this.queryParams.equipmentId =
|
this.queryParams.equipmentId =
|
||||||
// this.$route.query?.equipmentId ?? undefined;
|
this.$route.query?.equipmentId ?? undefined;
|
||||||
this.queryParams.maintainPlanId =
|
this.queryParams.maintainPlanId =
|
||||||
this.$route.query?.maintainPlanId ?? undefined;
|
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.queryParams.startTime = this.$route.query?.createTime ?? undefined;
|
||||||
// this.searchBarFormConfig[0].defaultSelect =
|
|
||||||
// this.$route.query.equipmentId ?? undefined;
|
|
||||||
this.searchBarFormConfig[0].defaultSelect =
|
this.searchBarFormConfig[0].defaultSelect =
|
||||||
this.$route.query.maintainPlanId ?? undefined;
|
this.$route.query.equipmentId ?? undefined;
|
||||||
this.searchBarFormConfig[1].defaultSelect =
|
this.searchBarFormConfig[1].defaultSelect =
|
||||||
|
this.$route.query.maintainPlanId ?? undefined;
|
||||||
|
this.searchBarFormConfig[2].defaultSelect =
|
||||||
this.$route.query?.createTime ?? undefined;
|
this.$route.query?.createTime ?? undefined;
|
||||||
// this.searchBarFormConfig[3].defaultSelect =
|
this.searchBarFormConfig[3].defaultSelect =
|
||||||
// Number(this.$route.query.relatePlan) ?? undefined;
|
Number(this.$route.query.relatePlan) ?? undefined;
|
||||||
}
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
if (this.$route.query.addRecord) {
|
if (this.$route.query.addRecord) {
|
||||||
@ -385,24 +383,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
initSearchBar() {
|
initSearchBar() {
|
||||||
// this.http('/base/core-equipment/page', 'get', {
|
this.http('/base/core-equipment/page', 'get', {
|
||||||
// special: false,
|
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', {
|
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 100,
|
pageSize: 99
|
||||||
special: false
|
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
this.$set(
|
this.$set(
|
||||||
this.searchBarFormConfig[0],
|
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() {
|
getList() {
|
||||||
@ -547,7 +544,6 @@ export default {
|
|||||||
let params = { ...this.queryParams };
|
let params = { ...this.queryParams };
|
||||||
params.pageNo = undefined;
|
params.pageNo = undefined;
|
||||||
params.pageSize = undefined;
|
params.pageSize = undefined;
|
||||||
params.confirmed = true;
|
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认导出所有保养记录?')
|
.confirm('是否确认导出所有保养记录?')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@ -680,8 +680,7 @@ export default {
|
|||||||
file.type === 'image/jpg';
|
file.type === 'image/jpg';
|
||||||
return isJPG;
|
return isJPG;
|
||||||
};
|
};
|
||||||
return checkFileSize();
|
return checkFileSize() && checkFileType();
|
||||||
// return checkFileSize() && checkFileType();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// handlers
|
// handlers
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
label="操作"
|
label="操作"
|
||||||
:width="90"
|
:width="180"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleTableBtnClick" />
|
@clickBtn="handleTableBtnClick" />
|
||||||
</base-table>
|
</base-table>
|
||||||
@ -111,13 +111,11 @@ export default {
|
|||||||
{
|
{
|
||||||
prop: 'maintenanceStartTime',
|
prop: 'maintenanceStartTime',
|
||||||
label: '维修开始时间',
|
label: '维修开始时间',
|
||||||
width: 150,
|
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'maintenanceFinishTime',
|
prop: 'maintenanceFinishTime',
|
||||||
label: '维修结束时间',
|
label: '维修结束时间',
|
||||||
width: 150,
|
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
},
|
},
|
||||||
// { prop: 'maintenanceStartTime', label: '开始时间', filter: parseTime },
|
// { prop: 'maintenanceStartTime', label: '开始时间', filter: parseTime },
|
||||||
@ -130,7 +128,7 @@ export default {
|
|||||||
{ prop: 'maintenanceDetail', label: '维修描述', subcomponent: htmls }, // 没有参数
|
{ prop: 'maintenanceDetail', label: '维修描述', subcomponent: htmls }, // 没有参数
|
||||||
// { prop: 'repairman', label: '维修工', minWidth: 100, showOverflowtooltip: true },
|
// { prop: 'repairman', label: '维修工', minWidth: 100, showOverflowtooltip: true },
|
||||||
// { prop: 'repairmanPhone', 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: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
|
@ -136,11 +136,11 @@ export default {
|
|||||||
params.teamId = val.data.id
|
params.teamId = val.data.id
|
||||||
params.teamName = val.data.name
|
params.teamName = val.data.name
|
||||||
this.workOrderList.map(item => {
|
this.workOrderList.map(item => {
|
||||||
if (val.data.workOrderId === item.id) {
|
if (this.queryParams.workOrderId === item.id) {
|
||||||
this.workOrderName = item.name
|
this.workOrderName = item.name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
params.workOrderId = val.data.workOrderId
|
params.workOrderId = this.queryParams.workOrderId
|
||||||
params.workOrderName = this.workOrderName
|
params.workOrderName = this.workOrderName
|
||||||
params.roomNameDict = val.data.roomNameDict
|
params.roomNameDict = val.data.roomNameDict
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -1,97 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-form :inline="true" class="demo-form-inline">
|
|
||||||
<span class="blue-block"></span>
|
|
||||||
<el-form-item label="班次信息">
|
|
||||||
<el-select v-model="queryParams.classesId" placeholder="班次信息" style="width: 200px;" size="small" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="item in classesArr"
|
|
||||||
:key="item.id"
|
|
||||||
:label="(item.roomName?item.roomName:'')+'-'+item.name"
|
|
||||||
:value="item.id">
|
|
||||||
<span>{{ item.roomName }}-{{item.name}}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="班组信息">
|
|
||||||
<el-input v-model="queryParams.teamName" placeholder="班组信息" style="width: 200px;" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="上班时间">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="queryParams.tiemStr"
|
|
||||||
type="daterange"
|
|
||||||
format='yyyy-MM-dd'
|
|
||||||
value-format='yyyy-MM-dd'
|
|
||||||
range-separator='-'
|
|
||||||
style="width: 250px;"
|
|
||||||
size="small">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" size="small" @click="search">查询</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
|
|
||||||
export default {
|
|
||||||
name: 'searchArea',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
classesId: '',
|
|
||||||
teamName: '',
|
|
||||||
tiemStr: ''
|
|
||||||
},
|
|
||||||
classesArr: [],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.getGroupClass()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getGroupClass() {
|
|
||||||
groupClassesListAll().then(res => {
|
|
||||||
this.classesArr = res.data || []
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 查询
|
|
||||||
search() {
|
|
||||||
console.log(this.queryParams)
|
|
||||||
this.$emit('submit', this.queryParams)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="scss">
|
|
||||||
.demo-form-inline {
|
|
||||||
.el-date-editor .el-range__icon {
|
|
||||||
font-size: 16px;
|
|
||||||
color: #0B58FF;
|
|
||||||
}
|
|
||||||
.el-input__prefix .el-icon-date {
|
|
||||||
font-size: 16px;
|
|
||||||
color: #0B58FF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.separateStyle {
|
|
||||||
display: inline-block;
|
|
||||||
width: 1px;
|
|
||||||
height: 24px;
|
|
||||||
background: #E8E8E8;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
.demo-form-inline {
|
|
||||||
.blue-block {
|
|
||||||
display: inline-block;
|
|
||||||
width: 4px;
|
|
||||||
height: 16px;
|
|
||||||
background-color: #0B58FF;
|
|
||||||
border-radius: 1px;
|
|
||||||
margin-right: 8px;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,12 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-area @submit="buttonClick"/>
|
<search-bar
|
||||||
<!-- <search-bar
|
|
||||||
:formConfigs="formConfig"
|
:formConfigs="formConfig"
|
||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@headBtnClick="buttonClick"
|
@headBtnClick="buttonClick"
|
||||||
/> -->
|
/>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table
|
<base-table
|
||||||
:page="queryParams.pageNo"
|
:page="queryParams.pageNo"
|
||||||
@ -35,11 +34,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { groupTeamSchedulingPage } from '@/api/monitoring/teamProduction'
|
import { groupTeamSchedulingPage, groupClassesListAll } from '@/api/monitoring/teamProduction'
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
import TeamProductionDetail from './components/teamProductionDetail'
|
import TeamProductionDetail from './components/teamProductionDetail'
|
||||||
import { publicFormatter } from '@/utils/dict'
|
import { publicFormatter } from '@/utils/dict'
|
||||||
import SearchArea from './components/searchArea'
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'roomNameDict',
|
prop: 'roomNameDict',
|
||||||
@ -141,11 +139,12 @@ export default {
|
|||||||
paramVisible: false
|
paramVisible: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: { TeamProductionDetail, SearchArea },
|
components: { TeamProductionDetail },
|
||||||
mounted() {
|
mounted() {
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
this.tableH = this.tableHeight(260)
|
this.tableH = this.tableHeight(260)
|
||||||
})
|
})
|
||||||
|
this.getGroupClass()
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -164,6 +163,11 @@ export default {
|
|||||||
this.total = res.data.total || 0
|
this.total = res.data.total || 0
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getGroupClass() {
|
||||||
|
groupClassesListAll().then(res => {
|
||||||
|
this.formConfig[0].selectOptions = res.data || []
|
||||||
|
})
|
||||||
|
},
|
||||||
handleClick(val) {
|
handleClick(val) {
|
||||||
console.log(val)
|
console.log(val)
|
||||||
this.paramVisible = true
|
this.paramVisible = true
|
||||||
|
@ -236,8 +236,13 @@ export default {
|
|||||||
btnName: '终止',
|
btnName: '终止',
|
||||||
showTip: '终止',
|
showTip: '终止',
|
||||||
showParam: {
|
showParam: {
|
||||||
type: '&',
|
type: '|',
|
||||||
data: [
|
data: [
|
||||||
|
{
|
||||||
|
type: 'equal',
|
||||||
|
name: 'status',
|
||||||
|
value: 2
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'equal',
|
type: 'equal',
|
||||||
name: 'status',
|
name: 'status',
|
||||||
@ -278,7 +283,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'less',
|
type: 'less',
|
||||||
name: 'status',
|
name: 'status',
|
||||||
value: 2
|
value: 3
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -378,9 +383,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 完成,终止,作废
|
// 完成,终止,作废
|
||||||
handleEditStatus(val, tip, status) {
|
handleEditStatus(val, tip, status) {
|
||||||
let _this = this
|
console.log(val)
|
||||||
if (val.orderIdNum > 0) {// 有下级订单
|
if (val.orderIdNum > 0) {// 有下级订单
|
||||||
_this.$confirm('是否将"'+tip+'"操作同步至下级订单和工单?','确认信息', {
|
this.$confirm('是否将"'+tip+'"操作同步至下级订单和工单?','确认信息', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
confirmButtonText: '同步',
|
confirmButtonText: '同步',
|
||||||
@ -388,26 +393,26 @@ export default {
|
|||||||
}).then(function() {
|
}).then(function() {
|
||||||
console.log('同步')
|
console.log('同步')
|
||||||
groupOrderStatusSet({ id: val.id, status: status, isSync: true}).then(() => {
|
groupOrderStatusSet({ id: val.id, status: status, isSync: true}).then(() => {
|
||||||
_this.getList();
|
this.getList();
|
||||||
_this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
})
|
})
|
||||||
}).catch(action => {
|
}).catch(action => {
|
||||||
if (action === 'cancel') {
|
if (action === 'cancel') {
|
||||||
console.log('不同步')
|
console.log('不同步')
|
||||||
groupOrderStatusSet({ id: val.id, status: status, isSync: false}).then(() => {
|
groupOrderStatusSet({ id: val.id, status: status, isSync: false}).then(() => {
|
||||||
_this.getList();
|
this.getList();
|
||||||
_this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
})
|
})
|
||||||
}else {
|
}else {
|
||||||
return console.log('关闭')
|
return console.log('关闭')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{// 无下级订单
|
}else{// 无下级订单
|
||||||
_this.$modal.confirm('是否确认"'+tip+'"集团订单名称为"' + val.name + '"的数据项?').then(function() {
|
this.$modal.confirm('是否确认"'+tip+'"集团订单名称为"' + val.name + '"的数据项?').then(function() {
|
||||||
return groupOrderStatusSet({ id: val.id, status: status})
|
return groupOrderStatusSet({ id: val.id, status: status})
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
_this.getList();
|
this.getList();
|
||||||
_this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -293,7 +293,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'less',
|
type: 'less',
|
||||||
name: 'status',
|
name: 'status',
|
||||||
value: 2
|
value: 3
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-06 15:15:30
|
* @Date: 2023-11-06 15:15:30
|
||||||
* @LastEditTime: 2024-02-28 09:58:34
|
* @LastEditTime: 2024-02-18 14:07:08
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -15,11 +15,35 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="班组" prop="teamId">
|
||||||
|
<el-select v-model="dataForm.teamId" placeholder="请选择班组">
|
||||||
|
<el-option v-for="dict in teamList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="数量" prop="num">
|
<el-form-item label="数量" prop="num">
|
||||||
<el-input v-model="dataForm.num" placeholder="请输入数量" />
|
<el-input v-model="dataForm.num" placeholder="请输入数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="产线" prop="lineId">
|
||||||
|
<el-select v-model="dataForm.lineId" placeholder="请选择产线">
|
||||||
|
<el-option v-for="dict in lineList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="报废原因" prop="detId">
|
||||||
|
<el-select v-model="dataForm.detId" placeholder="请选择报废原因">
|
||||||
|
<el-option v-for="dict in detList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="报废时间" prop="logTime">
|
<el-form-item label="报废时间" prop="logTime">
|
||||||
<el-date-picker v-model="dataForm.logTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
<el-date-picker v-model="dataForm.logTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
@ -30,28 +54,12 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="产线" prop="lineId">
|
<el-form-item label="来源" prop="source">
|
||||||
<el-select v-model="dataForm.lineId" placeholder="请选择产线" @change="getWorksectionById">
|
<el-select v-model="dataForm.source" placeholder="请选择来源">
|
||||||
<el-option v-for="dict in lineList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
<el-option v-for="dict in sourceList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="工段" prop="sectionId">
|
|
||||||
<el-select v-model="dataForm.sectionId" placeholder="请选择工段">
|
|
||||||
<el-option v-for="dict in sectionList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="报废原因" prop="detId">
|
|
||||||
<el-select v-model="dataForm.detId" placeholder="请选择报废原因" multiple>
|
|
||||||
<el-option v-for="dict in detList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="描述" prop="description">
|
<el-form-item label="描述" prop="description">
|
||||||
<el-input v-model="dataForm.description" placeholder="请输入描述" />
|
<el-input v-model="dataForm.description" placeholder="请输入描述" />
|
||||||
@ -68,7 +76,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicAdd from './basic-add';
|
import basicAdd from '../../../core/mixins/basic-add';
|
||||||
import {
|
import {
|
||||||
createQualityScrapLog, updateQualityScrapLog, getQualityScrapLog, getWorkOrderList,
|
createQualityScrapLog, updateQualityScrapLog, getQualityScrapLog, getWorkOrderList,
|
||||||
getTeamList, getDetList,getLineList } from "@/api/base/qualityScrapLog";
|
getTeamList, getDetList,getLineList } from "@/api/base/qualityScrapLog";
|
||||||
@ -91,7 +99,6 @@ export default {
|
|||||||
workOrderList: [],
|
workOrderList: [],
|
||||||
detList:[],
|
detList:[],
|
||||||
teamList: [],
|
teamList: [],
|
||||||
sectionList:[],
|
|
||||||
sourceList: [
|
sourceList: [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
@ -110,7 +117,6 @@ export default {
|
|||||||
workOrderId: null,
|
workOrderId: null,
|
||||||
teamId: undefined,
|
teamId: undefined,
|
||||||
num: undefined,
|
num: undefined,
|
||||||
sectionId:undefined,
|
|
||||||
lineId:undefined,
|
lineId:undefined,
|
||||||
description:undefined,
|
description:undefined,
|
||||||
// description: undefined,
|
// description: undefined,
|
||||||
@ -131,7 +137,6 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
console.log('我看看', this.dataForm)
|
console.log('我看看', this.dataForm)
|
||||||
this.getCurrentTime()
|
this.getCurrentTime()
|
||||||
this.getWorksectionById()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCurrentTime() {
|
getCurrentTime() {
|
||||||
@ -192,43 +197,7 @@ export default {
|
|||||||
// console.log(this.formConfig[0].selectOptions);
|
// console.log(this.formConfig[0].selectOptions);
|
||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getWorksectionById(lineId) {
|
|
||||||
if (lineId) {
|
|
||||||
const { code, data } = await this.$axios({
|
|
||||||
url: '/base/core-workshop-section/listByParentId',
|
|
||||||
method: 'get',
|
|
||||||
params: {
|
|
||||||
id: lineId,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
if (code == 0) {
|
|
||||||
console.log(data)
|
|
||||||
this.sectionList = data.map((item) => {
|
|
||||||
return {
|
|
||||||
name: item.name,
|
|
||||||
id: item.id,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$axios({
|
|
||||||
url: '/base/core-workshop-section/listAll',
|
|
||||||
method: 'get',
|
|
||||||
// params: {
|
|
||||||
// id: lineId,
|
|
||||||
// },
|
|
||||||
}).then((res) => {
|
|
||||||
// console.log(data)
|
|
||||||
this.sectionList = res.data.map((item) => {
|
|
||||||
return {
|
|
||||||
name: item.name,
|
|
||||||
id: item.id,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// setMaterialCode() {
|
// setMaterialCode() {
|
||||||
// const chooseM = this.materialList.filter(item => {
|
// const chooseM = this.materialList.filter(item => {
|
||||||
// return item.id === this.dataForm.materialId
|
// return item.id === this.dataForm.materialId
|
||||||
|
@ -1,106 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: zhp
|
|
||||||
* @Date: 2024-02-28 09:51:25
|
|
||||||
* @LastEditTime: 2024-02-28 10:05:00
|
|
||||||
* @LastEditors: zhp
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
/* eslint-disable */
|
|
||||||
return {
|
|
||||||
urlOptions: {
|
|
||||||
createURL: '',
|
|
||||||
updateURL: '',
|
|
||||||
infoURL: '',
|
|
||||||
codeURL: '',
|
|
||||||
getOption: false,
|
|
||||||
isGetCode: false,
|
|
||||||
optionArrUrl: [],
|
|
||||||
optionArr: {}
|
|
||||||
},
|
|
||||||
visible: false,
|
|
||||||
setData: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
},
|
|
||||||
activated() {
|
|
||||||
},
|
|
||||||
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 => {
|
|
||||||
console.log(response)
|
|
||||||
this.dataForm = response.data
|
|
||||||
this.dataForm.detId = response.data.detIdList
|
|
||||||
this.dataForm.logTime = new Date(response.data.createTime)
|
|
||||||
|
|
||||||
// if (this.setData) {
|
|
||||||
// this.setDataForm()
|
|
||||||
// }
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
if (this.urlOptions.isGetCode) {
|
|
||||||
this.getCode()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getCode() {
|
|
||||||
this.urlOptions.codeURL()
|
|
||||||
.then(({ data: res }) => {
|
|
||||||
this.dataForm.code = res;
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
getArr() {
|
|
||||||
const params = {
|
|
||||||
pageSize: 100,
|
|
||||||
pageNo: 1,
|
|
||||||
}
|
|
||||||
this.urlOptions.optionArrUrl.forEach((item, index) => {
|
|
||||||
item(params).then(({ data: res }) => {
|
|
||||||
this.$set(this.urlOptions.optionArr, `arr${index}`, res.list)
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 表单提交
|
|
||||||
dataFormSubmit() {
|
|
||||||
this.$refs["dataForm"].validate((valid) => {
|
|
||||||
if (!valid) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// 修改的提交
|
|
||||||
let str = this.dataForm.detId.join(',')
|
|
||||||
this.dataForm.detId = str
|
|
||||||
if (this.dataForm.id) {
|
|
||||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.visible = false;
|
|
||||||
this.$emit("refreshDataList");
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 添加的提交
|
|
||||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.visible = false;
|
|
||||||
this.$emit("refreshDataList");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
formClear() {
|
|
||||||
this.$refs.dataForm.resetFields()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-06 15:15:30
|
* @Date: 2023-11-06 15:15:30
|
||||||
* @LastEditTime: 2024-02-28 10:13:10
|
* @LastEditTime: 2023-12-01 10:58:25
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -15,19 +15,43 @@
|
|||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="工单号" prop="workOrderId">
|
<el-form-item label="工单号" prop="workOrderId">
|
||||||
<el-select disabled v-model="dataForm.workOrderId" placeholder="请选择工单号">
|
<el-select v-model="dataForm.workOrderId" placeholder="请选择工单号" disabled>
|
||||||
<el-option v-for="dict in workOrderList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
<el-option v-for="dict in workOrderList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="数量" prop="num">
|
<el-form-item label="班组" prop="teamId">
|
||||||
<el-input disabled v-model="dataForm.num" placeholder="请输入数量" />
|
<el-select v-model="dataForm.teamId" placeholder="请选择班组" disabled>
|
||||||
|
<el-option v-for="dict in teamList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="数量" prop="sum">
|
||||||
|
<el-input v-model="dataForm.sum" placeholder="请输入数量" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="产线" prop="lineId">
|
||||||
|
<el-select v-model="dataForm.lineId" placeholder="请选择产线" disabled>
|
||||||
|
<el-option v-for="dict in lineList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="报废原因" prop="detId">
|
||||||
|
<el-select v-model="dataForm.detId" placeholder="请选择报废原因" disabled>
|
||||||
|
<el-option v-for="dict in detList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="报废时间" prop="logTime">
|
<el-form-item label="报废时间" prop="logTime">
|
||||||
<el-date-picker disabled v-model="dataForm.logTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
<el-date-picker v-model="dataForm.logTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" disabled
|
||||||
placeholder="选择日期">
|
placeholder="选择日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -35,28 +59,12 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="产线" prop="lineId">
|
<el-form-item label="来源" prop="source">
|
||||||
<el-select disabled v-model="dataForm.lineId" placeholder="请选择产线" @change="getWorksectionById">
|
<el-select v-model="dataForm.source" placeholder="请选择来源" disabled>
|
||||||
<el-option v-for="dict in lineList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
<el-option v-for="dict in sourceList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="工段" prop="sectionId">
|
|
||||||
<el-select v-model="dataForm.sectionId" placeholder="请选择工段" disabled>
|
|
||||||
<el-option v-for="dict in sectionList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="报废原因" prop="detId">
|
|
||||||
<el-select v-model="dataForm.detId" placeholder="请选择报废原因" multiple disabled>
|
|
||||||
<el-option v-for="dict in detList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="描述" prop="description">
|
<el-form-item label="描述" prop="description">
|
||||||
<el-input v-model="dataForm.description" placeholder="请输入描述" disabled />
|
<el-input v-model="dataForm.description" placeholder="请输入描述" disabled />
|
||||||
@ -139,7 +147,6 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
console.log('我看看', this.dataForm)
|
console.log('我看看', this.dataForm)
|
||||||
this.getCurrentTime()
|
this.getCurrentTime()
|
||||||
// this.getWorksectionById()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// init() {
|
// init() {
|
||||||
@ -191,7 +198,6 @@ export default {
|
|||||||
// console.log(this.formConfig[0].selectOptions);
|
// console.log(this.formConfig[0].selectOptions);
|
||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
})
|
})
|
||||||
|
|
||||||
getTeamList().then((res) => {
|
getTeamList().then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
@ -201,46 +207,16 @@ export default {
|
|||||||
id: item.id
|
id: item.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.$axios({
|
|
||||||
url: '/base/core-workshop-section/listAll',
|
|
||||||
method: 'get',
|
|
||||||
// params: {
|
|
||||||
// id: lineId,
|
|
||||||
// },
|
|
||||||
}).then((res) => {
|
|
||||||
// console.log(data)
|
|
||||||
this.sectionList = res.data.map((item) => {
|
|
||||||
return {
|
|
||||||
name: item.name,
|
|
||||||
id: item.id,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
})
|
|
||||||
// if (code == 0) {
|
|
||||||
|
|
||||||
// }
|
|
||||||
// console.log(this.formConfig[0].selectOptions);
|
// console.log(this.formConfig[0].selectOptions);
|
||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getWorksectionById(lineId) {
|
setMaterialCode() {
|
||||||
const { code, data } = await this.$axios({
|
const chooseM = this.materialList.filter(item => {
|
||||||
url: '/base/core-workshop-section/listByParentId',
|
return item.id === this.dataForm.materialId
|
||||||
method: 'get',
|
})
|
||||||
params: {
|
this.dataForm.materialCode = chooseM[0].code
|
||||||
id: lineId,
|
}
|
||||||
},
|
|
||||||
});
|
|
||||||
if (code == 0) {
|
|
||||||
console.log(data)
|
|
||||||
this.sectionList = data.map((item) => {
|
|
||||||
return {
|
|
||||||
name: item.name,
|
|
||||||
id: item.id,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -30,41 +30,32 @@ import {
|
|||||||
} from '@/api/base/qualityScrapLog';
|
} from '@/api/base/qualityScrapLog';
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
// {
|
{
|
||||||
// prop: 'createTime',
|
prop: 'createTime',
|
||||||
// label: '添加时间',
|
label: '添加时间',
|
||||||
// filter: parseTime
|
filter: parseTime
|
||||||
// },
|
|
||||||
{
|
|
||||||
prop: 'logTime',
|
|
||||||
label: '报废时间',
|
|
||||||
filter: parseTime
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'lineName',
|
|
||||||
label: '产线名称'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'sectionName',
|
|
||||||
label: '工段'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderName',
|
prop: 'workOrderName',
|
||||||
label: '工单名称'
|
label: '工单'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'num',
|
prop: 'teamName',
|
||||||
label: '数量'
|
label: '班组'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'detContent',
|
prop: 'detContent',
|
||||||
label: '报废原因'
|
label: '报废原因'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'source',
|
prop: 'logTime',
|
||||||
label: '来源',
|
label: '报废时间',
|
||||||
filter: (val) => val == 1 ? '平板端' : '网页端'
|
filter: parseTime
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'num',
|
||||||
|
label: '数量'
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -286,7 +286,6 @@ export default {
|
|||||||
// this.searchBarFormConfig[0].defaultSelect = [];
|
// this.searchBarFormConfig[0].defaultSelect = [];
|
||||||
// }
|
// }
|
||||||
this.getList()
|
this.getList()
|
||||||
this.getDict()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 获取搜索栏的产线列表 */
|
/** 获取搜索栏的产线列表 */
|
||||||
@ -321,7 +320,7 @@ export default {
|
|||||||
// },
|
// },
|
||||||
getList() {
|
getList() {
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
// this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
@ -331,7 +330,7 @@ export default {
|
|||||||
const {
|
const {
|
||||||
data: { data, otherList, otherMap, nameData },
|
data: { data, otherList, otherMap, nameData },
|
||||||
} = await getStatisticalDataPage(this.queryParams)
|
} = await getStatisticalDataPage(this.queryParams)
|
||||||
// console.log(this.queryParams);
|
console.log(this.queryParams);
|
||||||
this.dynamicProps = this.filterNameData(nameData)
|
this.dynamicProps = this.filterNameData(nameData)
|
||||||
this.list = this.filterData(data);
|
this.list = this.filterData(data);
|
||||||
},
|
},
|
||||||
@ -374,7 +373,7 @@ export default {
|
|||||||
|
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
}
|
||||||
// console.log(val);
|
console.log(val);
|
||||||
}
|
}
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
// handleQuery() {
|
// handleQuery() {
|
||||||
|
Loading…
Reference in New Issue
Block a user