pengjing 1 year ago
parent
commit
6ff38f931f

BIN
OrderSystem.App/H5/node_modules.zip


+ 1 - 1
OrderSystem.App/H5/src/app/home/detail/detail.component.html

@@ -14,7 +14,7 @@
       <div class="contract-detail-card-step">
         <div class="stepFlex">
           <div *ngFor="let status of statusList;let index = index" class="stepFlex-item">
-            <div [ngClass]="status.val < dataModel?.statusVal ? 'greenCircle' :status.val == dataModel?.statusVal ? 'now' : 'greyCircle'"></div>
+            <div [ngClass]="(status.val < dataModel?.statusVal || dataModel?.statusVal==statusList[statusList.length-1].val) ? 'greenCircle' :status.val == dataModel?.statusVal ? 'now' : 'greyCircle'"></div>
             <div *ngIf="index !== statusList.length - 1" [ngClass]="status.val < dataModel?.statusVal ? 'greenline' : 'greyline'"></div>
             <div style="margin-top:30px">{{ status.name }}</div>
           </div>

+ 12 - 4
OrderSystem.App/H5/src/app/home/home.page.html

@@ -17,19 +17,27 @@
     </div>
   </div>
   <ion-list>
-    <div style="text-align: center; color: #66696e; font-size: 20px; ">我的合同</div>
+    <div class="content-title">我的合同</div>
     <ion-item *ngFor="let item of dataList" (click)="detail(item)" class="contract-detail" detail>
       <div class="contract-detail-card">
-        <div class="contract-detail-card-title"><span>合同单号:{{item.ContractNo}}</span><span>{{item.Status}}</span></div>
+        <div class="contract-detail-card-title">
+          <span>合同单号:{{item.ContractNo}}</span>
+          <div class="contract-status">
+            <ion-icon name="ellipse" [ngStyle]="{'color':item.statusVal==6?'#31A2FE':'#25c725'}"></ion-icon>
+            <span class="contract-status-name">
+              {{item.statusVal==6?"已完成":"进行中"}}
+            </span>
+          </div>
+        </div>
         <div class="contract-detail-card-title"><span>图纸数量:{{item.Count}}</span><!--<span>详情</span>--></div>
         <div class="contract-detail-card-step">
           <div class="stepFlex">
             <div *ngFor="let status of statusList;let index = index" class="stepFlex-item">
-              <div [ngClass]="status.val < item.statusVal ? 'greenCircle' :status.val == item.statusVal ? 'now' : 'greyCircle'"></div>
+              <div [ngClass]="(status.val < item.statusVal || item.statusVal==statusList[statusList.length-1].val) ? 'greenCircle' :status.val == item.statusVal ? 'now' : 'greyCircle'"></div>
               <div *ngIf="index !== statusList.length - 1" [ngClass]="status.val < item.statusVal ? 'greenline' : 'greyline'"></div>
               <div style="margin-top:30px">{{ status.name }}</div>
             </div>
-          
+
           </div>
         </div>
       </div>

+ 20 - 0
OrderSystem.App/H5/src/app/home/home.page.scss

@@ -73,6 +73,20 @@
       display: flex;
       justify-content: space-between;
       padding: 5px;
+
+      .contract-status {
+        display: flex;
+        align-items: center;
+
+        ion-icon {
+          font-size: 10px;
+        }
+
+        .contract-status-name {
+          padding-left: 5px;
+          font-size: 14px;
+        }
+      }
     }
 
     .contract-detail-card-step {
@@ -82,3 +96,9 @@
     }
   }
 }
+
+.content-title {
+  text-align: center;
+  color: #66696e;
+  font-size: 20px;
+}

+ 2 - 2
OrderSystem.App/H5/src/app/service/config.service.ts

@@ -64,7 +64,7 @@ export class ConfigService {
         if (user) {
           ops = Object.assign(ops, {
             params: params,
-            headers: httpOptions.headers.set("userName", encodeURI(user.username)).set("logintoken", this.userService.GetToken())
+            headers: httpOptions.headers.set("userName", encodeURI(user.username)).set("authorization", 'Bearer '+this.userService.GetToken())
           });
         } else {
           ops = Object.assign(ops, {params: params}, httpOptions);
@@ -110,7 +110,7 @@ export class ConfigService {
         let ops = {};
         if (user) {
           //httpOptions.headers=httpOptions.headers.set("userName",user.username);
-          ops = {headers: httpOptions.headers.set("userName", encodeURI(user.username)).set("logintoken", this.userService.GetToken())};
+          ops = { headers: httpOptions.headers.set("userName", encodeURI(user.username)).set("authorization", 'Bearer ' +this.userService.GetToken())};
         } else {
           ops = httpOptions;
         }

+ 2 - 0
OrderSystem.Web/Controllers/OrderController.cs

@@ -1,4 +1,5 @@
 using Bowin.Common.WebModels;
+using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Mvc;
 using OrderSystem.Services;
 using System;
@@ -7,6 +8,7 @@ namespace OrderSystem.Web.Controllers
 {
     [Route("api/[controller]/[action]")]
     [ApiController]
+    [Authorize]
     public class OrderController : ControllerBase
     {
         private IOrderService OrderService { get; set; }