Commit 716b7ce7 authored by 刘威龙's avatar 刘威龙

登录角色问题,运单节点判断、回单运单页面调整

parent 26bba789
...@@ -35,11 +35,11 @@ ...@@ -35,11 +35,11 @@
title:"回单管理", title:"回单管理",
path:"/subpkg/orderPod/orderPod", path:"/subpkg/orderPod/orderPod",
src: "../../static/img/bg/orderPod.png" src: "../../static/img/bg/orderPod.png"
},{ }/* ,{
title:"在途上报", title:"在途上报",
path:"/subpkg/onWayUpload/onWayUpload", path:"/subpkg/onWayUpload/onWayUpload",
src: "../../static/img/bg/onWay.png" src: "../../static/img/bg/onWay.png"
} } */
], ],
isAgree: false, isAgree: false,
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
</u-form-item> </u-form-item>
</template> </template>
</u-form> </u-form>
<view class="login-actionBtn" @click="chooseVerifLogin">{{isVerifLogin==false ? '返回上一级' : '承运商登录'}}</view> <view class="login-actionBtn" @click="chooseVerifLogin">{{isVerifLogin==false ? '跳转司机登录' : '跳转承运商登录'}}</view>
<!-- 登录按钮 --> <!-- 登录按钮 -->
<button class="loginBtn font_bolder" @click="submitForm">登录</button> <button class="loginBtn font_bolder" @click="submitForm">{{isVerifLogin==false ? '承运商登录' : '司机登录'}}</button>
</view> </view>
<!-- 用户隐私协议 <!-- 用户隐私协议
<bs-userPrivacy ref="userPrivacy" />--> <bs-userPrivacy ref="userPrivacy" />-->
...@@ -206,6 +206,7 @@ ...@@ -206,6 +206,7 @@
//获取用户信息 //获取用户信息
userMobileOperation('getUserInfo').then(res => { userMobileOperation('getUserInfo').then(res => {
var user = res.data.data var user = res.data.data
getApp().globalData.user_role = user.user_gid
if(user.user_gid!="DEFAULT.CARRIER_ADMIN"){ if(user.user_gid!="DEFAULT.CARRIER_ADMIN"){
getApp().globalData.tabList = [{ getApp().globalData.tabList = [{
"pagePath": "pages/carrierMenu/carrierMenu", "pagePath": "pages/carrierMenu/carrierMenu",
...@@ -256,6 +257,7 @@ ...@@ -256,6 +257,7 @@
//获取用户信息 //获取用户信息
userMobileOperation('getUserInfo').then(res => { userMobileOperation('getUserInfo').then(res => {
var user = res.data.data var user = res.data.data
getApp().globalData.user_role = user.user_gid
if(user.user_gid=="DEFAULT.CARRIER_ADMIN"){ if(user.user_gid=="DEFAULT.CARRIER_ADMIN"){
getApp().globalData.tabList = [{ getApp().globalData.tabList = [{
"pagePath": "pages/dirverMenu/dirverMenu", "pagePath": "pages/dirverMenu/dirverMenu",
......
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
<u-input border="none" readonly placeholder="请选择签收状态" :value="viewEnums[formData.sign_status]" /> <u-input border="none" readonly placeholder="请选择签收状态" :value="viewEnums[formData.sign_status]" />
</view> </view>
</u-form-item> </u-form-item>
<u-form-item prop="plan_qty" label="应签收数量" labelWidth="35%" borderBottom> <u-form-item prop="shipment_loadbox_qty" label="应签收数量" labelWidth="35%" borderBottom>
<u-input :disabledColor="'#cecece'" disabled border="none" v-model="formData.plan_qty" /> <u-input :disabledColor="'#cecece'" disabled border="none" v-model="formData.shipment_loadbox_qty" />
</u-form-item> </u-form-item>
<u-form-item prop="sign_qty" label="签收数量" :required="disableSignQ()" labelWidth="35%" borderBottom> <u-form-item prop="sign_qty" label="签收数量" :required="disableSignQ()" labelWidth="35%" borderBottom>
<u-input :disabledColor="'#cecece'" :disabled="disableSign()" border="none" v-model="formData.sign_qty" /> <u-input :disabledColor="'#cecece'" :disabled="disableSign()" border="none" v-model="formData.sign_qty" />
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
formData: { formData: {
time: "", //签收时间 time: "", //签收时间
sign_qty: "", //签收数量 sign_qty: "", //签收数量
plan_qty: "", //应签收数量 shipment_loadbox_qty: "", //应签收数量
sign_status: "", //签收状态 sign_status: "", //签收状态
remark: "", //备注 remark: "", //备注
}, },
...@@ -141,8 +141,12 @@ ...@@ -141,8 +141,12 @@
onLoad(options) { onLoad(options) {
const data = getApp().globalData.orderAllPodSign const data = getApp().globalData.orderAllPodSign
if(data.execute_bu=='TBU'){ if(data.execute_bu=='TBU'){
this.formData.plan_qty = data.pod_count; this.formData.shipment_loadbox_qty = data.pod_count;
this.formData.sign_qty = data.pod_count;//签收数量 this.formData.sign_qty = data.pod_count;//签收数量
}else if(data.execute_bu=='ESBU'){
this.formData.shipment_loadbox_qty = data.sp__qty;
}else{
this.formData.shipment_loadbox_qty = data.shipment_loadbox_qty
} }
this.execute_bu= data.execute_bu this.execute_bu= data.execute_bu
const isEmpty = !Object.keys(data).length const isEmpty = !Object.keys(data).length
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
</view> </view>
<view class="tabs-outer"> <view class="tabs-outer">
<view class="tabs flex"> <view class="tabs flex">
<text :class="['tab',{'active' : tabActive==='空'}]" @click="switchTab('空')">未回单</text> <text :class="['tab',{'active' : tabActive==='空'}]" @click="switchTab('空')">未上传</text>
<text :class="['tab',{'active' : tabActive==='非空'}]" @click="switchTab('非空')">已回单</text> <text :class="['tab',{'active' : tabActive==='非空'}]" @click="switchTab('非空')">已上传</text>
</view> </view>
</view> </view>
<view class="select-options"> <view class="select-options">
......
...@@ -76,8 +76,8 @@ ...@@ -76,8 +76,8 @@
:value="viewEnums[formData.sign_status]" /> :value="viewEnums[formData.sign_status]" />
</view> </view>
</u-form-item> </u-form-item>
<u-form-item prop="plan_qty" label="应签收数量" labelWidth="35%" borderBottom> <u-form-item prop="shipment_loadbox_qty" label="应签收数量" labelWidth="35%" borderBottom>
<u-input :disabledColor="'#cecece'" disabled border="none" v-model="formData.plan_qty" /> <u-input :disabledColor="'#cecece'" disabled border="none" v-model="formData.shipment_loadbox_qty" />
</u-form-item> </u-form-item>
<u-form-item prop="sign_qty" label="签收数量" :required="true" labelWidth="35%" borderBottom> <u-form-item prop="sign_qty" label="签收数量" :required="true" labelWidth="35%" borderBottom>
<u-input :disabledColor="'#cecece'" border="none" v-model="formData.sign_qty" /> <u-input :disabledColor="'#cecece'" border="none" v-model="formData.sign_qty" />
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
<!-- 底部按钮 --> <!-- 底部按钮 -->
<view class="operation-btn flex_sb"> <view class="operation-btn flex_sb">
<button class="backBtn common_btn" @click="onNavBack">返回</button> <button class="backBtn common_btn" @click="onNavBack">返回</button>
<button class="submitBtn common_btn" @click="onSubmitForm">确认</button> <!-- <button class="submitBtn common_btn" @click="onSubmitForm">确认</button> -->
</view> </view>
<!-- 类型选择动作面板 --> <!-- 类型选择动作面板 -->
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
sign_status: "", //签收状态 sign_status: "", //签收状态
remark: "", //备注 remark: "", //备注
sign_qty: "", //签收数量 sign_qty: "", //签收数量
plan_qty: "", //应签收数量 shipment_loadbox_qty: "", //应签收数量
remark: "", //备注 remark: "", //备注
id:"",//id id:"",//id
...@@ -150,10 +150,10 @@ ...@@ -150,10 +150,10 @@
type: 'operation', type: 'operation',
align: 'center', align: 'center',
label: '操作', label: '操作',
renders: [{ renders: [/* {
name: '编辑', name: '编辑',
func: 'edit' // func 代表子元素点击的事件 父元素接收的事件 父元素 @edit func: 'edit' // func 代表子元素点击的事件 父元素接收的事件 父元素 @edit
}, }, */
{ {
name: '删除', name: '删除',
type: 'warn', type: 'warn',
...@@ -196,6 +196,13 @@ ...@@ -196,6 +196,13 @@
const data = getApp().globalData.orderPodSignEdit const data = getApp().globalData.orderPodSignEdit
const isEmpty = !Object.keys(data).length const isEmpty = !Object.keys(data).length
this.podList=data; this.podList=data;
if(data.execute_bu=='TBU'){
this.formData.shipment_loadbox_qty = data.pod_count;
}else if(data.execute_bu=='ESBU'){
this.formData.shipment_loadbox_qty = data.sp__qty;
}else{
this.formData.shipment_loadbox_qty = data.shipment_loadbox_qty
}
//获取明细 //获取明细
this.onAppIeShipmentStatus(data.id); this.onAppIeShipmentStatus(data.id);
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<u-button @click="outGate()" shape="circle" color="#2E75E6" text="已提重箱" v-if="shouldShowoutGateButton" ></u-button> <u-button @click="outGate()" shape="circle" color="#2E75E6" text="已提重箱" v-if="shouldShowoutGateButton" ></u-button>
<u-button @click="emptyCommitted()" shape="circle" color="#2E75E6" text="已还箱" v-if="shouldShowemptyCommittedButton" customStyle="margin-left: 20rpx;"></u-button> <u-button @click="emptyCommitted()" shape="circle" color="#2E75E6" text="已还箱" v-if="shouldShowemptyCommittedButton" customStyle="margin-left: 20rpx;"></u-button>
<u-button @click="report()" shape="circle" color="#2E75E6" text="在途上报" v-if="shouldShowreportButton" customStyle="margin-left: 20rpx;"></u-button> <u-button @click="report()" shape="circle" color="#2E75E6" text="在途上报" v-if="shouldShowreportButton" customStyle="margin-left: 20rpx;"></u-button>
<u-button @click="onAbnormalEvents()" shape="circle" color="#2E75E6" customStyle="margin-left: 20rpx;" text="异常上报"></u-button> <u-button @click="onAbnormalEvents()" shape="circle" color="#2E75E6" customStyle="margin-left: 20rpx;" v-if="!is_driver" text="异常上报"></u-button>
</view> </view>
</view> </view>
<!-- <view class="box_4"> <!-- <view class="box_4">
...@@ -279,14 +279,19 @@ ...@@ -279,14 +279,19 @@
'actual_arrival_factory_time':{ required: true }, 'actual_arrival_factory_time':{ required: true },
}, },
shipment_type:'', shipment_type:'',
multi_shipment_type:false multi_shipment_type:false,
is_driver:false
} }
}, },
computed: { computed: {
// 计算属性:判断是否显示派车按钮 // 计算属性:判断是否显示派车按钮
shouldShowDispatchButton() { shouldShowDispatchButton() {
if(this.is_driver){
return false
}else{
const validTypes = ['国内直达', '国际直达', '拖车段']; const validTypes = ['国内直达', '国际直达', '拖车段'];
return validTypes.includes(this.shipment_type) && !this.multi_shipment_type; return validTypes.includes(this.shipment_type) && !this.multi_shipment_type;
}
}, },
//已到厂 //已到厂
shouldShowDeliveryArrivalButton(){ shouldShowDeliveryArrivalButton(){
...@@ -406,6 +411,10 @@ ...@@ -406,6 +411,10 @@
let reqData = { let reqData = {
"args": { pageNum, pageSize } "args": { pageNum, pageSize }
} }
var user_gid=getApp().globalData.user_role
console.log("用户角色为"+user_gid)
this.is_driver=(user_gid=='DEFAULT.CARRIER_ADMIN'?true:false)
console.log("是否为司机"+this.is_driver)
if(this.searchValue){ if(this.searchValue){
reqData.args.restrictions = [{ reqData.args.restrictions = [{
"field": 'shipment_no', "field": 'shipment_no',
......
...@@ -105,6 +105,7 @@ ...@@ -105,6 +105,7 @@
onLoad(options) { onLoad(options) {
const data = getApp().globalData.choose;//勾选的数据 const data = getApp().globalData.choose;//勾选的数据
const isEmpty = !Object.keys(data).length const isEmpty = !Object.keys(data).length
this.formData.report_time=this.convertTimeHh24(new Date())
}, },
methods: { methods: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment