Commit 04022df0 by lichengming

修改了导出模板

parent a877d923
......@@ -64,6 +64,7 @@ import SoilSampleManage from '../SoilSampleManage'
import importModal from '../../../components/import/DownloadTemplateImport'
import SoilSampleItemManage from '../SoilSampleItemManageEdit'
import EntrustFileManage from '../../../components/file/entrust-file-manage/FileManage'
import global from '../../../api/config'
import EntrustRegisterEdit from './EntrustRegisterEdit'
export default {
components: {
......@@ -100,6 +101,11 @@ export default {
type: 'success',
id: '',
name: '提交至评审'
},
{
type: 'success',
id: '',
name: '导出检测委托书模板'
}
// ,
// {
......@@ -194,12 +200,32 @@ export default {
case '提交':
this._submitToSkipReview()
break
case '导出检测委托书模板':
this._exportTemplate()
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
})
},
_exportTemplate() {
const data = {
importUrl: '/soil/v1/entrust/import_entrust/',
downloadUrl: '/soil/v1/excel/template_soil/TestEntrustBook.docx',
title: '试验委托单导入'
}
this.$Modal.confirm({
title: '提示',
content: '确定要导出该模板?',
onOk: () => {
this._download(data)
}
})
},
_download(data) {
window.open(global.baseURL + data.downloadUrl, '_blank')
},
_import() {
this.currentComponent = 'importModal'
const data = {
......
......@@ -59,6 +59,7 @@ import { soilEntrust } from '../../../api'
import Operation from '../../../components/operation/Operation'
import Reason from '../../../components/base/Reason'
import SampleManage from '../SoilSampleManage'
import global from '../../../api/config'
import EntrustDetail from './EntrustDetail'
export default {
components: { Operation, Reason, EntrustDetail, SampleManage },
......@@ -79,6 +80,16 @@ export default {
type: 'success',
id: '',
name: '驳回'
},
{
type: 'success',
id: '',
name: '导出标书合同(协议)评审表模板'
},
{
type: 'success',
id: '',
name: '导出标书合同(协议)补充单模板'
}
],
iconMsg: [
......@@ -157,12 +168,47 @@ export default {
case '通过':
this._passReview()
break
case '导出标书合同(协议)评审表模板':
this._exportTemplate()
break
case '导出标书合同(协议)补充单模板':
this._exportTemplatePlus()
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
})
},
_exportTemplate() {
const data = {
downloadUrl:
'/soil/v1/excel/template_soil/TenderContractEvaluationForm.docx'
}
this.$Modal.confirm({
title: '提示',
content: '确定要导出该模板?',
onOk: () => {
this._download(data)
}
})
},
_exportTemplatePlus() {
const data = {
downloadUrl:
'/soil/v1/excel/template_soil/TenderContractSupplement.docx'
}
this.$Modal.confirm({
title: '提示',
content: '确定要导出该模板?',
onOk: () => {
this._download(data)
}
})
},
_download(data) {
window.open(global.baseURL + data.downloadUrl, '_blank')
},
_goBack() {
// 退回
if (this.selectIds.length === 0) {
......
......@@ -73,6 +73,7 @@
<script>
import { soilEntrust } from '../../../api'
import Operation from '../../../components/operation/Operation'
import global from '../../../api/config'
import SampleManage from './entrust-sample-manage/SampleManage'
export default {
// eslint-disable-next-line vue/no-unused-components
......@@ -118,8 +119,8 @@ export default {
btn: [
{
type: 'primary',
id: 'ZBC',
name: '一键接收'
id: '',
name: '导出样品抽样单模板'
}
],
selectIds: [],
......@@ -149,12 +150,32 @@ export default {
this.currentComponent = componentName
this.$nextTick(() => {
switch (msg) {
case '导出样品抽样单模板':
this._exportTemplate()
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
})
},
_exportTemplate() {
const data = {
importUrl: '/soil/v1/entrust/import_entrust/',
downloadUrl: '/soil/v1/excel/template_soil/YangPinChouYangDan.docx',
title: '试验委托单导入'
}
this.$Modal.confirm({
title: '提示',
content: '确定要导出该模板?',
onOk: () => {
this._download(data)
}
})
},
_download(data) {
window.open(global.baseURL + data.downloadUrl, '_blank')
},
_iconClick(res, data, currentComponent) {
this.currentComponent = currentComponent
console.log(res)
......
......@@ -71,6 +71,7 @@
import UserInfo from '../../../components/user-info-single/assignPerson'
import { soilEntrust } from '../../../api'
import Operation from '../../../components/operation/Operation'
import global from '../../../api/config'
import SampleManage from './TakeSampleManage'
export default {
components: {
......@@ -115,8 +116,23 @@ export default {
btn: [
{
type: 'primary',
id: 'ZBC',
name: '一键接收'
id: '',
name: '导出取采样记录模板'
},
{
type: 'primary',
id: '',
name: '导出留样登记表模板'
},
{
type: 'primary',
id: '',
name: '导出样品标示卡模板'
},
{
type: 'primary',
id: '',
name: '导出检测物品登记表模板'
}
],
selectIds: [],
......@@ -166,6 +182,18 @@ export default {
this.currentComponent = componentName
this.$nextTick(() => {
switch (msg) {
case '导出取采样记录模板':
this._exportTemplateGet()
break
case '导出留样登记表模板':
this._exportTemplateLiu()
break
case '导出样品标示卡模板':
this._exportTemplateKa()
break
case '导出检测物品登记表模板':
this._exportTemplateJian()
break
case 'search':
this.searchOpen = !this.searchOpen
break
......@@ -174,6 +202,57 @@ export default {
}
})
},
_exportTemplateGet() {
const data = {
downloadUrl: '/soil/v1/excel/template_soil/QuYang.docx'
}
this.$Modal.confirm({
title: '提示',
content: '确定要导出该模板?',
onOk: () => {
this._download(data)
}
})
},
_exportTemplateLiu() {
const data = {
downloadUrl: '/soil/v1/excel/template_soil/LiuYangDengJI.docx'
}
this.$Modal.confirm({
title: '提示',
content: '确定要导出该模板?',
onOk: () => {
this._download(data)
}
})
},
_exportTemplateKa() {
const data = {
downloadUrl: '/soil/v1/excel/template_soil/YangPinBiaoShiKa.docx'
}
this.$Modal.confirm({
title: '提示',
content: '确定要导出该模板?',
onOk: () => {
this._download(data)
}
})
},
_exportTemplateJian() {
const data = {
downloadUrl: '/soil/v1/excel/template_soil/JinceWuPinDengJI.docx'
}
this.$Modal.confirm({
title: '提示',
content: '确定要导出该模板?',
onOk: () => {
this._download(data)
}
})
},
_download(data) {
window.open(global.baseURL + data.downloadUrl, '_blank')
},
// btn操作
_btnOption(msg) {
console.log(msg)
......
......@@ -67,7 +67,7 @@
</template>
<script>
import UserInfo from '../../../components/user-info-single/assignPerson'
import { soilTest } from '../../../api'
import { soilEntrust, soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation'
import SampleManage from './entrust-sample-manage/SampleManage'
import ItemManage from './ItemManage'
......@@ -92,6 +92,11 @@ export default {
type: 'ios-clock',
id: '',
name: '操作日志'
},
{
type: 'md-trash',
id: '',
name: '删除'
}
],
getPage: {},
......@@ -188,12 +193,31 @@ export default {
case '附件':
this._upload(data.id)
break
case '删除':
this._deleteByIds([data.id])
break
case '操作日志':
this._operationRecord(data.id)
break
}
})
},
_deleteByIds(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || '确定删除该记录?',
onOk: () => {
this._delete(ids)
}
})
},
_delete: async function(ids) {
const result = await soilEntrust.deleteById(ids)
if (result) {
this._formSearch()
this.$Message.success('删除成功!')
}
},
_editModal(id, type) {
this.currentComponent = 'SampleManage'
this.$nextTick(() => {
......
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