Commit 04022df0 by lichengming

修改了导出模板

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