Commit 8f9a8251 authored by 黄奎's avatar 黄奎

页面修改

parent e3cd3bd2
......@@ -111,7 +111,16 @@
@click="goContract('SingleContract', item.ID, '单项委托合同')"></el-button>
</template>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<el-tooltip class="item" effect="dark" content="复制" placement="top-start">
<el-button type="primary" icon="el-icon-edit" circle @click="CopyContract(item)"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="下载" placement="top-start">
<el-button type="primary" icon="el-icon-edit" circle @click="DownLoadContract(item)"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="取消" placement="top-start">
<el-button type="primary" icon="el-icon-edit" circle @click="DeleteContract(item)"></el-button>
</el-tooltip>
</td>
......@@ -165,10 +174,63 @@
this.getList();
},
methods: {
//复制合同
CopyContract(item) {
//获取列表数据
var that = this;
this.Confirm("是否复制此合同?", function () {
that.apipost(
"travelcontract_post_CopyTravelContractService", {
ID: item.ID
},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
},
err => {}
);
});
},
//下载合同
DownLoadContract(item) {
let msg = {
ID: item.ID,
CType: item.CType
};
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 = title + "V2"
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 => {
});
},
//删除合同
DeleteContract(item) {
var that = this;
this.Confirm("是否此合同删除?", function () {
this.Confirm("是否取消此合同?", function () {
var msg = {
ID: item.ID
};
......@@ -177,7 +239,7 @@
msg,
res => {
if (res.data.resultCode == 1) {
that.Success("删除成功!");
that.Success("取消成功!");
that.getList();
} else {
that.Error(res.data.message);
......@@ -195,7 +257,6 @@
this.msg,
res => {
this.loading = false;
console.log("res.data.data", res.data.data);
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
......
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