Commit bb9fda01 by xinla

--no commit message

1 parent 4e73859b
import request from '@/utils/request' import request from '@/utils/request'
const service = window.CONFIG.services.system + window.CONFIG.services.wecom + '/group' const service = window.CONFIG.services.system + window.CONFIG.services.wecom + '/group'
export function getDetail (chatId) { export function getDetail(chatId) {
return request({ return request({
url: service + `/chat/chatDetail/${chatId}`, url: service + `/chat/chatDetail/${chatId}`,
method: 'get' method: 'get',
}) })
} }
...@@ -15,17 +15,18 @@ export function getDetail (chatId) { ...@@ -15,17 +15,18 @@ export function getDetail (chatId) {
pageNum 是 当前页 pageNum 是 当前页
pageSize 是 每页显示条数 pageSize 是 每页显示条数
groupName 是 群名 groupName 是 群名
groupLeaderName 是 群主,多个使用逗号隔开 groupLeaderName 是 群主姓名,多个使用逗号隔开
userIds 是 群主userId,多个使用逗号隔开
tagIds 是 标签id,多个使用逗号隔开 tagIds 是 标签id,多个使用逗号隔开
beginTime: beginTime:
endTime: endTime:
} }
*/ */
export function getList (params) { export function getList(params) {
return request({ return request({
url: service + '/chat/list', url: service + '/chat/list',
method: 'get', method: 'get',
params params,
}) })
} }
...@@ -39,19 +40,19 @@ export function getList (params) { ...@@ -39,19 +40,19 @@ export function getList (params) {
"pageSize": "" "pageSize": ""
} }
*/ */
export function getMembers (params) { export function getMembers(params) {
return request({ return request({
url: service + '/chat/members', url: service + '/chat/members',
params params,
}) })
} }
/** /**
* 客户群同步接口 * 客户群同步接口
*/ */
export function sync () { export function sync() {
return request({ return request({
url: service + '/chat/synchWeGroup' url: service + '/chat/synchWeGroup',
}) })
} }
...@@ -70,10 +71,10 @@ export function sync () { ...@@ -70,10 +71,10 @@ export function sync () {
* @param {*} data * @param {*} data
* @returns * @returns
*/ */
export function makeGroupTag (data) { export function makeGroupTag(data) {
return request({ return request({
url: service + '/chat/makeGroupTag', url: service + '/chat/makeGroupTag',
method: 'post', method: 'post',
data data,
}) })
} }
...@@ -7,7 +7,7 @@ const service = window.CONFIG.services.system + window.CONFIG.services.wecom + ' ...@@ -7,7 +7,7 @@ const service = window.CONFIG.services.system + window.CONFIG.services.wecom + '
*/ */
export function getAnalysisCustomer() { export function getAnalysisCustomer() {
return request({ return request({
url: service + '/customer/getAnalysis' url: service + '/customer/getAnalysis',
}) })
} }
...@@ -22,7 +22,7 @@ endTime 是 结束时间 ...@@ -22,7 +22,7 @@ endTime 是 结束时间
export function getTotalCntCustomer(params) { export function getTotalCntCustomer(params) {
return request({ return request({
url: service + '/customer/getTotalPageCnt', url: service + '/customer/getTotalPageCnt',
params params,
}) })
} }
...@@ -37,7 +37,7 @@ endTime 是 结束时间 ...@@ -37,7 +37,7 @@ endTime 是 结束时间
export function getUserAvgReplyTimeRank(params) { export function getUserAvgReplyTimeRank(params) {
return request({ return request({
url: service + '/customer/getUserAvgReplyTimeRank', url: service + '/customer/getUserAvgReplyTimeRank',
params params,
}) })
} }
...@@ -52,7 +52,7 @@ endTime 是 结束时间 ...@@ -52,7 +52,7 @@ endTime 是 结束时间
export function getUserChatRank(params) { export function getUserChatRank(params) {
return request({ return request({
url: service + '/customer/getUserChatRank', url: service + '/customer/getUserChatRank',
params params,
}) })
} }
...@@ -67,7 +67,7 @@ endTime 是 结束时间 ...@@ -67,7 +67,7 @@ endTime 是 结束时间
export function dataExportGroup(params) { export function dataExportGroup(params) {
return request({ return request({
url: service + '/customer/total/export', url: service + '/customer/total/export',
params params,
}) })
} }
...@@ -76,7 +76,7 @@ export function dataExportGroup(params) { ...@@ -76,7 +76,7 @@ export function dataExportGroup(params) {
*/ */
export function getAnalysisGroup() { export function getAnalysisGroup() {
return request({ return request({
url: service + '/group/getAnalysis' url: service + '/group/getAnalysis',
}) })
} }
...@@ -91,7 +91,7 @@ endTime 是 结束时间 ...@@ -91,7 +91,7 @@ endTime 是 结束时间
export function getTotalCntGroup(params) { export function getTotalCntGroup(params) {
return request({ return request({
url: service + '/group/getTotalPageCnt', url: service + '/group/getTotalPageCnt',
params params,
}) })
} }
...@@ -105,8 +105,8 @@ endTime 是 结束时间 ...@@ -105,8 +105,8 @@ endTime 是 结束时间
*/ */
export function realDataExportGroup(params) { export function realDataExportGroup(params) {
return request({ return request({
url: service + '/group/real/export', url: service + '/group/total/export',
params params,
}) })
} }
...@@ -121,7 +121,7 @@ endTime 是 结束时间 ...@@ -121,7 +121,7 @@ endTime 是 结束时间
export function getArchiveList(params) { export function getArchiveList(params) {
return request({ return request({
url: service + '/archive/details', url: service + '/archive/details',
params params,
}) })
} }
...@@ -131,6 +131,6 @@ export function getArchiveList(params) { ...@@ -131,6 +131,6 @@ export function getArchiveList(params) {
*/ */
export function getAnalysisArchive() { export function getAnalysisArchive() {
return request({ return request({
url: service + '/archive/getAnalysis' url: service + '/archive/getAnalysis',
}) })
} }
...@@ -17,13 +17,13 @@ export default { ...@@ -17,13 +17,13 @@ export default {
'达摩盘', '达摩盘',
'数据银行', '数据银行',
'微信广告', '微信广告',
'企业微信' '企业微信',
] ],
}, },
// 图例 // 图例
legend: { legend: {
type: Array, type: Array,
default: () => [] default: () => [],
}, },
// 展示数据集 // 展示数据集
// 注:二位数组, 其一维数组顺序需要和图例顺序一致,其二维数组顺序需要和X轴数组顺序一致 // 注:二位数组, 其一维数组顺序需要和图例顺序一致,其二维数组顺序需要和X轴数组顺序一致
...@@ -37,19 +37,19 @@ export default { ...@@ -37,19 +37,19 @@ export default {
// ] // ]
series: { series: {
type: Array, type: Array,
default: () => [[120, 132, 101, 134, 90, 230, 210]] default: () => [[120, 132, 101, 134, 90, 230, 210]],
}, },
// 是否为堆叠柱状图 // 是否为堆叠柱状图
stack: { stack: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
// 自定义图表配置项,使用loadsh.merge(origin, option)和原有的配置进行覆盖合并 // 自定义图表配置项,使用loadsh.merge(origin, option)和原有的配置进行覆盖合并
// loadsh.merge: https://www.html.cn/doc/lodash/#_mergeobject-sources // loadsh.merge: https://www.html.cn/doc/lodash/#_mergeobject-sources
option: { option: {
type: Object, type: Object,
default: null default: null,
} },
}, },
data() { data() {
return {} return {}
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.drawChart() this.drawChart()
}) })
} },
}, },
created() {}, created() {},
mounted() { mounted() {
...@@ -85,9 +85,9 @@ export default { ...@@ -85,9 +85,9 @@ export default {
stack: this.stack, stack: this.stack,
barWidth: this.stack ? 40 : 20, // 柱图宽度 barWidth: this.stack ? 40 : 20, // 柱图宽度
emphasis: { emphasis: {
focus: 'series' focus: 'series',
}, },
data data,
} }
series.push(obj) series.push(obj)
}) })
...@@ -102,15 +102,15 @@ export default { ...@@ -102,15 +102,15 @@ export default {
backgroundColor: '#505050', backgroundColor: '#505050',
borderWidth: 0, borderWidth: 0,
textStyle: { textStyle: {
color: '#fff' color: '#fff',
}, },
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
type: 'cross', type: 'cross',
label: { label: {
backgroundColor: '#6a7985' backgroundColor: '#6a7985',
} },
} },
}, },
legend: { legend: {
data: this.legend, data: this.legend,
...@@ -118,14 +118,14 @@ export default { ...@@ -118,14 +118,14 @@ export default {
y: 'bottom', y: 'bottom',
icon: 'circle', icon: 'circle',
itemWidth: 8, itemWidth: 8,
itemHeight: 8 itemHeight: 8,
}, },
grid: { grid: {
left: '20px', left: '20px',
right: '20px', right: '20px',
bottom: '40px', bottom: '40px',
top: '20px', top: '20px',
containLabel: true containLabel: true,
}, },
xAxis: [ xAxis: [
{ {
...@@ -133,37 +133,42 @@ export default { ...@@ -133,37 +133,42 @@ export default {
data: this.xData, data: this.xData,
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: '#ccc' color: '#ccc',
} },
}, },
axisLabel: { axisLabel: {
// 坐标轴刻度标签的相关设置。 // 坐标轴刻度标签的相关设置。
interval: 0, interval: 0,
color: 'rgba(153, 153, 153, 1)' // 横坐标字体颜色 color: 'rgba(153, 153, 153, 1)', // 横坐标字体颜色
}, },
axisTick: { axisTick: {
// 横坐标刻度 // 横坐标刻度
alignWithLabel: true, alignWithLabel: true,
show: true show: true,
} },
} },
], ],
yAxis: [ yAxis: [
{ {
type: 'value', type: 'value',
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: '#ccc' color: '#ccc',
} },
}, },
axisTick: { axisTick: {
// 横坐标刻度 // 横坐标刻度
alignWithLabel: true, alignWithLabel: true,
show: true show: true,
} },
} axisLabel: {
// 坐标轴刻度标签的相关设置。
// interval: 0,
color: 'rgba(153, 153, 153, 1)', // 坐标字体颜色
},
},
], ],
series series,
} }
this.option && merge(option, this.option) this.option && merge(option, this.option)
...@@ -172,8 +177,8 @@ export default { ...@@ -172,8 +177,8 @@ export default {
// new ResizeObserver((entries) => { // new ResizeObserver((entries) => {
// this.myChart.resize() // this.myChart.resize()
// }).observe(this.$refs.chart) // }).observe(this.$refs.chart)
} },
} },
} }
</script> </script>
......
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
// 折线背景渐变色 // 折线背景渐变色
bgLinearGradient: { bgLinearGradient: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
// X轴坐标数据 // X轴坐标数据
xData: { xData: {
...@@ -23,13 +23,13 @@ export default { ...@@ -23,13 +23,13 @@ export default {
'2021-12-03', '2021-12-03',
'2021-12-04', '2021-12-04',
'2021-12-05', '2021-12-05',
'2021-12-06' '2021-12-06',
] ],
}, },
// 图例; 单个图例可传字符串,实际转换成单元素数组[string] // 图例; 单个图例可传字符串,实际转换成单元素数组[string]
legend: { legend: {
type: [Array, String], type: [Array, String],
default: () => ['新增客户'] default: () => ['新增客户'],
}, },
// 展示数据集 // 展示数据集
// 注:二位数组, 其一维数组顺序需要和图例顺序一致,其二维数组顺序需要和X轴数组顺序一致 // 注:二位数组, 其一维数组顺序需要和图例顺序一致,其二维数组顺序需要和X轴数组顺序一致
...@@ -43,14 +43,14 @@ export default { ...@@ -43,14 +43,14 @@ export default {
// ] // ]
series: { series: {
type: Array, type: Array,
default: () => [120, 132, 101, 134, 90, 230, 210] default: () => [120, 132, 101, 134, 90, 230, 210],
}, },
// 自定义图表配置项,使用loadsh.merge(origin, option)和原有的配置进行覆盖合并 // 自定义图表配置项,使用loadsh.merge(origin, option)和原有的配置进行覆盖合并
// loadsh.merge: https://www.html.cn/doc/lodash/#_mergeobject-sources // loadsh.merge: https://www.html.cn/doc/lodash/#_mergeobject-sources
option: { option: {
type: Object, type: Object,
default: null default: null,
} },
}, },
data() { data() {
return {} return {}
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.drawChart() this.drawChart()
}) })
} },
}, },
created() {}, created() {},
mounted() { mounted() {
...@@ -88,9 +88,9 @@ export default { ...@@ -88,9 +88,9 @@ export default {
symbol: 'circle', // 数值点类型 symbol: 'circle', // 数值点类型
symbolSize: 6, // 数值点大小 symbolSize: 6, // 数值点大小
emphasis: { emphasis: {
focus: 'series' focus: 'series',
}, },
data data,
} }
this.bgLinearGradient && this.bgLinearGradient &&
Object.assign(obj, { Object.assign(obj, {
...@@ -104,16 +104,16 @@ export default { ...@@ -104,16 +104,16 @@ export default {
colorStops: [ colorStops: [
{ {
offset: 0, offset: 0,
color: echartColors[index] // 0% 处的颜色 color: echartColors[index], // 0% 处的颜色
}, },
{ {
offset: 0.8, offset: 0.8,
color: 'white' // 100% 处的颜色 color: 'white', // 100% 处的颜色
} },
], ],
global: false // 缺省为 false global: false, // 缺省为 false
} },
} },
}) })
series.push(obj) series.push(obj)
}) })
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
tooltip: { tooltip: {
textStyle: { textStyle: {
color: '#FFF', // 设置文字颜色 color: '#FFF', // 设置文字颜色
fontSize: 12 fontSize: 12,
}, },
trigger: 'axis', trigger: 'axis',
backgroundColor: '#505050', backgroundColor: '#505050',
...@@ -134,9 +134,9 @@ export default { ...@@ -134,9 +134,9 @@ export default {
axisPointer: { axisPointer: {
type: 'cross', type: 'cross',
label: { label: {
backgroundColor: '#6a7985' backgroundColor: '#6a7985',
} },
} },
}, },
legend: { legend: {
data: legend, data: legend,
...@@ -157,20 +157,20 @@ export default { ...@@ -157,20 +157,20 @@ export default {
itemWidth: 16, itemWidth: 16,
// itemHeight: 8, // itemHeight: 8,
tooltip: { tooltip: {
show: true show: true,
}, },
textStyle: { textStyle: {
color: '#36363A', color: '#36363A',
fontSize: 12, fontSize: 12,
lineHeight: 14 lineHeight: 14,
} },
}, },
grid: { grid: {
left: '3%', left: '3%',
right: '3%', right: '3%',
bottom: '40px', bottom: '40px',
top: '30px', top: '30px',
containLabel: true containLabel: true,
}, },
xAxis: [ xAxis: [
{ {
...@@ -180,33 +180,38 @@ export default { ...@@ -180,33 +180,38 @@ export default {
offset: 5, offset: 5,
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: '#ccc' color: '#ccc',
} },
}, },
axisLabel: { axisLabel: {
// 坐标轴刻度标签的相关设置。 // 坐标轴刻度标签的相关设置。
// interval: 0, // interval: 0,
color: 'rgba(153, 153, 153, 1)' // 横坐标字体颜色 color: 'rgba(153, 153, 153, 1)', // 坐标字体颜色
}, },
axisTick: { axisTick: {
// 横坐标刻度 // 横坐标刻度
alignWithLabel: true, alignWithLabel: true,
show: true show: true,
} },
} },
], ],
yAxis: [ yAxis: [
{ {
type: 'value', type: 'value',
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: '#ccc' color: '#ccc',
},
show: false,
},
axisLabel: {
// 坐标轴刻度标签的相关设置。
// interval: 0,
color: 'rgba(153, 153, 153, 1)', // 坐标字体颜色
},
}, },
show: false
}
}
], ],
series series,
} }
this.option && merge(option, this.option) this.option && merge(option, this.option)
option && this.myChart.setOption(option) option && this.myChart.setOption(option)
...@@ -214,8 +219,8 @@ export default { ...@@ -214,8 +219,8 @@ export default {
new ResizeObserver((entries) => { new ResizeObserver((entries) => {
this.myChart.resize() this.myChart.resize()
}).observe(this.$refs.chart) }).observe(this.$refs.chart)
} },
} },
} }
</script> </script>
......
...@@ -197,7 +197,7 @@ export default { ...@@ -197,7 +197,7 @@ export default {
let index = this.userList.findIndex((i) => i.userId === key) let index = this.userList.findIndex((i) => i.userId === key)
index > -1 && this.userList.splice(index, 1) index > -1 && this.userList.splice(index, 1)
let order = this.defaultValues.findIndex((i) => i.userId === key) let order = this.defaultValues.findIndex((i) => i.userId === key)
order > -1 && this.defaultValues.splice(order, 1) order > -1 && this.defaultValues.slice().splice(order, 1)
}, },
}, },
} }
......
...@@ -232,15 +232,14 @@ export default { ...@@ -232,15 +232,14 @@ export default {
}, },
getSelectUser(data) { getSelectUser(data) {
this.userArray = data this.userArray = data
this.query[this.dialogType] = data.map((e) => e.name).join(',') this.query[this.dialogType] = data.map((e) => e.userId).join(',')
if (['customerGroupMemberTotalChart', 'customerGroupMemberTotalTable'].includes(this.type)) { if (['customerGroupMemberTotalChart', 'customerGroupMemberTotalTable'].includes(this.type)) {
this.query.chatIds = '' this.query.chatIds = ''
this.getGroupList({ this.getGroupList({
groupLeaderName: this.query[this.dialogType], userIds: this.query[this.dialogType],
}) })
} else {
this.getList()
} }
this.getList()
}, },
exprotTable() { exprotTable() {
this.$confirm('是否确认导出吗?', '警告', { this.$confirm('是否确认导出吗?', '警告', {
...@@ -292,7 +291,7 @@ export default { ...@@ -292,7 +291,7 @@ export default {
<el-input <el-input
v-if="type.toLowerCase().includes('group')" v-if="type.toLowerCase().includes('group')"
style="width: 180px" style="width: 180px"
v-model="query._groupOwners" :value="userArray.map((e) => e.name) + ''"
readonly readonly
@focus="showDialog('_groupOwners')" @focus="showDialog('_groupOwners')"
placeholder="请选择群主" placeholder="请选择群主"
...@@ -323,7 +322,7 @@ export default { ...@@ -323,7 +322,7 @@ export default {
].includes(type) ].includes(type)
" "
style="width: 180px" style="width: 180px"
:value="query._users" :value="userArray.map((e) => e.name) + ''"
readonly readonly
@focus="showDialog('_users')" @focus="showDialog('_users')"
placeholder="请选择部门或员工" placeholder="请选择部门或员工"
......
...@@ -116,15 +116,14 @@ export default { ...@@ -116,15 +116,14 @@ export default {
}, },
getSelectUser(data) { getSelectUser(data) {
this.selectUsers[this.dialogType] = data this.selectUsers[this.dialogType] = data
this.query[this.dialogType] = data.map((e) => e.name).join(',') this.query[this.dialogType] = data.map((e) => e.userId).join(',')
if (this.dialogType === 'customerGroup') { if (this.dialogType === 'customerGroupMember') {
this.getList(this.dialogType)
} else {
this.query.chatIds = '' this.query.chatIds = ''
this.getGroupList({ this.getGroupList({
groupLeaderName: this.query[this.dialogType], userIds: this.query[this.dialogType],
}) })
} }
this.getList(this.dialogType)
}, },
}, },
} }
...@@ -167,7 +166,7 @@ export default { ...@@ -167,7 +166,7 @@ export default {
<div> <div>
<el-input <el-input
style="width: 180px" style="width: 180px"
v-model="query.customerGroup" :value="selectUsers['customerGroup'].map((e) => e.name) + ''"
readonly readonly
@focus="showDialog('customerGroup')" @focus="showDialog('customerGroup')"
placeholder="请选择群主" placeholder="请选择群主"
...@@ -184,7 +183,7 @@ export default { ...@@ -184,7 +183,7 @@ export default {
<div> <div>
<el-input <el-input
style="width: 180px" style="width: 180px"
v-model="query.customerGroupMember" :value="selectUsers['customerGroupMember'].map((e) => e.name) + ''"
readonly readonly
@focus="showDialog('customerGroupMember')" @focus="showDialog('customerGroupMember')"
placeholder="请选择群主" placeholder="请选择群主"
......
...@@ -113,13 +113,14 @@ ...@@ -113,13 +113,14 @@
label-width="120px" label-width="120px"
> >
<el-form-item label="红包金额(元)" prop="money"> <el-form-item label="红包金额(元)" prop="money">
<el-input <el-input-number
type="text" placeholder="请输入"
placeholder="请输入金额"
v-model="addForm.money" v-model="addForm.money"
:precision="2"
:step="0.1"
:max="200" :max="200"
:min="0.01" :min="1"
></el-input> ></el-input-number>
<div class="sub-des">精确到小数点后两位,可输入1~200</div> <div class="sub-des">精确到小数点后两位,可输入1~200</div>
</el-form-item> </el-form-item>
<el-form-item label="发送场景" prop="sceneType"> <el-form-item label="发送场景" prop="sceneType">
...@@ -271,12 +272,12 @@ export default { ...@@ -271,12 +272,12 @@ export default {
addForm: { addForm: {
sceneType: [], sceneType: [],
name: '', name: '',
money: '', money: 1,
}, },
addRules: { addRules: {
name: [{ required: true, message: '必填项' }], name: [{ required: true, message: '必填项' }],
money: [ money: [
{ required: true, message: '必填项', trigger: 'blur' }, { required: true, message: '必填项', trigger: 'change' },
{ validator: validateAmount, trigger: 'blur' }, { validator: validateAmount, trigger: 'blur' },
], ],
sceneType: [{ required: true, message: '必填项', trigger: 'change' }], sceneType: [{ required: true, message: '必填项', trigger: 'change' }],
...@@ -297,11 +298,13 @@ export default { ...@@ -297,11 +298,13 @@ export default {
}, },
methods: { methods: {
getList() { getList() {
getList(this.query).then((res) => { getList(this.query).then(({ rows, total }) => {
if (res.code == 200) { rows.forEach((e) => {
this.list = res.rows // 单位换算 分转元
this.total = +res.total e.money = (e.money / 100).toFixed(2)
} })
this.list = rows
this.total = +total
}) })
}, },
resetQuery() { resetQuery() {
...@@ -309,15 +312,17 @@ export default { ...@@ -309,15 +312,17 @@ export default {
this.getList(1) this.getList(1)
}, },
edit(row) { edit(row) {
this.addForm = Object.assign({ sceneType: [] }, row || {}) this.addForm = Object.assign({}, row || {})
this.addDialogVisible = true this.addDialogVisible = true
this.$nextTick(() => this.$refs.addForm.clearValidate()) this.$nextTick(() => this.$refs.addForm.clearValidate())
}, },
addOrUpdate() { addOrUpdate() {
this.$refs.addForm.validate((validate) => { this.$refs.addForm.validate((validate) => {
if (!validate) return if (!validate) return
this.addForm.money = Number(this.addForm.money) let form = Object.assign({}, this.addForm)
addOrUpdate(this.addForm).then((res) => { // 单位换算 元转分
form.money *= 100
addOrUpdate(form).then((res) => {
this.msgSuccess('操作成功') this.msgSuccess('操作成功')
this.getList() this.getList()
this.addDialogVisible = false this.addDialogVisible = false
...@@ -331,6 +336,9 @@ export default { ...@@ -331,6 +336,9 @@ export default {
async showLimitConfig() { async showLimitConfig() {
const { data } = await getLimit() const { data } = await getLimit()
let { id, singleDayPay, singleCustomerReceiveNum, singleCustomerReceiveMoney } = data let { id, singleDayPay, singleCustomerReceiveNum, singleCustomerReceiveMoney } = data
// 单位换算 分转元
singleDayPay /= 100
singleCustomerReceiveMoney /= 100
this.limitForm = { id, singleDayPay, singleCustomerReceiveNum, singleCustomerReceiveMoney } this.limitForm = { id, singleDayPay, singleCustomerReceiveNum, singleCustomerReceiveMoney }
this.limitDialogVisible = true this.limitDialogVisible = true
this.$nextTick(() => this.$refs.limitForm.clearValidate()) this.$nextTick(() => this.$refs.limitForm.clearValidate())
...@@ -338,7 +346,11 @@ export default { ...@@ -338,7 +346,11 @@ export default {
setLimit() { setLimit() {
this.$refs.limitForm.validate((validate) => { this.$refs.limitForm.validate((validate) => {
if (!validate) return if (!validate) return
setLimit(this.limitForm).then((res) => { let form = Object.assign({}, this.limitForm)
// 单位换算 元转分
form.singleDayPay *= 100
form.singleCustomerReceiveMoney *= 100
setLimit(form).then((res) => {
this.limitDialogVisible = false this.limitDialogVisible = false
this.msgSuccess('操作成功') this.msgSuccess('操作成功')
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!