Browse Source

zww -申请审核修改

master
zuowenwen 4 years ago
parent
commit
4be848a983
  1. 2
      src/api/purchaseorder/purchaseRequisition.js
  2. 50
      src/views/modules/purchaseorder/procurementReview.vue
  3. 27
      src/views/modules/purchaseorder/purchaseRequisition.vue

2
src/api/purchaseorder/purchaseRequisition.js

@ -16,7 +16,7 @@ export const savePRDetail = data => createAPI(`PRHeader/savePRDetail`,'POST',dat
export const getExportList = data => createAPI(`PRHeader/getExportList`,'POST',data) export const getExportList = data => createAPI(`PRHeader/getExportList`,'POST',data)
//获取审批记录信息 //获取审批记录信息
export const authorizationHistList = data => createAPI(`PRHeader/getAuthorizationHistList`,'POST',data)
export const authorizationHistList = data => createAPI(`PRHeader/getReviewSteps`,'POST',data)
//获取审批记录信息 //获取审批记录信息
export const updatePRHeaderAuthorizeFlag = data => createAPI(`PRHeader/updatePRHeaderAuthorizeFlag`,'POST',data) export const updatePRHeaderAuthorizeFlag = data => createAPI(`PRHeader/updatePRHeaderAuthorizeFlag`,'POST',data)

50
src/views/modules/purchaseorder/procurementReview.vue

@ -96,7 +96,7 @@
width="100" width="100"
:label="buttons.operating"> :label="buttons.operating">
<template slot-scope="scope"> <template slot-scope="scope">
<a v-if="scope.row.authorizeFlag == '未审批'" @click="initReview(scope.row)">{{buttons.audit}}</a>
<a v-if="scope.row.strCanAuthFlag == 'Y'" @click="initReview(scope.row)">{{buttons.audit}}</a>
<span v-else>{{buttons.audit}}</span> <span v-else>{{buttons.audit}}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -105,7 +105,7 @@
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@current-change="currentChangeHandle" @current-change="currentChangeHandle"
:current-page="pageIndex" :current-page="pageIndex"
:page-sizes="[10, 50, 200, 500]"
:page-sizes="[100, 200, 500]"
:page-size="pageSize" :page-size="pageSize"
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper"> layout="total, sizes, prev, pager, next, jumper">
@ -130,11 +130,11 @@
</el-form-item> </el-form-item>
<el-form-item label="审批备注"> <el-form-item label="审批备注">
<!--<el-input style="width: 200px;" :readonly = "item.userName == saveData.userId && item.authFlag != 'Y' ? false : true" placeholder="" v-model="item.remark"></el-input>--> <!--<el-input style="width: 200px;" :readonly = "item.userName == saveData.userId && item.authFlag != 'Y' ? false : true" placeholder="" v-model="item.remark"></el-input>-->
<el-input type="textarea" :readonly = "(reviewStepList[index].userName == userId && reviewStepList[index].id == null && (index == 0 ? true : reviewStepList[index -1].authFlag == 'Y')) ? false : true " :rows="3" style="text-align: left;width: 415px;" v-model="item.remark"></el-input>
<el-input type="textarea" :readonly = "( reviewStepList[index].canAuthFlag == 'Y') ? false : true " :rows="3" style="text-align: left;width: 415px;" v-model="item.remark"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" v-if="(reviewStepList[index].userName == userId && reviewStepList[index].id == null && (index == 0 ? true : reviewStepList[index -1].authFlag == 'Y')) ? true : false " @click="saveReview(reviewStepList[index] ,'N')">不同意</el-button>
<el-button type="primary" v-if="(reviewStepList[index].userName == userId && reviewStepList[index].id == null && (index == 0 ? true : reviewStepList[index -1].authFlag == 'Y')) ? true : false " @click="saveReview(reviewStepList[index],'Y')">同意</el-button>
<el-button type="primary" v-if="( reviewStepList[index].canAuthFlag == 'Y') ? true : false " @click="saveReview(reviewStepList[index] ,'N')">不同意</el-button>
<el-button type="primary" v-if="( reviewStepList[index].canAuthFlag == 'Y') ? true : false " @click="saveReview(reviewStepList[index],'Y')">同意</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -241,6 +241,7 @@
authorizeFlag: 'N', authorizeFlag: 'N',
site: this.$store.state.user.site, site: this.$store.state.user.site,
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
strUserId: this.$store.state.user.id,
limit: '', limit: '',
page: '', page: '',
}, },
@ -615,7 +616,7 @@
}, },
// //
pageIndex: 1, pageIndex: 1,
pageSize: 10,
pageSize: 100,
totalPage: 0, totalPage: 0,
dataListLoading: false, dataListLoading: false,
dataListSelections: [], dataListSelections: [],
@ -624,7 +625,7 @@
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.height = window.innerHeight - 282;
this.height = window.innerHeight - 200;
}) })
}, },
activated() { activated() {
@ -671,9 +672,7 @@
}) })
}, },
saveReview(row ,val) { saveReview(row ,val) {
debugger
this.setUp.saveButton = true this.setUp.saveButton = true
this.setUp.saveButton = false
this.saveData = {} this.saveData = {}
if(row.remark == '' && row.authFlag == null){ if(row.remark == '' && row.authFlag == null){
this.$alert(data.msg, '操作提示', { this.$alert(data.msg, '操作提示', {
@ -683,38 +682,33 @@
} }
}); });
} }
this.saveData.recordTypeDb = this.menuId
this.saveData.orderRef1 = this.currentReviewStepData.requisitionno this.saveData.orderRef1 = this.currentReviewStepData.requisitionno
this.saveData.orderRef2 = ""
this.saveData.orderRef3 = ""
this.saveData.approvedFlag = val
this.saveData.site = this.site this.saveData.site = this.site
this.saveData.userName = row.userName
this.saveData.authRuleId = row.authRuleId this.saveData.authRuleId = row.authRuleId
this.saveData.stepId = row.stepId
this.saveData.authTypeDb = row.authTypeDb
this.saveData.authUserId = row.authUserId
this.saveData.authGroupId = row.authGroupId
this.saveData.actAuthorizator = row.authUserId
this.saveData.actAuthorizeDate = null
this.saveData.remark = row.remark
this.saveData.authFlag = 'Y'
this.saveData.canAuthFlag = 'N'
this.saveData.approveResultComments = ""
this.saveData.needAuthBeforePrintFlag = row.needAuthBeforePrintFlag
this.saveData.needDoubleConfirmFlag = "N"
this.saveData.firstStepFlag = row.firstStepFlag
this.saveData.lastStepFlag = row.lastStepFlag this.saveData.lastStepFlag = row.lastStepFlag
this.saveData.id = row.id
this.saveData.approveResultComments = row.approveResultComments
this.saveData.partNo = this.currentReviewStepData.partno this.saveData.partNo = this.currentReviewStepData.partno
this.saveData.itemNo = this.currentReviewStepData.itemno this.saveData.itemNo = this.currentReviewStepData.itemno
this.saveData.qty = this.currentReviewStepData.qty this.saveData.qty = this.currentReviewStepData.qty
this.saveData.userName = row.userName
this.saveData.authTypeDb = row.authTypeDb
this.saveData.authUserId = row.authUserId
this.saveData.authGroupId = row.authGroupId
this.saveData.orderType = this.currentReviewStepData.orderType this.saveData.orderType = this.currentReviewStepData.orderType
this.saveData.supplierId = this.currentReviewStepData.supplierid this.saveData.supplierId = this.currentReviewStepData.supplierid
this.saveData.supplierName = this.currentReviewStepData.suppliername this.saveData.supplierName = this.currentReviewStepData.suppliername
this.saveData.torNumdown = 1 this.saveData.torNumdown = 1
this.saveData.torNumacc = 1 this.saveData.torNumacc = 1
this.saveData.approvedFlag = val
this.saveData.stepId = row.stepId
this.saveData.remark = row.remark
if(val == "Y"){ if(val == "Y"){
this.saveData.approveResult = "审批部分通过"
if(row.lastStepFlag == 'Y'){
this.saveData.approveResult = "审批全通过"
}else {
this.saveData.approveResult = "审批部分通过"
}
}else if(val == "N"){ }else if(val == "N"){
this.saveData.approveResult = "审批未通过" this.saveData.approveResult = "审批未通过"
} }

27
src/views/modules/purchaseorder/purchaseRequisition.vue

@ -97,6 +97,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<a v-if="scope.row.authorizeFlag == '未审批'" @click="initAddModel(scope.row)">{{buttons.edit}}</a> <a v-if="scope.row.authorizeFlag == '未审批'" @click="initAddModel(scope.row)">{{buttons.edit}}</a>
<a v-if="scope.row.authorizeFlag == '未审批'"@click="updateAuthorizeFlag(scope.row)">{{buttons.close}}</a> <a v-if="scope.row.authorizeFlag == '未审批'"@click="updateAuthorizeFlag(scope.row)">{{buttons.close}}</a>
<a v-if="scope.row.authorizeFlag == '已审批'"@click="initReapply(scope.row)">{{buttons.reapply}}</a>
<a @click="initReviewDetails(scope.row.requisitionno)">{{buttons.reviewDetails}}</a> <a @click="initReviewDetails(scope.row.requisitionno)">{{buttons.reviewDetails}}</a>
</template> </template>
</el-table-column> </el-table-column>
@ -346,6 +347,8 @@
taxcode : '', taxcode : '',
currencyRate : 1, currencyRate : 1,
additionalCose : 0, additionalCose : 0,
orderref1 : '',
orderref2 : '',
}, },
mainQueryData: { mainQueryData: {
requisitionno: '', requisitionno: '',
@ -636,7 +639,7 @@
functionId: 2001, functionId: 2001,
tableId: "reviewDetails2001", tableId: "reviewDetails2001",
tableName: "reviewDetails", tableName: "reviewDetails",
columnProp: "authRuleId",
columnProp: "strRuleDesc",
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "审批组名称", columnLabel: "审批组名称",
@ -652,7 +655,7 @@
functionId: 2001, functionId: 2001,
tableId: "reviewDetails2001", tableId: "reviewDetails2001",
tableName: "reviewDetails", tableName: "reviewDetails",
columnProp: "actAuthorizator",
columnProp: "strActAuthorizator",
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "最终审批人", columnLabel: "最终审批人",
@ -685,7 +688,7 @@
functionId: 2001, functionId: 2001,
tableId: "reviewDetails2001", tableId: "reviewDetails2001",
tableName: "reviewDetails", tableName: "reviewDetails",
columnProp: "canAuthFlag",
columnProp: "strCanAuthFlag",
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "是否可以审批", columnLabel: "是否可以审批",
@ -701,7 +704,7 @@
functionId: 2001, functionId: 2001,
tableId: "reviewDetails2001", tableId: "reviewDetails2001",
tableName: "reviewDetails", tableName: "reviewDetails",
columnProp: "authFlag",
columnProp: "strAuthFlag",
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "是否审批", columnLabel: "是否审批",
@ -733,7 +736,7 @@
functionId: 2001, functionId: 2001,
tableId: "reviewDetails2001", tableId: "reviewDetails2001",
tableName: "reviewDetails", tableName: "reviewDetails",
columnProp: "approveResultComments",
columnProp: "remark",
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "审批备注", columnLabel: "审批备注",
@ -824,6 +827,7 @@
reviewDetails : "审批详情", reviewDetails : "审批详情",
close : '关闭', close : '关闭',
fileDownload : '下载', fileDownload : '下载',
reapply : '重新申请',
}, },
// start // start
exportData: [], exportData: [],
@ -955,7 +959,7 @@
updateAuthorizeFlag(row){ updateAuthorizeFlag(row){
let saveData = { let saveData = {
site : row.site, site : row.site,
requisitionNo : row.requisitionNo,
requisitionno : row.requisitionno,
status : '已关闭', status : '已关闭',
authorizeFlag : 'Y', authorizeFlag : 'Y',
approvedFlag : 'N', approvedFlag : 'N',
@ -1073,7 +1077,12 @@
this.orderTypeList = data.rows this.orderTypeList = data.rows
}) })
}, },
initAddModel(row) {
initReapply(row){
this.currentPRDetailData.orderref1 = row.requisitionno
this.currentPRDetailData.orderref2 = row.itemno
this.initAddModel(null ,'Y')
},
initAddModel(row ,val) {
this.fileList = [] this.fileList = []
if (row == null) { if (row == null) {
this.currentPRDetailData.requisitionno = '' this.currentPRDetailData.requisitionno = ''
@ -1098,6 +1107,10 @@
this.currentPRDetailData.status = '' this.currentPRDetailData.status = ''
this.currentPRDetailData.taxCode = row.taxCode this.currentPRDetailData.taxCode = row.taxCode
} }
if(val != 'Y'){
this.currentPRDetailData.orderref1 = null
this.currentPRDetailData.orderref2 = null
}
this.getNumber() this.getNumber()
this.bannersBut = false this.bannersBut = false
this.addPRDetailFlag = true this.addPRDetailFlag = true

Loading…
Cancel
Save