|
@@ -13,20 +13,26 @@
|
|
<a-collapse-panel key="1">
|
|
<a-collapse-panel key="1">
|
|
<template slot="header">
|
|
<template slot="header">
|
|
<span>基础信息</span>
|
|
<span>基础信息</span>
|
|
- <a-button icon="edit" v-if="basicInfoData&&basicInfoData.state!='WRITE_OFF'&&basicInfoData.state!='SUSPEND'" size="small" type="link" style="margin-left: 20px;color: #39f;" @click.stop="openInfoModal = true">编辑</a-button>
|
|
+ <a-button
|
|
|
|
+ icon="edit"
|
|
|
|
+ v-if="basicInfoData&&basicInfoData.state!='WRITE_OFF'&&basicInfoData.state!='SUSPEND'"
|
|
|
|
+ size="small"
|
|
|
|
+ type="link"
|
|
|
|
+ style="margin-left: 20px;color: #39f;"
|
|
|
|
+ @click.stop="openInfoModal = true">编辑</a-button>
|
|
</template>
|
|
</template>
|
|
<a-descriptions :column="2">
|
|
<a-descriptions :column="2">
|
|
<a-descriptions-item label="货架名称">
|
|
<a-descriptions-item label="货架名称">
|
|
- {{ basicInfoData&&basicInfoData.shelfName || '--' }}
|
|
+ {{ basicInfoData&&basicInfoData.shelfName || '--' }}
|
|
- <a-badge count="已注销" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="basicInfoData&&basicInfoData.state=='WRITE_OFF'"></a-badge>
|
|
+ <a-badge count="已注销" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="basicInfoData&&basicInfoData.state=='WRITE_OFF'"></a-badge>
|
|
- <a-badge count="已停用" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="basicInfoData&&basicInfoData.state=='DISABLED'"></a-badge>
|
|
+ <a-badge count="已停用" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="basicInfoData&&basicInfoData.state=='DISABLED'"></a-badge>
|
|
- <a-badge count="已暂停" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="basicInfoData&&basicInfoData.state=='SUSPEND'"></a-badge>
|
|
+ <a-badge count="已暂停" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="basicInfoData&&basicInfoData.state=='SUSPEND'"></a-badge>
|
|
</a-descriptions-item>
|
|
</a-descriptions-item>
|
|
<a-descriptions-item>
|
|
<a-descriptions-item>
|
|
<template slot="label">
|
|
<template slot="label">
|
|
- 货架产品
|
|
+ 货架产品
|
|
</template>
|
|
</template>
|
|
- <span>{{showPriceStr.length ? showPriceStr.join("/") : '--'}}</span>
|
|
+ <span>{{ showPriceStr.length ? showPriceStr.join("/") : '--' }}</span>
|
|
</a-descriptions-item>
|
|
</a-descriptions-item>
|
|
<a-descriptions-item>
|
|
<a-descriptions-item>
|
|
<template slot="label">
|
|
<template slot="label">
|
|
@@ -41,9 +47,9 @@
|
|
</a-descriptions-item>
|
|
</a-descriptions-item>
|
|
<a-descriptions-item>
|
|
<a-descriptions-item>
|
|
<template slot="label">
|
|
<template slot="label">
|
|
- 非货架产品
|
|
+ 非货架产品
|
|
</template>
|
|
</template>
|
|
- <span>{{showNoShelfPriceStr.length ? showNoShelfPriceStr.join("/") : '--'}}</span>
|
|
+ <span>{{ showNoShelfPriceStr.length ? showNoShelfPriceStr.join("/") : '--' }}</span>
|
|
</a-descriptions-item>
|
|
</a-descriptions-item>
|
|
</a-descriptions>
|
|
</a-descriptions>
|
|
</a-collapse-panel>
|
|
</a-collapse-panel>
|
|
@@ -74,7 +80,7 @@
|
|
@click="handleExport"
|
|
@click="handleExport"
|
|
:disabled="disabled"
|
|
:disabled="disabled"
|
|
:loading="exportLoading"
|
|
:loading="exportLoading"
|
|
- >导出</a-button>
|
|
+ >导出</a-button>
|
|
</span>
|
|
</span>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
@@ -83,14 +89,21 @@
|
|
<!-- 操作按钮 -->
|
|
<!-- 操作按钮 -->
|
|
<div class="table-operator" v-if="basicInfoData&&basicInfoData.state!='WRITE_OFF'&&basicInfoData.state!='SUSPEND'">
|
|
<div class="table-operator" v-if="basicInfoData&&basicInfoData.state!='WRITE_OFF'&&basicInfoData.state!='SUSPEND'">
|
|
<a-button id="shelfSet-addHW" type="primary" class="button-error" @click="addHW(1)">新增货位</a-button>
|
|
<a-button id="shelfSet-addHW" type="primary" class="button-error" @click="addHW(1)">新增货位</a-button>
|
|
- <a-button id="shelfSet-impoort" type="primary" class="button-info" @click="addHW(0)">批量导入货位</a-button>
|
|
+ <a-button id="shelfSet-imports" type="primary" class="button-info" @click="addHW(0)">批量导入货位</a-button>
|
|
- <a-button id="shelfSet-import" type="primary" class="button-error" @click="openGuideModal=true">导入绑定产品</a-button>
|
|
+ <a-button id="shelfSet-importProduct" type="primary" class="button-error" @click="openGuideModal=true">导入绑定产品</a-button>
|
|
<a-tooltip placement="top">
|
|
<a-tooltip placement="top">
|
|
<template slot="title">
|
|
<template slot="title">
|
|
<span>如果货位还没有绑定产品,可使用此功能通过Excel批量导入</span>
|
|
<span>如果货位还没有绑定产品,可使用此功能通过Excel批量导入</span>
|
|
</template>
|
|
</template>
|
|
<a-icon type="question-circle" style="color: rgba(0,0,0,.45);font-size: 16px;margin-left: 5px;vertical-align: middle;cursor: pointer;" />
|
|
<a-icon type="question-circle" style="color: rgba(0,0,0,.45);font-size: 16px;margin-left: 5px;vertical-align: middle;cursor: pointer;" />
|
|
</a-tooltip>
|
|
</a-tooltip>
|
|
|
|
+ <a-button
|
|
|
|
+ v-if="showTplBtn"
|
|
|
|
+ id="shelfSet-import-template"
|
|
|
|
+ style="margin-left:10px;"
|
|
|
|
+ type="primary"
|
|
|
|
+ class="button-primary"
|
|
|
|
+ @click="showTplModal=true">导入模板</a-button>
|
|
</div>
|
|
</div>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<s-table
|
|
<s-table
|
|
@@ -116,6 +129,7 @@
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
<a-button
|
|
<a-button
|
|
|
|
+ id="shelfSet-link"
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
:class="record.enableFlag==1?'button-error':'button-primary'"
|
|
:class="record.enableFlag==1?'button-error':'button-primary'"
|
|
@@ -123,6 +137,7 @@
|
|
@click="handleEnable(record)"
|
|
@click="handleEnable(record)"
|
|
>{{ record.enableFlag==1?'禁用':'启用' }}</a-button>
|
|
>{{ record.enableFlag==1?'禁用':'启用' }}</a-button>
|
|
<a-button
|
|
<a-button
|
|
|
|
+ id="shelfSet-bindProduct"
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
class="button-primary"
|
|
class="button-primary"
|
|
@@ -130,6 +145,7 @@
|
|
@click="handleProduct(record, 'bind')"
|
|
@click="handleProduct(record, 'bind')"
|
|
>绑定产品</a-button>
|
|
>绑定产品</a-button>
|
|
<a-button
|
|
<a-button
|
|
|
|
+ id="shelfSet-editProduct"
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
:class="record.enableFlag==1?'button-primary':''"
|
|
:class="record.enableFlag==1?'button-primary':''"
|
|
@@ -138,6 +154,7 @@
|
|
@click="handleReplace(record)"
|
|
@click="handleReplace(record)"
|
|
>更换产品</a-button>
|
|
>更换产品</a-button>
|
|
<a-button
|
|
<a-button
|
|
|
|
+ id="shelfSet-editHw"
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
:class="record.enableFlag==1?'button-primary':''"
|
|
:class="record.enableFlag==1?'button-primary':''"
|
|
@@ -145,6 +162,7 @@
|
|
@click="editHW(record)"
|
|
@click="editHW(record)"
|
|
>编辑</a-button>
|
|
>编辑</a-button>
|
|
<a-button
|
|
<a-button
|
|
|
|
+ id="shelfSet-del"
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
class="button-error"
|
|
class="button-error"
|
|
@@ -171,8 +189,12 @@
|
|
@close="openTipsModal=false" />
|
|
@close="openTipsModal=false" />
|
|
<!-- 导入产品 -->
|
|
<!-- 导入产品 -->
|
|
<importGuideModal :openModal="openGuideModal" :params="{shelfSn: $route.params.sn}" @close="openGuideModal=false" @ok="handleGuideOk" />
|
|
<importGuideModal :openModal="openGuideModal" :params="{shelfSn: $route.params.sn}" @close="openGuideModal=false" @ok="handleGuideOk" />
|
|
- <!-- 导入货位模板 -->
|
|
+ <!-- 导入货位弹框 -->
|
|
<importHuoweiModal :openModal="openImportModal" @close="openImportModal=false" @ok="$refs.table.refresh(true)" :shelfSn="$route.params.sn"></importHuoweiModal>
|
|
<importHuoweiModal :openModal="openImportModal" @close="openImportModal=false" @ok="$refs.table.refresh(true)" :shelfSn="$route.params.sn"></importHuoweiModal>
|
|
|
|
+ <!-- 导入货架模板弹框 -->
|
|
|
|
+ <commonModal modalTit="导入货架模板" :openModal="showTplModal" @close="closeTplModal" @ok="saveTpl">
|
|
|
|
+ <shelfTemplate v-if="showTplModal" style="width:100%" v-model="tplSn"></shelfTemplate>
|
|
|
|
+ </commonModal>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -180,29 +202,33 @@
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
-import commonModal from '@/views/common/commonModal.vue'
|
|
+import commonModal from '@/views/common/commonModal.vue' // 公共提示弹框
|
|
-import addHwModal from './addHwModal.vue'
|
|
+import addHwModal from './addHwModal.vue' // 新增货位弹框
|
|
-import bindProductModal from './bindProductModal.vue'
|
|
+import bindProductModal from './bindProductModal.vue' // 绑定产品弹框
|
|
-import ImportGuideModal from './importGuideModal.vue'
|
|
+import ImportGuideModal from './importGuideModal.vue' // 导入产品弹框
|
|
-import basicInfoModal from './basicInfoModal.vue'
|
|
+import basicInfoModal from './basicInfoModal.vue' // 基本信息弹框
|
|
-import importHuoweiModal from './importHuoweiModal.vue'
|
|
+import importHuoweiModal from './importHuoweiModal.vue' // 导入货位模板
|
|
-import { shelfDetail, shelfProductList, shelfProductBatchInsert, delShelfPlaceSn, shelfProductEnable, getShelfPriceShow, shelfProductExport } from '@/api/shelf'
|
|
+import shelfTemplate from '@/views/common/shelfTemplate' // 货架模板下拉组件
|
|
|
|
+import { shelfDetail, shelfProductList, shelfProductBatchInsert, delShelfPlaceSn, shelfProductEnable, getShelfPriceShow, shelfProductExport, importShelfTemplate } from '@/api/shelf'
|
|
export default {
|
|
export default {
|
|
name: 'ShelfMonitoringWarehousing',
|
|
name: 'ShelfMonitoringWarehousing',
|
|
- components: { STable, VSelect, commonModal, bindProductModal, addHwModal, ImportGuideModal, basicInfoModal, importHuoweiModal },
|
|
+ components: { STable, VSelect, commonModal, bindProductModal, addHwModal, ImportGuideModal, basicInfoModal, importHuoweiModal, shelfTemplate },
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
- spinning: false,
|
|
+ spinning: false, // 页面loading
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
- tableHeight: 400,
|
|
+ tableHeight: 400, // 表格高度
|
|
- exportLoading: false,
|
|
+ exportLoading: false, // 导出loading
|
|
|
|
+ showTplModal: false, // 是否显示导入模板弹框
|
|
|
|
+ tplSn: undefined, // 货架模板sn
|
|
queryParam: {
|
|
queryParam: {
|
|
shelfProductApiEntity: {
|
|
shelfProductApiEntity: {
|
|
- productCode: '',
|
|
+ productCode: '', // 产品编码
|
|
- productName: ''
|
|
+ productName: '' // 产品名称
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ orginData: [], // 原始数据
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
@@ -216,26 +242,32 @@ export default {
|
|
data[i].enableFlag = data[i].shelfProductApiEntity && data[i].shelfProductApiEntity.enableFlag
|
|
data[i].enableFlag = data[i].shelfProductApiEntity && data[i].shelfProductApiEntity.enableFlag
|
|
}
|
|
}
|
|
this.disabled = false
|
|
this.disabled = false
|
|
|
|
+ this.orginData = data
|
|
}
|
|
}
|
|
this.spinning = false
|
|
this.spinning = false
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- basicInfoData: null,
|
|
+ basicInfoData: null, // 基础设置弹框
|
|
- openTipsModal: false,
|
|
+ openTipsModal: false, // 更换产品提示弹框
|
|
- openModal: false,
|
|
+ openModal: false, // 修改信息/绑定产品/更换产品弹框
|
|
- nowData: null,
|
|
+ nowData: null, // 当前操作货位产品数据
|
|
- openGuideModal: false,
|
|
+ openGuideModal: false, // 导入产品
|
|
- modalType: null,
|
|
+ modalType: null, // 新增或编辑
|
|
- openInfoModal: false,
|
|
+ openInfoModal: false, // 基础设置弹框
|
|
- openHwModal: false,
|
|
+ openHwModal: false, // 新增编辑货位弹框
|
|
- openImportModal: false,
|
|
+ openImportModal: false, // 导入货位模板弹框
|
|
- showPriceStr: [],
|
|
+ showPriceStr: [], // 货架产品价格权限
|
|
- showNoShelfPriceStr: []
|
|
+ showNoShelfPriceStr: [] // 非货架产品价格权限
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- computed:{
|
|
+ computed: {
|
|
- columns(){
|
|
+ // 是否显示模板导入按钮
|
|
|
|
+ showTplBtn () {
|
|
|
|
+ return this.orginData.length == 0
|
|
|
|
+ },
|
|
|
|
+ // 列定义
|
|
|
|
+ columns () {
|
|
const _this = this
|
|
const _this = this
|
|
const ret = [
|
|
const ret = [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
@@ -245,9 +277,10 @@ export default {
|
|
{ title: '车主价', dataIndex: 'shelfProductApiEntity.price', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
{ title: '车主价', dataIndex: 'shelfProductApiEntity.price', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
{ slots: { title: 'customTitle' }, dataIndex: 'shelfProductApiEntity.cost', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
{ slots: { title: 'customTitle' }, dataIndex: 'shelfProductApiEntity.cost', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
{ title: '最大库容', dataIndex: 'shelfProductApiEntity.maxQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '最大库容', dataIndex: 'shelfProductApiEntity.maxQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '当前库存', dataIndex: 'shelfProductApiEntity.qty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
+ { title: '当前库存', dataIndex: 'shelfProductApiEntity.qty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
]
|
|
]
|
|
- if(this.basicInfoData&&this.basicInfoData.state!='WRITE_OFF'&&this.basicInfoData.state!='SUSPEND'){
|
|
+ // 注销或停用的货架不能操作
|
|
|
|
+ if (this.basicInfoData && this.basicInfoData.state != 'WRITE_OFF' && this.basicInfoData.state != 'SUSPEND') {
|
|
ret.push({ title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' })
|
|
ret.push({ title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' })
|
|
}
|
|
}
|
|
return ret
|
|
return ret
|
|
@@ -260,30 +293,52 @@ export default {
|
|
this.showNoShelfPriceStr = []
|
|
this.showNoShelfPriceStr = []
|
|
getShelfPriceShow({ shelfSn: this.$route.params.sn }).then(res => {
|
|
getShelfPriceShow({ shelfSn: this.$route.params.sn }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- const ret = res.data&&res.data
|
|
+ const ret = res.data && res.data
|
|
this.basicInfoData.showPrice = ret
|
|
this.basicInfoData.showPrice = ret
|
|
ret.map(item => {
|
|
ret.map(item => {
|
|
- if(item.paramCode == 'shelf_price_show'&&item.paramValue == 1){
|
|
+ if (item.paramCode == 'shelf_price_show' && item.paramValue == 1) {
|
|
- this.showPriceStr.push("车主价")
|
|
+ this.showPriceStr.push('车主价')
|
|
}
|
|
}
|
|
- if(item.paramCode == 'shelf_cost_show'&&item.paramValue == 1){
|
|
+ if (item.paramCode == 'shelf_cost_show' && item.paramValue == 1) {
|
|
- this.showPriceStr.push("结算价")
|
|
+ this.showPriceStr.push('结算价')
|
|
}
|
|
}
|
|
- if(item.paramCode == 'non_shelf_price_show'&&item.paramValue == 1){
|
|
+ if (item.paramCode == 'non_shelf_price_show' && item.paramValue == 1) {
|
|
- this.showNoShelfPriceStr.push("车主价")
|
|
+ this.showNoShelfPriceStr.push('车主价')
|
|
}
|
|
}
|
|
- if(item.paramCode == 'non_shelf_cost_show'&&item.paramValue == 1){
|
|
+ if (item.paramCode == 'non_shelf_cost_show' && item.paramValue == 1) {
|
|
- this.showNoShelfPriceStr.push("结算价")
|
|
+ this.showNoShelfPriceStr.push('结算价')
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ closeTplModal () {
|
|
|
|
+ this.tplSn = undefined
|
|
|
|
+ this.showTplModal = false
|
|
|
|
+ },
|
|
|
|
+ // 导入模板成功
|
|
|
|
+ saveTpl () {
|
|
|
|
+ if (!this.tplSn) {
|
|
|
|
+ this.$message.success('请选择货架模板')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.spinning) {
|
|
|
|
+ this.spinning = true
|
|
|
|
+ importShelfTemplate({ shelfSn: this.$route.params.sn, templateSn: this.tplSn }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.$message.success(res.message)
|
|
|
|
+ this.showTplModal = false
|
|
|
|
+ this.resetSearchForm()
|
|
|
|
+ }
|
|
|
|
+ this.spinning = false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 导出产品
|
|
// 导出产品
|
|
handleExport () {
|
|
handleExport () {
|
|
this.exportLoading = true
|
|
this.exportLoading = true
|
|
- shelfProductExport({shelfSn: this.$route.params.sn}).then(res => {
|
|
+ shelfProductExport({ shelfSn: this.$route.params.sn }).then(res => {
|
|
- downloadExcel(res, (this.basicInfoData?this.basicInfoData.shelfName:'')+"的产品")
|
|
+ downloadExcel(res, (this.basicInfoData ? this.basicInfoData.shelfName : '') + '的产品')
|
|
this.exportLoading = false
|
|
this.exportLoading = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -299,7 +354,7 @@ export default {
|
|
this.openHwModal = true
|
|
this.openHwModal = true
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 禁用启用
|
|
+ // 禁用启用弹框提示
|
|
handleEnable (row) {
|
|
handleEnable (row) {
|
|
const _this = this
|
|
const _this = this
|
|
if (row.enableFlag == 1) {
|
|
if (row.enableFlag == 1) {
|
|
@@ -315,10 +370,15 @@ export default {
|
|
_this.enableFun(row)
|
|
_this.enableFun(row)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 禁用启用货架
|
|
enableFun (row) {
|
|
enableFun (row) {
|
|
const _this = this
|
|
const _this = this
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
- shelfProductEnable({ shelfSn: this.$route.params.sn, shelfProductSn: row.shelfProductApiEntity.shelfProductSn, enableFlag: row.enableFlag == 1 ? 0 : 1 }).then(res => {
|
|
+ shelfProductEnable({
|
|
|
|
+ shelfSn: this.$route.params.sn,
|
|
|
|
+ shelfProductSn: row.shelfProductApiEntity.shelfProductSn,
|
|
|
|
+ enableFlag: row.enableFlag == 1 ? 0 : 1
|
|
|
|
+ }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
_this.$message.success(res.message)
|
|
_this.$message.success(res.message)
|
|
_this.$refs.table.refresh()
|
|
_this.$refs.table.refresh()
|
|
@@ -343,6 +403,7 @@ export default {
|
|
shelfDetail({ sn: this.$route.params.sn }).then(res => {
|
|
shelfDetail({ sn: this.$route.params.sn }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.basicInfoData = res.data
|
|
this.basicInfoData = res.data
|
|
|
|
+ // 获取价格权限
|
|
this.getShelfPriceShow()
|
|
this.getShelfPriceShow()
|
|
} else {
|
|
} else {
|
|
this.basicInfoData = null
|
|
this.basicInfoData = null
|
|
@@ -386,6 +447,7 @@ export default {
|
|
this.modalType = type
|
|
this.modalType = type
|
|
this.openModal = true
|
|
this.openModal = true
|
|
},
|
|
},
|
|
|
|
+ // 编辑弹框取消
|
|
handleCancel () {
|
|
handleCancel () {
|
|
this.modalType = null
|
|
this.modalType = null
|
|
this.nowData = null
|
|
this.nowData = null
|
|
@@ -400,20 +462,22 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 编辑基本信息成功
|
|
handleInfoOk () {
|
|
handleInfoOk () {
|
|
this.getDetail()
|
|
this.getDetail()
|
|
},
|
|
},
|
|
- // 重置
|
|
+ // 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.queryParam.shelfProductApiEntity.productCode = ''
|
|
this.queryParam.shelfProductApiEntity.productCode = ''
|
|
this.queryParam.shelfProductApiEntity.productName = ''
|
|
this.queryParam.shelfProductApiEntity.productName = ''
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
|
|
+ // 计算表格高度
|
|
setTableH () {
|
|
setTableH () {
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
this.tableHeight = window.innerHeight - tableSearchH - 350
|
|
this.tableHeight = window.innerHeight - tableSearchH - 350
|
|
},
|
|
},
|
|
- // 返回列表
|
|
+ // 返回列表
|
|
handleBack () {
|
|
handleBack () {
|
|
this.$router.push({ path: '/numsGoodsShelves/shelfSet/list' })
|
|
this.$router.push({ path: '/numsGoodsShelves/shelfSet/list' })
|
|
}
|
|
}
|