|
@@ -6,6 +6,10 @@
|
|
|
<template slot="subTitle">
|
|
|
<a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
<p class="billno">单号:{{ detail&&detail.purchaseBillNo }}</p>
|
|
|
+ <a @click="isShowBisiceInfo=!isShowBisiceInfo" style="margin-left:30px;color: #666;font-size: 14px;font-weight: 600;">
|
|
|
+ 基础信息
|
|
|
+ <a-icon :type="isShowBisiceInfo ? 'up' : 'down'"/>
|
|
|
+ </a>
|
|
|
</template>
|
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
|
<template slot="extra" v-if="$hasPermissions('B_purchasePrint')">
|
|
@@ -13,29 +17,29 @@
|
|
|
</template>
|
|
|
</a-page-header>
|
|
|
<!-- 基础信息 -->
|
|
|
- <a-card size="small" :bordered="false" class="purchaseOrderEdit-cont">
|
|
|
- <a-collapse :activeKey="['1']">
|
|
|
- <a-collapse-panel key="1">
|
|
|
- <template slot="header">
|
|
|
- 基础信息
|
|
|
- </template>
|
|
|
- <a-descriptions :column="2">
|
|
|
- <a-descriptions-item label="供应商">{{ detail&&detail.purchaseTargetName || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="支付方式">{{ detail&&detail.settleStyleSnDictValue || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="收货人">{{ detail&&detail.consigneeName || '--' }}({{ detail&&detail.consigneeTel || '--' }})</a-descriptions-item>
|
|
|
- <a-descriptions-item label="收货地址">
|
|
|
- <div v-if="detail&&(detail.shippingAddressProvinceName || detail.shippingAddressCityName || detail.shippingAddressCountyName || detail.shippingAddress)">
|
|
|
- {{ detail&&detail.shippingAddressProvinceName || '' }}
|
|
|
- {{ detail&&detail.shippingAddressCityName || '' }}
|
|
|
- {{ detail&&detail.shippingAddressCountyName || '' }}
|
|
|
- {{ detail&&detail.shippingAddress || '' }}
|
|
|
- <a-button type="link" @click="openAddrModal=true">更换地址 >></a-button>
|
|
|
- </div>
|
|
|
- <p v-else><a-button type="link" @click="openAddrModal=true">选择地址 >></a-button></p>
|
|
|
- </a-descriptions-item>
|
|
|
- </a-descriptions>
|
|
|
- </a-collapse-panel>
|
|
|
- </a-collapse>
|
|
|
+ <a-card size="small" :bordered="false" v-if="isShowBisiceInfo" class="purchaseOrderEdit-cont">
|
|
|
+ <a-row :gutter="16" type="flex" align="middle" justify="center"s>
|
|
|
+ <a-col class="gutter-row" :span="12">
|
|
|
+ 供应商:{{ detail&&detail.purchaseTargetName || '--' }}
|
|
|
+ </a-col>
|
|
|
+ <a-col class="gutter-row" :span="12">
|
|
|
+ 支付方式:{{ detail&&detail.settleStyleSnDictValue || '--' }}
|
|
|
+ </a-col>
|
|
|
+ <a-col class="gutter-row" :span="12">
|
|
|
+ 收货人:{{ detail&&detail.consigneeName || '--' }}({{ detail&&detail.consigneeTel || '--' }})
|
|
|
+ </a-col>
|
|
|
+ <a-col class="gutter-row" :span="12">
|
|
|
+ <span>收货地址:</span>
|
|
|
+ <div style="display: inline-block;vertical-align: middle;" v-if="detail&&(detail.shippingAddressProvinceName || detail.shippingAddressCityName || detail.shippingAddressCountyName || detail.shippingAddress)">
|
|
|
+ {{ detail&&detail.shippingAddressProvinceName || '' }}
|
|
|
+ {{ detail&&detail.shippingAddressCityName || '' }}
|
|
|
+ {{ detail&&detail.shippingAddressCountyName || '' }}
|
|
|
+ {{ detail&&detail.shippingAddress || '' }}
|
|
|
+ <a-button type="link" @click="openAddrModal=true">更换地址 >></a-button>
|
|
|
+ </div>
|
|
|
+ <div v-else><a-button type="link" @click="openAddrModal=true">选择地址 >></a-button></div>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
</a-card>
|
|
|
<!-- 选择产品 -->
|
|
|
<a-card size="small" :bordered="false" class="purchaseOrderEdit-cont">
|
|
@@ -164,7 +168,7 @@
|
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
|
<div slot="message">产品款数 <strong>{{ detail && (detail.totalCategory || detail.totalCategory==0) ? detail.totalCategory : '--' }}</strong> ,
|
|
|
采购数量合计 <strong>{{ detail && (detail.totalQty || detail.totalQty==0) ? detail.totalQty : '--' }}</strong> ,
|
|
|
- <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">采购金额合计 <strong>{{ detail && (detail.discountedAmount || detail.discountedAmount==0) ? '¥'+detail.discountedAmount : '--' }}</strong></div>
|
|
|
+ <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">采购金额合计 <strong>{{ detail && (detail.discountedAmount || detail.discountedAmount==0) ?toThousands(detail.discountedAmount, 2) : '--' }}</strong></div>
|
|
|
</div>
|
|
|
</a-alert>
|
|
|
<!-- 搜索条件 -->
|
|
@@ -280,6 +284,7 @@ export default {
|
|
|
mixins: [commonMixin],
|
|
|
data () {
|
|
|
return {
|
|
|
+ isShowBisiceInfo: false,
|
|
|
showPage: false,
|
|
|
spinning: false,
|
|
|
detail: null, // 详细信息
|
|
@@ -354,6 +359,7 @@ export default {
|
|
|
return this.detail && this.detail.purchaseTargetType == 'DEALER_UP'
|
|
|
},
|
|
|
columns () {
|
|
|
+ const _this = this
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
{ title: '产品编码', scopedSlots: { customRender: 'code' }, width: '15%', align: 'center', sorter: true },
|
|
@@ -362,8 +368,8 @@ export default {
|
|
|
{ title: '单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '包装数', scopedSlots: { customRender: 'baozh' }, width: '5%', align: 'center' },
|
|
|
// { title: '成本价', dataIndex: 'purchasePrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
- { title: '终端会员价', dataIndex: 'terminalPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
- { title: '车主零售价', dataIndex: 'carOwnersPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
+ { title: '终端会员价', dataIndex: 'terminalPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
|
+ { title: '车主零售价', dataIndex: 'carOwnersPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
|
{ title: '采购数量', dataIndex: 'qty', scopedSlots: { customRender: 'storageQuantity' }, width: '6%', align: 'center' },
|
|
|
{ title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '6%', align: 'center' },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
@@ -373,12 +379,13 @@ export default {
|
|
|
arr.splice(6, 0, { title: '产品来源', dataIndex: 'sysFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
}
|
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
|
- arr.splice(this.isDealerUp ? 7 : 6, 0, { title: '成本价', dataIndex: 'purchasePrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(this.isDealerUp ? 7 : 6, 0, { title: '成本价', dataIndex: 'purchasePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
|
}
|
|
|
|
|
|
return arr
|
|
|
},
|
|
|
chooseColumns () {
|
|
|
+ const _this = this
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
{ title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '20%', align: 'center' },
|
|
@@ -390,8 +397,8 @@ export default {
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
|
]
|
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
|
- arr.splice(3, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '20%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
- arr.splice(6, 0, { title: '采购金额', dataIndex: 'discountedAmount', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(3, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '20%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
|
+ arr.splice(6, 0, { title: '采购金额', dataIndex: 'discountedAmount', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
|
}
|
|
|
return arr
|
|
|
}
|