From 193628913a8c32e33fff9903df4c0dbe6654fb7b Mon Sep 17 00:00:00 2001 From: paulGao Date: Thu, 23 Dec 2021 21:20:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/seller/shop/shopOperation.vue | 524 +++++++++++------- .../src/views/sys/oss-manage/ossManage.vue | 2 +- 2 files changed, 335 insertions(+), 191 deletions(-) diff --git a/manager/src/views/seller/shop/shopOperation.vue b/manager/src/views/seller/shop/shopOperation.vue index 98ba3d8f..76e25943 100644 --- a/manager/src/views/seller/shop/shopOperation.vue +++ b/manager/src/views/seller/shop/shopOperation.vue @@ -1,10 +1,16 @@ @@ -231,7 +412,7 @@ import memberLayout from "@/views/member/list/index"; import ossManage from "@/views/sys/oss-manage/ossManage"; import { getCategoryTree } from "@/api/goods"; -import { shopDetail, shopAdd, shopEdit, getShopByMemberId,shopAudit } from "@/api/shops"; +import { shopDetail, shopAdd, shopEdit, getShopByMemberId, shopAudit } from "@/api/shops"; import uploadPicInput from "@/views/my-components/lili/upload-pic-input"; import region from "@/views/lili-components/region"; import liliMap from "@/views/my-components/map/index"; @@ -251,42 +432,29 @@ export default { shopId: this.$route.query.shopId, // 店铺id isRead: false, // 是否只读,只有在店铺通过审核才可修改 selectedFormBtnName: "", // 点击图片绑定form + loading: false, + auditModel: false, + auditModalLoading: false, picModalFlag: false, // 图片选择器 - address: '', // 地址 - returnAddress: '', // 退货地址 + address: "", // 地址 + returnAddress: "", // 退货地址 memberModalFlag: false, // 商家账号 settlementShow: false, // 是否展示结算日输入框 addSettlementConfirmBtn: false, // 添加结算日确认按钮 addSettlementBtn: true, // 添加结算日按钮 day: 1, //结算日 - tabName: 'base', // tab栏name值 - tabNameList: ['base', 'entry', 'category', 'send' ,'settlement'], // tab栏name值数组 + tabName: "base", // tab栏name值 + tabNameList: ["base", "entry", "category", "send", "settlement"], // tab栏name值数组 shopValidate: { // 表单验证规则 - memberName: [ - { required: true, message: "会员不能为空" }, - ], - storeName: [ - { required: true, message: "店铺名称不能为空" }, - ], - companyAddress: [ - { required: true, message: "公司地址不能为空" }, - ], - storeAddressDetail: [ - { required: true, message: "店铺详细地址不能为空" }, - ], - storeDesc: [ - { required: true, message: "店铺简介不能为空" }, - ], - storeCenter: [ - { required: true, message: "店铺未定位" }, - ], - companyName: [ - { required: true, message: "公司名称不能为空", }, - ], - companyPhone: [ - { required: true, message: "公司电话不能为空", }, - ], + memberName: [{ required: true, message: "会员不能为空" }], + storeName: [{ required: true, message: "店铺名称不能为空" }], + companyAddress: [{ required: true, message: "公司地址不能为空" }], + storeAddressDetail: [{ required: true, message: "店铺详细地址不能为空" }], + storeDesc: [{ required: true, message: "店铺简介不能为空" }], + storeCenter: [{ required: true, message: "店铺未定位" }], + companyName: [{ required: true, message: "公司名称不能为空" }], + companyPhone: [{ required: true, message: "公司电话不能为空" }], employeeNum: [ { required: true, @@ -295,9 +463,7 @@ export default { trigger: "blur", }, ], - companyAddressIdPath: [ - { required: true, message: "请选择公司地址", }, - ], + companyAddressIdPath: [{ required: true, message: "请选择公司地址" }], registeredCapital: [ { required: true, @@ -306,11 +472,9 @@ export default { trigger: "blur", }, ], - linkName: [ - { required: true, message: "联系人姓名不能为空", }, - ], + linkName: [{ required: true, message: "联系人姓名不能为空" }], linkPhone: [ - { required: true, message: "联系人手机号不能为空", }, + { required: true, message: "联系人手机号不能为空" }, { type: "string", pattern: /^1[3|4|5|6|7|8][0-9]{9}$/, @@ -319,34 +483,18 @@ export default { }, ], companyEmail: [ - { required: true, message: "邮箱不能为空", }, - { type: "email", message: "邮箱格式错误", }, + { required: true, message: "邮箱不能为空" }, + { type: "email", message: "邮箱格式错误" }, ], - licenseNum: [ - { required: true, message: "营业执照号不能为空", }, - ], - scope: [ - { required: true, message: "法定经营范围不能为空", }, - ], - legalName: [ - { required: true, message: "法人姓名不能为空", }, - ], - legalId: [ - { required: true, message: "法人证件号不能为空", }, - ], - settlementBankAccountName: [ - { required: true, message: "银行开户名不能为空", }, - ], - settlementBankAccountNum: [ - { required: true, message: "银行账号不能为空", }, - ], - settlementBankBranchName: [ - { required: true, message: "银行支行名称不能为空", }, - ], - settlementBankJointName: [ - { required: true, message: "支行联行号不能为空", }, - ], - + licenseNum: [{ required: true, message: "营业执照号不能为空" }], + scope: [{ required: true, message: "法定经营范围不能为空" }], + legalName: [{ required: true, message: "法人姓名不能为空" }], + legalId: [{ required: true, message: "法人证件号不能为空" }], + settlementBankAccountName: [{ required: true, message: "银行开户名不能为空" }], + settlementBankAccountNum: [{ required: true, message: "银行账号不能为空" }], + settlementBankBranchName: [{ required: true, message: "银行支行名称不能为空" }], + settlementBankJointName: [{ required: true, message: "支行联行号不能为空" }], + salesConsigneeMobile: [ { type: "string", @@ -359,12 +507,12 @@ export default { indeterminate: true, // 复选框全选样式 checkAll: false, // 全选 checkAllGroup: [], // 全选数组 - submitLoading: false, // 添加或编辑提交状态 settlementCycle: [], // 结算周期 - shopForm: { // 店铺数据 + shopForm: { + // 店铺数据 settlementCycle: "", - selfOperated: 0, + selfOperated: "false", memberName: "", companyName: "", addressPath: "", @@ -382,7 +530,7 @@ export default { licencePhoto: "", legalName: "", legalId: "", - legalPhoto: ['', ''], + legalPhoto: ["", ""], companyPhone: "", settlementBankAccountName: "", settlementBankAccountNum: "", @@ -397,7 +545,7 @@ export default { categories: [], // 分类 infoResult: {}, // 店铺详情 - picIndex: '', // 存储身份证图片下标,方便赋值 + picIndex: "", // 存储身份证图片下标,方便赋值 }; }, methods: { @@ -443,36 +591,35 @@ export default { //添加结算日 addsettlementCycleConfirm() { if (!this.day) { - this.$Message.warning('请输入正确的结算周期,1-31的整数') - return + this.$Message.warning("请输入正确的结算周期,1-31的整数"); + return; } if (this.settlementCycle.includes(this.day)) { - this.$Message.warning('已有该结算周期,不能重复输入') - return + this.$Message.warning("已有该结算周期,不能重复输入"); + return; } this.settlementCycle.push(this.day); this.addSettlementConfirmBtn = false; this.addSettlementBtn = true; this.settlementShow = false; this.day = 1; - }, // 选择公司地址 selectedRegion(val) { - this.$set(this.shopForm, 'companyAddressIdPath', val[0].toString()); + this.$set(this.shopForm, "companyAddressIdPath", val[0].toString()); this.$set( this.shopForm, - 'companyAddressPath', - val[1].toString().replace(/\s/g, '') + "companyAddressPath", + val[1].toString().replace(/\s/g, "") ); }, // 选择退货收件地址 selectedConsigneeRegion(val) { - this.$set(this.shopForm, 'salesConsigneeAddressId', val[0].toString()); + this.$set(this.shopForm, "salesConsigneeAddressId", val[0].toString()); this.$set( this.shopForm, - 'salesConsigneeAddressPath', - val[1].toString().replace(/\s/g, '') + "salesConsigneeAddressPath", + val[1].toString().replace(/\s/g, "") ); }, // 选择图片modal @@ -480,17 +627,17 @@ export default { this.$refs.ossManage.selectImage = true; this.picModalFlag = true; this.selectedFormBtnName = val; - this.picIndex = index + this.picIndex = index; }, // 图片回显 callbackSelected(val) { this.picModalFlag = false; - if (this.picIndex===0 || this.picIndex === 1) { + if (this.picIndex === 0 || this.picIndex === 1) { this.shopForm[this.selectedFormBtnName][this.picIndex] = val.url; } else { this.shopForm[this.selectedFormBtnName] = val.url; } - this.picIndex = '' + this.picIndex = ""; }, // 初始化数据 init() { @@ -499,30 +646,32 @@ export default { this.getShopDetail(); } }, - next () { // 下一步 - let index = this.tabNameList.indexOf(this.tabName) + 1 - this.tabName = this.tabNameList[index] + next() { + // 下一步 + let index = this.tabNameList.indexOf(this.tabName) + 1; + this.tabName = this.tabNameList[index]; }, - prev () { // 上一步 - let index = this.tabNameList.indexOf(this.tabName) - 1 - this.tabName = this.tabNameList[index] - }, - formValidate (prop, status, error) { // 表单校验规则 - console.log(prop, status, error); + prev() { + // 上一步 + let index = this.tabNameList.indexOf(this.tabName) - 1; + this.tabName = this.tabNameList[index]; }, + formValidate(prop, status, error) {}, // 获取店铺详情 getShopDetail() { shopDetail(this.shopId).then((res) => { if (res.success) { this.infoResult = res.result; this.shopForm = res.result; - this.shopForm.selfOperated ? this.shopForm.selfOperated = 1 : this.shopForm.selfOperated = 0 - + this.shopForm.selfOperated + ? (this.shopForm.selfOperated = "true") + : (this.shopForm.selfOperated = "false"); + this.checkAllGroup = this.shopForm.goodsManagementCategory.split(","); if (this.shopForm.settlementCycle) { - this.settlementCycle = this.shopForm.settlementCycle.split(',') + this.settlementCycle = this.shopForm.settlementCycle.split(","); } - this.shopForm.legalPhoto = this.shopForm.legalPhoto.split(',') + this.shopForm.legalPhoto = this.shopForm.legalPhoto.split(","); this.address = this.shopForm.companyAddressIdPath; this.returnAddress = this.shopForm.salesConsigneeAddressId; @@ -540,11 +689,11 @@ export default { //校验经营类目 if (this.checkAllGroup == "") { this.$Message.error("请选择店铺经营类目"); - this.tabName = 'cagetory' + this.tabName = "cagetory"; return; } if (valid) { - const params = JSON.parse(JSON.stringify(this.shopForm)) + const params = JSON.parse(JSON.stringify(this.shopForm)); //处理经营类目,结算日 params.goodsManagementCategory = this.checkAllGroup; params.settlementCycle = this.settlementCycle; @@ -575,7 +724,7 @@ export default { }, // 点击定位获取店铺地址 getAddress(item) { - this.shopForm.storeCenter = item.position.lng + ',' + item.position.lat; + this.shopForm.storeCenter = item.position.lng + "," + item.position.lat; this.$set(this.shopForm, "storeAddressPath", item.addr); this.$set(this.shopForm, "storeAddressIdPath", item.addrId); }, @@ -617,34 +766,29 @@ export default { } }); }, + auditHandler() { + this.auditModel = true; + }, // 审核店铺 - audit() { - let id = this.$route.query.shopId - this.$Modal.confirm({ - title: "审核店铺", - content: "您确认要审核通过该店铺?", - okText: "通过", - cancelText: "驳回", - loading: true, - onOk: () => { - shopAudit(id, 0).then((res) => { - this.$Modal.remove(); - if (res.success) { - this.$Message.success("操作成功"); - this.$router.push({name: 'shopAuth'}) - } - }); - }, - onCancel: () => { - shopAudit(id, 1).then((res) => { - this.$Modal.remove(); - if (res.success) { - this.$Message.success("操作成功"); - this.$router.push({name: 'shopAuth'}) - } - }); - }, - }); + audit(operation) { + let id = this.$route.query.shopId; + if (operation === "PASS") { + shopAudit(id, 0).then((res) => { + this.auditModel = false; + if (res.success) { + this.$Message.success("操作成功"); + this.$router.push({ name: "shopAuth" }); + } + }); + } else { + shopAudit(id, 1).then((res) => { + this.auditModel = false; + if (res.success) { + this.$Message.success("操作成功"); + this.$router.push({ name: "shopAuth" }); + } + }); + } }, }, created() { @@ -698,7 +842,7 @@ export default { margin: 0 4px; } } -.legal-photo{ +.legal-photo { width: 100px; height: 100px; cursor: pointer; diff --git a/manager/src/views/sys/oss-manage/ossManage.vue b/manager/src/views/sys/oss-manage/ossManage.vue index 6dfc78d2..d8eade76 100644 --- a/manager/src/views/sys/oss-manage/ossManage.vue +++ b/manager/src/views/sys/oss-manage/ossManage.vue @@ -52,7 +52,7 @@ :on-success="handleSuccess" :on-error="handleError" :show-upload-list="false" - :max-size="1024" + :max-size="2048" :on-exceeded-size="handleMaxSize" multiple ref="up" From 75e7bc2d9cd3409289ee5bad7342b2babe15bd8e Mon Sep 17 00:00:00 2001 From: paulGao Date: Fri, 24 Dec 2021 16:09:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=83=AD=E8=AF=8D=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/page/article-manage/hotWords.vue | 47 +++++++++++++------ 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/manager/src/views/page/article-manage/hotWords.vue b/manager/src/views/page/article-manage/hotWords.vue index eb991489..b9931a2c 100644 --- a/manager/src/views/page/article-manage/hotWords.vue +++ b/manager/src/views/page/article-manage/hotWords.vue @@ -14,14 +14,19 @@ - -
+ @@ -31,14 +36,16 @@
- +