|
@@ -17,7 +17,7 @@
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
<template slot="extra" v-if="$hasPermissions('B_salesPrint')">
|
|
<template slot="extra" v-if="$hasPermissions('B_salesPrint')">
|
|
<div style="margin-top: 5px;">
|
|
<div style="margin-top: 5px;">
|
|
- <PrintPanel :disabled="dataSource.length==0" @handlePrint="handlePrint">
|
|
|
|
|
|
+ <PrintPanel ref="printBox" :disabled="dataSource.length==0" @handlePrint="handlePrint">
|
|
<div style="padding:10px;" slot="extendCons">
|
|
<div style="padding:10px;" slot="extendCons">
|
|
<a-checkbox v-model="printAllName" :checked="printAllName" id="salesQuery-printAllName">打印完整产品名称</a-checkbox>
|
|
<a-checkbox v-model="printAllName" :checked="printAllName" id="salesQuery-printAllName">打印完整产品名称</a-checkbox>
|
|
<a-checkbox v-model="printOrgCode" :checked="printOrgCode" id="salesQuery-printOrgCode">打印原厂编码</a-checkbox>
|
|
<a-checkbox v-model="printOrgCode" :checked="printOrgCode" id="salesQuery-printOrgCode">打印原厂编码</a-checkbox>
|
|
@@ -62,59 +62,53 @@
|
|
<div class="choosed-table" v-if="detailData&&detailData.totalCategory">
|
|
<div class="choosed-table" v-if="detailData&&detailData.totalCategory">
|
|
<!-- 搜索条件 -->
|
|
<!-- 搜索条件 -->
|
|
<div class="table-page-search-wrapper" style="margin-bottom:0;" v-if="showSearch">
|
|
<div class="table-page-search-wrapper" style="margin-bottom:0;" v-if="showSearch">
|
|
- <a-row :gutter="0">
|
|
|
|
- <a-col :lg="24" :xl="14">
|
|
|
|
- <a-form-model :model="productForm" ref="ruleForm" layout="inline" @keyup.enter.native="$refs.table.refresh(true)" >
|
|
|
|
- <a-row :gutter="10">
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-model-item label="产品编码">
|
|
|
|
- <a-input v-model.trim="productForm.productCode" allowClear placeholder="输入产品编码" />
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-model-item label="产品名称">
|
|
|
|
- <a-input v-model.trim="productForm.productName" allowClear placeholder="输入产品名称" />
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="是否有急件">
|
|
|
|
- <a-select allowClear v-model="productForm.oosFlag" placeholder="请选择是否">
|
|
|
|
- <a-select-option value="1">
|
|
|
|
- 是
|
|
|
|
- </a-select-option>
|
|
|
|
- <a-select-option value="0">
|
|
|
|
- 否
|
|
|
|
- </a-select-option>
|
|
|
|
- </a-select>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 5px" @click="resetForm" id="salesEdit-reset">重置</a-button>
|
|
|
|
- </a-col>
|
|
|
|
- </a-row>
|
|
|
|
- </a-form-model>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :lg="24" :xl="10">
|
|
|
|
- <div style="display:flex;align-items:center;padding: 6px 0;justify-content: flex-end;width:100%;">
|
|
|
|
- <div>
|
|
|
|
- 折扣金额:
|
|
|
|
- <a-input-number
|
|
|
|
- id="discount"
|
|
|
|
- size="small"
|
|
|
|
- v-model.trim="detailData.discountAmount"
|
|
|
|
- :min="0"
|
|
|
|
- :precision="2"
|
|
|
|
- :max="999999"/>
|
|
|
|
- <a-button size="small" type="primary" class="button-primary" @click="salesDiscount">打折</a-button>
|
|
|
|
- </div>
|
|
|
|
- <div style="padding:0 10px;">
|
|
|
|
- 折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
|
|
|
|
- 折后总售价:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? toThousands(detailData.discountedAmount) : '--' }}</strong>;
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </a-col>
|
|
|
|
- </a-row>
|
|
|
|
|
|
+ <a-form-model :model="productForm" ref="ruleForm" layout="inline" @keyup.enter.native="$refs.table.refresh(true)" >
|
|
|
|
+ <a-row :gutter="10">
|
|
|
|
+ <a-col :md="5" :sm="24">
|
|
|
|
+ <a-form-model-item label="产品编码">
|
|
|
|
+ <a-input v-model.trim="productForm.productCode" allowClear placeholder="输入产品编码" />
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="5" :sm="24">
|
|
|
|
+ <a-form-model-item label="产品名称">
|
|
|
|
+ <a-input v-model.trim="productForm.productName" allowClear placeholder="输入产品名称" />
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
|
+ <a-form-item label="是否有急件">
|
|
|
|
+ <a-select allowClear v-model="productForm.oosFlag" placeholder="请选择是否">
|
|
|
|
+ <a-select-option value="1">
|
|
|
|
+ 是
|
|
|
|
+ </a-select-option>
|
|
|
|
+ <a-select-option value="0">
|
|
|
|
+ 否
|
|
|
|
+ </a-select-option>
|
|
|
|
+ </a-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 5px" @click="resetForm" id="salesEdit-reset">重置</a-button>
|
|
|
|
+ </a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ </a-form-model>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="discount-box">
|
|
|
|
+ <div>
|
|
|
|
+ 折扣金额:
|
|
|
|
+ <a-input-number
|
|
|
|
+ id="discount"
|
|
|
|
+ size="small"
|
|
|
|
+ v-model.trim="detailData.discountAmount"
|
|
|
|
+ :min="0"
|
|
|
|
+ :precision="2"
|
|
|
|
+ :max="999999"/>
|
|
|
|
+ <a-button size="small" type="primary" class="button-primary" @click="salesDiscount">打折</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="padding:0 10px;">
|
|
|
|
+ 折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
|
|
|
|
+ 折后总售价:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? toThousands(detailData.discountedAmount) : '--' }}</strong>;
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<!-- 已选配件列表 -->
|
|
<!-- 已选配件列表 -->
|
|
<s-table
|
|
<s-table
|
|
@@ -211,7 +205,7 @@
|
|
</s-table>
|
|
</s-table>
|
|
</div>
|
|
</div>
|
|
<div class="choosed-table" v-else>
|
|
<div class="choosed-table" v-else>
|
|
- <div v-if="!spinning&&dataSource.length==0">
|
|
|
|
|
|
+ <div v-if="!spinning&&detailData.totalCategory==0">
|
|
<a-empty
|
|
<a-empty
|
|
:image="simpleImage"
|
|
:image="simpleImage"
|
|
:image-style="{
|
|
:image-style="{
|
|
@@ -232,45 +226,57 @@
|
|
<!-- 总计 -->
|
|
<!-- 总计 -->
|
|
<div v-if="detailData" class="total-bar">
|
|
<div v-if="detailData" class="total-bar">
|
|
<div>
|
|
<div>
|
|
- 总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</strong>;
|
|
|
|
- 总款数:<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>;
|
|
|
|
- <span v-if="isCosts">
|
|
|
|
- 总成本价:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;
|
|
|
|
- 毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</strong>;
|
|
|
|
- </span>
|
|
|
|
|
|
+ <div style="display: inline-block;">
|
|
|
|
+ <span>共计{{ detailData&&(detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--' }}款</span>
|
|
|
|
+ <span>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}件产品,</span>
|
|
|
|
+ 赠品总数量:<span class="red">{{ detailData&&(detailData.giftQty || detailData.giftQty==0) ? detailData.giftQty : '--' }}</span>,
|
|
|
|
+ <template v-if="isCosts">
|
|
|
|
+ 总成本价:<span class="red">{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</span>,
|
|
|
|
+ 毛利:<span class="red">{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</span>,
|
|
|
|
+ </template>
|
|
|
|
+ 总售价:<span class="red">{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</span>;
|
|
|
|
+ </div>
|
|
|
|
+ <div class="totalPrice" style="display: inline-block;">
|
|
|
|
+ 折后合计:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? toThousands(detailData.discountedAmount) : '--' }}</strong>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
-
|
|
|
|
|
|
+ <a-checkbox :value="0" :checked="tbForm.indexOf('AUDIT')>=0" @change="(e)=>{tbFormChange(e,0)}" id="salesQuery-tbsh">同步审核</a-checkbox>
|
|
|
|
+ <a-checkbox :value="1" :checked="tbForm.indexOf('STOCK_OUT')>=0" @change="(e)=>{tbFormChange(e,1)}" id="salesQuery-tbck">同步出库</a-checkbox>
|
|
|
|
+ <a-checkbox :value="2" :checked="tbForm.indexOf('SETTLE')>=0" @change="(e)=>{tbFormChange(e,2)}" id="salesQuery-tbsk">同步收款</a-checkbox>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
- <a-checkbox :value="0" :checked="tbForm.indexOf('AUDIT')>=0" @change="(e)=>{tbFormChange(e,0)}" id="salesQuery-tbsh">同步审核</a-checkbox>
|
|
|
|
- <a-checkbox :value="1" :checked="tbForm.indexOf('STOCK_OUT')>=0" @change="(e)=>{tbFormChange(e,1)}" id="salesQuery-tbck">同步出库</a-checkbox>
|
|
|
|
- <a-checkbox :value="2" :checked="tbForm.indexOf('SETTLE')>=0" @change="(e)=>{tbFormChange(e,2)}" id="salesQuery-tbsk">同步收款</a-checkbox>
|
|
|
|
<a-button
|
|
<a-button
|
|
- style="padding: 0 25px;"
|
|
|
|
type="primary"
|
|
type="primary"
|
|
- :disabled="spinning"
|
|
|
|
|
|
+ id="salesEdit-handleSubmit"
|
|
|
|
+ size="large"
|
|
class="button-primary"
|
|
class="button-primary"
|
|
|
|
+ :loading="spinning"
|
|
@click="enableFundAccount && tbForm.length == 3 ? handleSettleAcountPay(null,0) : handleSubmit({})"
|
|
@click="enableFundAccount && tbForm.length == 3 ? handleSettleAcountPay(null,0) : handleSubmit({})"
|
|
- id="productInfoList-handleSubmit">提交</a-button>
|
|
|
|
|
|
+ style="padding: 0 60px;">提交</a-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 选择客户弹框 -->
|
|
<!-- 选择客户弹框 -->
|
|
<choose-custom-modal ref="custModal" :show="openModal" @updateData="updateData" @cancel="openModal=false" />
|
|
<choose-custom-modal ref="custModal" :show="openModal" @updateData="updateData" @cancel="openModal=false" />
|
|
<!-- 导入产品 -->
|
|
<!-- 导入产品 -->
|
|
- <importGuideModal :openModal="openGuideModal" :params="{salesBillSn: $route.params.sn, salesBillNo:detailData?detailData.salesBillNo:''}" @close="openGuideModal=false" @ok="hanldeImprotOk" />
|
|
|
|
|
|
+ <importGuideModal
|
|
|
|
+ :openModal="openGuideModal"
|
|
|
|
+ :params="{salesBillSn: $route.params.sn, salesBillNo:detailData?detailData.salesBillNo:''}"
|
|
|
|
+ @close="openGuideModal=false"
|
|
|
|
+ @ok="hanldeImprotOk"></importGuideModal>
|
|
<!-- 收付款弹框 -->
|
|
<!-- 收付款弹框 -->
|
|
<settleModal ref="settleModal" @ok="settleAcountPay" :openModal="openSettleModal" @close="openSettleModal=false"></settleModal>
|
|
<settleModal ref="settleModal" @ok="settleAcountPay" :openModal="openSettleModal" @close="openSettleModal=false"></settleModal>
|
|
<!-- 出库明细 -->
|
|
<!-- 出库明细 -->
|
|
<outInDetialModal ref="outInDetialModal" outBizType="SALES" :openModal="showOutInModal" @close="showOutInModal=false"></outInDetialModal>
|
|
<outInDetialModal ref="outInDetialModal" outBizType="SALES" :openModal="showOutInModal" @close="showOutInModal=false"></outInDetialModal>
|
|
|
|
+ <!-- 销售记录 -->
|
|
|
|
+ <product-salesRecord-modal ref="salseRecord" :openModal="openSalesRecordModal" @close="openSalesRecordModal=false" />
|
|
<!-- 添加产品 -->
|
|
<!-- 添加产品 -->
|
|
<chooseProductModal
|
|
<chooseProductModal
|
|
ref="partQuery"
|
|
ref="partQuery"
|
|
:showModal="openChooseProduct"
|
|
:showModal="openChooseProduct"
|
|
|
|
+ @viewRecord="hanldSalesRecord"
|
|
@close="openChooseProduct=false"
|
|
@close="openChooseProduct=false"
|
|
@add="insterProduct"
|
|
@add="insterProduct"
|
|
></chooseProductModal>
|
|
></chooseProductModal>
|
|
@@ -294,6 +300,7 @@ import chooseProductModal from './chooseProductModal.vue'
|
|
import chooseCustomModal from './chooseCustomModal.vue'
|
|
import chooseCustomModal from './chooseCustomModal.vue'
|
|
import importGuideModal from './importGuideModal.vue'
|
|
import importGuideModal from './importGuideModal.vue'
|
|
import settleModal from '@/views/financialManagement/settleModal/settleModal.vue'
|
|
import settleModal from '@/views/financialManagement/settleModal/settleModal.vue'
|
|
|
|
+import productSalesRecordModal from './productSalesRecordModal.vue'
|
|
import { stockByProductSn } from '@/api/stock'
|
|
import { stockByProductSn } from '@/api/stock'
|
|
import { queryByCustomerSn } from '@/api/shelf'
|
|
import { queryByCustomerSn } from '@/api/shelf'
|
|
import { salesDetail, salesWriteSubmit, salesWriteDiscount, salesDetailPrint, salesDetailExport, salesDel } from '@/api/sales'
|
|
import { salesDetail, salesWriteSubmit, salesWriteDiscount, salesDetailPrint, salesDetailExport, salesDel } from '@/api/sales'
|
|
@@ -304,7 +311,7 @@ import PrintPanel from '@/views/common/printPanel.vue'
|
|
import { hdPrint } from '@/libs/JGPrint'
|
|
import { hdPrint } from '@/libs/JGPrint'
|
|
export default {
|
|
export default {
|
|
name: 'SalesEdit',
|
|
name: 'SalesEdit',
|
|
- components: { STable, VSelect, chooseProductModal, chooseCustomModal, PrintPanel, importGuideModal, settleModal, outInDetialModal, chooseShelfProduct },
|
|
|
|
|
|
+ components: { STable, VSelect, chooseProductModal, chooseCustomModal, PrintPanel, importGuideModal, settleModal, outInDetialModal, chooseShelfProduct, productSalesRecordModal },
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -321,6 +328,7 @@ export default {
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
isInster: false, // 是否正在添加产品
|
|
isInster: false, // 是否正在添加产品
|
|
openModal: false, // 客户弹框
|
|
openModal: false, // 客户弹框
|
|
|
|
+ openSalesRecordModal: false, // 销售记录
|
|
openGuideModal: false, // 导入产品弹框
|
|
openGuideModal: false, // 导入产品弹框
|
|
openSettleModal: false, // 打开收款弹框
|
|
openSettleModal: false, // 打开收款弹框
|
|
enableFundAccount: false, // 是否开启资金账户管理
|
|
enableFundAccount: false, // 是否开启资金账户管理
|
|
@@ -342,7 +350,7 @@ export default {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
this.productForm.salesBillSn = this.$route.params.sn
|
|
this.productForm.salesBillSn = this.$route.params.sn
|
|
-
|
|
|
|
|
|
+ console.log(111)
|
|
return salesDetailList(Object.assign(parameter, this.productForm)).then(res => {
|
|
return salesDetailList(Object.assign(parameter, this.productForm)).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@@ -389,7 +397,7 @@ export default {
|
|
{ title: '单位', dataIndex: 'dealerProductEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'dealerProductEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '售价小计', dataIndex: 'totalAmount', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '售价小计', dataIndex: 'totalAmount', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '折后小计', dataIndex: 'discountedAmount', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '折后小计', dataIndex: 'discountedAmount', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
|
|
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
]
|
|
]
|
|
// 下级创建,不显示仓库仓位
|
|
// 下级创建,不显示仓库仓位
|
|
if (!this.isOwerEdit) {
|
|
if (!this.isOwerEdit) {
|
|
@@ -424,7 +432,7 @@ export default {
|
|
// 打印预览/快捷打印
|
|
// 打印预览/快捷打印
|
|
handlePrint (type, printerType) {
|
|
handlePrint (type, printerType) {
|
|
const _this = this
|
|
const _this = this
|
|
- _this.spinning = true
|
|
|
|
|
|
+ _this.$store.state.app.printLoading = 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') { // 导出
|
|
@@ -432,7 +440,8 @@ export default {
|
|
}
|
|
}
|
|
// 打印或导出
|
|
// 打印或导出
|
|
hdPrint(printerType, type, url, params, '销售单', function () {
|
|
hdPrint(printerType, type, url, params, '销售单', function () {
|
|
- _this.spinning = false
|
|
|
|
|
|
+ _this.$store.state.app.printLoading = false
|
|
|
|
+ _this.$refs.printBox.hovered = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
tbFormChange (e, val) {
|
|
tbFormChange (e, val) {
|
|
@@ -451,6 +460,12 @@ export default {
|
|
this.openModal = true
|
|
this.openModal = true
|
|
this.$refs.custModal.editCust(this.detailData)
|
|
this.$refs.custModal.editCust(this.detailData)
|
|
},
|
|
},
|
|
|
|
+ // 查看销售记录
|
|
|
|
+ hanldSalesRecord(row){
|
|
|
|
+ console.log(row)
|
|
|
|
+ this.openSalesRecordModal = true
|
|
|
|
+ this.$refs.salseRecord.getDetail(this.detailData.buyerSn, row.productSn, row)
|
|
|
|
+ },
|
|
// 更新产品列表
|
|
// 更新产品列表
|
|
updateData (priceType) {
|
|
updateData (priceType) {
|
|
// 价格类型变更
|
|
// 价格类型变更
|
|
@@ -556,7 +571,9 @@ export default {
|
|
oosFlag:undefined,
|
|
oosFlag:undefined,
|
|
orderBy: 'sales_bill_detail.CREATE_DATE desc'
|
|
orderBy: 'sales_bill_detail.CREATE_DATE desc'
|
|
}
|
|
}
|
|
- this.$refs.table.refresh()
|
|
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ this.$refs.table.refresh()
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 返回
|
|
// 返回
|
|
handleBack () {
|
|
handleBack () {
|
|
@@ -710,7 +727,7 @@ export default {
|
|
stockSn: row.stockSn
|
|
stockSn: row.stockSn
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- this.resetForm()
|
|
|
|
|
|
+ this.getOrderDetail(true)
|
|
if (this.showShelfModal) {
|
|
if (this.showShelfModal) {
|
|
this.$refs.chooseShelfProduct.reload()
|
|
this.$refs.chooseShelfProduct.reload()
|
|
}
|
|
}
|
|
@@ -747,7 +764,7 @@ export default {
|
|
this.$message.loading('正在批量添加产品...', 1)
|
|
this.$message.loading('正在批量添加产品...', 1)
|
|
salesDetailInsertBatch(params).then(res => {
|
|
salesDetailInsertBatch(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- this.resetForm()
|
|
|
|
|
|
+ this.getOrderDetail(true)
|
|
if (this.showShelfModal) {
|
|
if (this.showShelfModal) {
|
|
this.$refs.chooseShelfProduct.reload()
|
|
this.$refs.chooseShelfProduct.reload()
|
|
}
|
|
}
|
|
@@ -756,12 +773,12 @@ export default {
|
|
},
|
|
},
|
|
// 销售单详情
|
|
// 销售单详情
|
|
getOrderDetail (flag,resetTable) {
|
|
getOrderDetail (flag,resetTable) {
|
|
- this.spinning = true
|
|
|
|
- salesDetail({ id: this.$route.params.id }).then(res => {
|
|
|
|
|
|
+ const vm = this
|
|
|
|
+ vm.spinning = true
|
|
|
|
+ salesDetail({ id: vm.$route.params.id }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- this.detailData = res.data
|
|
|
|
|
|
+ vm.detailData = res.data
|
|
if (flag) {
|
|
if (flag) {
|
|
- const vm = this
|
|
|
|
const buyerSn = (vm.detailData && vm.detailData.buyerSn && vm.detailData.sourceType && vm.detailData.sourceType == 'PURCHASE') ? '' : vm.detailData.buyerSn
|
|
const buyerSn = (vm.detailData && vm.detailData.buyerSn && vm.detailData.sourceType && vm.detailData.sourceType == 'PURCHASE') ? '' : vm.detailData.buyerSn
|
|
const priceType = vm.$route.params.priceType
|
|
const priceType = vm.$route.params.priceType
|
|
vm.$refs.partQuery.pageInit(buyerSn, priceType, vm.salesBillSn)
|
|
vm.$refs.partQuery.pageInit(buyerSn, priceType, vm.salesBillSn)
|
|
@@ -769,16 +786,18 @@ export default {
|
|
vm.$nextTick(()=>{
|
|
vm.$nextTick(()=>{
|
|
vm.$refs.table.refresh(true)
|
|
vm.$refs.table.refresh(true)
|
|
})
|
|
})
|
|
|
|
+ }else{
|
|
|
|
+ vm.spinning = false
|
|
}
|
|
}
|
|
// 查询关联的客户货架信息
|
|
// 查询关联的客户货架信息
|
|
if (vm.detailData && vm.detailData.buyerSn) {
|
|
if (vm.detailData && vm.detailData.buyerSn) {
|
|
- this.getShelfQueryByCustomer()
|
|
|
|
|
|
+ vm.getShelfQueryByCustomer()
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
if(resetTable){
|
|
if(resetTable){
|
|
- this.$refs.table.refresh()
|
|
|
|
|
|
+ vm.$refs.table.refresh()
|
|
}else{
|
|
}else{
|
|
- this.spinning = false
|
|
|
|
|
|
+ vm.spinning = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -803,7 +822,7 @@ export default {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.handleBack()
|
|
this.handleBack()
|
|
this.$message.success(res.message)
|
|
this.$message.success(res.message)
|
|
- // this.spinning = false
|
|
|
|
|
|
+ this.spinning = false
|
|
} else {
|
|
} else {
|
|
this.spinning = false
|
|
this.spinning = false
|
|
}
|
|
}
|
|
@@ -845,7 +864,7 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
setTableH () {
|
|
setTableH () {
|
|
- this.tableHeight = window.innerHeight - (this.showSearch ? 42 : 0) - 280
|
|
|
|
|
|
+ this.tableHeight = window.innerHeight - (this.showSearch ? 42 : 0) - 330
|
|
},
|
|
},
|
|
pageInit () {
|
|
pageInit () {
|
|
const vm = this
|
|
const vm = this
|
|
@@ -917,22 +936,36 @@ export default {
|
|
color: #f5452e;
|
|
color: #f5452e;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .discount-box{
|
|
|
|
+ display:flex;
|
|
|
|
+ align-items:center;
|
|
|
|
+ padding: 0 0 6px 0;
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
+ width:100%;
|
|
|
|
+ strong{
|
|
|
|
+ color: #f5452e;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.total-bar{
|
|
.total-bar{
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: space-between;
|
|
|
|
> div{
|
|
> div{
|
|
|
|
+ &:first-child{
|
|
|
|
+ span{
|
|
|
|
+ color: #666;
|
|
|
|
+ }
|
|
|
|
+ .red{
|
|
|
|
+ color: #f5452e;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
&:last-child{
|
|
&:last-child{
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- justify-content: space-between;
|
|
|
|
|
|
+ justify-content: flex-end;
|
|
> div{
|
|
> div{
|
|
padding: 0 10px;
|
|
padding: 0 10px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|