|
@@ -119,6 +119,12 @@
|
|
|
</template>
|
|
|
批量导出
|
|
|
</a-button>
|
|
|
+ <a-button @click="onPrint">
|
|
|
+ <template #icon>
|
|
|
+ <PrinterOutlined />
|
|
|
+ </template>
|
|
|
+ 打印
|
|
|
+ </a-button>
|
|
|
</a-space>
|
|
|
</template>
|
|
|
<template #bodyCell="{ column, record }">
|
|
@@ -147,7 +153,11 @@
|
|
|
<a-popconfirm title="确定要删除吗?" @confirm="deleteQySecondlineWarehouse(record)">
|
|
|
<a-button type="link" danger size="small" v-if="hasPerm('qySecondlineWarehouseDelete')">删除</a-button>
|
|
|
</a-popconfirm>
|
|
|
+ <a-divider type="vertical"
|
|
|
+ v-if="hasPerm(['qySecondlineWarehouseView', 'qySecondlineWarehouseEdit', 'qySecondlineWarehouseDelete'])"/>
|
|
|
<a-button type="link" primary size="small" @click="goodsDetailRef.onOpen(record)">出库单</a-button>
|
|
|
+ <a-divider type="vertical"/>
|
|
|
+ <a-button type="link" primary size="small" @click="certificateDetailRef.onOpen(record)">记账凭证</a-button>
|
|
|
</a-space>
|
|
|
</template>
|
|
|
</template>
|
|
@@ -156,6 +166,7 @@
|
|
|
<Detail v-else ref="detailRef" @onClose="indexShow = true" @successful="onSearch()"/>
|
|
|
<EnterpriseDetail ref="enterpriseDetailRef"/>
|
|
|
<GoodsDetail ref="goodsDetailRef"/>
|
|
|
+ <CertificateDetail ref="certificateDetailRef"/>
|
|
|
</template>
|
|
|
|
|
|
<script setup name="qysecondlinewarehouse">
|
|
@@ -166,6 +177,9 @@ import qySecondlineWarehouseApi from '@/api/yqyc/qySecondlineWarehouseApi'
|
|
|
import downloadUtil from "@/utils/downloadUtil";
|
|
|
import EnterpriseDetail from "@/views/yqyc/component/enterprise/detail.vue";
|
|
|
import GoodsDetail from "./goods.vue";
|
|
|
+import CertificateDetail from "./certificate.vue";
|
|
|
+import qyFrontlineWarehouseApi from "@/api/yqyc/qyFrontlineWarehouseApi";
|
|
|
+import printJS from "print-js";
|
|
|
|
|
|
const {proxy} = getCurrentInstance()
|
|
|
const searchFormState = ref({})
|
|
@@ -176,6 +190,7 @@ const filterParam = ref({})
|
|
|
const detailRef = ref()
|
|
|
const enterpriseDetailRef = ref()
|
|
|
const goodsDetailRef = ref()
|
|
|
+const certificateDetailRef = ref()
|
|
|
const indexShow = ref(true)
|
|
|
const toolConfig = {refresh: true, height: true, columnSetting: true, striped: false}
|
|
|
// 查询区域显示更多控制
|
|
@@ -183,7 +198,7 @@ const advanced = ref(false)
|
|
|
const toggleAdvanced = () => {
|
|
|
advanced.value = !advanced.value
|
|
|
}
|
|
|
-const columns = [
|
|
|
+const columns = ref([
|
|
|
{
|
|
|
title: '企业编码',
|
|
|
dataIndex: 'companyCode',
|
|
@@ -239,15 +254,20 @@ const columns = [
|
|
|
dataIndex: 'accountTime',
|
|
|
sorter: true,
|
|
|
},
|
|
|
-]
|
|
|
-// 操作栏通过权限判断是否显示
|
|
|
-if (hasPerm(['qySecondlineWarehouseEdit', 'qySecondlineWarehouseDelete'])) {
|
|
|
- columns.push({
|
|
|
+ {
|
|
|
title: '操作',
|
|
|
dataIndex: 'action',
|
|
|
align: 'center',
|
|
|
width: 200,
|
|
|
fixed: 'right',
|
|
|
+ }
|
|
|
+])
|
|
|
+// 操作栏通过权限判断是否显示
|
|
|
+if (hasPerm(['qyFrontlineWarehouseView', 'qyFrontlineWarehouseEdit', 'qyFrontlineWarehouseDelete'])) {
|
|
|
+ columns.value.forEach(v => {
|
|
|
+ if (v.dataIndex === 'action') {
|
|
|
+ v.width = 400
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
const selectedRowKeys = ref([])
|
|
@@ -286,7 +306,7 @@ const loadData = (parameter) => {
|
|
|
}
|
|
|
// 搜索同时备份参数
|
|
|
const onSearch = (parameter) => {
|
|
|
- searchFormStateReal.value = cloneDeep(searchFormState.value)
|
|
|
+ searchFormStateReal.value = cloneDeep(Object.assign(searchFormState.value, filterParam.value))
|
|
|
tableRef.value.refresh(parameter)
|
|
|
}
|
|
|
// 重置
|
|
@@ -338,6 +358,11 @@ const onDetail = (record = null, view) => {
|
|
|
detailRef.value.onOpen(record, view)
|
|
|
})
|
|
|
}
|
|
|
+const onPrint = () => {
|
|
|
+ qySecondlineWarehouseApi.qySecondlineWarehousePrintPdf(searchFormStateReal.value).then(res => {
|
|
|
+ printJS(res, 'pdf')
|
|
|
+ })
|
|
|
+}
|
|
|
const accountTypeOptions = tool.dictList('account_type')
|
|
|
const businessTypeOptions = tool.dictList('bussiness_type')
|
|
|
const measurementUnitOptions = tool.dictList('measurement unit')
|