From 2ea83048e7f11eb9a453da7371f9b3719a323fad Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期五, 15 九月 2023 09:52:40 +0800
Subject: [PATCH] 煤炭增加操作指引,增加打印入门证出门证
---
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 73 +++++++++++++++++++++++++++++++++---
1 files changed, 66 insertions(+), 7 deletions(-)
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
index 1c3474e..e5ea6f9 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -103,6 +103,24 @@
</view>
</view>
<view class="weigh-ability">
+ <view class="weigh-button"
+ v-show='ablePrintInduction'>
+ <u-button text="鎵撳嵃鍏ラ棬璇�"
+ @click="printEntryCertificate"
+ type="primary"
+ shape="circle"
+ :loading="enterLoading"
+ loadingText="鎵撳嵃涓�,璇风◢鍊�"></u-button>
+ </view>
+ <view class="weigh-button"
+ v-show="ablePrintOut">
+ <u-button text="鎵撳嵃鍑洪棬璇�"
+ @click="printExitPermit"
+ type="primary"
+ shape="circle"
+ :loading="outLoading"
+ loadingText="鎵撳嵃涓�,璇风◢鍊�"></u-button>
+ </view>
<view class="weigh-button"><u-button text="灞曠ず鎻愮叅鍗�"
@click="showCaolPickUpBill"
type="primary"
@@ -153,7 +171,6 @@
},
onShow() {
this.init();
-
},
data() {
return {
@@ -221,7 +238,11 @@
completeOutSaleShow: false,
overTmWaixiao: null,
list: [{ name: '鎵嬫満鍙�', subname: '1213456', id: 1 }, { name: '寰俊璇煶', id: 2 }], //鍛煎彨瀹㈡湇閫夐」
- servieceShow: false
+ servieceShow: false,
+ ablePrintInduction: false, //鍏ラ棬璇佹槸鍚︽樉绀�
+ ablePrintOut: false, //鍑洪棬璇佹槸鍚︽樉绀�
+ enterLoading: false, //鍏ラ棬鎸夐挳loading
+ outLoading: false, //鍑洪棬鎸夐挳loading
};
},
onHide() {
@@ -329,6 +350,9 @@
this.primarySkin = this.coalDetailsData.skinTwo;
this.primaryHair = this.coalDetailsData.hairTwo;
this.primaryClean = this.coalDetailsData.cleanTwo;
+ // 鍏ラ棬璇� 鍜� 鍑洪棬璇� 鏄惁鏄剧ず
+ this.ablePrintInduction = this.coalDetailsData.hair || this.coalDetailsData.skin
+ this.ablePrintOut = this.coalDetailsData.hair && this.coalDetailsData.skin
} else {
this.$u.toast('鍔犺浇澶辫触');
}
@@ -515,6 +539,38 @@
completeOutSaleCancel() {
this.completeOutSaleShow = false
},
+ // 鎵撳嵃鍏ラ棬璇�
+ printEntryCertificate() {
+ uni.showLoading({
+ title: '姝e湪鎵撳嵃涓�,璇风◢鍚�'
+ })
+ this.enterLoading = true
+ this.$reqGet('printer', { type: 2, tmId: this.coalDetailsData.id }).then(res => {
+ uni.hideLoading()
+ this.enterLoading = false
+ if (res.code === 0) {
+ this.$u.toast('鎵撳嵃鎴愬姛')
+ } else {
+ this.$u.toast(res.msg ? res.msg : '鎵撳嵃澶辫触')
+ }
+ })
+ },
+ // 鎵撳嵃鍑洪棬璇�
+ printExitPermit() {
+ uni.showLoading({
+ title: '姝e湪鎵撳嵃涓�,璇风◢鍚�'
+ })
+ this.outLoading = true
+ this.$reqGet('printer', { type: 3, tmId: this.coalDetailsData.id }).then(res => {
+ uni.hideLoading()
+ this.outLoading = false
+ if (res.code === 0) {
+ this.$u.toast('鎵撳嵃鎴愬姛')
+ } else {
+ this.$u.toast(res.msg ? res.msg : '鎵撳嵃澶辫触')
+ }
+ })
+ },
}
};
</script>
@@ -543,7 +599,7 @@
::v-deep.bill-of-lading-details {
width: 100%;
- height: 100vh;
+ height: 100%;
margin: 0 auto;
display: flex;
flex-direction: column;
@@ -702,7 +758,7 @@
}
.timeLine {
- height: 40%;
+ height: 300rpx;
margin: vww(20);
position: relative;
top: vww(120);
@@ -764,15 +820,18 @@
.weigh-ability {
width: 631rpx;
- height: vww(100);
+ height: vww(200);
margin: vww(80) auto;
- margin-bottom: vww(10);
+ margin-top: vww(100);
+ margin-bottom: vww(20);
@include flex;
flex-direction: column;
+ justify-content: flex-start;
.weigh-button {
width: 631rpx;
- height: vww(89);
+ height: vww(40);
+ margin: vww(10);
.u-button {
font-size: 28rpx;
--
Gitblit v1.9.1