|
@@ -2070,7 +2070,6 @@ func (c StockTemplateController) TransportRecordPdf(reqData models.TransportReco
|
|
|
utils.RectFillColorMultiCell(pdf, header2[i], 9, x, y, cols2[i], h, 0, 0, 0, gopdf.Center, gopdf.Middle)
|
|
|
x += cols2[i]
|
|
|
}
|
|
|
- y = pdf.GetY()
|
|
|
y += h
|
|
|
pdf.SetNewY(y, h)
|
|
|
if pdf.GetY() < 30 {
|
|
@@ -2140,6 +2139,7 @@ func (c StockTemplateController) TransportRecordPdf(reqData models.TransportReco
|
|
|
pdf.SetY(30)
|
|
|
}
|
|
|
pdf.SetX(curx)
|
|
|
+ pdf.SetFont("simsun", "", 10)
|
|
|
pdf.Text("启运至到达行驶里程数:_________千米")
|
|
|
|
|
|
y = pdf.GetY()
|
|
@@ -2831,6 +2831,7 @@ func (c StockTemplateController) StockRefundOutTransportRecordPdf(reqData models
|
|
|
pdf.SetY(30)
|
|
|
}
|
|
|
pdf.SetX(curx)
|
|
|
+ pdf.SetFont("simsun", "", 10)
|
|
|
pdf.Text("运输温度记录:")
|
|
|
header2 := []string{"项目", "日期/时间", "储存温度", "冰排状态", "环境温度"}
|
|
|
cols2 := []float64{55, 210, 105, 94, 91}
|
|
@@ -2844,17 +2845,19 @@ func (c StockTemplateController) StockRefundOutTransportRecordPdf(reqData models
|
|
|
y = pdf.GetY()
|
|
|
pdf.SetX(curx)
|
|
|
x = curx
|
|
|
+ pdf.SetFont("simsun", "", 9)
|
|
|
for i := 0; i < len(header2); i++ {
|
|
|
utils.RectFillColorMultiCell(pdf, header2[i], 9, x, y, cols2[i], h, 0, 0, 0, gopdf.Center, gopdf.Middle)
|
|
|
x += cols2[i]
|
|
|
}
|
|
|
- y = pdf.GetY()
|
|
|
y += h
|
|
|
pdf.SetNewY(y, h)
|
|
|
if pdf.GetY() < 30 {
|
|
|
pdf.SetY(30)
|
|
|
}
|
|
|
pdf.SetX(curx)
|
|
|
+ pdf.SetFont("simsun", "", 9)
|
|
|
+
|
|
|
row2 := [][]string{
|
|
|
{"启运", "______年___月___日___时___分", "________℃", "", "________℃"},
|
|
|
{"途中", "______年___月___日___时___分", "________℃", "————", "________℃"},
|
|
@@ -2918,6 +2921,8 @@ func (c StockTemplateController) StockRefundOutTransportRecordPdf(reqData models
|
|
|
pdf.SetY(30)
|
|
|
}
|
|
|
pdf.SetX(curx)
|
|
|
+ pdf.SetFont("simsun", "", 10)
|
|
|
+
|
|
|
pdf.Text("启运至到达行驶里程数:_________千米")
|
|
|
|
|
|
y = pdf.GetY()
|
|
@@ -3072,6 +3077,32 @@ func (c StockTemplateController) StockRefundOutTransportRecordExport() {
|
|
|
|
|
|
}
|
|
|
|
|
|
+// TransportRecordExport 运输记录表
|
|
|
+// @Summary 收发登记表word
|
|
|
+// @Description 收发登记表word
|
|
|
+// @Tags 库存
|
|
|
+// @Param body body dto.TransportRecordWordReq true "body"
|
|
|
+// @Success 200 {object} response.Page "{"code": 200, "data": [...]}"
|
|
|
+// @Router /stock-template/inventory/list [post]
|
|
|
+// @Security Bearer
|
|
|
+func (c StockTemplateController) StockRefundOutTransportRecordExportList() {
|
|
|
+ s := services.StockTemplate{}
|
|
|
+ reqData := models.TransportRecord{}
|
|
|
+ if err := c.ParseAndValidate(&c.Ctx.Input.RequestBody, &reqData); err != nil {
|
|
|
+ c.Error(global.ParseFormErr, err, err.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ deptId := beegouser.GetDeptId(c.Ctx)
|
|
|
+ models.InitBasicData(deptId)
|
|
|
+
|
|
|
+ list, err := s.StockRefundOutTransportRecordPdf(&reqData, deptId)
|
|
|
+ if err != nil {
|
|
|
+ c.Error(500, err, err.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ c.PageOK(list, 0, 0, 0, "查询成功")
|
|
|
+}
|
|
|
+
|
|
|
func (c StockTemplateController) GetRefundOutBarCodeInfo() {
|
|
|
barcodeSvc := services.Barcode{}
|
|
|
s := services.StockTemplate{}
|
|
@@ -3236,6 +3267,10 @@ func (c StockTemplateController) StockRefundOutExport() {
|
|
|
pdf.SetY(60)
|
|
|
pdf.Text(code)
|
|
|
|
|
|
+ imgPath2 := "ofile/img/" + code + ".jpg"
|
|
|
+ png2j.Con2jpg(imgPath, imgPath2)
|
|
|
+ pdf.Image(imgPath2, 640, 15, &gopdf.Rect{W: 200, H: 35})
|
|
|
+
|
|
|
titleStr := reqData.DeptName + "退货单"
|
|
|
pdf.SetFont("simsun", "", 25)
|
|
|
textw, _ := pdf.MeasureTextWidth(titleStr)
|