|
|
@@ -693,24 +693,27 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
- <el-form :model="SubfileForm" label-width="100px">
|
|
|
- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="现场考察报告">
|
|
|
- <el-button type="primary" plain size="mini" title="上传" @click="openDialog()" >上传
|
|
|
- </el-button>
|
|
|
- <!--<el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"-->
|
|
|
- <!--:http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload">-->
|
|
|
- <!--<i class="el-icon-plus attach-uploader-icon"></i>-->
|
|
|
- <!--<!–<div slot="tip" class="el-upload__tip" v-if="SubfileForm.NeedFileType !=yasuoname">请上传图片(大小为512KB-5MB),可上传多张图片–>-->
|
|
|
- <!--<!–</div>–>-->
|
|
|
- <!--<!–<div slot="tip" class="el-upload__tip" v-if="SubfileForm.NeedFileType ==yasuoname">请上传压缩文件–>-->
|
|
|
- <!--<!–</div>–>-->
|
|
|
- <!--</el-upload>-->
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
+ <el-row v-if="formData.OperType == '制造商' && formData.Grade == '2'" >
|
|
|
+ <el-col :span="4">
|
|
|
+ <span>现场考察报告</span>
|
|
|
+ <el-button type="primary" style="margin-left: 10px;" plain size="mini" title="上传" @click="openDialog()" :disabled="formData.Status > '0'" >上传
|
|
|
+ </el-button>
|
|
|
+ <!--<el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"-->
|
|
|
+ <!--:http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload">-->
|
|
|
+ <!--<i class="el-icon-plus attach-uploader-icon"></i>-->
|
|
|
+ <!--<!–<div slot="tip" class="el-upload__tip" v-if="SubfileForm.NeedFileType !=yasuoname">请上传图片(大小为512KB-5MB),可上传多张图片–>-->
|
|
|
+ <!--<!–</div>–>-->
|
|
|
+ <!--<!–<div slot="tip" class="el-upload__tip" v-if="SubfileForm.NeedFileType ==yasuoname">请上传压缩文件–>-->
|
|
|
+ <!--<!–</div>–>-->
|
|
|
+ <!--</el-upload>-->
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <div v-for="(tmpUrl, index) in scenefileurllist">
|
|
|
+ <el-link :href="'http://'+fileurlcut(scenefile.FileUrl, index)" target="_blank" type="primary">
|
|
|
+ {{scenefile.FileName.split('$')[index]}}</el-link>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
<!--打印内容结束-->
|
|
|
<!--endprint1-->
|
|
|
<el-dialog title="现场考察报告" :visible.sync="visible" top="5vh" width="900px">
|
|
|
@@ -917,6 +920,11 @@ export default {
|
|
|
countryoptions: [],
|
|
|
countryListOptions: [],
|
|
|
waituploads: [], // 等待上传的附件列表
|
|
|
+ scenefileurllist: [],
|
|
|
+ scenefile: {
|
|
|
+ FileUrl: '',
|
|
|
+ FileName: ''
|
|
|
+ },
|
|
|
countryprops: {
|
|
|
value: 'adcode',
|
|
|
label: 'name',
|
|
|
@@ -1081,16 +1089,42 @@ export default {
|
|
|
// this.inputCompanyName(this.authUser.Profile.Realname)
|
|
|
// }
|
|
|
},
|
|
|
+ mounted () {
|
|
|
+ // this.getSupplierSceneFile()
|
|
|
+ },
|
|
|
watch: {
|
|
|
dictData: {
|
|
|
handler (newName, oldName) {
|
|
|
this.getDictOptions()
|
|
|
},
|
|
|
immediate: true
|
|
|
+ },
|
|
|
+ formData: {
|
|
|
+ handler (newName, oldName) {
|
|
|
+ this.getSupplierSceneFile()
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ fileurlcut (val, index) {
|
|
|
+ let fileurlall = val.split('$')[index]
|
|
|
+ let fileurl = fileurlall.split('|')
|
|
|
+ let retUrl = fileurl[0]
|
|
|
+ // 内网服务器专用
|
|
|
+ if (process.client && retUrl.indexOf('/upfile') === 0) {
|
|
|
+ const myDomain = window.location.host
|
|
|
+ retUrl = myDomain + '/' + retUrl
|
|
|
+ }
|
|
|
+ return retUrl
|
|
|
+ },
|
|
|
openDialog () {
|
|
|
+ if (this.formData.Id <= 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请先保存基本信息'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
this.visible = true
|
|
|
},
|
|
|
|
|
|
@@ -1113,9 +1147,8 @@ export default {
|
|
|
},
|
|
|
editSubfile () {
|
|
|
let _this = this
|
|
|
- _this.SubfileForm.SupplierId = parseInt(_this.SubfileForm.SupplierId)
|
|
|
- console.log(_this.SubfileForm, '_this.SubfileForms')
|
|
|
- _this.$axios.put('/supplier/editsubfile/' + _this.SubfileForm.Id, _this.SubfileForm)
|
|
|
+ _this.SubfileForm.SupplierId = parseInt(_this.formData.Id)
|
|
|
+ _this.$axios.put('/supplier/editsubfile/' + this.SubfileForm.SupplierId, _this.SubfileForm)
|
|
|
.then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
_this.$message({
|
|
|
@@ -1123,7 +1156,7 @@ export default {
|
|
|
message: res.data.message
|
|
|
})
|
|
|
this.visible = false
|
|
|
- this.initData()
|
|
|
+ this.$emit('initFDatas')
|
|
|
this.$refs.refuploadattach.uploadFiles = []
|
|
|
} else {
|
|
|
_this.$message({
|
|
|
@@ -1136,6 +1169,19 @@ export default {
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
+ getSupplierSceneFile () {
|
|
|
+ if (this.formData.Id !== '') {
|
|
|
+ let params = {
|
|
|
+ SupplierId: this.formData.Id
|
|
|
+ }
|
|
|
+ this.$axios.get('/supplier/getscenefilelist', {params}).then(res => {
|
|
|
+ this.scenefile = res.data.item
|
|
|
+ if (this.scenefile && this.scenefile != null) {
|
|
|
+ this.scenefileurllist = this.scenefile.FileUrl.split('$')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
makesure () {
|
|
|
if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
// 上传附件是否完成判断
|