|
@@ -190,6 +190,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
//
|
|
|
//
|
|
|
//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
var _default =
|
|
|
{
|
|
|
data: function data() {
|
|
@@ -207,7 +213,8 @@ var _default =
|
|
|
is_bottom: false,
|
|
|
scrollTop: 0,
|
|
|
// 字典表
|
|
|
- statusList: [] };
|
|
|
+ statusList: [],
|
|
|
+ roleList: [] };
|
|
|
|
|
|
},
|
|
|
onLoad: function onLoad(e) {
|
|
@@ -278,7 +285,8 @@ var _default =
|
|
|
if (res.errcode == '0') {
|
|
|
list = [].concat(_toConsumableArray(that.list), _toConsumableArray(res.data));_iterator = _createForOfIteratorHelper(
|
|
|
list);try {for (_iterator.s(); !(_step = _iterator.n()).done;) {val = _step.value;
|
|
|
- val.zhStatus = that.searchStatus(val.status);
|
|
|
+ val.zhStatus = that.searchDict(val.status, 'status');
|
|
|
+ val.zhRole = that.searchDict(val.user_role, 'role');
|
|
|
}} catch (err) {_iterator.e(err);} finally {_iterator.f();}
|
|
|
that.$set(that, "list", list);
|
|
|
that.$set(that, "total", res.total);
|
|
@@ -295,12 +303,19 @@ var _default =
|
|
|
url: "/pagesMy/order/detail?id=".concat(e.id || e._id) });
|
|
|
|
|
|
},
|
|
|
- // 查询状态
|
|
|
- searchStatus: function searchStatus(e) {
|
|
|
+ // 查询字典表
|
|
|
+ searchDict: function searchDict(e, model) {
|
|
|
var that = this;
|
|
|
- var data = that.statusList.find(function (i) {return i.value == e;});
|
|
|
- if (data) return data.label;else
|
|
|
- return '暂无';
|
|
|
+ var data;
|
|
|
+ if (model == 'status') {
|
|
|
+ data = that.statusList.find(function (i) {return i.value == e;});
|
|
|
+ if (data) return data.label;else
|
|
|
+ return '暂无';
|
|
|
+ } else if (model == 'role') {
|
|
|
+ data = that.roleList.find(function (i) {return i.code == e;});
|
|
|
+ if (data) return data.name;else
|
|
|
+ return '暂无';
|
|
|
+ }
|
|
|
},
|
|
|
// 审核
|
|
|
toExam: function toExam(item, type) {var _this2 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee5() {var that, user, obj;return _regenerator.default.wrap(function _callee5$(_context5) {while (1) {switch (_context5.prev = _context5.next) {case 0:
|
|
@@ -380,7 +395,12 @@ var _default =
|
|
|
type: 'order_status',
|
|
|
is_use: '0' }));case 3:res = _context6.sent;
|
|
|
|
|
|
- if (res.errcode == '0') that.$set(that, "statusList", res.data);case 5:case "end":return _context6.stop();}}}, _callee6);}))();
|
|
|
+ if (res.errcode == '0') that.$set(that, "statusList", res.data);
|
|
|
+ // 查询角色
|
|
|
+ _context6.next = 7;return that.$api("/Role", 'GET', {
|
|
|
+ is_use: '0' });case 7:res = _context6.sent;
|
|
|
+
|
|
|
+ if (res.errcode == '0') that.$set(that, "roleList", res.data);case 9:case "end":return _context6.stop();}}}, _callee6);}))();
|
|
|
},
|
|
|
// 清空列表
|
|
|
clearPage: function clearPage() {
|