|
@@ -30,7 +30,6 @@
|
|
|
</template>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<span class="table-page-search-submitButtons">
|
|
|
- <a-button type="info" @click="printTest">打印</a-button>
|
|
|
<a-button type="primary" style="margin-left: 5px" @click="$refs.table.refresh(true)" :disabled="disabled" id="replenishmentManagementList-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="replenishmentManagementList-reset">重置</a-button>
|
|
|
<a @click="advanced = !advanced" style="margin-left: 5px">
|
|
@@ -56,6 +55,7 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
+ :expandedRowKeys="expandedRowKeys"
|
|
|
@expand="expandFun"
|
|
|
:expandRowByClick="true"
|
|
|
:scroll="{ y: tableHeight }"
|
|
@@ -63,6 +63,7 @@
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
<a-table
|
|
|
+ v-if="listData&&listData[index]"
|
|
|
slot="expandedRowRender"
|
|
|
slot-scope="record, index"
|
|
|
size="small"
|
|
@@ -99,32 +100,10 @@
|
|
|
<!-- 签收 -->
|
|
|
<put-warehousing-modal :openModal="openPutWarehousingModal" :nowData="nowData" @ok="handlePutWarehousingOk" @close="handleCancel" />
|
|
|
</a-spin>
|
|
|
-
|
|
|
- <div id="print">
|
|
|
- <div class="print-pages" style="font-size: 9px;padding:3pt 0 3pt 6pt;">
|
|
|
- <div class="storeName" style="text-align: center;font-weight: bold;margin: 2pt 0;">箭冠汽配西安大兴店</div>
|
|
|
- <div style="overflow: hidden;display: flex;justify-content: space-between;">
|
|
|
- <div style="padding-right: 3pt;">
|
|
|
- <div class="shelfName" style="margin-bottom: 2pt;">
|
|
|
- 西安车领主常青二路数字货架
|
|
|
- </div>
|
|
|
- <div class="productCode" style="font-weight: bold;">JA-11070N</div>
|
|
|
- <div class="productName">箭牌空气滤清器 07款丰田新皇冠2.5 / 3.0</div>
|
|
|
- <div class="userName" style="margin-top: 2pt;font-size: 8px;"><span style="margin: 0 5pt 0 0;">2021-10-01 15:30</span> <span>王明</span></div>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <div class="productSno" style="font-size: 16pt;text-align: center;">A08</div>
|
|
|
- <div class="qrcode" ref="qrCodeUrl" style="width: 40px;height: 40px;overflow: hidden;"></div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import QRCode from 'qrcodejs2'
|
|
|
-import { getLodop } from '@/libs/LodopFuncs'
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import getDate from '@/libs/getDate.js'
|
|
@@ -160,22 +139,29 @@ export default {
|
|
|
productCode: '',
|
|
|
productName: ''
|
|
|
},
|
|
|
+ expandedRowKeys: [],
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '补货单号', dataIndex: 'replenishBillNo', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '货架名称', dataIndex: 'shelfName', width: '21%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '补货单号', dataIndex: 'replenishBillNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '货架名称', dataIndex: 'shelfInfo.shelfName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '状态', dataIndex: 'billStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '补货应发总量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '实发总量', dataIndex: 'totalConfirmQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '签收总量', dataIndex: 'totalPutQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '18%', align: 'left' }
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'left' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- return shelfReplenishList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ this.expandedRowKeys = []
|
|
|
+ parameter.billState = this.queryParam.bizType == 'ALL' ? '' : this.queryParam.bizType
|
|
|
+ const params = Object.assign(parameter, this.queryParam)
|
|
|
+ delete params.index
|
|
|
+ delete params.tableId
|
|
|
+ delete params.bizType
|
|
|
+ return shelfReplenishList(params).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -192,9 +178,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
subColumns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
{ title: '产品编码', dataIndex: 'product.code', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'product.name', width: '28%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '产品名称', dataIndex: 'product.name', width: '32%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '补货应发总量', dataIndex: 'qty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '实发总量', dataIndex: 'confirmQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '签收总量', dataIndex: 'putQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
@@ -214,24 +200,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- printTest () {
|
|
|
- var qrcode = new QRCode(this.$refs.qrCodeUrl, {
|
|
|
- text: 'dealerSn=1033242&shelfSn=342326735950757888&productCode=RPF2340&shelfPlaceCode=A01&shelfPlaceSn=123213', // 需要转换为二维码的内容
|
|
|
- width: 40,
|
|
|
- height: 40,
|
|
|
- colorDark: '#000000',
|
|
|
- colorLight: '#ffffff',
|
|
|
- correctLevel: QRCode.CorrectLevel.H
|
|
|
- })
|
|
|
- const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
|
|
|
- console.log(LODOP, 'LODOP')
|
|
|
- // LODOP.ADD_PRINT_RECT(0, 0, '40mm', '30mm', 0, 1)
|
|
|
- LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) // 隐藏底图上有模拟走纸板的条纹线
|
|
|
- LODOP.SET_PRINT_MODE('POS_BASEON_PAPER', true) // 可使输出以纸张边缘为基点
|
|
|
- LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', document.getElementById('print').innerHTML)
|
|
|
- LODOP.SET_PRINT_PAGESIZE(1, '40mm', '30mm')
|
|
|
- LODOP.PREVIEW()
|
|
|
- },
|
|
|
// 确认
|
|
|
handleConfirm (row) {
|
|
|
this.nowData = row
|
|
@@ -268,9 +236,7 @@ export default {
|
|
|
},
|
|
|
// 打印贴签 ok
|
|
|
handlePrintStickerOk () {
|
|
|
- this.nowData = null
|
|
|
- this.openPrintStickerModal = false
|
|
|
- this.$refs.table.refresh(true)
|
|
|
+
|
|
|
},
|
|
|
// 出库
|
|
|
handleOutWarehousing (row) {
|
|
@@ -281,7 +247,7 @@ export default {
|
|
|
handleOutWarehousingOk () {
|
|
|
this.nowData = null
|
|
|
this.openOutWarehousingModal = false
|
|
|
- this.$refs.table.refresh(true)
|
|
|
+ this.queryByTypeSum()
|
|
|
},
|
|
|
handleValidate (type, params) {
|
|
|
// 校验产品库存是否足够
|
|
@@ -319,7 +285,7 @@ export default {
|
|
|
handlePutWarehousingOk () {
|
|
|
this.nowData = null
|
|
|
this.openPutWarehousingModal = false
|
|
|
- this.$refs.table.refresh(true)
|
|
|
+ this.queryByTypeSum()
|
|
|
},
|
|
|
// 取消补货单
|
|
|
handleCancelOrder (row) {
|
|
@@ -348,7 +314,11 @@ export default {
|
|
|
},
|
|
|
expandFun (expanded, record) {
|
|
|
if (expanded) {
|
|
|
+ this.expandedRowKeys.push(record.id)
|
|
|
this.getSubItem(record) // 获取表格内部数据
|
|
|
+ } else {
|
|
|
+ const i = this.expandedRowKeys.findIndex(item => item == record.id)
|
|
|
+ this.expandedRowKeys.splice(i, 1)
|
|
|
}
|
|
|
},
|
|
|
// 获取子节点数据
|
|
@@ -393,9 +363,12 @@ export default {
|
|
|
},
|
|
|
// 选择类型
|
|
|
handleTabChange (key) {
|
|
|
- this.queryParam.bizType = key
|
|
|
- this.$refs.table.refresh(true)
|
|
|
- this.curBizType = key
|
|
|
+ this.expandedRowKeys = []
|
|
|
+ setTimeout(() => {
|
|
|
+ this.queryParam.bizType = key
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ this.curBizType = key
|
|
|
+ }, 100)
|
|
|
},
|
|
|
// 客户 change
|
|
|
custChange (obj) {
|
|
@@ -406,18 +379,20 @@ export default {
|
|
|
shelfReplenishStateCount({}).then(res => {
|
|
|
if (res.data && res.status == 200) {
|
|
|
this.tabPaneData = [
|
|
|
- { bizName: '全部', bizType: 'ALL', countNum: null },
|
|
|
+ { bizName: '全部', bizType: 'ALL', countNum: 0 },
|
|
|
{ bizName: '待确认', bizType: 'WAIT_CONFIRM', countNum: 0 },
|
|
|
{ bizName: '待出库', bizType: 'WAIT_OUT_STOCK', countNum: 0 },
|
|
|
{ bizName: '待签收', bizType: 'WAIT_CHECK', countNum: 0 },
|
|
|
- { bizName: '已完成', bizType: 'FINISH', countNum: null },
|
|
|
- { bizName: '已取消', bizType: 'CANCEL', countNum: null }
|
|
|
+ { bizName: '已完成', bizType: 'FINISH', countNum: 0 },
|
|
|
+ { bizName: '已取消', bizType: 'CANCEL', countNum: 0 }
|
|
|
]
|
|
|
this.queryParam.bizType = 'ALL'
|
|
|
this.tabPaneData[1].countNum = res.data.WAIT_CONFIRM || 0
|
|
|
this.tabPaneData[2].countNum = res.data.WAIT_OUT_STOCK || 0
|
|
|
this.tabPaneData[3].countNum = res.data.WAIT_CHECK || 0
|
|
|
- this.$refs.table.refresh(true)
|
|
|
+ this.tabPaneData[4].countNum = res.data.FINISH || 0
|
|
|
+ this.tabPaneData[5].countNum = res.data.CANCEL || 0
|
|
|
+ this.$refs.table.refresh()
|
|
|
}
|
|
|
})
|
|
|
},
|