|
@@ -68,6 +68,7 @@
|
|
@change="change"
|
|
@change="change"
|
|
:tatolLabel="tatolLabel"
|
|
:tatolLabel="tatolLabel"
|
|
:isItHidden="isItHidden"
|
|
:isItHidden="isItHidden"
|
|
|
|
+ :hasPermi="hasPermi"
|
|
:customButton="contentButton"
|
|
:customButton="contentButton"
|
|
:listStyle="contentStyle"
|
|
:listStyle="contentStyle"
|
|
:queryList="purchaseList"
|
|
:queryList="purchaseList"
|
|
@@ -165,7 +166,7 @@ import {
|
|
warehouse,
|
|
warehouse,
|
|
listDelete,
|
|
listDelete,
|
|
tableDeleteQuery,
|
|
tableDeleteQuery,
|
|
- confirmDeletion, pleaseCheck, revoke, queryUserVal, getName
|
|
|
|
|
|
+ confirmDeletion, pleaseCheck, revoke, queryUserVal, getName,revokeBill
|
|
} from '@/api/purchaseIssue/index'
|
|
} from '@/api/purchaseIssue/index'
|
|
import Cookies from 'js-cookie'
|
|
import Cookies from 'js-cookie'
|
|
|
|
|
|
@@ -173,6 +174,7 @@ export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ before:'',
|
|
hasPermi:{
|
|
hasPermi:{
|
|
lookup:['anpin:stockControl:query'],
|
|
lookup:['anpin:stockControl:query'],
|
|
disappear:['anpin:stockControl:remove']
|
|
disappear:['anpin:stockControl:remove']
|
|
@@ -752,8 +754,8 @@ export default {
|
|
let date = this.$route.query
|
|
let date = this.$route.query
|
|
if (this.$route.query.list){
|
|
if (this.$route.query.list){
|
|
console.log(this.$route.query.list)
|
|
console.log(this.$route.query.list)
|
|
- this.contentButton = this.$options.data().contentButton
|
|
|
|
- this.contentButton.push(JSON.parse(this.$route.query.list))
|
|
|
|
|
|
+ // this.contentButton = this.$options.data().contentButton
|
|
|
|
+ // this.contentButton.push(JSON.parse(this.$route.query.list))
|
|
console.log(this.contentButton)
|
|
console.log(this.contentButton)
|
|
let scope = {
|
|
let scope = {
|
|
row:{
|
|
row:{
|
|
@@ -883,6 +885,30 @@ export default {
|
|
this.$refs.avatar.form = list.warehouseBills
|
|
this.$refs.avatar.form = list.warehouseBills
|
|
this.contentList = list.tWarehousebillsfees
|
|
this.contentList = list.tWarehousebillsfees
|
|
this.contentButton = this.$options.data().contentButton
|
|
this.contentButton = this.$options.data().contentButton
|
|
|
|
+ console.log(this.$route.query.list)
|
|
|
|
+ if(this.$route.query.list){
|
|
|
|
+ this.contentButton.push(JSON.parse(this.$route.query.list))
|
|
|
|
+ }
|
|
|
|
+ let data = {
|
|
|
|
+ actId: 550,
|
|
|
|
+ id: this.$refs.avatar.form.fId
|
|
|
|
+ }
|
|
|
|
+ getName(data).then(response => {
|
|
|
|
+ console.log(response)
|
|
|
|
+ if (response.data.length != 0) {
|
|
|
|
+ this.before = response.data[0].userName
|
|
|
|
+ if(this.$refs.avatar.form.fBillstatus == 6 && this.before == this.lander){
|
|
|
|
+ console.log(this.contentButton)
|
|
|
|
+ this.contentButton.push({
|
|
|
|
+ type: 'warning',
|
|
|
|
+ size: 'mini',
|
|
|
|
+ icon: 'el-icon-refresh-left',
|
|
|
|
+ name: '撤销出库',
|
|
|
|
+ disabled: false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
if(this.$refs.avatar.form.fBillstatus == 4){
|
|
if(this.$refs.avatar.form.fBillstatus == 4){
|
|
this.contentButton.push({
|
|
this.contentButton.push({
|
|
type: 'danger',
|
|
type: 'danger',
|
|
@@ -902,16 +928,6 @@ export default {
|
|
disabled: false
|
|
disabled: false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- if(this.$refs.avatar.form.fBillstatus == 6){
|
|
|
|
- console.log(this.contentButton)
|
|
|
|
- this.contentButton.push({
|
|
|
|
- type: 'warning',
|
|
|
|
- size: 'mini',
|
|
|
|
- icon: 'el-icon-refresh-left',
|
|
|
|
- name: '撤销出库',
|
|
|
|
- disabled: false
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
let operator = this.$refs.avatar.form.createBy
|
|
let operator = this.$refs.avatar.form.createBy
|
|
for(let li in this.contentButton){
|
|
for(let li in this.contentButton){
|
|
if(this.$refs.avatar.form.fBillstatus < 4){
|
|
if(this.$refs.avatar.form.fBillstatus < 4){
|
|
@@ -921,22 +937,13 @@ export default {
|
|
this.contentButton[li].disabled = true
|
|
this.contentButton[li].disabled = true
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
- if(this.contentButton[li].name == '返回列表' || this.contentButton[li].name == '申请发票' || this.contentButton[li].name == '查看审批' || this.contentButton[li].name == '撤销出库'){
|
|
|
|
|
|
+ if(this.contentButton[li].name == '返回列表' || this.contentButton[li].name == '申请发票' || this.contentButton[li].name == '修改' ||this.contentButton[li].name == '查看审批' || this.contentButton[li].name == '撤销出库'){
|
|
this.contentButton[li].disabled = false
|
|
this.contentButton[li].disabled = false
|
|
}else {
|
|
}else {
|
|
this.contentButton[li].disabled = true
|
|
this.contentButton[li].disabled = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- let data = {
|
|
|
|
- actId: 550,
|
|
|
|
- id: this.$refs.avatar.form.fId
|
|
|
|
- }
|
|
|
|
- getName(data).then(response => {
|
|
|
|
- if (response.data.length != 0) {
|
|
|
|
- this.before = response.data[0].userName
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- if(this.$refs.avatar.form.fBillstatus == 6 && this.before == this.lander){
|
|
|
|
|
|
+ if(this.$refs.avatar.form.fBillstatus == 6 ){
|
|
this.contentButton[li].disabled = false
|
|
this.contentButton[li].disabled = false
|
|
}
|
|
}
|
|
if(this.contentButton[li].name == '撤销审批' && this.lander === operator){
|
|
if(this.contentButton[li].name == '撤销审批' && this.lander === operator){
|
|
@@ -1101,6 +1108,7 @@ export default {
|
|
switch (row.name) {
|
|
switch (row.name) {
|
|
case '新增':
|
|
case '新增':
|
|
this.contentList = []
|
|
this.contentList = []
|
|
|
|
+ this.contentButton = this.$options.data().contentButton
|
|
data = {
|
|
data = {
|
|
tableName: this.purchaseList.tableName,
|
|
tableName: this.purchaseList.tableName,
|
|
userId: Cookies.get('userName')
|
|
userId: Cookies.get('userName')
|
|
@@ -1209,28 +1217,42 @@ export default {
|
|
this.addOrUpdateHand()
|
|
this.addOrUpdateHand()
|
|
break
|
|
break
|
|
case '撤销审批':
|
|
case '撤销审批':
|
|
- this.revocationOfApproval()
|
|
|
|
|
|
+ this.revocationOfApproval(1)
|
|
break
|
|
break
|
|
case '撤销出库':
|
|
case '撤销出库':
|
|
-
|
|
|
|
|
|
+ this.revocationOfApproval(2)
|
|
break
|
|
break
|
|
default:
|
|
default:
|
|
this.$message.error('该按钮暂无功能')
|
|
this.$message.error('该按钮暂无功能')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//撤销审批
|
|
//撤销审批
|
|
- revocationOfApproval(){
|
|
|
|
- let data = {
|
|
|
|
- id: this.$refs.avatar.form.fId,
|
|
|
|
- actId: 550,
|
|
|
|
- billId: this.$refs.avatar.form.fId,
|
|
|
|
- };
|
|
|
|
- revoke(data).then(res=>{
|
|
|
|
- if(res.code == 200){
|
|
|
|
- this.$message.success("撤销成功");
|
|
|
|
- this.pageDisplay = true
|
|
|
|
|
|
+ revocationOfApproval(res){
|
|
|
|
+ if(res == 1){
|
|
|
|
+ let data = {
|
|
|
|
+ id: this.$refs.avatar.form.fId,
|
|
|
|
+ actId: 550,
|
|
|
|
+ billId: this.$refs.avatar.form.fId,
|
|
|
|
+ };
|
|
|
|
+ revoke(data).then(res=>{
|
|
|
|
+ if(res.code == 200){
|
|
|
|
+ this.$message.success("撤销成功");
|
|
|
|
+ this.getList()
|
|
|
|
+ this.pageDisplay = true
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }else if(res == 2){
|
|
|
|
+ let data ={
|
|
|
|
+ fId:this.$refs.avatar.form.fId
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ revokeBill(data).then(res=>{
|
|
|
|
+ if(res.code == 200){
|
|
|
|
+ this.$message.success("撤销成功");
|
|
|
|
+ this.getList()
|
|
|
|
+ this.pageDisplay = true
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 显示搜索条件、点击后会调用此方法
|
|
// 显示搜索条件、点击后会调用此方法
|
|
showSearch() {
|
|
showSearch() {
|