Browse Source

信息化办公

枝江中职分支
yxq 2 months ago
parent
commit
c69b50d3fd
3 changed files with 26 additions and 10 deletions
  1. +2
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js
  2. +1
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-picker.vue
  3. +23
    -8
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/single.vue

+ 2
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js View File

@@ -390,8 +390,8 @@ export default {
verify() {
return {
NotNull: t => t.length > 0 || '不能为空',
Num: t => !isNaN(t) || '须输入数值',
NumOrNull: t => t.length <= 0 || !isNaN(t) || '须留空或输入数值',
Num: t => (t||t===0)&&!isNaN(t) || '须输入数值',
NumOrNull: t => !t || !isNaN(t) || '须留空或输入数值',
Email: t => /^[a-zA-Z0-9-_.]+@[a-zA-Z0-9-_]+.[a-zA-Z0-9]+$/.test(t) || '须符合Email格式',
EmailOrNull: t => t.length <= 0 || /^[a-zA-Z0-9-_.]+@[a-zA-Z0-9-_]+.[a-zA-Z0-9]+$/.test(t) ||
'须留空或符合Email格式',


+ 1
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-picker.vue View File

@@ -42,6 +42,7 @@ export default {
this.ONCE('select-organize', data => {
this.$emit('input', data.id||data.map(t=>t.id).toString())
this.$emit('change', data.id||data.map(t=>t.id).toString())
this.$emit('dataChange', data)
})

const rootType = this.rootType || { user: 'department', department: 'company', company: 'company' }[this.type]


+ 23
- 8
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/single.vue View File

@@ -3,11 +3,11 @@
<view v-if="ready">
<!-- <l-select @input="setValue('OfficeEquipment.Name', $event)" :value="getValue('OfficeEquipment.Name')"
:range="dataSource.OfficeEquipment.Name" title="姓名" required /> -->
<l-organize-picker @input="setValue('OfficeEquipment.Name', $event)"
<l-organize-picker @input="setValue('OfficeEquipment.Name', $event)" @dataChange="dataChange"
:value="getValue('OfficeEquipment.Name')" type="user" title="使用管理人" required :readonly="!edit" />
<l-organize-picker @input="setValue('OfficeEquipment.Department', $event)"
:value="getValue('OfficeEquipment.Department')" type="department" title="部门" required
:readonly="!edit" />
readonly />
<!-- <l-select @input="setValue('OfficeEquipment.Department', $event)"
:value="getValue('OfficeEquipment.Department')" :range="dataSource.OfficeEquipment.Department"
title="部门" required /> -->
@@ -15,9 +15,8 @@
:value="getValue('OfficeEquipment.DeviceName')" :disabled="!edit" title="资产名称" required />
<l-input @input="setValue('OfficeEquipment.Code', $event)" :value="getValue('OfficeEquipment.Code')"
:disabled="!edit" title="资产编号" required />
<l-organize-picker @input="setValue('OfficeEquipment.Types', $event)"
:value="getValue('OfficeEquipment.Types')" type="Types" title="资产类别" required
:readonly="!edit" />
<l-select @input="setValue('OfficeEquipment.Types', $event)"
required :value="getValue('OfficeEquipment.Types')" :range="dataSource.OfficeEquipment.Types" title="资产类别" />
<l-input @input="setValue('OfficeEquipment.Brand', $event)"
:value="getValue('OfficeEquipment.Brand')" title="品牌" required />
<l-input @input="setValue('OfficeEquipment.Model', $event)"
@@ -25,11 +24,11 @@
<l-input @input="setValue('OfficeEquipment.Argument', $event)"
:value="getValue('OfficeEquipment.Argument')" title="参数" required />
<l-input @input="setValue('OfficeEquipment.Unit', $event)"
:value="getValue('OfficeEquipment.Unit')" title="单位" required />
:value="getValue('OfficeEquipment.Unit')" title="单位" required :range="dataSource.OfficeEquipment.Unit" />
<l-input @input="setValue('OfficeEquipment.Nuantity', $event)"
:value="getValue('OfficeEquipment.Nuantity')" title="数量" required />
<l-select @input="setValue('OfficeEquipment.Status', $event)"
:value="getValue('OfficeEquipment.Status')" title="使用状态" />
:value="getValue('OfficeEquipment.Status')" title="使用状态" :range="dataSource.OfficeEquipment.Status" />
<l-textarea @input="setValue('OfficeEquipment.Remark', $event)" :value="getValue('OfficeEquipment.Remark')"
:readonly="!edit" title="备注" />
</view>
@@ -129,7 +128,7 @@
Nuantity: {
type: 'text',
title: '数量',
verify: "NotNull"
verify: "Num"
},
Remark: {
type: 'text',
@@ -146,6 +145,18 @@
OfficeEquipment: {
Name: [],
Department: [],
Types: Object.values(this.GET_GLOBAL('dataDictionary').AssType).map(t => ({
value: t.value,
text: t.text
})),
Status: Object.values(this.GET_GLOBAL('dataDictionary').AssState).map(t => ({
value: t.value,
text: t.text
})),
Unit: Object.values(this.GET_GLOBAL('dataDictionary').sldw).map(t => ({
value: t.value,
text: t.text
})),
},

}
@@ -280,6 +291,10 @@
break
}
},
dataChange(data){
this.setValue('OfficeEquipment.Department', data.departmentId)
},

// 获取表单值
getValue(path) {


Loading…
Cancel
Save