生产工单 UI/UX

main
siontion 7 months ago
parent a8b8282648
commit 96efb1a178

@ -1,5 +1,14 @@
import request from '@/config/axios' import request from '@/config/axios'
// 电压等级列表获取
export const GetPoUnUsedEntityID = async () => {
return await request.post({ url: `/DistributionBoxTesting/GetPoUnUsedEntityID` })
}
// 实物ID列表获取
export const GetBaseEntityIDList = async (data: any) => {
return await request.post({ url: `/DistributionBoxTesting/GetBaseEntityIDList`, data })
}
// 实物ID列表获取 // 实物ID列表获取
export const getPagingBaseEntityIDList = async (data: any) => { export const getPagingBaseEntityIDList = async (data: any) => {
return await request.post({ url: `/DistributionBoxTesting/GetPagingBaseEntityIDList`, data }) return await request.post({ url: `/DistributionBoxTesting/GetPagingBaseEntityIDList`, data })

@ -1,5 +1,11 @@
import request from '@/config/axios' import request from '@/config/axios'
// 电压等级列表获取
export const GetBaseVoltageList = async (data: any) => {
return await request.post({ url: `/DistributionBoxTesting/GetBaseVoltageList`, data })
}
// 电压等级列表获取 // 电压等级列表获取
export const getBaseVoltagePaging = async (data: any) => { export const getBaseVoltagePaging = async (data: any) => {
return await request.post({ url: `/DistributionBoxTesting/GetPagingBaseVoltageList`, data }) return await request.post({ url: `/DistributionBoxTesting/GetPagingBaseVoltageList`, data })

@ -354,6 +354,7 @@ const open = async (type: string, row?: any) => {
} }
baseMats.value =await BaseMaterialApi.GetBaseMaterialList(filterReq) baseMats.value =await BaseMaterialApi.GetBaseMaterialList(filterReq)
ipoMats.value = []
baseMats.value.Data.forEach( (item) => { baseMats.value.Data.forEach( (item) => {
if(ipoMats.value.indexOf(item.MatNo)==-1) if(ipoMats.value.indexOf(item.MatNo)==-1)
ipoMats.value.push({key:item.MatNo,val:item.MatNo}) ipoMats.value.push({key:item.MatNo,val:item.MatNo})

@ -52,31 +52,26 @@ const xGrid = ref()
const gridOptionsA: any = reactive({ const gridOptionsA: any = reactive({
columns: [ columns: [
{ field: 'PurchaserHqCode', title: '采购方总部编码', width: '120px', fixed: 'left' }, { field: 'BuyerName', title: '采购方公司名称', fixed: 'left', width: '190px'},
{ field: 'IpoNo', title: '供应商生产订单编号', sortable: true, width: '170px', fixed: 'left' }, { field: 'WoNo', title: '生产工单编码',fixed: 'left', width: '190px' },
{ field: 'SupplierCode', title: '供应商编码', sortable: true, width: '160px' }, { field: 'Amount', title: '生产数量', fixed: 'left', width: '190px'},
{ field: 'SupplierName', title: '供应商名称', width: '190px' }, { field: 'PoItemId', title: '采购订单行项目id', width: '190px'},
{ field: 'WoNo', title: '生产工单编码', width: '190px' }, { field: 'IpoNo', title: '生产订单号', width: '190px'},
{ field: 'CategoryCode', title: '品类编码', sortable: true, width: '160px' },
{ field: 'SubclassCode', title: '种类编码', sortable: true, width: '160px' }, { field: 'EntityCode', title: '实物ID ', width: '240px' },
{ field: 'MaterialsCode', title: '厂家物料编码', sortable: true, width: '160px' }, { field: 'FactoryNo', title: '出厂编号 ', width: '240px' },
{ field: 'MaterialsDesc', title: '厂家物料描述', sortable: true, width: '160px' },
{ field: 'MaterialsBatch', title: '物料批次', sortable: true, width: '160px' }, { field: 'MaterialsCode', title: '厂家物料编码', width: '160px' },
{ field: 'Amount', title: '生产数量', sortable: true, width: '160px' }, { field: 'MaterialsDesc', title: '厂家物料描述', width: '160px' },
{ field: 'Unit', title: '计量单位', sortable: true, width: '160px' }, { field: 'Unit', title: '计量单位', width: '160px' },
{ field: 'PlanStartDate', title: '计划开始日期', sortable: true, width: '160px' }, { field: 'PlanStartDate', title: '计划开始日期', width: '160px',formatter:formatTime },
{ field: 'PlanFinishDate', title: '计划完成日期', sortable: true, width: '160px' }, { field: 'PlanFinishDate', title: '计划完成日期', width: '160px',formatter:formatTime },
{ field: 'ActualStartDate', title: '实际开始日期', sortable: true, width: '160px' }, { field: 'ActualStartDate', title: '实际开始日期', width: '160px' ,formatter:formatTime},
{ field: 'ActualFinishDate', title: '实际完成日期', sortable: true, width: '160px' }, { field: 'ActualFinishDate', title: '实际完成日期', width: '160px',formatter:formatTime },
{ field: 'WoStatus', title: '工单状态', sortable: true, width: '160px' }, //{ field: 'WoStatus', title: '', width: '160px' },
{ field: 'EntityCode', title: '实物ID ', sortable: true, width: '160px' },
{ field: 'ProcessRouteNo', title: '工艺路线编码', sortable: true, width: '160px' },
{ field: 'VoltageLevel', title: '电压等级', sortable: true, width: '160px' }, { field: 'VoltageLevel', title: '电压等级', width: '160px' },
{ field: 'DataSource', title: '数据来源', sortable: true, width: '160px' },
{ field: 'DataSourceCreatetime', title: '来源数据创建时间', sortable: true, width: '160px' },
{ field: 'OwnerId', title: '数据拥有方', sortable: true, width: '160px' },
{ field: 'OpenId', title: '数据可见方', sortable: true, width: '160px' },
{ field: 'ModelSpec', title: '产品型号规格', sortable: true, width: '160px' },
{ title: '操作', width: 160, fixed: 'right', slots: { default: 'operate' } } { title: '操作', width: 160, fixed: 'right', slots: { default: 'operate' } }
], ],
pagerConfig: { pagerConfig: {
@ -94,10 +89,12 @@ const gridOptionsA: any = reactive({
titleWidth: 160, titleWidth: 160,
titleAlign: 'right', titleAlign: 'right',
items: [ items: [
{ field: 'purchaserHaCode', title: '采购方总部编码', span: 8, itemRender: { name: '$input', props: { placeholder: '请输入采购方总部编码' } } }, // { field: 'purchaserHaCode', title: '', span: 8, itemRender: { name: '$input', props: { placeholder: '' } } },
{ field: 'soNo', title: '销售订单号', span: 8, itemRender: { name: '$input', props: { placeholder: '请输入销售订单号' } } }, // { field: 'soNo', title: '', span: 8, itemRender: { name: '$input', props: { placeholder: '' } } },
{ field: 'buyerCode', title: '采购方公司编码', span: 8, itemRender: { name: '$input', props: { placeholder: '请输入采购方公司编码' } } }, // { field: 'buyerCode', title: '', span: 8, itemRender: { name: '$input', props: { placeholder: '' } } },
{ field: 'buyerName', title: '采购方公司名称', span: 8, itemRender: { name: '$input', props: { placeholder: '请输入采购方公司名称' } } }, { field: 'buyerName', title: '采购方公司名称', span: 8, itemRender: { name: '$input', props: { placeholder: '请输入采购方公司名称' } } },
{ field: 'WoNo', title: '生产工单编号', span: 8, itemRender: { name: '$input', props: { placeholder: '请输入生产工单编号' } } },
{ field: 'PoItemId', title: '采购订单行项目id', span: 8, itemRender: { name: '$input', props: { placeholder: '请输入采购订单行项目id' } } },
{ span: 24, align: 'center', collapseNode: true, itemRender: { name: '$buttons', children: [{ props: { type: 'submit', content: '查询', status: 'primary' } }, { props: { type: 'reset', content: '重置' } }] } } { span: 24, align: 'center', collapseNode: true, itemRender: { name: '$buttons', children: [{ props: { type: 'submit', content: '查询', status: 'primary' } }, { props: { type: 'reset', content: '重置' } }] } }
] ]
}, },
@ -182,6 +179,10 @@ const gridOptionsA: any = reactive({
} }
} }
}) })
function formatTime ({ cellValue, row, column }) {
if(cellValue != undefined)
return dayjs(cellValue).format("YYYY-MM-DD")
}
// //
const proxyReload = () => { const proxyReload = () => {
const $grid = xGrid.value const $grid = xGrid.value

@ -1,56 +1,60 @@
<template> <template>
<div class="xyp-sale-order-form" v-if="refShow"> <div class="xyp-sale-order-form" v-if="refShow">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="150" :data="formDataA" :rules="formRulesA" <vxe-form title-colon ref="refFormA" title-align="right" title-width="200" :data="formDataA" :rules="formRulesA"
@submit="fnSubmitA" @reset="fnResetA" custom-layout> @submit="fnSubmitA" @reset="fnResetA" custom-layout>
<vxe-modal v-model="refShow" width="1160" height="770" show-zoom show-footer> <vxe-modal v-model="refShow" width="1160" height="600" show-zoom show-footer>
<template #title> <template #title>
<span style="color:#ffffff">{{ modalTitle }}</span> <span style="color:#ffffff">{{ modalTitle }}</span>
</template> </template>
<template #default> <template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px"> <a-card title="基本数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="采购方总部编码" field="PurchaserHqCode" span="12"> <vxe-form-item title="生产工单编号" field="WoNo" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PurchaserHqCode }}</div> <!-- <div style="width: 196px;">{{ params.data.WoNo }}</div> -->
<!-- <vxe-input v-model="params.data.PurchaserHqCode" placeholder="请输入采购方总部编码" clearable <vxe-input v-model="params.data.WoNo" disabled style="width:240px;"></vxe-input>
@change="fnChangeA(params)"></vxe-input> -->
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="供应商生产订单编号" field="IpoNo" span="12"> <vxe-form-item title="生产订单编号" field="IpoNo" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.IpoNo }}</div> <!-- <div style="width: 196px;">{{ params.data.IpoNo }}</div> -->
<!-- <vxe-input v-model="params.data.IpoNo" :readonly="true"></vxe-input> --> <vxe-input v-model="params.data.IpoNo" disabled style="width:240px;"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="供应商编码" field="SupplierCode" span="12"> <vxe-form-item title="实物ID" field="EntityCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <vxe-select v-model="params.data.EntityCode" style="width:240px;" clearable filterable v-bind:disabled="formTypeA == 'info'">
<!-- <vxe-input v-model="params.data.SupplierCode" :readonly="true"></vxe-input> --> <template v-for="(item) in ipoEntityIds">
<vxe-option :value="item.key" :label="item.val"></vxe-option>
</template>
</vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="供应商名称" field="SupplierName" span="12"> <vxe-form-item title="出厂编号" field="FactoryNo" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierName }}</div> <vxe-input v-model="params.data.FactoryNo" disabled style="width:240px;"></vxe-input>
<!-- <vxe-input v-model="params.data.SupplierName" placeholder="请输入供应商名称" clearable
@change="fnChangeA(params)"></vxe-input> -->
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="生产工单编码" field="WoNo" span="12"> <!-- <vxe-form-item title="供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.WoNo }}</div> <div style="width: 196px;">{{ params.data.SupplierCode }}</div>
<!-- <vxe-input v-model="params.data.WoNo" placeholder="请输入生产工单编码" clearable <vxe-input v-model="params.data.SupplierCode" :readonly="true"></vxe-input>
@change="fnChangeA(params)"></vxe-input> -->
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="品类编码" field="CategoryCode" span="12"> <vxe-form-item title="供应商名称" field="SupplierName" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SupplierName }}</div>
<vxe-input v-model="params.data.SupplierName" placeholder="请输入供应商名称" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item> -->
<!-- <vxe-form-item title="品类编码" field="CategoryCode" span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.CategoryCode" clearable filterable> <vxe-select v-model="params.data.CategoryCode" clearable filterable>
<template v-for="(item) in dictCategoryCode"> <template v-for="(item) in dictCategoryCode">
<vxe-option :value="item.key" :label="item.val"></vxe-option> <vxe-option :value="item.key" :label="item.val"></vxe-option>
</template> </template>
</vxe-select> </vxe-select>
<!-- <div style="width: 196px;">{{ params.data.CategoryCode }}</div> -->
<!-- <vxe-input v-model="params.data.CategoryCode" placeholder="请输入品类编码" clearable
@change="fnChangeA(params)"></vxe-input> -->
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="种类编码" field="SubclassCode" span="12"> <vxe-form-item title="种类编码" field="SubclassCode" span="12">
@ -60,139 +64,126 @@
<vxe-option :value="item.key" :label="item.val"></vxe-option> <vxe-option :value="item.key" :label="item.val"></vxe-option>
</template> </template>
</vxe-select> </vxe-select>
<!-- <div style="width: 196px;">{{ params.data.SubclassCode }}</div> -->
<!-- <vxe-input v-model="params.data.SubclassCode" placeholder="请输入种类编码" clearable
@change="fnChangeA(params)"></vxe-input> -->
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="厂家物料编码" field="MaterialsCode" span="12"> <vxe-form-item title="厂家物料编码" field="MaterialsCode" span="12">
<template #default="params"> <template #default="params">
<!-- <div style="width: 196px;">{{ params.data.MaterialsCode }}</div> --> <!-- <div style="width: 196px;">{{ params.data.MaterialsCode }}</div> -->
<vxe-input v-model="params.data.MaterialsCode" placeholder="请输入厂家物料编码" clearable <!-- <vxe-input v-model="params.data.MaterialsCode" placeholder="请输入厂家物料编码" clearable style="width:240px;"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input> -->
<vxe-select v-model="params.data.MaterialsCode" style="width:240px;" clearable filterable @change="fnMatCodeChange(params)" v-bind:disabled="formTypeA == 'info'">
<template v-for="(item) in ipoMats">
<vxe-option :value="item.key" :label="item.val"></vxe-option>
</template>
</vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="厂家物料描述" field="MaterialsDesc" span="12"> <vxe-form-item title="厂家物料描述" field="MaterialsDesc" span="12">
<template #default="params"> <template #default="params">
<!-- <div style="width: 196px;">{{ params.data.MaterialsDesc }}</div> --> <vxe-input v-model="params.data.MaterialsDesc" placeholder="请输入厂家物料描述" clearable style="width:240px;"
<vxe-input v-model="params.data.MaterialsDesc" placeholder="请输入厂家物料描述" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物料批次" field="MaterialsBatch " span="12"> <!-- <vxe-form-item title="物料批次" field="MaterialsBatch " span="12">
<template #default="params"> <template #default="params">
<!-- <div style="width: 196px;">{{ params.data.MaterialsBatch }}</div> -->
<vxe-input v-model="params.data.MaterialsBatch" placeholder="请输入物料批次" clearable <vxe-input v-model="params.data.MaterialsBatch" placeholder="请输入物料批次" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产数量" field="Amount" span="12"> <vxe-form-item title="生产数量" field="Amount" span="12">
<template #default="params"> <template #default="params">
<!-- <div style="width: 196px;">{{ params.data.Amount }}</div> --> <vxe-input v-model="params.data.Amount" placeholder="请输入生产数量" clearable style="width:240px;" disabled></vxe-input>
<vxe-input v-model="params.data.Amount" placeholder="请输入生产数量" clearable
@change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="计量单位" field="Unit" span="12"> <vxe-form-item title="计量单位" field="Unit" span="12">
<template #default="params"> <template #default="params">
<!-- <div style="width: 196px;">{{ params.data.Unit }}</div> --> <!-- <div style="width: 196px;">{{ params.data.Unit }}</div> -->
<vxe-input v-model="params.data.Unit" placeholder="请输入计量单位" clearable <vxe-input v-model="params.data.Unit" placeholder="请输入计量单位" clearable style="width:240px;"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="计划开始日期" field="PlanStartDate" span="12"> <vxe-form-item title="计划开始日期" field="PlanStartDate" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.PlanStartDate" placeholder="请输入计划开始日期" clearable <vxe-input v-model="params.data.PlanStartDate" placeholder="请输入计划开始日期" clearable style="width:240px;"
@change="fnChangeA(params)" type="date"></vxe-input> @change="fnChangeA(params)" type="date"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="计划结束日期" field="PlanFinishDate" span="12"> <vxe-form-item title="计划结束日期" field="PlanFinishDate" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.PlanFinishDate" placeholder="请输入计划结束日期" clearable <vxe-input v-model="params.data.PlanFinishDate" placeholder="请输入计划结束日期" clearable style="width:240px;"
@change="fnChangeA(params)" type="date"></vxe-input> @change="fnChangeA(params)" type="date"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="实际开始日期" field="ActualStartDate" span="12"> <vxe-form-item title="实际开始日期" field="ActualStartDate" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.ActualStartDate" placeholder="请输入实际开始日期" clearable <vxe-input v-model="params.data.ActualStartDate" placeholder="请输入实际开始日期" clearable style="width:240px;"
@change="fnChangeA(params)" type="date"></vxe-input> @change="fnChangeA(params)" type="date"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="实际完成日期" field="ActualFinishDate" span="12"> <vxe-form-item title="实际完成日期" field="ActualFinishDate" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.ActualFinishDate" placeholder="请输入实际完成日期" clearable <vxe-input v-model="params.data.ActualFinishDate" placeholder="请输入实际完成日期" clearable style="width:240px;"
@change="fnChangeA(params)" type="date"></vxe-input> @change="fnChangeA(params)" type="date"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工单状态" field="WoStatus" span="12"> <vxe-form-item title="工单状态" field="WoStatus" span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.WoStatus" clearable filterable> <vxe-select v-model="params.data.WoStatus" clearable filterable style="width:240px;">
<template v-for="(item) in dictWoStatus"> <template v-for="(item) in dictWoStatus">
<vxe-option :value="item.key" :label="item.val"></vxe-option> <vxe-option :value="item.key" :label="item.val"></vxe-option>
</template> </template>
</vxe-select> </vxe-select>
<!-- <vxe-input v-model="params.data.WoStatus" placeholder="请输入工单状态" clearable
@change="fnChangeA(params)"></vxe-input> -->
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="实物ID" field="EntityCode" span="12">
<vxe-form-item title="电压等级" field="VoltageLevel" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.EntityCode }}</div> <!-- <vxe-input v-model="params.data.VoltageLevel" placeholder="请输入电压等级" clearable style="width:240px;"
<!-- <vxe-input v-model="params.data.EntityCode" placeholder="请输入实物ID" clearable @change="fnChangeA(params)"></vxe-input> -->
@change="fnChangeA(params)"></vxe-input> --> <vxe-select v-model="params.data.VoltageLevel" style="width:240px;" clearable filterable v-bind:disabled="formTypeA == 'info'">
<template v-for="(item) in ipoVoltages">
<vxe-option :value="item.key" :label="item.val"></vxe-option>
</template>
</vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工艺路线编码" field="ProcessRouteNo " span="12"> <!-- <vxe-form-item title="工艺路线编码" field="ProcessRouteNo " span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.ProcessRouteNo" placeholder="请输入工艺路线编码" clearable <vxe-input v-model="params.data.ProcessRouteNo" placeholder="请输入工艺路线编码" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="电压等级" field="VoltageLevel" span="12">
<template #default="params">
<vxe-input v-model="params.data.VoltageLevel" placeholder="请输入电压等级" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="数据来源" field="DataSource" span="12"> <vxe-form-item title="数据来源" field="DataSource" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataSource }}</div> <div style="width: 196px;">{{ params.data.DataSource }}</div>
<!-- <vxe-input v-model="params.data.DataSource" placeholder="请输入数据来源" clearable
@change="fnChangeA(params)"></vxe-input> -->
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="来源数据创建时间" field="DataSourceCreatetime" span="12"> <vxe-form-item title="来源数据创建时间" field="DataSourceCreatetime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataSourceCreatetime }}</div> <div style="width: 196px;">{{ params.data.DataSourceCreatetime }}</div>
<!-- <vxe-input v-model="params.data.DataSourceCreatetime" placeholder="请输入来源数据创建时间" clearable
@change="fnChangeA(params)"></vxe-input> -->
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据拥有方" field="OwnerId" span="12"> <vxe-form-item title="数据拥有方" field="OwnerId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.OwnerId }}</div> <div style="width: 196px;">{{ params.data.OwnerId }}</div>
<!-- <vxe-input v-model="params.data.OwnerId" placeholder="请输入数据拥有方" clearable
@change="fnChangeA(params)"></vxe-input> -->
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据可见方" field="OpenId" span="12"> <vxe-form-item title="数据可见方" field="OpenId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.OpenId }}</div> <div style="width: 196px;">{{ params.data.OpenId }}</div>
<!-- <vxe-input v-model="params.data.OpenId" placeholder="请输入数据可见方" clearable
@change="fnChangeA(params)"></vxe-input> -->
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="产品型号规格" field="ModelSpec" span="12"> <vxe-form-item title="产品型号规格" field="ModelSpec" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelSpec }}</div> <div style="width: 196px;">{{ params.data.ModelSpec }}</div>
<!-- <vxe-input v-model="params.data.ModelSpec" placeholder="请输入产品型号规格" clearable
@change="fnChangeA(params)"></vxe-input> -->
</template> </template>
</vxe-form-item> </vxe-form-item> -->
</a-card> </a-card>
</template> </template>
<template #footer> <template #footer>
<vxe-button type="submit" status="primary" content="保存"></vxe-button> <vxe-button type="submit" status="primary" content="保存"></vxe-button>
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
</vxe-form> </vxe-form>
@ -207,6 +198,9 @@ import { map as _map } from 'lodash'
import * as ProductionWorkOrderApi from '@/api/gw/productionWorkOrder' import * as ProductionWorkOrderApi from '@/api/gw/productionWorkOrder'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import * as BaseMaterialApi from '@/api/gw/baseMaterial'
import * as BaseEntityIDApi from '@/api/gw/baseEntityID'
import * as BaseVoltageApi from '@/api/gw/baseVoltage'
// //
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictCategoryCode, dictSubClassCode, dictWoStatus } = storeToRefs(dictStore) const { dictCategoryCode, dictSubClassCode, dictWoStatus } = storeToRefs(dictStore)
@ -277,6 +271,14 @@ const formRulesA: any = ref({
{ required: true, message: '请输入工单状态' } { required: true, message: '请输入工单状态' }
], ],
}) })
const baseMats = ref([])
const ipoMats = ref([])
const baseEntityIds = ref([])
const ipoEntityIds = ref([])
const baseVoltages = ref([])
const ipoVoltages = ref([])
// //
onMounted(() => { onMounted(() => {
}) })
@ -284,6 +286,39 @@ onMounted(() => {
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
console.log(row) console.log(row)
formTypeA.value = type formTypeA.value = type
//
const filterMatReq = {"filter": {"field": "MatNo","operator": "1","value": null}}
baseMats.value =await BaseMaterialApi.GetBaseMaterialList(filterMatReq)
ipoMats.value = []
baseMats.value.Data.forEach( (item) => {
if(ipoMats.value.indexOf(item.MatNo)==-1)
ipoMats.value.push({key:item.MatNo,val:item.MatNo})
})
//ID
//const filterEntityReq = {"filter": {"field": "entity_id","operator": "1","value": null}}
baseEntityIds.value =await BaseEntityIDApi.GetPoUnUsedEntityID()
ipoEntityIds.value = []
baseEntityIds.value.forEach( (item) => {
if(ipoEntityIds.value.indexOf(item.EntityId)==-1)
ipoEntityIds.value.push({key:item.EntityId,val:item.EntityId})
})
//
const filterVoltageReq = {"filter": {"field": "voltage","operator": "1","value": null}}
baseVoltages.value =await BaseVoltageApi.GetBaseVoltageList(filterVoltageReq)
ipoVoltages.value = []
baseVoltages.value.Data.forEach( (item) => {
if(ipoVoltages.value.indexOf(item.Voltage+item.Level)==-1)
ipoVoltages.value.push({key:item.Voltage+item.Level,val:item.Voltage+item.Level})
})
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA() await fnResetA()
@ -332,6 +367,18 @@ const open = async (type: string, row?: any) => {
break; break;
} }
} }
const fnMatCodeChange = (params: any) => {
if (params.data.MaterialsCode) {
baseMats.value.Data.forEach( (item) => {
if(item.MatNo == params.data.MaterialsCode)
{
params.data.Unit = item.MatUnit;
params.data.MaterialsDesc = item.MatDescption;
}
})
}
}
// open // open
defineExpose({ open }) defineExpose({ open })
// A // A
@ -363,6 +410,13 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
if(formDataA.value.ActualStartDate==undefined || formDataA.value.ActualStartDate==""){
formDataA.value.ActualStartDate = null
}
if(formDataA.value.ActualFinishDate==undefined || formDataA.value.ActualFinishDate==""){
formDataA.value.ActualFinishDate = null
}
switch (formTypeA.value) { switch (formTypeA.value) {
case 'add': case 'add':
const paramsA = { const paramsA = {
@ -427,5 +481,9 @@ const fnResetA = () => {
"ModelSpec": "", "ModelSpec": "",
} }
} }
//
const fnEventCancel = () => {
refShow.value = false
}
</script> </script>
<style scoped></style> <style scoped></style>
Loading…
Cancel
Save