BUG 28443
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
<ai-search-bar bottomBorder>
|
<ai-search-bar bottomBorder>
|
||||||
<template slot="left">
|
<template slot="left">
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="!isLevel5"
|
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="iconfont iconAdd"
|
icon="iconfont iconAdd"
|
||||||
@click="onAdd">
|
@click="onAdd">
|
||||||
@@ -26,7 +25,7 @@
|
|||||||
label="积分"
|
label="积分"
|
||||||
align="center">
|
align="center">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<span>{{ row.doType > 0 ? "+" : ""}}{{ row.changeIntegral }}</span>
|
<span>{{ row.doType > 0 ? "+" : "" }}{{ row.changeIntegral }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column slot="options" label="操作" align="center" width="120" fixed="right">
|
<el-table-column slot="options" label="操作" align="center" width="120" fixed="right">
|
||||||
@@ -40,7 +39,6 @@
|
|||||||
@click="editItem(row)">
|
@click="editItem(row)">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<ai-wechat-selecter :instance="instance" v-model="dialogInfo.operators" @change="getSelect">
|
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
@click="statusChage(row)"
|
@click="statusChage(row)"
|
||||||
@@ -48,7 +46,6 @@
|
|||||||
v-if="$permissions('app_appvillagerintegralshop_edit')">
|
v-if="$permissions('app_appvillagerintegralshop_edit')">
|
||||||
授权
|
授权
|
||||||
</el-button>
|
</el-button>
|
||||||
</ai-wechat-selecter>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -107,95 +104,28 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="dialog-footer" slot="footer">
|
<div class="dialog-footer" slot="footer">
|
||||||
<el-button @click="dialog.visible = false" size="medium"
|
<el-button @click="dialog.visible = false" size="medium"
|
||||||
>取消</el-button
|
>取消
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
<el-button @click="onConfirm('ruleForm')" type="primary" size="medium"
|
<el-button @click="onConfirm('ruleForm')" type="primary" size="medium"
|
||||||
>确认</el-button
|
>确认
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
|
<ai-dialog :visible.sync="authDialog" title="授权" @onConfirm="handleAuth" @closed="form={}" width="500px">
|
||||||
<ai-dialog
|
<ai-user-picker :instance="instance" v-model="form.operators" multiple/>
|
||||||
title="操作人授权"
|
|
||||||
:visible.sync="dialog.visibleStatus"
|
|
||||||
:customFooter="true"
|
|
||||||
:destroyOnClose="true"
|
|
||||||
@close="init('ruleStatus')"
|
|
||||||
width="720px"
|
|
||||||
>
|
|
||||||
<div class="form_div">
|
|
||||||
<el-form
|
|
||||||
ref="ruleStatus"
|
|
||||||
:model="dialogInfo"
|
|
||||||
:rules="formRules"
|
|
||||||
size="small"
|
|
||||||
label-suffix=":"
|
|
||||||
label-width="100px"
|
|
||||||
>
|
|
||||||
<el-form-item label="事件区域" prop="areaId">
|
|
||||||
<ai-area-select
|
|
||||||
clearable
|
|
||||||
always-show
|
|
||||||
:instance="instance"
|
|
||||||
v-model="dialogInfo.areaId"
|
|
||||||
:hide-level="2"
|
|
||||||
:disabled-level="user.info.areaList.length"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="操作员" required>
|
|
||||||
<el-col :span="14" style="width: 60%; margin-right: 8px">
|
|
||||||
<el-form-item prop="operators">
|
|
||||||
<div class="organ">
|
|
||||||
<span v-if="dialogInfo.operators.length">
|
|
||||||
<span
|
|
||||||
v-for="(item, i) in dialogInfo.operators"
|
|
||||||
:key="i"
|
|
||||||
class="organzation"
|
|
||||||
>{{ item.userName }}
|
|
||||||
<span
|
|
||||||
class="iconfont iconOverrule"
|
|
||||||
@click.stop="delate(i)"
|
|
||||||
></span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<span v-else style="color: #999">请选择</span>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="7" style="width: 30%">
|
|
||||||
<ai-person-select
|
|
||||||
:instance="instance"
|
|
||||||
:url="peopleAjaxUrl"
|
|
||||||
:isMultiple="true"
|
|
||||||
v-if="$permissions('app_appvillagerintegralshopoperator_edit')"
|
|
||||||
@selectPerson="getSelect"
|
|
||||||
:chooseUserList="dialogInfo.operators"
|
|
||||||
>
|
|
||||||
<template name="option" v-slot:option="{ item }">
|
|
||||||
<span class="iconfont iconProlife">{{ item.userName }}</span>
|
|
||||||
</template>
|
|
||||||
</ai-person-select>
|
|
||||||
</el-col>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<div class="dialog-footer" slot="footer">
|
|
||||||
<el-button @click="dialog.visibleStatus = false" size="medium"
|
|
||||||
>取消</el-button
|
|
||||||
>
|
|
||||||
<el-button @click="onConfirm('ruleStatus')" type="primary" size="medium"
|
|
||||||
>确认</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from "vuex";
|
import {mapState} from "vuex";
|
||||||
|
import AiUserPicker from "../../../components/AiUserPicker";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "storeManagement",
|
name: "storeManagement",
|
||||||
|
components: {AiUserPicker},
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
@@ -212,7 +142,7 @@ export default {
|
|||||||
unitId: "",
|
unitId: "",
|
||||||
total: 10,
|
total: 10,
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
{ prop: "shopName", label: "店铺名称", align: "left" },
|
{prop: "shopName", label: "店铺名称", align: "left"},
|
||||||
{
|
{
|
||||||
prop: "shopkeeper",
|
prop: "shopkeeper",
|
||||||
label: "店主",
|
label: "店主",
|
||||||
@@ -248,7 +178,7 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ slot: "options", label: "操作", align: "center" },
|
{slot: "options", label: "操作", align: "center"},
|
||||||
],
|
],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
dialog: {
|
dialog: {
|
||||||
@@ -267,25 +197,26 @@ export default {
|
|||||||
},
|
},
|
||||||
formRules: {
|
formRules: {
|
||||||
shopName: [
|
shopName: [
|
||||||
{ required: true, message: "请输入店铺名称", trigger: "change" },
|
{required: true, message: "请输入店铺名称", trigger: "change"},
|
||||||
],
|
],
|
||||||
shopkeeper: [
|
shopkeeper: [
|
||||||
{ required: true, message: "请输入店主", trigger: "blur" },
|
{required: true, message: "请输入店主", trigger: "blur"},
|
||||||
],
|
],
|
||||||
phone: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
|
phone: [{required: true, message: "请输入联系电话", trigger: "blur"}],
|
||||||
shopAddress: [
|
shopAddress: [
|
||||||
{ required: true, message: "请输入店铺地址", trigger: "blur" },
|
{required: true, message: "请输入店铺地址", trigger: "blur"},
|
||||||
],
|
],
|
||||||
status: [{ required: true, message: "请选择状态", trigger: "blur" }],
|
status: [{required: true, message: "请选择状态", trigger: "blur"}],
|
||||||
areaId: [
|
areaId: [
|
||||||
{ required: true, message: "请选择事件区域", trigger: "blur" },
|
{required: true, message: "请选择事件区域", trigger: "blur"},
|
||||||
],
|
],
|
||||||
operators: [
|
operators: [
|
||||||
{ required: true, message: "请选择操作员", trigger: "blur" },
|
{required: true, message: "请选择操作员", trigger: "blur"},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
peopleAjaxUrl: "/admin/user/page",
|
peopleAjaxUrl: "/admin/user/page",
|
||||||
isLevel5: false,
|
authDialog: false,
|
||||||
|
form: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -293,17 +224,16 @@ export default {
|
|||||||
...mapState(["user"]),
|
...mapState(["user"]),
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
created() {
|
||||||
this.unitId = this.user.info.unitId;
|
this.unitId = this.user.info.unitId;
|
||||||
|
|
||||||
this.$dict.load(["assessmentStartStatus"]).then(() => {
|
this.$dict.load("assessmentStartStatus").then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
this.isLevel5 = this.areaId.substring(this.areaId.length - 3) != "000";
|
|
||||||
this.instance
|
this.instance
|
||||||
.post(`/app/appvillagerintegralshop/list`, null, {
|
.post(`/app/appvillagerintegralshop/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
@@ -332,21 +262,40 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
editItem(row) {
|
editItem(row) {
|
||||||
this.dialogInfo = { ...row };
|
this.dialogInfo = {...row};
|
||||||
this.dialog.visible = true;
|
this.dialog.visible = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
statusChage(row) {
|
statusChage(row) {
|
||||||
this.dialogInfo = { ...row };
|
this.authDialog = true
|
||||||
if (this.dialogInfo.operators.length) {
|
this.form = JSON.parse(JSON.stringify(row))
|
||||||
this.dialogInfo.operators.map((item) => {
|
},
|
||||||
item.userName = item.name;
|
handleAuth() {
|
||||||
});
|
this.instance.post(`/app/appvillagerintegralshop/addOrUpdate`, this.form).then((res) => {
|
||||||
} else {
|
if (res?.code == 0) {
|
||||||
this.dialogInfo.operators = [];
|
this.$message.success("授权成功!")
|
||||||
}
|
this.authDialog = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getSelect(e) {
|
||||||
|
this.dialogInfo.operators = e;
|
||||||
|
this.dialogInfo.operators.map((item) => {
|
||||||
|
if (!item.name) {
|
||||||
|
item.name = item.userName;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.instance
|
||||||
|
.post(`/app/appvillagerintegralshop/addOrUpdate`, this.dialogInfo)
|
||||||
|
.then((res) => {
|
||||||
|
this.dialogInfo.operators = []
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.onReset();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.dialogInfo.operators = []
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onReset() {
|
onReset() {
|
||||||
this.search.current = 1;
|
this.search.current = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
@@ -390,24 +339,6 @@ export default {
|
|||||||
this.dialogInfo.operators = [];
|
this.dialogInfo.operators = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
getSelect(e) {
|
|
||||||
this.dialogInfo.operators = e;
|
|
||||||
this.dialogInfo.operators.map((item) => {
|
|
||||||
if (!item.name) {
|
|
||||||
item.name = item.userName;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.instance
|
|
||||||
.post(`/app/appvillagerintegralshop/addOrUpdate`, this.dialogInfo)
|
|
||||||
.then((res) => {
|
|
||||||
this.dialogInfo.operators = []
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.onReset();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.dialogInfo.operators = []
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
delate(index) {
|
delate(index) {
|
||||||
this.dialogInfo.operators.splice(index, 1);
|
this.dialogInfo.operators.splice(index, 1);
|
||||||
@@ -431,6 +362,7 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background: #f3f6f9;
|
background: #f3f6f9;
|
||||||
|
|
||||||
.status-0 {
|
.status-0 {
|
||||||
color: #ff4466;
|
color: #ff4466;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,5 +43,8 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.AiUserPicker {
|
.AiUserPicker {
|
||||||
|
.el-select{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user