|
@@ -5,7 +5,7 @@
|
|
|
<!-- 自定义的二级文字标题 -->
|
|
|
<template slot="subTitle">
|
|
|
<a id="shelfSet-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
- <span class="store-info">西安车领主常青二路数字货架——货位号A01</span>
|
|
|
+ <span class="store-info">{{ (basicInfoData&&basicInfoData.shelfName) || '--' }}</span>
|
|
|
</template>
|
|
|
</a-page-header>
|
|
|
<!-- 内容 -->
|
|
@@ -17,8 +17,8 @@
|
|
|
<a-button icon="edit" size="small" type="link" style="margin-left: 20px;color: #39f;" @click.stop="handleInfoEdit">编辑</a-button>
|
|
|
</template>
|
|
|
<a-descriptions :column="3">
|
|
|
- <a-descriptions-item label="关联客户">{{ (basicInfoData&&basicInfoData.outWarehouseName) || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="临配运费">{{ (basicInfoData&&basicInfoData.putWarehouseName) || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="关联客户">{{ (basicInfoData&&basicInfoData.customerName) || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="临配运费">{{ (basicInfoData&&(basicInfoData.tempFreight || basicInfoData.tempFreight==0)) ? basicInfoData.tempFreight : '--' }}</a-descriptions-item>
|
|
|
</a-descriptions>
|
|
|
</a-collapse-panel>
|
|
|
</a-collapse>
|
|
@@ -48,7 +48,7 @@
|
|
|
</a-form>
|
|
|
</div>
|
|
|
<!-- 操作按钮 -->
|
|
|
- <div class="table-operator">
|
|
|
+ <div class="table-operator" v-if="!(basicInfoData&&basicInfoData.finishFlag)">
|
|
|
<a-button id="shelfSet-import" type="primary" class="button-error" @click="openGuideModal=true">导入绑定产品</a-button>
|
|
|
<a-tooltip placement="top">
|
|
|
<template slot="title">
|
|
@@ -65,6 +65,8 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
+ :showPagination="false"
|
|
|
+ :defaultLoadData="false"
|
|
|
bordered>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
@@ -72,30 +74,33 @@
|
|
|
size="small"
|
|
|
type="link"
|
|
|
class="button-primary"
|
|
|
+ v-if="!!record.productSn"
|
|
|
@click="handleProduct(record, 'edit')"
|
|
|
id="shelfMonitoringList-edit-btn">修改信息</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
class="button-primary"
|
|
|
+ v-if="!!record.productSn"
|
|
|
@click="handleReplace(record)"
|
|
|
id="shelfMonitoringList-replace-btn">更换产品</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
class="button-primary"
|
|
|
+ v-if="!record.productSn"
|
|
|
@click="handleProduct(record, 'bind')"
|
|
|
id="shelfMonitoringList-bind-btn">绑定产品</a-button>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-card>
|
|
|
</a-spin>
|
|
|
- <!-- 修改信息/绑定产品 -->
|
|
|
+ <!-- 修改信息/绑定产品/更换产品 -->
|
|
|
<bind-product-modal :openModal="openModal" :type="modalType" :nowData="nowData" @ok="handleOk" @close="handleCancel" />
|
|
|
<!-- 更换产品 -->
|
|
|
<common-modal
|
|
|
:openModal="openTipsModal"
|
|
|
- modalHtml="只有当前库存为0时,才能更换产品您可以在“货架监控”功能中将产品调回"
|
|
|
+ modalHtml="只有当前库存为0时,才能更换产品<br/>您可以在“货架监控”功能中将产品调回"
|
|
|
okText="好的"
|
|
|
:isCancel="false"
|
|
|
@ok="openTipsModal=false"
|
|
@@ -111,7 +116,7 @@ import { STable, VSelect } from '@/components'
|
|
|
import commonModal from '@/views/common/commonModal.vue'
|
|
|
import bindProductModal from './bindProductModal.vue'
|
|
|
import ImportGuideModal from './importGuideModal.vue'
|
|
|
-import { storeCallOutList } from '@/api/storeCallOut'
|
|
|
+import { shelfDetail, shelfProductList } from '@/api/shelf'
|
|
|
export default {
|
|
|
name: 'ShelfMonitoringWarehousing',
|
|
|
components: { STable, VSelect, commonModal, bindProductModal, ImportGuideModal },
|
|
@@ -126,26 +131,25 @@ export default {
|
|
|
},
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { title: '货位号', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '绑定产品编码', dataIndex: 'allocationLinkagePutNo', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '绑定产品名称', dataIndex: 'outTenantName', width: '23%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '销售价', dataIndex: 'allocatione', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '结算价', dataIndex: 'alloeDictValue', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '最大库容', dataIndex: 'allocatialue', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '当前库存', dataIndex: 'allolue', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '货位号', dataIndex: 'shelfPlaceCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '绑定产品编码', dataIndex: 'productCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '绑定产品名称', dataIndex: 'productName', width: '23%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '销售价', dataIndex: 'price', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '结算价', dataIndex: 'cost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '最大库容', dataIndex: 'maxQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '当前库存', dataIndex: 'qty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- return storeCallOutList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ return shelfProductList(Object.assign(parameter, this.queryParam, { shelfSn: this.$route.params.sn })).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
|
- const no = (data.pageNo - 1) * data.pageSize
|
|
|
- for (var i = 0; i < data.list.length; i++) {
|
|
|
- data.list[i].no = no + i + 1
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ data[i].no = i + 1
|
|
|
}
|
|
|
this.disabled = false
|
|
|
}
|
|
@@ -164,13 +168,27 @@ export default {
|
|
|
methods: {
|
|
|
// 编辑基本信息
|
|
|
handleInfoEdit () {},
|
|
|
+ // 基本信息
|
|
|
+ getDetail () {
|
|
|
+ shelfDetail({ sn: this.$route.params.sn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.basicInfoData = res.data
|
|
|
+ } else {
|
|
|
+ this.basicInfoData = null
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 更换产品
|
|
|
handleReplace (row) {
|
|
|
- this.openTipsModal = true
|
|
|
- // this.handleProduct(row, 'replace')
|
|
|
+ if (row.qty) {
|
|
|
+ this.handleProduct(row, 'replace')
|
|
|
+ } else {
|
|
|
+ this.openTipsModal = true
|
|
|
+ }
|
|
|
},
|
|
|
// 更换产品/绑定产品/修改信息
|
|
|
handleProduct (row, type) {
|
|
|
+ this.nowData = row || null
|
|
|
this.modalType = type
|
|
|
this.openModal = true
|
|
|
},
|
|
@@ -199,12 +217,14 @@ export default {
|
|
|
},
|
|
|
mounted () {
|
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
+ this.getDetail()
|
|
|
this.resetSearchForm()
|
|
|
}
|
|
|
},
|
|
|
activated () {
|
|
|
// 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
|
|
|
if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
|
|
|
+ this.getDetail()
|
|
|
this.resetSearchForm()
|
|
|
}
|
|
|
}
|