|
@@ -304,6 +304,7 @@ var _default =
|
|
data: function data() {
|
|
data: function data() {
|
|
return {
|
|
return {
|
|
id: '',
|
|
id: '',
|
|
|
|
+ tableid: '',
|
|
order: '0',
|
|
order: '0',
|
|
shopInfo: {},
|
|
shopInfo: {},
|
|
list: [],
|
|
list: [],
|
|
@@ -327,9 +328,11 @@ var _default =
|
|
},
|
|
},
|
|
onLoad: function () {var _onLoad = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {var that;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:
|
|
onLoad: function () {var _onLoad = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {var that;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:
|
|
that = this;
|
|
that = this;
|
|
|
|
+ console.log(e);
|
|
|
|
+ that.$set(that, "tableid", e.tableid);
|
|
that.$set(that, "id", e.id);
|
|
that.$set(that, "id", e.id);
|
|
that.$set(that, "order", e.order);
|
|
that.$set(that, "order", e.order);
|
|
- that.search();case 4:case "end":return _context.stop();}}}, _callee, this);}));function onLoad(_x) {return _onLoad.apply(this, arguments);}return onLoad;}(),
|
|
|
|
|
|
+ that.search();case 6:case "end":return _context.stop();}}}, _callee, this);}));function onLoad(_x) {return _onLoad.apply(this, arguments);}return onLoad;}(),
|
|
|
|
|
|
onShow: function onShow() {
|
|
onShow: function onShow() {
|
|
var that = this;
|
|
var that = this;
|
|
@@ -340,14 +343,21 @@ var _default =
|
|
that = _this;_context2.next = 3;return (
|
|
that = _this;_context2.next = 3;return (
|
|
|
|
|
|
that.$api("table", 'GET', {}));case 3:res = _context2.sent;
|
|
that.$api("table", 'GET', {}));case 3:res = _context2.sent;
|
|
- if (res.errcode == '0') that.$set(that, "tableList", res.data);_context2.next = 7;return (
|
|
|
|
- that.$api("shop", 'GET', {}));case 7:res = _context2.sent;
|
|
|
|
|
|
+ if (res.errcode == '0') that.$set(that, "tableList", res.data);if (!
|
|
|
|
+ that.tableid) {_context2.next = 10;break;}_context2.next = 8;return (
|
|
|
|
+ that.$api("table/".concat(that.tableid), 'GET', {}));case 8:res = _context2.sent;
|
|
|
|
+ if (res.errcode == '0') {
|
|
|
|
+ that.$set(that.shopInfo, "table_name", res.data.name);
|
|
|
|
+ that.$set(that.shopInfo, "table", res.data._id);
|
|
|
|
+ }case 10:_context2.next = 12;return (
|
|
|
|
+
|
|
|
|
+ that.$api("shop", 'GET', {}));case 12:res = _context2.sent;
|
|
if (res.errcode == '0') {
|
|
if (res.errcode == '0') {
|
|
data = res.data[0];
|
|
data = res.data[0];
|
|
// data.table_name = that.tableList[0].name
|
|
// data.table_name = that.tableList[0].name
|
|
that.$set(that, "shopInfo", data);
|
|
that.$set(that, "shopInfo", data);
|
|
- }_context2.next = 11;return (
|
|
|
|
- that.$api("goodsTags", 'GET', {}));case 11:res = _context2.sent;
|
|
|
|
|
|
+ }_context2.next = 16;return (
|
|
|
|
+ that.$api("goodsTags", 'GET', {}));case 16:res = _context2.sent;
|
|
if (res.errcode == '0') {
|
|
if (res.errcode == '0') {
|
|
that.$set(that, "typeList", res.data);
|
|
that.$set(that, "typeList", res.data);
|
|
// 查询产品
|
|
// 查询产品
|
|
@@ -358,7 +368,7 @@ var _default =
|
|
title: res.errmsg,
|
|
title: res.errmsg,
|
|
icon: 'none' });
|
|
icon: 'none' });
|
|
|
|
|
|
- }case 13:case "end":return _context2.stop();}}}, _callee2);}))();
|
|
|
|
|
|
+ }case 18:case "end":return _context2.stop();}}}, _callee2);}))();
|
|
},
|
|
},
|
|
// 查询产品
|
|
// 查询产品
|
|
searchMarket: function searchMarket() {var _this2 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee4() {var that, res;return _regenerator.default.wrap(function _callee4$(_context4) {while (1) {switch (_context4.prev = _context4.next) {case 0:
|
|
searchMarket: function searchMarket() {var _this2 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee4() {var that, res;return _regenerator.default.wrap(function _callee4$(_context4) {while (1) {switch (_context4.prev = _context4.next) {case 0:
|