|
@@ -44,6 +44,7 @@
|
|
|
:dataList="dataList"
|
|
|
:inDex="inDex"
|
|
|
ref="avatar"
|
|
|
+ @writeOff="writeOff"
|
|
|
@submitForm="submitForm"
|
|
|
@returnToForm="returnToForm"
|
|
|
@submitAndSave="submitAndSave"
|
|
@@ -151,7 +152,8 @@ import {
|
|
|
warehouse,
|
|
|
listDelete,
|
|
|
tableDeleteQuery,
|
|
|
- confirmDeletion
|
|
|
+ confirmDeletion,
|
|
|
+ pleaseCheck
|
|
|
} from '@/api/purchaseRequest/index'
|
|
|
import Cookies from 'js-cookie'
|
|
|
|
|
@@ -814,6 +816,13 @@ export default {
|
|
|
console.log(scope)
|
|
|
this.contentOption.forEach(item => item.disabled = true)
|
|
|
this.contentStyle.forEach(item => item.disabled = true)
|
|
|
+ this.contentButton.forEach(item =>{
|
|
|
+ if (item.name == '返回列表' || item.name == '修改'){
|
|
|
+ item.disabled = false
|
|
|
+ }else {
|
|
|
+ item.disabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
viewSingle(scope.row.fId).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
let data = {
|
|
@@ -917,6 +926,7 @@ export default {
|
|
|
item.disabled = false
|
|
|
}
|
|
|
})
|
|
|
+ this.contentStyle.forEach(item => item.disabled = false)
|
|
|
this.$refs.avatar.form.createBy = Cookies.get('userName')
|
|
|
break
|
|
|
case '保存':
|
|
@@ -931,14 +941,25 @@ export default {
|
|
|
}
|
|
|
break
|
|
|
case '修改':
|
|
|
- this.contentOption.forEach(item => {
|
|
|
- if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy') {
|
|
|
- item.disabled = true
|
|
|
- } else {
|
|
|
+ this.contentButton.forEach(item =>{
|
|
|
+ if (this.$refs.avatar.form.fBillstatus > 4){
|
|
|
+ if (item.name == '返回列表' || item.name == '修改'){
|
|
|
+ item.disabled = false
|
|
|
+ }else {
|
|
|
+ item.disabled = true
|
|
|
+ }
|
|
|
+ }else {
|
|
|
item.disabled = false
|
|
|
+ this.contentStyle.forEach(item => item.disabled = false)
|
|
|
+ this.contentOption.forEach(item => {
|
|
|
+ if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy') {
|
|
|
+ item.disabled = true
|
|
|
+ } else {
|
|
|
+ item.disabled = false
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
- this.contentStyle.forEach(item => item.disabled = false)
|
|
|
break
|
|
|
case '录入':
|
|
|
this.contentList.push({
|
|
@@ -983,11 +1004,28 @@ export default {
|
|
|
}
|
|
|
break
|
|
|
case '请核':
|
|
|
-
|
|
|
+ if (this.$refs.avatar.form.fBillstatus < 4){
|
|
|
+ this.$refs.avatar.submitForm('check')
|
|
|
+ }
|
|
|
+ break
|
|
|
default:
|
|
|
this.$message.error('该按钮暂无功能')
|
|
|
}
|
|
|
},
|
|
|
+ //请核
|
|
|
+ writeOff(){
|
|
|
+ let formData = new window.FormData()
|
|
|
+ formData.append('tWarehousebills', JSON.stringify(this.$refs.avatar.form))
|
|
|
+ formData.append('tWarehousebillsfees', JSON.stringify(this.contentList))
|
|
|
+ formData.append('fBilltype', 'SQ')
|
|
|
+ pleaseCheck(formData).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success('请核成功')
|
|
|
+ this.$refs.avatar.form = res.data.warehouseBills
|
|
|
+ this.contentList = res.data.tWarehousebillsCntrs
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 显示搜索条件、点击后会调用此方法
|
|
|
showSearch() {
|
|
|
console.log('到我了')
|