|
@@ -7,6 +7,18 @@
|
|
|
<a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
<p style=" display: inline-block;margin: 0 0 0 20px;color: #000;font-size: 14px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.unitSettleNo) || '--' }}</p>
|
|
|
</template>
|
|
|
+ <!-- 操作区,位于 title 行的行尾 -->
|
|
|
+ <template slot="extra">
|
|
|
+ <div style="margin-top: 5px;">
|
|
|
+ <PrintPanel ref="printBox" position="bottomRight" @handlePrint="handlePrint">
|
|
|
+ <div style="padding:10px;line-height: 30px;" slot="extendCons">
|
|
|
+ <div>打印内容(多选)</div>
|
|
|
+ <a-checkbox v-model="printNo" :checked="printNo" id="companyCollectionPaymentDetail-printNo">结算单号</a-checkbox>
|
|
|
+ <a-checkbox v-model="printDate" :checked="printDate" id="companyCollectionPaymentDetail-printDate">打印时间</a-checkbox>
|
|
|
+ </div>
|
|
|
+ </PrintPanel>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</a-page-header>
|
|
|
<!-- 基础信息 -->
|
|
|
<a-card size="small" :bordered="false" class="companyCollectionPaymentDetail-cont" v-if="basicInfoData">
|
|
@@ -57,10 +69,12 @@
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
+import PrintPanel from '@/views/common/printPanel.vue'
|
|
|
+import { hdPrint } from '@/libs/JGPrint'
|
|
|
import { settleUnitDetailList, settleUnitDetail } from '@/api/settle'
|
|
|
export default {
|
|
|
name: 'CompanyCollectionPaymentDetail',
|
|
|
- components: { STable, VSelect },
|
|
|
+ components: { STable, VSelect, PrintPanel },
|
|
|
mixins: [commonMixin],
|
|
|
data () {
|
|
|
const _this = this
|
|
@@ -69,12 +83,13 @@ export default {
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', align: 'center', width: '5%' },
|
|
|
- { title: '单据号', dataIndex: 'bizNo', align: 'center', width: '30%', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '类型', dataIndex: 'bizTypeDictValue', align: 'center', width: '25%', customRender: function (text) { return text || '--' } },
|
|
|
- // { title: '总款数', dataIndex: 'totalTypeNum', align: 'center', width: '10%', customRender: function (text) { return (text || text == 0)?text: '--' } },
|
|
|
- // { title: '总数量', dataIndex: 'totalNum', align: 'center', width: '10%', customRender: function (text) { return (text || text == 0)?text: '--' } },
|
|
|
- { title: '金额', dataIndex: 'totalAmount', align: 'right', width: '20%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '结算金额', dataIndex: 'settleAmount', align: 'right', width: '20%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
|
+ { title: '单据号', dataIndex: 'bizNo', align: 'center', width: '20%', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '单据类型', dataIndex: 'bizTypeDictValue', align: 'center', width: '15%', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '审核时间', dataIndex: 'creatDate', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '总款数', dataIndex: 'bizTotalCategory', align: 'center', width: '10%', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
|
+ { title: '总数量', dataIndex: 'bizTotalQty', align: 'center', width: '10%', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
|
+ { title: '金额', dataIndex: 'totalAmount', align: 'right', width: '10%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '结算金额', dataIndex: 'settleAmount', align: 'right', width: '10%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -96,7 +111,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
total: 0, // 总条数
|
|
|
- basicInfoData: null // 基本信息
|
|
|
+ basicInfoData: null, // 基本信息
|
|
|
+ printNo: false, // 是否打印销售单号
|
|
|
+ printDate: false // 是否打印日期
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -114,6 +131,24 @@ export default {
|
|
|
handleBack () {
|
|
|
this.$router.push({ name: 'companyCollectionPaymentList' })
|
|
|
},
|
|
|
+ // 打印预览/快捷打印
|
|
|
+ handlePrint (type, printerType) {
|
|
|
+ const _this = this
|
|
|
+ _this.spinning = true
|
|
|
+ let url = salesDetailPrint
|
|
|
+ const params = {
|
|
|
+ sn: this.$route.params.id,
|
|
|
+ printNo: this.printNo ? 1 : 0,
|
|
|
+ printDate: this.printDate ? 1 : 0
|
|
|
+ }
|
|
|
+ if (type == 'export') { // 导出
|
|
|
+ url = salesDetailExport
|
|
|
+ }
|
|
|
+ // 打印或导出
|
|
|
+ hdPrint(printerType, type, url, params, '销售单', function () {
|
|
|
+ _this.spinning = false
|
|
|
+ })
|
|
|
+ },
|
|
|
// 详情
|
|
|
getDetail () {
|
|
|
settleUnitDetail({ id: this.$route.params.id }).then(res => {
|
|
@@ -128,9 +163,19 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ printDate (newValue, oldValue) {
|
|
|
+ localStorage.setItem('printDate-ccp-' + this.$store.state.user.info.orgId, newValue)
|
|
|
+ },
|
|
|
+ printNo (newValue, oldValue) {
|
|
|
+ localStorage.setItem('printNo-ccp-' + this.$store.state.user.info.orgId, newValue)
|
|
|
+ }
|
|
|
+ },
|
|
|
activated () {
|
|
|
// 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
|
|
|
if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
|
|
|
+ this.printDate = localStorage.getItem('printDate-ccp-' + this.$store.state.user.info.orgId) == 'true'
|
|
|
+ this.printNo = localStorage.getItem('printNo-ccp-' + this.$store.state.user.info.orgId) == 'true'
|
|
|
this.getDetail()
|
|
|
}
|
|
|
},
|