From 110a0c905bf1acb233f372d8441e103e224717de Mon Sep 17 00:00:00 2001
From: hurui <177768073@qq.com>
Date: Wed, 1 Jun 2022 11:21:24 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../store-edit/store-edit.component.html | 16 ++++++++++++++++
.../store-edit/store-edit.component.scss | 4 ++++
.../store-edit/store-edit.component.ts | 19 +++++++++++++++++++
3 files changed, 39 insertions(+)
diff --git a/src/app/admin/merchant-store/store-edit/store-edit.component.html b/src/app/admin/merchant-store/store-edit/store-edit.component.html
index 5777f41..fcbdfde 100644
--- a/src/app/admin/merchant-store/store-edit/store-edit.component.html
+++ b/src/app/admin/merchant-store/store-edit/store-edit.component.html
@@ -46,6 +46,22 @@
+
@@ -117,6 +130,8 @@
团油枪价 |
创建时间 |
支付时间 |
+
订单状态 |
+
退款时间 |
操作 |
@@ -139,6 +154,13 @@
{{data.gasPriceGun}}元 |
{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} |
{{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}} |
+
+ 已完成
+ 已退款
+ 退款中
+ 退款驳回
+ |
+
{{data.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}} |
操作列表
diff --git a/src/app/admin/tuanyou-agent/order/ty-order-list/ty-order-list.component.ts b/src/app/admin/tuanyou-agent/order/ty-order-list/ty-order-list.component.ts
index 38cd5ec..cbc8d58 100644
--- a/src/app/admin/tuanyou-agent/order/ty-order-list/ty-order-list.component.ts
+++ b/src/app/admin/tuanyou-agent/order/ty-order-list/ty-order-list.component.ts
@@ -53,6 +53,7 @@ export class TyOrderListComponent implements OnInit {
salesmanId: [null],
memPhone: [null],
payTimeArray: [null],
+ orderStatus: [null],
});
this.requestData(1);
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 8ebb4f1..c0bc8fa 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -4,10 +4,10 @@
export const environment = {
production: false,
- baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
- imageUrl: 'http://localhost:9302/filesystem/',
-/* baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
- imageUrl: 'https://hsg.dctpay.com/filesystem/',*/
+/* baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
+ imageUrl: 'http://localhost:9302/filesystem/',*/
+ baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
+ imageUrl: 'https://hsg.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',
};
From e0fd00cc7ad154ad9e897adf2ad00285a9eefc50 Mon Sep 17 00:00:00 2001
From: hurui <177768073@qq.com>
Date: Thu, 2 Jun 2022 17:43:45 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../oil-station-order.component.html | 219 +++++++++++-------
.../oil-station-order.component.ts | 132 +++++++++--
src/environments/environment.ts | 4 +-
tsconfig.json | 3 +-
4 files changed, 260 insertions(+), 98 deletions(-)
diff --git a/src/app/admin/order/oil-station-order/oil-station-order.component.html b/src/app/admin/order/oil-station-order/oil-station-order.component.html
index 01f2c81..b160fc1 100644
--- a/src/app/admin/order/oil-station-order/oil-station-order.component.html
+++ b/src/app/admin/order/oil-station-order/oil-station-order.component.html
@@ -110,7 +110,7 @@
{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
{{data.status | orderCouponStatus}} |
-
+ 打印小票
操作列表
@@ -159,82 +159,143 @@
-
-
-
-
+
diff --git a/src/app/admin/order/oil-station-order/oil-station-order.component.ts b/src/app/admin/order/oil-station-order/oil-station-order.component.ts
index 0ef5a56..8f56b9f 100644
--- a/src/app/admin/order/oil-station-order/oil-station-order.component.ts
+++ b/src/app/admin/order/oil-station-order/oil-station-order.component.ts
@@ -10,7 +10,7 @@ import {MerchantService} from '../../../services/merchant.service';
import {LocalStorageService} from '../../../services/local-storage.service';
import {CommonsService} from '../../../services/commons.service';
import {WebsocketService} from '../../../services/websocket.service';
-import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace";
+import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
@Component({
selector: 'app-oil-station-order',
@@ -37,9 +37,15 @@ export class OilStationOrderComponent implements OnInit {
roleType: number;
secUser: object;
-
- printModal = false;
- printData = {};
+ printDataObject: PrintData = {
+ gasName: '',
+ orderNo: '',
+ createTime: '',
+ gasOilNo: '',
+ gasGunNo: '',
+ gasOilLiters: 0,
+ oilPrice: 0
+ };
constructor(
private form: FormBuilder,
@@ -158,19 +164,113 @@ export class OilStationOrderComponent implements OnInit {
});
}
- /**
- * 打开打印小票模态框
- */
- showPrintModal(data: object) {
- this.printData = data;
- this.printModal = true;
+ showPrintDiv(data: PrintData) {
+ data['createTime'] = new Date(data['createTime']).toLocaleString();
+ this.printDiv(data);
}
- /**
- * 关闭打印小票模态框
- */
- closePrintModal() {
- this.printData = {};
- this.printModal = false;
+ printDiv(data: object) {
+ const headstr = ' 打印小票';
+ const footstr = '';
+ const newstr = ' \n' +
+ ' \n' +
+ ' \n' +
+ ' ' + data['gasName'] + '\n' +
+ ' (客户存根)\n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' --------------------------------------------------- | \n' +
+ ' \n' +
+ ' 流水号:' + data['orderNo'] + ' | \n' +
+ ' \n' +
+ ' --------------------------------------------------- | \n' +
+ ' \n' +
+ ' 时间:' + data['createTime'] + ' | \n' +
+ ' \n' +
+ ' \n' +
+ ' 来源:嗨森逛 | \n' +
+ ' \n' +
+ ' \n' +
+ ' 油枪:' + data['gasGunNo'] + ' | \n' +
+ ' \n' +
+ ' \n' +
+ ' 油品:' + data['gasOilNo'] + ' | \n' +
+ ' \n' +
+ ' \n' +
+ ' 升数:' + data['gasOilLiters'] + '升 | \n' +
+ ' \n' +
+ ' \n' +
+ ' 实际加油升数以油站加油机为准! | \n' +
+ ' \n' +
+ ' 加油金额 | \n' +
+ ' ¥' + data['totalPrice'] + '元 | \n' +
+ ' --------------------------------------------------- | \n' +
+ ' 开心又省钱; 来”嗨森逛“ | \n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' ' + data['gasName'] + '\n' +
+ ' (收银员存根)\n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' --------------------------------------------------- | \n' +
+ ' \n' +
+ ' 流水号:' + data['orderNo'] + ' | \n' +
+ ' \n' +
+ ' --------------------------------------------------- | \n' +
+ ' \n' +
+ ' 时间:' + data['createTime'] + ' | \n' +
+ ' \n' +
+ ' \n' +
+ ' 嗨森逛 | \n' +
+ ' \n' +
+ ' \n' +
+ ' 油枪:' + data['gasGunNo'] + ' | \n' +
+ ' \n' +
+ ' \n' +
+ ' 油品:' + data['gasOilNo'] + ' | \n' +
+ ' \n' +
+ ' \n' +
+ ' 升数:' + data['gasOilLiters'] + '升 | \n' +
+ ' \n' +
+ ' \n' +
+ ' 实际加油升数以油站加油机为准! | \n' +
+ ' \n' +
+ ' 加油金额 | \n' +
+ ' ¥' + data['totalPrice'] + '元 | \n' +
+ ' --------------------------------------------------- | \n' +
+ ' 开心又省钱; 来”嗨森逛“ | \n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' ';
+ console.log(newstr);
+ // const oldstr = document.body.innerHTML;
+ document.body.innerHTML = headstr + newstr + footstr;
+ window.print();
+ // document.body.innerHTML = oldstr;
+ location.reload();
+ return false;
}
}
+
+export class PrintData {
+ // 油站名称
+ gasName = '';
+ // 订单号
+ orderNo = '';
+ // 下单时间
+ createTime = '';
+ // 油品
+ gasOilNo = '';
+ // 加油抢号
+ gasGunNo = '';
+ // 加油升数
+ gasOilLiters = 0;
+ // 加油金额
+ oilPrice = 0;
+}
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index c0bc8fa..ca22a39 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -6,8 +6,8 @@ export const environment = {
production: false,
/* baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://localhost:9302/filesystem/',*/
- baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
- imageUrl: 'https://hsg.dctpay.com/filesystem/',
+ baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
+ imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',
};
diff --git a/tsconfig.json b/tsconfig.json
index 9ddd180..0d19327 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -16,7 +16,8 @@
],
"lib": [
"es2018",
- "dom"
+ "dom",
+ "scripthost"
],
"allowSyntheticDefaultImports": true
},
From ce0cb0f91b7922ce33e6c2b9f7af8a08b39a7983 Mon Sep 17 00:00:00 2001
From: hurui <177768073@qq.com>
Date: Mon, 6 Jun 2022 11:05:16 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../oil-station-order.component.html | 3 +-
.../oil-station-order.component.ts | 65 +++++++++++--------
src/app/services/order.service.ts | 13 ++++
src/environments/environment.ts | 8 +--
4 files changed, 56 insertions(+), 33 deletions(-)
diff --git a/src/app/admin/order/oil-station-order/oil-station-order.component.html b/src/app/admin/order/oil-station-order/oil-station-order.component.html
index b160fc1..4ab5db6 100644
--- a/src/app/admin/order/oil-station-order/oil-station-order.component.html
+++ b/src/app/admin/order/oil-station-order/oil-station-order.component.html
@@ -110,7 +110,8 @@
{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
{{data.status | orderCouponStatus}} |
- 打印小票
+ 打印小票
+ 已打印({{data.printNum+'次'}})
操作列表
diff --git a/src/app/admin/order/oil-station-order/oil-station-order.component.ts b/src/app/admin/order/oil-station-order/oil-station-order.component.ts
index 8f56b9f..ce79676 100644
--- a/src/app/admin/order/oil-station-order/oil-station-order.component.ts
+++ b/src/app/admin/order/oil-station-order/oil-station-order.component.ts
@@ -56,6 +56,7 @@ export class OilStationOrderComponent implements OnInit {
private router: Router,
private company: CompanyService,
private merchant: MerchantService,
+ private orderService: OrderService,
private store: LocalStorageService, // 数据请求
private common: CommonsService
) {
@@ -164,15 +165,21 @@ export class OilStationOrderComponent implements OnInit {
});
}
- showPrintDiv(data: PrintData) {
+ showPrintDiv(orderId: number, data: PrintData) {
data['createTime'] = new Date(data['createTime']).toLocaleString();
this.printDiv(data);
+
+ this.orderService.print(orderId, dataBack => {
+ if (dataBack['return_code'] === '000000') {
+ this.getRequest(false, this.searchForm.value);
+ }
+ });
}
printDiv(data: object) {
const headstr = '打印小票';
const footstr = '';
- const newstr = '\n' +
+ const newstr = ' \n' +
' \n' +
' \n' +
' ' + data['gasName'] + '\n' +
@@ -180,33 +187,33 @@ export class OilStationOrderComponent implements OnInit {
' \n' +
' \n' +
' \n' +
- ' --------------------------------------------------- | \n' +
+ ' ------------------------------------------- | \n' +
' \n' +
- ' 流水号:' + data['orderNo'] + ' | \n' +
+ ' 流水号:' + data['orderNo'] + ' | \n' +
' \n' +
- ' --------------------------------------------------- | \n' +
+ ' ------------------------------------------- | \n' +
' \n' +
- ' 时间:' + data['createTime'] + ' | \n' +
+ ' 时间:' + data['createTime'] + ' | \n' +
' \n' +
' \n' +
- ' 来源:嗨森逛 | \n' +
+ ' 来源:嗨森逛 | \n' +
' \n' +
' \n' +
- ' 油枪:' + data['gasGunNo'] + ' | \n' +
+ ' 油枪:' + data['gasGunNo'] + ' | \n' +
' \n' +
' \n' +
- ' 油品:' + data['gasOilNo'] + ' | \n' +
+ ' 油品:' + data['gasOilNo'] + ' | \n' +
' \n' +
' \n' +
- ' 升数:' + data['gasOilLiters'] + '升 | \n' +
+ ' 升数:' + data['gasOilLiters'] + '升 | \n' +
' \n' +
' \n' +
- ' 实际加油升数以油站加油机为准! | \n' +
+ ' 实际加油升数以油站加油机为准! | \n' +
' \n' +
' 加油金额 | \n' +
' ¥' + data['totalPrice'] + '元 | \n' +
- ' --------------------------------------------------- | \n' +
- ' 开心又省钱; 来”嗨森逛“ | \n' +
+ ' ------------------------------------------- | \n' +
+ ' 开心又省钱; 来”嗨森逛“ | \n' +
' \n' +
' \n' +
' \n' +
@@ -217,43 +224,45 @@ export class OilStationOrderComponent implements OnInit {
' \n' +
' \n' +
' \n' +
- ' --------------------------------------------------- | \n' +
+ ' ------------------------------------------- | \n' +
' \n' +
- ' 流水号:' + data['orderNo'] + ' | \n' +
+ ' 流水号:' + data['orderNo'] + ' | \n' +
' \n' +
- ' --------------------------------------------------- | \n' +
+ ' ------------------------------------------- | \n' +
' \n' +
- ' 时间:' + data['createTime'] + ' | \n' +
+ ' 时间:' + data['createTime'] + ' | \n' +
' \n' +
' \n' +
- ' 嗨森逛 | \n' +
+ ' 来源:嗨森逛 | \n' +
' \n' +
' \n' +
- ' 油枪:' + data['gasGunNo'] + ' | \n' +
+ ' 油枪:' + data['gasGunNo'] + ' | \n' +
' \n' +
' \n' +
- ' 油品:' + data['gasOilNo'] + ' | \n' +
+ ' 油品:' + data['gasOilNo'] + ' | \n' +
' \n' +
' \n' +
- ' 升数:' + data['gasOilLiters'] + '升 | \n' +
+ ' 升数:' + data['gasOilLiters'] + '升 | \n' +
' \n' +
' \n' +
- ' 实际加油升数以油站加油机为准! | \n' +
+ ' 实际加油升数以油站加油机为准! | \n' +
' \n' +
' 加油金额 | \n' +
' ¥' + data['totalPrice'] + '元 | \n' +
- ' --------------------------------------------------- | \n' +
- ' 开心又省钱; 来”嗨森逛“ | \n' +
+ ' ------------------------------------------- | \n' +
+ ' 开心又省钱; 来”嗨森逛“ | \n' +
' \n' +
' \n' +
' \n' +
'';
- console.log(newstr);
// const oldstr = document.body.innerHTML;
- document.body.innerHTML = headstr + newstr + footstr;
- window.print();
+ // document.body.innerHTML = headstr + newstr + footstr;
+ const newWindow = window.open('', '');
+ newWindow.document.write(headstr + newstr + footstr);
+ newWindow.print();
+ newWindow.close();
// document.body.innerHTML = oldstr;
- location.reload();
+ // location.reload();
return false;
}
}
diff --git a/src/app/services/order.service.ts b/src/app/services/order.service.ts
index fe68ecf..b6613fc 100644
--- a/src/app/services/order.service.ts
+++ b/src/app/services/order.service.ts
@@ -14,6 +14,19 @@ export class OrderService {
) {
}
+ /**
+ * 打印
+ *
+ * @param paramsObject 对象
+ * @param callBack 回调
+ */
+ public print(orderId: number, callBack) {
+ this.http.get(environment.baseUrl + 'highOrder/print?orderId=' + orderId).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+
/**
* 查询订单列表
*
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index ca22a39..0f97376 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -4,10 +4,10 @@
export const environment = {
production: false,
-/* baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
- imageUrl: 'http://localhost:9302/filesystem/',*/
- baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
- imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
+ baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
+ imageUrl: 'http://localhost:9302/filesystem/',
+/* baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
+ imageUrl: 'https://hsgcs.dctpay.com/filesystem/',*/
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',
};
From d7fb86ad154d9f91e95a1700a14db5c5e921eed0 Mon Sep 17 00:00:00 2001
From: hurui <177768073@qq.com>
Date: Mon, 6 Jun 2022 15:14:36 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A2=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../oil-station-order.component.html | 16 ++++++++++++---
.../oil-station-order.component.ts | 20 ++++++++++---------
2 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/src/app/admin/order/oil-station-order/oil-station-order.component.html b/src/app/admin/order/oil-station-order/oil-station-order.component.html
index 4ab5db6..56e9a80 100644
--- a/src/app/admin/order/oil-station-order/oil-station-order.component.html
+++ b/src/app/admin/order/oil-station-order/oil-station-order.component.html
@@ -6,6 +6,16 @@
| | |