Commit c7adcd28 by 王志慧

Merge branch 'v4.27.0' of http://192.168.3.233:8090/saas/scrm-micro-shop into v4.27.0

2 parents c07f8f0f ecf6fcfc
const path = require('path')
class copyDir {
apply(compiler) {
// done是webpack 得编译完成周期
compiler.hooks.afterEmit.tap('DonePlugins', function(stats) {
// console.log('编译完成!!')
// 因为写在文件夹里面 要找外面的文件要加../
// 删除element
removeDir(`${__dirname}/../dist/static/css`)
// cpSync(
// path.join(__dirname, '../copyDirTarget'),
// path.join(__dirname, '../dist')
// )
// cpSync(
// path.join(__dirname, '../copyDirTarget'),
// path.join(__dirname, '../dist//dj-carlife-web')
// )
// removeDir(`${__dirname}/../copyDirTarget`)
})
}
}
/** 主要版本 */
const major = process.version.match(/v([0-9]*).([0-9]*)/)[1]
/** 特性版本 */
const minor = process.version.match(/v([0-9]*).([0-9]*)/)[2]
/**
* 文件夹复制
* @param {string} source 源文件夹
* @param {string} destination 目标文件夹
*/
function cpSync(source, destination) {
const fs = require('fs')
// console.log('source', source)
// 判断node版本不是16.7.0以上的版本
// 则进入兼容处理
// 这样处理是因为16.7.0的版本支持了直接复制文件夹的操作
if (Number(major) < 16 || (Number(major) == 16 && Number(minor) < 7)) {
// 如果存在文件夹 先递归删除该文件夹
if (fs.existsSync(destination)) fs.rmSync(destination, { recursive: true })
// 新建文件夹 递归新建
fs.mkdirSync(destination, { recursive: true })
// 读取源文件夹
const rd = fs.readdirSync(source)
// console.log('rd', rd)
for (const fd of rd) {
// 循环拼接源文件夹/文件全名称
const sourceFullName = source + '/' + fd
// 循环拼接目标文件夹/文件全名称
const destFullName = destination + '/' + fd
// 读取文件信息
const lstatRes = fs.lstatSync(sourceFullName)
// 是否是文件
if (lstatRes.isFile()) fs.copyFileSync(sourceFullName, destFullName)
// 是否是文件夹
if (lstatRes.isDirectory()) cpSync(sourceFullName, destFullName)
}
} else fs.cpSync(source, destination, { force: true, recursive: true })
}
/**
* @caption 删除本地文件夹/文件
* @param {String} directoryPath 例: d://x/x/x.json 或者 d://x/x/x
*/
function removeDir(directoryPath) {
const fs = require('fs')
fs.readdir(directoryPath, (err, files) => {
if (err) {
console.error('读取目录失败:', err)
return
}
if (files.length === 0) {
console.log('目录为空,没有文件可删除。')
return
}
const lastFile = files[files.length - 1]
const filePath = path.join(directoryPath, lastFile)
fs.unlink(filePath, err => {
if (err) {
console.error('删除文件失败:', err)
} else {
console.log('最后一个文件已被成功删除。')
}
})
})
// 判断文件是否存在
// require('fs').existsSync(directoryPath) && dleteDir()
// function dleteDir() {
// const files = fs.readdirSync(directoryPath)
// for (var i = 0; i < files.length; i++) {
// const newPath = path.join(directoryPath, files[i])
// const stat = fs.statSync(newPath)
// if (stat.isDirectory()) {
// // 如果是文件夹就递归下去
// removeDir(newPath)
// } else {
// // 删除文件
// fs.unlinkSync(newPath)
// }
// }
// fs.rmdirSync(directoryPath) // 如果文件夹是空的,就将自己删除掉
// }
}
module.exports = copyDir
const removeDir = require('./removeFn')
class AsyncRomveDir {
apply(compiler) {
// console.log('自定义异步组件');
compiler.hooks.afterEmit.tapAsync('AsyncPlugin', (compilation, cb) => {
setTimeout(() => {
// console.log()
removeDir(`${__dirname}/../copyDirTarget`)
cb()
}, 5000)
})
}
}
module.exports = AsyncRomveDir
/**
* @caption 删除本地文件夹/文件
* @param {String} directoryPath 例: d://x/x/x.json 或者 d://x/x/x
*/
function removeDir(directoryPath) {
const fs = require('fs')
const path = require('path')
// 判断文件是否存在
require('fs').existsSync(directoryPath) && dleteDir()
function dleteDir() {
const files = fs.readdirSync(directoryPath)
for (var i = 0; i < files.length; i++) {
const newPath = path.join(directoryPath, files[i])
const stat = fs.statSync(newPath)
if (stat.isDirectory()) {
// 如果是文件夹就递归下去
removeDir(newPath)
} else {
// 删除文件
fs.unlinkSync(newPath)
}
}
fs.rmdirSync(directoryPath) // 如果文件夹是空的,就将自己删除掉
}
}
module.exports = removeDir
......@@ -60,3 +60,20 @@ export const afterTodayOptions = {
return false
}
}
/**
* url下载文件
*
*/
export function downLoadFile(url) {
// console.log(row)
// return
const Temp = document.createElement('a')
// Temp.href = process.env.VUE_APP_BASE_URL + '/article/export.do?articleId=' + row.id
Temp.href = url + '?timestamp=' + new Date().getTime()
// console.log(url)
// console.log(Temp.href)
document.body.append(Temp)
Temp.click()
document.body.removeChild(Temp)
}
......@@ -247,22 +247,22 @@ export const Util = {
// throw new Error("Unable to clone obj! Its type isn't supported.")
// },
/**
* url下载文件
*
*/
downLoadFile: function(url) {
// console.log(row)
// return
const Temp = document.createElement('a')
// Temp.href = process.env.VUE_APP_BASE_URL + '/article/export.do?articleId=' + row.id
Temp.href = url + '?timestamp=' + new Date().getTime()
// console.log(url)
// console.log(Temp.href)
document.body.append(Temp)
Temp.click()
document.body.removeChild(Temp)
},
// /**
// * url下载文件
// *
// */
// downLoadFile: function(url) {
// // console.log(row)
// // return
// const Temp = document.createElement('a')
// // Temp.href = process.env.VUE_APP_BASE_URL + '/article/export.do?articleId=' + row.id
// Temp.href = url + '?timestamp=' + new Date().getTime()
// // console.log(url)
// // console.log(Temp.href)
// document.body.append(Temp)
// Temp.click()
// document.body.removeChild(Temp)
// },
/**
* @param {Object} json
......@@ -337,5 +337,5 @@ export const showToast = Util.Info
export const showLoading = Util.loading
export const hideLoading = Util.closeLoading
export const deepClone = Util.deepClone
export const downLoadFile = Util.downLoadFile
// export const downLoadFile = Util.downLoadFile
export const returnFloat = Util.returnFloat
......@@ -3,8 +3,7 @@
<template>
<el-alert title="每月最后一天24:00按当月业务完成情况自动计算员工绩效。"
show-icon
class="tip-cla">
</el-alert>
class="tip-cla"></el-alert>
</template>
<div class="container">
<GLCombiForm ref="showSearch"
......@@ -97,9 +96,9 @@
</template>
<script>
import * as dayjs from 'dayjs'
// import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { downLoadFile } from '@/common/util'
import { downLoadFile } from '@/common/format'
import ResidentDetailDialog from './residentDetailDialog.vue'
import ResidentCorrectionDialog from './residentCorrectionDialog.vue'
export default {
......@@ -122,7 +121,7 @@ export default {
{
label: '绩效月份',
prop: 'performanceMonth',
addHtml: 'performanceMonth',
addHtml: 'performanceMonth'
},
{
label: '员工姓名',
......@@ -135,7 +134,7 @@ export default {
label: '员工手机号',
name: 'staffPhone',
type: 'input',
inputType: "number",
inputType: 'number',
isClear: true,
maxlength: '11'
},
......@@ -306,7 +305,7 @@ export default {
prop: 'status',
width: '100px',
addHtml: 'applyStatus'
},
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
......@@ -324,16 +323,18 @@ export default {
// 基本数据
baseData: {
merchantList: [],
statusList: [{
confId: 0,
confName: '未下发'
},
{
confId: 1,
confName: '已下发'
}]
statusList: [
{
confId: 0,
confName: '未下发'
},
{
confId: 1,
confName: '已下发'
}
]
},
setMonthFlag: false,//第一次进入页面时设置绩效月份参数值
setMonthFlag: false //第一次进入页面时设置绩效月份参数值
}
},
components: {
......@@ -348,15 +349,15 @@ export default {
methods: {
getLastMonth() {
// 获取上个月日期
var date = new Date;
var year = date.getFullYear();
var month = date.getMonth();
var date = new Date()
var year = date.getFullYear()
var month = date.getMonth()
if (month == 0) {
year = year - 1;
month = 12;
year = year - 1
month = 12
}
month = month > 10 ? month : "0" + month
this.searchForm.performanceMonth = year.toString() + '-' + month;
month = month > 10 ? month : '0' + month
this.searchForm.performanceMonth = year.toString() + '-' + month
},
getServiceCenterList() {
const params = {
......@@ -373,7 +374,8 @@ export default {
},
beforeSearchFn() {
return new Promise(resolve => {
if (!this.setMonthFlag) {//进入页面时设置绩效月份参数值
if (!this.setMonthFlag) {
//进入页面时设置绩效月份参数值
this.getLastMonth()
}
this.tableSearchForm = this.getParams()
......@@ -425,13 +427,13 @@ export default {
distribute_commit(selectedData) {
if (!selectedData?.length) {
this.$message({
message: "请选择需要下发的记录",
type: "warning",
message: '请选择需要下发的记录',
type: 'warning',
showClose: true
})
return false
}
var idList = selectedData.map((item) => {
var idList = selectedData.map(item => {
return item.id
})
this.$confirm('<strong>是否确定下发?</strong> <div>完成工资记录下发后,员工可查看到对应的工资记录,且不允许再修改</div> ', '提示', {
......@@ -439,17 +441,19 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$apis.performanceManage.batchIssueApi({ idList: idList }).then(res => {
this.$notify({
type: 'success',
title: res.message || '操作成功'
})
.then(() => {
this.$apis.performanceManage.batchIssueApi({ idList: idList }).then(res => {
this.$notify({
type: 'success',
title: res.message || '操作成功'
})
this.$refs.residentRef.refreshTable()
})
this.$refs.residentRef.refreshTable()
})
}).catch(err => {
console.log(err)
})
.catch(err => {
console.log(err)
})
},
exportExcel_summary() {
var params = this.getParams()
......@@ -462,11 +466,11 @@ export default {
this.$apis.performanceManage.exportDetailApi(params).then(res => {
downLoadFile(res)
})
},
}
}
}
</script>
<style scoped>
<style scoped lang="scss">
.tip-cla {
margin: 16px 0 16px 0;
width: 1184px;
......@@ -474,10 +478,12 @@ export default {
background: #e4e3ff;
border-radius: 4px;
}
.flex {
display: flex;
align-items: center;
}
.dot {
width: 6px;
height: 6px;
......@@ -485,12 +491,15 @@ export default {
border-radius: 4px;
margin-right: 6px;
}
.green {
background: #4aca74;
}
.red {
background: #eb4e4e;
}
.grey {
background: #999999;
}
......
......@@ -3,8 +3,7 @@
<template>
<el-alert title="每月最后一天24:00按当月业务完成情况自动计算员工绩效。"
show-icon
class="tip-cla">
</el-alert>
class="tip-cla"></el-alert>
</template>
<div class="container">
<GLCombiForm ref="showSearch"
......@@ -97,9 +96,9 @@
</template>
<script>
import * as dayjs from 'dayjs'
// import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { downLoadFile } from '@/common/util'
import { downLoadFile } from '@/common/format'
import TechnicianDetailDialog from './technicianDetailDialog.vue'
import TechnicianCorrectionDialog from './technicianCorrectionDialog.vue'
export default {
......@@ -122,7 +121,7 @@ export default {
{
label: '绩效月份',
prop: 'performanceMonth',
addHtml: 'performanceMonth',
addHtml: 'performanceMonth'
},
{
label: '员工姓名',
......@@ -135,7 +134,7 @@ export default {
label: '员工手机号',
name: 'staffPhone',
type: 'input',
inputType: "number",
inputType: 'number',
isClear: true,
maxlength: '11'
},
......@@ -239,7 +238,7 @@ export default {
prop: 'status',
width: '100px',
addHtml: 'applyStatus'
},
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
......@@ -257,16 +256,18 @@ export default {
// 基本数据
baseData: {
merchantList: [],
statusList: [{
confId: 0,
confName: '未下发'
},
{
confId: 1,
confName: '已下发'
}]
statusList: [
{
confId: 0,
confName: '未下发'
},
{
confId: 1,
confName: '已下发'
}
]
},
setMonthFlag: false,//第一次进入页面时设置绩效月份参数值
setMonthFlag: false //第一次进入页面时设置绩效月份参数值
}
},
components: {
......@@ -280,14 +281,14 @@ export default {
methods: {
getLastMonth() {
// 获取上个月日期
var date = new Date;
var year = date.getFullYear();
var month = date.getMonth();
var date = new Date()
var year = date.getFullYear()
var month = date.getMonth()
if (month == 0) {
year = year - 1;
month = 12;
year = year - 1
month = 12
}
this.searchForm.performanceMonth = year.toString() + '-' + month;
this.searchForm.performanceMonth = year.toString() + '-' + month
},
getServiceCenterList() {
const params = {
......@@ -304,7 +305,8 @@ export default {
},
beforeSearchFn() {
return new Promise(resolve => {
if (!this.setMonthFlag) {//进入页面时设置绩效月份参数值
if (!this.setMonthFlag) {
//进入页面时设置绩效月份参数值
this.getLastMonth()
}
this.tableSearchForm = this.getParams()
......@@ -356,13 +358,13 @@ export default {
distribute_commit(selectedData) {
if (!selectedData?.length) {
this.$message({
message: "请选择需要下发的记录",
type: "warning",
message: '请选择需要下发的记录',
type: 'warning',
showClose: true
})
return false
}
var idList = selectedData.map((item) => {
var idList = selectedData.map(item => {
return item.id
})
this.$confirm('<strong>是否确定下发?</strong> <div>完成工资记录下发后,员工可查看到对应的工资记录,且不允许再修改</div> ', '提示', {
......@@ -370,17 +372,19 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$apis.performanceManage.batchIssueApi({ idList: idList }).then(res => {
this.$notify({
type: 'success',
title: res.message || '操作成功'
})
.then(() => {
this.$apis.performanceManage.batchIssueApi({ idList: idList }).then(res => {
this.$notify({
type: 'success',
title: res.message || '操作成功'
})
this.$refs.residentRef.refreshTable()
})
this.$refs.residentRef.refreshTable()
})
}).catch(err => {
console.log(err)
})
.catch(err => {
console.log(err)
})
},
exportExcel_summary() {
var params = this.getParams()
......@@ -393,7 +397,7 @@ export default {
this.$apis.performanceManage.exportDetailApi(params).then(res => {
downLoadFile(res)
})
},
}
}
}
</script>
......@@ -405,10 +409,12 @@ export default {
background: #e4e3ff;
border-radius: 4px;
}
.flex {
display: flex;
align-items: center;
}
.dot {
width: 6px;
height: 6px;
......@@ -416,12 +422,15 @@ export default {
border-radius: 4px;
margin-right: 6px;
}
.green {
background: #4aca74;
}
.red {
background: #eb4e4e;
}
.grey {
background: #999999;
}
......
......@@ -7,8 +7,8 @@
</div>
</template>
<script>
import ResidentPerformance from "./components/residentPerformance.vue"
import TechnicianPerformance from "./components/technicianPerformance.vue"
import ResidentPerformance from './components/residentPerformance.vue'
import TechnicianPerformance from './components/technicianPerformance.vue'
export default {
components: {
ResidentPerformance,
......@@ -16,40 +16,34 @@ export default {
},
data() {
return {
activeName: "1",
activeName: '1',
tabPaneList: [
{
label: "驻店绩效",
name: "1"
label: '驻店绩效',
name: '1'
},
{
label: "技师绩效",
name: "2"
label: '技师绩效',
name: '2'
}
],
tabName: "ResidentPerformance"
tabName: 'ResidentPerformance'
}
},
mounted() {
},
computed: {
},
watch: {
},
mounted() { },
computed: {},
watch: {},
methods: {
handleClick() {
let arr = {
1: "residentPerformance",
2: "technicianPerformance"
1: 'residentPerformance',
2: 'technicianPerformance'
}
this.tabName = arr[+this.activeName]
console.log(this.tabName);
},
console.log(this.tabName)
}
}
}
</script>
<style scoped>
<style scoped lang="scss">
</style>
......@@ -4,9 +4,12 @@
<div class="container edit-container">
<p class="page-title">基础信息</p>
<div v-loading="loading">
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit"
:labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm"
:formData="editFormData" :formRules="editRule">
<div slot="merchantList">
<el-button size="small" class="selectWrap" icon="el-icon-plus" plain @click="handleRelateStoreClose">选择门店</el-button>
<el-button size="small" class="selectWrap" icon="el-icon-plus" plain
@click="handleRelateStoreClose">选择门店</el-button>
<GLTable ref="warehousListRef" :hasPage="false" :tableParams="tableParams" :tableData="editForm.merchantList">
<span slot="customBtn" slot-scope="scope">
<el-button class="p-0" type="text" @click="handleMerchantDelete(scope)">删除</el-button>
......@@ -19,27 +22,34 @@
<div class="container edit-container mt16">
<p class="page-title">绩效信息</p>
<div v-loading="loading">
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef1" :isEdit="isEdit" :labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="employeePerformanceConfig" :formData="performanceFormData" :formRules="editRule">
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef1" :isEdit="isEdit"
:labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="employeePerformanceConfig"
:formData="performanceFormData" :formRules="editRule">
<!-- 绩效设置 -->
<div slot="performanceFlag">
<el-switch v-model="employeePerformanceConfig.performanceBFlag" class="switchStyle" active-color="#5850ff" active-text="开" inactive-text="关" @change="changeSwitch('performance')"></el-switch>
<el-switch v-model="employeePerformanceConfig.performanceBFlag" class="switchStyle" active-color="#5850ff"
active-text="开" inactive-text="关" @change="changeSwitch('performance')"></el-switch>
</div>
<!-- 基本工资/元 -->
<div slot="basicWage">
<el-input type="text" v-model="employeePerformanceConfig.basicWage" @blur="handleCalcuPrice('employeePerformanceConfig', 'basicWage')" placeholder="请输入"></el-input>
<el-input type="text" v-model="employeePerformanceConfig.basicWage"
@blur="handleCalcuPrice('employeePerformanceConfig', 'basicWage')" placeholder="请输入"></el-input>
</div>
<!-- 保底工资/元 -->
<div slot="minimumWage">
<el-input type="text" v-model="employeePerformanceConfig.minimumWage" @blur="handleCalcuPrice('employeePerformanceConfig', 'minimumWage')" placeholder="请输入"></el-input>
<el-input type="text" v-model="employeePerformanceConfig.minimumWage"
@blur="handleCalcuPrice('employeePerformanceConfig', 'minimumWage')" placeholder="请输入"></el-input>
</div>
<!--提成奖励 高客单奖励 成交率奖励-->
<div :slot="item + 'Flag'" :key="index" v-for="(item, index) in addHtmls">
<el-switch v-model="employeePerformanceConfig[item + 'BFlag']" class="switchStyle" active-color="#5850ff" active-text="开" inactive-text="关" @change="changeSwitch(item)"></el-switch>
<el-switch v-model="employeePerformanceConfig[item + 'BFlag']" class="switchStyle" active-color="#5850ff"
active-text="开" inactive-text="关" @change="changeSwitch(item)"></el-switch>
<span class="explain" v-if="item != 'minimumWage'" @click="handleExplain(item)">示例说明</span>
<!-- 表单 -->
<div v-if="employeePerformanceConfig[item + 'BFlag']">
<template v-if="item == 'commissionBonus' || item == 'highCustomerUnitBonus' || item == 'successRateBonus'">
<GLTable ref="orderRef" class="award-wrap" :tableData="employeePerformanceConfig[item + 'List']" :noDataImg="url" :tableParams="tableDataItem(item)" :hasPage="false">
<GLTable ref="orderRef" class="award-wrap" :tableData="employeePerformanceConfig[item + 'List']"
:noDataImg="url" :tableParams="tableDataItem(item)" :hasPage="false">
<template slot="startValue" slot-scope="scope">
<span v-if="scope.scope.isStartEdit">{{ scope.scope.startValue }}</span>
<el-form-item v-else style="margin-bottom: 0px">
......@@ -48,13 +58,17 @@
</template>
<template slot="endValue" slot-scope="scope">
<span v-if="scope.scope.isEndEdit">--</span>
<el-form-item v-else style="margin-bottom: 0px" :prop="item + 'List.' + scope.index + '.endValue'" :rules="editRule.endValue">
<el-input v-model="scope.scope.endValue" placeholder="请输入" @blur="handleCalculate(item, 'endValue', scope.index)"></el-input>
<el-form-item v-else style="margin-bottom: 0px" :prop="item + 'List.' + scope.index + '.endValue'"
:rules="editRule.endValue">
<el-input v-model="scope.scope.endValue" placeholder="请输入"
@blur="handleCalculate(item, 'endValue', scope.index)"></el-input>
</el-form-item>
</template>
<template slot="calculateValue" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="item + 'List.' + scope.index + '.calculateValue'" :rules="editRule.calculateValue">
<el-input v-model="scope.scope.calculateValue" placeholder="请输入" @blur="handleCalculate(item, 'calculateValue', scope.index)"></el-input>
<el-form-item style="margin-bottom: 0px" :prop="item + 'List.' + scope.index + '.calculateValue'"
:rules="editRule.calculateValue">
<el-input v-model="scope.scope.calculateValue" placeholder="请输入"
@blur="handleCalculate(item, 'calculateValue', scope.index)"></el-input>
</el-form-item>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
......@@ -68,12 +82,16 @@
</template>
<template v-else-if="item == 'constructionBonus'">
<div class="constructionBonus-wrap">
<el-form ref="editFormRef2" size="small" :rules="editRule" :model="employeePerformanceConfig" label-width="160px" :inline="true">
<el-form ref="editFormRef2" size="small" :rules="editRule" :model="employeePerformanceConfig"
label-width="160px" :inline="true">
<el-form-item label="升级订单施工奖励/元:" prop="upgradeConstructionBonus">
<el-input v-model="employeePerformanceConfig.upgradeConstructionBonus" @blur="handleCalcuPrice('employeePerformanceConfig', 'upgradeConstructionBonus')" placeholder="请输入"></el-input>
<el-input v-model="employeePerformanceConfig.upgradeConstructionBonus"
@blur="handleCalcuPrice('employeePerformanceConfig', 'upgradeConstructionBonus')"
placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="战败订单施工奖励/元:" prop="notUpgradeConstructionBonus">
<el-input v-model="employeePerformanceConfig.notUpgradeConstructionBonus" placeholder="请输入" @blur="handleCalcuPrice('employeePerformanceConfig', 'notUpgradeConstructionBonus')" ></el-input>
<el-input v-model="employeePerformanceConfig.notUpgradeConstructionBonus" placeholder="请输入"
@blur="handleCalcuPrice('employeePerformanceConfig', 'notUpgradeConstructionBonus')"></el-input>
</el-form-item>
</el-form>
</div>
......@@ -88,14 +106,17 @@
<el-button type="primary" @click="handleConfirm" size="medium" :loading="loading">提交</el-button>
</GLFooter>
<!-- 门店弹窗 -->
<relate-store-dialog v-if="relateStoreVisible" ref="editFormMerchantRef" :relateStoreVisible="relateStoreVisible" :storeApi="storeApi" :storeSearchForm="storeSearchForm" :storeSelected="selectedList" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="relateStoreVisible=false">
<relate-store-dialog v-if="relateStoreVisible" ref="editFormMerchantRef" :relateStoreVisible="relateStoreVisible"
:storeApi="storeApi" :storeSearchForm="storeSearchForm" :storeSelected="selectedList"
@handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="relateStoreVisible = false">
<el-row slot>
<el-form :model="storeSearchForm" ref="relate" :inline="true" label-width="90px">
<el-form-item label="门店名称:" prop="merchantName">
<el-input :size="size" v-model.trim="storeSearchForm.merchantName" placeholder="请输入门店名称" clearable></el-input>
</el-form-item>
<el-form-item label="商户号:" prop="merchantIdKeyword">
<el-input :size="size" v-model.trim="storeSearchForm.merchantIdKeyword" placeholder="请输入商户号" clearable></el-input>
<el-input :size="size" v-model.trim="storeSearchForm.merchantIdKeyword" placeholder="请输入商户号"
clearable></el-input>
</el-form-item>
<el-form-item>
<el-button :size="size" type="primary" @click="handleSearchStore">搜索</el-button>
......@@ -107,9 +128,9 @@
<explain-dialog :is-explain="isExplain" :diff-explain="diffExplain" @handleClose="handleClose"></explain-dialog>
</div>
</template>
<script>
import relateStoreDialog from './relateStoreDialog'
import relateStoreDialog from './relateStoreDialog.vue'
import explainDialog from './explainDialog.vue'
import BigNumber from 'bignumber.js'
export default {
......@@ -570,7 +591,7 @@ export default {
},
handleCalcuPrice(formName, data) {
this[formName][data] = this[formName][data] ? new BigNumber(this[formName][data]).dp(2).toNumber() : ''
if(!this[formName][data]) this[formName][data]=''
if (!this[formName][data]) this[formName][data] = ''
},
handleCalculate(item, key, index) {
let formData = this.employeePerformanceConfig[item + 'List']
......@@ -581,9 +602,9 @@ export default {
formData[index][key] = formData[index][key] > max ? max : formData[index][key]
formData[index][key] = formData[index][key] ? new BigNumber(formData[index][key]).dp(2).toNumber() : ''
//下一行区间开启值自动在上一行的区间结束值的基础上+0.01
if (formData[index + 1] && key == 'endValue' && formData[index][key]) formData[index + 1].startValue = new BigNumber(formData[index][key]).plus(0.01).toNumber()
if(! formData[index][key]) formData[index][key]=''
if (!formData[index][key]) formData[index][key] = ''
},
handleDelete(item, index) {
let bonusType = item == 'commissionBonus' ? 0 : item == 'highCustomerUnitBonus' ? 1 : 2
......@@ -735,7 +756,7 @@ export default {
.then(() => {
this.cancelJump()
})
.catch(() => {})
.catch(() => { })
} else {
this.cancelJump()
}
......@@ -760,12 +781,11 @@ export default {
this.$refs.editFormMerchantRef.handleCurrentChange(1)
},
handleSearchReset() {
this.storeSearchForm.merchantName= '',
this.storeSearchForm.merchantIdKeyword= '',
this.$nextTick(() => {
this.$refs.editFormMerchantRef.handleCurrentChange(1)
})
; (this.storeSearchForm.merchantName = ''),
(this.storeSearchForm.merchantIdKeyword = ''),
this.$nextTick(() => {
this.$refs.editFormMerchantRef.handleCurrentChange(1)
})
},
handleMerchantDelete(obj) {
this.$messageBox.confirm('是否删除该门店?', '删除', {
......@@ -793,9 +813,11 @@ export default {
margin-left: 154px;
margin-top: -22px;
}
/deep/ td.el-table__cell {
height: 64px;
}
/deep/ .el-form-item__error {
padding-top: 2px;
z-index: 9999999;
......@@ -883,6 +905,4 @@ export default {
color: #5850ff;
margin-left: 9px;
cursor: pointer;
}
</style>
\ No newline at end of file
}</style>
......@@ -3,7 +3,9 @@ const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir)
const CopyDir = require('./plugins/copyDir')
const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const isDev = process.env.NODE_ENV !== 'development'
const cdn = {
css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`],
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`, 'https://webapi.amap.com/loader.js']
......@@ -13,21 +15,22 @@ module.exports = {
publicPath,
assetsDir: 'static',
productionSourceMap: false,
configureWebpack: {
resolve: {
configureWebpack: config => {
config.resolve = {
alias: {
'@': resolve('src'),
assets: resolve('src/assets'),
views: resolve('src/views'),
components: resolve('src/components')
}
},
output: {
}
config.output = {
...config.output,
library: `${packageName}-[name]`,
libraryTarget: 'umd', // 把微应用打包成 umd 库格式
jsonpFunction: `webpackJsonp_${packageName}`
},
externals: {
}
config.externals = {
vue: 'Vue',
'element-ui': 'ELEMENT',
'vue-router': 'VueRouter',
......@@ -36,7 +39,38 @@ module.exports = {
echarts: 'echarts',
AMap: 'AMap'
}
// let plugins = []
// if (isDev) {
// // plugins.push(new CopyDir()) // 把dist 文件修改成有两份来兼容部署时请求目录不一样的情况
// }
// config.plugins = [...config.plugins, ...plugins]
},
// configureWebpack: {
// resolve: {
// alias: {
// '@': resolve('src'),
// assets: resolve('src/assets'),
// views: resolve('src/views'),
// components: resolve('src/components')
// }
// },
// output: {
// library: `${packageName}-[name]`,
// libraryTarget: 'umd', // 把微应用打包成 umd 库格式
// jsonpFunction: `webpackJsonp_${packageName}`
// },
// externals: {
// vue: 'Vue',
// 'element-ui': 'ELEMENT',
// 'vue-router': 'VueRouter',
// vuex: 'Vuex',
// axios: 'axios',
// echarts: 'echarts',
// AMap: 'AMap'
// }
// },
devServer: {
hot: true,
disableHostCheck: true,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!