|
@@ -154,6 +154,10 @@
|
|
|
</div>
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
+ <!-- 出库仓库 -->
|
|
|
+ <template slot="warehouseBox" slot-scope="text, record">
|
|
|
+ <chooseWarehouse style="width:100%;" :allowClear="false" ref="warehouseBox" v-model="record.warehouseSn" @change="handleWarehouseBox(record)"></chooseWarehouse>
|
|
|
+ </template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
<a-button
|
|
@@ -300,7 +304,7 @@ export default {
|
|
|
// { title: '售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '8%', align: 'center' },
|
|
|
{ title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '8%', align: 'center' },
|
|
|
- { title: '出库仓库', dataIndex: 'warehouseName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '15%', align: 'center' },
|
|
|
{ title: '单位', dataIndex: 'productEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
// { title: '售价小计', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
@@ -313,6 +317,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 设置单个出库仓库
|
|
|
+ handleWarehouseBox (row) {
|
|
|
+ const snArr = [row.salesBillDetailSn]
|
|
|
+ const ajax_data = {
|
|
|
+ warehouseSn: row.warehouseSn,
|
|
|
+ salesBillDetailSnList: snArr,
|
|
|
+ salesBillSn: this.$route.params.sn
|
|
|
+ }
|
|
|
+ this.setWarehouseInfo(ajax_data)
|
|
|
+ },
|
|
|
chooseWarehouseOk (sn) {
|
|
|
const _this = this
|
|
|
const snArr = []
|
|
@@ -322,16 +336,21 @@ export default {
|
|
|
const ajax_data = {
|
|
|
warehouseSn: sn,
|
|
|
salesBillDetailSnList: snArr,
|
|
|
- salesBillSn: this.$route.params.sn
|
|
|
+ salesBillSn: _this.$route.params.sn
|
|
|
}
|
|
|
+ _this.setWarehouseInfo(ajax_data)
|
|
|
+ },
|
|
|
+ setWarehouseInfo (data) {
|
|
|
+ const _this = this
|
|
|
_this.spinning = true
|
|
|
- updateWarehouse(ajax_data).then(res => {
|
|
|
+ updateWarehouse(data).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.openWarehouseModal = false
|
|
|
_this.resetSearchForm(true)
|
|
|
_this.$refs.promotable.resetCurForm()
|
|
|
_this.$message.success(res.message)
|
|
|
}
|
|
|
+ _this.$refs.table.refresh(true)
|
|
|
_this.spinning = false
|
|
|
})
|
|
|
},
|