|
@@ -36,7 +36,7 @@
|
|
|
<a-input id="allocateBillEdit-productOrigCode" v-model="queryParam.productOrigCode" placeholder="请输入原厂编码" allowClear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
|
|
|
+ <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeTransferOutList-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
|
|
|
</a-col>
|
|
@@ -52,7 +52,7 @@
|
|
|
:columns="columns"
|
|
|
:customRow="handleClickRow"
|
|
|
:data="loadData"
|
|
|
- :scroll="{ x: 1240, y: 300 }"
|
|
|
+ :scroll="{ x: 1120, y: 300 }"
|
|
|
bordered>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
@@ -67,7 +67,7 @@
|
|
|
<a-collapse :activeKey="['1']">
|
|
|
<a-collapse-panel key="1" header="已选产品">
|
|
|
<!-- 总计 -->
|
|
|
- <a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
+ <a-alert type="info" style="margin-bottom:10px">
|
|
|
<div slot="message">
|
|
|
总数量:<strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
|
|
|
总成本(¥):<strong>{{ (productTotal&&(productTotal.totalCost || productTotal.totalCost==0)) ? productTotal.totalCost : '--' }}</strong> ,
|
|
@@ -90,7 +90,7 @@
|
|
|
<a-input id="allocateBillEdit-productName" v-model="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
|
|
|
+ <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
<a-button type="primary" @click="getChooseProductList(1)" :disabled="chooseDisabled" id="storeTransferOutList-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="storeTransferOutList-reset">重置</a-button>
|
|
|
</a-col>
|
|
@@ -111,13 +111,14 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="chooseColumns"
|
|
|
:dataSource="chooseLoadData"
|
|
|
- :scroll="{ x: 1335, y: 300 }"
|
|
|
+ :scroll="{ x: 955, y: 300 }"
|
|
|
:loading="loading"
|
|
|
- :pagination="choosePaginationProps"
|
|
|
+ :pagination="false"
|
|
|
bordered>
|
|
|
<!-- 调出数量 -->
|
|
|
<template slot="qty" slot-scope="text, record">
|
|
|
<a-input-number
|
|
|
+ size="small"
|
|
|
id="allocateBillEdit-qty"
|
|
|
v-model="record.qty"
|
|
|
:precision="0"
|
|
@@ -132,6 +133,14 @@
|
|
|
<a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="allocateBillEdit-del-btn">删除</a-button>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
+ <!-- 分页 -->
|
|
|
+ <tablePagination
|
|
|
+ ref="chooseTablePagination"
|
|
|
+ :total="choosePaginationProps.total"
|
|
|
+ :current="choosePaginationProps.current"
|
|
|
+ :pageSize="choosePaginationProps.pageSize"
|
|
|
+ @changePageSize="changeChoosePageSize"
|
|
|
+ @changePage="changeChoosePage" />
|
|
|
</a-collapse-panel>
|
|
|
</a-collapse>
|
|
|
</a-card>
|
|
@@ -154,10 +163,11 @@
|
|
|
|
|
|
<script>
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
+import tablePagination from '@/views/common/tablePagination.vue'
|
|
|
import { queryStockProductPage } from '@/api/stock'
|
|
|
import { allocateBillDetailList, allocateBillDetailCount, allocateBillDetailSave, allocateBillSubmit, allocateBillDetailDel, allocateBillDetailDelAll, allocateBillDetailPrint } from '@/api/allocateBill'
|
|
|
export default {
|
|
|
- components: { STable, VSelect },
|
|
|
+ components: { STable, VSelect, tablePagination },
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
@@ -184,11 +194,11 @@ export default {
|
|
|
{ title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '成本价', dataIndex: 'lastStockCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '售价', dataIndex: 'productPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '库存数量', dataIndex: 'currentStockQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
|
+ { title: '成本价', dataIndex: 'lastStockCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '售价', dataIndex: 'productPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '库存数量', dataIndex: 'currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '单位', dataIndex: 'productUnit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -206,25 +216,21 @@ export default {
|
|
|
// 表头
|
|
|
chooseColumns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
- { title: '产品编码', dataIndex: 'productEntity.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品编码', dataIndex: 'productEntity.code', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '原厂编码', dataIndex: 'productEntity.origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '成本价', dataIndex: 'cost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '库存数量', dataIndex: 'currentStockQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '调出数量', scopedSlots: { customRender: 'qty' }, width: 140, align: 'center' },
|
|
|
- { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
|
+ { title: '原厂编码', dataIndex: 'productEntity.origCode', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '成本价', dataIndex: 'cost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '售价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '库存数量', dataIndex: 'currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '调出数量', scopedSlots: { customRender: 'qty' }, width: 100, align: 'center' },
|
|
|
+ { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
|
|
|
],
|
|
|
chooseLoadData: [],
|
|
|
- choosePageNo: 1, // 分页页码
|
|
|
- choosePageSize: 10, // 分页 每页多少条
|
|
|
choosePaginationProps: {
|
|
|
- showSizeChanger: true, // 是否可以改变 pageSize
|
|
|
total: 0, // 分页总条数
|
|
|
current: 1,
|
|
|
- onShowSizeChange: (current, pageSize) => this.changeChoosePageSize(current, pageSize),
|
|
|
- onChange: (current) => this.changeChoosePage(current)
|
|
|
+ pageSize: 20
|
|
|
},
|
|
|
productTotal: null // 合计
|
|
|
}
|
|
@@ -251,10 +257,9 @@ export default {
|
|
|
chooseResetSearchForm () {
|
|
|
this.chooseQueryParam.productCode = ''
|
|
|
this.chooseQueryParam.productName = ''
|
|
|
- this.choosePageNo = 1
|
|
|
- this.choosePageSize = 10
|
|
|
this.choosePaginationProps.total = 0
|
|
|
this.choosePaginationProps.current = 1
|
|
|
+ this.choosePaginationProps.pageSize = 20
|
|
|
this.getChooseProductList(1)
|
|
|
},
|
|
|
// 添加/编辑
|
|
@@ -356,23 +361,23 @@ export default {
|
|
|
},
|
|
|
// 已选产品 分页 一页多少条change
|
|
|
changeChoosePageSize (current, pageSize) {
|
|
|
- this.choosePageNo = current
|
|
|
- this.choosePageSize = pageSize
|
|
|
+ this.choosePaginationProps.current = current
|
|
|
+ this.choosePaginationProps.pageSize = pageSize
|
|
|
this.getChooseProductList()
|
|
|
},
|
|
|
// 已选产品 分页 页码change
|
|
|
changeChoosePage (current) {
|
|
|
- this.choosePageNo = current
|
|
|
+ this.choosePaginationProps.current = current
|
|
|
this.getChooseProductList()
|
|
|
},
|
|
|
// 已选产品列表数据
|
|
|
getChooseProductList (pageNo) {
|
|
|
- this.choosePageNo = this.choosePageNo || pageNo
|
|
|
+ this.choosePaginationProps.current = this.choosePaginationProps.current || pageNo
|
|
|
this.chooseDisabled = true
|
|
|
this.loading = true
|
|
|
const params = {
|
|
|
- pageNo: this.choosePageNo,
|
|
|
- pageSize: this.choosePageSize,
|
|
|
+ pageNo: this.choosePaginationProps.current,
|
|
|
+ pageSize: this.choosePaginationProps.pageSize,
|
|
|
allocateSn: this.$route.params.sn
|
|
|
}
|
|
|
allocateBillDetailList(Object.assign(params, this.chooseQueryParam)).then(res => {
|
|
@@ -393,6 +398,7 @@ export default {
|
|
|
} else {
|
|
|
this.choosePaginationProps.total = 0
|
|
|
this.choosePaginationProps.current = 1
|
|
|
+ this.choosePaginationProps.pageSize = 20
|
|
|
this.chooseLoadData = []
|
|
|
}
|
|
|
})
|