Commit f8706718 by 胡悦

修复bug

1 parent ef316f80
......@@ -210,6 +210,15 @@ const getActivity = params => {
sign: true
})
}
const nameVaild = params => {
params.method = 'entmicro.api.one.template.name.valid'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
export default {
customerList,
customerGroupList,
......@@ -231,5 +240,6 @@ export default {
getCard,
getCoupon,
getPackage,
getActivity
getActivity,
nameVaild
}
......@@ -282,7 +282,10 @@ export default {
addLoading: false,
eventBus: new Vue(),
basicForm: {
condition: {}
selectType: 1,
condition: {
sex: ''
}
},
basicRules: {
userList: [
......
......@@ -169,6 +169,19 @@ export default {
}
}
}
const nameVaild = (rule, value, callback) => {
console.log(value)
if (value) {
this.$apis.customerTransform.nameVaild({ templateName: value }).then(res => {
console.log(res)
if (res) {
callback(new Error('群聊名称不可重复'))
} else {
callback()
}
})
}
}
return {
addLoading: false,
eventBus: new Vue(),
......@@ -178,7 +191,10 @@ export default {
// { required: true, message: '请选择群发账号', trigger: 'blur' },
{ validator: validatorUser, trigger: 'change' }
],
massName: [{ required: true, message: '请输入群聊名称', trigger: 'blur' }],
massName: [
{ required: true, message: '请输入群聊名称', trigger: 'blur' },
{ validator: nameVaild, trigger: 'blur' }
],
attachmentList: [
// { required: true, message: '请输入入群欢迎语' },
{ validator: validatorAttachment, trigger: 'change' }
......
......@@ -8,7 +8,7 @@
<div class="detail-label">创建者:</div>
<div class="detail-value">{{basicInfo.createdName ? basicInfo.createdName : '-'}}</div>
</div>
<div class="detail-item">
<div class="detail-item" v-show="form == 'customer'">
<div class="detail-label">群发类型:</div>
<div class="detail-value">{{basicInfo.sendType == 1 ? '立即发送': '定时发送'}}</div>
</div>
......@@ -16,9 +16,9 @@
<div class="detail-label">发送状态:</div>
<div class="detail-value">{{STATUS_TYPE[basicInfo.status]}}</div>
</div>
<div class="detail-item" v-show="form == 'customer' && basicInfo.sendType == 2">
<div class="detail-item">
<div class="detail-label">发送时间:</div>
<div class="detail-value">{{basicInfo.sendTime}}</div>
<div class="detail-value">{{basicInfo.sendTime ? basicInfo.sendTime : '--'}}</div>
</div>
<div class="detail-item">
<div class="detail-label">群发对象:</div>
......@@ -93,6 +93,8 @@ const STATUS = {
'1': '发送成功',
'2': '发送失败'
}
import * as dayjs from 'dayjs'
import Preview from '../components/preview.vue'
export default {
name: 'BasicInof',
......@@ -117,6 +119,7 @@ export default {
this.$apis.customerTransform.customerDetail({ id }).then(res => {
console.log(res)
this.basicInfo = res
// this.basicInfo.sendTime = dayjs(this.basicInfo.sendTime).format('YYYY-MM-DD HH:mm:ss')
const previewList = res.attachmentList.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
return item
......
......@@ -318,6 +318,8 @@ export default {
}
.customer-table {
display: flex;
margin-top: 0;
margin-left: 10px;
&.send {
width: 70px;
}
......
......@@ -125,14 +125,14 @@ export default {
label: '发送时间',
prop: 'sendTime',
width: 160,
line: 2,
formatter: cellValue => {
if (cellValue.sendTime) {
return dayjs(cellValue.sendTime).format('YYYY-MM-DD HH:mm:ss')
} else {
return ''
}
}
line: 2
// formatter: cellValue => {
// if (cellValue.sendTime) {
// return dayjs(cellValue.sendTime).format('YYYY-MM-DD HH:mm:ss')
// } else {
// return ''
// }
// }
},
{
label: '已发送员工',
......@@ -185,6 +185,13 @@ export default {
prop: 'sendTime',
width: 150,
line: 2
// formatter: cellValue => {
// if (cellValue.sendTime) {
// return dayjs(cellValue.sendTime).format('YYYY-MM-DD HH:mm:ss')
// } else {
// return ''
// }
// }
},
{
label: '已发送群主',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!