|
@@ -165,7 +165,9 @@ import {
|
|
|
tableDeleteQuery,
|
|
|
confirmDeletion,
|
|
|
pleaseCheck,
|
|
|
- copyNew
|
|
|
+ copyNew,
|
|
|
+ revoke,
|
|
|
+ withdrawBy
|
|
|
} from '@/api/purchaseRequest/index'
|
|
|
import Cookies from 'js-cookie'
|
|
|
|
|
@@ -281,6 +283,7 @@ export default {
|
|
|
name: '操作',
|
|
|
checked: 0,
|
|
|
width: 160,
|
|
|
+ fixed:'right',
|
|
|
operation: '1',
|
|
|
onabort: ''
|
|
|
}
|
|
@@ -397,6 +400,7 @@ export default {
|
|
|
checked: 0,
|
|
|
disabled: false,
|
|
|
width: 160,
|
|
|
+ fixed:'right',
|
|
|
operation: '2',
|
|
|
onabort: ''
|
|
|
}
|
|
@@ -549,7 +553,7 @@ export default {
|
|
|
label: 'cLoadDate',
|
|
|
name: '申请日期',
|
|
|
inputType: 3,
|
|
|
- width: 200,
|
|
|
+ width: 300,
|
|
|
labelSize: '80',
|
|
|
rules: [{ required: false, message: ' ' }]
|
|
|
}
|
|
@@ -896,6 +900,31 @@ export default {
|
|
|
if (list){
|
|
|
this.$refs.avatar.form = list.warehouseBills
|
|
|
this.contentList = list.tWarehousebillsfees
|
|
|
+ this.contentButton = this.$options.data().contentButton
|
|
|
+ if (this.$refs.avatar.form.fBillstatus === 6){
|
|
|
+ this.contentButton.push({
|
|
|
+ type: 'danger',
|
|
|
+ size: 'mini',
|
|
|
+ icon: 'el-icon-edit-outline',
|
|
|
+ name: '撤销采购',
|
|
|
+ disabled: false
|
|
|
+ })
|
|
|
+ }else if(this.$refs.avatar.form.fBillstatus === 4){
|
|
|
+ this.contentButton.push({
|
|
|
+ type: 'danger',
|
|
|
+ size: 'mini',
|
|
|
+ icon: 'el-icon-edit-outline',
|
|
|
+ name: '撤销审批',
|
|
|
+ disabled: false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.contentButton.forEach(item =>{
|
|
|
+ if (item.name == '返回列表' || item.name == '修改' || item.name == '打印'){
|
|
|
+ item.disabled = false
|
|
|
+ }else {
|
|
|
+ item.disabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -926,6 +955,7 @@ export default {
|
|
|
}
|
|
|
this.$refs.avatar.form = {}
|
|
|
this.getRow(data,list)
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1046,15 +1076,19 @@ export default {
|
|
|
case '打印':
|
|
|
if (!this.$refs.avatar.form.fId){
|
|
|
this.$message.error('未保存,不允许打印');
|
|
|
+ }else if (this.$refs.avatar.form.fBillstatus >= 4){
|
|
|
+ this.formList = this.$refs.avatar.form
|
|
|
+ this.dialogVisible = true
|
|
|
}else {
|
|
|
this.formList = this.$refs.avatar.form
|
|
|
+ console.log(this.$refs.avatar.form.fBillstatus)
|
|
|
this.submitAndSave(1)
|
|
|
}
|
|
|
break
|
|
|
case '修改':
|
|
|
this.contentButton.forEach(item =>{
|
|
|
if (this.$refs.avatar.form.fBillstatus >= 4){
|
|
|
- if (item.name === '返回列表' || item.name === '修改' || item.name === '生成入库单' || item.name === '生成销售单' || item.name === '查看审批' || item.name === '审批'){
|
|
|
+ if (item.name === '返回列表' || item.name == '打印' || item.name === '修改' || item.name === '生成入库单' || item.name === '生成销售单' || item.name === '查看审批' || item.name === '审批' || item.name === '撤销采购' || item.name === '撤销审批'){
|
|
|
item.disabled = false
|
|
|
}else {
|
|
|
item.disabled = true
|
|
@@ -1174,6 +1208,39 @@ export default {
|
|
|
this.$message.warning('未选择列表,请选择后再点击');
|
|
|
}
|
|
|
break
|
|
|
+ case '撤销审批':
|
|
|
+ let date = new Date()
|
|
|
+ let y = date.getFullYear()
|
|
|
+ let m = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
|
|
|
+ let d = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate())
|
|
|
+ data = {
|
|
|
+ actId:520,
|
|
|
+ id:this.$refs.avatar.form.fId,
|
|
|
+ billId:this.$refs.avatar.form.fId,
|
|
|
+ auditItem:y + '-' + m + '-' + d
|
|
|
+ }
|
|
|
+ console.log(data)
|
|
|
+ // revoke(data).then(res=>{
|
|
|
+ // console.log(res)
|
|
|
+ // })
|
|
|
+ break
|
|
|
+ case '撤销采购':
|
|
|
+ withdrawBy(this.$refs.avatar.form.fId).then(res=>{
|
|
|
+ if (res.code === 200){
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '撤销成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ data = {
|
|
|
+ tableName: this.queryList.tableName,
|
|
|
+ userId: Cookies.get('userName')
|
|
|
+ }
|
|
|
+ this.getRow(data)
|
|
|
+ this.query(this.formDataList)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break
|
|
|
default:
|
|
|
this.$message.error('该按钮暂无功能')
|
|
|
}
|