Compare commits
65 Commits
main
...
2a4078f374
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a4078f374 | |||
|
|
1b6c4e3ab9 | ||
|
|
381250fa3c | ||
|
|
4d5ea536e7 | ||
|
|
bcbd1ee603 | ||
|
|
cda33a6177 | ||
|
|
caac47f68a | ||
|
|
6725a90a74 | ||
|
|
6f5925bfb9 | ||
|
|
600f118b64 | ||
|
|
583d03b2f8 | ||
|
|
b01fba286e | ||
|
|
4995e9bf2f | ||
|
|
8ce9df6eb6 | ||
|
|
5527834271 | ||
|
|
ca940e773b | ||
|
|
a4bf5189fb | ||
|
|
e47de51f09 | ||
|
|
6e5b8747d8 | ||
|
|
92391ddab2 | ||
|
|
49ec348948 | ||
|
|
8ec64c8a66 | ||
|
|
29a63f2a6d | ||
|
|
ef9e153b46 | ||
|
|
e2918ff9f5 | ||
|
|
d1e31dccbd | ||
|
|
a1b49bef22 | ||
|
|
47e5b4b9ee | ||
|
|
54ad1c08df | ||
|
|
64ad4c692c | ||
|
|
7caafe2651 | ||
|
|
3a4c59645b | ||
|
|
74137199c8 | ||
|
|
0873930f45 | ||
|
|
8028e4a32f | ||
|
|
53bb5a791f | ||
|
|
12f289d982 | ||
|
|
bdfe24349b | ||
|
|
7516bdbfb8 | ||
|
|
0c9b02a07a | ||
|
|
1050affe7c | ||
|
|
5364b5a495 | ||
|
|
b3d458662e | ||
|
|
c7357a12d4 | ||
|
|
be787947c6 | ||
|
|
978d6fb0bc | ||
|
|
afb67bee3d | ||
|
|
aac0566659 | ||
|
|
c9a4b55b18 | ||
|
|
0e5eb5aca3 | ||
|
|
c294978492 | ||
|
|
28a81f95b7 | ||
|
|
ab4dd91beb | ||
|
|
3837511fba | ||
|
|
f434915779 | ||
|
|
40b688b5c5 | ||
|
|
a9d255e5fa | ||
|
|
45c2dada3d | ||
|
|
b726af2e5d | ||
|
|
f09dc5ad83 | ||
|
|
a47f980817 | ||
|
|
07a19f21da | ||
|
|
40595b5ae7 | ||
|
|
baf9350d10 | ||
|
|
d55369f739 |
@@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 苦糖果MES-软件开发记录
|
VUE_APP_TITLE = 生产协同运营平台
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 苦糖果MES-软件开发记录
|
VUE_APP_TITLE = 生产协同运营平台
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "ktg-mes-ui",
|
"name": "ktg-mes-ui",
|
||||||
"version": "3.8.2",
|
"version": "3.8.2",
|
||||||
"description": "苦糖果MES",
|
"description": "生产协同运营平台",
|
||||||
"author": "YinJinLu",
|
"author": "YinJinLu",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vue-cli-service serve",
|
"dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
|
||||||
"build:prod": "vue-cli-service build",
|
"build:prod": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
|
||||||
"build:stage": "vue-cli-service build --mode staging",
|
"build:stage": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode staging",
|
||||||
"preview": "node build/index.js --preview",
|
"preview": "node build/index.js --preview",
|
||||||
"lint": "eslint --ext .js,.vue src"
|
"lint": "eslint --ext .js,.vue src"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -33,3 +33,14 @@ export function delTeammember(memberId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据班组IDS查询班组成员列表
|
||||||
|
export function getListByTeamId(ids) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/cal/teammember/getListByTeamId',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
ids
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -42,3 +42,12 @@ export function delCheckplan(planId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据设备编码和计划类型查询设备点检计划头列表
|
||||||
|
export function getCheckPlan(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/checkplan/getCheckPlan',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
44
src/api/mes/dv/checkrecord.js
Normal file
44
src/api/mes/dv/checkrecord.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询设备点检记录列表
|
||||||
|
export function listCheckrecord(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/checkrecord/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询设备点检记录详细
|
||||||
|
export function getCheckrecord(recordId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/checkrecord/' + recordId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增设备点检记录
|
||||||
|
export function addCheckrecord(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/checkrecord',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改设备点检记录
|
||||||
|
export function updateCheckrecord(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/checkrecord',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除设备点检记录
|
||||||
|
export function delCheckrecord(recordId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/checkrecord/' + recordId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
44
src/api/mes/dv/checkrecordline.js
Normal file
44
src/api/mes/dv/checkrecordline.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询设备点检记录行列表
|
||||||
|
export function listCheckrecordline(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/checkrecordline/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询设备点检记录行详细
|
||||||
|
export function getCheckrecordline(lineId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/checkrecordline/' + lineId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增设备点检记录行
|
||||||
|
export function addCheckrecordline(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/checkrecordline',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改设备点检记录行
|
||||||
|
export function updateCheckrecordline(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/checkrecordline',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除设备点检记录行
|
||||||
|
export function delCheckrecordline(lineId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/checkrecordline/' + lineId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
44
src/api/mes/dv/maintenrecord.js
Normal file
44
src/api/mes/dv/maintenrecord.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询设备保养记录列表
|
||||||
|
export function listMaintenrecord(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/maintenrecord/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询设备保养记录详细
|
||||||
|
export function getMaintenrecord(recordId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/maintenrecord/' + recordId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增设备保养记录
|
||||||
|
export function addMaintenrecord(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/maintenrecord',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改设备保养记录
|
||||||
|
export function updateMaintenrecord(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/maintenrecord',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除设备保养记录
|
||||||
|
export function delMaintenrecord(recordId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/maintenrecord/' + recordId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
44
src/api/mes/dv/maintenrecordline.js
Normal file
44
src/api/mes/dv/maintenrecordline.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询设备保养记录行列表
|
||||||
|
export function listMaintenrecordline(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/maintenrecordline/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询设备保养记录行详细
|
||||||
|
export function getMaintenrecordline(lineId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/maintenrecordline/' + lineId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增设备保养记录行
|
||||||
|
export function addMaintenrecordline(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/maintenrecordline',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改设备保养记录行
|
||||||
|
export function updateMaintenrecordline(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/maintenrecordline',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除设备保养记录行
|
||||||
|
export function delMaintenrecordline(lineId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/maintenrecordline/' + lineId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -42,3 +42,12 @@ export function delRepair(repairId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据设备编码查询设备维修单列表
|
||||||
|
export function getRepairList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/repair/getRepairList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
44
src/api/mes/md/batchconfig.js
Normal file
44
src/api/mes/md/batchconfig.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询物料批次属性配置列表
|
||||||
|
export function listBatchconfig(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/md/batchconfig/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询物料批次属性配置详细
|
||||||
|
export function getBatchconfig(itemId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/md/batchconfig/' + itemId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增物料批次属性配置
|
||||||
|
export function addBatchconfig(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/md/batchconfig',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改物料批次属性配置
|
||||||
|
export function updateBatchconfig(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/md/batchconfig',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除物料批次属性配置
|
||||||
|
export function delBatchconfig(configId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/md/batchconfig/' + configId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -67,3 +67,12 @@ export function dofinish(workorderId){
|
|||||||
method: 'put'
|
method: 'put'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 首页查询生产工单列表
|
||||||
|
export function getHomeList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/pro/workorder/getHomeList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -60,3 +60,19 @@ export function delItemrecpt(recptId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据供应商Id查询物料数据
|
||||||
|
export function getItem(vendorId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/itemrecpt/getItem/' + vendorId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据供应商Id查询采购记录
|
||||||
|
export function getProcurementRecord(vendorId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/itemrecpt/getProcurementRecord/' + vendorId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -43,6 +43,30 @@ export function delLocation(locationId) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 设置库区下所有库位是否允许产品混放
|
||||||
|
export function setProductMixing(locationId, flag){
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/location/setProductMixing',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
'locationId': locationId,
|
||||||
|
'flag': flag
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置库区下所有库位是否允许批次混放
|
||||||
|
export function setBatchMixing(locationId, flag){
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/location/setBatchMixing',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
'locationId': locationId,
|
||||||
|
'flag': flag
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
//更改库区的冻结状态
|
//更改库区的冻结状态
|
||||||
export function changeFrozenState(locationId, status) {
|
export function changeFrozenState(locationId, status) {
|
||||||
const data = {
|
const data = {
|
||||||
|
|||||||
44
src/api/mes/wm/mrnotice.js
Normal file
44
src/api/mes/wm/mrnotice.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询备料通知单列表
|
||||||
|
export function listMrnotice(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/mrnotice/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询备料通知单详细
|
||||||
|
export function getMrnotice(noticeId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/mrnotice/' + noticeId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增备料通知单
|
||||||
|
export function addMrnotice(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/mrnotice',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改备料通知单
|
||||||
|
export function updateMrnotice(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/mrnotice',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除备料通知单
|
||||||
|
export function delMrnotice(noticeId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/mrnotice/' + noticeId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
44
src/api/mes/wm/mrnoticeline.js
Normal file
44
src/api/mes/wm/mrnoticeline.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询备料通知单明细列表
|
||||||
|
export function listMrnoticeline(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/mrnoticeline/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询备料通知单明细详细
|
||||||
|
export function getMrnoticeline(lineId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/mrnoticeline/' + lineId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增备料通知单明细
|
||||||
|
export function addMrnoticeline(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/mrnoticeline',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改备料通知单明细
|
||||||
|
export function updateMrnoticeline(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/mrnoticeline',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除备料通知单明细
|
||||||
|
export function delMrnoticeline(lineId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/mrnoticeline/' + lineId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -50,3 +50,19 @@ export function execute(salseId) {
|
|||||||
method: 'put'
|
method: 'put'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据客户 id 查询销售产品信息
|
||||||
|
export function getItem(clientId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/productsalse/getItem/' + clientId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据客户 id 查询销售订单信息
|
||||||
|
export function getSaleRecord(clientId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/productsalse/getSaleRecord/' + clientId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -44,9 +44,12 @@ export function updateSn(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 删除SN码
|
// 删除SN码
|
||||||
export function delSn(snId) {
|
export function delSn(ids) {
|
||||||
return request({
|
return request({
|
||||||
url: '/mes/wm/sn/' + snId,
|
url: '/mes/wm/sn/remove',
|
||||||
method: 'delete'
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
ids
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,3 +42,11 @@ export function delMessage(messageId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 全部已读
|
||||||
|
export function allRead() {
|
||||||
|
return request({
|
||||||
|
url: '/system/message/read',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -213,6 +213,10 @@
|
|||||||
this.getProcess();
|
this.getProcess();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleOpen(id) {
|
||||||
|
this.showFlag = true
|
||||||
|
this.selectedTaskId = id
|
||||||
|
},
|
||||||
/** 查询生产任务列表 */
|
/** 查询生产任务列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@@ -237,7 +241,9 @@
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.queryParams.processName = ''
|
||||||
|
this.queryParams.workstationCode = ''
|
||||||
|
this.queryParams.taskCode = ''
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -277,4 +283,3 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -166,6 +166,10 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleOpen(id) {
|
||||||
|
this.showFlag = true
|
||||||
|
this.selectedClientId = id
|
||||||
|
},
|
||||||
/** 查询客户列表 */
|
/** 查询客户列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
226
src/components/dvplanSelect/index.vue
Normal file
226
src/components/dvplanSelect/index.vue
Normal file
@@ -0,0 +1,226 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="设备选择"
|
||||||
|
v-if="showFlag"
|
||||||
|
:visible.sync="showFlag"
|
||||||
|
:modal= false
|
||||||
|
width="80%"
|
||||||
|
center
|
||||||
|
>
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="计划编号" prop="planCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.planCode"
|
||||||
|
placeholder="请输入计划编号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="计划名称" prop="planName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.planName"
|
||||||
|
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-table v-loading="loading" :data="checkplanList" @current-change="handleCurrent" @row-dblclick="handleRowDbClick">
|
||||||
|
<el-table-column width="55" align="center" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-radio v-model="selectedPlanId" :label="scope.row.planId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划编码" align="center" prop="planCode" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
v-hasPermi="['mes:dv:checkplan:query']"
|
||||||
|
>{{scope.row.planCode}}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划名称" align="center" width="200px" prop="planName" />
|
||||||
|
<el-table-column label="计划类型" align="center" width="120px" prop="planType">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.dv_plan_type" :value="scope.row.planType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="开始日期" align="center" prop="startDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.startDate, '{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.endDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="频率" align="center" prop="cycleType" width="120px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{scope.row.cycleCount}}<dict-tag :options="dict.type.mes_cycle_type" :value="scope.row.cycleType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<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-if="scope.row.status =='PREPARE'"
|
||||||
|
v-hasPermi="['mes:dv:checkplan:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-if="scope.row.status =='PREPARE'"
|
||||||
|
v-hasPermi="['mes:dv:checkplan:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-if="scope.row.status =='FINISHED'"
|
||||||
|
v-hasPermi="['mes:dv:checkplan:edit']"
|
||||||
|
>停用</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 slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="confirmSelect">确 定</el-button>
|
||||||
|
<el-button @click="showFlag=false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listCheckplan } from "@/api/mes/dv/checkplan";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "CheckplanSelect",
|
||||||
|
dicts: ['mes_cycle_type','mes_order_status','dv_plan_type'],
|
||||||
|
props: {
|
||||||
|
planType: {
|
||||||
|
type: String,
|
||||||
|
default: 'CHECK'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showFlag: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
selectedPlanId: undefined,
|
||||||
|
selectedRow: undefined,
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 设备点检计划头表格数据
|
||||||
|
checkplanList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
planCode: null,
|
||||||
|
planName: null,
|
||||||
|
planType: this.planType,
|
||||||
|
startDate: null,
|
||||||
|
endDate: null,
|
||||||
|
cycleType: null,
|
||||||
|
cycleCount: null,
|
||||||
|
status: 'FINISHED'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询设备点检计划头列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listCheckplan(this.queryParams).then(response => {
|
||||||
|
this.checkplanList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCurrent(row){
|
||||||
|
if(row){
|
||||||
|
this.selectedRow = row;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//行双击选中
|
||||||
|
handleRowDbClick(row){
|
||||||
|
if(row){
|
||||||
|
this.selectedRow = row;
|
||||||
|
this.$emit('onSelected',this.selectedRow);
|
||||||
|
this.showFlag = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 单选选中数据
|
||||||
|
handleRowChange(row) {
|
||||||
|
if(row){
|
||||||
|
this.selectedRow = row;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//确定选中
|
||||||
|
confirmSelect(){
|
||||||
|
if(this.selectedPlanId ==null || this.selectedPlanId==0){
|
||||||
|
this.$notify({
|
||||||
|
title:'提示',
|
||||||
|
type:'warning',
|
||||||
|
message: '请至少选择一条数据!'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$emit('onSelected',this.selectedRow);
|
||||||
|
this.showFlag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog title="设备选择"
|
<el-dialog title="项目选择"
|
||||||
v-if="showFlag"
|
v-if="showFlag"
|
||||||
:visible.sync="showFlag"
|
:visible.sync="showFlag"
|
||||||
:modal= false
|
:modal= false
|
||||||
@@ -23,16 +23,6 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目类型" prop="subjectType">
|
|
||||||
<el-select v-model="queryParams.subjectType" placeholder="请选择项目类型" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.mes_dvsubject_type"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
@@ -128,9 +118,18 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams = {}
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.queryParams.pageSize = 10;
|
||||||
|
this.queryParams.subjectType = this.subjectType
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
this.queryParams.pageSize = 10;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
|
|||||||
168
src/components/dvsubjectSelect/single.vue
Normal file
168
src/components/dvsubjectSelect/single.vue
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="设备点检保养项目选择"
|
||||||
|
v-if="showFlag"
|
||||||
|
:visible.sync="showFlag"
|
||||||
|
:modal= false
|
||||||
|
width="80%"
|
||||||
|
center
|
||||||
|
>
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="项目编码" prop="subjectCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.subjectCode"
|
||||||
|
placeholder="请输入项目编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="项目名称" prop="subjectName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.subjectName"
|
||||||
|
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-table v-loading="loading" :data="dvsubjectList" @current-change="handleCurrent" @row-dblclick="handleRowDbClick">
|
||||||
|
<el-table-column width="55" align="center" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-radio v-model="selectedId" :label="scope.row.subjectId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="项目编码" align="center" prop="subjectCode" />
|
||||||
|
<el-table-column label="项目名称" align="center" prop="subjectName" />
|
||||||
|
<el-table-column label="项目内容" align="center" prop="subjectContent" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="标准" align="center" prop="subjectStandard" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="confirmSelect">确 定</el-button>
|
||||||
|
<el-button @click="showFlag=false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listDvsubject} from "@/api/mes/dv/dvsubject";
|
||||||
|
export default {
|
||||||
|
name: "DvsubjectSelect",
|
||||||
|
dicts: ['sys_yes_no', 'mes_dvsubject_type'],
|
||||||
|
props:{
|
||||||
|
subjectType: null,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showFlag:false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
selectedId: undefined,
|
||||||
|
selectedRow: undefined,
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 设备点检保养项目表格数据
|
||||||
|
dvsubjectList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
subjectCode: null,
|
||||||
|
subjectName: null,
|
||||||
|
subjectType: this.subjectType,
|
||||||
|
subjectContent: null,
|
||||||
|
subjectStandard: null,
|
||||||
|
enableFlag: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询设备点检保养项目列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listDvsubject(this.queryParams).then(response => {
|
||||||
|
this.dvsubjectList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams = {}
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.queryParams.pageSize = 10;
|
||||||
|
this.queryParams.subjectType = this.subjectType
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.queryParams.pageSize = 10;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCurrent(row){
|
||||||
|
if(row){
|
||||||
|
this.selectedRow = row;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//行双击选中
|
||||||
|
handleRowDbClick(row){
|
||||||
|
if(row){
|
||||||
|
this.selectedRow = row;
|
||||||
|
this.$emit('onSelected',this.selectedRow);
|
||||||
|
this.showFlag = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 单选选中数据
|
||||||
|
handleRowChange(row) {
|
||||||
|
if(row){
|
||||||
|
this.selectedRow = row;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
//确定选中
|
||||||
|
confirmSelect(){
|
||||||
|
if(this.selectedId == null || this.selectedId == 0){
|
||||||
|
this.$notify({
|
||||||
|
title:'提示',
|
||||||
|
type:'warning',
|
||||||
|
message: '请选择一条数据!'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$emit('onSelected',this.selectedRow);
|
||||||
|
this.showFlag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -165,6 +165,10 @@ export default {
|
|||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleOpen(id) {
|
||||||
|
this.showFlag = true
|
||||||
|
this.selectedItemId = id
|
||||||
|
},
|
||||||
/** 查询物料编码列表 */
|
/** 查询物料编码列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
@@ -52,6 +52,15 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="所属车间" prop="workshopName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.workshopName"
|
||||||
|
placeholder="请输入所属车间"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
@@ -68,7 +77,7 @@
|
|||||||
<el-table-column label="设备名称" min-width="120" align="left" key="machineryName" prop="machineryName" :show-overflow-tooltip="true" />
|
<el-table-column label="设备名称" min-width="120" align="left" key="machineryName" prop="machineryName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="品牌" align="left" key="machineryBrand" prop="machineryBrand" :show-overflow-tooltip="true" />
|
<el-table-column label="品牌" align="left" key="machineryBrand" prop="machineryBrand" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="规格型号" align="left" key="machinerySpec" prop="machinerySpec" :show-overflow-tooltip="true" />
|
<el-table-column label="规格型号" align="left" key="machinerySpec" prop="machinerySpec" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="所属车间" align="center" key="machineryTypeName" prop="machineryTypeName" :show-overflow-tooltip="true" />
|
<el-table-column label="所属车间" align="center" key="workshopName" prop="workshopName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="设备状态" align="center" key="status" prop="status" >
|
<el-table-column label="设备状态" align="center" key="status" prop="status" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.mes_machinery_status" :value="scope.row.status"/>
|
<dict-tag :options="dict.type.mes_machinery_status" :value="scope.row.status"/>
|
||||||
@@ -102,7 +111,6 @@ import { listMachinery, getMachinery, delMachinery, addMachinery, updateMachiner
|
|||||||
import { listMachinerytype } from "@/api/mes/dv/machinerytype";
|
import { listMachinerytype } from "@/api/mes/dv/machinerytype";
|
||||||
import { listAllWorkshop } from "@/api/mes/md/workshop";
|
import { listAllWorkshop } from "@/api/mes/md/workshop";
|
||||||
|
|
||||||
import { getToken } from "@/utils/auth";
|
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
@@ -175,6 +183,10 @@ export default {
|
|||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleOpen(id) {
|
||||||
|
this.showFlag = true
|
||||||
|
this.selectedMachineryId = id
|
||||||
|
},
|
||||||
/** 查询物料编码列表 */
|
/** 查询物料编码列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@@ -187,7 +199,6 @@ export default {
|
|||||||
},
|
},
|
||||||
getWorkshops(){
|
getWorkshops(){
|
||||||
listAllWorkshop().then( response => {
|
listAllWorkshop().then( response => {
|
||||||
debugger;
|
|
||||||
this.workshopOptions =response.data;
|
this.workshopOptions =response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -205,7 +216,6 @@ export default {
|
|||||||
/** 查询设备类型下拉树结构 */
|
/** 查询设备类型下拉树结构 */
|
||||||
getTreeselect() {
|
getTreeselect() {
|
||||||
listMachinerytype().then(response => {
|
listMachinerytype().then(response => {
|
||||||
debugger;
|
|
||||||
this.machineryTypeOptions = [];
|
this.machineryTypeOptions = [];
|
||||||
const data = this.handleTree(response.data, "machineryTypeId", "parentTypeId")[0];
|
const data = this.handleTree(response.data, "machineryTypeId", "parentTypeId")[0];
|
||||||
this.machineryTypeOptions.push(data);
|
this.machineryTypeOptions.push(data);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<el-table-column label="物料编码" width="120px" align="center" prop="itemCode" />
|
<el-table-column label="物料编码" width="120px" align="center" prop="itemCode" />
|
||||||
<el-table-column label="物料名称" width="150px" align="center" prop="itemName" />
|
<el-table-column label="物料名称" width="150px" align="center" prop="itemName" />
|
||||||
<el-table-column label="规格型号" align="center" prop="specification" />
|
<el-table-column label="规格型号" align="center" prop="specification" />
|
||||||
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
<el-table-column label="单位" align="center" prop="unitName" />
|
||||||
<el-table-column label="到货数量" align="center" prop="quantityArrival" />
|
<el-table-column label="到货数量" align="center" prop="quantityArrival" />
|
||||||
<el-table-column label="是否检验" align="center" prop="iqcCheck">
|
<el-table-column label="是否检验" align="center" prop="iqcCheck">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -130,4 +130,3 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -49,7 +49,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单据状态" prop="status">
|
<el-form-item label="单据状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable>
|
<el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable>
|
||||||
<el-option label="请选择字典生成" value="" />
|
<el-option
|
||||||
|
v-for="dict in orderStatusDict"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -105,6 +110,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showFlag:false,
|
showFlag:false,
|
||||||
|
orderStatusDict: [],
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中
|
// 选中
|
||||||
@@ -128,13 +134,29 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
noticeCode: null, noticeName: null, poCode: null, vendorId: null, vendorCode: null, vendorName: null, vendorNick: null, arrivalDate: null, status: 'APPROVED', },
|
noticeCode: null,
|
||||||
|
noticeName: null,
|
||||||
|
poCode: null,
|
||||||
|
vendorId: null,
|
||||||
|
vendorCode: null,
|
||||||
|
vendorName: null,
|
||||||
|
vendorNick: null,
|
||||||
|
arrivalDate: null,
|
||||||
|
status: null,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getDicts("mes_order_status").then(res => {
|
||||||
|
this.orderStatusDict = res.data
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleOpen(id) {
|
||||||
|
this.showFlag = true
|
||||||
|
this.selectedId = id
|
||||||
|
},
|
||||||
/** 查询到货通知单列表 */
|
/** 查询到货通知单列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog title="人员选择"
|
<el-dialog title="库存选择"
|
||||||
v-if="showFlag"
|
v-if="showFlag"
|
||||||
:visible.sync="showFlag"
|
:visible.sync="showFlag"
|
||||||
:modal= false
|
:modal= false
|
||||||
|
|||||||
@@ -240,6 +240,11 @@ export default {
|
|||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleOpen(id) {
|
||||||
|
this.showFlag = true
|
||||||
|
this.getList()
|
||||||
|
this.selectedId = id
|
||||||
|
},
|
||||||
/** 查询库存记录列表 */
|
/** 查询库存记录列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
@@ -64,16 +64,16 @@
|
|||||||
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
|
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
|
||||||
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
|
<!-- <el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">-->
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">-->
|
||||||
<el-switch
|
<!-- <el-switch-->
|
||||||
v-model="scope.row.status"
|
<!-- v-model="scope.row.status"-->
|
||||||
active-value="0"
|
<!-- active-value="0"-->
|
||||||
inactive-value="1"
|
<!-- inactive-value="1"-->
|
||||||
@change="handleStatusChange(scope.row)"
|
<!-- @change="handleStatusChange(scope.row)"-->
|
||||||
></el-switch>
|
<!-- ></el-switch>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
|
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
|||||||
@@ -67,16 +67,16 @@
|
|||||||
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
|
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
|
||||||
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
|
<!-- <el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">-->
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">-->
|
||||||
<el-switch
|
<!-- <el-switch-->
|
||||||
v-model="scope.row.status"
|
<!-- v-model="scope.row.status"-->
|
||||||
active-value="0"
|
<!-- active-value="0"-->
|
||||||
inactive-value="1"
|
<!-- inactive-value="1"-->
|
||||||
@change="handleStatusChange(scope.row)"
|
<!-- @change="handleStatusChange(scope.row)"-->
|
||||||
></el-switch>
|
<!-- ></el-switch>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
|
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
|||||||
@@ -174,6 +174,10 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleOpen(id) {
|
||||||
|
this.showFlag = true
|
||||||
|
this.selectedVendorId = id
|
||||||
|
},
|
||||||
/** 查询供应商列表 */
|
/** 查询供应商列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
<el-table-column label="产品编号" width="120" align="center" prop="productCode" />
|
<el-table-column label="产品编号" width="120" align="center" prop="productCode" />
|
||||||
<el-table-column label="产品名称" width="200" align="center" prop="productName" :show-overflow-tooltip="true"/>
|
<el-table-column label="产品名称" width="200" align="center" prop="productName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="规格型号" align="center" prop="productSpc" :show-overflow-tooltip="true"/>
|
<el-table-column label="规格型号" align="center" prop="productSpc" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
<el-table-column label="单位" align="center" prop="unitName" />
|
||||||
<el-table-column label="工单数量" align="center" prop="quantity" />
|
<el-table-column label="工单数量" align="center" prop="quantity" />
|
||||||
<el-table-column label="客户编码" align="center" prop="clientCode" />
|
<el-table-column label="客户编码" align="center" prop="clientCode" />
|
||||||
<el-table-column label="客户名称" align="center" prop="clientName" :show-overflow-tooltip="true"/>
|
<el-table-column label="客户名称" align="center" prop="clientName" :show-overflow-tooltip="true"/>
|
||||||
@@ -163,6 +163,10 @@
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
handleOpen(id) {
|
||||||
|
this.showFlag = true
|
||||||
|
this.selectedWorkorderId = id
|
||||||
|
},
|
||||||
/** 查询生产工单列表 */
|
/** 查询生产工单列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
@@ -145,6 +145,10 @@ export default {
|
|||||||
this.getProcess();
|
this.getProcess();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleOpen(id) {
|
||||||
|
this.showFlag = true
|
||||||
|
this.selectedWorkstationId = id
|
||||||
|
},
|
||||||
/** 查询工作站列表 */
|
/** 查询工作站列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
@@ -7,15 +7,6 @@
|
|||||||
|
|
||||||
<div class="right-menu">
|
<div class="right-menu">
|
||||||
<template v-if="device!=='mobile'">
|
<template v-if="device!=='mobile'">
|
||||||
<search id="header-search" class="right-menu-item" />
|
|
||||||
|
|
||||||
<el-tooltip content="源码地址" effect="dark" placement="bottom">
|
|
||||||
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
|
|
||||||
</el-tooltip>
|
|
||||||
|
|
||||||
<el-tooltip content="文档地址" effect="dark" placement="bottom">
|
|
||||||
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
|
|
||||||
</el-tooltip>
|
|
||||||
|
|
||||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '苦糖果MES',
|
title: '生产协同运营平台',
|
||||||
logo: logoImg
|
logo: logoImg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -260,7 +260,49 @@ export const dynamicRoutes = [
|
|||||||
meta: {title: '打印模板编辑',activeMenu: '/print/printtemplate/edit'}
|
meta: {title: '打印模板编辑',activeMenu: '/print/printtemplate/edit'}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
path: '/mes/md/item',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
permissions: ['mes:md:mditem:edit'],
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'form',
|
||||||
|
component: () => import('@/views/mes/md/mditem/form.vue'),
|
||||||
|
name: 'itemForm',
|
||||||
|
meta: { title: '物料详情', activeMenu: '/mes/md/item/form' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
path: '/mes/wm/purchaseInventory',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
permissions: ['mes:wm:itemrecpt:edit'],
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'form',
|
||||||
|
component: () => import('@/views/mes/wm/itemrecpt/form.vue'),
|
||||||
|
name: 'itemrecptForm',
|
||||||
|
meta: { title: '采购入库详情', activeMenu: '/mes/wm/itemrecpt/form' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/mes/wm/saleOutbound',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'form',
|
||||||
|
component: () => import('@/views/mes/wm/productsalse/form.vue'),
|
||||||
|
name: 'productsalseForm',
|
||||||
|
meta: { title: '销售出库详情', activeMenu: '/mes/wm/productsalse/form' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
// 防止连续点击多次路由报错
|
// 防止连续点击多次路由报错
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ const user = {
|
|||||||
token: getToken(),
|
token: getToken(),
|
||||||
name: '',
|
name: '',
|
||||||
avatar: '',
|
avatar: '',
|
||||||
|
id: '',
|
||||||
|
nick: '',
|
||||||
roles: [],
|
roles: [],
|
||||||
permissions: []
|
permissions: []
|
||||||
},
|
},
|
||||||
@@ -20,6 +22,12 @@ const user = {
|
|||||||
SET_AVATAR: (state, avatar) => {
|
SET_AVATAR: (state, avatar) => {
|
||||||
state.avatar = avatar
|
state.avatar = avatar
|
||||||
},
|
},
|
||||||
|
SET_ID: (state, id) => {
|
||||||
|
state.id = id
|
||||||
|
},
|
||||||
|
SET_NICK: (state, nick) => {
|
||||||
|
state.nick = nick
|
||||||
|
},
|
||||||
SET_ROLES: (state, roles) => {
|
SET_ROLES: (state, roles) => {
|
||||||
state.roles = roles
|
state.roles = roles
|
||||||
},
|
},
|
||||||
@@ -58,6 +66,8 @@ const user = {
|
|||||||
} else {
|
} else {
|
||||||
commit('SET_ROLES', ['ROLE_DEFAULT'])
|
commit('SET_ROLES', ['ROLE_DEFAULT'])
|
||||||
}
|
}
|
||||||
|
commit('SET_ID', user.userId)
|
||||||
|
commit('SET_NICK', user.nickName)
|
||||||
commit('SET_NAME', user.userName)
|
commit('SET_NAME', user.userName)
|
||||||
commit('SET_AVATAR', avatar)
|
commit('SET_AVATAR', avatar)
|
||||||
resolve(res)
|
resolve(res)
|
||||||
|
|||||||
@@ -8,40 +8,51 @@
|
|||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>生产进度</span>
|
<span>生产进度</span>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="workorderList"
|
:data="workorderList"
|
||||||
row-key="workorderId"
|
row-key="workorderId"
|
||||||
default-expand-all
|
default-expand-all
|
||||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
||||||
>
|
<el-table-column label="工单编码" width="180" prop="workorderCode" >
|
||||||
<el-table-column label="工单编码" width="180" prop="workorderCode" >
|
<template slot-scope="scope">
|
||||||
<template slot-scope="scope">
|
<el-button
|
||||||
<el-button
|
size="mini"
|
||||||
size="mini"
|
type="text"
|
||||||
type="text"
|
@click="handleView(scope.row)"
|
||||||
@click="handleView(scope.row)"
|
v-hasPermi="['mes:pro:workorder:query']"
|
||||||
v-hasPermi="['mes:pro:workorder:query']"
|
>{{scope.row.workorderCode}}</el-button>
|
||||||
>{{scope.row.workorderCode}}</el-button>
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="订单编号" align="center" prop="sourceCode" />
|
||||||
<el-table-column label="订单编号" width="140" align="center" prop="sourceCode" />
|
<el-table-column label="工单名称" align="center" prop="workorderName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="客户名称" align="center" prop="clientName" :show-overflow-tooltip="true"/>
|
<el-table-column label="产品编号" width="120" align="center" prop="productCode" />
|
||||||
<el-table-column label="产品编号" width="120" align="center" prop="productCode" />
|
<el-table-column label="产品名称" align="center" prop="productName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="产品名称" width="250px" align="center" prop="productName" :show-overflow-tooltip="true"/>
|
<el-table-column label="规格型号" width="140" align="center" prop="productSpc" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="规格型号" align="center" prop="productSpc" :show-overflow-tooltip="true"/>
|
<el-table-column label="单位" width="140" align="center" prop="unitOfMeasure" />
|
||||||
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
<el-table-column label="需求日期" align="center" prop="requestDate">
|
||||||
<el-table-column label="生产进度" align="center" width="200px" >
|
<template slot-scope="scope">
|
||||||
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.requestDate, '{y}-{m}-{d}') }}</span>
|
||||||
<el-progress :text-inside="true" :stroke-width="20" :percentage="parseFloat(((scope.row.quantityProduced/scope.row.quantity*100).toFixed(2)))>100?100:parseFloat(((scope.row.quantityProduced/scope.row.quantity*100).toFixed(2)))"></el-progress>
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="工序进度" align="center" width="250">
|
||||||
<el-table-column label="需求日期" align="center" prop="requestDate" width="180">
|
<template slot-scope="scope">
|
||||||
<template slot-scope="scope">
|
<div style="display: flex;width: 100%;overflow:auto;">
|
||||||
<span>{{ parseTime(scope.row.requestDate, '{y}-{m}-{d}') }}</span>
|
<div v-for="(item, index) in scope.row.routeHomg" style="flex-shrink: 0;">
|
||||||
</template>
|
<div style="display: flex">
|
||||||
</el-table-column>
|
<div style="line-height: 70px; text-align: center;color: #5e75ff;flex-shrink:0;" v-if="index != 0">--------</div>
|
||||||
</el-table>
|
<div style="display: flex; flex-direction: column;margin: 0 5px">
|
||||||
|
<el-progress :height="70" :width="70" type="circle" :percentage="(item.completeNumber/item.total)*100" :color="colors"></el-progress>
|
||||||
|
<el-tooltip class="item" effect="dark" :content="item.processName" placement="bottom">
|
||||||
|
<span style="display: inline-block;width: 55px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap">{{ item.processName }}</span>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@@ -72,7 +83,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listWorkorder } from "@/api/mes/pro/workorder";
|
import {getHomeList} from "@/api/mes/pro/workorder";
|
||||||
import PanelGroup from './dashboard/PanelGroup'
|
import PanelGroup from './dashboard/PanelGroup'
|
||||||
import LineChart from './dashboard/LineChart'
|
import LineChart from './dashboard/LineChart'
|
||||||
import RaddarChart from './dashboard/RaddarChart'
|
import RaddarChart from './dashboard/RaddarChart'
|
||||||
@@ -112,7 +123,14 @@ export default {
|
|||||||
loading: true,
|
loading: true,
|
||||||
queryParams: {status:'CONFIRMED'},
|
queryParams: {status:'CONFIRMED'},
|
||||||
workorderList: [],
|
workorderList: [],
|
||||||
lineChartData: lineChartData.newVisitis
|
lineChartData: lineChartData.newVisitis,
|
||||||
|
colors: [
|
||||||
|
{color: '#f56c6c', percentage: 20},
|
||||||
|
{color: '#e6a23c', percentage: 40},
|
||||||
|
{color: '#5cb87a', percentage: 60},
|
||||||
|
{color: '#1989fa', percentage: 80},
|
||||||
|
{color: '#6f7ad3', percentage: 100}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
@@ -121,8 +139,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listWorkorder(this.queryParams).then(response => {
|
getHomeList(this.queryParams).then(response => {
|
||||||
this.workorderList = response.rows;
|
this.workorderList = response.data;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||||
<h3 class="title">苦糖果生产执行管理系统</h3>
|
<h3 class="title">生产协同运营平台</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.username"
|
v-model="loginForm.username"
|
||||||
|
|||||||
@@ -11,6 +11,16 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-aside>
|
</el-aside>
|
||||||
<el-main>
|
<el-main>
|
||||||
|
<el-form :model="form" size="small" :inline="true" label-width="100px">
|
||||||
|
<el-form-item label="日期" prop="date">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.date"
|
||||||
|
type="date"
|
||||||
|
@change="changeDate"
|
||||||
|
placeholder="选择日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<el-calendar v-loading="loading" v-model="date">
|
<el-calendar v-loading="loading" v-model="date">
|
||||||
<template slot="dateCell" slot-scope="{date, data }">
|
<template slot="dateCell" slot-scope="{date, data }">
|
||||||
<div>
|
<div>
|
||||||
@@ -50,11 +60,14 @@
|
|||||||
import { listCalholiday } from "@/api/mes/cal/calholiday";
|
import { listCalholiday } from "@/api/mes/cal/calholiday";
|
||||||
import { listCalendars } from "@/api/mes/cal/calendar";
|
import { listCalendars } from "@/api/mes/cal/calendar";
|
||||||
import calendar from '@/utils/calendar';
|
import calendar from '@/utils/calendar';
|
||||||
|
import UserSingleSelect from "@/components/userSelect/single.vue";
|
||||||
export default {
|
export default {
|
||||||
name: 'CalendarTypeView',
|
name: 'CalendarTypeView',
|
||||||
|
components: {UserSingleSelect},
|
||||||
dicts:['mes_calendar_type'],
|
dicts:['mes_calendar_type'],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
form: {},
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
@@ -92,6 +105,9 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
changeDate(val) {
|
||||||
|
this.date = val
|
||||||
|
},
|
||||||
/** 查询节假日设置列表 */
|
/** 查询节假日设置列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@@ -115,7 +131,7 @@ export default {
|
|||||||
onSelected(calType){
|
onSelected(calType){
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.teamShiftQueryParams.calendarType = calType;
|
this.teamShiftQueryParams.calendarType = calType;
|
||||||
this.teamShiftQueryParams.date = this.date;
|
this.teamShiftQueryParams.date = this.date.getFullYear() + '-' + (this.date.getMonth() + 1) + '-' + this.date.getDate();
|
||||||
listCalendars(this.teamShiftQueryParams).then(response =>{
|
listCalendars(this.teamShiftQueryParams).then(response =>{
|
||||||
this.calendarDayList = response.data;
|
this.calendarDayList = response.data;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|||||||
@@ -14,6 +14,14 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
<UserSingleSelect ref="userSelect" @onSelected="onUserSelected"></UserSingleSelect>
|
<UserSingleSelect ref="userSelect" @onSelected="onUserSelected"></UserSingleSelect>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="日期" prop="date">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.date"
|
||||||
|
type="date"
|
||||||
|
@change="changeDate"
|
||||||
|
placeholder="选择日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main>
|
<el-main>
|
||||||
@@ -87,7 +95,6 @@ export default {
|
|||||||
watch:{
|
watch:{
|
||||||
date:{
|
date:{
|
||||||
handler(newVal,oldVal){
|
handler(newVal,oldVal){
|
||||||
console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate());
|
|
||||||
this.teamShiftQueryParams.date = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
|
this.teamShiftQueryParams.date = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listCalendars(this.teamShiftQueryParams).then(response =>{
|
listCalendars(this.teamShiftQueryParams).then(response =>{
|
||||||
@@ -101,6 +108,9 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
changeDate(val) {
|
||||||
|
this.date = val
|
||||||
|
},
|
||||||
/** 查询节假日设置列表 */
|
/** 查询节假日设置列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
@@ -11,6 +11,16 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-aside>
|
</el-aside>
|
||||||
<el-main>
|
<el-main>
|
||||||
|
<el-form :model="form" size="small" :inline="true" label-width="100px">
|
||||||
|
<el-form-item label="日期" prop="date">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.date"
|
||||||
|
type="date"
|
||||||
|
@change="changeDate"
|
||||||
|
placeholder="选择日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<el-calendar v-loading="loading" v-model="date">
|
<el-calendar v-loading="loading" v-model="date">
|
||||||
<template slot="dateCell" slot-scope="{date, data }">
|
<template slot="dateCell" slot-scope="{date, data }">
|
||||||
<div>
|
<div>
|
||||||
@@ -56,6 +66,7 @@ export default {
|
|||||||
dicts:['mes_calendar_type'],
|
dicts:['mes_calendar_type'],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
form: {},
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
@@ -94,6 +105,9 @@ export default {
|
|||||||
this.getTeams();
|
this.getTeams();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
changeDate(val) {
|
||||||
|
this.date = val
|
||||||
|
},
|
||||||
getTeams(){
|
getTeams(){
|
||||||
listAllTeam().then(response =>{
|
listAllTeam().then(response =>{
|
||||||
this.teamList = response.data;
|
this.teamList = response.data;
|
||||||
|
|||||||
@@ -262,7 +262,6 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div slot="footer" class="dialog-footer">
|
<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="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="handleFinish" v-if="form.status =='PREPARE' && optType !='view' && form.planId !=null">完成</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
@@ -321,10 +320,12 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
planCode: [
|
planCode: [
|
||||||
{ required: true, message: "计划编号不能为空", trigger: "blur" }
|
{ required: true, message: "计划编号不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
planName: [
|
planName: [
|
||||||
{ required: true, message: "计划名称不能为空", trigger: "blur" }
|
{ required: true, message: "计划名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
calendarType:[
|
calendarType:[
|
||||||
{ required: true, message: "请选择班组类型", trigger: "blur" }
|
{ required: true, message: "请选择班组类型", trigger: "blur" }
|
||||||
@@ -335,6 +336,9 @@ export default {
|
|||||||
endDate: [
|
endDate: [
|
||||||
{ required: true, message: "结束日期不能为空", trigger: "blur" }
|
{ required: true, message: "结束日期不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listPlanteam, delPlanteam, addPlanteam } from "@/api/mes/cal/planteam";
|
import { listPlanteam, delPlanteam, addPlanteam } from "@/api/mes/cal/planteam";
|
||||||
import { listTeammember } from "@/api/mes/cal/teammember";
|
import {getListByTeamId, listTeammember} from "@/api/mes/cal/teammember";
|
||||||
import TeamSelect from "@/components/calTeamSelect/multi.vue"
|
import TeamSelect from "@/components/calTeamSelect/multi.vue"
|
||||||
export default {
|
export default {
|
||||||
name:"PlanTeam",
|
name:"PlanTeam",
|
||||||
@@ -83,15 +83,20 @@ export default {
|
|||||||
listPlanteam(this.queryParams).then(response => {
|
listPlanteam(this.queryParams).then(response => {
|
||||||
this.teamList = response.rows;
|
this.teamList = response.rows;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
let ids = []
|
||||||
|
this.teamList.forEach(irem => {
|
||||||
|
ids.push(irem.teamId)
|
||||||
|
})
|
||||||
|
getListByTeamId(ids.join(",")).then(res => {
|
||||||
|
this.teammemberList = res.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getMemberList(id){
|
getMemberList(id){
|
||||||
var param = {
|
|
||||||
teamId:id
|
|
||||||
}
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listTeammember(param).then(response => {
|
getListByTeamId(id).then(res => {
|
||||||
this.teammemberList = response.rows;
|
this.teammemberList = res.data;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -172,8 +172,7 @@
|
|||||||
<el-divider v-if="form.teamId !=null" content-position="center">项目组成员</el-divider>
|
<el-divider v-if="form.teamId !=null" content-position="center">项目组成员</el-divider>
|
||||||
<Teammember v-if="form.teamId !=null" :optType="optType" :teamId="form.teamId"></Teammember>
|
<Teammember v-if="form.teamId !=null" :optType="optType" :teamId="form.teamId"></Teammember>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
||||||
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -224,13 +223,18 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
teamCode: [
|
teamCode: [
|
||||||
{ required: true, message: "班组编号不能为空", trigger: "blur" }
|
{ required: true, message: "班组编号不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
teamName: [
|
teamName: [
|
||||||
{ required: true, message: "班组名称不能为空", trigger: "blur" }
|
{ required: true, message: "班组名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
calendarType:[
|
calendarType:[
|
||||||
{ required: true, message: "清选择班组类型", trigger: "blur" }
|
{ required: true, message: "清选择班组类型", trigger: "blur" }
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -204,7 +204,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="频率" prop="cycleCount">
|
<el-form-item label="频率" prop="cycleCount">
|
||||||
<el-input-number :min="1" :step="1" v-model="form.cycleCount" placeholder="请输入次数" />
|
<el-input-number :min="1" :max="99999999" :step="1" v-model="form.cycleCount" placeholder="请输入次数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" >
|
<el-col :span="4" >
|
||||||
@@ -271,7 +271,6 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div slot="footer" class="dialog-footer">
|
<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="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="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 type="success" @click="handleDeFinish" v-if="form.status =='FINISHED' && optType !='view' && form.planId !=null">停用</el-button>
|
||||||
@@ -329,10 +328,12 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
planCode: [
|
planCode: [
|
||||||
{ required: true, message: "计划编码不能为空", trigger: "blur" }
|
{ required: true, message: "计划编码不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
planName: [
|
planName: [
|
||||||
{ required: true, message: "计划名称不能为空", trigger: "blur" }
|
{ required: true, message: "计划名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
planType:[
|
planType:[
|
||||||
{ required: true, message: "计划类型不能为空", trigger: "blur" }
|
{ required: true, message: "计划类型不能为空", trigger: "blur" }
|
||||||
@@ -343,6 +344,9 @@ export default {
|
|||||||
cycleCount: [
|
cycleCount: [
|
||||||
{ required: true, message: "请输入点检次数", trigger: "blur" }
|
{ required: true, message: "请输入点检次数", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -490,7 +494,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('dv/checkplan/export', {
|
this.download('mes/dv/checkplan/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `checkplan_${new Date().getTime()}.xlsx`)
|
}, `checkplan_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -30,18 +30,15 @@
|
|||||||
|
|
||||||
<el-table v-loading="loading" :data="checksubjectList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="checksubjectList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="项目编码" align="center" prop="subjectCode" />
|
<el-table-column label="项目名称" align="center" prop="subjectName" width="150px"/>
|
||||||
<el-table-column label="项目名称" align="center" prop="subjectName" />
|
<el-table-column label="项目内容" align="center" width="350px" prop="subjectContent" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="项目类型" align="center" prop="subjectType" />
|
|
||||||
<el-table-column label="项目内容" align="center" width="300px" prop="subjectContent" :show-overflow-tooltip="true"/>
|
|
||||||
<el-table-column label="标准" align="center" width="300px" prop="subjectStandard" :show-overflow-tooltip="true"/>
|
<el-table-column label="标准" align="center" width="300px" prop="subjectStandard" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" v-if="optType !='view'" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
v-if="optType !='view'"
|
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['mes:dv:checkplan:remove']"
|
v-hasPermi="['mes:dv:checkplan:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
|
|||||||
434
src/views/mes/dv/checkrecord/index.vue
Normal file
434
src/views/mes/dv/checkrecord/index.vue
Normal file
@@ -0,0 +1,434 @@
|
|||||||
|
<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="planCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.planCode"
|
||||||
|
placeholder="请输入计划编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="计划名称" prop="planName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.planName"
|
||||||
|
placeholder="请输入计划名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备编码" prop="machineryCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.machineryCode"
|
||||||
|
placeholder="请输入设备编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备名称" prop="machineryName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.machineryName"
|
||||||
|
placeholder="请输入设备名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点检时间" prop="checkTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.checkTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择点检时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</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:checkrecord: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:checkrecord:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['mes:dv:checkrecord:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="checkrecordList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="设备编码" align="center" prop="machineryCode" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
v-hasPermi="['mes:dv:checkrecord:query']"
|
||||||
|
>{{scope.row.machineryCode}}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="设备名称" align="center" prop="machineryName" />
|
||||||
|
<el-table-column label="品牌" align="center" prop="machineryBrand" />
|
||||||
|
<el-table-column label="规格型号" align="center" prop="machinerySpec" />
|
||||||
|
<el-table-column label="计划编码" align="center" prop="planCode" />
|
||||||
|
<el-table-column label="计划名称" align="center" prop="planName" />
|
||||||
|
<el-table-column label="点检人" align="center" prop="nickName" />
|
||||||
|
<el-table-column label="点检时间" align="center" prop="checkTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
v-if="scope.row.status =='PREPARE'"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['mes:dv:checkrecord:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
v-if="scope.row.status =='PREPARE'"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['mes:dv:checkrecord: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="machineryCode">
|
||||||
|
<el-input v-model="form.machineryCode" placeholder="请选择设备" >
|
||||||
|
<el-button slot="append" @click="handleSelectMachinery" icon="el-icon-search"></el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<MachinerySelectSingle ref="machinerySelect" @onSelected="onMachineryAdd"></MachinerySelectSingle>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="设备名称" prop="machineryName">
|
||||||
|
<el-input v-model="form.machineryName" readonly="readonly" placeholder="请选择设备" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="品牌" prop="machineryBrand">
|
||||||
|
<el-input v-model="form.machineryBrand" readonly="readonly" placeholder="请选择设备" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="规格型号" prop="machinerySpec">
|
||||||
|
<el-input v-model="form.machinerySpec" readonly="readonly" type="textarea" placeholder="请选择设备" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="点检计划" prop="planName">
|
||||||
|
<el-input v-model="form.planName" placeholder="请选择设备点检计划" >
|
||||||
|
<el-button slot="append" @click="handleSelectPlan" icon="el-icon-search"></el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<CheckplanSelect ref="checkplanSelect" planType="CHECK" @onSelected="onPlanAdd"></CheckplanSelect>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="点检人" prop="nickName">
|
||||||
|
<el-input v-model="form.nickName" placeholder="请选择点检人" >
|
||||||
|
<el-button slot="append" @click="handleUserSelect" icon="el-icon-search"></el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<UserSingleSelect ref="userSelect" @onSelected="onUserSelected"></UserSingleSelect>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="点检时间" prop="checkTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.checkTime"
|
||||||
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
placeholder="请选择点检时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</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>
|
||||||
|
<el-divider v-if="form.recordId !=null" content-position="center">点检项目</el-divider>
|
||||||
|
<el-card shadow="always" v-if="form.recordId !=null" class="box-card">
|
||||||
|
<CheckRecordLine ref="checkRecordLine" :optType="optType" :recordId="form.recordId"></CheckRecordLine>
|
||||||
|
</el-card>
|
||||||
|
<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="optType !=='view' && form.status =='PREPARE' " >保 存</el-button>
|
||||||
|
<el-button type="success" @click="handleFinish" v-if="optType !=='view' && form.status =='PREPARE' " >提 交</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listCheckrecord, getCheckrecord, delCheckrecord, addCheckrecord, updateCheckrecord } from "@/api/mes/dv/checkrecord";
|
||||||
|
import MachinerySelectSingle from "@/components/machinerySelect/single.vue";
|
||||||
|
import CheckplanSelect from "@/components/dvplanSelect/index.vue";
|
||||||
|
import CheckRecordLine from "./line.vue";
|
||||||
|
import UserSingleSelect from "@/components/userSelect/single.vue"
|
||||||
|
export default {
|
||||||
|
name: "Checkrecord",
|
||||||
|
dicts: ['mes_order_status'],
|
||||||
|
components:{ MachinerySelectSingle, CheckplanSelect, CheckRecordLine, UserSingleSelect},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
optType: null,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 设备点检记录表格数据
|
||||||
|
checkrecordList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
planId: null, planCode: null, planName: null, planType: null, machineryId: null, machineryCode: null, machineryName: null, machineryBrand: null, machinerySpec: null, checkTime: null, status: null, },
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
machineryId: [
|
||||||
|
{ required: true, message: "设备ID不能为空", trigger: "blur" }
|
||||||
|
], machineryCode: [
|
||||||
|
{ required: true, message: "设备编码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
checkTime: [
|
||||||
|
{ required: true, message: "点检时间不能为空", trigger: "blur" }
|
||||||
|
], }
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询设备点检记录列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listCheckrecord(this.queryParams).then(response => {
|
||||||
|
this.checkrecordList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
recordId: null, planId: null, planCode: null, planName: null, planType: null, machineryId: null, machineryCode: null, machineryName: null, machineryBrand: null, userId: null, nickName: null, userName: null, machinerySpec: null, checkTime: new Date(), status: "PREPARE", remark: null, attr1: null, attr2: null, attr3: null, attr4: null, createBy: null, createTime: null, updateBy: null, updateTime: null };
|
||||||
|
this.form.userId= this.$store.state.user.id;
|
||||||
|
this.form.nickName= this.$store.state.user.nick;
|
||||||
|
this.form.userName= this.$store.state.user.name;
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.recordId)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加设备点检记录";
|
||||||
|
this.optType = "add";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const recordId = row.recordId || this.ids
|
||||||
|
getCheckrecord(recordId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改设备点检记录";
|
||||||
|
this.optType = "edit";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleView(row) {
|
||||||
|
this.reset();
|
||||||
|
const recordId = row.recordId || this.ids
|
||||||
|
getCheckrecord(recordId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "查看设备点检记录";
|
||||||
|
this.optType = "view";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.recordId != null) {
|
||||||
|
updateCheckrecord(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCheckrecord(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleFinish(){
|
||||||
|
if(this.form.recordId != null && this.form.status =='PREPARE'){
|
||||||
|
this.form.status='FINISHED';
|
||||||
|
updateCheckrecord(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("已提交");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
},err =>{
|
||||||
|
this.form.status='PREPARE';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const recordIds = row.recordId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除设备点检记录编号为"' + recordIds + '"的数据项?').then(function() {
|
||||||
|
return delCheckrecord(recordIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
handleSelectMachinery(){
|
||||||
|
debugger;
|
||||||
|
this.$refs.machinerySelect.showFlag = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
//设备资源选择回调
|
||||||
|
onMachineryAdd(obj){
|
||||||
|
if(obj !=null && obj != undefined){
|
||||||
|
this.form.machineryId = obj.machineryId;
|
||||||
|
this.form.machineryCode = obj.machineryCode;
|
||||||
|
this.form.machineryName = obj.machineryName;
|
||||||
|
this.form.machineryBrand = obj.machineryBrand;
|
||||||
|
this.form.machinerySpec = obj.machinerySpec;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSelectPlan(){
|
||||||
|
this.$refs.checkplanSelect.showFlag = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
onPlanAdd(obj){
|
||||||
|
if(obj !=null && obj != undefined){
|
||||||
|
this.form.planId = obj.planId;
|
||||||
|
this.form.planCode = obj.planCode;
|
||||||
|
this.form.planName = obj.planName;
|
||||||
|
this.form.planType = obj.planType;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
//点击人员选择按钮
|
||||||
|
handleUserSelect(){
|
||||||
|
this.$refs.userSelect.showFlag = true;
|
||||||
|
},
|
||||||
|
//人员选择返回
|
||||||
|
onUserSelected(row){
|
||||||
|
this.form.userId = row.userId;
|
||||||
|
this.form.nickName = row.nickName;
|
||||||
|
this.form.userName = row.userName;
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('dv/checkrecord/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `checkrecord_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
277
src/views/mes/dv/checkrecord/line.vue
Normal file
277
src/views/mes/dv/checkrecord/line.vue
Normal file
@@ -0,0 +1,277 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="10" v-if="optType !== 'view'" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['dv:checkrecordline: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="['dv:checkrecordline:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['dv:checkrecordline:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="checkrecordlineList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="项目名称" align="center" prop="subjectName" />
|
||||||
|
<el-table-column label="检查内容" align="center" prop="subjectContent" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="标准" align="center" prop="subjectStandard" />
|
||||||
|
<el-table-column label="点检结果" align="center" prop="checkStatus" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.dv_cm_result_status" :value="scope.row.checkStatus"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="异常描述" align="center" prop="checkResult" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="操作" align="center" v-if="optType !== 'view'" 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="['dv:checkrecordline:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['dv:checkrecordline: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="24">
|
||||||
|
<el-form-item label="项目名称" prop="subjectName">
|
||||||
|
<el-input v-model="form.subjectName" placeholder="请选择检查项目" >
|
||||||
|
<el-button slot="append" @click="handleSelectSubject" icon="el-icon-search"></el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<DvSubjectSelect ref="subjectSelect" subjectType="CHECK" @onSelected="onSubjectSelected"></DvSubjectSelect>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="标准" prop="subjectStandard">
|
||||||
|
<el-input v-model="form.subjectStandard" placeholder="请输入标准" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="项目内容">
|
||||||
|
<el-input type="textarea" v-model="form.subjectContent" :min-height="192"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="点检结果">
|
||||||
|
<el-radio-group v-model="form.checkStatus">
|
||||||
|
<el-radio label="Y">正常</el-radio>
|
||||||
|
<el-radio label="N">异常</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.checkStatus === 'N'" label="异常描述" prop="checkResult">
|
||||||
|
<el-input v-model="form.checkResult" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listCheckrecordline, getCheckrecordline, delCheckrecordline, addCheckrecordline, updateCheckrecordline } from "@/api/mes/dv/checkrecordline";
|
||||||
|
import DvSubjectSelect from "@/components/dvsubjectSelect/single.vue";
|
||||||
|
export default {
|
||||||
|
name: "Checkrecordline",
|
||||||
|
props:{
|
||||||
|
optType: null,
|
||||||
|
recordId: null,
|
||||||
|
},
|
||||||
|
dicts: ['dv_cm_result_status'],
|
||||||
|
components:{ DvSubjectSelect },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 设备点检记录行表格数据
|
||||||
|
checkrecordlineList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
recordId: this.recordId, subjectId: null, subjectCode: null, subjectName: null, subjectType: null, subjectContent: null, subjectStandard: null, checkStatus: null, checkResult: null, },
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
recordId: [
|
||||||
|
{ required: true, message: "计划ID不能为空", trigger: "blur" }
|
||||||
|
], subjectId: [
|
||||||
|
{ required: true, message: "项目ID不能为空", trigger: "blur" }
|
||||||
|
], subjectCode: [
|
||||||
|
{ required: true, message: "项目编码不能为空", trigger: "blur" }
|
||||||
|
], subjectContent: [
|
||||||
|
{ required: true, message: "项目内容不能为空", trigger: "blur" }
|
||||||
|
], checkStatus: [
|
||||||
|
{ required: true, message: "点检结果不能为空", trigger: "blur" }
|
||||||
|
], }
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询设备点检记录行列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listCheckrecordline(this.queryParams).then(response => {
|
||||||
|
this.checkrecordlineList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
lineId: null, recordId: this.recordId, subjectId: null, subjectCode: null, subjectName: null, subjectType: null, subjectContent: null, subjectStandard: null, checkStatus: "Y", checkResult: null, attr1: null, attr2: null, attr3: null, attr4: null, createBy: null, createTime: null, updateBy: null, updateTime: null };
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.lineId)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加设备点检记录行";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const lineId = row.lineId || this.ids
|
||||||
|
getCheckrecordline(lineId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改设备点检记录行";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.lineId != null) {
|
||||||
|
updateCheckrecordline(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCheckrecordline(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const lineIds = row.lineId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除设备点检记录行编号为"' + lineIds + '"的数据项?').then(function() {
|
||||||
|
return delCheckrecordline(lineIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
handleSelectSubject(){
|
||||||
|
this.$refs.subjectSelect.showFlag = true;
|
||||||
|
},
|
||||||
|
onSubjectSelected(obj){
|
||||||
|
if(obj){
|
||||||
|
this.form.subjectId = obj.subjectId;
|
||||||
|
this.form.subjectCode = obj.subjectCode;
|
||||||
|
this.form.subjectName = obj.subjectName;
|
||||||
|
this.form.subjectType = obj.subjectType;
|
||||||
|
this.form.subjectContent = obj.subjectContent;
|
||||||
|
this.form.subjectStandard = obj.subjectStandard;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
82
src/views/mes/dv/machinery/components/Checkplan.vue
Normal file
82
src/views/mes/dv/machinery/components/Checkplan.vue
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="checkplanList">
|
||||||
|
<el-table-column label="计划编码" align="center" prop="planCode" :show-overflow-tooltip="true"></el-table-column>
|
||||||
|
<el-table-column label="计划名称" align="center" width="200px" prop="planName" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="开始日期" align="center" prop="startDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.startDate, '{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.endDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="频率" align="center" prop="cycleType">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{scope.row.cycleCount}}
|
||||||
|
<dict-tag :options="dict.type.mes_cycle_type" :value="scope.row.cycleType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status"/>
|
||||||
|
</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 {getCheckPlan} from "@/api/mes/dv/checkplan";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "CheckPlan",
|
||||||
|
dicts: ['mes_cycle_type','mes_order_status','dv_plan_type'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: false,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 点检 / 保养数据
|
||||||
|
checkplanList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getOpen(query) {
|
||||||
|
this.queryParams.planType = query.planType
|
||||||
|
this.queryParams.machineryCode = query.machineryCode
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
getCheckPlan(this.queryParams).then(response => {
|
||||||
|
this.checkplanList = response.data;
|
||||||
|
// this.checkplanList = response.rows;
|
||||||
|
// this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
80
src/views/mes/dv/machinery/components/Repair.vue
Normal file
80
src/views/mes/dv/machinery/components/Repair.vue
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-table v-loading="loading" :data="repairList">
|
||||||
|
<el-table-column label="维修单编号" width="120px" align="center" prop="repairCode" />
|
||||||
|
<el-table-column label="维修单名称" width="150px" align="center" prop="repairName" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="报修日期" align="center" prop="requireDate" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.requireDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="维修完成日期" align="center" prop="finishDate" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.finishDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="验收日期" align="center" prop="confirmDate" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.confirmDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="维修结果" align="center" prop="repairResult">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.mes_repair_result" :value="scope.row.repairResult"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="维修人员" align="center" prop="acceptedBy" />
|
||||||
|
<el-table-column label="验收人员" align="center" prop="confirmBy" />
|
||||||
|
<el-table-column label="单据状态" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status"/>
|
||||||
|
</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 {getRepairList} from "@/api/mes/dv/repair";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Repair",
|
||||||
|
dicts: ['mes_repair_result', 'mes_order_status'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: false,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 点检 / 保养数据
|
||||||
|
repairList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getOpen(query) {
|
||||||
|
this.queryParams.machineryCode = query.machineryCode
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
getRepairList(this.queryParams).then(response => {
|
||||||
|
this.repairList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
<el-table-column label="设备名称" min-width="120" align="left" key="machineryName" prop="machineryName" :show-overflow-tooltip="true" />
|
<el-table-column label="设备名称" min-width="120" align="left" key="machineryName" prop="machineryName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="品牌" align="left" key="machineryBrand" prop="machineryBrand" :show-overflow-tooltip="true" />
|
<el-table-column label="品牌" align="left" key="machineryBrand" prop="machineryBrand" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="规格型号" align="left" key="machinerySpec" prop="machinerySpec" :show-overflow-tooltip="true" />
|
<el-table-column label="规格型号" align="left" key="machinerySpec" prop="machinerySpec" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="所属车间" align="center" key="machineryTypeName" prop="machineryTypeName" :show-overflow-tooltip="true" />
|
<el-table-column label="所属车间" align="center" key="workshopName" prop="workshopName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="设备状态" align="center" key="status" prop="status" >
|
<el-table-column label="设备状态" align="center" key="status" prop="status" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.mes_machinery_status" :value="scope.row.status"/>
|
<dict-tag :options="dict.type.mes_machinery_status" :value="scope.row.status"/>
|
||||||
@@ -176,9 +176,9 @@
|
|||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-form-item label="设备编码" prop="itemCode">
|
<el-form-item label="设备编码" prop="machineryCode">
|
||||||
<el-input v-model="form.machineryCode" readonly="readonly" maxlength="64" v-if="['view','edit'].indexOf(optType)> -1"/>
|
<el-input v-model="form.machineryCode" :disabled="optType != 'add'" readonly="readonly" maxlength="64" v-if="['view','edit'].indexOf(optType)> -1"/>
|
||||||
<el-input v-model="form.machineryCode" placeholder="请输入设备编码" maxlength="64" v-else/>
|
<el-input v-model="form.machineryCode" :disabled="optType != 'add'" placeholder="请输入设备编码" maxlength="64" v-else/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@@ -193,7 +193,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="设备名称" prop="itemName">
|
<el-form-item label="设备名称" prop="machineryName">
|
||||||
<el-input v-model="form.machineryName" maxlength="255" readonly="readonly" v-if="optType=='view'" />
|
<el-input v-model="form.machineryName" maxlength="255" readonly="readonly" v-if="optType=='view'" />
|
||||||
<el-input v-model="form.machineryName" placeholder="请输入设备名称" maxlength="255" v-else/>
|
<el-input v-model="form.machineryName" placeholder="请输入设备名称" maxlength="255" v-else/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -216,9 +216,9 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="所属车间" prop="workshopId">
|
<el-form-item label="所属车间" prop="workshopId">
|
||||||
<el-select v-model="form.workshopId" placeholder="请选择车间">
|
<el-select v-model="form.workshopId" @change="changeWorkshop" placeholder="请选择车间">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in workshopOptions"
|
v-for="item in workshopOptions"
|
||||||
:key="item.workshopId"
|
:key="item.workshopId"
|
||||||
@@ -228,6 +228,18 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="设备状态" prop="status">
|
||||||
|
<el-select v-model="form.status" placeholder="请选择设备状态">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.type.mes_machinery_status"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
@@ -244,16 +256,26 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" type="textarea" readonly v-if="optType=='view'"></el-input>
|
<el-input v-model="form.remark" type="textarea" readonly v-if="optType=='view'"></el-input>
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" v-else></el-input>
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" v-else></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<el-tabs type="border-card" v-model="activeName" v-if="optType != 'add'" @tab-click="handleActive">
|
||||||
|
<el-tab-pane label="点检记录" name="check">
|
||||||
|
<CheckPlan ref="checkList" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="保养记录" name="maintenance">
|
||||||
|
<CheckPlan ref="maintenanceList" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="维修记录" name="repair">
|
||||||
|
<Repair ref="repairList" />
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
||||||
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -298,15 +320,19 @@ import {genCode} from "@/api/system/autocode/rule"
|
|||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
import BarcodeImg from "@/components/barcodeImg/index.vue"
|
import BarcodeImg from "@/components/barcodeImg/index.vue";
|
||||||
|
import CheckPlan from "@/views/mes/dv/machinery/components/Checkplan.vue"
|
||||||
|
import Repair from "@/views/mes/dv/machinery/components/Repair.vue"
|
||||||
import {getBarcodeUrl} from "@/api/mes/wm/barcode";
|
import {getBarcodeUrl} from "@/api/mes/wm/barcode";
|
||||||
|
import { option } from "runjs";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Machinery",
|
name: "Machinery",
|
||||||
dicts: ['sys_yes_no','mes_machinery_status'],
|
dicts: ['sys_yes_no','mes_machinery_status'],
|
||||||
components: { Treeselect,BarcodeImg },
|
components: { Treeselect,BarcodeImg, CheckPlan, Repair },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
activeName: "check",
|
||||||
//自动生成编码
|
//自动生成编码
|
||||||
autoGenFlag:false,
|
autoGenFlag:false,
|
||||||
optType: undefined,
|
optType: undefined,
|
||||||
@@ -334,8 +360,6 @@ export default {
|
|||||||
open: false,
|
open: false,
|
||||||
// 设备类型名称
|
// 设备类型名称
|
||||||
machineryTypeName: undefined,
|
machineryTypeName: undefined,
|
||||||
//自动生成物料编码标识
|
|
||||||
autoGenFlag: false,
|
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
@@ -395,6 +419,9 @@ export default {
|
|||||||
],
|
],
|
||||||
machineryTypeId: [
|
machineryTypeId: [
|
||||||
{ required: true, message: "设备分类不能为空", trigger: "blur" },
|
{ required: true, message: "设备分类不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -410,6 +437,27 @@ export default {
|
|||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleActive (tab) {
|
||||||
|
const query = {}
|
||||||
|
query.machineryCode = this.form.machineryCode
|
||||||
|
if (tab.name == "check") {
|
||||||
|
query.planType = "CHECK"
|
||||||
|
this.$refs.checkList.getOpen(query)
|
||||||
|
}
|
||||||
|
if (tab.name == "maintenance") {
|
||||||
|
query.planType = "MAINTEN"
|
||||||
|
this.$refs.maintenanceList.getOpen(query)
|
||||||
|
}
|
||||||
|
if (tab.name == "repair") {
|
||||||
|
this.$refs.repairList.getOpen(query)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
changeWorkshop(val) {
|
||||||
|
const workshop = this.workshopOptions.filter(item => item.workshopId == val)
|
||||||
|
this.form.workshopId = workshop[0].workshopId
|
||||||
|
this.form.workshopName = workshop[0].workshopName
|
||||||
|
this.form.workshopCode = workshop[0].workshopCode
|
||||||
|
},
|
||||||
/** 查询物料编码列表 */
|
/** 查询物料编码列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@@ -511,8 +559,14 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "查看设备信息";
|
this.title = "查看设备信息";
|
||||||
this.optType = "view";
|
this.optType = "view";
|
||||||
|
this.activeName = "check"
|
||||||
|
const query = {
|
||||||
|
machineryCode: this.form.machineryCode,
|
||||||
|
planType: "CHECK"
|
||||||
|
}
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
this.$refs.barcodeImg.getBarcode();
|
this.$refs.barcodeImg.getBarcode();
|
||||||
|
this.$refs.checkList.getOpen(query)
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -540,8 +594,14 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改设备";
|
this.title = "修改设备";
|
||||||
this.optType = "edit";
|
this.optType = "edit";
|
||||||
|
this.activeName = "check"
|
||||||
|
const query = {
|
||||||
|
machineryCode: this.form.machineryCode,
|
||||||
|
planType: "CHECK"
|
||||||
|
}
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
this.$refs.barcodeImg.getBarcode();
|
this.$refs.barcodeImg.getBarcode();
|
||||||
|
this.$refs.checkList.getOpen(query)
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -161,11 +161,15 @@ export default {
|
|||||||
{ required: true, message: "父类型不能为空", trigger: "blur" }
|
{ required: true, message: "父类型不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
machineryTypeName: [
|
machineryTypeName: [
|
||||||
{ required: true, message: "设备类型名称不能为空", trigger: "blur" }
|
{ required: true, message: "设备类型名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
enableFlag: [
|
enableFlag: [
|
||||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
431
src/views/mes/dv/maintenrecord/index.vue
Normal file
431
src/views/mes/dv/maintenrecord/index.vue
Normal file
@@ -0,0 +1,431 @@
|
|||||||
|
<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="planName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.planName"
|
||||||
|
placeholder="请输入计划名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="设备编码" prop="machineryCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.machineryCode"
|
||||||
|
placeholder="请输入设备编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备名称" prop="machineryName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.machineryName"
|
||||||
|
placeholder="请输入设备名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="保养人" prop="nickName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.nickName"
|
||||||
|
placeholder="请输入名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="保养时间" prop="maintenTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.maintenTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择保养时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</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:maintenrecord: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:maintenrecord:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['mes:dv:maintenrecord:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="maintenrecordList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="设备编码" align="center" prop="machineryCode" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
v-hasPermi="['mes:dv:maintenrecord:query']"
|
||||||
|
>{{scope.row.machineryCode}}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="设备名称" align="center" prop="machineryName" />
|
||||||
|
<el-table-column label="品牌" align="center" prop="machineryBrand" />
|
||||||
|
<el-table-column label="规格型号" align="center" prop="machinerySpec" />
|
||||||
|
<el-table-column label="计划名称" align="center" prop="planName" />
|
||||||
|
<el-table-column label="保养时间" align="center" prop="maintenTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.maintenTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="保养人" align="center" prop="nickName" />
|
||||||
|
<el-table-column label="状态" align="center" prop="status" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" 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-if="scope.row.status === 'PREPARE'"
|
||||||
|
v-hasPermi="['dv:maintenrecord:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-if="scope.row.status === 'PREPARE'"
|
||||||
|
v-hasPermi="['dv:maintenrecord: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="machineryCode">
|
||||||
|
<el-input v-model="form.machineryCode" placeholder="请选择设备" >
|
||||||
|
<el-button slot="append" @click="handleSelectMachinery" icon="el-icon-search"></el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<MachinerySelectSingle ref="machinerySelect" @onSelected="onMachineryAdd"></MachinerySelectSingle>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="设备名称" prop="machineryName">
|
||||||
|
<el-input v-model="form.machineryName" readonly="readonly" placeholder="请选择设备" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="品牌" prop="machineryBrand">
|
||||||
|
<el-input v-model="form.machineryBrand" readonly="readonly" placeholder="请选择设备" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="规格型号" prop="machinerySpec">
|
||||||
|
<el-input v-model="form.machinerySpec" readonly="readonly" type="textarea" placeholder="请选择设备" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="保养计划" prop="planName">
|
||||||
|
<el-input v-model="form.planName" placeholder="请选择设备保养计划" >
|
||||||
|
<el-button slot="append" @click="handleSelectPlan" icon="el-icon-search"></el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<CheckplanSelect ref="checkplanSelect" planType="MAINTEN" @onSelected="onPlanAdd"></CheckplanSelect>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="保养人" prop="nickName">
|
||||||
|
<el-input v-model="form.nickName" placeholder="请选择保养人" >
|
||||||
|
<el-button slot="append" @click="handleUserSelect" icon="el-icon-search"></el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<UserSingleSelect ref="userSelect" @onSelected="onUserSelected"></UserSingleSelect>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="保养时间" prop="maintenTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.maintenTime"
|
||||||
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
placeholder="请选择保养时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</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>
|
||||||
|
<el-divider v-if="form.recordId !=null" content-position="center">保养项目</el-divider>
|
||||||
|
<el-card shadow="always" v-if="form.recordId !=null" class="box-card">
|
||||||
|
<MaintenRecordLine ref="maintenRecordLine" :optType="optType" :recordId="form.recordId"></MaintenRecordLine>
|
||||||
|
</el-card>
|
||||||
|
<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="optType !=='view' && form.status =='PREPARE' " >保 存</el-button>
|
||||||
|
<el-button type="success" @click="handleFinish" v-if="optType !=='view' && form.status =='PREPARE' " >提 交</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listMaintenrecord, getMaintenrecord, delMaintenrecord, addMaintenrecord, updateMaintenrecord } from "@/api/mes/dv/maintenrecord";
|
||||||
|
import MachinerySelectSingle from "@/components/machinerySelect/single.vue";
|
||||||
|
import CheckplanSelect from "@/components/dvplanSelect/index.vue";
|
||||||
|
import UserSingleSelect from "@/components/userSelect/single.vue"
|
||||||
|
import MaintenRecordLine from "./line.vue"
|
||||||
|
export default {
|
||||||
|
name: "Maintenrecord",
|
||||||
|
dicts: ['mes_order_status'],
|
||||||
|
components: {MachinerySelectSingle, CheckplanSelect, UserSingleSelect, MaintenRecordLine},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
optType: null,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 设备保养记录表格数据
|
||||||
|
maintenrecordList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
planId: null, planCode: null, planName: null, planType: null, machineryId: null, machineryCode: null, machineryName: null, machineryBrand: null, machinerySpec: null, maintenTime: null, userId: null, userName: null, nickName: null, status: null, },
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
machineryId: [
|
||||||
|
{ required: true, message: "设备ID不能为空", trigger: "blur" }
|
||||||
|
], machineryCode: [
|
||||||
|
{ required: true, message: "设备编码不能为空", trigger: "blur" }
|
||||||
|
], machineryName: [
|
||||||
|
{ required: true, message: "设备名称不能为空", trigger: "blur" }
|
||||||
|
], maintenTime: [
|
||||||
|
{ required: true, message: "保养时间不能为空", trigger: "blur" }
|
||||||
|
], }
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询设备保养记录列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listMaintenrecord(this.queryParams).then(response => {
|
||||||
|
this.maintenrecordList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
recordId: null, planId: null, planCode: null, planName: null, planType: null, machineryId: null, machineryCode: null, machineryName: null, machineryBrand: null, machinerySpec: null, maintenTime: null, userId: null, userName: null, nickName: null, status: "PREPARE", remark: null, attr1: null, attr2: null, attr3: null, attr4: null, createBy: null, createTime: null, updateBy: null, updateTime: null };
|
||||||
|
this.form.userId= this.$store.state.user.id;
|
||||||
|
this.form.nickName= this.$store.state.user.nick;
|
||||||
|
this.form.userName= this.$store.state.user.name;
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.recordId)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加设备保养记录";
|
||||||
|
this.optType = "add";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const recordId = row.recordId || this.ids
|
||||||
|
getMaintenrecord(recordId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改设备保养记录";
|
||||||
|
this.optType = "edit";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleView(row) {
|
||||||
|
this.reset();
|
||||||
|
const recordId = row.recordId || this.ids
|
||||||
|
getMaintenrecord(recordId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "查看设备保养记录";
|
||||||
|
this.optType = "view";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.recordId != null) {
|
||||||
|
updateMaintenrecord(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addMaintenrecord(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleFinish(){
|
||||||
|
if(this.form.recordId != null && this.form.status =='PREPARE'){
|
||||||
|
this.form.status='FINISHED';
|
||||||
|
updateMaintenrecord(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("已提交");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
},err =>{
|
||||||
|
this.form.status='PREPARE';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const recordIds = row.recordId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除设备保养记录编号为"' + recordIds + '"的数据项?').then(function() {
|
||||||
|
return delMaintenrecord(recordIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSelectMachinery(){
|
||||||
|
this.$refs.machinerySelect.showFlag = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
//设备资源选择回调
|
||||||
|
onMachineryAdd(obj){
|
||||||
|
if(obj !=null && obj != undefined){
|
||||||
|
this.form.machineryId = obj.machineryId;
|
||||||
|
this.form.machineryCode = obj.machineryCode;
|
||||||
|
this.form.machineryName = obj.machineryName;
|
||||||
|
this.form.machineryBrand = obj.machineryBrand;
|
||||||
|
this.form.machinerySpec = obj.machinerySpec;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSelectPlan(){
|
||||||
|
this.$refs.checkplanSelect.showFlag = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
onPlanAdd(obj){
|
||||||
|
if(obj !=null && obj != undefined){
|
||||||
|
this.form.planId = obj.planId;
|
||||||
|
this.form.planCode = obj.planCode;
|
||||||
|
this.form.planName = obj.planName;
|
||||||
|
this.form.planType = obj.planType;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
//点击人员选择按钮
|
||||||
|
handleUserSelect(){
|
||||||
|
this.$refs.userSelect.showFlag = true;
|
||||||
|
},
|
||||||
|
//人员选择返回
|
||||||
|
onUserSelected(row){
|
||||||
|
this.form.userId = row.userId;
|
||||||
|
this.form.nickName = row.nickName;
|
||||||
|
this.form.userName = row.userName;
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
264
src/views/mes/dv/maintenrecord/line.vue
Normal file
264
src/views/mes/dv/maintenrecord/line.vue
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="10" v-if="optType != 'view'" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['dv:maintenrecordline: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="['dv:maintenrecordline:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['dv:maintenrecordline:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="maintenrecordlineList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="项目名称" align="center" prop="subjectName" />
|
||||||
|
<el-table-column label="项目内容" align="center" prop="subjectContent" />
|
||||||
|
<el-table-column label="标准" align="center" prop="subjectStandard" />
|
||||||
|
<el-table-column label="保养结果" align="center" prop="maintenStatus" />
|
||||||
|
<el-table-column label="异常描述" align="center" prop="maintenResult" />
|
||||||
|
<el-table-column label="操作" align="center" v-if="optType != 'view'" 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="['dv:maintenrecordline:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['dv:maintenrecordline: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="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="计划ID" prop="recordId">
|
||||||
|
<el-input v-model="form.recordId" placeholder="请输入计划ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="项目ID" prop="subjectId">
|
||||||
|
<el-input v-model="form.subjectId" placeholder="请输入项目ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="项目编码" prop="subjectCode">
|
||||||
|
<el-input v-model="form.subjectCode" placeholder="请输入项目编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="项目名称" prop="subjectName">
|
||||||
|
<el-input v-model="form.subjectName" placeholder="请输入项目名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="项目类型" prop="subjectType">
|
||||||
|
<el-select v-model="form.subjectType" placeholder="请选择项目类型">
|
||||||
|
<el-option label="请选择字典生成" value="" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="项目内容">
|
||||||
|
<editor v-model="form.subjectContent" :min-height="192"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="标准" prop="subjectStandard">
|
||||||
|
<el-input v-model="form.subjectStandard" placeholder="请输入标准" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="保养结果">
|
||||||
|
<el-radio-group v-model="form.maintenStatus">
|
||||||
|
<el-radio label="1">请选择字典生成</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="异常描述" prop="maintenResult">
|
||||||
|
<el-input v-model="form.maintenResult" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listMaintenrecordline, getMaintenrecordline, delMaintenrecordline, addMaintenrecordline, updateMaintenrecordline } from "@/api/mes/dv/maintenrecordline";
|
||||||
|
import DvSubjectSelect from "@/components/dvsubjectSelect/single.vue";
|
||||||
|
export default {
|
||||||
|
name: "Maintenrecordline",
|
||||||
|
props:{
|
||||||
|
optType: null,
|
||||||
|
recordId: null,
|
||||||
|
},
|
||||||
|
dicts: ['dv_cm_result_status'],
|
||||||
|
components:{ DvSubjectSelect },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 设备保养记录行表格数据
|
||||||
|
maintenrecordlineList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
recordId: null, subjectId: null, subjectCode: null, subjectName: null, subjectType: null, subjectContent: null, subjectStandard: null, maintenStatus: null, maintenResult: null, },
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
recordId: [
|
||||||
|
{ required: true, message: "计划ID不能为空", trigger: "blur" }
|
||||||
|
], subjectId: [
|
||||||
|
{ required: true, message: "项目ID不能为空", trigger: "blur" }
|
||||||
|
], subjectCode: [
|
||||||
|
{ required: true, message: "项目编码不能为空", trigger: "blur" }
|
||||||
|
], subjectContent: [
|
||||||
|
{ required: true, message: "项目内容不能为空", trigger: "blur" }
|
||||||
|
], maintenStatus: [
|
||||||
|
{ required: true, message: "保养结果不能为空", trigger: "blur" }
|
||||||
|
], }
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询设备保养记录行列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listMaintenrecordline(this.queryParams).then(response => {
|
||||||
|
this.maintenrecordlineList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
lineId: null, recordId: null, subjectId: null, subjectCode: null, subjectName: null, subjectType: null, subjectContent: null, subjectStandard: null, maintenStatus: "0", maintenResult: null, attr1: null, attr2: null, attr3: null, attr4: null, createBy: null, createTime: null, updateBy: null, updateTime: null };
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.lineId)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加设备保养记录行";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const lineId = row.lineId || this.ids
|
||||||
|
getMaintenrecordline(lineId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改设备保养记录行";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.lineId != null) {
|
||||||
|
updateMaintenrecordline(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addMaintenrecordline(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const lineIds = row.lineId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除设备保养记录行编号为"' + lineIds + '"的数据项?').then(function() {
|
||||||
|
return delMaintenrecordline(lineIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('dv/maintenrecordline/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `maintenrecordline_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -339,7 +339,11 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
repairCode: [
|
repairCode: [
|
||||||
{ required: true, message: "维修单编号不能为空", trigger: "blur" }
|
{ required: true, message: "维修单编号不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
repairName: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
machineryId: [
|
machineryId: [
|
||||||
{ required: true, message: "设备ID不能为空", trigger: "blur" }
|
{ required: true, message: "设备ID不能为空", trigger: "blur" }
|
||||||
@@ -353,6 +357,9 @@ export default {
|
|||||||
requireDate: [
|
requireDate: [
|
||||||
{ required: true, message: "请选择报修日期", trigger: "blur" }
|
{ required: true, message: "请选择报修日期", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -476,7 +483,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//设备资源选择弹出
|
//设备资源选择弹出
|
||||||
handleMachineryAdd(){
|
handleMachineryAdd(){
|
||||||
this.$refs.machinerySelect.showFlag = true;
|
this.$refs.machinerySelect.handleOpen(this.form.machineryId)
|
||||||
},
|
},
|
||||||
//设备资源选择回调
|
//设备资源选择回调
|
||||||
onMachineryAdd(row){
|
onMachineryAdd(row){
|
||||||
|
|||||||
@@ -30,9 +30,9 @@
|
|||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="项目名称" align="center" prop="subjectName" />
|
<el-table-column label="项目名称" align="center" prop="subjectName" />
|
||||||
<el-table-column label="故障描述" align="center" prop="malfunction" >
|
<el-table-column label="故障描述" align="center" prop="malfunction" >
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">-->
|
||||||
<el-input type="textarea">{{scope.row.malfunction}}</el-input>
|
<!-- <el-input type="textarea">{{scope.row.malfunction}}</el-input>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="故障描述资源" align="center" prop="malfunctionUrl" >
|
<el-table-column label="故障描述资源" align="center" prop="malfunctionUrl" >
|
||||||
|
|
||||||
@@ -69,8 +69,15 @@
|
|||||||
<!-- 添加或修改设备维修单行对话框 -->
|
<!-- 添加或修改设备维修单行对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="项目名称" prop="subjectName">
|
<el-form-item label="项目名称" prop="subjectCode">
|
||||||
<el-input v-model="form.subjectName" placeholder="请输入项目名称" />
|
<el-select v-model="form.subjectName" @change="changeSubject" filterable placeholder="请输入项目名称" style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dvsubjectList"
|
||||||
|
:key="item.subjectId"
|
||||||
|
:label="item.subjectName"
|
||||||
|
:value="item.subjectCode">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="故障描述" prop="malfunction">
|
<el-form-item label="故障描述" prop="malfunction">
|
||||||
<el-input v-model="form.malfunction" type="textarea" placeholder="请输入内容" />
|
<el-input v-model="form.malfunction" type="textarea" placeholder="请输入内容" />
|
||||||
@@ -92,6 +99,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listRepairline, getRepairline, delRepairline, addRepairline, updateRepairline } from "@/api/mes/dv/repairline";
|
import { listRepairline, getRepairline, delRepairline, addRepairline, updateRepairline } from "@/api/mes/dv/repairline";
|
||||||
|
import { listDvsubject } from "@/api/mes/dv/dvsubject";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Repairline",
|
name: "Repairline",
|
||||||
@@ -103,6 +111,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
|
// 项目选择
|
||||||
|
dvsubjectList: [],
|
||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
@@ -138,6 +148,9 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
subjectCode: [
|
||||||
|
{ required: true, message: "项目名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
malfunction: [
|
malfunction: [
|
||||||
{ required: true, message: "故障描述不能为空", trigger: "blur" }
|
{ required: true, message: "故障描述不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
@@ -146,8 +159,19 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
listDvsubject({pageNum: 1, pageSize: 99999}).then(res =>{
|
||||||
|
this.dvsubjectList = res.rows
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 选择项目
|
||||||
|
changeSubject(val) {
|
||||||
|
let data = (this.dvsubjectList.filter(item => item.subjectCode == val))[0]
|
||||||
|
this.form.subjectId = data.subjectId
|
||||||
|
this.form.subjectName = data.subjectName
|
||||||
|
this.form.subjectCode = data.subjectCode
|
||||||
|
this.form.subjectContent = data.subjectContent
|
||||||
|
},
|
||||||
/** 查询设备维修单行列表 */
|
/** 查询设备维修单行列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@@ -243,7 +267,7 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const lineIds = row.lineId || this.ids;
|
const lineIds = row.lineId || this.ids;
|
||||||
this.$modal.confirm('是否确认删除设备维修单行编号为"' + lineIds + '"的数据项?').then(function() {
|
this.$modal.confirm('是否确认删除当前数据项?').then(function() {
|
||||||
return delRepairline(lineIds);
|
return delRepairline(lineIds);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|||||||
@@ -229,13 +229,18 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
subjectCode: [
|
subjectCode: [
|
||||||
{ required: true, message: "项目编码不能为空", trigger: "blur" }
|
{ required: true, message: "项目编码不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
subjectType: [
|
subjectType: [
|
||||||
{ required: true, message: "请选择项目类型", trigger: "blur" }
|
{ required: true, message: "请选择项目类型", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
subjectName: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
subjectContent: [
|
subjectContent: [
|
||||||
{ required: true, message: "项目内容不能为空", trigger: "blur" }
|
{ required: true, message: "项目内容不能为空", trigger: "blur" },
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
enableFlag: [
|
enableFlag: [
|
||||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||||
@@ -348,7 +353,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('dv/dvsubject/export', {
|
this.download('mes/dv/dvsubject/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `dvsubject_${new Date().getTime()}.xlsx`)
|
}, `dvsubject_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
|
|||||||
80
src/views/mes/md/client/components/item.vue
Normal file
80
src/views/mes/md/client/components/item.vue
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-table v-loading="loading" :data="itemList">
|
||||||
|
<el-table-column label="物料编码" align="center" width="120px" prop="itemCode">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
>{{scope.row.itemCode}}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料名称" align="center" prop="itemName" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
||||||
|
<el-table-column label="入库数量" align="center" prop="quantityRecived" />
|
||||||
|
<el-table-column label="批次号" align="center" prop="batchCode" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getItem} from "@/api/mes/wm/productsalse";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Bom",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 产品BOM关系表格数据
|
||||||
|
itemList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
optType: undefined,
|
||||||
|
clientId: undefined
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList(this.clientId);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleView(row) {
|
||||||
|
this.$emit('handleSkip', row)
|
||||||
|
this.$router.push({
|
||||||
|
path: '/mes/md/item/form',
|
||||||
|
query: {
|
||||||
|
id: row.itemId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleOpen(vendorId) {
|
||||||
|
this.getList(vendorId)
|
||||||
|
},
|
||||||
|
/** 获取表格数据 */
|
||||||
|
getList(clientId) {
|
||||||
|
this.loading = true;
|
||||||
|
getItem(clientId).then(response => {
|
||||||
|
this.itemList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
90
src/views/mes/md/client/components/salesRecord.vue
Normal file
90
src/views/mes/md/client/components/salesRecord.vue
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-table v-loading="loading" :data="recordList">
|
||||||
|
<el-table-column label="出库单编号" width="150px" align="center" prop="salseCode" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
>{{scope.row.salseCode}}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="出库单名称" width="150px" align="center" prop="salseName" />
|
||||||
|
<el-table-column label="销售订单编号" width="120px" align="center" prop="soCode" />
|
||||||
|
<el-table-column label="客户编码" align="center" prop="clientCode" />
|
||||||
|
<el-table-column label="客户名称" align="center" prop="clientName" />
|
||||||
|
<el-table-column label="出库日期" align="center" prop="salseDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.salseDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="单据状态" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status"/>
|
||||||
|
</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 {getSaleRecord} from "@/api/mes/wm/productsalse";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "productsalseForm",
|
||||||
|
dicts: ['sys_yes_no','mes_item_product', 'mes_order_status'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 产品BOM关系表格数据
|
||||||
|
recordList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
optType: undefined,
|
||||||
|
clientId: undefined
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList(this.clientId);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleView(row) {
|
||||||
|
this.$emit('handleSkip', row)
|
||||||
|
this.$router.push({
|
||||||
|
path: '/mes/wm/saleOutbound/form',
|
||||||
|
query: {
|
||||||
|
id: row.salseId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleOpen(vendorId) {
|
||||||
|
this.getList(vendorId)
|
||||||
|
},
|
||||||
|
/** 获取表格数据 */
|
||||||
|
getList(clientId) {
|
||||||
|
this.loading = true;
|
||||||
|
getSaleRecord(clientId).then(response => {
|
||||||
|
this.recordList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -181,7 +181,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改客户对话框 -->
|
<!-- 添加或修改客户对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" @close="cancel" width="960px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@@ -345,9 +345,16 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<el-tabs type="border-card" v-model="activeName" v-if="optType != 'add'" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="产品清单" name="item">
|
||||||
|
<Item ref="itemList" @handleSkip="handleSkip" :optType="optType" :clientId="form.clientId"></Item>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="销售记录" name="salesRecord">
|
||||||
|
<SalesRecord ref="salesRecordList" @handleSkip="handleSkip" :optType="optType" :clientId="form.clientId"></SalesRecord>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
||||||
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -390,11 +397,15 @@
|
|||||||
import { listClient, getClient, delClient, addClient, updateClient } from "@/api/mes/md/client";
|
import { listClient, getClient, delClient, addClient, updateClient } from "@/api/mes/md/client";
|
||||||
import {genCode} from "@/api/system/autocode/rule"
|
import {genCode} from "@/api/system/autocode/rule"
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
|
import SalesRecord from "@/views/mes/md/client/components/salesRecord.vue";
|
||||||
|
import Item from "@/views/mes/md/client/components/item.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "Client",
|
name: "Client",
|
||||||
|
components: { Item, SalesRecord },
|
||||||
dicts: ['mes_client_type','sys_yes_no'],
|
dicts: ['mes_client_type','sys_yes_no'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
activeName: "item",
|
||||||
//自动生成编码
|
//自动生成编码
|
||||||
autoGenFlag:false,
|
autoGenFlag:false,
|
||||||
optType: undefined,
|
optType: undefined,
|
||||||
@@ -463,7 +474,44 @@ export default {
|
|||||||
{ required: true, message: "客户编码不能为空", trigger: "blur" }
|
{ required: true, message: "客户编码不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
clientName: [
|
clientName: [
|
||||||
{ required: true, message: "客户名称不能为空", trigger: "blur" }
|
{ required: true, message: "客户名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
clientNick: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
clientEn: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
address: [
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
website: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
tel: [
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
clientLogo: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
contact1: [
|
||||||
|
{ max: 32, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
contact1Tel: [
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
contact2: [
|
||||||
|
{ max: 32, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
contact2Tel: [
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
creditCode: [
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
clientDes: [
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
email:[
|
email:[
|
||||||
{
|
{
|
||||||
@@ -489,6 +537,9 @@ export default {
|
|||||||
enableFlag: [
|
enableFlag: [
|
||||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -496,6 +547,17 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleSkip() {
|
||||||
|
this.cancel()
|
||||||
|
},
|
||||||
|
handleClick(tab) {
|
||||||
|
if (tab.name === 'item') {
|
||||||
|
this.$refs.itemList.handleOpen(this.form.clientId)
|
||||||
|
}
|
||||||
|
if (tab.name === 'salesRecord') {
|
||||||
|
this.$refs.salesRecordList.handleOpen(this.form.clientId)
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 查询客户列表 */
|
/** 查询客户列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@@ -507,6 +569,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
|
this.activeName = "item"
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
@@ -578,6 +641,8 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "查看客户";
|
this.title = "查看客户";
|
||||||
this.optType = "view";
|
this.optType = "view";
|
||||||
|
this.activeName = 'item'
|
||||||
|
this.$refs.itemList.handleOpen(this.form.clientId)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
@@ -589,6 +654,8 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改客户";
|
this.title = "修改客户";
|
||||||
this.optType = "edit";
|
this.optType = "edit";
|
||||||
|
this.activeName = 'item'
|
||||||
|
this.$refs.itemList.handleOpen(this.form.clientId)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
@@ -623,7 +690,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('md/client/export', {
|
this.download('/mes/md/client/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `client_${new Date().getTime()}.xlsx`)
|
}, `client_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
|
|
||||||
<!-- 添加或修改物料分类对话框 -->
|
<!-- 添加或修改物料分类对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" v-if="form.parentTypeId !== 0">
|
<el-col :span="24" v-if="form.parentTypeId !== 0">
|
||||||
<el-form-item label="父分类" prop="parentTypeId">
|
<el-form-item label="父分类" prop="parentTypeId">
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="物料/产品">
|
<el-form-item label="物料/产品" prop="itemOrProduct">
|
||||||
<el-radio-group v-model="form.itemOrProduct">
|
<el-radio-group v-model="form.itemOrProduct">
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="dict in dict.type.mes_item_product"
|
v-for="dict in dict.type.mes_item_product"
|
||||||
|
|||||||
167
src/views/mes/md/mditem/components/batch.vue
Normal file
167
src/views/mes/md/mditem/components/batch.vue
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-save"
|
||||||
|
size="mini"
|
||||||
|
v-if="optType === 'add' || optType === 'edit'"
|
||||||
|
@click="submitForm"
|
||||||
|
v-hasPermi="['mes:md:batchconfig:update']"
|
||||||
|
>保存</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules">
|
||||||
|
<el-form-item prop="selectedAttributes">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-checkbox v-model="form.produceDateFlag" true-label="Y" false-label="N">生产日期</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-checkbox v-model="form.expireDateFlag" true-label="Y" false-label="N">有效期</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-checkbox v-model="form.recptDateFlag" true-label="Y" false-label="N">入库日期</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-checkbox v-model="form.vendorFlag" true-label="Y" false-label="N">供应商</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-checkbox v-model="form.clientFlag" true-label="Y" false-label="N">客户</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-checkbox v-model="form.coCodeFlag" true-label="Y" false-label="N">销售订单编号</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-checkbox v-model="form.poCodeFlag" true-label="Y" false-label="N">采购订单编号</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-checkbox v-model="form.workorderFlag" true-label="Y" false-label="N">生产工单</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-checkbox v-model="form.taskFlag" true-label="Y" false-label="N">生产任务</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-checkbox v-model="form.workstationFlag" true-label="Y" false-label="N">工作站</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-checkbox v-model="form.toolFlag" true-label="Y" false-label="N">工具</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-checkbox v-model="form.moldFlag" true-label="Y" false-label="N">模具</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-checkbox v-model="form.lotNumberFlag" true-label="Y" false-label="N">生产批号</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-checkbox v-model="form.qualityStatusFlag" true-label="Y" false-label="N">质量状态</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getBatchconfig, addBatchconfig, updateBatchconfig } from "@/api/mes/md/batchconfig";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Batchconfig",
|
||||||
|
props: {
|
||||||
|
itemId: null,
|
||||||
|
optType: null
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
// 表单参数
|
||||||
|
form: {
|
||||||
|
configId: null,
|
||||||
|
itemId: this.itemId,
|
||||||
|
produceDateFlag: 'N',
|
||||||
|
expireDateFlag: 'N',
|
||||||
|
recptDateFlag: 'N',
|
||||||
|
vendorFlag: 'N',
|
||||||
|
clientFlag: 'N',
|
||||||
|
coCodeFlag: 'N',
|
||||||
|
poCodeFlag: 'N',
|
||||||
|
workorderFlag: 'N',
|
||||||
|
taskFlag: 'N',
|
||||||
|
workstationFlag: 'N',
|
||||||
|
toolFlag: 'N',
|
||||||
|
moldFlag: 'N',
|
||||||
|
lotNumberFlag: 'N',
|
||||||
|
qualityStatusFlag: 'N'
|
||||||
|
},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
selectedAttributes: [
|
||||||
|
{ validator: this.checkSelectedAttributes, trigger: 'change' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getBatchconfig();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
checkSelectedAttributes(rule, value, callback) {
|
||||||
|
if (
|
||||||
|
this.form.produceDateFlag === 'N' &&
|
||||||
|
this.form.expireDateFlag === 'N' &&
|
||||||
|
this.form.recptDateFlag === 'N' &&
|
||||||
|
this.form.vendorFlag === 'N' &&
|
||||||
|
this.form.clientFlag === 'N' &&
|
||||||
|
this.form.coCodeFlag === 'N' &&
|
||||||
|
this.form.poCodeFlag === 'N' &&
|
||||||
|
this.form.workorderFlag === 'N' &&
|
||||||
|
this.form.taskFlag === 'N' &&
|
||||||
|
this.form.workstationFlag === 'N' &&
|
||||||
|
this.form.toolFlag === 'N' &&
|
||||||
|
this.form.moldFlag === 'N' &&
|
||||||
|
this.form.lotNumberFlag === 'N' &&
|
||||||
|
this.form.qualityStatusFlag === 'N'
|
||||||
|
) {
|
||||||
|
callback(
|
||||||
|
new Error("至少选择一个属性")
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 获取批次配置 */
|
||||||
|
getBatchconfig() {
|
||||||
|
getBatchconfig(this.itemId).then(response => {
|
||||||
|
if(response.data ){
|
||||||
|
this.form = response.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.configId != null) {
|
||||||
|
updateBatchconfig(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addBatchconfig(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<el-table-column label="物料编码" align="center" prop="bomItemCode" />
|
<el-table-column label="物料编码" align="center" prop="bomItemCode" />
|
||||||
<el-table-column label="物料名称" align="center" prop="bomItemName" :show-overflow-tooltip="true" />
|
<el-table-column label="物料名称" align="center" prop="bomItemName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="规格" align="center" prop="bomItemSpec" :show-overflow-tooltip="true" />
|
<el-table-column label="规格" align="center" prop="bomItemSpec" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="单位" width="60px" align="center" prop="unitOfMeasure" />
|
<el-table-column label="单位" width="60px" align="center" prop="unitName" />
|
||||||
<el-table-column label="使用比例" width="90px" align="center" prop="quantity" />
|
<el-table-column label="使用比例" width="90px" align="center" prop="quantity" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="optType !='view'">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="optType !='view'">
|
||||||
@@ -74,8 +74,8 @@
|
|||||||
<el-form-item label="BOM物料规格" prop="bomItemSpec">
|
<el-form-item label="BOM物料规格" prop="bomItemSpec">
|
||||||
<el-input v-model="form.bomItemSpec" readonly type="textarea" placeholder="请输入内容" />
|
<el-input v-model="form.bomItemSpec" readonly type="textarea" placeholder="请输入内容" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="BOM物料单位" prop="unitOfMeasure">
|
<el-form-item label="BOM物料单位" prop="unitName">
|
||||||
<el-input v-model="form.unitOfMeasure" readonly placeholder="请输入BOM物料单位" />
|
<el-input v-model="form.unitName" readonly placeholder="请输入BOM物料单位" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物料使用比例" prop="quantity">
|
<el-form-item label="物料使用比例" prop="quantity">
|
||||||
<el-input-number :precision="4" :step="0.1" :min="0" v-model="form.quantity" placeholder="请输入物料使用比例" />
|
<el-input-number :precision="4" :step="0.1" :min="0" v-model="form.quantity" placeholder="请输入物料使用比例" />
|
||||||
@@ -143,6 +143,9 @@ components: { ItemSelect },
|
|||||||
rules: {
|
rules: {
|
||||||
quantity: [
|
quantity: [
|
||||||
{ required: true, message: "物料使用比例不能为空", trigger: "blur" }
|
{ required: true, message: "物料使用比例不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -248,7 +251,7 @@ components: { ItemSelect },
|
|||||||
},
|
},
|
||||||
//物料选择弹出框
|
//物料选择弹出框
|
||||||
onItemSelected(obj){
|
onItemSelected(obj){
|
||||||
debugger;
|
console.log(obj, '-----obj----===')
|
||||||
this.form.itemId = this.itemId;
|
this.form.itemId = this.itemId;
|
||||||
if(obj != undefined && obj != null){
|
if(obj != undefined && obj != null){
|
||||||
obj.forEach(element => {
|
obj.forEach(element => {
|
||||||
@@ -258,6 +261,7 @@ components: { ItemSelect },
|
|||||||
this.form.bomItemSpec = element.specification;
|
this.form.bomItemSpec = element.specification;
|
||||||
this.form.unitOfMeasure = element.unitOfMeasure;
|
this.form.unitOfMeasure = element.unitOfMeasure;
|
||||||
this.form.itemOrProduct = element.itemOrProduct;
|
this.form.itemOrProduct = element.itemOrProduct;
|
||||||
|
this.form.unitName = element.unitName
|
||||||
this.form.quantity = 1;
|
this.form.quantity = 1;
|
||||||
this.form.enableFlag = 'Y';
|
this.form.enableFlag = 'Y';
|
||||||
var retFlag = false;
|
var retFlag = false;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
<el-card shadow="hover" :body-style="{pading: '10px'}">
|
<el-card shadow="hover" :body-style="{pading: '10px'}">
|
||||||
<el-popover>
|
<el-popover>
|
||||||
<img :src="sipList[index].sipUrl" slot="reference" class="image"/>
|
<img :src="sipList[index].sipUrl" slot="reference" class="image"/>
|
||||||
<el-image class="imagePreview" :src="sipList[index].sopUrl" :preview-src-list="imageList"></el-image>
|
<el-image class="imagePreview" :src="sipList[index].sipUrl" :preview-src-list="imageList"></el-image>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
<div style="text-align:center;padding-top:12px">
|
<div style="text-align:center;padding-top:12px">
|
||||||
<span>
|
<span>
|
||||||
|
|||||||
275
src/views/mes/md/mditem/form.vue
Normal file
275
src/views/mes/md/mditem/form.vue
Normal file
@@ -0,0 +1,275 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="14">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="16">
|
||||||
|
<el-form-item label="物料编码" prop="itemCode">
|
||||||
|
<el-input v-model="form.itemCode" readonly="readonly" maxlength="64" v-if="optType == 'view'"/>
|
||||||
|
<el-input v-model="form.itemCode" placeholder="请输入物料编码" maxlength="64" v-else/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<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-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="物料名称" prop="itemName">
|
||||||
|
<el-input v-model="form.itemName" maxlength="255" readonly="readonly" v-if="optType=='view'" />
|
||||||
|
<el-input v-model="form.itemName" placeholder="请输入物料名称" maxlength="255" v-else/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="规格型号" prop="specification">
|
||||||
|
<el-input v-model="form.specification" type="textarea" maxlength="500" readonly="readonly" v-if="optType=='view'" />
|
||||||
|
<el-input v-model="form.specification" type="textarea" placeholder="请输入规格型号" maxlength="500" v-else/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="单位" prop="unitOfMeasure">
|
||||||
|
<el-select v-model="form.unitOfMeasure" disabled v-if="optType=='view'">
|
||||||
|
<el-option
|
||||||
|
v-for="item in measureOptions"
|
||||||
|
:key="item.measureCode"
|
||||||
|
:label="item.measureName"
|
||||||
|
:value="item.measureCode"
|
||||||
|
:disabled="item.enableFlag == 'N'"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
<el-select v-model="form.unitOfMeasure" placeholder="请选择单位" v-else>
|
||||||
|
<el-option
|
||||||
|
v-for="item in measureOptions"
|
||||||
|
:key="item.measureCode"
|
||||||
|
:label="item.measureName"
|
||||||
|
:value="item.measureCode"
|
||||||
|
:disabled="item.enableFlag == 'N'"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<BarcodeImg ref="barcodeImg" :bussinessId="form.itemId" :bussinessCode="form.itemCode" barcodeType="ITEM"></BarcodeImg>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="14">
|
||||||
|
<el-form-item label="物料/产品分类" prop="itemTypeId">
|
||||||
|
<treeselect v-model="form.itemTypeId" :options="itemTypeOptions" :show-count="true" disabled v-if="optType=='view'" />
|
||||||
|
<treeselect v-model="form.itemTypeId" :options="itemTypeOptions" :show-count="true" placeholder="请选择所属分类" v-else :disable-branch-nodes="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item label="高价值/易被盗物品" label-width="150px" prop="highValue">
|
||||||
|
<el-checkbox v-model="form.highValue" :true-label="'Y'" :false-label="'N'"></el-checkbox>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否启用">
|
||||||
|
<el-radio-group v-model="form.enableFlag" disabled v-if="optType=='view'">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.sys_yes_no"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<el-radio-group v-model="form.enableFlag" v-else>
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.sys_yes_no"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="批次管理">
|
||||||
|
<el-switch
|
||||||
|
v-model="form.batchFlag"
|
||||||
|
active-text="是"
|
||||||
|
inactive-text="否"
|
||||||
|
active-value="Y"
|
||||||
|
inactive-value="N"
|
||||||
|
></el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="安全库存">
|
||||||
|
<el-radio-group v-model="form.safeStockFlag" disabled v-if="optType=='view'">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.sys_yes_no"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
|
||||||
|
<el-radio-group v-model="form.safeStockFlag" v-else>
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.sys_yes_no"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.safeStockFlag == 'Y'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="最小库存量">
|
||||||
|
<el-input-number v-model="form.minStock" :percision="2" :step="1" disabled v-if="optType=='view'" />
|
||||||
|
<el-input-number v-model="form.minStock" :percision="2" :step="1" placeholder="请输入最小安全库存量" v-else />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="最大库存量">
|
||||||
|
<el-input-number v-model="form.maxStock" :percision="2" :step="1" disabled v-if="optType=='view'" />
|
||||||
|
<el-input-number v-model="form.maxStock" :percision="2" :step="1" placeholder="请输入最大安全库存量" v-else/>
|
||||||
|
</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" readonly v-if="optType=='view'"></el-input>
|
||||||
|
<el-input v-model="form.remark" type="textarea" maxlength="500" placeholder="请输入内容" v-else></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<el-tabs type="border-card" v-if="form.itemId != null">
|
||||||
|
<el-tab-pane label="BOM组成">
|
||||||
|
<ItemBom :optType="optType" :itemId="form.itemId"></ItemBom>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane v-if="form.batchFlag =='Y'" label="批次属性">
|
||||||
|
<BatchConfig :itemId="form.itemId" :optType="optType"></BatchConfig>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="替代品"></el-tab-pane>
|
||||||
|
<el-tab-pane label="SIP">
|
||||||
|
<SIPTab :itemId="form.itemId" :optType="optType"></SIPTab>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="SOP">
|
||||||
|
<SOPTab :itemId="form.itemId" :optType="optType"></SOPTab>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import SOPTab from "@/views/mes/md/mditem/components/sop.vue";
|
||||||
|
import BarcodeImg from "@/components/barcodeImg/index.vue";
|
||||||
|
import SIPTab from "@/views/mes/md/mditem/components/sip.vue";
|
||||||
|
import ItemBom from "@/views/mes/md/mditem/components/itembom.vue";
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import BatchConfig from "./components/batch.vue";
|
||||||
|
import {genCode} from "@/api/system/autocode/rule";
|
||||||
|
import {listAllUnitmeasure} from "@/api/mes/md/unitmeasure";
|
||||||
|
import {treeselect} from "@/api/mes/md/itemtype";
|
||||||
|
import {getMdItem} from "@/api/mes/md/mdItem";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "itemForm",
|
||||||
|
components: {ItemBom, SIPTab, Treeselect, BarcodeImg, SOPTab, BatchConfig},
|
||||||
|
dicts: ['sys_yes_no','mes_item_product'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
itemId: '',
|
||||||
|
// 物料数据
|
||||||
|
form: {},
|
||||||
|
// 部门树选项
|
||||||
|
itemTypeOptions: undefined,
|
||||||
|
//单位列表
|
||||||
|
measureOptions: [],
|
||||||
|
//自动生成物料编码标识
|
||||||
|
autoGenFlag: false,
|
||||||
|
//弹框的操作类型 view add edit
|
||||||
|
optType: undefined,
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
itemCode: [
|
||||||
|
{ required: true, message: "物料/产品编码不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: '物料/产品编码长度必须小于64个字符', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
itemName: [
|
||||||
|
{ required: true, message: "物料/产品名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
unitOfMeasure: [
|
||||||
|
{ required: true, message: "单位不能为空",trigger: "blur"}
|
||||||
|
],
|
||||||
|
itemTypeId: [
|
||||||
|
{ required: true, message: "物料分类不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.itemId = this.$route.query.id
|
||||||
|
this.getMdItemForm(this.itemId)
|
||||||
|
this.getUnits()
|
||||||
|
this.getTreeselect()
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$route.query.id': {
|
||||||
|
handler(newVal, oldVal) {
|
||||||
|
if (newVal != undefined) {
|
||||||
|
this.itemId = newVal
|
||||||
|
this.getMdItemForm(this.itemId)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取
|
||||||
|
getMdItemForm(itemId) {
|
||||||
|
getMdItem(itemId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.optType = "view";
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.barcodeImg.getBarcode();
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询分类下拉树结构 */
|
||||||
|
getTreeselect() {
|
||||||
|
treeselect().then(response => {
|
||||||
|
this.itemTypeOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getUnits(){
|
||||||
|
listAllUnitmeasure().then(response =>{
|
||||||
|
this.measureOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//自动生成物料编码
|
||||||
|
handleAutoGenChange(autoGenFlag){
|
||||||
|
debugger;
|
||||||
|
if(autoGenFlag){
|
||||||
|
genCode('ITEM_CODE').then(response =>{
|
||||||
|
this.form.itemCode = response;
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.form.itemCode = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -329,9 +329,9 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" type="textarea" readonly v-if="optType=='view'"></el-input>
|
<el-input v-model="form.remark" type="textarea" readonly v-if="optType=='view'"></el-input>
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" v-else></el-input>
|
<el-input v-model="form.remark" type="textarea" maxlength="500" placeholder="请输入内容" v-else></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -340,7 +340,9 @@
|
|||||||
<el-tab-pane label="BOM组成">
|
<el-tab-pane label="BOM组成">
|
||||||
<ItemBom :optType="optType" :itemId="form.itemId"></ItemBom>
|
<ItemBom :optType="optType" :itemId="form.itemId"></ItemBom>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane v-if="form.batchFlag =='Y'" label="批次属性"></el-tab-pane>
|
<el-tab-pane v-if="form.batchFlag =='Y'" label="批次属性">
|
||||||
|
<BatchConfig :itemId="form.itemId" :optType="optType"></BatchConfig>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane label="替代品"></el-tab-pane>
|
<el-tab-pane label="替代品"></el-tab-pane>
|
||||||
<el-tab-pane label="SIP">
|
<el-tab-pane label="SIP">
|
||||||
<SIPTab :itemId="form.itemId" :optType="optType"></SIPTab>
|
<SIPTab :itemId="form.itemId" :optType="optType"></SIPTab>
|
||||||
@@ -350,8 +352,7 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
||||||
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
|
|
||||||
<el-button @click="cancel">关 闭</el-button>
|
<el-button @click="cancel">关 闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -403,10 +404,11 @@ import { getBarcodeUrl } from "@/api/mes/wm/barcode";
|
|||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
import BarcodeImg from "@/components/barcodeImg/index.vue"
|
import BarcodeImg from "@/components/barcodeImg/index.vue"
|
||||||
import printLabel from "@/components/printerLabel/index.vue"
|
import printLabel from "@/components/printerLabel/index.vue"
|
||||||
|
import BatchConfig from "./components/batch.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "MdItem",
|
name: "MdItem",
|
||||||
dicts: ['sys_yes_no','mes_item_product'],
|
dicts: ['sys_yes_no','mes_item_product'],
|
||||||
components: { Treeselect,ItemBom,SOPTab,SIPTab,BarcodeImg,printLabel },
|
components: { Treeselect,ItemBom,SOPTab,SIPTab,BarcodeImg,printLabel, BatchConfig },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@@ -501,6 +503,9 @@ export default {
|
|||||||
],
|
],
|
||||||
itemTypeId: [
|
itemTypeId: [
|
||||||
{ required: true, message: "物料分类不能为空", trigger: "blur" },
|
{ required: true, message: "物料分类不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -210,10 +210,12 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
measureCode: [
|
measureCode: [
|
||||||
{ required: true, message: "单位编码不能为空", trigger: "blur" }
|
{ required: true, message: "单位编码不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
measureName: [
|
measureName: [
|
||||||
{ required: true, message: "单位名称不能为空", trigger: "blur" }
|
{ required: true, message: "单位名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
primaryFlag: [
|
primaryFlag: [
|
||||||
{ required: true, message: "是否是主单位不能为空", trigger: "blur" }
|
{ required: true, message: "是否是主单位不能为空", trigger: "blur" }
|
||||||
@@ -221,6 +223,9 @@ export default {
|
|||||||
enableFlag: [
|
enableFlag: [
|
||||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
85
src/views/mes/md/vendor/components/item.vue
vendored
Normal file
85
src/views/mes/md/vendor/components/item.vue
vendored
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-table v-loading="loading" :data="itemList">
|
||||||
|
<el-table-column label="物料编码" align="center" width="120px" prop="itemCode">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
v-hasPermi="['mes:md:mditem:edit']"
|
||||||
|
>{{scope.row.itemCode}}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料名称" align="center" prop="itemName" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
||||||
|
<el-table-column label="入库数量" align="center" prop="quantityRecived" />
|
||||||
|
<el-table-column label="批次号" align="center" prop="batchCode" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getItem} from "@/api/mes/wm/itemrecpt";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Bom",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 物料数据
|
||||||
|
itemList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
optType: undefined,
|
||||||
|
vendorId: undefined
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList(this.vendorId);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleView(row) {
|
||||||
|
this.$emit('handleSkip', row)
|
||||||
|
this.$router.push({
|
||||||
|
path: '/mes/md/item/form',
|
||||||
|
query: {
|
||||||
|
id: row.itemId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleOpen(vendorId) {
|
||||||
|
this.getList(vendorId)
|
||||||
|
},
|
||||||
|
/** 获取表格数据 */
|
||||||
|
getList(vendorId) {
|
||||||
|
this.loading = true;
|
||||||
|
getItem(vendorId).then(response => {
|
||||||
|
this.itemList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 点击跳转按钮 */
|
||||||
|
handleSkip(row) {
|
||||||
|
this.$emit('handleSkip', row)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
83
src/views/mes/md/vendor/components/purchase.vue
vendored
Normal file
83
src/views/mes/md/vendor/components/purchase.vue
vendored
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-table v-loading="loading" :data="recordList">
|
||||||
|
<el-table-column label="入库编号" align="center" prop="recptCode" width="120px" :show-overflow-tooltip="true">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
>{{scope.row.recptCode}}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="入库名称" align="center" prop="recptName" />
|
||||||
|
<el-table-column label="采购订单号" align="center" prop="poCode" />
|
||||||
|
<el-table-column label="物料编码" align="center" prop="itemCode" width="120px" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="物料名称" align="center" prop="itemName" />
|
||||||
|
<el-table-column label="规格型号" align="center" prop="specification" />
|
||||||
|
<el-table-column label="单位" align="center" prop="unitOfMeasure" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="入库数量" align="center" prop="quantityRecived" :show-overflow-tooltip="true" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import {getProcurementRecord} from "@/api/mes/wm/itemrecpt";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Bom",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 产品BOM关系表格数据
|
||||||
|
recordList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
optType: undefined,
|
||||||
|
vendorId: undefined
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList(this.vendorId);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleView(row) {
|
||||||
|
this.$emit('handleSkip', row)
|
||||||
|
this.$router.push({
|
||||||
|
path: '/mes/wm/purchaseInventory/form',
|
||||||
|
query: {
|
||||||
|
id: row.recptId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleOpen(vendorId) {
|
||||||
|
this.getList(vendorId)
|
||||||
|
},
|
||||||
|
/** 获取表格数据 */
|
||||||
|
getList(vendorId) {
|
||||||
|
this.loading = true;
|
||||||
|
getProcurementRecord(vendorId).then(response => {
|
||||||
|
this.recordList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
87
src/views/mes/md/vendor/index.vue
vendored
87
src/views/mes/md/vendor/index.vue
vendored
@@ -181,7 +181,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改供应商对话框 -->
|
<!-- 添加或修改供应商对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" @close="cancel" width="960px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
@@ -356,9 +356,16 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<el-tabs type="border-card" v-model="activeName" v-if="optType != 'add'" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="物料清单" name="item">
|
||||||
|
<Item ref="itemList" @handleSkip="handleSkip" :optType="optType" :vendorId="form.vendorId"></Item>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="采购记录" name="purchase">
|
||||||
|
<Purchase ref="PurchaseList" @handleSkip="handleSkip" :optType="optType" :vendorId="form.vendorId"></Purchase>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
||||||
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -401,11 +408,15 @@ import { listVendor, getVendor, delVendor, addVendor, updateVendor } from "@/api
|
|||||||
import { getBarcodeUrl } from "@/api/mes/wm/barcode";
|
import { getBarcodeUrl } from "@/api/mes/wm/barcode";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import {genCode} from "@/api/system/autocode/rule"
|
import {genCode} from "@/api/system/autocode/rule"
|
||||||
|
import Item from "@/views/mes/md/vendor/components/item.vue";
|
||||||
|
import Purchase from "@/views/mes/md/vendor/components/purchase.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "Vendor",
|
name: "Vendor",
|
||||||
dicts: ['sys_yes_no','mes_vendor_level'],
|
dicts: ['sys_yes_no','mes_vendor_level'],
|
||||||
|
components: { Item, Purchase },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
activeName: "item",
|
||||||
//自动生成编码
|
//自动生成编码
|
||||||
autoGenFlag:false,
|
autoGenFlag:false,
|
||||||
optType: undefined,
|
optType: undefined,
|
||||||
@@ -479,14 +490,64 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
vendorCode: [
|
vendorCode: [
|
||||||
{ required: true, message: "供应商编码不能为空", trigger: "blur" }
|
{ required: true, message: "供应商编码不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
vendorName: [
|
vendorName: [
|
||||||
{ required: true, message: "供应商名称不能为空", trigger: "blur" }
|
{ required: true, message: "供应商名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
vendorNick: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
vendorEn: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
enableFlag: [
|
enableFlag: [
|
||||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
vendorDes: [
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
address: [
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
website: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
email: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
tel: [
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
contact1: [
|
||||||
|
{ max: 32, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
contact1Tel: [
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
contact1Email: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
contact2: [
|
||||||
|
{ max: 32, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
contact2Tel: [
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
contact2Email: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
creditCode: [
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
vendorLogo: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -494,6 +555,17 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleSkip() {
|
||||||
|
this.cancel()
|
||||||
|
},
|
||||||
|
handleClick(tab) {
|
||||||
|
if (tab.name == 'item') {
|
||||||
|
this.$refs.itemList.handleOpen(this.form.vendorId)
|
||||||
|
}
|
||||||
|
if (tab.name == 'purchase') {
|
||||||
|
this.$refs.PurchaseList.handleOpen(this.form.vendorId)
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 查询供应商列表 */
|
/** 查询供应商列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@@ -505,6 +577,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
|
this.activeName = "item"
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
@@ -579,7 +652,9 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "查看供应商";
|
this.title = "查看供应商";
|
||||||
this.optType = "view";
|
this.optType = "view";
|
||||||
|
this.activeName = "item"
|
||||||
this.getBarcodeUrl();
|
this.getBarcodeUrl();
|
||||||
|
this.$refs.itemList.handleOpen(vendorId)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
@@ -591,7 +666,9 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改供应商";
|
this.title = "修改供应商";
|
||||||
this.optType = "edit";
|
this.optType = "edit";
|
||||||
|
this.activeName = "item"
|
||||||
this.getBarcodeUrl();
|
this.getBarcodeUrl();
|
||||||
|
this.$refs.itemList.handleOpen(vendorId)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
|||||||
@@ -139,15 +139,16 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="面积" prop="area">
|
<el-form-item label="面积" prop="area">
|
||||||
<el-input-number :min="0" :percision="2" :step="1" v-model="form.area" placeholder="请输入面积" />
|
<el-input-number :min="0" :max="99999999" :percision="2" :step="1" v-model="form.area" placeholder="请输入面积" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="负责人" prop="charge">
|
<el-form-item label="负责人" prop="charge">
|
||||||
<el-input v-model="form.charge" placeholder="请输入负责人" />
|
<el-input v-model="form.charge" readonly @click.native="handleCharge" placeholder="请输入负责人" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<UserSingleSelect ref="userSelect" @onSelected="onUserSelected"></UserSingleSelect>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@@ -184,8 +185,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
||||||
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -197,8 +197,10 @@ import { listWorkshop, getWorkshop, delWorkshop, addWorkshop, updateWorkshop } f
|
|||||||
import {genCode} from "@/api/system/autocode/rule"
|
import {genCode} from "@/api/system/autocode/rule"
|
||||||
import BarcodeImg from "@/components/barcodeImg/index.vue"
|
import BarcodeImg from "@/components/barcodeImg/index.vue"
|
||||||
import {getBarcodeUrl} from "@/api/mes/wm/barcode";
|
import {getBarcodeUrl} from "@/api/mes/wm/barcode";
|
||||||
|
import {listUser} from "@/api/system/user";
|
||||||
|
import UserSingleSelect from "@/components/userSelect/single.vue";
|
||||||
export default {
|
export default {
|
||||||
components:{BarcodeImg},
|
components:{UserSingleSelect, BarcodeImg},
|
||||||
name: "Workshop",
|
name: "Workshop",
|
||||||
dicts: ['sys_yes_no'],
|
dicts: ['sys_yes_no'],
|
||||||
data() {
|
data() {
|
||||||
@@ -245,21 +247,40 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
workshopCode: [
|
workshopCode: [
|
||||||
{ required: true, message: "车间编码不能为空", trigger: "blur" }
|
{ required: true, message: "车间编码不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
workshopName: [
|
workshopName: [
|
||||||
{ required: true, message: "车间名称不能为空", trigger: "blur" }
|
{ required: true, message: "车间名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
charge: [
|
||||||
|
{ max: 32, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
enableFlag: [
|
enableFlag: [
|
||||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
}
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/** 选择用户 */
|
||||||
|
onUserSelected(val) {
|
||||||
|
if (val) {
|
||||||
|
this.form.charge = val.nickName
|
||||||
|
this.form.chargeId = val.userId
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 点击负责人输入框 */
|
||||||
|
handleCharge() {
|
||||||
|
this.$refs.userSelect.showFlag = true;
|
||||||
|
},
|
||||||
/** 查询车间列表 */
|
/** 查询车间列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
@@ -282,8 +282,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType !='view'">保 存</el-button>
|
||||||
<el-button type="primary" @click="submitForm" v-else>保 存</el-button>
|
|
||||||
<el-button @click="cancel">关 闭</el-button>
|
<el-button @click="cancel">关 闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -396,10 +395,15 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
workstationCode: [
|
workstationCode: [
|
||||||
{ required: true, message: "工作站编号不能为空", trigger: "blur" }
|
{ required: true, message: "工作站编号不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
workstationName: [
|
workstationName: [
|
||||||
{ required: true, message: "工作站名称不能为空", trigger: "blur" }
|
{ required: true, message: "工作站名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
workstationAddress: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
enableFlag: [
|
enableFlag: [
|
||||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||||
@@ -409,6 +413,9 @@ export default {
|
|||||||
],
|
],
|
||||||
processId: [
|
processId: [
|
||||||
{ required: true, message: "请选择所属工序", trigger: "blur" }
|
{ required: true, message: "请选择所属工序", trigger: "blur" }
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -253,7 +253,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="待检测数量" prop="quantityUncheck">
|
<el-form-item label="待检测数量" prop="quantityUncheck">
|
||||||
<el-input-number :min="0" @change="handleQuantityChanged" v-model="form.quantityUncheck" placeholder="请输入待检测数量" />
|
<el-input-number :min="0" :max="99999999" @change="handleQuantityChanged" v-model="form.quantityUncheck" placeholder="请输入待检测数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -294,11 +294,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<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="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">保 存</el-button>
|
||||||
<el-button type="primary" @click="handleSubmit" v-if="form.status =='PREPARE' && optType !='view' && form.recordId !=null ">提交审批</el-button>
|
<el-button type="primary" @click="handleSubmit" v-if="form.status =='PREPARE' && optType !='view' && form.recordId !=null ">提交审批</el-button>
|
||||||
<el-button type="success" @click="handleExecute" v-if="form.status =='APPROVING' && form.recordId !=null">审批通过</el-button>
|
<el-button type="success" @click="handleExecute" v-if="form.status =='APPROVING' && form.recordId !=null && form.recordNick == user.nickName">审批通过</el-button>
|
||||||
<el-button type="danger" @click="handleReject" v-if="form.status =='APPROVING' && form.recordId !=null">审批不通过</el-button>
|
<el-button type="danger" @click="handleReject" v-if="form.status =='APPROVING' && form.recordId !=null && form.recordNick == user.nickName">审批不通过</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -311,12 +310,14 @@ import WorkorderSelect from "@/components/workorderSelect/single.vue"
|
|||||||
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue"
|
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue"
|
||||||
import UserSingleSelect from "@/components/userSelect/single.vue"
|
import UserSingleSelect from "@/components/userSelect/single.vue"
|
||||||
import ProtaskSelect from "@/components/TaskSelect/taskSelectSingle.vue"
|
import ProtaskSelect from "@/components/TaskSelect/taskSelectSingle.vue"
|
||||||
|
import {getUserProfile} from "@/api/system/user";
|
||||||
export default {
|
export default {
|
||||||
name: "Feedback",
|
name: "Feedback",
|
||||||
components: {WorkorderSelect,WorkstationSelect,UserSingleSelect,ProtaskSelect},
|
components: {WorkorderSelect,WorkstationSelect,UserSingleSelect,ProtaskSelect},
|
||||||
dicts: ['mes_order_status', 'mes_feedback_type'],
|
dicts: ['mes_order_status', 'mes_feedback_type'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
user: {}, // 当前登录用户
|
||||||
optType: undefined,
|
optType: undefined,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
@@ -384,12 +385,18 @@ export default {
|
|||||||
],
|
],
|
||||||
feedbackTime: [
|
feedbackTime: [
|
||||||
{ required: true, message: "请选择报工时间", trigger: "blur"}
|
{ required: true, message: "请选择报工时间", trigger: "blur"}
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
getUserProfile().then(response => {
|
||||||
|
this.user = response.data;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询生产报工记录列表 */
|
/** 查询生产报工记录列表 */
|
||||||
@@ -575,7 +582,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//选择生产工单
|
//选择生产工单
|
||||||
handleWorkorderSelect(){
|
handleWorkorderSelect(){
|
||||||
this.$refs.woSelect.showFlag = true;
|
this.$refs.woSelect.handleOpen(this.form.workorderId)
|
||||||
},
|
},
|
||||||
onWorkorderSelected(row){
|
onWorkorderSelected(row){
|
||||||
if(row != undefined && row != null){
|
if(row != undefined && row != null){
|
||||||
@@ -590,8 +597,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleTaskSelect(){
|
handleTaskSelect(){
|
||||||
this.$refs.taskSelect.showFlag = true;
|
this.$refs.taskSelect.handleOpen(this.form.taskId)
|
||||||
this.$refs.taskSelect.getList();
|
|
||||||
},
|
},
|
||||||
onTaskSelected(row){
|
onTaskSelected(row){
|
||||||
debugger;
|
debugger;
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
<el-table-column label="产品物料编码" align="center" prop="itemCode" />
|
<el-table-column label="产品物料编码" align="center" prop="itemCode" />
|
||||||
<el-table-column label="产品物料名称" align="center" prop="itemName" />
|
<el-table-column label="产品物料名称" align="center" prop="itemName" />
|
||||||
<el-table-column label="规格型号" align="center" prop="specification" />
|
<el-table-column label="规格型号" align="center" prop="specification" />
|
||||||
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
<el-table-column label="单位" align="center" prop="unitName" />
|
||||||
<el-table-column label="流转数量" align="center" prop="quantityTransfered" />
|
<el-table-column label="流转数量" align="center" prop="quantityTransfered" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
|
|
||||||
<!-- 添加或修改工序流转卡对话框 -->
|
<!-- 添加或修改工序流转卡对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
||||||
<el-form ref="form" :model="form" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-row>
|
<el-row>
|
||||||
@@ -129,12 +129,12 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="产品编码" prop="itemCode">
|
<el-form-item label="产品编码" prop="itemCode">
|
||||||
<el-input v-model="form.itemCode" placeholder="请输入产品物料编码" />
|
<el-input v-model="form.itemCode" readonly placeholder="请输入产品物料编码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="产品名称" prop="itemName">
|
<el-form-item label="产品名称" prop="itemName">
|
||||||
<el-input v-model="form.itemName" placeholder="请输入产品物料名称" />
|
<el-input v-model="form.itemName" readonly placeholder="请输入产品物料名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -146,14 +146,14 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="流转数量" prop="quantityTransfered">
|
<el-form-item label="流转数量" prop="quantityTransfered">
|
||||||
<el-input v-model="form.quantityTransfered" placeholder="请输入流转数量" />
|
<el-input-number v-model="form.quantityTransfered" :max="99999999" :min="1" placeholder="请输入流转数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单位" prop="unitOfMeasure">
|
<el-form-item label="单位" prop="unitOfMeasure">
|
||||||
<el-input v-model="form.unitOfMeasure" placeholder="请输入单位" />
|
<el-input v-model="form.unitOfMeasure" readonly placeholder="请输入单位" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
<Procardprocess :cardId="form.cardId" :optType="optType"></Procardprocess>
|
<Procardprocess :cardId="form.cardId" :optType="optType"></Procardprocess>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType != 'view'">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -225,6 +225,25 @@ export default {
|
|||||||
cardCode: null, workorderId: null, workorderCode: null, workorderName: null, batchCode: null, itemId: null, itemCode: null, itemName: null, specification: null, unitOfMeasure: null, barcodeUrl: null, quantityTransfered: null, status: null, attr1: null, attr2: null, attr3: null, attr4: null, },
|
cardCode: null, workorderId: null, workorderCode: null, workorderName: null, batchCode: null, itemId: null, itemCode: null, itemName: null, specification: null, unitOfMeasure: null, barcodeUrl: null, quantityTransfered: null, status: null, attr1: null, attr2: null, attr3: null, attr4: null, },
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
cardCode: [
|
||||||
|
{ required: true, message: "请填写流转卡编号", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
workorderCode: [
|
||||||
|
{ required: true, message: "请选择生产工单", trigger: "blur" }
|
||||||
|
],
|
||||||
|
specification: [
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
batchCode: [
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -334,9 +353,10 @@ export default {
|
|||||||
},
|
},
|
||||||
//选择生产工单
|
//选择生产工单
|
||||||
handleWorkorderSelect(){
|
handleWorkorderSelect(){
|
||||||
this.$refs.woSelect.showFlag = true;
|
this.$refs.woSelect.handleOpen(this.form.workorderId)
|
||||||
},
|
},
|
||||||
onWorkorderSelected(row){
|
onWorkorderSelected(row){
|
||||||
|
console.log(row, '-----------------')
|
||||||
if(row != undefined && row != null){
|
if(row != undefined && row != null){
|
||||||
this.form.workorderId = row.workorderId;
|
this.form.workorderId = row.workorderId;
|
||||||
this.form.workorderCode = row.workorderCode;
|
this.form.workorderCode = row.workorderCode;
|
||||||
@@ -346,6 +366,7 @@ export default {
|
|||||||
this.form.itemName = row.productName;
|
this.form.itemName = row.productName;
|
||||||
this.form.specification = row.specification;
|
this.form.specification = row.specification;
|
||||||
this.form.unitOfMeasure = row.unitOfMeasure;
|
this.form.unitOfMeasure = row.unitOfMeasure;
|
||||||
|
this.form.unitName = row.unitName
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
<el-row >
|
<el-row >
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="顺序编号" prop="orderNum">
|
<el-form-item label="顺序编号" prop="orderNum">
|
||||||
<el-input-number :min="1" v-model="form.orderNum" placeholder="请输入顺序编号" />
|
<el-input-number :min="1" :max="999999" v-model="form.orderNum" placeholder="请输入顺序编号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|||||||
@@ -18,12 +18,19 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否启用" prop="enableFlag">
|
<el-form-item label="是否启用" prop="enableFlag">
|
||||||
<el-input
|
<el-select
|
||||||
v-model="queryParams.enableFlag"
|
v-model="queryParams.enableFlag"
|
||||||
placeholder="请输入是否启用"
|
placeholder="是否启用"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
style="width: 215px"
|
||||||
/>
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_yes_no"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
@@ -183,8 +190,7 @@
|
|||||||
<el-divider content-position="center" v-if="form.processId !=null">操作步骤</el-divider>
|
<el-divider content-position="center" v-if="form.processId !=null">操作步骤</el-divider>
|
||||||
<Processcontent v-if="form.processId !=null" :optType="optType" :processId="form.processId"></Processcontent>
|
<Processcontent v-if="form.processId !=null" :optType="optType" :processId="form.processId"></Processcontent>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
||||||
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -235,14 +241,22 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
processCode: [
|
processCode: [
|
||||||
{ required: true, message: "工序编码不能为空", trigger: "blur" }
|
{ required: true, message: "工序编码不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
processName: [
|
processName: [
|
||||||
{ required: true, message: "工序名称不能为空", trigger: "blur" }
|
{ required: true, message: "工序名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
attention: [
|
||||||
|
{ max: 500, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
enableFlag: [
|
enableFlag: [
|
||||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -190,8 +190,7 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
||||||
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -244,14 +243,22 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
routeCode: [
|
routeCode: [
|
||||||
{ required: true, message: "工艺路线编号不能为空", trigger: "blur" }
|
{ required: true, message: "工艺路线编号不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
routeName: [
|
routeName: [
|
||||||
{ required: true, message: "工艺路线名称不能为空", trigger: "blur" }
|
{ required: true, message: "工艺路线名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
enableFlag: [
|
enableFlag: [
|
||||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
routeDesc: [
|
||||||
|
{ max: 250, message: '字段过长', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
|
<el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
|
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
<el-table-column label="单位" align="center" prop="unitName" />
|
||||||
<el-table-column label="操作" align="center" v-if="optType !='view'" width="100px" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" v-if="optType !='view'" width="100px" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -129,8 +129,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="单位" prop="unitOfMeasure">
|
<el-form-item label="单位" prop="unitName">
|
||||||
<el-input v-model="form.unitOfMeasure" placeholder="请选择产品" disabled/>
|
<el-input v-model="form.unitName" placeholder="请选择产品" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -238,6 +238,9 @@ export default {
|
|||||||
rules: {
|
rules: {
|
||||||
itemId: [
|
itemId: [
|
||||||
{ required: true, message: "产品物料不能为空", trigger: "blur" }
|
{ required: true, message: "产品物料不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -280,6 +283,7 @@ export default {
|
|||||||
this.form.itemName = obj.itemName;
|
this.form.itemName = obj.itemName;
|
||||||
this.form.specification = obj.specification;
|
this.form.specification = obj.specification;
|
||||||
this.form.unitOfMeasure = obj.unitOfMeasure;
|
this.form.unitOfMeasure = obj.unitOfMeasure;
|
||||||
|
this.form.unitName = obj.unitName
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
@@ -402,7 +406,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('pro/routeproduct/export', {
|
this.download('mes/pro/routeproduct/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `routeproduct_${new Date().getTime()}.xlsx`)
|
}, `routeproduct_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="序号" prop="orderNum">
|
<el-form-item label="序号" prop="orderNum">
|
||||||
<el-input-number :min="1" v-model="form.orderNum" placeholder="请输入序号" />
|
<el-input-number :min="1" :max="999999" v-model="form.orderNum" placeholder="请输入序号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -186,13 +186,13 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="准备时间" prop="defaultPreTime">
|
<el-form-item label="准备时间" prop="defaultPreTime">
|
||||||
<el-tooltip effect="dark" content="当前系统支持的最小时间粒度为1小时" placement="right">
|
<el-tooltip effect="dark" content="当前系统支持的最小时间粒度为1小时" placement="right">
|
||||||
<el-input-number :min="0" :step="1" v-model="form.defaultPreTime" placeholder="请输入准备时间" />
|
<el-input-number :min="0" :max="99999999" :step="1" v-model="form.defaultPreTime" placeholder="请输入准备时间" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="等待时间" prop="defaultSufTime">
|
<el-form-item label="等待时间" prop="defaultSufTime">
|
||||||
<el-input-number :min="0" :step="1" v-model="form.defaultSufTime" placeholder="请输入等待时间" />
|
<el-input-number :min="0" :max="99999999" :step="1" v-model="form.defaultSufTime" placeholder="请输入等待时间" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -276,6 +276,9 @@ export default {
|
|||||||
],
|
],
|
||||||
isCheck: [
|
isCheck: [
|
||||||
{ required: true, message: "请指定当前工序是否需要质检确认", trigger: "blur" }
|
{ required: true, message: "请指定当前工序是否需要质检确认", trigger: "blur" }
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -264,7 +264,6 @@
|
|||||||
<ProTask :workorderId="form.workorderId" :routeId="item.routeId" :processId="item.processId" :colorCode="item.colorCode" :optType="optType"></ProTask>
|
<ProTask :workorderId="form.workorderId" :routeId="item.routeId" :processId="item.processId" :colorCode="item.colorCode" :optType="optType"></ProTask>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div slot="footer" class="dialog-footer">
|
<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="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.workorderId !=null">完成</el-button>
|
<el-button type="success" @click="handleFinish" v-if="form.status =='PREPARE' && optType !='view' && form.workorderId !=null">完成</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="排产数量" prop="quantity">
|
<el-form-item label="排产数量" prop="quantity">
|
||||||
<el-input-number :min="1" v-model="form.quantity" placeholder="请输入排产数量" />
|
<el-input-number :min="1" :max="99999999" v-model="form.quantity" placeholder="请输入排产数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="生产时长" prop="duration">
|
<el-form-item label="生产时长" prop="duration">
|
||||||
<el-input-number :min="1" :precision="0" :step="1" v-model="form.duration" @change="calculateEndTime" placeholder="请输入生产时长" />
|
<el-input-number :min="1" :max="99999999" :precision="0" :step="1" v-model="form.duration" @change="calculateEndTime" placeholder="请输入生产时长" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<el-table-column label="BOM物料编号" width="120" align="center" prop="itemCode" />
|
<el-table-column label="BOM物料编号" width="120" align="center" prop="itemCode" />
|
||||||
<el-table-column label="BOM物料名称" width="200" align="center" prop="itemName" :show-overflow-tooltip="true"/>
|
<el-table-column label="BOM物料名称" width="200" align="center" prop="itemName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="规格型号" align="center" prop="itemSpc" :show-overflow-tooltip="true"/>
|
<el-table-column label="规格型号" align="center" prop="itemSpc" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
<el-table-column label="单位" align="center" prop="unitName" />
|
||||||
<el-table-column label="物料/产品" align="center" prop="itemOrProduct" >
|
<el-table-column label="物料/产品" align="center" prop="itemOrProduct" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.mes_item_product" :value="scope.row.itemOrProduct"/>
|
<dict-tag :options="dict.type.mes_item_product" :value="scope.row.itemOrProduct"/>
|
||||||
@@ -157,7 +157,6 @@ export default {
|
|||||||
this.workorderbomList = response.rows;
|
this.workorderbomList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
console.log(this.form,'160')
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
|
|||||||
@@ -159,7 +159,7 @@
|
|||||||
<el-table-column label="产品编号" width="120" align="center" prop="productCode" />
|
<el-table-column label="产品编号" width="120" align="center" prop="productCode" />
|
||||||
<el-table-column label="产品名称" width="200" align="center" prop="productName" :show-overflow-tooltip="true"/>
|
<el-table-column label="产品名称" width="200" align="center" prop="productName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="规格型号" align="center" prop="productSpc" :show-overflow-tooltip="true"/>
|
<el-table-column label="规格型号" align="center" prop="productSpc" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
<el-table-column label="单位" align="center" prop="unitName" />
|
||||||
<el-table-column label="工单数量" align="center" prop="quantity" />
|
<el-table-column label="工单数量" align="center" prop="quantity" />
|
||||||
<el-table-column label="调整数量" align="center" prop="quantityChanged" />
|
<el-table-column label="调整数量" align="center" prop="quantityChanged" />
|
||||||
<el-table-column label="已生产数量" align="center" width="100px" prop="quantityProduced" />
|
<el-table-column label="已生产数量" align="center" width="100px" prop="quantityProduced" />
|
||||||
@@ -228,7 +228,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改生产工单对话框 -->
|
<!-- 添加或修改生产工单对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="960px" @close="cancel" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
@@ -321,15 +321,15 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单位" prop="unitOfMeasure">
|
<el-form-item label="单位" prop="unitName">
|
||||||
<el-input v-model="form.unitOfMeasure" placeholder="请选择产品" disabled/>
|
<el-input v-model="form.unitName" placeholder="请选择产品" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="工单数量" prop="quantity">
|
<el-form-item label="工单数量" prop="quantity">
|
||||||
<el-input-number :min="1" v-model="form.quantity" placeholder="请输入生产数量" />
|
<el-input-number :min="1" :max="99999999" v-model="form.quantity" placeholder="请输入生产数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@@ -393,16 +393,15 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-tabs type="border-card" v-if="form.workorderId != null">
|
<el-tabs type="border-card" v-if="form.workorderId != null" v-model="activeName" @tab-click="handleClickTab">
|
||||||
<el-tab-pane label="BOM组成">
|
<el-tab-pane label="BOM组成" name="bom">
|
||||||
<Workorderbom ref="bomlist" :optType="optType" :workorder="form" @handleAddSub="handleSubAdd" ></Workorderbom>
|
<Workorderbom ref="bomlist" :optType="optType" :workorder="form" @handleAddSub="handleSubAdd" ></Workorderbom>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="物料需求">
|
<el-tab-pane label="物料需求" name="item">
|
||||||
|
<WorkorderItemList ref="itemlist" :workorder="form" :itemStatus="itemStatus"></WorkorderItemList>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div slot="footer" class="dialog-footer">
|
<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="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">保 存</el-button>
|
||||||
<el-button type="success" @click="handleConfirm" v-if="form.status =='PREPARE' && optType !='view' && form.workorderId !=null">确 认</el-button>
|
<el-button type="success" @click="handleConfirm" v-if="form.status =='PREPARE' && optType !='view' && form.workorderId !=null">确 认</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
@@ -437,6 +436,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
itemStatus: false,
|
||||||
|
activeName: 'bom',
|
||||||
//自动生成编码
|
//自动生成编码
|
||||||
autoGenFlag:false,
|
autoGenFlag:false,
|
||||||
optType: undefined,
|
optType: undefined,
|
||||||
@@ -485,13 +486,19 @@ export default {
|
|||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
formStatus: "parent",
|
||||||
|
// 生成工单后的表单
|
||||||
|
secondaryForm: {},
|
||||||
|
primaryForm: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
workorderCode: [
|
workorderCode: [
|
||||||
{ required: true, message: "工单编码不能为空", trigger: "blur" }
|
{ required: true, message: "工单编码不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
workorderName: [
|
workorderName: [
|
||||||
{ required: true, message: "工单名称不能为空", trigger: "blur" }
|
{ required: true, message: "工单名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
workorderType: [
|
workorderType: [
|
||||||
{ required: true, message: "请选择生产工单类型", trigger: "blur" }
|
{ required: true, message: "请选择生产工单类型", trigger: "blur" }
|
||||||
@@ -514,6 +521,9 @@ export default {
|
|||||||
requestDate: [
|
requestDate: [
|
||||||
{ required: true, message: "需求日期不能为空", trigger: "blur" }
|
{ required: true, message: "需求日期不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -521,6 +531,13 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClickTab(tab) {
|
||||||
|
if (tab.name == 'item') {
|
||||||
|
this.itemStatus = true
|
||||||
|
} else {
|
||||||
|
this.itemStatus = false
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 查询生产工单列表 */
|
/** 查询生产工单列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@@ -552,8 +569,26 @@ export default {
|
|||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
if (this.formStatus == 'parent') {
|
||||||
this.reset();
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
} else {
|
||||||
|
this.reset()
|
||||||
|
this.formStatus = 'parent'
|
||||||
|
this.getTreeselect();
|
||||||
|
const workorderId = this.primaryForm.workorderId;
|
||||||
|
getWorkorder(workorderId).then(response => {
|
||||||
|
this.form = response.data
|
||||||
|
this.open = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.barcodeImg.getBarcode();
|
||||||
|
|
||||||
|
})
|
||||||
|
this.title = "查看工单信息";
|
||||||
|
this.optType = "view";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
@@ -602,6 +637,8 @@ export default {
|
|||||||
},
|
},
|
||||||
//从BOM行中直接新增
|
//从BOM行中直接新增
|
||||||
handleSubAdd(row){
|
handleSubAdd(row){
|
||||||
|
this.primaryForm = this.form
|
||||||
|
this.formStatus = "child"
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
@@ -644,7 +681,6 @@ export default {
|
|||||||
this.form = response.data
|
this.form = response.data
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
console.log("2232",this.$refs.barcodeImg)
|
|
||||||
this.$refs.barcodeImg.getBarcode();
|
this.$refs.barcodeImg.getBarcode();
|
||||||
|
|
||||||
})
|
})
|
||||||
@@ -662,7 +698,6 @@ export default {
|
|||||||
getWorkorder(row.workorderId).then(response => {
|
getWorkorder(row.workorderId).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
|
||||||
console.log("3232",this.form)
|
|
||||||
this.form.workorderCode = response.data.workorderCode
|
this.form.workorderCode = response.data.workorderCode
|
||||||
this.form.workorderId = response.data.workorderId
|
this.form.workorderId = response.data.workorderId
|
||||||
this.open = true;
|
this.open = true;
|
||||||
@@ -706,7 +741,7 @@ export default {
|
|||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
handleSelectProduct(){
|
handleSelectProduct(){
|
||||||
this.$refs.itemSelect.showFlag = true;
|
this.$refs.itemSelect.handleOpen(this.form.productId)
|
||||||
},
|
},
|
||||||
handleSelectClient(){
|
handleSelectClient(){
|
||||||
this.$refs.clientSelect.showFlag = true;
|
this.$refs.clientSelect.showFlag = true;
|
||||||
@@ -735,12 +770,14 @@ export default {
|
|||||||
},
|
},
|
||||||
//物料选择弹出框
|
//物料选择弹出框
|
||||||
onItemSelected(obj){
|
onItemSelected(obj){
|
||||||
|
console.log(obj, '----------------')
|
||||||
if(obj != undefined && obj != null){
|
if(obj != undefined && obj != null){
|
||||||
this.form.productId = obj.itemId;
|
this.form.productId = obj.itemId;
|
||||||
this.form.productCode = obj.itemCode;
|
this.form.productCode = obj.itemCode;
|
||||||
this.form.productName = obj.itemName;
|
this.form.productName = obj.itemName;
|
||||||
this.form.productSpc = obj.specification;
|
this.form.productSpc = obj.specification;
|
||||||
this.form.unitOfMeasure = obj.unitName;
|
this.form.unitOfMeasure = obj.unitOfMeasure;
|
||||||
|
this.form.unitName = obj.unitName;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//客户选择弹出框
|
//客户选择弹出框
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
<el-table v-loading="loading" :data="productBomList">
|
||||||
<el-table v-loading="loading" :data="productBomList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="物料编号" width="120" align="center" prop="bomItemCode" />
|
<el-table-column label="物料编号" width="120" align="center" prop="bomItemCode" />
|
||||||
<el-table-column label="物料名称" width="200" align="center" prop="bomItemName" :show-overflow-tooltip="true"/>
|
<el-table-column label="物料名称" width="200" align="center" prop="bomItemName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="规格型号" align="center" prop="bomItemSpec" :show-overflow-tooltip="true"/>
|
<el-table-column label="规格型号" align="center" prop="bomItemSpec" :show-overflow-tooltip="true"/>
|
||||||
@@ -32,9 +30,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: false,
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
@@ -66,11 +62,21 @@
|
|||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
optType: undefined,
|
optType: undefined,
|
||||||
workorder: undefined
|
workorder: undefined,
|
||||||
|
itemStatus: undefined
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
itemStatus: {
|
||||||
|
handler(newVal, oldVal) {
|
||||||
|
if (newVal) {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询生产工单BOM组成列表 */
|
/** 查询生产工单BOM组成列表 */
|
||||||
getList() {
|
getList() {
|
||||||
@@ -79,7 +85,6 @@
|
|||||||
this.queryParams.productId = this.workorder.productId;
|
this.queryParams.productId = this.workorder.productId;
|
||||||
this.queryParams.quantity = this.workorder.quantity;
|
this.queryParams.quantity = this.workorder.quantity;
|
||||||
listItems(this.queryParams).then(response => {
|
listItems(this.queryParams).then(response => {
|
||||||
debugger;
|
|
||||||
this.productBomList = response.rows;
|
this.productBomList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@@ -88,4 +93,3 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
<el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" />
|
<el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" />
|
||||||
<el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
|
<el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
|
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
<el-table-column label="单位" align="center" prop="unitName" />
|
||||||
<el-table-column label="检测数量" align="center" prop="quantityCheck" />
|
<el-table-column label="检测数量" align="center" prop="quantityCheck" />
|
||||||
<el-table-column label="检测结果" align="center" prop="checkResult" >
|
<el-table-column label="检测结果" align="center" prop="checkResult" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -244,7 +244,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="检测数量" prop="quantityCheck">
|
<el-form-item label="检测数量" prop="quantityCheck">
|
||||||
<el-input v-model="form.quantityCheck" placeholder="请输入检测数量" />
|
<el-input-number v-model="form.quantityCheck" :max="99999999" placeholder="请输入检测数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -265,8 +265,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="单位" prop="unitOfMeasure">
|
<el-form-item label="单位" prop="unitName">
|
||||||
<el-input v-model="form.unitOfMeasure" placeholder="请输入单位" />
|
<el-input v-model="form.unitName" placeholder="请输入单位" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -302,29 +302,29 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="不合格数" prop="quantityUnqualified">
|
<el-form-item label="不合格数" prop="quantityUnqualified">
|
||||||
<el-input v-model="form.quantityUnqualified" placeholder="请输入不合格数" />
|
<el-input-number v-model="form.quantityUnqualified" :max="99999999" placeholder="请输入不合格数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="合格品数量" prop="quantityQualified">
|
<el-form-item label="合格品数量" prop="quantityQualified">
|
||||||
<el-input v-model="form.quantityQualified" placeholder="请输入合格品数量" />
|
<el-input-number v-model="form.quantityQualified" :max="99999999" placeholder="请输入合格品数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="致命缺陷数量" prop="crQuantity">
|
<el-form-item label="致命缺陷数量" prop="crQuantity">
|
||||||
<el-input v-model="form.crQuantity" placeholder="请输入致命缺陷数量" />
|
<el-input-number v-model="form.crQuantity" :max="99999999" placeholder="请输入致命缺陷数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="严重缺陷数量" prop="majQuantity">
|
<el-form-item label="严重缺陷数量" prop="majQuantity">
|
||||||
<el-input v-model="form.majQuantity" placeholder="请输入严重缺陷数量" />
|
<el-input-number v-model="form.majQuantity" :max="99999999" placeholder="请输入严重缺陷数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="轻微缺陷数量" prop="minQuantity">
|
<el-form-item label="轻微缺陷数量" prop="minQuantity">
|
||||||
<el-input v-model="form.minQuantity" placeholder="请输入轻微缺陷数量" />
|
<el-input-number v-model="form.minQuantity" :max="99999999" placeholder="请输入轻微缺陷数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -377,7 +377,6 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div slot="footer" class="dialog-footer">
|
<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="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.ipqcId !=null">完成</el-button>
|
<el-button type="success" @click="handleFinish" v-if="form.status =='PREPARE' && optType !='view' && form.ipqcId !=null">完成</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
@@ -487,8 +486,10 @@ export default {
|
|||||||
|
|
||||||
quantityQualified: [
|
quantityQualified: [
|
||||||
{ required: true, message: "合格品数量不能为空", trigger: "blur" }
|
{ required: true, message: "合格品数量不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -613,14 +614,14 @@ export default {
|
|||||||
if (this.form.ipqcId != null) {
|
if (this.form.ipqcId != null) {
|
||||||
updateIpqc(this.form).then(response => {
|
updateIpqc(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
//this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addIpqc(this.form).then(response => {
|
addIpqc(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.form.ipqcId = response.data; //将返回的ID保存
|
this.form.ipqcId = response.data; //将返回的ID保存
|
||||||
//this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -638,7 +639,7 @@ export default {
|
|||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$modal.confirm('是否完成检验单编制?【完成后将不能更改】').then(function(){
|
this.$modal.confirm('是否完成检验单编制?【完成后将不能更改】').then(function(){
|
||||||
that.form.status = 'CONFIRMED';
|
that.form.status = 'FINISHED';
|
||||||
that.submitForm();
|
that.submitForm();
|
||||||
that.open = false;
|
that.open = false;
|
||||||
});
|
});
|
||||||
@@ -658,17 +659,16 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('qc/ipqc/export', {
|
this.download('mes/qc/ipqc/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `ipqc_${new Date().getTime()}.xlsx`)
|
}, `ipqc_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
//选择生产工单
|
//选择生产工单
|
||||||
handleWorkorderSelect(){
|
handleWorkorderSelect(){
|
||||||
this.$refs.woSelect.showFlag = true;
|
this.$refs.woSelect.handleOpen(this.form.workorderId)
|
||||||
},
|
},
|
||||||
onWorkorderSelected(row){
|
onWorkorderSelected(row){
|
||||||
if(row != undefined && row != null){
|
if(row != undefined && row != null){
|
||||||
debugger;
|
|
||||||
this.form.workorderId = row.workorderId;
|
this.form.workorderId = row.workorderId;
|
||||||
this.form.workorderCode = row.workorderCode;
|
this.form.workorderCode = row.workorderCode;
|
||||||
this.form.workorderName = row.workorderName;
|
this.form.workorderName = row.workorderName;
|
||||||
@@ -677,11 +677,12 @@ export default {
|
|||||||
this.form.itemName = row.productName;
|
this.form.itemName = row.productName;
|
||||||
this.form.specification = row.productSpc;
|
this.form.specification = row.productSpc;
|
||||||
this.form.unitOfMeasure = row.unitOfMeasure;
|
this.form.unitOfMeasure = row.unitOfMeasure;
|
||||||
|
this.form.unitName = row.unitName
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleWorkstationSelect(){
|
handleWorkstationSelect(){
|
||||||
this.$refs.wsSelect.showFlag = true;
|
this.$refs.wsSelect.handleOpen(this.form.workstationId)
|
||||||
},
|
},
|
||||||
onWorkstationSelected(row){
|
onWorkstationSelected(row){
|
||||||
if(row != undefined && row != null){
|
if(row != undefined && row != null){
|
||||||
@@ -693,7 +694,7 @@ export default {
|
|||||||
//自动生成编码
|
//自动生成编码
|
||||||
handleAutoGenChange(autoGenFlag){
|
handleAutoGenChange(autoGenFlag){
|
||||||
if(autoGenFlag){
|
if(autoGenFlag){
|
||||||
genCode('IPQC_CODE').then(response =>{
|
genCode('QC_IPQC_CODE').then(response =>{
|
||||||
this.form.ipqcCode = response;
|
this.form.ipqcCode = response;
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -262,8 +262,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="单位" prop="unitOfMeasure">
|
<el-form-item label="单位" prop="unitName">
|
||||||
<el-input v-model="form.unitOfMeasure" readonly="readonly" />
|
<el-input v-model="form.unitName" readonly="readonly" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -291,21 +291,21 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="本次接收数量" prop="quantityRecived">
|
<el-form-item label="本次接收数量" prop="quantityRecived">
|
||||||
<el-input-number :min="1" v-model="form.quantityRecived" placeholder="请输入本次接收数量" />
|
<el-input-number :min="1" :max="99999999" v-model="form.quantityRecived" placeholder="请输入本次接收数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="合格品数量" prop="quantityQualified">
|
<el-form-item label="合格品数量" prop="quantityQualified">
|
||||||
<el-input :min="0" v-model="form.quantityQualified" placeholder="请输入合格品数量" />
|
<el-input-number :min="0" :max="99999999" v-model="form.quantityQualified" placeholder="请输入合格品数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="不合格数量" prop="quantityUnqualified">
|
<el-form-item label="不合格数量" prop="quantityUnqualified">
|
||||||
<el-input-number :min="0" v-model="form.quantityUnqualified" placeholder="请输入不合格数" />
|
<el-input-number :min="0" :max="99999999" v-model="form.quantityUnqualified" placeholder="请输入不合格数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="来料日期" prop="reciveDate">
|
<el-form-item label="来料日期" prop="reciveDate">
|
||||||
<el-date-picker clearable
|
<el-date-picker clearable
|
||||||
@@ -394,7 +394,6 @@
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<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="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.iqcId !=null">完成</el-button>
|
<el-button type="success" @click="handleFinish" v-if="form.status =='PREPARE' && optType !='view' && form.iqcId !=null">完成</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
@@ -501,6 +500,9 @@ export default {
|
|||||||
],
|
],
|
||||||
inspectDate:[
|
inspectDate:[
|
||||||
{ required: true, message: "清选择检验日期", trigger: "blur" }
|
{ required: true, message: "清选择检验日期", trigger: "blur" }
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -616,6 +618,26 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
// 判断接收总数与合格不合格数之间的校验
|
||||||
|
if (this.form.quantityQualified != '' && this.form.quantityQualified != undefined && this.form.quantityQualified != 0
|
||||||
|
&& this.form.quantityUnqualified != '' && this.form.quantityUnqualified != undefined && this.form.quantityUnqualified != 0) {
|
||||||
|
if ((this.form.quantityQualified + this.form.quantityUnqualified) != this.form.quantityRecived) {
|
||||||
|
this.$message.warning("合格数与不合格数之和必须等于接收总数!");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.form.quantityQualified != '' && this.form.quantityQualified != undefined) {
|
||||||
|
if (this.form.quantityQualified > this.form.quantityRecived) {
|
||||||
|
this.$message.warning("合格数不能大于接收总数!");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.form.quantityUnqualified != '' && this.form.quantityUnqualified != undefined) {
|
||||||
|
if (this.form.quantityUnqualified > this.form.quantityRecived) {
|
||||||
|
this.$message.warning("不合格数不能大于接收总数!");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.iqcId != null) {
|
if (this.form.iqcId != null) {
|
||||||
@@ -665,7 +687,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('qc/iqc/export', {
|
this.download('mes/qc/iqc/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `iqc_${new Date().getTime()}.xlsx`)
|
}, `iqc_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
@@ -681,6 +703,7 @@ export default {
|
|||||||
this.form.itemName = obj.itemName;
|
this.form.itemName = obj.itemName;
|
||||||
this.form.specification = obj.specification;
|
this.form.specification = obj.specification;
|
||||||
this.form.unitOfMeasure = obj.unitOfMeasure;
|
this.form.unitOfMeasure = obj.unitOfMeasure;
|
||||||
|
this.form.unitName = obj.unitName
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSelectVendor(){
|
handleSelectVendor(){
|
||||||
|
|||||||
@@ -265,17 +265,17 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="发货数量" prop="quantityOut">
|
<el-form-item label="发货数量" prop="quantityOut">
|
||||||
<el-input-number :min="1" v-model="form.quantityOut" placeholder="请输入发货数量" />
|
<el-input-number :min="1" :max="99999999" v-model="form.quantityOut" placeholder="请输入发货数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="检测数量" prop="quantityCheck">
|
<el-form-item label="检测数量" prop="quantityCheck">
|
||||||
<el-input-number :min="1" v-model="form.quantityCheck" placeholder="请输入本次检测数量" />
|
<el-input-number :min="1" :max="99999999" v-model="form.quantityCheck" placeholder="请输入本次检测数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="不合格数量" prop="quantityUnqualified">
|
<el-form-item label="不合格数量" prop="quantityUnqualified">
|
||||||
<el-input-number :min="0" readonly="readonly" v-model="form.quantityUnqualified" />
|
<el-input-number :min="0" :max="99999999" readonly="readonly" v-model="form.quantityUnqualified" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -370,7 +370,6 @@
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<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="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.oqcId !=null">完成</el-button>
|
<el-button type="success" @click="handleFinish" v-if="form.status =='PREPARE' && optType !='view' && form.oqcId !=null">完成</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
@@ -474,6 +473,9 @@ export default {
|
|||||||
inspectDate: [
|
inspectDate: [
|
||||||
{ required: true, message: "请选择检测日期", trigger: "blur" }
|
{ required: true, message: "请选择检测日期", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -635,7 +637,7 @@ export default {
|
|||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
handleSelectProduct(){
|
handleSelectProduct(){
|
||||||
this.$refs.itemSelect.showFlag = true;
|
this.$refs.itemSelect.handleOpen(this.form.itemId)
|
||||||
},
|
},
|
||||||
//物料选择弹出框
|
//物料选择弹出框
|
||||||
onItemSelected(obj){
|
onItemSelected(obj){
|
||||||
@@ -648,7 +650,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSelectClient(){
|
handleSelectClient(){
|
||||||
this.$refs.clientSelect.showFlag = true;
|
this.$refs.clientSelect.handleOpen(this.form.clientId)
|
||||||
},
|
},
|
||||||
//客户选择弹出框
|
//客户选择弹出框
|
||||||
onClientSelected(obj){
|
onClientSelected(obj){
|
||||||
@@ -667,7 +669,7 @@ export default {
|
|||||||
//自动生成编码
|
//自动生成编码
|
||||||
handleAutoGenChange(autoGenFlag){
|
handleAutoGenChange(autoGenFlag){
|
||||||
if(autoGenFlag){
|
if(autoGenFlag){
|
||||||
genCode('OQC_CODE').then(response =>{
|
genCode('QC_OQC_CODE').then(response =>{
|
||||||
this.form.oqcCode = response;
|
this.form.oqcCode = response;
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
v-if="scope.row.qcType == 'PQC'"
|
v-if="scope.row.qcType == 'IPQC'"
|
||||||
@click="handleAddPQC(scope.row)"
|
@click="handleAddPQC(scope.row)"
|
||||||
v-hasPermi="['mes:qc:ipqc:edit']"
|
v-hasPermi="['mes:qc:ipqc:edit']"
|
||||||
>过程检验</el-button>
|
>过程检验</el-button>
|
||||||
|
|||||||
@@ -117,29 +117,29 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="不合格数" prop="quantityUnqualified">
|
<el-form-item label="不合格数" prop="quantityUnqualified">
|
||||||
<el-input v-model="form.quantityUnqualified" placeholder="请输入不合格数" />
|
<el-input-number v-model="form.quantityUnqualified" :max="99999999" placeholder="请输入不合格数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="合格品数量" prop="quantityQualified">
|
<el-form-item label="合格品数量" prop="quantityQualified">
|
||||||
<el-input v-model="form.quantityQualified" placeholder="请输入合格品数量" />
|
<el-input-number v-model="form.quantityQualified" :max="99999999" placeholder="请输入合格品数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="致命缺陷数量" prop="crQuantity">
|
<el-form-item label="致命缺陷数量" prop="crQuantity">
|
||||||
<el-input v-model="form.crQuantity" placeholder="请输入致命缺陷数量" />
|
<el-input-number v-model="form.crQuantity" :max="99999999" placeholder="请输入致命缺陷数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="严重缺陷数量" prop="majQuantity">
|
<el-form-item label="严重缺陷数量" prop="majQuantity">
|
||||||
<el-input v-model="form.majQuantity" placeholder="请输入严重缺陷数量" />
|
<el-input-number v-model="form.majQuantity" :max="99999999" placeholder="请输入严重缺陷数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="轻微缺陷数量" prop="minQuantity">
|
<el-form-item label="轻微缺陷数量" prop="minQuantity">
|
||||||
<el-input v-model="form.minQuantity" placeholder="请输入轻微缺陷数量" />
|
<el-input-number v-model="form.minQuantity" :max="99999999" placeholder="请输入轻微缺陷数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -228,33 +228,46 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
ipqcCode: [
|
ipqcCode: [
|
||||||
{ required: true, message: "请输入或生产检验单编号", trigger: "blur" }
|
{ required: true, message: "请输入或生产检验单编号", trigger: "blur" },
|
||||||
],
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
ipqcType: [
|
],
|
||||||
|
ipqcName: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
specification: [
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
processCode: [
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
processName: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
inspector: [
|
||||||
|
{ max: 32, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
ipqcType: [
|
||||||
{ required: true, message: "请选择检验类型", trigger: "change" }
|
{ required: true, message: "请选择检验类型", trigger: "change" }
|
||||||
],
|
],
|
||||||
|
workorderCode: [
|
||||||
workorderCode: [
|
|
||||||
{ required: true, message: "请选择生产工单", trigger: "blur" }
|
{ required: true, message: "请选择生产工单", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
workstationCode: [
|
||||||
workstationCode: [
|
|
||||||
{ required: true, message: "请选择工作站", trigger: "blur" }
|
{ required: true, message: "请选择工作站", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
quantityCheck: [
|
||||||
quantityCheck: [
|
|
||||||
{ required: true, message: "检测数量不能为空", trigger: "blur" }
|
{ required: true, message: "检测数量不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
quantityUnqualified: [
|
||||||
quantityUnqualified: [
|
|
||||||
{ required: true, message: "不合格品数量不能为空", trigger: "blur" }
|
{ required: true, message: "不合格品数量不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
quantityQualified: [
|
||||||
quantityQualified: [
|
|
||||||
{ required: true, message: "合格品数量不能为空", trigger: "blur" }
|
{ required: true, message: "合格品数量不能为空", trigger: "blur" }
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -209,7 +209,8 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
defectName: [
|
defectName: [
|
||||||
{ required: true, message: "缺陷描述不能为空", trigger: "blur" }
|
{ required: true, message: "缺陷描述不能为空", trigger: "blur" },
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
indexType: [
|
indexType: [
|
||||||
{ required: true, message: "检测项类型不能为空", trigger: "change" }
|
{ required: true, message: "检测项类型不能为空", trigger: "change" }
|
||||||
|
|||||||
@@ -255,10 +255,15 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
indexCode: [
|
indexCode: [
|
||||||
{ required: true, message: "检测项编码不能为空", trigger: "blur" }
|
{ required: true, message: "检测项编码不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
indexName: [
|
indexName: [
|
||||||
{ required: true, message: "检测项名称不能为空", trigger: "blur" }
|
{ required: true, message: "检测项名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
qcTool: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
indexType: [
|
indexType: [
|
||||||
{ required: true, message: "检测项类型不能为空", trigger: "change" }
|
{ required: true, message: "检测项类型不能为空", trigger: "change" }
|
||||||
@@ -279,6 +284,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -205,8 +205,7 @@
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
||||||
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -262,14 +261,19 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
templateCode: [
|
templateCode: [
|
||||||
{ required: true, message: "检测模板编号不能为空", trigger: "blur" }
|
{ required: true, message: "检测模板编号不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
templateName: [
|
templateName: [
|
||||||
{ required: true, message: "检测模板名称不能为空", trigger: "blur" }
|
{ required: true, message: "检测模板名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
qcTypes: [
|
qcTypes: [
|
||||||
{ required: true, message: "检测种类不能为空", trigger: "blur" }
|
{ required: true, message: "检测种类不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="标准值" prop="standerVal">
|
<el-form-item label="标准值" prop="standerVal">
|
||||||
<el-input v-model="form.standerVal" placeholder="请输入标准值" />
|
<el-input-number v-model="form.standerVal" :max="99999999" placeholder="请输入标准值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -126,12 +126,12 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="误差上限" prop="thresholdMax">
|
<el-form-item label="误差上限" prop="thresholdMax">
|
||||||
<el-input-number :min="0" v-model="form.thresholdMax" placeholder="请输入误差上限" />
|
<el-input-number :min="0" :max="99999999" v-model="form.thresholdMax" placeholder="请输入误差上限" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="误差下限" prop="thresholdMin">
|
<el-form-item label="误差下限" prop="thresholdMin">
|
||||||
<el-input-number :max="0" v-model="form.thresholdMin" placeholder="请输入误差下限" />
|
<el-input-number :mix="0" :max="99999999" v-model="form.thresholdMin" placeholder="请输入误差下限" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -214,6 +214,18 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
qcTool: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
checkMethod: [
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
docUrl: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
templateId: [
|
templateId: [
|
||||||
{ required: true, message: "检测模板ID不能为空", trigger: "blur" }
|
{ required: true, message: "检测模板ID不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<el-table-column label="产品物料名称" align="center" width="120px" prop="itemName" :show-overflow-tooltip="true"/>
|
<el-table-column label="产品物料名称" align="center" width="120px" prop="itemName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
|
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="最低检测数" align="center" width="100px" prop="quantityCheck" />
|
<el-table-column label="最低检测数" align="center" width="100px" prop="quantityCheck" />
|
||||||
<el-table-column label="单位" align="center" width="100px" prop="unitOfMeasure" />
|
<el-table-column label="单位" align="center" width="100px" prop="unitName" />
|
||||||
<el-table-column label="最大不合格数" align="center" prop="quantityUnqualified" />
|
<el-table-column label="最大不合格数" align="center" prop="quantityUnqualified" />
|
||||||
<el-table-column label="最大致命缺陷率" align="center" prop="crRate" >
|
<el-table-column label="最大致命缺陷率" align="center" prop="crRate" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -115,19 +115,19 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="最低检测数" prop="quantityCheck">
|
<el-form-item label="最低检测数" prop="quantityCheck">
|
||||||
<el-input-number :min="1" size="small" v-model="form.quantityCheck" placeholder="请输入最低检测数" />
|
<el-input-number :min="1" :max="99999999" size="small" v-model="form.quantityCheck" placeholder="请输入最低检测数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="最大不合格数" prop="quantityUnqualified">
|
<el-form-item label="最大不合格数" prop="quantityUnqualified">
|
||||||
<el-tooltip content="检测过程中缺陷数量超出最大不合格数后,整批将判定为不合格。为0时,代表不启用此限制" placement="right">
|
<el-tooltip content="检测过程中缺陷数量超出最大不合格数后,整批将判定为不合格。为0时,代表不启用此限制" placement="right">
|
||||||
<el-input-number :min="0" size="small" v-model="form.quantityUnqualified" placeholder="请输入最大不合格数" />
|
<el-input-number :min="0" :max="99999999" size="small" v-model="form.quantityUnqualified" placeholder="请输入最大不合格数" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="单位" prop="unitOfMeasure">
|
<el-form-item label="单位" prop="unitName">
|
||||||
<el-input v-model="form.unitOfMeasure" readonly="readonly" />
|
<el-input v-model="form.unitName" readonly="readonly" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -221,12 +221,18 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
itemCode: [
|
||||||
|
{ required: true, message: "产品物料编码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
templateId: [
|
templateId: [
|
||||||
{ required: true, message: "检测模板ID不能为空", trigger: "blur" }
|
{ required: true, message: "检测模板ID不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
itemId: [
|
itemId: [
|
||||||
{ required: true, message: "产品物料不能为空", trigger: "blur" }
|
{ required: true, message: "产品物料不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: "字段过长", trigger: "blur" }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -345,6 +351,7 @@ export default {
|
|||||||
this.form.itemName = obj.itemName;
|
this.form.itemName = obj.itemName;
|
||||||
this.form.specification = obj.specification;
|
this.form.specification = obj.specification;
|
||||||
this.form.unitOfMeasure = obj.unitOfMeasure;
|
this.form.unitOfMeasure = obj.unitOfMeasure;
|
||||||
|
this.form.unitName = obj.unitName
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
|
||||||
<el-form-item label="报表名称" prop="name">
|
<el-form-item label="报表名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.name"
|
v-model="queryParams.name"
|
||||||
|
|||||||
@@ -249,7 +249,7 @@
|
|||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-form-item label="数量" prop="quantity">
|
<el-form-item label="数量" prop="quantity">
|
||||||
<el-input v-if="form.codeFlag=='Y'" readonly v-model="form.quantity" />
|
<el-input v-if="form.codeFlag=='Y'" readonly v-model="form.quantity" />
|
||||||
<el-input-number :min="0" @blur="onQuantityChanged" v-else v-model="form.quantity" placeholder="请输入数量" />
|
<el-input-number :min="0" :max="99999999" @blur="onQuantityChanged" v-else v-model="form.quantity" placeholder="请输入数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -307,8 +307,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
||||||
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -378,8 +377,19 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
toolCode: [
|
||||||
|
{ required: true, message: "工装夹具编号不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
toolName: [
|
toolName: [
|
||||||
{ required: true, message: "工装夹具名称不能为空", trigger: "blur" }
|
{ required: true, message: "工装夹具名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
spec: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
|
],
|
||||||
|
brand: [
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
toolTypeId: [
|
toolTypeId: [
|
||||||
{ required: true, message: "工装夹具类型不能为空", trigger: "blur" }
|
{ required: true, message: "工装夹具类型不能为空", trigger: "blur" }
|
||||||
@@ -387,6 +397,9 @@ export default {
|
|||||||
quantity: [
|
quantity: [
|
||||||
{ required: true, message: "数量不能为空", trigger: "blur" }
|
{ required: true, message: "数量不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -206,8 +206,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
||||||
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -258,14 +257,22 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
toolTypeCode: [
|
toolTypeCode: [
|
||||||
{ required: true, message: "类型编码不能为空", trigger: "blur" }
|
{ required: true, message: "类型编码不能为空", trigger: "blur" },
|
||||||
|
{ max: 64, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
toolTypeName: [
|
toolTypeName: [
|
||||||
{ required: true, message: "类型名称不能为空", trigger: "blur" }
|
{ required: true, message: "类型名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 100, message: "字段过长", trigger: "blur" }
|
||||||
],
|
],
|
||||||
codeFlag: [
|
codeFlag: [
|
||||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
remark: [
|
||||||
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
maintenPeriod: [
|
||||||
|
{ pattern: /^-?\d+(\.\d+)?$/, message: '输入必须为数字类型', trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user