feat(pdc):数据收集主数据
This commit is contained in:
parent
6d6bd5173e
commit
332bf1b438
55
src/api/mes/prd-nalinv/pdc-basis.js
Normal file
55
src/api/mes/prd-nalinv/pdc-basis.js
Normal file
@ -0,0 +1,55 @@
|
||||
import request from '@/router/axios'
|
||||
import { iep, cmp } from '@/api/prefix'
|
||||
|
||||
export function fetchList(query) {
|
||||
return request({
|
||||
url: iep('/z-pdc-basis/page'),
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function addObj(obj) {
|
||||
return request({
|
||||
url: iep('/z-pdc-basis'),
|
||||
method: 'post',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function getObj(id) {
|
||||
return request({
|
||||
url: iep('/z-pdc-basis/' + id),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function delObj(id) {
|
||||
return request({
|
||||
url: iep('/z-pdc-basis/' + id),
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function putObj(obj) {
|
||||
return request({
|
||||
url: iep('/z-pdc-basis'),
|
||||
method: 'put',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function getCurrentObj(pdcNo) {
|
||||
return request({
|
||||
url: iep('/z-pdc-basis/current/' + pdcNo),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function checkIsUsed(query) {
|
||||
return request({
|
||||
url: iep('/z-pdc-basis/checkIsUsed'),
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
1076
src/views/mes/prd-nalinv/pdcbasis/index.vue
Normal file
1076
src/views/mes/prd-nalinv/pdcbasis/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
96
src/views/mes/prd-nalinv/pdcbasis/init.js
Normal file
96
src/views/mes/prd-nalinv/pdcbasis/init.js
Normal file
@ -0,0 +1,96 @@
|
||||
export const initData = {
|
||||
pdcNo: null,
|
||||
status: '0',
|
||||
description: null,
|
||||
customFields: [],
|
||||
parameterBasesList: [],
|
||||
attachedBasesList: [],
|
||||
revision: '',
|
||||
currentRevision: 'Y',
|
||||
}
|
||||
|
||||
// 料件编号
|
||||
export const itemObj = {
|
||||
condition: 'item',
|
||||
tableColumn: [
|
||||
{ prop: 'item', label: 'mes.materialNumber' },
|
||||
{ prop: 'description', label: 'common.description' },
|
||||
],
|
||||
queryParam: {
|
||||
currentRevision: 'Y'
|
||||
},
|
||||
}
|
||||
|
||||
export const itemDialogObj = {
|
||||
condition: 'item',
|
||||
title: 'mes.materialNumber', // 料件编号
|
||||
tableColumn: [
|
||||
{
|
||||
prop: 'item',
|
||||
label: 'mes.materialNumber', // 料件编号
|
||||
width: '200',
|
||||
},
|
||||
{
|
||||
prop: 'revision',
|
||||
label: 'mes.revision', // 版本
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'description',
|
||||
label: 'common.description', // 说明
|
||||
},
|
||||
{
|
||||
prop: 'typeNo',
|
||||
label: 'mes.itemType', // 料件类别
|
||||
},
|
||||
{
|
||||
prop: 'typeNoDesc',
|
||||
label: 'mes.prd.itemTypeDesc', // 料件类别说明
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export const operationDialogObj = {
|
||||
title: 'mes.process',
|
||||
condition: 'operation',
|
||||
tableColumn: [
|
||||
{
|
||||
prop: 'operation',
|
||||
label: 'mes.process',
|
||||
},
|
||||
{
|
||||
prop: 'description',
|
||||
label: 'common.description',
|
||||
}
|
||||
],
|
||||
}
|
||||
|
||||
export const pdcParameterDialogObj = {
|
||||
title: 'mes.prd.paramDataFields', // 参数主数据
|
||||
condition: 'parameterNo',
|
||||
tableColumn: [
|
||||
{ prop: 'parameterNo', label: 'mes.ecn.paramNo' }, // 参数编号
|
||||
{ prop: 'description', label: 'common.description' }, // 说明
|
||||
{ prop: 'dataTypeDesc', label: 'mes.prd.dataType' }, // 型别
|
||||
],
|
||||
}
|
||||
|
||||
export const eqpTypeDialogObj = {
|
||||
title: 'crud.column.label.equipmentCategory',
|
||||
condition: 'typeNo',
|
||||
tableColumn: [
|
||||
{
|
||||
prop: 'eqpCategory',
|
||||
label: 'mes.resrceCategory',
|
||||
},
|
||||
{
|
||||
prop: 'typeNo',
|
||||
label: 'crud.column.label.equipmentCategory',
|
||||
},
|
||||
{
|
||||
prop: 'description',
|
||||
label: 'common.description',
|
||||
},
|
||||
],
|
||||
queryParam: {}
|
||||
}
|
||||
196
src/views/mes/prd-nalinv/pdcbasis/ui/search-ui.vue
Normal file
196
src/views/mes/prd-nalinv/pdcbasis/ui/search-ui.vue
Normal file
@ -0,0 +1,196 @@
|
||||
<template>
|
||||
<div class="execution">
|
||||
<!-- 供应商编号 開窗 -->
|
||||
<input-select-dialog-cust
|
||||
:modal-obj="operationDialogObj"
|
||||
:modal-show.sync="operationShow"
|
||||
:modal-fetch-fun="fetchOperation"
|
||||
@inputDialogSelected="dialogSelect"
|
||||
></input-select-dialog-cust>
|
||||
<!-- 料件编号 開窗 -->
|
||||
<input-select-dialog-cust
|
||||
:modal-obj="itemDialogObj"
|
||||
:modal-show.sync="itemShow"
|
||||
:modal-fetch-fun="fetchItem"
|
||||
@inputDialogSelected="dialogSelect"
|
||||
></input-select-dialog-cust>
|
||||
<el-form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
:show-message="false"
|
||||
label-width="auto"
|
||||
style="padding-top: 10px"
|
||||
>
|
||||
<!-- 第一行 -->
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6" class="custInput">
|
||||
<el-form-item :label="$t('mes.prd.PDCNo') + ':'" prop="pdcNo">
|
||||
<el-input
|
||||
v-model.trim="searchForm.pdcNo"
|
||||
:placeholder="$t('tip.input') + ' ' + $t('mes.prd.PDCNo')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="custInput">
|
||||
<el-form-item :label="$t('mes.prd.currentRevision') + ':'" prop="currentRevision">
|
||||
<el-select v-model="searchForm.currentRevision" clearable>
|
||||
<el-option
|
||||
v-for="item in revisions"
|
||||
:key="item.value"
|
||||
:label="$t(item.label)"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="custInput">
|
||||
<el-form-item :label="$t('crud.column.label.status1') + ':'" prop="status">
|
||||
<el-select v-model="searchForm.status" clearable>
|
||||
<el-option
|
||||
v-for="item in statusList"
|
||||
:key="item.value"
|
||||
:label="$t(item.label)"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" style="text-align: right">
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="searchChange"
|
||||
>{{ $t('crud.searchBtn') }}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-delete" size="small" @click="searchReset"
|
||||
>{{ $t('el.colorpicker.clear') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 第二行 -->
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6" class="custInput">
|
||||
<el-form-item :label="$t('mes.process') + ':'" prop="operation">
|
||||
<el-input
|
||||
v-model.trim="searchForm.operation" readonly
|
||||
:placeholder="$t('tip.input') + ' ' + $t('mes.process')"
|
||||
>
|
||||
<i
|
||||
slot="suffix"
|
||||
class="el-input__icon el-icon-copy-document"
|
||||
@click.stop="showSearchDialog('operation')"
|
||||
></i>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="custInput">
|
||||
<el-form-item :label="$t('mes.operationDesc') + ':'" prop="operationDesc">
|
||||
{{ searchForm.operationDesc }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="custInput">
|
||||
<el-form-item :label="$t('mes.item') + ':'" prop="item">
|
||||
<el-input
|
||||
v-model.trim="searchForm.item" readonly
|
||||
:placeholder="$t('tip.input') + ' ' + $t('mes.materialNumber')"
|
||||
>
|
||||
<i
|
||||
slot="suffix"
|
||||
class="el-input__icon el-icon-copy-document"
|
||||
@click.stop="showSearchDialog('item')"
|
||||
></i>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="custInput">
|
||||
<el-form-item :label="$t('mes.materialBatchDesc') + ':'" prop="itemDesc">
|
||||
{{ searchForm.itemDesc }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
itemDialogObj,
|
||||
operationDialogObj
|
||||
} from '@/views/mes/prd-nalinv/pdcbasis/init'
|
||||
import { fetchList as fetchItem } from '@/api/mes/prd/item'
|
||||
import { fetchList as fetchOperation } from '@/api/mes/prd/operation'
|
||||
import { switchDictData as revisions } from '@/const/crud/mes/common/static-data'
|
||||
import { fetchItemList as fetchDictList } from '@/api/admin/dict'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
searchForm: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
openDialogKey: null,
|
||||
operationShow: false,
|
||||
operationDialogObj, //采购单号
|
||||
fetchOperation,
|
||||
itemDialogObj, //料件编号
|
||||
fetchItem,
|
||||
itemShow: false,
|
||||
revisions,
|
||||
statusList:[]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDictItemList();
|
||||
},
|
||||
methods: {
|
||||
getDictItemList() {
|
||||
fetchDictList({
|
||||
current: '1',
|
||||
size: '1000',
|
||||
dictType: 'pdc_basis_status',
|
||||
}).then((response) => {
|
||||
this.statusList = response.data.data.records
|
||||
})
|
||||
},
|
||||
// 搜索欄位(開窗)
|
||||
showSearchDialog(key) {
|
||||
this.openDialogKey = key
|
||||
switch (key) {
|
||||
case 'operation':
|
||||
this.operationShow = true
|
||||
break
|
||||
case 'item': //料件编号
|
||||
//this.itemObj.queryParam['item'] = this.searchForm['item']
|
||||
this.itemShow = true
|
||||
break
|
||||
}
|
||||
},
|
||||
dialogSelect(row) {
|
||||
let req = {}
|
||||
switch (this.openDialogKey) {
|
||||
case 'operation': //收料单号
|
||||
req['operation'] = row.operation
|
||||
req['operationBo'] = row.handle
|
||||
this.searchForm['operationDesc'] = row.description
|
||||
break
|
||||
case 'item': //料件编号
|
||||
req['item'] = row.item
|
||||
req['itemBo'] = row.handle
|
||||
this.searchForm['itemDesc'] = row.description
|
||||
break
|
||||
}
|
||||
let data = Object.assign({}, this.searchForm, req)
|
||||
this.$emit('update:searchForm', data)
|
||||
},
|
||||
searchChange() {
|
||||
this.$emit('toSearchChange', true)
|
||||
},
|
||||
searchReset() {
|
||||
this.$emit('toSearchReset', true)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.custInput {
|
||||
margin-bottom: -3px !important;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user