Commit 6f670224 authored by 张冬's avatar 张冬

澄清公告编辑

parent f35e9be1
...@@ -76,6 +76,16 @@ export function forwardClarify(data) { ...@@ -76,6 +76,16 @@ export function forwardClarify(data) {
data: data data: data
}) })
} }
// 修改澄清公告
export function editClarifiesNotice(data) {
return request({
url: '/tender-clarifies/edit-clarifiesNotice',
method: 'POST',
data: data
})
}
// 问题内容接口 // 问题内容接口
......
...@@ -153,7 +153,8 @@ img { ...@@ -153,7 +153,8 @@ img {
background: #fff; background: #fff;
margin-bottom: 20px; margin-bottom: 20px;
box-sizing: border-box; box-sizing: border-box;
padding: 10px padding: 10px;
position: relative;
} }
.content-head>h3 { .content-head>h3 {
......
...@@ -78,6 +78,8 @@ export default { ...@@ -78,6 +78,8 @@ export default {
let value = [] let value = []
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
let message = {} let message = {}
message.name = fileList[i].name
message.url = fileList[i].url
message.fileName = fileList[i].name message.fileName = fileList[i].name
message.fileUrl = fileList[i].url message.fileUrl = fileList[i].url
message.uid=fileList[i].uid message.uid=fileList[i].uid
...@@ -123,6 +125,7 @@ export default { ...@@ -123,6 +125,7 @@ export default {
let objName = getFileNameUUID() let objName = getFileNameUUID()
// 调用 ali-oss 中的方法 // 调用 ali-oss 中的方法
put(`${objName}${option.file.name}`, option.file).then(res => { put(`${objName}${option.file.name}`, option.file).then(res => {
console.log(res)
this.fileList.push(res) this.fileList.push(res)
console.log(this.fileList) console.log(this.fileList)
this.emitInput(this.fileList) this.emitInput(this.fileList)
......
...@@ -69,6 +69,8 @@ export default { ...@@ -69,6 +69,8 @@ export default {
console.log(fileList) console.log(fileList)
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
let message = {} let message = {}
message.name = fileList[i].name
message.url = fileList[i].url
message.fileName = fileList[i].name message.fileName = fileList[i].name
message.fileUrl = fileList[i].url message.fileUrl = fileList[i].url
value.push(message) value.push(message)
......
...@@ -30,9 +30,16 @@ ...@@ -30,9 +30,16 @@
<el-button type="text" size="small" @click="handleSee(scope.row)">查看</el-button> <el-button type="text" size="small" @click="handleSee(scope.row)">查看</el-button>
</div> </div>
<div v-else> <div v-else>
<el-button v-if="scope.row.noticeId" type="text" size="small" @click="handleSee(scope.row)">查看</el-button> <div v-if="scope.row.status == 2">
<el-button type="text" size="small" @click="edit(scope.row.noticeId)">修改</el-button>
</div>
<div v-else>
<el-button v-if="scope.row.noticeId" type="text" size="small" @click="handleSee(scope.row)"
>查看</el-button
>
<el-button v-else type="text" size="small" @click="handleReply(scope.row)">回复</el-button> <el-button v-else type="text" size="small" @click="handleReply(scope.row)">回复</el-button>
</div> </div>
</div>
</template> </template>
</el-table-column> </el-table-column>
</dataTable> </dataTable>
...@@ -136,6 +143,10 @@ export default { ...@@ -136,6 +143,10 @@ export default {
getIndex(value) { getIndex(value) {
this.idx = value; this.idx = value;
}, },
//修改
edit(noticeId){
this.$router.push(`/purchaser/bid/bidStage/clearManagement/propose?type=1&noticeId=${noticeId}`);
},
// 提出 // 提出
propose() { propose() {
this.$router.push('/purchaser/bid/bidStage/clearManagement/propose'); this.$router.push('/purchaser/bid/bidStage/clearManagement/propose');
......
...@@ -2,8 +2,11 @@ ...@@ -2,8 +2,11 @@
<div> <div>
<div class="content-head"> <div class="content-head">
<dataBreadcrumb :breads="breads"></dataBreadcrumb> <dataBreadcrumb :breads="breads"></dataBreadcrumb>
<h3>提出澄清</h3> <h3>{{title}}澄清</h3>
<h5>提出澄清</h5> <h5>{{title}}澄清</h5>
<div v-if="type==1" class="abs">
<div>拒绝原因:{{ruleForm.reason}}</div>
</div>
</div> </div>
<div class="content"> <div class="content">
<div class="describe">澄清公告信息</div> <div class="describe">澄清公告信息</div>
...@@ -16,7 +19,7 @@ ...@@ -16,7 +19,7 @@
<el-input v-model="ruleForm.release" disabled></el-input> <el-input v-model="ruleForm.release" disabled></el-input>
</el-form-item> </el-form-item>
<el-form-item label="澄清文件" prop="file"> <el-form-item label="澄清文件" prop="file">
<singleUpload :limit="5" tip="最多上传5个文件,每个文件不超过100M。" @input="getfile"></singleUpload> <singleUpload :limit="5" tip="最多上传5个文件,每个文件不超过100M。" @input="getfile" :fileList="ruleForm.fileList"></singleUpload>
</el-form-item> </el-form-item>
<el-form-item label="公告内容" prop="content"> <el-form-item label="公告内容" prop="content">
<quill-editor ref="text" v-model="ruleForm.content" :options="editorOption" class="myQuillEditor" /> <quill-editor ref="text" v-model="ruleForm.content" :options="editorOption" class="myQuillEditor" />
...@@ -24,25 +27,22 @@ ...@@ -24,25 +27,22 @@
</el-form> </el-form>
<div class="centerButton"> <div class="centerButton">
<el-button @click="cancle">取消</el-button> <el-button @click="cancle">取消</el-button>
<el-button type="primary" @click="submit">提交审核</el-button> <el-button type="primary" @click="submit1" v-if="type==1">提交修改</el-button>
<el-button type="primary" @click="submit" v-else>提交审核</el-button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { import { forwardClarify,clarifiesDetail,editClarifiesNotice } from '@api/purchaser/bid';
forwardClarify import dataBreadcrumb from '@components/dataBreadcrumb.vue';
} from '@api/purchaser/bid' import singleUpload from '@components/Upload/Upload.vue';
import dataBreadcrumb from '@components/dataBreadcrumb.vue' import { quillEditor } from 'vue-quill-editor';
import singleUpload from '@components/Upload/Upload.vue' import 'quill/dist/quill.core.css';
import { import 'quill/dist/quill.snow.css';
quillEditor import 'quill/dist/quill.bubble.css';
} from 'vue-quill-editor' export default {
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
export default {
components: { components: {
dataBreadcrumb, dataBreadcrumb,
singleUpload, singleUpload,
...@@ -60,6 +60,8 @@ ...@@ -60,6 +60,8 @@
// } // }
// } // }
return { return {
title:"提出",
type:"",
accessoryPOList: [], accessoryPOList: [],
editorOption: {}, editorOption: {},
breads: ['招标管理', '招标项目管理', '工作台'], breads: ['招标管理', '招标项目管理', '工作台'],
...@@ -68,71 +70,124 @@ ...@@ -68,71 +70,124 @@
release: '捷安采官网招标投专区' release: '捷安采官网招标投专区'
}, },
rules: { rules: {
title: [{ title: [
{
required: true, required: true,
message: '请输入', message: '请输入',
trigger: 'blur' trigger: 'blur'
}], }
release: [{ ],
release: [
{
required: true, required: true,
message: '请输入', message: '请输入',
trigger: 'blur' trigger: 'blur'
}], }
content: [{ ],
content: [
{
required: true, required: true,
message: '请输入', message: '请输入',
trigger: 'blur' trigger: 'blur'
},
]
} }
]
} }
};
}, },
methods: { methods: {
getfile(val) { // 查看澄清
for (let item of val) { async getclarifiesDetail(clarifiesId) {
item.accessoryUrl = item.fileUrl try {
const { code, data } = await clarifiesDetail(clarifiesId);
if (code === 200) {
data.release="捷安采官网招投标专区"
for(let item of data.fileList){
item.name=item.fileName
item.url=item.fileUrl
} }
this.ruleForm.accessoryList = val this.ruleForm = data;
}
} catch (err) {
console.log(err);
}
},
getfile(val) {
console.log(val)
this.ruleForm.fileList = val;
}, },
cancle() { cancle() {
this.$router.go(-1) this.$router.go(-1);
}, },
//提交表单 //提交表单
async submit() { async submit() {
let ruleForm = this.ruleForm let ruleForm = this.ruleForm;
ruleForm.projectId = localStorage.getItem("projectId") ruleForm.projectId = localStorage.getItem('projectId');
ruleForm.companyId = localStorage.getItem("companyId") ruleForm.companyId = localStorage.getItem('companyId');
try { try {
const valid = await this.$refs['ruleForm'].validate() const valid = await this.$refs['ruleForm'].validate();
if (valid) { if (valid) {
const { const { code, msg } = await forwardClarify(this.ruleForm);
code,
msg
} = await forwardClarify(this.ruleForm)
if (code === 200) { if (code === 200) {
this.$message({ this.$message({
message: msg, message: msg,
type: 'success', type: 'success',
duration: 1500 duration: 1500
}) });
setTimeout(() => { setTimeout(() => {
this.$router.go(-1) this.$router.go(-1);
}, 1500) }, 1500);
} }
} }
} catch (err) { } catch (err) {
console.log(err) console.log(err);
}
},
async submit1() {
let ruleForm = this.ruleForm;
ruleForm.projectId = localStorage.getItem('projectId');
ruleForm.companyId = localStorage.getItem('companyId');
try {
const valid = await this.$refs['ruleForm'].validate();
if (valid) {
const { code, msg } = await editClarifiesNotice(this.ruleForm);
if (code === 200) {
this.$message({
message: msg,
type: 'success',
duration: 1500
});
setTimeout(() => {
this.$router.go(-1);
}, 1500);
} }
} }
} catch (err) {
console.log(err);
} }
} }
},
created() {
let type = this.$route.query.type;
this.type=type
if(type==1){
let noticeId=this.$route.query.noticeId
this.getclarifiesDetail(noticeId)
this.title="编辑"
}
}
};
</script> </script>
<style scoped> <style scoped>
.content { .content {
padding: 0; padding: 0;
padding-bottom: 100px; padding-bottom: 100px;
} }
.abs{
position: absolute;
right:10px;
bottom:10px
}
</style> </style>
...@@ -18,12 +18,13 @@ ...@@ -18,12 +18,13 @@
</div> </div>
<div v-if="question.accessoryList" class="flex-item"> <div v-if="question.accessoryList" class="flex-item">
<div>澄清问题附件:</div> <div>澄清问题附件:</div>
<ul> <ul v-if="question.accessoryList!==undefined && question.accessoryList.length>0">
<li v-for="(item,index) in question.accessoryList" :key="index"> <li v-for="(item,index) in question.accessoryList" :key="index">
<span>{{ item.fileName }}</span> <span>{{ item.fileName }}</span>
<el-button @click="download(item.accessoryUrl)">下载</el-button> <el-button @click="download(item.accessoryUrl)">下载</el-button>
</li> </li>
</ul> </ul>
<div v-else></div>
</div> </div>
</div> </div>
<h3 class="title">澄清内容</h3> <h3 class="title">澄清内容</h3>
...@@ -37,14 +38,15 @@ ...@@ -37,14 +38,15 @@
<div>公告发布媒体:</div> <div>公告发布媒体:</div>
<div>捷安采官网招投标专区</div> <div>捷安采官网招投标专区</div>
</div> </div>
<div v-if="clarifies.accessoryList" class="flex-item"> <div class="flex-item">
<div>澄清问题附件:</div> <div>澄清问题附件:</div>
<ul> <ul v-if="clarifies.fileList!==undefined && clarifies.fileList.length>0">
<li v-for="(item,index) in clarifies.accessoryList" :key="index"> <li v-for="(item,index) in clarifies.fileList" :key="index">
<span>{{ item.fileName }}</span> <span>{{ item.fileName }}</span>
<el-button @click="download(item.accessoryUrl)">下载</el-button> <el-button @click="download(item.fileUrl)">下载</el-button>
</li> </li>
</ul> </ul>
<div v-else></div>
</div> </div>
<div class="clear-item flex-item"> <div class="clear-item flex-item">
<div>回复内容:</div> <div>回复内容:</div>
......
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