From 81062e5937779fd4ee4004412ca89942b67017b4 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期四, 09 十一月 2023 17:08:06 +0800 Subject: [PATCH] app端物资明细字段,增加榜单类型 --- api/globalApi.js | 6 + pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue | 52 ++++++++++++ pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue | 115 +++++++++++++++++++++++++--- pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 22 ++++- 4 files changed, 174 insertions(+), 21 deletions(-) diff --git a/api/globalApi.js b/api/globalApi.js index d3ca4b8..886a4b8 100644 --- a/api/globalApi.js +++ b/api/globalApi.js @@ -434,5 +434,11 @@ getLogOn: { url: 'admin/log/getLogOn', method: 'GET' + }, + /** + * @description 鎵撳嵃纾呭崟 */ + printerHandler:{ + url: '/wrzs/printer/handler', + method: 'GET' } } \ No newline at end of file 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 c8642d3..bc323b4 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 @@ -67,12 +67,12 @@ @click="arriveClick" shape="circle" :disabled="coalDetailsData.status >= 2"></u-button> - <u-button text="鍏ュ満鐢宠" + <u-button text="鎵撳嵃纾呭崟" type="primary" plain - @click="rcsqClick" + @click="printOrder" shape="circle" - :disabled="coalDetailsData.status >= 3"></u-button> + :disabled="currentPageCoalStatus !== 4"></u-button> </view> <view class="bottom-button"> <u-button text="鏀剧┖" @@ -91,10 +91,10 @@ </view> </view> <view class="weigh-ability" v-if="!isReservation"> - <view class="weigh-button"><u-button text="灞曠ず閫氱煡鍗�" + <!-- <view class="weigh-button"><u-button text="灞曠ず閫氱煡鍗�" @click="showCaolPickUpBill" type="primary" - shape="circle"></u-button></view> + shape="circle"></u-button></view> --> <view class="weigh-button"><u-button :disabled="!isapproach" text="涓婄璁¢噺" @@ -503,6 +503,18 @@ uni.navigateTo({ url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?orderPlanId=${this.orderPlanId}&flag=${true}` }) + }, + //鎵撳嵃纾呭崟 + printOrder(){ + this.$reqGet('printerHandler',{tmId:this.orderPlanId}).then(res => { + if (res.data) { + uni.hideLoading(); + // this.orderPlanData = res.data + } else { + uni.hideLoading(); + this.$u.toast('鍔犺浇澶辫触') + } + }) } } }; diff --git a/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue b/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue index 51c1a5e..a873ba5 100644 --- a/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue +++ b/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue @@ -1,6 +1,14 @@ <template> <!-- 鎵撳崱 --> <view class="punchTheClock"> + <view class="editIn"> + <u-button text=" 鏇存敼鍏ュ満" + type="primary" + plain + @click="rcsqClick" + shape="circle" + :disabled="coalDetailsData.status >= 3"></u-button> + </view> <!-- 鎵撳崱鎸夐挳 --> <view class="punchTheClock_container"> <view class="punchTheClock_btn" @@ -15,6 +23,8 @@ <text>鏈繘鍏ョ熆鍦哄尯鍩�</text> </view> --> </view> + + </view> </template> @@ -22,26 +32,59 @@ import { todayDate } from '@/utils/util.js'; export default { onLoad(params) { + console.log(params,'params') this.punchTheClockObj.tmcoa = params.tmId.toString(); + this.orderPlanId = params.orderPlanId; this.coalStatus = params.coalStatus; }, data() { return { nowTime: '', coalStatus: 0, + orderPlanId:'', + coalDetailsData:{}, punchTheClockObj: { tmcoa: null, latA: null, latB: null - } + }, + getYuYueDataParams: { + deptId: '', + filedId: '', + sendDate: '' + }, }; }, onShow() { + this.init(); this.getSetting(); //鑾峰彇鎺堟潈 this.getFuzzyLocation(); //鑾峰彇浣嶇疆 this.todayDate(); //褰撳墠鏃堕棿 }, methods: { + init(){ + this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => { + uni.hideLoading(); + if (res.code == 0) { + this.coalDetailsData = res.data; + console.log(res, '閫氱煡鍗曡鎯�'); + // 鑾峰彇鍏ュ満鐢宠鎿嶄綔鍚庣殑棰勭害鍒楄〃鐨勫弬鏁� + this.getYuYueDataParams.deptId = res.data.deptId; + this.getYuYueDataParams.filedId = res.data.filedId; + this.getYuYueDataParams.sendDate = res.data.sendDate; + } else { + this.$u.toast('鍔犺浇澶辫触'); + } + }) + }, + // 鍏ュ満鐢宠 + rcsqClick() { + uni.navigateTo({ + url: `/pages/driver-page/appointment/appointment?type=鍏ュ満鐢宠&takeCoalId=${this.orderPlanId}&yyId=${this.yyId}&filedId=${this.getYuYueDataParams.filedId}&deptId=${ + this.getYuYueDataParams.deptId + }&sendDate=${this.getYuYueDataParams.sendDate}` + }); + }, getSetting() { // 鑾峰彇鏉冮檺淇℃伅 wx.getSetting({ @@ -111,7 +154,9 @@ height: 100vh; display: flex; justify-content: center; + flex-direction: column; align-items: center; + position: relative; .punchTheClock_container { .punchTheClock_btn { @@ -141,5 +186,10 @@ } } } + .editIn{ + position: absolute; + right:10rpx; + top: 15rpx; + } } </style> \ No newline at end of file diff --git a/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue b/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue index b4b60e5..ad64fd8 100644 --- a/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue +++ b/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue @@ -164,12 +164,12 @@ <u--text text="鎵g綒绉嶇被" size='32'></u--text> </view> - <view class="num-input" + <view class="num-radio" v-if='roleType===4&&!flag' > - <u-radio-group v-model="item.penaltyType"> - <u-radio :name="0" :label="'鏃犳墸缃�'" :disabled="disabled">鏃犳墸缃�</u-radio> - <u-radio :name="'鍏朵粬鎵g綒'" :label="'鍏朵粬鎵g綒'" :disabled="disabled">鍏朵粬鎵g綒</u-radio> + <u-radio-group size='34' v-model="item.penaltyType"> + <u-radio :label-size="32" :name="'0'" :label="'鏃犳墸缃�'" :disabled="disabled">鏃犳墸缃�</u-radio> + <u-radio :label-size="32" :name="'鍏朵粬鎵g綒'" :label="'鍏朵粬鎵g綒'" :disabled="disabled">鍏朵粬鎵g綒</u-radio> </u-radio-group> </view> <view class="num-show" @@ -178,7 +178,7 @@ </view> </view> <!-- 鎵g綒閲戦 --> - <view class="notice-num"> + <view class="notice-num" v-if="item.penaltyType == '鍏朵粬鎵g綒'"> <view class="num-text" style="margin-left: 10rpx;"> <u--text text="鎵g綒閲戦" @@ -198,24 +198,26 @@ </view> </view> <!--涓嶅悎鏍煎垽瀹氱绫� --> - <view class="notice-num"> + <view class="notice-num" v-if="item.penaltyType == '鍏朵粬鎵g綒'" > <view class="num-text" style="margin-left: 10rpx;"> <u--text text="涓嶅悎鏍煎垽瀹氱绫�" size='32'></u--text> </view> - <view class="num-input" + <view class="num-radio" v-if='roleType===4&&!flag' + @click.stop="onFoucus" + style="height: 50rpx;" > - <!-- <u--input placeholder="璇疯緭鍏ユ墸缃氶噾棰�" - border="bottom" - clearable - v-model="item.penaltyAmount"></u--input> --> - <u-select v-model="item.unqualifiedType" mode="mutil-column-auto" :list="list" @confirm="confirm"></u-select> + <u-radio-group size='32' v-model="item.unqualifiedType"> + <u-radio :label-size="25" :name="1" :label="'闀垮害鎵g綒'" :disabled="disabled">闀垮害鎵g綒</u-radio> + <u-radio :label-size="25" :name="'2'" :label="'鍘氬害鎵g綒'" :disabled="disabled">鍘氬害鎵g綒</u-radio> + <u-radio :label-size="25" :name="'3'" :label="'瀵嗛棴鍣�'" :disabled="disabled">瀵嗛棴鍣�</u-radio> + </u-radio-group> </view> <view class="num-show" v-else-if="flag"> - {{item.unqualifiedType}} + {{item.unqualifiedType}} </view> </view> </view> @@ -276,6 +278,46 @@ @select="selectUnqualifiedClick"></u-action-sheet> </view> </view> + <!-- 鏂板 楠岃川澶囨敞銆傞獙璐ㄨ鏄� --> + <view style="padding: 10rpx;"> + <u-row > + <u-col span="24" > + <view class="demo-layout bg-purple-light" style="display: flex;"> + <text style="font-size: 32rpx;">楠岃川璇存槑锛�</text> + <view style="display: inline-block;" + v-if='roleType===4&&!flag' + > + <u--input placeholder="璇疯緭鍏ラ獙璐ㄨ鏄�" + border="bottom" + clearable + v-model="qualityInstructions"></u--input> + </view> + <view class="num-show" + v-else-if="flag"> + {{ qualityInstructions }} + </view> + </view> + </u-col> + </u-row> + </view> + <view style="padding: 10rpx;"> + <u-row > + <u-col span="24"> + <view class="demo-layout bg-purple-light" > + <text style="font-size: 32rpx;">楠岃川澶囨敞锛�</text> + <view style="width: 50%;" + v-if='roleType===4&&!flag' + > + <u-textarea border="surround" v-model="remarks" ref="textarea" placeholder="璇疯緭鍏ラ獙璐ㄥ娉�"></u-textarea> + </view> + <view class="num-show" + v-else-if="flag"> + {{ remarks }} + </view> + </view> + </u-col> + </u-row> + </view> <view class="confirm-button" v-if='roleType===4&&!flag'> <u-button type="primary" @@ -386,6 +428,26 @@ export default { data() { return { + qualityInstructions:"", + remarks:'', + selectlist:[ + { + value: '1', + name:'闀垮害鎵g綒', + fontSize:'40' + }, + { + value: '2', + name:'鍘氬害鎵g綒', + fontSize:'40' + + }, + { + value: '3', + name:'瀵嗛棴鍣�', + fontSize:'40' + } + ], orderPlanId: "", title: '绱犺儦鍕惧嫆鍑洪潚鑺憋紝绗旈攱娴撹浆娣�', isWeighingType:'', @@ -482,10 +544,13 @@ if (res.code == 0) { uni.hideLoading() this.coalDetailsData = res.data; + this.remarks = res.data.remarks; + this.qualityInstructions = res.data.qualityInstructions this.orderCode = res.data.orderCode this.showWeigh = this.coalDetailsData.tmTaskCoalItems ? this.coalDetailsData .tmTaskCoalItems : []; this.showWeigh = this.showWeigh.map(v => { + if(!v.penaltyType) v.penaltyType = '0' return { ...v, modifyProductName: '', @@ -552,8 +617,15 @@ }, // 鐐瑰嚮纭 confirmInput() { - this.loading = true + this.loading = true; + let params = {}; + params.qualityInstructions = this.qualityInstructions; + params.remarks = this.remarks; this.showWeigh = this.showWeigh.map((v, i) => { + if(!v.penaltyType) { + v.penaltyAmount = ''; + v.unqualifiedType = ''; + } return { ...v, unqualifiedBreed: this.globalShowWeigh[i].unqualifiedBreed ? this.globalShowWeigh[i] @@ -564,7 +636,8 @@ } }) - this.$reqPost('updateTmTaskCoalItem', this.showWeigh, 'json').then( + params.tmTaskCoalItems = this.showWeigh; + this.$reqPost('updateTmTaskCoalItem', params, 'json').then( res => { if (res.code == 0) { this.loading = false @@ -728,6 +801,14 @@ //鐐瑰嚮tab 鍒囨崲灞曠ず鏄庣粏 tabChange(val){ this.current = val; + }, + //涓嬫媺妗嗚仛鐒︽椂闂� + onFoucus(val){ + this.focusSelect = true; + + }, + closeEvent(){ + this.focusSelect = false; } }, } @@ -842,6 +923,10 @@ width: 60%; border-bottom: 1px solid rgb(218, 219, 222); } + .num-radio{ + width: 60%; + font-size: 100rpx; + } .num-show { width: 60%; -- Gitblit v1.9.1