From 66ac15ccbb7608ec49405143f95be8ab4500952a Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Thu, 8 Apr 2021 13:47:56 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../allocationStorehouseAuditOrders.html | 66 ++++++++++
.../allocationStorehouseAuditOrders.js | 122 ++++++++++++++++++
2 files changed, 188 insertions(+)
create mode 100644 public/pages/admin/allocationStorehouseAuditOrders/allocationStorehouseAuditOrders.html
create mode 100644 public/pages/admin/allocationStorehouseAuditOrders/allocationStorehouseAuditOrders.js
diff --git a/public/pages/admin/allocationStorehouseAuditOrders/allocationStorehouseAuditOrders.html b/public/pages/admin/allocationStorehouseAuditOrders/allocationStorehouseAuditOrders.html
new file mode 100644
index 000000000..dc22227be
--- /dev/null
+++ b/public/pages/admin/allocationStorehouseAuditOrders/allocationStorehouseAuditOrders.html
@@ -0,0 +1,66 @@
+
\ No newline at end of file
diff --git a/public/pages/admin/allocationStorehouseAuditOrders/allocationStorehouseAuditOrders.js b/public/pages/admin/allocationStorehouseAuditOrders/allocationStorehouseAuditOrders.js
new file mode 100644
index 000000000..0ee3c36f0
--- /dev/null
+++ b/public/pages/admin/allocationStorehouseAuditOrders/allocationStorehouseAuditOrders.js
@@ -0,0 +1,122 @@
+/**
+ 审核订单
+ **/
+(function (vc) {
+ var DEFAULT_PAGE = 1;
+ var DEFAULT_ROWS = 10;
+ vc.extends({
+ data: {
+ allocationStorehouseAuditOrdersInfo: {
+ auditOrders: [],
+ total: 0,
+ records: 1,
+ moreCondition: false,
+ userName: '',
+ currentUserId: vc.getData('/nav/getUserInfo').userId,
+ conditions: {
+ AuditOrdersId: '',
+ userName: '',
+ auditLink: '',
+ },
+ orderInfo: '',
+ procure: false
+ }
+ },
+ _initMethod: function () {
+ vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
+ $that._loadStepStaff();
+ },
+ _initEvent: function () {
+
+ vc.on('allocationStorehouseAuditOrders', 'listAuditOrders', function (_param) {
+ vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
+ });
+ vc.on('pagination', 'page_event', function (_currentPage) {
+ vc.component._listAuditOrders(_currentPage, DEFAULT_ROWS);
+ });
+
+ vc.on('myAuditOrders', 'notifyAudit', function (_auditInfo) {
+ vc.component._auditOrderInfo(_auditInfo);
+ });
+ },
+ methods: {
+ _listAuditOrders: function (_page, _rows) {
+
+ vc.component.allocationStorehouseAuditOrdersInfo.conditions.page = _page;
+ vc.component.allocationStorehouseAuditOrdersInfo.conditions.row = _rows;
+ var param = {
+ params: vc.component.allocationStorehouseAuditOrdersInfo.conditions
+ };
+
+ //发送get请求
+ vc.http.get('myAuditOrders',
+ 'list',
+ param,
+ function (json, res) {
+ var _allocationStorehouseAuditOrdersInfo = JSON.parse(json);
+ vc.component.allocationStorehouseAuditOrdersInfo.total = _allocationStorehouseAuditOrdersInfo.total;
+ vc.component.allocationStorehouseAuditOrdersInfo.records = _allocationStorehouseAuditOrdersInfo.records;
+ vc.component.allocationStorehouseAuditOrdersInfo.auditOrders = _allocationStorehouseAuditOrdersInfo.resourceOrders;
+ vc.emit('pagination', 'init', {
+ total: vc.component.allocationStorehouseAuditOrdersInfo.records,
+ currentPage: _page
+ });
+ }, function (errInfo, error) {
+ console.log('请求失败处理');
+ }
+ );
+ },
+ _openAuditOrderModel: function (_auditOrder) {
+ vc.component.allocationStorehouseAuditOrdersInfo.orderInfo = _auditOrder;
+ vc.emit('audit', 'openAuditModal', {});
+ },
+ _queryAuditOrdersMethod: function () {
+ vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
+ },
+ //提交审核信息
+ _auditOrderInfo: function (_auditInfo) {
+ console.log("提交得参数:" + _auditInfo);
+ _auditInfo.taskId = vc.component.allocationStorehouseAuditOrdersInfo.orderInfo.taskId;
+ _auditInfo.applyOrderId = vc.component.allocationStorehouseAuditOrdersInfo.orderInfo.applyOrderId;
+ //发送get请求
+ vc.http.post('myAuditOrders',
+ 'audit',
+ JSON.stringify(_auditInfo),
+ {
+ emulateJSON: true
+ },
+ function (json, res) {
+ vc.toast("处理成功");
+ vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
+ }, function (errInfo, error) {
+ console.log('请求失败处理');
+ vc.toast("处理失败:" + errInfo);
+ }
+ );
+ },
+ _finishAuditOrder: function (_auditOrder) {
+ let _auditInfo = {
+ taskId: _auditOrder.taskId,
+ applyOrderId: _auditOrder.applyOrderId,
+ state: '1200',
+ remark: '处理结束'
+ };
+ //发送get请求
+ vc.http.post('myAuditOrders',
+ 'audit',
+ JSON.stringify(_auditInfo),
+ {
+ emulateJSON: true
+ },
+ function (json, res) {
+ vc.toast("处理成功");
+ vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
+ }, function (errInfo, error) {
+ console.log('请求失败处理');
+ vc.toast("处理失败:" + errInfo);
+ }
+ );
+ }
+ }
+ });
+})(window.vc);