Commit be93a0ca by zhangquan

合同模板联调bug修复

1 parent 2b9892d8
......@@ -211,6 +211,7 @@ export default {
params.useConditions = params.useConditions?.replace(/<span.*?data-w-e-type.*?data-key="(.*?)".*?<\/span>/g, '$1')
if (this.templateType == 1) {
params = {
id: params.id,
baseContext: params.useConditions,
contractTitle: params.contractTitle,
contractIntroduce: params.contractIntroduce,
......
......@@ -55,7 +55,8 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
getListApi: this.$apis.contractManager.getContractListApi,
searchForm: {
id: ''
id: '',
templateName: ''
},
buttonList: [
{
......@@ -76,7 +77,15 @@ export default {
label: '合同编号',
name: 'id',
type: 'input',
isClear: true
isClear: true,
isHide: this.changeContractObj.isBase
},
{
label: '合同名称',
name: 'templateName',
type: 'input',
isClear: true,
isHide: !this.changeContractObj.isBase
}
],
tableParams: {
......@@ -113,25 +122,20 @@ export default {
this.isPdfVisible = !this.isPdfVisible
},
// 打印
// 预览
handlePdf(row) {
console.log(row)
if (this.changeContractObj.isBase) {
this.pdfUrl = row.previewUrl
this.handlePdfClose()
return
}
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
let params = {}
if (this.changeContractObj.isBase) {
params = {
packageCode: this.changeContractObj.skuPackageCode,
baseFlag: 1
}
} else {
params = { packageCode: row.packageCode, merchantId: row.merchantId }
}
this.$apis.contractManager.printContractApi(params).then(res => {
this.$apis.contractManager.printContractApi({ packageCode: row.packageCode, merchantId: row.merchantId }).then(res => {
this.pdfUrl = res
this.handlePdfClose()
loading.close()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!