feat(waterInjection): 等级修改-团队盒数与小区盒数小数精度为两位小数
This commit is contained in:
parent
3161beb2f9
commit
e17e54411b
|
@ -1,6 +1,6 @@
|
||||||
<!--
|
<!--
|
||||||
* @Descripttion:
|
* @Descripttion:
|
||||||
* @version:
|
* @version:
|
||||||
* @Author: 王三华
|
* @Author: 王三华
|
||||||
* @Date: 2024-04-10 11:33:36
|
* @Date: 2024-04-10 11:33:36
|
||||||
-->
|
-->
|
||||||
|
@ -32,11 +32,9 @@
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<div class="searchbox">
|
<div class="searchbox">
|
||||||
<el-button class="my_search" @click="research">
|
<el-button class="my_search" @click="research">
|
||||||
{{ '搜索' }}</el-button
|
{{ '搜索' }}</el-button>
|
||||||
>
|
|
||||||
<el-button class="my_reset" @click="reChongzhi">
|
<el-button class="my_reset" @click="reChongzhi">
|
||||||
{{ '重置' }}</el-button
|
{{ '重置' }}</el-button>
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -46,36 +44,33 @@
|
||||||
<div class="maintop">
|
<div class="maintop">
|
||||||
<div class="mainbtn">
|
<div class="mainbtn">
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasButtons="['waterAdd']"
|
||||||
size="small"
|
size="small"
|
||||||
class="addBtn"
|
class="addBtn"
|
||||||
v-hasButtons="['waterAdd']"
|
|
||||||
@click="addRules"
|
@click="addRules"
|
||||||
>{{ '添加' }}</el-button
|
>{{ '添加' }}</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
|
||||||
v-hasButtons="['waterDown']"
|
v-hasButtons="['waterDown']"
|
||||||
@click="importTemplate"
|
size="small"
|
||||||
style="background-color: #009b58; color: #fff; margin-left: 15px"
|
style="background-color: #009b58; color: #fff; margin-left: 15px"
|
||||||
class="thebtn2"
|
class="thebtn2"
|
||||||
|
@click="importTemplate"
|
||||||
>
|
>
|
||||||
{{ '下载模板' }}</el-button
|
{{ '下载模板' }}</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasButtons="['waterImport']"
|
||||||
size="small"
|
size="small"
|
||||||
class="thebtn2"
|
class="thebtn2"
|
||||||
v-hasButtons="['waterImport']"
|
|
||||||
style="background-color: #ff6723; color: #fff"
|
style="background-color: #ff6723; color: #fff"
|
||||||
@click="handleImport"
|
@click="handleImport"
|
||||||
>
|
>
|
||||||
{{ '导入' }}</el-button
|
{{ '导入' }}</el-button>
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="maintable">
|
<div class="maintable">
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
height="730px"
|
height="730px"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:header-cell-style="{ background: '#EEEEEE' }"
|
:header-cell-style="{ background: '#EEEEEE' }"
|
||||||
|
@ -104,21 +99,21 @@
|
||||||
<el-table-column align="center" :label="'操作'" width="150">
|
<el-table-column align="center" :label="'操作'" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasButtons="['waterUp']"
|
||||||
class="colors"
|
class="colors"
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
style="color: #ffad41"
|
style="color: #ffad41"
|
||||||
v-hasButtons="['waterUp']"
|
|
||||||
@click.native.prevent="updateShow(scope.row)"
|
@click.native.prevent="updateShow(scope.row)"
|
||||||
>
|
>
|
||||||
{{ '修改' }}
|
{{ '修改' }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasButtons="['waterDel']"
|
||||||
class="colors"
|
class="colors"
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
style="color: #c73030"
|
style="color: #c73030"
|
||||||
v-hasButtons="['waterDel']"
|
|
||||||
@click.native.prevent="delRole(scope.row)"
|
@click.native.prevent="delRole(scope.row)"
|
||||||
>
|
>
|
||||||
{{ '删除' }}
|
{{ '删除' }}
|
||||||
|
@ -149,21 +144,23 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="团队总盒数" prop="teamBoxNum">
|
<el-form-item label="团队总盒数" prop="teamBoxNum">
|
||||||
<el-input
|
<el-input-number
|
||||||
v-model="table.teamBoxNum"
|
v-model="table.teamBoxNum"
|
||||||
type="number"
|
|
||||||
clearable
|
clearable
|
||||||
:placeholder="'请输入'"
|
:precision="2"
|
||||||
|
placeholder="请输入"
|
||||||
|
:controls="false"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="小区盒数" prop="smallBoxNum">
|
<el-form-item label="小区盒数" prop="smallBoxNum">
|
||||||
<el-input
|
<el-input-number
|
||||||
v-model="table.smallBoxNum"
|
v-model="table.smallBoxNum"
|
||||||
type="number"
|
|
||||||
clearable
|
clearable
|
||||||
:placeholder="'请输入'"
|
:precision="2"
|
||||||
|
placeholder="请输入"
|
||||||
|
:controls="false"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -206,8 +203,7 @@
|
||||||
class="button-style"
|
class="button-style"
|
||||||
@click="handleClose"
|
@click="handleClose"
|
||||||
>
|
>
|
||||||
{{ '取消' }}</el-button
|
{{ '取消' }}</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -247,12 +243,12 @@
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
drag
|
drag
|
||||||
>
|
>
|
||||||
<i class="el-icon-upload"></i>
|
<i class="el-icon-upload" />
|
||||||
<div class="el-upload__text">
|
<div class="el-upload__text">
|
||||||
{{ '将文件拖到此处,或' }}
|
{{ '将文件拖到此处,或' }}
|
||||||
<em>{{ '点击上传' }}</em>
|
<em>{{ '点击上传' }}</em>
|
||||||
</div>
|
</div>
|
||||||
<div class="el-upload__tip" style="color: red" slot="tip">
|
<div slot="tip" class="el-upload__tip" style="color: red">
|
||||||
{{ '提示:仅允许导入“xls”或“xlsx”格式文件!' }}
|
{{ '提示:仅允许导入“xls”或“xlsx”格式文件!' }}
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
@ -269,246 +265,246 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import topBar from "@/components/topBar";
|
import topBar from '@/components/topBar'
|
||||||
import * as api from "@/api/specialBusiness.js";
|
import * as api from '@/api/specialBusiness.js'
|
||||||
import { Message } from "element-ui";
|
import { Message } from 'element-ui'
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from '@/utils/auth'
|
||||||
export default {
|
export default {
|
||||||
name: "Qxpz",
|
name: 'Qxpz',
|
||||||
components: {
|
components: {
|
||||||
topBar,
|
topBar
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '添加',
|
title: '添加',
|
||||||
modifiedTime: [],
|
modifiedTime: [],
|
||||||
modifiedTime1: [],
|
modifiedTime1: [],
|
||||||
forms: "",
|
forms: '',
|
||||||
rules: {
|
rules: {
|
||||||
memberCode: [
|
memberCode: [
|
||||||
{ required: true, message: '请输入', trigger: "blur" },
|
{ required: true, message: '请输入', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
settleDate: [
|
settleDate: [
|
||||||
{ required: true, message: '请选择', trigger: "change" },
|
{ required: true, message: '请选择', trigger: 'change' }
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
table: {},
|
table: {},
|
||||||
ruleShow: false,
|
ruleShow: false,
|
||||||
moren: "waterInjection",
|
moren: 'waterInjection',
|
||||||
topList: [
|
topList: [
|
||||||
{
|
{
|
||||||
name: "等级修改",
|
name: '等级修改',
|
||||||
path: "waterInjection",
|
path: 'waterInjection'
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
upload: {
|
upload: {
|
||||||
// 是否显示弹出层(物流导入)
|
// 是否显示弹出层(物流导入)
|
||||||
open: false,
|
open: false,
|
||||||
// 弹出层标题(物流导入)
|
// 弹出层标题(物流导入)
|
||||||
title: "",
|
title: '',
|
||||||
// 是否禁用上传
|
// 是否禁用上传
|
||||||
isUploading: false,
|
isUploading: false,
|
||||||
// 是否更新已经存在的物流数据
|
// 是否更新已经存在的物流数据
|
||||||
updateSupport: 0,
|
updateSupport: 0,
|
||||||
// 设置上传的请求头部
|
// 设置上传的请求头部
|
||||||
headers: { Authorization: "Bearer " + getToken() },
|
headers: { Authorization: 'Bearer ' + getToken() },
|
||||||
// 上传的地址
|
// 上传的地址
|
||||||
url: process.env.VUE_APP_BASE_API + "/bonus/manage/special/importData",
|
url: process.env.VUE_APP_BASE_API + '/bonus/manage/special/importData'
|
||||||
},
|
},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 50,
|
pageSize: 50
|
||||||
},
|
},
|
||||||
loadingInstance: null,
|
loadingInstance: null,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
total: 0,
|
total: 0
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.research();
|
this.research()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submitFileForm() {
|
submitFileForm() {
|
||||||
this.$refs.upload.submit();
|
this.$refs.upload.submit()
|
||||||
},
|
},
|
||||||
// 上传文件数量超出后的动作
|
// 上传文件数量超出后的动作
|
||||||
handleExceed() {
|
handleExceed() {
|
||||||
this.upload.isUploading = false;
|
this.upload.isUploading = false
|
||||||
this.msgInfo('仅可上传一个文件哦');
|
this.msgInfo('仅可上传一个文件哦')
|
||||||
},
|
},
|
||||||
// 文件上传中处理
|
// 文件上传中处理
|
||||||
handleFileUploadProgress(event, file, fileList) {
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
console.log(event, "event");
|
console.log(event, 'event')
|
||||||
this.upload.isUploading = true;
|
this.upload.isUploading = true
|
||||||
},
|
},
|
||||||
// 文件上传成功处理
|
// 文件上传成功处理
|
||||||
handleFileSuccess(response, file, fileList) {
|
handleFileSuccess(response, file, fileList) {
|
||||||
console.log(response, "response");
|
console.log(response, 'response')
|
||||||
this.loadingInstance = this.$loading({
|
this.loadingInstance = this.$loading({
|
||||||
lock: true,
|
lock: true,
|
||||||
text: "正在处理,请稍候...",
|
text: '正在处理,请稍候...',
|
||||||
background: "rgba(0, 0, 0, 0.7)",
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
});
|
})
|
||||||
var fileName = response.fileName;
|
var fileName = response.fileName
|
||||||
if (fileName != undefined && fileName != "") {
|
if (fileName != undefined && fileName != '') {
|
||||||
}
|
}
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
this.$alert("", '上传成功', {
|
this.$alert('', '上传成功', {
|
||||||
dangerouslyUseHTMLString: true,
|
dangerouslyUseHTMLString: true,
|
||||||
callback: () => {
|
callback: () => {
|
||||||
// 关闭遮罩层
|
// 关闭遮罩层
|
||||||
this.loadingInstance.close();
|
this.loadingInstance.close()
|
||||||
},
|
}
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
if (response && response.data && Array.isArray(response.data)) {
|
if (response && response.data && Array.isArray(response.data)) {
|
||||||
const msgList = response.data
|
const msgList = response.data
|
||||||
.map((item) => item.memberCode + " " + item.msg)
|
.map((item) => item.memberCode + ' ' + item.msg)
|
||||||
.join("<br>");
|
.join('<br>')
|
||||||
this.$alert(msgList, this.$t("错误提示"), {
|
this.$alert(msgList, this.$t('错误提示'), {
|
||||||
dangerouslyUseHTMLString: true,
|
dangerouslyUseHTMLString: true,
|
||||||
callback: () => {
|
callback: () => {
|
||||||
// 关闭遮罩层
|
// 关闭遮罩层
|
||||||
this.loadingInstance.close();
|
this.loadingInstance.close()
|
||||||
},
|
}
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
const msgs = response.msg;
|
const msgs = response.msg
|
||||||
this.$alert(msgs, this.$t("错误提示"), {
|
this.$alert(msgs, this.$t('错误提示'), {
|
||||||
dangerouslyUseHTMLString: true,
|
dangerouslyUseHTMLString: true,
|
||||||
callback: () => {
|
callback: () => {
|
||||||
// 关闭遮罩层
|
// 关闭遮罩层
|
||||||
this.loadingInstance.close();
|
this.loadingInstance.close()
|
||||||
},
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.upload.open = false;
|
this.upload.open = false
|
||||||
this.upload.isUploading = false;
|
this.upload.isUploading = false
|
||||||
this.$refs.upload.clearFiles();
|
this.$refs.upload.clearFiles()
|
||||||
},
|
},
|
||||||
handleImport() {
|
handleImport() {
|
||||||
this.upload.title = "批量导入";
|
this.upload.title = '批量导入'
|
||||||
this.upload.open = true;
|
this.upload.open = true
|
||||||
},
|
},
|
||||||
importTemplate() {
|
importTemplate() {
|
||||||
this.download(
|
this.download(
|
||||||
"/bonus/manage/special/download",
|
'/bonus/manage/special/download',
|
||||||
{},
|
{},
|
||||||
`${this.$t("新零售注水业绩")}${new Date().getTime()}.xlsx`
|
`${this.$t('新零售注水业绩')}${new Date().getTime()}.xlsx`
|
||||||
);
|
)
|
||||||
},
|
},
|
||||||
addRules() {
|
addRules() {
|
||||||
this.types = 1;
|
this.types = 1
|
||||||
this.ruleShow = true;
|
this.ruleShow = true
|
||||||
this.title = '添加';
|
this.title = '添加'
|
||||||
},
|
},
|
||||||
updateShow(item) {
|
updateShow(item) {
|
||||||
this.types = 2;
|
this.types = 2
|
||||||
this.title = '修改';
|
this.title = '修改'
|
||||||
api.getOnespecialList(item.pkId).then((res) => {
|
api.getOnespecialList(item.pkId).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.ruleShow = true;
|
this.ruleShow = true
|
||||||
this.table = res.data;
|
this.table = res.data
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
delRole(item) {
|
delRole(item) {
|
||||||
this.$confirm('确认删除?', '提示', {
|
this.$confirm('确认删除?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: "warning",
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
api.specialDel(item.pkId).then((res) => {
|
api.specialDel(item.pkId).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
Message({
|
Message({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: "success",
|
type: 'success'
|
||||||
});
|
})
|
||||||
this.research();
|
this.research()
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
ruleSubmit() {
|
ruleSubmit() {
|
||||||
this.$refs["forms"].validate((valid) => {
|
this.$refs['forms'].validate((valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false;
|
return false
|
||||||
} else {
|
} else {
|
||||||
if (this.types == 1) {
|
if (this.types == 1) {
|
||||||
api.specialSave(this.table).then((res) => {
|
api.specialSave(this.table).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
Message({
|
Message({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: "success",
|
type: 'success'
|
||||||
});
|
})
|
||||||
this.ruleShow = false;
|
this.ruleShow = false
|
||||||
this.$refs["forms"].clearValidate();
|
this.$refs['forms'].clearValidate()
|
||||||
this.$refs["forms"].resetFields();
|
this.$refs['forms'].resetFields()
|
||||||
this.research();
|
this.research()
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
if (this.types == 2) {
|
if (this.types == 2) {
|
||||||
api.specialUpdate(this.table).then((res) => {
|
api.specialUpdate(this.table).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
Message({
|
Message({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: "success",
|
type: 'success'
|
||||||
});
|
})
|
||||||
this.ruleShow = false;
|
this.ruleShow = false
|
||||||
this.$refs["forms"].clearValidate();
|
this.$refs['forms'].clearValidate()
|
||||||
this.$refs["forms"].resetFields();
|
this.$refs['forms'].resetFields()
|
||||||
this.research();
|
this.research()
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.ruleShow = false;
|
this.ruleShow = false
|
||||||
this.table = {};
|
this.table = {}
|
||||||
},
|
},
|
||||||
changeTime(val) {
|
changeTime(val) {
|
||||||
this.queryParams.startDate = val ? val[0] : "";
|
this.queryParams.startDate = val ? val[0] : ''
|
||||||
this.queryParams.endtDate = val ? val[1] : "";
|
this.queryParams.endtDate = val ? val[1] : ''
|
||||||
},
|
},
|
||||||
changeTime1(val) {
|
changeTime1(val) {
|
||||||
this.queryParams.beginEndDate = val ? val[0] : "";
|
this.queryParams.beginEndDate = val ? val[0] : ''
|
||||||
this.queryParams.endEndDate = val ? val[1] : "";
|
this.queryParams.endEndDate = val ? val[1] : ''
|
||||||
},
|
},
|
||||||
research() {
|
research() {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
api.specialList(this.queryParams).then((res) => {
|
api.specialList(this.queryParams).then((res) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
this.tableData = res.rows;
|
this.tableData = res.rows
|
||||||
this.total = res.total;
|
this.total = res.total
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
reChongzhi() {
|
reChongzhi() {
|
||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 50,
|
pageSize: 50
|
||||||
};
|
}
|
||||||
this.modifiedTime = [];
|
this.modifiedTime = []
|
||||||
this.modifiedTime1 = [];
|
this.modifiedTime1 = []
|
||||||
this.research();
|
this.research()
|
||||||
},
|
},
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
this.multipleSelection = val;
|
this.multipleSelection = val
|
||||||
},
|
},
|
||||||
tableRowClassName({ row, rowIndex }) {
|
tableRowClassName({ row, rowIndex }) {
|
||||||
if (rowIndex % 2 == 1) {
|
if (rowIndex % 2 == 1) {
|
||||||
return "warning-row";
|
return 'warning-row'
|
||||||
} else if (rowIndex % 2 == 0) {
|
} else if (rowIndex % 2 == 0) {
|
||||||
return "success-row";
|
return 'success-row'
|
||||||
}
|
}
|
||||||
return "";
|
return ''
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep .el-upload--picture-card {
|
::v-deep .el-upload--picture-card {
|
||||||
|
|
Loading…
Reference in New Issue