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