Compare commits
7 Commits
319e0ac90d
...
df530abb90
Author | SHA1 | Date | |
---|---|---|---|
df530abb90 | |||
8f1e5212e3 | |||
|
5dd299e549 | ||
|
511a00d0a3 | ||
d5b71c4d7d | |||
|
43d0a2668d | ||
a492fe4c87 |
@ -6,7 +6,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"local": "vue-cli-service serve --mode local",
|
"local": "vue-cli-service serve --mode local",
|
||||||
"dev": "vue-cli-service serve --mode dev",
|
"dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode dev",
|
||||||
"front": "vue-cli-service serve --mode front",
|
"front": "vue-cli-service serve --mode front",
|
||||||
"build:prod": "vue-cli-service build --mode prod",
|
"build:prod": "vue-cli-service build --mode prod",
|
||||||
"build:stage": "vue-cli-service build --mode stage",
|
"build:stage": "vue-cli-service build --mode stage",
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @Date: 2023-10-21 11:50:46
|
* @Date: 2023-10-21 11:50:46
|
||||||
* @LastEditTime: 2023-10-30 14:37:28
|
* @LastEditTime: 2023-10-30 14:37:28
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
@ -65,4 +65,11 @@ export function getCoreDepartmentList(query) {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getDepartmentList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/dept/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -8,7 +8,13 @@ export function createGroupRule(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 作废排班规则
|
||||||
|
export function disableGroupRule(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/group-scheduling-rule/disable?id=' + id,
|
||||||
|
method: 'post',
|
||||||
|
})
|
||||||
|
}
|
||||||
// 更新排班规则基础信息
|
// 更新排班规则基础信息
|
||||||
export function updateGroupRule(data) {
|
export function updateGroupRule(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -5,13 +5,6 @@
|
|||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
/*
|
|
||||||
* @Author: zhp
|
|
||||||
* @Date: 2024-07-12 15:31:41
|
|
||||||
* @LastEditTime: 2024-07-22 09:33:20
|
|
||||||
* @LastEditors: zhp
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
@ -26,7 +19,7 @@ export function getItemPageData(data) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/base/equipment-check-program/page',
|
url: '/base/equipment-check-program/page',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,15 +38,8 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="发货负责人" prop="deliveryPersonId">
|
<el-form-item label="发货负责人" prop="deliveryPerson">
|
||||||
<el-select v-model="form.deliveryPersonId" placeholder="请选择" style="width: 100%;" filterable>
|
<el-input v-model="form.deliveryPerson"></el-input>
|
||||||
<el-option
|
|
||||||
v-for="item in personList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
@ -75,7 +68,6 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getWorkerList } from '@/api/base/worker'
|
|
||||||
import { deliveryLogCreate, deliveryLogUpdate, getDeliveryLog, listOrderList } from '@/api/base/delivery'
|
import { deliveryLogCreate, deliveryLogUpdate, getDeliveryLog, listOrderList } from '@/api/base/delivery'
|
||||||
export default {
|
export default {
|
||||||
name: 'AddOrUpdate',
|
name: 'AddOrUpdate',
|
||||||
@ -87,7 +79,7 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
deliveryTime: null,
|
deliveryTime: null,
|
||||||
deliveryPersonId: '',
|
deliveryPerson: '',
|
||||||
principal: '',
|
principal: '',
|
||||||
principalCall: '',
|
principalCall: '',
|
||||||
principalCost: 0.00,
|
principalCost: 0.00,
|
||||||
@ -100,7 +92,6 @@ export default {
|
|||||||
code: [{ required: true, message: "发货单号不能为空", trigger: "blur" }]
|
code: [{ required: true, message: "发货单号不能为空", trigger: "blur" }]
|
||||||
},
|
},
|
||||||
orderList: [],
|
orderList: [],
|
||||||
personList: []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -118,9 +109,6 @@ export default {
|
|||||||
listOrderList().then(res => {
|
listOrderList().then(res => {
|
||||||
this.orderList = res.data || []
|
this.orderList = res.data || []
|
||||||
})
|
})
|
||||||
getWorkerList().then(res => {
|
|
||||||
this.personList = res.data || []
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs['addOrUpdate'].validate((valid) => {
|
this.$refs['addOrUpdate'].validate((valid) => {
|
||||||
|
@ -252,7 +252,7 @@ export default {
|
|||||||
computed: {},
|
computed: {},
|
||||||
created() {
|
created() {
|
||||||
this.fillLineOptions();
|
this.fillLineOptions();
|
||||||
this.fillProductOptions();
|
// this.fillProductOptions();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// window.addEventListener('resize', () => {
|
// window.addEventListener('resize', () => {
|
||||||
@ -284,23 +284,23 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
async fillProductOptions() {
|
// async fillProductOptions() {
|
||||||
const { data } = await this.$axios({
|
// const { data } = await this.$axios({
|
||||||
url: '/base/core-product/listAll',
|
// url: '/base/core-product/listAll',
|
||||||
method: 'get',
|
// method: 'get',
|
||||||
});
|
// });
|
||||||
const cfg = this.searchBarFormConfig.find(
|
// const cfg = this.searchBarFormConfig.find(
|
||||||
(item) => item.__index == 'product'
|
// (item) => item.__index == 'product'
|
||||||
);
|
// );
|
||||||
this.$set(
|
// this.$set(
|
||||||
cfg,
|
// cfg,
|
||||||
'selectOptions',
|
// 'selectOptions',
|
||||||
data.map((item) => ({
|
// data.map((item) => ({
|
||||||
id: item.id,
|
// id: item.id,
|
||||||
name: item.name,
|
// name: item.name,
|
||||||
}))
|
// }))
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
|
|
||||||
async getList() {
|
async getList() {
|
||||||
const { data } = await this.$axios({
|
const { data } = await this.$axios({
|
||||||
|
@ -1,160 +1,100 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-07-31 09:48:36
|
* @LastEditTime: 2024-11-18 09:51:03
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" :before-close="beforeClose"
|
||||||
:visible.sync="visible"
|
class="drawer" size="60%">
|
||||||
:show-close="false"
|
<small-title slot="title" :no-padding="true">
|
||||||
:wrapper-closable="true"
|
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||||
:before-close="beforeClose"
|
</small-title>
|
||||||
class="drawer"
|
<div class="content">
|
||||||
size="60%">
|
<div class="visual-part">
|
||||||
<small-title slot="title" :no-padding="true">
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
label-width="100px" label-position="top">
|
||||||
</small-title>
|
<el-row :gutter="20">
|
||||||
<div class="content">
|
<el-col :span="8">
|
||||||
<div class="visual-part">
|
<el-form-item label="巡检单名称" prop="name">
|
||||||
<el-form
|
<el-input v-model="dataForm.name" :disabled="isdetail" placeholder="请输入巡检单名称" />
|
||||||
:model="dataForm"
|
</el-form-item>
|
||||||
:rules="dataRule"
|
</el-col>
|
||||||
ref="dataForm"
|
<el-col :span="8">
|
||||||
@keyup.enter.native="dataFormSubmit()"
|
<el-form-item label="部门" prop="departmentId">
|
||||||
label-width="100px"
|
<el-select v-model="dataForm.departmentId" :disabled="isdetail" :placeholder="`请选择部门`"
|
||||||
label-position="top">
|
style="width: 100%">
|
||||||
<el-row :gutter="20">
|
<el-option v-for="opt in departmentOptions" :key="opt.id" :label="opt.name" :value="opt.id" />
|
||||||
<el-col :span="8">
|
</el-select>
|
||||||
<el-form-item label="巡检单名称" prop="name">
|
</el-form-item>
|
||||||
<el-input v-model="dataForm.name" :disabled="isdetail" placeholder="请输入巡检单名称" />
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="8">
|
||||||
</el-col>
|
<el-form-item label="班次" prop="groupClass">
|
||||||
<el-col :span="8">
|
<el-select v-model="dataForm.groupClass" filterable clearable multiple :disabled="isdetail"
|
||||||
<el-form-item label="部门" prop="departmentId">
|
style="width: 100%" placeholder="请选择班次">
|
||||||
<el-select
|
<el-option v-for="d in groupOptions" :key="d.id" :label="d.label" :value="d.label" />
|
||||||
v-model="dataForm.departmentId"
|
</el-select>
|
||||||
:disabled="isdetail"
|
</el-form-item>
|
||||||
:placeholder="`请选择部门`"
|
</el-col>
|
||||||
style="width: 100%">
|
</el-row>
|
||||||
<el-option
|
<el-row :gutter="20">
|
||||||
v-for="opt in departmentOptions"
|
<el-col :span="8">
|
||||||
:key="opt.id"
|
<el-form-item label="巡检人" prop="checkPerson">
|
||||||
:label="opt.name"
|
<!-- <el-input v-model="dataForm.checkPerson" :disabled="isdetail" placeholder="请输入巡检人" /> -->
|
||||||
:value="opt.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="班次" prop="groupClass">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.groupClass"
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
multiple
|
|
||||||
:disabled="isdetail"
|
|
||||||
style="width: 100%"
|
|
||||||
placeholder="请选择班次">
|
|
||||||
<el-option
|
|
||||||
v-for="d in groupOptions"
|
|
||||||
:key="d.id"
|
|
||||||
:label="d.label"
|
|
||||||
:value="d.label" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="巡检人" prop="checkPerson">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.checkPerson"
|
|
||||||
:placeholder="`请选择巡检人`"
|
|
||||||
multiple
|
|
||||||
clearable
|
|
||||||
:disabled="isdetail"
|
|
||||||
filterable
|
|
||||||
style="width: 100%">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in inspectorOptions"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.label" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="实际巡检时间" prop="actualCheckTime">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="dataForm.actualCheckTime"
|
|
||||||
type="datetime"
|
|
||||||
:disabled="isdetail"
|
|
||||||
placeholder="请选择实际巡检时间"
|
|
||||||
value-format="timestamp"
|
|
||||||
style="width: 100%" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="idAttrShow">
|
<el-select v-model="dataForm.checkPerson" :placeholder="`请选择巡检人`" multiple clearable
|
||||||
<small-title>
|
:disabled="isdetail" filterable style="width: 100%">
|
||||||
巡检内容
|
<el-option v-for="opt in inspectorOptions" :key="opt.value" :label="opt.label" :value="opt.label" />
|
||||||
</small-title>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="实际巡检时间" prop="actualCheckTime">
|
||||||
|
<el-date-picker v-model="dataForm.actualCheckTime" type="datetime" :disabled="isdetail"
|
||||||
|
placeholder="请选择实际巡检时间" value-format="timestamp" style="width: 100%" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-if="!isdetail" style="display: flex">
|
<div v-if="idAttrShow">
|
||||||
<SearchBar
|
<small-title>
|
||||||
:formConfigs="searchBarFormConfig"
|
巡检内容
|
||||||
ref="attr-search-bar"
|
</small-title>
|
||||||
@headBtnClick="handleSearchBarBtnClick" />
|
|
||||||
<!-- <div class="action_btn"> -->
|
|
||||||
<el-button type="text" class="action_btn" @click="addNew()">
|
|
||||||
<span style="display: inline-block;">
|
|
||||||
<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
|
|
||||||
<span class="add">添加内容</span>
|
|
||||||
</span>
|
|
||||||
</el-button>
|
|
||||||
<!-- </div> -->
|
|
||||||
</div>
|
|
||||||
<base-table
|
|
||||||
:table-props="tableProps"
|
|
||||||
:page="listQuery.pageNo"
|
|
||||||
:limit="listQuery.pageSize"
|
|
||||||
:table-data="detList">
|
|
||||||
<method-btn
|
|
||||||
v-if="!isdetail"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="120"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick" />
|
|
||||||
</base-table>
|
|
||||||
<pagination
|
|
||||||
v-show="listQuery.total > 0"
|
|
||||||
:total="listQuery.total"
|
|
||||||
:page.sync="listQuery.pageNo"
|
|
||||||
:limit.sync="listQuery.pageSize"
|
|
||||||
:page-sizes="[5, 10, 15]"
|
|
||||||
@pagination="getList" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
<div v-if="!isdetail" style="display: flex">
|
||||||
|
<SearchBar :formConfigs="searchBarFormConfig" ref="attr-search-bar" @headBtnClick="handleSearchBarBtnClick" />
|
||||||
|
<!-- <div class="action_btn"> -->
|
||||||
|
<el-button type="text" class="action_btn" @click="addNew()">
|
||||||
|
<span style="display: inline-block;">
|
||||||
|
<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
|
||||||
|
<span class="add">添加内容</span>
|
||||||
|
</span>
|
||||||
|
</el-button>
|
||||||
|
<!-- </div> -->
|
||||||
|
</div>
|
||||||
|
<base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
|
||||||
|
:table-data="detList">
|
||||||
|
<method-btn v-if="!isdetail" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
||||||
|
@clickBtn="handleClick" />
|
||||||
|
</base-table>
|
||||||
|
<pagination v-show="listQuery.total > 0" :total="listQuery.total" :page.sync="listQuery.pageNo"
|
||||||
|
:limit.sync="listQuery.pageSize" :page-sizes="[5, 10, 15]" @pagination="getList" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-if="!isdetail" class="drawer-body__footer">
|
</div>
|
||||||
<el-button @click="goback()">取消</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 v-else type="primary" @click="dataFormSubmit()">保存</el-button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<attr-add
|
<div v-if="!isdetail" class="drawer-body__footer">
|
||||||
v-if="addOrUpdateVisible"
|
<el-button @click="goback()">取消</el-button>
|
||||||
ref="addOrUpdate"
|
<!-- <el-button :disabled="isdetail" @click="init(dataForm.id)">重置</el-button> -->
|
||||||
:order-id="dataForm.id"
|
<el-button v-if="isshowConfirm" type="primary" @click="confirmIns()">保存</el-button>
|
||||||
@refreshDataList="getList" />
|
<el-button v-else type="primary" @click="dataFormSubmit()">保存</el-button>
|
||||||
</el-drawer>
|
</div>
|
||||||
|
|
||||||
|
<attr-add v-if="addOrUpdateVisible" ref="addOrUpdate" :order-id="dataForm.id" @refreshDataList="getList" />
|
||||||
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -305,15 +245,15 @@ export default {
|
|||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const workerlist = await this.$axios('/base/core-worker/listAll');
|
// const workerlist = await this.$axios('/base/core-worker/listAll');
|
||||||
if (workerlist.code == 0) {
|
// if (workerlist.code == 0) {
|
||||||
inspectorList = inspectorList.concat(
|
// inspectorList = inspectorList.concat(
|
||||||
workerlist.data.map((item) => ({
|
// workerlist.data.map((item) => ({
|
||||||
label: item.name,
|
// label: item.name,
|
||||||
value: item.id,
|
// value: item.id,
|
||||||
}))
|
// }))
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
this.inspectorOptions = inspectorList;
|
this.inspectorOptions = inspectorList;
|
||||||
// const res1 = await groupClassesListAll();
|
// const res1 = await groupClassesListAll();
|
||||||
// this.groupOptions = res1.data || [];
|
// this.groupOptions = res1.data || [];
|
||||||
@ -453,9 +393,12 @@ export default {
|
|||||||
// }
|
// }
|
||||||
this.$axios({
|
this.$axios({
|
||||||
url:
|
url:
|
||||||
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
`/base/equipment-check-order/confirm`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: [this.dataForm.id],
|
data: {
|
||||||
|
ids: [this.dataForm.id],
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
}).then(res =>{
|
}).then(res =>{
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
@ -42,9 +42,7 @@
|
|||||||
import AddOrUpdate from './add-or-updata';
|
import AddOrUpdate from './add-or-updata';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import {
|
import { exportCheckOrderExcel } from '@/api/equipment/base/maintain/record';
|
||||||
exportCheckOrderExcel,
|
|
||||||
} from '@/api/equipment/base/maintain/record';
|
|
||||||
import WaitingListTable from './WaitingListTable.vue';
|
import WaitingListTable from './WaitingListTable.vue';
|
||||||
|
|
||||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
@ -76,16 +74,14 @@ export default {
|
|||||||
name: 'Confirm',
|
name: 'Confirm',
|
||||||
components: {
|
components: {
|
||||||
WaitingListTable,
|
WaitingListTable,
|
||||||
AddOrUpdate
|
AddOrUpdate,
|
||||||
},
|
},
|
||||||
mixins: [basicPageMixin],
|
mixins: [basicPageMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
addOrUpdateVisible: false,
|
addOrUpdateVisible: false,
|
||||||
recordDetailVisible: false,
|
recordDetailVisible: false,
|
||||||
searchBarKeys: [
|
searchBarKeys: ['name'],
|
||||||
'name'
|
|
||||||
],
|
|
||||||
tobeConfirmedIdList: [],
|
tobeConfirmedIdList: [],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
@ -100,46 +96,51 @@ export default {
|
|||||||
name: 'search',
|
name: 'search',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: (this.$auth.hasPermiAnd([
|
|
||||||
'equipment:check-record:create',
|
|
||||||
'base:core-worker:query',
|
|
||||||
'base:core-production-line:query',
|
|
||||||
'base:core-department:query'
|
|
||||||
]) || this.$auth.hasPermi('equipment:check-record:update') || this.$auth.hasPermi('equipment:check-record:export')) ? 'separate' : '',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: this.$auth.hasPermiAnd([
|
|
||||||
'equipment:check-record:create',
|
|
||||||
'base:core-worker:query',
|
|
||||||
'base:core-production-line:query',
|
|
||||||
'base:core-department:query'
|
|
||||||
])
|
|
||||||
? 'button'
|
|
||||||
: '',
|
|
||||||
btnName: '新增',
|
|
||||||
name: 'add',
|
|
||||||
plain: true,
|
|
||||||
color: 'success',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('equipment:check-record:update')
|
type:
|
||||||
|
this.$auth.hasPermiAnd([
|
||||||
|
'equipment:check-record:create',
|
||||||
|
'base:core-worker:query',
|
||||||
|
'base:core-production-line:query',
|
||||||
|
'base:core-department:query',
|
||||||
|
]) ||
|
||||||
|
this.$auth.hasPermi('equipment:check-record:update') ||
|
||||||
|
this.$auth.hasPermi('equipment:check-record:export')
|
||||||
|
? 'separate'
|
||||||
|
: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermiAnd([
|
||||||
|
'equipment:check-record:create',
|
||||||
|
'base:core-worker:query',
|
||||||
|
'base:core-production-line:query',
|
||||||
|
'base:core-department:query',
|
||||||
|
])
|
||||||
|
? 'button'
|
||||||
|
: '',
|
||||||
|
btnName: '新增',
|
||||||
|
name: 'add',
|
||||||
|
plain: true,
|
||||||
|
color: 'success',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi('equipment:check-record:update')
|
||||||
? 'button'
|
? 'button'
|
||||||
: '',
|
: '',
|
||||||
btnName: '巡检人批量确认',
|
btnName: '巡检人批量确认',
|
||||||
name: 'batchConfirm',
|
name: 'batchConfirm',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
plain: true,
|
plain: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('equipment:check-record:update')
|
type: this.$auth.hasPermi('equipment:check-record:update')
|
||||||
? 'button'
|
? 'button'
|
||||||
: '',
|
: '',
|
||||||
btnName: '确认人批量确认',
|
btnName: '确认人批量确认',
|
||||||
name: 'batchConfirm2',
|
name: 'batchConfirm2',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
plain: true,
|
plain: true,
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// type: this.$auth.hasPermi('equipment:check-record:export')
|
// type: this.$auth.hasPermi('equipment:check-record:export')
|
||||||
// ? 'button'
|
// ? 'button'
|
||||||
@ -211,11 +212,14 @@ export default {
|
|||||||
// }
|
// }
|
||||||
return this.$axios({
|
return this.$axios({
|
||||||
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
|
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
|
||||||
url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
url: `/base/equipment-check-order/confirm`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
data: {
|
||||||
(item) => item.id
|
ids: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||||
),
|
(item) => item.id
|
||||||
|
),
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@ -223,35 +227,38 @@ export default {
|
|||||||
res.code == 0 && this.$modal.msgSuccess('确认成功');
|
res.code == 0 && this.$modal.msgSuccess('确认成功');
|
||||||
res.code != 0 && this.$modal.msgError('确认失败');
|
res.code != 0 && this.$modal.msgError('确认失败');
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => {});
|
||||||
case 'batchConfirm2':
|
case 'batchConfirm2':
|
||||||
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
|
this.$modal
|
||||||
.confirm('是否确认所有选中巡检单"?')
|
.confirm('是否确认所有选中巡检单"?')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// let checkPersonParam = '';
|
// let checkPersonParam = '';
|
||||||
// if (!row.checkPerson || row.checkPerson.trim() == '') {
|
// if (!row.checkPerson || row.checkPerson.trim() == '') {
|
||||||
// /** 如有必要,更新巡检人 */
|
// /** 如有必要,更新巡检人 */
|
||||||
// checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
|
// checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
|
||||||
// }
|
// }
|
||||||
return this.$axios({
|
return this.$axios({
|
||||||
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
|
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
|
||||||
url: `/base/equipment-check-order/confirm2?confirmPerson=${this.$store.getters.nickname}`,
|
url: `/base/equipment-check-order/confirm2`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
data: {
|
||||||
(item) => item.id
|
ids: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||||
),
|
(item) => item.id
|
||||||
});
|
),
|
||||||
})
|
confirmBy: this.$store.getters.nickname,
|
||||||
.then((res) => {
|
},
|
||||||
this.getList();
|
});
|
||||||
res.code == 0 && this.$modal.msgSuccess('确认成功');
|
})
|
||||||
res.code != 0 && this.$modal.msgError('确认失败');
|
.then((res) => {
|
||||||
})
|
this.getList();
|
||||||
.catch(() => { });
|
res.code == 0 && this.$modal.msgSuccess('确认成功');
|
||||||
|
res.code != 0 && this.$modal.msgError('确认失败');
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -311,7 +318,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleSearchBarChange({ param, value }) {
|
handleSearchBarChange({ param, value }) {
|
||||||
console.log('122', param)
|
console.log('122', param);
|
||||||
// if ('specialType' === param) {
|
// if ('specialType' === param) {
|
||||||
// if (!value) {
|
// if (!value) {
|
||||||
// this.setSearchBarEquipmentList(this.allSpecialEquipments);
|
// this.setSearchBarEquipmentList(this.allSpecialEquipments);
|
||||||
@ -327,7 +334,7 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
// 执行查询
|
// 执行查询
|
||||||
this.recv({
|
this.recv({
|
||||||
...this.queryParams
|
...this.queryParams,
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
this.list = response.data.list;
|
this.list = response.data.list;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
@ -376,18 +383,18 @@ export default {
|
|||||||
// this.title = '添加待确认保养记录';
|
// this.title = '添加待确认保养记录';
|
||||||
// this.addOrEditTitle = '新增';
|
// this.addOrEditTitle = '新增';
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrUpdate.init();
|
this.$refs.addOrUpdate.init();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 新增 / 修改
|
// 新增 / 修改
|
||||||
// addOrUpdateHandle(id) {
|
// addOrUpdateHandle(id) {
|
||||||
// this.addOrUpdateVisible = true;
|
// this.addOrUpdateVisible = true;
|
||||||
// this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
// this.$refs.addOrUpdate.init(id);
|
// this.$refs.addOrUpdate.init(id);
|
||||||
// });
|
// });
|
||||||
// },
|
// },
|
||||||
|
|
||||||
getConfirmed() {
|
getConfirmed() {
|
||||||
return this.$confirm('是否直接确认巡检记录', '提示', {
|
return this.$confirm('是否直接确认巡检记录', '提示', {
|
||||||
@ -462,10 +469,12 @@ export default {
|
|||||||
// checkPersonParam = `&checkPerson=${row.checkPerson}`
|
// checkPersonParam = `&checkPerson=${row.checkPerson}`
|
||||||
// }
|
// }
|
||||||
return this.$axios({
|
return this.$axios({
|
||||||
url:
|
url: `/base/equipment-check-order/confirm`,
|
||||||
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: [row.id],
|
data: {
|
||||||
|
ids: [row.id],
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@ -478,9 +487,9 @@ export default {
|
|||||||
/** 编辑 */
|
/** 编辑 */
|
||||||
async handleEdit(row) {
|
async handleEdit(row) {
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrUpdate.init(row.id);
|
this.$refs.addOrUpdate.init(row.id);
|
||||||
});
|
});
|
||||||
// this.reset();
|
// this.reset();
|
||||||
// if (row.relatePlan == 1) {
|
// if (row.relatePlan == 1) {
|
||||||
// // 计划型
|
// // 计划型
|
||||||
@ -501,9 +510,7 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm(
|
.confirm('是否确认删除巡检单名称为"' + row.name + '"的数据项?')
|
||||||
'是否确认删除巡检单名称为"' + row.name + '"的数据项?'
|
|
||||||
)
|
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return this.$axios({
|
return this.$axios({
|
||||||
url: '/base/equipment-check-order/delete?id=' + row.id,
|
url: '/base/equipment-check-order/delete?id=' + row.id,
|
||||||
@ -518,9 +525,9 @@ export default {
|
|||||||
},
|
},
|
||||||
handleDetail(row) {
|
handleDetail(row) {
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrUpdate.init(row.id, true);
|
this.$refs.addOrUpdate.init(row.id, true);
|
||||||
});
|
});
|
||||||
// this.recordDetailVisible = true;
|
// this.recordDetailVisible = true;
|
||||||
// this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
// this.$refs.recordDetailDrawer.show({
|
// this.$refs.recordDetailDrawer.show({
|
||||||
|
@ -6,84 +6,60 @@
|
|||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" class="drawer" size="50%">
|
||||||
:visible.sync="visible"
|
<small-title slot="title" :no-padding="true">
|
||||||
:show-close="false"
|
<!-- {{ isdetail ? '详情' : '添加巡检' }} -->
|
||||||
:wrapper-closable="true"
|
{{ '添加内容' }}
|
||||||
class="drawer"
|
</small-title>
|
||||||
size="50%">
|
<div class="content">
|
||||||
<small-title slot="title" :no-padding="true">
|
<div class="visual-part">
|
||||||
<!-- {{ isdetail ? '详情' : '添加巡检' }} -->
|
|
||||||
{{ '添加内容' }}
|
|
||||||
</small-title>
|
|
||||||
<div class="content">
|
|
||||||
<div class="visual-part">
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div class="blodTip">巡检单名称</div>
|
<div class="blodTip">巡检单名称</div>
|
||||||
<div class="lightTip">{{ dataForm.name }}</div>
|
<div class="lightTip">{{ dataForm.name }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div class="blodTip">部门</div>
|
<div class="blodTip">部门</div>
|
||||||
<div class="lightTip">{{ dataForm.department }}</div>
|
<div class="lightTip">{{ dataForm.department }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div class="blodTip">巡检时间</div>
|
<div class="blodTip">计划巡检时间</div>
|
||||||
<div class="lightTip">{{ parseTime(dataForm.planCheckTime) }}</div>
|
<div class="lightTip">{{ parseTime(dataForm.planCheckTime) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-divider />
|
<el-divider />
|
||||||
|
|
||||||
<div class="attr-list">
|
<div class="attr-list">
|
||||||
<small-title
|
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
||||||
style="margin: 16px 0; padding-left: 8px"
|
巡检内容
|
||||||
:no-padding="true">
|
</small-title>
|
||||||
巡检内容
|
|
||||||
</small-title>
|
|
||||||
|
|
||||||
<div v-if="!isdetail" class="action_btn">
|
<div v-if="!isdetail" class="action_btn">
|
||||||
<template>
|
<template>
|
||||||
<span style="display: inline-block;">
|
<span style="display: inline-block;">
|
||||||
<el-button type="text" @click="addNew()" icon="el-icon-plus">添加</el-button>
|
<el-button type="text" @click="addNew()" icon="el-icon-plus">添加</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<base-table
|
<base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
|
||||||
:table-props="tableProps"
|
:table-data="checkDetList">
|
||||||
:page="listQuery.pageNo"
|
<method-btn v-if="!isdetail" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
||||||
:limit="listQuery.pageSize"
|
@clickBtn="handleClick" />
|
||||||
:table-data="checkDetList">
|
</base-table>
|
||||||
<method-btn
|
<pagination v-show="listQuery.total > 0" :total="listQuery.total" :page.sync="listQuery.pageNo"
|
||||||
v-if="!isdetail"
|
:limit.sync="listQuery.pageSize" :page-sizes="[5, 10, 15]" @pagination="getList" />
|
||||||
slot="handleBtn"
|
|
||||||
:width="120"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick" />
|
|
||||||
</base-table>
|
|
||||||
<pagination
|
|
||||||
v-show="listQuery.total > 0"
|
|
||||||
:total="listQuery.total"
|
|
||||||
:page.sync="listQuery.pageNo"
|
|
||||||
:limit.sync="listQuery.pageSize"
|
|
||||||
:page-sizes="[5, 10, 15]"
|
|
||||||
@pagination="getList" />
|
|
||||||
|
|
||||||
<!-- <div class="drawer-body__footer">
|
<!-- <div class="drawer-body__footer">
|
||||||
<el-button type="primary" @click="goback()">关闭</el-button>
|
<el-button type="primary" @click="goback()">关闭</el-button>
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<attr-add
|
<attr-add v-if="addOrUpdateVisible" ref="addOrUpdate" :order-id="dataForm.id" @refreshDataList="getList" />
|
||||||
v-if="addOrUpdateVisible"
|
</el-drawer>
|
||||||
ref="addOrUpdate"
|
|
||||||
:order-id="dataForm.id"
|
|
||||||
@refreshDataList="getList" />
|
|
||||||
</el-drawer>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -111,8 +87,13 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'program',
|
prop: 'program',
|
||||||
label: '检查项目',
|
label: '巡检项目',
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
prop: 'checkResult',
|
||||||
|
label: '巡检结果',
|
||||||
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="默认巡检结果" prop="resultType">
|
<el-form-item label="默认巡检结果" prop="resultType">
|
||||||
<el-select v-model="dataForm.resultType" placeholder="请选择默认保养结果">
|
<el-select v-model="dataForm.resultType" placeholder="请选择默认保养结果" @change="handleClear">
|
||||||
<el-option v-for="dict in resultList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
<el-option v-for="dict in resultList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -38,13 +38,16 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-else-if="dataForm.resultType === 2" :gutter="24">
|
<el-row v-else-if="dataForm.resultType === 2" :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="11">
|
||||||
<el-form-item prop="minValue">
|
<el-form-item prop="minValue">
|
||||||
<el-input oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.minValue" placeholder="请输入最小值" />
|
<el-input oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.minValue" placeholder="请输入最小值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="4">
|
||||||
<el-form-item prop="maxValue">
|
—————
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="9">
|
||||||
|
<el-form-item prop="maxValue" label-width="20">
|
||||||
<el-input @change="handleChange" oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.maxValue"
|
<el-input @change="handleChange" oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.maxValue"
|
||||||
placeholder="请输入最大值" />
|
placeholder="请输入最大值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -113,7 +116,12 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
console.log('我看看', this.dataForm)
|
console.log('我看看', this.dataForm)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClear() {
|
||||||
|
this.dataForm.minValue = undefined
|
||||||
|
this.dataForm.maxValue = undefined
|
||||||
|
this.dataForm.maintainResult = undefined
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 物料列表
|
// 物料列表
|
||||||
const res = await getList();
|
const res = await getList();
|
||||||
|
@ -36,7 +36,7 @@ const tableProps = [
|
|||||||
align:'center',
|
align:'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'maintainResult',
|
prop: 'checkResult',
|
||||||
label: '默认巡检结果',
|
label: '默认巡检结果',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
@ -102,7 +102,8 @@ export default {
|
|||||||
getDataList(id) {
|
getDataList(id) {
|
||||||
this.dataListLoading = true;
|
this.dataListLoading = true;
|
||||||
this.queryParams.equipmentTypeId = id
|
this.queryParams.equipmentTypeId = id
|
||||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
console.log(id);
|
||||||
|
this.urlOptions.getDataListURL(this.queryParams).then(response => {
|
||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.listQuery.total = response.data.total;
|
this.listQuery.total = response.data.total;
|
||||||
this.dataListLoading = false
|
this.dataListLoading = false
|
||||||
|
@ -6,55 +6,32 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-form
|
<el-form ref="form" :model="form" :size="size" :label-position="labelPosition" v-loading="formLoading">
|
||||||
ref="form"
|
<el-row :gutter="20">
|
||||||
:model="form"
|
<el-col :span="12">
|
||||||
:size="size"
|
<el-form-item label="设备保养单号" prop="maintainOrderNumber" :rules="[
|
||||||
:label-position="labelPosition"
|
|
||||||
v-loading="formLoading">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="设备保养单号"
|
|
||||||
prop="maintainOrderNumber"
|
|
||||||
:rules="[
|
|
||||||
{ required: true, message: '请输入设备保养单号', trigger: 'blur' },
|
{ required: true, message: '请输入设备保养单号', trigger: 'blur' },
|
||||||
]">
|
]">
|
||||||
<el-input
|
<el-input v-model="form.maintainOrderNumber" @change="$emit('update', form)" :placeholder="`请输入保养计划单号`"
|
||||||
v-model="form.maintainOrderNumber"
|
:disabled="disabled" />
|
||||||
@change="$emit('update', form)"
|
</el-form-item>
|
||||||
:placeholder="`请输入保养计划单号`"
|
</el-col>
|
||||||
:disabled="disabled" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="保养计划名称" prop="name">
|
<el-form-item label="保养计划名称" prop="name">
|
||||||
<el-input value="---" disabled />
|
<el-input value="---" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item label="部门" prop="departmentId" :rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
|
||||||
label="部门"
|
<el-select v-model="form.departmentId" :placeholder="`请选择部门`" :disabled="disabled" clearable filterable
|
||||||
prop="departmentId"
|
@change="$emit('update', form)">
|
||||||
:rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
|
<el-option v-for="opt in departmentOptions" :key="opt.value" :label="opt.label" :value="opt.value" />
|
||||||
<el-select
|
</el-select>
|
||||||
v-model="form.departmentId"
|
</el-form-item>
|
||||||
:placeholder="`请选择部门`"
|
|
||||||
:disabled="disabled"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
@change="$emit('update', form)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in departmentOptions"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!-- <el-form-item
|
<!-- <el-form-item
|
||||||
label="设备大类"
|
label="设备大类"
|
||||||
prop="equipmentCategory"
|
prop="equipmentCategory"
|
||||||
:rules="[
|
:rules="[
|
||||||
@ -72,89 +49,59 @@
|
|||||||
:value="opt.value" />
|
:value="opt.value" />
|
||||||
</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
|
<el-form-item label="产线" prop="lineId" :rules="[{ required: true, message: '请选择产线', trigger: 'blur' }]">
|
||||||
label="产线"
|
<el-select v-model="form.lineId" :placeholder="`请选择产线`" :disabled="disabled" clearable filterable
|
||||||
prop="lineId"
|
@change="$emit('update', form)">
|
||||||
:rules="[{ required: true, message: '请选择产线', trigger: 'blur' }]">
|
<el-option v-for="opt in lineOptions" :key="opt.value" :label="opt.label" :value="opt.value" />
|
||||||
<el-select
|
</el-select>
|
||||||
v-model="form.lineId"
|
</el-form-item>
|
||||||
:placeholder="`请选择产线`"
|
</el-col>
|
||||||
:disabled="disabled"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
@change="$emit('update', form)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in lineOptions"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="计划保养人员" prop="maintainer">
|
<el-form-item label="计划保养人员" prop="maintainer">
|
||||||
<el-input value="---" disabled />
|
<el-input value="---" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="计划开始时间" prop="planStartTime">
|
<el-form-item label="计划开始时间" prop="planStartTime">
|
||||||
<el-input value="---" disabled />
|
<el-input value="---" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="计划结束时间" prop="planEndTime">
|
<el-form-item label="计划结束时间" prop="planEndTime">
|
||||||
<el-input value="---" disabled />
|
<el-input value="---" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item label="实际开始时间" prop="startTime" :rules="[
|
||||||
label="实际开始时间"
|
|
||||||
prop="startTime"
|
|
||||||
:rules="[
|
|
||||||
{ required: true, message: '请选择实际开始时间', trigger: 'blur' },
|
{ required: true, message: '请选择实际开始时间', trigger: 'blur' },
|
||||||
]">
|
]">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.startTime" type="datetime" :disabled="edit" placeholder="请选择实际开始时间"
|
||||||
v-model="form.startTime"
|
@change="$emit('update', form)" value-format="timestamp"></el-date-picker>
|
||||||
type="datetime"
|
</el-form-item>
|
||||||
:disabled="edit"
|
</el-col>
|
||||||
placeholder="请选择实际开始时间"
|
|
||||||
@change="$emit('update', form)"
|
|
||||||
value-format="timestamp"></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item label="实际结束时间" prop="endTime" :rules="[
|
||||||
label="实际结束时间"
|
|
||||||
prop="endTime"
|
|
||||||
:rules="[
|
|
||||||
{ required: true, message: '请选择实际结束时间', trigger: 'blur' },
|
{ required: true, message: '请选择实际结束时间', trigger: 'blur' },
|
||||||
]">
|
]">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.endTime" type="datetime" :disabled="edit" placeholder="请选择实际结束时间"
|
||||||
v-model="form.endTime"
|
@change="$emit('update', form)" value-format="timestamp"></el-date-picker>
|
||||||
type="datetime"
|
</el-form-item>
|
||||||
:disabled="edit"
|
</el-col>
|
||||||
placeholder="请选择实际结束时间"
|
|
||||||
@change="$emit('update', form)"
|
|
||||||
value-format="timestamp"></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item label="实际保养人员" prop="maintainWorker" :rules="[
|
||||||
label="实际保养人员"
|
{ required: false, message: '请输入实际保养人员', trigger: 'blur' },
|
||||||
prop="maintainWorker"
|
|
||||||
:rules="[
|
|
||||||
{ required: false, message: '请选择实际保养人员', trigger: 'blur' },
|
|
||||||
]">
|
]">
|
||||||
<el-select
|
<el-input v-model="form.maintainWorker" @change="$emit('update', form)" :placeholder="`请输入实际保养人员`" :disabled="disabled" />
|
||||||
|
<!-- <el-select
|
||||||
v-model="form.maintainWorker"
|
v-model="form.maintainWorker"
|
||||||
:placeholder="`请选择实际保养人员`"
|
:placeholder="`请选择实际保养人员`"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@ -167,21 +114,17 @@
|
|||||||
:key="opt.value"
|
:key="opt.value"
|
||||||
:label="opt.label"
|
:label="opt.label"
|
||||||
:value="opt.value" />
|
:value="opt.value" />
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input
|
<el-input v-model="form.remark" @change="$emit('update', form)" :placeholder="`请输入备注`" :disabled="disabled" />
|
||||||
v-model="form.remark"
|
</el-form-item>
|
||||||
@change="$emit('update', form)"
|
</el-col>
|
||||||
:placeholder="`请输入备注`"
|
</el-row>
|
||||||
:disabled="disabled" />
|
</el-form>
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -321,7 +264,6 @@ export default {
|
|||||||
const urls = [
|
const urls = [
|
||||||
'/base/core-production-line/listAll',
|
'/base/core-production-line/listAll',
|
||||||
'/system/dept/list-all-simple',
|
'/system/dept/list-all-simple',
|
||||||
'/base/core-worker/listAll',
|
|
||||||
];
|
];
|
||||||
let res;
|
let res;
|
||||||
switch (source) {
|
switch (source) {
|
||||||
@ -329,10 +271,6 @@ export default {
|
|||||||
res = await this.$axios(urls[1]);
|
res = await this.$axios(urls[1]);
|
||||||
this.departmentList = res.data || [];
|
this.departmentList = res.data || [];
|
||||||
break;
|
break;
|
||||||
case 'maintainer':
|
|
||||||
res = await this.$axios(urls[2]);
|
|
||||||
this.maintainerList = res.data || [];
|
|
||||||
break;
|
|
||||||
case 'line':
|
case 'line':
|
||||||
res = await this.$axios(urls[0]);
|
res = await this.$axios(urls[0]);
|
||||||
this.lineList = res.data || [];
|
this.lineList = res.data || [];
|
||||||
|
@ -6,177 +6,116 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" class="drawer"
|
||||||
:visible.sync="visible"
|
custom-class="mes-drawer" size="60%" :before-close="beforeClose" @closed="$emit('destroy')">
|
||||||
:show-close="false"
|
<SmallTitle slot="title">编辑</SmallTitle>
|
||||||
:wrapper-closable="true"
|
|
||||||
class="drawer"
|
|
||||||
custom-class="mes-drawer"
|
|
||||||
size="60%"
|
|
||||||
:before-close="beforeClose"
|
|
||||||
@closed="$emit('destroy')">
|
|
||||||
<SmallTitle slot="title">编辑</SmallTitle>
|
|
||||||
|
|
||||||
<div class="drawer-body flex">
|
<div class="drawer-body flex">
|
||||||
<div class="drawer-body__content">
|
<div class="drawer-body__content">
|
||||||
<div class="form-part" style="margin-bottom: 32px">
|
<div class="form-part" style="margin-bottom: 32px">
|
||||||
<!-- <el-skeleton v-if="!showForm" animated /> -->
|
<!-- <el-skeleton v-if="!showForm" animated /> -->
|
||||||
<el-form
|
<el-form class="equipment-info-form" ref="form" :model="form" label-width="200px" label-position="top"
|
||||||
class="equipment-info-form"
|
v-loading="formLoading">
|
||||||
ref="form"
|
<el-row :gutter="20">
|
||||||
:model="form"
|
<el-col :span="8">
|
||||||
label-width="200px"
|
<el-form-item label="保养计划单号" prop="maintainOrderNumber">
|
||||||
label-position="top"
|
<!-- :rules="[
|
||||||
v-loading="formLoading">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="保养计划单号" prop="maintainOrderNumber">
|
|
||||||
<!-- :rules="[
|
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入保养计划单号',
|
message: '请输入保养计划单号',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
]" -->
|
]" -->
|
||||||
<el-input
|
<el-input v-model="form.maintainOrderNumber" disabled :placeholder="`请输入保养计划单号`" />
|
||||||
v-model="form.maintainOrderNumber"
|
</el-form-item>
|
||||||
disabled
|
</el-col>
|
||||||
:placeholder="`请输入保养计划单号`" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="保养计划名称" prop="planName">
|
<el-form-item label="保养计划名称" prop="planName">
|
||||||
<el-input
|
<el-input v-model="form.planName" placeholder="请输入保养计划名称" disabled />
|
||||||
v-model="form.planName"
|
</el-form-item>
|
||||||
placeholder="请输入保养计划名称"
|
</el-col>
|
||||||
disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="部门" prop="departmentId">
|
<el-form-item label="部门" prop="departmentId">
|
||||||
<!-- :rules="[
|
<!-- :rules="[
|
||||||
{ required: true, message: '请选择部门', trigger: 'blur' },
|
{ required: true, message: '请选择部门', trigger: 'blur' },
|
||||||
]" -->
|
]" -->
|
||||||
<el-select
|
<el-select v-model="form.departmentId" :placeholder="`请选择部门`" clearable disabled filterable>
|
||||||
v-model="form.departmentId"
|
<el-option v-for="opt in departmentOptions" :key="opt.value" :label="opt.label"
|
||||||
:placeholder="`请选择部门`"
|
:value="opt.value" />
|
||||||
clearable
|
</el-select>
|
||||||
disabled
|
</el-form-item>
|
||||||
filterable>
|
</el-col>
|
||||||
<el-option
|
|
||||||
v-for="opt in departmentOptions"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="产线" prop="lineId">
|
<el-form-item label="产线" prop="lineId">
|
||||||
<!-- :rules="[
|
<!-- :rules="[
|
||||||
{ required: true, message: '请选择产线', trigger: 'blur' },
|
{ required: true, message: '请选择产线', trigger: 'blur' },
|
||||||
]" -->
|
]" -->
|
||||||
<el-select
|
<el-select v-model="form.lineId" :placeholder="`请选择产线`" disabled clearable filterable>
|
||||||
v-model="form.lineId"
|
<el-option v-for="opt in lineOptions" :key="opt.value" :label="opt.label" :value="opt.value" />
|
||||||
:placeholder="`请选择产线`"
|
</el-select>
|
||||||
disabled
|
</el-form-item>
|
||||||
clearable
|
</el-col>
|
||||||
filterable>
|
|
||||||
<el-option
|
|
||||||
v-for="opt in lineOptions"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="计划保养人员" prop="maintainer">
|
<el-form-item label="计划保养人员" prop="maintainer">
|
||||||
<el-select
|
<el-select v-model="form.planMaintainWorker" placeholder="请选择计划保养人员" disabled clearable filterable />
|
||||||
v-model="form.planMaintainWorker"
|
</el-form-item>
|
||||||
placeholder="请选择计划保养人员"
|
</el-col>
|
||||||
disabled
|
|
||||||
clearable
|
|
||||||
filterable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="计划开始时间" prop="planStartTime">
|
<el-form-item label="计划开始时间" prop="planStartTime">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.planStartTime" type="datetime" disabled placeholder="请选择计划开始时间"
|
||||||
v-model="form.planStartTime"
|
value-format="timestamp"></el-date-picker>
|
||||||
type="datetime"
|
</el-form-item>
|
||||||
disabled
|
</el-col>
|
||||||
placeholder="请选择计划开始时间"
|
|
||||||
value-format="timestamp"></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="计划结束时间" prop="planEndTime">
|
<el-form-item label="计划结束时间" prop="planEndTime">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.planEndTime" type="datetime" disabled placeholder="请选择计划结束时间"
|
||||||
v-model="form.planEndTime"
|
value-format="timestamp"></el-date-picker>
|
||||||
type="datetime"
|
</el-form-item>
|
||||||
disabled
|
</el-col>
|
||||||
placeholder="请选择计划结束时间"
|
|
||||||
value-format="timestamp"></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item
|
<el-form-item label="实际开始时间" prop="startTime" :rules="[
|
||||||
label="实际开始时间"
|
|
||||||
prop="startTime"
|
|
||||||
:rules="[
|
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择实际开始时间',
|
message: '请选择实际开始时间',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
]">
|
]">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.startTime" type="datetime" placeholder="请选择实际开始时间"
|
||||||
v-model="form.startTime"
|
value-format="timestamp"></el-date-picker>
|
||||||
type="datetime"
|
</el-form-item>
|
||||||
placeholder="请选择实际开始时间"
|
</el-col>
|
||||||
value-format="timestamp"></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item
|
<el-form-item label="实际结束时间" prop="endTime" :rules="[
|
||||||
label="实际结束时间"
|
|
||||||
prop="endTime"
|
|
||||||
:rules="[
|
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择实际结束时间',
|
message: '请选择实际结束时间',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
]">
|
]">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.endTime" type="datetime" placeholder="请选择实际结束时间"
|
||||||
v-model="form.endTime"
|
value-format="timestamp"></el-date-picker>
|
||||||
type="datetime"
|
</el-form-item>
|
||||||
placeholder="请选择实际结束时间"
|
</el-col>
|
||||||
value-format="timestamp"></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item
|
<el-form-item label="实际保养人员" prop="maintainWorker" :rules="[
|
||||||
label="实际保养人员"
|
|
||||||
prop="maintainWorker"
|
|
||||||
:rules="[
|
|
||||||
{
|
{
|
||||||
required: false,
|
required: false,
|
||||||
message: '请选择实际保养人员',
|
message: '请输入实际保养人员',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
]">
|
]">
|
||||||
<el-select
|
<el-input v-model="form.maintainWorker" :placeholder="`请输入实际保养人员`" />
|
||||||
|
|
||||||
|
<!-- <el-select
|
||||||
v-model="form.maintainWorker"
|
v-model="form.maintainWorker"
|
||||||
:placeholder="`请选择实际保养人员`"
|
:placeholder="`请选择实际保养人员`"
|
||||||
multiple
|
multiple
|
||||||
@ -187,89 +126,62 @@
|
|||||||
:key="opt.value"
|
:key="opt.value"
|
||||||
:label="opt.label"
|
:label="opt.label"
|
||||||
:value="opt.value" />
|
:value="opt.value" />
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" :placeholder="`请输入备注`" />
|
<el-input v-model="form.remark" :placeholder="`请输入备注`" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<SmallTitle>保养内容</SmallTitle>
|
<SmallTitle>保养内容</SmallTitle>
|
||||||
|
|
||||||
<div style="margin-top: 12px; position: relative">
|
<div style="margin-top: 12px; position: relative">
|
||||||
<SearchBar
|
<SearchBar :formConfigs="searchBarFormConfig" ref="attr-search-bar" @headBtnClick="handleSearchBarBtnClick" />
|
||||||
:formConfigs="searchBarFormConfig"
|
</div>
|
||||||
ref="attr-search-bar"
|
|
||||||
@headBtnClick="handleSearchBarBtnClick" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="margin-top: 12px; position: relative">
|
<div style="margin-top: 12px; position: relative">
|
||||||
<div style="position: absolute; top: -40px; right: 0">
|
<div style="position: absolute; top: -40px; right: 0">
|
||||||
<el-button @click="handleAddAttr" type="text">
|
<el-button @click="handleAddAttr" type="text">
|
||||||
<i class="el-icon-plus"></i>
|
<i class="el-icon-plus"></i>
|
||||||
添加属性
|
添加属性
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<base-table
|
<base-table v-loading="attrListLoading" :table-props="attrTableProps" :page="attrQuery?.params.pageNo || 1"
|
||||||
v-loading="attrListLoading"
|
:limit="attrQuery?.params.pageSize || 10" :table-data="attrList" @emitFun="handleEmitFun">
|
||||||
:table-props="attrTableProps"
|
<method-btn slot="handleBtn" label="操作" :method-list="tableBtn" @clickBtn="handleTableBtnClick" />
|
||||||
:page="attrQuery?.params.pageNo || 1"
|
</base-table>
|
||||||
:limit="attrQuery?.params.pageSize || 10"
|
|
||||||
:table-data="attrList"
|
|
||||||
@emitFun="handleEmitFun">
|
|
||||||
<method-btn
|
|
||||||
slot="handleBtn"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleTableBtnClick" />
|
|
||||||
</base-table>
|
|
||||||
|
|
||||||
<!-- 分页组件 -->
|
<!-- 分页组件 -->
|
||||||
<pagination
|
<pagination v-show="attrTotal > 0" :total="attrTotal" :page.sync="attrQuery.params.pageNo"
|
||||||
v-show="attrTotal > 0"
|
:limit.sync="attrQuery.params.pageSize" @pagination="getAttrList" />
|
||||||
:total="attrTotal"
|
</div>
|
||||||
:page.sync="attrQuery.params.pageNo"
|
</div>
|
||||||
:limit.sync="attrQuery.params.pageSize"
|
|
||||||
@pagination="getAttrList" />
|
|
||||||
</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 type="primary" @click="handleConfirm">保存</el-button>
|
||||||
<!-- sections的第二项必须是 属性列表 -->
|
<!-- sections的第二项必须是 属性列表 -->
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
v-if="sections[1].allowAdd"
|
v-if="sections[1].allowAdd"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleAddAttr">
|
@click="handleAddAttr">
|
||||||
添加属性
|
添加属性
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 属性对话框 -->
|
<!-- 属性对话框 -->
|
||||||
<base-dialog
|
<base-dialog :dialogTitle="attrTitle" :dialogVisible="attrFormVisible" width="35%" :append-to-body="true"
|
||||||
:dialogTitle="attrTitle"
|
custom-class="baseDialog" @close="closeAttrForm" @cancel="closeAttrForm" @confirm="submitAttrForm">
|
||||||
:dialogVisible="attrFormVisible"
|
<DialogForm v-if="attrFormVisible" ref="attrForm" v-model="attrForm" :rows="attrRows" />
|
||||||
width="35%"
|
</base-dialog>
|
||||||
:append-to-body="true"
|
</el-drawer>
|
||||||
custom-class="baseDialog"
|
|
||||||
@close="closeAttrForm"
|
|
||||||
@cancel="closeAttrForm"
|
|
||||||
@confirm="submitAttrForm">
|
|
||||||
<DialogForm
|
|
||||||
v-if="attrFormVisible"
|
|
||||||
ref="attrForm"
|
|
||||||
v-model="attrForm"
|
|
||||||
:rows="attrRows" />
|
|
||||||
</base-dialog>
|
|
||||||
</el-drawer>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -541,7 +453,7 @@ export default {
|
|||||||
const urls = [
|
const urls = [
|
||||||
'/base/core-production-line/listAll',
|
'/base/core-production-line/listAll',
|
||||||
'system/dept/list-all-simple',
|
'system/dept/list-all-simple',
|
||||||
'/base/core-worker/listAll',
|
// '/base/core-worker/listAll',
|
||||||
];
|
];
|
||||||
let res;
|
let res;
|
||||||
switch (source) {
|
switch (source) {
|
||||||
@ -549,10 +461,10 @@ export default {
|
|||||||
res = await this.$axios(urls[1]);
|
res = await this.$axios(urls[1]);
|
||||||
this.departmentList = res.data || [];
|
this.departmentList = res.data || [];
|
||||||
break;
|
break;
|
||||||
case 'maintainer':
|
// case 'maintainer':
|
||||||
res = await this.$axios(urls[2]);
|
// res = await this.$axios(urls[2]);
|
||||||
this.maintainerList = res.data || [];
|
// this.maintainerList = res.data || [];
|
||||||
break;
|
// break;
|
||||||
case 'line':
|
case 'line':
|
||||||
res = await this.$axios(urls[0]);
|
res = await this.$axios(urls[0]);
|
||||||
this.lineList = res.data || [];
|
this.lineList = res.data || [];
|
||||||
|
@ -105,14 +105,16 @@
|
|||||||
<el-form-item label="实际保养人员" prop="maintainWorker" :rules="[
|
<el-form-item label="实际保养人员" prop="maintainWorker" :rules="[
|
||||||
{
|
{
|
||||||
required: false,
|
required: false,
|
||||||
message: '请选择实际保养人员',
|
message: '请输入实际保养人员',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
]">
|
]">
|
||||||
<el-select v-model="form.maintainWorker" :placeholder="`请选择实际保养人员`" multiple clearable filterable>
|
<el-input v-model="form.maintainWorker" :placeholder="`请输入实际保养人员`" />
|
||||||
|
|
||||||
|
<!-- <el-select v-model="form.maintainWorker" :placeholder="`请选择实际保养人员`" multiple clearable filterable>
|
||||||
<el-option v-for="opt in maintainerOptions" :key="opt.value" :label="opt.label"
|
<el-option v-for="opt in maintainerOptions" :key="opt.value" :label="opt.label"
|
||||||
:value="opt.value" />
|
:value="opt.value" />
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -390,10 +392,12 @@ export default {
|
|||||||
console.log('111', confirm)
|
console.log('111', confirm)
|
||||||
this.$axios({
|
this.$axios({
|
||||||
url:
|
url:
|
||||||
'/base/equipment-maintain-log/confirm?confirmPerson=' +
|
'/base/equipment-maintain-log/confirm',
|
||||||
this.$store.getters.userId,
|
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: [this.form.id],
|
data: {
|
||||||
|
ids: [this.form.id],
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
}).then(res =>{
|
}).then(res =>{
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
@ -445,7 +449,7 @@ export default {
|
|||||||
method: 'put',
|
method: 'put',
|
||||||
data: {
|
data: {
|
||||||
...this.form,
|
...this.form,
|
||||||
maintainWorker: this.form.maintainWorker.join(','),
|
maintainWorker: this.form.maintainWorker ? this.form.maintainWorker.join(',') :null,
|
||||||
special: false,
|
special: false,
|
||||||
relatePlan: 2
|
relatePlan: 2
|
||||||
}
|
}
|
||||||
@ -463,8 +467,8 @@ export default {
|
|||||||
url: '/base/equipment-maintain-log/create',
|
url: '/base/equipment-maintain-log/create',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
...this.form,
|
...this.form,
|
||||||
maintainWorker: this.form.maintainWorker.join(','),
|
maintainWorker: this.form.maintainWorker ? this.form.maintainWorker.join(',') : null,
|
||||||
special: false,
|
special: false,
|
||||||
relatePlan: 2,
|
relatePlan: 2,
|
||||||
confirmed: false,
|
confirmed: false,
|
||||||
@ -536,7 +540,7 @@ export default {
|
|||||||
const urls = [
|
const urls = [
|
||||||
'/base/core-production-line/listAll',
|
'/base/core-production-line/listAll',
|
||||||
'/system/dept/list-all-simple',
|
'/system/dept/list-all-simple',
|
||||||
'/base/core-worker/listAll',
|
// '/base/core-worker/listAll',
|
||||||
];
|
];
|
||||||
let res;
|
let res;
|
||||||
switch (source) {
|
switch (source) {
|
||||||
@ -544,10 +548,10 @@ export default {
|
|||||||
res = await this.$axios(urls[1]);
|
res = await this.$axios(urls[1]);
|
||||||
this.departmentList = res.data || [];
|
this.departmentList = res.data || [];
|
||||||
break;
|
break;
|
||||||
case 'maintainer':
|
// case 'maintainer':
|
||||||
res = await this.$axios(urls[2]);
|
// res = await this.$axios(urls[2]);
|
||||||
this.maintainerList = res.data || [];
|
// this.maintainerList = res.data || [];
|
||||||
break;
|
// break;
|
||||||
case 'line':
|
case 'line':
|
||||||
res = await this.$axios(urls[0]);
|
res = await this.$axios(urls[0]);
|
||||||
this.lineList = res.data || [];
|
this.lineList = res.data || [];
|
||||||
|
@ -287,9 +287,12 @@ export default {
|
|||||||
return this.$axios({
|
return this.$axios({
|
||||||
url: '/base/equipment-maintain-log/confirm',
|
url: '/base/equipment-maintain-log/confirm',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
data:{
|
||||||
(item) => item.id
|
ids: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||||
),
|
(item) => item.id
|
||||||
|
),
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
// if (res.code == 0) {
|
// if (res.code == 0) {
|
||||||
// this.$message.success('确认成功');
|
// this.$message.success('确认成功');
|
||||||
@ -313,9 +316,12 @@ export default {
|
|||||||
return this.$axios({
|
return this.$axios({
|
||||||
url: '/base/equipment-maintain-log/confirm2',
|
url: '/base/equipment-maintain-log/confirm2',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
data: {
|
||||||
(item) => item.id
|
ids: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||||
),
|
(item) => item.id
|
||||||
|
),
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
// if (res.code == 0) {
|
// if (res.code == 0) {
|
||||||
// this.$message.success('确认成功');
|
// this.$message.success('确认成功');
|
||||||
@ -547,7 +553,10 @@ export default {
|
|||||||
return this.$axios({
|
return this.$axios({
|
||||||
url: '/base/equipment-maintain-log/confirm',
|
url: '/base/equipment-maintain-log/confirm',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: [row.id],
|
data: {
|
||||||
|
ids: [row.id],
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
// if (res.code == 0) {
|
// if (res.code == 0) {
|
||||||
// this.$message.success('确认成功');
|
// this.$message.success('确认成功');
|
||||||
|
@ -135,7 +135,7 @@ export default {
|
|||||||
maintainDuration: undefined,
|
maintainDuration: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
firstMaintenanceTime: undefined,
|
firstMaintenanceTime: undefined,
|
||||||
maintainer: undefined
|
maintainer: null
|
||||||
},
|
},
|
||||||
menuOptions: [],
|
menuOptions: [],
|
||||||
proLineList: [],
|
proLineList: [],
|
||||||
@ -175,8 +175,8 @@ export default {
|
|||||||
const resline = await getCorePLList();
|
const resline = await getCorePLList();
|
||||||
this.proLineList = resline.data;
|
this.proLineList = resline.data;
|
||||||
// 保养人员
|
// 保养人员
|
||||||
const personres = await getWorkerList()
|
// const personres = await getWorkerList()
|
||||||
this.personList = personres.data || []
|
// this.personList = personres.data || []
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
// 获取产品属性列表
|
// 获取产品属性列表
|
||||||
@ -259,7 +259,8 @@ export default {
|
|||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
this.urlOptions.updateURL({
|
this.urlOptions.updateURL({
|
||||||
...this.dataForm,
|
...this.dataForm,
|
||||||
maintainer: this.dataForm.maintainer.join(',')
|
maintainer: this.dataForm.maintainer ? this.dataForm.maintainer.join(',') : null,
|
||||||
|
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
@ -270,7 +271,7 @@ export default {
|
|||||||
// 添加的提交
|
// 添加的提交
|
||||||
this.urlOptions.createURL({
|
this.urlOptions.createURL({
|
||||||
...this.dataForm,
|
...this.dataForm,
|
||||||
maintainer: this.dataForm.maintainer.join(',')
|
maintainer: this.dataForm.maintainer ? this.dataForm.maintainer.join(',') : null,
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
// this.idAttrShow = true
|
// this.idAttrShow = true
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="默认保养结果" prop="resultType">
|
<el-form-item label="默认保养结果" prop="resultType">
|
||||||
<el-select v-model="dataForm.resultType" placeholder="请选择默认保养结果">
|
<el-select v-model="dataForm.resultType" placeholder="请选择默认保养结果" @change="handleClear">
|
||||||
<el-option v-for="dict in resultList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
<el-option v-for="dict in resultList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -39,13 +39,16 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-else-if="dataForm.resultType === 2" :gutter="24">
|
<el-row v-else-if="dataForm.resultType === 2" :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="11">
|
||||||
<el-form-item prop="minValue">
|
<el-form-item prop="minValue">
|
||||||
<el-input oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.minValue" placeholder="请输入最小值" />
|
<el-input oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.minValue" placeholder="请输入最小值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="4">
|
||||||
<el-form-item prop="maxValue">
|
—————
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="9">
|
||||||
|
<el-form-item prop="maxValue" label-width="20">
|
||||||
<el-input @change="handleChange" oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.maxValue"
|
<el-input @change="handleChange" oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.maxValue"
|
||||||
placeholder="请输入最大值" />
|
placeholder="请输入最大值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -102,7 +105,9 @@ export default {
|
|||||||
dataRule: {
|
dataRule: {
|
||||||
// materialId: [{ required: true, message: "", trigger: "blur" }],
|
// materialId: [{ required: true, message: "", trigger: "blur" }],
|
||||||
program: [{ required: true, message: "保养项目不能为空", trigger: "blur" }],
|
program: [{ required: true, message: "保养项目不能为空", trigger: "blur" }],
|
||||||
maintainResult: [{ required: true, message: "默认保养结果不能为空", trigger: "blur" }],
|
maintainResult: [{ required: true, message: "文本或数值不能为空不能为空", trigger: "blur" }],
|
||||||
|
resultType: [{ required: true, message: "默认保养结果不能为空", trigger: "blur" }],
|
||||||
|
|
||||||
minValue: [{ required: true, message: "最小值不能为空", trigger: "blur" }],
|
minValue: [{ required: true, message: "最小值不能为空", trigger: "blur" }],
|
||||||
maxValue: [{ required: true, message: "最大值不能为空", trigger: "blur" }],
|
maxValue: [{ required: true, message: "最大值不能为空", trigger: "blur" }],
|
||||||
|
|
||||||
@ -114,7 +119,12 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
console.log('我看看', this.dataForm)
|
console.log('我看看', this.dataForm)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClear() {
|
||||||
|
this.dataForm.minValue = undefined
|
||||||
|
this.dataForm.maxValue = undefined
|
||||||
|
this.dataForm.maintainResult = undefined
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 物料列表
|
// 物料列表
|
||||||
const res = await getList();
|
const res = await getList();
|
||||||
|
@ -223,15 +223,13 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initSearchBar() {
|
initSearchBar() {
|
||||||
this.http('/base/core-equipment/page', 'get', {
|
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
|
||||||
special: false,
|
console.log('data', data);
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 999,
|
|
||||||
}).then(({ data }) => {
|
|
||||||
this.$set(
|
this.$set(
|
||||||
this.searchBarFormConfig[0],
|
this.searchBarFormConfig[0],
|
||||||
'selectOptions',
|
'selectOptions',
|
||||||
(data?.list || []).map((item) => ({
|
(data || []).map((item) => ({
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
}))
|
}))
|
||||||
|
@ -184,16 +184,17 @@ export default {
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
select: true, // TODO: or INPUT instead of SELECT
|
input: true, // TODO: or INPUT instead of SELECT
|
||||||
label: '负责人',
|
label: '负责人',
|
||||||
prop: 'responsible',
|
prop: 'responsible',
|
||||||
url: '/base/core-worker/listAll', // TODO: 班组
|
// url: 'system/user/page', // TODO: 班组
|
||||||
valueKey: 'name',
|
// valueKey: 'id',
|
||||||
bind: {
|
// labelKey:'username',
|
||||||
filterable: true,
|
// bind: {
|
||||||
clearable: true,
|
// filterable: true,
|
||||||
multiple: true
|
// clearable: true,
|
||||||
},
|
// multiple: true
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -135,8 +135,9 @@ export default {
|
|||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
label: '备件名称',
|
label: '备件名称',
|
||||||
prop: 'productMaterialId',
|
prop: 'productMaterialId',
|
||||||
options: [],
|
url: '/base/core-product-material/listAll', // TODO: 供应商
|
||||||
|
// options: [],
|
||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
clearable: false,
|
clearable: false,
|
||||||
|
@ -44,6 +44,7 @@ import {
|
|||||||
deleteGroupRule,
|
deleteGroupRule,
|
||||||
updateGroupRule,
|
updateGroupRule,
|
||||||
getGroupRule,
|
getGroupRule,
|
||||||
|
disableGroupRule
|
||||||
} from '@/api/base/groupSchedulingRule';
|
} from '@/api/base/groupSchedulingRule';
|
||||||
import schedulingRuleConfigAdd from './components/schedulingRuleConfigAdd.vue';
|
import schedulingRuleConfigAdd from './components/schedulingRuleConfigAdd.vue';
|
||||||
import { formatDate } from '@/utils';
|
import { formatDate } from '@/utils';
|
||||||
@ -231,14 +232,9 @@ export default {
|
|||||||
'是否确认作废序号为"' + row.planName + '"的数据项?'
|
'是否确认作废序号为"' + row.planName + '"的数据项?'
|
||||||
,'提示')
|
,'提示')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getGroupRule(row.id).then((response) => {
|
disableGroupRule(row.id).then((response) => {
|
||||||
let datas = response.data;
|
|
||||||
datas.list = datas.sequenceList;
|
|
||||||
datas.enabled = 0;
|
|
||||||
updateGroupRule(datas).then(() => {
|
|
||||||
_this.getList();
|
_this.getList();
|
||||||
_this.$modal.msgSuccess('操作成功');
|
_this.$modal.msgSuccess('操作成功');
|
||||||
});
|
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2024-09-26 14:08:58
|
* @Date: 2024-09-26 14:08:58
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-11-06 09:52:59
|
* @LastEditTime: 2024-11-13 15:23:25
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -92,7 +92,7 @@ const tableProps = [
|
|||||||
subcomponent: selectTime,
|
subcomponent: selectTime,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'customerId',
|
prop: 'customerName',
|
||||||
label: '客户',
|
label: '客户',
|
||||||
showOverflowtooltip: true,
|
showOverflowtooltip: true,
|
||||||
// subcomponent: selectMember,
|
// subcomponent: selectMember,
|
||||||
|
Loading…
Reference in New Issue
Block a user