This commit is contained in:
parent
a1da75b05a
commit
3d10919357
|
|
@ -14,6 +14,7 @@
|
|||
clearable
|
||||
maxlength="30"
|
||||
show-word-limit
|
||||
:disabled="formType === 2"
|
||||
placeholder="请输入考勤机编码"
|
||||
v-model="addOrEditForm.deviceCode"
|
||||
/>
|
||||
|
|
@ -33,6 +34,20 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="出厂编号" prop="serialNumber">
|
||||
<el-input
|
||||
clearable
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
:disabled="formType === 2"
|
||||
placeholder="请输入考勤机出厂编号"
|
||||
v-model="addOrEditForm.serialNumber"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="工程名称" prop="proId">
|
||||
|
|
@ -76,6 +91,10 @@ export default {
|
|||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
formType: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -84,6 +103,7 @@ export default {
|
|||
isUpdate: false,
|
||||
deviceCode: '',
|
||||
deviceName: '',
|
||||
serialNumber: '',
|
||||
},
|
||||
addOrEditFormRules: {
|
||||
deviceCode: [
|
||||
|
|
@ -120,13 +140,19 @@ export default {
|
|||
this.$refs.addOrEditFormRef.validate(async (valid) => {
|
||||
if (valid) {
|
||||
// 组装参数
|
||||
const { isUpdate, proId, deviceCode, deviceName } =
|
||||
this.addOrEditForm
|
||||
const {
|
||||
isUpdate,
|
||||
proId,
|
||||
deviceCode,
|
||||
deviceName,
|
||||
serialNumber,
|
||||
} = this.addOrEditForm
|
||||
|
||||
const params = {
|
||||
proId,
|
||||
deviceCode,
|
||||
deviceName,
|
||||
serialNumber,
|
||||
}
|
||||
|
||||
const API = isUpdate
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ export const formLabel = [
|
|||
export const columnsList = [
|
||||
{ t_props: 'deviceCode', t_label: '考勤机编号' },
|
||||
{ t_props: 'deviceName', t_label: '考勤机名称' },
|
||||
{ t_props: 'serialNumber', t_label: '出场编号' },
|
||||
{ t_props: 'proName', t_label: '工程名称' },
|
||||
{ t_slot: 'isShanghai', t_label: '工程类型' },
|
||||
{
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@
|
|||
>
|
||||
<template slot="outerContent">
|
||||
<AddAndBindForm
|
||||
:formType="formType"
|
||||
:editFormData="editFormData"
|
||||
ref="addOrEditSubBaseInfoRef"
|
||||
/>
|
||||
|
|
@ -150,6 +151,7 @@ export default {
|
|||
|
||||
data() {
|
||||
return {
|
||||
formType: 1,
|
||||
formLabel,
|
||||
columnsList,
|
||||
dialogConfig,
|
||||
|
|
@ -172,13 +174,15 @@ export default {
|
|||
// 新增或修改
|
||||
onHandleAddOrBindAttendanceMachine(type, data, title) {
|
||||
this.dialogConfig.outerTitle = `${title}考勤机`
|
||||
this.formType = type
|
||||
if (type === 2) {
|
||||
const { proId, deviceCode, deviceName } = data
|
||||
const { proId, deviceCode, deviceName, serialNumber } = data
|
||||
|
||||
this.editFormData = {
|
||||
proId,
|
||||
deviceCode,
|
||||
deviceName,
|
||||
serialNumber,
|
||||
isUpdate: true,
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue