|
@@ -8,7 +8,7 @@
|
|
|
<span style="margin: 0 15px;color: #666;">客户名称:{{ detailData&&detailData.buyerName }}</span>
|
|
|
<div style="width:420px;display:inline-block;color: #666;">
|
|
|
<span>出库仓库:</span>
|
|
|
- <chooseWarehouse style="width:80%" ref="warehouse" v-model="productForm.warehouseSn" @change="handleWarehouse"></chooseWarehouse>
|
|
|
+ <chooseWarehouse style="width:80%" ref="warehouse" v-model="warehouseSn" @change="handleWarehouse"></chooseWarehouse>
|
|
|
</div>
|
|
|
</template>
|
|
|
</a-page-header>
|
|
@@ -228,7 +228,7 @@ import queryPromotable from './queryPromotable.vue'
|
|
|
import ChooseActive from './chooseActive.vue'
|
|
|
import ImportGuideModal from './importGuideModal.vue'
|
|
|
import chooseWarehouse from '@/views/common/chooseWarehouse'
|
|
|
-import { salesDetailBySn, salesWriteSubmit, getPromoacActiveList, deleteAll } from '@/api/sales'
|
|
|
+import { salesModify, salesDetailBySn, salesWriteSubmit, getPromoacActiveList, deleteAll } from '@/api/sales'
|
|
|
import { salesDetailStockList, salesDetailInsert, salesDetailUpdateQty, salesDetailDel, salesDetailBatchDel, salesDetailDelAll, addPromoGoods, salesBatchInsert } from '@/api/salesDetail'
|
|
|
export default {
|
|
|
name: 'SalesEdit',
|
|
@@ -247,9 +247,9 @@ export default {
|
|
|
dataSource: [],
|
|
|
productForm: {
|
|
|
salesBillSn: '',
|
|
|
- promotionFlag: 0,
|
|
|
- warehouseSn: undefined
|
|
|
+ promotionFlag: 0
|
|
|
},
|
|
|
+ warehouseSn: undefined,
|
|
|
activeName: '', // 促销活动
|
|
|
nowData: null,
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
@@ -306,7 +306,20 @@ export default {
|
|
|
methods: {
|
|
|
// 选择仓库
|
|
|
handleWarehouse (val) {
|
|
|
- this.productForm.warehouseSn = val
|
|
|
+ this.warehouseSn = val
|
|
|
+ const _this = this
|
|
|
+ _this.spinning = true
|
|
|
+ salesModify({
|
|
|
+ id: _this.detailData.id,
|
|
|
+ warehouseSn: val
|
|
|
+ }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$refs.partQuery.resetCurForm(val)
|
|
|
+ _this.spinning = false
|
|
|
+ } else {
|
|
|
+ _this.spinning = false
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
handleMenuClick (e) {
|
|
|
if (e.key == 1) { // 删除已选项
|
|
@@ -507,7 +520,7 @@ export default {
|
|
|
if (res.status == 200) {
|
|
|
this.detailData = res.data
|
|
|
if (flag) {
|
|
|
- this.$refs.partQuery.pageInit(this.detailData && this.detailData.buyerSn || '')
|
|
|
+ this.$refs.partQuery.pageInit(this.detailData && this.detailData.buyerSn || '', this.warehouseSn)
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -589,7 +602,7 @@ export default {
|
|
|
this.getOrderDetail(true)
|
|
|
this.$refs.table.refresh(true)
|
|
|
this.salesBillSn = this.$route.params.sn
|
|
|
- this.productForm.warehouseSn = this.$route.params.sn ? this.$route.params.wSn : ''
|
|
|
+ this.warehouseSn = this.$route.params.sn ? this.$route.params.wSn : ''
|
|
|
// 获取促销活动
|
|
|
this.getPromoacActiveList()
|
|
|
}
|