diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js
index e4f24fcbb..d2474e34a 100644
--- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js
+++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js
@@ -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格式',
diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-picker.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-picker.vue
index 8f9af647f..50381f4b0 100644
--- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-picker.vue
+++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-picker.vue
@@ -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]
diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/list.vue
index b2f91f4e9..d09d34f1e 100644
--- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/list.vue
+++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/list.vue
@@ -13,7 +13,7 @@
使用管理人:
- {{ displayListItem(item, 'JZGNo') }}
+ {{ displayListItem(item, 'UserId') }}
@@ -157,7 +157,7 @@
return {
// 数据项的数据类型、结构
scheme: {
- JZGNo: {
+ UserId: {
type: 'select'
},
Department: {
@@ -204,7 +204,7 @@
// 数据源
dataSource: {
- JZGNo: [],
+ UserId: [],
Department: [],
Types: Object.values(this.GET_GLOBAL('dataDictionary').AssType).map(t => ({
value: t.value,
@@ -247,9 +247,9 @@
// 拉取加载列表和数据源
await Promise.all([
this.FETCH_DATASOURCE('teacheruserdata').then(result => {
- this.dataSource.JZGNo = result.data.map(t => ({
+ this.dataSource.UserId = result.data.map(t => ({
text: t.f_realname,
- value: t.f_encode,
+ value: t.f_userid,
f_encode: t.f_encode,
f_userid: t.f_userid,
}));
@@ -333,9 +333,9 @@
// 姓名格式化
if (this.searchData.Name_) {
- let arr = this.dataSource.JZGNo
+ let arr = this.dataSource.UserId
let obj = arr.find(e => e.f_userid == this.queryData.Name_)
- this.searchData.JZGNo = obj ? obj.text : ''
+ this.searchData.UserId = obj ? obj.text : ''
}
await this.refreshList(false)
diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/single.vue
index 454082936..42dcdb327 100644
--- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/single.vue
+++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/single.vue
@@ -1,37 +1,36 @@
-
-
+
+
+ readonly />
-
-
-
-
-
-
+
+
+
+
+
+
-
+ :value="getValue('OfficeEquipment.Nuantity')" title="数量" required :disabled="!edit" />
+
+ :readonly="!edit" title="备注" :disabled="!edit"/>
@@ -84,11 +83,15 @@
// 表单项数据结构
scheme: {
OfficeEquipment: {
- Name: {
- type: 'select',
+ UserId: {
+ type: 'text',
title: '使用管理人',
verify: "NotNull"
},
+ Name: {
+ type: 'text',
+ title: '使用管理人',
+ },
Department: {
type: 'select',
title: '部门',
@@ -129,7 +132,7 @@
Nuantity: {
type: 'text',
title: '数量',
- verify: "NotNull"
+ verify: "Num"
},
Remark: {
type: 'text',
@@ -144,8 +147,20 @@
// 数据源
dataSource: {
OfficeEquipment: {
- Name: [],
+ JZGNo: [],
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
+ })),
},
}
@@ -170,7 +185,7 @@
// 拉取表单数据,同时拉取所有来自数据源的选单数据
await Promise.all([
this.FETCH_DATASOURCE('teacheruserdata').then(result => {
- this.dataSource.OfficeEquipment.Name = result.data.map(t => ({
+ this.dataSource.OfficeEquipment.UserId = result.data.map(t => ({
text: t.f_realname,
value: t.f_encode,
f_encode: t.f_encode,
@@ -196,16 +211,16 @@
if (this.mode === 'create') {
this.origin = await this.getDefaultForm()
// let userInfo = this.GET_GLOBAL('loginUser');
- // this.origin.OfficeEquipment.Name = userInfo.enCode
+ // this.origin.OfficeEquipment.UserId = userInfo.enCode
// this.origin.OfficeEquipment.Department = userInfo.departmentId
} else {
const result = await this.HTTP_GET('/Learun/adms/EducationalAdministration/officeEquipment/form',
this.id)
this.origin = await this.formatFormData(result)
- let arr = this.dataSource.OfficeEquipment.Name
- let obj = arr.find(e => e.f_encode == this.origin.OfficeEquipment.Name)
- this.origin.OfficeEquipment.Name = obj ? obj.f_userid : this.origin.OfficeEquipment.Name
+ // let arr = this.dataSource.OfficeEquipment.UserId
+ // let obj = arr.find(e => e.f_encode == this.origin.OfficeEquipment.UserId)
+ // this.origin.OfficeEquipment.UserId = obj ? obj.f_userid : this.origin.OfficeEquipment.UserId
}
this.current = this.COPY(this.origin)
@@ -238,11 +253,12 @@
const postData = await this.getPostData(this.id)
let strEntity = JSON.parse(postData.strEntity)
- let arr = this.dataSource.OfficeEquipment.Name
- let obj = arr.find(e => e.f_userid == strEntity.Name)
- strEntity.Name = obj ? obj.f_encode : strEntity.Name
+ // let arr = this.dataSource.OfficeEquipment.UserId
+ // let obj = arr.find(e => e.f_userid == strEntity.UserId)
+ // strEntity.UserId = obj ? obj.f_encode : strEntity.UserId
- postData.strEntity = JSON.stringify(strEntity)
+ // postData.strEntity = JSON.stringify(strEntity)
+ // return
this.HTTP_POST('/Learun/adms/EducationalAdministration/OfficeEquipment/save', postData, '提交失败')
.then(success => {
this.HIDE_LOADING()
@@ -280,6 +296,11 @@
break
}
},
+
+ dataChange(data){
+ this.setValue('OfficeEquipment.Department', data.departmentId)
+ this.setValue('OfficeEquipment.Name', data.name)
+ },
// 获取表单值
getValue(path) {