|
@@ -6,7 +6,6 @@
|
|
|
<a id="warehouseAllocationEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
<span style="margin: 0 15px;color: #666;">调出仓库:{{ (warehouse&&warehouse.outWarehouseName) || '--' }}</span>
|
|
|
<span style="margin: 0 15px;color: #666;">调入仓库:{{ (warehouse&&warehouse.putWarehouseName) || '--' }}</span>
|
|
|
- <!-- <a-button id="warehouseAllocationEdit-edit-btn" size="small" @click="handleEditInfo" style="margin-left:10px" key="0">编辑</a-button> -->
|
|
|
</template>
|
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
|
<template slot="extra">
|
|
@@ -113,6 +112,7 @@
|
|
|
size="small"
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
+ :customRow="handleClickRow"
|
|
|
:loading="loading"
|
|
|
:dataSource="loadData"
|
|
|
:pagination="pagination"
|
|
@@ -135,6 +135,7 @@
|
|
|
<a-select-option
|
|
|
v-for="item in warehousePutLocData"
|
|
|
:key="item.warehouseLocationSn"
|
|
|
+ :disabled="item.warehouseLocationSn==record.warehouseLocationSn"
|
|
|
:value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
</template>
|
|
@@ -249,7 +250,7 @@
|
|
|
allowClear
|
|
|
v-model="record.putWarehouseLocationSn"
|
|
|
style="width: 100%;">
|
|
|
- <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
|
|
|
+ <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :disabled="item.warehouseLocationSn==record.outWarehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
</template>
|
|
|
<!-- 调出数量 -->
|
|
@@ -289,20 +290,17 @@
|
|
|
style="padding: 0 60px;">提交</a-button>
|
|
|
</div>
|
|
|
</a-affix>
|
|
|
- <!-- 选择基本信息弹框 -->
|
|
|
- <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
-import basicInfoModal from './basicInfoModal.vue'
|
|
|
import { dealerProductBrandQuery } from '@/api/dealerProductBrand.js'
|
|
|
import { dealerProductTypeList } from '@/api/dealerProductType.js'
|
|
|
import { warehouseLocAllList } from '@/api/warehouse.js'
|
|
|
import { productQuery, allocWarehouseFind, allocWarehouseDetailTotal, allocWarehouseDetailQuery, allocWarehouseDetailSave, allocWarehouseDetailDelete, allocWarehouseSubmit } from '@/api/allocWarehouse.js'
|
|
|
export default {
|
|
|
- components: { STable, VSelect, basicInfoModal },
|
|
|
+ components: { STable, VSelect },
|
|
|
data () {
|
|
|
return {
|
|
|
typeName: [], // 分类
|
|
@@ -365,7 +363,7 @@ export default {
|
|
|
{ title: '原厂编码', dataIndex: 'productOrigCode', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '品牌', dataIndex: 'brandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
|
|
|
- { title: '调出仓位', dataIndex: 'warehouseLocationSn', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '调出仓位', dataIndex: 'outWarehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '调入仓位', dataIndex: 'putWarehouseLocationSn', width: 140, align: 'center', scopedSlots: { customRender: 'storageQuantity' } },
|
|
|
{ title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '调出数量', scopedSlots: { customRender: 'transferOutQuantity' }, width: 140, align: 'center' },
|
|
@@ -384,8 +382,7 @@ export default {
|
|
|
this.disabled = false
|
|
|
return data
|
|
|
})
|
|
|
- },
|
|
|
- openModal: false // 选择基本信息弹框是否显示
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -411,7 +408,16 @@ export default {
|
|
|
this.queryParam.warehouseLocationSn = undefined // 调出仓位
|
|
|
this.getProductList()
|
|
|
},
|
|
|
-
|
|
|
+ // 双击快速添加
|
|
|
+ handleClickRow (record) {
|
|
|
+ return {
|
|
|
+ on: {
|
|
|
+ dblclick: (event) => {
|
|
|
+ this.handleAdd(record)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 已选产品重置查询
|
|
|
resetChooseSearchForm () {
|
|
|
this.chooseParam.productCode = ''
|
|
@@ -548,14 +554,6 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- },
|
|
|
- // 编辑基本信息
|
|
|
- handleEditInfo () {
|
|
|
- this.openModal = true
|
|
|
- },
|
|
|
- // 基本信息 保存
|
|
|
- handleOk () {
|
|
|
-
|
|
|
},
|
|
|
// 提交
|
|
|
handleSubmit () {
|
|
@@ -585,12 +583,10 @@ export default {
|
|
|
},
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
- vm.openModal = false
|
|
|
vm.pageInit()
|
|
|
vm.getProductBrand()
|
|
|
vm.getProductType()
|
|
|
vm.getHouse()
|
|
|
- console.log(vm.id, vm.$route.params, 'vm.id')
|
|
|
})
|
|
|
}
|
|
|
}
|