|
@@ -10,7 +10,7 @@
|
|
width="80%">
|
|
width="80%">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<a-tabs>
|
|
<a-tabs>
|
|
- <a-tab-pane key="1" tab="待补货产品" force-render>
|
|
|
|
|
|
+ <a-tab-pane :defaultActiveKey="curTab" v-model="curTab" :key="1" tab="待补货产品">
|
|
<!-- 搜索条件 -->
|
|
<!-- 搜索条件 -->
|
|
<div class="table-page-search-wrapper">
|
|
<div class="table-page-search-wrapper">
|
|
<a-form-model
|
|
<a-form-model
|
|
@@ -37,7 +37,7 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-model-item label="库存情况">
|
|
<a-form-model-item label="库存情况">
|
|
- <a-checkbox-group :options="options" @change="onStockChange" />
|
|
|
|
|
|
+ <a-checkbox-group v-model.trim="queryParam.stockStateList" :options="options" />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="12" style="margin-bottom: 10px;">
|
|
<a-col :md="6" :sm="12" style="margin-bottom: 10px;">
|
|
@@ -50,8 +50,8 @@
|
|
<div class="chooseShelf-modal-table">
|
|
<div class="chooseShelf-modal-table">
|
|
<div class="table-operator">
|
|
<div class="table-operator">
|
|
<div>
|
|
<div>
|
|
- <a-button type="primary" class="button-error">批量添加</a-button>
|
|
|
|
- <span v-if="selectTotal">已选{{ selectTotal }}项</span>
|
|
|
|
|
|
+ <a-button type="primary">批量添加</a-button>
|
|
|
|
+ <span style="margin-left: 10px;" v-if="selectTotal">已选{{ selectTotal }}项</span>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<a-icon type="info-circle" />
|
|
<a-icon type="info-circle" />
|
|
@@ -64,18 +64,63 @@
|
|
ref="table"
|
|
ref="table"
|
|
size="small"
|
|
size="small"
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
- :row-selection="{columnWidth: 40}"
|
|
|
|
|
|
+ :row-selection="{columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.includeFlag == 1 } })}"
|
|
@rowSelection="rowSelectionFun"
|
|
@rowSelection="rowSelectionFun"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
:scroll="{ y: 450 }"
|
|
:scroll="{ y: 450 }"
|
|
- :defaultLoadData="false"
|
|
|
|
:showPagination="false"
|
|
:showPagination="false"
|
|
bordered>
|
|
bordered>
|
|
|
|
+ <!-- 售价 -->
|
|
|
|
+ <template slot="salePrice" slot-scope="text, record">
|
|
|
|
+ <div style="display: flex;align-items: center;" @dblclick.stop>
|
|
|
|
+ <a-input-number
|
|
|
|
+ size="small"
|
|
|
|
+ v-model="record.price"
|
|
|
|
+ :precision="2"
|
|
|
|
+ :min="0"
|
|
|
|
+ :max="999999"
|
|
|
|
+ style="width: 100%;"
|
|
|
|
+ placeholder="请输入" />
|
|
|
|
+ <span style="color: red;margin: 0 2px;font-size: 14px;" v-if="record.origSalePriceFlag == 1">原</span>
|
|
|
|
+ <span v-else> </span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 销售数量 -->
|
|
|
|
+ <template slot="nums" slot-scope="text, record">
|
|
|
|
+ <div @dblclick.stop>
|
|
|
|
+ <a-input-number
|
|
|
|
+ size="small"
|
|
|
|
+ v-model="record.salesNums"
|
|
|
|
+ :precision="0"
|
|
|
|
+ :min="0"
|
|
|
|
+ :max="999999"
|
|
|
|
+ style="width: 100%;"
|
|
|
|
+ placeholder="请输入" />
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 操作 -->
|
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
|
+ <a-button
|
|
|
|
+ size="small"
|
|
|
|
+ type="link"
|
|
|
|
+ class="button-primary"
|
|
|
|
+ @click.stop="handleAdd(record)"
|
|
|
|
+ v-if="record.includeFlag != 1"
|
|
|
|
+ id="productInfoList-edit-btn">添加</a-button>
|
|
|
|
+ <span style="color:#999;" v-else>已添加</span>
|
|
|
|
+ <a-button
|
|
|
|
+ size="small"
|
|
|
|
+ type="link"
|
|
|
|
+ class="button-primary"
|
|
|
|
+ @click.stop="handleDetail(record)"
|
|
|
|
+ id="productInfoList-detail-btn"
|
|
|
|
+ style="margin-left: 5px;">销售记录</a-button>
|
|
|
|
+ </template>
|
|
</s-table>
|
|
</s-table>
|
|
</div>
|
|
</div>
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
- <a-tab-pane key="2" tab="全部货架产品" force-render>
|
|
|
|
|
|
+ <a-tab-pane :key="2" tab="全部货架产品">
|
|
<!-- 搜索条件 -->
|
|
<!-- 搜索条件 -->
|
|
<div class="table-page-search-wrapper">
|
|
<div class="table-page-search-wrapper">
|
|
<a-form-model
|
|
<a-form-model
|
|
@@ -117,7 +162,6 @@
|
|
:columns="columns1"
|
|
:columns="columns1"
|
|
:data="loadData1"
|
|
:data="loadData1"
|
|
:scroll="{ y: 450 }"
|
|
:scroll="{ y: 450 }"
|
|
- :defaultLoadData="false"
|
|
|
|
:showPagination="false"
|
|
:showPagination="false"
|
|
bordered>
|
|
bordered>
|
|
</s-table>
|
|
</s-table>
|
|
@@ -125,6 +169,8 @@
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
</a-tabs>
|
|
</a-tabs>
|
|
</a-spin>
|
|
</a-spin>
|
|
|
|
+ <!-- 销售记录 -->
|
|
|
|
+ <product-salesRecord-modal ref="salseRecord" :openModal="showRecord" @close="showRecord=false" />
|
|
</a-modal>
|
|
</a-modal>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -132,10 +178,11 @@
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { STable } from '@/components'
|
|
import { STable } from '@/components'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductType from '../../common/productType.js'
|
|
-import { stockOutDetailList } from '@/api/stockOut'
|
|
|
|
|
|
+import productSalesRecordModal from './productSalesRecordModal.vue'
|
|
|
|
+import { queryWaitReplenish, queryShelfProduct } from '@/api/shelfReplenish'
|
|
export default {
|
|
export default {
|
|
name: 'OutinDetailModal',
|
|
name: 'OutinDetailModal',
|
|
- components: { STable, ProductType },
|
|
|
|
|
|
+ components: { STable, ProductType, productSalesRecordModal },
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
props: {
|
|
props: {
|
|
openModal: {
|
|
openModal: {
|
|
@@ -154,31 +201,41 @@ export default {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
advanced: false,
|
|
advanced: false,
|
|
|
|
+ showRecord: false,
|
|
isShow: this.openModal, // 是否打开弹框
|
|
isShow: this.openModal, // 是否打开弹框
|
|
options: [
|
|
options: [
|
|
- { label: '库存充足', value: '1' },
|
|
|
|
- { label: '部分缺货', value: '2' },
|
|
|
|
- { label: '全部缺货', value: '3' }
|
|
|
|
|
|
+ { label: '库存充足', value: 'stockEnough' },
|
|
|
|
+ { label: '部分缺货', value: 'portionStockout' },
|
|
|
|
+ { label: '全部缺货', value: 'allStockout' }
|
|
],
|
|
],
|
|
|
|
+ curTab: 1,
|
|
productType: [],
|
|
productType: [],
|
|
queryParam: {
|
|
queryParam: {
|
|
productCode: '', // 产品编码
|
|
productCode: '', // 产品编码
|
|
productName: '', // 产品名称
|
|
productName: '', // 产品名称
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
- productTypeSn3: '' // 产品三级分类
|
|
|
|
|
|
+ productTypeSn3: '', // 产品三级分类
|
|
|
|
+ stockStateList: []
|
|
},
|
|
},
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- return stockOutDetailList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
|
|
+ this.queryParam.shelfSn = this.baseData.shelfSn
|
|
|
|
+ this.queryParam.customerSn = this.baseData.customerSn
|
|
|
|
+ this.queryParam.salePriceType = this.baseData.salePriceType
|
|
|
|
+ this.queryParam.salesBillSn = this.baseData.salesBillSn
|
|
|
|
+
|
|
|
|
+ return queryWaitReplenish(Object.assign(parameter, this.queryParam)).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
const no = 0
|
|
const no = 0
|
|
for (var i = 0; i < data.length; i++) {
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
|
+ data[i] = data[i].shelfProductApi
|
|
data[i].no = no + i + 1
|
|
data[i].no = no + i + 1
|
|
- data[i].totalCost = Number(data[i].putCost * data[i].outQty).toFixed(2)
|
|
|
|
|
|
+ data[i].salesNums = data[i].replenishBillWaitQty
|
|
|
|
+ data[i].putCost = data[i].cost
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.spinning = false
|
|
this.spinning = false
|
|
@@ -198,14 +255,17 @@ export default {
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData1: parameter => {
|
|
loadData1: parameter => {
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- return stockOutDetailList(Object.assign(parameter, this.queryParam1)).then(res => {
|
|
|
|
|
|
+ this.queryParam1.shelfSn = this.baseData.shelfSn
|
|
|
|
+ this.queryParam1.customerSn = this.baseData.customerSn
|
|
|
|
+ this.queryParam1.salePriceType = this.baseData.salePriceType
|
|
|
|
+ this.queryParam1.salesBillSn = this.baseData.salesBillSn
|
|
|
|
+ return queryShelfProduct(Object.assign(parameter, this.queryParam1)).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
const no = 0
|
|
const no = 0
|
|
for (var i = 0; i < data.length; i++) {
|
|
for (var i = 0; i < data.length; i++) {
|
|
data[i].no = no + i + 1
|
|
data[i].no = no + i + 1
|
|
- data[i].totalCost = Number(data[i].putCost * data[i].outQty).toFixed(2)
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.spinning = false
|
|
this.spinning = false
|
|
@@ -224,35 +284,34 @@ export default {
|
|
columns () {
|
|
columns () {
|
|
const arr = [
|
|
const arr = [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
- { title: '库存批次', dataIndex: 'stockBatchNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '仓库', dataIndex: 'warehouseName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '仓位', dataIndex: 'warehouseLocationName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- // { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '本次出库数量', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
|
- // { title: '成本小计', dataIndex: 'totalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
|
|
|
+ { title: '货位号', dataIndex: 'shelfPlaceCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '最大库容', dataIndex: 'maxQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '货架库存', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '补货在途', dataIndex: 'replenishBillQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '调回在途', dataIndex: 'recallBillQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '待补货数量', dataIndex: 'replenishBillWaitQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '门店库存数量', dataIndex: 'qplsStockQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '单位', dataIndex: 'productUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '售价', dataIndex: 'price', scopedSlots: { customRender: 'salePrice' }, width: '8%', align: 'center' },
|
|
|
|
+ { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '8%', align: 'center' },
|
|
|
|
+ { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
]
|
|
]
|
|
- if (this.$hasPermissions('M_ShowAllCost')) {
|
|
|
|
- arr.splice(5, 0, { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
- arr.splice(7, 0, { title: '成本小计', dataIndex: 'totalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
- }
|
|
|
|
return arr
|
|
return arr
|
|
},
|
|
},
|
|
columns1 () {
|
|
columns1 () {
|
|
const arr = [
|
|
const arr = [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
- { title: '库存批次', dataIndex: 'stockBatchNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '仓库', dataIndex: 'warehouseName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '仓位', dataIndex: 'warehouseLocationName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- // { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '本次出库数量', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
|
- // { title: '成本小计', dataIndex: 'totalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
|
|
|
+ { title: '货位号', dataIndex: 'shelfPlaceCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '最大库容', dataIndex: 'maxQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '货架库存', dataIndex: 'qty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '补货在途', dataIndex: 'replenishBillQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '调回在途', dataIndex: 'recallBillQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '单位', dataIndex: 'productUnit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
]
|
|
]
|
|
- if (this.$hasPermissions('M_ShowAllCost')) {
|
|
|
|
- arr.splice(5, 0, { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
- arr.splice(7, 0, { title: '成本小计', dataIndex: 'totalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
- }
|
|
|
|
return arr
|
|
return arr
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -260,6 +319,11 @@ export default {
|
|
cansel () {
|
|
cansel () {
|
|
this.isShow = false
|
|
this.isShow = false
|
|
},
|
|
},
|
|
|
|
+ // 销售记录
|
|
|
|
+ handleDetail (row) {
|
|
|
|
+ this.showRecord = true
|
|
|
|
+ this.$refs.salseRecord.getDetail(this.baseData.customerSn, row.productSn, row)
|
|
|
|
+ },
|
|
// 表格选中项
|
|
// 表格选中项
|
|
rowSelectionFun (obj) {
|
|
rowSelectionFun (obj) {
|
|
this.rowSelectionInfo = obj || null
|
|
this.rowSelectionInfo = obj || null
|
|
@@ -270,8 +334,8 @@ export default {
|
|
this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
},
|
|
},
|
|
- onStockChange (val) {
|
|
|
|
- console.log(val)
|
|
|
|
|
|
+ handleAdd (row) {
|
|
|
|
+ this.$emit('add', row)
|
|
},
|
|
},
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.queryParam.productCode = ''
|
|
this.queryParam.productCode = ''
|
|
@@ -280,6 +344,7 @@ export default {
|
|
this.queryParam.productTypeSn2 = ''
|
|
this.queryParam.productTypeSn2 = ''
|
|
this.queryParam.productTypeSn3 = ''
|
|
this.queryParam.productTypeSn3 = ''
|
|
this.productType = []
|
|
this.productType = []
|
|
|
|
+ this.queryParam.stockStateList = []
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
@@ -312,7 +377,7 @@ export default {
|
|
this.$emit('close')
|
|
this.$emit('close')
|
|
} else {
|
|
} else {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.$refs.table.refresh(true)
|
|
|
|
|
|
+ this.curTab = 1
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|