出厂试验

main
mhsnet 7 months ago
parent bcd730313c
commit ddf91eb09d

@ -1,43 +1,54 @@
<template>
<div class="xyp-xyp-app-quality-inspection-form" v-if="refShow">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA"
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer>
<vxe-modal class-name="csty-app-ip-grade-form" v-model="refShow" width="1300" height="770" show-zoom show-footer
:mask-closable=true>
<template #title>
<span style="color:#ffffff">{{ modalTitle }}</span>
</template>
<template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<a-card :bordered="false">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<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>
</vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div>
<spsn>{{ params.data.SupplierCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div>
<spsn>{{ params.data.ModelCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div>
<spsn>{{ params.data.CategoryType }}</spsn>
</template>
</vxe-form-item>
</vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable
@change="fnChangeA(params)"></vxe-input>
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12">
<!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div>
<spsn>{{ params.data.PdCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div>
<spsn>{{ params.data.CheckTime }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div>
<spsn>{{ params.data.PutCenterTime }}</spsn>
</template>
</vxe-form-item>
</vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" clearable
@change="fnChangeA(params)" style="width: 196px;"></vxe-input>
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" clearable
@change="fnChangeA(params)" style="width: 196px;"></vxe-input>
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,39 +107,48 @@
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12">
<!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div>
<spsn>{{ params.data.Ecode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div>
<spsn>{{ params.data.SgEntityId }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div>
<spsn>{{ params.data.DataUniqueIdentifier }}</spsn>
</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>
</vxe-form-item>
</a-card>
<a-card title="采集数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="防护等级"
field="Protection" span="12">
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item title="防护等级" field="Protection" span="12">
<template #default="params">
<vxe-input v-model="params.data.Protection" placeholder="请输入防护等级" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
</vxe-form-gather>
</vxe-form>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button>
<vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template>
</vxe-modal>
</vxe-form>
</div>
</template>
<script lang="ts" setup name="AppIPGradeForm">
@ -139,45 +159,46 @@ import { map as _map } from 'lodash'
import * as AppIPGradeApi from '@/api/gw/appIPGrade'
import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success]
const emit = defineEmits(['success'])
//
const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
//
const modalTitle = ref('未知表单')
//
const formDataA: any = ref(
{
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000090",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"Protection": undefined,
"Sended": 0
})
//
// [add - |update - |del - ]
const formType: any = ref('')
//
const refFormA = ref()
// A -
const formDataAInit: any = {
ID: 0,
StandardVersion: 1,
SupplierWorkNo: "",
SupplierCode: "1000032215",
ModelCode: "dtb00003",
CategoryType: "90003",
EquipmentUniqueCode: '',
FactoryCode: '',
SupplierSupportId: '',
PdCode: "GX000090",
ProcessType: 3,
CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
InspectionResults: undefined,
Ecode: "NotImp",
SgEntityId: "NotImp",
DataUniqueIdentifier: "NotImp",
Protection: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({
SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' }
@ -203,15 +224,14 @@ onMounted(() => {
})
//
const open = async (type: string, row?: any) => {
formTypeA.value = type
formType.value = type
await fnResetA()
switch (type) {
case 'add':
await fnResetA()
modalTitle.value = '新增绝缘电阻的验证'
refShow.value = true
break;
case 'edit':
await fnResetA()
modalTitle.value = '编辑绝缘电阻的验证'
refShow.value = true
const paramsA = {
@ -226,7 +246,6 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data
break;
case 'copy':
await fnResetA()
modalTitle.value = '复制绝缘电阻的验证'
refShow.value = true
const paramsB = {
@ -240,6 +259,8 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ID = 0
rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StartTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StopTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.Sended = 0
formDataA.value = rowInfoB.Data
break;
@ -280,7 +301,9 @@ const fnDeleteA = async (row: any) => {
}
//
const fnSubmitA = async () => {
switch (formTypeA.value) {
await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add':
const paramsA = {
data: formDataA.value
@ -312,32 +335,16 @@ const fnSubmitA = async () => {
}
refShow.value = false
emit('success')
}
})
}
//
const fnResetA = () => {
formDataA.value = {
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000090",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"Protection": undefined,
"Sended": 0
}
formDataA.value = formDataAInit
}
//
const fnEventCancel = () => {
refShow.value = false
}
</script>
<style scoped></style>

@ -1,43 +1,54 @@
<template>
<div class="xyp-xyp-app-quality-inspection-form" v-if="refShow">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA"
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer>
<vxe-modal class-name="csty-app-quality-inspection-form" v-model="refShow" width="1200" height="770" show-zoom
show-footer>
<template #title>
<span style="color:#ffffff">{{ modalTitle }}</span>
</template>
<template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<a-card :bordered="false">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<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>
</vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div>
<spsn>{{ params.data.SupplierCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div>
<spsn>{{ params.data.ModelCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div>
<spsn>{{ params.data.CategoryType }}</spsn>
</template>
</vxe-form-item>
</vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable
@change="fnChangeA(params)"></vxe-input>
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12">
<!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div>
<spsn>{{ params.data.PdCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div>
<spsn>{{ params.data.CheckTime }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div>
<spsn>{{ params.data.PutCenterTime }}</spsn>
</template>
</vxe-form-item>
</vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" clearable
@change="fnChangeA(params)" style="width: 196px;"></vxe-input>
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" clearable
@change="fnChangeA(params)" style="width: 196px;"></vxe-input>
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,23 +107,33 @@
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12">
<!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div>
<spsn>{{ params.data.Ecode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div>
<spsn>{{ params.data.SgEntityId }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div>
<spsn>{{ params.data.DataUniqueIdentifier }}</spsn>
</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>
</vxe-form-item>
</a-card>
<a-card title="采集数据" :bordered="false" style="margin: 10px">
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item title="箱体内外表面应平整光洁、美观、无锈蚀、无磕碰损伤" field="TextDescription1" span="12">
<template #default="params">
<vxe-select v-model="params.data.TextDescription1" clearable>
@ -137,15 +158,15 @@
</vxe-select>
</template>
</vxe-form-item>
</vxe-form-gather>
</vxe-form>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button>
<vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template>
</vxe-modal>
</vxe-form>
</div>
</template>
<script lang="ts" setup name="AppQualityInspectionForm">
@ -156,47 +177,48 @@ import { map as _map, unset as _unset } from 'lodash'
import * as AppQualityInspectionApi from '@/api/gw/appQualityInspection'
import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success]
const emit = defineEmits(['success'])
//
const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
//
const modalTitle = ref('未知表单')
//
const formDataA: any = ref(
{
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000094",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription1": undefined,
"TextDescription2": undefined,
"TextDescription3": undefined,
"Sended": 0
})
//
// [add - |update - |del - ]
const formType: any = ref('')
//
const refFormA = ref()
// A -
const formDataAInit: any = {
ID: 0,
StandardVersion: 1,
SupplierWorkNo: "",
SupplierCode: "1000032215",
ModelCode: "dtb00003",
CategoryType: "90003",
EquipmentUniqueCode: '',
FactoryCode: '',
SupplierSupportId: '',
PdCode: "GX000094",
ProcessType: 3,
CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
InspectionResults: undefined,
Ecode: "NotImp",
SgEntityId: "NotImp",
DataUniqueIdentifier: "NotImp",
TextDescription1: undefined,
TextDescription2: undefined,
TextDescription3: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({
SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' }
@ -222,15 +244,14 @@ onMounted(() => {
})
//
const open = async (type: string, row?: any) => {
formTypeA.value = type
formType.value = type
await fnResetA()
switch (type) {
case 'add':
await fnResetA()
modalTitle.value = '新增外观质量检查'
refShow.value = true
break;
case 'edit':
await fnResetA()
modalTitle.value = '编辑外观质量检查'
refShow.value = true
const paramsA = {
@ -245,7 +266,6 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data
break;
case 'copy':
await fnResetA()
modalTitle.value = '复制外观质量检查'
refShow.value = true
const paramsB = {
@ -259,6 +279,8 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ID = 0
rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StartTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StopTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.Sended = 0
formDataA.value = rowInfoB.Data
break;
@ -299,7 +321,9 @@ const fnDeleteA = async (row: any) => {
}
//
const fnSubmitA = async () => {
switch (formTypeA.value) {
await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add':
const paramsA = {
data: formDataA.value
@ -331,34 +355,17 @@ const fnSubmitA = async () => {
}
refShow.value = false
emit('success')
}
})
}
//
const fnResetA = () => {
formDataA.value = {
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000094",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription1": undefined,
"TextDescription2": undefined,
"TextDescription3": undefined,
"Sended": 0
}
formDataA.value = formDataAInit
}
//
const fnEventCancel = () => {
refShow.value = false
}
</script>
<style scoped></style>

@ -1,43 +1,54 @@
<template>
<div class="xyp-xyp-app-quality-inspection-form" v-if="refShow">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA"
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer>
<vxe-modal class-name="csty-insulation-resistance-form" v-model="refShow" width="1200" height="770" show-zoom
show-footer :mask-closable=true>
<template #title>
<span style="color:#ffffff">{{ modalTitle }}</span>
</template>
<template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<a-card :bordered="false">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<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>
</vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div>
<spsn>{{ params.data.SupplierCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div>
<spsn>{{ params.data.ModelCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div>
<spsn>{{ params.data.CategoryType }}</spsn>
</template>
</vxe-form-item>
</vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable
@change="fnChangeA(params)"></vxe-input>
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12">
<!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div>
<spsn>{{ params.data.PdCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div>
<spsn>{{ params.data.CheckTime }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div>
<spsn>{{ params.data.PutCenterTime }}</spsn>
</template>
</vxe-form-item>
</vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" clearable
@change="fnChangeA(params)" style="width: 196px;"></vxe-input>
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" clearable
@change="fnChangeA(params)" style="width: 196px;"></vxe-input>
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,46 +107,54 @@
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12">
<!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div>
<spsn>{{ params.data.Ecode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div>
<spsn>{{ params.data.SgEntityId }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div>
<spsn>{{ params.data.DataUniqueIdentifier }}</spsn>
</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>
</vxe-form-item>
</a-card>
<a-card title="采集数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="相间(MΩ)"
field="Resistance" span="12">
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item title="相间(MΩ)" field="Resistance" span="12">
<template #default="params">
<vxe-input v-model="params.data.Resistance" placeholder="请输入相间" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="相导体与裸露导电部件之间(MΩ)"
field="InResistance" span="12">
<vxe-form-item title="相导体与裸露导电部件之间(MΩ)" field="InResistance" span="12">
<template #default="params">
<vxe-input v-model="params.data.InResistance" placeholder="请输入相导体与裸露导电部件之间" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
</vxe-form-gather>
</vxe-form>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button>
<vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template>
</vxe-modal>
</vxe-form>
</div>
</template>
<script lang="ts" setup name="InsulationResistanceForm">
@ -146,45 +165,46 @@ import { map as _map } from 'lodash'
import * as InsulationResistanceApi from '@/api/gw/insulationResistance'
import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success]
const emit = defineEmits(['success'])
//
const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
//
const modalTitle = ref('未知表单')
//
const formDataA: any = ref(
{
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000090",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"Resistance": undefined,
"InResistance": undefined,
"Sended": 0
})
// [add - |update - |del - ]
const formType: any = ref('')
//
const refFormA = ref()
// A -
const formDataAInit: any = {
ID: 0,
StandardVersion: 1,
SupplierWorkNo: "",
SupplierCode: "1000032215",
ModelCode: "dtb00003",
CategoryType: "90003",
EquipmentUniqueCode: '',
FactoryCode: '',
SupplierSupportId: '',
PdCode: "GX000090",
ProcessType: 3,
CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
InspectionResults: undefined,
Ecode: "NotImp",
SgEntityId: "NotImp",
DataUniqueIdentifier: "NotImp",
Resistance: undefined,
InResistance: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
//
const formRulesA: any = ref({
SupplierWorkNo: [
@ -211,15 +231,14 @@ onMounted(() => {
})
//
const open = async (type: string, row?: any) => {
formTypeA.value = type
formType.value = type
await fnResetA()
switch (type) {
case 'add':
await fnResetA()
modalTitle.value = '新增绝缘电阻的验证'
refShow.value = true
break;
case 'edit':
await fnResetA()
modalTitle.value = '编辑绝缘电阻的验证'
refShow.value = true
const paramsA = {
@ -234,7 +253,6 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data
break;
case 'copy':
await fnResetA()
modalTitle.value = '复制绝缘电阻的验证'
refShow.value = true
const paramsB = {
@ -248,6 +266,8 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ID = 0
rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StartTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StopTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.Sended = 0
formDataA.value = rowInfoB.Data
break;
@ -288,7 +308,9 @@ const fnDeleteA = async (row: any) => {
}
//
const fnSubmitA = async () => {
switch (formTypeA.value) {
await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add':
const paramsA = {
data: formDataA.value
@ -320,33 +342,16 @@ const fnSubmitA = async () => {
}
refShow.value = false
emit('success')
}
})
}
//
const fnResetA = () => {
formDataA.value = {
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000090",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"Resistance": undefined,
"InResistance": undefined,
"Sended": 0
}
formDataA.value = formDataAInit
}
//
const fnEventCancel = () => {
refShow.value = false
}
</script>
<style scoped></style>

@ -1,43 +1,54 @@
<template>
<div class="xyp-xyp-app-quality-inspection-form" v-if="refShow">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA"
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer>
<vxe-modal class-name="csty-machine-operation-form" v-model="refShow" width="1200" height="770" show-zoom
show-footer :mask-closable=true>
<template #title>
<span style="color:#ffffff">{{ modalTitle }}</span>
</template>
<template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<a-card :bordered="false">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<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>
</vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div>
<spsn>{{ params.data.SupplierCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div>
<spsn>{{ params.data.ModelCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div>
<spsn>{{ params.data.CategoryType }}</spsn>
</template>
</vxe-form-item>
</vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable
@change="fnChangeA(params)"></vxe-input>
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12">
<!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div>
<spsn>{{ params.data.PdCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div>
<spsn>{{ params.data.CheckTime }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div>
<spsn>{{ params.data.PutCenterTime }}</spsn>
</template>
</vxe-form-item>
</vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" clearable
@change="fnChangeA(params)" style="width: 196px;"></vxe-input>
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" clearable
@change="fnChangeA(params)" style="width: 196px;"></vxe-input>
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,24 +107,35 @@
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12">
<!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div>
<spsn>{{ params.data.Ecode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div>
<spsn>{{ params.data.SgEntityId }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div>
<spsn>{{ params.data.DataUniqueIdentifier }}</spsn>
</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>
</vxe-form-item>
</a-card>
<a-card title="采集数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="是否满足要求(对安装在装置内的开关电器及所有手动操作部件如主开关操作手柄均操作5次其机构动作应可靠正常联锁机构符合要求)" field="TextDescription" span="12">
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item title="是否满足要求(对安装在装置内的开关电器及所有手动操作部件如主开关操作手柄均操作5次其机构动作应可靠正常联锁机构符合要求)"
field="TextDescription" span="12">
<template #default="params">
<vxe-select v-model="params.data.TextDescription" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -121,15 +143,15 @@
</vxe-select>
</template>
</vxe-form-item>
</vxe-form-gather>
</vxe-form>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button>
<vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template>
</vxe-modal>
</vxe-form>
</div>
</template>
<script lang="ts" setup name="MachineOperationForm">
@ -140,45 +162,46 @@ import { map as _map } from 'lodash'
import * as MachineOperationApi from '@/api/gw/machineOperation'
import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success]
const emit = defineEmits(['success'])
//
const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
//
const modalTitle = ref('未知表单')
//
const formDataA: any = ref(
{
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000086",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription": undefined,
"Sended": 0
})
//
// [add - |update - |del - ]
const formType: any = ref('')
//
const refFormA = ref()
// A -
const formDataAInit: any = {
ID: 0,
StandardVersion: 1,
SupplierWorkNo: "",
SupplierCode: "1000032215",
ModelCode: "dtb00003",
CategoryType: "90003",
EquipmentUniqueCode: '',
FactoryCode: '',
SupplierSupportId: '',
PdCode: "GX000086",
ProcessType: 3,
CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
InspectionResults: undefined,
Ecode: "NotImp",
SgEntityId: "NotImp",
DataUniqueIdentifier: "NotImp",
TextDescription: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({
SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' }
@ -204,15 +227,14 @@ onMounted(() => {
})
//
const open = async (type: string, row?: any) => {
formTypeA.value = type
formType.value = type
await fnResetA()
switch (type) {
case 'add':
await fnResetA()
modalTitle.value = '新增机械操作'
refShow.value = true
break;
case 'edit':
await fnResetA()
modalTitle.value = '编辑机械操作'
refShow.value = true
const paramsA = {
@ -227,7 +249,6 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data
break;
case 'copy':
await fnResetA()
modalTitle.value = '复制机械操作'
refShow.value = true
const paramsB = {
@ -281,7 +302,9 @@ const fnDeleteA = async (row: any) => {
}
//
const fnSubmitA = async () => {
switch (formTypeA.value) {
await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add':
const paramsA = {
data: formDataA.value
@ -313,32 +336,16 @@ const fnSubmitA = async () => {
}
refShow.value = false
emit('success')
}
})
}
//
const fnResetA = () => {
formDataA.value = {
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000086",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription": undefined,
"Sended": 0
}
formDataA.value = formDataAInit
}
//
const fnEventCancel = () => {
refShow.value = false
}
</script>
<style scoped></style>

@ -1,43 +1,54 @@
<template>
<div class="xyp-protection-circuit-form" v-if="refShow">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA"
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer>
<vxe-modal class-name="csty-phase-loss-protection-testing-form" v-model="refShow" width="1200" height="770"
show-zoom show-footer :mask-closable=true>
<template #title>
<span style="color:#ffffff">{{ modalTitle }}</span>
</template>
<template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<a-card :bordered="false">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<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>
</vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div>
<spsn>{{ params.data.SupplierCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div>
<spsn>{{ params.data.ModelCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div>
<spsn>{{ params.data.CategoryType }}</spsn>
</template>
</vxe-form-item>
</vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable
@change="fnChangeA(params)"></vxe-input>
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12">
<!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div>
<spsn>{{ params.data.PdCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div>
<spsn>{{ params.data.CheckTime }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div>
<spsn>{{ params.data.PutCenterTime }}</spsn>
</template>
</vxe-form-item>
</vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" clearable
@change="fnChangeA(params)" style="width: 196px;"></vxe-input>
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" clearable
@change="fnChangeA(params)" style="width: 196px;"></vxe-input>
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,24 +107,35 @@
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12">
<!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div>
<spsn>{{ params.data.Ecode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div>
<spsn>{{ params.data.SgEntityId }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div>
<spsn>{{ params.data.DataUniqueIdentifier }}</spsn>
</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>
</vxe-form-item>
</a-card>
<a-card title="采集数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="是否满足要求(将装置电容器全部投入工作运行,将主电路任意一相断开,装置应能全部或至少缺相回路电容器切徐)" field="TextDescription" span="12">
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item title="是否满足要求(将装置电容器全部投入工作运行,将主电路任意一相断开,装置应能全部或至少缺相回路电容器切徐)"
field="TextDescription" span="12">
<template #default="params">
<vxe-select v-model="params.data.TextDescription" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -121,15 +143,15 @@
</vxe-select>
</template>
</vxe-form-item>
</vxe-form-gather>
</vxe-form>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button>
<vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template>
</vxe-modal>
</vxe-form>
</div>
</template>
<script lang="ts" setup name="PhaseLossProtectionTestingForm">
@ -140,45 +162,46 @@ import { map as _map } from 'lodash'
import * as PhaseLossProtectionTestingApi from '@/api/gw/phaseLossProtectionTesting'
import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success]
const emit = defineEmits(['success'])
//
const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
//
const modalTitle = ref('未知表单')
//
const formDataA: any = ref(
{
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000091",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription": undefined,
"Sended": 0
})
//
// [add - |update - |del - ]
const formType: any = ref('')
//
const refFormA = ref()
// A -
const formDataAInit: any = {
ID: 0,
StandardVersion: 1,
SupplierWorkNo: "",
SupplierCode: "1000032215",
ModelCode: "dtb00003",
CategoryType: "90003",
EquipmentUniqueCode: '',
FactoryCode: '',
SupplierSupportId: '',
PdCode: "GX000091",
ProcessType: 3,
CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
InspectionResults: undefined,
Ecode: "NotImp",
SgEntityId: "NotImp",
DataUniqueIdentifier: "NotImp",
TextDescription: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({
SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' }
@ -204,15 +227,14 @@ onMounted(() => {
})
//
const open = async (type: string, row?: any) => {
formTypeA.value = type
formType.value = type
await fnResetA()
switch (type) {
case 'add':
await fnResetA()
modalTitle.value = '新增缺相保护试验'
refShow.value = true
break;
case 'edit':
await fnResetA()
modalTitle.value = '编辑缺相保护试验'
refShow.value = true
const paramsA = {
@ -227,7 +249,6 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data
break;
case 'copy':
await fnResetA()
modalTitle.value = '复制缺相保护试验'
refShow.value = true
const paramsB = {
@ -241,6 +262,8 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ID = 0
rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StartTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StopTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.Sended = 0
formDataA.value = rowInfoB.Data
break;
@ -281,7 +304,9 @@ const fnDeleteA = async (row: any) => {
}
//
const fnSubmitA = async () => {
switch (formTypeA.value) {
await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add':
const paramsA = {
data: formDataA.value
@ -313,32 +338,16 @@ const fnSubmitA = async () => {
}
refShow.value = false
emit('success')
}
})
}
//
const fnResetA = () => {
formDataA.value = {
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000091",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription": undefined,
"Sended": 0
}
formDataA.value = formDataAInit
}
//
const fnEventCancel = () => {
refShow.value = false
}
</script>
<style scoped></style>

@ -1,43 +1,54 @@
<template>
<div class="xyp-power-operation-testing-form" v-if="refShow">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA"
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer>
<vxe-modal class-name="csty-power-operation-testing-form" v-model="refShow" width="1200" height="770" show-zoom
show-footer :mask-closable=true>
<template #title>
<span style="color:#ffffff">{{ modalTitle }}</span>
</template>
<template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<a-card :bordered="false">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<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>
</vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div>
<spsn>{{ params.data.SupplierCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div>
<spsn>{{ params.data.ModelCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div>
<spsn>{{ params.data.CategoryType }}</spsn>
</template>
</vxe-form-item>
</vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable
@change="fnChangeA(params)"></vxe-input>
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12">
<!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div>
<spsn>{{ params.data.PdCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div>
<spsn>{{ params.data.CheckTime }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div>
<spsn>{{ params.data.PutCenterTime }}</spsn>
</template>
</vxe-form-item>
</vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" clearable
@change="fnChangeA(params)" style="width: 196px;"></vxe-input>
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" clearable
@change="fnChangeA(params)" style="width: 196px;"></vxe-input>
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,24 +107,35 @@
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12">
<!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div>
<spsn>{{ params.data.Ecode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div>
<spsn>{{ params.data.SgEntityId }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div>
<spsn>{{ params.data.DataUniqueIdentifier }}</spsn>
</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>
</vxe-form-item>
</a-card>
<a-card title="采集数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="是否满足要求(85%~110%额定电压范围操作5次电器元件的动作显示均应符合相应要求且各操作器件动作灵活)" field="TextDescription" span="12">
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item title="是否满足要求(85%~110%额定电压范围操作5次电器元件的动作显示均应符合相应要求且各操作器件动作灵活)"
field="TextDescription" span="12">
<template #default="params">
<vxe-select v-model="params.data.TextDescription" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -121,15 +143,15 @@
</vxe-select>
</template>
</vxe-form-item>
</vxe-form-gather>
</vxe-form>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button>
<vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template>
</vxe-modal>
</vxe-form>
</div>
</template>
<script lang="ts" setup name="PowerOperationTestingForm">
@ -140,45 +162,46 @@ import { map as _map } from 'lodash'
import * as PowerOperationTestingApi from '@/api/gw/powerOperationTesting'
import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success]
const emit = defineEmits(['success'])
//
const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
//
const modalTitle = ref('未知表单')
//
const formDataA: any = ref(
{
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000088",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription": undefined,
"Sended": 0
})
//
// [add - |update - |del - ]
const formType: any = ref('')
//
const refFormA = ref()
// A -
const formDataAInit: any = {
ID: 0,
StandardVersion: 1,
SupplierWorkNo: "",
SupplierCode: "1000032215",
ModelCode: "dtb00003",
CategoryType: "90003",
EquipmentUniqueCode: '',
FactoryCode: '',
SupplierSupportId: '',
PdCode: "GX000088",
ProcessType: 3,
CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
InspectionResults: undefined,
Ecode: "NotImp",
SgEntityId: "NotImp",
DataUniqueIdentifier: "NotImp",
TextDescription: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({
SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' }
@ -204,7 +227,7 @@ onMounted(() => {
})
//
const open = async (type: string, row?: any) => {
formTypeA.value = type
formType.value = type
switch (type) {
case 'add':
await fnResetA()
@ -241,6 +264,8 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ID = 0
rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StartTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StopTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.Sended = 0
formDataA.value = rowInfoB.Data
break;
@ -281,7 +306,9 @@ const fnDeleteA = async (row: any) => {
}
//
const fnSubmitA = async () => {
switch (formTypeA.value) {
await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add':
const paramsA = {
data: formDataA.value
@ -313,32 +340,16 @@ const fnSubmitA = async () => {
}
refShow.value = false
emit('success')
}
})
}
//
const fnResetA = () => {
formDataA.value = {
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000088",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription": undefined,
"Sended": 0
}
formDataA.value = formDataAInit
}
//
const fnEventCancel = () => {
refShow.value = false
}
</script>
<style scoped></style>

@ -1,43 +1,54 @@
<template>
<div class="xyp-protection-circuit-form" v-if="refShow">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA"
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer>
<vxe-modal class-name="csty-voltage-protection-form" v-model="refShow" width="1200" height="770" show-zoom
show-footer :mask-closable=true>
<template #title>
<span style="color:#ffffff">{{ modalTitle }}</span>
</template>
<template #default>
<a-card title="基本数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<a-card :bordered="false">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
:rules="formRulesA">
<vxe-form-gather span="24">
<vxe-form-item span="24">
<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>
</vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div>
<spsn>{{ params.data.SupplierCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div>
<spsn>{{ params.data.ModelCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div>
<spsn>{{ params.data.CategoryType }}</spsn>
</template>
</vxe-form-item>
</vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" clearable
@change="fnChangeA(params)"></vxe-input>
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12">
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12">
<!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div>
<spsn>{{ params.data.PdCode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div>
<spsn>{{ params.data.CheckTime }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div>
<spsn>{{ params.data.PutCenterTime }}</spsn>
</template>
</vxe-form-item>
</vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" clearable
@change="fnChangeA(params)" style="width: 196px;"></vxe-input>
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" clearable
@change="fnChangeA(params)" style="width: 196px;"></vxe-input>
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
clearable @change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,24 +107,35 @@
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12">
<!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div>
<spsn>{{ params.data.Ecode }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div>
<spsn>{{ params.data.SgEntityId }}</spsn>
</template>
</vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div>
<spsn>{{ params.data.DataUniqueIdentifier }}</spsn>
</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>
</vxe-form-item>
</a-card>
<a-card title="采集数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="是否满足要求(将电容器拆除给装置接上电源并将电容器投切开关闭合调整电源电压1.1~1.2倍的额定电压时应在1min内将电容器切除)" field="TextDescription" span="12">
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item title="是否满足要求(将电容器拆除给装置接上电源并将电容器投切开关闭合调整电源电压1.1~1.2倍的额定电压时应在1min内将电容器切除)"
field="TextDescription" span="12">
<template #default="params">
<vxe-select v-model="params.data.TextDescription" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -121,15 +143,15 @@
</vxe-select>
</template>
</vxe-form-item>
</vxe-form-gather>
</vxe-form>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button>
<vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template>
</vxe-modal>
</vxe-form>
</div>
</template>
<script lang="ts" setup name="VoltageProtectionForm">
@ -140,45 +162,46 @@ import { map as _map } from 'lodash'
import * as VoltageProtectionApi from '@/api/gw/voltageProtection'
import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success]
const emit = defineEmits(['success'])
//
const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
//
const modalTitle = ref('未知表单')
//
const formDataA: any = ref(
{
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000089",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription": undefined,
"Sended": 0
})
//
// [add - |update - |del - ]
const formType: any = ref('')
//
const refFormA = ref()
// A -
const formDataAInit: any = {
ID: 0,
StandardVersion: 1,
SupplierWorkNo: "",
SupplierCode: "1000032215",
ModelCode: "dtb00003",
CategoryType: "90003",
EquipmentUniqueCode: '',
FactoryCode: '',
SupplierSupportId: '',
PdCode: "GX000089",
ProcessType: 3,
CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
InspectionResults: undefined,
Ecode: "NotImp",
SgEntityId: "NotImp",
DataUniqueIdentifier: "NotImp",
TextDescription: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({
SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' }
@ -204,15 +227,14 @@ onMounted(() => {
})
//
const open = async (type: string, row?: any) => {
formTypeA.value = type
formType.value = type
await fnResetA()
switch (type) {
case 'add':
await fnResetA()
modalTitle.value = '新增工频过电压保护试验'
refShow.value = true
break;
case 'edit':
await fnResetA()
modalTitle.value = '编辑工频过电压保护试验'
refShow.value = true
const paramsA = {
@ -227,7 +249,6 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data
break;
case 'copy':
await fnResetA()
modalTitle.value = '复制工频过电压保护试验'
refShow.value = true
const paramsB = {
@ -241,6 +262,8 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ID = 0
rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StartTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.StopTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.Sended = 0
formDataA.value = rowInfoB.Data
break;
@ -281,7 +304,9 @@ const fnDeleteA = async (row: any) => {
}
//
const fnSubmitA = async () => {
switch (formTypeA.value) {
await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add':
const paramsA = {
data: formDataA.value
@ -313,32 +338,17 @@ const fnSubmitA = async () => {
}
refShow.value = false
emit('success')
}
})
}
//
const fnResetA = () => {
formDataA.value = {
"ID": 0,
"StandardVersion": 1,
"SupplierWorkNo": "",
"SupplierCode": "1000032215",
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000089",
"ProcessType": 3,
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined,
"Ecode": "NotImp",
"SgEntityId": "NotImp",
"DataUniqueIdentifier": "NotImp",
"TextDescription": undefined,
"Sended": 0
}
formDataA.value = formDataAInit
}
//
const fnEventCancel = () => {
refShow.value = false
}
</script>
<style scoped></style>
Loading…
Cancel
Save