Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
e66e799f89
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
|
||||
})
|
||||
}
|
||||
@ -12,7 +12,7 @@ export function getMaterialConsumptionTransactionPage(query) {
|
||||
|
||||
export function getMaterialCompleteTransactionPage(query) {
|
||||
return request({
|
||||
url: iep('/materialcompletetransaction/page'),
|
||||
url: iep('/zlotmaterialcompletetransaction/page'),
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@ -41,3 +41,19 @@ export function callErpSoStatistCancelTransaction(dataList) {
|
||||
data: dataList
|
||||
})
|
||||
}
|
||||
|
||||
export function callErpMaterialTransaction(dataList) {
|
||||
return request({
|
||||
url: int('/shopOrderStatisticTransCallErp/callErpMaterial'),
|
||||
method: 'post',
|
||||
data: dataList
|
||||
})
|
||||
}
|
||||
|
||||
export function callErpLotCompleteTransaction(dataList) {
|
||||
return request({
|
||||
url: int('/shopOrderStatisticTransCallErp/callErpLot'),
|
||||
method: 'post',
|
||||
data: dataList
|
||||
})
|
||||
}
|
||||
|
||||
@ -36,9 +36,9 @@ export function fetchShopOrderList(query) {
|
||||
})
|
||||
}
|
||||
|
||||
export function firstOpReleaseItemList(data) {
|
||||
export function firstOpReleaseItemList(resrce, data) {
|
||||
return request({
|
||||
url: iep('/wip/nlv-lot-start/first-op-release-item-list'),
|
||||
url: iep('/wip/nlv-lot-start/first-op-release-item-list?resrce=' + resrce),
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
|
||||
42
src/api/mes/wms-nalinv/poRegister.js
Normal file
42
src/api/mes/wms-nalinv/poRegister.js
Normal file
@ -0,0 +1,42 @@
|
||||
import request from '@/router/axios'
|
||||
import {nlv_wms} from "@/api/prefix";
|
||||
import {int} from "@/api/prefix";
|
||||
|
||||
export function getDocumentPage(query) {
|
||||
return request({
|
||||
url: nlv_wms('/zwdocument/page'),
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getPoPage(query) {
|
||||
return request({
|
||||
url: nlv_wms('/zwpoorder/page'),
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getDetailByPo(po) {
|
||||
return request({
|
||||
url: nlv_wms('/zwpoorder/getDetailByPo/'+po),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function saveDocumentDetailData(obj) {
|
||||
return request({
|
||||
url: int('/registerDocumentCallErp/saveDocumentDetailData'),
|
||||
method: 'post',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function findPoOrderDataByPo(query) {
|
||||
return request({
|
||||
url: nlv_wms('/zwpoorder/findPoOrderDataByPo/page'),
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
<el-row>
|
||||
<el-col v-for="(column, index) in this.option.column" :span="column.span" :key="index">
|
||||
<span style="font-weight: bold;font-size:larger">{{column.label}}</span>
|
||||
<span style="font-weight: bold;font-size:larger">{{data[column.prop]}}</span>
|
||||
<span v-if="data" style="font-weight: bold;font-size:larger">{{data[column.prop]}}</span>
|
||||
</el-col>
|
||||
<!--<el-col v-for="(column, index) in this.option.column" :span="column.span" :key="index">{{data[column.prop]}}</el-col>-->
|
||||
</el-row>
|
||||
|
||||
902
src/views/mes/pod-nalinv/index.vue
Normal file
902
src/views/mes/pod-nalinv/index.vue
Normal file
@ -0,0 +1,902 @@
|
||||
<template>
|
||||
<div class="execution">
|
||||
<input-select-dialog
|
||||
:modal-obj="shopOrderDialogObj"
|
||||
:modal-fetch-fun="shopOrderDialogFetchFun"
|
||||
:before-loading-fun="changeShopOrderType"
|
||||
:modal-show.sync="shopOrderDialogVisible"
|
||||
@inputDialogSelected="shopOrderSelected"
|
||||
></input-select-dialog>
|
||||
<input-select-dialog
|
||||
:modal-obj="operationDialogObj"
|
||||
:modal-fetch-fun="operationDialogFetchFun"
|
||||
:modal-show.sync="operationDialogVisible"
|
||||
@inputDialogSelected="operationSelected"
|
||||
>
|
||||
</input-select-dialog>
|
||||
<input-select-dialog
|
||||
:modal-obj="resourceDialogObj"
|
||||
:modal-fetch-fun="resourceDialogFetchFun"
|
||||
:modal-show.sync="resourceDialogVisible"
|
||||
@inputDialogSelected="resourceSelected"
|
||||
>
|
||||
</input-select-dialog>
|
||||
<input-select-dialog
|
||||
:modal-obj="workCenterDialogObj"
|
||||
:modal-fetch-fun="workCenterDialogFetchFun"
|
||||
:modal-show.sync="workCenterDialogVisible"
|
||||
@inputDialogSelected="workCenterSelected"
|
||||
>
|
||||
</input-select-dialog>
|
||||
<input-select-dialog
|
||||
:modal-obj="lineDialogObj"
|
||||
:modal-fetch-fun="lineDialogFetchFun"
|
||||
:modal-show.sync="lineDialogVisible"
|
||||
@inputDialogSelected="lineSelected"
|
||||
>
|
||||
</input-select-dialog>
|
||||
<input-select-dialog
|
||||
:modal-obj="lotNoDialogObj"
|
||||
:modal-fetch-fun="lotNoDialogFetchFun"
|
||||
:before-loading-fun="lotNoDialogDataFun"
|
||||
:modal-show.sync="lotNoDialogVisible"
|
||||
@inputDialogSelected="lotNoSelected"
|
||||
>
|
||||
</input-select-dialog>
|
||||
|
||||
<el-dialog :title="drawerTitle" :visible.sync="drawer" :fullscreen="true" @close="drawerClose">
|
||||
<iframe id="drawerIframe" :src="drawerSrc" frameborder="0" @load="adjustIframe"
|
||||
style="width:100%;height:100%;"></iframe>
|
||||
</el-dialog>
|
||||
|
||||
<basic-container>
|
||||
<avue-form ref="podActionForm" v-model="podActionForm" :option="sfcActionOption">
|
||||
<!--固定区域,显示工序、资源、产线、工作中心、生产物-->
|
||||
<template slot-scope="scope" slot="line">
|
||||
<el-input v-model="podActionForm.line" :disabled="!canChangeLine">
|
||||
<i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showLineDialog"></i>
|
||||
</el-input>
|
||||
</template>
|
||||
<template slot-scope="scope" slot="operation">
|
||||
<el-input
|
||||
v-model="podActionForm.operation"
|
||||
@change="operationChange()"
|
||||
:disabled="!canChangeOperation"
|
||||
>
|
||||
<i
|
||||
slot="suffix"
|
||||
class="el-input__icon el-icon-copy-document"
|
||||
@click.stop="showOperationDialog"
|
||||
></i>
|
||||
</el-input>
|
||||
</template>
|
||||
<template slot-scope="scope" slot="resrce">
|
||||
<el-input v-model="podActionForm.resrce" @change="resourceChange()" :disabled="!canChangeResource">
|
||||
<i
|
||||
slot="suffix"
|
||||
class="el-input__icon el-icon-copy-document"
|
||||
@click.stop="showResourceDialog"
|
||||
></i>
|
||||
</el-input>
|
||||
</template>
|
||||
<template slot-scope="scope" slot="workCenter">
|
||||
<el-input v-model="podActionForm.workCenter" :disabled="!canChangeWorkCenter">
|
||||
<i
|
||||
slot="suffix"
|
||||
class="el-input__icon el-icon-copy-document"
|
||||
@click.stop="showWorkCenterDialog"
|
||||
></i>
|
||||
</el-input>
|
||||
</template>
|
||||
<template slot-scope="scope" slot="lotNo">
|
||||
<el-input v-model="podActionForm.lotNo" @change="loadPanelData()">
|
||||
<i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showLotNoDialog"></i>
|
||||
</el-input>
|
||||
</template>
|
||||
<template slot-scope="scope" slot="shopOrder">
|
||||
<el-input v-model="podActionForm.shopOrder" @change="loadPanelData()">
|
||||
<i
|
||||
slot="suffix"
|
||||
class="el-input__icon el-icon-copy-document"
|
||||
@click.stop="showShopOrderDialog"
|
||||
></i>
|
||||
</el-input>
|
||||
</template>
|
||||
<template slot-scope="scope" slot="qty">
|
||||
<el-input v-model="podActionForm.qty" :disabled="!canChangeQty"></el-input>
|
||||
</template>
|
||||
|
||||
<!--组件显示区域-按钮上方-->
|
||||
<template slot="panelForm">
|
||||
<div :gutter="12">
|
||||
<el-col
|
||||
v-for="item in workstationData.podPanelList"
|
||||
:key="item.index"
|
||||
v-if="item.mode === 'ONE'"
|
||||
:span="24"
|
||||
>
|
||||
<div v-if="item.position === 'TOP'" style="text-align: left; margin-left: 20px">
|
||||
<span>{{ item.moduleName }}</span>
|
||||
<!--列表布局-->
|
||||
<column-display
|
||||
v-if="item.panelType === 'P' && item.moduleType === 'D'"
|
||||
:data.sync="dynamicPanelData[item.moduleNo + item.seq][0]"
|
||||
:option="item.config"
|
||||
></column-display>
|
||||
<!--表单-->
|
||||
<avue-form
|
||||
v-if="item.panelType === 'P' && item.moduleType === 'F'"
|
||||
:data.sync="dynamicPanelData[item.moduleNo + item.seq][0]"
|
||||
:option="item.config"
|
||||
></avue-form>
|
||||
<!--列表-->
|
||||
<avue-crud
|
||||
v-if="item.panelType === 'P' && item.moduleType === 'T'"
|
||||
:data.sync="dynamicPanelData[item.moduleNo + item.seq]"
|
||||
:option="item.config"
|
||||
></avue-crud>
|
||||
<!--嵌套iframe-->
|
||||
<iframe
|
||||
:ref="item.panelConfig + item.seq"
|
||||
v-if="item.panelType === 'I'"
|
||||
:src="item.iframeSrc"
|
||||
frameborder="0"
|
||||
style="width: 100%"
|
||||
:height="item.height"
|
||||
></iframe>
|
||||
</div>
|
||||
</el-col>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!--按钮显示区域-->
|
||||
<template slot="menuForm">
|
||||
<el-button
|
||||
v-for="item in workstationData.podButtonList"
|
||||
:key="item.index"
|
||||
type="primary"
|
||||
@click="doButtonAction(item)"
|
||||
>{{ item.buttonName }}</el-button
|
||||
>
|
||||
</template>
|
||||
</avue-form>
|
||||
|
||||
<!--组件独立显示区域-->
|
||||
<el-row :gutter="12">
|
||||
<el-col
|
||||
v-for="item in workstationData.podPanelList"
|
||||
:key="item.index"
|
||||
v-if="item.mode === 'ONE'"
|
||||
:span="item.span"
|
||||
>
|
||||
<el-card v-if="item.position === 'BOTTOM'">
|
||||
<div slot="header" style="height: 10px">
|
||||
<span>{{ item.moduleName }}</span>
|
||||
</div>
|
||||
<!--列表布局-->
|
||||
<column-display
|
||||
v-if="item.panelType === 'P' && item.moduleType === 'D'"
|
||||
:data.sync="dynamicPanelData[item.moduleNo + item.seq][0]"
|
||||
:option="item.config"
|
||||
></column-display>
|
||||
<!--表单-->
|
||||
<avue-form
|
||||
v-if="item.panelType === 'P' && item.moduleType === 'F'"
|
||||
:data.sync="dynamicPanelData[item.moduleNo + item.seq][0]"
|
||||
:option="item.config"
|
||||
></avue-form>
|
||||
<!--列表-->
|
||||
<avue-crud
|
||||
v-if="item.panelType === 'P' && item.moduleType === 'T'"
|
||||
:data.sync="dynamicPanelData[item.moduleNo + item.seq]"
|
||||
:option="item.config"
|
||||
></avue-crud>
|
||||
<!--嵌套iframe-->
|
||||
<iframe
|
||||
:ref="item.panelConfig + item.seq"
|
||||
v-if="item.panelType === 'I'"
|
||||
:src="item.iframeSrc"
|
||||
frameborder="0"
|
||||
style="width: 100%"
|
||||
:height="item.height"
|
||||
></iframe>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!--组件标签显示区域-->
|
||||
<el-tabs v-model="tabActiveName" style="height: 380px">
|
||||
<el-tab-pane
|
||||
v-for="item in workstationData.podPanelList"
|
||||
:key="item.index"
|
||||
v-if="item.mode === 'TAB'"
|
||||
:label="item.moduleName"
|
||||
:name="item.moduleNo"
|
||||
>
|
||||
<el-card v-if="item.position === 'BOTTOM'">
|
||||
<!--列表布局-->
|
||||
<column-display
|
||||
v-if="item.panelType === 'P' && item.moduleType === 'D'"
|
||||
:data.sync="dynamicPanelData[item.moduleNo + item.seq][0]"
|
||||
:option="item.config"
|
||||
></column-display>
|
||||
<!--表单-->
|
||||
<avue-form
|
||||
v-if="item.panelType === 'P' && item.moduleType === 'F'"
|
||||
:data.sync="dynamicPanelData[item.moduleNo + item.seq][0]"
|
||||
:option="item.config"
|
||||
></avue-form>
|
||||
<!--列表-->
|
||||
<avue-crud
|
||||
v-if="item.panelType === 'P' && item.moduleType === 'T'"
|
||||
:data.sync="dynamicPanelData[item.moduleNo + item.seq]"
|
||||
:option="item.config"
|
||||
></avue-crud>
|
||||
<!--嵌套iframe-->
|
||||
<iframe
|
||||
:ref="item.panelConfig + item.seq"
|
||||
v-if="item.panelType === 'I'"
|
||||
:src="item.iframeSrc"
|
||||
frameborder="0"
|
||||
style="width: 100%"
|
||||
:height="item.height"
|
||||
></iframe>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</basic-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getFullByCode as fetchWorkstationData, buttonFunc } from '@/api/mes/pod/workstation'
|
||||
import { loadData as loadPodModuleData, getPodModule4API } from '@/api/mes/pod/pod-module'
|
||||
import { getLot } from '@/api/mes/wip/lot-check'
|
||||
import { fetchList as fetchWorkCenterList } from '@/api/mes/prd/work-center'
|
||||
import { findOperationList as fetchOperationList } from '@/api/mes/prd/operation'
|
||||
import { findResourceList as fetchResourceList } from '@/api/mes/pms/resrce'
|
||||
import { fetchList as fetchLineList } from '@/api/mes/prd/work-center'
|
||||
import { showLoading, hideLoading } from '@/const/loading'
|
||||
import { mapGetters } from 'vuex'
|
||||
import {
|
||||
operationDialogObj,
|
||||
resourceDialogObj,
|
||||
lotNoDialogObj,
|
||||
workstationData,
|
||||
page,
|
||||
workCenterDialogObj,
|
||||
lineDialogObj,
|
||||
lotStateList,
|
||||
} from '@/views/mes/pod/init'
|
||||
import { isBlank } from '@/util/string'
|
||||
import columnDisplay from '@/components/element-ui/column-display.vue'
|
||||
import { getStore } from '@/util/store'
|
||||
import {getByActivityOption} from "@/api/admin/activity-option";
|
||||
import {releaseFetchList} from "@/api/mes/prd/shop-order";
|
||||
import {fetchItemList as fetchDictList} from "@/api/admin/dict";
|
||||
|
||||
export default {
|
||||
name: 'sfc_action',
|
||||
components: { columnDisplay },
|
||||
props: {},
|
||||
|
||||
data() {
|
||||
return {
|
||||
drawer: false,
|
||||
drawerSrc: '',
|
||||
drawerTitle: '',
|
||||
sizeValue: 'mini',
|
||||
canChangeQty: false,
|
||||
canChangeLine: false,
|
||||
canChangeResource: false,
|
||||
canChangeOperation: false,
|
||||
canChangeWorkCenter: false,
|
||||
stepSelectDialogVisible: false,
|
||||
dynamicPanelData: {},
|
||||
podActionForm: {
|
||||
fab: ''
|
||||
},
|
||||
workstationData,
|
||||
page,
|
||||
|
||||
tabActiveName: '',
|
||||
lineDialogVisible: false,
|
||||
lotNoDialogVisible: false,
|
||||
resourceDialogVisible: false,
|
||||
operationDialogVisible: false,
|
||||
workCenterDialogVisible: false,
|
||||
lotNoDialogFetchFun: getLot,
|
||||
lineDialogFetchFun: fetchLineList,
|
||||
resourceDialogFetchFun: fetchResourceList,
|
||||
operationDialogFetchFun: fetchOperationList,
|
||||
workCenterDialogFetchFun: fetchWorkCenterList,
|
||||
operationDialogObj,
|
||||
resourceDialogObj,
|
||||
workCenterDialogObj,
|
||||
lineDialogObj,
|
||||
lotNoDialogObj,
|
||||
lotStateList,
|
||||
shopOrderTypeList: [],
|
||||
shopOrderDialogFetchFun: releaseFetchList,
|
||||
shopOrderDialogObj: {
|
||||
title: '工单',
|
||||
condition: 'shopOrder',
|
||||
tableColumn: [
|
||||
{
|
||||
prop: 'shopOrder',
|
||||
label: 'mes.shopOrderNo',
|
||||
},
|
||||
{
|
||||
prop: 'shopOrderType',
|
||||
label: 'mes.shopOrderType',
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: 'mes.ord.status',
|
||||
},
|
||||
{
|
||||
prop: 'qty',
|
||||
label: 'mes.qtyToBuild',
|
||||
},
|
||||
],
|
||||
queryParam: {},
|
||||
},
|
||||
shopOrderDialogVisible: false
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
//document.addEventListener('keydown',this.handleEvent)
|
||||
this.initWorkstation()
|
||||
this.getDictShopOrderTypeList()
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters(['tag', 'tagList', 'permissions']),
|
||||
permissionList() {
|
||||
return {}
|
||||
},
|
||||
|
||||
sfcActionOption() {
|
||||
return {
|
||||
labelWidth: 125,
|
||||
size: this.sizeValue,
|
||||
emptyBtn: false,
|
||||
submitBtn: false,
|
||||
column: [
|
||||
{
|
||||
prop: 'fab',
|
||||
span: 8,
|
||||
display: true,
|
||||
label: '车间代号',
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
prop: 'line',
|
||||
span: 8,
|
||||
display: this.workstationData.workstationType === 'L',
|
||||
label: this.$t('mes.productionLine'),
|
||||
rules: [
|
||||
{
|
||||
message: this.$t('mes.pod.productionLineMustBeFilled'),
|
||||
required: true,
|
||||
trigger: ['change'],
|
||||
},
|
||||
],
|
||||
formslot: true,
|
||||
},
|
||||
{
|
||||
prop: 'workCenter',
|
||||
span: 8,
|
||||
display: this.workstationData.workstationType === 'W',
|
||||
label: this.$t('mes.workCenter'),
|
||||
rules: [
|
||||
{
|
||||
message: this.$t('mes.pod.workCenterMustBeFilled'),
|
||||
required: true,
|
||||
trigger: ['change'],
|
||||
},
|
||||
],
|
||||
formslot: true,
|
||||
},
|
||||
{
|
||||
prop: 'operation',
|
||||
span: 8,
|
||||
display: this.workstationData.workstationType !== '',
|
||||
label: this.$t('mes.process'),
|
||||
rules: [
|
||||
{
|
||||
message: this.$t('mes.pod.processMustBeFilled'),
|
||||
required: true,
|
||||
trigger: ['change'],
|
||||
},
|
||||
],
|
||||
formslot: true,
|
||||
},
|
||||
{
|
||||
prop: 'resrce',
|
||||
span: 8,
|
||||
display: this.workstationData.workstationType !== 'L',
|
||||
label: this.$t('mes.pod.resource'),
|
||||
rules: [
|
||||
{
|
||||
message: this.$t('mes.pod.resourceMustBeFilled'),
|
||||
required: true,
|
||||
trigger: ['change'],
|
||||
},
|
||||
],
|
||||
formslot: true,
|
||||
},
|
||||
{
|
||||
prop: 'lotNo',
|
||||
span: 8,
|
||||
display: true,
|
||||
label: '条码号',
|
||||
rules: [
|
||||
{
|
||||
message: this.$t('mes.pod.productionItemMustBeFilled'),
|
||||
required: false,
|
||||
trigger: ['change'],
|
||||
},
|
||||
],
|
||||
formslot: true,
|
||||
},
|
||||
{
|
||||
prop: 'shopOrder',
|
||||
span: 8,
|
||||
display: true,
|
||||
label: '工单',
|
||||
formslot: true
|
||||
},
|
||||
{
|
||||
prop: 'qty',
|
||||
span: 8,
|
||||
display: this.workstationData.podConfig.showQty !== 'N',
|
||||
label: this.$t('mes.quantity'),
|
||||
formslot: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
mounted: function () {
|
||||
//this.$refs.table.$el.offsetTop:表格距离浏览器的高度
|
||||
//175表示你想要调整的表格距离底部的高度(你可以自己随意调整),因为我们一般都有放分页组件的,所以需要给它留一个高度
|
||||
},
|
||||
|
||||
beforeRouteEnter(to, from, next) {
|
||||
next((vm) => {
|
||||
try {
|
||||
let me = vm
|
||||
me.initWorkstation()
|
||||
} catch (e) {}
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
adjustIframe() {
|
||||
/**
|
||||
* iframe-宽高自适应显示
|
||||
*/
|
||||
const oIframe = document.getElementById('drawerIframe');
|
||||
const deviceHeight = document.documentElement.clientHeight;
|
||||
oIframe.style.height = (Number(deviceHeight) - 100) + 'px'; //数字是页面布局高度差
|
||||
},
|
||||
changeShopOrderType(resp) {
|
||||
resp.data.data.records.forEach((r) => {
|
||||
r.shopOrderType = this.shopOrderTypeList.records.filter(
|
||||
(item) => item.value === r.shopOrderType
|
||||
)[0].label
|
||||
})
|
||||
},
|
||||
showShopOrderDialog() {
|
||||
if (!this.shopOrderDisabled) {
|
||||
this.shopOrderDialogVisible = true
|
||||
this.shopOrderDialogObj.queryParam.status = 'RELEASABLE'
|
||||
}
|
||||
},
|
||||
// 获取工单类型字典
|
||||
getDictShopOrderTypeList() {
|
||||
fetchDictList({
|
||||
current: '1',
|
||||
size: '1000',
|
||||
dictType: 'shop_order_type',
|
||||
}).then((response) => {
|
||||
this.$set(this.shopOrderTypeList, 'records', response.data.data.records)
|
||||
})
|
||||
},
|
||||
shopOrderSelected(row) {
|
||||
let me = this
|
||||
me.podActionForm.shopOrder = row.shopOrder
|
||||
me.loadPanelData()
|
||||
},
|
||||
/**
|
||||
* 初始化面板
|
||||
* @returns {*}
|
||||
*/
|
||||
initWorkstation() {
|
||||
let me = this
|
||||
me.urlParam = me.$route.query
|
||||
let activityId = me.urlParam.ACTIVITY_ID
|
||||
let workstation = me.urlParam.WORKSTATION
|
||||
this.drawerSrc = ""
|
||||
if (isBlank(workstation)) {
|
||||
return me.$message.error(this.$t('mes.pod.pleaseSpecifyProductionOperatorPanel'))
|
||||
}
|
||||
me.getActivityOption(activityId)
|
||||
showLoading()
|
||||
fetchWorkstationData(workstation, '')
|
||||
.then((response) => {
|
||||
hideLoading()
|
||||
if (!response.data.data || response.data.data.length === 0) {
|
||||
// let errorMsg = stringFormat('操作员面板 {0} 不存在', workstation)
|
||||
return me.$message.error(this.$t('mes.pod.operatorPanelKeyNotFound', { key: workstation }))
|
||||
}
|
||||
me.workstationData = response.data.data
|
||||
let wdPodConfig = me.workstationData.podConfig
|
||||
// 面板尺寸
|
||||
me.sizeValue = me.workstationData.podConfig.displaySize
|
||||
// 默认字段
|
||||
me.site = getStore({ name: 'tenantId' })
|
||||
me.podActionForm.workCenter = wdPodConfig.defaultWorkCenter
|
||||
me.podActionForm.operation = wdPodConfig.defaultOperation
|
||||
me.podActionForm.resrce = wdPodConfig.defaultResource
|
||||
me.podActionForm.line = wdPodConfig.defaultLine
|
||||
me.canChangeWorkCenter = wdPodConfig.canChangeWorkCenter === 'Y'
|
||||
me.canChangeOperation = wdPodConfig.canChangeOperation === 'Y'
|
||||
me.canChangeResource = wdPodConfig.canChangeResource === 'Y'
|
||||
me.canChangeLine = wdPodConfig.canChangeLine === 'Y'
|
||||
me.canChangeQty = wdPodConfig.canChangeQty === 'Y'
|
||||
// 解析每一小块内容布局
|
||||
me.parsePodConfigData(me.workstationData.podPanelList)
|
||||
// 加载每一小块初始数据
|
||||
me.loadPanelData(true)
|
||||
|
||||
//TAB标签初始化指定
|
||||
for (let i = 0; i < me.workstationData.podPanelList.length; i++) {
|
||||
let podPanel = me.workstationData.podPanelList[i]
|
||||
if (podPanel.mode === 'TAB') {
|
||||
me.tabActiveName = podPanel.moduleNo
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
hideLoading()
|
||||
})
|
||||
|
||||
if (this.$refs.podActionForm) {
|
||||
setTimeout(() => this.$refs['podActionForm'].clearValidate(), 500)
|
||||
}
|
||||
},
|
||||
getActivityOption(activityId) {
|
||||
let me = this;
|
||||
if (activityId) {
|
||||
getByActivityOption(activityId, 'Z_FAB')
|
||||
.then((response) => {
|
||||
if (response.data.code !== 0) {
|
||||
return me.$message.error(response.data.msg)
|
||||
}
|
||||
if(response.data && response.data.data) {
|
||||
me.podActionForm.fab = response.data.data.optionValue
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
parsePodConfigData(podPanelList) {
|
||||
let me = this
|
||||
for (let i = 0; i < podPanelList.length; i++) {
|
||||
let podPanel = podPanelList[i]
|
||||
if (podPanel.panelType === 'P') {
|
||||
//显示组件
|
||||
let config = {}
|
||||
me.dynamicPanelData[podPanel.moduleNo + podPanel.seq] = []
|
||||
try {
|
||||
config = eval('(' + podPanel.content + ')')
|
||||
} catch (e) {
|
||||
me.$message.error(e)
|
||||
}
|
||||
podPanel.config = config
|
||||
} else if (podPanel.panelType === 'I') {
|
||||
//显示引用界面--TODO 后续考虑是否增加界面引用
|
||||
podPanel.iframeSrc = '/#' + podPanel.sysMenu.path + '?pure-page=Y&is-tab=N'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
loadPanelData(initData) {
|
||||
let me = this
|
||||
// 加载动态pod
|
||||
if (me.containsDynamicPod()) {
|
||||
let param = me.buildPodLoadParam()
|
||||
if (initData) {
|
||||
param.initData = 'Y'
|
||||
}
|
||||
showLoading()
|
||||
|
||||
//组件数据类型是动态SQL
|
||||
loadPodModuleData(param)
|
||||
.then((response) => {
|
||||
hideLoading()
|
||||
let respData = response.data.data
|
||||
if (respData) {
|
||||
for (let key in respData) {
|
||||
if (me.panelAlwaysReload(key)) {
|
||||
me.dynamicPanelData[key].length = 0
|
||||
me.dynamicPanelData[key].push(...respData[key])
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$forceUpdate() // 强制刷新
|
||||
})
|
||||
.catch(() => {
|
||||
hideLoading()
|
||||
})
|
||||
|
||||
//组件数据类型是API接口
|
||||
getPodModule4API(param)
|
||||
.then((response) => {
|
||||
hideLoading()
|
||||
let respData = response.data.data
|
||||
if (respData) {
|
||||
for (let key in respData) {
|
||||
if (me.panelAlwaysReload(key)) {
|
||||
let dataPath = respData[key].dataContent
|
||||
buttonFunc(dataPath, param)
|
||||
.then((response) => {
|
||||
hideLoading()
|
||||
let _respData = response.data.data
|
||||
me.dynamicPanelData[key].length = 0
|
||||
me.dynamicPanelData[key].push(_respData)
|
||||
this.$forceUpdate()
|
||||
})
|
||||
.catch(() => {
|
||||
hideLoading()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$forceUpdate() // 强制刷新
|
||||
})
|
||||
.catch(() => {
|
||||
hideLoading()
|
||||
})
|
||||
}
|
||||
|
||||
// 更新iframe参数
|
||||
me.updateIframePanelUrl()
|
||||
},
|
||||
|
||||
updateIframePanelUrl() {
|
||||
let me = this
|
||||
let urlParam = me.buildUrlParam()
|
||||
let podPanelList = this.workstationData.podPanelList
|
||||
if (podPanelList && podPanelList.length > 0) {
|
||||
for (let i = 0; i < podPanelList.length; i++) {
|
||||
let podPanel = podPanelList[i]
|
||||
if (podPanel.moduleType === 'I' && podPanel.alwaysReload === 'Y') {
|
||||
podPanel.iframeSrc = '/#' + podPanel.sysMenu.path + '?pure-page=Y&is-tab=N' + urlParam
|
||||
let frame = me.$refs[podPanel.moduleNo + podPanel.seq][0]
|
||||
frame.src = podPanel.iframeSrc
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
drawerClose() {
|
||||
// 关闭时修改iframe的src,防止重新打开时无法传参数问题
|
||||
this.drawerSrc = '/#' + this.tag.value
|
||||
},
|
||||
|
||||
//界面弹出跳转传递参数组装
|
||||
buildUrlParam() {
|
||||
let me = this;
|
||||
|
||||
me.urlParam = me.$route.query
|
||||
let activityId = me.urlParam.ACTIVITY_ID
|
||||
let param = "&ACTIVITY_ID=" + activityId;
|
||||
for (let key in this.podActionForm) {
|
||||
let value = this.podActionForm[key]
|
||||
if (!isBlank(value)) {
|
||||
param = param + '&' + key + '=' + value
|
||||
}
|
||||
}
|
||||
|
||||
// 动态面板如果为表单或者DISPLAY,则将参数构建为url参数
|
||||
if (this.workstationData.podPanelList && this.workstationData.podPanelList.length > 0) {
|
||||
for (let i = 0; i < this.workstationData.podPanelList.length; i++) {
|
||||
let item = this.workstationData.podPanelList[i]
|
||||
if (item.panelType === 'P' && (item.moduleType === 'D' || item.moduleType === 'F')) {
|
||||
let dynamicPanelData = this.dynamicPanelData[item.moduleNo + item.seq][0]
|
||||
for (let key in dynamicPanelData) {
|
||||
let value = dynamicPanelData[key]
|
||||
if (value) {
|
||||
param = param + '&' + key + '=' + value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return param
|
||||
},
|
||||
|
||||
buildPodLoadParam() {
|
||||
let param = {}
|
||||
for (let key in this.podActionForm) {
|
||||
let value = this.podActionForm[key]
|
||||
if (!isBlank(value)) {
|
||||
param[key] = value
|
||||
}
|
||||
}
|
||||
param.workstationBo = this.workstationData.handle
|
||||
return param
|
||||
},
|
||||
|
||||
//校验是否有需要动态加载的组件
|
||||
containsDynamicPod() {
|
||||
let podPanelList = this.workstationData.podPanelList
|
||||
if (podPanelList && podPanelList.length > 0) {
|
||||
for (let i = 0; i < podPanelList.length; i++) {
|
||||
if (podPanelList[i].panelType === 'P') {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
},
|
||||
//校验动态组件是否维护了始终加载属性
|
||||
panelAlwaysReload(panelKey) {
|
||||
let podPanelList = this.workstationData.podPanelList
|
||||
if (podPanelList && podPanelList.length > 0) {
|
||||
for (let i = 0; i < podPanelList.length; i++) {
|
||||
if (
|
||||
podPanelList[i].moduleNo + podPanelList[i].seq == panelKey &&
|
||||
podPanelList[i].alwaysReload === 'N'
|
||||
) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
},
|
||||
|
||||
//按钮触发事件
|
||||
doButtonAction(podButton) {
|
||||
let me = this
|
||||
let param = me.podActionForm
|
||||
me.$refs['podActionForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return
|
||||
}
|
||||
|
||||
if ('API' === podButton.category) {
|
||||
//调用API接口
|
||||
buttonFunc(podButton.path, param)
|
||||
.then((response) => {
|
||||
hideLoading()
|
||||
if (response.data.code === 0) {
|
||||
this.$message.success(response.data.data)
|
||||
} else {
|
||||
this.$message.error(response.data.msg)
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
hideLoading()
|
||||
})
|
||||
} else {
|
||||
//界面跳转
|
||||
hideLoading()
|
||||
let urlParam = me.buildUrlParam()
|
||||
let src = '/#' + podButton.path + '?pure-page=Y&is-tab=N' + urlParam
|
||||
me.drawer = true
|
||||
me.drawerSrc = src
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
lotNoDialogDataFun(res) {
|
||||
res.data.data.records.forEach((r) => {
|
||||
let f = this.lotStateList.find((s) => s.id == r.stateStatus)
|
||||
r.stateStatus = f ? this.$t(f.name) : null
|
||||
})
|
||||
},
|
||||
|
||||
showLineDialog() {
|
||||
let me = this
|
||||
me.lineDialogObj.queryParam = {
|
||||
wcType: '1',
|
||||
}
|
||||
this.lineDialogVisible = true
|
||||
},
|
||||
//显示操作弹窗框
|
||||
showOperationDialog() {
|
||||
let me = this
|
||||
me.operationDialogObj.queryParam = {
|
||||
wcType: me.workstationData.workstationType === 'L' ? '1' : '0',
|
||||
workCenter: me.podActionForm.line,
|
||||
}
|
||||
this.operationDialogVisible = true
|
||||
},
|
||||
//显示物料清单弹窗框
|
||||
showResourceDialog() {
|
||||
let me = this
|
||||
if(isBlank(me.podActionForm.operation)) {
|
||||
return this.$message.error('请先选择工序');
|
||||
}
|
||||
me.resourceDialogObj.queryParam = {
|
||||
workCenter: me.podActionForm.workCenter,
|
||||
operation: me.podActionForm.operation,
|
||||
fab: me.podActionForm.fab
|
||||
}
|
||||
this.resourceDialogVisible = true
|
||||
this.resourceDialogVisible = true
|
||||
},
|
||||
showWorkCenterDialog() {
|
||||
let me = this
|
||||
me.workCenterDialogObj.queryParam = {
|
||||
wcType: '0',
|
||||
}
|
||||
this.workCenterDialogVisible = true
|
||||
},
|
||||
//显示工作中心弹窗框
|
||||
showLotNoDialog() {
|
||||
let me = this
|
||||
me.lotNoDialogObj.queryParam = {
|
||||
operation: me.podActionForm.operation,
|
||||
statusList: 'Q,R',
|
||||
}
|
||||
this.lotNoDialogVisible = true
|
||||
},
|
||||
resourceSelected(row) {
|
||||
let me = this
|
||||
me.podActionForm.resrce = row.resrce
|
||||
me.loadPanelData()
|
||||
},
|
||||
operationSelected(row) {
|
||||
let me = this
|
||||
me.podActionForm.operation = row.operation
|
||||
me.loadPanelData()
|
||||
},
|
||||
workCenterSelected(row) {
|
||||
let me = this
|
||||
me.podActionForm.workCenter = row.workCenter
|
||||
},
|
||||
lineSelected(row) {
|
||||
let me = this
|
||||
me.podActionForm.line = row.workCenter
|
||||
},
|
||||
lotNoSelected(row) {
|
||||
let me = this
|
||||
me.podActionForm.lotNo = row.lotNo
|
||||
me.podActionForm.qty = row.qty
|
||||
me.loadPanelData()
|
||||
},
|
||||
|
||||
resourceChange() {
|
||||
this.loadPanelData()
|
||||
},
|
||||
operationChange() {
|
||||
this.loadPanelData()
|
||||
},
|
||||
|
||||
resize($el) {
|
||||
this.containerMarginTopStyle.marginTop = $el.clientHeight + 10 + 'px'
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/*.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}*/
|
||||
|
||||
.avue-view {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
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>
|
||||
@ -246,11 +246,7 @@
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<span v-if="state == 'view' || state === 'createdJob'">{{
|
||||
form.qcSubCategories
|
||||
}}</span>
|
||||
<el-select
|
||||
v-else
|
||||
v-model="form.qcSubCategories"
|
||||
placeholder=""
|
||||
:disabled="state === 'view' || state === 'createdJob'"
|
||||
@ -402,13 +398,14 @@
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<div v-if="state === 'view'">
|
||||
<div v-if="state === 'view' || state === 'edit' || state === 'createdJob'">
|
||||
{{ form.item }}
|
||||
</div>
|
||||
<el-input
|
||||
v-else
|
||||
v-model="form.item"
|
||||
:readonly="true"
|
||||
:require="rules.item && rules.item.some((rule) => rule.required)"
|
||||
>
|
||||
<i
|
||||
slot="suffix"
|
||||
@ -435,7 +432,7 @@
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<div v-if="state === 'view'">
|
||||
<div v-if="state === 'view' || state === 'edit' || state === 'createdJob'">
|
||||
{{ form.operation }}
|
||||
</div>
|
||||
<el-input
|
||||
@ -703,6 +700,20 @@
|
||||
<el-option key="N" label="否" value="N"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 均值计算判定 -->
|
||||
<el-table-column prop="avgJudge" label="均值计算判定" width="auto">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.avgJudge"
|
||||
placeholder=""
|
||||
:disabled="state === 'view'"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option key="N" label="否" value="N"></el-option>
|
||||
<el-option key="Y" label="是" value="Y"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
@ -1269,17 +1280,15 @@ export default {
|
||||
checkTableRepeat(this, this.tableData, 'qcItem', [], 'flag')
|
||||
if (this.flag) return
|
||||
this.tableData.forEach((t) => {
|
||||
// if (t.qcItem && isBlank(t.samplePlan) && t.itemType !== '2' && this.form.inspecType != '3') {
|
||||
// this.flag = true
|
||||
// msg +=
|
||||
// this.$t('mes.qms.samplingRuleOfInspectionItemCannotBeEmpty', { qcItem: t.qcItem }) +
|
||||
// '<br />'
|
||||
// }
|
||||
if (!(me.form.inspecType == '0' && (t.itemType == '0' || t.itemType == '1' ))) {
|
||||
this.flag = true
|
||||
msg +=
|
||||
this.$t('mes.qms.samplingRuleOfInspectionItemCannotBeEmpty', { qcItem: t.qcItem }) +
|
||||
'<br />'
|
||||
if (t.qcItem && isBlank(t.samplePlan) && t.itemType !== '2' && this.form.inspecType != '3') {
|
||||
this.flag = true
|
||||
msg +=
|
||||
this.$t('mes.qms.samplingRuleOfInspectionItemCannotBeEmpty', { qcItem: t.qcItem }) +
|
||||
'<br />'
|
||||
}
|
||||
if ((me.form.inspecType === '0' && (t.itemType === '0' || t.itemType === '1' ))) {
|
||||
this.flag = false
|
||||
msg = ''
|
||||
}
|
||||
if (t.itemType == '1') {
|
||||
switch (t.controlMode) {
|
||||
@ -1388,7 +1397,8 @@ export default {
|
||||
isRequired: t.isRequired,
|
||||
photosMust: t.photosMust,
|
||||
testTimes: t.testTimes,
|
||||
inspInstructions: t.inspInstructions
|
||||
inspInstructions: t.inspInstructions,
|
||||
avgJudge: t.avgJudge,
|
||||
})
|
||||
})
|
||||
}
|
||||
@ -1423,7 +1433,8 @@ export default {
|
||||
let me = this
|
||||
let obj = {
|
||||
isRequired:'Y',
|
||||
photosMust:'N'
|
||||
photosMust:'N',
|
||||
avgJudge:'N'
|
||||
}
|
||||
if (me.form.inspecType == '1' ) {
|
||||
if (isBlank(me.form.samplePlan)) {
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
center
|
||||
v-if="releasedLotDialogVisible"
|
||||
>
|
||||
<el-table ref="lotListTable" :data="shopOrderReleaseItemInfoList" height="100%" border>
|
||||
<el-table ref="lotListResultTable" :data="shopOrderReleaseItemInfoList" height="100%" border>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="40"></el-table-column>
|
||||
@ -55,16 +55,16 @@
|
||||
<div class="flex-content">
|
||||
<el-form :inline="true" ref="form" :rules="rules" :model="formObj" label-width="120px">
|
||||
<el-row>
|
||||
<el-form-item label="设备编码:" prop="resrce">
|
||||
<el-input ref="resourceInput" v-model="formObj.resrce" @change="resourceChange">
|
||||
<i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showResourceDialog"></i>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序:" prop="operation">
|
||||
<el-input ref="operationInput" v-model="formObj.operation" @change="operationChange">
|
||||
<i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showOperationDialog"></i>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编码:" prop="resrce">
|
||||
<el-input ref="resourceInput" v-model="formObj.resrce" @change="resourceChange">
|
||||
<i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showResourceDialog"></i>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产订单号:" prop="shopOrder">
|
||||
<el-input ref="shopOrderInput" v-model="formObj.shopOrder" @change="shopOrderChange">
|
||||
<i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showShopOrderDialog"></i>
|
||||
@ -86,7 +86,7 @@
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<hr class="el-hr"/>
|
||||
<el-form-item label="条码号:" prop="lotNo" v-if="!firstOp && !canAutoRelease">
|
||||
<el-form-item label="条码号:" prop="lotNo" v-if="!firstOp || !canAutoRelease">
|
||||
<el-input ref="lotNoInput" v-model="formObj.lotNo" @keydown.enter.native.prevent="lotNoChange">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -98,7 +98,7 @@
|
||||
</div>
|
||||
<hr class="el-hr"/>
|
||||
<div class="flex-auto">
|
||||
<el-table ref="lotListTable" :data="lotList" height="100%" @selection-change="handleLotListSelectionChange" border>
|
||||
<el-table ref="lotListTable" :data="lotList" height="100%" @selection-change="handleLotListSelectionChange" :row-class-name="tableRowClassName" border>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="40"></el-table-column>
|
||||
@ -107,21 +107,22 @@
|
||||
{{ getSeq(scope.$index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="!firstOp" label="条码号" align="center" prop="lotNo"/>
|
||||
<el-table-column v-if="!firstOp || !canAutoRelease" label="条码号" align="center" prop="lotNo"/>
|
||||
<el-table-column label="生产订单号" align="center" prop="shopOrder"/>
|
||||
<el-table-column label="物料编号" align="center" prop="item"/>
|
||||
<el-table-column label="物料描述" align="center" prop="itemDesc"/>
|
||||
<el-table-column v-if="!firstOp" label="质检状态" align="center" prop="inspectionLevel"/>
|
||||
<el-table-column v-if="firstOp && canAutoRelease" label="物料类型" align="center" prop="bomComponentType"/>
|
||||
<el-table-column v-if="!firstOp || !canAutoRelease" label="质检状态" align="center" prop="inspectionLevel"/>
|
||||
<el-table-column label="销售订单" align="center" prop="saleOrder"/>
|
||||
<el-table-column label="长度" align="center" prop="zctCd"/>
|
||||
<el-table-column label="宽幅" align="center" prop="zctKf"/>
|
||||
<el-table-column label="厚度" align="center" prop="thickness"/>
|
||||
<el-table-column v-if="!firstOp" align="center" prop="qty">
|
||||
<el-table-column v-if="!firstOp || !canAutoRelease" align="center" prop="qty">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<span><span style="color: red">*</span>产出米数</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="!firstOp" align="center" prop="weightQty">
|
||||
<el-table-column v-if="!firstOp || !canAutoRelease" align="center" prop="weightQty">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<span><span style="color: red">*</span>产出重量</span>
|
||||
</template>
|
||||
@ -199,7 +200,7 @@ export default {
|
||||
firstOp: false,
|
||||
canAutoRelease: true,
|
||||
shopOrderList: [],
|
||||
releaseList: [],
|
||||
selectedRows: [],
|
||||
shopOrderReleaseItemInfoList: [],
|
||||
releasedLotDialogVisible: false,
|
||||
rules: {
|
||||
@ -211,9 +212,6 @@ export default {
|
||||
],
|
||||
shopOrder: [
|
||||
{required: this.firstOp && this.canAutoRelease, message: '生产订单不能为空', trigger: 'change'}
|
||||
],
|
||||
lotNo: [
|
||||
{required: true, message: '条码号不能为空', trigger: 'change'}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -257,10 +255,12 @@ export default {
|
||||
me.urlParam = me.$route.query;
|
||||
let operation = me.urlParam.operation;
|
||||
let resrce = me.urlParam.resrce;
|
||||
let fab = me.urlParam.fab;
|
||||
let activityId = me.urlParam.ACTIVITY_ID;
|
||||
me.formObj = Object.assign({}, me.initData);
|
||||
me.formObj.operation = operation;
|
||||
me.formObj.resrce = resrce;
|
||||
me.formObj.fab = fab;
|
||||
me.getActivityOption(activityId);
|
||||
me.getCurrentShift();
|
||||
},
|
||||
@ -279,13 +279,18 @@ export default {
|
||||
let me = this;
|
||||
if (activityId) {
|
||||
showLoading()
|
||||
getByActivityOption(activityId, 'AUTO_RELEASABLE_LOT')
|
||||
getByActivityOption(activityId, 'AUTO_RELEASABLE_LOT')
|
||||
.then((response) => {
|
||||
hideLoading()
|
||||
if (response.data.code !== 0) {
|
||||
return me.$message.error(response.data.msg)
|
||||
}
|
||||
me.autoReleasableLot = response.data.data.optionValue
|
||||
if(response.data && response.data.data) {
|
||||
me.autoReleasableLot = response.data.data.optionValue
|
||||
}
|
||||
if(!isBlank(me.formObj.operation)) {
|
||||
me.operationChange()
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
hideLoading()
|
||||
@ -310,9 +315,13 @@ export default {
|
||||
//显示设备弹窗框
|
||||
showResourceDialog() {
|
||||
let me = this;
|
||||
if(isBlank(me.formObj.operation)) {
|
||||
return this.$message.error('请先选择工序');
|
||||
}
|
||||
me.resourceDialogObj.queryParam = {
|
||||
workCenter: '',
|
||||
operation: me.formObj.operation
|
||||
operation: me.formObj.operation,
|
||||
fab: me.formObj.fab
|
||||
};
|
||||
this.resourceDialogVisible = true;
|
||||
},
|
||||
@ -367,11 +376,17 @@ export default {
|
||||
resourceChange() {
|
||||
this.changeFocus('resource');
|
||||
this.getCurrentShift();
|
||||
// this.doRetrieve();
|
||||
if(this.firstOp && this.canAutoRelease) {
|
||||
this.doRetrieve();
|
||||
}
|
||||
},
|
||||
operationChange() {
|
||||
this.changeFocus('operation');
|
||||
this.canAutoRelease = this.autoReleasableLot && this.autoReleasableLot.split(";").indexOf(this.formObj.operation) < 0;
|
||||
if(isBlank(this.autoReleasableLot)) {
|
||||
this.canAutoRelease = true;
|
||||
} else {
|
||||
this.canAutoRelease = this.autoReleasableLot.split(";").indexOf(this.formObj.operation) < 0;
|
||||
}
|
||||
this.getCurrentShift();
|
||||
this.getOperationCustomData();
|
||||
},
|
||||
@ -383,9 +398,25 @@ export default {
|
||||
lotNoChange() {
|
||||
let me = this;
|
||||
me.getCurrentShift();
|
||||
me.doRetrieve();
|
||||
me.selectLot();
|
||||
|
||||
},
|
||||
tableRowClassName({ row }) {
|
||||
if (this.selectedRows.includes(row)) {
|
||||
return 'selected-row';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
selectLot() {
|
||||
for(let i = 0; i < this.lotList.length; i++) {
|
||||
if(this.lotList[i].lotNo === this.formObj.lotNo) {
|
||||
let row = this.lotList[i];
|
||||
this.$refs.lotListTable.toggleRowSelection(row);
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.formObj.lotNo = '';
|
||||
},
|
||||
changeFocus(currentField) {
|
||||
|
||||
},
|
||||
@ -397,10 +428,13 @@ export default {
|
||||
let params;
|
||||
me.lotList = [];
|
||||
if(me.firstOp && me.canAutoRelease) {
|
||||
if(isBlank(me.formObj.resrce)) {
|
||||
return this.$message.error('请先选择设备');
|
||||
}
|
||||
if(me.shopOrderList && this.shopOrderList.length > 0) {
|
||||
params = me.shopOrderList;
|
||||
showLoading();
|
||||
firstOpReleaseItemList(params)
|
||||
firstOpReleaseItemList(me.formObj.resrce, params)
|
||||
.then(response => {
|
||||
hideLoading();
|
||||
me.lotList = response.data.data;
|
||||
@ -410,7 +444,7 @@ export default {
|
||||
});
|
||||
} else {
|
||||
if(validate) {
|
||||
this.$message.error('请先选择工单');
|
||||
return this.$message.error('请先选择工单');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -465,7 +499,7 @@ export default {
|
||||
});
|
||||
},
|
||||
handleLotListSelectionChange(selection) {
|
||||
this.releaseList = selection;
|
||||
this.selectedRows = selection;
|
||||
},
|
||||
doLotStart() {
|
||||
let me = this;
|
||||
@ -478,16 +512,18 @@ export default {
|
||||
// 進站
|
||||
checkIn(needRelease) {
|
||||
let params = {
|
||||
lotNo: this.formObj.lotNo,
|
||||
operation: this.formObj.operation,
|
||||
resource: this.formObj.resrce,
|
||||
note: ''
|
||||
};
|
||||
if(!this.selectedRows || this.selectedRows.length === 0) {
|
||||
return this.$message.error('请选择要过站的数据');
|
||||
}
|
||||
if(needRelease) {
|
||||
if(!this.releaseList || this.releaseList.length === 0) {
|
||||
return this.$message.error('请选择要过站的物料数据');
|
||||
}
|
||||
params.shopOrderReleaseItemInfoList = this.releaseList;
|
||||
params.shopOrderReleaseItemInfoList = this.selectedRows;
|
||||
} else {
|
||||
// 将this.selectedRows中的lotNo提取出一个数组
|
||||
params.lotNoList = this.selectedRows.map(item => item.lotNo);
|
||||
}
|
||||
showLoading();
|
||||
start(params).then(res => {
|
||||
@ -522,4 +558,7 @@ export default {
|
||||
.button-center {
|
||||
text-align: center;
|
||||
}
|
||||
::v-deep.el-table .selected-row {
|
||||
background: #def1d4;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -11,13 +11,38 @@
|
||||
:modal-show.sync="workCenterDialogVisible"
|
||||
@inputDialogSelected="workCenterSelect"></input-select-dialog>
|
||||
|
||||
<el-dialog title="设定过账日期"
|
||||
:visible.sync="dialogPostingDateVisible"
|
||||
width="40%"
|
||||
:show-close="false"
|
||||
center>
|
||||
<el-form :model="postingDateForm" label-width="100px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="过账日期" :rules="{ required: true, message: '请选择日期', trigger: 'blur' }">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
v-model="postingDateForm.postingDate"
|
||||
type="date"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogPostingDateVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="postErpSure">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<basic-container>
|
||||
<c-top-bar :offset="30" style="margin-top: -15px; margin-bottom: 40px">
|
||||
<c-top-bar :offset="30" style="margin-top: -30px; margin-bottom: 40px">
|
||||
<el-button type="text" icon="el-icon-search" @click="searchFormObjAction">检索</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-button type="text" icon="el-icon-circle-check" @click="searchCleanAction">{{
|
||||
$t('crud.emptyBtn')
|
||||
}}
|
||||
<el-button type="text" icon="el-icon-circle-check" @click="searchCleanAction">{{ $t('crud.emptyBtn') }}
|
||||
</el-button>
|
||||
</c-top-bar>
|
||||
|
||||
@ -26,8 +51,7 @@
|
||||
<el-col :span="6">
|
||||
<el-form-item label="车间" prop="fabNo">
|
||||
<el-input v-model="searchFormObj.fabNo" clearable>
|
||||
<i slot="suffix" class="el-input__icon el-icon-copy-document"
|
||||
@click.stop="showFabNoDialogVisible = true"></i>
|
||||
<i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showFabNoDialogVisible = true"></i>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -99,10 +123,13 @@
|
||||
<el-table :data="materialConsumptionList" max-height="360"
|
||||
:header-cell-style="{ 'text-align': 'center' }"
|
||||
highlight-current-row
|
||||
ref="mtrlConsMultipleTable"
|
||||
@selection-change="mtrlConsSelectionChange"
|
||||
:cell-style="{ 'text-align': 'center' }" tooltip-effect="dark" border style="width: 100%">
|
||||
<el-table-column type="index" width="80" fixed="left" label="序号"></el-table-column>
|
||||
<el-table-column prop="fabNo" label="车间" width="150"></el-table-column>
|
||||
<el-table-column prop="workCenter" label="工作中心" width="140"></el-table-column>
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<el-table-column type="index" width="60" fixed="left" label="序号"></el-table-column>
|
||||
<el-table-column prop="fabNo" label="车间"></el-table-column>
|
||||
<el-table-column prop="workCenter" label="工作中心" width="100"></el-table-column>
|
||||
<el-table-column prop="shopOrder" label="生产工单"></el-table-column>
|
||||
<el-table-column prop="lotNo" label="LOT号"></el-table-column>
|
||||
<el-table-column prop="componentItem" label="组件物料"></el-table-column>
|
||||
@ -113,7 +140,7 @@
|
||||
<el-table-column prop="subQty" label="辅单位数量" width="110"></el-table-column>
|
||||
<el-table-column prop="subUom" label="辅单位"></el-table-column>
|
||||
<el-table-column prop="transactionType" label="事务类型"></el-table-column>
|
||||
<el-table-column prop="transactionDate" label="事务日期"></el-table-column>
|
||||
<el-table-column prop="transactionDate" label="事务日期" width="160"></el-table-column>
|
||||
<el-table-column prop="" label="班次"></el-table-column>
|
||||
<el-table-column prop="syncPostingDate" label="过账日期"></el-table-column>
|
||||
<el-table-column prop="warehouseCode" label="仓库"></el-table-column>
|
||||
@ -122,6 +149,8 @@
|
||||
<el-table-column prop="reservedNo" label="预留编号"></el-table-column>
|
||||
<el-table-column prop="reservedLine" label="预留行号"></el-table-column>
|
||||
<el-table-column prop="syncStatus" label="SAP同步状态" width="110"></el-table-column>
|
||||
<el-table-column prop="syncMsgText" label="SAP回复文本" width="160"></el-table-column>
|
||||
<el-table-column prop="syncMsgNo" label="SAP消息编号" width="80"></el-table-column>
|
||||
<el-table-column prop="syncSubmitter" label="SAP提交用户" width="110"></el-table-column>
|
||||
<el-table-column prop="syncPostingDate" label="SAP同步日期" width="110"></el-table-column>
|
||||
<el-table-column prop="syncVoucherNo" label="SAP凭证编号" width="110"></el-table-column>
|
||||
@ -145,10 +174,10 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8"></el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary">物料消耗提交同步</el-button>
|
||||
<el-button type="primary" @click="dialogPostingDateVisible = true">物料消耗提交同步</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary">物料消耗冲销</el-button>
|
||||
<el-button type="danger">物料消耗冲销</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8"></el-col>
|
||||
</el-row>
|
||||
@ -158,12 +187,15 @@
|
||||
<el-col :span="24">
|
||||
<el-table :data="materialCompleteList" max-height="360" :header-cell-style="{ 'text-align': 'center' }"
|
||||
highlight-current-row
|
||||
ref="mtrlCompleteMultipleTable"
|
||||
@selection-change="mtrlCompleteSelectionChange"
|
||||
:cell-style="{ 'text-align': 'center' }" tooltip-effect="dark" border style="width: 100%">
|
||||
<el-table-column type="index" width="80" fixed="left" label="序号"></el-table-column>
|
||||
<el-table-column prop="fabNo" label="车间" width="150"></el-table-column>
|
||||
<el-table-column prop="workCenter" label="工作中心" width="140"></el-table-column>
|
||||
<el-table-column prop="shopOrder" label="生产工单"></el-table-column>
|
||||
<el-table-column prop="lotNo" label="LOT号"></el-table-column>
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<el-table-column type="index" width="60" fixed="left" label="序号"></el-table-column>
|
||||
<el-table-column prop="fabNo" label="车间"></el-table-column>
|
||||
<el-table-column prop="workCenter" label="工作中心" width="120"></el-table-column>
|
||||
<el-table-column prop="shopOrder" label="生产工单" width="100"></el-table-column>
|
||||
<el-table-column prop="lotNo" label="LOT号" width="120"></el-table-column>
|
||||
<el-table-column prop="item" label="产出物料"></el-table-column>
|
||||
<el-table-column prop="item" label="物料描述"></el-table-column>
|
||||
<el-table-column prop="sapBatchNo" label="SAP批次"></el-table-column>
|
||||
@ -175,21 +207,21 @@
|
||||
<el-table-column prop="subQty" label="辅单位数量" width="100"></el-table-column>
|
||||
<el-table-column prop="qcGrade" label="判定等级"></el-table-column>
|
||||
<el-table-column prop="transactionType" label="事务类型"></el-table-column>
|
||||
<el-table-column prop="transactionDate" label="事务日期"></el-table-column>
|
||||
<el-table-column prop="transactionDate" label="事务日期" width="160"></el-table-column>
|
||||
<el-table-column prop="" label="班次"></el-table-column>
|
||||
<el-table-column prop="syncPostingDate" label="过账日期"></el-table-column>
|
||||
<el-table-column prop="syncPostingDate" label="过账日期" width="110"></el-table-column>
|
||||
<el-table-column prop="warehouseCode" label="仓库"></el-table-column>
|
||||
<el-table-column prop="storageLocation" label="存储位置"></el-table-column>
|
||||
<el-table-column prop="erpInventory" label="ERP仓库"></el-table-column>
|
||||
<el-table-column prop="inventoryMark" label="特殊库存标识" width="110"></el-table-column>
|
||||
<el-table-column prop="inventoryType" label="库存类型"></el-table-column>
|
||||
<el-table-column prop="syncStatus" label="SAP同步状态" width="110"></el-table-column>
|
||||
<el-table-column prop="syncMsgText" label="消息文本" width="160"></el-table-column>
|
||||
<el-table-column prop="syncSubmitter" label="SAP提交用户" width="110"></el-table-column>
|
||||
<el-table-column prop="syncPostingDate" label="SAP同步日期" width="110"></el-table-column>
|
||||
<el-table-column prop="syncVoucherNo" label="SAP凭证编号" width="110"></el-table-column>
|
||||
</el-table>
|
||||
<div
|
||||
style="width: 100%; display: flex; margin-top: 10px; flex-direction: column; align-items: end; justify-content: center">
|
||||
<div style="width: 100%; display: flex; margin-top: 10px; flex-direction: column; align-items: end; justify-content: center">
|
||||
<el-pagination
|
||||
@size-change="handlePageComSizeChange"
|
||||
@current-change="handlePageComCurrentChange"
|
||||
@ -198,19 +230,17 @@
|
||||
:page-size="pageCom.pageSize"
|
||||
background
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageCom.total"
|
||||
>
|
||||
</el-pagination>
|
||||
:total="pageCom.total"/>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8"></el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary">完工入库提交同步</el-button>
|
||||
<el-button type="primary" @click="dialogPostingDateVisible = true">完工入库提交同步</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary">完工入库冲销</el-button>
|
||||
<el-button type="danger">完工入库冲销</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8"></el-col>
|
||||
</el-row>
|
||||
@ -226,7 +256,7 @@
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<el-table-column type="index" width="60" fixed="left" label="序号"></el-table-column>
|
||||
<el-table-column prop="fabNo" label="车间"></el-table-column>
|
||||
<el-table-column prop="workCenter" label="工作中心"></el-table-column>
|
||||
<el-table-column prop="workCenter" label="工作中心" width="120"></el-table-column>
|
||||
<el-table-column prop="shopOrder" label="生产工单"></el-table-column>
|
||||
<el-table-column prop="resource" label="资源"></el-table-column>
|
||||
<el-table-column prop="operation" label="工序"></el-table-column>
|
||||
@ -270,7 +300,7 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8"></el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" @click="soSyncAction">生产报工提交同步</el-button>
|
||||
<el-button type="primary" @click="dialogPostingDateVisible = true">生产报工提交同步</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" @click="soSyncCancelAction">生产报工取消</el-button>
|
||||
@ -291,7 +321,7 @@ import {getStore} from '@/util/store';
|
||||
import {hideLoading, showLoading} from '@/const/loading';
|
||||
import {fetchItemList as fetchDictList} from '@/api/admin/dict';
|
||||
import {
|
||||
callCallErpSoStatisticsTransaction,
|
||||
callErpLotCompleteTransaction, callErpMaterialTransaction,
|
||||
callErpShopOrderStatisticsTransaction, callErpSoStatistCancelTransaction,
|
||||
getMaterialCompleteTransactionPage,
|
||||
getMaterialConsumptionTransactionPage,
|
||||
@ -302,6 +332,7 @@ import {fetchList as fabNoFetchList} from "@/api/mes/smd/fab-basis";
|
||||
import {fetchList as fetchWorkCenterList} from "@/api/mes/prd/work-center";
|
||||
import {copyJSON} from "@/util/util";
|
||||
import moment from 'moment';
|
||||
import {isBlank} from "@/util/string";
|
||||
|
||||
export default {
|
||||
name: 'wip-report-sap',
|
||||
@ -311,16 +342,17 @@ export default {
|
||||
return {
|
||||
username: getStore({name: 'userInfo'}).username,
|
||||
materialConsumptionList: [],
|
||||
dialogPostingDateVisible: false,
|
||||
materialCompleteList: [],
|
||||
wipReportList: [],
|
||||
activeName: 'materialConsumption',
|
||||
saleDetailList: [],
|
||||
showFabNoDialogVisible: false,
|
||||
selectedMainRow: {},
|
||||
postingDateForm: {
|
||||
postingDate: ''
|
||||
},
|
||||
senPayForm: {
|
||||
trackingNumber: ''
|
||||
},
|
||||
senPayFormVisible: false,
|
||||
userShiftList: [],
|
||||
statusList: [],
|
||||
searchFormObj: {
|
||||
@ -382,7 +414,9 @@ export default {
|
||||
currentPage: 1, // 当前页数
|
||||
pageSize: 20 // 每页显示多少条
|
||||
},
|
||||
wipReportSelection: []
|
||||
wipReportSelection: [],
|
||||
mtrlConsSelection: [],
|
||||
mtrlCompleteSelection: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -513,12 +547,6 @@ export default {
|
||||
me.materialCompleteList = [];
|
||||
},
|
||||
|
||||
// 取消
|
||||
close() {
|
||||
let me = this;
|
||||
me.salesOutDataVisible = false;
|
||||
},
|
||||
|
||||
handleWipReSizeChange(val) {
|
||||
this.wipRe.pageSize = val;
|
||||
},
|
||||
@ -555,10 +583,57 @@ export default {
|
||||
return obj != undefined ? obj.label : srcVal;
|
||||
},
|
||||
|
||||
// 同步扣料数据报工数据
|
||||
materialSyncAction(postingDate){
|
||||
let me = this;
|
||||
if(me.mtrlConsSelection.length>0){
|
||||
me.mtrlConsSelection.forEach(ite=>{
|
||||
ite.syncPostingDate = postingDate;
|
||||
});
|
||||
showLoading();
|
||||
callErpMaterialTransaction(me.mtrlConsSelection).then(res => {
|
||||
hideLoading();
|
||||
this.$message.success('同步成功');
|
||||
me.searchFormObjAction();
|
||||
}).catch(error => {
|
||||
hideLoading();
|
||||
this.$message.error('错误:'+error);
|
||||
me.searchFormObjAction();
|
||||
});
|
||||
}else{
|
||||
this.$message.error('请选择数据');
|
||||
}
|
||||
},
|
||||
|
||||
// 同步批次完工报工数据
|
||||
lotSyncAction(postingDate){
|
||||
let me = this;
|
||||
if(me.mtrlCompleteSelection.length>0){
|
||||
me.mtrlCompleteSelection.forEach(ite=>{
|
||||
ite.syncPostingDate = postingDate;
|
||||
});
|
||||
showLoading();
|
||||
callErpLotCompleteTransaction(me.mtrlCompleteSelection).then(res => {
|
||||
hideLoading();
|
||||
this.$message.success('同步成功');
|
||||
me.searchFormObjAction();
|
||||
}).catch(error => {
|
||||
hideLoading();
|
||||
this.$message.error('错误:'+error);
|
||||
me.searchFormObjAction();
|
||||
});
|
||||
}else{
|
||||
this.$message.error('请选择数据');
|
||||
}
|
||||
},
|
||||
|
||||
// 同步工单报工数据
|
||||
soSyncAction(){
|
||||
soSyncAction(postingDate){
|
||||
let me = this;
|
||||
if(me.wipReportSelection.length>0){
|
||||
me.wipReportSelection.forEach(ite=>{
|
||||
ite.syncPostingDate = postingDate;
|
||||
});
|
||||
showLoading();
|
||||
callErpShopOrderStatisticsTransaction(me.wipReportSelection).then(res => {
|
||||
hideLoading();
|
||||
@ -591,8 +666,36 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
// 物料消耗和完工入库确认抛送ERP
|
||||
postErpSure(){
|
||||
let me = this;
|
||||
if(isBlank(me.postingDateForm.postingDate)){
|
||||
this.$message.error('请设定过账日期');
|
||||
return;
|
||||
}
|
||||
me.dialogPostingDateVisible = false;
|
||||
if(me.activeName === 'materialComplete'){
|
||||
me.lotSyncAction(me.postingDateForm.postingDate);
|
||||
}else if(me.activeName === 'materialConsumption'){
|
||||
me.materialSyncAction(me.postingDateForm.postingDate);
|
||||
}else if(me.activeName === 'wipReportSap'){
|
||||
me.soSyncAction(me.postingDateForm.postingDate);
|
||||
}else{
|
||||
this.$message.error('未获取到正确到报工选项');
|
||||
}
|
||||
me.postingDateForm.postingDate = '';
|
||||
},
|
||||
|
||||
wipReportSelectionChange(val){
|
||||
this.wipReportSelection = val;
|
||||
},
|
||||
|
||||
mtrlConsSelectionChange(val){
|
||||
this.mtrlConsSelection = val;
|
||||
},
|
||||
|
||||
mtrlCompleteSelectionChange(val){
|
||||
this.mtrlCompleteSelection = val;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="条码号" prop="barCode">
|
||||
<el-input style="width: 200px" v-model.trim="searchForm.barCode" clearable @blur="barCodeBlur">
|
||||
<el-input style="width: 200px" v-model.trim="searchForm.barCode" clearable @keyup.enter.native="barCodeBlur">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -128,10 +128,10 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="outWeight" label="产出重量" header-align="center">
|
||||
<el-table-column prop="outMeter" label="产出重量" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<el-input v-model="scope.row.outWeight" type="number" :min="minValue"/>
|
||||
<el-input v-model="scope.row.outMeter" type="number" :min="minValue"/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -237,7 +237,7 @@ export default {
|
||||
let optionList = response.data.data
|
||||
for(let i=0;i<optionList.length;i++){
|
||||
if(optionList[i].optionName === 'AUTO_RELEASABLE_LOT'){
|
||||
that.operationList = optionList[i].optionValue.split(",")
|
||||
that.operationList = optionList[i].optionValue.split(";")
|
||||
}
|
||||
}
|
||||
}).catch(e => {
|
||||
@ -309,6 +309,8 @@ export default {
|
||||
const item = this.searchForm.operationOutData.find(item => item.shopOrder === response.data.data.operationOutListDTOList[0].shopOrder && item.item === response.data.data.operationOutListDTOList[0].item);
|
||||
if (item) {
|
||||
item.lotNo = response.data.data.operationOutListDTOList[0].lotNo
|
||||
item.lotStateBo = response.data.data.operationOutListDTOList[0].lotStateBo
|
||||
item.lotSerial = response.data.data.operationOutListDTOList[0].lotSerial
|
||||
item.itemDescription = response.data.data.operationOutListDTOList[0].itemDescription
|
||||
item.inspectionLevel = response.data.data.operationOutListDTOList[0].inspectionLevel
|
||||
item.width = response.data.data.operationOutListDTOList[0].width
|
||||
@ -388,7 +390,7 @@ export default {
|
||||
return this.$message.warning("请先选中列表中数据!");
|
||||
} else {
|
||||
for (let i=0; i<this.selectedRows.length; i++) {
|
||||
if (!this.selectedRows[i].outWeight) {
|
||||
if (!this.selectedRows[i].outMeter) {
|
||||
return this.$message.warning("勾选列表存在未输入的数量!");
|
||||
}
|
||||
}
|
||||
@ -409,6 +411,12 @@ export default {
|
||||
this.$message.error(response.data.message);
|
||||
} else {
|
||||
this.$message.success(`工序【${this.searchForm.operation}】出站完成!`);
|
||||
// 清除条码和输入框
|
||||
this.searchForm.operationOutData.forEach(item => {
|
||||
item.lotNo = '';
|
||||
item.outMeter = '';
|
||||
})
|
||||
this.searchForm = Object.assign({}, this.searchForm)
|
||||
}
|
||||
}).catch(() => {
|
||||
hideLoading();
|
||||
|
||||
@ -75,11 +75,19 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="条码号" prop="barCode">
|
||||
<el-input style="width: 200px" v-model.trim="searchForm.barCode" clearable @blur="barCodeBlur">
|
||||
<el-input style="width: 200px" v-model.trim="searchForm.barCode" clearable @keyup.enter.native="barCodeBlur">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="膜卷类型:" prop="rollType" :rules="[{ required: true, message: '膜卷类型不能为空', trigger: 'change'}]">
|
||||
<el-select v-model="searchForm.rollType" clearable style="width: 200px">
|
||||
<el-option v-for="item in selectRollType" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="primary" icon="el-icon-edit-outline" size="small" @click="operationOut">出站</el-button>
|
||||
@ -128,7 +136,17 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="inspectionLevel" label="质检状态" header-align="center">
|
||||
<el-table-column v-if="getInspecLevel === 'Y'" prop="inspectionLevel" label="质检状态" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<el-select v-model="scope.row.inspectionLevel" clearable>
|
||||
<el-option v-for="item in selectInspecLevel" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-else prop="inspectionLevel" label="质检状态" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
{{ scope.row.inspectionLevel }}
|
||||
@ -152,14 +170,21 @@
|
||||
<el-table-column prop="outMeter" label="产出米数" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<el-input v-model="scope.row.outMeter" type="number" :min="minValue"/>
|
||||
<el-input v-model="scope.row.outMeter" type="number" :min="minValue" clearable/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="outWeight" label="产出重量" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<el-input v-model="scope.row.outWeight" type="number" :min="minValue"/>
|
||||
<el-input v-model="scope.row.outWeight" type="number" :min="minValue" clearable/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<el-input v-model="scope.row.remark" clearable/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -185,6 +210,7 @@ import {
|
||||
import {hideLoading, showLoading} from "@/const/loading";
|
||||
import { isBlank } from '@/util/string';
|
||||
import {listByActivityId} from "@/api/admin/activity-option";
|
||||
import {fetchItemList as fetchDictList} from "@/api/admin/dict";
|
||||
export default {
|
||||
name: 'operation-out',
|
||||
data() {
|
||||
@ -202,12 +228,15 @@ export default {
|
||||
shopOrderDialogObj: {...shopOrderDialogObj}, // 生产订单
|
||||
openShopOrderList: null,
|
||||
shopOrderDialogVisible: false,
|
||||
selectRollType: [],// 膜卷类型
|
||||
selectInspecLevel: [],// 检验等级
|
||||
minValue: 0, // 最小值,这里是 0,只能输入正整数
|
||||
resrceIsDisabled: false, // 控制设备输入框是否禁用
|
||||
operationIsDisabled: false, // 控制工序输入框是否禁用
|
||||
shopOrderIsDisabled: false, // 控制工单输入框是否禁用
|
||||
operationList: [], // 作业规则维护的工序列表
|
||||
selectedRows: [], // 选中行数据列表
|
||||
getInspecLevel: null, // 判断列表中质检状态是否可选
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -247,6 +276,16 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 获取数据字典
|
||||
getDataDictionary(dictType, list) {
|
||||
fetchDictList({
|
||||
current: "1",
|
||||
size: "1000",
|
||||
dictType: dictType,
|
||||
}).then((response) => {
|
||||
this[list] = response.data.data.records
|
||||
});
|
||||
},
|
||||
//选中行赋值
|
||||
handleSelectionChange(selection) {
|
||||
this.selectedRows = selection;
|
||||
@ -264,13 +303,20 @@ export default {
|
||||
}
|
||||
let optionList = response.data.data
|
||||
for(let i=0;i<optionList.length;i++){
|
||||
// 工序列表
|
||||
if(optionList[i].optionName === 'AUTO_RELEASABLE_LOT'){
|
||||
that.operationList = optionList[i].optionValue.split(",")
|
||||
that.operationList = optionList[i].optionValue.split(";")
|
||||
}
|
||||
// 判断列表中质检状态是否可选
|
||||
if(optionList[i].optionName === 'GET_INSPEC_LEVEL'){
|
||||
that.getInspecLevel = optionList[i].optionValue
|
||||
}
|
||||
}
|
||||
}).catch(e => {
|
||||
hideLoading()
|
||||
})
|
||||
this.getDataDictionary("roll_type", "selectRollType");// 膜卷类型
|
||||
this.getDataDictionary("INSPEC_LEVEL", "selectInspecLevel");// 检验等级
|
||||
},
|
||||
// 选择工单获取列表数据
|
||||
readOperationOutListByShopOrder(site, shopOrder) {
|
||||
@ -337,6 +383,8 @@ export default {
|
||||
const item = this.searchForm.operationOutData.find(item => item.shopOrder === response.data.data.operationOutListDTOList[0].shopOrder && item.item === response.data.data.operationOutListDTOList[0].item);
|
||||
if (item) {
|
||||
item.lotNo = response.data.data.operationOutListDTOList[0].lotNo
|
||||
item.lotStateBo = response.data.data.operationOutListDTOList[0].lotStateBo
|
||||
item.lotSerial = response.data.data.operationOutListDTOList[0].lotSerial
|
||||
item.itemDescription = response.data.data.operationOutListDTOList[0].itemDescription
|
||||
item.inspectionLevel = response.data.data.operationOutListDTOList[0].inspectionLevel
|
||||
item.width = response.data.data.operationOutListDTOList[0].width
|
||||
@ -406,41 +454,59 @@ export default {
|
||||
},
|
||||
// 出站
|
||||
operationOut() {
|
||||
this.$confirm(`是否确认出站?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// 不是首工序且不在作业规则内,列表必须有选择的数据且条码不能为空
|
||||
if (this.selectedRows.length === 0) {
|
||||
return this.$message.warning("请先选中列表中数据!");
|
||||
} else {
|
||||
for (let i=0; i<this.selectedRows.length; i++) {
|
||||
if (!this.selectedRows[i].outMeter || !this.selectedRows[i].outWeight) {
|
||||
return this.$message.warning("勾选列表存在未输入的数量!");
|
||||
}
|
||||
this.$refs.searchForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm(`是否确认出站?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// 不是首工序且不在作业规则内,列表必须有选择的数据且条码不能为空
|
||||
if (this.selectedRows.length === 0) {
|
||||
return this.$message.warning("请先选中列表中数据!");
|
||||
} else {
|
||||
for (let i=0; i<this.selectedRows.length; i++) {
|
||||
if (!this.selectedRows[i].outMeter || !this.selectedRows[i].outWeight) {
|
||||
return this.$message.warning("勾选列表存在未输入的数量!");
|
||||
}
|
||||
if (this.getInspecLevel === 'Y' && !this.selectedRows[i].inspectionLevel) {
|
||||
return this.$message.warning("勾选列表存在未选择的质检等级!");
|
||||
}
|
||||
}
|
||||
}
|
||||
showLoading();
|
||||
// 按分号分割工单字符串
|
||||
let shopOrderList = this.searchForm.shopOrder.split(";")
|
||||
operationOut({
|
||||
site: this.searchForm.site,
|
||||
operation: this.searchForm.operation,
|
||||
resrce: this.searchForm.resrce,
|
||||
operationList: this.operationList,
|
||||
operationOutListDTOList: this.selectedRows,
|
||||
shopOrderList: shopOrderList
|
||||
}).then((response) => {
|
||||
hideLoading();
|
||||
if (response.data.code !== 0) {
|
||||
this.$message.error(response.data.message);
|
||||
} else {
|
||||
this.$message.success(`工序【${this.searchForm.operation}】出站完成!`);
|
||||
// 清除条码和输入框
|
||||
this.searchForm.operationOutData.forEach(item => {
|
||||
item.lotNo = '';
|
||||
item.outMeter = '';
|
||||
item.outWeight = '';
|
||||
item.remark = '';
|
||||
if (this.getInspecLevel === 'Y') {
|
||||
item.inspectionLevel = '';
|
||||
}
|
||||
})
|
||||
this.searchForm = Object.assign({}, this.searchForm)
|
||||
}
|
||||
}).catch(() => {
|
||||
hideLoading();
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
showLoading();
|
||||
// 按分号分割工单字符串
|
||||
let shopOrderList = this.searchForm.shopOrder.split(";")
|
||||
operationOut({
|
||||
site: this.searchForm.site,
|
||||
operation: this.searchForm.operation,
|
||||
resrce: this.searchForm.resrce,
|
||||
operationList: this.operationList,
|
||||
operationOutListDTOList: this.selectedRows,
|
||||
shopOrderList: shopOrderList
|
||||
}).then((response) => {
|
||||
hideLoading();
|
||||
if (response.data.code !== 0) {
|
||||
this.$message.error(response.data.message);
|
||||
} else {
|
||||
this.$message.success(`工序【${this.searchForm.operation}】出站完成!`);
|
||||
}
|
||||
}).catch(() => {
|
||||
hideLoading();
|
||||
});
|
||||
})
|
||||
},
|
||||
// 清空事件
|
||||
|
||||
@ -93,6 +93,12 @@
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="原膜类型" prop="membraneType">
|
||||
<el-input style="width: 200px" v-model.trim="searchForm.membraneType" disabled clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="日期" prop="currentDate">
|
||||
<el-input style="width: 200px" v-model.trim="searchForm.currentDate" disabled clearable>
|
||||
@ -107,11 +113,19 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="条码号" prop="barCode">
|
||||
<el-input style="width: 200px" v-model.trim="searchForm.barCode" clearable @blur="barCodeBlur">
|
||||
<el-input style="width: 200px" v-model.trim="searchForm.barCode" clearable @keyup.enter.native="barCodeBlur">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item v-if="autoRollType === 'Y'" label="膜卷类型:" prop="rollType" :rules="[{ required: true, message: '膜卷类型不能为空', trigger: 'change'}]">
|
||||
<el-select v-model="searchForm.rollType" clearable style="width: 200px">
|
||||
<el-option v-for="item in selectRollType" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="primary" icon="el-icon-edit-outline" size="small" @click="operationOut">出站</el-button>
|
||||
@ -160,7 +174,17 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="inspectionLevel" label="质检状态" header-align="center">
|
||||
<el-table-column v-if="getInspecLevel === 'Y'" prop="inspectionLevel" label="质检状态" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<el-select v-model="scope.row.inspectionLevel" clearable>
|
||||
<el-option v-for="item in selectInspecLevel" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-else prop="inspectionLevel" label="质检状态" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
{{ scope.row.inspectionLevel }}
|
||||
@ -191,7 +215,14 @@
|
||||
<el-table-column prop="outMeter" label="产出数量(米/卷)" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<el-input v-model="scope.row.outMeter" type="number" :min="minValue"/>
|
||||
<el-input v-model="scope.row.outMeter" type="number" :min="minValue" clearable/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<el-input v-model="scope.row.remark" clearable/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -212,18 +243,21 @@ import {
|
||||
fetchShopOrderPage,
|
||||
fetchUserWorkShift,
|
||||
readOperationOutListByShopOrder,
|
||||
readOperationOutListByBarCode, operationOut
|
||||
readOperationOutListByBarCode,
|
||||
operationOut
|
||||
} from "@/api/mes/prd/operation-out";
|
||||
import {hideLoading, showLoading} from "@/const/loading";
|
||||
import { isBlank } from '@/util/string';
|
||||
import {listByActivityId} from "@/api/admin/activity-option";
|
||||
import {fetchItemList as fetchDictList} from "@/api/admin/dict";
|
||||
export default {
|
||||
name: 'operation-out',
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
searchData: {
|
||||
currentDate: this.formattedDate()
|
||||
},
|
||||
searchForm: {},
|
||||
site: getStore({name: 'tenantId'}),
|
||||
resrceDialogObj: {...resrceDialogObj}, // 设备
|
||||
openResrceList: null,
|
||||
@ -234,16 +268,20 @@ export default {
|
||||
shopOrderDialogObj: {...shopOrderDialogObj}, // 生产订单
|
||||
openShopOrderList: null,
|
||||
shopOrderDialogVisible: false,
|
||||
selectRollType: [],// 膜卷类型
|
||||
selectInspecLevel: [],// 检验等级
|
||||
minValue: 0, // 最小值,这里是 0,只能输入正整数
|
||||
resrceIsDisabled: false, // 控制设备输入框是否禁用
|
||||
operationIsDisabled: false, // 控制工序输入框是否禁用
|
||||
shopOrderIsDisabled: false, // 控制工单输入框是否禁用
|
||||
operationList: [], // 作业规则维护的工序列表
|
||||
selectedRows: [], // 选中行数据列表
|
||||
autoRollType: null, // 是否展示膜卷类型
|
||||
getInspecLevel: null, // 判断列表中质检状态是否可选
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchForm = Object.assign({}, this.searchForm);
|
||||
this.searchForm = Object.assign({}, this.searchData);
|
||||
// 获取跳转参数
|
||||
if (this.$route.query.resrce) {
|
||||
this.searchForm.resrce = this.$route.query.resrce
|
||||
@ -267,6 +305,35 @@ export default {
|
||||
}
|
||||
this.initList(activityId, this);
|
||||
},
|
||||
//监听路由变化
|
||||
watch: {
|
||||
$route:function (){
|
||||
window.location.reload();
|
||||
this.searchForm = Object.assign({}, this.searchData); // 切换标签时不可使用原有搜索对象,不然会把上一个标签的内容带出来(同一路径情况)
|
||||
// 获取跳转参数
|
||||
if (this.$route.query.resrce) {
|
||||
this.searchForm.resrce = this.$route.query.resrce
|
||||
this.resrceIsDisabled = !this.resrceIsDisabled; // 切换禁用状态
|
||||
// 获取原膜数据
|
||||
this.getMembrane(this.site, this.$route.query.resrce);
|
||||
}
|
||||
if (this.$route.query.operation) {
|
||||
this.searchForm.operation = this.$route.query.operation
|
||||
this.operationIsDisabled = !this.operationIsDisabled; // 切换禁用状态
|
||||
}
|
||||
// 获取班次
|
||||
this.getUserWorkShift(this.site);
|
||||
// 获取作业规则
|
||||
let activityId = this.$route.query.ACTIVITY_ID
|
||||
// 处理作业规则数据,跳转过来的会带上?pure-page=Y
|
||||
let index = activityId.indexOf("?");
|
||||
if (index !== -1) {
|
||||
// 截取 "?" 之前的部分
|
||||
activityId = activityId.substring(0, index);
|
||||
}
|
||||
this.initList(activityId, this);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
//读取权限
|
||||
...mapGetters(['permissions', 'userInfo']),
|
||||
@ -279,6 +346,16 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 获取数据字典
|
||||
getDataDictionary(dictType, list) {
|
||||
fetchDictList({
|
||||
current: "1",
|
||||
size: "1000",
|
||||
dictType: dictType,
|
||||
}).then((response) => {
|
||||
this[list] = response.data.data.records
|
||||
});
|
||||
},
|
||||
//选中行赋值
|
||||
handleSelectionChange(selection) {
|
||||
this.selectedRows = selection;
|
||||
@ -296,13 +373,24 @@ export default {
|
||||
}
|
||||
let optionList = response.data.data
|
||||
for(let i=0;i<optionList.length;i++){
|
||||
// 工序列表
|
||||
if(optionList[i].optionName === 'AUTO_RELEASABLE_LOT'){
|
||||
that.operationList = optionList[i].optionValue.split(",")
|
||||
that.operationList = optionList[i].optionValue.split(";")
|
||||
}
|
||||
// 是否展示膜卷类型
|
||||
if(optionList[i].optionName === 'AUTO_ROLL_TYPE'){
|
||||
that.autoRollType = optionList[i].optionValue
|
||||
}
|
||||
// 判断列表中质检状态是否可选
|
||||
if(optionList[i].optionName === 'GET_INSPEC_LEVEL'){
|
||||
that.getInspecLevel = optionList[i].optionValue
|
||||
}
|
||||
}
|
||||
}).catch(e => {
|
||||
hideLoading()
|
||||
})
|
||||
this.getDataDictionary("roll_type", "selectRollType");// 膜卷类型
|
||||
this.getDataDictionary("INSPEC_LEVEL", "selectInspecLevel");// 检验等级
|
||||
},
|
||||
// 选择工单获取列表数据
|
||||
readOperationOutListByShopOrder(site, shopOrder) {
|
||||
@ -369,6 +457,8 @@ export default {
|
||||
const item = this.searchForm.operationOutData.find(item => item.shopOrder === response.data.data.operationOutListDTOList[0].shopOrder && item.item === response.data.data.operationOutListDTOList[0].item);
|
||||
if (item) {
|
||||
item.lotNo = response.data.data.operationOutListDTOList[0].lotNo
|
||||
item.lotStateBo = response.data.data.operationOutListDTOList[0].lotStateBo
|
||||
item.lotSerial = response.data.data.operationOutListDTOList[0].lotSerial
|
||||
item.itemDescription = response.data.data.operationOutListDTOList[0].itemDescription
|
||||
item.inspectionLevel = response.data.data.operationOutListDTOList[0].inspectionLevel
|
||||
item.width = response.data.data.operationOutListDTOList[0].width
|
||||
@ -401,6 +491,8 @@ export default {
|
||||
this.searchForm.membraneMeter = response.data.data.membraneMeter
|
||||
this.searchForm.membraneRemainMeter = response.data.data.membraneRemainMeter
|
||||
this.searchForm.membraneLevel = response.data.data.membraneLevel
|
||||
this.searchForm.membraneWidth = response.data.data.membraneWidth
|
||||
this.searchForm.membraneType = response.data.data.membraneType
|
||||
} else {
|
||||
// 置空
|
||||
const k = ""
|
||||
@ -408,6 +500,8 @@ export default {
|
||||
this.searchForm.membraneMeter = k
|
||||
this.searchForm.membraneRemainMeter = k
|
||||
this.searchForm.membraneLevel = k
|
||||
this.searchForm.membraneWidth = k
|
||||
this.searchForm.membraneType = k
|
||||
}
|
||||
this.searchForm = Object.assign({}, this.searchForm)
|
||||
}
|
||||
@ -438,41 +532,58 @@ export default {
|
||||
},
|
||||
// 出站
|
||||
operationOut() {
|
||||
this.$confirm(`是否确认出站?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// 不是首工序且不在作业规则内,列表必须有选择的数据且条码不能为空
|
||||
if (this.selectedRows.length === 0) {
|
||||
return this.$message.warning("请先选中列表中数据!");
|
||||
} else {
|
||||
for (let i=0; i<this.selectedRows.length; i++) {
|
||||
if (!this.selectedRows[i].outMeter) {
|
||||
return this.$message.warning("勾选列表存在未输入的数量!");
|
||||
}
|
||||
this.$refs.searchForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm(`是否确认出站?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// 不是首工序且不在作业规则内,列表必须有选择的数据且条码不能为空
|
||||
if (this.selectedRows.length === 0) {
|
||||
return this.$message.warning("请先选中列表中数据!");
|
||||
} else {
|
||||
for (let i=0; i<this.selectedRows.length; i++) {
|
||||
if (!this.selectedRows[i].outMeter) {
|
||||
return this.$message.warning("勾选列表存在未输入的数量!");
|
||||
}
|
||||
if (this.getInspecLevel === 'Y' && !this.selectedRows[i].inspectionLevel) {
|
||||
return this.$message.warning("勾选列表存在未选择的质检等级!");
|
||||
}
|
||||
}
|
||||
}
|
||||
showLoading();
|
||||
// 按分号分割工单字符串
|
||||
let shopOrderList = this.searchForm.shopOrder.split(";")
|
||||
operationOut({
|
||||
site: this.site,
|
||||
operation: this.searchForm.operation,
|
||||
resrce: this.searchForm.resrce,
|
||||
operationList: this.operationList,
|
||||
operationOutListDTOList: this.selectedRows,
|
||||
shopOrderList: shopOrderList
|
||||
}).then((response) => {
|
||||
hideLoading();
|
||||
if (response.data.code !== 0) {
|
||||
this.$message.error(response.data.message);
|
||||
} else {
|
||||
this.$message.success(`工序【${this.searchForm.operation}】出站完成!`);
|
||||
// 清除条码和输入框
|
||||
this.searchForm.operationOutData.forEach(item => {
|
||||
item.lotNo = '';
|
||||
item.outMeter = '';
|
||||
item.remark = '';
|
||||
if (this.getInspecLevel === 'Y') {
|
||||
item.inspectionLevel = '';
|
||||
}
|
||||
})
|
||||
this.searchForm = Object.assign({}, this.searchForm)
|
||||
}
|
||||
}).catch(() => {
|
||||
hideLoading();
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
showLoading();
|
||||
// 按分号分割工单字符串
|
||||
let shopOrderList = this.searchForm.shopOrder.split(";")
|
||||
operationOut({
|
||||
site: this.site,
|
||||
operation: this.searchForm.operation,
|
||||
resrce: this.searchForm.resrce,
|
||||
operationList: this.operationList,
|
||||
operationOutListDTOList: this.selectedRows,
|
||||
shopOrderList: shopOrderList
|
||||
}).then((response) => {
|
||||
hideLoading();
|
||||
if (response.data.code !== 0) {
|
||||
this.$message.error(response.data.message);
|
||||
} else {
|
||||
this.$message.success(`工序【${this.searchForm.operation}】出站完成!`);
|
||||
}
|
||||
}).catch(() => {
|
||||
hideLoading();
|
||||
});
|
||||
})
|
||||
},
|
||||
// 清空事件
|
||||
|
||||
777
src/views/mes/wms-nalinv/poRegister/index.vue
Normal file
777
src/views/mes/wms-nalinv/poRegister/index.vue
Normal file
@ -0,0 +1,777 @@
|
||||
<template>
|
||||
<div class="execution">
|
||||
<!-- 单据号弹出框 -->
|
||||
<input-select-dialog :modal-obj="documentDialogObj" :modal-fetch-fun="documentDialogFetchFun"
|
||||
:modal-show.sync="showDocumentDialogVisible"
|
||||
@inputDialogSelected="documentDialogSelected"></input-select-dialog>
|
||||
|
||||
<!-- PO单弹出框 -->
|
||||
<input-select-dialog :modal-obj='poDialogObj'
|
||||
:modal-fetch-fun='poDialogFetchFun'
|
||||
:modal-show.sync="showPoDialogVisible"
|
||||
@inputDialogSelected="poDialogSelected"></input-select-dialog>
|
||||
|
||||
<!-- PO登记单弹出框 -->
|
||||
<input-select-dialog :modal-obj='poRegisterDialogObj'
|
||||
:modal-fetch-fun='poRegisterDialogFetchFun'
|
||||
:modal-show.sync="showPoRegisterDialogVisible"
|
||||
@inputDialogSelected="poRegisterDialogSelected"></input-select-dialog>
|
||||
|
||||
<el-dialog title="收货登记"
|
||||
:fullscreen="true"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
custom-class="custom-dialog"
|
||||
:visible.sync="dialogRegisterVisible"
|
||||
@close="dialogRegisterVisible = false"
|
||||
center>
|
||||
<el-form :model="registerFormObj" label-width="100px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="采购订单" :rules="{ required: true, message: '请选择采购订单', trigger: 'blur' }">
|
||||
<el-input v-model="registerFormObj.po" clearable>
|
||||
<i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showPoRegisterDialogVisible = true"></i>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="registerFormObj.customerNo" :disabled='true' ></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="采购日期">
|
||||
<el-input v-model="registerFormObj.procurementDate" :disabled='true' ></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="采购组">
|
||||
<el-input v-model="registerFormObj.purchaser" :disabled='true' ></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="过账日期">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
v-model="registerFormObj.postingDate"
|
||||
type="date"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-tabs>
|
||||
<el-tab-pane label="单据明细">
|
||||
<el-table :data="documentRegisterList" max-height="360"
|
||||
:header-cell-style="{ 'text-align': 'center' }"
|
||||
row-key="bseg"
|
||||
ref="documentRegister"
|
||||
default-expand-all
|
||||
:tree-props="{children: 'children'}"
|
||||
:cell-style="{ 'text-align': 'center' }" tooltip-effect="dark" border style="width: 100%">
|
||||
<el-table-column label="操作" width="60" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
<!-- 添加 -->
|
||||
<el-button icon="el-icon-circle-plus-outline" type="primary" size="mini" v-if="scope.row.state != 'SON'" @click="addRowData(scope.row)"></el-button>
|
||||
<!-- 减少 -->
|
||||
<el-button icon="el-icon-remove-outline" type="danger" size="mini" v-if="scope.row.state === 'SON'" @click="removeRowData(scope.row)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="bseg" width="60" fixed="left" label="序号"></el-table-column>
|
||||
<el-table-column prop="matnr" label="物料"></el-table-column>
|
||||
<el-table-column prop="itemDesc" label="物料名称"></el-table-column>
|
||||
<el-table-column prop="batch" label="供应商批次" width="110">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.supplierBatch" clearable></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="productionDate" label="生产日期" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
v-model="scope.row.productionDate"
|
||||
type="date"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="qty" label="采购数量"></el-table-column>
|
||||
<el-table-column prop="registeredQty" label="已登记数量" width="110"></el-table-column>
|
||||
<el-table-column prop="completedQty" label="已入库数量" width="110"></el-table-column>
|
||||
<el-table-column prop="actualQuantity" label="本次到货数量" width="110">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.actualQuantity" type="number"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unit" label="单位"></el-table-column>
|
||||
<el-table-column prop="uebto" label="过量收货比例%" width="130"></el-table-column>
|
||||
<el-table-column prop="untto" label="交货不足比例%" width="130"></el-table-column>
|
||||
<el-table-column prop="storagLocation" label="到货仓库"></el-table-column>
|
||||
<el-table-column prop="eindt" label="计划交货日期" width="110"></el-table-column>
|
||||
<el-table-column prop="vbeln" label="销售订单号" width="110"></el-table-column>
|
||||
<el-table-column prop="vbelp" label="销售订单行号" width="110"></el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitRegisterDataAction">提 交</el-button>
|
||||
<el-button @click="dialogRegisterVisible = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<basic-container>
|
||||
<c-top-bar :offset="30" style="margin-top: -30px; margin-bottom: 40px">
|
||||
<el-button type="text" icon="el-icon-search" @click="searchFormObjAction">检索</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-button type="text" icon="el-icon-circle-check" @click="searchCleanAction">{{ $t('crud.emptyBtn') }}
|
||||
</el-button>
|
||||
</c-top-bar>
|
||||
|
||||
<el-form :model="searchFormObj" label-width="120px" ref="searchFormObj">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="采购订单号" prop="po">
|
||||
<el-input v-model="searchFormObj.po" clearable>
|
||||
<i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showPoDialogVisible = true"></i>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商" prop="customerNo">
|
||||
<el-input v-model="searchFormObj.customerNo" clearable>
|
||||
<!-- <i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showPoDialogVisible = true"></i>-->
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="采购到货单" prop="documentNo">
|
||||
<el-input v-model="searchFormObj.documentNo" clearable>
|
||||
<!-- <i slot="suffix" class="el-input__icon el-icon-copy-document" @click.stop="showPoDialogVisible = true"></i>-->
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-button type="primary" @click="showRegisterDialog">登记</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8"></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<el-table :data="documentList" max-height="360"
|
||||
:header-cell-style="{ 'text-align': 'center' }"
|
||||
highlight-current-row
|
||||
ref="mtrlConsMultipleTable"
|
||||
:cell-style="{ 'text-align': 'center' }" tooltip-effect="dark" border style="width: 100%">
|
||||
<el-table-column type="index" width="60" fixed="left" label="序号"></el-table-column>
|
||||
<el-table-column prop="po" label="采购订单号"></el-table-column>
|
||||
<el-table-column prop="documentNo" label="采购到货单号" width="120"></el-table-column>
|
||||
<el-table-column prop="state" label="到货单状态"></el-table-column>
|
||||
<el-table-column prop="customerNo" label="供应商"></el-table-column>
|
||||
<el-table-column prop="procurementDate" label="采购日期"></el-table-column>
|
||||
<el-table-column prop="purchaser" label="采购组"></el-table-column>
|
||||
<el-table-column prop="createDate" label="登记日期" width="165"></el-table-column>
|
||||
<el-table-column prop="createUser" label="登记人"></el-table-column>
|
||||
<el-table-column label="操作" width="80" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<!-- 查看 -->
|
||||
<el-button class="custom-mini-button" size="mini" style="margin-left: 5px">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div
|
||||
style="width: 100%; display: flex; margin-top: 10px; flex-direction: column; align-items: end; justify-content: center">
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="page.currentPage"
|
||||
:page-sizes="[5, 10, 20, 50]"
|
||||
:page-size="page.pageSize"
|
||||
background
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="page.total"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</basic-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getStore} from '@/util/store';
|
||||
|
||||
//引入相关样式
|
||||
import {hideLoading, showLoading} from '@/const/loading';
|
||||
import {fetchItemList as fetchDictList} from '@/api/admin/dict';
|
||||
import {
|
||||
callErpLotCompleteTransaction, callErpMaterialTransaction,
|
||||
callErpShopOrderStatisticsTransaction, callErpSoStatistCancelTransaction,
|
||||
getMaterialCompleteTransactionPage,
|
||||
getMaterialConsumptionTransactionPage,
|
||||
getShopOrderStatisticsTransactionPage
|
||||
} from "@/api/mes/wip-nalinv/reportSap";
|
||||
import {fetchList as userShiftFetchList} from "@/api/mes/prd/work-group/user-work-shift/user-work-shift";
|
||||
import {fetchList as fabNoFetchList} from "@/api/mes/smd/fab-basis";
|
||||
import {fetchList as fetchWorkCenterList} from "@/api/mes/prd/work-center";
|
||||
import {copyJSON} from "@/util/util";
|
||||
import moment from 'moment';
|
||||
import {isBlank} from "@/util/string";
|
||||
import {
|
||||
findPoOrderDataByPo,
|
||||
getDetailByPo,
|
||||
getDocumentPage,
|
||||
getPoPage,
|
||||
saveDocumentDetailData
|
||||
} from "@/api/mes/wms-nalinv/poRegister";
|
||||
|
||||
export default {
|
||||
name: 'po-register',
|
||||
mixins: [],
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
username: getStore({name: 'userInfo'}).username,
|
||||
registerFormObj: {
|
||||
po: "",
|
||||
purchaser: "",
|
||||
procurementDate: "",
|
||||
customerNo: "",
|
||||
postingDate: ""
|
||||
},
|
||||
dialogRegisterVisible: false,
|
||||
documentList: [],
|
||||
documentRegisterList: [
|
||||
{
|
||||
bseg: 10,
|
||||
matnr: '2000192',
|
||||
qty: 10,
|
||||
vbeln: "10001",
|
||||
children: [
|
||||
{
|
||||
bseg: 11,
|
||||
matnr: '200013',
|
||||
qty: 15,
|
||||
vbeln: "10001",
|
||||
state: 'SON'
|
||||
},{
|
||||
bseg: 12,
|
||||
matnr: '2000145',
|
||||
qty: 20,
|
||||
vbeln: "10001",
|
||||
state: 'SON'
|
||||
}
|
||||
]
|
||||
},{
|
||||
bseg: 20,
|
||||
matnr: '2000192',
|
||||
qty: 10,
|
||||
vbeln: "10001",
|
||||
children: [
|
||||
{
|
||||
bseg: 21,
|
||||
matnr: '200013',
|
||||
qty: 18,
|
||||
vbeln: "10001",
|
||||
state: 'SON'
|
||||
},{
|
||||
bseg: 22,
|
||||
matnr: '2000145',
|
||||
qty: 25,
|
||||
vbeln: "10001",
|
||||
state: 'SON'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
searchFormObj: {
|
||||
site: getStore({name: 'tenantId'}),
|
||||
po: '',
|
||||
customerNo: '',
|
||||
documentNo: ''
|
||||
},
|
||||
|
||||
showDocumentDialogVisible: false,
|
||||
documentDialogFetchFun: getDocumentPage,
|
||||
documentDialogObj: {
|
||||
title: '单据',
|
||||
condition: 'searchText',
|
||||
tableColumn: [
|
||||
{prop: 'documentNo', label: '单据'},
|
||||
{prop: 'documentType', label: '单据类型'}
|
||||
]
|
||||
},
|
||||
|
||||
showPoDialogVisible: false,
|
||||
poDialogFetchFun: getPoPage,
|
||||
poDialogObj: {
|
||||
"condition": "po",
|
||||
tableColumn: [
|
||||
{prop: "po", label: "采购订单"},
|
||||
{prop: "procurementDate", label: "采购日期"}
|
||||
],
|
||||
queryParam: {
|
||||
businessType: 'Z001'
|
||||
}
|
||||
},
|
||||
|
||||
showPoRegisterDialogVisible: false,
|
||||
poRegisterDialogFetchFun: getPoPage,
|
||||
poRegisterDialogObj: {
|
||||
"condition": "po",
|
||||
tableColumn: [
|
||||
{prop: "po", label: "采购订单"},
|
||||
{prop: "procurementDate", label: "采购日期"}
|
||||
],
|
||||
queryParam: {
|
||||
businessType: 'Z001'
|
||||
}
|
||||
},
|
||||
|
||||
rules: {
|
||||
fabNo: [
|
||||
{ required: true, message: '请选择车间', trigger: 'blur' }
|
||||
],
|
||||
startTime: [
|
||||
{ required: true, message: '请选择日期', trigger: 'blur' }
|
||||
],
|
||||
endTime: [
|
||||
{ required: true, message: '请选择日期', trigger: 'blur' }
|
||||
],
|
||||
},
|
||||
page: {
|
||||
total: 0, // 总页数
|
||||
currentPage: 1, // 当前页数
|
||||
pageSize: 20 // 每页显示多少条
|
||||
},
|
||||
pageCom: {
|
||||
total: 0, // 总页数
|
||||
currentPage: 1, // 当前页数
|
||||
pageSize: 20 // 每页显示多少条
|
||||
},
|
||||
wipRe: {
|
||||
total: 0, // 总页数
|
||||
currentPage: 1, // 当前页数
|
||||
pageSize: 20 // 每页显示多少条
|
||||
},
|
||||
wipReportSelection: [],
|
||||
mtrlConsSelection: [],
|
||||
mtrlCompleteSelection: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// avue option 翻譯 用
|
||||
// this.getDataDictionary('sap_sync_status', 'statusList')
|
||||
},
|
||||
computed: {},
|
||||
|
||||
mounted() {
|
||||
let me = this;
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
// 获取数据字典
|
||||
getDataDictionary(dictType, list) {
|
||||
fetchDictList({
|
||||
current: '1',
|
||||
size: '1000',
|
||||
dictType: dictType
|
||||
}).then(response => {
|
||||
this[list] = copyJSON(response.data.data.records)
|
||||
})
|
||||
},
|
||||
|
||||
// 检索事件
|
||||
searchFormObjAction() {
|
||||
let me = this;
|
||||
showLoading();
|
||||
findPoOrderDataByPo(Object.assign({
|
||||
current: this.page.currentPage,
|
||||
size: this.page.pageSize
|
||||
}, me.searchFormObj))
|
||||
.then(res => {
|
||||
hideLoading();
|
||||
me.documentList = res.data.data.records;
|
||||
this.page.total = res.data.data.records.length;
|
||||
})
|
||||
.catch(error => {
|
||||
hideLoading();
|
||||
});
|
||||
},
|
||||
|
||||
// 单据选定事件
|
||||
documentDialogSelected(row) {
|
||||
let me = this;
|
||||
me.searchFormObj.fabNo = row.fabNo;
|
||||
me.searchFormObj.fabNoBo = row.handle;
|
||||
},
|
||||
|
||||
// 采购订单选定事件
|
||||
poDialogSelected(row) {
|
||||
let me = this;
|
||||
me.searchFormObj.po = row.po;
|
||||
},
|
||||
|
||||
// 采购订单登记弹出框选定事件
|
||||
poRegisterDialogSelected(row) {
|
||||
let me = this;
|
||||
me.registerFormObj.po = row.po;
|
||||
me.registerFormObj.procurementDate = row.procurementDate;
|
||||
me.registerFormObj.purchaser = row.purchaser;
|
||||
me.registerFormObj.customerNo = row.customerNo;
|
||||
me.searchPoDetailAction();
|
||||
},
|
||||
|
||||
// 检索采购订单明细
|
||||
searchPoDetailAction(){
|
||||
let me = this;
|
||||
showLoading();
|
||||
getDetailByPo(me.registerFormObj.po).then(res => {
|
||||
hideLoading();
|
||||
me.documentRegisterList = res.data.data;
|
||||
}).catch(error => {
|
||||
hideLoading();
|
||||
});
|
||||
},
|
||||
|
||||
// 添加一行
|
||||
addRowData(row){
|
||||
let me = this;
|
||||
let rowObj = {};
|
||||
Object.assign(rowObj,row);
|
||||
rowObj.parentBseg = row.bseg;
|
||||
rowObj.state = 'SON';
|
||||
debugger
|
||||
if(row.state != 'SON'){
|
||||
let newAra= [];
|
||||
for (let i = 0; i < me.documentRegisterList.length; i++) {
|
||||
let srcObj = me.documentRegisterList[i];
|
||||
if(srcObj.bseg === row.bseg && srcObj.matnr === row.matnr){
|
||||
if(srcObj.children===undefined){
|
||||
srcObj.children = [];
|
||||
rowObj.bseg = row.bseg+1;
|
||||
// rowObj.batch = '';
|
||||
// rowObj.actualQuantity = '';
|
||||
// rowObj.productionDate = null;
|
||||
srcObj.children.push(rowObj);
|
||||
}else{
|
||||
delete rowObj.children;
|
||||
const lengdthSon = srcObj.children.length;
|
||||
rowObj.bseg = srcObj.bseg+lengdthSon+1;
|
||||
// rowObj.batch = '';
|
||||
// rowObj.actualQuantity = '';
|
||||
// rowObj.productionDate = null;
|
||||
srcObj.children.push(rowObj);
|
||||
}
|
||||
}
|
||||
newAra.push(srcObj);
|
||||
}
|
||||
me.documentRegisterList = newAra;
|
||||
}
|
||||
},
|
||||
|
||||
// 移除一行
|
||||
removeRowData(row){
|
||||
let me = this;
|
||||
let newAra= [];
|
||||
for (let i = 0; i < me.documentRegisterList.length; i++) {
|
||||
let srcObj = me.documentRegisterList[i];
|
||||
if(srcObj.bseg === row.parentBseg && srcObj.matnr === row.matnr){
|
||||
let childrenArr = [];
|
||||
for (let j = 0; j < srcObj.children.length; j++) {
|
||||
let currentChildren = srcObj.children[j];
|
||||
if(currentChildren.bseg != row.bseg){
|
||||
currentChildren.bseg = srcObj.bseg+j;
|
||||
childrenArr.push(currentChildren);
|
||||
}
|
||||
}
|
||||
srcObj.children = childrenArr;
|
||||
}else{
|
||||
newAra.push(srcObj);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
showRegisterDialog(){
|
||||
let me = this;
|
||||
me.documentRegisterList = [];
|
||||
me.dialogRegisterVisible = true;
|
||||
},
|
||||
|
||||
// 登记提交事件
|
||||
submitRegisterDataAction(){
|
||||
let me = this;
|
||||
let dataList = me.documentRegisterList;
|
||||
if(dataList.length<1){
|
||||
this.$message.error('错误:单据明细不能为空');
|
||||
return;
|
||||
}else if(isBlank(me.registerFormObj.postingDate)){
|
||||
this.$message.error('请选择过账日期');
|
||||
return;
|
||||
}else{
|
||||
let newArray = [];
|
||||
const po = me.registerFormObj.po;
|
||||
let seq = 0;
|
||||
for (let i = 0; i < dataList.length; i++) {
|
||||
let sumQty = 0;
|
||||
const rowObj = dataList[i];
|
||||
if(!isBlank(rowObj.actualQuantity)){
|
||||
seq = seq + 10;
|
||||
sumQty = sumQty + rowObj.actualQuantity;
|
||||
newArray.push({
|
||||
externalNo: po,
|
||||
seq: seq,
|
||||
externalSeq: rowObj.bseg,
|
||||
postingDate: me.registerFormObj.postingDate,
|
||||
knttp: rowObj.knttp,
|
||||
storagLocation: rowObj.storagLocation,
|
||||
supplierBatch: rowObj.supplierBatch,
|
||||
salesOrder: rowObj.vbeln,
|
||||
salesOrderSeq: rowObj.vbelp,
|
||||
productionDate: rowObj.productionDate,
|
||||
batch: rowObj.batch,
|
||||
item: rowObj.matnr,
|
||||
applicationsQuantity: rowObj.actualQuantity,
|
||||
unitOfMeasure: rowObj.unit
|
||||
});
|
||||
if(rowObj.children != undefined){
|
||||
for (let j = 0; j < rowObj.children.length; j++) {
|
||||
let currentChildren = rowObj.children[j];
|
||||
if(!isBlank(currentChildren.actualQuantity)){
|
||||
seq = seq + 10;
|
||||
sumQty = sumQty+currentChildren.actualQuantity
|
||||
newArray.push({
|
||||
externalNo: po,
|
||||
seq: seq,
|
||||
externalSeq: currentChildren.bseg,
|
||||
postingDate: me.registerFormObj.postingDate,
|
||||
knttp: currentChildren.knttp,
|
||||
storagLocation: currentChildren.storagLocation,
|
||||
supplierBatch: currentChildren.supplierBatch,
|
||||
salesOrder: currentChildren.vbeln,
|
||||
salesOrderSeq: currentChildren.vbelp,
|
||||
productionDate: currentChildren.productionDate,
|
||||
batch: currentChildren.batch,
|
||||
item: currentChildren.matnr,
|
||||
applicationsQuantity: currentChildren.actualQuantity,
|
||||
unitOfMeasure: currentChildren.unit
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if(sumQty>rowObj.qty){
|
||||
this.$message.error(rowObj.matnr+ '收货数量已经大于采购数量之合');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(newArray.length>0){
|
||||
// 发送给后台处理
|
||||
showLoading();
|
||||
saveDocumentDetailData(newArray).then(res => {
|
||||
hideLoading();
|
||||
this.$message.success("执行成功");
|
||||
me.dialogRegisterVisible = false;
|
||||
}).catch(error => {
|
||||
hideLoading();
|
||||
});
|
||||
}else{
|
||||
this.$message.error("本次到货数量不能为空");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 清除动作
|
||||
searchCleanAction() {
|
||||
let me = this;
|
||||
me.searchFormObj = {
|
||||
site: getStore({name: 'tenantId'}),
|
||||
u8Code: '',
|
||||
outState: '',
|
||||
type: '',
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
};
|
||||
me.materialConsumptionList = [];
|
||||
me.wipReportList = [];
|
||||
me.materialCompleteList = [];
|
||||
},
|
||||
|
||||
handleWipReSizeChange(val) {
|
||||
this.wipRe.pageSize = val;
|
||||
},
|
||||
handleWipReCurrentChange(val) {
|
||||
this.wipRe.currentPage = val;
|
||||
},
|
||||
|
||||
handlePageComSizeChange(val) {
|
||||
this.pageCom.pageSize = val;
|
||||
},
|
||||
handlePageComCurrentChange(val) {
|
||||
this.pageCom.currentPage = val;
|
||||
},
|
||||
|
||||
handleSizeChange(val) {
|
||||
this.page.pageSize = val;
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.page.currentPage = val;
|
||||
},
|
||||
|
||||
getRowKey(row) {
|
||||
return row.id;
|
||||
},
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
|
||||
// 字典状态值映射通用
|
||||
getValConvertShow(srcVal, sourceList) {
|
||||
let me = this;
|
||||
let obj = sourceList.find(item => item.value === srcVal);
|
||||
return obj != undefined ? obj.label : srcVal;
|
||||
},
|
||||
|
||||
// 同步扣料数据报工数据
|
||||
materialSyncAction(postingDate){
|
||||
let me = this;
|
||||
if(me.mtrlConsSelection.length>0){
|
||||
me.mtrlConsSelection.forEach(ite=>{
|
||||
ite.syncPostingDate = postingDate;
|
||||
});
|
||||
showLoading();
|
||||
callErpMaterialTransaction(me.mtrlConsSelection).then(res => {
|
||||
hideLoading();
|
||||
this.$message.success('同步成功');
|
||||
me.searchFormObjAction();
|
||||
}).catch(error => {
|
||||
hideLoading();
|
||||
this.$message.error('错误:'+error);
|
||||
me.searchFormObjAction();
|
||||
});
|
||||
}else{
|
||||
this.$message.error('请选择数据');
|
||||
}
|
||||
},
|
||||
|
||||
// 同步批次完工报工数据
|
||||
lotSyncAction(postingDate){
|
||||
let me = this;
|
||||
if(me.mtrlCompleteSelection.length>0){
|
||||
me.mtrlCompleteSelection.forEach(ite=>{
|
||||
ite.syncPostingDate = postingDate;
|
||||
});
|
||||
showLoading();
|
||||
callErpLotCompleteTransaction(me.mtrlCompleteSelection).then(res => {
|
||||
hideLoading();
|
||||
this.$message.success('同步成功');
|
||||
me.searchFormObjAction();
|
||||
}).catch(error => {
|
||||
hideLoading();
|
||||
this.$message.error('错误:'+error);
|
||||
me.searchFormObjAction();
|
||||
});
|
||||
}else{
|
||||
this.$message.error('请选择数据');
|
||||
}
|
||||
},
|
||||
|
||||
// 同步工单报工数据
|
||||
soSyncAction(postingDate){
|
||||
let me = this;
|
||||
if(me.wipReportSelection.length>0){
|
||||
me.wipReportSelection.forEach(ite=>{
|
||||
ite.syncPostingDate = postingDate;
|
||||
});
|
||||
showLoading();
|
||||
callErpShopOrderStatisticsTransaction(me.wipReportSelection).then(res => {
|
||||
hideLoading();
|
||||
this.$message.success('同步成功');
|
||||
me.searchFormObjAction();
|
||||
}).catch(error => {
|
||||
hideLoading();
|
||||
me.searchFormObjAction();
|
||||
});
|
||||
}else{
|
||||
this.$message.error('请选择数据');
|
||||
}
|
||||
},
|
||||
|
||||
// 同步工单报工取消事件
|
||||
soSyncCancelAction(){
|
||||
let me = this;
|
||||
if(me.wipReportSelection.length>0){
|
||||
showLoading();
|
||||
callErpSoStatistCancelTransaction(me.wipReportSelection).then(res => {
|
||||
hideLoading();
|
||||
this.$message.success('同步成功');
|
||||
me.searchFormObjAction();
|
||||
}).catch(error => {
|
||||
hideLoading();
|
||||
me.searchFormObjAction();
|
||||
});
|
||||
}else{
|
||||
this.$message.error('请选择数据');
|
||||
}
|
||||
},
|
||||
|
||||
// 物料消耗和完工入库确认抛送ERP
|
||||
postErpSure(){
|
||||
let me = this;
|
||||
if(isBlank(me.postingDateForm.postingDate)){
|
||||
this.$message.error('请设定过账日期');
|
||||
return;
|
||||
}
|
||||
me.dialogPostingDateVisible = false;
|
||||
if(me.activeName === 'materialComplete'){
|
||||
me.lotSyncAction(me.postingDateForm.postingDate);
|
||||
}else if(me.activeName === 'materialConsumption'){
|
||||
me.materialSyncAction(me.postingDateForm.postingDate);
|
||||
}else if(me.activeName === 'wipReportSap'){
|
||||
me.soSyncAction(me.postingDateForm.postingDate);
|
||||
}else{
|
||||
this.$message.error('未获取到正确到报工选项');
|
||||
}
|
||||
me.postingDateForm.postingDate = '';
|
||||
},
|
||||
|
||||
wipReportSelectionChange(val){
|
||||
this.wipReportSelection = val;
|
||||
},
|
||||
|
||||
mtrlConsSelectionChange(val){
|
||||
this.mtrlConsSelection = val;
|
||||
},
|
||||
|
||||
mtrlCompleteSelectionChange(val){
|
||||
this.mtrlCompleteSelection = val;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user