From b31f5a422361745b6fb836c68c7b39a6821abbe0 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Thu, 16 Jul 2020 14:32:53 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E9=A2=86=E7=94=A8=E5=B7=B2?=
=?UTF-8?q?=E5=8A=9E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../myItemOutAuditHistoryOrders.html | 53 +++++++
.../myItemOutAuditHistoryOrders.js | 61 +++++++
.../myItemOutAuditOrders.js | 7 +-
.../common/itemOutManage/itemOutManage.html | 13 +-
.../common/itemOutManage/itemOutManage.js | 27 +++-
.../resourceOutManage/resourceOutManage.html | 61 +++++++
.../resourceOutManage/resourceOutManage.js | 150 ++++++++++++++++++
7 files changed, 364 insertions(+), 8 deletions(-)
create mode 100644 public/pages/admin/myItemOutAuditHistoryOrders/myItemOutAuditHistoryOrders.html
create mode 100644 public/pages/admin/myItemOutAuditHistoryOrders/myItemOutAuditHistoryOrders.js
create mode 100644 public/pages/common/resourceOutManage/resourceOutManage.html
create mode 100644 public/pages/common/resourceOutManage/resourceOutManage.js
diff --git a/public/pages/admin/myItemOutAuditHistoryOrders/myItemOutAuditHistoryOrders.html b/public/pages/admin/myItemOutAuditHistoryOrders/myItemOutAuditHistoryOrders.html
new file mode 100644
index 000000000..b73d1cf7f
--- /dev/null
+++ b/public/pages/admin/myItemOutAuditHistoryOrders/myItemOutAuditHistoryOrders.html
@@ -0,0 +1,53 @@
+
\ No newline at end of file
diff --git a/public/pages/admin/myItemOutAuditHistoryOrders/myItemOutAuditHistoryOrders.js b/public/pages/admin/myItemOutAuditHistoryOrders/myItemOutAuditHistoryOrders.js
new file mode 100644
index 000000000..c36fc48ea
--- /dev/null
+++ b/public/pages/admin/myItemOutAuditHistoryOrders/myItemOutAuditHistoryOrders.js
@@ -0,0 +1,61 @@
+/**
+ 审核订单
+ **/
+(function (vc) {
+ var DEFAULT_PAGE = 1;
+ var DEFAULT_ROWS = 10;
+ vc.extends({
+ data: {
+ auditOrderHistorysInfo: {
+ auditOrderHistorys: [],
+ total: 0,
+ records: 1,
+ moreCondition: false,
+ userName: '',
+ conditions: {
+ AuditOrderHistorysId: '',
+ userName: '',
+ auditLink: '',
+ },
+ orderInfo:'',
+ }
+ },
+ _initMethod: function () {
+ vc.component._listAuditOrderHistorys(DEFAULT_PAGE, DEFAULT_ROWS);
+ },
+ _initEvent: function () {
+
+
+ },
+ methods: {
+ _listAuditOrderHistorys: function (_page, _rows) {
+
+ vc.component.auditOrderHistorysInfo.conditions.page = _page;
+ vc.component.auditOrderHistorysInfo.conditions.row = _rows;
+ var param = {
+ params: vc.component.auditOrderHistorysInfo.conditions
+ };
+
+ //发送get请求
+ vc.http.apiGet('auditUser.listAuditHistoryOrders',
+ param,
+ function (json, res) {
+ var _auditOrderHistorysInfo = JSON.parse(json);
+ vc.component.auditOrderHistorysInfo.total = _auditOrderHistorysInfo.total;
+ vc.component.auditOrderHistorysInfo.records = _auditOrderHistorysInfo.records;
+ vc.component.auditOrderHistorysInfo.auditOrderHistorys = _auditOrderHistorysInfo.resourceOrders;
+ vc.emit('pagination', 'init', {
+ total: vc.component.auditOrderHistorysInfo.records,
+ currentPage: _page
+ });
+ }, function (errInfo, error) {
+ console.log('请求失败处理');
+ }
+ );
+ },
+ _openDetailPurchaseApplyModel:function(_purchaseApply){
+ vc.jumpToPage("/admin.html#/pages/common/purchaseApplyDetail?applyOrderId="+_purchaseApply.applyOrderId+"&resOrderType="+_purchaseApply.resOrderType);
+ }
+ }
+ });
+})(window.vc);
diff --git a/public/pages/admin/myItemOutAuditOrders/myItemOutAuditOrders.js b/public/pages/admin/myItemOutAuditOrders/myItemOutAuditOrders.js
index 2d43f18aa..2c73675c8 100644
--- a/public/pages/admin/myItemOutAuditOrders/myItemOutAuditOrders.js
+++ b/public/pages/admin/myItemOutAuditOrders/myItemOutAuditOrders.js
@@ -49,14 +49,13 @@
};
//发送get请求
- vc.http.get('myAuditOrders',
- 'list',
+ vc.http.apiGet('/collection/getCollectionAuditOrder',
param,
function (json, res) {
var _auditOrdersInfo = JSON.parse(json);
vc.component.auditOrdersInfo.total = _auditOrdersInfo.total;
vc.component.auditOrdersInfo.records = _auditOrdersInfo.records;
- vc.component.auditOrdersInfo.auditOrders = _auditOrdersInfo.resourceOrders;
+ vc.component.auditOrdersInfo.auditOrders = _auditOrdersInfo.data;
vc.emit('pagination', 'init', {
total: vc.component.auditOrdersInfo.records,
currentPage: _page
@@ -146,7 +145,7 @@
},
_distributionOrder:function(_purchaseApply){
- vc.jumpToPage("/admin.html#/pages/common/resourceEnterManage?applyOrderId="+_purchaseApply.applyOrderId+"&resOrderType="+_purchaseApply.resOrderType+"&taskId="+_purchaseApply.taskId);
+ vc.jumpToPage("/admin.html#/pages/common/resourceOutManage?applyOrderId="+_purchaseApply.applyOrderId+"&resOrderType="+_purchaseApply.resOrderType+"&taskId="+_purchaseApply.taskId);
}
diff --git a/public/pages/common/itemOutManage/itemOutManage.html b/public/pages/common/itemOutManage/itemOutManage.html
index 1d0040e2e..9520109b2 100644
--- a/public/pages/common/itemOutManage/itemOutManage.html
+++ b/public/pages/common/itemOutManage/itemOutManage.html
@@ -67,7 +67,7 @@
申请人 |
申请时间 |
状态 |
- 操作 |
+ 操作 |
@@ -78,16 +78,21 @@
{{itemOut.createTime}} |
{{itemOut.stateName}} |
-
+ |
- |
@@ -111,4 +116,6 @@
+
+
diff --git a/public/pages/common/itemOutManage/itemOutManage.js b/public/pages/common/itemOutManage/itemOutManage.js
index 48dbbe850..1cf9ffb0c 100644
--- a/public/pages/common/itemOutManage/itemOutManage.js
+++ b/public/pages/common/itemOutManage/itemOutManage.js
@@ -80,7 +80,32 @@
},
_queryInspectionPlanMethod:function () {
vc.component._listItemOuts(DEFAULT_PAGE, DEFAULT_ROWS);
- }
+ },
+ _openRunWorkflowImage: function (_itemOut) {
+ var param = {
+ params: {
+ communityId: vc.getCurrentCommunity().communityId,
+ businessKey: _itemOut.applyOrderId
+ }
+ };
+ //发送get请求
+ vc.http.apiGet('workflow.listRunWorkflowImage',
+ param,
+ function (json, res) {
+ var _workflowManageInfo = JSON.parse(json);
+ if (_workflowManageInfo.code != '0') {
+ vc.toast(_workflowManageInfo.msg);
+
+ return;
+ }
+ vc.emit('viewImage', 'showImage', {
+ url: 'data:image/png;base64,' + _workflowManageInfo.data
+ });
+ }, function (errInfo, error) {
+ console.log('请求失败处理');
+ }
+ );
+ },
}
diff --git a/public/pages/common/resourceOutManage/resourceOutManage.html b/public/pages/common/resourceOutManage/resourceOutManage.html
new file mode 100644
index 000000000..533553e4f
--- /dev/null
+++ b/public/pages/common/resourceOutManage/resourceOutManage.html
@@ -0,0 +1,61 @@
+
+
+
+
+
+
单号:{{resourceOutManageInfo.applyOrderId}}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/pages/common/resourceOutManage/resourceOutManage.js b/public/pages/common/resourceOutManage/resourceOutManage.js
new file mode 100644
index 000000000..621187b98
--- /dev/null
+++ b/public/pages/common/resourceOutManage/resourceOutManage.js
@@ -0,0 +1,150 @@
+/**
+ //入库
+**/
+(function (vc) {
+ var DEFAULT_PAGE = 1;
+ var DEFAULT_ROWS = 10;
+ vc.extends({
+ data: {
+ resourceOutManageInfo: {
+ resourceOuts: [],
+ applyOrderId: '',
+ taskId: '',
+ resOrderType: '',
+ purchaseApplyDetailVo: [],
+ }
+ },
+ _initMethod: function () {
+ vc.component.resourceOutManageInfo.applyOrderId = vc.getParam('applyOrderId');
+ vc.component.resourceOutManageInfo.resOrderType = vc.getParam('resOrderType');
+ vc.component.resourceOutManageInfo.taskId = vc.getParam('taskId');
+ vc.component._listPurchaseApply(DEFAULT_PAGE, DEFAULT_ROWS);
+ },
+ _initEvent: function () {
+
+ },
+ methods: {
+ _listPurchaseApply: function (_page, _rows) {
+ var param = {
+ params: {
+ page: _page,
+ row: _rows,
+ applyOrderId: vc.component.resourceOutManageInfo.applyOrderId,
+ resOrderType: vc.component.resourceOutManageInfo.resOrderType,
+ }
+ };
+
+ //发送get请求
+ vc.http.get('purchaseApplyManage',
+ 'list',
+ param,
+ function (json, res) {
+ var _purchaseApplyDetailInfo = JSON.parse(json);
+ var _purchaseApply = _purchaseApplyDetailInfo.purchaseApplys;
+ vc.copyObject(_purchaseApply[0], vc.component.resourceOutManageInfo);
+ $that.resourceOutManageInfo.purchaseApplyDetailVo.forEach(function (item) {
+ item.purchaseQuantity = '';
+ item.price = '';
+ item.purchaseRemark = '';
+
+ });
+ }, function (errInfo, error) {
+ console.log('请求失败处理');
+ }
+ );
+ },
+ _openDetailResourceEnterModel: function (_resourceOut) {
+ vc.jumpToPage("/admin.html#/pages/common/resourceOutDetail?applyOrderId=" + _resourceOut.applyOrderId + "&resOrderType=10000");
+ },
+ _openResourceEnterDetailManageModel: function (_resourceOut) {
+ vc.jumpToPage("/admin.html#/pages/common/resourceOutDetailManage?applyOrderId=" + _resourceOut.applyOrderId + "&resOrderType=10000");
+ },
+ _queryResourceEnterMethod: function () {
+ vc.component._listResourceEnters(DEFAULT_PAGE, DEFAULT_ROWS);
+
+ },
+ _moreCondition: function () {
+ if (vc.component.resourceOutManageInfo.moreCondition) {
+ vc.component.resourceOutManageInfo.moreCondition = false;
+ } else {
+ vc.component.resourceOutManageInfo.moreCondition = true;
+ }
+ },
+ _queryInspectionPlanMethod: function () {
+ vc.component._listResourceEnters(DEFAULT_PAGE, DEFAULT_ROWS);
+ },
+ _openAddResourceQuantityModel: function () {
+
+ },
+ _submit: function () {
+ let _flag = true;
+ //校验 是否填写正确
+ $that.resourceOutManageInfo.purchaseApplyDetailVo.forEach(function (item) {
+
+ if (!vc.notNull(item.purchaseQuantity)) {
+ vc.toast('采购数量未填写');
+ _flag = false;
+ return;
+ }
+
+ console.log('item',item);
+ if (item.purchaseQuantity > item.stock) {
+ vc.toast('库存不足');
+ _flag = false;
+ return;
+ }
+ });
+
+ if(_flag == false){
+ return;
+ }
+
+ vc.http.apiPost(
+ '/collection/resourceOut',
+ JSON.stringify($that.resourceOutManageInfo),
+ {
+ emulateJSON: true
+ },
+ function (json, res) {
+ let _json = JSON.parse(json);
+ if (_json.code == 0) {
+ //处理审核通过
+ $that._finishAuditOrder();
+ return;
+ }
+ vc.toast(_json.msg);
+ },
+ function (errInfo, error) {
+ console.log('请求失败处理');
+
+ vc.toast(errInfo);
+ });
+ },
+ _finishAuditOrder: function () {
+ let _auditInfo = {
+ taskId: $that.resourceOutManageInfo.taskId,
+ applyOrderId: $that.resourceOutManageInfo.applyOrderId,
+ state: '1100',
+ remark: '出库完成'
+ };
+ //发送get请求
+ vc.http.post('myAuditOrders',
+ 'audit',
+ JSON.stringify(_auditInfo),
+ {
+ emulateJSON: true
+ },
+ function (json, res) {
+ vc.toast("处理成功");
+ vc.goBack();
+ }, function (errInfo, error) {
+ console.log('请求失败处理');
+ vc.toast("处理失败:" + errInfo);
+ }
+ );
+ },
+
+
+ }
+ });
+})(window.vc);