|
@@ -189,6 +189,7 @@ import {
|
|
confirmDeletion, pleaseCheck, revoke, queryUserVal, getName, revokeBill, copyNew
|
|
confirmDeletion, pleaseCheck, revoke, queryUserVal, getName, revokeBill, copyNew
|
|
} from '@/api/purchaseIssue/index'
|
|
} from '@/api/purchaseIssue/index'
|
|
import Cookies from 'js-cookie'
|
|
import Cookies from 'js-cookie'
|
|
|
|
+import Global from '@/layout/components/global'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
@@ -721,11 +722,15 @@ export default {
|
|
labelSize: '80',
|
|
labelSize: '80',
|
|
rules: [{ required: false, message: ' ' }]
|
|
rules: [{ required: false, message: ' ' }]
|
|
}
|
|
}
|
|
- ]
|
|
|
|
|
|
+ ],
|
|
|
|
+ pendingPage:null,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
activated() {
|
|
activated() {
|
|
this.homePage()
|
|
this.homePage()
|
|
|
|
+ if(this.$route.query.list){
|
|
|
|
+ this.pendingPage = JSON.parse(this.$route.query.list)
|
|
|
|
+ }
|
|
if (this.$route.query.open === 'true'){
|
|
if (this.$route.query.open === 'true'){
|
|
this.contentList = []
|
|
this.contentList = []
|
|
this.contentButton = this.$options.data().contentButton
|
|
this.contentButton = this.$options.data().contentButton
|
|
@@ -955,19 +960,34 @@ export default {
|
|
},
|
|
},
|
|
//首页审批跳转关闭返回首页
|
|
//首页审批跳转关闭返回首页
|
|
cancelTwo() {
|
|
cancelTwo() {
|
|
- this.open = false
|
|
|
|
- let view = {
|
|
|
|
- fullPath: '/purchaseIssue',
|
|
|
|
- hash: '',
|
|
|
|
- matched: Array(2),
|
|
|
|
- meta: Object,
|
|
|
|
- name: 'PurchaseIssue',
|
|
|
|
- params: Object,
|
|
|
|
- path: '/purchaseIssue',
|
|
|
|
- query: Object,
|
|
|
|
- title: '销售出库'
|
|
|
|
|
|
+ let view = {}
|
|
|
|
+ if(this.pendingPage.pendingPage){
|
|
|
|
+ view = {
|
|
|
|
+ fullPath: "/morePage/stock?open=true",
|
|
|
|
+ hash: "",
|
|
|
|
+ matched: Array(2),
|
|
|
|
+ meta: Object,
|
|
|
|
+ name: "MorePage/stock",
|
|
|
|
+ params: Object,
|
|
|
|
+ path: "/morePage/stock",
|
|
|
|
+ query: Object,
|
|
|
|
+ title: "待审数据"
|
|
|
|
+ }
|
|
|
|
+ this.$router.push({ path: '/morePage/stock' })
|
|
|
|
+ }else {
|
|
|
|
+ view = {
|
|
|
|
+ fullPath: '/purchaseIssue',
|
|
|
|
+ hash: '',
|
|
|
|
+ matched: Array(2),
|
|
|
|
+ meta: Object,
|
|
|
|
+ name: 'PurchaseIssue',
|
|
|
|
+ params: Object,
|
|
|
|
+ path: '/purchaseIssue',
|
|
|
|
+ query: Object,
|
|
|
|
+ title: '销售出库'
|
|
|
|
+ }
|
|
|
|
+ this.$router.push({ path: '/index' })
|
|
}
|
|
}
|
|
- this.$router.push({ path: '/index' })
|
|
|
|
this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
|
|
this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
|
|
if (this.isActive(view)) {
|
|
if (this.isActive(view)) {
|
|
this.toLastView(visitedViews, view)
|
|
this.toLastView(visitedViews, view)
|
|
@@ -1021,7 +1041,7 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//查询列数据
|
|
//查询列数据
|
|
- getRow(data, list) {
|
|
|
|
|
|
+ getRow(data, list, add) {
|
|
select(data).then((res) => {
|
|
select(data).then((res) => {
|
|
if (data.tableName === '销售出库详情') {
|
|
if (data.tableName === '销售出库详情') {
|
|
if (res.data.length != 0) {
|
|
if (res.data.length != 0) {
|
|
@@ -1035,7 +1055,11 @@ export default {
|
|
this.$set(this.purchaseList,'columnList',this.$options.data().contentStyle)
|
|
this.$set(this.purchaseList,'columnList',this.$options.data().contentStyle)
|
|
this.setRowList = this.$options.data().contentStyle
|
|
this.setRowList = this.$options.data().contentStyle
|
|
}
|
|
}
|
|
- this.purchaseList.columnList.forEach(item => item.disabled = true)
|
|
|
|
|
|
+ if(add){
|
|
|
|
+ this.purchaseList.columnList.forEach(item => item.disabled = false)
|
|
|
|
+ }else{
|
|
|
|
+ this.purchaseList.columnList.forEach(item => item.disabled = true)
|
|
|
|
+ }
|
|
this.pageDisplay = false
|
|
this.pageDisplay = false
|
|
this.isItHidden = false
|
|
this.isItHidden = false
|
|
this.inDex = this.contentOption.length
|
|
this.inDex = this.contentOption.length
|
|
@@ -1119,9 +1143,6 @@ export default {
|
|
this.contentButton[li].disabled = false
|
|
this.contentButton[li].disabled = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // if (this.contentButton[li].name == '撤销审批' && this.lander === operator) {
|
|
|
|
- // this.contentButton[li].disabled = false
|
|
|
|
- // }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -1161,32 +1182,12 @@ export default {
|
|
// this.contentList = res.data.tWarehousebillsCntrs
|
|
// this.contentList = res.data.tWarehousebillsCntrs
|
|
this.contentOption.forEach(item => item.disabled = true)
|
|
this.contentOption.forEach(item => item.disabled = true)
|
|
this.contentStyle.forEach(item => item.disabled = true)
|
|
this.contentStyle.forEach(item => item.disabled = true)
|
|
- this.contentButton = this.$options.data().contentButton
|
|
|
|
- this.contentButton.push({
|
|
|
|
- type: 'danger',
|
|
|
|
- size: 'mini',
|
|
|
|
- icon: 'el-icon-refresh-left',
|
|
|
|
- name: '撤销审批',
|
|
|
|
- disabled: false
|
|
|
|
- })
|
|
|
|
- this.contentButton.push({
|
|
|
|
- type: 'primary',
|
|
|
|
- size: 'mini',
|
|
|
|
- icon: 'el-icon-edit-outline',
|
|
|
|
- name: '查看审批',
|
|
|
|
- disabled: false
|
|
|
|
- })
|
|
|
|
- let operator = this.$refs.avatar.form.createBy
|
|
|
|
- for (let li in this.contentButton) {
|
|
|
|
- if (this.contentButton[li].name == '打印'||this.contentButton[li].name == '返回列表' || this.contentButton[li].name == '申请发票' || this.contentButton[li].name == '查看审批') {
|
|
|
|
- this.contentButton[li].disabled = false
|
|
|
|
- } else {
|
|
|
|
- this.contentButton[li].disabled = true
|
|
|
|
- }
|
|
|
|
- if (this.contentButton[li].name == '撤销审批' && this.lander === operator) {
|
|
|
|
- this.contentButton[li].disabled = false
|
|
|
|
- }
|
|
|
|
|
|
+ let data = {
|
|
|
|
+ tableName: this.queryList.tableName,
|
|
|
|
+ userId: Cookies.get('userName')
|
|
}
|
|
}
|
|
|
|
+ this.getRow(data)
|
|
|
|
+ this.query(this.formDataList)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -1318,7 +1319,7 @@ export default {
|
|
this.query(this.formDataList)
|
|
this.query(this.formDataList)
|
|
} else if (this.$route.query.data) {
|
|
} else if (this.$route.query.data) {
|
|
this.cancelTwo()
|
|
this.cancelTwo()
|
|
- this.$router.push({ path: '/index' })
|
|
|
|
|
|
+ // this.$router.push({ path: '/index' })
|
|
} else {
|
|
} else {
|
|
this.$confirm('当前数据未保存是否保存?', '提示', {
|
|
this.$confirm('当前数据未保存是否保存?', '提示', {
|
|
confirmButtonText: '保存',
|
|
confirmButtonText: '保存',
|
|
@@ -1341,25 +1342,6 @@ export default {
|
|
let data
|
|
let data
|
|
switch (row.name) {
|
|
switch (row.name) {
|
|
case '新单':
|
|
case '新单':
|
|
- if (row.nameTwo === '详情页'){
|
|
|
|
- this.contentList = []
|
|
|
|
- data = {
|
|
|
|
- tableName: this.purchaseList.tableName,
|
|
|
|
- userId: Cookies.get('userName')
|
|
|
|
- }
|
|
|
|
- this.$refs.avatar.form = {}
|
|
|
|
- this.getRow(data)
|
|
|
|
- this.$refs.avatar.clearVerification()
|
|
|
|
- this.contentOption.forEach(item => {
|
|
|
|
- if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
|
|
|
|
- item.disabled = true
|
|
|
|
- } else {
|
|
|
|
- item.disabled = false
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- this.contentButton.forEach(item => item.disabled = false)
|
|
|
|
- this.contentStyle.forEach(item => item.disabled = false)
|
|
|
|
- }else {
|
|
|
|
this.contentList = []
|
|
this.contentList = []
|
|
this.contentButton = this.$options.data().contentButton
|
|
this.contentButton = this.$options.data().contentButton
|
|
data = {
|
|
data = {
|
|
@@ -1367,8 +1349,7 @@ export default {
|
|
userId: Cookies.get('userName')
|
|
userId: Cookies.get('userName')
|
|
}
|
|
}
|
|
this.$refs.avatar.form = {}
|
|
this.$refs.avatar.form = {}
|
|
- this.getRow(data)
|
|
|
|
-
|
|
|
|
|
|
+ this.getRow(data,'',1)
|
|
this.contentOption.forEach(item => {
|
|
this.contentOption.forEach(item => {
|
|
if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'fBillno') {
|
|
if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'fBillno') {
|
|
item.disabled = true
|
|
item.disabled = true
|
|
@@ -1378,7 +1359,7 @@ export default {
|
|
})
|
|
})
|
|
this.contentButton.forEach(item => item.disabled = false)
|
|
this.contentButton.forEach(item => item.disabled = false)
|
|
this.contentStyle.forEach(item => item.disabled = false)
|
|
this.contentStyle.forEach(item => item.disabled = false)
|
|
- }
|
|
|
|
|
|
+ this.$refs.avatar.clearVerification()
|
|
break
|
|
break
|
|
case '复制新单':
|
|
case '复制新单':
|
|
if (row.nameTwo === '详情页'){
|
|
if (row.nameTwo === '详情页'){
|