|
@@ -54,6 +54,9 @@
|
|
|
<el-button type="primary" class="btn enter-btn" @click="handleViewClick(steps.filter(item => item.n === stage)[0] || {},'')">
|
|
<el-button type="primary" class="btn enter-btn" @click="handleViewClick(steps.filter(item => item.n === stage)[0] || {},'')">
|
|
|
生成标书
|
|
生成标书
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button type="primary" v-if="!bidFile.isFileFlag" class="btn enter-btn" @click="dialogFormBidFileVisible = true">
|
|
|
|
|
+ 上传参考标书
|
|
|
|
|
+ </el-button>
|
|
|
<!-- <el-button type="primary" :loading="swb_status == '2'" class="btn enter-btn" @click="handleViewClick(steps.filter(item => item.n === stage)[0] || {},'swb')">
|
|
<!-- <el-button type="primary" :loading="swb_status == '2'" class="btn enter-btn" @click="handleViewClick(steps.filter(item => item.n === stage)[0] || {},'swb')">
|
|
|
生成商务标书
|
|
生成商务标书
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -638,6 +641,7 @@
|
|
|
<el-upload
|
|
<el-upload
|
|
|
class="upload-demo"
|
|
class="upload-demo"
|
|
|
action=""
|
|
action=""
|
|
|
|
|
+ accept=".pdf,.doc,.docx"
|
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
|
:auto-upload="false"
|
|
:auto-upload="false"
|
|
|
:on-change="handleCQFileChange"
|
|
:on-change="handleCQFileChange"
|
|
@@ -660,6 +664,36 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog v-model="dialogFormBidFileVisible" draggable title="提示信息" width="300">
|
|
|
|
|
+ <!-- <el-input v-model="FileForm.name" autocomplete="off" placeholder="请输入文件名称"/> -->
|
|
|
|
|
+ <div style="margin-top: 10px;">
|
|
|
|
|
+ <el-upload
|
|
|
|
|
+ class="upload-demo"
|
|
|
|
|
+ action=""
|
|
|
|
|
+ accept=".docx"
|
|
|
|
|
+ style="width: 100%;"
|
|
|
|
|
+ :auto-upload="false"
|
|
|
|
|
+ :on-change="handleBidFileChange"
|
|
|
|
|
+ :file-list="bidFileList"
|
|
|
|
|
+ limit="1"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button size="small" type="primary" style="width: 268px;">点击上传参考标书</el-button>
|
|
|
|
|
+ <!-- <template #tip>
|
|
|
|
|
+ <div class="el-upload__tip">只能上传 jpg/png 文件,且不超过 500kb</div>
|
|
|
|
|
+ </template> -->
|
|
|
|
|
+ </el-upload>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="dialog-footer">
|
|
|
|
|
+ <!-- <el-button @click="dialogFormBidFileVisible = false" class="btn">取消</el-button> -->
|
|
|
|
|
+ <el-button type="primary" class="btn enter-btn" @click="submitBidFileForm">
|
|
|
|
|
+ 确认
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -1040,15 +1074,32 @@ const handleViewClick = (item: any,type: string) => {
|
|
|
}else if(stepsType.value == '2'){
|
|
}else if(stepsType.value == '2'){
|
|
|
let flag = projects.value.rwlcqd.find((p: any) => p.id == '5').done
|
|
let flag = projects.value.rwlcqd.find((p: any) => p.id == '5').done
|
|
|
if(flag){
|
|
if(flag){
|
|
|
- updateTypeProject(3)
|
|
|
|
|
- // 生成招标文件
|
|
|
|
|
- api.getGenerateTender({txbId: projects.value.id}).then((res: any) => {
|
|
|
|
|
- if ((res as any).code === 200) {
|
|
|
|
|
- ElMessage.success("标书文件生成成功")
|
|
|
|
|
|
|
+ if(soureProjects.value.c_history_tender){// 有历史标书
|
|
|
|
|
+ if(soureProjects.value.c_history_tender.indexOf(".docx") != -1){// 历史标书是正常的docx文件
|
|
|
|
|
+ // 生成招标文件
|
|
|
|
|
+ api.getGenerateTender({txbId: projects.value.id}).then((res: any) => {
|
|
|
|
|
+ if ((res as any).code === 200) {
|
|
|
|
|
+ updateTypeProject(3)
|
|
|
|
|
+ ElMessage.success("标书文件生成成功")
|
|
|
|
|
+ bidFile.value.isFileFlag = false
|
|
|
|
|
+ sessionStorage.setItem('isFileFlag', 'false')
|
|
|
|
|
+ }else{
|
|
|
|
|
+ ElMessage.error((res as any).content || "标书文件生成失败")
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
}else{
|
|
}else{
|
|
|
- ElMessage.error((res as any).msg || "标书文件生成失败")
|
|
|
|
|
|
|
+ ElMessage.error("请先确认上传参考标书")
|
|
|
|
|
+ bidFile.value.isFileFlag = false
|
|
|
|
|
+ sessionStorage.setItem('isFileFlag', 'false')
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
|
|
+ }else{
|
|
|
|
|
+ // 无历史标书
|
|
|
|
|
+ ElMessage.error("请先确认上传参考标书")
|
|
|
|
|
+ bidFile.value.isFileFlag = false
|
|
|
|
|
+ sessionStorage.setItem('isFileFlag', 'false')
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}else{
|
|
}else{
|
|
|
ElMessage.error("请先确认标书需求拆解与生成")
|
|
ElMessage.error("请先确认标书需求拆解与生成")
|
|
@@ -1609,12 +1660,54 @@ const handleBidFileSubmit = () => {
|
|
|
updaterwlcqdProject(tempTask.value)
|
|
updaterwlcqdProject(tempTask.value)
|
|
|
}
|
|
}
|
|
|
const dialogFormFileVisible = ref(false)
|
|
const dialogFormFileVisible = ref(false)
|
|
|
|
|
+const dialogFormBidFileVisible = ref(false)
|
|
|
const FileForm = ref<RuleForm>({})
|
|
const FileForm = ref<RuleForm>({})
|
|
|
const fileList = ref([])
|
|
const fileList = ref([])
|
|
|
const handleCQFileChange = (file: any) => {
|
|
const handleCQFileChange = (file: any) => {
|
|
|
FileForm.value.name = file.name
|
|
FileForm.value.name = file.name
|
|
|
FileForm.value.file = file
|
|
FileForm.value.file = file
|
|
|
}
|
|
}
|
|
|
|
|
+const BidFileForm = ref<RuleForm>({})
|
|
|
|
|
+const bidFileList = ref([])
|
|
|
|
|
+const handleBidFileChange = (file: any) => {
|
|
|
|
|
+ BidFileForm.value.name = file.name
|
|
|
|
|
+ BidFileForm.value.file = file
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const submitBidFileForm = () => {
|
|
|
|
|
+ console.log(BidFileForm.value)
|
|
|
|
|
+ const columnId = CONFIG.COLUMNIDARR[0]
|
|
|
|
|
+ const params: any = {
|
|
|
|
|
+ columnId: columnId,
|
|
|
|
|
+ contentId: soureProjects.value.id,
|
|
|
|
|
+ paraName: 'c_history_tender',
|
|
|
|
|
+ type: 3,
|
|
|
|
|
+ file: BidFileForm.value.file.raw
|
|
|
|
|
+ }
|
|
|
|
|
+ api.uploadFile(params).then((res: any) => {
|
|
|
|
|
+ if((res as any).code === 200){
|
|
|
|
|
+ const content = res.content
|
|
|
|
|
+ const params: any = {
|
|
|
|
|
+ columnId: CONFIG.COLUMNIDARR[0],
|
|
|
|
|
+ modelId: CONFIG.MODELIDARR[7],
|
|
|
|
|
+ content: JSON.stringify({
|
|
|
|
|
+ id: soureProjects.value.id,
|
|
|
|
|
+ c_history_tender: content,
|
|
|
|
|
+ }),
|
|
|
|
|
+ }
|
|
|
|
|
+ api.updateContent(params).then((res: any) => {
|
|
|
|
|
+ if((res as any).code === 200){
|
|
|
|
|
+ dialogFormBidFileVisible.value = false
|
|
|
|
|
+ bidFile.value.isFileFlag = true
|
|
|
|
|
+ sessionStorage.setItem('isFileFlag', 'true')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ ElMessage.error('上传失败')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const submitFileForm = (file:any) => {
|
|
const submitFileForm = (file:any) => {
|
|
|
const columnId = CONFIG.COLUMNIDARR[10]
|
|
const columnId = CONFIG.COLUMNIDARR[10]
|
|
|
const modelId = CONFIG.MODELIDARR[5]
|
|
const modelId = CONFIG.MODELIDARR[5]
|
|
@@ -1785,9 +1878,10 @@ const getFIlePath = async (params: any) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
const bidFile = ref({
|
|
const bidFile = ref({
|
|
|
- flag: sessionStorage.getItem('bidFileFlag') == 'true' ? true : false,
|
|
|
|
|
|
|
+ flag: sessionStorage.getItem('bidFileFlag') == 'true' ? true : false, //是否获取到标书
|
|
|
swb:false,
|
|
swb:false,
|
|
|
jsb:false,
|
|
jsb:false,
|
|
|
|
|
+ isFileFlag: sessionStorage.getItem('isFileFlag') == 'true' ? true : false, //是否历史标书
|
|
|
})
|
|
})
|
|
|
const getBidFile = async () => {
|
|
const getBidFile = async () => {
|
|
|
const loading = ElLoading.service({
|
|
const loading = ElLoading.service({
|