+
@@ -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 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{form.memberName}}
-
-
-
-
-
- {{form.outRechargeTypeNum}}
- 选择充值帐户
-
-
-
-
- {{form.inRechargeTypeNum}}
- 选择充值类别
-
-
-
-
-
- {{form.outRechargeTypeName}}
-
-
-
-
- {{form.inRechargeTypeName}}
-
-
-
-
-
- {{form.cardConsumeMoney}}
-
-
-
-
-
-
-
-
-
-
- {{form.giftConsumeMoney}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ {{form.memberName}}
+
+
+
+
+
+ {{form.outRechargeTypeNum}}
+ 选择充值帐户
+
+
+
+
+ {{form.inRechargeTypeNum}}
+ 选择充值类别
+
+
+
+
+
+ {{form.outRechargeTypeName}}
+
+
+
+
+ {{form.inRechargeTypeName}}
+
+
+
+
+
+ {{form.cardConsumeMoney}}
+
+
+
+
+
+
+
+
+
+
+ {{form.giftConsumeMoney}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+ {{packingForm.promotionName}}
+
+
+
+
+ {{packingForm.projectTotal}}
+
+
+
+
+ {{packingForm.projectCount}}
+
+
+
+ {{ packingForm.saleMoney }}
+
+
+
+
+ {{packingForm.beginDate}}
+
+
+
+
+ {{packingForm.endDate}}
+
+
+
+ {{packingForm.salesCommission}}
+
+
+ {{packingForm.cardSalesCommission}}
+
+
+
+
+ 所有会员
+ 指定会员
+ 会员列表
+
+
+
+
+
+
+ 不限购
+ 限购
+ 包
+
+
+
+
+
+ 所有门店
+ 指定门店
+ 门店列表
+
+
+
+
+ 允许卡付
+ 不允许卡付
+
+
+
+
+
+
+
+
+ {{scope.row.required==0?'是':"否"}}
+
+
+
+
+
+
合计
+
+ 最高价: {{topPrice}}
+ 总价值: {{projectPriceSum}}
+ 最低价: {{minumumPrice}}
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
-
-
+
+
-
+
-
+
-
+
-
+
- {{ packingForm.saleMoney }}
-
-