|
@@ -20,16 +20,16 @@
|
|
|
<!-- 基础信息 -->
|
|
|
<div style="padding:10px;" v-if="isShowBisiceInfo">
|
|
|
<a-descriptions title="基础信息" size="small">
|
|
|
- <a-descriptions-item label="供应商:">
|
|
|
+ <a-descriptions-item label="供应商">
|
|
|
{{ detail&&detail.purchaseTargetName || '--' }}
|
|
|
</a-descriptions-item>
|
|
|
- <a-descriptions-item label="支付方式:">
|
|
|
+ <a-descriptions-item label="支付方式">
|
|
|
{{ detail&&detail.settleStyleSnDictValue || '--' }}
|
|
|
</a-descriptions-item>
|
|
|
- <a-descriptions-item label="收货人:">
|
|
|
+ <a-descriptions-item label="收货人">
|
|
|
{{ detail&&detail.consigneeName || '--' }}({{ detail&&detail.consigneeTel || '--' }})
|
|
|
</a-descriptions-item>
|
|
|
- <a-descriptions-item label="收货地址:" span="3">
|
|
|
+ <a-descriptions-item label="收货地址" span="3">
|
|
|
<div v-if="detail&&(detail.shippingAddressProvinceName || detail.shippingAddressCityName || detail.shippingAddressCountyName || detail.shippingAddress)">
|
|
|
{{ detail&&detail.shippingAddressProvinceName || '' }}
|
|
|
{{ detail&&detail.shippingAddressCityName || '' }}
|
|
@@ -53,7 +53,7 @@
|
|
|
<!-- 上次缺货 -->
|
|
|
<outStockModal :openModal="openOutStockModal" :paramsData="paramsData" @close="openOutStockModal=false" @ok="hanldeOkOutStock" />
|
|
|
<!-- 购物车 -->
|
|
|
- <shopingCatModal :showModal="openShopCatModal" :paramsData="paramsData" @close="openShopCatModal=false"></shopingCatModal>
|
|
|
+ <shopingCatModal :showModal="openShopCatModal" :paramsData="paramsData" @close="openShopCatModal=false" @ok="getOrderDetail(false, true)"></shopingCatModal>
|
|
|
<!-- 已选产品 -->
|
|
|
<div>
|
|
|
<div class="chooseBox-title">
|
|
@@ -65,7 +65,7 @@
|
|
|
<a-button v-if="detail&&detail.totalCategory" id="purchaseNewOrderEdit-add-btn" type="danger" @click="openChooseProduct=true"><a-icon type="plus-circle" />添加产品</a-button>
|
|
|
<a-button id="purchaseNewOrderEdit-import-btn" type="danger" ghost @click="openGuideModal=true"><a-icon type="import" />产品导入</a-button>
|
|
|
<a-button id="purchaseNewOrderEdit-outStock-btn" type="danger" ghost @click="handleOutStock"><a-icon type="funnel-plot" />上次缺货</a-button>
|
|
|
- <a-button id="purchaseNewOrderEdit-cart-btn" type="danger" ghost @click="hanldCart"><a-icon type="shopping" />购物车</a-button>
|
|
|
+ <a-button id="purchaseNewOrderEdit-cart-btn" v-if="$hasPermissions('M_shoppingCart')" type="danger" ghost @click="hanldCart"><a-icon type="shopping" />购物车</a-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="choosed-table" v-if="detail&&detail.totalCategory">
|
|
@@ -187,7 +187,6 @@ import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import ImportGuideModal from './importGuideModal.vue'
|
|
|
import outStockModal from './outStockModal.vue'
|
|
|
-const shopingCatModal = () => import(/* webpackChunkName: "shopingCatModal" */ '@/views/common/shopingCatModal.vue');
|
|
|
import chooseAddressModal from '@/views/common/receivingAddress/chooseAddressModal.vue'
|
|
|
import { purchaseDetailBySn, purchaseWriteSubmit, purchaseDetailPrint, purchaseDetailExport, purchaseDetailAddress } from '@/api/purchase'
|
|
|
import { purchaseDetailList, purchaseDetailSave, purchaseDetailDel, purchaseDetailCount, purchaseDetailCancelList } from '@/api/purchaseDetail'
|
|
@@ -196,6 +195,7 @@ import chooseProductModal from './chooseProductModal.vue'
|
|
|
// 打印
|
|
|
import Print from '@/views/common/print.vue'
|
|
|
import { hdPrint } from '@/libs/JGPrint'
|
|
|
+const shopingCatModal = () => import(/* webpackChunkName: "shopingCatModal" */ '@/views/common/shopingCatModal.vue')
|
|
|
export default {
|
|
|
name: 'PurchaseEdit',
|
|
|
components: { STable, VSelect, ImportGuideModal, outStockModal, Print, chooseAddressModal, chooseProductModal, shopingCatModal },
|
|
@@ -275,13 +275,13 @@ export default {
|
|
|
if (res.status == 200) {
|
|
|
this.detail = res.data
|
|
|
if (!noRefashTable) {
|
|
|
- if(this.detail.totalCategory){
|
|
|
+ if (this.detail.totalCategory) {
|
|
|
if (isReset) {
|
|
|
this.resetPurchaseForm()
|
|
|
} else {
|
|
|
this.$refs.purchaseTable.refresh(!!flag)
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.localDataSource = []
|
|
|
this.spinning = false
|
|
|
}
|
|
@@ -356,8 +356,12 @@ export default {
|
|
|
this.addLoading = true
|
|
|
purchaseDetailSave(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
- this.getOrderDetail(false, true, true)
|
|
|
+ if (type == 0) {
|
|
|
+ this.getOrderDetail(false, true, true)
|
|
|
+ }
|
|
|
this.$message.success(res.message)
|
|
|
+ } else {
|
|
|
+ row.qty = row.qtyBackups
|
|
|
}
|
|
|
this.addLoading = false
|
|
|
this.$refs.chooseProduct.spinning = false
|
|
@@ -386,11 +390,12 @@ export default {
|
|
|
this.getOrderDetail(false, true, true)
|
|
|
},
|
|
|
// 打开购物车
|
|
|
- hanldCart(){
|
|
|
+ hanldCart () {
|
|
|
this.paramsData = {
|
|
|
- purchaseBillSn: this.$route.params.sn
|
|
|
+ purchaseBillSn: this.$route.params.sn,
|
|
|
+ purchaseBillNo: this.detail && this.detail.purchaseBillNo ? this.detail.purchaseBillNo : undefined
|
|
|
}
|
|
|
- this.openShopCatModal=true
|
|
|
+ this.openShopCatModal = true
|
|
|
},
|
|
|
// 上次缺货
|
|
|
handleOutStock () {
|
|
@@ -432,7 +437,7 @@ export default {
|
|
|
// 打印预览/快捷打印
|
|
|
handlePrint (type, printerType) {
|
|
|
const _this = this
|
|
|
- if(type == 'preview'){
|
|
|
+ if (type == 'preview') {
|
|
|
_this.openChooseProduct = false
|
|
|
_this.openOutStockModal = false
|
|
|
}
|
|
@@ -453,7 +458,7 @@ export default {
|
|
|
this.$router.push({ name: 'purchaseOrderNewList' })
|
|
|
},
|
|
|
setTableH () {
|
|
|
- this.tableHeight = window.innerHeight - 310
|
|
|
+ this.tableHeight = window.innerHeight - (this.isShowBisiceInfo ? 440 : 310)
|
|
|
},
|
|
|
pageInit () {
|
|
|
this.$nextTick(() => {
|
|
@@ -462,6 +467,11 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ isShowBisiceInfo (newValue, oldValue) {
|
|
|
+ this.setTableH()
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted () {
|
|
|
this.showPage = true
|
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|