diff --git a/dist.rar b/dist.rar index 3ed314b..77690ba 100644 Binary files a/dist.rar and b/dist.rar differ diff --git a/src/api/login.js b/src/api/login.js index b9a65ed..781f0eb 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -95,3 +95,12 @@ export function phonePassLoginNews(params) { data: params }); } + +// 多组织校验门店 +export function phonePassLogindzz(params) { + return service({ + url: "/api" + "/demay/ssm/staffLogin/phonePassLogindzz", + method: "post", + data: params + }); +} diff --git a/src/api/storeManage.js b/src/api/storeManage.js index 5969233..f61b68a 100644 --- a/src/api/storeManage.js +++ b/src/api/storeManage.js @@ -373,6 +373,14 @@ export function editmember(params) { }); } +// 重算会员等级 +export function resetClass(params) { + return service({ + url: "/api" + "/demay/ssm/storeMember/resetClass", + method: "post", + data: params + }); +} // 会员换号启用 (门店端-会员-会员换号启用) export function changePhoneToUpdateState(params) { return service({ @@ -1018,11 +1026,9 @@ export function addTurnMembershipCard(params) { data: params }); } - -// 查询会员转卡申请单 -export function turnMembershipCardPage(params) { +export function addTurnMembershipCardNew(params) { return service({ - url: "/api" + "/demay/ssm/turnMembershipCard/page", + url: "/api" + "/demay/ssm/turnMembershipCard/addNew", method: "post", data: params }); @@ -1036,6 +1042,21 @@ export function editTurnMembershipCard(params) { data: params }); } +export function editTurnMembershipCardNew(params) { + return service({ + url: "/api" + "/demay/ssm/turnMembershipCard/updateNew", + method: "post", + data: params + }); +} +// 查询会员转卡申请单 +export function turnMembershipCardPage(params) { + return service({ + url: "/api" + "/demay/ssm/turnMembershipCard/page", + method: "post", + data: params + }); +} // 会员卡包转送申请单状态修改 export function stateTurnMembershipCard(params) { @@ -1045,6 +1066,13 @@ export function stateTurnMembershipCard(params) { data: params }); } +export function stateTurnMembershipCardNew(params) { + return service({ + url: "/api" + "/demay/ssm/turnMembershipCard/updateStateNew", + method: "post", + data: params + }); +} // 添加等级 export function addMemberClass(params) { return service({ diff --git a/src/components/excel.vue b/src/components/excel.vue index 9470e8d..4cd04a4 100644 --- a/src/components/excel.vue +++ b/src/components/excel.vue @@ -1,67 +1,80 @@ - - - - - + + + + + diff --git a/src/components/recharge/type/index.vue b/src/components/recharge/type/index.vue index 3d6ad17..ee61f8b 100644 --- a/src/components/recharge/type/index.vue +++ b/src/components/recharge/type/index.vue @@ -65,7 +65,7 @@ export default { if (list) { this.selcetList = list; } - if (number) { + if (number != undefined) { this.selectNumber = number; } this.list = []; @@ -86,7 +86,7 @@ export default { id: "", storeId: sessionStorage.getItem("parentId"), }; - if (this.selectNumber) { + if (this.selectNumber != null) { form.type = this.selectNumber; } recTypeList(form).then((res) => { diff --git a/src/home/components/top_right.vue b/src/home/components/top_right.vue index 3508aa7..00932ab 100644 --- a/src/home/components/top_right.vue +++ b/src/home/components/top_right.vue @@ -19,6 +19,16 @@ {{promotionForm.promotionName}} + +
+ {{promotionForm.projectTotal}} +
+
+ +
+ {{promotionForm.projectCount}} +
+
{{promotionForm.saleMoney}} @@ -194,6 +204,7 @@ export default { this.promotionForm.beginDate, "YYYY-MM-DD" ); + this.promotionForm.projectList = this.projectList; this.$router.push({ path: "/sellpacking", query: this.promotionForm }); }, }, diff --git a/src/login/components/hiddens.vue b/src/login/components/hiddens.vue new file mode 100644 index 0000000..5c11336 --- /dev/null +++ b/src/login/components/hiddens.vue @@ -0,0 +1,69 @@ + + + diff --git a/src/login/login.vue b/src/login/login.vue index b013861..d9a574c 100644 --- a/src/login/login.vue +++ b/src/login/login.vue @@ -106,6 +106,7 @@
+ @@ -120,6 +121,7 @@ import { phonePassLoginzd, phonePassLoginNew, phonePassLoginNews, + phonePassLogindzz, } from "../api/login.js"; import { storeParaList } from "../api/storeManage.js"; import { storeOne } from "../api/eashier"; @@ -127,9 +129,10 @@ import { setCookie, getCookie, delCookie } from "../utils/utils"; import { partten } from "../../partten/index"; import storelist from "./components/storelist.vue"; import choice from "./components/radio.vue"; +import hiddens from "./components/hiddens.vue"; export default { inject: ["reload"], - components: { storelist, choice }, + components: { storelist, choice, hiddens }, data() { return { loading: false, @@ -211,14 +214,15 @@ export default { phonePassLoginNew(this.form).then((res) => { if (res.code == "000000") { console.log(res.data); - if (res.data.token) { + if (res.data.storeType == 2) { localStorage.setItem("token", res.data.token); sessionStorage.setItem("token", res.data.token); setCookie("token", res.data.token, 120); //设置 this.toHome(res); - } else { - console.log("选择"); + } else if (res.data.storeType == 1) { this.$refs.choice.show(res.data.baseStores); + } else { + this.$refs.hiddens.show(res.data.baseStores); } } else { this.$alert(res.message, "提示", { @@ -244,6 +248,32 @@ export default { }); } }, + hiddensData(v) { + let form = { ...this.form }; + form.storeId = v.id; + phonePassLogindzz(form).then((res) => { + if (res.code == "000000") { + if (res.data.storeType == 2) { + localStorage.setItem("token", res.data.token); + sessionStorage.setItem("token", res.data.token); + setCookie("token", res.data.token, 120); //设置 + this.toHome(res); + } else { + this.$refs.choice.show(res.data.baseStores); + } + } else { + this.$alert(res.message, "提示", { + confirmButtonText: "确定", + confirmButtonClass: "confirmbtnFalses", + type: "warning", + center: true, + callback: (action) => { + this.loading = false; + }, + }); + } + }); + }, radioData(v) { let form = { ...this.form }; form.storeId = v.id; @@ -296,7 +326,7 @@ export default { if (res.code == "000000") { sessionStorage.setItem("storeInfo", JSON.stringify(res.data)); if (res.data.parentId == null) { - /* ------------ sessionStorage.setItem("parentId", res.data.id); ------------ */ + sessionStorage.setItem("parentId", res.data.id); sessionStorage.setItem("parentName", res.data.storeName); sessionStorage.setItem("parentName", res.data.storeId); sessionStorage.setItem("headOffice", 1); diff --git a/src/main.js b/src/main.js index 9def1c8..e097266 100644 --- a/src/main.js +++ b/src/main.js @@ -4,9 +4,7 @@ import "babel-polyfill"; import "es6-promise/auto"; import ElementUI from "element-ui"; import "element-ui/lib/theme-chalk/index.css"; -import { - Message -} from "element-ui"; +import { Message } from "element-ui"; Vue.use(ElementUI); import App from "./App.vue"; import store from "./store"; @@ -24,31 +22,23 @@ import "./utils/dialog"; import "./plugins"; // import "./utils/directive/focus"; import echarts from "echarts"; -import { - getCookie -} from "./utils/utils.js"; +import { getCookie } from "./utils/utils.js"; import apiConfig from "../config/api.config.js"; import vueEsign from "vue-esign"; import animated from "animate.css"; // npm install animate.css --save安装,在引入 import formatTime from "./utils/filters.js"; import arrDiff from "./utils/array.js"; -import { - Loading -} from "element-ui"; +import { Loading } from "element-ui"; import countdown from "./utils/countdown.js"; import "./utils/rem.js"; Vue.use(animated); Vue.use(vueEsign); -import { - thousands -} from '@/utils/index.js' +import { thousands } from "@/utils/index.js"; // 引入高精度精算 -import { - Decimal -} from 'decimal.js' +import { Decimal } from "decimal.js"; // 全局定义 -Vue.prototype.$Decimal = Decimal +Vue.prototype.$Decimal = Decimal; import Vue from "vue"; import Router from "vue-router"; @@ -60,13 +50,11 @@ Vue.use(VueAxios, axios); axios.defaults.baseURL = apiConfig.baseUrl; Vue.use(Print); //注册 -import { - message -} from "./utils/resetMessage.js"; //现在提示弹窗每次只弹一条 +import { message } from "./utils/resetMessage.js"; //现在提示弹窗每次只弹一条 // import VueParticles from 'vue-particles' // Vue.use(VueParticles) -Vue.prototype.$thousands = thousands +Vue.prototype.$thousands = thousands; Vue.prototype.$message = message; Vue.prototype.$countdown = countdown; Vue.prototype.bus = new Vue(); @@ -83,9 +71,20 @@ export function getNextDate(date, day) { var d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate(); return y + "-" + m + "-" + d; } -axios.defaults.withCredentials = true; //让ajax携带cookie +//去重 +export function noRepeat(arr) { + let newArr = []; + for (let i = 0; i < arr.length; i++) { + if (!newArr.includes(arr[i])) { + newArr.push(arr[i]); + } + } + return newArr; +} +Vue.prototype.noRepeat = noRepeat; + // 全局过滤器--时间戳格式化时间//.padStart(2 , "0") 不足两位的,用0填充 -Vue.filter("dateFormat", function (originVal) { +Vue.filter("dateFormat", function(originVal) { const dt = new Date(originVal); const y = dt.getFullYear(); const m = (dt.getMonth() + 1 + "").padStart(2, "0"); @@ -95,7 +94,7 @@ Vue.filter("dateFormat", function (originVal) { const ss = (dt.getSeconds() + "").padStart(2, "0"); return `${y}-${m}-${d} ${hh}:${mm}:${ss}`; }); -Vue.filter("dateMonth", function (originVal) { +Vue.filter("dateMonth", function(originVal) { const dt = new Date(originVal); const y = dt.getFullYear(); const m = (dt.getMonth() + 1 + "").padStart(2, "0"); @@ -105,10 +104,10 @@ Vue.filter("dateMonth", function (originVal) { const ss = (dt.getSeconds() + "").padStart(2, "0"); return `${y}-${m}-${d}`; }); -Vue.filter("phone", function (phone) { +Vue.filter("phone", function(phone) { return phone.substring(0, 3) + "****" + phone.substring(phone.length - 4); }); -Vue.filter("identityNum", function (identityNum) { +Vue.filter("identityNum", function(identityNum) { return ( identityNum.substring(0, 4) + "**************" + @@ -116,11 +115,11 @@ Vue.filter("identityNum", function (identityNum) { ); }); -Vue.filter("money", function (money) { +Vue.filter("money", function(money) { return (money * 1).toFixed(2); }); -Vue.prototype.openLoading = function () { +Vue.prototype.openLoading = function() { const loading = this.$loading({ // 声明一个loading对象 lock: true, // 是否锁屏 @@ -131,7 +130,7 @@ Vue.prototype.openLoading = function () { body: true, customClass: "mask" // 遮罩层新增类名 }); - setTimeout(function () { + setTimeout(function() { // 设定定时器,超时5S后自动关闭遮罩层,避免请求失败时,遮罩层一直存在的问题 loading.close(); // 关闭遮罩层 }, 5000); diff --git a/src/pages/eashier/within/components/edit.vue b/src/pages/eashier/within/components/edit.vue index 7d08e1f..616cf24 100644 --- a/src/pages/eashier/within/components/edit.vue +++ b/src/pages/eashier/within/components/edit.vue @@ -1,333 +1,334 @@ - - - - + + + + diff --git a/src/pages/promotion/handpick/components/detail.vue b/src/pages/promotion/handpick/components/detail.vue index e69de29..d1551f6 100644 --- a/src/pages/promotion/handpick/components/detail.vue +++ b/src/pages/promotion/handpick/components/detail.vue @@ -0,0 +1,281 @@ + + + diff --git a/src/pages/promotion/handpick/components/edit.vue b/src/pages/promotion/handpick/components/edit.vue index dd82dda..a3e0b72 100644 --- a/src/pages/promotion/handpick/components/edit.vue +++ b/src/pages/promotion/handpick/components/edit.vue @@ -1,40 +1,32 @@ - - + + + + diff --git a/src/pages/storeManage/memberClass/index.vue b/src/pages/storeManage/memberClass/index.vue index a59c368..ff5d0a7 100644 --- a/src/pages/storeManage/memberClass/index.vue +++ b/src/pages/storeManage/memberClass/index.vue @@ -1,6 +1,7 @@ - + + @@ -26,7 +28,7 @@ - + ``