From e4b6297960fbb055196e4de97eae7b25009d4cfb Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期二, 29 八月 2023 11:43:57 +0800
Subject: [PATCH] 称重异常增加接口
---
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue | 30 ---
api/globalApi.js | 12 +
pages.json | 18 +-
pages/customer-page/fleet-management/fleet-management.vue | 306 +++++++++++++++++++++++--------------------
4 files changed, 187 insertions(+), 179 deletions(-)
diff --git a/api/globalApi.js b/api/globalApi.js
index c747764..13a763d 100644
--- a/api/globalApi.js
+++ b/api/globalApi.js
@@ -412,4 +412,16 @@
url: '/wrzs/wx/getAppidAndSercet',
method: 'GET'
},
+ /**
+ * @description 鐨噸寮傚父璋冪敤 */
+ skinAbnormal: {
+ url: '/wrzs/printer/skinAbnormal',
+ method: 'POST'
+ },
+ /**
+ * @description 鎵归噺閭�璇峰徃鏈� */
+ bindUserFleetBatch: {
+ url: '/wrzs/wx/bindUserFleetBatch',
+ method: 'POST'
+ }
}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 212cf31..6b50db8 100644
--- a/pages.json
+++ b/pages.json
@@ -232,17 +232,15 @@
"navigationStyle": "custom"
}
+ }, {
+ "path": "pages/login/PrivacyAgreementText/PrivacyAgreementText",
+ "style": {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
}
- ,{
- "path" : "pages/login/PrivacyAgreementText/PrivacyAgreementText",
- "style" :
- {
- "navigationBarTitleText": "",
- "enablePullDownRefresh": false
- }
-
- }
- ],
+ ],
"subPackages": [{
"root": "pages/register",
"pages": [{
diff --git a/pages/customer-page/fleet-management/fleet-management.vue b/pages/customer-page/fleet-management/fleet-management.vue
index 0f0dd0f..764d632 100644
--- a/pages/customer-page/fleet-management/fleet-management.vue
+++ b/pages/customer-page/fleet-management/fleet-management.vue
@@ -1,22 +1,37 @@
<template>
<view class="fleet-management">
- <view><u-notice-bar mode="closable" fontSize="25" :text="text1"></u-notice-bar></view>
- <view class="groupCars" v-if="groupCarsShow">
- <u-collapse @change="change" @close="close" @open="open" :border="false" :value="['0']">
- <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="fleetDriverData.length == 0" width="400" height="400" textSize="18"></u-empty>
- <u-collapse-item :title="fleetDriverData[0].fleetName" v-if="fleetDriverData.length != 0" name="0">
+ <view><u-notice-bar mode="closable"
+ fontSize="25"
+ :text="text1"></u-notice-bar></view>
+ <view class="groupCars"
+ v-if="groupCarsShow">
+ <u-collapse @change="change"
+ @close="close"
+ @open="open"
+ :border="false"
+ :value="['0']">
+ <u-empty mode="data"
+ icon="http://cdn.uviewui.com/uview/empty/data.png"
+ v-if="fleetDriverData.length == 0"
+ width="400"
+ height="400"
+ textSize="18"></u-empty>
+ <u-collapse-item :title="fleetDriverData[0].fleetName"
+ v-if="fleetDriverData.length != 0"
+ name="0">
<view class="myCarContainer">
<u-swipe-action>
<u-cell-group>
- <u-swipe-action-item
- :options="options1"
+ <u-swipe-action-item :options="options1"
v-for="(item, index) in fleetDriverData"
:key="index"
:index="item.id"
:name="item.userId"
- @click="deleteGroupClick"
- >
- <u-cell icon="car" iconStyle="font-size:20px;" :title="item.carNo" :value="item.name"></u-cell>
+ @click="deleteGroupClick">
+ <u-cell icon="car"
+ iconStyle="font-size:20px;"
+ :title="item.carNo"
+ :value="item.name"></u-cell>
</u-swipe-action-item>
</u-cell-group>
</u-swipe-action>
@@ -26,166 +41,169 @@
</view>
<!-- 鍒犻櫎灏忕粍妯℃�佹 -->
<view class="deleteModal">
- <u-modal
- :show="deleteGroupShow"
+ <u-modal :show="deleteGroupShow"
:title="title"
@close="deleteGroupClose"
@cancel="deleteCancel"
@confirm="deleteConfirm"
:closeOnClickOverlay="true"
- :showCancelButton="true"
- >
+ :showCancelButton="true">
<view class="slot-content"><rich-text :nodes="content"></rich-text></view>
</u-modal>
</view>
- <view class="updateGroupButton"><u-button text="閭�璇峰徃鏈哄姞鍏�" type="primary" @click="addDrvier"></u-button></view>
+ <view class="updateGroupButton"><u-button text="閭�璇峰徃鏈哄姞鍏�"
+ type="primary"
+ @click="addDrvier"></u-button></view>
</view>
</template>
<script>
-import { mapState } from 'vuex';
-export default {
- computed: {
- ...mapState(['fleetDriverDataLength'])
- },
- watch: {
- fleetDriverDataLength(v) {
- if (this.fleetDriverData.length !== v) {
- this.GetUserFleet();
+ import { mapState } from 'vuex';
+ export default {
+ computed: {
+ ...mapState(['fleetDriverDataLength'])
+ },
+ watch: {
+ fleetDriverDataLength(v) {
+ if (this.fleetDriverData.length !== v) {
+ this.GetUserFleet();
+ }
}
- }
- },
- onLoad(params) {
- this.deleteDriveObj.fleetId = params.id;
- },
- data() {
- return {
- text1: '鍚戝乏婊戝姩杞﹁締鍙繘琛屽垹闄よ溅闃熸搷浣滐紒锛侊紒',
- groupCarsShow: true,
- fleetDriverData: [],
- myCarShow: true,
- // 鍗曞厓鏍兼粦鍔�
- options1: [
- {
+ },
+ onLoad(params) {
+ this.deleteDriveObj.fleetId = params.id;
+ },
+ data() {
+ return {
+ text1: '鍚戝乏婊戝姩杞﹁締鍙繘琛屽垹闄よ溅闃熸搷浣滐紒锛侊紒',
+ groupCarsShow: true,
+ fleetDriverData: [],
+ myCarShow: true,
+ // 鍗曞厓鏍兼粦鍔�
+ options1: [{
text: '鍒犻櫎'
- }
- ],
- deleteDriveObj: {
- id: null, // 鍒犻櫎杞﹁締灏忕粍id
- fleetId: null
- },
- // 鍒犻櫎灏忕粍妯℃�佹
- title: '鎻愮ず',
- content: '',
- deleteGroupShow: false, // 鍒犻櫎灏忕粍妯℃�佹,
- value: ['0']
- };
- },
- onShow() {
- this.init();
- },
- methods: {
- init() {
- this.GetUserFleet();
+ }],
+ deleteDriveObj: {
+ id: null, // 鍒犻櫎杞﹁締灏忕粍id
+ fleetId: null
+ },
+ // 鍒犻櫎灏忕粍妯℃�佹
+ title: '鎻愮ず',
+ content: '',
+ deleteGroupShow: false, // 鍒犻櫎灏忕粍妯℃�佹,
+ value: ['0']
+ };
},
- // 鑾峰彇鍙告満鍒楄〃
- GetUserFleet() {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- this.$reqGet('GetUserFleet', { fleetId: this.deleteDriveObj.fleetId }).then(res => {
- uni.hideLoading();
- this.fleetDriverData = res.data;
- });
+ onShow() {
+ this.init();
},
- change() {},
- close() {},
- open() {},
- deleteGroupClick(args) {
- this.deleteDriveObj.id = args.name;
- this.fleetDriverData.forEach(item => {
- if (item.userId == this.deleteDriveObj.id) {
- this.content = '纭鍒犻櫎鍙告満锛�' + item.name;
- }
- });
- this.deleteGroupShow = true;
- },
- deleteConfirm() {
- this.$reqPost('deleteSiJi', this.deleteDriveObj, 'params').then(res => {
- console.log('鍒犻櫎鍙告満', res);
+ methods: {
+ init() {
this.GetUserFleet();
- if (res.code == 0) {
- uni.showToast({
- title: '鍒犻櫎鎴愬姛',
- duration: 2000
- });
- } else {
- uni.showToast({
- title: res.msg ? res.msg : '鍒犻櫎澶辫触',
- duration: 2000
- });
- }
+ },
+ // 鑾峰彇鍙告満鍒楄〃
+ GetUserFleet() {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ this.$reqGet('GetUserFleet', { fleetId: this.deleteDriveObj.fleetId }).then(res => {
+ uni.hideLoading();
+ this.fleetDriverData = res.data;
+ });
+ },
+ change() {},
+ close() {},
+ open() {},
+ deleteGroupClick(args) {
+ this.deleteDriveObj.id = args.name;
+ this.fleetDriverData.forEach(item => {
+ if (item.userId == this.deleteDriveObj.id) {
+ this.content = '纭鍒犻櫎鍙告満锛�' + item.name;
+ }
+ });
+ this.deleteGroupShow = true;
+ },
+ deleteConfirm() {
+ this.$reqPost('deleteSiJi', this.deleteDriveObj, 'params').then(res => {
+ console.log('鍒犻櫎鍙告満', res);
+ this.GetUserFleet();
+ if (res.code == 0) {
+ uni.showToast({
+ title: '鍒犻櫎鎴愬姛',
+ duration: 2000
+ });
+ } else {
+ uni.showToast({
+ title: res.msg ? res.msg : '鍒犻櫎澶辫触',
+ duration: 2000
+ });
+ }
+ this.deleteGroupShow = false;
+ });
+ },
+ deleteCancel() {
this.deleteGroupShow = false;
- });
- },
- deleteCancel() {
- this.deleteGroupShow = false;
- },
- deleteGroupClose() {
- this.deleteGroupShow = false;
- },
- // 閭�璇峰徃鏈哄姞鍏�
- addDrvier() {
- uni.navigateTo({
- url: `/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver?role=2&fleetId=${this.deleteDriveObj.fleetId}` // 2浠h〃鐨勬槸鍙告満
- });
+ },
+ deleteGroupClose() {
+ this.deleteGroupShow = false;
+ },
+ // 閭�璇峰徃鏈哄姞鍏�
+ addDrvier() {
+ uni.navigateTo({
+ url: `/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver?role=2&fleetId=${this.deleteDriveObj.fleetId}` // 2浠h〃鐨勬槸鍙告満
+ });
+ },
}
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-::v-deep.fleet-management {
- width: 94%;
- margin: 0 auto;
- .myCarContainer {
- max-height: vww(450);
- width: 100%;
- border: 1px solid #dddddd;
- border-radius: 4px;
- overflow: hidden;
- overflow-y: auto;
- .carNum {
- padding: vww(2) 0;
- text-align: center;
- display: inline-block;
- width: 33%;
- // .u-tooltip {
- // display: inline-block;
- // .u-tooltip__wrapper {
- // }
- // }
- }
- }
+<style lang="scss"
+ scoped>
+ ::v-deep.fleet-management {
+ width: 94%;
+ margin: 0 auto;
- .updateGroupButton {
- margin: vww(15) auto 0;
- .u-button {
- width: 30%;
+ .myCarContainer {
+ max-height: vww(450);
+ width: 100%;
+ border: 1px solid #dddddd;
+ border-radius: 4px;
+ overflow: hidden;
+ overflow-y: auto;
+
+ .carNum {
+ padding: vww(2) 0;
+ text-align: center;
+ display: inline-block;
+ width: 33%;
+ // .u-tooltip {
+ // display: inline-block;
+ // .u-tooltip__wrapper {
+ // }
+ // }
+ }
}
- }
- .groupCars {
- .u-swipe-action {
- .u-swipe-action-item {
- .u-swipe-action-item__right {
- .u-swipe-action-item__right__button {
- .u-swipe-action-item__right__button__wrapper {
- background-color: #f56c6c !important;
+
+ .updateGroupButton {
+ margin: vww(15) auto 0;
+
+ .u-button {
+ width: 30%;
+ }
+ }
+
+ .groupCars {
+ .u-swipe-action {
+ .u-swipe-action-item {
+ .u-swipe-action-item__right {
+ .u-swipe-action-item__right__button {
+ .u-swipe-action-item__right__button__wrapper {
+ background-color: #f56c6c !important;
+ }
}
}
}
}
}
}
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
index 1ee26ca..6c99049 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -592,7 +592,7 @@
this.avgSkin = res.data.avgSkin
this.tmTaskCoalList = res.data.tmTaskCoalList
/**
- * @description true鐨勮瘽鏄笉寮傚父 false灏辨槸寮傚父 娌℃湁鍘嗗彶锛屽钩鍧囩毊閲嶄负0鏄涓�娆℃甯� */
+ * @description true鐨勮瘽鏄笉寮傚父 false灏辨槸寮傚父 娌℃湁鍘嗗彶锛屽钩鍧囩毊閲嶄负0鏄涓�娆′篃鏄甯� */
this.isAbnormalAvgSkin = (Array.isArray(this.tmTaskCoalList) && this
.tmTaskCoalList.length === 0 || !this.tmTaskCoalList) && this.avgSkin == 0
} else {
@@ -608,32 +608,12 @@
// 鎻愪氦寮傚父鍘熷洜
abnormalConfirm() {
this.weighData.abnormalText = this.abnormalContent
+ this.skinAbnormal()
this.saveWeigh()
- // uni.showLoading({
- // title: "鎻愪氦涓�"
- // })
- // this.$reqPost('tmAbnormalTextAdd', { tmId: this.weighData.tmId, abnormalText: this.abnormalContent },
- // 'params').then(
- // res => {
- // if (res.code == 0) {
- // uni.hideLoading()
- // this.$u.toast('鎻愪氦鎴愬姛')
- // this.abnormalModalShow = false
- // this.isConfirmWeighLoading = false
- // setTimeout(() => {
- // uni.navigateBack({
- // delta: 1
- // });
- // }, 1000);
-
- // } else {
- // uni.hideLoading()
- // this.$u.toast('鎻愪氦澶辫触')
- // this.abnormalModalShow = true
- // this.isConfirmWeighLoading = false
- // }
- // })
},
+ skinAbnormal() {
+ this.$reqPost('skinAbnormal', { sceneId: this.weighData.sceneId }, 'params')
+ }
}
};
</script>
--
Gitblit v1.9.1