|
@@ -187,7 +187,6 @@ import { commonMixin } from '@/utils/mixin'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import ImportGuideModal from './importGuideModal.vue'
|
|
import ImportGuideModal from './importGuideModal.vue'
|
|
import outStockModal from './outStockModal.vue'
|
|
import outStockModal from './outStockModal.vue'
|
|
-const shopingCatModal = () => import(/* webpackChunkName: "shopingCatModal" */ '@/views/common/shopingCatModal.vue');
|
|
|
|
import chooseAddressModal from '@/views/common/receivingAddress/chooseAddressModal.vue'
|
|
import chooseAddressModal from '@/views/common/receivingAddress/chooseAddressModal.vue'
|
|
import { purchaseDetailBySn, purchaseWriteSubmit, purchaseDetailPrint, purchaseDetailExport, purchaseDetailAddress } from '@/api/purchase'
|
|
import { purchaseDetailBySn, purchaseWriteSubmit, purchaseDetailPrint, purchaseDetailExport, purchaseDetailAddress } from '@/api/purchase'
|
|
import { purchaseDetailList, purchaseDetailSave, purchaseDetailDel, purchaseDetailCount, purchaseDetailCancelList } from '@/api/purchaseDetail'
|
|
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 Print from '@/views/common/print.vue'
|
|
import { hdPrint } from '@/libs/JGPrint'
|
|
import { hdPrint } from '@/libs/JGPrint'
|
|
|
|
+const shopingCatModal = () => import(/* webpackChunkName: "shopingCatModal" */ '@/views/common/shopingCatModal.vue')
|
|
export default {
|
|
export default {
|
|
name: 'PurchaseEdit',
|
|
name: 'PurchaseEdit',
|
|
components: { STable, VSelect, ImportGuideModal, outStockModal, Print, chooseAddressModal, chooseProductModal, shopingCatModal },
|
|
components: { STable, VSelect, ImportGuideModal, outStockModal, Print, chooseAddressModal, chooseProductModal, shopingCatModal },
|
|
@@ -275,13 +275,13 @@ export default {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.detail = res.data
|
|
this.detail = res.data
|
|
if (!noRefashTable) {
|
|
if (!noRefashTable) {
|
|
- if(this.detail.totalCategory){
|
|
|
|
|
|
+ if (this.detail.totalCategory) {
|
|
if (isReset) {
|
|
if (isReset) {
|
|
this.resetPurchaseForm()
|
|
this.resetPurchaseForm()
|
|
} else {
|
|
} else {
|
|
this.$refs.purchaseTable.refresh(!!flag)
|
|
this.$refs.purchaseTable.refresh(!!flag)
|
|
}
|
|
}
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
this.localDataSource = []
|
|
this.localDataSource = []
|
|
this.spinning = false
|
|
this.spinning = false
|
|
}
|
|
}
|
|
@@ -356,8 +356,12 @@ export default {
|
|
this.addLoading = true
|
|
this.addLoading = true
|
|
purchaseDetailSave(params).then(res => {
|
|
purchaseDetailSave(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- this.getOrderDetail(false, true, true)
|
|
|
|
|
|
+ if (type == 0) {
|
|
|
|
+ this.getOrderDetail(false, true, true)
|
|
|
|
+ }
|
|
this.$message.success(res.message)
|
|
this.$message.success(res.message)
|
|
|
|
+ } else {
|
|
|
|
+ row.qty = row.qtyBackups
|
|
}
|
|
}
|
|
this.addLoading = false
|
|
this.addLoading = false
|
|
this.$refs.chooseProduct.spinning = false
|
|
this.$refs.chooseProduct.spinning = false
|
|
@@ -386,12 +390,12 @@ export default {
|
|
this.getOrderDetail(false, true, true)
|
|
this.getOrderDetail(false, true, true)
|
|
},
|
|
},
|
|
// 打开购物车
|
|
// 打开购物车
|
|
- hanldCart(){
|
|
|
|
|
|
+ hanldCart () {
|
|
this.paramsData = {
|
|
this.paramsData = {
|
|
purchaseBillSn: this.$route.params.sn,
|
|
purchaseBillSn: this.$route.params.sn,
|
|
purchaseBillNo: this.detail && this.detail.purchaseBillNo ? this.detail.purchaseBillNo : undefined
|
|
purchaseBillNo: this.detail && this.detail.purchaseBillNo ? this.detail.purchaseBillNo : undefined
|
|
}
|
|
}
|
|
- this.openShopCatModal=true
|
|
|
|
|
|
+ this.openShopCatModal = true
|
|
},
|
|
},
|
|
// 上次缺货
|
|
// 上次缺货
|
|
handleOutStock () {
|
|
handleOutStock () {
|
|
@@ -433,7 +437,7 @@ export default {
|
|
// 打印预览/快捷打印
|
|
// 打印预览/快捷打印
|
|
handlePrint (type, printerType) {
|
|
handlePrint (type, printerType) {
|
|
const _this = this
|
|
const _this = this
|
|
- if(type == 'preview'){
|
|
|
|
|
|
+ if (type == 'preview') {
|
|
_this.openChooseProduct = false
|
|
_this.openChooseProduct = false
|
|
_this.openOutStockModal = false
|
|
_this.openOutStockModal = false
|
|
}
|
|
}
|