Browse Source

zww -刀申请修改提交

master
zuowenwen 4 years ago
parent
commit
5e55f1306f
  1. 3
      src/api/purchaseorder/purchaseRequisition.js
  2. 16
      src/views/modules/common/upload.vue
  3. 73
      src/views/modules/purchaseorder/purchaseRequisition.vue

3
src/api/purchaseorder/purchaseRequisition.js

@ -18,6 +18,9 @@ export const getExportList = data => createAPI(`PRHeader/getExportList`,'POST',d
//获取审批记录信息
export const authorizationHistList = data => createAPI(`PRHeader/getAuthorizationHistList`,'POST',data)
//获取审批记录信息
export const updatePRHeaderAuthorizeFlag = data => createAPI(`PRHeader/updatePRHeaderAuthorizeFlag`,'POST',data)

16
src/views/modules/common/upload.vue

@ -2,16 +2,16 @@
<div>
<!-- 弹窗, 上传文件 -->
<el-upload
drag
:action="url"
:before-upload="beforeUploadHandle"
:on-success="successHandle"
multiple
:file-list="fileList"
style="text-align: center;">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">只支持jpgpnggif格式的图片</div>
style="text-align: center;"> <!--drag :file-list="fileList"-->
<!-- <i class="el-icon-upload"></i>-->
<el-button size="small" type="primary">点击上传</el-button>
<!--<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">只支持jpgpnggif格式的图片</div>-->
</el-upload>
</div>
</template>
@ -46,7 +46,7 @@
console.log(this.fileList)
this.successNum++
if (response && response.code === 0) {
if (this.num === this.successNum) {
/*if (this.num === this.successNum) {
this.$confirm('操作成功, 是否继续操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -54,7 +54,7 @@
}).catch(() => {
this.visible = false
})
}
}*/
} else {
this.$message.error(response.msg)
}

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

@ -92,10 +92,11 @@
fixed="right"
header-align="center"
align="center"
width="100"
width="120"
:label="buttons.operating">
<template slot-scope="scope">
<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 @click="initReviewDetails(scope.row.requisitionno)">{{buttons.reviewDetails}}</a>
</template>
</el-table-column>
@ -202,8 +203,8 @@
v-model="currentPRDetailData.totalPrice"
:disabled="true"></el-input>
</el-form-item>
<el-form-item>
<el-form-item style="margin-top: 10px">
<upload></upload>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -221,12 +222,6 @@
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%;">
<el-table-column
type="selection"
header-align="center"
width="40"
align="center">
</el-table-column>
<el-table-column
v-for="(item,index) in columnList1" :key="index"
:sortable="item.columnSortable"
@ -275,12 +270,15 @@
getSupplierList,
getExportList,
authorizationHistList,
updatePRHeaderAuthorizeFlag,
} from '@/api/purchaseorder/purchaseRequisition.js'
import upload from "../common/upload";
export default {
// add,
// sub,
// mul,
// div,
components:{upload},
data() {
return {
// table
@ -320,7 +318,7 @@
requisitionno: '',
orderType: '',
partno: '',
authorizeFlag: '',
authorizeFlag: 'N',
site: this.$store.state.user.site,
userId: this.$store.state.user.name,
limit: '',
@ -531,7 +529,7 @@
columnLabel: "审批步骤号",
columnHidden: false,
columnImage: false,
columnSortable: true,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
@ -547,7 +545,7 @@
columnLabel: "类型",
columnHidden: false,
columnImage: false,
columnSortable: true,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
@ -557,13 +555,13 @@
functionId: 2001,
tableId: "reviewDetails2001",
tableName: "reviewDetails",
columnProp: "authUserId",
columnProp: "userName",
headerAlign: "center",
align: "center",
columnLabel: "账号",
columnHidden: false,
columnImage: false,
columnSortable: true,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
@ -573,13 +571,13 @@
functionId: 2001,
tableId: "reviewDetails2001",
tableName: "reviewDetails",
columnProp: "authUserName",
columnProp: "userDisplay",
headerAlign: "center",
align: "center",
columnLabel: "用户名称",
columnHidden: false,
columnImage: false,
columnSortable: true,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
@ -595,7 +593,7 @@
columnLabel: "审批组编码",
columnHidden: false,
columnImage: false,
columnSortable: true,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
@ -611,7 +609,7 @@
columnLabel: "审批组名称",
columnHidden: false,
columnImage: false,
columnSortable: true,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
@ -627,7 +625,7 @@
columnLabel: "最终审批人",
columnHidden: false,
columnImage: false,
columnSortable: true,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
@ -643,10 +641,11 @@
columnLabel: "最终审批时间",
columnHidden: false,
columnImage: false,
columnSortable: true,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth : 135,
},
{
userId: this.$store.state.user.name,
@ -659,7 +658,7 @@
columnLabel: "是否可以审批",
columnHidden: false,
columnImage: false,
columnSortable: true,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
@ -675,7 +674,7 @@
columnLabel: "是否审批",
columnHidden: false,
columnImage: false,
columnSortable: true,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
@ -691,7 +690,7 @@
columnLabel: "审批结果",
columnHidden: false,
columnImage: false,
columnSortable: true,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
@ -707,7 +706,7 @@
columnLabel: "审批备注",
columnHidden: false,
columnImage: false,
columnSortable: true,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
@ -736,7 +735,8 @@
defaultTable: '设置默认配置',
addLabelName: '新增',
operating: '操作',
reviewDetails : "审批详情"
reviewDetails : "审批详情",
close : '关闭'
},
// start
exportData: [],
@ -842,7 +842,7 @@
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 290;
this.height = window.innerHeight - 200;
})
},
activated() {
@ -853,6 +853,26 @@
},
methods: {
updateAuthorizeFlag(row){
let saveData = {
site : row.site,
requisitionNo : row.requisitionNo,
status : '已关闭',
authorizeFlag : 'Y',
approvedFlag : 'N',
}
updatePRHeaderAuthorizeFlag(saveData).then(({data}) =>{
if (data.code == 0) {
this.getDataList()
}
this.$alert(data.msg, '操作提示', {
confirmButtonText: '确定',
callback: action => {
}
});
})
},
initReviewDetails(orderRef1){
this.reviewDetailsFlag = true
this.reviewDetailsList = []
@ -862,6 +882,7 @@
let queryData = {
site : this.site,
orderRef1 : orderRef1,
authRuleId : 5,
}
authorizationHistList(queryData).then(({data}) =>{
this.reviewDetailsList = data.rows

Loading…
Cancel
Save