|
|
|
@ -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>
|
|
|
|
|
<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 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="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>
|
|
|
|
|
</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="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,7 +327,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
|
|
|
|
@ -339,33 +362,15 @@ 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": "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>
|