diff --git a/public/components/property/purchaseApprovers/purchaseApprovers.html b/public/components/property/purchaseApprovers/purchaseApprovers.html index 130ed04cf..9dfd23ac5 100644 --- a/public/components/property/purchaseApprovers/purchaseApprovers.html +++ b/public/components/property/purchaseApprovers/purchaseApprovers.html @@ -11,17 +11,21 @@
- + namespace="purchaseApprovers"> --> +
- + namespace="purchaseApprovers"> --> +
diff --git a/public/components/property/purchaseApprovers/purchaseApprovers.js b/public/components/property/purchaseApprovers/purchaseApprovers.js index 7dcd4a50c..2e60c1284 100644 --- a/public/components/property/purchaseApprovers/purchaseApprovers.js +++ b/public/components/property/purchaseApprovers/purchaseApprovers.js @@ -10,6 +10,10 @@ flowComponent: 'purchaseApprovers', staffId: '', staffName: '', + companyName: '', + departmentName: '', + departmentId:'', + companyId:'' } }, watch: { @@ -21,7 +25,8 @@ } }, _initMethod: function () { - + $that._loadStaffOrg(); + }, _initEvent: function () { vc.on("purchaseApprovers", "notify", function (_param) { @@ -32,6 +37,43 @@ }); }, methods: { + _loadStaffOrg: function () { + let _userInfo = vc.getData("/nav/getUserInfo"); + if (_userInfo == null || _userInfo == undefined) { + vc.toast('用户可能还没有登陆,无法获取用户信息'); + return; + } + let _staffId = _userInfo.userId; + var param = { + params: { + staffId: _staffId, + page: 1, + row: 1 + } + }; + //发送get请求 + vc.http.apiGet('org.listOrgs', + param, + function (json) { + var _staffInfo = JSON.parse(json); + if (_staffInfo.total == 1) { + let _tmpOrg = _staffInfo.orgs[0]; + $that.purchaseApproversInfo.companyName = _tmpOrg.parentOrgName; + $that.purchaseApproversInfo.departmentName = _tmpOrg.orgName; + $that.purchaseApproversInfo.departmentId = _tmpOrg.orgId; + $that.purchaseApproversInfo.companyId = _tmpOrg.parentOrgId; + + vc.emit('purchaseApprovers','staffSelect2', 'setStaff',{ + companyId:_tmpOrg.parentOrgId, + departmentId:_tmpOrg.orgId + }); + + } + }, function () { + console.log('请求失败处理'); + } + ); + }, purchaseApproversValidate: function () { return vc.validate.validate({ purchaseApproversInfo: vc.component.purchaseApproversInfo @@ -63,7 +105,8 @@ vc.emit($props.callBackListener, $props.callBackFunction, vc.component.purchaseApproversInfo); return; } - } + }, + } }); diff --git a/public/pages/common/addPurchaseApplyStep/addPurchaseApplyStep.js b/public/pages/common/addPurchaseApplyStep/addPurchaseApplyStep.js index e1607b327..fce60b577 100644 --- a/public/pages/common/addPurchaseApplyStep/addPurchaseApplyStep.js +++ b/public/pages/common/addPurchaseApplyStep/addPurchaseApplyStep.js @@ -65,6 +65,7 @@ }, _nextStep: function () { vc.emit('viewResourceStoreInfo2', 'getSelectResourceStores', null); + let _resourceStores = vc.component.addPurchaseApplyStepInfo.purchaseApply.resourceStores; var _currentData = vc.component.addPurchaseApplyStepInfo.infos[vc.component.addPurchaseApplyStepInfo.index]; if (_currentData == null || _currentData == undefined) { vc.toast("请选择或填写必选信息"); diff --git a/public/pages/common/purchaseApplyManage/purchaseApplyManage.html b/public/pages/common/purchaseApplyManage/purchaseApplyManage.html index d6adf75a5..15df09c5a 100644 --- a/public/pages/common/purchaseApplyManage/purchaseApplyManage.html +++ b/public/pages/common/purchaseApplyManage/purchaseApplyManage.html @@ -64,9 +64,10 @@ 申请单号 申请人 使用人 + 联系方式 物品 申请时间 - 总计价格 + 参考价格 当前处理人 联系方式 审批状态 @@ -77,7 +78,8 @@ {{purchaseApply.applyOrderId}} {{purchaseApply.userName}} - {{purchaseApply.userName}} + {{purchaseApply.endUserName}} + {{purchaseApply.endUserTel}} {{purchaseApply.resourceNames}} {{purchaseApply.createTime}} {{purchaseApply.totalPrice}}