|
@@ -1,76 +1,72 @@
|
|
|
<template>
|
|
|
- <div v-if="showPage" class="salesDetail-wrap">
|
|
|
+ <div v-if="showPage" class="jg-page-wrap salesDetail-wrap">
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
<a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont" :style="{ padding: !outBizSn ? '16px 24px' : '0px 24px' }">
|
|
|
- <template slot="subTitle" v-if="!outBizSn">
|
|
|
- <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
|
|
|
- <a-button
|
|
|
- v-if="(detailData&&detailData.billStatus !== 'CANCEL' && detailData.billStatus !== 'FINISH' && detailData.billStatus != 'WAIT_OUT_WAREHOUSE')&&$hasPermissions('B_salesEdit')"
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
|
|
|
- id="salesDetail-edit-btn"
|
|
|
- @click.stop="handleEdit">编辑</a-button>
|
|
|
+ <!-- 自定义的二级文字标题 -->
|
|
|
+ <template slot="subTitle" v-if="!outBizSn && detailData">
|
|
|
+ <span class="billno">单号:{{ detailData.salesBillNo ||'--' }}</span>
|
|
|
+ <a-tag color="green" v-if="detailData.billStatusDictValue">{{ detailData.billStatusDictValue }}</a-tag>
|
|
|
+ <a-tag color="orange" v-if="detailData.financialStatusDictValue">{{ detailData.financialStatusDictValue }}</a-tag>
|
|
|
+ <a-button type="link" class="button-default" @click="isShowBisiceInfo=!isShowBisiceInfo" style="margin-left:10px;vertical-align:middle;">
|
|
|
+ <a-icon :type="isShowBisiceInfo ? 'eye-invisible' : 'eye'"/>
|
|
|
+ 查看信息
|
|
|
+ </a-button>
|
|
|
+ <a-button id="purchaseNewOrderEdit-back-btn" type="link" @click="handleBack" class="button-default"> <a-icon type="rollback" /> 返回列表</a-button>
|
|
|
</template>
|
|
|
+ <!-- 操作区,位于 title 行的行尾 -->
|
|
|
<template slot="extra" v-if="outBizSn ? $hasPermissions('B_outboundOrderDetail') : $hasPermissions('B_salesPrint')">
|
|
|
- <a-checkbox v-model="printAllName" :checked="printAllName" id="salesQuery-printAllName">打印完整产品名称</a-checkbox>
|
|
|
- <a-checkbox v-model="printOrgCode" :checked="printOrgCode" id="salesQuery-printOrgCode">打印原厂编码</a-checkbox>
|
|
|
- <Print :disabled="localDataSource.length==0" @handlePrint="handlePrint"></Print>
|
|
|
+ <div style="margin-top: 5px;">
|
|
|
+ <PrintPanel position="bottomRight" :disabled="localDataSource.length==0" @handlePrint="handlePrint"></PrintPanel>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</a-page-header>
|
|
|
<!-- 基础信息 -->
|
|
|
- <a-card size="small" :bordered="false" class="salesDetail-cont">
|
|
|
- <a-collapse :activeKey="['1']">
|
|
|
- <a-collapse-panel key="1" header="基础信息">
|
|
|
- <a-descriptions size="small" :column="3">
|
|
|
- <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerNameCurrent?detailData.buyerName?detailData.buyerName==detailData.buyerNameCurrent?detailData.buyerNameCurrent:detailData.buyerNameCurrent+'('+detailData.buyerName+')':detailData.buyerNameCurrent:'--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="客户地址" :span="2">
|
|
|
- <div v-if="detailData&&(detailData.shippingAddressProvinceName || detailData.shippingAddressCityName || detailData.shippingAddressCountyName || detailData.shippingAddress)">
|
|
|
- {{ detailData&&detailData.shippingAddressProvinceName || '' }}
|
|
|
- {{ detailData&&detailData.shippingAddressCityName || '' }}
|
|
|
- {{ detailData&&detailData.shippingAddressCountyName || '' }}
|
|
|
- {{ detailData&&detailData.shippingAddress || '' }}
|
|
|
- </div>
|
|
|
- <span v-else>--</span>
|
|
|
- </a-descriptions-item>
|
|
|
- <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="联系电话">{{ detailData&&detailData.consigneeTel || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="备注">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="销售单号">{{ detailData&&detailData.salesBillNo || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="制单人">{{ detailData&&detailData.operatorName || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="业务员">{{ detailData&&detailData.salesManName || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="来源">{{ detailData&&detailData.sourceTypeDictValue || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="下级采购单号" v-if="detailData&&detailData.sourceType=='PURCHASE'">{{ detailData&&detailData.purchaseBillNo || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="财务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
|
|
|
- </a-descriptions>
|
|
|
- </a-collapse-panel>
|
|
|
- </a-collapse>
|
|
|
+ <a-card size="small" :bordered="false" class="salesDetail-cont" v-show="isShowBisiceInfo">
|
|
|
+ <a-descriptions size="small" :column="3">
|
|
|
+ <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerNameCurrent?detailData.buyerName?detailData.buyerName==detailData.buyerNameCurrent?detailData.buyerNameCurrent:detailData.buyerNameCurrent+'('+detailData.buyerName+')':detailData.buyerNameCurrent:'--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="客户地址" :span="2">
|
|
|
+ <div v-if="detailData&&(detailData.shippingAddressProvinceName || detailData.shippingAddressCityName || detailData.shippingAddressCountyName || detailData.shippingAddress)">
|
|
|
+ {{ detailData&&detailData.shippingAddressProvinceName || '' }}
|
|
|
+ {{ detailData&&detailData.shippingAddressCityName || '' }}
|
|
|
+ {{ detailData&&detailData.shippingAddressCountyName || '' }}
|
|
|
+ {{ detailData&&detailData.shippingAddress || '' }}
|
|
|
+ </div>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="联系电话">{{ detailData&&detailData.consigneeTel || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="备注">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="销售单号">{{ detailData&&detailData.salesBillNo || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="制单人">{{ detailData&&detailData.operatorName || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="业务员">{{ detailData&&detailData.salesManName || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="来源">{{ detailData&&detailData.sourceTypeDictValue || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="下级采购单号" v-if="detailData&&detailData.sourceType=='PURCHASE'">{{ detailData&&detailData.purchaseBillNo || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="财务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
|
|
|
+ </a-descriptions>
|
|
|
</a-card>
|
|
|
<a-card size="small" :bordered="false" class="pages-wrap">
|
|
|
<!-- alert -->
|
|
|
- <a-alert type="info" style="margin-bottom: 10px;">
|
|
|
- <div style="display: flex;align-items: center;justify-content: space-between;" slot="message">
|
|
|
- <div>
|
|
|
- 总款数:<strong>{{ detailData&&(detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--' }}</strong>;
|
|
|
- 总数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
|
|
|
- 总赠品数量:<strong>{{ detailData&&(detailData.giftQty || detailData.giftQty==0) ? detailData.giftQty : '--' }}</strong>;
|
|
|
- 急件总款数:<strong>{{ detailData&&(detailData.oosCategory || detailData.oosCategory==0) ? detailData.oosCategory : '--' }}</strong>;
|
|
|
- 急件总数量:<strong>{{ detailData&&(detailData.oosQty || detailData.oosQty==0) ? detailData.oosQty : '--' }}</strong>;<br/>
|
|
|
- 总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</strong>;
|
|
|
- <template v-if="showCost">
|
|
|
- 总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;
|
|
|
- 总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</strong>;
|
|
|
- </template>
|
|
|
- 折后总售价:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? toThousands(detailData.discountedAmount) : '--' }}</strong>;
|
|
|
- 折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
|
|
|
- 折扣金额:<strong>{{ detailData&&(detailData.discountAmount || detailData.discountAmount==0) ? toThousands(detailData.discountAmount) : '--' }}</strong>;
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <a-checkbox v-model="showCost" v-if="$hasPermissions('M_ShowAllCost')" id="salesQuery-cost">成本价</a-checkbox>
|
|
|
- </div>
|
|
|
+ <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom:10px;">
|
|
|
+ <div>
|
|
|
+ 总款数:<strong>{{ detailData&&(detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--' }}</strong>;
|
|
|
+ 总数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
|
|
|
+ 总赠品数量:<strong>{{ detailData&&(detailData.giftQty || detailData.giftQty==0) ? detailData.giftQty : '--' }}</strong>;
|
|
|
+ 急件总款数:<strong>{{ detailData&&(detailData.oosCategory || detailData.oosCategory==0) ? detailData.oosCategory : '--' }}</strong>;
|
|
|
+ 急件总数量:<strong>{{ detailData&&(detailData.oosQty || detailData.oosQty==0) ? detailData.oosQty : '--' }}</strong>;<br/>
|
|
|
+ 总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</strong>;
|
|
|
+ <template v-if="showCost">
|
|
|
+ 总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;
|
|
|
+ 总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</strong>;
|
|
|
+ </template>
|
|
|
+ 折后总售价:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? toThousands(detailData.discountedAmount) : '--' }}</strong>;
|
|
|
+ 折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
|
|
|
+ 折扣金额:<strong>{{ detailData&&(detailData.discountAmount || detailData.discountAmount==0) ? toThousands(detailData.discountAmount) : '--' }}</strong>;
|
|
|
</div>
|
|
|
- </a-alert>
|
|
|
+ <div>
|
|
|
+ <a-checkbox v-model="showCost" v-if="$hasPermissions('M_ShowAllCost')" id="salesQuery-cost">成本价</a-checkbox>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
|
class="sTable"
|
|
@@ -129,11 +125,12 @@ import { STable, VSelect } from '@/components'
|
|
|
import { salesDetailBySn, salesDetailPrint, salesDetailExport } from '@/api/sales'
|
|
|
import { salesDetailList } from '@/api/salesDetail'
|
|
|
import outInDetialModal from '@/views/common/outInDetialModal.vue'
|
|
|
-import Print from '@/views/common/print.vue'
|
|
|
+// import Print from '@/views/common/print.vue'
|
|
|
+import PrintPanel from '@/views/common/printPanel.vue'
|
|
|
import { hdPrint } from '@/libs/JGPrint'
|
|
|
export default {
|
|
|
name: 'SalesDetail',
|
|
|
- components: { STable, VSelect, Print, outInDetialModal },
|
|
|
+ components: { STable, VSelect, PrintPanel, outInDetialModal },
|
|
|
mixins: [commonMixin],
|
|
|
props: {
|
|
|
outBizSn: { // 有值则为弹框,无值则为页面
|
|
@@ -180,7 +177,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
localDataSource: [],
|
|
|
- detailData: null // 详情数据
|
|
|
+ detailData: null, // 详情数据
|
|
|
+ isShowBisiceInfo: false// 显示基础内容
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -247,10 +245,10 @@ export default {
|
|
|
this.$router.push({ name: 'salesNewList' })
|
|
|
},
|
|
|
// 编辑
|
|
|
- handleEdit () {
|
|
|
- const row = this.detailData
|
|
|
- this.$router.push({ name: 'salesNewEdit', params: { id: row.id, sn: row.salesBillSn, priceType: row.priceType } })
|
|
|
- },
|
|
|
+ // handleEdit () {
|
|
|
+ // const row = this.detailData
|
|
|
+ // this.$router.push({ name: 'salesNewEdit', params: { id: row.id, sn: row.salesBillSn, priceType: row.priceType } })
|
|
|
+ // },
|
|
|
// 详情
|
|
|
getDetail () {
|
|
|
salesDetailBySn({ salesBillSn: this.outBizSn || this.$route.params.sn }).then(res => {
|
|
@@ -304,10 +302,26 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="less">
|
|
|
+<style lang="less" scoped>
|
|
|
.salesDetail-wrap{
|
|
|
+ .billno{
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 600;
|
|
|
+ display: inline-block;
|
|
|
+ vertical-align: middle;
|
|
|
+ color: #333;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ .ant-tag-green,.ant-tag-orange{
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
.salesDetail-cont{
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
+ .pages-wrap{
|
|
|
+strong{
|
|
|
+ color:#f12929;
|
|
|
+}
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|