From 80fd41ea0dc602ac3ca33778f17fce5bc2e817b1 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 16 一月 2026 18:58:33 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
admin/src/components/business/OperaChangeShopWindow.vue | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 109 insertions(+), 0 deletions(-)
diff --git a/admin/src/components/business/OperaChangeShopWindow.vue b/admin/src/components/business/OperaChangeShopWindow.vue
new file mode 100644
index 0000000..a966340
--- /dev/null
+++ b/admin/src/components/business/OperaChangeShopWindow.vue
@@ -0,0 +1,109 @@
+<template>
+ <GlobalWindow
+ :title="title"
+ width="60%"
+ :visible.sync="visible"
+ :confirm-working="isWorking"
+ @confirm="confirm"
+ >
+ <p class="tip-warn" style="margin: 30px;"><i class="el-icon-warning"></i>鎿嶄綔璇存槑锛氳鎿嶄綔鍙拡瀵瑰凡缁戝畾缁忛攢鍟嗙殑瀹㈡埛鏈夋晥锛�</p>
+ <el-form :model="form" ref="form" :rules="rules" label-suffix="锛�" inline>
+ <el-form-item label="褰撳墠宸茬粦瀹氱殑缁忛攢鍟�" label-width="200px" >
+ <span>{{form.shopName}}</span>
+ </el-form-item>
+ <el-form-item label="閫夋嫨鏂扮殑缁忛攢鍟�" label-width="200px" prop="bindShopId" >
+ <el-select v-model="form.bindShopId" clearable filterable 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>
+ </GlobalWindow>
+</template>
+
+<script>
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import { allList as shopList } from '@/api/business/shop'
+export default {
+ name: 'OperaChangeShopWindow',
+ extends: BaseOpera,
+ components: { GlobalWindow },
+ data () {
+ return {
+ searchLoading: false,
+ users: [],
+ // 琛ㄥ崟鏁版嵁
+ oldId:null,
+ form: {
+ id: null,
+ shopName: null,
+ bindShopId: null
+ },
+ shops: [],
+ rules: {
+ bindShopId: [
+ { required: true, message: '璇烽�夋嫨鏂扮殑缁忛攢鍟�' }
+ ]
+ }
+ }
+ },
+ created () {
+ this.config({
+ api: '/business/member',
+ 'field.id': 'id'
+ })
+ },
+ methods: {
+ confirm () {
+ this.$refs.form.validate((valid) => {
+ if (!valid) {
+ return
+ }
+ this.isWorking = true
+ this.api.updateShop(this.form)
+ .then(() => {
+ this.visible = false
+ this.$tip.apiSuccess('鎿嶄綔鎴愬姛')
+ this.$emit('success')
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking = false
+ })
+ })
+ },
+ getShopList () {
+ shopList({ status: 0 })
+ .then(res => {
+ if (res) {
+ this.shops = res || []
+ }
+ })
+ },
+ open (title, target) {
+ this.title = title
+ this.visible = true
+ this.oldId=target.bindShopId
+ this.form.id = target.id
+ this.form.shopName = target.shopName
+ this.form.bindShopId = null
+ this.getShopList()
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+@import "@/assets/style/alertstyle.scss";
+::v-deep .el-form-item__content {
+ flex: 0.6;
+}
+::v-deep .el-select {
+ width: 100%;
+ .el-input__inner {
+ width: 100%;
+ }
+}
+</style>
--
Gitblit v1.9.3