Compare commits

..

No commits in common. "df530abb90e478e0587860f57c09d6aa1077218f" and "319e0ac90ddc7ed627c165e1c273ec14172da5c4" have entirely different histories.

23 changed files with 3477 additions and 776 deletions

View File

@ -6,7 +6,7 @@
"license": "MIT",
"scripts": {
"local": "vue-cli-service serve --mode local",
"dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode dev",
"dev": "vue-cli-service serve --mode dev",
"front": "vue-cli-service serve --mode front",
"build:prod": "vue-cli-service build --mode prod",
"build:stage": "vue-cli-service build --mode stage",

View File

@ -66,10 +66,3 @@ export function getCoreDepartmentList(query) {
params: query
})
}
export function getDepartmentList(query) {
return request({
url: '/system/dept/list',
method: 'get',
params: query
})
}

View File

@ -8,13 +8,7 @@ export function createGroupRule(data) {
data: data
})
}
// 作废排班规则
export function disableGroupRule(id) {
return request({
url: '/base/group-scheduling-rule/disable?id=' + id,
method: 'post',
})
}
// 更新排班规则基础信息
export function updateGroupRule(data) {
return request({

View File

@ -5,6 +5,13 @@
* @LastEditors: zhp
* @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'
@ -19,7 +26,7 @@ export function getItemPageData(data) {
return request({
url: '/base/equipment-check-program/page',
method: 'get',
params: data
data
})
}

View File

@ -38,8 +38,15 @@
</el-row>
<el-row :gutter="20">
<el-col :span='6'>
<el-form-item label="发货负责人" prop="deliveryPerson">
<el-input v-model="form.deliveryPerson"></el-input>
<el-form-item label="发货负责人" prop="deliveryPersonId">
<el-select v-model="form.deliveryPersonId" placeholder="请选择" style="width: 100%;" filterable>
<el-option
v-for="item in personList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span='6'>
@ -68,6 +75,7 @@
</el-form>
</template>
<script>
import { getWorkerList } from '@/api/base/worker'
import { deliveryLogCreate, deliveryLogUpdate, getDeliveryLog, listOrderList } from '@/api/base/delivery'
export default {
name: 'AddOrUpdate',
@ -79,7 +87,7 @@ export default {
name: '',
code: '',
deliveryTime: null,
deliveryPerson: '',
deliveryPersonId: '',
principal: '',
principalCall: '',
principalCost: 0.00,
@ -92,6 +100,7 @@ export default {
code: [{ required: true, message: "发货单号不能为空", trigger: "blur" }]
},
orderList: [],
personList: []
}
},
methods: {
@ -109,6 +118,9 @@ export default {
listOrderList().then(res => {
this.orderList = res.data || []
})
getWorkerList().then(res => {
this.personList = res.data || []
})
},
submitForm() {
this.$refs['addOrUpdate'].validate((valid) => {

View File

@ -252,7 +252,7 @@ export default {
computed: {},
created() {
this.fillLineOptions();
// this.fillProductOptions();
this.fillProductOptions();
},
mounted() {
// window.addEventListener('resize', () => {
@ -284,23 +284,23 @@ export default {
);
},
// async fillProductOptions() {
// const { data } = await this.$axios({
// url: '/base/core-product/listAll',
// method: 'get',
// });
// const cfg = this.searchBarFormConfig.find(
// (item) => item.__index == 'product'
// );
// this.$set(
// cfg,
// 'selectOptions',
// data.map((item) => ({
// id: item.id,
// name: item.name,
// }))
// );
// },
async fillProductOptions() {
const { data } = await this.$axios({
url: '/base/core-product/listAll',
method: 'get',
});
const cfg = this.searchBarFormConfig.find(
(item) => item.__index == 'product'
);
this.$set(
cfg,
'selectOptions',
data.map((item) => ({
id: item.id,
name: item.name,
}))
);
},
async getList() {
const { data } = await this.$axios({

View File

@ -1,20 +1,30 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2024-11-18 09:51:03
* @LastEditors: zhp
* @LastEditTime: 2024-07-31 09:48:36
* @Description:
-->
<template>
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" :before-close="beforeClose"
class="drawer" size="60%">
<el-drawer
:visible.sync="visible"
:show-close="false"
:wrapper-closable="true"
:before-close="beforeClose"
class="drawer"
size="60%">
<small-title slot="title" :no-padding="true">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
</small-title>
<div class="content">
<div class="visual-part">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
label-width="100px" label-position="top">
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="100px"
label-position="top">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="巡检单名称" prop="name">
@ -23,17 +33,34 @@
</el-col>
<el-col :span="8">
<el-form-item label="部门" prop="departmentId">
<el-select v-model="dataForm.departmentId" :disabled="isdetail" :placeholder="`请选择部门`"
<el-select
v-model="dataForm.departmentId"
:disabled="isdetail"
:placeholder="`请选择部门`"
style="width: 100%">
<el-option v-for="opt in departmentOptions" :key="opt.id" :label="opt.name" :value="opt.id" />
<el-option
v-for="opt in departmentOptions"
:key="opt.id"
:label="opt.name"
: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
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>
@ -41,18 +68,31 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="巡检人" prop="checkPerson">
<!-- <el-input v-model="dataForm.checkPerson" :disabled="isdetail" placeholder="请输入巡检人" /> -->
<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
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-date-picker
v-model="dataForm.actualCheckTime"
type="datetime"
:disabled="isdetail"
placeholder="请选择实际巡检时间"
value-format="timestamp"
style="width: 100%" />
</el-form-item>
</el-col>
</el-row>
@ -65,7 +105,10 @@
</small-title>
<div v-if="!isdetail" style="display: flex">
<SearchBar :formConfigs="searchBarFormConfig" ref="attr-search-bar" @headBtnClick="handleSearchBarBtnClick" />
<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;">
@ -75,13 +118,26 @@
</el-button>
<!-- </div> -->
</div>
<base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
<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"
<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" />
<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>
@ -93,7 +149,11 @@
<el-button v-else type="primary" @click="dataFormSubmit()">保存</el-button>
</div>
<attr-add v-if="addOrUpdateVisible" ref="addOrUpdate" :order-id="dataForm.id" @refreshDataList="getList" />
<attr-add
v-if="addOrUpdateVisible"
ref="addOrUpdate"
:order-id="dataForm.id"
@refreshDataList="getList" />
</el-drawer>
</template>
@ -245,15 +305,15 @@ export default {
}))
);
}
// const workerlist = await this.$axios('/base/core-worker/listAll');
// if (workerlist.code == 0) {
// inspectorList = inspectorList.concat(
// workerlist.data.map((item) => ({
// label: item.name,
// value: item.id,
// }))
// );
// }
const workerlist = await this.$axios('/base/core-worker/listAll');
if (workerlist.code == 0) {
inspectorList = inspectorList.concat(
workerlist.data.map((item) => ({
label: item.name,
value: item.id,
}))
);
}
this.inspectorOptions = inspectorList;
// const res1 = await groupClassesListAll();
// this.groupOptions = res1.data || [];
@ -393,12 +453,9 @@ export default {
// }
this.$axios({
url:
`/base/equipment-check-order/confirm`,
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
method: 'put',
data: {
ids: [this.dataForm.id],
confirmBy: this.$store.getters.nickname,
},
data: [this.dataForm.id],
}).then(res =>{
if (res.code == 0) {
this.visible = false;

View File

@ -42,7 +42,9 @@
import AddOrUpdate from './add-or-updata';
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { exportCheckOrderExcel } from '@/api/equipment/base/maintain/record';
import {
exportCheckOrderExcel,
} from '@/api/equipment/base/maintain/record';
import WaitingListTable from './WaitingListTable.vue';
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
@ -74,14 +76,16 @@ export default {
name: 'Confirm',
components: {
WaitingListTable,
AddOrUpdate,
AddOrUpdate
},
mixins: [basicPageMixin],
data() {
return {
addOrUpdateVisible: false,
recordDetailVisible: false,
searchBarKeys: ['name'],
searchBarKeys: [
'name'
],
tobeConfirmedIdList: [],
searchBarFormConfig: [
{
@ -97,24 +101,19 @@ export default {
color: 'primary',
},
{
type:
this.$auth.hasPermiAnd([
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'
: '',
'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',
'base:core-department:query'
])
? 'button'
: '',
@ -212,14 +211,11 @@ export default {
// }
return this.$axios({
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
url: `/base/equipment-check-order/confirm`,
url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
method: 'put',
data: {
ids: this.$refs['waiting-list-table'].selectedPlan.map(
data: this.$refs['waiting-list-table'].selectedPlan.map(
(item) => item.id
),
confirmBy: this.$store.getters.nickname,
},
});
})
.then((res) => {
@ -243,14 +239,11 @@ export default {
// }
return this.$axios({
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
url: `/base/equipment-check-order/confirm2`,
url: `/base/equipment-check-order/confirm2?confirmPerson=${this.$store.getters.nickname}`,
method: 'put',
data: {
ids: this.$refs['waiting-list-table'].selectedPlan.map(
data: this.$refs['waiting-list-table'].selectedPlan.map(
(item) => item.id
),
confirmBy: this.$store.getters.nickname,
},
});
})
.then((res) => {
@ -318,7 +311,7 @@ export default {
},
handleSearchBarChange({ param, value }) {
console.log('122', param);
console.log('122', param)
// if ('specialType' === param) {
// if (!value) {
// this.setSearchBarEquipmentList(this.allSpecialEquipments);
@ -334,7 +327,7 @@ export default {
this.loading = true;
//
this.recv({
...this.queryParams,
...this.queryParams
}).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
@ -469,12 +462,10 @@ export default {
// checkPersonParam = `&checkPerson=${row.checkPerson}`
// }
return this.$axios({
url: `/base/equipment-check-order/confirm`,
url:
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
method: 'put',
data: {
ids: [row.id],
confirmBy: this.$store.getters.nickname,
},
data: [row.id],
});
})
.then((res) => {
@ -510,7 +501,9 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
this.$modal
.confirm('是否确认删除巡检单名称为"' + row.name + '"的数据项?')
.confirm(
'是否确认删除巡检单名称为"' + row.name + '"的数据项?'
)
.then(() => {
return this.$axios({
url: '/base/equipment-check-order/delete?id=' + row.id,

View File

@ -6,7 +6,12 @@
* @Description:
-->
<template>
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" class="drawer" size="50%">
<el-drawer
:visible.sync="visible"
:show-close="false"
:wrapper-closable="true"
class="drawer"
size="50%">
<small-title slot="title" :no-padding="true">
<!-- {{ isdetail ? '详情' : '添加巡检' }} -->
{{ '添加内容' }}
@ -23,7 +28,7 @@
<div class="lightTip">{{ dataForm.department }}</div>
</el-col>
<el-col :span="8">
<div class="blodTip">计划巡检时间</div>
<div class="blodTip">巡检时间</div>
<div class="lightTip">{{ parseTime(dataForm.planCheckTime) }}</div>
</el-col>
</el-row>
@ -32,7 +37,9 @@
<el-divider />
<div class="attr-list">
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
<small-title
style="margin: 16px 0; padding-left: 8px"
:no-padding="true">
巡检内容
</small-title>
@ -43,13 +50,26 @@
</span>
</template>
</div>
<base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
<base-table
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="checkDetList">
<method-btn v-if="!isdetail" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
<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" />
<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">
<el-button type="primary" @click="goback()">关闭</el-button>
@ -58,7 +78,11 @@
</div>
<attr-add v-if="addOrUpdateVisible" ref="addOrUpdate" :order-id="dataForm.id" @refreshDataList="getList" />
<attr-add
v-if="addOrUpdateVisible"
ref="addOrUpdate"
:order-id="dataForm.id"
@refreshDataList="getList" />
</el-drawer>
</template>
@ -87,13 +111,8 @@ const tableProps = [
},
{
prop: 'program',
label: '巡检项目',
},
{
prop: 'checkResult',
label: '巡检结果',
},
label: '检查项目',
}
];
export default {

View File

@ -17,7 +17,7 @@
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="默认巡检结果" prop="resultType">
<el-select v-model="dataForm.resultType" placeholder="请选择默认保养结果" @change="handleClear">
<el-select v-model="dataForm.resultType" placeholder="请选择默认保养结果">
<el-option v-for="dict in resultList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
@ -38,16 +38,13 @@
</el-col>
</el-row>
<el-row v-else-if="dataForm.resultType === 2" :gutter="24">
<el-col :span="11">
<el-col :span="12">
<el-form-item prop="minValue">
<el-input oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.minValue" placeholder="请输入最小值" />
</el-form-item>
</el-col>
<el-col :span="4">
</el-col>
<el-col :span="9">
<el-form-item prop="maxValue" label-width="20">
<el-col :span="12">
<el-form-item prop="maxValue">
<el-input @change="handleChange" oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.maxValue"
placeholder="请输入最大值" />
</el-form-item>
@ -117,11 +114,6 @@ export default {
console.log('我看看', this.dataForm)
},
methods: {
handleClear() {
this.dataForm.minValue = undefined
this.dataForm.maxValue = undefined
this.dataForm.maintainResult = undefined
},
async getDict() {
//
const res = await getList();

View File

@ -36,7 +36,7 @@ const tableProps = [
align:'center',
},
{
prop: 'checkResult',
prop: 'maintainResult',
label: '默认巡检结果',
align: 'center',
},
@ -102,8 +102,7 @@ export default {
getDataList(id) {
this.dataListLoading = true;
this.queryParams.equipmentTypeId = id
console.log(id);
this.urlOptions.getDataListURL(this.queryParams).then(response => {
this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.list;
this.listQuery.total = response.data.total;
this.dataListLoading = false

View File

@ -6,13 +6,24 @@
-->
<template>
<el-form ref="form" :model="form" :size="size" :label-position="labelPosition" v-loading="formLoading">
<el-form
ref="form"
:model="form"
:size="size"
:label-position="labelPosition"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="设备保养单号" prop="maintainOrderNumber" :rules="[
<el-form-item
label="设备保养单号"
prop="maintainOrderNumber"
:rules="[
{ required: true, message: '请输入设备保养单号', trigger: 'blur' },
]">
<el-input v-model="form.maintainOrderNumber" @change="$emit('update', form)" :placeholder="`请输入保养计划单号`"
<el-input
v-model="form.maintainOrderNumber"
@change="$emit('update', form)"
:placeholder="`请输入保养计划单号`"
:disabled="disabled" />
</el-form-item>
</el-col>
@ -24,10 +35,22 @@
</el-col>
<el-col :span="12">
<el-form-item label="部门" prop="departmentId" :rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
<el-select v-model="form.departmentId" :placeholder="`请选择部门`" :disabled="disabled" clearable filterable
<el-form-item
label="部门"
prop="departmentId"
:rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
<el-select
v-model="form.departmentId"
: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-option
v-for="opt in departmentOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
@ -52,10 +75,22 @@
</el-col>
<el-col :span="12">
<el-form-item label="产线" prop="lineId" :rules="[{ required: true, message: '请选择产线', trigger: 'blur' }]">
<el-select v-model="form.lineId" :placeholder="`请选择产线`" :disabled="disabled" clearable filterable
<el-form-item
label="产线"
prop="lineId"
:rules="[{ required: true, message: '请选择产线', trigger: 'blur' }]">
<el-select
v-model="form.lineId"
:placeholder="`请选择产线`"
: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-option
v-for="opt in lineOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
@ -79,29 +114,47 @@
</el-col>
<el-col :span="12">
<el-form-item label="实际开始时间" prop="startTime" :rules="[
<el-form-item
label="实际开始时间"
prop="startTime"
:rules="[
{ required: true, message: '请选择实际开始时间', trigger: 'blur' },
]">
<el-date-picker v-model="form.startTime" type="datetime" :disabled="edit" placeholder="请选择实际开始时间"
@change="$emit('update', form)" value-format="timestamp"></el-date-picker>
<el-date-picker
v-model="form.startTime"
type="datetime"
:disabled="edit"
placeholder="请选择实际开始时间"
@change="$emit('update', form)"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="实际结束时间" prop="endTime" :rules="[
<el-form-item
label="实际结束时间"
prop="endTime"
:rules="[
{ required: true, message: '请选择实际结束时间', trigger: 'blur' },
]">
<el-date-picker v-model="form.endTime" type="datetime" :disabled="edit" placeholder="请选择实际结束时间"
@change="$emit('update', form)" value-format="timestamp"></el-date-picker>
<el-date-picker
v-model="form.endTime"
type="datetime"
:disabled="edit"
placeholder="请选择实际结束时间"
@change="$emit('update', form)"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="实际保养人员" prop="maintainWorker" :rules="[
{ required: false, message: '请输入实际保养人员', trigger: 'blur' },
<el-form-item
label="实际保养人员"
prop="maintainWorker"
:rules="[
{ required: false, message: '请选择实际保养人员', trigger: 'blur' },
]">
<el-input v-model="form.maintainWorker" @change="$emit('update', form)" :placeholder="`请输入实际保养人员`" :disabled="disabled" />
<!-- <el-select
<el-select
v-model="form.maintainWorker"
:placeholder="`请选择实际保养人员`"
:disabled="disabled"
@ -114,13 +167,17 @@
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select> -->
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" @change="$emit('update', form)" :placeholder="`请输入备注`" :disabled="disabled" />
<el-input
v-model="form.remark"
@change="$emit('update', form)"
:placeholder="`请输入备注`"
:disabled="disabled" />
</el-form-item>
</el-col>
</el-row>
@ -264,6 +321,7 @@ export default {
const urls = [
'/base/core-production-line/listAll',
'/system/dept/list-all-simple',
'/base/core-worker/listAll',
];
let res;
switch (source) {
@ -271,6 +329,10 @@ export default {
res = await this.$axios(urls[1]);
this.departmentList = res.data || [];
break;
case 'maintainer':
res = await this.$axios(urls[2]);
this.maintainerList = res.data || [];
break;
case 'line':
res = await this.$axios(urls[0]);
this.lineList = res.data || [];

View File

@ -6,15 +6,27 @@
-->
<template>
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" class="drawer"
custom-class="mes-drawer" size="60%" :before-close="beforeClose" @closed="$emit('destroy')">
<el-drawer
:visible.sync="visible"
:show-close="false"
: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__content">
<div class="form-part" style="margin-bottom: 32px">
<!-- <el-skeleton v-if="!showForm" animated /> -->
<el-form class="equipment-info-form" ref="form" :model="form" label-width="200px" label-position="top"
<el-form
class="equipment-info-form"
ref="form"
:model="form"
label-width="200px"
label-position="top"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="8">
@ -26,13 +38,19 @@
trigger: 'blur',
},
]" -->
<el-input v-model="form.maintainOrderNumber" disabled :placeholder="`请输入保养计划单号`" />
<el-input
v-model="form.maintainOrderNumber"
disabled
:placeholder="`请输入保养计划单号`" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="保养计划名称" prop="planName">
<el-input v-model="form.planName" placeholder="请输入保养计划名称" disabled />
<el-input
v-model="form.planName"
placeholder="请输入保养计划名称"
disabled />
</el-form-item>
</el-col>
@ -41,8 +59,16 @@
<!-- :rules="[
{ required: true, message: '请选择部门', trigger: 'blur' },
]" -->
<el-select v-model="form.departmentId" :placeholder="`请选择部门`" clearable disabled filterable>
<el-option v-for="opt in departmentOptions" :key="opt.value" :label="opt.label"
<el-select
v-model="form.departmentId"
:placeholder="`请选择部门`"
clearable
disabled
filterable>
<el-option
v-for="opt in departmentOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
@ -53,69 +79,104 @@
<!-- :rules="[
{ required: true, message: '请选择产线', trigger: 'blur' },
]" -->
<el-select v-model="form.lineId" :placeholder="`请选择产线`" disabled clearable filterable>
<el-option v-for="opt in lineOptions" :key="opt.value" :label="opt.label" :value="opt.value" />
<el-select
v-model="form.lineId"
:placeholder="`请选择产线`"
disabled
clearable
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-form-item label="计划保养人员" prop="maintainer">
<el-select v-model="form.planMaintainWorker" placeholder="请选择计划保养人员" disabled clearable filterable />
<el-select
v-model="form.planMaintainWorker"
placeholder="请选择计划保养人员"
disabled
clearable
filterable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划开始时间" prop="planStartTime">
<el-date-picker v-model="form.planStartTime" type="datetime" disabled placeholder="请选择计划开始时间"
<el-date-picker
v-model="form.planStartTime"
type="datetime"
disabled
placeholder="请选择计划开始时间"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划结束时间" prop="planEndTime">
<el-date-picker v-model="form.planEndTime" type="datetime" disabled placeholder="请选择计划结束时间"
<el-date-picker
v-model="form.planEndTime"
type="datetime"
disabled
placeholder="请选择计划结束时间"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际开始时间" prop="startTime" :rules="[
<el-form-item
label="实际开始时间"
prop="startTime"
:rules="[
{
required: true,
message: '请选择实际开始时间',
trigger: 'blur',
},
]">
<el-date-picker v-model="form.startTime" type="datetime" placeholder="请选择实际开始时间"
<el-date-picker
v-model="form.startTime"
type="datetime"
placeholder="请选择实际开始时间"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际结束时间" prop="endTime" :rules="[
<el-form-item
label="实际结束时间"
prop="endTime"
:rules="[
{
required: true,
message: '请选择实际结束时间',
trigger: 'blur',
},
]">
<el-date-picker v-model="form.endTime" type="datetime" placeholder="请选择实际结束时间"
<el-date-picker
v-model="form.endTime"
type="datetime"
placeholder="请选择实际结束时间"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际保养人员" prop="maintainWorker" :rules="[
<el-form-item
label="实际保养人员"
prop="maintainWorker"
:rules="[
{
required: false,
message: '请输入实际保养人员',
message: '请选择实际保养人员',
trigger: 'blur',
},
]">
<el-input v-model="form.maintainWorker" :placeholder="`请输入实际保养人员`" />
<!-- <el-select
<el-select
v-model="form.maintainWorker"
:placeholder="`请选择实际保养人员`"
multiple
@ -126,7 +187,7 @@
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select> -->
</el-select>
</el-form-item>
</el-col>
@ -142,7 +203,10 @@
<SmallTitle>保养内容</SmallTitle>
<div style="margin-top: 12px; position: relative">
<SearchBar :formConfigs="searchBarFormConfig" ref="attr-search-bar" @headBtnClick="handleSearchBarBtnClick" />
<SearchBar
:formConfigs="searchBarFormConfig"
ref="attr-search-bar"
@headBtnClick="handleSearchBarBtnClick" />
</div>
<div style="margin-top: 12px; position: relative">
@ -152,14 +216,27 @@
添加属性
</el-button>
</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
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" />
<pagination
v-show="attrTotal > 0"
:total="attrTotal"
:page.sync="attrQuery.params.pageNo"
:limit.sync="attrQuery.params.pageSize"
@pagination="getAttrList" />
</div>
</div>
@ -177,9 +254,20 @@
</div>
<!-- 属性对话框 -->
<base-dialog :dialogTitle="attrTitle" :dialogVisible="attrFormVisible" width="35%" :append-to-body="true"
custom-class="baseDialog" @close="closeAttrForm" @cancel="closeAttrForm" @confirm="submitAttrForm">
<DialogForm v-if="attrFormVisible" ref="attrForm" v-model="attrForm" :rows="attrRows" />
<base-dialog
:dialogTitle="attrTitle"
:dialogVisible="attrFormVisible"
width="35%"
:append-to-body="true"
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>
@ -453,7 +541,7 @@ export default {
const urls = [
'/base/core-production-line/listAll',
'system/dept/list-all-simple',
// '/base/core-worker/listAll',
'/base/core-worker/listAll',
];
let res;
switch (source) {
@ -461,10 +549,10 @@ export default {
res = await this.$axios(urls[1]);
this.departmentList = res.data || [];
break;
// case 'maintainer':
// res = await this.$axios(urls[2]);
// this.maintainerList = res.data || [];
// break;
case 'maintainer':
res = await this.$axios(urls[2]);
this.maintainerList = res.data || [];
break;
case 'line':
res = await this.$axios(urls[0]);
this.lineList = res.data || [];

View File

@ -105,16 +105,14 @@
<el-form-item label="实际保养人员" prop="maintainWorker" :rules="[
{
required: false,
message: '请输入实际保养人员',
message: '请选择实际保养人员',
trigger: 'blur',
},
]">
<el-input v-model="form.maintainWorker" :placeholder="`请输入实际保养人员`" />
<!-- <el-select v-model="form.maintainWorker" :placeholder="`请选择实际保养人员`" multiple clearable filterable>
<el-select v-model="form.maintainWorker" :placeholder="`请选择实际保养人员`" multiple clearable filterable>
<el-option v-for="opt in maintainerOptions" :key="opt.value" :label="opt.label"
:value="opt.value" />
</el-select> -->
</el-select>
</el-form-item>
</el-col>
@ -392,12 +390,10 @@ export default {
console.log('111', confirm)
this.$axios({
url:
'/base/equipment-maintain-log/confirm',
'/base/equipment-maintain-log/confirm?confirmPerson=' +
this.$store.getters.userId,
method: 'put',
data: {
ids: [this.form.id],
confirmBy: this.$store.getters.nickname,
},
data: [this.form.id],
}).then(res =>{
if (res.code == 0) {
this.visible = false;
@ -449,7 +445,7 @@ export default {
method: 'put',
data: {
...this.form,
maintainWorker: this.form.maintainWorker ? this.form.maintainWorker.join(',') :null,
maintainWorker: this.form.maintainWorker.join(','),
special: false,
relatePlan: 2
}
@ -468,7 +464,7 @@ export default {
method: 'post',
data: {
...this.form,
maintainWorker: this.form.maintainWorker ? this.form.maintainWorker.join(',') : null,
maintainWorker: this.form.maintainWorker.join(','),
special: false,
relatePlan: 2,
confirmed: false,
@ -540,7 +536,7 @@ export default {
const urls = [
'/base/core-production-line/listAll',
'/system/dept/list-all-simple',
// '/base/core-worker/listAll',
'/base/core-worker/listAll',
];
let res;
switch (source) {
@ -548,10 +544,10 @@ export default {
res = await this.$axios(urls[1]);
this.departmentList = res.data || [];
break;
// case 'maintainer':
// res = await this.$axios(urls[2]);
// this.maintainerList = res.data || [];
// break;
case 'maintainer':
res = await this.$axios(urls[2]);
this.maintainerList = res.data || [];
break;
case 'line':
res = await this.$axios(urls[0]);
this.lineList = res.data || [];

View File

@ -287,12 +287,9 @@ export default {
return this.$axios({
url: '/base/equipment-maintain-log/confirm',
method: 'put',
data:{
ids: this.$refs['waiting-list-table'].selectedPlan.map(
data: this.$refs['waiting-list-table'].selectedPlan.map(
(item) => item.id
),
confirmBy: this.$store.getters.nickname,
},
});
// if (res.code == 0) {
// this.$message.success('');
@ -316,12 +313,9 @@ export default {
return this.$axios({
url: '/base/equipment-maintain-log/confirm2',
method: 'put',
data: {
ids: this.$refs['waiting-list-table'].selectedPlan.map(
data: this.$refs['waiting-list-table'].selectedPlan.map(
(item) => item.id
),
confirmBy: this.$store.getters.nickname,
},
});
// if (res.code == 0) {
// this.$message.success('');
@ -553,10 +547,7 @@ export default {
return this.$axios({
url: '/base/equipment-maintain-log/confirm',
method: 'put',
data: {
ids: [row.id],
confirmBy: this.$store.getters.nickname,
},
data: [row.id],
});
// if (res.code == 0) {
// this.$message.success('');

View File

@ -135,7 +135,7 @@ export default {
maintainDuration: undefined,
remark: undefined,
firstMaintenanceTime: undefined,
maintainer: null
maintainer: undefined
},
menuOptions: [],
proLineList: [],
@ -175,8 +175,8 @@ export default {
const resline = await getCorePLList();
this.proLineList = resline.data;
//
// const personres = await getWorkerList()
// this.personList = personres.data || []
const personres = await getWorkerList()
this.personList = personres.data || []
},
getList() {
//
@ -259,8 +259,7 @@ export default {
if (this.dataForm.id) {
this.urlOptions.updateURL({
...this.dataForm,
maintainer: this.dataForm.maintainer ? this.dataForm.maintainer.join(',') : null,
maintainer: this.dataForm.maintainer.join(',')
}).then(response => {
this.$modal.msgSuccess("修改成功");
this.visible = false;
@ -271,7 +270,7 @@ export default {
//
this.urlOptions.createURL({
...this.dataForm,
maintainer: this.dataForm.maintainer ? this.dataForm.maintainer.join(',') : null,
maintainer: this.dataForm.maintainer.join(',')
}).then(response => {
this.$modal.msgSuccess("新增成功");
// this.idAttrShow = true

View File

@ -17,7 +17,7 @@
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="默认保养结果" prop="resultType">
<el-select v-model="dataForm.resultType" placeholder="请选择默认保养结果" @change="handleClear">
<el-select v-model="dataForm.resultType" placeholder="请选择默认保养结果">
<el-option v-for="dict in resultList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
@ -39,16 +39,13 @@
</el-col>
</el-row>
<el-row v-else-if="dataForm.resultType === 2" :gutter="24">
<el-col :span="11">
<el-col :span="12">
<el-form-item prop="minValue">
<el-input oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.minValue" placeholder="请输入最小值" />
</el-form-item>
</el-col>
<el-col :span="4">
</el-col>
<el-col :span="9">
<el-form-item prop="maxValue" label-width="20">
<el-col :span="12">
<el-form-item prop="maxValue">
<el-input @change="handleChange" oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.maxValue"
placeholder="请输入最大值" />
</el-form-item>
@ -105,9 +102,7 @@ export default {
dataRule: {
// materialId: [{ required: true, message: "", trigger: "blur" }],
program: [{ required: true, message: "保养项目不能为空", trigger: "blur" }],
maintainResult: [{ required: true, message: "文本或数值不能为空不能为空", trigger: "blur" }],
resultType: [{ required: true, message: "默认保养结果不能为空", trigger: "blur" }],
maintainResult: [{ required: true, message: "默认保养结果不能为空", trigger: "blur" }],
minValue: [{ required: true, message: "最小值不能为空", trigger: "blur" }],
maxValue: [{ required: true, message: "最大值不能为空", trigger: "blur" }],
@ -120,11 +115,6 @@ export default {
console.log('我看看', this.dataForm)
},
methods: {
handleClear() {
this.dataForm.minValue = undefined
this.dataForm.maxValue = undefined
this.dataForm.maintainResult = undefined
},
async getDict() {
//
const res = await getList();

View File

@ -223,13 +223,15 @@ export default {
},
methods: {
initSearchBar() {
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
console.log('data', data);
this.http('/base/core-equipment/page', 'get', {
special: false,
pageNo: 1,
pageSize: 999,
}).then(({ data }) => {
this.$set(
this.searchBarFormConfig[0],
'selectOptions',
(data || []).map((item) => ({
(data?.list || []).map((item) => ({
name: item.name,
id: item.id,
}))

View File

@ -184,17 +184,16 @@ export default {
],
[
{
input: true, // TODO: or INPUT instead of SELECT
select: true, // TODO: or INPUT instead of SELECT
label: '负责人',
prop: 'responsible',
// url: 'system/user/page', // TODO:
// valueKey: 'id',
// labelKey:'username',
// bind: {
// filterable: true,
// clearable: true,
// multiple: true
// },
url: '/base/core-worker/listAll', // TODO:
valueKey: 'name',
bind: {
filterable: true,
clearable: true,
multiple: true
},
},
],
[

View File

@ -136,8 +136,7 @@ export default {
select: true,
label: '备件名称',
prop: 'productMaterialId',
url: '/base/core-product-material/listAll', // TODO:
// options: [],
options: [],
bind: {
filterable: true,
clearable: false,

View File

@ -44,7 +44,6 @@ import {
deleteGroupRule,
updateGroupRule,
getGroupRule,
disableGroupRule
} from '@/api/base/groupSchedulingRule';
import schedulingRuleConfigAdd from './components/schedulingRuleConfigAdd.vue';
import { formatDate } from '@/utils';
@ -232,10 +231,15 @@ export default {
'是否确认作废序号为"' + row.planName + '"的数据项?'
,'提示')
.then(() => {
disableGroupRule(row.id).then((response) => {
getGroupRule(row.id).then((response) => {
let datas = response.data;
datas.list = datas.sequenceList;
datas.enabled = 0;
updateGroupRule(datas).then(() => {
_this.getList();
_this.$modal.msgSuccess('操作成功');
});
});
})
.catch(() => {});
},

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2024-09-26 14:08:58
* @LastEditors: zwq
* @LastEditTime: 2024-11-13 15:23:25
* @LastEditTime: 2024-11-06 09:52:59
* @Description:
-->
<template>
@ -92,7 +92,7 @@ const tableProps = [
subcomponent: selectTime,
},
{
prop: 'customerName',
prop: 'customerId',
label: '客户',
showOverflowtooltip: true,
// subcomponent: selectMember,

2925
yarn.lock

File diff suppressed because it is too large Load Diff