Browse Source

静态

master
wangyufei 3 weeks ago
parent
commit
6b51492cbf
  1. 8
      src/views/battery/cellDevice/cellDevice.data.ts
  2. 67
      src/views/battery/monomer/index.vue

8
src/views/battery/cellDevice/cellDevice.data.ts

@ -3,6 +3,14 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const CellDeviceRules = reactive({
oneInjectPreCpk: [required],
twoInjectPreCpk: [required],
posCoatDenCpk: [required],
negCoatDenCpk: [required],
posRollThickCpk: [required],
negRollThickCpk: [required],
oneInjectCpk: [required],
finalInjectRetenCpk: [required],
})
export const CellDevice = useCrudSchemas(reactive<CrudSchema[]>([

67
src/views/battery/monomer/index.vue

@ -349,10 +349,10 @@ const openForm = async (type: string, row?: any) => {
}
if(type == 'create'&&isStatic.value){
let defaultRow = await MonomerApi.getMonomer(1)
row = defaultRow
}
// if(type == 'create'&&isStatic.value){
// let defaultRow = await MonomerApi.getMonomer(1)
// row = defaultRow
// }
if(row){
//
tableDataDevice.value = row.cellDeviceList
@ -400,7 +400,64 @@ const formsSuccess = async (formType,data) => {
data.cellProdList= tableDataProd.value
//
data.cellPassList= tableDataPass.value
if (formType === 'create'&&!isStatic.value) {
const validateFormDevice = await tableFormDeviceRef.value.validateForm()
if (!validateFormDevice) {
if(tableDataDevice.value.length==0){
message.warning('请填写单体产线设备明细')
return
}
return
}
const validateFormEnv = await tableFormEnvRef.value.validateForm()
if (!validateFormEnv) {
if(tableDataEnv.value.length==0){
message.warning('请填写单体产线环境明细')
return
}
return
}
const validateFormPlate = await tableFormPlateRef.value.validateForm()
if (!validateFormPlate) {
if(tableDataPlate.value.length==0){
message.warning('请填写单体极片明细')
return
}
return
}
const validateFormCore = await tableFormCoreRef.value.validateForm()
if (!validateFormCore) {
if(tableDataCore.value.length==0){
message.warning('请填写单体卷芯或叠芯明细')
return
}
return
}
const validateFormProd = await tableFormProdRef.value.validateForm()
if (!validateFormProd) {
if(tableDataProd.value.length==0){
message.warning('请填写单体产品明细')
return
}
return
}
const validateFormPass = await tableFormPassRef.value.validateForm()
if (!validateFormPass) {
if(tableDataPass.value.length==0){
message.warning('请填写单体直通率明细')
return
}
return
}
if (formType === 'create') {
await MonomerApi.createMonomer(data)
message.success(t('common.createSuccess'))
} else {

Loading…
Cancel
Save