nidapeng
2024-03-29 9dc6e13e7aea2e6e6f8e32fdd2152d4ce9cb76a1
company/src/components/business/OperaSolutionsWindow.vue
@@ -95,6 +95,9 @@
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="上传方案确认书:" prop="fanganFile" v-if="form.type =='1'">
            <UploadFile   :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList1" @uploadSuccess="editFanganFile" />
          </el-form-item>
            <el-form-item label="接收文件邮箱" prop="email">
                <el-input v-model="form.email" placeholder="请输入" v-trim/>
            </el-form-item>
@@ -157,10 +160,11 @@
import { all as allWorktype } from '@/api/business/worktype'
import { solutionsId } from '@/api/business/solutions'
import { pageAll as shopList } from '@/api/business/company'
import UploadFile from "@/components/common/UploadFile";
export default {
  name: 'OperaSolutionsWindow',
  extends: BaseOpera,
  components: { GlobalWindow },
  components: { GlobalWindow ,UploadFile},
  data () {
    var validType = (rule, value, callback) => {
      if (this.form.validType === 0 && !value) {
@@ -192,6 +196,8 @@
        ortherInfo: '',
        signKeyword: '',
        validTypeNum: '',
        fileList1:[],
        fanganFile:null,
        worktypeIdList: [{ worktypeId: '' }]
      },
      // 验证规则
@@ -236,6 +242,9 @@
    })
  },
  methods: {
    editFanganFile(data){
      this.form.fanganFile=data
    },
    // 切换公司
    getAllWorktype1 () {
      this.form.worktypeIdList = [{ worktypeId: '' }]
@@ -287,7 +296,10 @@
      this.form.insureCycleUnit = ''
      this.form.validTypeNum = ''
      this.visible = true
      this.form.fanganFile=null
      this.form.fileList1= new Array();
      this.form.worktypeIdList = [{ worktypeId: '' }]
      // this.$refs['$upload'].clearFiles()//初始化导入组件
      this.allCompany()
      this.allShops()
      // 新建
@@ -305,6 +317,10 @@
            for (const key in this.form) {
              this.form[key] = res[key]
            }
            if(this.form.fanganFile && this.form.fanganFile.fileurl){
              this.form.fileList1= [{url: this.form.fanganFile.fileurlFull, name:this.form.fanganFile.name}];
            }
            console.log(this.form.fileList1)
            this.form.worktypeIdList = res.worktypeList.map(item => {
              return {
                worktypeId: item.worktypeId