siontion 7 months ago
commit 7066de8bf6

@ -12,3 +12,11 @@ export const getPoNoAndPoItemID = async () => {
return res return res
}) })
} }
// 获取供应商列表
export const getBaseSupplierList = async () => {
return await request
.post({ url: `/DistributionBoxTesting/GetBaseSupplierList`, data: { filter: {} } })
.then((res) => {
return res.Data
})
}

@ -52,12 +52,12 @@
<vxe-form-item span="24"> <vxe-form-item span="24">
<template #default="params"> <template #default="params">
<a-upload v-model:file-list="fileListA" name="file" :action="fileUpUrl" :headers="{}" <a-upload v-model:file-list="fileListA" name="file" :action="fileUpUrl" :headers="{}"
@change="fnChgFileA" :maxCount="1" accept=".xls" @change="fnChgFileA" :maxCount="1" accept=".xlsx"
:data="{ pono: params.data.PoNo, poitemid: params.data.PoItemId }" :data="{ pono: params.data.PoNo, poitemid: params.data.PoItemId }"
:disabled="disabledUp"> :disabled="disabledUp">
<a-button> <a-button>
<upload-outlined></upload-outlined> <upload-outlined></upload-outlined>
<span>实物ID文件上传</span> <span>实物ID文件上传(.xlsx文件)</span>
<span style="color: red;padding:0px 10px"> * <span style="color: red;padding:0px 10px"> *
请先选择(采购订单编|采购订单行项目id)</span> 请先选择(采购订单编|采购订单行项目id)</span>
</a-button> </a-button>
@ -166,7 +166,7 @@ const fnChgPoItemId = async (params: any) => {
} }
// A - A // A - A
const fnChgFileA = async (info: UploadChangeParam) => { const fnChgFileA = async (info: UploadChangeParam) => {
console.log(info) fnEventCancel()
// if (info.file.response) { // if (info.file.response) {
// let FileItems: any = XEUtils.clone(formDataB.value.FileItems, true) // let FileItems: any = XEUtils.clone(formDataB.value.FileItems, true)
// FileItems = JSON.parse(FileItems) // FileItems = JSON.parse(FileItems)

@ -53,38 +53,38 @@
</vxe-form-item> --> </vxe-form-item> -->
<vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12"> <vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号" clearable <vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料批次号" field="RmbNumber" span="12"> <vxe-form-item title="原材料批次号" field="RmbNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号" clearable <vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料品牌" field="BorMaterials" span="12"> <vxe-form-item title="原材料品牌" field="BorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌" clearable <vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12"> <vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商" clearable <vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料产地" field="OorMaterials" span="12"> <vxe-form-item title="原材料产地" field="OorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地" clearable <vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12"> <vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号" clearable <vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12"> <vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12">
@ -244,6 +244,7 @@
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
<SltBaseSupplier ref="refSltBaseSupplierA" @success="fnSltBaseSupplier" />
</template> </template>
<script lang="ts" setup name="BiLeiQiForm"> <script lang="ts" setup name="BiLeiQiForm">
@ -259,6 +260,9 @@ import { config } from '@/config/axios/config'
import XEUtils from 'xe-utils' import XEUtils from 'xe-utils'
import * as FileUploadApi from '@/api/gw/fileUpload' import * as FileUploadApi from '@/api/gw/fileUpload'
import * as comApi from '@/api/gw/com' import * as comApi from '@/api/gw/com'
import SltBaseSupplier from '@/views/Gw/com/SltBaseSupplier.vue'
//
const refSltBaseSupplierA = ref()
// //
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictProcessType } = storeToRefs(dictStore) const { dictProcessType } = storeToRefs(dictStore)
@ -586,5 +590,20 @@ const fnResetA = () => {
const fnEventCancel = () => { const fnEventCancel = () => {
refShow.value = false refShow.value = false
} }
//
const fnSltBaseSupplierAOpen = async (info: any) => {
refSltBaseSupplierA.value.open(info)
}
//
const fnSltBaseSupplier = async (info: any) => {
formDataA.value.RmibNumber = info.CheckNo
formDataA.value.RmbNumber = info.LotNo
formDataA.value.BorMaterials = info.Brand
formDataA.value.RawmManufacturer = info.Name
formDataA.value.OorMaterials = info.Origin
formDataA.value.MrmSpecification = info.Spec
formDataA.value.ManufactureDate = info.ProductionDate
formDataA.value.IncomDate = info.CheckDate
}
</script> </script>
<style scoped></style> <style scoped></style>

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

@ -53,38 +53,38 @@
</vxe-form-item> --> </vxe-form-item> -->
<vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12"> <vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号" clearable <vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料批次号" field="RmbNumber" span="12"> <vxe-form-item title="原材料批次号" field="RmbNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号" clearable <vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料品牌" field="BorMaterials" span="12"> <vxe-form-item title="原材料品牌" field="BorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌" clearable <vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12"> <vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商" clearable <vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料产地" field="OorMaterials" span="12"> <vxe-form-item title="原材料产地" field="OorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地" clearable <vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12"> <vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号" clearable <vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12"> <vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12">
@ -250,6 +250,7 @@
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
<SltBaseSupplier ref="refSltBaseSupplierA" @success="fnSltBaseSupplier" />
</template> </template>
<script lang="ts" setup name="BoxMateQualityForm"> <script lang="ts" setup name="BoxMateQualityForm">
@ -265,9 +266,13 @@ import type { UploadProps, UploadChangeParam } from 'ant-design-vue';
import { config } from '@/config/axios/config' import { config } from '@/config/axios/config'
import * as FileUploadApi from '@/api/gw/fileUpload' import * as FileUploadApi from '@/api/gw/fileUpload'
import * as comApi from '@/api/gw/com' import * as comApi from '@/api/gw/com'
import SltBaseSupplier from '@/views/Gw/com/SltBaseSupplier.vue'
//
const refSltBaseSupplierA = ref()
// //
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictProcessType } = storeToRefs(dictStore) const { dictProcessType } = storeToRefs(dictStore)
const dictBaseSupplierList: any = ref([])
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
@ -399,6 +404,7 @@ onMounted(() => {
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formType.value = type formType.value = type
dictBaseSupplierList.value = await comApi.getBaseSupplierList()
await fnResetA() await fnResetA()
switch (type) { switch (type) {
case 'add': case 'add':
@ -480,6 +486,7 @@ const fnChgFileB = async (info: UploadChangeParam) => {
formDataB.value.FileItems = JSON.stringify(FileItems) formDataB.value.FileItems = JSON.stringify(FileItems)
} }
} }
// open // open
defineExpose({ open }) defineExpose({ open })
// A // A
@ -605,5 +612,20 @@ const fnResetA = async () => {
const fnEventCancel = () => { const fnEventCancel = () => {
refShow.value = false refShow.value = false
} }
//
const fnSltBaseSupplierAOpen = async (info: any) => {
refSltBaseSupplierA.value.open(info)
}
//
const fnSltBaseSupplier = async (info: any) => {
formDataA.value.RmibNumber = info.CheckNo
formDataA.value.RmbNumber = info.LotNo
formDataA.value.BorMaterials = info.Brand
formDataA.value.RawmManufacturer = info.Name
formDataA.value.OorMaterials = info.Origin
formDataA.value.MrmSpecification = info.Spec
formDataA.value.ManufactureDate = info.ProductionDate
formDataA.value.IncomDate = info.CheckDate
}
</script> </script>
<style scoped></style> <style scoped></style>

@ -0,0 +1,151 @@
<template>
<vxe-modal class-name="csty-slt-base-supplier" v-model="refShow" width="1200" height="770" show-zoom show-footer
:mask-closable=true>
<template #default>
<vxe-grid ref="gridSltBaseSupplier" v-bind="gridOptionsA" v-on="gridEventsA">
<template #toolbar_buttons>
</template>
</vxe-grid>
</template>
<template #footer>
<vxe-button type="submit" status="primary" content="保存" @click="fnSubmit"></vxe-button>
<vxe-button type="reset" content="取消" @click="fnCancel"></vxe-button>
</template>
</vxe-modal>
</template>
<script lang="ts" setup name="SltBaseSupplier">
import { ref, reactive, defineProps } from 'vue'
import * as BaseSupplierApi from '@/api/gw/baseSupplier'
// [success]
const emit = defineEmits(['success'])
// Props
const props = defineProps(
{
columns: {
type: Array,
required: false,
default(rawProps: any) {
return [
{ type: 'radio', width: 40, fixed: 'left' },
{ field: 'CheckNo', title: '原材料检验批次号', fixed: 'left', width: 160 },
{ field: 'LotNo', title: '原材料批次号', width: 160 },
{ field: 'Brand', title: '原材料品牌', width: 160 },
{ field: 'Name', title: '原材料制造商', width: 160 },
{ field: 'Origin', title: '原材料产地', width: 160 },
{ field: 'Spec', title: '原材料规格型号', width: 160 },
{ field: 'ProductionDate', title: '原材料出厂日期', width: 160 },
{ field: 'CheckDate', title: '来料检验日期', width: 160 },
]
}
}
}
)
//
const gridSltBaseSupplier = ref()
//
const sltRow = ref()
//
// const queryParams: any = ref({
// currentPage: 1,
// pageSize: 10,
// total: 0,
// filter: {
// "logic": 0,
// "filters": []
// }
// })
// A
const gridOptionsA: any = ref({
border: true,
height: 650,
align: null,
columnConfig: {
resizable: true
},
columns: props.columns,
toolbarConfig: {
perfect: true,
refresh: true,
zoom: true,
custom: true,
slots: {
//
buttons: 'toolbar_buttons'
}
},
//data: [],
pagerConfig: {
enabled: true,
total: 0,
currentPage: 1,
pageSize: 10,
pageSizes: [10, 20, 50, 100]
},
proxyConfig: {
seq: true, //
sort: true, // query
filter: true, // query
form: true, // reload
props: {
// Promise<{ result: [], page: { total: 100 } }>
result: 'List', //
total: 'Total' //
},
// Promise
ajax: {
// queryreload
query: async ({ page, sorts, filters, form }: any) => {
const queryParams: any = reactive({
currentPage: page.currentPage,
pageSize: page.pageSize,
})
const data = await BaseSupplierApi.getBaseSupplierPaging(queryParams)
return data
},
// delete
delete: ({ body }: any) => { },
// save
save: ({ body }: any) => { },
add: ({ body }: any) => {
console.log(body)
},
}
}
})
//
const gridEventsA: any = {
radioChange({ row }: any) {
sltRow.value = row
}
}
//
const clearRadioRow = () => {
const $table = gridSltBaseSupplier.value
if ($table) {
sltRow.value = null
$table.clearRadioRow()
}
}
//
const refShow = ref(false)
//
const open = async (info: any) => {
refShow.value = true
clearRadioRow()
}
// open
defineExpose({ open })
//
const fnSubmit = () => {
emit('success', sltRow.value)
fnCancel()
}
//
const fnCancel = () => {
refShow.value = false
}
</script>
<style scoped></style>

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

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

@ -53,38 +53,38 @@
</vxe-form-item> --> </vxe-form-item> -->
<vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12"> <vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号" clearable <vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料批次号" field="RmbNumber" span="12"> <vxe-form-item title="原材料批次号" field="RmbNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号" clearable <vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料品牌" field="BorMaterials" span="12"> <vxe-form-item title="原材料品牌" field="BorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌" clearable <vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12"> <vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商" clearable <vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料产地" field="OorMaterials" span="12"> <vxe-form-item title="原材料产地" field="OorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地" clearable <vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12"> <vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号" clearable <vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12"> <vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12">
@ -237,6 +237,7 @@
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
<SltBaseSupplier ref="refSltBaseSupplierA" @success="fnSltBaseSupplier" />
</template> </template>
<script lang="ts" setup name="DianLiuHuGanQiForm"> <script lang="ts" setup name="DianLiuHuGanQiForm">
@ -252,6 +253,9 @@ import { config } from '@/config/axios/config'
import XEUtils from 'xe-utils' import XEUtils from 'xe-utils'
import * as FileUploadApi from '@/api/gw/fileUpload' import * as FileUploadApi from '@/api/gw/fileUpload'
import * as comApi from '@/api/gw/com' import * as comApi from '@/api/gw/com'
import SltBaseSupplier from '@/views/Gw/com/SltBaseSupplier.vue'
//
const refSltBaseSupplierA = ref()
// //
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictProcessType } = storeToRefs(dictStore) const { dictProcessType } = storeToRefs(dictStore)
@ -579,5 +583,20 @@ const fnResetA = async () => {
const fnEventCancel = () => { const fnEventCancel = () => {
refShow.value = false refShow.value = false
} }
//
const fnSltBaseSupplierAOpen = async (info: any) => {
refSltBaseSupplierA.value.open(info)
}
//
const fnSltBaseSupplier = async (info: any) => {
formDataA.value.RmibNumber = info.CheckNo
formDataA.value.RmbNumber = info.LotNo
formDataA.value.BorMaterials = info.Brand
formDataA.value.RawmManufacturer = info.Name
formDataA.value.OorMaterials = info.Origin
formDataA.value.MrmSpecification = info.Spec
formDataA.value.ManufactureDate = info.ProductionDate
formDataA.value.IncomDate = info.CheckDate
}
</script> </script>
<style scoped></style> <style scoped></style>

@ -53,38 +53,38 @@
</vxe-form-item> --> </vxe-form-item> -->
<vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12"> <vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号" clearable <vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料批次号" field="RmbNumber" span="12"> <vxe-form-item title="原材料批次号" field="RmbNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号" clearable <vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料品牌" field="BorMaterials" span="12"> <vxe-form-item title="原材料品牌" field="BorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌" clearable <vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12"> <vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商" clearable <vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料产地" field="OorMaterials" span="12"> <vxe-form-item title="原材料产地" field="OorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地" clearable <vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12"> <vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号" clearable <vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12"> <vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12">
@ -273,6 +273,7 @@
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
<SltBaseSupplier ref="refSltBaseSupplierA" @success="fnSltBaseSupplier" />
</template> </template>
<script lang="ts" setup name="DianRongQiForm"> <script lang="ts" setup name="DianRongQiForm">
@ -288,6 +289,9 @@ import { config } from '@/config/axios/config'
import XEUtils from 'xe-utils' import XEUtils from 'xe-utils'
import * as FileUploadApi from '@/api/gw/fileUpload' import * as FileUploadApi from '@/api/gw/fileUpload'
import * as comApi from '@/api/gw/com' import * as comApi from '@/api/gw/com'
import SltBaseSupplier from '@/views/Gw/com/SltBaseSupplier.vue'
//
const refSltBaseSupplierA = ref()
// //
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictProcessType } = storeToRefs(dictStore) const { dictProcessType } = storeToRefs(dictStore)
@ -632,5 +636,20 @@ const fnResetA = async () => {
const fnEventCancel = () => { const fnEventCancel = () => {
refShow.value = false refShow.value = false
} }
//
const fnSltBaseSupplierAOpen = async (info: any) => {
refSltBaseSupplierA.value.open(info)
}
//
const fnSltBaseSupplier = async (info: any) => {
formDataA.value.RmibNumber = info.CheckNo
formDataA.value.RmbNumber = info.LotNo
formDataA.value.BorMaterials = info.Brand
formDataA.value.RawmManufacturer = info.Name
formDataA.value.OorMaterials = info.Origin
formDataA.value.MrmSpecification = info.Spec
formDataA.value.ManufactureDate = info.ProductionDate
formDataA.value.IncomDate = info.CheckDate
}
</script> </script>
<style scoped></style> <style scoped></style>

@ -54,37 +54,37 @@
<vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12"> <vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号" clearable <vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料批次号" field="RmbNumber" span="12"> <vxe-form-item title="原材料批次号" field="RmbNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号" clearable <vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料品牌" field="BorMaterials" span="12"> <vxe-form-item title="原材料品牌" field="BorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌" clearable <vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12"> <vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商" clearable <vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料产地" field="OorMaterials" span="12"> <vxe-form-item title="原材料产地" field="OorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地" clearable <vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12"> <vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号" clearable <vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12"> <vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12">
@ -257,6 +257,7 @@
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
<SltBaseSupplier ref="refSltBaseSupplierA" @success="fnSltBaseSupplier" />
</template> </template>
<script lang="ts" setup name="DuanLuQiForm"> <script lang="ts" setup name="DuanLuQiForm">
@ -272,6 +273,9 @@ import { config } from '@/config/axios/config'
import XEUtils from 'xe-utils' import XEUtils from 'xe-utils'
import * as FileUploadApi from '@/api/gw/fileUpload' import * as FileUploadApi from '@/api/gw/fileUpload'
import * as comApi from '@/api/gw/com' import * as comApi from '@/api/gw/com'
import SltBaseSupplier from '@/views/Gw/com/SltBaseSupplier.vue'
//
const refSltBaseSupplierA = ref()
// //
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictProcessType } = storeToRefs(dictStore) const { dictProcessType } = storeToRefs(dictStore)
@ -613,5 +617,20 @@ const fnResetA = async () => {
const fnEventCancel = () => { const fnEventCancel = () => {
refShow.value = false refShow.value = false
} }
//
const fnSltBaseSupplierAOpen = async (info: any) => {
refSltBaseSupplierA.value.open(info)
}
//
const fnSltBaseSupplier = async (info: any) => {
formDataA.value.RmibNumber = info.CheckNo
formDataA.value.RmbNumber = info.LotNo
formDataA.value.BorMaterials = info.Brand
formDataA.value.RawmManufacturer = info.Name
formDataA.value.OorMaterials = info.Origin
formDataA.value.MrmSpecification = info.Spec
formDataA.value.ManufactureDate = info.ProductionDate
formDataA.value.IncomDate = info.CheckDate
}
</script> </script>
<style scoped></style> <style scoped></style>

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

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

@ -53,38 +53,38 @@
</vxe-form-item> --> </vxe-form-item> -->
<vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12"> <vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号" clearable <vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料批次号" field="RmbNumber" span="12"> <vxe-form-item title="原材料批次号" field="RmbNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号" clearable <vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料品牌" field="BorMaterials" span="12"> <vxe-form-item title="原材料品牌" field="BorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌" clearable <vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12"> <vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商" clearable <vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料产地" field="OorMaterials" span="12"> <vxe-form-item title="原材料产地" field="OorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地" clearable <vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12"> <vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号" clearable <vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12"> <vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12">
@ -257,6 +257,7 @@
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
<SltBaseSupplier ref="refSltBaseSupplierA" @success="fnSltBaseSupplier" />
</template> </template>
<script lang="ts" setup name="FusedIsolationSwitchForm"> <script lang="ts" setup name="FusedIsolationSwitchForm">
@ -272,6 +273,9 @@ import { config } from '@/config/axios/config'
import XEUtils from 'xe-utils' import XEUtils from 'xe-utils'
import * as FileUploadApi from '@/api/gw/fileUpload' import * as FileUploadApi from '@/api/gw/fileUpload'
import * as comApi from '@/api/gw/com' import * as comApi from '@/api/gw/com'
import SltBaseSupplier from '@/views/Gw/com/SltBaseSupplier.vue'
//
const refSltBaseSupplierA = ref()
// //
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictProcessType } = storeToRefs(dictStore) const { dictProcessType } = storeToRefs(dictStore)
@ -613,5 +617,20 @@ const fnResetA = async () => {
const fnEventCancel = () => { const fnEventCancel = () => {
refShow.value = false refShow.value = false
} }
//
const fnSltBaseSupplierAOpen = async (info: any) => {
refSltBaseSupplierA.value.open(info)
}
//
const fnSltBaseSupplier = async (info: any) => {
formDataA.value.RmibNumber = info.CheckNo
formDataA.value.RmbNumber = info.LotNo
formDataA.value.BorMaterials = info.Brand
formDataA.value.RawmManufacturer = info.Name
formDataA.value.OorMaterials = info.Origin
formDataA.value.MrmSpecification = info.Spec
formDataA.value.ManufactureDate = info.ProductionDate
formDataA.value.IncomDate = info.CheckDate
}
</script> </script>
<style scoped></style> <style scoped></style>

@ -53,38 +53,38 @@
</vxe-form-item> --> </vxe-form-item> -->
<vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12"> <vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号" clearable <vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料批次号" field="RmbNumber" span="12"> <vxe-form-item title="原材料批次号" field="RmbNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号" clearable <vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料品牌" field="BorMaterials" span="12"> <vxe-form-item title="原材料品牌" field="BorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌" clearable <vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12"> <vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商" clearable <vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料产地" field="OorMaterials" span="12"> <vxe-form-item title="原材料产地" field="OorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地" clearable <vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12"> <vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号" clearable <vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12"> <vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12">
@ -249,6 +249,7 @@
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
<SltBaseSupplier ref="refSltBaseSupplierA" @success="fnSltBaseSupplier" />
</template> </template>
<script lang="ts" setup name="LangYongBaoHuQiForm"> <script lang="ts" setup name="LangYongBaoHuQiForm">
@ -264,6 +265,9 @@ import { config } from '@/config/axios/config'
import XEUtils from 'xe-utils' import XEUtils from 'xe-utils'
import * as FileUploadApi from '@/api/gw/fileUpload' import * as FileUploadApi from '@/api/gw/fileUpload'
import * as comApi from '@/api/gw/com' import * as comApi from '@/api/gw/com'
import SltBaseSupplier from '@/views/Gw/com/SltBaseSupplier.vue'
//
const refSltBaseSupplierA = ref()
// //
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictProcessType } = storeToRefs(dictStore) const { dictProcessType } = storeToRefs(dictStore)
@ -592,5 +596,20 @@ const fnResetA = async () => {
const fnEventCancel = () => { const fnEventCancel = () => {
refShow.value = false refShow.value = false
} }
//
const fnSltBaseSupplierAOpen = async (info: any) => {
refSltBaseSupplierA.value.open(info)
}
//
const fnSltBaseSupplier = async (info: any) => {
formDataA.value.RmibNumber = info.CheckNo
formDataA.value.RmbNumber = info.LotNo
formDataA.value.BorMaterials = info.Brand
formDataA.value.RawmManufacturer = info.Name
formDataA.value.OorMaterials = info.Origin
formDataA.value.MrmSpecification = info.Spec
formDataA.value.ManufactureDate = info.ProductionDate
formDataA.value.IncomDate = info.CheckDate
}
</script> </script>
<style scoped></style> <style scoped></style>

@ -53,38 +53,38 @@
</vxe-form-item> --> </vxe-form-item> -->
<vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12"> <vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号" clearable <vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料批次号" field="RmbNumber" span="12"> <vxe-form-item title="原材料批次号" field="RmbNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号" clearable <vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料品牌" field="BorMaterials" span="12"> <vxe-form-item title="原材料品牌" field="BorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌" clearable <vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12"> <vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商" clearable <vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料产地" field="OorMaterials" span="12"> <vxe-form-item title="原材料产地" field="OorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地" clearable <vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12"> <vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号" clearable <vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12"> <vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12">
@ -249,6 +249,7 @@
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
<SltBaseSupplier ref="refSltBaseSupplierA" @success="fnSltBaseSupplier" />
</template> </template>
<script lang="ts" setup name="MuPaiForm"> <script lang="ts" setup name="MuPaiForm">
@ -264,6 +265,9 @@ import { config } from '@/config/axios/config'
import XEUtils from 'xe-utils' import XEUtils from 'xe-utils'
import * as FileUploadApi from '@/api/gw/fileUpload' import * as FileUploadApi from '@/api/gw/fileUpload'
import * as comApi from '@/api/gw/com' import * as comApi from '@/api/gw/com'
import SltBaseSupplier from '@/views/Gw/com/SltBaseSupplier.vue'
//
const refSltBaseSupplierA = ref()
// //
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictProcessType } = storeToRefs(dictStore) const { dictProcessType } = storeToRefs(dictStore)
@ -601,5 +605,20 @@ const fnResetA = async () => {
const fnEventCancel = () => { const fnEventCancel = () => {
refShow.value = false refShow.value = false
} }
//
const fnSltBaseSupplierAOpen = async (info: any) => {
refSltBaseSupplierA.value.open(info)
}
//
const fnSltBaseSupplier = async (info: any) => {
formDataA.value.RmibNumber = info.CheckNo
formDataA.value.RmbNumber = info.LotNo
formDataA.value.BorMaterials = info.Brand
formDataA.value.RawmManufacturer = info.Name
formDataA.value.OorMaterials = info.Origin
formDataA.value.MrmSpecification = info.Spec
formDataA.value.ManufactureDate = info.ProductionDate
formDataA.value.IncomDate = info.CheckDate
}
</script> </script>
<style></style> <style></style>

@ -1,69 +1,71 @@
<template> <template>
<div class="xyp-power-frequancy-testing-form" v-if="refShow"> <vxe-modal class-name="csty-power-frequancy-testing-form" v-model="refShow" width="1200" height="770" show-zoom
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA" show-footer :mask-closable=true>
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title"> <template #title>
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer> <span style="color:#ffffff">{{ modalTitle }}</span>
<template #title> </template>
<span style="color:#ffffff">{{ modalTitle }}</span> <template #default>
</template> <a-card :bordered="false">
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
<template #default> :rules="formRulesA">
<a-card title="基本数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12"> <vxe-form-item span="24">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div> <div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
基本数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12"> <vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable <vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12"> <!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <spsn>{{ params.data.SupplierCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12"> <vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div> <spsn>{{ params.data.ModelCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12"> <vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div> <spsn>{{ params.data.CategoryType }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12"> <vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" <vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
clearable @change="fnChangeA(params)"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="厂区编号" field="FactoryCode" span="12"> <vxe-form-item title="厂区编号" field="FactoryCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.FactoryCode" placeholder="请输入厂区编号" clearable <vxe-input v-model="params.data.FactoryCode" placeholder="请输入厂区编号" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="供应商产品编号" field="SupplierSupportId" span="12"> <vxe-form-item title="供应商产品编号" field="SupplierSupportId" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierSupportId" placeholder="请输入供应商产品编号" clearable <vxe-input v-model="params.data.SupplierSupportId" placeholder="请输入供应商产品编号" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12"> <!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div> <spsn>{{ params.data.PdCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12"> <vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -76,33 +78,28 @@
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12"> <vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div> <spsn>{{ params.data.CheckTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12"> <vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div> <spsn>{{ params.data.PutCenterTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12"> <vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" <vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
clearable @change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12"> <vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" <vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
clearable @change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12"> <vxe-form-item title="试验结果" field="InspectionResults" span="12">
<template #default="params"> <template #default="params">
<vxe-select v-model="params.data.InspectionResults" clearable> <vxe-select v-model="params.data.InspectionResults" clearable>
<vxe-option :key="1" :value="1" :label="`通过`"></vxe-option> <vxe-option :key="1" :value="1" :label="`通过`"></vxe-option>
@ -110,35 +107,40 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12"> <!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div> <spsn>{{ params.data.Ecode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12"> <vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div> <spsn>{{ params.data.SgEntityId }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12"> <vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div> <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> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
<a-card title="采集数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="极对地之间耐受电压(V)" field="WithstandVoltage1" span="12"> <vxe-form-item title="极对地之间耐受电压(V)" field="WithstandVoltage1" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.WithstandVoltage1" placeholder="" clearable <vxe-input v-model="params.data.WithstandVoltage1" placeholder="" clearable
@change="fnChangeA(params)" disabled></vxe-input> @change="fnChangeA(params)" disabled></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="极对地耐压持续时间(s)" field="PressureTime1" span="10"> <vxe-form-item title="极对地耐压持续时间(s)" field="PressureTime1" span="10">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.PressureTime1" placeholder="" clearable <vxe-input v-model="params.data.PressureTime1" placeholder="" clearable
@change="fnChangeA(params)" disabled></vxe-input> @change="fnChangeA(params)" disabled></vxe-input>
@ -148,14 +150,12 @@
<vxe-button status="primary" content="检测" @click="fnTestVoltage(1)"></vxe-button> <vxe-button status="primary" content="检测" @click="fnTestVoltage(1)"></vxe-button>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="极对极之间耐受电压(V)" field="WithstandVoltage2" span="12"> <vxe-form-item title="极对极之间耐受电压(V)" field="WithstandVoltage2" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.WithstandVoltage2" placeholder="" clearable <vxe-input v-model="params.data.WithstandVoltage2" placeholder="" clearable
@change="fnChangeA(params)" disabled></vxe-input> @change="fnChangeA(params)" disabled></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="极对极耐压持续时间(s)" field="PressureTime2" span="10"> <vxe-form-item title="极对极耐压持续时间(s)" field="PressureTime2" span="10">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.PressureTime2" placeholder="" clearable <vxe-input v-model="params.data.PressureTime2" placeholder="" clearable
@change="fnChangeA(params)" disabled></vxe-input> @change="fnChangeA(params)" disabled></vxe-input>
@ -165,14 +165,12 @@
<vxe-button status="primary" content="检测" @click="fnTestVoltage(2)"></vxe-button> <vxe-button status="primary" content="检测" @click="fnTestVoltage(2)"></vxe-button>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="极与辅助回路之间耐受电压(V)" field="WithstandVoltage3" span="12"> <vxe-form-item title="极与辅助回路之间耐受电压(V)" field="WithstandVoltage3" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.WithstandVoltage3" placeholder="" clearable <vxe-input v-model="params.data.WithstandVoltage3" placeholder="" clearable
@change="fnChangeA(params)" disabled></vxe-input> @change="fnChangeA(params)" disabled></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="极与辅助回路耐压持续时间(s)" field="PressureTime3" span="10"> <vxe-form-item title="极与辅助回路耐压持续时间(s)" field="PressureTime3" span="10">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.PressureTime3" placeholder="" clearable <vxe-input v-model="params.data.PressureTime3" placeholder="" clearable
@change="fnChangeA(params)" disabled></vxe-input> @change="fnChangeA(params)" disabled></vxe-input>
@ -182,14 +180,12 @@
<vxe-button status="primary" content="检测" @click="fnTestVoltage(3)"></vxe-button> <vxe-button status="primary" content="检测" @click="fnTestVoltage(3)"></vxe-button>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="手柄与地之间耐受电压(V)" field="WithstandVoltage4" span="12"> <vxe-form-item title="手柄与地之间耐受电压(V)" field="WithstandVoltage4" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.WithstandVoltage4" placeholder="" clearable <vxe-input v-model="params.data.WithstandVoltage4" placeholder="" clearable
@change="fnChangeA(params)" disabled></vxe-input> @change="fnChangeA(params)" disabled></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="手柄与地耐压持续时间(s)" field="PressureTime4" span="10"> <vxe-form-item title="手柄与地耐压持续时间(s)" field="PressureTime4" span="10">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.PressureTime4" placeholder="" clearable <vxe-input v-model="params.data.PressureTime4" placeholder="" clearable
@change="fnChangeA(params)" disabled></vxe-input> @change="fnChangeA(params)" disabled></vxe-input>
@ -198,16 +194,16 @@
<vxe-form-item span="2"> <vxe-form-item span="2">
<vxe-button status="primary" content="检测" @click="fnTestVoltage(4)"></vxe-button> <vxe-button status="primary" content="检测" @click="fnTestVoltage(4)"></vxe-button>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
</template> </vxe-form>
</a-card>
</template>
<template #footer> <template #footer>
<vxe-button type="submit" status="primary" content="提交"></vxe-button> <vxe-button type="submit" status="primary" content="保存" @click="fnSubmitA"></vxe-button>
<vxe-button type="reset" content="重置"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
</vxe-form>
</div>
</template> </template>
<script lang="ts" setup name="PowerFrequancyTestingForm"> <script lang="ts" setup name="PowerFrequancyTestingForm">
@ -218,52 +214,53 @@ import { map as _map } from 'lodash'
import * as PowerFrequancyTestingApi from '@/api/gw/powerFrequancyTesting' import * as PowerFrequancyTestingApi from '@/api/gw/powerFrequancyTesting'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore) const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
const refShow = ref(false) const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
// //
const modalTitle = ref('未知表单') const modalTitle = ref('未知表单')
// // [add - |update - |del - ]
const formDataA: any = ref( const formType: any = ref('')
{ //
"ID": 0, const refFormA = ref()
"StandardVersion": 1, // A -
"SupplierWorkNo": "", const formDataAInit: any = {
"SupplierCode": "1000032215", ID: 0,
"ModelCode": "dtb00003", StandardVersion: 1,
"CategoryType": "90003", SupplierWorkNo: "",
"EquipmentUniqueCode": '', SupplierCode: "1000032215",
"FactoryCode": '', ModelCode: "dtb00003",
"SupplierSupportId": '', CategoryType: "90003",
"PdCode": "GX000092", EquipmentUniqueCode: '',
"ProcessType": 3, FactoryCode: '',
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), SupplierSupportId: '',
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), PdCode: "GX000092",
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), ProcessType: 3,
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined, PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"Ecode": "NotImp", StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"SgEntityId": "NotImp", StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"DataUniqueIdentifier": "NotImp", InspectionResults: undefined,
"WithstandVoltage1": undefined, Ecode: "NotImp",
"PressureTime1": undefined, SgEntityId: "NotImp",
"WithstandVoltage2": undefined, DataUniqueIdentifier: "NotImp",
"PressureTime2": undefined, WithstandVoltage1: undefined,
"WithstandVoltage3": undefined, PressureTime1: undefined,
"PressureTime3": undefined, WithstandVoltage2: undefined,
"WithstandVoltage4": undefined, PressureTime2: undefined,
"PressureTime4": undefined, WithstandVoltage3: undefined,
"Sended": 0 PressureTime3: undefined,
}) WithstandVoltage4: undefined,
// PressureTime4: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({ const formRulesA: any = ref({
SupplierWorkNo: [ SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' } { required: true, message: '请输入供应商工单编号' }
@ -310,15 +307,14 @@ onMounted(() => {
}) })
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formTypeA.value = type formType.value = type
await fnResetA()
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA()
modalTitle.value = '新增工频耐受试验' modalTitle.value = '新增工频耐受试验'
refShow.value = true refShow.value = true
break; break;
case 'edit': case 'edit':
await fnResetA()
modalTitle.value = '编辑工频耐受试验' modalTitle.value = '编辑工频耐受试验'
refShow.value = true refShow.value = true
const paramsA = { const paramsA = {
@ -333,7 +329,6 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data formDataA.value = rowInfoA.Data
break; break;
case 'copy': case 'copy':
await fnResetA()
modalTitle.value = '复制工频耐受试验' modalTitle.value = '复制工频耐受试验'
refShow.value = true refShow.value = true
const paramsB = { const paramsB = {
@ -347,6 +342,8 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ID = 0 rowInfoB.Data.ID = 0
rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss") rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.PutCenterTime = 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 rowInfoB.Data.Sended = 0
formDataA.value = rowInfoB.Data formDataA.value = rowInfoB.Data
break; break;
@ -417,77 +414,50 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
switch (formTypeA.value) { await refFormA.value.validate().then(async (res: any) => {
case 'add': if (!res) {
formDataA.value.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss") switch (formType.value) {
formDataA.value.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss") case 'add':
const paramsA = { const paramsA = {
data: formDataA.value data: formDataA.value
}
await PowerFrequancyTestingApi.savePowerFrequancyTesting(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 PowerFrequancyTestingApi.editPowerFrequancyTesting(paramsB)
VXETable.modal.message({ content: '编辑成功', status: 'success' })
break;
case 'copy':
const paramsC = {
data: formDataA.value
}
await PowerFrequancyTestingApi.savePowerFrequancyTesting(paramsC)
VXETable.modal.message({ content: '复制成功', status: 'success' })
break;
} }
await PowerFrequancyTestingApi.savePowerFrequancyTesting(paramsA) refShow.value = false
VXETable.modal.message({ content: '新增成功', status: 'success' }) emit('success')
break; }
case 'edit': })
formDataA.value.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
formDataA.value.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
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 PowerFrequancyTestingApi.editPowerFrequancyTesting(paramsB)
VXETable.modal.message({ content: '编辑成功', status: 'success' })
break;
case 'copy':
formDataA.value.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
formDataA.value.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
const paramsC = {
data: formDataA.value
}
await PowerFrequancyTestingApi.savePowerFrequancyTesting(paramsC)
VXETable.modal.message({ content: '复制成功', status: 'success' })
break;
}
refShow.value = false
emit('success')
} }
// //
const fnResetA = () => { const fnResetA = () => {
formDataA.value = { formDataA.value = formDataAInit
"ID": 0, }
"StandardVersion": 1, //
"SupplierWorkNo": "", const fnEventCancel = () => {
"SupplierCode": "1000032215", refShow.value = false
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000092",
"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",
"WithstandVoltage1": undefined,
"PressureTime1": undefined,
"WithstandVoltage2": undefined,
"PressureTime2": undefined,
"WithstandVoltage3": undefined,
"PressureTime3": undefined,
"WithstandVoltage4": undefined,
"PressureTime4": undefined,
"Sended": 0
}
} }
</script> </script>

@ -1,39 +1,50 @@
<template> <template>
<div class="xyp-protection-circuit-form" v-if="refShow"> <vxe-modal class-name="csty-protection-circuit-form" v-model="refShow" width="1200" height="770" show-zoom
<vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA" :rules="formRulesA" show-footer :mask-closable=true>
@submit="fnSubmitA" @reset="fnResetA" custom-layout title-overflow="title"> <template #title>
<vxe-modal v-model="refShow" width="1300" height="770" show-zoom show-footer> <span style="color:#ffffff">{{ modalTitle }}</span>
<template #title> </template>
<span style="color:#ffffff">{{ modalTitle }}</span> <template #default>
</template> <a-card :bordered="false">
<template #default> <vxe-form title-colon ref="refFormA" title-align="right" title-width="220" :data="formDataA"
<a-card title="基本数据" :bordered="false" style="margin: 10px"> :rules="formRulesA">
<vxe-form-item title="采集规范版本号" field="StandardVersion" span="12"> <vxe-form-gather span="24">
<vxe-form-item span="24">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.StandardVersion }}</div> <div
style="font-size: larger;border-bottom: solid 1px #606266;padding: 0px 0px 5px 0px;">
基本数据
</div>
</template> </template>
</vxe-form-item> </vxe-form-item>
</vxe-form-gather>
<vxe-form-gather span="24">
<!-- <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
<template #default="params">
<spsn>{{ params.data.StandardVersion }}</spsn>
</template>
</vxe-form-item> -->
<vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12"> <vxe-form-item title="供应商工单编号" field="SupplierWorkNo" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable <vxe-input v-model="params.data.SupplierWorkNo" placeholder="请输入供应商工单编号" clearable
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12"> <!-- <vxe-form-item title="国网侧供应商编码" field="SupplierCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SupplierCode }}</div> <spsn>{{ params.data.SupplierCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12"> <vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div> <spsn>{{ params.data.ModelCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12"> <vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div> <spsn>{{ params.data.CategoryType }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12"> <vxe-form-item title="生产设备唯一识别号" field="EquipmentUniqueCode" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号" <vxe-input v-model="params.data.EquipmentUniqueCode" placeholder="请输入生产设备唯一识别号"
@ -52,9 +63,9 @@
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="工序" field="PdCode" span="12"> <!-- <vxe-form-item title="工序" field="PdCode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PdCode }}</div> <spsn>{{ params.data.PdCode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12"> <vxe-form-item title="感知过程" field="ProcessType" span="12">
@ -68,24 +79,24 @@
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12"> <vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div> <spsn>{{ params.data.CheckTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12"> <vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div> <spsn>{{ params.data.PutCenterTime }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item> -->
<vxe-form-item title="试验开始时间" field="StartTime" span="12"> <vxe-form-item title="试验开始时间" field="StartTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间" <vxe-input v-model="params.data.StartTime" type="datetime" placeholder="请输入试验开始时间"
clearable @change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结束时间" field="StopTime" span="12"> <vxe-form-item title="试验结束时间" field="StopTime" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间" <vxe-input v-model="params.data.StopTime" type="datetime" placeholder="请输入试验结束时间"
clearable @change="fnChangeA(params)" style="width: 196px;"></vxe-input> clearable @change="fnChangeA(params)"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12"> <vxe-form-item title="试验结果" field="InspectionResults" span="12">
@ -96,23 +107,33 @@
</vxe-select> </vxe-select>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12"> <!-- <vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div> <spsn>{{ params.data.Ecode }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12"> <vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div> <spsn>{{ params.data.SgEntityId }}</spsn>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12"> <vxe-form-item title="数据唯一标识" field="DataUniqueIdentifier" span="12">
<template #default="params"> <template #default="params">
<div style="width: 196px;">{{ params.data.DataUniqueIdentifier }}</div> <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> </template>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
<a-card title="采集数据" :bordered="false" style="margin: 10px"> <vxe-form-gather span="24">
<vxe-form-item title="测量电流(A)" field="MeasureCurrent" span="12"> <vxe-form-item title="测量电流(A)" field="MeasureCurrent" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.MeasureCurrent" placeholder="请输入测量电流" clearable <vxe-input v-model="params.data.MeasureCurrent" placeholder="请输入测量电流" clearable
@ -128,15 +149,138 @@
<vxe-form-item span="2"> <vxe-form-item span="2">
<vxe-button status="primary" content="检测" @click="fnCurrentResistance()"></vxe-button> <vxe-button status="primary" content="检测" @click="fnCurrentResistance()"></vxe-button>
</vxe-form-item> </vxe-form-item>
</a-card> </vxe-form-gather>
</template> </vxe-form>
<template #footer> </a-card>
<vxe-button type="submit" status="primary" content="提交"></vxe-button> <!-- <a-card title="基本数据" :bordered="false" style="margin: 10px">
<vxe-button type="reset" content="重置"></vxe-button> <vxe-form-item title="采集规范版本号" field="StandardVersion" span="12">
</template> <template #default="params">
</vxe-modal> <div style="width: 196px;">{{ params.data.StandardVersion }}</div>
</vxe-form> </template>
</div> </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>
</template>
</vxe-form-item>
<vxe-form-item title="规格型号编码" field="ModelCode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.ModelCode }}</div>
</template>
</vxe-form-item>
<vxe-form-item title="物资种类编码" field="CategoryType" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CategoryType }}</div>
</template>
</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">
<div style="width: 196px;">{{ params.data.PdCode }}</div>
</template>
</vxe-form-item>
<vxe-form-item title="感知过程" field="ProcessType" span="12">
<template #default="params">
<vxe-select v-model="params.data.ProcessType" clearable filterable :disabled="true">
<template v-for="(item) in dictProcessType">
<vxe-option :value="item.key" :label="item.val"></vxe-option>
</template>
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="采集时间" field="CheckTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.CheckTime }}</div>
</template>
</vxe-form-item>
<vxe-form-item title="入数采中心时间" field="PutCenterTime" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.PutCenterTime }}</div>
</template>
</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>
</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>
</template>
</vxe-form-item>
<vxe-form-item title="试验结果" field="InspectionResults" span="12">
<template #default="params">
<vxe-select v-model="params.data.InspectionResults" clearable>
<vxe-option :key="1" :value="1" :label="`通过`"></vxe-option>
<vxe-option :key="0" :value="0" :label="`未通过`"></vxe-option>
</vxe-select>
</template>
</vxe-form-item>
<vxe-form-item title="ecode码" field="Ecode" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.Ecode }}</div>
</template>
</vxe-form-item>
<vxe-form-item title="国网实物Id" field="SgEntityId" span="12">
<template #default="params">
<div style="width: 196px;">{{ params.data.SgEntityId }}</div>
</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="测量电流(A)" field="MeasureCurrent" span="12">
<template #default="params">
<vxe-input v-model="params.data.MeasureCurrent" placeholder="请输入测量电流" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item title="测量电阻值(mΩ)" field="MeasureResistance" span="10">
<template #default="params">
<vxe-input v-model="params.data.MeasureResistance" placeholder="请输入测量电阻值" clearable
@change="fnChangeA(params)"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item span="2">
<vxe-button status="primary" content="检测" @click="fnCurrentResistance()"></vxe-button>
</vxe-form-item>
</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> </template>
<script lang="ts" setup name="ProtectionCircuitForm"> <script lang="ts" setup name="ProtectionCircuitForm">
@ -147,46 +291,47 @@ import { map as _map } from 'lodash'
import * as ProtectionCircuitApi from '@/api/gw/protectionCircuit' import * as ProtectionCircuitApi from '@/api/gw/protectionCircuit'
import { useDictStore } from '@/stores/dict' import { useDictStore } from '@/stores/dict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
//
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictPdCode, dictProcessType } = storeToRefs(dictStore) const { dictPdCode, dictProcessType } = storeToRefs(dictStore)
// [success] // [success]
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
// //
const refShow = ref(false) const refShow = ref(false)
//
const refFormA = ref()
// [add - |update - |del - ]
const formTypeA: any = ref('')
// //
const modalTitle = ref('未知表单') const modalTitle = ref('未知表单')
// // [add - |update - |del - ]
const formDataA: any = ref( const formType: any = ref('')
{ //
"ID": 0, const refFormA = ref()
"StandardVersion": 1, // A -
"SupplierWorkNo": "", const formDataAInit: any = {
"SupplierCode": "1000032215", ID: 0,
"ModelCode": "dtb00003", StandardVersion: 1,
"CategoryType": "90003", SupplierWorkNo: "",
"EquipmentUniqueCode": '', SupplierCode: "1000032215",
"FactoryCode": '', ModelCode: "dtb00003",
"SupplierSupportId": '', CategoryType: "90003",
"PdCode": "GX000087", EquipmentUniqueCode: '',
"ProcessType": 3, FactoryCode: '',
"CheckTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), SupplierSupportId: '',
"PutCenterTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), PdCode: "GX000087",
"StartTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), ProcessType: 3,
"StopTime": dayjs().format("YYYY-MM-DD HH:mm:ss"), CheckTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"InspectionResults": undefined, PutCenterTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"Ecode": "NotImp", StartTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"SgEntityId": "NotImp", StopTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
"DataUniqueIdentifier": "NotImp", InspectionResults: undefined,
"MeasureCurrent": undefined, Ecode: "NotImp",
"MeasureResistance": undefined, SgEntityId: "NotImp",
"Sended": 0 DataUniqueIdentifier: "NotImp",
}) MeasureCurrent: undefined,
// MeasureResistance: undefined,
Sended: 0
}
// A -
const formDataA: any = ref(formDataAInit)
// A -
const formRulesA: any = ref({ const formRulesA: any = ref({
SupplierWorkNo: [ SupplierWorkNo: [
{ required: true, message: '请输入供应商工单编号' } { required: true, message: '请输入供应商工单编号' }
@ -215,15 +360,14 @@ onMounted(() => {
}) })
// //
const open = async (type: string, row?: any) => { const open = async (type: string, row?: any) => {
formTypeA.value = type formType.value = type
await fnResetA()
switch (type) { switch (type) {
case 'add': case 'add':
await fnResetA()
modalTitle.value = '新增保护措施和保护电路连续性验证' modalTitle.value = '新增保护措施和保护电路连续性验证'
refShow.value = true refShow.value = true
break; break;
case 'edit': case 'edit':
await fnResetA()
modalTitle.value = '编辑保护措施和保护电路连续性验证' modalTitle.value = '编辑保护措施和保护电路连续性验证'
refShow.value = true refShow.value = true
const paramsA = { const paramsA = {
@ -238,7 +382,6 @@ const open = async (type: string, row?: any) => {
formDataA.value = rowInfoA.Data formDataA.value = rowInfoA.Data
break; break;
case 'copy': case 'copy':
await fnResetA()
modalTitle.value = '复制保护措施和保护电路连续性验证' modalTitle.value = '复制保护措施和保护电路连续性验证'
refShow.value = true refShow.value = true
const paramsB = { const paramsB = {
@ -252,6 +395,8 @@ const open = async (type: string, row?: any) => {
rowInfoB.Data.ID = 0 rowInfoB.Data.ID = 0
rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss") rowInfoB.Data.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
rowInfoB.Data.PutCenterTime = 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 rowInfoB.Data.Sended = 0
formDataA.value = rowInfoB.Data formDataA.value = rowInfoB.Data
break; break;
@ -306,71 +451,56 @@ const fnDeleteA = async (row: any) => {
} }
// //
const fnSubmitA = async () => { const fnSubmitA = async () => {
switch (formTypeA.value) { await refFormA.value.validate().then(async (res: any) => {
case 'add': if (!res) {
formDataA.value.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss") switch (formType.value) {
formDataA.value.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss") case 'add':
const paramsA = { formDataA.value.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
data: formDataA.value formDataA.value.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
} const paramsA = {
await ProtectionCircuitApi.saveProtectionCircuit(paramsA) data: formDataA.value
VXETable.modal.message({ content: '新增成功', status: 'success' }) }
break; await ProtectionCircuitApi.saveProtectionCircuit(paramsA)
case 'edit': VXETable.modal.message({ content: '新增成功', status: 'success' })
formDataA.value.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss") break;
formDataA.value.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss") case 'edit':
let setVal: any = _map(formDataA.value, (o1, k1) => { formDataA.value.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
return { field: k1, value: o1 } formDataA.value.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
}) let setVal: any = _map(formDataA.value, (o1, k1) => {
const paramsB = { return { field: k1, value: o1 }
filter: { })
field: 'ID', const paramsB = {
value: formDataA.value.ID filter: {
}, field: 'ID',
set: setVal value: formDataA.value.ID
} },
await ProtectionCircuitApi.editProtectionCircuit(paramsB) set: setVal
VXETable.modal.message({ content: '编辑成功', status: 'success' }) }
break; await ProtectionCircuitApi.editProtectionCircuit(paramsB)
case 'copy': VXETable.modal.message({ content: '编辑成功', status: 'success' })
formDataA.value.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss") break;
formDataA.value.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss") case 'copy':
const paramsC = { formDataA.value.CheckTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
data: formDataA.value formDataA.value.PutCenterTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
const paramsC = {
data: formDataA.value
}
await ProtectionCircuitApi.saveProtectionCircuit(paramsC)
VXETable.modal.message({ content: '复制成功', status: 'success' })
break;
} }
await ProtectionCircuitApi.saveProtectionCircuit(paramsC) refShow.value = false
VXETable.modal.message({ content: '复制成功', status: 'success' }) emit('success')
break; }
} })
refShow.value = false
emit('success')
} }
// //
const fnResetA = () => { const fnResetA = () => {
formDataA.value = { formDataA.value = formDataAInit
"ID": 0, }
"StandardVersion": 1, //
"SupplierWorkNo": "", const fnEventCancel = () => {
"SupplierCode": "1000032215", refShow.value = false
"ModelCode": "dtb00003",
"CategoryType": "90003",
"EquipmentUniqueCode": '',
"FactoryCode": '',
"SupplierSupportId": '',
"PdCode": "GX000087",
"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",
"MeasureCurrent": undefined,
"MeasureResistance": undefined,
"Sended": 0
}
} }
</script> </script>
<style scoped></style> <style scoped></style>

@ -53,38 +53,38 @@
</vxe-form-item> --> </vxe-form-item> -->
<vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12"> <vxe-form-item title="原材料检验批次号" field="RmibNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号" clearable <vxe-input v-model="params.data.RmibNumber" placeholder="请输入原材料检验批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料批次号" field="RmbNumber" span="12"> <vxe-form-item title="原材料批次号" field="RmbNumber" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号" clearable <vxe-input v-model="params.data.RmbNumber" placeholder="请输入原材料批次号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料品牌" field="BorMaterials" span="12"> <vxe-form-item title="原材料品牌" field="BorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌" clearable <vxe-input v-model="params.data.BorMaterials" placeholder="请输入原材料品牌"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12"> <vxe-form-item title="原材料制造商" field="RawmManufacturer" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商" clearable <vxe-input v-model="params.data.RawmManufacturer" placeholder="请输入原材料制造商"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料产地" field="OorMaterials" span="12"> <vxe-form-item title="原材料产地" field="OorMaterials" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地" clearable <vxe-input v-model="params.data.OorMaterials" placeholder="请输入原材料产地"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12"> <vxe-form-item title="原材料规格型号" field="MrmSpecification" span="12">
<template #default="params"> <template #default="params">
<vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号" clearable <vxe-input v-model="params.data.MrmSpecification" placeholder="请输入原材料规格型号"
@change="fnChangeA(params)"></vxe-input> @change="fnChangeA(params)" @click="fnSltBaseSupplierAOpen"></vxe-input>
</template> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12"> <vxe-form-item title="原材料出厂日期" field="ManufactureDate" span="12">
@ -263,6 +263,7 @@
<vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button> <vxe-button type="reset" content="取消" @click="fnEventCancel"></vxe-button>
</template> </template>
</vxe-modal> </vxe-modal>
<SltBaseSupplier ref="refSltBaseSupplierA" @success="fnSltBaseSupplier" />
</template> </template>
<script lang="ts" setup name="ShengYuDianLiuDongZuoBaoHuForm"> <script lang="ts" setup name="ShengYuDianLiuDongZuoBaoHuForm">
@ -278,6 +279,9 @@ import { config } from '@/config/axios/config'
import XEUtils from 'xe-utils' import XEUtils from 'xe-utils'
import * as FileUploadApi from '@/api/gw/fileUpload' import * as FileUploadApi from '@/api/gw/fileUpload'
import * as comApi from '@/api/gw/com' import * as comApi from '@/api/gw/com'
import SltBaseSupplier from '@/views/Gw/com/SltBaseSupplier.vue'
//
const refSltBaseSupplierA = ref()
// //
const dictStore = useDictStore() const dictStore = useDictStore()
const { dictProcessType } = storeToRefs(dictStore) const { dictProcessType } = storeToRefs(dictStore)
@ -625,5 +629,20 @@ const fnResetA = async () => {
const fnEventCancel = () => { const fnEventCancel = () => {
refShow.value = false refShow.value = false
} }
//
const fnSltBaseSupplierAOpen = async (info: any) => {
refSltBaseSupplierA.value.open(info)
}
//
const fnSltBaseSupplier = async (info: any) => {
formDataA.value.RmibNumber = info.CheckNo
formDataA.value.RmbNumber = info.LotNo
formDataA.value.BorMaterials = info.Brand
formDataA.value.RawmManufacturer = info.Name
formDataA.value.OorMaterials = info.Origin
formDataA.value.MrmSpecification = info.Spec
formDataA.value.ManufactureDate = info.ProductionDate
formDataA.value.IncomDate = info.CheckDate
}
</script> </script>
<style scoped></style> <style scoped></style>
Loading…
Cancel
Save