备货单 添加 加价 将内勤专属 移到打印查看里面
This commit is contained in:
@@ -86,7 +86,12 @@
|
||||
<ElForm ref="formRef" :model="poForm" :rules="poRules" label-width="120px" class="form">
|
||||
<ElFormItem label="PI号" prop="pi_no">
|
||||
<ElSelect v-model="poForm.pi_no" placeholder="请选择PI号" style="width: 100%">
|
||||
<ElOption v-for="pi in piOptions" :key="pi.pi_no" :value="pi.pi_no" />
|
||||
<ElOption
|
||||
v-for="pi in piOptions"
|
||||
:key="pi.pi_no"
|
||||
:value="pi.pi_no"
|
||||
:label="pi.pi_nosnapshot"
|
||||
/>
|
||||
</ElSelect>
|
||||
</ElFormItem>
|
||||
|
||||
@@ -366,7 +371,15 @@
|
||||
const loadOptions = async () => {
|
||||
try {
|
||||
const res = await purchaseService.purchaseorderpredata({ scene: 'pi_no' })
|
||||
piOptions.value = res || []
|
||||
const list = Array.isArray(res) ? res : []
|
||||
if (Array.isArray(list)) {
|
||||
list.forEach((item: any) => {
|
||||
item.pi_nosnapshot = item.pi_no + '(' + item.salesperson_snapshot + ')'
|
||||
})
|
||||
piOptions.value = list
|
||||
} else {
|
||||
piOptions.value = res
|
||||
}
|
||||
} catch {
|
||||
piOptions.value = []
|
||||
}
|
||||
|
||||
@@ -85,14 +85,14 @@
|
||||
>
|
||||
<i class="iconfont-sys"></i> 查看审批
|
||||
</el-link>
|
||||
<el-link
|
||||
<!-- <el-link
|
||||
type="primary"
|
||||
underline="never"
|
||||
@click="handleViewnq(scope.row)"
|
||||
style="margin-right: 8px;color: #750AF8"
|
||||
>
|
||||
<i class="iconfont-sys"></i> 内勤专用
|
||||
</el-link>
|
||||
</el-link> -->
|
||||
</ElRow>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
@@ -135,7 +135,7 @@
|
||||
top="40px"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="max-height: 70vh; display: flex; flex-direction: column; gap: 12px">
|
||||
<div style="max-height: 50vh; display: flex; flex-direction: column; gap: 12px">
|
||||
<div style="display: flex; justify-content: flex-end; gap: 8px">
|
||||
<el-button @click="download" v-if="isFinites">下载</el-button>
|
||||
</div>
|
||||
@@ -157,6 +157,13 @@
|
||||
style="flex: 1; width: 100%; border: 1px solid #eee; border-radius: 6px;"
|
||||
/>
|
||||
</div>
|
||||
<div class="inter-view">
|
||||
<InternalStaffViews
|
||||
v-model:visible="pdf.visible"
|
||||
:vehicle-data="nqData"
|
||||
:default-currency="nqCurrency"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-model="timelineDialogVisible"
|
||||
@@ -172,11 +179,11 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 内勤查看弹窗 -->
|
||||
<InternalStaffView
|
||||
<!-- <InternalStaffView
|
||||
v-model:visible="nqDialogVisible"
|
||||
:vehicle-data="nqData"
|
||||
:default-currency="nqCurrency"
|
||||
/>
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -190,7 +197,8 @@
|
||||
import type { OrderData } from '@/composables/useOrderDetailDialog'
|
||||
import { usePdfPreview } from '@/composables/usePdfPreview'
|
||||
import FilePreview from '@/components/custom/FilePreview.vue'
|
||||
import InternalStaffView from '@/components/custom/InternalStaffView.vue'
|
||||
// import InternalStaffView from '@/components/custom/InternalStaffView.vue'
|
||||
import InternalStaffViews from '@/components/custom/InternalStaffViews.vue'
|
||||
const timelineDialogVisible = ref(false)
|
||||
const approvalRecords = ref<any[]>([])
|
||||
const isFinites = ref(false)
|
||||
@@ -274,6 +282,7 @@
|
||||
} else {
|
||||
isFinites.value = false
|
||||
}
|
||||
handleViewnq(row)
|
||||
manageService
|
||||
.printStock({ id: row.id })
|
||||
.then((res) => {
|
||||
@@ -315,7 +324,7 @@
|
||||
port_fee_currency: it.port_misc_fee?.currency || it.port_fee_currency,
|
||||
model: it.model_snapshot
|
||||
}))
|
||||
nqDialogVisible.value = true
|
||||
// nqDialogVisible.value = true
|
||||
}
|
||||
// 文件数据
|
||||
const contractFiles = ref<Array<{ name: string; url: string; file_name: string }>>([])
|
||||
@@ -547,4 +556,10 @@
|
||||
font-size: 48px;
|
||||
color: #ddd;
|
||||
}
|
||||
.inter-view {
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -93,14 +93,6 @@
|
||||
>
|
||||
<i class="iconfont-sys"></i> 查看审批
|
||||
</el-link>
|
||||
<el-link
|
||||
type="primary"
|
||||
underline="never"
|
||||
@click="handleViewnq(scope.row)"
|
||||
style="margin-right: 8px;color: #750AF8;"
|
||||
>
|
||||
<i class="iconfont-sys"></i> 内勤专用
|
||||
</el-link>
|
||||
</ElRow>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
@@ -116,7 +108,7 @@
|
||||
top="40px"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="max-height: 70vh; display: flex; flex-direction: column; gap: 12px">
|
||||
<div style="max-height: 50vh; display: flex; flex-direction: column; gap: 12px">
|
||||
<div style="display: flex; justify-content: flex-end; gap: 8px;">
|
||||
<el-button @click="download" v-if="isFinites">下载</el-button>
|
||||
</div>
|
||||
@@ -138,6 +130,13 @@
|
||||
style="flex: 1; width: 100%; border: 1px solid #eee; border-radius: 6px;"
|
||||
/>
|
||||
</div>
|
||||
<div class="inter-view">
|
||||
<InternalStaffViews
|
||||
v-model:visible="pdf.visible"
|
||||
:vehicle-data="nqData"
|
||||
:default-currency="nqCurrency"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 订单详情弹窗(使用公共内容组件) -->
|
||||
<el-dialog
|
||||
@@ -181,11 +180,11 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 内勤查看弹窗 -->
|
||||
<InternalStaffView
|
||||
<!-- <InternalStaffView
|
||||
v-model:visible="nqDialogVisible"
|
||||
:vehicle-data="nqData"
|
||||
:default-currency="nqCurrency"
|
||||
/>
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -196,10 +195,11 @@
|
||||
import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue'
|
||||
import type { OrderData } from '@/composables/useOrderDetailDialog'
|
||||
import FilePreview from '@/components/custom/FilePreview.vue'
|
||||
import InternalStaffView from '@/components/custom/InternalStaffView.vue'
|
||||
// import InternalStaffView from '@/components/custom/InternalStaffView.vue'
|
||||
import InternalStaffViews from '@/components/custom/InternalStaffViews.vue'
|
||||
const timelineDialogVisible = ref(false)
|
||||
const approvalRecords = ref<any[]>([])
|
||||
const nqDialogVisible = ref(false)
|
||||
// const nqDialogVisible = ref(false)
|
||||
const nqCurrency = ref('')
|
||||
const nqData = ref<any[]>([])
|
||||
const isFinites = ref(false)
|
||||
@@ -466,6 +466,7 @@
|
||||
} else {
|
||||
isFinites.value = false
|
||||
}
|
||||
handleViewnq(row)
|
||||
manageService
|
||||
.printStock({ id: row.id })
|
||||
.then((res) => {
|
||||
@@ -530,7 +531,7 @@
|
||||
port_fee_currency: it.port_misc_fee?.currency || it.port_fee_currency,
|
||||
model: it.model_snapshot
|
||||
}))
|
||||
nqDialogVisible.value = true
|
||||
// nqDialogVisible.value = true
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -667,5 +668,11 @@
|
||||
word-break: break-all;
|
||||
max-width: 100%;
|
||||
}
|
||||
.inter-view {
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -264,6 +264,23 @@
|
||||
<ElInput v-model="item.reduction_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="加价" label-width="85px">
|
||||
<ElInput v-model="item.increase_price" placeholder="请输入加价">
|
||||
<template #suffix>
|
||||
<ElSelect v-model="item.increase_price_currency" style="width: 74px">
|
||||
<ElOption
|
||||
v-for="c in currencyOptions"
|
||||
:key="c.currency_code"
|
||||
:label="c.currency_name"
|
||||
:value="c.currency_code"
|
||||
/>
|
||||
</ElSelect>
|
||||
</template>
|
||||
</ElInput>
|
||||
<ElInput v-model="item.increase_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="收款价" label-width="85px" :prop="`items.${idx}.unit_price`" required>
|
||||
<ElInput v-model="item.unit_price" placeholder="请输入收款价">
|
||||
|
||||
@@ -287,6 +287,23 @@
|
||||
<ElInput v-model="item.reduction_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="加价" label-width="85px">
|
||||
<ElInput v-model="item.increase_price" placeholder="请输入加价">
|
||||
<template #suffix>
|
||||
<ElSelect v-model="item.increase_price_currency" style="width: 74px">
|
||||
<ElOption
|
||||
v-for="c in currencyOptions"
|
||||
:key="c.currency_code"
|
||||
:label="c.currency_name"
|
||||
:value="c.currency_code"
|
||||
/>
|
||||
</ElSelect>
|
||||
</template>
|
||||
</ElInput>
|
||||
<ElInput v-model="item.increase_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="收款价" label-width="85px" :prop="'items.' + idx + '.unit_price'" required>
|
||||
<ElInput v-model="item.unit_price" placeholder="请输入收款价">
|
||||
|
||||
@@ -326,6 +326,48 @@
|
||||
<ElInput v-model="item.reduction_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="加价" label-width="85px">
|
||||
<ElInput v-model="item.increase_price" placeholder="请输入加价">
|
||||
<template #suffix>
|
||||
<ElSelect v-model="item.increase_price_currency" style="width: 74px">
|
||||
<ElOption
|
||||
v-for="c in currencyOptions"
|
||||
:key="c.currency_code"
|
||||
:label="c.currency_name"
|
||||
:value="c.currency_code"
|
||||
/>
|
||||
</ElSelect>
|
||||
</template>
|
||||
</ElInput>
|
||||
<ElInput v-model="item.increase_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
|
||||
<ElFormItem label="收款价" label-width="95px" :prop="'items.' + idx + '.unit_price'" required>
|
||||
<ElInput
|
||||
:disabled="item._echo_vin === true"
|
||||
v-model="item.unit_price"
|
||||
placeholder="请输入收款价"
|
||||
>
|
||||
<template #suffix>
|
||||
<ElSelect
|
||||
:disabled="item._echo_vin === true"
|
||||
v-model="item.unit_price_currency"
|
||||
style="width: 64px"
|
||||
>
|
||||
<ElOption
|
||||
v-for="c in currencyOptions"
|
||||
:key="c.currency_code"
|
||||
:label="c.currency_name"
|
||||
:value="c.currency_code"
|
||||
/>
|
||||
</ElSelect>
|
||||
</template>
|
||||
</ElInput>
|
||||
<ElInput v-model="item.unit_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
</ElRow>
|
||||
<ElRow :gutter="12" class="item-row-wrap">
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
|
||||
@@ -378,6 +420,31 @@
|
||||
<ElInput v-model="item.modify_fee_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="配件费" label-width="85px">
|
||||
<ElInput
|
||||
v-model="item.accessory_price"
|
||||
:disabled="item._echo_vin === true"
|
||||
placeholder="请输入配件费"
|
||||
>
|
||||
<template #suffix>
|
||||
<ElSelect
|
||||
v-model="item.accessory_price_currency"
|
||||
:disabled="item._echo_vin === true"
|
||||
style="width: 74px"
|
||||
>
|
||||
<ElOption
|
||||
v-for="c in currencyOptions"
|
||||
:key="c.currency_code"
|
||||
:label="c.currency_name"
|
||||
:value="c.currency_code"
|
||||
/>
|
||||
</ElSelect>
|
||||
</template>
|
||||
</ElInput>
|
||||
<ElInput v-model="item.accessory_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
|
||||
<ElFormItem label="FOB段运费" label-width="95px">
|
||||
<ElInput
|
||||
@@ -455,9 +522,17 @@
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="佣金" label-width="95px">
|
||||
<ElInput :disabled="item._echo_vin === true" v-model="item.commission" placeholder="请输入佣金">
|
||||
<ElInput
|
||||
:disabled="item._echo_vin === true"
|
||||
v-model="item.commission"
|
||||
placeholder="请输入佣金"
|
||||
>
|
||||
<template #suffix>
|
||||
<ElSelect :disabled="item._echo_vin === true" v-model="item.commission_currency" style="width: 64px">
|
||||
<ElSelect
|
||||
:disabled="item._echo_vin === true"
|
||||
v-model="item.commission_currency"
|
||||
style="width: 64px"
|
||||
>
|
||||
<ElOption
|
||||
v-for="c in currencyOptions"
|
||||
:key="c.currency_code"
|
||||
@@ -470,6 +545,31 @@
|
||||
<ElInput v-model="item.commission_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="挂账" label-width="85px">
|
||||
<ElInput
|
||||
:disabled="item._echo_vin === true"
|
||||
v-model="item.retention_price"
|
||||
placeholder="请输入挂账"
|
||||
>
|
||||
<template #suffix>
|
||||
<ElSelect
|
||||
:disabled="item._echo_vin === true"
|
||||
v-model="item.retention_price_currency"
|
||||
style="width: 74px"
|
||||
>
|
||||
<ElOption
|
||||
v-for="c in currencyOptions"
|
||||
:key="c.currency_code"
|
||||
:label="c.currency_name"
|
||||
:value="c.currency_code"
|
||||
/>
|
||||
</ElSelect>
|
||||
</template>
|
||||
</ElInput>
|
||||
<ElInput v-model="item.retention_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="购置税" label-width="95px">
|
||||
<ElInput :disabled="item._echo_vin === true" v-model="item.purchase_tax" placeholder="请输入购置税">
|
||||
@@ -514,31 +614,6 @@
|
||||
</ElCol>
|
||||
</ElRow>
|
||||
<ElRow :gutter="12" class="item-row-wrap">
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
|
||||
<ElFormItem label="收款价" label-width="95px" :prop="'items.' + idx + '.unit_price'" required>
|
||||
<ElInput
|
||||
:disabled="item._echo_vin === true"
|
||||
v-model="item.unit_price"
|
||||
placeholder="请输入收款价"
|
||||
>
|
||||
<template #suffix>
|
||||
<ElSelect
|
||||
:disabled="item._echo_vin === true"
|
||||
v-model="item.unit_price_currency"
|
||||
style="width: 64px"
|
||||
>
|
||||
<ElOption
|
||||
v-for="c in currencyOptions"
|
||||
:key="c.currency_code"
|
||||
:label="c.currency_name"
|
||||
:value="c.currency_code"
|
||||
/>
|
||||
</ElSelect>
|
||||
</template>
|
||||
</ElInput>
|
||||
<ElInput v-model="item.unit_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<!-- <ElCol :sm="12" :md="12" :lg="6" :xl="6">
|
||||
<ElFormItem label="总价" label-width="95px">
|
||||
<ElInput v-model="item.total_price" placeholder="请输入总价">
|
||||
@@ -556,6 +631,32 @@
|
||||
<ElInput v-model="item.total_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol> -->
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="车价" label-width="85px">
|
||||
<ElInput
|
||||
v-model="item.car_price"
|
||||
:disabled="item._echo_vin === true"
|
||||
placeholder="正在计算车价"
|
||||
@input="handleUserEdit(idx)"
|
||||
>
|
||||
<template #suffix>
|
||||
<ElSelect
|
||||
v-model="item.car_price_currency"
|
||||
:disabled="item._echo_vin === true"
|
||||
style="width: 74px"
|
||||
>
|
||||
<ElOption
|
||||
v-for="c in currencyOptions"
|
||||
:key="c.currency_code"
|
||||
:label="c.currency_name"
|
||||
:value="c.currency_code"
|
||||
/>
|
||||
</ElSelect>
|
||||
</template>
|
||||
</ElInput>
|
||||
<ElInput v-model="item.car_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
|
||||
<ElFormItem label="利润" label-width="95px">
|
||||
<ElInput
|
||||
|
||||
@@ -286,6 +286,23 @@
|
||||
<ElInput v-model="item.reduction_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="加价" label-width="85px">
|
||||
<ElInput v-model="item.increase_price" placeholder="请输入加价">
|
||||
<template #suffix>
|
||||
<ElSelect v-model="item.increase_price_currency" style="width: 74px">
|
||||
<ElOption
|
||||
v-for="c in currencyOptions"
|
||||
:key="c.currency_code"
|
||||
:label="c.currency_name"
|
||||
:value="c.currency_code"
|
||||
/>
|
||||
</ElSelect>
|
||||
</template>
|
||||
</ElInput>
|
||||
<ElInput v-model="item.increase_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
|
||||
<ElFormItem label="收款价" label-width="95px" :prop="'items.' + idx + '.unit_price'" required>
|
||||
<ElInput v-model="item.unit_price" placeholder="请输入收款价">
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
:value="item.brand_name || item.name"
|
||||
/>
|
||||
</ElSelect>
|
||||
<!-- <ElInput v-model="formData.brand_code" placeholder="品牌编码" readonly disabled /> -->
|
||||
<ElInput v-model="formData.brand_code" placeholder="品牌编码" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :span="8">
|
||||
@@ -150,7 +150,7 @@
|
||||
:value="s.series_name || s.name"
|
||||
/>
|
||||
</ElSelect>
|
||||
<!-- <ElInput v-model="formData.series_code" placeholder="车系编码" readonly disabled /> -->
|
||||
<ElInput v-model="formData.series_code" placeholder="车系编码" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :span="8">
|
||||
@@ -1258,18 +1258,16 @@
|
||||
|
||||
// 设置表单数据
|
||||
Object.assign(formData, row)
|
||||
|
||||
// 立即检查车系名称是否被清空并重新设置
|
||||
setTimeout(() => {
|
||||
if (!formData.series_name) {
|
||||
formData.series_name = row.series_name
|
||||
}
|
||||
}, 1)
|
||||
|
||||
// 先加载品牌选项
|
||||
await loadBrandOptions()
|
||||
|
||||
// 如果品牌已选择,加载车系选项
|
||||
formData.brand_code = row.brand_code
|
||||
if (row.brand_code) {
|
||||
await loadSeriesOptions(row.brand_code)
|
||||
} else if (row.brand_name) {
|
||||
@@ -1436,7 +1434,7 @@
|
||||
getList()
|
||||
} catch (error) {
|
||||
console.error('提交失败:', error)
|
||||
ElMessage.error('提交失败')
|
||||
// ElMessage.error('提交失败')
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user