Browse Source

添加代储代销物资采购通知书

dev
long 2 years ago
parent
commit
e7da4c8d31
  1. 2
      .env.development
  2. 7
      src/views/accessrecords/ProcessMaterialsPlanRecord.vue
  3. 11
      src/views/accessrecords/plan/ProcessMaterialsPlanList.vue
  4. 140
      src/views/accessrecords/statement/ProcessMaterialsPlanStatement3.vue

2
.env.development

@ -1,4 +1,4 @@
NODE_ENV=development
VUE_APP_API_BASE_URL=http://localhost:9566/hy-boot
VUE_APP_API_BASE_URL=http://192.168.1.8:9566/hy-boot
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://182.92.73.21:8012/onlinePreview?url=

7
src/views/accessrecords/ProcessMaterialsPlanRecord.vue

@ -252,6 +252,11 @@
align:"center",
dataIndex: 'createTime'
},
{
title:'资金来源',
align:"center",
dataIndex: 'sourceCapital_dictText'
},
{
title:'流程发起部门',
align:"center",
@ -351,10 +356,12 @@
// item: records.id,
// merchandiseName: " - "+records.materialType_dictText,
// }})
console.log(records,"*****///////")
this.$router.push({
path:'/access_records/planDetail',
query:{
item: records.id,
sourceCapital:records.sourceCapital,
merchandiseName: " - "+records.materialType_dictText,
}
})

11
src/views/accessrecords/plan/ProcessMaterialsPlanList.vue

@ -47,6 +47,9 @@
<a-tab-pane tab="采购通知书" key="4" forceRender>
<process-materials-plan-statement2 :materWared="this.$route.query.item"/>
</a-tab-pane>
<a-tab-pane tab="代储代销物资采购通知书" key="5" forceRender v-if="this.isIf">
<process-materials-plan-statement3 :materWared="this.$route.query.item"/>
</a-tab-pane>
</a-tabs>
</a-card>
</template>
@ -56,9 +59,8 @@
import ProcessMaterialWarehousingFlowChart from '../flowchart/ProcessMaterialWarehousingFlowChart'
import ProcessMaterialsPlanStatement from '../statement/ProcessMaterialsPlanStatement'
import { getAction } from '@api/manage'
import ProcessMaterialWarehousingStatement from '@views/accessrecords/statement/ProcessMaterialWarehousingStatement'
import ProcessMaterialsPlanStatement2 from '../statement/ProcessMaterialsPlanStatement2'
import ProcessMaterialsPlanStatement3 from '../statement/ProcessMaterialsPlanStatement3'
export default {
name: 'ProcessMaterialsPlanList',
@ -67,6 +69,7 @@
ProcessMaterialWarehousingFlowChart,
ProcessMaterialsPlanStatement,
ProcessMaterialsPlanStatement2,
ProcessMaterialsPlanStatement3
},
data() {
return {
@ -74,6 +77,7 @@
ifShow:false,
pictureId:'',
procInstId:'',
isIf:false,
proMaterListId: this.$route.query.item,
url:{
list:"",
@ -154,6 +158,9 @@
},
created(){
console.log("进来没有")
if (this.$route.query.sourceCapital==2){
this.isIf=true;
}
// console.log(this.proMaterListId);
// this.getPicture();
},

140
src/views/accessrecords/statement/ProcessMaterialsPlanStatement3.vue

@ -0,0 +1,140 @@
<template>
<div>
<a-button type="primary" icon="download" @click="downWord">下载</a-button>
<a-button type="primary" style="left: 10px" @click="previewWord">预览并打印</a-button>
<div style="width: 100%;height: 100%;">
<pdf v-show="false" ref="pdfWord" :src="pdfSrc" class="pdf" style=""></pdf>
</div>
</div>
</template>
<script>
const VALIDATE_NO_PASSED = Symbol()
import pick from 'lodash.pick'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction, downFile } from '@/api/manage'
import pdf from 'vue-pdf-signature'
import CMapReaderFactory from 'vue-pdf-signature/src/CMapReaderFactory'
export default {
name: 'ProcessMaterialsPlanStatement2',
mixins: [JeecgListMixin, mixinDevice],
components: { pdf, CMapReaderFactory },
props: {
materWared: {
type: String
},
/**/
procInstId: {
type: String,
default: '',
required: false
},
pictureId: {
type: String,
default: '',
required: false
},
lcModa: {
type: Object,
required: false
}
},
data() {
return {
showSessionId: '',
srcHtml: '',
modalLsVisible: false,
pdfWord: '',
pdfSrc: '',
queryParam:{
id:''
},
url: {
list: '/hy/processUdgetPlan/getPlanTable',
querySourceCapitalDownWord: '/word/querySourceCapitalDownWord',
querySourceCapitalPrevie: '/word/querySourceCapitalPrevie'
},
Wslist: null
}
},
mounted() {
this.showSessionId = window.location.search
},
watch:{
materWared:function (newData, oldData) {
//newData
//oldData
if(newData !== oldData){
this.loadData();
}
}
},
created() {
// downFile(this.url.queryPlanPrevie, { id: this.queryParam.id }).then((data) => {
// console.log(data)
// const blob = new Blob([data], { type: 'application/pdf' })
// this.pdfWord = window.URL.createObjectURL(blob)
//
// })
// this.loadData();
},
activated() {
},
beforeMount() {
},
computed: {
importExcelUrl: function() {
return `${window._CONFIG['domianURL']}/${this.url.queryPlanApply}`
}
},
methods: {
//
downWord() {
downFile(this.url.querySourceCapitalDownWord, { id: this.queryParam.id }).then((data) => {
if (!data.size>0) {
this.$message.warning("文件下载失败")
return
}
const blob = new Blob([data]) //
var a = document.createElement('a') //<a></a>
a.href = URL.createObjectURL(blob) // ahref
a.download = '代储代销物资采购通知书.docx' //
a.style.display = 'none' // a
document.body.appendChild(a) // a
a.click() // aahref
a.remove()
})
},
previewWord() {
downFile(this.url.querySourceCapitalPrevie, { id: this.queryParam.id }).then((data) => {
if (!data.size>0) {
this.$message.warning("文件预览失败")
return
}
const blob = new Blob([data], { type: 'application/pdf' })
this.pdfSrc = window.URL.createObjectURL(blob)
console.log(this.pdfSrc)
window.open(this.pdfSrc)//
})
},
loadData() {
this.queryParam.id = this.materWared
},
}
}
</script>
<style lang="less" scoped>
</style>
Loading…
Cancel
Save