fix: 购物车产品id修改
This commit is contained in:
parent
7984633a42
commit
bf0d1f258a
@ -465,7 +465,7 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
placeholder="请输入产品ID"
|
placeholder="请输入产品ID"
|
||||||
clearable
|
clearable
|
||||||
></el-input>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -512,7 +512,7 @@ export default {
|
|||||||
};
|
};
|
||||||
var validateURL = (rule, value, callback) => {
|
var validateURL = (rule, value, callback) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return callback(new Error("请输入产品链接"));
|
return callback(new Error("请输入产品Id"));
|
||||||
}
|
}
|
||||||
const urlRegex = /^(http|https):\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,}(\/\S*)?$/;
|
const urlRegex = /^(http|https):\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,}(\/\S*)?$/;
|
||||||
if (!urlRegex.test(value)) {
|
if (!urlRegex.test(value)) {
|
||||||
@ -601,7 +601,7 @@ export default {
|
|||||||
trigger: "blur"
|
trigger: "blur"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
url: [{ required: true, message: "请输入产品ID", trigger: "blur" }]
|
url: [{ required: true, validator: validateURL, trigger: "blur" }]
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
title: [
|
title: [
|
||||||
|
|||||||
@ -292,7 +292,7 @@
|
|||||||
v-model="ruleForm.inviteCode"
|
v-model="ruleForm.inviteCode"
|
||||||
maxlength="4"
|
maxlength="4"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
></el-input>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否配置购物车" prop="isCart">
|
<el-form-item label="是否配置购物车" prop="isCart">
|
||||||
<el-radio-group v-model="ruleForm.isCart">
|
<el-radio-group v-model="ruleForm.isCart">
|
||||||
@ -328,7 +328,6 @@
|
|||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="url" label="产品链接"> </el-table-column>
|
|
||||||
<el-table-column fixed="right" label="操作" width="100">
|
<el-table-column fixed="right" label="操作" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -522,7 +521,7 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
placeholder="请输入产品ID"
|
placeholder="请输入产品ID"
|
||||||
clearable
|
clearable
|
||||||
></el-input>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -599,7 +598,7 @@ export default {
|
|||||||
};
|
};
|
||||||
var validateURL = (rule, value, callback) => {
|
var validateURL = (rule, value, callback) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return callback(new Error("请输入产品链接"));
|
return callback(new Error("请输入产品Id"));
|
||||||
}
|
}
|
||||||
const urlRegex = /^(http|https):\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,}(\/\S*)?$/;
|
const urlRegex = /^(http|https):\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,}(\/\S*)?$/;
|
||||||
if (!urlRegex.test(value)) {
|
if (!urlRegex.test(value)) {
|
||||||
@ -735,7 +734,7 @@ export default {
|
|||||||
coverImgUrl: [
|
coverImgUrl: [
|
||||||
{ required: true, message: "请上传封面图", trigger: "blur" }
|
{ required: true, message: "请上传封面图", trigger: "blur" }
|
||||||
],
|
],
|
||||||
url: [{ required: true, message: "请输入产品ID", trigger: "blur" }]
|
url: [{ required: true, validator: validateURL, trigger: "blur" }]
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
title: [
|
title: [
|
||||||
@ -1488,7 +1487,7 @@ export default {
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.form-box {
|
.form-box {
|
||||||
width: 60%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar-uploader .el-upload {
|
.avatar-uploader .el-upload {
|
||||||
|
|||||||
@ -144,6 +144,13 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="230px">
|
<el-table-column label="操作" fixed="right" align="center" width="230px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<!-- <el-button
|
||||||
|
v-if="scope.row.userType === 2"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="becomeTG(scope.row.loginId)"
|
||||||
|
>设为投顾</el-button
|
||||||
|
> -->
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
v-if="scope.row.userType === 2"
|
v-if="scope.row.userType === 2"
|
||||||
@ -234,7 +241,7 @@
|
|||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import { getRoleByUserId, getAll } from "@/api/role";
|
import { getRoleByUserId, getAll } from "@/api/role";
|
||||||
import { changeStatus, list, resetPassword } from "@/api/user";
|
import { changeStatus, list, resetPassword, convertToTg } from "@/api/user";
|
||||||
import { getDepts } from "@/api/dept";
|
import { getDepts } from "@/api/dept";
|
||||||
import { parseTime } from "@/utils/index";
|
import { parseTime } from "@/utils/index";
|
||||||
import eForm from "./form";
|
import eForm from "./form";
|
||||||
@ -243,7 +250,7 @@ import { querySafety } from "@/api/systemSafety.js";
|
|||||||
import { COMPOSITION_TYPE } from "@/utils/options";
|
import { COMPOSITION_TYPE } from "@/utils/options";
|
||||||
import DeptConfig from "./components/DeptConfig.vue";
|
import DeptConfig from "./components/DeptConfig.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "userManage",
|
name: "UserManage",
|
||||||
components: { eForm, userForm, DeptConfig },
|
components: { eForm, userForm, DeptConfig },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -467,6 +474,30 @@ export default {
|
|||||||
this.$refs.userForm.dialog = true;
|
this.$refs.userForm.dialog = true;
|
||||||
// await this.querySafetyFn()
|
// await this.querySafetyFn()
|
||||||
},
|
},
|
||||||
|
// 设为投顾
|
||||||
|
becomeTG(userId) {
|
||||||
|
this.$confirm("是否确认将该用户设置为投顾用户?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(async () => {
|
||||||
|
const { code, message } = await convertToTg({ userId });
|
||||||
|
if (code === 0) {
|
||||||
|
this.$notify({
|
||||||
|
title: "设置成功",
|
||||||
|
type: "success",
|
||||||
|
duration: 2500
|
||||||
|
});
|
||||||
|
this.init();
|
||||||
|
} else {
|
||||||
|
this.$notify({
|
||||||
|
title: message,
|
||||||
|
type: "error",
|
||||||
|
duration: 2500
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
// 修改用户状态
|
// 修改用户状态
|
||||||
async updataStatus(status, loginId) {
|
async updataStatus(status, loginId) {
|
||||||
const res = await changeStatus({ status, loginId });
|
const res = await changeStatus({ status, loginId });
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user