|
|
@@ -6,23 +6,21 @@
|
|
|
<div v-if="detail" class="order-detail__container g-form__container">
|
|
|
<CellGroup title="采购信息">
|
|
|
<Cell title="商品" :value="detail.wrstandardname" />
|
|
|
- <Cell title="预售价" :value="detail.tradeprice.toFixed(2)" />
|
|
|
+ <Cell title="参考价" :value="detail.tradeprice.toFixed(2)" />
|
|
|
+ <Cell title="数量" :value="detail.tradeqty" />
|
|
|
<Cell title="定金" :value="detail.payeddeposit.toFixed(2)" />
|
|
|
- <Cell title="尾款" :value="detail.remainamount.toFixed(2)" />
|
|
|
+ <Cell title="定金比例" :value="`${(detail.depositrate * 100).toFixed(0)}%`" />
|
|
|
+ <Cell title="总预付款" :value="handleNumberValue(detail.tradeamount.toFixed(2))" />
|
|
|
+ <Cell title="采购价" :value="handleNumberValue(detail.transferprice.toFixed(2))" />
|
|
|
+ <Cell title="实际价" :value="handleNumberValue(detail.lastprice.toFixed(2))" />
|
|
|
+ <Cell title="尾款" :value="handleNumberValue(detail.remainamount.toFixed(2))" />
|
|
|
<Cell title="状态" :value="detail.thjorderstatusdisplay" />
|
|
|
- <Cell title="提货方式" :value="detail.thjdeliverymodedisplay" />
|
|
|
- <Cell title="联系人" :value="detail.contactname" v-if="detail.contactname" />
|
|
|
- <Cell title="仓库" :value="detail.warehousename" />
|
|
|
- <Cell title="数量" :value="detail.tradeqty" />
|
|
|
- <Cell title="实际价" :value="detail.lastprice.toFixed(2)" />
|
|
|
- <Cell title="优惠" :value="detail.discountamount.toFixed(2)" />
|
|
|
- <Cell title="总货款" :value="detail.tradeamount.toFixed(2)" />
|
|
|
- <Cell title="摘牌时间:" :value="formatDate(detail.tradetime, 'YYYY/MM/DD HH:mm:ss')" />
|
|
|
+ <Cell title="采购时间:" :value="formatDate(detail.tradetime)" />
|
|
|
<Cell title="到期日期" :value="detail.enddate" />
|
|
|
- <Cell title="到期月份:" :value="detail.enddatemonth" />
|
|
|
</CellGroup>
|
|
|
- <CellGroup title="提货信息">
|
|
|
- <Cell title="提货方式" :value="detail.thjdeliverymodedisplay" />
|
|
|
+ <CellGroup title="交割信息">
|
|
|
+ <Cell title="交割方式" :value="detail.thjdeliverymodedisplay" />
|
|
|
+ <Cell title="联系人" :value="detail.contactname" v-if="detail.contactname" />
|
|
|
<Cell title="联系方式" :value="detail.contactinfo" v-if="detail.contactinfo" />
|
|
|
<Cell title="目的地地址" :value="detail.desaddress" v-if="detail.desaddress" />
|
|
|
<Cell title="发票信息" :value="detail.receiptinfo" v-if="detail.receiptinfo" />
|
|
|
@@ -35,8 +33,10 @@
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<div class="g-form__footer" v-if="detail">
|
|
|
- <Button block round type="primary" v-if="detail.orderstatus === 1" @click="showDialog">合同转让</Button>
|
|
|
- <Button block round type="primary" v-if="detail.orderstatus === 9" @click="spotCancelSubmit">转让撤销</Button>
|
|
|
+ <Button block round type="primary" v-if="detail.thjdeliverymode === 1 && detail.orderstatus === 1"
|
|
|
+ @click="showDialog">合同转让</Button>
|
|
|
+ <Button block round type="primary" v-if="detail.orderstatus === 9"
|
|
|
+ @click="spotCancelSubmit">撤销转让</Button>
|
|
|
<Button block round type="primary" v-if="detail.orderstatus === 5"
|
|
|
@click="spotConfirmSubmit">确认交收</Button>
|
|
|
<Button block round type="primary" v-if="detail.orderstatus === 3" @click="spotApplySubmit">违约</Button>
|
|
|
@@ -44,10 +44,10 @@
|
|
|
@click="spotPlaymentSubmit">支付</Button>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
<!-- 转让价格 -->
|
|
|
- <van-dialog v-model:show="show" title="合同转让" show-cancel-button @confirm="spotListingSubmit" @cancel="cancelDialog">
|
|
|
- <Field label="转让价格:" v-model="formData.TransferPrice" placeholder="请输入转让价格" type="digit"></Field>
|
|
|
+ <van-dialog class-name="order-detail__dialog" v-model:show="show" title="合同转让" show-cancel-button
|
|
|
+ @confirm="spotListingSubmit" @cancel="cancelDialog">
|
|
|
+ <input type="number" v-model="formData.TransferPrice" placeholder="请输入转让价格" />
|
|
|
</van-dialog>
|
|
|
</app-view>
|
|
|
</template>
|
|
|
@@ -56,23 +56,15 @@
|
|
|
import { shallowRef } from 'vue'
|
|
|
import { useNavigation } from '@/hooks/navigation'
|
|
|
import { fullloading, dialog } from '@/utils/vant'
|
|
|
-import { CellGroup, Cell, Empty, Button, Toast, Dialog, Field } from 'vant'
|
|
|
-import { formatDate, getUrl } from '@/filters'
|
|
|
+import { CellGroup, Cell, Empty, Button, Toast, Dialog } from 'vant'
|
|
|
+import { formatDate, getUrl, handleNumberValue } from '@/filters'
|
|
|
import { useSpotPresaleDeliveryConfirm, useSpotPresaleBreachOfContractApply, useSpotPresaleTransferCancel, useSpotPresaleTransferListing, useSpotPresalePlayment } from "@/business/trade";
|
|
|
|
|
|
-const vanDialog=Dialog.Component
|
|
|
+const vanDialog = Dialog.Component
|
|
|
|
|
|
-const { router } = useNavigation()
|
|
|
+const { route, router } = useNavigation()
|
|
|
/// 是否显示dialog
|
|
|
const show = shallowRef(false)
|
|
|
-
|
|
|
-const { confirmSubmit } = useSpotPresaleDeliveryConfirm()
|
|
|
-const { applySubmit } = useSpotPresaleBreachOfContractApply()
|
|
|
-const { playmentSubmit } = useSpotPresalePlayment()
|
|
|
-const { transferCancelSubmit } = useSpotPresaleTransferCancel()
|
|
|
-const { listingSubmit, formData } = useSpotPresaleTransferListing()
|
|
|
-
|
|
|
-const { route } = useNavigation()
|
|
|
const item = route.params.item
|
|
|
const detail = shallowRef<Model.THJPurchaseTradeDetailRsp>()
|
|
|
|
|
|
@@ -80,6 +72,12 @@ if (item) {
|
|
|
detail.value = JSON.parse(item.toString())
|
|
|
}
|
|
|
|
|
|
+const { confirmSubmit } = useSpotPresaleDeliveryConfirm()
|
|
|
+const { applySubmit } = useSpotPresaleBreachOfContractApply()
|
|
|
+const { playmentSubmit } = useSpotPresalePlayment()
|
|
|
+const { transferCancelSubmit } = useSpotPresaleTransferCancel(detail.value?.wrtradedetailid)
|
|
|
+const { listingSubmit, formData } = useSpotPresaleTransferListing()
|
|
|
+
|
|
|
// 打开pdf文件
|
|
|
const openPDF = (file?: string) => {
|
|
|
if (file) {
|
|
|
@@ -92,12 +90,12 @@ const spotConfirmSubmit = () => {
|
|
|
const param = detail.value
|
|
|
if (param) {
|
|
|
dialog('确认要交收吗?', {
|
|
|
- showCancelButton: true
|
|
|
- }).then(() => {
|
|
|
- fullloading((hideLoading) => {
|
|
|
+ showCancelButton: true
|
|
|
+ }).then(() => {
|
|
|
+ fullloading((hideLoading) => {
|
|
|
confirmSubmit(param.wrtradedetailid).then(() => {
|
|
|
hideLoading()
|
|
|
- dialog('确认交收提交成功,请耐心等待审核。').then(() => {
|
|
|
+ dialog('确认交收提交成功。').then(() => {
|
|
|
router.back()
|
|
|
})
|
|
|
}).catch((err) => {
|
|
|
@@ -139,7 +137,7 @@ const spotPlaymentSubmit = () => {
|
|
|
fullloading((hideLoading) => {
|
|
|
playmentSubmit(param.wrtradedetailid).then(() => {
|
|
|
hideLoading()
|
|
|
- dialog('付款提交成功,请耐心等待审核。').then(() => {
|
|
|
+ dialog('付款提交成功。').then(() => {
|
|
|
router.back()
|
|
|
})
|
|
|
}).catch((err) => {
|
|
|
@@ -157,7 +155,7 @@ const spotListingSubmit = () => {
|
|
|
fullloading((hideLoading) => {
|
|
|
listingSubmit(param.wrtradedetailid).then(() => {
|
|
|
hideLoading()
|
|
|
- dialog('合同转让提交成功,请耐心等待审核。').then(() => {
|
|
|
+ dialog('合同转让提交成功。').then(() => {
|
|
|
router.back()
|
|
|
})
|
|
|
}).catch((err) => {
|
|
|
@@ -169,24 +167,20 @@ const spotListingSubmit = () => {
|
|
|
|
|
|
/// 转让撤销申请
|
|
|
const spotCancelSubmit = () => {
|
|
|
- const param = detail.value
|
|
|
- if (param) {
|
|
|
- dialog('确认要转让撤销吗?', {
|
|
|
- showCancelButton: true
|
|
|
- }).then(() => {
|
|
|
- fullloading((hideLoading) => {
|
|
|
- transferCancelSubmit(param.wrtradedetailid).then(() => {
|
|
|
- hideLoading()
|
|
|
- dialog('转让撤销提交成功,请耐心等待审核。').then(() => {
|
|
|
- router.back()
|
|
|
- })
|
|
|
- }).catch((err) => {
|
|
|
- Toast.fail(err)
|
|
|
+ dialog('确认要撤销转让吗?', {
|
|
|
+ showCancelButton: true
|
|
|
+ }).then(() => {
|
|
|
+ fullloading((hideLoading) => {
|
|
|
+ transferCancelSubmit().then(() => {
|
|
|
+ hideLoading()
|
|
|
+ dialog('撤销转让提交成功。').then(() => {
|
|
|
+ router.back()
|
|
|
})
|
|
|
+ }).catch((err) => {
|
|
|
+ Toast.fail(err)
|
|
|
})
|
|
|
})
|
|
|
- }
|
|
|
-
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
/// 是否显示Dialog
|
|
|
@@ -200,5 +194,19 @@ const cancelDialog = () => {
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
|
-
|
|
|
+.order-detail {
|
|
|
+ &__dialog {
|
|
|
+ .van-dialog__content {
|
|
|
+ padding: .48rem;
|
|
|
+
|
|
|
+ input {
|
|
|
+ width: 100%;
|
|
|
+ font-size: .28rem;
|
|
|
+ border: 1px solid #ddd;
|
|
|
+ border-radius: .12rem;
|
|
|
+ padding: .2rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|