[update] 打包项目列表接口,到账开票接口,收入合同关联工作组项目加合同id,图片上传组件修改
This commit is contained in:
@@ -103,7 +103,8 @@
|
|||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
value: {
|
value: {
|
||||||
handler(val) {
|
handler() {
|
||||||
|
let val = this.value
|
||||||
if (val instanceof Array) {
|
if (val instanceof Array) {
|
||||||
this.initFileList(val.join(','))
|
this.initFileList(val.join(','))
|
||||||
} else {
|
} else {
|
||||||
@@ -122,15 +123,32 @@
|
|||||||
this.headers = {'X-Access-Token':token}
|
this.headers = {'X-Access-Token':token}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
initFileList(paths){
|
async initFileList(paths){
|
||||||
if(!paths || paths.length === 0){
|
if(!paths || paths.length === 0){
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.picUrl = true
|
this.picUrl = true
|
||||||
let arr = paths.split(',')
|
let arr = paths.split(',')
|
||||||
console.log(this.fileList)
|
let fileList = []
|
||||||
for(var a=0;a<arr.length;a++){
|
for(var a=0;a<arr.length;a++){
|
||||||
|
// 通过文件id获取文件信息
|
||||||
|
const fileObj = await this.getFileInfo(arr[a])
|
||||||
|
// 获取图片路径
|
||||||
|
const url = getFileAccessHttpUrl(fileObj.url)
|
||||||
|
fileList.push({
|
||||||
|
uid: uidGenerator(),
|
||||||
|
name: (fileObj || {}).fileName,
|
||||||
|
status: 'done',
|
||||||
|
url: url,
|
||||||
|
response: {
|
||||||
|
status: 'history',
|
||||||
|
message: arr[a],
|
||||||
|
result: fileObj
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.fileList = [...fileList]
|
||||||
this.fileList.forEach((item)=>{
|
this.fileList.forEach((item)=>{
|
||||||
if(this.returnId){
|
if(this.returnId){
|
||||||
item.url = this.getImgUrl(item.response.result.id,item.name)
|
item.url = this.getImgUrl(item.response.result.id,item.name)
|
||||||
@@ -140,7 +158,22 @@
|
|||||||
item.response.status = 'history'
|
item.response.status = 'history'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 通过文件的id获取文件的相关信息
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
getFileInfo(id) {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
let result = {}
|
||||||
|
getFileInfo({id: id}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
result = res.result
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
resolve(result)
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
beforeUpload: function(file){
|
beforeUpload: function(file){
|
||||||
var fileType = file.type
|
var fileType = file.type
|
||||||
|
|||||||
@@ -733,7 +733,9 @@ export default {
|
|||||||
// 工作组项目
|
// 工作组项目
|
||||||
case 2:
|
case 2:
|
||||||
this.$refs.selectWorkingGroupProjectModule.filters = {
|
this.$refs.selectWorkingGroupProjectModule.filters = {
|
||||||
companyId: this.selectedCompany.id
|
companyId: this.selectedCompany.id,
|
||||||
|
|
||||||
|
contractId: this.contractId
|
||||||
}
|
}
|
||||||
this.$refs.selectWorkingGroupProjectModule.open()
|
this.$refs.selectWorkingGroupProjectModule.open()
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '来款阶段',
|
title: '来款阶段',
|
||||||
width: 800,
|
width: 900,
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '开票阶段',
|
title: '开票阶段',
|
||||||
width: 800,
|
width: 900,
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
|
|||||||
@@ -146,16 +146,10 @@ export default {
|
|||||||
scopedSlots: { customRender: 'action' }
|
scopedSlots: { customRender: 'action' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dataSource: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
companyTemporaryName: '企业名称'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
url: {
|
url: {
|
||||||
list: '',
|
list: '/pack/payPackCompany/list',
|
||||||
delete: '',
|
delete: '/pack/payPackCompany/delete',
|
||||||
deleteBatch: '',
|
deleteBatch: '/pack/payPackCompany/deleteBatch',
|
||||||
exportXlsUrl: ''
|
exportXlsUrl: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,8 +126,8 @@ export default {
|
|||||||
sm: { span: 20 }
|
sm: { span: 20 }
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
add: '',
|
add: '/pack/payPackCompany/add',
|
||||||
edit: ''
|
edit: '/pack/payPackCompany/edit'
|
||||||
},
|
},
|
||||||
selectedCompany: null,
|
selectedCompany: null,
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
|
|||||||
Reference in New Issue
Block a user