| | |
| | | <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" prop="cellsNum"> |
| | | <a-input v-model="model.cellsNum" placeholder="请输入格数" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="库位号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-model="model.locationCode" placeholder="请输入库位号" ></a-input> |
| | |
| | | storey: '', |
| | | arrange: '', |
| | | columnNumber: '', |
| | | cellsNum:'', |
| | | locationCode: '', |
| | | remark: '' |
| | | }, |
| | |
| | | ], |
| | | shelfNumber: [ |
| | | { required: true, message: '请输入货架号!'}, |
| | | { validator: this.validateShelfNumber }, |
| | | ], |
| | | shelfName: [ |
| | | { required: true, message: '请输入货架名称!'}, |
| | |
| | | url: { |
| | | add: "/tms/goodsShelves/add", |
| | | edit: "/tms/goodsShelves/edit", |
| | | queryById: "/tms/goodsShelves/queryById" |
| | | } |
| | | queryById: "/tms/goodsShelves/queryById", |
| | | checkShelfNum:"/tms/goodsShelves/checkShelfNum" |
| | | }, |
| | | warehouseId:'' |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | //拼接库位号 |
| | | autoGeneratedLocationCode() { |
| | | const { shelfNumber, storey, arrange, columnNumber } = this.model; |
| | | if (shelfNumber || storey || arrange || columnNumber) { |
| | | return `${shelfNumber}${storey}${arrange}${columnNumber}`; |
| | | const { shelfNumber, storey, arrange, columnNumber, cellsNum } = this.model; |
| | | if (shelfNumber || storey || arrange || columnNumber || cellsNum) { |
| | | return `${shelfNumber}${storey}${arrange}${columnNumber}${cellsNum}`; |
| | | } |
| | | return ''; |
| | | } |
| | |
| | | edit (record) { |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | this.warehouseId = record.warehouseId |
| | | }, |
| | | submitForm () { |
| | | const that = this; |
| | |
| | | |
| | | }) |
| | | }, |
| | | //验证 货架号 |
| | | validateShelfNumber(rule, value, callback) { |
| | | var params = { |
| | | warehouseId: this.warehouseId, |
| | | shelfNumber: value, |
| | | }; |
| | | getAction(this.url.checkShelfNum,params).then((res) => { |
| | | if (res.success) { |
| | | callback(); |
| | | } else { |
| | | callback("货架编号已存在!"); |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | watch: { |
| | | autoGeneratedLocationCode(newVal) { |