生产工艺及过程检验

main
mhsnet 7 months ago
parent 813521492f
commit e30cff76d1

@ -1,43 +1,54 @@
<template>
<div class="xyp-dao-xian-form" v-if="refShow">
<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>
<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">
<vxe-modal class-name="csty-box-app-struct-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 :bordered="false">
<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">
<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">
<span>{{ params.data.StandardVersion }}</span>
</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>
<span>{{ params.data.SupplierCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div>
<span>{{ params.data.ModelCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div>
<span>{{ params.data.CategoryType }}</span>
</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>
<span>{{ params.data.PdCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,33 +79,42 @@
</vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div>
<span>{{ params.data.CheckTime }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div>
<span>{{ params.data.PutCenterTime }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div>
<span>{{ params.data.Ecode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div>
<span>{{ params.data.SgEntityId }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<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>
</vxe-form-item>
</a-card>
<a-card title="采集数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="装置门的开合角度不应小于 135°灵活启闭" field="TextDescription1"
span="12">
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item title="装置门的开合角度不应小于 135°灵活启闭" field="TextDescription1" span="12">
<template #default="params">
<vxe-select v-model="params.data.TextDescription1" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -102,7 +122,8 @@
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="装置焊接、组配、防腐处理等工艺应符合相关标准,无虚焊、毛刺、撕边、搭接不工整等现象" field="TextDescription2" span="12">
<vxe-form-item title="装置焊接、组配、防腐处理等工艺应符合相关标准,无虚焊、毛刺、撕边、搭接不工整等现象" field="TextDescription2"
span="12">
<template #default="params">
<vxe-select v-model="params.data.TextDescription2" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -110,8 +131,7 @@
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="箱体外壳应接地良好,接地应采用双接地方式" field="TextDescription3"
span="12">
<vxe-form-item title="箱体外壳应接地良好,接地应采用双接地方式" field="TextDescription3" span="12">
<template #default="params">
<vxe-select v-model="params.data.TextDescription3" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -119,15 +139,16 @@
</vxe-select>
</template>
</vxe-form-item>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button>
</template>
</vxe-modal>
</vxe-form>
</div>
</vxe-form-gather>
</vxe-form>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template>
</vxe-modal>
</template>
<script lang="ts" setup name="BoxAppStructForm">
@ -138,44 +159,45 @@ import { map as _map } from 'lodash'
import * as BoxAppStructApi from '@/api/gw/boxAppStruct'
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": "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
})
//
// [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: "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
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({
SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' }
@ -201,7 +223,7 @@ onMounted(() => {
})
//
const open = async (type: string, row?: any) => {
formTypeA.value = type
formType.value = type
switch (type) {
case 'add':
await fnResetA()
@ -278,63 +300,50 @@ const fnDeleteA = async (row: any) => {
}
//
const fnSubmitA = async () => {
switch (formTypeA.value) {
case 'add':
const paramsA = {
data: formDataA.value
}
await BoxAppStructApi.saveBoxAppStruct(paramsA)
VXETable.modal.message({ content: '新增成功', status: 'success' })
break;
case 'edit':
let setVal: any = _map(formDataA.value, (o1, k1) => {
return { field: k1, value: o1 }
})
const paramsB = {
filter: {
field: 'ID',
value: formDataA.value.ID
},
set: setVal
}
await BoxAppStructApi.editBoxAppStruct(paramsB)
VXETable.modal.message({ content: '编辑成功', status: 'success' })
break;
case 'copy':
const paramsC = {
data: formDataA.value
await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add':
const paramsA = {
data: formDataA.value
}
await BoxAppStructApi.saveBoxAppStruct(paramsA)
VXETable.modal.message({ content: '新增成功', status: 'success' })
break;
case 'edit':
let setVal: any = _map(formDataA.value, (o1, k1) => {
return { field: k1, value: o1 }
})
const paramsB = {
filter: {
field: 'ID',
value: formDataA.value.ID
},
set: setVal
}
await BoxAppStructApi.editBoxAppStruct(paramsB)
VXETable.modal.message({ content: '编辑成功', status: 'success' })
break;
case 'copy':
const paramsC = {
data: formDataA.value
}
await BoxAppStructApi.saveBoxAppStruct(paramsC)
VXETable.modal.message({ content: '复制成功', status: 'success' })
break;
}
await BoxAppStructApi.saveBoxAppStruct(paramsC)
VXETable.modal.message({ content: '复制成功', status: 'success' })
break;
}
refShow.value = false
emit('success')
refShow.value = false
emit('success')
}
})
}
//
const fnResetA = () => {
formDataA.value = {
"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
}
formDataA.value = formDataAInit
}
//
const fnEventCancel = () => {
refShow.value = false
}
</script>
<style scoped></style>

@ -1,43 +1,54 @@
<template>
<div class="xyp-component-inspect-form" v-if="refShow">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="150" :data="formDataA" :rules="formRulesA"
@submit="fnSubmitA" @reset="fnResetA" custom-layout>
<vxe-modal v-model="refShow" width="960" 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">
<vxe-modal class-name="csty-component-inspect-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 :bordered="false">
<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">
<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">
<span>{{ params.data.StandardVersion }}</span>
</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>
<span>{{ params.data.SupplierCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div>
<span>{{ params.data.ModelCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div>
<span>{{ params.data.CategoryType }}</span>
</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>
<span>{{ params.data.PdCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,31 +79,41 @@
</vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div>
<span>{{ params.data.CheckTime }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div>
<span>{{ params.data.PutCenterTime }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div>
<span>{{ params.data.Ecode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div>
<span>{{ params.data.SgEntityId }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<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>
</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">
@ -102,7 +123,8 @@
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="成套设备内的开关器件和元件的安装依据其制造商所提供的说明及满足招标技术规范的要求" field="TextDescription2" span="12">
<vxe-form-item title="成套设备内的开关器件和元件的安装依据其制造商所提供的说明及满足招标技术规范的要求" field="TextDescription2"
span="12">
<template #default="params">
<vxe-select v-model="params.data.TextDescription2" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -110,15 +132,16 @@
</vxe-select>
</template>
</vxe-form-item>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button>
</template>
</vxe-modal>
</vxe-form>
</div>
</vxe-form-gather>
</vxe-form>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template>
</vxe-modal>
</template>
<script lang="ts" setup name="ComponentInspectForm">
@ -129,43 +152,44 @@ import { map as _map } from 'lodash'
import * as ComponentInspectApi from '@/api/gw/componentInspect'
import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
const { 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": "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
})
//
// [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: "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
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({
SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' }
@ -191,17 +215,16 @@ 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
modalTitle.value = '新增元器件选择及安装检查'
break;
case 'edit':
await fnResetA()
modalTitle.value = '编辑元器件选择及安装检查'
refShow.value = true
modalTitle.value = '编辑元器件选择及安装检查'
const paramsA = {
"filter": {
"field": "ID",
@ -214,9 +237,8 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data
break;
case 'copy':
await fnResetA()
modalTitle.value = '复制元器件选择及安装检查'
refShow.value = true
modalTitle.value = '复制元器件选择及安装检查'
const paramsB = {
"filter": {
"field": "ID",
@ -268,62 +290,50 @@ const fnDeleteA = async (row: any) => {
}
//
const fnSubmitA = async () => {
switch (formTypeA.value) {
case 'add':
const paramsA = {
data: formDataA.value
}
await ComponentInspectApi.saveComponentInspect(paramsA)
VXETable.modal.message({ content: '新增成功', status: 'success' })
break;
case 'edit':
let setVal: any = _map(formDataA.value, (o1, k1) => {
return { field: k1, value: o1 }
})
const paramsB = {
filter: {
field: 'ID',
value: formDataA.value.ID
},
set: setVal
}
await ComponentInspectApi.editComponentInspect(paramsB)
VXETable.modal.message({ content: '编辑成功', status: 'success' })
break;
case 'copy':
const paramsC = {
data: formDataA.value
await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add':
const paramsA = {
data: formDataA.value
}
await ComponentInspectApi.saveComponentInspect(paramsA)
VXETable.modal.message({ content: '新增成功', status: 'success' })
break;
case 'edit':
let setVal: any = _map(formDataA.value, (o1, k1) => {
return { field: k1, value: o1 }
})
const paramsB = {
filter: {
field: 'ID',
value: formDataA.value.ID
},
set: setVal
}
await ComponentInspectApi.editComponentInspect(paramsB)
VXETable.modal.message({ content: '编辑成功', status: 'success' })
break;
case 'copy':
const paramsC = {
data: formDataA.value
}
await ComponentInspectApi.saveComponentInspect(paramsC)
VXETable.modal.message({ content: '复制成功', status: 'success' })
break;
}
await ComponentInspectApi.saveComponentInspect(paramsC)
VXETable.modal.message({ content: '复制成功', status: 'success' })
break;
}
refShow.value = false
emit('success')
refShow.value = false
emit('success')
}
})
}
//
const fnResetA = () => {
formDataA.value = {
"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
}
formDataA.value = formDataAInit
}
//
const fnEventCancel = () => {
refShow.value = false
}
</script>
<style scoped></style>

@ -1,43 +1,54 @@
<template>
<div class="xyp-dao-xian-form" v-if="refShow">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="210" :data="formDataA" :rules="formRulesA"
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title">
<vxe-modal v-model="refShow" width="1160" 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">
<vxe-modal class-name="csty-dao-xian-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 :bordered="false">
<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">
<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">
<span>{{ params.data.StandardVersion }}</span>
</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>
<span>{{ params.data.SupplierCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div>
<span>{{ params.data.ModelCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div>
<span>{{ params.data.CategoryType }}</span>
</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>
<span>{{ params.data.PdCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,33 +79,42 @@
</vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div>
<span>{{ params.data.CheckTime }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div>
<span>{{ params.data.PutCenterTime }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div>
<span>{{ params.data.Ecode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div>
<span>{{ params.data.SgEntityId }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<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>
</vxe-form-item>
</a-card>
<a-card title="采集数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="导体颜色及相序排列满足招标技术规范的要求" field="TextDescription1"
span="12">
</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>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -110,8 +130,7 @@
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="控制回路应选择耐气候型铜芯绝缘单股导线,截面积不小于 1.5mm2" field="TextDescription3"
span="12">
<vxe-form-item title="控制回路应选择耐气候型铜芯绝缘单股导线,截面积不小于 1.5mm2" field="TextDescription3" span="12">
<template #default="params">
<vxe-select v-model="params.data.TextDescription3" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -127,8 +146,7 @@
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="计量电流回路导线截面积不小于4mm2" field="TextDescription5"
span="12">
<vxe-form-item title="计量电流回路导线截面积不小于4mm2" field="TextDescription5" span="12">
<template #default="params">
<vxe-select v-model="params.data.TextDescription5" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -136,7 +154,8 @@
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="跨越装置内活动部位,应使用软铜线,并留有适度裕度,防止机械损伤,软铜线截面积应适当加大" field="TextDescription6" span="12">
<vxe-form-item title="跨越装置内活动部位,应使用软铜线,并留有适度裕度,防止机械损伤,软铜线截面积应适当加大" field="TextDescription6"
span="12">
<template #default="params">
<vxe-select v-model="params.data.TextDescription6" clearable>
<vxe-option :key="1" :value="1" :label="`是`"></vxe-option>
@ -144,15 +163,16 @@
</vxe-select>
</template>
</vxe-form-item>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button>
</template>
</vxe-modal>
</vxe-form>
</div>
</vxe-form-gather>
</vxe-form>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template>
</vxe-modal>
</template>
<script lang="ts" setup name="DaoXianForm">
@ -163,47 +183,48 @@ import { map as _map } from 'lodash'
import * as DaoXianApi from '@/api/gw/daoXian'
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": "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
})
//
// [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: "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
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({
SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' }
@ -222,14 +243,14 @@ const formRulesA: any = ref({
],
TextDescription2: [
{ required: true, message: '请选择是否合格' }
],
]
})
//
onMounted(() => {
})
//
const open = async (type: string, row?: any) => {
formTypeA.value = type
formType.value = type
switch (type) {
case 'add':
await fnResetA()
@ -306,66 +327,50 @@ const fnDeleteA = async (row: any) => {
}
//
const fnSubmitA = async () => {
switch (formTypeA.value) {
case 'add':
const paramsA = {
data: formDataA.value
}
await DaoXianApi.saveDaoXian(paramsA)
VXETable.modal.message({ content: '新增成功', status: 'success' })
break;
case 'edit':
let setVal: any = _map(formDataA.value, (o1, k1) => {
return { field: k1, value: o1 }
})
const paramsB = {
filter: {
field: 'ID',
value: formDataA.value.ID
},
set: setVal
await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add':
const paramsA = {
data: formDataA.value
}
await DaoXianApi.saveDaoXian(paramsA)
VXETable.modal.message({ content: '新增成功', status: 'success' })
break;
case 'edit':
let setVal: any = _map(formDataA.value, (o1, k1) => {
return { field: k1, value: o1 }
})
const paramsB = {
filter: {
field: 'ID',
value: formDataA.value.ID
},
set: setVal
}
await DaoXianApi.editDaoXian(paramsB)
VXETable.modal.message({ content: '编辑成功', status: 'success' })
break;
case 'copy':
const paramsC = {
data: formDataA.value
}
await DaoXianApi.saveDaoXian(paramsC)
VXETable.modal.message({ content: '复制成功', status: 'success' })
break;
}
await DaoXianApi.editDaoXian(paramsB)
VXETable.modal.message({ content: '编辑成功', status: 'success' })
break;
case 'copy':
const paramsC = {
data: formDataA.value
}
await DaoXianApi.saveDaoXian(paramsC)
VXETable.modal.message({ content: '复制成功', status: 'success' })
break;
}
refShow.value = false
emit('success')
refShow.value = false
emit('success')
}
})
}
//
const fnResetA = () => {
formDataA.value = {
"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
}
formDataA.value = formDataAInit
}
//
const fnEventCancel = () => {
refShow.value = false
}
</script>
<style scoped></style>

@ -1,43 +1,53 @@
<template>
<div class="xyp-elec-gap-form" v-if="refShow">
<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>
<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">
<vxe-modal class-name="csty-elec-distance-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 :bordered="false">
<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">
<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">
<span>{{ params.data.StandardVersion }}</span>
</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>
<span>{{ params.data.SupplierCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div>
<span>{{ params.data.ModelCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div>
<span>{{ params.data.CategoryType }}</span>
</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 +62,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>
<span>{{ params.data.PdCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,31 +78,41 @@
</vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div>
<span>{{ params.data.CheckTime }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div>
<span>{{ params.data.PutCenterTime }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div>
<span>{{ params.data.Ecode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div>
<span>{{ params.data.SgEntityId }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<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>
</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="极对极之间(mm)" field="GapDistance1" span="12">
<template #default="params">
<vxe-input v-model="params.data.GapDistance1" placeholder="请输入距离" clearable
@ -111,15 +131,15 @@
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button>
</template>
</vxe-modal>
</vxe-form>
</div>
</vxe-form-gather>
</vxe-form>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template>
</vxe-modal>
</template>
<script lang="ts" setup name="ElecDistanceForm">
@ -130,44 +150,45 @@ import { map as _map } from 'lodash'
import * as ElecDistanceApi from '@/api/gw/elecDistance'
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": "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
})
//
// [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: "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
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({
SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' }
@ -196,7 +217,7 @@ onMounted(() => {
})
//
const open = async (type: string, row?: any) => {
formTypeA.value = type
formType.value = type
switch (type) {
case 'add':
await fnResetA()
@ -273,63 +294,50 @@ const fnDeleteA = async (row: any) => {
}
//
const fnSubmitA = async () => {
switch (formTypeA.value) {
case 'add':
const paramsA = {
data: formDataA.value
}
await ElecDistanceApi.saveElecDistance(paramsA)
VXETable.modal.message({ content: '新增成功', status: 'success' })
break;
case 'edit':
let setVal: any = _map(formDataA.value, (o1, k1) => {
return { field: k1, value: o1 }
})
const paramsB = {
filter: {
field: 'ID',
value: formDataA.value.ID
},
set: setVal
}
await ElecDistanceApi.editElecDistance(paramsB)
VXETable.modal.message({ content: '编辑成功', status: 'success' })
break;
case 'copy':
const paramsC = {
data: formDataA.value
await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add':
const paramsA = {
data: formDataA.value
}
await ElecDistanceApi.saveElecDistance(paramsA)
VXETable.modal.message({ content: '新增成功', status: 'success' })
break;
case 'edit':
let setVal: any = _map(formDataA.value, (o1, k1) => {
return { field: k1, value: o1 }
})
const paramsB = {
filter: {
field: 'ID',
value: formDataA.value.ID
},
set: setVal
}
await ElecDistanceApi.editElecDistance(paramsB)
VXETable.modal.message({ content: '编辑成功', status: 'success' })
break;
case 'copy':
const paramsC = {
data: formDataA.value
}
await ElecDistanceApi.saveElecDistance(paramsC)
VXETable.modal.message({ content: '复制成功', status: 'success' })
break;
}
await ElecDistanceApi.saveElecDistance(paramsC)
VXETable.modal.message({ content: '复制成功', status: 'success' })
break;
}
refShow.value = false
emit('success')
refShow.value = false
emit('success')
}
})
}
//
const fnResetA = () => {
formDataA.value = {
"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
}
formDataA.value = formDataAInit
}
//
const fnEventCancel = () => {
refShow.value = false
}
</script>
<style scoped></style>

@ -1,60 +1,69 @@
<template>
<div class="xyp-elec-gap-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="1160" 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">
<vxe-modal class-name="csty-elec-gap-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>
<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="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">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div>
<span>{{ params.data.StandardVersion }}</span>
</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> -->
<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">
<template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div>
<span>{{ params.data.SupplierCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div>
<span>{{ params.data.ModelCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div>
<span>{{ params.data.CategoryType }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
</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>
</template>
</vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12">
<template #default="params">
<vxe-input v-model="params.data.FactoryCode" placeholder="请输入厂区编号" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="供应商产品编号" field="SupplierSupportId" span="12">
<template #default="params">
<vxe-input v-model="params.data.SupplierSupportId" placeholder="请输入供应商产品编号" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params">
<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">
<template #default="params">
<vxe-input v-model="params.data.FactoryCode" placeholder="请输入厂区编号" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="供应商产品编号" field="SupplierSupportId" span="12">
<template #default="params">
<vxe-input v-model="params.data.SupplierSupportId" placeholder="请输入供应商产品编号" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div>
<span>{{ params.data.PdCode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,58 +77,66 @@
</vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div>
<span>{{ params.data.CheckTime }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div>
<span>{{ params.data.PutCenterTime }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div>
<span>{{ params.data.Ecode }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div>
<span>{{ params.data.SgEntityId }}</span>
</template>
</vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div>
</template>
</vxe-form-item>
</a-card>
<a-card title="采集数据" :bordered="false" style="margin: 10px">
<vxe-form-item title="极对极之间(mm)" field="GapDistance1" span="12">
<template #default="params">
<vxe-input v-model="params.data.GapDistance1" placeholder="请输入距离" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="不同电压的电路导体之间(mm)" field="GapDistance2" span="12">
<template #default="params">
<vxe-input v-model="params.data.GapDistance2" placeholder="请输入距离" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="带电部件与裸露导电部件之间(mm)" field="GapDistance3" span="12">
<template #default="params">
<vxe-input v-model="params.data.GapDistance3" placeholder="请输入距离" clearable
@change="fnChangeA(params)"></vxe-input>
<span>{{ params.data.DataUniqueIdentifier }}</span>
</template>
</vxe-form-item>
</a-card>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button>
</template>
</vxe-modal>
</vxe-form>
</div>
</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>
</vxe-form-gather>
<vxe-form-gather span="24">
<vxe-form-item title="极对极之间(mm)" field="GapDistance1" span="12">
<template #default="params">
<vxe-input v-model="params.data.GapDistance1" placeholder="请输入距离" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="不同电压的电路导体之间(mm)" field="GapDistance2" span="12">
<template #default="params">
<vxe-input v-model="params.data.GapDistance2" placeholder="请输入距离" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="带电部件与裸露导电部件之间(mm)" field="GapDistance3" span="12">
<template #default="params">
<vxe-input v-model="params.data.GapDistance3" placeholder="请输入距离" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
</vxe-form-gather>
</vxe-form>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template>
</vxe-modal>
</template>
<script lang="ts" setup name="ElecGapForm">
@ -130,44 +147,45 @@ import { map as _map } from 'lodash'
import * as ElecGapApi from '@/api/gw/elecGap'
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": "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
})
//
// [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": "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
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({
SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' }
@ -196,7 +214,7 @@ onMounted(() => {
})
//
const open = async (type: string, row?: any) => {
formTypeA.value = type
formType.value = type
switch (type) {
case 'add':
await fnResetA()
@ -273,63 +291,50 @@ const fnDeleteA = async (row: any) => {
}
//
const fnSubmitA = async () => {
switch (formTypeA.value) {
case 'add':
const paramsA = {
data: formDataA.value
await refFormA.value.validate().then(async (res: any) => {
if (!res) {
switch (formType.value) {
case 'add':
const paramsA = {
data: formDataA.value
}
await ElecGapApi.saveElecGap(paramsA)
VXETable.modal.message({ content: '新增成功', status: 'success' })
break;
case 'edit':
let setVal: any = _map(formDataA.value, (o1, k1) => {
return { field: k1, value: o1 }
})
const paramsB = {
filter: {
field: 'ID',
value: formDataA.value.ID
},
set: setVal
}
await ElecGapApi.editElecGap(paramsB)
VXETable.modal.message({ content: '编辑成功', status: 'success' })
break;
case 'copy':
const paramsC = {
data: formDataA.value
}
await ElecGapApi.saveElecGap(paramsC)
VXETable.modal.message({ content: '复制成功', status: 'success' })
break;
}
await ElecGapApi.saveElecGap(paramsA)
VXETable.modal.message({ content: '新增成功', status: 'success' })
break;
case 'edit':
let setVal: any = _map(formDataA.value, (o1, k1) => {
return { field: k1, value: o1 }
})
const paramsB = {
filter: {
field: 'ID',
value: formDataA.value.ID
},
set: setVal
}
await ElecGapApi.editElecGap(paramsB)
VXETable.modal.message({ content: '编辑成功', status: 'success' })
break;
case 'copy':
const paramsC = {
data: formDataA.value
}
await ElecGapApi.saveElecGap(paramsC)
VXETable.modal.message({ content: '复制成功', status: 'success' })
break;
}
refShow.value = false
emit('success')
refShow.value = false
emit('success')
}
})
}
//
const fnResetA = () => {
formDataA.value = {
"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
}
formDataA.value = formDataAInit
}
//
const fnEventCancel = () => {
refShow.value = false
}
</script>
<style scoped></style>
Loading…
Cancel
Save