|
@@ -13,10 +13,13 @@
|
|
|
<a-collapse-panel key="1">
|
|
|
<template slot="header">
|
|
|
<span>基础信息</span>
|
|
|
- <a-button icon="edit" 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'" size="small" type="link" style="margin-left: 20px;color: #39f;" @click.stop="openInfoModal = true">编辑</a-button>
|
|
|
</template>
|
|
|
<a-descriptions :column="2">
|
|
|
- <a-descriptions-item label="货架名称">{{ basicInfoData&&basicInfoData.shelfName || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="货架名称">
|
|
|
+ {{ 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-descriptions-item>
|
|
|
<a-descriptions-item>
|
|
|
<template slot="label">
|
|
|
货架产品
|
|
@@ -69,7 +72,7 @@
|
|
|
</a-form>
|
|
|
</div>
|
|
|
<!-- 操作按钮 -->
|
|
|
- <div class="table-operator">
|
|
|
+ <div class="table-operator" v-if="basicInfoData&&basicInfoData.state!='WRITE_OFF'">
|
|
|
<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-import" type="primary" class="button-error" @click="openGuideModal=true">导入绑定产品</a-button>
|
|
@@ -179,7 +182,6 @@ export default {
|
|
|
components: { STable, VSelect, commonModal, bindProductModal, addHwModal, ImportGuideModal, basicInfoModal, importHuoweiModal },
|
|
|
mixins: [commonMixin],
|
|
|
data () {
|
|
|
- const _this = this
|
|
|
return {
|
|
|
spinning: false,
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
@@ -190,17 +192,6 @@ export default {
|
|
|
productName: ''
|
|
|
}
|
|
|
},
|
|
|
- columns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { title: '货位号', dataIndex: 'shelfPlaceCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '绑定产品编码', dataIndex: 'shelfProductApiEntity.productCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '绑定产品名称', dataIndex: 'shelfProductApiEntity.productName', width: '23%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { 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) : '--') } },
|
|
|
- { 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: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
|
|
|
- ],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -232,6 +223,25 @@ export default {
|
|
|
showNoShelfPriceStr: []
|
|
|
}
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ columns(){
|
|
|
+ const _this = this
|
|
|
+ const ret = [
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
+ { title: '货位号', dataIndex: 'shelfPlaceCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '绑定产品编码', dataIndex: 'shelfProductApiEntity.productCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '绑定产品名称', dataIndex: 'shelfProductApiEntity.productName', width: '23%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { 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) : '--') } },
|
|
|
+ { 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 : '--') } },
|
|
|
+ ]
|
|
|
+ if(this.basicInfoData&&this.basicInfoData.state!='WRITE_OFF'){
|
|
|
+ ret.push({ title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' })
|
|
|
+ }
|
|
|
+ return ret
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 获取价格显示设置
|
|
|
getShelfPriceShow () {
|