Browse Source

zww -Bug修改

master
zuowenwen 4 years ago
parent
commit
8483de1c36
  1. 3
      src/api/purchaseorder/purchaseRequisition.js
  2. 113
      src/views/modules/purchaseorder/purchaseRequisition.vue

3
src/api/purchaseorder/purchaseRequisition.js

@ -21,6 +21,9 @@ export const authorizationHistList = data => createAPI(`PRHeader/getAuthorizatio
//获取审批记录信息
export const updatePRHeaderAuthorizeFlag = data => createAPI(`PRHeader/updatePRHeaderAuthorizeFlag`,'POST',data)
//获取审批记录信息
export const downFtpFile = data => createAPI(`ftp/file/downFtpFile?ossEntity=`+data.id,'GET')

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

@ -163,7 +163,7 @@
</el-dialog>
<el-dialog title="申请单新增" :visible.sync="addPRDetailFlag" width="522px" :close-on-click-modal="false"
<el-dialog title="申请单信息" :visible.sync="addPRDetailFlag" width="522px" :close-on-click-modal="false"
:close-on-press-escape="false" v-drag>
<el-form :inline="true" label-position="top">
<el-form-item :label="inputSearch5">
@ -189,23 +189,57 @@
</el-select>
</el-form-item>
<el-form-item :label="inputSearch6">
<el-input style="text-align: left;" v-model="currentPRDetailData.partno"></el-input>
<el-input style="text-align: left;width: 143px" v-model="currentPRDetailData.partno"></el-input>
</el-form-item>
<el-form-item :label="inputSearch7">
<el-input style="text-align: left;" @change="getNumber()" oninput="value=value.replace(/^\.+|[^\d.]/g,'')"
<el-input style="text-align: left;width: 143px" @change="getNumber()" oninput="value=value.replace(/^\.+|[^\d.]/g,'')"
v-model="currentPRDetailData.qty"></el-input>
</el-form-item>
<el-form-item :label="inputSearch8">
<el-input style="text-align: left;" v-model="currentPRDetailData.price" @change="getNumber()" oninput="value=value.replace(/^\.+|[^\d.]/g,'')"></el-input>
<el-input style="text-align: left;width: 143px" v-model="currentPRDetailData.price" @change="getNumber()" oninput="value=value.replace(/^\.+|[^\d.]/g,'')"></el-input>
</el-form-item>
<el-form-item :label="inputSearch9">
<el-input style="text-align: left;"
<el-input style="text-align: left;width: 143px"
v-model="currentPRDetailData.totalPrice"
:disabled="true"></el-input>
</el-form-item>
<el-form-item style="margin-top: 10px">
<upload v-on:childByValue="childByValue"></upload>
</el-form-item>
<el-table
height="120"
:data="fileList"
border
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList2" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="50"
:label="buttons.operating">
<template slot-scope="scope">
<a @click="fileDownload(scope.row)">{{buttons.fileDownload}}</a>
</template>
</el-table-column>
</el-table>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="addPRDetailFlag = false">取消</el-button>
@ -272,6 +306,7 @@
getExportList,
authorizationHistList,
updatePRHeaderAuthorizeFlag,
downFtpFile,
} from '@/api/purchaseorder/purchaseRequisition.js'
import upload from "../common/upload";
export default {
@ -710,6 +745,59 @@
fixed: false,
},
],
//
columnList2: [
{
userId: this.$store.state.user.name,
functionId: 2001,
tableId: "fileDetail2001",
tableName: "fileDetailTable",
columnProp: "fileName",
headerAlign: "center",
align: "center",
columnLabel: "文件名称",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 2001,
tableId: "fileDetail2001",
tableName: "fileDetailTable",
columnProp: "createDate",
headerAlign: "center",
align: "center",
columnLabel: "创建时间",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth : 135,
},
{
userId: this.$store.state.user.name,
functionId: 2001,
tableId: "fileDetail2001",
tableName: "fileDetailTable",
columnProp: "createdBy",
headerAlign: "center",
align: "center",
columnLabel: "创建人",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth : 70,
},
],
//
dataList: [],
//
@ -734,7 +822,8 @@
addLabelName: '新增',
operating: '操作',
reviewDetails : "审批详情",
close : '关闭'
close : '关闭',
fileDownload : '下载',
},
// start
exportData: [],
@ -851,6 +940,14 @@
},
methods: {
fileDownload(row){
let downLoadData = {
id : row.id
}
downFtpFile(downLoadData).then(({data}) =>{
})
},
childByValue (childValue) {
// childValue
this.fileList = childValue
@ -977,6 +1074,7 @@
})
},
initAddModel(row) {
this.fileList = []
if (row == null) {
this.currentPRDetailData.requisitionno = ''
this.currentPRDetailData.itemno = ''
@ -1088,7 +1186,6 @@
// button
getFunctionButtonList() {
searchFunctionButtonList(this.queryButton).then(({data}) => {
console.log(data.data)
if (data.data.length > 0) {
this.buttons = data.data
} else {
@ -1291,7 +1388,6 @@
console.log("数据下载完成")
},
fields(){
console.log(this.columnList)
let json = "{"
this.columnList.forEach((item,index) =>{
if (index == this.columnList.length-1 ){
@ -1302,7 +1398,6 @@
})
json +="}"
let s = eval("(" + json + ")")
console.log(s)
return s
},

Loading…
Cancel
Save