|
@@ -77,7 +77,7 @@
|
|
|
</div>
|
|
|
<div v-else-if="item.key === 'original_price'">
|
|
|
{{ item.label }}:
|
|
|
- <span v-if="!product.original_price" class="no_open_root">该产品暂无法计算标准售价</span>
|
|
|
+ <span v-if="!product.original_price && product.product_type !== '阳光采购'" class="no_open_root">该产品暂无法计算标准售价</span>
|
|
|
<span v-else>¥{{ getFilteredValue(product[item.key], item.filter) || '-' }}</span>
|
|
|
</div>
|
|
|
<div v-else-if="item.key === 'validity_period'">
|
|
@@ -101,7 +101,7 @@
|
|
|
{{ item.label }}:{{ product.filter.num || '-' }}个
|
|
|
</div>
|
|
|
<div v-else-if="item.key === 'sale_final_price'">
|
|
|
- {{ item.label }}:¥{{ product.filter.num }}
|
|
|
+ {{ item.label }}:¥{{ divided(product.filter.num, 100) }}
|
|
|
</div>
|
|
|
|
|
|
<div v-else>{{ item.label }}:{{ getFilteredValue(product[item.key], item.filter) || '-' }}</div>
|
|
@@ -200,7 +200,6 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- orderDetailInfo: {},
|
|
|
basicInfoItems: [
|
|
|
{ label: '创建人', key: 'create_person' },
|
|
|
{ label: '创建时间', key: 'create_time' },
|
|
@@ -333,19 +332,17 @@ export default {
|
|
|
watch: {
|
|
|
orderDetail: {
|
|
|
handler(newVal) {
|
|
|
- this.orderDetailInfo = newVal || {};
|
|
|
- this.init();
|
|
|
+ this.beforeInit(newVal);
|
|
|
},
|
|
|
deep: true,
|
|
|
immediate: true
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
- isUpEntRed() {
|
|
|
- return this.orderDetailInfo?.redPunchData?.isUpEnt || false
|
|
|
- }
|
|
|
+ mounted() {
|
|
|
+ this.beforeInit();
|
|
|
},
|
|
|
methods: {
|
|
|
+
|
|
|
formatInputMoney (f, key = 'money') {
|
|
|
f[key] = this.formatNumber((f[key] || 0) * 100)
|
|
|
},
|
|
@@ -393,10 +390,15 @@ export default {
|
|
|
}
|
|
|
return result
|
|
|
},
|
|
|
+ beforeInit() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.init();
|
|
|
+ })
|
|
|
+ },
|
|
|
async init() {
|
|
|
- this.orderData = this.orderDetailInfo?.orderData || {};
|
|
|
- let productData = this.orderDetailInfo?.productData || [];
|
|
|
- const { _productArr } = this.orderDetailInfo || {}
|
|
|
+ this.orderData = this.orderDetail?.orderData || {};
|
|
|
+ let productData = this.orderDetail?.productData || [];
|
|
|
+ const { _productArr } = this.orderDetail || {}
|
|
|
|
|
|
if(productData.length > 0) {
|
|
|
// 使用 Promise.all 来并行处理每个 product 的异步操作
|
|
@@ -523,7 +525,7 @@ export default {
|
|
|
},
|
|
|
// 设置红冲标识显示字段
|
|
|
setRedPunchDisplay(product) {
|
|
|
- const { isUpCommission, isUpEnt, isUpCash } = this.orderDetailInfo?.redPunchData || {};
|
|
|
+ const { isUpCommission, isUpEnt, isUpCash } = this.orderDetail?.redPunchData || {};
|
|
|
const RETURN_BOOL = {
|
|
|
'合同金额': isUpCash,
|
|
|
'销售费用': isUpCommission,
|
|
@@ -680,6 +682,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+ divided(a, b) {
|
|
|
+ return div(a, b)
|
|
|
+ },
|
|
|
calculateValidityPeriod(parsedFilter, product) {
|
|
|
const { buy_cycle, buy_type, give_cycle, give_type, validYear } = parsedFilter
|
|
|
const { product_type, returned_open } = product
|