zs 1 year ago
parent
commit
c461c7e745

+ 12 - 4
pagesMy/buyExamine/index.vue

@@ -34,13 +34,16 @@
 								</view>
 								<view class="right_2">
 									<view class="spec textOver">
-										<text>规格:{{item.spec_name||'暂无'}}</text>
+										<text>规格:</text>
+										<text>{{item.spec_name||'暂无'}}</text>
 									</view>
 									<view class="spec textOver">
-										<text>购买用户:{{item.user_name||'暂无'}}</text>
+										<text>购买用户:</text>
+										<text>{{item.user_name||'暂无'}}</text>
 									</view>
 									<view class="spec textOver">
-										<text>用户角色:{{item.zhRole||'暂无'}}</text>
+										<text>用户角色:</text>
+										<text>{{item.zhRole||'暂无'}}</text>
 									</view>
 								</view>
 							</view>
@@ -356,7 +359,12 @@
 
 						.right_2 {
 							font-size: var(--font12Size);
-							color: var(--f85Color);
+						
+							.spec {
+								text:first-child {
+									color: var(--f85Color);
+								}
+							}
 						}
 					}
 				}

+ 35 - 10
pagesMy/collectionExamin/index.vue

@@ -34,10 +34,16 @@
 								</view>
 								<view class="right_2">
 									<view class="spec textOver">
-										<text>规格:{{item.spec_name||'暂无'}}</text>
+										<text>规格:</text>
+										<text>{{item.spec_name||'暂无'}}</text>
 									</view>
 									<view class="spec textOver">
-										<text>购买用户:{{item.user_name||'暂无'}}</text>
+										<text>购买用户:</text>
+										<text>{{item.user_name||'暂无'}}</text>
+									</view>
+									<view class="spec textOver">
+										<text>用户角色:</text>
+										<text>{{item.zhRole||'暂无'}}</text>
 									</view>
 								</view>
 							</view>
@@ -74,6 +80,7 @@
 				scrollTop: 0,
 				// 字典表
 				statusList: [],
+				roleList: []
 			}
 		},
 		onLoad: function(e) {
@@ -144,7 +151,8 @@
 				if (res.errcode == '0') {
 					let list = [...that.list, ...res.data];
 					for (let val of list) {
-						val.zhStatus = that.searchStatus(val.status)
+						val.zhStatus = that.searchDict(val.status, 'status')
+						val.zhRole = that.searchDict(val.user_role, 'role')
 					}
 					that.$set(that, `list`, list);
 					that.$set(that, `total`, res.total)
@@ -161,12 +169,19 @@
 					url: `/pagesMy/order/detail?id=${e.id||e._id}`
 				})
 			},
-			// 查询状态
-			searchStatus(e) {
+			// 查询字典表
+			searchDict(e, model) {
 				const that = this;
-				let data = that.statusList.find((i) => i.value == e);
-				if (data) return data.label
-				else return '暂无'
+				let data
+				if (model == 'status') {
+					data = that.statusList.find((i) => i.value == e);
+					if (data) return data.label
+					else return '暂无'
+				} else if (model == 'role') {
+					data = that.roleList.find((i) => i.code == e);
+					if (data) return data.name
+					else return '暂无'
+				}
 			},
 			// 审核
 			async toExam(item, type) {
@@ -247,6 +262,11 @@
 					is_use: '0',
 				})
 				if (res.errcode == '0') that.$set(that, `statusList`, res.data);
+				// 查询角色
+				res = await that.$api(`/Role`, 'GET', {
+					is_use: '0',
+				})
+				if (res.errcode == '0') that.$set(that, `roleList`, res.data);
 			},
 			// 清空列表
 			clearPage() {
@@ -295,7 +315,7 @@
 					justify-content: space-between;
 					padding: 2vw 0;
 					font-size: var(--font16Size);
-				
+
 					.status {
 						font-size: var(--font14Size);
 						color: var(--fF0Color);
@@ -340,7 +360,12 @@
 
 						.right_2 {
 							font-size: var(--font12Size);
-							color: var(--f85Color);
+
+							.spec {
+								text:first-child {
+									color: var(--f85Color);
+								}
+							}
 						}
 					}
 				}

+ 2 - 2
pagesMy/order/detail.vue

@@ -43,11 +43,11 @@
 				<text>下单时间:</text>
 				<text>{{info.buy_time||'暂无'}}</text>
 			</view>
-			<view class="two_1">
+			<view class="two_1" v-if="info.leader_name">
 				<text>采购审批领导:</text>
 				<text>{{info.leader_name||'暂无'}}</text>
 			</view>
-			<view class="two_1">
+			<view class="two_1" v-if="info.accounting_name">
 				<text>采购审批会计:</text>
 				<text>{{info.accounting_name||'暂无'}}</text>
 			</view>

+ 34 - 9
pagesMy/order/order.vue

@@ -34,10 +34,16 @@
 								</view>
 								<view class="right_2">
 									<view class="spec textOver">
-										<text>规格:{{item.spec_name||'暂无'}}</text>
+										<text>规格:</text>
+										<text>{{item.spec_name||'暂无'}}</text>
 									</view>
 									<view class="spec textOver">
-										<text>购买用户:{{item.user_name||'暂无'}}</text>
+										<text>购买用户:</text>
+										<text>{{item.user_name||'暂无'}}</text>
+									</view>
+									<view class="spec textOver">
+										<text>用户角色:</text>
+										<text>{{item.zhRole||'暂无'}}</text>
 									</view>
 								</view>
 							</view>
@@ -73,6 +79,7 @@
 				scrollTop: 0,
 				// 字典表
 				statusList: [],
+				roleList: []
 			}
 		},
 		onLoad: function(e) {
@@ -138,7 +145,8 @@
 				if (res.errcode == '0') {
 					let list = [...that.list, ...res.data];
 					for (let val of list) {
-						val.zhStatus = that.searchStatus(val.status)
+						val.zhStatus = that.searchDict(val.status, 'status')
+						val.zhRole = that.searchDict(val.user_role, 'role')
 					}
 					that.$set(that, `list`, list);
 					that.$set(that, `total`, res.total)
@@ -155,12 +163,19 @@
 					url: `/pagesMy/order/detail?id=${e.id||e._id}`
 				})
 			},
-			// 查询状态
-			searchStatus(e) {
+			// 查询字典表
+			searchDict(e, model) {
 				const that = this;
-				let data = that.statusList.find((i) => i.value == e);
-				if (data) return data.label
-				else return '暂无'
+				let data
+				if (model == 'status') {
+					data = that.statusList.find((i) => i.value == e);
+					if (data) return data.label
+					else return '暂无'
+				} else if (model == 'role') {
+					data = that.roleList.find((i) => i.code == e);
+					if (data) return data.name
+					else return '暂无'
+				}
 			},
 			// 确认发货
 			async toConfirm(item) {
@@ -236,6 +251,11 @@
 					is_use: '0',
 				})
 				if (res.errcode == '0') that.$set(that, `statusList`, res.data);
+				// 查询角色
+				res = await that.$api(`/Role`, 'GET', {
+					is_use: '0',
+				})
+				if (res.errcode == '0') that.$set(that, `roleList`, res.data);
 			},
 			// 清空列表
 			clearPage() {
@@ -328,7 +348,12 @@
 
 						.right_2 {
 							font-size: var(--font12Size);
-							color: var(--f85Color);
+						
+							.spec {
+								text:first-child {
+									color: var(--f85Color);
+								}
+							}
 						}
 					}
 				}

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/buyExamine/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/collectionExamin/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/order/detail.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pagesMy/order/order.js.map


+ 3 - 0
unpackage/dist/dev/mp-weixin/pagesMy/buyExamine/index.js

@@ -193,6 +193,9 @@ __webpack_require__.r(__webpack_exports__);
 //
 //
 //
+//
+//
+//
 var _default =
 {
   data: function data() {

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesMy/buyExamine/index.wxml


+ 2 - 0
unpackage/dist/dev/mp-weixin/pagesMy/buyExamine/index.wxss

@@ -69,6 +69,8 @@
 }
 .content .two .list .list_2 .right .right_2 {
   font-size: var(--font12Size);
+}
+.content .two .list .list_2 .right .right_2 .spec text:first-child {
   color: var(--f85Color);
 }
 .content .two .list .bottom {

+ 28 - 8
unpackage/dist/dev/mp-weixin/pagesMy/collectionExamin/index.js

@@ -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() {

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesMy/collectionExamin/index.wxml


+ 2 - 0
unpackage/dist/dev/mp-weixin/pagesMy/collectionExamin/index.wxss

@@ -69,6 +69,8 @@
 }
 .content .two .list .list_2 .right .right_2 {
   font-size: var(--font12Size);
+}
+.content .two .list .list_2 .right .right_2 .spec text:first-child {
   color: var(--f85Color);
 }
 .content .two .list .bottom {

File diff suppressed because it is too large
+ 16 - 16
unpackage/dist/dev/mp-weixin/pagesMy/order/detail.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesMy/order/detail.wxml


+ 28 - 8
unpackage/dist/dev/mp-weixin/pagesMy/order/order.js

@@ -189,6 +189,12 @@ __webpack_require__.r(__webpack_exports__);
 //
 //
 //
+//
+//
+//
+//
+//
+//
 var _default =
 {
   data: function data() {
@@ -206,7 +212,8 @@ var _default =
       is_bottom: false,
       scrollTop: 0,
       // 字典表
-      statusList: [] };
+      statusList: [],
+      roleList: [] };
 
   },
   onLoad: function onLoad(e) {
@@ -272,7 +279,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);
@@ -289,12 +297,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 '暂无';
+      }
     },
     // 确认发货
     toConfirm: function toConfirm(item) {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:
@@ -369,7 +384,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() {

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesMy/order/order.wxml


+ 2 - 0
unpackage/dist/dev/mp-weixin/pagesMy/order/order.wxss

@@ -68,6 +68,8 @@
 }
 .content .two .list .list_2 .right .right_2 {
   font-size: var(--font12Size);
+}
+.content .two .list .list_2 .right .right_2 .spec text:first-child {
   color: var(--f85Color);
 }
 .content .two .list .bottom {