物资厂家管理新增营业执照

This commit is contained in:
jjLv 2024-10-29 14:08:31 +08:00
parent f0d04656a3
commit 150ca02fdb
3 changed files with 34 additions and 20 deletions

View File

@ -24,6 +24,21 @@ export function imgUpLoad(param){
})
}
export function imgUpLoadThree(param){
const formData = new FormData()
param.forEach(item => {
formData.append('files', item)
})
// formData.append('files', param)
console.log('param',param)
console.log('formData',formData)
return request({
url: '/file/uploadFiles',
method: 'post',
data: formData,
header:'multipart/form-data'
})
}
//资源文件上传

View File

@ -231,7 +231,7 @@
<script>
import { getListFacturer,getFacturerDetail,editFacturer,addFacturer,delFacturer } from "@/api/ma/supplier";
import { imgUpLoadTwo, fileUpLoad } from '@/api/system/upload'
import { imgUpLoadThree, fileUpLoad } from '@/api/system/upload'
import { downloadFile } from '@/utils/download'
import { getToken } from '@/utils/auth'
export default {
@ -336,9 +336,9 @@
},
//
async imgUpLoadTwoAll(param, name, index) {
async imgUpLoadTwoAll(param) {
param.type = 'ma'
imgUpLoadTwo(param)
imgUpLoadThree(param)
.then((res) => {
if (res.code == 200) {
let obj = {'name':res.data.name,'url':res.data.url}
@ -461,12 +461,16 @@
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.businessLicenseListTemp=[];
this.businessLicenseFileList=[];
this.showHouse = true
this.title = '新增'
},
handleUpdate(row){
this.reset()
this.businessLicenseListTemp=[];
this.businessLicenseFileList=[];
const supplierId = row.supplierId
getFacturerDetail(supplierId).then((response) => {
this.form = response.data;
@ -511,25 +515,20 @@
},
async getImaUpload(){
const reqData = new FormData()
const {fileTwo} = await this.getFileData()
for (const item of fileTwo){
let obj={file: item};
try {
const res = await imgUpLoadTwo(obj);
const reqData = new FormData()
const {fileTwo} = await this.getFileData()
let res = await imgUpLoadThree(fileTwo);
if (res.code === 200) {
let objTwo = { 'name': res.data.name, 'url': res.data.url };
res.data.forEach(item=>{
let objTwo = { 'fileName': item.name, 'fileUrl': item.url,'modelId': null, 'dicId':4 };
console.log('obj', objTwo);
this.businessLicenseFileList.push(objTwo);
})
} else {
this.$modal.msgError(res.msg);
}
} catch (error) {
this.$modal.msgError(error);
}
}
},
},
async addFacturerTemp(form){
console.log('businessLicenseFileList',this.businessLicenseFileList)
this.form.businessLicenseFileList=this.businessLicenseFileList

View File

@ -396,20 +396,20 @@
<el-row :gutter="24">
<el-col :span="20">
<el-form :model="form" ref="form" size="small" :inline="true" >
<el-form-item label="通知内容:" prop="remark" label-width="120px">
<el-form-item label="通知内容:" prop="remark" label-width="100px">
<el-input
v-model="form.remark"
type="textarea"
:autosize="{ minRows: 4, maxRows: 6 }"
:autosize="{ minRows: 3, maxRows: 6 }"
placeholder="请输入通知内容"
style="width: 80%"
style="width: 450px"
/>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-table v-loading="loadingTwo" :data="getListPeople" width="600px" height = "600px" >
<el-table v-loading="loadingTwo" :data="getListPeople" width="600px" height = "500px" >
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
<el-table-column label="人员名称" align="center" prop="userName" sortable/>
<el-table-column label="所属机构" align="center" prop="newdeptId" sortable/>