diff --git a/config/index.js b/config/index.js index 77c8bc0..93c6573 100644 --- a/config/index.js +++ b/config/index.js @@ -26,13 +26,14 @@ module.exports = { assetsPublicPath: "/", proxyTable: { "/api": { - target: "http://192.168.31.127:8084/", //设置你调用的接口域名和端口号 别忘了加http 本地 + target: "http://192.168.31.209:8084/", //设置你调用的接口域名和端口号 别忘了加http 本地 // target: "http://139.9.185.131:8098/", //设置你调用的接口域名和端口号 别忘了加http 天懿达正式 // target: "http://139.9.58.205:8084/", //设置你调用的接口域名和端口号 别忘了加http 天懿达正式华为云 // target: "http://139.9.185.131:9094/", //设置你调用的接口域名和端口号 别忘了加http 盛联 // target: "http://139.9.185.131:8084/", //设置你调用的接口域名和端口号 别忘了加http 天懿达正式 - // target: "http://192.168.31.201:8084/", //设置你调用的接口域名和端口号 别忘了加http 天懿达线上 + // target: "http://192.168.31.209:8084/", //设置你调用的接口域名和端口号 别忘了加http 天懿达线上 + target: "https://www.decaisoft.com/preferential", //设置你调用的接口域名和端口号 别忘了加http 天懿达线上 // target: 'http://124.71.99.140:8084/', //设置你调用的接口域名和端口号 别忘了加http 线上 // target: 'http://124.71.99.140:8081/', //设置你调用的接口域名和端口号 别忘了加http 测试 // target: 'https://www.decaisoft.com:8088/', //设置你调用的接口域名和端口号 别忘了加http 测试 @@ -44,7 +45,7 @@ module.exports = { } }, // Various Dev Server settingsss - host: "192.168.31.193", // can be overwritten by process.env.HOST + host: "192.168.31.194", // can be overwritten by process.env.HOST port: 3000, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, @@ -74,12 +75,10 @@ module.exports = { events: { onEnd: { delete: ["./dist.rar"], - archive: [ - { - source: path.join(__dirname, "./dist"), - destination: path.join(__dirname, "./dist.rar") - } - ] + archive: [{ + source: path.join(__dirname, "./dist"), + destination: path.join(__dirname, "./dist.rar") + }] } } }) diff --git a/config/prod.env.js b/config/prod.env.js index f4e9e06..6d0420d 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,6 +1,7 @@ -'use strict' -module.exports = { - NODE_ENV: '"production"', - // baseURL:'https://zhuangcy.top:8000/api' - baseURL:'https://www.decaisoft.com:8088/api' -} +'use strict' +module.exports = { + NODE_ENV: '"production"', + // baseURL:'https://zhuangcy.top:8000/api' + // baseURL:'https://www.decaisoft.com:8088/api' + baseURL: 'https://www.decaisoft.com/preferential' +} diff --git a/config/tianyida.code-workspace b/config/tianyida.code-workspace new file mode 100644 index 0000000..6466216 --- /dev/null +++ b/config/tianyida.code-workspace @@ -0,0 +1,11 @@ +{ + "folders": [ + { + "path": ".." + }, + { + "path": "..\\..\\..\\平台管理\\platform" + } + ], + "settings": {} +} \ No newline at end of file diff --git a/dist.rar b/dist.zip similarity index 52% rename from dist.rar rename to dist.zip index 3a3c0b2..42b28a9 100644 Binary files a/dist.rar and b/dist.zip differ diff --git a/src/api/storeManage.js b/src/api/storeManage.js index 9da4b6c..405267b 100644 --- a/src/api/storeManage.js +++ b/src/api/storeManage.js @@ -464,6 +464,13 @@ export function storeMemberpage(params) { data: params }); } +export function storeMemberpages(params) { + return service({ + url: "/api" + "/demay/ssm/storeMember/selectListNew", + method: "post", + data: params + }); +} export function pageassign(params) { return service({ url: "/api" + "/demay/ssm/storeMember/pageassign", diff --git a/src/components/repayment/index.vue b/src/components/repayment/index.vue index e384be9..784e86e 100644 --- a/src/components/repayment/index.vue +++ b/src/components/repayment/index.vue @@ -164,6 +164,8 @@ import { addCancelDebtList, couAccountList, recAccountCashList, + selectListType, + QuerCompetent, } from "@/api/eashier.js"; import cancel from "./components/cancel.vue"; import admin from "@/components/staffList/admin/index"; @@ -406,6 +408,64 @@ export default { //获取数据 async getData() { this.getPage(); + //获取员工列表 + selectList({ id: "" }).then((res) => { + if (res.code == "000000") { + res.rows.forEach((item) => { + item.label = item.brandNumber + "-" + item.staffName; + delete item.state; + item.ratio = 100; + }); + this.options = Array.from(new Set(res.rows)); + } else { + this.$alert(res.message, "加载员工列表", { + confirmButtonText: "确定", + confirmButtonClass: "confirmbtnFalses", + type: "warning", + center: true, + callback: (action) => {}, + }); + } + }); + //获取员工列表 + selectListType({ type: 0 }).then((res) => { + if (res.code == "000000") { + res.rows.forEach((item) => { + item.label = item.brandNumber + "-" + item.staffName; + item.ratio = 100; + delete item.state; + }); + + this.adminOptions = res.rows; + } else { + this.$alert(res.message, "加载员工提示", { + confirmButtonText: "确定", + confirmButtonClass: "confirmbtnFalses", + type: "warning", + center: true, + callback: (action) => {}, + }); + } + }); + //获取高管列表 + QuerCompetent({ type: 0, pageSize: 999 }).then((res) => { + if (res.code == "000000") { + res.pageInfo.list.forEach((item) => { + item.label = item.brandNumber + "-" + item.staffName; + item.ratio = 100; + delete item.state; + }); + this.managerOptions = res.pageInfo.list; + } else { + this.$alert(res.message, "加载高管提示", { + confirmButtonText: "确定", + confirmButtonClass: "confirmbtnFalses", + type: "warning", + center: true, + callback: (action) => {}, + }); + } + }); //获取现付列表 ctlist({ id: "" }).then((res) => { if (res.code == "000000") { diff --git a/src/components/staffList/admin/index.vue b/src/components/staffList/admin/index.vue index 2c4455c..d60d24b 100644 --- a/src/components/staffList/admin/index.vue +++ b/src/components/staffList/admin/index.vue @@ -15,7 +15,7 @@ {{ scope.row.ratio }} - + @@ -35,6 +35,7 @@ export default { editIndex: -1, //员工占比修改下标 staffListCopy: [], //复制选择员工数组 storeId: null, //当前门店id + nums:'', }; }, methods: { @@ -48,6 +49,7 @@ export default { num += item.ratio * 1; } }); + this.nuns=this.staffLists[0].ratio this.staffLists[0].ratio = 100 - num; }, //删除当前选择 @@ -91,26 +93,73 @@ export default { //关闭员工修改输入框 endStaffRatio(row, index) { if (index != 0) { - this.setRatio(); + this.setRatio(); if (this.staffLists[0].ratio < 1) { this.$message.error({ message: "第一位员工占比过低", }); this.staffLists.forEach((item) => { - if (item.ratio > 100) { + if (item.ratio >= this.nums) { item.ratio = 0; + } }); - } else { + let number = 0; + this.staffLists.forEach((item, index) => { + if (index != 0) { + number += item.ratio * 1; + console.l + } + this.staffLists[0].ratio = 100 - number + }); + + } else if (this.staffLists[0].ratio > 100) { + this.$message.error({ + message: "第一位员工占比过高", + }); + this.staffLists.forEach((item) => { + if (item.ratio < 0) { + item.ratio = 0; + + } + }); + let number = 0; + this.staffLists.forEach((item, index) => { + if (index != 0) { + number += item.ratio * 1; + console.l + } + this.staffLists[0].ratio = 100 - number + }); + } + else { if (!row.ratio) { row.ratio = 0; } else { - row.ratio = row.ratio * 1; + if (row.ratio < 0) { + // this.staffLists.forEach((item, index) => { + this.$message.error({ + message: "输入不能小于0", + }); + row.ratio = 0; + + // }); + let number = 0; + this.staffLists.forEach((item, index) => { + if (index != 0) { + number += item.ratio * 1; + } + this.staffLists[0].ratio = 100 - number + }); + } else { + row.ratio = row.ratio * 1; + } + } let form = this.staffLists[index]; + this.editIndex = -1; this.staffLists.splice(index, 1, form); } - this.editIndex = -1; } this.confirm(); this.changeStaff(); diff --git a/src/components/staffList/manager/index.vue b/src/components/staffList/manager/index.vue index ba3aff8..623ca7f 100644 --- a/src/components/staffList/manager/index.vue +++ b/src/components/staffList/manager/index.vue @@ -3,25 +3,32 @@
撤销 - 增加 + 增加 +
@@ -34,6 +41,7 @@ export default { staffLists: [{ ratio: 100 }], //员工占比初始化 //主员工数组 editIndex: -1, //员工占比修改下标 staffListCopy: [], //复制选择员工数组 + nums:"", }; }, methods: { @@ -47,6 +55,7 @@ export default { num += item.ratio * 1; } }); + this.nums=this.staffLists[0].ratio; this.staffLists[0].ratio = 100 - num; }, //删除当前选择 @@ -93,18 +102,60 @@ export default { this.setRatio(); if (this.staffLists[0].ratio < 1) { this.$message.error({ - message: "第一位占比过低", + message: "第一位员工占比过低", }); this.staffLists.forEach((item) => { - if (item.ratio > 100) { + if (item.ratio >= this.nums) { item.ratio = 0; } }); - } else { + let number = 0; + this.staffLists.forEach((item, index) => { + if (index != 0) { + number += item.ratio * 1; + } + }); + this.staffLists[0].ratio = 100 - number + } else if (this.staffLists[0].ratio > 100) { + this.$message.error({ + message: "第一位员工占比过高", + }); + this.staffLists.forEach((item) => { + if (item.ratio < 0) { + item.ratio = 0; + } + }); + let number = 0; + this.staffLists.forEach((item, index) => { + if (index != 0) { + number += item.ratio * 1; + } + }); + this.staffLists[0].ratio = 100 - number + } + else { if (!row.ratio) { row.ratio = 0; } else { - row.ratio = row.ratio * 1; + if (row.ratio < 0) { + // this.staffLists.forEach((item, index) => { + this.$message.error({ + message: "输入不能小于0", + }); + row.ratio = 0; + + // }); + let number = 0; + this.staffLists.forEach((item, index) => { + if (index != 0) { + number += item.ratio * 1; + } + this.staffLists[0].ratio = 100 - number + }); + } else { + row.ratio = row.ratio * 1; + } + } let form = this.staffLists[index]; this.editIndex = -1; @@ -199,7 +250,7 @@ export default { confirmButtonClass: "confirmbtnFalses", type: "warning", center: true, - callback: (action) => {}, + callback: (action) => { }, }); } }); diff --git a/src/components/staffList/staff/index.vue b/src/components/staffList/staff/index.vue index 8d2b56f..ccca912 100644 --- a/src/components/staffList/staff/index.vue +++ b/src/components/staffList/staff/index.vue @@ -3,25 +3,31 @@
撤销 - 增加 + 增加 +
@@ -36,6 +42,7 @@ export default { editIndex: -1, //员工占比修改下标 staffListCopy: [], //复制选择员工数组 storeId: null, //当前门店id + nums:"", }; }, methods: { @@ -73,6 +80,7 @@ export default { num += item.ratio * 1; } }); + this.nums=this.staffLists[0].ratio; this.staffLists[0].ratio = 100 - num; }, //删除当前选择 @@ -99,15 +107,62 @@ export default { message: "第一位员工占比过低", }); this.staffLists.forEach((item) => { - if (item.ratio > 100) { + if (item.ratio >= this.nums) { item.ratio = 0; + } }); - } else { + let number = 0; + this.staffLists.forEach((item, index) => { + if (index != 0) { + number += item.ratio * 1; + console.l + } + this.staffLists[0].ratio = 100 - number + }); + + } else if (this.staffLists[0].ratio > 100) { + this.$message.error({ + message: "第一位员工占比过高", + }); + this.staffLists.forEach((item) => { + if (item.ratio < 1) { + item.ratio = 0; + + } + }); + let number = 0; + this.staffLists.forEach((item, index) => { + if (index != 0) { + number += item.ratio * 1; + console.l + } + this.staffLists[0].ratio = 100 - number + }); + } + else { if (!row.ratio) { row.ratio = 0; } else { - row.ratio = row.ratio * 1; + if (row.ratio < 0) { + // this.staffLists.forEach((item, index) => { + this.$message.error({ + message: "输入不能小于0", + }); + row.ratio = 0; + + // }); + let number = 0; + this.staffLists.forEach((item, index) => { + if (index != 0) { + number += item.ratio * 1; + } + this.staffLists[0].ratio = 100 - number + }); + } else { + row.ratio = row.ratio * 1; + } + } let form = this.staffLists[index]; this.editIndex = -1; @@ -214,7 +269,7 @@ export default { confirmButtonClass: "confirmbtnFalses", type: "warning", center: true, - callback: (action) => {}, + callback: (action) => { }, }); } }); diff --git a/src/layout/components/asider.vue b/src/layout/components/asider.vue index 5849acf..63cf137 100644 --- a/src/layout/components/asider.vue +++ b/src/layout/components/asider.vue @@ -392,15 +392,13 @@ export default { route: "/transfer", index: "transfer", number: "4001500", - id:"80080010", }, { - name: "会员转门店", + name: "疗程转门店", icon: "el-icon-sort", route: "/transferstore", index: "transferstore", number: "4001600", - id:"80080011", }, // { // name: "收款", @@ -658,7 +656,6 @@ export default { route: "/managers", index: "managers", number: "4001200", - id:"100010008", }, { name: "管理层业绩", @@ -666,7 +663,6 @@ export default { route: "/admins", index: "admins", number: "4001300", - id:"100010009", }, { @@ -675,7 +671,6 @@ export default { route: "/dept", index: "dept", number: "4001400", - id:"1000100010", }, // { // name: "员工工资", @@ -941,7 +936,6 @@ export default { index: "100", icon: "el-icon-s-ticket", number: "1000", - id:"12001200", menuLists: [ { name: "建立", @@ -949,7 +943,6 @@ export default { route: "/couponIssue", index: "couponIssue", number: "1000100", - id:"120012001", }, { name: "管理", @@ -957,7 +950,6 @@ export default { route: "/couponMane", index: "couponMane", number: "1000200", - id:"120012002", }, { name: "领取消费", @@ -965,7 +957,6 @@ export default { route: "/couponRecord", index: "couponRecord", number: "1000300", - id:"120012003", }, ], }, diff --git a/src/main.js b/src/main.js index 07810fc..334023c 100644 --- a/src/main.js +++ b/src/main.js @@ -4,7 +4,9 @@ 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"; @@ -22,13 +24,17 @@ 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); @@ -38,11 +44,19 @@ import print from "vue-print-nb"; directives: { print; } -import { thousands } from "@/utils/index.js"; +import { + thousands +} from "@/utils/index.js"; // 引入高精度精算 -import { Decimal } from "decimal.js"; +import { + Decimal +} from "decimal.js"; +import { + parseTime +} from "./utils/index.js"; // 全局定义 Vue.prototype.$Decimal = Decimal; +Vue.prototype.$parseTime = parseTime; import Vue from "vue"; import Router from "vue-router"; @@ -54,7 +68,9 @@ 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) @@ -92,7 +108,7 @@ export function noRepeat(arr) { 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"); @@ -102,7 +118,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"); @@ -112,10 +128,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) + "**************" + @@ -123,11 +139,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, // 是否锁屏 @@ -138,7 +154,7 @@ Vue.prototype.openLoading = function() { body: true, customClass: "mask" // 遮罩层新增类名 }); - setTimeout(function() { + setTimeout(function () { // 设定定时器,超时5S后自动关闭遮罩层,避免请求失败时,遮罩层一直存在的问题 loading.close(); // 关闭遮罩层 }, 5000); diff --git a/src/pages/discount-coupon/issue/components/edit.vue b/src/pages/discount-coupon/issue/components/edit.vue index 1e7d68b..2a8dda2 100644 --- a/src/pages/discount-coupon/issue/components/edit.vue +++ b/src/pages/discount-coupon/issue/components/edit.vue @@ -217,6 +217,13 @@ export default { handleNext() { this.$refs.form.validate((valid) => { if (valid) { + let form = Object.assign({}, this.form); + if (form.suitableStore < 1) { + form.useStoreList = Array.from([]); + } + if (form.suitableProject < 1) { + form.projectList = Array.from([]); + } this.$emit('next', 2, this.form) } else { return false diff --git a/src/pages/discount-coupon/issue/components/qrCode.vue b/src/pages/discount-coupon/issue/components/qrCode.vue index a5c21e9..534fc52 100644 --- a/src/pages/discount-coupon/issue/components/qrCode.vue +++ b/src/pages/discount-coupon/issue/components/qrCode.vue @@ -1,5 +1,5 @@