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 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> <div>
<!-- 弹窗, 上传文件 --> <!-- 弹窗, 上传文件 -->
<el-upload <el-upload
drag
:action="url" :action="url"
:before-upload="beforeUploadHandle" :before-upload="beforeUploadHandle"
:on-success="successHandle" :on-success="successHandle"
multiple 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> </el-upload>
</div> </div>
</template> </template>
@ -46,7 +46,7 @@
console.log(this.fileList) console.log(this.fileList)
this.successNum++ this.successNum++
if (response && response.code === 0) { if (response && response.code === 0) {
if (this.num === this.successNum) {
/*if (this.num === this.successNum) {
this.$confirm('操作成功, 是否继续操作?', '提示', { this.$confirm('操作成功, 是否继续操作?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -54,7 +54,7 @@
}).catch(() => { }).catch(() => {
this.visible = false this.visible = false
}) })
}
}*/
} else { } else {
this.$message.error(response.msg) this.$message.error(response.msg)
} }

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

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

Loading…
Cancel
Save