Bläddra i källkod

add download status

animeic 2 år sedan
förälder
incheckning
8e8fba8c6c
3 ändrade filer med 23 tillägg och 8 borttagningar
  1. 8 1
      boxcost/api/bill-produce-excel.go
  2. 8 1
      boxcost/api/bill-purchase-excel.go
  3. 7 6
      boxcost/api/tmp.json

+ 8 - 1
boxcost/api/bill-produce-excel.go

@@ -103,7 +103,14 @@ func (b *ProduceBillExcel) drawSubTitles() error {
 
 
 	//第三行
 	//第三行
 	drawLeft(row+2, "产品名称:"+b.Content.ProductName)
 	drawLeft(row+2, "产品名称:"+b.Content.ProductName)
-	drawRight(row+2, "")
+	status := ""
+	if b.Content.Status == "complete" {
+		status = fmt.Sprintf("已完成(%d)", b.Content.ConfirmCount)
+	}
+	if b.Content.Status == "created" {
+		status = "进行中"
+	}
+	drawRight(row+2, "状态:"+status)
 	b.Excel.SetRowHeight(b.SheetName, row+2, 21)
 	b.Excel.SetRowHeight(b.SheetName, row+2, 21)
 
 
 	return nil
 	return nil

+ 8 - 1
boxcost/api/bill-purchase-excel.go

@@ -102,7 +102,14 @@ func (b *PurchaseBillExcel) drawSubTitles() error {
 
 
 	//第三行
 	//第三行
 	drawLeft(row+2, "产品名称:"+b.Content.ProductName)
 	drawLeft(row+2, "产品名称:"+b.Content.ProductName)
-	drawRight(row+2, "")
+	status := ""
+	if b.Content.Status == "complete" {
+		status = fmt.Sprintf("已完成(%d)", b.Content.ConfirmCount)
+	}
+	if b.Content.Status == "created" {
+		status = "进行中"
+	}
+	drawRight(row+2, "状态:"+status)
 	b.Excel.SetRowHeight(b.SheetName, row+2, 21)
 	b.Excel.SetRowHeight(b.SheetName, row+2, 21)
 
 
 	return nil
 	return nil

+ 7 - 6
boxcost/api/tmp.json

@@ -3,7 +3,8 @@
     "638ef5310027470dd3a42f5c": "complete",
     "638ef5310027470dd3a42f5c": "complete",
     "638ef5340027470dd3a42f5e": "complete",
     "638ef5340027470dd3a42f5e": "complete",
     "63a93b7f1e2834349334461c": "created",
     "63a93b7f1e2834349334461c": "created",
-    "63a9447dfad9189c785c7c18": "created"
+    "63a9447dfad9189c785c7c18": "created",
+    "63a94e049d209b8dfc6c95ee": "created"
   },
   },
   "plan": {
   "plan": {
     "_id": "638ef3960027470dd3a42f55",
     "_id": "638ef3960027470dd3a42f55",
@@ -145,10 +146,10 @@
                     }
                     }
                   },
                   },
                   "batchCount": 1,
                   "batchCount": 1,
-                  "batchSizeWidth": 0,
-                  "batchSizeHeight": 0,
-                  "billId": "",
-                  "remark": ""
+                  "batchSizeWidth": 20,
+                  "batchSizeHeight": 30,
+                  "billId": "63a94e049d209b8dfc6c95ee",
+                  "remark": "备注2"
                 },
                 },
                 {
                 {
                   "id": "",
                   "id": "",
@@ -453,7 +454,7 @@
     "total": 10000,
     "total": 10000,
     "status": "process",
     "status": "process",
     "totalPrice": 8033.4,
     "totalPrice": 8033.4,
-    "updateTime": "2022-12-26T07:00:18.895Z",
+    "updateTime": "2022-12-26T07:37:09.145Z",
     "createTime": "2022-12-06T07:47:34.82Z"
     "createTime": "2022-12-06T07:47:34.82Z"
   }
   }
 }
 }