生产工艺及过程检验

main
mhsnet 7 months ago
parent 813521492f
commit e30cff76d1

@ -1,43 +1,54 @@
<template> <template>
<div class="xyp-dao-xian-form" v-if="refShow"> <vxe-modal class-name="csty-box-app-struct-form" v-model="refShow" width="1200" height="770" show-zoom show-footer
<vxe-form title-colon ref="refFormA" title-align="right" title-width="150" :data="formDataA" :rules="formRulesA" :mask-closable=true>
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="960" height="770" 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 :bordered="false">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12"> <vxe-form title-colon ref="refFormA" title-align="right" title-width="150" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div> <div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
基本数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<span>{{ params.data.StandardVersion }}</span>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12"> <vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable <vxe-input v-model="params.data.SupplierWorkNo" 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="SupplierCode" span="12"> <!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <span>{{ params.data.SupplierCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12"> <vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div> <span>{{ params.data.ModelCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12"> <vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div> <span>{{ params.data.CategoryType }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12"> <vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable <vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
@change="fnChangeA(params)"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12"> <vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12"> <!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div> <span>{{ params.data.PdCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12"> <vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,33 +79,42 @@
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12"> <vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div> <span>{{ params.data.CheckTime }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12"> <vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div> <span>{{ params.data.PutCenterTime }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12"> <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div> <span>{{ params.data.Ecode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12"> <vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div> <span>{{ params.data.SgEntityId }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12"> <vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div> <span>{{ params.data.DataUniqueIdentifier }}</span>
</template>
</vxe-form-item> -->
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params">
<div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
采集数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
<a-card title="采集数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="装置门的开合角度不应小于 135°灵活启闭" field="TextDescription1" <vxe-form-item title="装置门的开合角度不应小于 135°灵活启闭" field="TextDescription1" span="12">
span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.TextDescription1" clearable> <vxe-select v-model="params.data.TextDescription1" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option> <vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -102,7 +122,8 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="装置焊接、组配、防腐处理等工艺应符合相关标准,无虚焊、毛刺、撕边、搭接不工整等现象" field="TextDescription2" span="12"> <vxe-form-item title="装置焊接、组配、防腐处理等工艺应符合相关标准,无虚焊、毛刺、撕边、搭接不工整等现象" field="TextDescription2"
span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.TextDescription2" clearable> <vxe-select v-model="params.data.TextDescription2" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option> <vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -110,8 +131,7 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="箱体外壳应接地良好,接地应采用双接地方式" field="TextDescription3" <vxe-form-item title="箱体外壳应接地良好,接地应采用双接地方式" field="TextDescription3" span="12">
span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.TextDescription3" clearable> <vxe-select v-model="params.data.TextDescription3" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option> <vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -119,15 +139,16 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
</vxe-form>
</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="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
</vxe-form>
</div>
</template> </template>
<script lang="ts" setup name="BoxAppStructForm"> <script lang="ts" setup name="BoxAppStructForm">
@ -138,44 +159,45 @@ import { map as _map } from 'lodash'
import * as BoxAppStructApi from '@/api/gw/boxAppStruct' import * as BoxAppStructApi from '@/api/gw/boxAppStruct'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore) const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
const refShow = ref(false) const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
// //
const modalTitle = ref('未知表单') const modalTitle = ref('未知表单')
// // [add - |update - |del - ]
const formDataA: any = ref( const formType: any = ref('')
{ //
"ID": 0, const refFormA = ref()
"StandardVersion": 1, // A -
"SupplierWorkNo": "", const formDataAInit: any = {
"SupplierCode": "1000032215", ID: 0,
"ModelCode": "dtb00003", StandardVersion: 1,
"CategoryType": "90003", SupplierWorkNo: "",
"EquipmentUniqueCode": '', SupplierCode: "1000032215",
"FactoryCode": '', ModelCode: "dtb00003",
"SupplierSupportId": '', CategoryType: "90003",
"PdCode": "GX000083", EquipmentUniqueCode: '',
"ProcessType": 2, FactoryCode: '',
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), SupplierSupportId: '',
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), PdCode: "GX000083",
"Ecode": "NotImp", ProcessType: 2,
"SgEntityId": "NotImp", CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"DataUniqueIdentifier": "NotImp", PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"TextDescription1": undefined, Ecode: "NotImp",
"TextDescription2": undefined, SgEntityId: "NotImp",
"TextDescription3": undefined, DataUniqueIdentifier: "NotImp",
"Sended": 0 TextDescription1: undefined,
}) TextDescription2: undefined,
// TextDescription3: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({ const formRulesA: any = ref({
SupplierWorkNo: [ SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' } { required: true, message: '请输入供应商工单编号' }
@ -201,7 +223,7 @@ onMounted(() => {
}) })
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formTypeA.value = type formType.value = type
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA() await fnResetA()
@ -278,7 +300,9 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
switch (formTypeA.value) { await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add': case 'add':
const paramsA = { const paramsA = {
data: formDataA.value data: formDataA.value
@ -311,30 +335,15 @@ const fnSubmitA = async () => {
refShow.value = false refShow.value = false
emit('success') emit('success')
} }
})
}
// //
const fnResetA = () => { const fnResetA = () => {
formDataA.value = { formDataA.value = formDataAInit
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000083",
"ProcessType": 2,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription1": undefined,
"TextDescription2": undefined,
"TextDescription3": undefined,
"Sended": 0
} }
//
const fnEventCancel = () => {
refShow.value = false
} }
</script> </script>
<style scoped></style> <style scoped></style>

@ -1,43 +1,54 @@
<template> <template>
<div class="xyp-component-inspect-form" v-if="refShow"> <vxe-modal class-name="csty-component-inspect-form" v-model="refShow" width="1200" height="770" show-zoom
<vxe-form title-colon ref="refFormA" title-align="right" title-width="150" :data="formDataA" :rules="formRulesA" show-footer :mask-closable=true>
@submit="fnSubmitA" @reset="fnResetA" custom-layout>
<vxe-modal v-model="refShow" width="960" height="770" 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 :bordered="false">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12"> <vxe-form title-colon ref="refFormA" title-align="right" title-width="160" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div> <div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
基本数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<span>{{ params.data.StandardVersion }}</span>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12"> <vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable <vxe-input v-model="params.data.SupplierWorkNo" 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="SupplierCode" span="12"> <!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <span>{{ params.data.SupplierCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12"> <vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div> <span>{{ params.data.ModelCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12"> <vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div> <span>{{ params.data.CategoryType }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12"> <vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable <vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
@change="fnChangeA(params)"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12"> <vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12"> <!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div> <span>{{ params.data.PdCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12"> <vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,31 +79,41 @@
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12"> <vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div> <span>{{ params.data.CheckTime }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12"> <vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div> <span>{{ params.data.PutCenterTime }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12"> <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div> <span>{{ params.data.Ecode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12"> <vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div> <span>{{ params.data.SgEntityId }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12"> <vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div> <span>{{ params.data.DataUniqueIdentifier }}</span>
</template>
</vxe-form-item> -->
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params">
<div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
采集数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
<a-card title="采集数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="开关器件的机械寿命、接通和分断能力、额定短路耐受强度等技术参数不低于招标技术规范的参数要求" field="TextDescription1" <vxe-form-item title="开关器件的机械寿命、接通和分断能力、额定短路耐受强度等技术参数不低于招标技术规范的参数要求" field="TextDescription1"
span="12"> span="12">
<template #default="params"> <template #default="params">
@ -102,7 +123,8 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="成套设备内的开关器件和元件的安装依据其制造商所提供的说明及满足招标技术规范的要求" field="TextDescription2" span="12"> <vxe-form-item title="成套设备内的开关器件和元件的安装依据其制造商所提供的说明及满足招标技术规范的要求" field="TextDescription2"
span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.TextDescription2" clearable> <vxe-select v-model="params.data.TextDescription2" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option> <vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -110,15 +132,16 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
</vxe-form>
</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="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
</vxe-form>
</div>
</template> </template>
<script lang="ts" setup name="ComponentInspectForm"> <script lang="ts" setup name="ComponentInspectForm">
@ -129,43 +152,44 @@ import { map as _map } from 'lodash'
import * as ComponentInspectApi from '@/api/gw/componentInspect' import * as ComponentInspectApi from '@/api/gw/componentInspect'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore) const { dictProcessType } = storeToRefs(dictStore)
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
const refShow = ref(false) const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
// //
const modalTitle = ref('未知表单') const modalTitle = ref('未知表单')
// // [add - |update - |del - ]
const formDataA: any = ref( const formType: any = ref('')
{ //
"ID": 0, const refFormA = ref()
"StandardVersion": 1, // A -
"SupplierWorkNo": "", const formDataAInit: any = {
"SupplierCode": "1000032215", ID: 0,
"ModelCode": "dtb00003", StandardVersion: 1,
"CategoryType": "90003", SupplierWorkNo: "",
"EquipmentUniqueCode": '', SupplierCode: "1000032215",
"FactoryCode": '', ModelCode: "dtb00003",
"SupplierSupportId": '', CategoryType: "90003",
"PdCode": "GX000081", EquipmentUniqueCode: '',
"ProcessType": 2, FactoryCode: '',
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), SupplierSupportId: '',
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), PdCode: "GX000081",
"Ecode": "NotImp", ProcessType: 2,
"SgEntityId": "NotImp", CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"DataUniqueIdentifier": "NotImp", PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"TextDescription1": undefined, Ecode: "NotImp",
"TextDescription2": undefined, SgEntityId: "NotImp",
"Sended": 0 DataUniqueIdentifier: "NotImp",
}) TextDescription1: undefined,
// TextDescription2: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({ const formRulesA: any = ref({
SupplierWorkNo: [ SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' } { required: true, message: '请输入供应商工单编号' }
@ -191,17 +215,16 @@ onMounted(() => {
}) })
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formTypeA.value = type formType.value = type
await fnResetA()
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA()
modalTitle.value = '新增元器件选择及安装检查'
refShow.value = true refShow.value = true
modalTitle.value = '新增元器件选择及安装检查'
break; break;
case 'edit': case 'edit':
await fnResetA()
modalTitle.value = '编辑元器件选择及安装检查'
refShow.value = true refShow.value = true
modalTitle.value = '编辑元器件选择及安装检查'
const paramsA = { const paramsA = {
"filter": { "filter": {
"field": "ID", "field": "ID",
@ -214,9 +237,8 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data formDataA.value = rowInfoA.Data
break; break;
case 'copy': case 'copy':
await fnResetA()
modalTitle.value = '复制元器件选择及安装检查'
refShow.value = true refShow.value = true
modalTitle.value = '复制元器件选择及安装检查'
const paramsB = { const paramsB = {
"filter": { "filter": {
"field": "ID", "field": "ID",
@ -268,7 +290,9 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
switch (formTypeA.value) { await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add': case 'add':
const paramsA = { const paramsA = {
data: formDataA.value data: formDataA.value
@ -301,29 +325,15 @@ const fnSubmitA = async () => {
refShow.value = false refShow.value = false
emit('success') emit('success')
} }
})
}
// //
const fnResetA = () => { const fnResetA = () => {
formDataA.value = { formDataA.value = formDataAInit
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000081",
"ProcessType": 2,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription1": undefined,
"TextDescription2": undefined,
"Sended": 0
} }
//
const fnEventCancel = () => {
refShow.value = false
} }
</script> </script>
<style scoped></style> <style scoped></style>

@ -1,43 +1,54 @@
<template> <template>
<div class="xyp-dao-xian-form" v-if="refShow"> <vxe-modal class-name="csty-dao-xian-form" v-model="refShow" width="1200" height="770" show-zoom show-footer
<vxe-form title-colon ref="refFormA" title-align="right" title-width="210" :data="formDataA" :rules="formRulesA" :mask-closable=true>
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1160" height="770" 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 :bordered="false">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12"> <vxe-form title-colon ref="refFormA" title-align="right" title-width="210" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div> <div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
基本数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<span>{{ params.data.StandardVersion }}</span>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12"> <vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable <vxe-input v-model="params.data.SupplierWorkNo" 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="SupplierCode" span="12"> <!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <span>{{ params.data.SupplierCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12"> <vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div> <span>{{ params.data.ModelCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12"> <vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div> <span>{{ params.data.CategoryType }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12"> <vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable <vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
@change="fnChangeA(params)"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12"> <vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12"> <!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div> <span>{{ params.data.PdCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12"> <vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,33 +79,42 @@
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12"> <vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div> <span>{{ params.data.CheckTime }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12"> <vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div> <span>{{ params.data.PutCenterTime }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12"> <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div> <span>{{ params.data.Ecode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12"> <vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div> <span>{{ params.data.SgEntityId }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12"> <vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div> <span>{{ params.data.DataUniqueIdentifier }}</span>
</template>
</vxe-form-item> -->
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params">
<div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
采集数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
<a-card title="采集数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="导体颜色及相序排列满足招标技术规范的要求" field="TextDescription1" <vxe-form-item title="导体颜色及相序排列满足招标技术规范的要求" field="TextDescription1" span="12">
span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.TextDescription1" clearable> <vxe-select v-model="params.data.TextDescription1" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option> <vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -110,8 +130,7 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="控制回路应选择耐气候型铜芯绝缘单股导线,截面积不小于 1.5mm2" field="TextDescription3" <vxe-form-item title="控制回路应选择耐气候型铜芯绝缘单股导线,截面积不小于 1.5mm2" field="TextDescription3" span="12">
span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.TextDescription3" clearable> <vxe-select v-model="params.data.TextDescription3" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option> <vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -127,8 +146,7 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="计量电流回路导线截面积不小于4mm2" field="TextDescription5" <vxe-form-item title="计量电流回路导线截面积不小于4mm2" field="TextDescription5" span="12">
span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.TextDescription5" clearable> <vxe-select v-model="params.data.TextDescription5" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option> <vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -136,7 +154,8 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="跨越装置内活动部位,应使用软铜线,并留有适度裕度,防止机械损伤,软铜线截面积应适当加大" field="TextDescription6" span="12"> <vxe-form-item title="跨越装置内活动部位,应使用软铜线,并留有适度裕度,防止机械损伤,软铜线截面积应适当加大" field="TextDescription6"
span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.TextDescription6" clearable> <vxe-select v-model="params.data.TextDescription6" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option> <vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -144,15 +163,16 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
</vxe-form>
</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="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
</vxe-form>
</div>
</template> </template>
<script lang="ts" setup name="DaoXianForm"> <script lang="ts" setup name="DaoXianForm">
@ -163,47 +183,48 @@ import { map as _map } from 'lodash'
import * as DaoXianApi from '@/api/gw/daoXian' import * as DaoXianApi from '@/api/gw/daoXian'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore) const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
const refShow = ref(false) const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
// //
const modalTitle = ref('未知表单') const modalTitle = ref('未知表单')
// // [add - |update - |del - ]
const formDataA: any = ref( const formType: any = ref('')
{ //
"ID": 0, const refFormA = ref()
"StandardVersion": 1, // A -
"SupplierWorkNo": "", const formDataAInit: any = {
"SupplierCode": "1000032215", ID: 0,
"ModelCode": "dtb00003", StandardVersion: 1,
"CategoryType": "90003", SupplierWorkNo: "",
"EquipmentUniqueCode": '', SupplierCode: "1000032215",
"FactoryCode": '', ModelCode: "dtb00003",
"SupplierSupportId": '', CategoryType: "90003",
"PdCode": "GX000082", EquipmentUniqueCode: '',
"ProcessType": 2, FactoryCode: '',
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), SupplierSupportId: '',
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), PdCode: "GX000082",
"Ecode": "NotImp", ProcessType: 2,
"SgEntityId": "NotImp", CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"DataUniqueIdentifier": "NotImp", PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"TextDescription1": undefined, Ecode: "NotImp",
"TextDescription2": undefined, SgEntityId: "NotImp",
"TextDescription3": undefined, DataUniqueIdentifier: "NotImp",
"TextDescription4": undefined, TextDescription1: undefined,
"TextDescription5": undefined, TextDescription2: undefined,
"TextDescription6": undefined, TextDescription3: undefined,
"Sended": 0 TextDescription4: undefined,
}) TextDescription5: undefined,
// TextDescription6: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({ const formRulesA: any = ref({
SupplierWorkNo: [ SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' } { required: true, message: '请输入供应商工单编号' }
@ -222,14 +243,14 @@ const formRulesA: any = ref({
], ],
TextDescription2: [ TextDescription2: [
{ required: true, message: '请选择是否合格' } { required: true, message: '请选择是否合格' }
], ]
}) })
// //
onMounted(() => { onMounted(() => {
}) })
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formTypeA.value = type formType.value = type
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA() await fnResetA()
@ -306,7 +327,9 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
switch (formTypeA.value) { await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add': case 'add':
const paramsA = { const paramsA = {
data: formDataA.value data: formDataA.value
@ -339,33 +362,15 @@ const fnSubmitA = async () => {
refShow.value = false refShow.value = false
emit('success') emit('success')
} }
})
}
// //
const fnResetA = () => { const fnResetA = () => {
formDataA.value = { formDataA.value = formDataAInit
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000082",
"ProcessType": 2,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription1": undefined,
"TextDescription2": undefined,
"TextDescription3": undefined,
"TextDescription4": undefined,
"TextDescription5": undefined,
"TextDescription6": undefined,
"Sended": 0
} }
//
const fnEventCancel = () => {
refShow.value = false
} }
</script> </script>
<style scoped></style> <style scoped></style>

@ -1,43 +1,53 @@
<template> <template>
<div class="xyp-elec-gap-form" v-if="refShow"> <vxe-modal class-name="csty-elec-distance-form" v-model="refShow" width="1200" height="770" show-zoom show-footer>
<vxe-form title-colon ref="refFormA" title-align="right" title-width="150" :data="formDataA" :rules="formRulesA"
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="960" height="770" 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 :bordered="false">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12"> <vxe-form title-colon ref="refFormA" title-align="right" title-width="150" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div> <div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
基本数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<span>{{ params.data.StandardVersion }}</span>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12"> <vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable <vxe-input v-model="params.data.SupplierWorkNo" 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="SupplierCode" span="12"> <!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <span>{{ params.data.SupplierCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12"> <vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div> <span>{{ params.data.ModelCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12"> <vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div> <span>{{ params.data.CategoryType }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12"> <vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable <vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
@change="fnChangeA(params)"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12"> <vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +62,9 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12"> <!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div> <span>{{ params.data.PdCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12"> <vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,31 +78,41 @@
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12"> <vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div> <span>{{ params.data.CheckTime }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12"> <vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div> <span>{{ params.data.PutCenterTime }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12"> <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div> <span>{{ params.data.Ecode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12"> <vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div> <span>{{ params.data.SgEntityId }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12"> <vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div> <span>{{ params.data.DataUniqueIdentifier }}</span>
</template>
</vxe-form-item> -->
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params">
<div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
采集数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
<a-card title="采集数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="极对极之间(mm)" field="GapDistance1" span="12"> <vxe-form-item title="极对极之间(mm)" field="GapDistance1" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.GapDistance1" placeholder="请输入距离" clearable <vxe-input v-model="params.data.GapDistance1" placeholder="请输入距离" clearable
@ -111,15 +131,15 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
</vxe-form>
</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="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
</vxe-form>
</div>
</template> </template>
<script lang="ts" setup name="ElecDistanceForm"> <script lang="ts" setup name="ElecDistanceForm">
@ -130,44 +150,45 @@ import { map as _map } from 'lodash'
import * as ElecDistanceApi from '@/api/gw/elecDistance' import * as ElecDistanceApi from '@/api/gw/elecDistance'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore) const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
const refShow = ref(false) const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
// //
const modalTitle = ref('未知表单') const modalTitle = ref('未知表单')
// // [add - |update - |del - ]
const formDataA: any = ref( const formType: any = ref('')
{ //
"ID": 0, const refFormA = ref()
"StandardVersion": 1, // A -
"SupplierWorkNo": "", const formDataAInit: any = {
"SupplierCode": "1000032215", ID: 0,
"ModelCode": "dtb00003", StandardVersion: 1,
"CategoryType": "90003", SupplierWorkNo: "",
"EquipmentUniqueCode": '', SupplierCode: "1000032215",
"FactoryCode": '', ModelCode: "dtb00003",
"SupplierSupportId": '', CategoryType: "90003",
"PdCode": "GX000085", EquipmentUniqueCode: '',
"ProcessType": 2, FactoryCode: '',
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), SupplierSupportId: '',
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), PdCode: "GX000085",
"Ecode": "NotImp", ProcessType: 2,
"SgEntityId": "NotImp", CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"DataUniqueIdentifier": "NotImp", PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"GapDistance1": undefined, Ecode: "NotImp",
"GapDistance2": undefined, SgEntityId: "NotImp",
"GapDistance3": undefined, DataUniqueIdentifier: "NotImp",
"Sended": 0 GapDistance1: undefined,
}) GapDistance2: undefined,
// GapDistance3: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({ const formRulesA: any = ref({
SupplierWorkNo: [ SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' } { required: true, message: '请输入供应商工单编号' }
@ -196,7 +217,7 @@ onMounted(() => {
}) })
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formTypeA.value = type formType.value = type
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA() await fnResetA()
@ -273,7 +294,9 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
switch (formTypeA.value) { await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add': case 'add':
const paramsA = { const paramsA = {
data: formDataA.value data: formDataA.value
@ -306,30 +329,15 @@ const fnSubmitA = async () => {
refShow.value = false refShow.value = false
emit('success') emit('success')
} }
})
}
// //
const fnResetA = () => { const fnResetA = () => {
formDataA.value = { formDataA.value = formDataAInit
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000085",
"ProcessType": 2,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"GapDistance1": undefined,
"GapDistance2": undefined,
"GapDistance3": undefined,
"Sended": 0
} }
//
const fnEventCancel = () => {
refShow.value = false
} }
</script> </script>
<style scoped></style> <style scoped></style>

@ -1,39 +1,48 @@
<template> <template>
<div class="xyp-elec-gap-form" v-if="refShow"> <vxe-modal class-name="csty-elec-gap-form" v-model="refShow" width="1200" height="770" show-zoom show-footer
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA" :mask-closable=true>
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1160" height="770" 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"> <vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12"> :rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div> <div style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
基本数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<span>{{ params.data.StandardVersion }}</span>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12"> <vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable <vxe-input v-model="params.data.SupplierWorkNo" 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="SupplierCode" span="12"> <!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <span>{{ params.data.SupplierCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12"> <vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div> <span>{{ params.data.ModelCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12"> <vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div> <span>{{ params.data.CategoryType }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12"> <vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable <vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable
@ -52,9 +61,9 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12"> <!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div> <span>{{ params.data.PdCode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12"> <vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,31 +77,40 @@
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12"> <vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div> <span>{{ params.data.CheckTime }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12"> <vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div> <span>{{ params.data.PutCenterTime }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12"> <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div> <span>{{ params.data.Ecode }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12"> <vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div> <span>{{ params.data.SgEntityId }}</span>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12"> <vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div> <span>{{ params.data.DataUniqueIdentifier }}</span>
</template>
</vxe-form-item> -->
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params">
<div style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
采集数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
<a-card title="采集数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="极对极之间(mm)" field="GapDistance1" span="12"> <vxe-form-item title="极对极之间(mm)" field="GapDistance1" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.GapDistance1" placeholder="请输入距离" clearable <vxe-input v-model="params.data.GapDistance1" placeholder="请输入距离" clearable
@ -111,15 +129,14 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
</vxe-form>
</template> </template>
<template #footer> <template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button> <vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
</vxe-form>
</div>
</template> </template>
<script lang="ts" setup name="ElecGapForm"> <script lang="ts" setup name="ElecGapForm">
@ -130,22 +147,21 @@ import { map as _map } from 'lodash'
import * as ElecGapApi from '@/api/gw/elecGap' import * as ElecGapApi from '@/api/gw/elecGap'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore) const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
const refShow = ref(false) const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
// //
const modalTitle = ref('未知表单') const modalTitle = ref('未知表单')
// // [add - |update - |del - ]
const formDataA: any = ref( const formType: any = ref('')
{ //
const refFormA = ref()
// A -
const formDataAInit: any = {
"ID": 0, "ID": 0,
"StandardVersion": 1, "StandardVersion": 1,
"SupplierWorkNo": "", "SupplierWorkNo": "",
@ -166,8 +182,10 @@ const formDataA: any = ref(
"GapDistance2": undefined, "GapDistance2": undefined,
"GapDistance3": undefined, "GapDistance3": undefined,
"Sended": 0 "Sended": 0
}) }
// // A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({ const formRulesA: any = ref({
SupplierWorkNo: [ SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' } { required: true, message: '请输入供应商工单编号' }
@ -196,7 +214,7 @@ onMounted(() => {
}) })
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formTypeA.value = type formType.value = type
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA() await fnResetA()
@ -273,7 +291,9 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
switch (formTypeA.value) { await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add': case 'add':
const paramsA = { const paramsA = {
data: formDataA.value data: formDataA.value
@ -306,30 +326,15 @@ const fnSubmitA = async () => {
refShow.value = false refShow.value = false
emit('success') emit('success')
} }
})
}
// //
const fnResetA = () => { const fnResetA = () => {
formDataA.value = { formDataA.value = formDataAInit
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000084",
"ProcessType": 2,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"GapDistance1": undefined,
"GapDistance2": undefined,
"GapDistance3": undefined,
"Sended": 0
} }
//
const fnEventCancel = () => {
refShow.value = false
} }
</script> </script>
<style scoped></style> <style scoped></style>
Loading…
Cancel
Save