|
@@ -8,31 +8,31 @@
|
|
|
<ws-button :type="searchType==2?'primary':''" @click="handlestatus(2)">待结算</ws-button>
|
|
|
<ws-button :type="searchType==3?'primary':''" @click="handlestatus(3)">已结算</ws-button>
|
|
|
<ws-button :type="searchType==''?'primary':''" @click="handlestatus('')">全部</ws-button>
|
|
|
- <ws-button v-if='roleId=="9ad8abb997714ef29068f23c2ad3b125"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.view`
|
|
|
" @click="handlepass1()">通过</ws-button>
|
|
|
- <ws-button v-if='roleId=="9ad8abb997714ef29068f23c2ad3b125"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.view`
|
|
|
" @click="handlereject(3)">驳回</ws-button>
|
|
|
- <ws-button v-if='roleId=="cca3cf0ca2814d1e918f5b0a4380fe69"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.view`
|
|
|
" @click="handlepass()">通过</ws-button>
|
|
|
- <ws-button v-if='roleId=="cca3cf0ca2814d1e918f5b0a4380fe69"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.view`
|
|
|
" @click="handlereject(2)">驳回</ws-button>
|
|
|
- <ws-button v-if='roleId=="3d7b9179552b4c3e9c2d7af43962e2e4"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.payment`
|
|
|
" @click="handlepayment">付款</ws-button>
|
|
|
- <ws-button v-if='roleId=="3d7b9179552b4c3e9c2d7af43962e2e4"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.draw`
|
|
|
" @click="handleninvoice">开发票</ws-button>
|
|
|
- <ws-button v-if='roleId=="4c2d50d8ff2943c1b7a1e947feefe048"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.edit`
|
|
|
" @click="amend()">修改</ws-button>
|
|
|
- <ws-button v-if='roleId=="4c2d50d8ff2943c1b7a1e947feefe048"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.carry`
|
|
|
" @click="carryover">补货结转</ws-button>
|
|
|
- <ws-button v-if='roleId=="4c2d50d8ff2943c1b7a1e947feefe048"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.view`
|
|
|
" @click="handleAudit()">审核</ws-button>
|
|
|
</el-col>
|
|
@@ -79,6 +79,7 @@
|
|
|
border
|
|
|
:summary-method="getSummaries"
|
|
|
show-summary
|
|
|
+ :selectable='selectInit'
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
@@ -228,7 +229,13 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column label="状态" prop="status"></el-table-column>
|
|
|
+ <el-table-column label="状态" prop="status">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if='scope.row.approveStatus!=null'>{{ scope.row.approveStatus }}</span>
|
|
|
+ <span v-else>{{ scope.row.status }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
</el-table>
|
|
|
|
|
|
<!-- 页数 -->
|
|
@@ -472,6 +479,9 @@ import {
|
|
|
postopeninvoice,
|
|
|
postbatchopeninvoice,
|
|
|
} from '@/model/statisticalReport/index'
|
|
|
+import {
|
|
|
+ posthandle
|
|
|
+} from '@/model/purchasingManagement/index'
|
|
|
import { downloadFile } from '@/utils/batchDown'
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
import WsUpload from '@/components/WsUpload'
|
|
@@ -599,6 +609,18 @@ export default {
|
|
|
this.showType = this.isShow
|
|
|
},
|
|
|
methods: {
|
|
|
+ selectInit(row){
|
|
|
+//在这里一定要记得类型匹配的上。
|
|
|
+ if(row.approveStatus==null){
|
|
|
+ return true
|
|
|
+ }else if(row.approveStatus!=null){
|
|
|
+ if(row.taskId==null){
|
|
|
+ return false
|
|
|
+ }else{
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
//付款
|
|
|
handlepayment() {
|
|
|
this.amountNotPayable = 0
|
|
@@ -799,6 +821,7 @@ export default {
|
|
|
|
|
|
//审核
|
|
|
handleAudit() {
|
|
|
+ var that=this
|
|
|
if (this.modification.length == 0) {
|
|
|
this.$message.warning('请选择一条要审核的条目')
|
|
|
} else {
|
|
@@ -807,29 +830,60 @@ export default {
|
|
|
confirmButtonText: '确定',
|
|
|
type: 'warning',
|
|
|
}).then(() => {
|
|
|
- postaudit({
|
|
|
- roleFlag: 1,
|
|
|
+ // postaudit({
|
|
|
+ // roleFlag: 1,
|
|
|
+ // purchaseReceiptReportList: this.modification,
|
|
|
+ // })
|
|
|
+ // .toPromise()
|
|
|
+ // .then((response) => {
|
|
|
+ // this.$message.success('审核成功')
|
|
|
+ // this.getList()
|
|
|
+ // })
|
|
|
+ that.audit(this.modification[0],0,true,1)
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ audit(item,index,status,status1){
|
|
|
+ if(index<this.modification.length){
|
|
|
+ posthandle({ taskId: item.taskId,
|
|
|
+ approved: status,
|
|
|
+ auditMind: '34',
|
|
|
+ needReapply: false,})
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.audit(this.modification[index+1],index+1,status,status1)
|
|
|
+ }).catch((req) => {
|
|
|
+ this.$message.warning(req.message)
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ if(status){
|
|
|
+ if(status1==1){
|
|
|
+ this.$message.success('审核成功')
|
|
|
+ }else if(status1==2){
|
|
|
+ this.$message.success('通过成功')
|
|
|
+ }else if(status1==3){
|
|
|
+ this.$message.success('通过成功')
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
+ }else if(!status){
|
|
|
+ if(status1==2){
|
|
|
+ postaudit({
|
|
|
+ roleFlag: status1,
|
|
|
+ flag: 2,
|
|
|
purchaseReceiptReportList: this.modification,
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
- this.$message.success('审核成功')
|
|
|
+ this.$message.success('驳回成功')
|
|
|
this.getList()
|
|
|
- }).catch
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- handlereject(status) {
|
|
|
- if (this.modification.length == 0) {
|
|
|
- this.$message.warning('请选择要驳回的条目')
|
|
|
- } else {
|
|
|
- this.$confirm(`驳回后任务将退回到统计,是否确定驳回?`, {
|
|
|
- cancelButtonText: '取消',
|
|
|
- confirmButtonText: '确定',
|
|
|
- type: 'warning',
|
|
|
- }).then(() => {
|
|
|
- postaudit({
|
|
|
- roleFlag: status,
|
|
|
+ })
|
|
|
+ .catch((req) => {
|
|
|
+ this.$message.success('驳回失败')
|
|
|
+ })
|
|
|
+ }else if(status1==3){
|
|
|
+ postaudit({
|
|
|
+ roleFlag: status1,
|
|
|
flag: 2,
|
|
|
purchaseReceiptReportList: this.modification,
|
|
|
})
|
|
@@ -841,10 +895,41 @@ export default {
|
|
|
.catch((req) => {
|
|
|
this.$message.success('驳回失败')
|
|
|
})
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handlereject(status) {
|
|
|
+ var that=this
|
|
|
+ if (this.modification.length == 0) {
|
|
|
+ this.$message.warning('请选择要驳回的条目')
|
|
|
+ } else {
|
|
|
+ this.$confirm(`驳回后任务将退回到统计,是否确定驳回?`, {
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'warning',
|
|
|
+ }).then(() => {
|
|
|
+ // postaudit({
|
|
|
+ // roleFlag: status,
|
|
|
+ // flag: 2,
|
|
|
+ // purchaseReceiptReportList: this.modification,
|
|
|
+ // })
|
|
|
+ // .toPromise()
|
|
|
+ // .then((response) => {
|
|
|
+ // this.$message.success('驳回成功')
|
|
|
+ // this.getList()
|
|
|
+ // })
|
|
|
+ // .catch((req) => {
|
|
|
+ // this.$message.success('驳回失败')
|
|
|
+ // })
|
|
|
+ that.audit(this.modification[0],0,false,status)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
handlepass() {
|
|
|
+ var that=this
|
|
|
if (this.modification.length == 0) {
|
|
|
this.$message.warning('请选择要通过的条目')
|
|
|
} else {
|
|
@@ -853,23 +938,25 @@ export default {
|
|
|
confirmButtonText: '确定',
|
|
|
type: 'warning',
|
|
|
}).then(() => {
|
|
|
- postaudit({
|
|
|
- roleFlag: 2,
|
|
|
- flag: 1,
|
|
|
- purchaseReceiptReportList: this.modification,
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- this.$message.success('通过成功')
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- .catch((req) => {
|
|
|
- this.$message.success('通过失败')
|
|
|
- })
|
|
|
+ // postaudit({
|
|
|
+ // roleFlag: 2,
|
|
|
+ // flag: 1,
|
|
|
+ // purchaseReceiptReportList: this.modification,
|
|
|
+ // })
|
|
|
+ // .toPromise()
|
|
|
+ // .then((response) => {
|
|
|
+ // this.$message.success('通过成功')
|
|
|
+ // this.getList()
|
|
|
+ // })
|
|
|
+ // .catch((req) => {
|
|
|
+ // this.$message.success('通过失败')
|
|
|
+ // })
|
|
|
+ that.audit(this.modification[0],0,true,2)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
handlepass1() {
|
|
|
+ var that=this
|
|
|
if (this.modification.length == 0) {
|
|
|
this.$message.warning('请选择要通过的条目')
|
|
|
} else {
|
|
@@ -878,19 +965,20 @@ export default {
|
|
|
confirmButtonText: '确定',
|
|
|
type: 'warning',
|
|
|
}).then(() => {
|
|
|
- postaudit({
|
|
|
- roleFlag: 3,
|
|
|
- flag: 1,
|
|
|
- purchaseReceiptReportList: this.modification,
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- this.$message.success('通过成功')
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- .catch((req) => {
|
|
|
- this.$message.success('通过失败')
|
|
|
- })
|
|
|
+ // postaudit({
|
|
|
+ // roleFlag: 3,
|
|
|
+ // flag: 1,
|
|
|
+ // purchaseReceiptReportList: this.modification,
|
|
|
+ // })
|
|
|
+ // .toPromise()
|
|
|
+ // .then((response) => {
|
|
|
+ // this.$message.success('通过成功')
|
|
|
+ // this.getList()
|
|
|
+ // })
|
|
|
+ // .catch((req) => {
|
|
|
+ // this.$message.success('通过失败')
|
|
|
+ // })
|
|
|
+ that.audit(this.modification[0],0,true,3)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -1036,24 +1124,24 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
getList() {
|
|
|
- if(this.roleId=='4c2d50d8ff2943c1b7a1e947feefe048'){
|
|
|
- this.roleFlag=1
|
|
|
- }else if(this.roleId=='cca3cf0ca2814d1e918f5b0a4380fe69'){
|
|
|
- this.roleFlag=2
|
|
|
- }else if(this.roleId=='9ad8abb997714ef29068f23c2ad3b125'){
|
|
|
- this.roleFlag=3
|
|
|
- }else if(this.roleId=='3d7b9179552b4c3e9c2d7af43962e2e4'){
|
|
|
- this.roleFlag=4
|
|
|
- }else if(this.roleId=="4ef070439cd64784bce8844fd3f0f8e1"){
|
|
|
- this.roleFlag=''
|
|
|
- }
|
|
|
+ // if(this.roleId=='4c2d50d8ff2943c1b7a1e947feefe048'){
|
|
|
+ // this.roleFlag=1
|
|
|
+ // }else if(this.roleId=='cca3cf0ca2814d1e918f5b0a4380fe69'){
|
|
|
+ // this.roleFlag=2
|
|
|
+ // }else if(this.roleId=='9ad8abb997714ef29068f23c2ad3b125'){
|
|
|
+ // this.roleFlag=3
|
|
|
+ // }else if(this.roleId=='3d7b9179552b4c3e9c2d7af43962e2e4'){
|
|
|
+ // this.roleFlag=4
|
|
|
+ // }else if(this.roleId=="4ef070439cd64784bce8844fd3f0f8e1"){
|
|
|
+ // this.roleFlag=''
|
|
|
+ // }
|
|
|
getpurchreceipt({
|
|
|
compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
currentPage: this.currentPage,
|
|
|
pageSize: this.pageSize,
|
|
|
searchType: this.searchType,
|
|
|
contractNo: this.contractNo,
|
|
|
- roleFlag: this.roleFlag,
|
|
|
+ // roleFlag: this.roleFlag,
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then((response) => {
|