问题清单修复

This commit is contained in:
BianLzhaoMin 2024-12-18 12:18:40 +08:00
parent c7ef2d12d1
commit 23adf1910e
2 changed files with 131 additions and 23 deletions

View File

@ -21,6 +21,8 @@ const store = useStore()
import { mainStore } from 'store/main'
import jsPreviewDocx from '@js-preview/docx'
import '@js-preview/docx/lib/index.css'
import moment from 'moment'
const momentInit = moment
const store2 = mainStore()
const overhaulDetails = ref<any>({})
@ -656,7 +658,33 @@ const costSubmit = () => {
</el-row>
<el-row>
<el-col :span="4"> 租期 </el-col>
<el-col :span="8"> {{ goods.days }}{{ ' ' + '天' }} </el-col>
<el-col :span="8">
<span
style="margin-right: 10px"
:style="
item.orderStatus == 20
? 'text-decoration: line-through'
: ''
"
>
{{ goods.days }}{{ ' ' + '天' }}
</span>
<span v-if="item.orderStatus == 20">
{{
momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day',
) == 0
? 1
: momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day',
)
}}{{ ' ' + '天' }}
</span>
<!-- {{ goods.days }}{{ ' ' + '天' }} -->
</el-col>
<el-col :span="4"> 编号 </el-col>
<el-col :span="8"> {{ goods.code }} </el-col>
</el-row>
@ -673,7 +701,16 @@ const costSubmit = () => {
</el-col>
<el-col :span="3" class="order-items-info">
<div>总费用</div>
<div class="red-font">{{ item.cost }} </div>
<!-- <div class="red-font">{{ item.cost }} </div> -->
<div
class="red-font"
:style="item.orderStatus == 20 ? 'text-decoration: line-through' : ''"
>
{{ item.cost }}
</div>
<div class="red-font" v-if="item.orderStatus == 20">
{{ item.totalRealPrice }}
</div>
</el-col>
<el-col :span="4" class="order-items-info">
<div
@ -696,9 +733,24 @@ const costSubmit = () => {
"
>
<div>租期</div>
<div style="font-weight: bold; margin-top: 10px">
<div
style="font-weight: bold; margin-top: 10px"
:style="
item.orderStatus == 20
? 'text-decoration: line-through'
: ''
"
>
{{ goods.rentBeginTime }}{{ goods.rentEndTime }}
</div>
<div
style="font-weight: bold; margin-top: 10px"
v-if="item.orderStatus == 20"
>
{{ goods.takeOverTime.slice(0, 10) }}{{
goods.rentOverTime.slice(0, 10)
}}
</div>
</div>
</div>
</el-col>

View File

@ -20,6 +20,8 @@ const store = useStore()
import { mainStore } from 'store/main'
import jsPreviewDocx from '@js-preview/docx'
import '@js-preview/docx/lib/index.css'
import moment from 'moment'
const momentInit = moment
const store2 = mainStore()
/* ***
****
@ -423,7 +425,7 @@ const onRepairEnd = (orderId: any, code: any) => {
type: 'warning',
})
.then(async () => {
const res: any = await passApi({ orderStatus: 10, orderId, orderCode:code })
const res: any = await passApi({ orderStatus: 10, orderId, orderCode: code })
if (res.code === 200) {
ElMessage({
@ -653,7 +655,7 @@ const dialogFormVisibleSettleWord: any = ref(false)
// }
//
const handleViewWord = async(index: Number, row: any) => {
const handleViewWord = async (index: Number, row: any) => {
settleWordTitle.value = '租赁协议'
moneyParams1.value = {
/* 设备状态 */
@ -666,23 +668,21 @@ const handleViewWord = async(index: Number, row: any) => {
const res: any = await getContractDetailApi({ orderId })
// cardList.value = res.rows
//
wordUrl.value = res.data.url
wordUrl.value = res.data.url
dialogFormVisibleSettleWord.value = true
setTimeout(() => {
const myDocxPreviewer = jsPreviewDocx.init(document.getElementById("mmm"));
//
myDocxPreviewer
.preview(
wordUrl.value
)
.then((res) => {
console.log("预览完成");
})
.catch((e) => {
console.log('1111', wordUrl.value)
console.log("预览失败", e);
});
}, 1000);
const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm'))
//
myDocxPreviewer
.preview(wordUrl.value)
.then((res) => {
console.log('预览完成')
})
.catch((e) => {
console.log('1111', wordUrl.value)
console.log('预览失败', e)
})
}, 1000)
}
const contract = ref({
@ -908,7 +908,33 @@ const wordUrl = ref('')
</el-row>
<el-row>
<el-col :span="4"> 租期 </el-col>
<el-col :span="8"> {{ goods.days }}{{ ' ' + '天' }} </el-col>
<el-col :span="8">
<span
style="margin-right: 10px"
:style="
item.orderStatus == 20
? 'text-decoration: line-through'
: ''
"
>
{{ goods.days }}{{ ' ' + '天' }}
</span>
<span v-if="item.orderStatus == 20">
{{
momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day',
) == 0
? 1
: momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day',
)
}}{{ ' ' + '天' }}
</span>
<!-- {{ goods.days }}{{ ' ' + '天' }} -->
</el-col>
<el-col :span="4"> 编号 </el-col>
<el-col :span="8"> {{ goods.code }} </el-col>
</el-row>
@ -925,7 +951,21 @@ const wordUrl = ref('')
</el-col>
<el-col :span="3" class="order-items-info">
<div>总费用</div>
<div class="red-font">{{ item.cost }} </div>
<div
class="red-font"
:style="item.orderStatus == 20 ? 'text-decoration: line-through' : ''"
>
{{ item.cost }}
</div>
<div class="red-font" v-if="item.orderStatus == 20">
{{ item.totalRealPrice }}
</div>
<!-- <div class="red-font">
{{ item.cost }}
</div> -->
</el-col>
<!-- <el-col :span="4" class="order-items-info">
<div>租期</div>
@ -955,9 +995,25 @@ const wordUrl = ref('')
"
>
<div>租期</div>
<div style="font-weight: bold; margin-top: 10px">
<div
style="font-weight: bold; margin-top: 10px"
:style="
item.orderStatus == 20
? 'text-decoration: line-through'
: ''
"
>
{{ goods.rentBeginTime }}{{ goods.rentEndTime }}
</div>
<div
style="font-weight: bold; margin-top: 10px"
v-if="item.orderStatus == 20"
>
{{ goods.takeOverTime.slice(0, 10) }}{{
goods.rentOverTime.slice(0, 10)
}}
</div>
</div>
</div>
</el-col>