Commit 6e7c023d authored by 黄奎's avatar 黄奎

111

parent 7f670ea2
......@@ -154,6 +154,7 @@
<el-tooltip class="item" effect="dark" :content="$t('fnc.chakan')" placement="top-start">
<el-button type="danger" icon="iconfont icon-chakan" @click="goToDetail(item)" circle></el-button>
</el-tooltip>
</el-row>
</td>
</tr>
......@@ -341,6 +342,12 @@
<el-button type="success" icon="iconfont icon-chakan" circle @click="ViewContract(item)"
style="padding:5px;"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="下载" placement="top-start"
v-if="item.Status==2||item.Status==4">
<el-button type="success" icon="el-icon-download" circle @click="DownLoadContract(item)">
</el-button>
</el-tooltip>
</td>
</tr>
</table>
......@@ -453,6 +460,39 @@
};
},
methods: {
//下载合同
DownLoadContract(item) {
let msg = {
ID: item.ID,
CType: item.CType
};
let urlObj = this.domainManager();
this.loading = true;
this.$http({
headers: {
'Content-Type': 'application/json'
},
method: 'post',
url: urlObj.DomainUrl + '/api/file/GetDownLoadTripContract',
data: {
"msg": msg
}
}).then(res => {
this.loading = false
if (res.data.resultCode === 1) {
let sign = item.T_ContractNum;
const a = document.createElement('a');
a.setAttribute('download', '');
a.setAttribute('href', urlObj.DomainUrl + '/api/file/DownloadFileForPdf?fileName=' + sign +
'.pdf&&fPath=' + res.data.data);
a.click();
} else {
this.Error('PDF获取失败');
}
}).catch(err => {
});
},
//出境重新查询
resetOutQuery() {
this.msgOut.PageIndex = 1;
......
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