From 36b4f516d687ab33ba2996b06b3073dbf98c8bcb Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Sun, 25 Oct 2020 10:43:55 +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 --- .../groupBuyBatchManage.html | 85 +++++++++++++++++++ .../groupBuyBatchManage.js | 76 +++++++++++++++++ 2 files changed, 161 insertions(+) create mode 100644 public/pages/goods/groupBuyBatchManage/groupBuyBatchManage.html create mode 100644 public/pages/goods/groupBuyBatchManage/groupBuyBatchManage.js diff --git a/public/pages/goods/groupBuyBatchManage/groupBuyBatchManage.html b/public/pages/goods/groupBuyBatchManage/groupBuyBatchManage.html new file mode 100644 index 000000000..faa0d9418 --- /dev/null +++ b/public/pages/goods/groupBuyBatchManage/groupBuyBatchManage.html @@ -0,0 +1,85 @@ +
+
+
+
+
+
查询条件
+
+ +
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
拼团批次
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
批次ID拼团名称开始时间结束时间当前批次创建时间
{{product.batchId}}{{product.groupBuyName}}{{product.batchStartTime}}{{product.batchEndTime}}{{product.curBatch == 'Y'?'是':'否'}}{{product.createTime}}
+
    +
    + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/public/pages/goods/groupBuyBatchManage/groupBuyBatchManage.js b/public/pages/goods/groupBuyBatchManage/groupBuyBatchManage.js new file mode 100644 index 000000000..00f13cefa --- /dev/null +++ b/public/pages/goods/groupBuyBatchManage/groupBuyBatchManage.js @@ -0,0 +1,76 @@ +/** + 入驻小区 +**/ +(function (vc) { + var DEFAULT_PAGE = 1; + var DEFAULT_ROWS = 10; + vc.extends({ + data: { + groupBuyBatchManageInfo: { + products: [], + total: 0, + records: 1, + moreCondition: false, + productId: '', + conditions: { + groupProdName: '', + keyword: '', + barCode: '', + } + } + }, + _initMethod: function () { + vc.component._listProducts(DEFAULT_PAGE, DEFAULT_ROWS); + }, + _initEvent: function () { + + vc.on('groupBuyBatchManage', 'listProduct', function (_param) { + $that.groupBuyBatchManageInfo.componentShow = 'groupBuyBatchManage'; + vc.component._listProducts(DEFAULT_PAGE, DEFAULT_ROWS); + }); + vc.on('pagination', 'page_event', function (_currentPage) { + vc.component._listProducts(_currentPage, DEFAULT_ROWS); + }); + }, + methods: { + _listProducts: function (_page, _rows) { + + vc.component.groupBuyBatchManageInfo.conditions.page = _page; + vc.component.groupBuyBatchManageInfo.conditions.row = _rows; + var param = { + params: vc.component.groupBuyBatchManageInfo.conditions + }; + + //发送get请求 + vc.http.apiGet('/groupBuy/queryGroupBuyBatch', + param, + function (json, res) { + var _groupBuyBatchManageInfo = JSON.parse(json); + vc.component.groupBuyBatchManageInfo.total = _groupBuyBatchManageInfo.total; + vc.component.groupBuyBatchManageInfo.records = _groupBuyBatchManageInfo.records; + vc.component.groupBuyBatchManageInfo.products = _groupBuyBatchManageInfo.data; + vc.emit('pagination', 'init', { + total: vc.component.groupBuyBatchManageInfo.records, + currentPage: _page + }); + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _queryProductMethod: function () { + vc.component._listProducts(DEFAULT_PAGE, DEFAULT_ROWS); + + }, + _moreCondition: function () { + if (vc.component.groupBuyBatchManageInfo.moreCondition) { + vc.component.groupBuyBatchManageInfo.moreCondition = false; + } else { + vc.component.groupBuyBatchManageInfo.moreCondition = true; + } + } + + + } + }); +})(window.vc);