Commit ea0a36c0 by 张立顺

功能开发完成

1 parent d4173262
...@@ -29,7 +29,12 @@ export function quotationExport(data) { ...@@ -29,7 +29,12 @@ export function quotationExport(data) {
// 打印 返回权益合同PDF文件Url // 打印 返回权益合同PDF文件Url
export function contractExport(data) { export function contractExport(data) {
data.method = `dj.api.smartcarlife.vd.equity.order.print` data.method = `dj.api.smartcarlife.vd.equity.order.print`
// data.method = `${path}quotation.export` return request(data)
}
// 查询合同号列表
export function listContracts(data) {
data.method = `dj.api.smartcarlife.vd.equity.order.listContracts`
return request(data) return request(data)
} }
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
</el-form> </el-form>
</div> </div>
</div> </div>
<div class="rulesCon" v-else> <!-- <div class="rulesCon" v-else>
<el-tabs v-model="nonFusionActiveName"> <el-tabs v-model="nonFusionActiveName">
<el-tab-pane label="计算规则" name="first"></el-tab-pane> <el-tab-pane label="计算规则" name="first"></el-tab-pane>
</el-tabs> </el-tabs>
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
</div> </div>
</el-form> </el-form>
<el-button v-show="!isEdit" class="addBtn" @click="addFormItem" type="primary">新增价格区间</el-button> <el-button v-show="!isEdit" class="addBtn" @click="addFormItem" type="primary">新增价格区间</el-button>
</div> </div> -->
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -407,15 +407,15 @@ export default { ...@@ -407,15 +407,15 @@ export default {
resolve(params) resolve(params)
}) })
} else { } else {
this.$refs.formRef.validate((valid) => { // this.$refs.formRef.validate((valid) => {
if (valid) { // if (valid) {
const form = deepClone(this.form) const form = deepClone(this.form)
const storeForm = deepClone(this.storeForm) const storeForm = deepClone(this.storeForm)
delete storeForm.quotationGoodsInfo delete storeForm.quotationGoodsInfo
resolve({ ...storeForm, vdRuleIntervalList: form.vdRuleIntervalList } resolve({ ...storeForm, vdRuleIntervalList: form.vdRuleIntervalList }
) )
} // }
}) // })
} }
}) })
// }) // })
...@@ -452,20 +452,20 @@ export default { ...@@ -452,20 +452,20 @@ export default {
console.log(res) console.log(res)
if (res) { if (res) {
this.storeForm = Object.assign(this.storeForm, res, { mode: res.mode != null ? res.mode : 0 }) this.storeForm = Object.assign(this.storeForm, res, { mode: res.mode != null ? res.mode : 0 })
if (this.storeForm.mode == 1) { // if (this.storeForm.mode == 1) {
this.form.vdRuleIntervalList = res.vdRuleIntervalList.map((item) => { // this.form.vdRuleIntervalList = res.vdRuleIntervalList.map((item) => {
const { id, ruleId, reorder, low, high, recommendation, minimum } = item // const { id, ruleId, reorder, low, high, recommendation, minimum } = item
return { // return {
id, // id,
ruleId, // ruleId,
reorder, // reorder,
low, // low,
high, // high,
recommendation, // recommendation,
minimum // minimum
} // }
}) // })
} // }
this.distributionList = [] this.distributionList = []
distributionTemp.forEach((item) => { distributionTemp.forEach((item) => {
......
...@@ -34,6 +34,14 @@ ...@@ -34,6 +34,14 @@
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
<baseDialog :is-show.sync="previewVisible" :dialog-config="dialogConfig.config" :config="dialogConfig.setting">
<div class="previewItem" v-for="(item, index) in previewList" :key="index">
<span v-if="!item.goodName">合同{{ index + 1 }}</span>
<span class="goodName one-line-ellipsis" v-else>合同名称: {{ item.goodName }}</span>
<i class="el-icon-download downloadIcon" @click="exportFile({ contractNo: item.contractNo })"></i>
</div>
</baseDialog>
<!-- 查看 --> <!-- 查看 -->
<!-- <stock-month-dialog <!-- <stock-month-dialog
:stock-month-visible="stockMonthVisible" :stock-month-visible="stockMonthVisible"
...@@ -46,7 +54,7 @@ ...@@ -46,7 +54,7 @@
<script> <script>
import { mapActions, mapState } from "vuex" import { mapActions, mapState } from "vuex"
import { getList, quotationPrint, quotationExport, contractExport } from "@api/vehicleDamage" import { getList, quotationPrint, quotationExport, contractExport, listContracts } from "@api/vehicleDamage"
export default { export default {
name: "StockList", name: "StockList",
data() { data() {
...@@ -194,7 +202,20 @@ export default { ...@@ -194,7 +202,20 @@ export default {
{ severName: "已完成", severType: 5 } { severName: "已完成", severType: 5 }
] ]
}, },
previewVisible: false,
// 驳回
dialogConfig: {
setting: {
showClose: true,
isShowFooter: false
// appendToBody: true,
},
config: {
title: '打印合同',
width: '480px'
}
},
previewList: [],
stockMonthVisible: false, stockMonthVisible: false,
recordInfo: null recordInfo: null
} }
...@@ -240,9 +261,20 @@ export default { ...@@ -240,9 +261,20 @@ export default {
}) })
}, },
// 打印权益合同 // 打印权益合同
handlePrintContract(row) { async handlePrintContract(row) {
// 获取权益合同PDF const res = await listContracts({ orderId: row.orderId })
contractExport({ orderId: row.orderId }).then((res) => { console.log(res, 'res')
if (res.length == 1) {
// 获取权益合同PDF 用订单号
this.exportFile({ orderId: row.orderId })
} else {
this.previewVisible = true
this.previewList = res
}
},
exportFile(params) {
contractExport(params).then((res) => {
window.open(res) window.open(res)
}) })
}, },
...@@ -356,4 +388,26 @@ export default { ...@@ -356,4 +388,26 @@ export default {
margin-right: 5px; margin-right: 5px;
} }
} }
.previewItem {
text-align: center;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #1D1D1D;
}
.goodName {
max-width: 70%;
width: auto;
}
.previewItem+.previewItem {
margin-top: 30px;
}
.downloadIcon {
margin-left: 10px;
color: #185EFE;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!