Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
51eec75e24
52
src/api/mes/dv/inventoryRequest.js
Normal file
52
src/api/mes/dv/inventoryRequest.js
Normal file
@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request'
|
||||
// 查询设备点检结果列表
|
||||
export function listRequest(query) {
|
||||
return request({
|
||||
url: 'inventoryRequestController/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 新增计划
|
||||
export function addRequest(data) {
|
||||
return request({
|
||||
url: 'inventoryRequestController/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询结果细
|
||||
export function getRequest(RequestId) {
|
||||
return request({
|
||||
url: 'inventoryRequestController/' + RequestId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改计划
|
||||
export function updateRequest(data) {
|
||||
return request({
|
||||
url: 'inventoryRequestController/',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备
|
||||
export function delRequest(RequestId) {
|
||||
return request({
|
||||
url: 'inventoryRequestController/' + RequestId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 批量删除设备
|
||||
export function delRequests(RequestId) {
|
||||
return request({
|
||||
url: 'inventoryRequestController/del/' + RequestId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
@ -50,3 +50,11 @@ export function delMachinerys(machineryId) {
|
||||
})
|
||||
}
|
||||
|
||||
// 重新定检任务
|
||||
export function rechecklMachinerys(machineryId) {
|
||||
return request({
|
||||
url: 'InventoryTaskController/recheck/' + machineryId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
|
100
src/components/wm/InOutTypeCmps.vue
Normal file
100
src/components/wm/InOutTypeCmps.vue
Normal file
@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<div id="Inventory.vue">
|
||||
<el-table :data="tableData" style="width: 100%" tooltip-effect="dark">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="主键" align="center" prop="typeId"/>
|
||||
<el-table-column label="类型编码" align="center" prop="code"/>
|
||||
<el-table-column label="出入库类型" align="center" prop="flag"/>
|
||||
<el-table-column label="类型名称" align="center" prop="name"/>
|
||||
<el-table-column label="备注" align="center" prop="remark"/>
|
||||
<el-table-column fixed="right" label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="selectRow(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {listWarehouse} from "@/api/mes/wm/warehouse";
|
||||
import {listArea} from "@/api/mes/wm/area";
|
||||
import {listLocation} from "@/api/mes/wm/location";
|
||||
import {listDvsubject} from "@/api/mes/dv/inventoryTask";
|
||||
import {listTYPE} from "@/api/md/TYPE";
|
||||
|
||||
export default {
|
||||
name: "InOutTypeCmps",
|
||||
components: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeNames: ["1", "2", "3", "4", "5"],
|
||||
activeName: "check",
|
||||
// 新增弹窗控制
|
||||
addVisible: false,
|
||||
total: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
planCode: null,
|
||||
planName: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
cycleType: null,
|
||||
cycleCount: null,
|
||||
status: null,
|
||||
wmsInventoryCode:null,
|
||||
updatebby:0,
|
||||
name:null
|
||||
},
|
||||
multipleSelection: [],
|
||||
tableData: [],
|
||||
warehouse: {},
|
||||
typeList: [],
|
||||
userList: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
|
||||
},
|
||||
//监听
|
||||
watch: {},
|
||||
methods: {
|
||||
selectRow(row) {
|
||||
this.$emit("selectType", row);
|
||||
},
|
||||
/** 查询点检计划列表 */
|
||||
getList() {
|
||||
listTYPE(this.queryParams).then(response => {
|
||||
this.tableData = response.rows;
|
||||
this.total = response.total;
|
||||
});
|
||||
},
|
||||
},
|
||||
// 组件创建后调用方法
|
||||
created() {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
#uqcmChkBillList {
|
||||
overflow: hidden;
|
||||
|
||||
.card-shadow {
|
||||
min-height: 10vh;
|
||||
}
|
||||
}
|
||||
</style>
|
115
src/components/wm/InventoryCmps.vue
Normal file
115
src/components/wm/InventoryCmps.vue
Normal file
@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<div id="Inventory.vue">
|
||||
<el-table :data="tableData" style="width: 100%" tooltip-effect="dark">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="计划编码" align="center" prop="wmsInventoryCode" >
|
||||
</el-table-column>
|
||||
<el-table-column label="计划名称" align="center" width="200px" prop="name" />
|
||||
<el-table-column label="物料类型" align="center" width="120px" prop="uomName">
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" width="200px" prop="productName" />
|
||||
<el-table-column label="点检组模型" align="center" width="200px" prop="mrlModelName" />
|
||||
<el-table-column label="点检周期" align="center" width="200px" prop="mrlPeriod" />
|
||||
<el-table-column label="计划规则" align="center" width="200px" prop="planPeriod" />
|
||||
<el-table-column label="开始日期" align="center" prop="startDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束日期" align="center" prop="endDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.finishTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" width="200px" prop="remark" />
|
||||
<el-table-column fixed="right" label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="selectRow(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
:current-page="queryParams.pageNum"
|
||||
:page-sizes="[100, 200, 300, 400]"
|
||||
:page-size="queryParams.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {listWarehouse} from "@/api/mes/wm/warehouse";
|
||||
import {listArea} from "@/api/mes/wm/area";
|
||||
import {listLocation} from "@/api/mes/wm/location";
|
||||
import {listDvsubject} from "@/api/mes/dv/inventoryTask";
|
||||
|
||||
export default {
|
||||
name: "InventoryCmps",
|
||||
components: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeNames: ["1", "2", "3", "4", "5"],
|
||||
activeName: "check",
|
||||
// 新增弹窗控制
|
||||
addVisible: false,
|
||||
total: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
planCode: null,
|
||||
planName: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
cycleType: null,
|
||||
cycleCount: null,
|
||||
status: null,
|
||||
wmsInventoryCode:null,
|
||||
updatebby:0,
|
||||
name:null
|
||||
},
|
||||
multipleSelection: [],
|
||||
tableData: [],
|
||||
warehouse: {},
|
||||
typeList: [],
|
||||
userList: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
//监听
|
||||
watch: {},
|
||||
methods: {
|
||||
selectRow(row) {
|
||||
this.$emit("selecoInventoryTaskHandle", row);
|
||||
},
|
||||
/** 查询点检计划列表 */
|
||||
getList() {
|
||||
|
||||
listDvsubject(this.queryParams).then(response => {
|
||||
this.tableData = response.rows;
|
||||
this.total = response.total;
|
||||
});
|
||||
},
|
||||
},
|
||||
// 组件创建后调用方法
|
||||
created() {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
#uqcmChkBillList {
|
||||
overflow: hidden;
|
||||
|
||||
.card-shadow {
|
||||
min-height: 10vh;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -22,14 +22,13 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
:current-page="pagination.currentPage"
|
||||
:page-sizes="[100, 200, 300, 400]"
|
||||
:page-size="100"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -51,8 +50,17 @@ export default {
|
||||
// 新增弹窗控制
|
||||
addVisible: false,
|
||||
total: 0,
|
||||
pagination: {
|
||||
currentPage: 1
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
areaCode: null,
|
||||
areaName: null,
|
||||
locationId: null,
|
||||
area: null,
|
||||
maxLoa: null,
|
||||
positionX: null,
|
||||
positionY: null,
|
||||
positionZ: null,
|
||||
},
|
||||
multipleSelection: [],
|
||||
tableData: [],
|
||||
|
@ -16,14 +16,13 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
:current-page="pagination.currentPage"
|
||||
:page-sizes="[100, 200, 300, 400]"
|
||||
:page-size="100"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -45,8 +44,14 @@ export default {
|
||||
// 新增弹窗控制
|
||||
addVisible: false,
|
||||
total: 0,
|
||||
pagination: {
|
||||
currentPage: 1
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
locationCode: null,
|
||||
locationName: null,
|
||||
warehouseId: null,
|
||||
area: null,
|
||||
areaFlag: null,
|
||||
},
|
||||
multipleSelection: [],
|
||||
tableData: [],
|
||||
|
@ -18,14 +18,13 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
:current-page="pagination.currentPage"
|
||||
:page-sizes="[100, 200, 300, 400]"
|
||||
:page-size="100"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -45,8 +44,14 @@ export default {
|
||||
// 新增弹窗控制
|
||||
addVisible: false,
|
||||
total: 0,
|
||||
pagination: {
|
||||
currentPage: 1
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
warehouseCode: null,
|
||||
warehouseName: null,
|
||||
location: null,
|
||||
area: null,
|
||||
charge: null,
|
||||
},
|
||||
multipleSelection: [],
|
||||
tableData: [],
|
||||
|
500
src/views/mes/dv/Inventory/InventoryRequest.vue
Normal file
500
src/views/mes/dv/Inventory/InventoryRequest.vue
Normal file
@ -0,0 +1,500 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="结果名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.resultName"
|
||||
placeholder="请输入结果名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:dv:checkplan:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:dv:checkplan:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDeleteIds"
|
||||
v-hasPermi="['mes:dv:checkplan:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:dv:checkplan:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="checkplanList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="结果编码" align="center" prop="requestCode" />"
|
||||
<el-table-column label="计划名称" align="center" width="200px" prop="frockName" />
|
||||
<el-table-column label="结果名称" align="center" width="200px" prop="resultName" />
|
||||
<el-table-column label="点检结果" align="center" width="180px" prop="frockResult" >
|
||||
<template slot-scope="scope">
|
||||
<span >{{ scope.row.frockResult==0?"合格":"异常" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="点检异常" align="center" width="200px" prop="frockError" />
|
||||
<el-table-column label="点检时间" align="center" width="200px" prop="frockDate" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.frockDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="点检人" align="center" width="200px" prop="frockUser" />
|
||||
<el-table-column label="备注" align="center" width="200px" prop="remark" />
|
||||
<el-table-column label="操作" align="center" width="130px" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:dv:checkplan:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:dv:checkplan:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改设备点检计划头对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="结果编码" prop="requestCode">
|
||||
<el-input v-model="form.requestCode" placeholder="请输入结果编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="80">
|
||||
<el-switch v-model="autoGenFlag"
|
||||
active-color="#13ce66"
|
||||
active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结果名称" prop="resultName">
|
||||
<el-input v-model="form.resultName" placeholder="请输入计划名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div style="display: flex">
|
||||
<el-form-item label="点检计划" prop="frockName" >
|
||||
<div style="display: flex">
|
||||
<el-input v-model="form.frockName" placeholder="请选择点检计划" />
|
||||
<el-button @click="selecareaVisible=true" icon="el-icon-search"></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料" prop="mrlWlName">
|
||||
<el-input :disabled="true" v-model="form.mrlWlName" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="点检时间" prop="frockDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.frockDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择开始日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="点检人" prop="frockUser">
|
||||
<el-input v-model="form.frockUser" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="点检结果" prop="frockResult">
|
||||
<el-select v-model="form.frockResult">
|
||||
<el-option v-for="item in Datelist" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="form.frockResult==='1'">
|
||||
<el-form-item label="异常描述" prop="frockError">
|
||||
<el-input v-model="form.frockError" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType =='view' || form.status !='PREPARE' ">返回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">保存</el-button>
|
||||
<el-button type="success" @click="handleFinish" v-if="form.status =='PREPARE' && optType !='view' && form.planId !=null">启用</el-button>
|
||||
<el-button type="success" @click="handleDeFinish" v-if="form.status =='FINISHED' && optType !='view' && form.planId !=null">停用</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 选择点检计划-->
|
||||
<el-dialog :visible.sync="selecareaVisible" title="选择点检计划">
|
||||
<inventory-cmps v-if="selecareaVisible" @selecoInventoryTaskHandle="selecoInventoryTaskHandle"></inventory-cmps>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
addRequest, delRequest, delRequests, getRequest,
|
||||
listRequest, updateRequest
|
||||
|
||||
} from "@/api/mes/dv/inventoryRequest";
|
||||
import {listMdItem} from "@/api/mes/md/mdItem";
|
||||
import {genCode} from "@/api/system/autocode/rule"
|
||||
import InventoryCmps from "@/components/wm/InventoryCmps.vue";
|
||||
export default {
|
||||
name: "InventoryRequest",
|
||||
components: {InventoryCmps},
|
||||
dicts: ['mes_cycle_type','mes_order_status','dv_plan_type'],
|
||||
// components:{Checkmachinery,Checksubject},
|
||||
data() {
|
||||
return {
|
||||
//点检计划选择
|
||||
selecareaVisible:false,
|
||||
Datelist:[{name:"合格",value:"0"},{name:"异常",value:"1"}],
|
||||
autoGenFlag: false,
|
||||
optType: null,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备点检计划头表格数据
|
||||
checkplanList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
planCode: null,
|
||||
planName: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
cycleType: null,
|
||||
cycleCount: null,
|
||||
status: null,
|
||||
wmsInventoryCode:null,
|
||||
name:null
|
||||
},
|
||||
//物料集合
|
||||
mdItemList:[],
|
||||
//模型集合
|
||||
listQctemplateList:[],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
requestCode: [
|
||||
{required: true, message: "结果编码不能为空", trigger: "blur"}
|
||||
],
|
||||
resultName: [
|
||||
{required: true, message: "结果名称不能为空", trigger: "blur"}
|
||||
],
|
||||
frockName: [
|
||||
{required: true, message: "点检计划不能为空", trigger: "blur"}
|
||||
],
|
||||
mrlWlName: [
|
||||
{required: true, message: "物料不能为空", trigger: "blur"}
|
||||
],
|
||||
frockDate: [
|
||||
{required: true, message: "点检时间不能为空", trigger: "blur"}
|
||||
],
|
||||
frockUser: [
|
||||
{required: true, message: "点检人不能为空", trigger: "blur"}
|
||||
],
|
||||
frockResult: [
|
||||
{required: true, message: "点检结果不能为空", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
//获取点检计划
|
||||
selecoInventoryTaskHandle(location){
|
||||
console.log(location)
|
||||
this.form.frockId = location.wmsInventoryID;
|
||||
this.form.frockName = location.name;
|
||||
this.form.mrlWlGid = location.productId;
|
||||
this.form.mrlWlName = location.productName;
|
||||
this.selecareaVisible = false;
|
||||
},
|
||||
//获取物料集合
|
||||
getMdItem(){
|
||||
this.loading=true
|
||||
listMdItem(this.queryParams).then(response => {
|
||||
this.loading=false
|
||||
this.mdItemList = response.rows;
|
||||
})
|
||||
},
|
||||
/** 查询设备点检结果列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRequest(this.queryParams).then(response => {
|
||||
this.checkplanList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
selectChange(val){
|
||||
this.mdItemList.forEach(item=>{
|
||||
if(item.itemId===val){
|
||||
this.form.productName=item.itemName
|
||||
this.form.uomName=item.itemTypeName
|
||||
this.form.uomId=item.itemTypeId
|
||||
}
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
addMachinery: null,
|
||||
wmsInventoryCode: null,
|
||||
name: null,
|
||||
uomId: null,
|
||||
uomName: null,
|
||||
productId: null,
|
||||
productName: null,
|
||||
mrlModel: null,
|
||||
mrlModelName: null,
|
||||
mrlPeriod: null,
|
||||
planPeriod: null,
|
||||
startTime: null,
|
||||
finishTime: null,
|
||||
superiorTime: null,
|
||||
belowTime:null,
|
||||
mrlWarning:null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.requestId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加计划";
|
||||
this.optType = "add";
|
||||
this.form.optType="add"
|
||||
this.form.status ='PREPARE'
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row) {
|
||||
this.reset();
|
||||
const requestId = row.requestId || this.ids;
|
||||
getRequest(requestId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "查看计划信息";
|
||||
this.form.optType="add"
|
||||
this.form.status ='PREPARE'
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const requestId = row.requestId || this.ids
|
||||
getRequest(requestId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改计划";
|
||||
this.optType = "edit";
|
||||
this.form.optType="edit"
|
||||
this.form.status ='PREPARE'
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.requestId != null) {
|
||||
updateRequest(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRequest(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleFinish() {
|
||||
if (this.form.planId != null && this.form.status == 'PREPARE') {
|
||||
this.form.status = 'FINISHED';
|
||||
updateCheckplan(this.form).then(response => {
|
||||
this.$modal.msgSuccess("已启用");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}, err => {
|
||||
this.form.status = 'PREPARE';
|
||||
});
|
||||
}
|
||||
},
|
||||
handleDeFinish() {
|
||||
if (this.form.planId != null && this.form.status == 'FINISHED') {
|
||||
this.form.status = 'PREPARE';
|
||||
updateCheckplan(this.form).then(response => {
|
||||
this.$modal.msgSuccess("已停用");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}, err => {
|
||||
this.form.status = 'FINISHED';
|
||||
});
|
||||
}
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const planIds = row.requestId;
|
||||
this.$modal.confirm('是否确认删除计划编号为"' + planIds + '"的数据项?').then(function () {
|
||||
return delRequest(planIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 批量删除按钮操作 */
|
||||
handleDeleteIds(row) {
|
||||
const planIds = this.ids;
|
||||
this.$modal.confirm('是否确认删除计划编号为"' + planIds + '"的数据项?').then(function () {
|
||||
return delRequests(planIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('dv/checkplan/export', {
|
||||
...this.queryParams
|
||||
}, `checkplan_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
//自动生成编码
|
||||
handleAutoGenChange(autoGenFlag) {
|
||||
if (autoGenFlag) {
|
||||
genCode('CHECKPLAN_CODE').then(response => {
|
||||
this.form.requestCode = response;
|
||||
console.log(response)
|
||||
console.log( this.form.requestCode)
|
||||
});
|
||||
} else {
|
||||
this.form.requestCode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -85,6 +85,11 @@
|
||||
<span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否完成" align="center" width="180px" prop="frockResult" >
|
||||
<template slot-scope="scope">
|
||||
<span >{{ scope.row.updatebby==1?"完成":"未完成" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束日期" align="center" prop="endDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.finishTime, '{y}-{m}-{d}') }}</span>
|
||||
@ -97,6 +102,7 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
:disabled="scope.row.updatebby==1"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:dv:checkplan:edit']"
|
||||
>修改</el-button>
|
||||
@ -104,9 +110,17 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
:disabled="scope.row.updatebby==1"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:dv:checkplan:remove']"
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="recheckTask(scope.row)"
|
||||
v-hasPermi="['mes:dv:checkplan:remove']"
|
||||
>重新定检</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -124,7 +138,7 @@
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计划编码" prop="planCode">
|
||||
<el-form-item label="计划编码" prop="wmsInventoryCode">
|
||||
<el-input v-model="form.wmsInventoryCode" placeholder="请输入计划编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -145,7 +159,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料名称" prop="uomId" >
|
||||
<el-form-item label="物料名称" prop="productId" >
|
||||
<el-select v-model="form.productId" placeholder="请选择物料" @change="selectChange">
|
||||
<el-option
|
||||
v-for="item in mdItemList"
|
||||
@ -190,7 +204,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开始日期" prop="startDate">
|
||||
<el-form-item label="开始日期" prop="startTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.startTime"
|
||||
type="date"
|
||||
@ -200,7 +214,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束日期" prop="endDate">
|
||||
<el-form-item label="结束日期" prop="finishTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.finishTime"
|
||||
type="date"
|
||||
@ -213,7 +227,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="上次检测时间" prop="startDate">
|
||||
<el-form-item label="上次检测时间" prop="superiorTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.superiorTime"
|
||||
type="date"
|
||||
@ -260,14 +274,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-tabs type="border-card" v-if="form.planId != null">
|
||||
<el-tab-pane label="设备清单">
|
||||
<!-- <Checkmachinery ref="machinerylist" :optType="optType" :planId="form.planId" ></Checkmachinery>-->
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="form.planType=='CHECK'?'点检项目':'保养项目'">
|
||||
<!-- <Checksubject ref="subjectlist" :optType="optType" :planId="form.planId" ></Checksubject>-->
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType =='view' || form.status !='PREPARE' ">返回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">保存</el-button>
|
||||
@ -286,18 +292,15 @@ import {
|
||||
getMachinery,
|
||||
updateMachinery,
|
||||
delMachinery,
|
||||
delMachinerys
|
||||
delMachinerys,
|
||||
rechecklMachinerys
|
||||
} from "@/api/mes/dv/inventoryTask";
|
||||
import {listMdItem} from "@/api/mes/md/mdItem";
|
||||
import {listQctemplate} from "@/api/mes/qc/qctemplate";
|
||||
// import Checkmachinery from "./machinery.vue"
|
||||
// import Checksubject from "./subject.vue"
|
||||
import {genCode} from "@/api/system/autocode/rule"
|
||||
import Log from "@/views/monitor/job/log.vue";
|
||||
export default {
|
||||
name: "Checkplan",
|
||||
name: "InventoryTask",
|
||||
dicts: ['mes_cycle_type','mes_order_status','dv_plan_type'],
|
||||
// components:{Checkmachinery,Checksubject},
|
||||
data() {
|
||||
return {
|
||||
Datelist:[{name:"年",value:"年"},{name:"月",value:"月"},{name:"日",value:"日"}],
|
||||
@ -350,9 +353,24 @@ export default {
|
||||
name: [
|
||||
{required: true, message: "计划名称不能为空", trigger: "blur"}
|
||||
],
|
||||
uomId: [
|
||||
{required: true, message: "计划类型不能为空", trigger: "blur"}
|
||||
productId: [
|
||||
{required: true, message: "物料不能为空", trigger: "blur"}
|
||||
],
|
||||
planPeriod: [
|
||||
{required: true, message: "计划规则不能为空", trigger: "blur"}
|
||||
],
|
||||
finishTime: [
|
||||
{required: true, message: "结束时间不能为空", trigger: "blur"}
|
||||
],
|
||||
startTime: [
|
||||
{required: true, message: "开始时间不能为空", trigger: "blur"}
|
||||
],
|
||||
belowTime: [
|
||||
{required: true, message: "结束时间不能为空", trigger: "blur"}
|
||||
],
|
||||
superiorTime: [
|
||||
{required: true, message: "开始时间不能为空", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -369,6 +387,17 @@ export default {
|
||||
this.listQctemplateList = response.rows;
|
||||
})
|
||||
},
|
||||
//重新定检
|
||||
recheckTask(row){
|
||||
const planIds = row.wmsInventoryID;
|
||||
this.$modal.confirm('是否确认重新定检计划编号为"' + planIds + '"的数据项?').then(function () {
|
||||
return rechecklMachinerys(planIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("修改成功,请前往工装定检结果页面录入该定检的结果");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
//获取物料集合
|
||||
getMdItem(){
|
||||
this.loading=true
|
@ -180,7 +180,7 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div style="display: flex">
|
||||
<el-form-item label="库区" prop="areaName">
|
||||
<el-form-item label="库区" prop="locationId">
|
||||
<div style="display: flex">
|
||||
<el-input v-model="form.locationName" placeholder="请选择库区名称" />
|
||||
<el-button @click="selecocationVisible=true" icon="el-icon-search"></el-button>
|
||||
@ -193,7 +193,7 @@
|
||||
|
||||
<el-col :span="24">
|
||||
<div style="display: flex">
|
||||
<el-form-item label="上级库位" prop="areaName">
|
||||
<el-form-item label="上级库位" prop="attr1">
|
||||
<div style="display: flex">
|
||||
<el-input v-model="form.superiorName" placeholder="请选择上级库位" />
|
||||
<el-button @click="selecareaVisible=true" icon="el-icon-search"></el-button>
|
||||
@ -241,7 +241,7 @@
|
||||
</el-dialog>
|
||||
<!--选择库位-->
|
||||
<el-dialog :visible.sync="selecareaVisible" title="选择库位">
|
||||
<selec-area-cmps @selectArea="selecoAreaHandle"></selec-area-cmps>
|
||||
<selec-area-cmps v-if="selecareaVisible" @selectArea="selecoAreaHandle"></selec-area-cmps>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@ -306,6 +306,12 @@ export default {
|
||||
],
|
||||
areaName: [
|
||||
{ required: true, message: "库位名称不能为空", trigger: "blur" }
|
||||
],
|
||||
locationId: [
|
||||
{ required: true, message: "库区不能为空", trigger: "blur" }
|
||||
],
|
||||
attr1: [
|
||||
{ required: true, message: "上级库位名称不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@ -133,7 +133,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="库房" prop="locationName">
|
||||
<el-form-item label="库房" prop="warehouseId">
|
||||
<div style="display: flex">
|
||||
<el-input v-model="form.warehouseName" placeholder="请选择库区名称" />
|
||||
<el-button @click="selectWareHouseVisible=true" icon="el-icon-search"></el-button>
|
||||
@ -185,7 +185,7 @@
|
||||
</el-dialog>
|
||||
<!--选择库房-->
|
||||
<el-dialog :visible.sync="selectWareHouseVisible" title="选择库房">
|
||||
<select-ware-house-cmps @select="selectWareHouseHandle"></select-ware-house-cmps>
|
||||
<select-ware-house-cmps v-if="selectWareHouseVisible" @select="selectWareHouseHandle"></select-ware-house-cmps>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@ -244,6 +244,9 @@ export default {
|
||||
],
|
||||
locationName: [
|
||||
{ required: true, message: "库区名称不能为空", trigger: "blur" }
|
||||
],
|
||||
warehouseName: [
|
||||
{ required: true, message: "库房不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@ -153,9 +153,10 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="库房类型" prop="location">
|
||||
<el-select v-model="form.attr1">
|
||||
<el-option v-for="(item,index) in 2" :key="index" label="test" value="1"></el-option>
|
||||
</el-select>
|
||||
<div style="display: flex">
|
||||
<el-input v-model="form.attr2" placeholder="请选择库区名称" />
|
||||
<el-button @click="selectWareHouseVisible=true" icon="el-icon-search"></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -182,6 +183,9 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog :visible.sync="selectWareHouseVisible" title="选择类型">
|
||||
<in-out-type-cmps v-if="selectWareHouseVisible" @selectType="selectType"></in-out-type-cmps>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -189,11 +193,13 @@
|
||||
import { listWarehouse, getWarehouse, delWarehouse, addWarehouse, updateWarehouse,changeFrozenState } from "@/api/mes/wm/warehouse";
|
||||
import {genCode} from "@/api/system/autocode/rule"
|
||||
import BarcodeImg from "@/components/barcodeImg/index.vue"
|
||||
import InOutTypeCmps from "@/components/wm/InOutTypeCmps.vue";
|
||||
export default {
|
||||
name: "Warehouse",
|
||||
components: { BarcodeImg } ,
|
||||
components: {InOutTypeCmps, BarcodeImg } ,
|
||||
data() {
|
||||
return {
|
||||
selectWareHouseVisible:false,
|
||||
//是否有效
|
||||
fig:false,
|
||||
//自动生成编码
|
||||
@ -260,6 +266,12 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//设置库房类型
|
||||
selectType(row) {
|
||||
this.form.attr1 = row.typeId;
|
||||
this.form.attr2 = row.name;
|
||||
this.selectWareHouseVisible = false;
|
||||
},
|
||||
//修改库房是否有效
|
||||
isFig(val){
|
||||
this.form.attr3=val?1:0
|
||||
|
Loading…
Reference in New Issue
Block a user