Commit 62dc60ce by 无尘

fix: 修改公告

parent ecd4e415
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-10-21 14:27:29 * @Date: 2019-10-21 14:27:29
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-10-23 14:16:57 * @LastEditTime: 2019-10-24 16:47:58
--> -->
<!-- <!--
...@@ -20,13 +20,17 @@ import reviewResultDetail from '@/components/review/review-result-detail.vue' ...@@ -20,13 +20,17 @@ import reviewResultDetail from '@/components/review/review-result-detail.vue'
<el-dialog class="edit-dialog" title="审核详情" :visible.sync="customDialog" width="600px" :before-close="handleClose"> <el-dialog class="edit-dialog" title="审核详情" :visible.sync="customDialog" width="600px" :before-close="handleClose">
<div class="edit-dialog-body"> <div class="edit-dialog-body">
<el-table :data="tableData" style="width: 100%" height="250"> <el-table :data="tableData" style="width: 100%" height="250">
<el-table-column prop="publishRecordId" label="审核事项" show-overflow-tooltip> </el-table-column> <el-table-column prop="publishRecordId" label="审核事项" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.auditingType == 0 ? '门店信息变更' : scope.row.auditingType == 1 ? '新增成员' : scope.row.auditingType == 2 ? '成员离职' : '转移成员' }}
</template>
</el-table-column>
<el-table-column label="品牌" show-overflow-tooltip> <el-table-column label="品牌" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.remark }} {{ scope.row.brandName || '--' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="提交人" show-overflow-tooltip> <el-table-column label="提交人" width="150" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex"> <div class="flex">
<div class="flex flex-align-center flex-pack-center bg-82C5FF table-head-pic"> <div class="flex flex-align-center flex-pack-center bg-82C5FF table-head-pic">
...@@ -42,13 +46,13 @@ import reviewResultDetail from '@/components/review/review-result-detail.vue' ...@@ -42,13 +46,13 @@ import reviewResultDetail from '@/components/review/review-result-detail.vue'
</el-table-column> </el-table-column>
<el-table-column label="提交时间" show-overflow-tooltip> <el-table-column label="提交时间" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<div class="color-606266 line-18">{{ scope.row.publishTime | timeStampToYmd }}</div> <div class="color-606266 line-18">{{ scope.row.createTime | timeStampToYmd }}</div>
<div class="color-606266 line-18">{{ scope.row.publishTime | timeStampToHms }}</div> <div class="color-606266 line-18">{{ scope.row.createTime | timeStampToHms }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核结果" show-overflow-tooltip> <el-table-column label="审核结果" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.remark }} {{ scope.row.auditStatus }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -132,6 +136,21 @@ export default { ...@@ -132,6 +136,21 @@ export default {
.bg-82C5FF { .bg-82C5FF {
background: #82c5ff; background: #82c5ff;
} }
.table-head-pic {
width: 35px;
height: 35px;
border-radius: 4px;
i {
font-size: 20px;
color: #e5f3ff;
}
}
.apply-info {
margin-left: 15px;
line-height: 18px;
}
.edit-dialog { .edit-dialog {
/deep/ .el-dialog__body { /deep/ .el-dialog__body {
padding: 25px 20px 17px 20px; padding: 25px 20px 17px 20px;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-04-12 17:56:45 * @Date: 2019-04-12 17:56:45
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-10-24 14:51:43 * @LastEditTime: 2019-10-24 16:58:43
--> -->
<template> <template>
<div class="notice-list-wrap"> <div class="notice-list-wrap">
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
</div> </div>
</div> </div>
<div class="flex m-t-20"> <div class="flex m-t-20">
<el-checkbox :disabled="$route.query.announcementId ? true : false" v-model="ruleFormData.stroreCheck">门店架构</el-checkbox> <el-checkbox :disabled="$route.query.announcementId ? true : false" v-model="ruleFormData.storeCheck">门店架构</el-checkbox>
<div v-if="ruleFormData.stroreCheck" class="flex-column item-cell-select inline-block m-l-10"> <div v-if="ruleFormData.storeCheck" class="flex-column item-cell-select inline-block m-l-10">
<div class="depart-item-wrap"> <div class="depart-item-wrap">
<div style="width:350px" class="el-select el-select--large depart-item-content" @click="showDialogLayer('store', defaultStoreList)"> <div style="width:330px" class="el-select el-select--large depart-item-content" @click="showDialogLayer('store', defaultStoreList)">
<span class="font-14 color-c0c4cc p-l-10" v-if="!defaultStoreList.length">请选择门店架构</span> <span class="font-14 color-c0c4cc p-l-10" v-if="!defaultStoreList.length">请选择门店架构</span>
<div class="el-select__tags"> <div class="el-select__tags">
<span> <span>
...@@ -51,14 +51,14 @@ ...@@ -51,14 +51,14 @@
</div> </div>
</div> </div>
</div> </div>
<div class="depart-item-wrap" v-if="ruleFormData.stroreCheck"> <div class="depart-item-wrap" v-if="ruleFormData.storeCheck">
<el-select :disabled="$route.query.announcementId ? true : false" class="m-l-10" v-model="ruleFormData.receiveType" placeholder="请选择"> <el-select :disabled="$route.query.announcementId ? true : false" class="m-l-10" v-model="ruleFormData.receiveType" placeholder="请选择">
<el-option label="仅店长" value="0"></el-option> <el-option label="仅店长" value="0"></el-option>
<el-option label="门店所有员工" value="1"></el-option> <el-option label="门店所有员工" value="1"></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
<div v-show="(defaultStoreBool && !ruleFormData.adminCheck && !ruleFormData.stroreCheck) || (defaultStoreBool && ruleFormData.adminCheck && !defaultSelection.length) || (defaultStoreBool && ruleFormData.stroreCheck && (!defaultStoreList.length || ruleFormData.receiveType == ''))" class="el-form-item__error">请选择发送范围</div> <div v-show="(defaultStoreBool && !ruleFormData.adminCheck && !ruleFormData.storeCheck) || (defaultStoreBool && ruleFormData.adminCheck && !defaultSelection.length) || (defaultStoreBool && ruleFormData.storeCheck && (!defaultStoreList.length || ruleFormData.receiveType == ''))" class="el-form-item__error">请选择发送范围</div>
</el-form-item> </el-form-item>
<el-form-item label="选择分类" prop="labelId"> <el-form-item label="选择分类" prop="labelId">
<el-select :disabled="$route.query.announcementId ? true : false" v-model="ruleFormData.labelId" placeholder="请选择" style="width:560px"> <el-option v-for="item in classifyOptions" :key="item.labelId" :label="item.labelName" :value="item.labelId"> </el-option> </el-select><el-button class="p-l-20" type="text" @click="newClassify">新建分类</el-button> <el-select :disabled="$route.query.announcementId ? true : false" v-model="ruleFormData.labelId" placeholder="请选择" style="width:560px"> <el-option v-for="item in classifyOptions" :key="item.labelId" :label="item.labelName" :value="item.labelId"> </el-option> </el-select><el-button class="p-l-20" type="text" @click="newClassify">新建分类</el-button>
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
<el-form-item> <el-form-item>
<div class="btn-wrap"> <div class="btn-wrap">
<el-button @click="cancelSend" plain>取消</el-button> <el-button @click="cancelSend" plain>取消</el-button>
<el-button :disabled="(!ruleFormData.adminCheck && !ruleFormData.stroreCheck) || (ruleFormData.adminCheck && !defaultSelection.length) || (ruleFormData.stroreCheck && (!defaultStoreList.length || ruleFormData.receiveType == '')) || !ruleFormData.title || !ruleFormData.content || (ruleFormData.sendType == '1' && !dateValue) ? true : false" @click="previewData('noteForm')" type="primary">预览</el-button> <el-button :disabled="(!ruleFormData.adminCheck && !ruleFormData.storeCheck) || (ruleFormData.adminCheck && !defaultSelection.length) || (ruleFormData.storeCheck && (!defaultStoreList.length || ruleFormData.receiveType == '')) || !ruleFormData.title || !ruleFormData.content || (ruleFormData.sendType == '1' && !dateValue) ? true : false" @click="previewData('noteForm')" type="primary">预览</el-button>
<el-button :disabled="$route.query.announcementId ? true : false" @click="sendData('noteForm')" type="primary">发布</el-button> <el-button :disabled="$route.query.announcementId ? true : false" @click="sendData('noteForm')" type="primary">发布</el-button>
</div> </div>
</el-form-item> </el-form-item>
...@@ -173,7 +173,7 @@ export default { ...@@ -173,7 +173,7 @@ export default {
ruleFormData: { ruleFormData: {
announcementId: '', announcementId: '',
adminCheck: false, adminCheck: false,
stroreCheck: false, storeCheck: false,
adminStructor: [], adminStructor: [],
storeStructor: [], storeStructor: [],
receiveType: '0', receiveType: '0',
...@@ -243,7 +243,7 @@ export default { ...@@ -243,7 +243,7 @@ export default {
previewData(formName) { previewData(formName) {
const that = this; const that = this;
// 发送范围 // 发送范围
if (!that.ruleFormData.adminCheck && !that.ruleFormData.stroreCheck) { if (!that.ruleFormData.adminCheck && !that.ruleFormData.storeCheck) {
that.defaultStoreBool = true; that.defaultStoreBool = true;
that.saveDataBool = false; that.saveDataBool = false;
} }
...@@ -251,7 +251,7 @@ export default { ...@@ -251,7 +251,7 @@ export default {
that.defaultStoreBool = true; that.defaultStoreBool = true;
that.saveDataBool = false; that.saveDataBool = false;
} }
if (that.ruleFormData.stroreCheck && !that.ruleFormData.storeStructor.length) { if (that.ruleFormData.storeCheck && !that.ruleFormData.storeStructor.length) {
that.defaultStoreBool = true; that.defaultStoreBool = true;
that.saveDataBool = false; that.saveDataBool = false;
} }
...@@ -517,7 +517,7 @@ export default { ...@@ -517,7 +517,7 @@ export default {
sendData: _debounce(function(formName) { sendData: _debounce(function(formName) {
const that = this; const that = this;
// 发送范围 // 发送范围
if (!that.ruleFormData.adminCheck && !that.ruleFormData.stroreCheck ) { if (!that.ruleFormData.adminCheck && !that.ruleFormData.storeCheck ) {
that.defaultStoreBool = true; that.defaultStoreBool = true;
that.saveDataBool = false; that.saveDataBool = false;
} }
...@@ -525,7 +525,7 @@ export default { ...@@ -525,7 +525,7 @@ export default {
that.defaultStoreBool = true; that.defaultStoreBool = true;
that.saveDataBool = false; that.saveDataBool = false;
} }
if (that.ruleFormData.stroreCheck && !that.ruleFormData.storeStructor.length ) { if (that.ruleFormData.storeCheck && !that.ruleFormData.storeStructor.length ) {
that.defaultStoreBool = true; that.defaultStoreBool = true;
that.saveDataBool = false; that.saveDataBool = false;
} }
...@@ -548,7 +548,7 @@ export default { ...@@ -548,7 +548,7 @@ export default {
}) })
} }
let storeStructor = []; let storeStructor = [];
if (that.ruleFormData.stroreCheck && that.ruleFormData.storeStructor.length) { if (that.ruleFormData.storeCheck && that.ruleFormData.storeStructor.length) {
storeStructor = that.ruleFormData.storeStructor.map(item => { storeStructor = that.ruleFormData.storeStructor.map(item => {
return { return {
id: item.id, id: item.id,
...@@ -561,7 +561,7 @@ export default { ...@@ -561,7 +561,7 @@ export default {
if (valid) { if (valid) {
let para = { let para = {
adminCheck: that.ruleFormData.adminCheck? 1 : 0, adminCheck: that.ruleFormData.adminCheck? 1 : 0,
stroreCheck: that.ruleFormData.stroreCheck? 1 : 0, storeCheck: that.ruleFormData.storeCheck? 1 : 0,
adminStructor: JSON.stringify(adminStructor), adminStructor: JSON.stringify(adminStructor),
storeStructor: JSON.stringify(storeStructor), storeStructor: JSON.stringify(storeStructor),
receiveType: that.ruleFormData.receiveType, receiveType: that.ruleFormData.receiveType,
...@@ -635,9 +635,11 @@ export default { ...@@ -635,9 +635,11 @@ export default {
that.defaultStoreList = data.result.storeStructor; that.defaultStoreList = data.result.storeStructor;
data.result.pageTop = data.result.pageTop ? false : true; data.result.pageTop = data.result.pageTop ? false : true;
data.result.sendType = String(data.result.sendType); data.result.sendType = String(data.result.sendType);
data.result.receiveType = String(data.result.receiveType);
that.dateValue = formatDate(data.result.sendTime); that.dateValue = formatDate(data.result.sendTime);
that.noticePreviewData = JSON.parse(JSON.stringify(data.result)); that.noticePreviewData = JSON.parse(JSON.stringify(data.result));
that.ruleFormData = JSON.parse(JSON.stringify(data.result)); that.ruleFormData = JSON.parse(JSON.stringify(data.result));
console.log(that.ruleFormData)
} }
}) })
.catch(function(error) { .catch(function(error) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2018-10-10 14:44:45 * @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-10-23 14:16:33 * @LastEditTime: 2019-10-24 16:31:41
--> -->
<template> <template>
<div class="unreview-wrap common-set-wrap"> <div class="unreview-wrap common-set-wrap">
...@@ -383,6 +383,7 @@ export default { ...@@ -383,6 +383,7 @@ export default {
} }
}); });
}); });
console.log(that.tableListData);
that.resultShow = true; that.resultShow = true;
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment