Browse Source

流程默认填选登录者

dev
0.0 2 years ago
parent
commit
ccf9bd97b3
  1. 10
      src/api/manage.js
  2. 33
      src/components/jeecgbiz/JSelectUserByDep.vue
  3. 8
      src/store/modules/user.js
  4. 2
      src/store/mutation-types.js
  5. 33
      src/views/activiti/form/ProcessMaterialBorrowingForm.vue
  6. 33
      src/views/activiti/form/ProcessMaterialWarehousingForm.vue
  7. 33
      src/views/activiti/form/ProcessMaterialsAllotForm.vue
  8. 35
      src/views/activiti/form/ProcessMaterialsDeliveryForm.vue
  9. 35
      src/views/activiti/form/ProcessMaterialsReturnForm.vue
  10. 35
      src/views/activiti/form/ProcessSmaterialsScrapForm.vue
  11. 33
      src/views/activiti/form/ProcessSpecialMaterialsForm.vue
  12. 37
      src/views/activiti/form/ProcessUdgetPlanForm.vue
  13. 2
      src/views/processmaterials/modules/ProcessSmaterialsScrapForm.vue
  14. 10
      src/views/processmaterials/modules/ProcessSmaterialsScrapModal.vue

10
src/api/manage.js

@ -191,3 +191,13 @@ export function getFileAccessHttpUrl(avatar,subStr) {
return;
}
}
export function getCurrentTime() {
let yy = new Date().getFullYear();
let mm = new Date().getMonth()+1;
let dd = new Date().getDate();
let hh = new Date().getHours();
let mf = new Date().getMinutes()<10 ? '0'+new Date().getMinutes() : new Date().getMinutes();
let ss = new Date().getSeconds()<10 ? '0'+new Date().getSeconds() : new Date().getSeconds();
return yy+'-'+mm+'-'+dd+' '+hh+':'+mf+':'+ss;
}

33
src/components/jeecgbiz/JSelectUserByDep.vue

@ -44,10 +44,10 @@
return {
userIds: "",
userNames: "",
//
orgCodeTxt:"",
//id
id:""
// //
// orgCodeTxt:"",
// //id
// id:""
}
},
mounted() {
@ -81,22 +81,21 @@
temp += ',' + item.realname
}
let demp = ''
for (let item of rows) {
demp += ',' + item.orgCodeTxt
}
let idmp = ''
for (let item of rows) {
idmp += ',' + item.id
}
// let demp = ''
// for (let item of rows) {
// demp += ',' + item.orgCodeTxt
// }
// let idmp = ''
// for (let item of rows) {
// idmp += ',' + item.id
// }
this.userNames = temp.substring(1)
this.userIds = idstr
this.orgCodeTxt = demp.substring(1)
this.id = idmp.substring(1)
// console.log("", this.orgCodeTxt)
// console.log("Id", this.id)
// this.orgCodeTxt = demp.substring(1)
// this.id = idmp.substring(1)
}
this.$emit('orgCodeTxt',this.orgCodeTxt)
// this.$emit("orgCodeTxt",this.orgCodeTxt,this.id)
this.$emit("change", this.userIds)
}
}

8
src/store/modules/user.js

@ -1,9 +1,10 @@
import Vue from 'vue'
import { login, logout, phoneLogin, thirdLogin } from "@/api/login"
import { ACCESS_TOKEN, USER_NAME,USER_INFO,USER_AUTH,SYS_BUTTON_AUTH,UI_CACHE_DB_DICT_DATA,TENANT_ID,CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
import { ACCESS_TOKEN, USER_NAME,USER_INFO,USER_AUTH,SYS_BUTTON_AUTH,UI_CACHE_DB_DICT_DATA,TENANT_ID,CACHE_INCLUDED_ROUTES,PARENT_ID,USER_INFORMATION } from "@/store/mutation-types"
import { welcome } from "@/utils/util"
import { queryPermissionsByUser } from '@/api/api'
import { getAction } from '@/api/manage'
import { console } from 'vuedraggable/src/util/helper'
const user = {
state: {
@ -120,9 +121,14 @@ const user = {
const menuData = response.result.menu;
const authData = response.result.auth;
const allAuthData = response.result.allAuth;
const parentId=response.result.parentId;
const userInformation=response.result.userInfo;
console.log('------>登录后的信息',response)
//Vue.ls.set(USER_AUTH,authData);
sessionStorage.setItem(USER_AUTH,JSON.stringify(authData));
sessionStorage.setItem(SYS_BUTTON_AUTH,JSON.stringify(allAuthData));
sessionStorage.setItem(PARENT_ID,parentId);
sessionStorage.setItem(USER_INFORMATION,JSON.stringify(userInformation));
if (menuData && menuData.length > 0) {
//update--begin--autor:qinfeng-----date:20200109------for:JEECG-63 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------
menuData.forEach((item, index) => {

2
src/store/mutation-types.js

@ -12,6 +12,8 @@ export const DEFAULT_MULTI_PAGE = 'DEFAULT_MULTI_PAGE'
export const USER_NAME = 'Login_Username'
export const USER_INFO = 'Login_Userinfo'
export const USER_AUTH = 'LOGIN_USER_BUTTON_AUTH'
export const PARENT_ID='PARENT_ID'
export const USER_INFORMATION='USER_INFORMATION'
export const SYS_BUTTON_AUTH = 'SYS_BUTTON_AUTH'
export const ENCRYPTED_STRING = 'ENCRYPTED_STRING'
export const ENHANCE_PRE = 'enhance_'

33
src/views/activiti/form/ProcessMaterialBorrowingForm.vue

@ -11,22 +11,22 @@
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-user-by-dep v-decorator="['createBy']" />
<j-select-user-by-dep v-decorator="['createBy']" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起公司" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-company v-decorator="['updateFirm']" multi />
<j-select-company v-decorator="['updateFirm']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起部门" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-depart v-decorator="['sysOrgCode']" multi />
<j-select-depart v-decorator="['sysOrgCode']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
@ -78,7 +78,7 @@
<script>
import pick from 'lodash.pick'
import { getAction,httpAction } from '@/api/manage'
import { getAction, getCurrentTime, httpAction } from '@/api/manage'
import { FormTypes, getRefPromise,validateFormAndTables } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
@ -292,6 +292,11 @@
if (!this.isNew){
this.init();
}
let company = sessionStorage.getItem("PARENT_ID");
let userInfo=sessionStorage.getItem("USER_INFORMATION");
console.log(userInfo)
// userInfo.company=company;
this.popupCallback(company,userInfo);
},
methods: {
/*回显数据*/
@ -368,9 +373,21 @@
validateError(msg){
this.$message.error(msg)
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'updateFirm','createTime','sysOrgCode','createBy','materialType','borrowedDepartments','fileId'))
},
popupCallback(company,row) {
let res=JSON.parse(row);
console.log('获取我的数据',res.id)
let param={}
param.createBy=res.username;
param.company=company;
param.sysOrgCode=res.departIds;
param.createTime= getCurrentTime();
this.data=param;
let fieldval =pick(this.data, 'createBy','company','sysOrgCode','createTime')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
},
// handler
handleSubmit (e) {
this.getAllTable().then(tables => {

33
src/views/activiti/form/ProcessMaterialWarehousingForm.vue

@ -6,22 +6,22 @@
<a-row>
<a-col :span="8" >
<a-form-item label="流程发起人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-user-by-dep v-decorator="['createBy']" />
<j-select-user-by-dep v-decorator="['createBy']" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起公司" :labelCol="labelCol" :wrapperCol="wrapperCol" aria-readonly="true">
<j-select-company v-decorator="['company']" multi />
<j-select-company v-decorator="['company']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起部门" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-depart v-decorator="['sysOrgCode']" multi />
<j-select-depart v-decorator="['sysOrgCode']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
@ -86,7 +86,7 @@
<script>
import pick from 'lodash.pick'
import { getAction,httpAction } from '@/api/manage'
import { getAction, getCurrentTime, httpAction } from '@/api/manage'
import { FormTypes, getRefPromise,validateFormAndTables } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { validateDuplicateValue } from '@/utils/util'
@ -377,6 +377,11 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
if (!this.isNew){
this.init();
}
let company = sessionStorage.getItem("PARENT_ID");
let userInfo=sessionStorage.getItem("USER_INFORMATION");
console.log(userInfo)
// userInfo.company=company;
this.popupCallback(company,userInfo);
},
methods: {
/*回显数据*/
@ -493,9 +498,21 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
validateError(msg){
this.$message.error(msg)
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'company','createTime','sysOrgCode','createBy','processUdgetPlanId','materialType','targetLibrary','warehousingBatch','fileId'))
},
popupCallback(company,row) {
let res=JSON.parse(row);
console.log('获取我的数据',res.id)
let param={}
param.createBy=res.username;
param.company=company;
param.sysOrgCode=res.departIds;
param.createTime= getCurrentTime();
this.data=param;
let fieldval =pick(this.data, 'createBy','company','sysOrgCode','createTime')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
},
}
}

33
src/views/activiti/form/ProcessMaterialsAllotForm.vue

@ -11,22 +11,22 @@
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-user-by-dep v-decorator="['createBy']" />
<j-select-user-by-dep v-decorator="['createBy']" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起公司" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-company v-decorator="['company']" multi />
<j-select-company v-decorator="['company']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起部门" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-depart v-decorator="['sysOrgCode']" multi />
<j-select-depart v-decorator="['sysOrgCode']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
@ -79,7 +79,7 @@
<script>
import pick from 'lodash.pick'
import { getAction,httpAction } from '@/api/manage'
import { getAction, getCurrentTime, httpAction } from '@/api/manage'
import { FormTypes, getRefPromise,validateFormAndTables } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
@ -294,6 +294,11 @@
if (!this.isNew){
this.init();
}
let company = sessionStorage.getItem("PARENT_ID");
let userInfo=sessionStorage.getItem("USER_INFORMATION");
console.log(userInfo)
// userInfo.company=company;
this.popupCallback(company,userInfo);
},
methods: {
/*回显数据*/
@ -411,9 +416,21 @@
validateError(msg){
this.$message.error(msg)
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'company','createTime','sysOrgCode','createBy','materialType','beAllotDepartment','fileId'))
},
popupCallback(company,row) {
let res=JSON.parse(row);
console.log('获取我的数据',res.id)
let param={}
param.createBy=res.username;
param.company=company;
param.sysOrgCode=res.departIds;
param.createTime= getCurrentTime();
this.data=param;
let fieldval =pick(this.data, 'createBy','company','sysOrgCode','createTime')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
},
}
}

35
src/views/activiti/form/ProcessMaterialsDeliveryForm.vue

@ -6,27 +6,27 @@
<a-row>
<a-col :span="8" v-show="false">
<a-form-item label="ID" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['id']" placeholder="" style="width: 100%"/>
<a-input v-decorator="['id']" placeholder="" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-user-by-dep v-decorator="['createBy']" />
<j-select-user-by-dep v-decorator="['createBy']" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起公司" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-company v-decorator="['company']" multi />
<j-select-company v-decorator="['company']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起部门" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-depart v-decorator="['sysOrgCode']" multi />
<j-select-depart v-decorator="['sysOrgCode']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
@ -78,7 +78,7 @@
<script>
import pick from 'lodash.pick'
import { getAction,httpAction } from '@/api/manage'
import { getAction, getCurrentTime, httpAction } from '@/api/manage'
import { FormTypes, getRefPromise,validateFormAndTables } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { validateDuplicateValue } from '@/utils/util'
@ -301,6 +301,11 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
if (!this.isNew){
this.init();
}
let company = sessionStorage.getItem("PARENT_ID");
let userInfo=sessionStorage.getItem("USER_INFORMATION");
console.log(userInfo)
// userInfo.company=company;
this.popupCallback(company,userInfo);
},
methods: {
/*回显数据*/
@ -418,9 +423,21 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
validateError(msg){
this.$message.error(msg)
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'company','createTime','sysOrgCode','createBy','materialType','deliveryTime','fileId'))
},
popupCallback(company,row) {
let res=JSON.parse(row);
console.log('获取我的数据',res.id)
let param={}
param.createBy=res.username;
param.company=company;
param.sysOrgCode=res.departIds;
param.createTime= getCurrentTime();
this.data=param;
let fieldval =pick(this.data, 'createBy','company','sysOrgCode','createTime')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
},
}
}

35
src/views/activiti/form/ProcessMaterialsReturnForm.vue

@ -6,27 +6,27 @@
<a-row>
<a-col :span="8" v-show="false">
<a-form-item label="ID" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['id']" placeholder="" style="width: 100%"/>
<a-input v-decorator="['id']" placeholder="" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-user-by-dep v-decorator="['createBy']" />
<j-select-user-by-dep v-decorator="['createBy']" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起公司" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-company v-decorator="['company']" multi />
<j-select-company v-decorator="['company']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起部门" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-depart v-decorator="['sysOrgCode']" multi />
<j-select-depart v-decorator="['sysOrgCode']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
@ -78,7 +78,7 @@
<script>
import pick from 'lodash.pick'
import { getAction,httpAction } from '@/api/manage'
import { getAction, getCurrentTime, httpAction } from '@/api/manage'
import { FormTypes, getRefPromise,validateFormAndTables } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { validateDuplicateValue } from '@/utils/util'
@ -294,6 +294,11 @@
if (!this.isNew){
this.init();
}
let company = sessionStorage.getItem("PARENT_ID");
let userInfo=sessionStorage.getItem("USER_INFORMATION");
console.log(userInfo)
// userInfo.company=company;
this.popupCallback(company,userInfo);
},
methods: {
/*回显数据*/
@ -411,9 +416,21 @@
validateError(msg){
this.$message.error(msg)
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'company','createTime','sysOrgCode','createBy','materialType','processBorrowId','fileId'))
},
popupCallback(company,row) {
let res=JSON.parse(row);
console.log('获取我的数据',res.id)
let param={}
param.createBy=res.username;
param.company=company;
param.sysOrgCode=res.departIds;
param.createTime= getCurrentTime();
this.data=param;
let fieldval =pick(this.data, 'createBy','company','sysOrgCode','createTime')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
},
}
}

35
src/views/activiti/form/ProcessSmaterialsScrapForm.vue

@ -6,27 +6,27 @@
<a-row>
<a-col :span="8" v-show="false">
<a-form-item label="ID" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['id']" placeholder="" style="width: 100%"/>
<a-input v-decorator="['id']" placeholder="" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-user-by-dep v-decorator="['createBy']" />
<j-select-user-by-dep v-decorator="['createBy']" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起公司" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-company v-decorator="['company']" multi />
<j-select-company v-decorator="['company']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起部门" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-depart v-decorator="['sysOrgCode']" multi />
<j-select-depart v-decorator="['sysOrgCode']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
@ -78,7 +78,7 @@
<script>
import pick from 'lodash.pick'
import { getAction,httpAction } from '@/api/manage'
import { getAction, getCurrentTime, httpAction } from '@/api/manage'
import { FormTypes, getRefPromise,validateFormAndTables } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { validateDuplicateValue } from '@/utils/util'
@ -292,6 +292,11 @@
created () {
//data
this.showFlowData();
let company = sessionStorage.getItem("PARENT_ID");
let userInfo=sessionStorage.getItem("USER_INFORMATION");
console.log(userInfo)
// userInfo.company=company;
this.popupCallback(company,userInfo);
},
methods: {
/*回显数据*/
@ -409,9 +414,21 @@
validateError(msg){
this.$message.error(msg)
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'company','createTime','sysOrgCode','createBy','materialType','processOutflowId','fileId'))
},
popupCallback(company,row) {
let res=JSON.parse(row);
console.log('获取我的数据',res.id)
let param={}
param.createBy=res.username;
param.company=company;
param.sysOrgCode=res.departIds;
param.createTime= getCurrentTime();
this.data=param;
let fieldval =pick(this.data, 'createBy','company','sysOrgCode','createTime')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
},
}
}

33
src/views/activiti/form/ProcessSpecialMaterialsForm.vue

@ -11,22 +11,22 @@
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-user-by-dep v-decorator="['createBy']" />
<j-select-user-by-dep v-decorator="['createBy']" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起公司" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-company v-decorator="['company']" multi />
<j-select-company v-decorator="['company']" multi disabled />
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起部门" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-depart v-decorator="['sysOrgCode']" multi />
<j-select-depart v-decorator="['sysOrgCode']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="流程发起时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
@ -78,7 +78,7 @@
<script>
import pick from 'lodash.pick'
import { getAction,httpAction } from '@/api/manage'
import { getAction, getCurrentTime, httpAction } from '@/api/manage'
import { FormTypes, getRefPromise,validateFormAndTables } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { validateDuplicateValue } from '@/utils/util'
@ -287,6 +287,11 @@
if (!this.isNew){
this.init();
}
let company = sessionStorage.getItem("PARENT_ID");
let userInfo=sessionStorage.getItem("USER_INFORMATION");
console.log(userInfo)
// userInfo.company=company;
this.popupCallback(company,userInfo);
},
methods: {
/*回显数据*/
@ -404,9 +409,21 @@
validateError(msg){
this.$message.error(msg)
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'company','createTime','sysOrgCode','createBy','materialType','processReturnId','fileId'))
},
popupCallback(company,row) {
let res=JSON.parse(row);
console.log('获取我的数据',res.id)
let param={}
param.createBy=res.username;
param.company=company;
param.sysOrgCode=res.departIds;
param.createTime= getCurrentTime();
this.data=param;
let fieldval =pick(this.data, 'createBy','company','sysOrgCode','createTime')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
},
}
}

37
src/views/activiti/form/ProcessUdgetPlanForm.vue

@ -11,24 +11,24 @@
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="流程发起人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-user-by-dep v-decorator="['createBy']"/>
<a-form-item label="流程发起人" :labelCol="labelCol" :wrapperCol="wrapperCol" >
<j-select-user-by-dep v-decorator="['createBy']" disabled/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="流程发起公司" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-company v-decorator="['company']" multi/>
<j-select-company v-decorator="['company']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="流程发起部门" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-depart @orgCodeTxt="orgCodeTxt" v-decorator="['sysOrgCode']" multi/>
<j-select-depart v-decorator="['sysOrgCode']" multi disabled/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="流程发起时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true"
date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"/>
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :show-time="true"
date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="8">
@ -94,7 +94,7 @@
const VALIDATE_NO_PASSED = Symbol()
import pick from 'lodash.pick'
import { getAction,httpAction } from '@/api/manage'
import { getAction,httpAction,getCurrentTime } from '@/api/manage'
import { FormTypes, getRefPromise,validateFormAndTables } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import JFormContainer from '@/components/jeecg/JFormContainer'
@ -309,6 +309,7 @@
add: '/hy/processUdgetPlan/add',
edit: '/hy/processUdgetPlan/edit',
queryById: '/hy/processUdgetPlan/queryById',
selectdeparment:'/sys/selectByUser',
processUdgetPlanMaterial: {
list: '/hy/processUdgetPlan/queryProcessUdgetPlanMaterialByMainId'
}
@ -374,6 +375,11 @@
this.init();
}
this.getAllTable()
let company = sessionStorage.getItem("PARENT_ID");
let userInfo=sessionStorage.getItem("USER_INFORMATION");
console.log(userInfo)
// userInfo.company=company;
this.popupCallback(company,userInfo);
},
methods: {
/*回显数据*/
@ -422,6 +428,7 @@
},
/** 调用完edit()方法之后会自动调用此方法 */
editAfter() {
console.log("这是编辑回显数据",this.data)
let fieldval = pick(this.data, 'id','company', 'createTime', 'sysOrgCode', 'createBy', 'materialType', 'processPlan', 'needTime', 'orderNumber', 'fileId')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
@ -458,8 +465,20 @@
validateError(msg) {
this.$message.error(msg)
},
popupCallback(row) {
this.form.setFieldsValue(pick(row, 'company', 'createTime', 'sysOrgCode', 'createBy', 'materialType', 'processPlan', 'needTime', 'orderNumber', 'fileId'))
popupCallback(company,row) {
let res=JSON.parse(row);
console.log('获取我的数据',res.id)
let param={}
param.createBy=res.username;
param.company=company;
param.sysOrgCode=res.departIds;
param.createTime= getCurrentTime();
this.data=param;
let fieldval =pick(this.data, 'createBy','company','sysOrgCode','createTime')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
},
// handler
handleSubmit (e) {

2
src/views/processmaterials/modules/ProcessSmaterialsScrapForm.vue

@ -68,7 +68,7 @@
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { validateDuplicateValue } from '@/utils/util'
import JFormContainer from '@/components/jeecg/JFormContainer'
import JDate from '@/components/jeecg/JDate'
import JDate from '@/components/jeecg/JDate'
import JUpload from '@/components/jeecg/JUpload'
import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'

10
src/views/processmaterials/modules/ProcessSmaterialsScrapModal.vue

@ -57,7 +57,7 @@
import { httpAction } from '@/api/manage'
import pick from 'lodash.pick'
import { validateDuplicateValue } from '@/utils/util'
import JDate from '@/components/jeecg/JDate'
import JDate from '@/components/jeecg/JDate'
import JUpload from '@/components/jeecg/JUpload'
import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
@ -66,7 +66,7 @@
export default {
name: "ProcessSmaterialsScrapModal",
components: {
components: {
JDate,
JUpload,
JSelectDepart,
@ -97,7 +97,7 @@
add: "/hy/processSmaterialsScrap/add",
edit: "/hy/processSmaterialsScrap/edit",
}
}
},
created () {
@ -147,7 +147,7 @@
that.close();
})
}
})
},
handleCancel () {
@ -157,7 +157,7 @@
this.form.setFieldsValue(pick(row,'company','createTime','sysOrgCode','createBy','materialType','processOutflowId','fileId'))
},
}
}
</script>
Loading…
Cancel
Save