|
@@ -32,12 +32,16 @@
|
|
style="text-align: right; margin-bottom: 20px"
|
|
style="text-align: right; margin-bottom: 20px"
|
|
v-if="activeName === 'first'"
|
|
v-if="activeName === 'first'"
|
|
>
|
|
>
|
|
- <el-button type="primary" @click="pushProcessApproval(currentItem)"
|
|
|
|
|
|
+ <!-- <el-button type="primary" @click="pushProcessApproval(currentItem)"
|
|
>查看详情</el-button
|
|
>查看详情</el-button
|
|
|
|
+ > -->
|
|
|
|
+ <el-button type="primary" @click="openPDF(currentItem)"
|
|
|
|
+ >查看PDF</el-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
<div v-if="activeName === 'first'">
|
|
<div v-if="activeName === 'first'">
|
|
- <ContractPDFOne :rowData="rowData"></ContractPDFOne>
|
|
|
|
|
|
+ <!-- <ContractPDFOne :rowData="rowData"></ContractPDFOne> -->
|
|
|
|
+ <ApprovalDetails :query="approvalData"></ApprovalDetails>
|
|
</div>
|
|
</div>
|
|
<div v-if="activeName === 'second'">
|
|
<div v-if="activeName === 'second'">
|
|
<PurchasePDFOne :rowData="rowDataOne"></PurchasePDFOne>
|
|
<PurchasePDFOne :rowData="rowDataOne"></PurchasePDFOne>
|
|
@@ -67,12 +71,20 @@
|
|
</template>
|
|
</template>
|
|
</byTable>
|
|
</byTable>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <el-dialog title="PDF查看" v-if="pdfDialog" v-model="pdfDialog" width="920">
|
|
|
|
+ <ContractPDFOne :rowData="rowData"></ContractPDFOne>
|
|
|
|
+ <template #footer>
|
|
|
|
+ <el-button @click="pdfDialog = false" size="large">关闭</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup >
|
|
<script setup >
|
|
import PurchasePDFOne from "@/components/PDF/purchasePDFOne.vue";
|
|
import PurchasePDFOne from "@/components/PDF/purchasePDFOne.vue";
|
|
import ContractPDFOne from "@/components/PDF/contractPDFOne.vue";
|
|
import ContractPDFOne from "@/components/PDF/contractPDFOne.vue";
|
|
|
|
+import ApprovalDetails from "@/views/process/processApproval/index.vue";
|
|
|
|
|
|
import byTable from "@/components/byTable/index";
|
|
import byTable from "@/components/byTable/index";
|
|
const { proxy } = getCurrentInstance();
|
|
const { proxy } = getCurrentInstance();
|
|
@@ -83,6 +95,7 @@ const props = defineProps({
|
|
});
|
|
});
|
|
const activeName = ref("first");
|
|
const activeName = ref("first");
|
|
const currentItem = ref({});
|
|
const currentItem = ref({});
|
|
|
|
+const approvalData = ref({});
|
|
const rowData = ref({});
|
|
const rowData = ref({});
|
|
const rowDataOne = ref({});
|
|
const rowDataOne = ref({});
|
|
const leftList = ref([]);
|
|
const leftList = ref([]);
|
|
@@ -157,8 +170,17 @@ const handleClick = () => {};
|
|
const handleItemClick = (item) => {
|
|
const handleItemClick = (item) => {
|
|
currentItem.value = item;
|
|
currentItem.value = item;
|
|
if (activeName.value === "first") {
|
|
if (activeName.value === "first") {
|
|
- rowData.value = {
|
|
|
|
- id: item.id,
|
|
|
|
|
|
+ // rowData.value = {
|
|
|
|
+ // id: item.id,
|
|
|
|
+ // };
|
|
|
|
+ approvalData.value = {
|
|
|
|
+ flowKey: "contract_flow",
|
|
|
|
+ id: currentItem.value.flowId,
|
|
|
|
+ processType: 20,
|
|
|
|
+ random: proxy.random(),
|
|
|
|
+ flowName: "销售合同详情",
|
|
|
|
+ tenantType: "EHSD",
|
|
|
|
+ businessId: currentItem.value.id,
|
|
};
|
|
};
|
|
} else if (activeName.value === "second") {
|
|
} else if (activeName.value === "second") {
|
|
rowDataOne.value = {
|
|
rowDataOne.value = {
|
|
@@ -166,6 +188,13 @@ const handleItemClick = (item) => {
|
|
};
|
|
};
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
+const pdfDialog = ref(false);
|
|
|
|
+const openPDF = (row) => {
|
|
|
|
+ rowData.value = {
|
|
|
|
+ id: row.id,
|
|
|
|
+ };
|
|
|
|
+ pdfDialog.value = true;
|
|
|
|
+};
|
|
|
|
|
|
const pushProcessApproval = (row) => {
|
|
const pushProcessApproval = (row) => {
|
|
proxy.$router.push({
|
|
proxy.$router.push({
|
|
@@ -212,15 +241,13 @@ const handleChange = (val) => {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const getDetailsData = (id) => {
|
|
const getDetailsData = (id) => {
|
|
- proxy
|
|
|
|
- .post("/contract/getVersionList", { id: id })
|
|
|
|
- .then((res) => {
|
|
|
|
- contractDataList.value = res;
|
|
|
|
- leftList.value = contractDataList.value;
|
|
|
|
- if (contractDataList.value && contractDataList.value.length > 0) {
|
|
|
|
- handleItemClick(contractDataList.value[0]);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ proxy.post("/contract/getVersionList", { id: id }).then((res) => {
|
|
|
|
+ contractDataList.value = res;
|
|
|
|
+ leftList.value = contractDataList.value;
|
|
|
|
+ if (contractDataList.value && contractDataList.value.length > 0) {
|
|
|
|
+ handleItemClick(contractDataList.value[0]);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
proxy
|
|
proxy
|
|
.post("/contract/getPurchaseListByContractId", { id: id })
|
|
.post("/contract/getPurchaseListByContractId", { id: id })
|
|
.then((res) => {
|
|
.then((res) => {
|
|
@@ -235,7 +262,7 @@ const getDetailsData = (id) => {
|
|
tableData.value = res;
|
|
tableData.value = res;
|
|
});
|
|
});
|
|
};
|
|
};
|
|
-if(props.contractId){
|
|
|
|
|
|
+if (props.contractId) {
|
|
getDetailsData(props.contractId);
|
|
getDetailsData(props.contractId);
|
|
}
|
|
}
|
|
if (route.query.currentContractId) {
|
|
if (route.query.currentContractId) {
|