aaa
nidapeng
2024-03-14 8b46c471e28fbf0b71efbe363facf0bf05d8f6f8
company/src/components/business/OperaSolutionsWindow.vue
@@ -85,6 +85,16 @@
                    <el-radio :label="1">委托投保</el-radio>
                </el-radio-group>
            </el-form-item>
          <el-form-item label="委托商户" prop="shopId" v-if="form.type =='1'">
            <el-select v-model="form.shopId"  placeholder="请选择委托商户">
              <el-option
                  v-for="item in shops"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id">
              </el-option>
            </el-select>
          </el-form-item>
            <el-form-item label="接收文件邮箱" prop="email">
                <el-input v-model="form.email" placeholder="请输入" v-trim/>
            </el-form-item>
@@ -146,6 +156,7 @@
    import { all } from '@/api/business/insurance'
    import { all as allWorktype } from '@/api/business/worktype'
    import { solutionsId } from '@/api/business/solutions'
import { pageAll as shopList } from '@/api/business/company'
    export default {
        name: 'OperaSolutionsWindow',
        extends: BaseOpera,
@@ -153,11 +164,11 @@
        data () {
            var validType = (rule, value, callback) => {
                if (this.form.validType === 0 && !value) {
                    return callback(new Error('延迟天数不能为空'));
        return callback(new Error('延迟天数不能为空'))
                } else if (this.form.validType === 0 && !/^[0-9]*[1-9][0-9]*$/.test(value)) {
                    return callback(new Error('延迟天数只能为正整数'));
        return callback(new Error('延迟天数只能为正整数'))
                }
                callback();
      callback()
            }
            return {
                // 表单数据
@@ -172,6 +183,7 @@
                    maxAge: '',
                    price: '',
                    timeUnit: '',
        shopId: null,
                    insureCycle: '',
                    insureCycleUnit: '',
                    email: '',
@@ -207,11 +219,12 @@
                    ],
                    type: [
                        { required: true, message: '请选择投保类型' }
                    ],
        ]
                    // signKeyword: [
                    //     { required: false, message: '请输入投保单签章关键字' }
                    // ]
                },
      shops: [],
                company: [],
                typeWork: []
            }
@@ -230,7 +243,7 @@
            },
            // 确认新建/修改
            confirm () {
                let data = JSON.parse(JSON.stringify(this.form))
      const data = JSON.parse(JSON.stringify(this.form))
                data.worktypeIdList = data.worktypeIdList.map(item => item.worktypeId)
                this.$refs.form.validate((valid) => {
                    if (!valid) {
@@ -276,6 +289,7 @@
                this.visible = true
                this.form.worktypeIdList = [{ worktypeId: '' }]
                this.allCompany()
      this.allShops()
                // 新建
                if (target == null) {
                    this.$nextTick(() => {
@@ -316,6 +330,13 @@
                        this.company = res
                    })
            },
    allShops () {
      shopList({ type: 1, status: 0 })
        .then(res => {
          console.log(res)
          this.shops = res
        })
    },
            add() {
                this.form.worktypeIdList.push({ worktypeId: '' })
            },