<!--资料预审弹窗--> <template> <el-dialog title="资料预审" width="975px" :visible.sync="isShowInfo" append-to-body @close="close"> <div class="reviewDialog"> <div class="Dialog-input"> <div class="inputContent"> <div class="inputBox"> <red-star /> <input-vue v-model="addInfo.supplierCode" title="供应商编号" disabled placeholder="请输入编号" class="inputWidth" width="200px" /> </div> <div class="inputBox"> <red-star /> <input-vue title="资料预审结果" class="inputWidth"> <el-select v-model="addInfo.preReviewResultValue" clearable placeholder="请选择" style="width:200px"> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" /> </el-select> </input-vue> </div> <div class="inputBox"> <red-star /> <input-vue title="资料预审日期" class="inputWidth"> <el-input v-model="addInfo.preReviewDate" placeholder="请选择日期" suffix-icon="el-icon-date" style="width:200px" /> </input-vue> </div> </div> <div class="inputContent"> <div class="inputBox"> <red-star /> <input-vue v-model="addInfo.supplierName" title="供应商名称" disabled placeholder="请输入供应商名称" class="inputWidth" width="200px" /> </div> <div class="inputBox"> <input-vue title="资料预审说明" class="inputWidth"> <el-input v-model="addInfo.preReviewIllustration" type="textarea" :rows="2" placeholder="请输入审核说明" style="width:200px" /> </input-vue> </div> </div> </div> <div class="imgContent"> <div class="img-box"> <el-upload :headers="myHeaders" class="upload-demo" action="http://111.198.10.15:21403/file/uploadFile" :on-preview="handlePreview" :on-remove="handleRemove" :on-success="handleSuccess" :file-list="fileList" list-type="picture" > <el-button size="small" type="primary"> 上传资料预审结果 </el-button> <div slot="tip" class="el-upload__tip"> 只能上传jpg/png文件,且不超过500kb </div> </el-upload> </div> </div> <div class="btnBox"> <el-button type="primary" class="save" @click="save"> 保存 </el-button> <el-button type="info" class="close" @click="close"> 取消 </el-button> </div> </div> </el-dialog> </template> <script> import dialogHeader from './dialogHeader.vue' import inputVue from '../input/inputVue.vue' import RedStar from '../redStar.vue' import { Message } from 'element-ui' import { getToken } from '@/utils/auth' import { inquiryAdd } from '../../../api/supplier/supplier' export default { components: { inputVue, dialogHeader, RedStar }, props: { dataInfo: { type: Object, dataInfo: {} } }, data() { return { isShowInfo: true, myHeaders: { token: getToken() }, options: [ { label: '预审通过', value: '预审通过' }, { label: '预审不通过', value: '预审不通过' } ], addInfo: { supplierCode: '', supplierName: '', preReviewResultValue: '', preReviewIllustration: '', preReviewDate: '', preReviewFile: '' }, fileList: [ ] } }, watch: { dataInfo: { handler(val) { console.log(val) if (val != '') { this.addInfo = { supplierCode: val.supplierCode, supplierName: val.supplierName } console.log(this.addInfo) } }, deep: true, immediate: true } }, methods: { close() { this.$emit('close') }, handleRemove(file, fileList) { console.log(file, fileList) }, handlePreview(file) { console.log(file) }, handleSuccess(response) { console.log(response) this.addInfo.preReviewFile = response.data.fileId }, save() { inquiryAdd(this.addInfo).then(res => { console.log(res) if (!res.code) { this.close() Message.success('保存成功') } }) } } } </script> <style lang='scss' scoped> .reviewDialog { width: 975px; padding: 0 20px; box-sizing: border-box; .Dialog-input { padding: 10px 20px; display: flex; .inputContent { margin-right: 30px; display: flex; flex: 1; flex-direction: column; .inputBox { width: 350px; display: flex; justify-content: space-between; align-items: center; } } } .imgContent { margin: 20px; display: flex; .img-box { margin-right: 48px; width: 100%; height: 250px; padding: 10px 40px; border: 1px solid #000; } } .btnBox { padding: 30px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-evenly; .save, .close { width: 100px; } } } </style>