Merge pull request '更新bug' (#412) from projects/mes-zwq into projects/mes-test

Reviewed-on: #412
This commit is contained in:
朱文强 2024-12-27 15:39:23 +08:00
commit baede9ef34
17 changed files with 693 additions and 485 deletions

View File

@ -1,8 +1,8 @@
/*
* @Author: Do not edit
* @Date: 2023-10-21 11:50:46
* @LastEditTime: 2023-11-15 17:19:19
* @LastEditors: DY
* @LastEditTime: 2024-12-27 15:20:14
* @LastEditors: zwq
* @Description:
*/
import request from '@/utils/request'
@ -169,4 +169,12 @@ export function updateBatch(data) {
method: 'put',
data: data
})
}
}
// 更新订单表与工单关联表 多对多
export function updateConCoreWOr(data) {
return request({
url: '/base/core-order-con-work-order/update',
method: 'put',
data: data
})
}

View File

@ -23,6 +23,13 @@ export function getItemPageData(data) {
})
}
export function getByEquId(id) {
return request({
url: '/base/equipment-maintain-program/getByEquId?id=' + id,
method: 'get',
})
}
export function getItemData(id) {
return request({
url: 'base/equipment-maintain-program/get?id=' + id,

View File

@ -37,7 +37,7 @@
<script>
import { createPlanDet, updatePlanDet, getPlanDet } from '@/api/equipment/base/maintain/planconfig';
import { getEquipmentPage } from '@/api/base/equipment'
import { getItemPageData } from '@/api/equipment/base/maintain/items';
import { getByEquId } from '@/api/equipment/base/maintain/items';
export default {
props: {
@ -94,20 +94,14 @@ export default {
});
},
async handleChange(val) {
console.log(val);
let equipmentTypeId = undefined
this.eqList.forEach((ele) => {
if (ele.id == val) {
equipmentTypeId = ele.equipmentTypeId
}
})
const { code, data } = await getItemPageData({
pageNo: 1,
pageSize: 99,
equipmentTypeId: equipmentTypeId,
})
this.programList = data.list
console.log(data);
// let equipmentTypeId = undefined
// this.eqList.forEach((ele) => {
// if (ele.id == val) {
// equipmentTypeId = ele.equipmentTypeId
// }
// })
const { code, data } = await getByEquId(val)
this.programList = data
},
handleDecChange(val) {
let maintenanceDes = undefined

View File

@ -70,6 +70,12 @@ import { getList,} from "@/api/base/qualityScrapType";
export default {
mixins: [basicAdd],
props: {
mainId: {
type: String,
},
},
data() {
return {
urlOptions: {
@ -96,7 +102,7 @@ export default {
id: undefined,
program: undefined,
resultType: undefined,
equipmentTypeId: undefined,
mainId:this.mainId,
minValue: undefined,
maxValue: undefined,
maintainResult:undefined,
@ -117,7 +123,6 @@ export default {
},
mounted() {
this.getDict()
console.log('我看看', this.dataForm)
},
methods: {
handleClear() {

View File

@ -1,8 +1,8 @@
/*
* @Author: zwq
* @Date: 2022-08-24 11:19:43
* @LastEditors: zhp
* @LastEditTime: 2024-07-19 14:47:02
* @LastEditors: zwq
* @LastEditTime: 2024-12-13 15:50:49
* @Description:
*/
export default {
@ -28,10 +28,8 @@ export default {
activated() {
},
methods: {
init(obj) {
console.log(obj);
this.dataForm.id = obj.id || "";
this.dataForm.equipmentTypeId = obj.equipmentTypeId || "";
init(id) {
this.dataForm.id = id || "";
this.visible = true;
if (this.urlOptions.getOption) {
this.getArr()

View File

@ -1,8 +1,8 @@
/*
* @Author: zhp
* @Date: 2024-07-19 09:49:22
* @LastEditTime: 2024-07-22 09:17:31
* @LastEditors: zhp
* @LastEditTime: 2024-12-13 15:52:24
* @LastEditors: zwq
* @Description:
*/
export default {
@ -88,12 +88,8 @@ export default {
if (val.type === "edit") {
this.addOrUpdateVisible = true;
this.addOrEditTitle = "编辑"
let obj = {
id: val.data.id,
equipmentTypeId:val.data.equipmentTypeId
}
this.$nextTick(() => {
this.$refs.addOrUpdate.init(obj);
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "delete") {
this.deleteHandle(val.data.id, val.data.program, val.data._pageIndex)

View File

@ -186,7 +186,7 @@ export default {
handleDetail(row) {
this.showDetailVisible = true
this.$nextTick(() => {
this.$refs.showDetail.init(row.equipmentTypeId)
this.$refs.showDetail.init(row.id)
})
// alert(' ')
// console.log(row)

View File

@ -1,8 +1,8 @@
<!--
* @Author: zhp
* @Date: 2024-07-12 13:28:21
* @LastEditTime: 2024-07-23 14:00:38
* @LastEditors: zhp
* @LastEditTime: 2024-12-13 16:03:29
* @LastEditors: zwq
* @Description:
-->
<template>
@ -22,7 +22,7 @@
</el-drawer>
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel" width="30%">
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit" :main-id="queryParams.mainId"></add-or-update>
</base-dialog>
</div>
@ -74,7 +74,7 @@ export default {
queryParams: {
pageNo:1,
pageSize:10,
equipmentTypeId:null,
mainId:null,
},
tableProps,
basePath: 'base/equipment-maintain-program',
@ -105,21 +105,18 @@ export default {
},
getDataList(id) {
this.dataListLoading = true;
this.queryParams.equipmentTypeId = id
this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.queryParams.mainId = id
this.urlOptions.getDataListURL(this.queryParams).then(response => {
this.tableData = response.data.list;
this.listQuery.total = response.data.total;
this.queryParams.total = response.data.total;
this.dataListLoading = false
});
},
handleAdd() {
this.addOrUpdateVisible = true
this.addOrEditTitle = '新增'
let obj = {
equipmentTypeId: this.queryParams.equipmentTypeId
}
this.$nextTick(() => {
this.$refs.addOrUpdate.init(obj)
this.$refs.addOrUpdate.init()
});
},
init(id) {

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2024-08-14 15:24:11
* @LastEditTime: 2024-12-12 09:54:25
* @Description:
-->
<template>
@ -83,7 +83,7 @@
</el-form-item>
</el-col>
<el-col :span="8" v-if="showTime">
<el-form-item label="生产单位用时" prop="processTime">
<el-form-item label="生产单位用时(s)" prop="processTime">
<el-input
v-model.number="dataForm.processTime"
type="number"

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2024-07-01 14:54:06
* @LastEditors: zwq
* @LastEditTime: 2024-08-21 11:19:51
* @LastEditTime: 2024-12-16 10:03:30
* @Description:
-->
<template>
@ -346,6 +346,7 @@ export default {
this.listQuery.typeId = data.id || undefined;
this.listQuery.product = data.product;
this.$refs.searchBarForm.formInline.type = data.name || undefined;
this.getDataList()
},
//
append(data) {

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2024-10-14 09:26:53
* @LastEditTime: 2024-12-12 16:13:11
* @Description:
-->
<template>
@ -41,18 +41,19 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="物料批次" prop="materialDateId">
<el-form-item label="物料批次" prop="materialDate">
<el-select
v-model="dataForm.materialDateId"
v-model="dataForm.materialDate"
clearable
filterable
allow-create
placeholder="请选择物料批次"
style="width: 100%">
<el-option
v-for="dict in materialDateList"
:key="dict.id"
:label="dict.code"
:value="dict.id" />
:value="dict.code" />
</el-select>
</el-form-item>
</el-col>
@ -147,7 +148,7 @@ import {
getMaterialLog,
getEqListAll,
} from '@/api/base/materialUseLog';
import { getMaterialTree,getMaterialList } from '@/api/base/material';
import { getMaterialTree, getMaterialList } from '@/api/base/material';
import { getMaterDateList } from '@/api/base/materialDate';
import { listSimpleUsers } from '@/api/system/user';
@ -164,7 +165,7 @@ export default {
id: undefined,
materialId: undefined,
materialCode: undefined,
materialDateId: undefined,
materialDate: undefined,
equipmentId: undefined,
userName: undefined,
userNames: [],
@ -208,15 +209,17 @@ export default {
methods: {
async getDictData() {
const materRes = await getMaterialTree(); //
let typeId = materRes.data.find(item=>item.product === 0).id
const listQuery= {
typeId:typeId
}
let typeId = materRes.data.find((item) => item.product === 0).id;
const listQuery = {
typeId: typeId,
};
const materData = await getMaterialList(listQuery);
this.materialList = [];
this.materialList = materData.data;
const dateRes = await getMaterDateList();
this.materialDateList = dateRes.data;
if (!this.dataForm.id) {
const dateRes = await getMaterDateList();
this.materialDateList = dateRes.data;
}
const eqRes = await getEqListAll();
this.eqList = eqRes.data;
const workerRes = await listSimpleUsers();
@ -257,7 +260,7 @@ export default {
this.dataForm.id = response.data.id;
this.dataForm.materialCode = response.data.materialCode;
this.dataForm.materialId = response.data.materialId;
this.dataForm.materialDateId = response.data.materialDateId;
this.dataForm.materialDate = response.data.materialDateName;
this.dataForm.equipmentId = response.data.equipmentId;
this.dataForm.useTime = response.data.useTime;
// this.dataForm.userName = response.data.userName
@ -265,6 +268,11 @@ export default {
this.dataForm.source = response.data.source;
this.dataForm.remark = response.data.remark;
this.dataForm.userNames = response.data.userName.split(',');
getMaterDateList({ materialId: this.dataForm.materialId }).then(
(res) => {
this.materialDateList = res.data;
}
);
});
} else {
}

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,14 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<!-- 列表 -->
<!-- 列表 -->
<base-table
v-loading="dataListLoading"
v-loading="dataListLoading"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
@ -49,13 +48,11 @@ import AddOrUpdate from './add-or-updata';
import basicPage from '@/mixins/basic-page';
import codeFilter from '@/mixins/code-filter';
import {
deleteWarehouseArea,
getWarehouseAreaPage,
getWarehouseAreaListAll
} from "@/api/warehouse/warehouse-area-setup";
import {
getWarehouseList
} from "@/api/warehouse/warehouse-setup";
deleteWarehouseArea,
getWarehouseAreaPage,
getWarehouseAreaListAll,
} from '@/api/warehouse/warehouse-area-setup';
import { getWarehouseList } from '@/api/warehouse/warehouse-setup';
import tableHeightMixin from '@/mixins/tableHeightMixin';
const tableProps = [
@ -79,7 +76,7 @@ const tableProps = [
];
export default {
mixins: [basicPage,tableHeightMixin],
mixins: [basicPage, tableHeightMixin],
data() {
return {
urlOptions: {
@ -94,13 +91,13 @@ export default {
btnName: '编辑',
}
: undefined,
this.$auth.hasPermi(`warehouse:warehouse-area-setup:delete`)
this.$auth.hasPermi(`warehouse:warehouse-area-setup:delete`)
? {
type: 'delete',
btnName: '删除',
}
: undefined,
].filter((v)=>v),
].filter((v) => v),
tableData: [],
formConfig: [
{
@ -129,7 +126,9 @@ export default {
type: 'separate',
},
{
type: this.$auth.hasPermi('warehouse:warehouse-area-setup:create') ? 'button' : '',
type: this.$auth.hasPermi('warehouse:warehouse-area-setup:create')
? 'button'
: '',
btnName: '新增',
name: 'add',
color: 'success',
@ -148,7 +147,7 @@ export default {
getWarehouseAreaListAll().then((response) => {
this.formConfig[1].selectOptions = response.data;
});
},
},
methods: {
buttonClick(val) {
switch (val.btnName) {
@ -180,6 +179,22 @@ export default {
console.log(val);
}
},
//
getDataList() {
this.dataListLoading = true;
getWarehouseAreaListAll().then((response) => { //
this.formConfig[1].selectOptions = response.data;
});
this.urlOptions.getDataListURL(this.listQuery).then(response => {
if (response.hasOwnProperty('data')) {
this.tableData = response.data.list;
this.listQuery.total = response.data.total;
} else {
this.tableData = []
}
this.dataListLoading = false;
});
},
},
};
</script>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 13:52:10
* @LastEditors: zwq
* @LastEditTime: 2024-08-21 10:26:21
* @LastEditTime: 2024-12-16 16:30:12
* @Description:
-->
<template>
@ -35,7 +35,7 @@
<el-form-item label="库区名称" prop="areaId">
<el-select
v-model="dataForm.areaId"
:disabled="!areaArr.length>0"
:disabled="!areaArr.length > 0"
filterable
:style="{ width: '100%' }"
@change="setAreaType"
@ -204,18 +204,22 @@ export default {
},
created() {
getWarehouseList().then((response) => {
this.warehouseArr = response.data;
this.warehouseArr = response.data.filter((item) =>
item.type === 1
);
});
},
methods: {
getAreaList(){
getWarehouseAreaList(this.dataForm.warehouseId).then((response) => {
this.areaArr = response.data;
if(this.areaArr.length===0){
this.$message('该仓库下暂无库区');
}
});
},
getAreaList() {
getWarehouseAreaList(this.dataForm.warehouseId).then((response) => {
this.areaArr = response.data;
this.dataForm.areaId = null
this.dataForm.areaType = null
if (this.areaArr.length === 0) {
this.$message('该仓库下暂无库区');
}
});
},
setAreaType() {
if (this.dataForm.areaId) {
this.dataForm.areaType = this.areaArr.find(

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2024-08-02 16:26:58
* @LastEditors: zwq
* @LastEditTime: 2024-08-08 16:38:53
* @LastEditTime: 2024-12-19 14:15:06
* @Description:,
-->
<template>
@ -103,7 +103,7 @@ export default {
},
created() {
getUserProfile().then((response) => {
this.dataForm.operator = response.data.username;
this.dataForm.operator = response.data.nickname;
});
},
methods: {

View File

@ -67,6 +67,14 @@ const tableProps = [
prop: 'warehouseName',
label: '仓库名称',
},
{
prop: 'areaName',
label: '库区名称',
},
{
prop: 'areaType',
label: '库区类型',
},
{
prop: 'name',
label: '库位名称',
@ -95,6 +103,10 @@ const tableProps = [
filter: parseTime,
width: 150,
},
{
prop: 'goodsName',
label: '物品名称',
},
{
prop: 'remark',
label: '备注',

View File

@ -18,7 +18,7 @@
v-if="tableBtn.length"
slot="handleBtn"
:width="90"
label="库位详情"
label="详情"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
@ -70,10 +70,12 @@ const tableProps = [
{
prop: 'oldCode',
label: '源库位编码',
width: 150,
},
{
prop: 'palletCode',
label: '移动托盘编码',
width: 150,
},
{
prop: 'goodName',