Browse Source

Merge branch 'hotfix/v4.9.17.1_ws' of qmx/jy into hotfix/v4.9.17.1

wangshan 1 year ago
parent
commit
504f69675f

+ 8 - 2
src/jfw/modules/subscribepay/src/service/invoice.go

@@ -375,14 +375,14 @@ func (this *Invoice) Showinvoice() {
 				}
 				}
 				this.ServeJson(map[string]interface{}{
 				this.ServeJson(map[string]interface{}{
 					"status":        "success",
 					"status":        "success",
-					"changed":       qutil.If(count > 0, true, false).(bool),
+					"changed":       qutil.If(count > 1, true, false).(bool),
 					"data":          data,
 					"data":          data,
 					"redSwitchInfo": redSwitchInfo,
 					"redSwitchInfo": redSwitchInfo,
 				})
 				})
 			} else {
 			} else {
 				this.ServeJson(map[string]interface{}{
 				this.ServeJson(map[string]interface{}{
 					"status":        "processing",
 					"status":        "processing",
-					"changed":       qutil.If(count > 0, true, false).(bool),
+					"changed":       qutil.If(count > 1, true, false).(bool),
 					"data":          data,
 					"data":          data,
 					"redSwitchInfo": redSwitchInfo,
 					"redSwitchInfo": redSwitchInfo,
 				})
 				})
@@ -1191,6 +1191,11 @@ func (this *Invoice) InvoiceSubmit() {
 	if !util.Mysql.ExecTx("发票信息保存", func(tx *sql.Tx) bool {
 	if !util.Mysql.ExecTx("发票信息保存", func(tx *sql.Tx) bool {
 		for orderCode, money := range orderMap {
 		for orderCode, money := range orderMap {
 			userId := GetUserId(orderCode)
 			userId := GetUserId(orderCode)
+			orderInfo := util.Mysql.FindOne("dataexport_order", map[string]interface{}{"order_code": orderCode}, "product_type,user_mail", "")
+			productType := ""
+			if orderInfo != nil {
+				productType = qutil.InterfaceToStr((*orderInfo)["product_type"])
+			}
 			data := map[string]interface{}{
 			data := map[string]interface{}{
 				"order_code":          orderCode,
 				"order_code":          orderCode,
 				"company_name":        this.GetString("company_name"),
 				"company_name":        this.GetString("company_name"),
@@ -1219,6 +1224,7 @@ func (this *Invoice) InvoiceSubmit() {
 				"bank_name":           this.GetString("bank_name"),
 				"bank_name":           this.GetString("bank_name"),
 				"recipient":           this.GetString("recipient"),
 				"recipient":           this.GetString("recipient"),
 				"delivery_address":    this.GetString("delivery_address"),
 				"delivery_address":    this.GetString("delivery_address"),
+				"product_type":        productType,
 			}
 			}
 			if util.Mysql.Insert("invoice", data) <= 0 {
 			if util.Mysql.Insert("invoice", data) <= 0 {
 				return false
 				return false

+ 10 - 10
src/web/templates/pc/check_invoice.html

@@ -134,19 +134,19 @@
     <script src="{{Msg "seo" "cdn"}}/electronic_invoice/js/jquery-2.1.4.min.js"></script>
     <script src="{{Msg "seo" "cdn"}}/electronic_invoice/js/jquery-2.1.4.min.js"></script>
     <script src="{{Msg "seo" "cdn"}}/electronic_invoice/js/bootstrap.min.js"></script>
     <script src="{{Msg "seo" "cdn"}}/electronic_invoice/js/bootstrap.min.js"></script>
     <script>
     <script>
-        $(function () {
-            $('#ruleModal').on('show.bs.modal', function () {
-                var $this = $(this);
-                var $modal_dialog = $this.find('.modal-dialog');
-                $this.css('display', 'block');
-                $modal_dialog.css({
-                    'margin-top': Math.max(0, ($(window).height() - $modal_dialog.height()) / 2)
-                });
-            });
+  $(function () {
+      $('#ruleModal').on('show.bs.modal', function () {
+          var $this = $(this);
+          var $modal_dialog = $this.find('.modal-dialog');
+          $this.css('display', 'block');
+          $modal_dialog.css({
+              'margin-top': Math.max(0, ($(window).height() - $modal_dialog.height()) / 2)
+          });
+      });
 			var order_code={{.T.order_code}};
 			var order_code={{.T.order_code}};
 			$(".order_code").text(order_code)
 			$(".order_code").text(order_code)
 			viewInvoice(order_code)
 			viewInvoice(order_code)
-			checkInvoice(order_code);
+			//checkInvoice(order_code);
 			var changed = false;
 			var changed = false;
 			var interval;
 			var interval;
 			var isOk =false;
 			var isOk =false;