|
@@ -29,12 +29,12 @@
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="产品编码">
|
|
<a-form-item label="产品编码">
|
|
- <a-input id="shelfSet-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
|
|
|
|
|
|
+ <a-input id="shelfSet-productCode" v-model.trim="queryParam.shelfProductApiEntity.productCode" allowClear placeholder="请输入产品编码"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="产品名称">
|
|
<a-form-item label="产品名称">
|
|
- <a-input id="shelfSet-productName" v-model.trim="queryParam.productEntity.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
|
|
|
+ <a-input id="shelfSet-productName" v-model.trim="queryParam.shelfProductApiEntity.productName" allowClear placeholder="请输入产品名称"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -73,21 +73,21 @@
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
class="button-primary"
|
|
class="button-primary"
|
|
- v-if="!!record.productSn"
|
|
|
|
|
|
+ v-if="!!(record.shelfProductApiEntity&&record.shelfProductApiEntity.productSn)"
|
|
@click="handleProduct(record, 'edit')"
|
|
@click="handleProduct(record, 'edit')"
|
|
id="shelfMonitoringList-edit-btn">修改信息</a-button>
|
|
id="shelfMonitoringList-edit-btn">修改信息</a-button>
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
class="button-primary"
|
|
class="button-primary"
|
|
- v-if="!!record.productSn"
|
|
|
|
|
|
+ v-if="!!(record.shelfProductApiEntity&&record.shelfProductApiEntity.productSn)"
|
|
@click="handleReplace(record)"
|
|
@click="handleReplace(record)"
|
|
id="shelfMonitoringList-replace-btn">更换产品</a-button>
|
|
id="shelfMonitoringList-replace-btn">更换产品</a-button>
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
class="button-primary"
|
|
class="button-primary"
|
|
- v-if="!record.productSn"
|
|
|
|
|
|
+ v-if="!(record.shelfProductApiEntity&&record.shelfProductApiEntity.productSn)"
|
|
@click="handleProduct(record, 'bind')"
|
|
@click="handleProduct(record, 'bind')"
|
|
id="shelfMonitoringList-bind-btn">绑定产品</a-button>
|
|
id="shelfMonitoringList-bind-btn">绑定产品</a-button>
|
|
</template>
|
|
</template>
|
|
@@ -128,20 +128,20 @@ export default {
|
|
spinning: false,
|
|
spinning: false,
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
queryParam: {
|
|
queryParam: {
|
|
- productCode: '',
|
|
|
|
- productEntity: {
|
|
|
|
|
|
+ shelfProductApiEntity: {
|
|
|
|
+ productCode: '',
|
|
productName: ''
|
|
productName: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '货位号', dataIndex: 'shelfPlaceCode', width: '15%', align: 'center', customRender: function (text) { return 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: '绑定产品编码', 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: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '结算价', dataIndex: 'shelfProductApiEntity.cost', 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: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
@@ -195,13 +195,17 @@ export default {
|
|
},
|
|
},
|
|
// 更换产品/绑定产品/修改信息
|
|
// 更换产品/绑定产品/修改信息
|
|
handleProduct (row, type) {
|
|
handleProduct (row, type) {
|
|
|
|
+ if(row){
|
|
|
|
+ this.nowData = Object.assign(row, { customerSn: this.basicInfoData&&this.basicInfoData.customerEntity&&this.basicInfoData.customerEntity.customerSn })
|
|
|
|
+ }else{
|
|
|
|
+ this.nowData = null
|
|
|
|
+ }
|
|
this.nowData = row || null
|
|
this.nowData = row || null
|
|
this.modalType = type
|
|
this.modalType = type
|
|
this.openModal = true
|
|
this.openModal = true
|
|
},
|
|
},
|
|
handleOk () {
|
|
handleOk () {
|
|
this.$refs.table.refresh()
|
|
this.$refs.table.refresh()
|
|
- this.handleCancel()
|
|
|
|
},
|
|
},
|
|
handleCancel () {
|
|
handleCancel () {
|
|
this.nowData = null
|
|
this.nowData = null
|
|
@@ -220,8 +224,8 @@ export default {
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
- this.queryParam.productCode = ''
|
|
|
|
- this.queryParam.productEntity.productName = ''
|
|
|
|
|
|
+ this.queryParam.shelfProductApiEntity.productCode = ''
|
|
|
|
+ this.queryParam.shelfProductApiEntity.productName = ''
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
// 返回列表
|
|
// 返回列表
|