Merge branch 'projects/mesxc-test' into projects/mesxc-lb

This commit is contained in:
lb 2024-02-29 17:02:08 +08:00
commit c66e82b152
36 changed files with 978 additions and 427 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,16 +1,17 @@
<!--
* @Author: zhp
* @Date: 2023-10-17 16:50:19
* @LastEditTime: 2023-12-01 16:48:53
* @LastEditTime: 2024-02-28 10:07:29
* @LastEditors: zhp
* @Description:
-->
<template>
<el-dialog class="baseDialog" :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="40%" show-close="true">
<el-dialog class="baseDialog" :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="40%"
show-close="true">
<small-title slot="title" :no-padding="true">
{{ !dataForm.id ? '新增' : '编辑' }}
</small-title>
<!--
<!--
<div class="content">
<div class="visual-part"> -->
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
@ -44,6 +45,12 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="包装条码" prop="packagingBarCode">
<el-input v-model="dataForm.packagingBarCode" clearable placeholder="请输入包装条码" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="标签模板" prop="modelId">
<el-select v-model="dataForm.modelId" style="width: 100%;" placeholder="请选择标签模板" clearable>
@ -186,6 +193,7 @@ export default {
workOrderId: null, // (s)
customerId: '', //
content: '', // id
packagingBarCode: null
},
listQuery: {
pageSize: 10,

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2023-11-24 09:13:50
* @LastEditTime: 2024-02-28 10:38:34
* @Description:
-->
<template>
@ -55,6 +55,10 @@ const tableProps = [
{
prop: 'packagingCode',
label: '包装流水号'
},
{
prop: 'packagingBarCode',
label: '包装条码'
},
{
prop: 'workOrderName',

View File

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

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-27 09:41:00
* @LastEditTime: 2024-02-29 14:59:28
* @Description:
-->
<template>
@ -27,13 +27,14 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="巡检单名称" prop="name">
<el-input v-model="dataForm.name" placeholder="请输入巡检单名称" />
<el-input v-model="dataForm.name" :disabled="isdetail" placeholder="请输入巡检单名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="部门" prop="departmentId">
<el-select
v-model="dataForm.departmentId"
:disabled="isdetail"
:placeholder="`请选择部门`">
<el-option
v-for="opt in departmentOptions"
@ -50,14 +51,14 @@
filterable
clearable
multiple
:disabled="isedit"
:disabled="isdetail"
style="width: 100%"
placeholder="请选择班次">
<el-option
v-for="d in groupOptions"
:key="d.id"
:label="d.name"
:value="d.id" />
:label="d.label"
:value="d.label" />
</el-select>
</el-form-item>
</el-col>
@ -70,8 +71,9 @@
:placeholder="`请选择巡检人`"
multiple
clearable
:disabled="isedit"
filterable>
:disabled="isdetail"
filterable
style="width: 100%">
<el-option
v-for="opt in inspectorOptions"
:key="opt.value"
@ -85,7 +87,7 @@
<el-date-picker
v-model="dataForm.planCheckTime"
type="datetime"
:disabled="isedit"
:disabled="isdetail"
placeholder="请选择巡检时间"
value-format="timestamp"></el-date-picker>
</el-form-item>
@ -142,7 +144,8 @@
<div v-if="!isdetail" class="drawer-body__footer">
<el-button @click="goback()">取消</el-button>
<!-- <el-button :disabled="isdetail" @click="init(dataForm.id)">重置</el-button> -->
<el-button type="primary" @click="dataFormSubmit()">确定</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
@ -163,6 +166,7 @@ import attrAdd from './attr-add';
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
import { getDictDataLabel } from '@/utils/dict';
const tableBtn = [
{
@ -205,6 +209,7 @@ export default {
tableProps,
topBtnConfig,
addOrUpdateVisible: false,
isshowConfirm: false,
urlOptions: {
isGetCode: false,
createURL: createCheckOrder,
@ -242,8 +247,8 @@ export default {
id: undefined,
name: '',
departmentId: undefined,
groupClass: undefined,
checkPerson: undefined,
groupClass: [],
checkPerson: [],
planCheckTime: undefined
},
detList: [],
@ -267,7 +272,10 @@ export default {
async getDict() {
//
const res = await groupClassesListAll();
this.groupOptions = res.data || [];
this.groupOptions = res.data.map((item) => {
item.label = item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict)
return item
}) || [];
//
const res1 = await getCoreDepartmentList();
this.departmentOptions = res1.data || []
@ -314,6 +322,7 @@ export default {
initData() {
this.detList.splice(0);
this.listQuery.total = 0;
this.isshowConfirm = false;
},
handleClick(raw) {
if (raw.type === 'delete') {
@ -373,6 +382,16 @@ export default {
//
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data
if (this.dataForm.groupClass && this.dataForm.groupClass !== ''){
this.dataForm.groupClass = response.data?.groupClass.split(',')
} else {
this.dataForm.groupClass = []
}
if (this.dataForm.checkPerson && this.dataForm.checkPerson !== '') {
this.dataForm.checkPerson = response.data?.checkPerson.split(',')
} else {
this.dataForm.checkPerson = []
}
});
//
this.getList();
@ -398,6 +417,41 @@ export default {
this.$refs.addOrUpdate.init(id);
});
},
getConfirmed() {
return this.$confirm('是否直接确认巡检记录', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
},
async confirmIns() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return;
}
this.$nextTick(() => {
this.getConfirmed().then(confirm => {
this.$axios({
url:
'/base/equipment-check-order/confirm?confirmPerson=' +
this.$store.getters.userId,
method: 'put',
data: [this.dataForm.id],
}).then(res =>{
if (res.code == 0) {
this.visible = false;
this.$emit("refreshDataList");
this.$message.success('已确认');
}
})
}).catch(() => {
this.visible = false;
this.$emit("refreshDataList");
this.$message.success('取消确认');
})
})
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
@ -429,6 +483,7 @@ export default {
}).then(response => {
this.$modal.msgSuccess("新增成功");
this.idAttrShow = true
this.isshowConfirm = true
this.dataForm.id = response.data
// this.visible = false;
this.$emit("refreshDataList");

View File

@ -172,24 +172,27 @@ export default {
async searchBarClicked(btn) {
switch (btn.btnName) {
case 'batchConfirm':
const ids = this.$refs['waiting-list-table'].selectedPlan.map(
(item) => item.id
)
if (this.$refs['waiting-list-table'].selectedPlan.length == 0) {
this.$message.warning('请选择待确认的设备巡检单');
return;
}
const res = await this.$axios({
url: '/base/equipment-check-order/confirm?confirmPerson=' + this.$store.getters.userId + '&ids=' + ids,
this.$modal
.confirm('是否确认所有选中巡检单"?')
.then(() => {
return this.$axios({
url: '/base/equipment-check-order/confirm?confirmPerson=' + this.$store.getters.userId,
method: 'put',
// data: this.$refs['waiting-list-table'].selectedPlan.map(
// (item) => item.id
// ),
data: this.$refs['waiting-list-table'].selectedPlan.map(
(item) => item.id
),
});
if (res.code == 0) {
this.$message.success('确认成功');
})
.then((res) => {
this.getList();
}
res.code == 0 && this.$modal.msgSuccess('确认成功');
res.code != 0 && this.$modal.msgError('确认失败');
})
.catch(() => {});
break;
}
},
@ -328,7 +331,7 @@ export default {
// },
getConfirmed() {
return this.$confirm('是否直接确认保养记录', '提示', {
return this.$confirm('是否直接确认巡检记录', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
@ -388,17 +391,16 @@ export default {
},
/** 确认 */
async handleConfirm(row) {
console.log('111', this.$store.getters.userId)
this.$modal
.confirm('是否确认巡检单"' + row.name + '"?')
.then(() => {
return this.$axios({
url:
'/base/equipment-check-order/confirm?confirmPerson=' +
this.$store.getters.userId + '&ids=' + [row.id],
this.$store.getters.userId,
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
method: 'put',
// data: [row.id],
data: [row.id],
});
})
.then((res) => {

View File

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

View File

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

View File

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

View File

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

View File

@ -14,7 +14,7 @@
custom-class="mes-drawer"
size="60%"
@closed="$emit('destroy')">
<SmallTitle slot="title">编辑</SmallTitle>
<SmallTitle slot="title">{{ showTable ? '编辑' : '新增' }}</SmallTitle>
<div class="drawer-body flex">
<div class="drawer-body__content">
@ -184,6 +184,7 @@
</el-form>
</div>
<div v-if="showTable">
<SmallTitle>保养内容</SmallTitle>
<div style="margin-top: 12px; position: relative">
@ -223,10 +224,13 @@
@pagination="getAttrList" />
</div>
</div>
</div>
<div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleConfirm">保存</el-button>
<!-- 新增可确认 -->
<el-button v-if="isAdd" type="primary" @click="addConfirm">保存</el-button>
<el-button v-else type="primary" @click="handleConfirm">保存</el-button>
<!-- sections的第二项必须是 属性列表 -->
<!-- <el-button
v-if="sections[1].allowAdd"
@ -292,6 +296,8 @@ export default {
return {
visible: false,
btnLoading: false,
showTable: false,
isAdd: false,
form: {},
formLoading: false,
lineList: [],
@ -387,7 +393,7 @@ export default {
attrListLoading: false,
// syncFileListFlag: null,
tableBtn: [],
row: null,
row: {},
};
},
computed: {
@ -414,11 +420,19 @@ export default {
},
},
mounted() {
!this.edit && this.getCode('/base/equipment-maintain-plan/getCode');
this.getList('maintainer');
this.getList('department');
this.getList('line');
},
methods: {
// getCode
async getCode(url) {
this.formLoading = true;
const response = await this.$axios(url);
this.formLoading = false;
this.form.maintainOrderNumber = response.data || '';
},
handleSearchBarBtnClick(btn) {
console.log('btn', btn);
switch (btn.btnName) {
@ -438,24 +452,107 @@ export default {
break;
}
},
async addConfirm() {
console.log('11', this.showTable)
this.$refs['form'].validate((valid) => {
if (!valid) {
return;
}
this.$nextTick(() => {
this.getConfirmed().then(confirm => {
console.log('111', confirm)
this.$axios({
url:
'/base/equipment-maintain-log/confirm?confirmPerson=' +
this.$store.getters.userId,
method: 'put',
data: [this.form.id],
}).then(res =>{
if (res.code == 0) {
this.visible = false;
this.$emit("refreshDataList");
this.$message.success('已确认');
}
})
}).catch(() => {
this.visible = false;
this.$emit("refreshDataList");
this.$message.success('取消确认');
})
})
});
},
getConfirmed() {
return this.$confirm('是否直接确认保养记录', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
},
async handleConfirm() {
this.btnLoading = true;
this.$nextTick(async () => {
const { code, data } = await this.$axios({
// this.$nextTick(async () => {
// const { code, data } = await this.$axios({
// url: '/base/equipment-maintain-log/update',
// method: 'put',
// data: {
// ...this.form,
// maintainWorker: this.form.maintainWorker.join(',')
// },
// });
// if (code == 0) {
// this.$modal.msgSuccess('');
// }
// this.btnLoading = false;
// this.$emit('refreshDataList');
// this.handleCancel();
// });
this.$refs['form'].validate((valid) => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
this.$axios({
url: '/base/equipment-maintain-log/update',
method: 'put',
data: {
...this.form,
maintainWorker: this.form.maintainWorker.join(',')
},
});
if (code == 0) {
this.$modal.msgSuccess('更新成功');
maintainWorker: this.form.maintainWorker.join(','),
special: false,
relatePlan: 2
}
}).then((response) => {
this.$modal.msgSuccess('修改成功');
this.btnLoading = false;
this.$emit('refreshDataList');
this.handleCancel();
});
return;
}
//
this.$axios({
url: '/base/equipment-maintain-log/create',
method: 'post',
data: {
...this.form,
maintainWorker: this.form.maintainWorker.join(','),
special: false,
relatePlan: 2,
confirmed: false,
}
}).then((response) => {
this.$modal.msgSuccess('新增成功');
this.btnLoading = false;
this.form.id = response.data
this.row.id = response.data
this.showTable = true
this.isAdd = true
this.$emit('refreshDataList');
// this.handleCancel();
});
});
},
handleEmitFun(val) {
@ -464,15 +561,22 @@ export default {
init(row) {
this.visible = true;
if (row) {
this.row = row;
this.getInfo(row);
this.getAttrList(row);
this.showTable = row ? true : false;
this.$nextTick(() => {
if (row.id) {
this.getInfo(row.id);
this.getAttrList(row.id);
}
})
}
},
async getInfo(row) {
async getInfo(id) {
this.formLoading = true;
const res = await this.$axios(
'/base/equipment-maintain-log/get?id=' + row.id
'/base/equipment-maintain-log/get?id=' + id
);
if (res.code == 0) {
this.form = res.data;
@ -482,15 +586,15 @@ export default {
this.formLoading = false;
},
async getAttrList(row, condition = {}) {
if (!row) row = this.row;
async getAttrList(id, condition = {}) {
if (!id) id = this.row.id;
this.attrListLoading = true;
const res = await this.$axios({
url: '/base/equipment-maintain-log-det/page',
method: 'get',
params: {
...this.attrQuery.params,
logId: row.id,
logId: id,
...condition,
},
});

View File

@ -258,17 +258,27 @@ export default {
this.$message.warning('请选择待确认的设备保养记录');
return;
}
const res = await this.$axios({
this.$modal
.confirm('是否确认所有选中保养单"?')
.then(() => {
return this.$axios({
url: '/base/equipment-maintain-log/confirm',
method: 'put',
data: this.$refs['waiting-list-table'].selectedPlan.map(
(item) => item.id
),
});
if (res.code == 0) {
this.$message.success('确认成功');
// if (res.code == 0) {
// this.$message.success('');
// this.getList();
// }
})
.then((res) => {
this.getList();
}
res.code == 0 && this.$modal.msgSuccess('确认成功');
res.code != 0 && this.$modal.msgError('确认失败');
})
.catch(() => {});
break;
}
},
@ -412,9 +422,13 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = '添加待确认保养记录';
// this.reset();
// this.open = true;
// this.title = '';
this.openUnplannedDrawer = true;
this.$nextTick(() => {
this.$refs.unplanned.init();
});
},
getConfirmed() {
@ -478,15 +492,25 @@ export default {
},
/** 确认 */
async handleConfirm(row) {
const res = await this.$axios({
this.$modal
.confirm('是否确认保养单"' + row.maintainOrderNumber + '"?')
.then(() => {
return this.$axios({
url: '/base/equipment-maintain-log/confirm',
method: 'put',
data: [row.id],
});
if (res.code == 0) {
this.$message.success('确认成功');
// if (res.code == 0) {
// this.$message.success('');
// this.getList();
// }
})
.then((res) => {
this.getList();
}
res.code == 0 && this.$modal.msgSuccess('确认成功');
res.code != 0 && this.$modal.msgError('确认失败');
})
.catch(() => {});
},
/** 编辑 */
async handleEdit(row) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -136,11 +136,11 @@ export default {
params.teamId = val.data.id
params.teamName = val.data.name
this.workOrderList.map(item => {
if (this.queryParams.workOrderId === item.id) {
if (val.data.workOrderId === item.id) {
this.workOrderName = item.name
}
})
params.workOrderId = this.queryParams.workOrderId
params.workOrderId = val.data.workOrderId
params.workOrderName = this.workOrderName
params.roomNameDict = val.data.roomNameDict
this.$nextTick(() => {

View File

@ -0,0 +1,97 @@
<template>
<el-form :inline="true" class="demo-form-inline">
<span class="blue-block"></span>
<el-form-item label="班次信息">
<el-select v-model="queryParams.classesId" placeholder="班次信息" style="width: 200px;" size="small" clearable>
<el-option
v-for="item in classesArr"
:key="item.id"
:label="(item.roomName?item.roomName:'')+'-'+item.name"
:value="item.id">
<span>{{ item.roomName }}-{{item.name}}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="班组信息">
<el-input v-model="queryParams.teamName" placeholder="班组信息" style="width: 200px;" clearable></el-input>
</el-form-item>
<el-form-item label="上班时间">
<el-date-picker
v-model="queryParams.tiemStr"
type="daterange"
format='yyyy-MM-dd'
value-format='yyyy-MM-dd'
range-separator='-'
style="width: 250px;"
size="small">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="search">查询</el-button>
</el-form-item>
</el-form>
</template>
<script>
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
export default {
name: 'searchArea',
data() {
return {
//
queryParams: {
classesId: '',
teamName: '',
tiemStr: ''
},
classesArr: [],
}
},
mounted() {
this.getGroupClass()
},
methods: {
getGroupClass() {
groupClassesListAll().then(res => {
this.classesArr = res.data || []
})
},
//
search() {
console.log(this.queryParams)
this.$emit('submit', this.queryParams)
}
}
}
</script>
<style lang="scss">
.demo-form-inline {
.el-date-editor .el-range__icon {
font-size: 16px;
color: #0B58FF;
}
.el-input__prefix .el-icon-date {
font-size: 16px;
color: #0B58FF;
}
}
</style>
<style lang="scss" scoped>
.separateStyle {
display: inline-block;
width: 1px;
height: 24px;
background: #E8E8E8;
vertical-align: middle;
}
.demo-form-inline {
.blue-block {
display: inline-block;
width: 4px;
height: 16px;
background-color: #0B58FF;
border-radius: 1px;
margin-right: 8px;
margin-top: 10px;
}
}
</style>

View File

@ -1,11 +1,12 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<search-bar
<search-area @submit="buttonClick"/>
<!-- <search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick"
/>
/> -->
<!-- 列表 -->
<base-table
:page="queryParams.pageNo"
@ -34,10 +35,11 @@
</div>
</template>
<script>
import { groupTeamSchedulingPage, groupClassesListAll } from '@/api/monitoring/teamProduction'
import { groupTeamSchedulingPage } from '@/api/monitoring/teamProduction'
import { parseTime } from '@/utils/ruoyi'
import TeamProductionDetail from './components/teamProductionDetail'
import { publicFormatter } from '@/utils/dict'
import SearchArea from './components/searchArea'
const tableProps = [
{
prop: 'roomNameDict',
@ -139,12 +141,11 @@ export default {
paramVisible: false
}
},
components: { TeamProductionDetail },
components: { TeamProductionDetail, SearchArea },
mounted() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
this.getGroupClass()
this.getList()
},
methods: {
@ -163,11 +164,6 @@ export default {
this.total = res.data.total || 0
})
},
getGroupClass() {
groupClassesListAll().then(res => {
this.formConfig[0].selectOptions = res.data || []
})
},
handleClick(val) {
console.log(val)
this.paramVisible = true

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-02-18 14:07:08
* @LastEditTime: 2024-02-28 09:58:34
* @LastEditors: zhp
* @Description:
-->
@ -15,35 +15,11 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="班组" prop="teamId">
<el-select v-model="dataForm.teamId" placeholder="请选择班组">
<el-option v-for="dict in teamList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="数量" prop="num">
<el-input v-model="dataForm.num" placeholder="请输入数量" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="产线" prop="lineId">
<el-select v-model="dataForm.lineId" placeholder="请选择产线">
<el-option v-for="dict in lineList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报废原因" prop="detId">
<el-select v-model="dataForm.detId" placeholder="请选择报废原因">
<el-option v-for="dict in detList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报废时间" prop="logTime">
<el-date-picker v-model="dataForm.logTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
@ -54,12 +30,28 @@
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="来源" prop="source">
<el-select v-model="dataForm.source" placeholder="请选择来源">
<el-option v-for="dict in sourceList" :key="dict.id" :label="dict.name" :value="dict.id" />
<el-form-item label="产线" prop="lineId">
<el-select v-model="dataForm.lineId" placeholder="请选择产线" @change="getWorksectionById">
<el-option v-for="dict in lineList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工段" prop="sectionId">
<el-select v-model="dataForm.sectionId" placeholder="请选择工段">
<el-option v-for="dict in sectionList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报废原因" prop="detId">
<el-select v-model="dataForm.detId" placeholder="请选择报废原因" multiple>
<el-option v-for="dict in detList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="描述" prop="description">
<el-input v-model="dataForm.description" placeholder="请输入描述" />
@ -76,7 +68,7 @@
</template>
<script>
import basicAdd from '../../../core/mixins/basic-add';
import basicAdd from './basic-add';
import {
createQualityScrapLog, updateQualityScrapLog, getQualityScrapLog, getWorkOrderList,
getTeamList, getDetList,getLineList } from "@/api/base/qualityScrapLog";
@ -99,6 +91,7 @@ export default {
workOrderList: [],
detList:[],
teamList: [],
sectionList:[],
sourceList: [
{
id: 1,
@ -117,6 +110,7 @@ export default {
workOrderId: null,
teamId: undefined,
num: undefined,
sectionId:undefined,
lineId:undefined,
description:undefined,
// description: undefined,
@ -137,6 +131,7 @@ export default {
this.getDict()
console.log('我看看', this.dataForm)
this.getCurrentTime()
this.getWorksectionById()
},
methods: {
getCurrentTime() {
@ -197,6 +192,42 @@ export default {
// console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
})
},
async getWorksectionById(lineId) {
if (lineId) {
const { code, data } = await this.$axios({
url: '/base/core-workshop-section/listByParentId',
method: 'get',
params: {
id: lineId,
},
});
if (code == 0) {
console.log(data)
this.sectionList = data.map((item) => {
return {
name: item.name,
id: item.id,
};
});
}
} else {
this.$axios({
url: '/base/core-workshop-section/listAll',
method: 'get',
// params: {
// id: lineId,
// },
}).then((res) => {
// console.log(data)
this.sectionList = res.data.map((item) => {
return {
name: item.name,
id: item.id,
};
});
})
}
},
// setMaterialCode() {
// const chooseM = this.materialList.filter(item => {

View File

@ -0,0 +1,106 @@
/*
* @Author: zhp
* @Date: 2024-02-28 09:51:25
* @LastEditTime: 2024-02-28 10:05:00
* @LastEditors: zhp
* @Description:
*/
export default {
data() {
/* eslint-disable */
return {
urlOptions: {
createURL: '',
updateURL: '',
infoURL: '',
codeURL: '',
getOption: false,
isGetCode: false,
optionArrUrl: [],
optionArr: {}
},
visible: false,
setData: false
}
},
created() {
},
activated() {
},
methods: {
init(id) {
this.dataForm.id = id || "";
this.visible = true;
if (this.urlOptions.getOption) {
this.getArr()
}
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.urlOptions.infoURL(id).then(response => {
console.log(response)
this.dataForm = response.data
this.dataForm.detId = response.data.detIdList
this.dataForm.logTime = new Date(response.data.createTime)
// if (this.setData) {
// this.setDataForm()
// }
});
} else {
if (this.urlOptions.isGetCode) {
this.getCode()
}
}
});
},
getCode() {
this.urlOptions.codeURL()
.then(({ data: res }) => {
this.dataForm.code = res;
})
.catch(() => {});
},
getArr() {
const params = {
pageSize: 100,
pageNo: 1,
}
this.urlOptions.optionArrUrl.forEach((item, index) => {
item(params).then(({ data: res }) => {
this.$set(this.urlOptions.optionArr, `arr${index}`, res.list)
})
.catch(() => {
});
});
},
// 表单提交
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
// 修改的提交
let str = this.dataForm.detId.join(',')
this.dataForm.detId = str
if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
// 添加的提交
this.urlOptions.createURL(this.dataForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.visible = false;
this.$emit("refreshDataList");
});
});
},
formClear() {
this.$refs.dataForm.resetFields()
}
}
}

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-11-06 15:15:30
* @LastEditTime: 2023-12-01 10:58:25
* @LastEditTime: 2024-02-28 10:13:10
* @LastEditors: zhp
* @Description:
-->
@ -15,43 +15,19 @@
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="工单号" prop="workOrderId">
<el-select v-model="dataForm.workOrderId" placeholder="请选择工单号" disabled>
<el-select disabled v-model="dataForm.workOrderId" placeholder="请选择工单号">
<el-option v-for="dict in workOrderList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="班组" prop="teamId">
<el-select v-model="dataForm.teamId" placeholder="请选择班组" disabled>
<el-option v-for="dict in teamList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
<el-form-item label="数量" prop="num">
<el-input disabled v-model="dataForm.num" placeholder="请输入数量" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="数量" prop="sum">
<el-input v-model="dataForm.sum" placeholder="请输入数量" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="产线" prop="lineId">
<el-select v-model="dataForm.lineId" placeholder="请选择产线" disabled>
<el-option v-for="dict in lineList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报废原因" prop="detId">
<el-select v-model="dataForm.detId" placeholder="请选择报废原因" disabled>
<el-option v-for="dict in detList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报废时间" prop="logTime">
<el-date-picker v-model="dataForm.logTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" disabled
<el-date-picker disabled v-model="dataForm.logTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
@ -59,12 +35,28 @@
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="来源" prop="source">
<el-select v-model="dataForm.source" placeholder="请选择来源" disabled>
<el-option v-for="dict in sourceList" :key="dict.id" :label="dict.name" :value="dict.id" />
<el-form-item label="产线" prop="lineId">
<el-select disabled v-model="dataForm.lineId" placeholder="请选择产线" @change="getWorksectionById">
<el-option v-for="dict in lineList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工段" prop="sectionId">
<el-select v-model="dataForm.sectionId" placeholder="请选择工段" disabled>
<el-option v-for="dict in sectionList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报废原因" prop="detId">
<el-select v-model="dataForm.detId" placeholder="请选择报废原因" multiple disabled>
<el-option v-for="dict in detList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="描述" prop="description">
<el-input v-model="dataForm.description" placeholder="请输入描述" disabled />
@ -147,6 +139,7 @@ export default {
this.getDict()
console.log('我看看', this.dataForm)
this.getCurrentTime()
// this.getWorksectionById()
},
methods: {
// init() {
@ -198,6 +191,7 @@ export default {
// console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
})
getTeamList().then((res) => {
console.log(res);
// console.log(response);
@ -207,15 +201,45 @@ export default {
id: item.id
}
})
this.$axios({
url: '/base/core-workshop-section/listAll',
method: 'get',
// params: {
// id: lineId,
// },
}).then((res) => {
// console.log(data)
this.sectionList = res.data.map((item) => {
return {
name: item.name,
id: item.id,
};
});
})
// if (code == 0) {
// }
// console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
})
},
setMaterialCode() {
const chooseM = this.materialList.filter(item => {
return item.id === this.dataForm.materialId
})
this.dataForm.materialCode = chooseM[0].code
async getWorksectionById(lineId) {
const { code, data } = await this.$axios({
url: '/base/core-workshop-section/listByParentId',
method: 'get',
params: {
id: lineId,
},
});
if (code == 0) {
console.log(data)
this.sectionList = data.map((item) => {
return {
name: item.name,
id: item.id,
};
});
}
}
},
};

View File

@ -30,31 +30,40 @@ import {
} from '@/api/base/qualityScrapLog';
const tableProps = [
{
prop: 'createTime',
label: '添加时间',
filter: parseTime
},
{
prop: 'workOrderName',
label: '工单'
},
{
prop: 'teamName',
label: '班组'
},
{
prop: 'detContent',
label: '报废原因'
},
// {
// prop: 'createTime',
// label: '',
// filter: parseTime
// },
{
prop: 'logTime',
label: '报废时间',
filter: parseTime
},
{
prop: 'lineName',
label: '产线名称'
},
{
prop: 'sectionName',
label: '工段'
},
{
prop: 'workOrderName',
label: '工单名称'
},
{
prop: 'num',
label: '数量'
},
{
prop: 'detContent',
label: '报废原因'
},
{
prop: 'source',
label: '来源',
filter: (val) => val == 1 ? '平板端' : '网页端'
},
];

View File

@ -286,6 +286,7 @@ export default {
// this.searchBarFormConfig[0].defaultSelect = [];
// }
this.getList()
this.getDict()
},
methods: {
/** 获取搜索栏的产线列表 */
@ -320,7 +321,7 @@ export default {
// },
getList() {
this.getDataList()
this.getDict()
// this.getDict()
},
/** 查询列表 */
async getDataList() {
@ -330,7 +331,7 @@ export default {
const {
data: { data, otherList, otherMap, nameData },
} = await getStatisticalDataPage(this.queryParams)
console.log(this.queryParams);
// console.log(this.queryParams);
this.dynamicProps = this.filterNameData(nameData)
this.list = this.filterData(data);
},
@ -373,7 +374,7 @@ export default {
this.getList()
}
console.log(val);
// console.log(val);
}
/** 搜索按钮操作 */
// handleQuery() {