切换导航条
此项目
正在载入...
登录
朱兆平
/
vue_cli
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
小范
about a year ago
提交
b3444ab9802839f4c0a930822a0a9c5df0cb95ab
1 个父辈
30261506
转关运抵申报权限判定
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
96 行增加
和
15 行删除
src/api/trn.js
src/views/transit/transit.vue
src/api/trn.js
查看文件 @
b3444ab
import
http
from
'./http.js'
let
baseUrl
=
'wlpt-nmms-manage/trans'
let
baseUrl1
=
'cloud-user-center/perm'
...
...
@@ -12,6 +13,8 @@ export const batchSend = params => { return http.post(`${baseUrl}/batchSend`, p
export
const
addTrans
=
params
=>
{
return
http
.
post
(
`
$
{
baseUrl
}
/addTrans`, params
)
; }
;
export
const
ediTrans
=
params
=>
{
return
http
.
post
(
`
$
{
baseUrl
}
/ediTrans`, params
)
; }
;
export
const
send
=
params
=>
{
return
http
.
post
(
`
$
{
baseUrl
}
/send`, params
)
; }
;
export
const
role
=
params
=>
{
return
http
.
get
(
`
$
{
baseUrl1
}
/getPermission`, params
)
; }
;
...
...
src/views/transit/transit.vue
查看文件 @
b3444ab
...
...
@@ -132,10 +132,10 @@
<el-button type="primary" icon="el-icon-search" @click="trnList">查 询</el-button>
</el-form-item>
<el-form-item>
<el-button type="success" icon="el-icon-edit" @click="addTrn">新 增</el-button>
<el-button type="success"
:disabled="isButtonDisabled1"
icon="el-icon-edit" @click="addTrn">新 增</el-button>
</el-form-item>
<el-form-item>
<el-button type="warning" icon="el-icon-edit" :loading="batchSendLoading" @click="batchTrn">批量申报</el-button>
<el-button type="warning" icon="el-icon-edit"
:disabled="isButtonDisabled"
:loading="batchSendLoading" @click="batchTrn">批量申报</el-button>
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
...
...
@@ -282,16 +282,18 @@
<el-table-column label="操作" align="center" width="200" fixed="right">
<template slot-scope="scope">
<el-row>
<el-button type="success" @click="editTrn(scope.$index,scope.row)">编  辑</el-button>
<el-button type="danger" :disabled="scope.row.customResponseText && scope.row.customResponseText !== undefined && scope.row.customResponseText.length>0" @click="delTrn(scope.row)">
<el-button type="success" :disabled="isButtonDisabled3(scope.row)" @click="editTrn(scope.$index,scope.row)">编  辑</el-button>
<el-button type="danger" :disabled="isButtonDisabled5(scope.row)" @click="delTrn(scope.row)">
删  除
</el-button>
</el-row>
<el-row>
<el-button type="warning" :disabled="
scope.row.customResponseText && scope.row.customResponseText !== undefined && scope.row.customResponseText.length>0"
@click="declareTrn(scope.row)">
<el-button type="warning" :disabled="
isButtonDisabled2(scope.row)"
@click="declareTrn(scope.row)">
申  报
</el-button>
<el-button type="info" @click="statusTrn(scope.row)">
<!-- :disabled="scope.row.customResponseText && scope.row.customResponseText !== undefined-->
<!-- && scope.row.customResponseText.length>0 && scope.row.dstatus ==='001'"-->
<el-button type="info" :disabled="isButtonDisabled4(scope.row)" @click="statusTrn(scope.row)">
修改状态
</el-button>
</el-row>
...
...
@@ -547,12 +549,13 @@
</template>
<script>
import {selectTrans,delTrans,batchSend,ediTrans,send,addTrans} from "../../api/trn";
import {selectTrans,delTrans,batchSend,ediTrans,send,addTrans
,role
} from "../../api/trn";
import DetailedLog from '@/components/detailedDialog'
import uti from '@/utils'
import loginedUserInfo from "@/api/user";
import unloadingCode from "@/common/customs/trans_arrive_unloadingCode";
import {mapActions, mapGetters} from 'vuex'
import {list} from "../../api/consigner/sort";
export default {
...
...
@@ -670,14 +673,20 @@
trnmode: [
{ required: true, message: '请输入', trigger: 'change' }
],
}
},
queryInfo:{
name:'转关运抵申报',
url:''
},
names:'',
isButtonDisabled: false,
isButtonDisabled1: false,
}
},
mounted() {
//获取列表
this.trnList();
this.hasRole();
},
computed:{
...mapGetters(['getUserInfoStore','getUserMenuStore']),
...
...
@@ -737,6 +746,75 @@
},
methods:{
hasRole(){
const _this = this
role({name:this.queryInfo.name}).then((response) => {
console.log(this.queryInfo)
const res = response.data
console.log(response.data)
if (res.code !== '200') {
return _this.$message.error('获取权限判定失败!')
}
//返回true(关务)
else if(res.data == true){
//关务可批量申报
this.isButtonDisabled = true;
//关务不可新增
this.isButtonDisabled1 = false;
_this.names = res.data;
_this.$message.success('获取权限判定成功!')
}
//返回false(货代)
//货代不可批量申报
this.isButtonDisabled = false;
//货代可新增
this.isButtonDisabled1 = true;
_this.names = res.data;
_this.$message.success('获取权限判定成功!')
}).catch(error => {
// 关闭加载
_this.$message.error(error.toString())
})
},
//申报按钮使用权限
isButtonDisabled2(row) {
// 已申报或货代不能申报
if (row.customResponseText && row.customResponseText !== undefined
&& row.customResponseText.length>0 || row.dstatus ==='001' || this.names == false) {
return true; // 禁用按钮
} else {
return false; // 不禁用按钮
}
},
//编辑按钮使用权限
isButtonDisabled3(row) {
// 已申报或关务不能编辑
if (row.dstatus ==='001' || this.names == true) {
return true; // 禁用按钮
} else {
return false; // 不禁用按钮
}
},
//修改状态按钮使用权限
isButtonDisabled4(row) {
// 已申报或货代或关务都不能修改状态
if (row.dstatus ==='001' || this.names == false|| this.names == true) {
return true; // 禁用按钮
} else {
return false; // 不禁用按钮
}
},
//删除按钮使用权限
isButtonDisabled5(row) {
// 已申报或关务不能删除
if (row.dstatus ==='001' || this.names == true) {
return true; // 禁用按钮
} else {
return false; // 不禁用按钮
}
},
//查看回执按钮
check(row) {
this.dialogDetailedLogVisible = true
...
...
@@ -929,15 +1007,15 @@
if (this.selectedWaybillList && this.selectedWaybillList.length > 0) {
batchSend(this.selectedWaybillList).then(res => {
if (res.code === '200') {
M
essage.success('批量申报成功')
this.$m
essage.success('批量申报成功')
} else {
Message.error('批量申报成功
,请稍后重试')
this.$message.error('批量申报失败
,请稍后重试')
}
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消
修改
'
? '取消
批量申报
'
: '停留在当前页面'
})
})
...
...
@@ -945,9 +1023,9 @@
setTimeout(() => {
this.trnList()
}, 1000)
M
essage.success('批量申报执行完毕')
this.$m
essage.success('批量申报执行完毕')
} else {
M
essage.error('请选择需要批量发送的运单')
this.$m
essage.error('请选择需要批量发送的运单')
}
},
unloadcodeSearchAsync(queryString, cb) {
...
...
请
注册
或
登录
后发表评论