Browse Source

物资入库自动加载目标库,旧库房管理单位转换

dev
0.0 2 years ago
parent
commit
4ebf5a5c74
  1. 4
      src/store/modules/user.js
  2. 1
      src/store/mutation-types.js
  3. 28
      src/views/activiti/form/ProcessMaterialWarehousingForm.vue
  4. 2
      src/views/system/modules/UserModal.vue
  5. 2
      src/views/unitwaste/ProcessUnitWasteWarehouseCodeList.vue
  6. 4
      src/views/unitwaste/modules/ProcessUnitWasteWarehouseCodeForm.vue

4
src/store/modules/user.js

@ -1,6 +1,6 @@
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,PARENT_ID,USER_INFORMATION } 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,PUWWC_Id } from "@/store/mutation-types"
import { welcome } from "@/utils/util"
import { queryPermissionsByUser } from '@/api/api'
import { getAction } from '@/api/manage'
@ -122,12 +122,14 @@ const user = {
const authData = response.result.auth;
const allAuthData = response.result.allAuth;
const parentId=response.result.parentId;
const puwwcId=response.result.puwwcId;
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(PUWWC_Id,puwwcId);
sessionStorage.setItem(USER_INFORMATION,JSON.stringify(userInformation));
if (menuData && menuData.length > 0) {
//update--begin--autor:qinfeng-----date:20200109------for:JEECG-63 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------

1
src/store/mutation-types.js

@ -13,6 +13,7 @@ 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 PUWWC_Id='PUWWC_Id'
export const USER_INFORMATION='USER_INFORMATION'
export const SYS_BUTTON_AUTH = 'SYS_BUTTON_AUTH'
export const ENCRYPTED_STRING = 'ENCRYPTED_STRING'

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

@ -50,7 +50,8 @@
</a-col>
<a-col :span="8" >
<a-form-item label="入库目标库" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input-number v-decorator="['targetLibrary',validatorRules.targetLibrary]" placeholder="请输入入库目标库" style="width: 100%" />
<a-input v-decorator="['targetLibrary']" placeholder="入库目标库" style="width: 100%" disabled/>
<!-- <a-radio v-for="item in puwwOptions" :key="item.id" :label="item.invisibleCode" :value="item.id"></a-radio>-->
</a-form-item>
</a-col>
<a-col :span="8" >
@ -121,6 +122,9 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
},
data() {
return {
libraryAssociationIdInvisible:'ZK',
invisibleCode:null,
puwwOptions: [],
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
@ -255,6 +259,7 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
edit: "/hy/processMaterialWarehousing/edit",
queryById: "/hy/processMaterialWarehousing/queryById",
list: "/hy/processUdgetPlan/queryProcessUdgetPlanMaterialByMainId",
puwwlist: "/unitwaste/processUnitWasteWarehouseCode/queryById",
processMaterialWarehousingList: {
list: '/hy/processMaterialWarehousing/queryProcessMaterialWarehousingListByMainId'
},
@ -324,10 +329,11 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
this.init();
}
let company = sessionStorage.getItem("PARENT_ID");
let puwwcid = sessionStorage.getItem("PUWWC_Id");
let userInfo=sessionStorage.getItem("USER_INFORMATION");
console.log(userInfo)
// userInfo.company=company;
this.popupCallback(company,userInfo);
this.popupCallback(company,userInfo,puwwcid);
},
methods: {
/*回显数据*/
@ -376,6 +382,7 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
formData.procDefId = this.processData.id;
formData.procDeTitle = this.processData.name;
formData.title=this.processData.description;
formData.targetLibrary = this.libraryAssociationIdInvisible
if (!formData.tableName)formData.tableName = this.processData.businessTable;
var url = this.url.add;
let method='post';
@ -464,19 +471,30 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
this.form.setFieldsValue(fieldval)
})
},
popupCallback(company,row) {
popupCallback(company,row,puwwcid) {
let res=JSON.parse(row);
console.log('获取我的数据',res.id)
let params={}
params.id=puwwcid;
let invisibleCode=null;
getAction(this.url.puwwlist,params).then((rest)=>{
if(rest.success){
invisibleCode =rest.result.invisibleCode
this.libraryAssociationIdInvisible = rest.result.unit
}
let param={}
param.createBy=res.username;
param.company=company;
param.targetLibrary =invisibleCode==null?"ZK":invisibleCode;
param.sysOrgCode=res.departIds;
param.createTime= getCurrentTime();
this.data=param;
let fieldval =pick(this.data, 'createBy','company','sysOrgCode','createTime')
console.log('获取我的数据',this.data)
let fieldval =pick(this.data, 'createBy','company','sysOrgCode','createTime','targetLibrary')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
})
},
}

2
src/views/system/modules/UserModal.vue

@ -353,7 +353,7 @@
this.uploadLoading = false;
console.log(response);
if(response.success){
this.model.img= response.message;
this.model.img= response.result;
this.picUrl = "Has no pic url yet";
}else{
this.$message.warning(response.message);

2
src/views/unitwaste/ProcessUnitWasteWarehouseCodeList.vue

@ -154,7 +154,7 @@
{
title:'单位',
align:"center",
dataIndex: 'unit'
dataIndex: 'unit_dictText'
},
{
title:'账外物资库编码',

4
src/views/unitwaste/modules/ProcessUnitWasteWarehouseCodeForm.vue

@ -5,7 +5,7 @@
<a-row>
<a-col :span="8">
<a-form-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['unit']" placeholder="请输入单位" ></a-input>
<j-select-depart v-decorator="['unit']" multi />
</a-form-item>
</a-col>
<a-col :span="8">
@ -38,11 +38,13 @@
import pick from 'lodash.pick'
import { validateDuplicateValue } from '@/utils/util'
import JFormContainer from '@/components/jeecg/JFormContainer'
import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
export default {
name: 'ProcessUnitWasteWarehouseCodeForm',
components: {
JFormContainer,
JSelectDepart
},
props: {
//data

Loading…
Cancel
Save