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. 44
      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 Vue from 'vue'
import { login, logout, phoneLogin, thirdLogin } from "@/api/login" 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 { welcome } from "@/utils/util"
import { queryPermissionsByUser } from '@/api/api' import { queryPermissionsByUser } from '@/api/api'
import { getAction } from '@/api/manage' import { getAction } from '@/api/manage'
@ -122,12 +122,14 @@ const user = {
const authData = response.result.auth; const authData = response.result.auth;
const allAuthData = response.result.allAuth; const allAuthData = response.result.allAuth;
const parentId=response.result.parentId; const parentId=response.result.parentId;
const puwwcId=response.result.puwwcId;
const userInformation=response.result.userInfo; const userInformation=response.result.userInfo;
console.log('------>登录后的信息',response) console.log('------>登录后的信息',response)
//Vue.ls.set(USER_AUTH,authData); //Vue.ls.set(USER_AUTH,authData);
sessionStorage.setItem(USER_AUTH,JSON.stringify(authData)); sessionStorage.setItem(USER_AUTH,JSON.stringify(authData));
sessionStorage.setItem(SYS_BUTTON_AUTH,JSON.stringify(allAuthData)); sessionStorage.setItem(SYS_BUTTON_AUTH,JSON.stringify(allAuthData));
sessionStorage.setItem(PARENT_ID,parentId); sessionStorage.setItem(PARENT_ID,parentId);
sessionStorage.setItem(PUWWC_Id,puwwcId);
sessionStorage.setItem(USER_INFORMATION,JSON.stringify(userInformation)); sessionStorage.setItem(USER_INFORMATION,JSON.stringify(userInformation));
if (menuData && menuData.length > 0) { if (menuData && menuData.length > 0) {
//update--begin--autor:qinfeng-----date:20200109------for:JEECG-63 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------ //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_INFO = 'Login_Userinfo'
export const USER_AUTH = 'LOGIN_USER_BUTTON_AUTH' export const USER_AUTH = 'LOGIN_USER_BUTTON_AUTH'
export const PARENT_ID='PARENT_ID' export const PARENT_ID='PARENT_ID'
export const PUWWC_Id='PUWWC_Id'
export const USER_INFORMATION='USER_INFORMATION' export const USER_INFORMATION='USER_INFORMATION'
export const SYS_BUTTON_AUTH = 'SYS_BUTTON_AUTH' export const SYS_BUTTON_AUTH = 'SYS_BUTTON_AUTH'
export const ENCRYPTED_STRING = 'ENCRYPTED_STRING' export const ENCRYPTED_STRING = 'ENCRYPTED_STRING'

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

@ -50,7 +50,8 @@
</a-col> </a-col>
<a-col :span="8" > <a-col :span="8" >
<a-form-item label="入库目标库" :labelCol="labelCol" :wrapperCol="wrapperCol"> <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-form-item>
</a-col> </a-col>
<a-col :span="8" > <a-col :span="8" >
@ -121,6 +122,9 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
}, },
data() { data() {
return { return {
libraryAssociationIdInvisible:'ZK',
invisibleCode:null,
puwwOptions: [],
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 6 }, sm: { span: 6 },
@ -255,6 +259,7 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
edit: "/hy/processMaterialWarehousing/edit", edit: "/hy/processMaterialWarehousing/edit",
queryById: "/hy/processMaterialWarehousing/queryById", queryById: "/hy/processMaterialWarehousing/queryById",
list: "/hy/processUdgetPlan/queryProcessUdgetPlanMaterialByMainId", list: "/hy/processUdgetPlan/queryProcessUdgetPlanMaterialByMainId",
puwwlist: "/unitwaste/processUnitWasteWarehouseCode/queryById",
processMaterialWarehousingList: { processMaterialWarehousingList: {
list: '/hy/processMaterialWarehousing/queryProcessMaterialWarehousingListByMainId' list: '/hy/processMaterialWarehousing/queryProcessMaterialWarehousingListByMainId'
}, },
@ -324,10 +329,11 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
this.init(); this.init();
} }
let company = sessionStorage.getItem("PARENT_ID"); let company = sessionStorage.getItem("PARENT_ID");
let puwwcid = sessionStorage.getItem("PUWWC_Id");
let userInfo=sessionStorage.getItem("USER_INFORMATION"); let userInfo=sessionStorage.getItem("USER_INFORMATION");
console.log(userInfo) console.log(userInfo)
// userInfo.company=company; // userInfo.company=company;
this.popupCallback(company,userInfo); this.popupCallback(company,userInfo,puwwcid);
}, },
methods: { methods: {
/*回显数据*/ /*回显数据*/
@ -376,6 +382,7 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
formData.procDefId = this.processData.id; formData.procDefId = this.processData.id;
formData.procDeTitle = this.processData.name; formData.procDeTitle = this.processData.name;
formData.title=this.processData.description; formData.title=this.processData.description;
formData.targetLibrary = this.libraryAssociationIdInvisible
if (!formData.tableName)formData.tableName = this.processData.businessTable; if (!formData.tableName)formData.tableName = this.processData.businessTable;
var url = this.url.add; var url = this.url.add;
let method='post'; let method='post';
@ -464,18 +471,29 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
this.form.setFieldsValue(fieldval) this.form.setFieldsValue(fieldval)
}) })
}, },
popupCallback(company,row) { popupCallback(company,row,puwwcid) {
let res=JSON.parse(row); let res=JSON.parse(row);
console.log('获取我的数据',res.id) let params={}
let param={} params.id=puwwcid;
param.createBy=res.username; let invisibleCode=null;
param.company=company; getAction(this.url.puwwlist,params).then((rest)=>{
param.sysOrgCode=res.departIds; if(rest.success){
param.createTime= getCurrentTime(); invisibleCode =rest.result.invisibleCode
this.data=param; this.libraryAssociationIdInvisible = rest.result.unit
let fieldval =pick(this.data, 'createBy','company','sysOrgCode','createTime') }
this.$nextTick(() => {
this.form.setFieldsValue(fieldval) 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;
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; this.uploadLoading = false;
console.log(response); console.log(response);
if(response.success){ if(response.success){
this.model.img= response.message; this.model.img= response.result;
this.picUrl = "Has no pic url yet"; this.picUrl = "Has no pic url yet";
}else{ }else{
this.$message.warning(response.message); this.$message.warning(response.message);

2
src/views/unitwaste/ProcessUnitWasteWarehouseCodeList.vue

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

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

@ -5,7 +5,7 @@
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol"> <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-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
@ -38,11 +38,13 @@
import pick from 'lodash.pick' import pick from 'lodash.pick'
import { validateDuplicateValue } from '@/utils/util' import { validateDuplicateValue } from '@/utils/util'
import JFormContainer from '@/components/jeecg/JFormContainer' import JFormContainer from '@/components/jeecg/JFormContainer'
import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
export default { export default {
name: 'ProcessUnitWasteWarehouseCodeForm', name: 'ProcessUnitWasteWarehouseCodeForm',
components: { components: {
JFormContainer, JFormContainer,
JSelectDepart
}, },
props: { props: {
//data //data

Loading…
Cancel
Save