From 71a830c0c6adfd19dd726abe6772df35e94313e9 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期六, 16 九月 2023 19:34:07 +0800
Subject: [PATCH] 重做装卸员页面 司机异常原因修改
---
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue | 50 +++++-
pages/loadUnload-page/loadUnload-page.vue | 48 +-----
api/globalApi.js | 13 +
pages.json | 11 +
pages/loadUnload-page/selectTarget/selectTarget.vue | 190 +++++++++++++++++++++++++++
pages/tabbar-page/index-tabbar/index-tabbar.vue | 6
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 1
pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue | 77 ++++++----
pages/driver-page/driver-index/driver-index.vue | 23 +++
store/index.js | 1
10 files changed, 341 insertions(+), 79 deletions(-)
diff --git a/api/globalApi.js b/api/globalApi.js
index 7df10be..087918d 100644
--- a/api/globalApi.js
+++ b/api/globalApi.js
@@ -429,5 +429,18 @@
printer: {
url: '/wrzs/printer/handler',
method: 'GET'
+ },
+ /**
+ * @description 瑁呭嵏鍛橀�氳繃璐熻矗鐨勫崟浣嶆煡璇㈢叅鍦�*/
+ getDeptIdFiled: {
+ url: '/wrzs/jccoalfiled/getDeptIdFiled',
+ method: 'GET'
+ },
+ /**
+ * @description 瑁呭嵏鍛樻煡鐪嬬叅鍦轰笅鎵�鏈夌殑鐓ょ绫诲瀷
+ */
+ getFiledIdCoalBunker: {
+ url: '/wrzs/jccoalbunker/getFiledIdCoalBunker',
+ method: 'GET'
}
}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 6b50db8..9dbbba4 100644
--- a/pages.json
+++ b/pages.json
@@ -240,7 +240,16 @@
}
}
- ],
+ ,{
+ "path" : "pages/loadUnload-page/selectTarget/selectTarget",
+ "style" :
+ {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ],
"subPackages": [{
"root": "pages/register",
"pages": [{
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 e5ea6f9..509e646 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
@@ -548,6 +548,7 @@
this.$reqGet('printer', { type: 2, tmId: this.coalDetailsData.id }).then(res => {
uni.hideLoading()
this.enterLoading = false
+ console.log(res);
if (res.code === 0) {
this.$u.toast('鎵撳嵃鎴愬姛')
} else {
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 c30c17c..e729c0f 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
@@ -207,7 +207,7 @@
<view class="suffix">{{ weighList.orderSurplus ||"" }}</view>
<text style="color: #ff6363;font-weight: bold;font-size: 26rpx;"
class="error-tip"
- v-show="isweigh">* 璁㈠崟浣欓噺涓嶈冻</text>
+ v-show="orderSurplusLess">* 璁㈠崟浣欓噺涓嶈冻</text>
</view>
</view>
</view>
@@ -252,11 +252,14 @@
@cancel="abnormalCancel"
confirmText="鎻愪氦">
<view class="slot-content">
- <u--form labelPosition="top">
- <u-form-item>
- <u-textarea v-model="abnormalContent"
+ <u--form labelPosition="top"
+ :model='abnormalForm'
+ :rules="rules"
+ ref="uForm">
+ <u-form-item prop="abnormalContent">
+ <u-textarea v-model="abnormalForm.abnormalContent"
confirmType="done"
- placeholder="璇疯緭鍏ュ紓甯稿師鍥�"
+ placeholder="璇疯緭鍏ュ紓甯稿師鍥�(瀛楁暟涓嶅皯浜�5涓瓧)"
height='140'
count
border="surround"
@@ -340,6 +343,7 @@
primaryClean: null,
// 鍒ゆ柇绉伴噸鎸夐挳鏄惁鍙敤
isweigh: false,
+ orderSurplusLess: false,
// 澶栬喘绫诲瀷绉伴噸濉啓姣涳紝鐨紝
firstHairCustomernameShow: false,
coalContactHair: '',
@@ -350,7 +354,9 @@
// 澶栬喘绗竴娆$О姣涢噸涓嶉渶瑕佸姞鍑忓惃
outBuy: true,
// 鐨噸寮傚父鐩稿叧
- abnormalContent: '',
+ abnormalForm: {
+ abnormalContent: '',
+ },
avgSkin: '', // 骞冲潎鐨噸
isAbnormalAvgSkin: true, //骞冲潎鐨噸鏄惁寮傚父
tmTaskCoalList: [],
@@ -359,7 +365,26 @@
historyShow: false,
// 鏄惁鍦ㄧО鐨噸锛岀偣鍑荤‘瀹氱О閲嶅垽鏂槸鍚﹀紓甯�
isSkinWeigh: false,
- errorTipShow: false
+ errorTipShow: false,
+ rules: {
+ abnormalContent: [{
+ required: true,
+ message: "璇峰~鍐欏紓甯稿師鍥�",
+ trigger: ['blur', 'change'],
+ type: 'string'
+ },
+ {
+ validator: (rule, value, callback) => {
+ if (value.length < 5) {
+ callback(new Error('鍘熷洜涓嶅彲灏戜簬5涓瓧'))
+ } else {
+ callback()
+ }
+ }
+ },
+ ]
+ }
+
};
},
watch: {
@@ -402,6 +427,7 @@
this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this
.temporaryWeighObj
.clean < 0;
+ this.orderSurplusLess = this.temporaryWeighObj.clean > this.weighList.orderSurplus
}
}
}
@@ -541,7 +567,8 @@
carNo: this.weighData.carNo,
tmId: this.weighData.tmId,
filedId: this.weighData.filedId,
- equipmentCode: this.weighData.equipmentCode
+ equipmentCode: this.weighData.equipmentCode,
+ weigh: this.weighData.weigh
}, 'json').then(res => {
if (res.code == 0) {
this.$u.toast('鎿嶄綔鎴愬姛锛屽嵆灏嗚繑鍥炰笂涓�椤�');
@@ -564,7 +591,12 @@
this.$reqPost('getTwoEvacuation', this.weighData, 'json').then(res => {
console.log(res, '绗簩娆℃斁绌�');
if (res.code == 0) {
- this.$u.toast('鎿嶄綔鎴愬姛');
+ this.$u.toast('鎿嶄綔鎴愬姛锛屽嵆灏嗚繑鍥炰笂涓�椤�');
+ setTimeout(() => {
+ uni.navigateBack({
+ delta: 1
+ });
+ }, 1000);
this.evacuationModalShow = false;
} else {
this.$u.toast(res.msg ? res.msg : '鎿嶄綔澶辫触');
diff --git a/pages/driver-page/driver-index/driver-index.vue b/pages/driver-page/driver-index/driver-index.vue
index a9e020c..5ce8255 100644
--- a/pages/driver-page/driver-index/driver-index.vue
+++ b/pages/driver-page/driver-index/driver-index.vue
@@ -256,6 +256,7 @@
import combinedTitle from '@/components/combined-title/combined-title.vue';
import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue';
import { mapState } from 'vuex'
+ import { BaseUrl } from '@/api/publicInterface.js'
export default {
components: {
combinedTitle,
@@ -297,7 +298,8 @@
fleetId: '',
xsUserId: '',
customerId: '',
- isFirstLogin: true //鏄惁鏄涓�娆$櫥褰�
+ isFirstLogin: true, //鏄惁鏄涓�娆$櫥褰�
+ phone: ""
};
},
onShow() {
@@ -389,6 +391,25 @@
noobTour() {
this.$refs.previewImage.open('https://mx.jzeg.cn:9096/appimg/image/tour/driver/sj1.png')
},
+ getLogOn() {
+ this.$reqGet('getUserEntity').then(res => {
+ this.phone = res.data.phone
+ }).then(() => {
+ uni.request({
+ url: `${BaseUrl}/admin/log/getLogOnType?phone=${this.phone}`,
+ success: res => {
+ // res.data.data 涓�1 浠h〃绗竴娆$櫥褰� 涓�0鍙栨秷瀛︿範鎸囧紩 涓�2 浠h〃瀛樺湪
+ if (res.data.data === 1) {
+ this.noobTour()
+ } else if (res.data.data === 2) {
+ this.isFirstLogin = true
+ } else {
+ this.isFirstLogin = false
+ }
+ }
+ });
+ })
+ },
}
};
</script>
diff --git a/pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue b/pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue
index 94ff0cf..91fbae6 100644
--- a/pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue
+++ b/pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue
@@ -27,34 +27,32 @@
</view>
<view class="num">{{ item.hair }}</view>
</view>
- <view class="item">
- <view class="concrete"
- :style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/clean.png)`, backgroundSize: 'cover', backgroundRepeat: 'no-repeat' }">
- 鍑�
+ </view>
+ <view class="info-container">
+ <view class="info-block">
+ <view class="order-type info">
+ 璁㈠崟绫诲瀷:{{item.orderType}}
</view>
- <view class="num">{{ item.clean }}</view>
+ <view class="car-num info">
+ 杞︾墝鍙�:{{item.carNo}}
+ </view>
+ <view class="file-name info">
+ 鐘舵��:{{coalStatus[item.status]}}
+ </view>
+ <view class="order-margin info">
+ 鐓ょ鍚嶇О:{{item.coalName}}
+ </view>
</view>
</view>
- <view class="order-type info">
- 璁㈠崟绫诲瀷:{{item.orderType}}
- </view>
- <view class="car-num info">
- 杞︾墝鍙�:{{item.carNo}}
- </view>
- <view class="file-name info">
- 鐓ゅ満鍚嶇О:{{item.filedName}}
- </view>
- <view class="order-margin info">
- 鐓ょ鍚嶇О:{{item.coalName}}
- </view>
- <view class="confirm-button info">
+ <view class="confirm-button">
<u-button plain
type="primary"
text="纭畾瑁呭嵏"
shape="circle"
@click.stop="loadOrder(item.id)"
:loading="loading"
- loadingText="纭"></u-button>
+ loadingText="纭"
+ v-if='item.isPretendDischar===0'></u-button>
</view>
</view>
</view>
@@ -76,7 +74,10 @@
onlineurl,
loadShow: false, // 纭寮圭獥鎺у埗
loading: false,
- id: ""
+ id: "",
+ coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠',
+ '杩涘叆鍦洪櫌', '寮傚父瀹℃牳涓�'
+ ], // 鐘舵��
}
},
onLoad(params) {
@@ -130,7 +131,7 @@
.collection-form-item {
width: 690rpx;
- height: 400rpx;
+ height: 380rpx;
background: #ffffff;
box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
border-radius: 20rpx;
@@ -142,11 +143,13 @@
margin-top: vww(10);
.weigh-item {
- width: 100%;
+ width: 94%;
height: vww(36);
- margin: vww(10);
+ margin: 0 vww(10);
@include flex;
justify-content: space-around;
+ position: relative;
+ top: vww(-14);
.item {
min-width: vww(50);
@@ -171,17 +174,33 @@
}
}
- .info {
- height: vww(20);
- color: #515151;
- margin: vww(5);
- margin-left: vww(20);
+ .info-container {
+ width: 100%;
+ height: vww(100);
+ display: flex;
+ justify-content: center;
+
+ .info-block {
+ width: 600rpx;
+ height: vww(80);
+ display: flex;
+ justify-content: center;
+ flex-wrap: wrap;
+ }
+
+ .info {
+ width: 45%;
+ height: vww(20);
+ color: #515151;
+ margin: vww(5);
+ }
}
+
.confirm-button {
width: vww(80);
position: absolute;
- bottom: vww(20);
+ bottom: vww(6);
right: vww(10);
}
}
diff --git a/pages/loadUnload-page/loadUnload-page.vue b/pages/loadUnload-page/loadUnload-page.vue
index bdf7c6a..57fb8cf 100644
--- a/pages/loadUnload-page/loadUnload-page.vue
+++ b/pages/loadUnload-page/loadUnload-page.vue
@@ -5,29 +5,15 @@
<view class="wait-collection"
style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/customerbanner.png') no-repeat;background-size:contain">
</view>
- <view style="position: relative;top: -120px;">
+ <!-- <view style="position: relative;top: -120px;">
<u-empty mode="data"
icon="http://cdn.uviewui.com/uview/empty/data.png"
textSize="30"
iconSize="1000"
v-if="CoalNameList.length == 0"></u-empty>
- </view>
- <view class="collection-form">
- <view class="collection-form-item"
- v-for="(item, index) in CoalNameList"
- :key="index">
- <view class="first-line">
- <view class="dispatch-receive">
- <view class="dispatch">鐓ょ鍚嶇О:{{ item }}</view>
- </view>
- <view class="">
- <u-button type="primary"
- plain
- text="閫夋嫨"
- @click.stop="loadUnloadHandle(item)"></u-button>
- </view>
- </view>
- </view>
+ </view> -->
+ <view class="">
+ <selectTarget ref='selectTarget'></selectTarget>
</view>
</view>
</view>
@@ -35,10 +21,14 @@
</template>
<script>
+ import selectTarget from '@/pages/loadUnload-page/selectTarget/selectTarget.vue'
export default {
+ components: {
+ selectTarget
+ },
data() {
return {
- CoalNameList: []
+
};
},
onLoad() {
@@ -46,24 +36,8 @@
},
methods: {
init() {
- this.getCoalNameAllHandle()
- },
- getCoalNameAllHandle() {
- uni.showLoading({
- title: "鍔犺浇涓�"
- })
- this.$reqGet('getCoalNameAll').then(res => {
- uni.hideLoading()
- if (res.code === 0) {
- this.CoalNameList = res.data
- } else {
- this.$u.toast('鍔犺浇澶辫触')
- }
- })
- },
- loadUnloadHandle(name) {
- uni.navigateTo({
- url: `/pages/loadUnload-page/loadUnload-detail/loadUnload-detail?coalName=${name}`
+ this.$nextTick(() => {
+ this.$refs.selectTarget.getDeptIdFiled()
})
}
},
diff --git a/pages/loadUnload-page/selectTarget/selectTarget.vue b/pages/loadUnload-page/selectTarget/selectTarget.vue
new file mode 100644
index 0000000..77b3642
--- /dev/null
+++ b/pages/loadUnload-page/selectTarget/selectTarget.vue
@@ -0,0 +1,190 @@
+<template>
+ <view class="main">
+ <u--form labelPosition="top"
+ labelWidth="20%"
+ :borderBottom="false"
+ :model="dataForm"
+ ref="uForm">
+ <u-form-item label="鐓ゅ満"
+ prop="firstClass"
+ :borderBottom="false">
+ <u-cell-group>
+ <u-cell :title="dataForm.firstClass"
+ value="璇烽�夋嫨"
+ @click="firstClassSelect">
+ <u-icon name="arrow-right"
+ slot="right-icon"
+ size="30"></u-icon></u-cell>
+ </u-cell-group>
+ </u-form-item>
+ <u-form-item label="鐓や粨"
+ prop="secondClass"
+ :borderBottom="false">
+ <u-cell-group>
+ <u-cell :title="dataForm.secondClass"
+ value="璇烽�夋嫨"
+ @click="secondClassSelect">
+ <u-icon name="arrow-right"
+ slot="right-icon"
+ size="30"></u-icon></u-cell>
+ </u-cell-group>
+ </u-form-item>
+ </u--form>
+ <view class="coal-name"
+ v-show="coalList.length!==0">
+ <u-checkbox-group v-model="checkedCoal"
+ placement="row"
+ @change="checkboxChange"
+ size="30">
+ <u-checkbox :customStyle="{marginBottom: '8px',fontSize:'20px'}"
+ v-for="(item, index) in coalList"
+ :key="item.id"
+ :label="item.name"
+ :name="item.name"
+ labelSize='40'
+ iconSize='40'></u-checkbox></u-checkbox-group>
+ </view>
+ <view style="margin-top: 20rpx;">
+ <u-button type="primary"
+ shape="circle"
+ text="鎻愪氦"
+ @click.stop="formHandle"></u-button>
+ </view>
+ <!-- 鐓ゅ満 -->
+ <u-action-sheet :actions="firstClassActionsList"
+ :show="firstClassShow"
+ cancelText='鍙栨秷'
+ :closeOnClickOverlay='true'
+ @close='firstClassClose'
+ @select="firstClassSelectClick"></u-action-sheet>
+ <!-- 鐓や粨 -->
+ <u-action-sheet :actions="secondClassActionsList"
+ :show="secondClassShow"
+ cancelText='鍙栨秷'
+ :closeOnClickOverlay='true'
+ @close='secondClassClose'
+ @select="secondClassSelectClick"></u-action-sheet>
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ dataForm: {
+ firstClass: "",
+ secondClass: "",
+ },
+ index: '',
+ // 鐓ゅ満鎿嶄綔鑿滃崟
+ firstClassActionsList: [],
+ firstClassShow: false,
+ // 鐓や粨鎿嶄綔鑿滃崟
+ secondClassActionsList: [],
+ secondClassShow: false,
+ coalList: [],
+ checkedCoal: [],
+ userInfo: {},
+ filedId: "",
+ selectedCoal: []
+ };
+ },
+ methods: {
+ getUserInfo() {
+ this.$reqGet('getUserEntity').then(res => {
+ this.userInfo = res.data;
+ this.userInfo.password = null
+ })
+ },
+ // 鑾峰彇鐓ゅ満
+ getDeptIdFiled() {
+ uni.showLoading({
+ title: "鍔犺浇涓�"
+ })
+ this.$reqGet('getDeptIdFiled').then(res => {
+ uni.hideLoading()
+ if (res.code === 0) {
+ this.firstClassActionsList = res.data
+ } else {
+ this.$u.toast('鍔犺浇澶辫触')
+ }
+ }).then(() => {
+ this.getUserInfo()
+ })
+ },
+ firstClassSelect() {
+ this.firstClassShow = true
+ },
+ firstClassClose() {
+ this.firstClassShow = false
+ },
+ firstClassSelectClick(val) {
+ this.dataForm.firstClass = val.name
+ this.getFiledIdCoalBunker(val.id)
+ this.filedId = val.id
+ },
+ // 鑾峰彇鐓や粨
+ getFiledIdCoalBunker(filedId) {
+ this.$reqGet('getFiledIdCoalBunker', { filedId, }).then(res => {
+ this.secondClassActionsList = res.data
+ })
+ },
+ //鐓や粨鑿滃崟
+ secondClassSelect() {
+ this.secondClassShow = true
+ },
+ secondClassClose() {
+ this.secondClassShow = false
+ },
+ secondClassSelectClick(val) {
+ this.dataForm.secondClass = val.name
+ this.coalList = this.secondClassActionsList.find(v => v.id === val.id).coalNames.split(',').map(v => {
+ return {
+ name: v,
+ id: Math.floor(Math.random() * 100) + 1,
+ checked: false
+ }
+ })
+ console.log(this.coalList);
+ },
+ checkboxChange(e) {
+ this.selectedCoal = e
+ },
+ formHandle() {
+ this.$reqPost('updateUser', Object.assign(this.userInfo, {
+ responsibilityCoal: this.selectedCoal.join(),
+ filedId: this
+ .filedId
+ }), 'json').then(res => {
+ uni.navigateTo({
+ url: `/pages/loadUnload-page/loadUnload-detail/loadUnload-detail`
+ })
+ })
+ }
+ }
+ }
+</script>
+
+<style lang="scss"
+ scoped>
+ .main {
+ width: 94%;
+ margin: 10px;
+ // margin-top: vww(100);
+ position: relative;
+ top: vww(-120);
+ }
+
+ .slide-fade-enter-active {
+ transition: all 0.3s ease-out;
+ }
+
+ .coal-name {
+ width: 95%;
+ min-height: vww(100);
+
+ .u-checkbox-group {
+ .u-checkbox {}
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/tabbar-page/index-tabbar/index-tabbar.vue b/pages/tabbar-page/index-tabbar/index-tabbar.vue
index ca55d78..2d8d92b 100644
--- a/pages/tabbar-page/index-tabbar/index-tabbar.vue
+++ b/pages/tabbar-page/index-tabbar/index-tabbar.vue
@@ -25,6 +25,8 @@
:indexdriverBillOfLoadingData="indexdriverBillOfLoadingData"></driver-index>
<load-unload ref="LoadUnloadRef"
v-if="roleType == 5"></load-unload>
+ <!-- <selectTarget v-if="roleType == 5"
+ ref="LoadUnloadRef"></selectTarget> -->
<tab-bar :current="0"></tab-bar>
<!-- 鎺ㄩ�佹秷鎭脊绐� -->
<u-modal :show="messagePushShow"
@@ -42,6 +44,7 @@
import driverIndex from '@/pages/driver-page/driver-index/driver-index.vue';
import freightForwarderIndex from '@/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue';
import LoadUnload from '@/pages/loadUnload-page/loadUnload-page.vue'
+ import selectTarget from '@/pages/loadUnload-page/selectTarget/selectTarget.vue'
import { mapState, mapMutations } from 'vuex';
import { webSocketUrl } from '@/api/request.js';
@@ -51,7 +54,8 @@
customerIndex,
driverIndex,
freightForwarderIndex,
- LoadUnload
+ LoadUnload,
+ selectTarget
},
computed: {
...mapState(['globalweighHouseCode', 'globalweigh', 'globalisconnect', 'globalSocket', 'websocketData',
diff --git a/store/index.js b/store/index.js
index d0e432f..37a132f 100644
--- a/store/index.js
+++ b/store/index.js
@@ -217,7 +217,6 @@
},
changeablePrintOut(state, payload) {
state.ablePrintOut = payload
- console.log(state.ablePrintOut, '鍑洪棬璇佲��');
}
},
actions: {
--
Gitblit v1.9.1