订单增加编号字段

This commit is contained in:
BianLzhaoMin 2024-12-17 17:26:17 +08:00
parent 6d182a00fc
commit 1d63519be0
3 changed files with 77 additions and 70 deletions

7
components.d.ts vendored
View File

@ -8,11 +8,16 @@ export {}
declare module 'vue' { declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default'] Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default']
ElBadge: typeof import('element-plus/es')['ElBadge']
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton']
ElCarousel: typeof import('element-plus/es')['ElCarousel']
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
ElCascader: typeof import('element-plus/es')['ElCascader'] ElCascader: typeof import('element-plus/es')['ElCascader']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCol: typeof import('element-plus/es')['ElCol'] ElCol: typeof import('element-plus/es')['ElCol']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDialog: typeof import('element-plus/es')['ElDialog'] ElDialog: typeof import('element-plus/es')['ElDialog']
ElForm: typeof import('element-plus/es')['ElForm'] ElForm: typeof import('element-plus/es')['ElForm']
@ -20,7 +25,6 @@ declare module 'vue' {
ElIcon: typeof import('element-plus/es')['ElIcon'] ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage'] ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput'] ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption'] ElOption: typeof import('element-plus/es')['ElOption']
@ -30,7 +34,6 @@ declare module 'vue' {
ElSelect: typeof import('element-plus/es')['ElSelect'] ElSelect: typeof import('element-plus/es')['ElSelect']
ElStep: typeof import('element-plus/es')['ElStep'] ElStep: typeof import('element-plus/es')['ElStep']
ElSteps: typeof import('element-plus/es')['ElSteps'] ElSteps: typeof import('element-plus/es')['ElSteps']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable'] ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTag: typeof import('element-plus/es')['ElTag'] ElTag: typeof import('element-plus/es')['ElTag']

View File

@ -3,7 +3,13 @@ import { ref } from 'vue'
import PagingComponent from 'components/PagingComponent/index.vue' import PagingComponent from 'components/PagingComponent/index.vue'
import Empty from 'components/Empty/index.vue' import Empty from 'components/Empty/index.vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { getOrderListApi, passApi, failApi, confirmPriceApi, getContractDetailApi, } from 'http/api/usercenter/seekorder' import {
getOrderListApi,
passApi,
failApi,
confirmPriceApi,
getContractDetailApi,
} from 'http/api/usercenter/seekorder'
import TitleTip from 'components/TitleTip/index.vue' import TitleTip from 'components/TitleTip/index.vue'
import { getOverhaulApi } from 'http/api/rent-termination/index' import { getOverhaulApi } from 'http/api/rent-termination/index'
import uploadComponent from 'components/uploadComponent/index.vue' import uploadComponent from 'components/uploadComponent/index.vue'
@ -13,8 +19,8 @@ import { useStore } from 'store/user'
import type { FormInstance } from 'element-plus' import type { FormInstance } from 'element-plus'
const store = useStore() const store = useStore()
import { mainStore } from 'store/main' import { mainStore } from 'store/main'
import jsPreviewDocx from "@js-preview/docx"; import jsPreviewDocx from '@js-preview/docx'
import "@js-preview/docx/lib/index.css"; import '@js-preview/docx/lib/index.css'
const store2 = mainStore() const store2 = mainStore()
const overhaulDetails = ref<any>({}) const overhaulDetails = ref<any>({})
@ -322,11 +328,11 @@ const tableData4: any = ref([
}, },
]) ])
const wordUrl = ref("") const wordUrl = ref('')
const settleWordTitle = ref('') const settleWordTitle = ref('')
const dialogFormVisibleSettleWord: any = ref(false) const dialogFormVisibleSettleWord: any = ref(false)
// //
const handleViewWord = async(index: Number, row: any) => { const handleViewWord = async (index: Number, row: any) => {
settleWordTitle.value = '租赁协议' settleWordTitle.value = '租赁协议'
moneyParams1.value = { moneyParams1.value = {
/* 设备状态 */ /* 设备状态 */
@ -339,29 +345,27 @@ const handleViewWord = async(index: Number, row: any) => {
const res: any = await getContractDetailApi({ orderId }) const res: any = await getContractDetailApi({ orderId })
// cardList.value = res.rows // cardList.value = res.rows
// //
wordUrl.value = res.data.url wordUrl.value = res.data.url
dialogFormVisibleSettleWord.value = true dialogFormVisibleSettleWord.value = true
dialogFormVisibleSettleWord.value = true dialogFormVisibleSettleWord.value = true
setTimeout(() => { setTimeout(() => {
const myDocxPreviewer = jsPreviewDocx.init(document.getElementById("mmm")); const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm'))
// //
myDocxPreviewer myDocxPreviewer
.preview( .preview(wordUrl.value)
wordUrl.value .then((res) => {
) console.log('预览完成')
.then((res) => { })
console.log("预览完成"); .catch((e) => {
}) console.log('1111', wordUrl.value)
.catch((e) => { console.log('预览失败', e)
console.log('1111', wordUrl.value) })
console.log("预览失败", e); }, 1000)
});
}, 1000);
} }
// Word // Word
const downloadContract = () => { const downloadContract = () => {
window.location.href = wordUrl.value; window.location.href = wordUrl.value
} }
const confirmFail = async (index: number) => { const confirmFail = async (index: number) => {
@ -652,7 +656,9 @@ const costSubmit = () => {
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="4"> 租期 </el-col> <el-col :span="4"> 租期 </el-col>
<el-col :span="18"> {{ goods.days }}{{ ' ' + '天' }} </el-col> <el-col :span="8"> {{ goods.days }}{{ ' ' + '天' }} </el-col>
<el-col :span="4"> 编号 </el-col>
<el-col :span="8"> {{ goods.code }} </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="4"> 租金 </el-col> <el-col :span="4"> 租金 </el-col>
@ -757,7 +763,7 @@ const costSubmit = () => {
> >
订单详情 订单详情
</el-button> </el-button>
<el-button @click="handleViewWord(j,item)" type="primary" size="small"> <el-button @click="handleViewWord(j, item)" type="primary" size="small">
租赁协议 租赁协议
</el-button> </el-button>
@ -1319,17 +1325,17 @@ const costSubmit = () => {
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<!-- <div style="display: flex; justify-content: center"> --> <!-- <div style="display: flex; justify-content: center"> -->
<!-- <img src="@/assets/img/zuLin.png" style="width: 100%; height: 600px" /> --> <!-- <img src="@/assets/img/zuLin.png" style="width: 100%; height: 600px" /> -->
<!-- </div> --> <!-- </div> -->
<div style="display: flex; justify-content: flex-end;margin-bottom: 10px;"> <div style="display: flex; justify-content: flex-end; margin-bottom: 10px">
<span class="dialog-footer" > <span class="dialog-footer">
<el-button type="primary" @click="dialogFormVisibleSettleWord = false" <el-button type="primary" @click="dialogFormVisibleSettleWord = false"
> </el-button > </el-button
> >
<el-button @click="downloadContract" type="success"> 下载 </el-button> <el-button @click="downloadContract" type="success"> 下载 </el-button>
</span> </span>
</div> </div>
<div id ="mmm" style="height:600px;"></div> <div id="mmm" style="height: 600px"></div>
</el-dialog> </el-dialog>
</template> </template>

View File

@ -18,8 +18,8 @@ import type { FormInstance } from 'element-plus'
import { useStore } from 'store/user' import { useStore } from 'store/user'
const store = useStore() const store = useStore()
import { mainStore } from 'store/main' import { mainStore } from 'store/main'
import jsPreviewDocx from "@js-preview/docx"; import jsPreviewDocx from '@js-preview/docx'
import "@js-preview/docx/lib/index.css"; import '@js-preview/docx/lib/index.css'
const store2 = mainStore() const store2 = mainStore()
/* *** /* ***
**** ****
@ -629,23 +629,21 @@ const handleViewWord = async (index: Number, row: any) => {
const res: any = await getContractDetailApi({ orderId }) const res: any = await getContractDetailApi({ orderId })
// cardList.value = res.rows // cardList.value = res.rows
// //
wordUrl.value = res.data.url wordUrl.value = res.data.url
dialogFormVisibleSettleWord.value = true dialogFormVisibleSettleWord.value = true
setTimeout(() => { setTimeout(() => {
const myDocxPreviewer = jsPreviewDocx.init(document.getElementById("mmm")); const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm'))
// //
myDocxPreviewer myDocxPreviewer
.preview( .preview(wordUrl.value)
wordUrl.value .then((res) => {
) console.log('预览完成')
.then((res) => { })
console.log("预览完成"); .catch((e) => {
}) console.log('1111', wordUrl.value)
.catch((e) => { console.log('预览失败', e)
console.log('1111', wordUrl.value) })
console.log("预览失败", e); }, 1000)
});
}, 1000);
} }
const contract = ref({ const contract = ref({
@ -656,12 +654,10 @@ const contract = ref({
// Word // Word
const downloadContract = () => { const downloadContract = () => {
window.location.href = wordUrl.value; window.location.href = wordUrl.value
} }
const wordUrl = ref("") const wordUrl = ref('')
</script> </script>
<template> <template>
@ -827,13 +823,13 @@ const wordUrl = ref("")
style="border-bottom: 1px solid #ccc; margin-bottom: 10px" style="border-bottom: 1px solid #ccc; margin-bottom: 10px"
class="order-title-info" class="order-title-info"
> >
<el-col :span="8"> <el-col :span="8">
<span> 出租方姓名 </span> <span> 出租方姓名 </span>
<span> {{item.sellerName}} </span> <span> {{ item.sellerName }} </span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<span> 承租方姓名 </span> <span> 承租方姓名 </span>
<span> {{item.buyerName}} </span> <span> {{ item.buyerName }} </span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<span> 承租方所属单位 </span> <span> 承租方所属单位 </span>
@ -873,7 +869,9 @@ const wordUrl = ref("")
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="4"> 租期 </el-col> <el-col :span="4"> 租期 </el-col>
<el-col :span="18"> {{ goods.days }}{{ ' ' + '天' }} </el-col> <el-col :span="8"> {{ goods.days }}{{ ' ' + '天' }} </el-col>
<el-col :span="4"> 编号 </el-col>
<el-col :span="8"> {{ goods.code }} </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="4"> 租金 </el-col> <el-col :span="4"> 租金 </el-col>
@ -1886,17 +1884,17 @@ const wordUrl = ref("")
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<!-- <div style="display: flex; justify-content: center"> --> <!-- <div style="display: flex; justify-content: center"> -->
<!-- <img src="@/assets/img/zuLin.png" style="width: 100%; height: 600px" /> --> <!-- <img src="@/assets/img/zuLin.png" style="width: 100%; height: 600px" /> -->
<!-- </div> --> <!-- </div> -->
<div style="display: flex; justify-content: flex-end;margin-bottom: 10px;"> <div style="display: flex; justify-content: flex-end; margin-bottom: 10px">
<span class="dialog-footer" > <span class="dialog-footer">
<el-button type="primary" @click="dialogFormVisibleSettleWord = false" <el-button type="primary" @click="dialogFormVisibleSettleWord = false"
> </el-button > </el-button
> >
<el-button @click="downloadContract" type="success"> 下载 </el-button> <el-button @click="downloadContract" type="success"> 下载 </el-button>
</span> </span>
</div> </div>
<div id ="mmm" style="height:600px;"></div> <div id="mmm" style="height: 600px"></div>
</el-dialog> </el-dialog>
</template> </template>
@ -2279,8 +2277,8 @@ const wordUrl = ref("")
} }
} }
} }
#mmm{ #mmm {
width:100%; width: 100%;
height: 500px; height: 500px;
} }
</style> </style>