Kaynağa Gözat

文件回显

lining 5 yıl önce
ebeveyn
işleme
2df4af47e1

+ 1 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappendsub.go

@@ -1099,7 +1099,7 @@ func (this *OilSupplierCertAppendSubController) EditQualChange() {
 		entity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
 		_, err = svc.InsertEntityBytbl(OilAppendChangeDetailName, &entity)
 	} else {
-		err = svc.UpdateEntityBywheretbl(OilAppendChangeDetailName, &entity, []string{"OldEffectDate", "FileUrl", "FileName", "OtherRemark"}, qdwhere)
+		err = svc.UpdateEntityBywheretbl(OilAppendChangeDetailName, &entity, []string{"EffectDate", "FileUrl", "FileName", "OtherRemark"}, qdwhere)
 	}
 
 	if err == nil {

+ 1 - 1
src/dashoo.cn/frontend_web/nuxt.config.ignore.js

@@ -161,7 +161,7 @@ module.exports = {
   },
   ignore: [
     'pages/oilsupplier/addtionaudit/*.*',
-    'pages/oilsupplier/annualaudit/*.*',
+    // 'pages/oilsupplier/annualaudit/*.*',
     'pages/oilsupplier/badrecord/*.*',
     'pages/oilsupplier/basisbuild/*.*',
     'pages/oilsupplier/compayaudit/*.*',

+ 12 - 2
src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist.vue

@@ -116,7 +116,7 @@
           <el-col :span="12">
             <el-form-item label="资质文件">
               <el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"
-                :http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload">
+                 :on-remove="filremove" :http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload" :file-list="fileList">
                 <i class="el-icon-plus attach-uploader-icon"></i>
                 <div slot="tip" class="el-upload__tip" v-if="SubfileForm.NeedFileType !=yasuoname">请上传图片(大小为512KB-5MB),可上传多张图片
                 </div>
@@ -562,6 +562,7 @@
         this.SubfileForm.FileName = val.FileName
         this.SubfileForm.EffectDate = (this.jsEffectDate(val.EffectDate))
         this.SubfileForm.FileUrl = val.FileUrl
+        this.fileList = []
         if (val.FileUrl !== '') {
           this.getwendanginfo(val.FileUrl)
         }
@@ -582,9 +583,12 @@
             url: exArr[0]
           }
           _this.doclist.push(params)
+          _this.fileList.push(params)
         }
       },
-
+      filremove (file, files) {
+        this.fileList = files
+      },
       beforeAvatarUpload (file) {
         /* let isLt512K = file.size / 1024 < 512
         if (isLt512K) {
@@ -647,6 +651,12 @@
       getattachissuccess () {
         this.SubfileForm.FileUrl = ''
         this.SubfileForm.FileName = ''
+        if (this.fileList != null && this.fileList.length > 0) {
+          for (let idx in this.fileList) {
+            this.SubfileForm.FileName += this.fileList[idx].name + '$'
+            this.SubfileForm.FileUrl += this.fileList[idx].url + '|' + this.fileList[idx].name + '$'
+          }
+        }
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
             if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {

+ 36 - 7
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/operation.vue

@@ -645,7 +645,7 @@
           <el-col :span="12">
             <el-form-item label="资质文件">
               <el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"
-                         :http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload">
+                         :on-remove="filremove" :file-list="fileList" :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>
@@ -950,6 +950,7 @@
           BusinessScope: false,
           Remark: false
         },
+        fileList: [],
         SubfileForm: {
           Id: '',
           SupplierId: '',
@@ -2098,8 +2099,11 @@
         this.SubfileForm.FileType = val.FileType
         this.SubfileForm.OldFileName = val.OldFileName
         this.SubfileForm.OldEffectDate = new Date(val.OldEffectDate)
+        this.SubfileForm.EffectDate = (this.jsEffectDate(val.EffectDate))
         this.SubfileForm.OldFileUrl = val.OldFileUrl
         this.SubfileForm.OtherRemark = val.OtherRemark
+        this.SubfileForm.FileUrl = val.FileUrl
+        this.fileList = []
         if (val.FileUrl !== '') {
           this.getwendanginfo(val.FileUrl)
         }
@@ -2111,12 +2115,19 @@
       getwendanginfo (iUrl) {
         let _this = this
         _this.doclist = []
-        let exArr = iUrl.split('|')
-        let params = {
-          name: exArr[1],
-          url: exArr[0]
+        let urlArr = iUrl.split('$')
+        for (let idx in urlArr) {
+          let exArr = urlArr[idx].split('|')
+          let params = {
+            name: exArr[1],
+            url: exArr[0]
+          }
+          _this.doclist.push(params)
+          _this.fileList.push(params)
         }
-        _this.doclist.push(params)
+      },
+      filremove (file, files) {
+        this.fileList = files
       },
       beforeAvatarUpload (file) {
         /* let isLt512K = file.size / 1024 < 512
@@ -2180,6 +2191,12 @@
       getattachissuccess () {
         this.SubfileForm.FileUrl = ''
         this.SubfileForm.FileName = ''
+        if (this.fileList != null && this.fileList.length > 0) {
+          for (let idx in this.fileList) {
+            this.SubfileForm.FileName += this.fileList[idx].name + '$'
+            this.SubfileForm.FileUrl += this.fileList[idx].url + '|' + this.fileList[idx].name + '$'
+          }
+        }
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
             if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {
@@ -2437,7 +2454,19 @@
           return val.substring(0, 10)
         }
       },
-
+      jsEffectDate (val) {
+        if (val === '') {
+          return ''
+        } else if (val === '0001-01-01T00:00:00Z') {
+          return ''
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return ''
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return ''
+        } else {
+          return val
+        }
+      },
       formatDateTime (date) {
         var y = date.getFullYear()
         var m = date.getMonth() + 1

+ 42 - 14
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/basisdataopera.vue

@@ -551,7 +551,7 @@
           <el-col :span="12">
             <el-form-item label="资质文件">
               <el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"
-                :http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload">
+                         :on-remove="filremove" :file-list="fileList" :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>
               </el-upload>
@@ -903,6 +903,7 @@
         }
       }
       return {
+        fileList: [],
         myitemsshow: false,
         selectDept: 100000151,
         disabled: false,
@@ -1761,15 +1762,13 @@
       fileurlcut (val, index) {
         let fileurlall = val.split('$')[index]
         let fileurl = fileurlall.split('|')
-        let fullUrl = fileurl[0]
+        let retUrl = fileurl[0]
         // 内网服务器专用
-        if (process.client && (fullUrl.indexOf('upfile') === 0 || fullUrl.indexOf('/upfile') === 0)) {
+        if (process.client && retUrl.indexOf('/upfile') === 0) {
           const myDomain = window.location.host
-          fullUrl = 'http://' + myDomain + '/' + fullUrl
-        } else {
-          fullUrl = 'http://' + fullUrl
+          retUrl = myDomain + '/' + retUrl
         }
-        return fullUrl
+        return retUrl
       },
       commitaudit () {
         if (this.formData.InStyle === '2' || this.formData.InStyle === '6' || this.formData.InStyle === '4') {
@@ -1827,7 +1826,11 @@
         this.SubfileForm.OldEffectDate = new Date(val.OldEffectDate)
         this.SubfileForm.OldFileUrl = val.OldFileUrl
         this.SubfileForm.FileUrl = val.FileUrl
-        this.getwendanginfo(val.FileUrl)
+        this.SubfileForm.EffectDate = (this.jsEffectDate(val.EffectDate))
+        this.fileList = []
+        if (val.FileUrl !== '') {
+          this.getwendanginfo(val.FileUrl)
+        }
         this.SubfileForm.OtherRemark = val.OtherRemark
         this.SubfileForm.Remark = val.Remark
         this.SubfileForm.IsDelete = val.IsDelete
@@ -1837,12 +1840,19 @@
       getwendanginfo (iUrl) {
         let _this = this
         _this.doclist = []
-        let exArr = iUrl.split('|')
-        let params = {
-          name: exArr[1],
-          url: exArr[0]
+        let urlArr = iUrl.split('$')
+        for (let idx in urlArr) {
+          let exArr = urlArr[idx].split('|')
+          let params = {
+            name: exArr[1],
+            url: exArr[0]
+          }
+          _this.doclist.push(params)
+          _this.fileList.push(params)
         }
-        _this.doclist.push(params)
+      },
+      filremove (file, files) {
+        this.fileList = files
       },
       beforeAvatarUpload (file) {
         /* let isLt512K = file.size / 1024 < 512
@@ -1915,6 +1925,12 @@
       getattachissuccess () {
         this.SubfileForm.FileUrl = ''
         this.SubfileForm.FileName = ''
+        if (this.fileList != null && this.fileList.length > 0) {
+          for (let idx in this.fileList) {
+            this.SubfileForm.FileName += this.fileList[idx].name + '$'
+            this.SubfileForm.FileUrl += this.fileList[idx].url + '|' + this.fileList[idx].name + '$'
+          }
+        }
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
             if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {
@@ -2708,7 +2724,19 @@
         this.dialogCurrentPage = value
         this.getBasisList()
       },
-
+      jsEffectDate (val) {
+        if (val === '') {
+          return ''
+        } else if (val === '0001-01-01T00:00:00Z') {
+          return ''
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return ''
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return ''
+        } else {
+          return val
+        }
+      },
       jstimehandle (val) {
         if (val === '') {
           return '----'

+ 42 - 14
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/goodsdataopera.vue

@@ -687,7 +687,7 @@
               <!--<div slot="tip" class="el-upload__tip">大小为512KB-5MB</div>-->
               <!--</el-upload>-->
               <el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"
-                :http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload">
+                         :on-remove="filremove" :file-list="fileList" :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">大小为512KB-5MB</div>
               </el-upload>
@@ -1164,6 +1164,7 @@
       }
       return {
         // 456
+        fileList: [],
         myitemsshow: false,
         disabled: false,
         activeName: '0',
@@ -2487,15 +2488,13 @@
       fileurlcut (val, index) {
         let fileurlall = val.split('$')[index]
         let fileurl = fileurlall.split('|')
-        let fullUrl = fileurl[0]
+        let retUrl = fileurl[0]
         // 内网服务器专用
-        if (process.client && (fullUrl.indexOf('upfile') === 0 || fullUrl.indexOf('/upfile') === 0)) {
+        if (process.client && retUrl.indexOf('/upfile') === 0) {
           const myDomain = window.location.host
-          fullUrl = 'http://' + myDomain + '/' + fullUrl
-        } else {
-          fullUrl = 'http://' + fullUrl
+          retUrl = myDomain + '/' + retUrl
         }
-        return fullUrl
+        return retUrl
       },
       openDialog (val) {
         this.SubfileForm.Id = val.Id
@@ -2516,7 +2515,11 @@
         this.SubfileForm.OldEffectDate = new Date(val.OldEffectDate)
         this.SubfileForm.OldFileUrl = val.OldFileUrl
         this.SubfileForm.FileUrl = val.FileUrl
-        this.getwendanginfo(val.FileUrl)
+        this.SubfileForm.EffectDate = (this.jsEffectDate(val.EffectDate))
+        this.fileList = []
+        if (val.FileUrl !== '') {
+          this.getwendanginfo(val.FileUrl)
+        }
         this.SubfileForm.OtherRemark = val.OtherRemark
         this.SubfileForm.Remark = val.Remark
         this.SubfileForm.IsDelete = val.IsDelete
@@ -2529,12 +2532,19 @@
       getwendanginfo (iUrl) {
         let _this = this
         _this.doclist = []
-        let exArr = iUrl.split('|')
-        let params = {
-          name: exArr[1],
-          url: exArr[0]
+        let urlArr = iUrl.split('$')
+        for (let idx in urlArr) {
+          let exArr = urlArr[idx].split('|')
+          let params = {
+            name: exArr[1],
+            url: exArr[0]
+          }
+          _this.doclist.push(params)
+          _this.fileList.push(params)
         }
-        _this.doclist.push(params)
+      },
+      filremove (file, files) {
+        this.fileList = files
       },
       beforeAvatarUpload (file) {
         /* let isLt512K = file.size / 1024 < 512
@@ -2615,6 +2625,12 @@
       getattachissuccess () {
         this.SubfileForm.FileUrl = ''
         this.SubfileForm.FileName = ''
+        if (this.fileList != null && this.fileList.length > 0) {
+          for (let idx in this.fileList) {
+            this.SubfileForm.FileName += this.fileList[idx].name + '$'
+            this.SubfileForm.FileUrl += this.fileList[idx].url + '|' + this.fileList[idx].name + '$'
+          }
+        }
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
             if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {
@@ -3203,7 +3219,19 @@
         }
         this.Column.Prop = column.prop
       },
-
+      jsEffectDate (val) {
+        if (val === '') {
+          return ''
+        } else if (val === '0001-01-01T00:00:00Z') {
+          return ''
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return ''
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return ''
+        } else {
+          return val
+        }
+      },
       jstimehandle (val) {
         if (val === '') {
           return '----'

+ 42 - 14
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue

@@ -547,7 +547,7 @@
                 <!--<div slot="tip" class="el-upload__tip">大小为512KB-5MB</div>-->
               <!--</el-upload>-->
               <el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach" :http-request="uploadrequest"
-                         class="attach-uploader" :before-upload="beforeAvatarUpload">
+                         :on-remove="filremove" :file-list="fileList" class="attach-uploader" :before-upload="beforeAvatarUpload">
                 <i class="el-icon-plus attach-uploader-icon"></i>
                 <div slot="tip" class="el-upload__tip">大小为512KB-5MB</div>
               </el-upload>
@@ -904,6 +904,7 @@
         auditerOption: [], // 审批人
         allorgunitOptions: [],
         InOptions: [],
+        fileList: [],
         orgtreeprops: {
           value: 'Id',
           label: 'CodeName',
@@ -2067,15 +2068,13 @@
       fileurlcut (val, index) {
         let fileurlall = val.split('$')[index]
         let fileurl = fileurlall.split('|')
-        let fullUrl = fileurl[0]
+        let retUrl = fileurl[0]
         // 内网服务器专用
-        if (process.client && (fullUrl.indexOf('upfile') === 0 || fullUrl.indexOf('/upfile') === 0)) {
+        if (process.client && retUrl.indexOf('/upfile') === 0) {
           const myDomain = window.location.host
-          fullUrl = 'http://' + myDomain + '/' + fullUrl
-        } else {
-          fullUrl = 'http://' + fullUrl
+          retUrl = myDomain + '/' + retUrl
         }
-        return fullUrl
+        return retUrl
       },
       openDialog (val) {
         this.SubfileForm.Id = val.Id
@@ -2094,9 +2093,13 @@
         this.SubfileForm.FileName = val.FileName
         this.SubfileForm.OldFileName = val.OldFileName
         this.SubfileForm.OldEffectDate = new Date(val.OldEffectDate)
+        this.SubfileForm.EffectDate = (this.jsEffectDate(val.EffectDate))
         this.SubfileForm.OldFileUrl = val.OldFileUrl
         this.SubfileForm.FileUrl = val.FileUrl
-        this.getwendanginfo(val.FileUrl)
+        this.fileList = []
+        if (val.FileUrl !== '') {
+          this.getwendanginfo(val.FileUrl)
+        }
         this.SubfileForm.OtherRemark = val.OtherRemark
         this.SubfileForm.Remark = val.Remark
         this.SubfileForm.IsDelete = val.IsDelete
@@ -2106,12 +2109,19 @@
       getwendanginfo (iUrl) {
         let _this = this
         _this.doclist = []
-        let exArr = iUrl.split('|')
-        let params = {
-          name: exArr[1],
-          url: exArr[0]
+        let urlArr = iUrl.split('$')
+        for (let idx in urlArr) {
+          let exArr = urlArr[idx].split('|')
+          let params = {
+            name: exArr[1],
+            url: exArr[0]
+          }
+          _this.doclist.push(params)
+          _this.fileList.push(params)
         }
-        _this.doclist.push(params)
+      },
+      filremove (file, files) {
+        this.fileList = files
       },
       beforeAvatarUpload (file) {
         /* let isLt512K = file.size / 1024 < 512
@@ -2182,6 +2192,12 @@
       getattachissuccess () {
         this.SubfileForm.FileUrl = ''
         this.SubfileForm.FileName = ''
+        if (this.fileList != null && this.fileList.length > 0) {
+          for (let idx in this.fileList) {
+            this.SubfileForm.FileName += this.fileList[idx].name + '$'
+            this.SubfileForm.FileUrl += this.fileList[idx].url + '|' + this.fileList[idx].name + '$'
+          }
+        }
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
             if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {
@@ -2672,7 +2688,19 @@
         this.currentPage = 1
         this.getSortList()
       },
-
+      jsEffectDate (val) {
+        if (val === '') {
+          return ''
+        } else if (val === '0001-01-01T00:00:00Z') {
+          return ''
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return ''
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return ''
+        } else {
+          return val
+        }
+      },
       jstimehandle (val) {
         if (val === '') {
           return '----'