|
|
@@ -112,6 +112,17 @@
|
|
|
>导出
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="batchDialogVisible = true"
|
|
|
+ v-hasPermi="['his:company:edit']"
|
|
|
+ >批量修改</el-button>
|
|
|
+ </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
@@ -613,6 +624,25 @@
|
|
|
<el-button @click="revenue.open=false">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 批量修改对话框 -->
|
|
|
+ <el-dialog title="批量修改主/备小程序" :visible.sync="batchDialogVisible" width="400px" append-to-body>
|
|
|
+ <el-form label-width="100px">
|
|
|
+ <el-form-item label="主小程序">
|
|
|
+ <el-select v-model="batchMaster" placeholder="请选择小程序" clearable filterable size="small" style="width:100%">
|
|
|
+ <el-option v-for="item in miniAppList" :key="item.appId" :label="item.appName" :value="item.appId" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备用小程序">
|
|
|
+ <el-select v-model="batchBackup" placeholder="请选择小程序" clearable filterable size="small" style="width:100%">
|
|
|
+ <el-option v-for="item in miniAppList" :key="item.appId" :label="item.appName" :value="item.appId" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer">
|
|
|
+ <el-button @click="batchDialogVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" :loading="batchLoading" @click="submitBatchUpdate">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -623,6 +653,7 @@ import {
|
|
|
delCompany,
|
|
|
addCompany,
|
|
|
updateCompany,
|
|
|
+ batchUpdateMiniApp,
|
|
|
recharge,
|
|
|
deduct,
|
|
|
exportCompany,
|
|
|
@@ -809,7 +840,12 @@ export default {
|
|
|
},
|
|
|
maAppList: [],
|
|
|
miniAppList: [],
|
|
|
- customAppList: []
|
|
|
+ customAppList: [],
|
|
|
+ // 批量修改相关
|
|
|
+ batchDialogVisible: false,
|
|
|
+ batchMaster: null,
|
|
|
+ batchBackup: null,
|
|
|
+ batchLoading: false,
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -840,6 +876,7 @@ export default {
|
|
|
docList().then(response => {
|
|
|
this.doctor = response.rows
|
|
|
})
|
|
|
+ this.getAppList();
|
|
|
},
|
|
|
methods: {
|
|
|
// 添加分账账户
|
|
|
@@ -1204,6 +1241,27 @@ export default {
|
|
|
}
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
+ },
|
|
|
+ // 批量修改提交
|
|
|
+ submitBatchUpdate() {
|
|
|
+ if (!this.batchMaster && !this.batchBackup) {
|
|
|
+ this.$message.warning('请至少选择主小程序或备用小程序')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.batchLoading = true
|
|
|
+ const data = {
|
|
|
+ ids: this.ids
|
|
|
+ }
|
|
|
+ if (this.batchMaster) data.miniAppMaster = [this.batchMaster]
|
|
|
+ if (this.batchBackup) data.miniAppServer = [this.batchBackup]
|
|
|
+ batchUpdateMiniApp(data).then(res => {
|
|
|
+ this.batchLoading = false
|
|
|
+ this.$message.success(res.msg || '批量修改成功')
|
|
|
+ this.batchDialogVisible = false
|
|
|
+ this.getList()
|
|
|
+ }).catch(() => {
|
|
|
+ this.batchLoading = false
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|