|
|
|
@ -11,19 +11,25 @@
|
|
|
|
|
<vxe-form-item title="生产工单编号" field="WoNo" span="12">
|
|
|
|
|
<template #default="params">
|
|
|
|
|
<!-- <div style="width: 196px;">{{ params.data.WoNo }}</div> -->
|
|
|
|
|
<vxe-input v-model="params.data.WoNo" disabled style="width:240px;"></vxe-input>
|
|
|
|
|
<vxe-input v-model="params.data.WoNo" disabled style="width:240px;" placeholder="系统自动生成"></vxe-input>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-form-item>
|
|
|
|
|
<vxe-form-item title="生产订单编号" field="IpoNo" span="12">
|
|
|
|
|
<template #default="params">
|
|
|
|
|
<!-- <div style="width: 196px;">{{ params.data.IpoNo }}</div> -->
|
|
|
|
|
<vxe-input v-model="params.data.IpoNo" disabled style="width:240px;"></vxe-input>
|
|
|
|
|
<vxe-input v-if="formTypeA=='edit'" v-model="params.data.IpoNo" disabled style="width:240px;"></vxe-input>
|
|
|
|
|
<vxe-select v-else="formTypeA=='add'" v-model="params.data.IpoNo" style="width:240px;" clearable
|
|
|
|
|
filterable @change="fnIpoNoChange" >
|
|
|
|
|
<template v-for="(item) in ipoSimpleList">
|
|
|
|
|
<vxe-option :value="item.key" :label="item.val"></vxe-option>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-select>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-form-item>
|
|
|
|
|
<vxe-form-item title="实物ID" field="EntityCode" span="12">
|
|
|
|
|
<template #default="params">
|
|
|
|
|
<vxe-select v-model="params.data.EntityCode" style="width:240px;" clearable filterable
|
|
|
|
|
v-bind:disabled="formTypeA == 'info'">
|
|
|
|
|
>
|
|
|
|
|
<template v-for="(item) in ipoEntityIds">
|
|
|
|
|
<vxe-option :value="item.key" :label="item.val"></vxe-option>
|
|
|
|
|
</template>
|
|
|
|
@ -32,7 +38,7 @@
|
|
|
|
|
</vxe-form-item>
|
|
|
|
|
<vxe-form-item title="出厂编号" field="FactoryNo" span="12">
|
|
|
|
|
<template #default="params">
|
|
|
|
|
<vxe-input v-model="params.data.FactoryNo" disabled style="width:240px;"></vxe-input>
|
|
|
|
|
<vxe-input v-model="params.data.FactoryNo" disabled style="width:240px;" placeholder="系统自动生成"></vxe-input>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-form-item>
|
|
|
|
|
<!-- <vxe-form-item title="供应商编码" field="SupplierCode" span="12">
|
|
|
|
@ -200,6 +206,7 @@ import { VXETable } from 'vxe-table'
|
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
import { map as _map } from 'lodash'
|
|
|
|
|
import * as ProductionWorkOrderApi from '@/api/gw/productionWorkOrder'
|
|
|
|
|
import * as ProductionOrderApi from '@/api/gw/productionOrder'
|
|
|
|
|
import { useDictStore } from '@/stores/dict'
|
|
|
|
|
import { storeToRefs } from 'pinia'
|
|
|
|
|
import * as BaseMaterialApi from '@/api/gw/baseMaterial'
|
|
|
|
@ -232,13 +239,13 @@ const formDataA: any = ref(
|
|
|
|
|
"MaterialsCode": "",
|
|
|
|
|
"MaterialsDesc": "",
|
|
|
|
|
"MaterialsBatch": "",
|
|
|
|
|
"Amount": "",
|
|
|
|
|
"Unit": "",
|
|
|
|
|
"Amount": "1",
|
|
|
|
|
"Unit": "台",
|
|
|
|
|
"PlanStartDate": dayjs().format("YYYY-MM-DD"),
|
|
|
|
|
"PlanFinishDate": dayjs().format("YYYY-MM-DD"),
|
|
|
|
|
"ActualStartDate": dayjs().format("YYYY-MM-DD"),
|
|
|
|
|
"ActualFinishDate": dayjs().format("YYYY-MM-DD"),
|
|
|
|
|
"WoStatus": "",
|
|
|
|
|
"WoStatus": "1",
|
|
|
|
|
"EntityCode": "",
|
|
|
|
|
"ProcessRouteNo": "",
|
|
|
|
|
"VoltageLevel": "",
|
|
|
|
@ -283,9 +290,29 @@ const ipoEntityIds: any = ref([])
|
|
|
|
|
|
|
|
|
|
const baseVoltages: any = ref([])
|
|
|
|
|
const ipoVoltages: any = ref([])
|
|
|
|
|
|
|
|
|
|
const ipoSimpleList:any = ref([])
|
|
|
|
|
// 挂载
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
})
|
|
|
|
|
const fnIpoNoChange =async (params: any) => {
|
|
|
|
|
if (ipoSimpleList.value) {
|
|
|
|
|
|
|
|
|
|
ipoSimpleList.value.forEach(async (item: any) => {
|
|
|
|
|
if (item.key == params.value) {
|
|
|
|
|
baseEntityIds.value = await BaseEntityIDApi.GetPoUnUsedEntityID(item.pono)
|
|
|
|
|
formDataA.value.EntityCode= ""
|
|
|
|
|
ipoEntityIds.value = []
|
|
|
|
|
baseEntityIds.value.forEach((item: any) => {
|
|
|
|
|
if (ipoEntityIds.value.indexOf(item.EntityId) == -1)
|
|
|
|
|
ipoEntityIds.value.push({ key: item.EntityId, val: item.EntityId })
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 打开弹窗
|
|
|
|
|
const open = async (type: string, row?: any) => {
|
|
|
|
|
console.log(row)
|
|
|
|
@ -302,9 +329,13 @@ const open = async (type: string, row?: any) => {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
ipoSimpleList.value = await ProductionOrderApi.GetEipSupplierIpoSimplleList()
|
|
|
|
|
|
|
|
|
|
//基础实物ID信息
|
|
|
|
|
//const filterEntityReq = {"filter": {"field": "entity_id","operator": "1","value": null}}
|
|
|
|
|
baseEntityIds.value = await BaseEntityIDApi.GetPoUnUsedEntityID(row.PoNo)
|
|
|
|
|
if(row){
|
|
|
|
|
baseEntityIds.value = await BaseEntityIDApi.GetPoUnUsedEntityID(row.PoNo)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ipoEntityIds.value = []
|
|
|
|
|
baseEntityIds.value.forEach((item: any) => {
|
|
|
|
@ -467,13 +498,13 @@ const fnResetA = () => {
|
|
|
|
|
"MaterialsCode": "",
|
|
|
|
|
"MaterialsDesc": "",
|
|
|
|
|
"MaterialsBatch": "",
|
|
|
|
|
"Amount": "",
|
|
|
|
|
"Unit": "",
|
|
|
|
|
"Amount": "1",
|
|
|
|
|
"Unit": "台",
|
|
|
|
|
"PlanStartDate": dayjs().format("YYYY-MM-DD"),
|
|
|
|
|
"PlanFinishDate": dayjs().format("YYYY-MM-DD"),
|
|
|
|
|
"ActualStartDate": dayjs().format("YYYY-MM-DD"),
|
|
|
|
|
"ActualFinishDate": dayjs().format("YYYY-MM-DD"),
|
|
|
|
|
"WoStatus": "",
|
|
|
|
|
"WoStatus": 1,
|
|
|
|
|
"EntityCode": "",
|
|
|
|
|
"ProcessRouteNo": "",
|
|
|
|
|
"VoltageLevel": "",
|
|
|
|
|