aaa
nidapeng
2024-03-14 8b46c471e28fbf0b71efbe363facf0bf05d8f6f8
company/src/components/business/modification.vue
@@ -36,6 +36,20 @@
            </el-table-column>
            <el-table-column
                align="center"
              label="委托商户">
            <template slot-scope="scope">
              <el-select  v-model="scope.row.shopId" clearable="true" value-key="id" placeholder="请选择">
                <el-option
                    v-for="item in shops"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id">
                </el-option>
              </el-select>
            </template>
          </el-table-column>
            <el-table-column
                align="center"
                label="加减保功能">
                <template slot-scope="{row}">
                    <el-checkbox :true-label="1" :false-label="0" v-model="row.canAdd">加保</el-checkbox>
@@ -57,9 +71,9 @@
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import { all } from '@/api/business/solutions'
    import { listForCompany } from '@/api/business/solutions'
    import { updateSolutions } from '@/api/business/company'
import { all, listForCompany } from '@/api/business/solutions'
import { updateSolutions, pageAll as shopList } from '@/api/business/company'
    export default {
        name: 'modification',
@@ -84,7 +98,8 @@
                        { required: true, message: '请输入公司账号' }
                    ]
                },
                programme: []
      programme: [],
      shops: []
            }
        },
        created () {
@@ -124,9 +139,14 @@
                    .then(res => {
                        this.programme = res
                    })
      shopList({ type: 1, status: 0 })
        .then(res => {
          console.log(res)
          this.shops = res
        })
            },
            open (title, target) {
                var that = this;
      var that = this
                this.title = title
                for (const key in this.form) {
                    this.form[key] = target[key]
@@ -137,6 +157,7 @@
                        that.form.solutionList = resa.map(item => {
                            return {
                                solution: {id: item.solutionId, baseId: item.solutionBaseId },
              shopId: item.shopId,
                                canAdd: item.canAdd,
                                canReduce: item.canReduce
                            }
@@ -148,6 +169,7 @@
            add() {
                this.form.solutionList.push({
                    solution: { id: null, baseId: null },
        shopId: null,
                    canAdd: '',
                    canReduce: ''
                })