|
@@ -25,104 +25,104 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</a-page-header>
|
|
</a-page-header>
|
|
- <div class="sales-detail-body">
|
|
|
|
- <!-- 基础信息 -->
|
|
|
|
- <a-card size="small" :bordered="false" class="salesDetail-cont" v-show="isShowBisiceInfo">
|
|
|
|
- <a-descriptions size="small" :column="3">
|
|
|
|
- <div slot="title">基础信息</div>
|
|
|
|
- <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 -->
|
|
|
|
- <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>
|
|
|
|
- <div>
|
|
|
|
- <a-checkbox v-model="showCost" v-if="$hasPermissions('M_ShowAllCost')" id="salesQuery-cost">成本价</a-checkbox>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <!-- 列表 -->
|
|
|
|
- <s-table
|
|
|
|
- class="sTable"
|
|
|
|
- ref="table"
|
|
|
|
- size="small"
|
|
|
|
- :rowKey="(record) => record.id"
|
|
|
|
- :columns="columns"
|
|
|
|
- :data="loadData"
|
|
|
|
- :defaultLoadData="false"
|
|
|
|
- bordered>
|
|
|
|
- <div slot="costTitle">
|
|
|
|
- <a-tooltip placement="top">
|
|
|
|
- <template slot="title">
|
|
|
|
- 系统中不同批次的产品,成本价可能不同,此值是按照实际出库批次的成本计算得到。
|
|
|
|
|
|
+ <div class="sales-detail-body">
|
|
|
|
+ <!-- 基础信息 -->
|
|
|
|
+ <a-card size="small" :bordered="false" class="salesDetail-cont" v-show="isShowBisiceInfo">
|
|
|
|
+ <a-descriptions size="small" :column="3">
|
|
|
|
+ <div slot="title">基础信息</div>
|
|
|
|
+ <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 -->
|
|
|
|
+ <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>
|
|
</template>
|
|
- <span style="margin-right: 5px;">实际总成本</span> <a-icon type="question-circle" />
|
|
|
|
- </a-tooltip>
|
|
|
|
|
|
+ 折后总售价:<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>
|
|
</div>
|
|
- <!-- 产品编码 -->
|
|
|
|
- <template slot="productCode" slot-scope="text, record">
|
|
|
|
- <div v-if="detailData">
|
|
|
|
- <div v-if="isOwerEdit">
|
|
|
|
- <a-badge count="急" v-if="record.oosFlag == 1">
|
|
|
|
- <div style="padding-right: 15px;">{{ text }}</div>
|
|
|
|
- </a-badge>
|
|
|
|
- <span v-else>{{ text }}</span>
|
|
|
|
- </div>
|
|
|
|
- <div v-else>
|
|
|
|
- <a-badge count="急" v-if="isAudit&&record.oosFlag == 1">
|
|
|
|
- <div style="padding-right: 15px;">{{ text }}</div>
|
|
|
|
- </a-badge>
|
|
|
|
- <a-badge count="缺" v-else-if="!isAudit&&(!record.currentStockQty || record.currentStockQty < record.qty)">
|
|
|
|
- <div style="padding-right: 15px;">{{ text }}</div>
|
|
|
|
- </a-badge>
|
|
|
|
- <span v-else>{{ text }}</span>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <!-- 列表 -->
|
|
|
|
+ <s-table
|
|
|
|
+ class="sTable"
|
|
|
|
+ ref="table"
|
|
|
|
+ size="small"
|
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :data="loadData"
|
|
|
|
+ :defaultLoadData="false"
|
|
|
|
+ bordered>
|
|
|
|
+ <div slot="costTitle">
|
|
|
|
+ <a-tooltip placement="top">
|
|
|
|
+ <template slot="title">
|
|
|
|
+ 系统中不同批次的产品,成本价可能不同,此值是按照实际出库批次的成本计算得到。
|
|
|
|
+ </template>
|
|
|
|
+ <span style="margin-right: 5px;">实际总成本</span> <a-icon type="question-circle" />
|
|
|
|
+ </a-tooltip>
|
|
</div>
|
|
</div>
|
|
- </template>
|
|
|
|
- <!-- 操作 -->
|
|
|
|
- <template slot="action" slot-scope="text, record">
|
|
|
|
- <a-button size="small" type="link" v-if="record.oosFlag == 0" class="button-primary" @click="handleViewDetail(record)">出库明细</a-button>
|
|
|
|
- <span v-else>--</span>
|
|
|
|
- </template>
|
|
|
|
- </s-table>
|
|
|
|
- </a-card>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <!-- 产品编码 -->
|
|
|
|
+ <template slot="productCode" slot-scope="text, record">
|
|
|
|
+ <div v-if="detailData">
|
|
|
|
+ <div v-if="isOwerEdit">
|
|
|
|
+ <a-badge count="急" v-if="record.oosFlag == 1">
|
|
|
|
+ <div style="padding-right: 15px;">{{ text }}</div>
|
|
|
|
+ </a-badge>
|
|
|
|
+ <span v-else>{{ text }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else>
|
|
|
|
+ <a-badge count="急" v-if="isAudit&&record.oosFlag == 1">
|
|
|
|
+ <div style="padding-right: 15px;">{{ text }}</div>
|
|
|
|
+ </a-badge>
|
|
|
|
+ <a-badge count="缺" v-else-if="!isAudit&&(!record.currentStockQty || record.currentStockQty < record.qty)">
|
|
|
|
+ <div style="padding-right: 15px;">{{ text }}</div>
|
|
|
|
+ </a-badge>
|
|
|
|
+ <span v-else>{{ text }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 操作 -->
|
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
|
+ <a-button size="small" type="link" v-if="record.oosFlag == 0" class="button-primary" @click="handleViewDetail(record)">出库明细</a-button>
|
|
|
|
+ <span v-else>--</span>
|
|
|
|
+ </template>
|
|
|
|
+ </s-table>
|
|
|
|
+ </a-card>
|
|
|
|
+ </div>
|
|
</a-spin>
|
|
</a-spin>
|
|
- <!-- 出入库明细 -->
|
|
|
|
- <outInDetialModal ref="outInDetialModal" outBizType="SALES" :openModal="showOutInModal" @close="showOutInModal=false"></outInDetialModal>
|
|
|
|
|
|
+ <!-- 出入库明细 -->
|
|
|
|
+ <outInDetialModal ref="outInDetialModal" outBizType="SALES" :openModal="showOutInModal" @close="showOutInModal=false"></outInDetialModal>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -157,7 +157,7 @@ export default {
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
- return salesDetailList(Object.assign(parameter, { orderBy: "sales_bill_detail.CREATE_DATE desc", salesBillSn: this.outBizSn || this.$route.params.sn })).then(res => {
|
|
|
|
|
|
+ return salesDetailList(Object.assign(parameter, { orderBy: 'sales_bill_detail.CREATE_DATE desc', salesBillSn: this.outBizSn || this.$route.params.sn })).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
@@ -202,7 +202,7 @@ export default {
|
|
const arr = [
|
|
const arr = [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '11%', scopedSlots: { customRender: 'productCode' }, align: 'center' },
|
|
{ title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '11%', scopedSlots: { customRender: 'productCode' }, align: 'center' },
|
|
- { title: '产品名称', dataIndex: 'productName', width: '11%', align: 'center', customRender: function (text) { return text || '--' },ellipsis: true },
|
|
|
|
|
|
+ { title: '产品名称', dataIndex: 'productName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '原厂编码', dataIndex: 'productOrigCode', width: '9%', align: 'center', customRender: function (text) { return text && text != ' ' ? text : '--' } },
|
|
{ title: '原厂编码', dataIndex: 'productOrigCode', width: '9%', align: 'center', customRender: function (text) { return text && text != ' ' ? text : '--' } },
|
|
{ title: '售价', dataIndex: 'price', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '售价', dataIndex: 'price', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '折后售价', dataIndex: 'discountedPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '折后售价', dataIndex: 'discountedPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
@@ -236,7 +236,7 @@ export default {
|
|
// 打印预览/快捷打印
|
|
// 打印预览/快捷打印
|
|
handlePrint (type, printerType) {
|
|
handlePrint (type, printerType) {
|
|
const _this = this
|
|
const _this = this
|
|
- _this.$store.state.app.printLoading = true
|
|
|
|
|
|
+ _this.spinning = true
|
|
let url = salesDetailPrint
|
|
let url = salesDetailPrint
|
|
const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0 }
|
|
const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0 }
|
|
if (type == 'export') { // 导出
|
|
if (type == 'export') { // 导出
|
|
@@ -244,7 +244,7 @@ export default {
|
|
}
|
|
}
|
|
// 打印或导出
|
|
// 打印或导出
|
|
hdPrint(printerType, type, url, params, '销售单', function () {
|
|
hdPrint(printerType, type, url, params, '销售单', function () {
|
|
- _this.$store.state.app.printLoading = false
|
|
|
|
|
|
+ _this.spinning = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 返回
|
|
// 返回
|
|
@@ -335,6 +335,6 @@ export default {
|
|
color:#f12929;
|
|
color:#f12929;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|