提交 f8905c72 authored 作者: Ras's avatar Ras

收费单打印方式更换为PDF打印

上级 6092c6f6
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
<script> <script>
window._CONFIG = {}; window._CONFIG = {};
window._CONFIG['domianURL'] = 'http://lf.lingqingkeji.com:8080/wmssystem'; window._CONFIG['domianURL'] = 'http://lf.lingqingkeji.com:8080/wmssystem';
// window._CONFIG['domianURL'] = 'http://192.168.1.30:8080/wmssystem'; // window._CONFIG['domianURL'] = 'http://192.168.1.17:8080/wmssystem';
window._CONFIG['casPrefixUrl'] = 'http://cas.example.org:8443/cas'; window._CONFIG['casPrefixUrl'] = 'http://cas.example.org:8443/cas';
window._CONFIG['onlinePreviewDomainURL'] = 'http://fileview.jeecg.com/onlinePreview' window._CONFIG['onlinePreviewDomainURL'] = 'http://fileview.jeecg.com/onlinePreview'
window._CONFIG['staticDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/static'; window._CONFIG['staticDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/static';
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="handleDetail(record)">详情</a> <a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleCopy(record)">打印收费单</a> <a @click="exportReceivingNotePdf(record)">打印收费单</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-dropdown> <a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
...@@ -119,6 +119,7 @@ ...@@ -119,6 +119,7 @@
import IostReceivingNoteModal from './modules/IostReceivingNoteModal' import IostReceivingNoteModal from './modules/IostReceivingNoteModal'
import IostReceivingNoteCopyModal from './modules/IostReceivingNoteCopyModal' import IostReceivingNoteCopyModal from './modules/IostReceivingNoteCopyModal'
import '@/assets/less/TableExpand.less' import '@/assets/less/TableExpand.less'
import { getAction, downFile } from '@/api/manage'
import JSearchSelectTag from '@/components/dict/JSearchSelectTag' import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
export default { export default {
...@@ -214,6 +215,39 @@ ...@@ -214,6 +215,39 @@
this.$refs.copyModalForm.title = "打印收费单"; this.$refs.copyModalForm.title = "打印收费单";
this.$refs.copyModalForm.disableSubmit = true; this.$refs.copyModalForm.disableSubmit = true;
}, },
exportReceivingNotePdf(record){
let url = `${window._CONFIG['domianURL']}/basedata/iostReceivingNote/exportReceivingNotePdf`;
downFile(url, {deliveryRecordId:record.id}).then((data) =>
{
if (!data) {
this.$message.warning("文件下载失败")
return
}
//type类型可以设置为文本类型,这里是pdf类型
this.pdfUrl = window.URL.createObjectURL(new Blob([data], { type: `application/pdf` }));
const fname = record.invoiceNumber + `_收费单`; // 下载文件的名字
const link = document.createElement('a');
link.href = this.pdfUrl;
link.setAttribute('download', fname);
document.body.appendChild(link);
link.click();
});
},
genReceivingNote(record)
{
let that = this;
let url = `${window._CONFIG['domianURL']}/basedata/iostSummarySheet/addToReceivingNote`;
getAction(url, {id:record.deliveryRecordId, sumId:record.id}).then((res) => {
if (res.success) {
that.$message.success(res.result);
}
else
{
that.$message.warning(res.message)
}
that.loading = false;
});
},
} }
} }
</script> </script>
......
...@@ -91,6 +91,8 @@ ...@@ -91,6 +91,8 @@
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="handleDetail(record)">详情</a> <a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleCopyReceiving(record)">打印收费单</a>
<a-divider type="vertical" />
<a-popconfirm title="是否根据选中数据生成收费单?" @confirm="() => genReceivingNote(record)"><a>生成收费单</a></a-popconfirm> <a-popconfirm title="是否根据选中数据生成收费单?" @confirm="() => genReceivingNote(record)"><a>生成收费单</a></a-popconfirm>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-popconfirm title="是否根据选中数据生成送货单?" @confirm="() => genDeliveryNote(record)"><a>生成送货单</a></a-popconfirm> <a-popconfirm title="是否根据选中数据生成送货单?" @confirm="() => genDeliveryNote(record)"><a>生成送货单</a></a-popconfirm>
...@@ -253,6 +255,12 @@ ...@@ -253,6 +255,12 @@
this.$refs.copyModalForm.title = "打印汇总单"; this.$refs.copyModalForm.title = "打印汇总单";
this.$refs.copyModalForm.disableSubmit = true; this.$refs.copyModalForm.disableSubmit = true;
}, },
handleCopyReceiving(record)
{
this.$refs.copyModalForm.edit(record);
this.$refs.copyModalForm.title = "打印收费单";
this.$refs.copyModalForm.disableSubmit = true;
},
} }
} }
</script> </script>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-button v-print="'#printContent1'" ghost type="primary">打印</a-button> <a-button v-print="'#printContent1'" ghost type="primary">打印</a-button>
<section ref="print" id="printContent1" class="ant-card-body"> <section ref="print" id="printContent1" class="ant-card-body">
<h1 style="text-align:center;font-size:24px">收费单</h1>
<j-form-container :disabled="formDisabled"> <j-form-container :disabled="formDisabled">
<!-- 主表单区域 --> <!-- 主表单区域 -->
<a-form :form="form" slot="detail"> <a-form :form="form" slot="detail">
...@@ -23,17 +22,9 @@ ...@@ -23,17 +22,9 @@
<span class="ant-inputlabel">&nbsp;&nbsp;&nbsp;&nbsp;联系电话:</span> <span class="ant-inputlabel">&nbsp;&nbsp;&nbsp;&nbsp;联系电话:</span>
<a-input v-model="model.telephone" class="ant-input"></a-input> <a-input v-model="model.telephone" class="ant-input"></a-input>
</a-col> </a-col>
<!-- <a-col :span="8" style="display:block;">
<span class="ant-inputlabel">送货地址:</span>
<a-input v-model="model.deliveryAddress" class="ant-input"></a-input>
</a-col> -->
<!-- <a-col :span="8" >
<span class="ant-inputlabel">创建日期:</span>
<a-input v-model="model.createTime" class="ant-input"></a-input>
</a-col> -->
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="24" style="display:block;"> <a-col :span="24">
<span class="ant-inputlabel">&nbsp;&nbsp;&nbsp;&nbsp;送货地址:</span> <span class="ant-inputlabel">&nbsp;&nbsp;&nbsp;&nbsp;送货地址:</span>
<a-textarea v-model="model.deliveryAddress" class="ant-input" :auto-size="{ minRows: 2, maxRows: 6 }"></a-textarea> <a-textarea v-model="model.deliveryAddress" class="ant-input" :auto-size="{ minRows: 2, maxRows: 6 }"></a-textarea>
</a-col> </a-col>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论