| | |
| | | <a-card :bordered="false"> |
| | | <a-row type="flex" :gutter="16"> |
| | | <a-col :md="5"> |
| | | <WarehouseTree/> |
| | | <WarehouseTree :title="title"/> |
| | | </a-col> |
| | | <a-col :md="19"> |
| | | <GoodsShelvesList/> |
| | |
| | | WarehouseTree |
| | | }, |
| | | data() { |
| | | return {} |
| | | return { |
| | | title: '库位货架管理' |
| | | } |
| | | }, |
| | | methods: {} |
| | | } |
| | |
| | | <a-card :bordered="false"> |
| | | <a-row type="flex" :gutter="16"> |
| | | <a-col :md="5"> |
| | | <WarehouseTree/> |
| | | <WarehouseTree :title="title"/> |
| | | </a-col> |
| | | <a-col :md="19"> |
| | | <WarehouseList/> |
| | |
| | | WarehouseTree |
| | | }, |
| | | data() { |
| | | return {} |
| | | return { |
| | | title: '仓库管理' |
| | | } |
| | | }, |
| | | methods: {} |
| | | } |
| | |
| | | <a-card |
| | | :loading="cardLoading" |
| | | :bordered="false" |
| | | title="仓库管理" |
| | | :title="title" |
| | | style="height: 100%;" |
| | | > |
| | | <a-spin :spinning="loading"> |
| | |
| | | components: { |
| | | Tooltip, |
| | | }, |
| | | props: ['value'], |
| | | props: { |
| | | value: {}, |
| | | title: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | searchInput: '', |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="库位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationCode"> |
| | | <a-input v-model="model.locationCode" placeholder="请输入库位号" ></a-input> |
| | | <a-form-model-item label="货架编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shelfNumber"> |
| | | <a-input v-model="model.shelfNumber" placeholder="请输入货架编号" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="货架名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shelfName"> |
| | | <a-input v-model="model.shelfName" placeholder="请输入货架名称" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | |
| | | <a-input v-model="model.columnNumber" placeholder="请输入列数" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="库位号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="true" :value="locationCode" placeholder="请输入库位号" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="货架编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shelfNumber"> |
| | | <a-input v-model="model.shelfNumber" placeholder="请输入货架编号" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="货架名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shelfName"> |
| | | <a-input v-model="model.shelfName" placeholder="请输入货架名称" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> |
| | | <a-textarea v-model="model.remark" rows="4" placeholder="请输入备注" /> |
| | |
| | | data () { |
| | | return { |
| | | model:{ |
| | | }, |
| | | warehouseId: '', |
| | | warehouseNum: '', |
| | | warehouseName: '', |
| | | shelfNumber: '', |
| | | shelfName: '', |
| | | storey: '', |
| | | arrange: '', |
| | | columnNumber: '', |
| | | locationCode: '', |
| | | remark: '' |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | |
| | | storey: [ |
| | | { required: true, message: '请输入层数!'}, |
| | | ], |
| | | arrange: [ |
| | | { required: true, message: '请输入排数!'}, |
| | | ], |
| | | columnNumber: [ |
| | | { required: true, message: '请输入列数!'}, |
| | | ], |
| | | shelfNumber: [ |
| | | { required: true, message: '请输入货架号!'}, |
| | | ], |
| | | shelfName: [ |
| | | { required: true, message: '请输入货架名称!'}, |
| | | ], |
| | | }, |
| | | url: { |
| | | add: "/tms/goodsShelves/add", |
| | |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | //拼接库位号 |
| | | locationCode() { |
| | | const { shelfNumber, storey, arrange, columnNumber } = this.model; |
| | | if (shelfNumber || storey || arrange || columnNumber) { |
| | | return `${shelfNumber}${storey}${arrange}${columnNumber}`; |
| | | } |
| | | return ''; |
| | | } |
| | | }, |
| | | created () { |
| | | //备份model原始值 |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
| | | }, |
| | | methods: { |
| | | updateLocationCode() { |
| | | this.model.locationCode = this.locationCode; |
| | | }, |
| | | add (treeSelected) { |
| | | this.modelDefault.warehouseId = treeSelected.key |
| | | this.modelDefault.warehouseNum = treeSelected.entity.warehouseId |
| | |
| | | |
| | | }) |
| | | }, |
| | | }, |
| | | watch: { |
| | | 'model.shelfNumber': 'updateLocationCode', |
| | | 'model.storey': 'updateLocationCode', |
| | | 'model.arrange': 'updateLocationCode', |
| | | 'model.columnNumber': 'updateLocationCode' |
| | | } |
| | | } |
| | | </script> |