|
@@ -19,6 +19,32 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-header>
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="600px" label-position="right">
|
|
|
+ <el-form-item label="仓库" prop="warehouseId" v-show="false">
|
|
|
+ <el-select v-model="queryParams.warehouseId" placeholder="请选择所属仓库" clearable size="small" style="width: 100%" >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in this.warehouseCombo"
|
|
|
+ :key="dict.warehouseId"
|
|
|
+ :label="dict.warehouseName"
|
|
|
+ :value="dict.warehouseId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="区域" prop="zoneId">
|
|
|
+ <el-select v-model="queryParams.zoneId" placeholder="请选择库区" clearable size="small" style="width: 100%">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in this.locationZoneCombo"
|
|
|
+ :key="dict.zoneId"
|
|
|
+ :label="dict.zoneName"
|
|
|
+ :value="dict.zoneId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
<el-main>
|
|
|
<el-card v-for="zone in locationZoneList" v-bind:key="zone.zoneName" class="box-card">
|
|
|
<div slot="header" class="clearfix">
|
|
@@ -50,14 +76,48 @@
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-main>
|
|
|
+ <!-- 点击库位弹出展示框做修改 -->
|
|
|
+ <el-dialog title="操作" :visible.sync="open" width="1000px" append-to-body>
|
|
|
+ <el-form>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="lockLoc()">锁定/解锁</el-button>
|
|
|
+ <el-button type="primary" @click="occupyLoc()">有货/无货</el-button>
|
|
|
+ <el-button type="primary" @click="clearLoc()">清空</el-button>
|
|
|
+ <!--<el-button type="primary" @click="submitForm">初始化一个空托盘</el-button>-->
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-divider content-position="center">批次属性信息</el-divider>
|
|
|
+ <el-table v-loading="loading" :data="form.lotattList">
|
|
|
+ <el-table-column label="物料" align="center" prop="sku" width="200"/>
|
|
|
+ <el-table-column label="物料名称" align="center" prop="skuName" width="200"/>
|
|
|
+ <el-table-column label="库位" align="center" prop="locationNo" width="200"/>
|
|
|
+ <el-table-column label="库存数量" align="center" prop="qty"/>
|
|
|
+ <el-table-column label="已分配数量" align="center" prop="qtyallocated" width="200"/>
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, index) in itemOption"
|
|
|
+ :key="index_back"
|
|
|
+ :label="item.label"
|
|
|
+ align="center" :prop="item.prop" width="200">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!--<el-descriptions title="批次属性" :column="2" border>
|
|
|
+ <el-descriptions-item v-for="(item, index) in itemOption" :label="item.label">{{form[`${item.prop}`]}}</el-descriptions-item>
|
|
|
+ </el-descriptions>-->
|
|
|
+ </el-dialog>
|
|
|
</el-container>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { locationInvView } from "@/api/ams/locationView";
|
|
|
+import {clearLocRequest, locationInvView, lockLocRequest, occupyLocRequest} from "@/api/ams/locationView";
|
|
|
+import {lotattInfo} from "@/api/ams/invLotLocId";
|
|
|
+import {lotattConfigList} from "@/api/ams/config";
|
|
|
+import {queryWarehouseDict} from "@/api/base/warehouse";
|
|
|
+import {queryLocationZoneDict} from "@/api/base/locationZone";
|
|
|
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
+ open: false,
|
|
|
+ showSearch: true,
|
|
|
dataForm: {
|
|
|
zoneId: ''
|
|
|
},
|
|
@@ -67,7 +127,30 @@ import { locationInvView } from "@/api/ams/locationView";
|
|
|
},
|
|
|
locationZoneList: [],
|
|
|
locationList: {'a': [1, 2, 3]},
|
|
|
- locationClearVisible: false
|
|
|
+ locationClearVisible: false,
|
|
|
+ // 表单参数
|
|
|
+ form: {
|
|
|
+ lotatt01: '',
|
|
|
+ lotatt02: '',
|
|
|
+ lotatt03: '',
|
|
|
+ lotatt04: '',
|
|
|
+ lotatt05: '',
|
|
|
+ lotatt06: '',
|
|
|
+ lotatt07: '',
|
|
|
+ lotatt08: '',
|
|
|
+ lotatt09: '',
|
|
|
+ lotatt10: '',
|
|
|
+ lotatt11: '',
|
|
|
+ lotatt12: '',
|
|
|
+ lotatt13: '',
|
|
|
+ lotatt14: '',
|
|
|
+ lotatt15: '',
|
|
|
+ lotatt16: '',
|
|
|
+ lotatt17: '',
|
|
|
+ lotatt18: '',
|
|
|
+ lotattList: null
|
|
|
+ },
|
|
|
+ itemOption: []
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
@@ -84,14 +167,87 @@ import { locationInvView } from "@/api/ams/locationView";
|
|
|
methods: {
|
|
|
getDataList () {
|
|
|
this.dataListLoading = true
|
|
|
+ queryWarehouseDict().then(response => {
|
|
|
+ this.warehouseCombo = response.data
|
|
|
+ });
|
|
|
+ queryLocationZoneDict().then(response => {
|
|
|
+ this.locationZoneCombo = response.data
|
|
|
+ })
|
|
|
locationInvView(this.queryParams).then(response => {
|
|
|
this.locationZoneList = response.data
|
|
|
})
|
|
|
this.dataListLoading = false
|
|
|
},
|
|
|
changeLocation(o){
|
|
|
+ this.selected(o)
|
|
|
// alert(o.locationNo);
|
|
|
- }
|
|
|
+ },
|
|
|
+ resetQuery() {//重置搜索
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.getDataList();
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ selected(item) {
|
|
|
+ if (item.locationNo) {
|
|
|
+ this.currentSelect = parseInt(item.id)
|
|
|
+ this.open = true;
|
|
|
+ lotattInfo(this.currentSelect).then(response => {
|
|
|
+ this.form.lotattList = response.data
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ lotattConfigList().then(response => {
|
|
|
+ let data = response.data
|
|
|
+ for(let i=0;i<data.length;i++) {
|
|
|
+ let obj = new Object();
|
|
|
+ obj.label = data[i].lotattName
|
|
|
+ obj.prop = data[i].lotattId
|
|
|
+ this.itemOption.push(obj)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ lockLoc() {
|
|
|
+ let that = this
|
|
|
+ this.$modal.confirm('是否确认要锁定/解锁?').then(function() {
|
|
|
+ lockLocRequest(that.currentSelect).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ that.open = false;
|
|
|
+ that.$modal.msgSuccess(response.msg);
|
|
|
+ that.search();
|
|
|
+ } else {
|
|
|
+ that.$modal.msgError(response.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ occupyLoc() {
|
|
|
+ let that = this
|
|
|
+ this.$modal.confirm('是否确认要修改库位状态?').then(function() {
|
|
|
+ occupyLocRequest(that.currentSelect).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ that.open = false;
|
|
|
+ that.$modal.msgSuccess(response.msg);
|
|
|
+ that.search();
|
|
|
+ } else {
|
|
|
+ that.$modal.msgError(response.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ clearLoc() {
|
|
|
+ let that = this
|
|
|
+ this.$modal.confirm('是否确认要清空库存?').then(function() {
|
|
|
+ clearLocRequest(that.currentSelect).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ that.open = false;
|
|
|
+ that.$modal.msgSuccess(response.msg);
|
|
|
+ that.search();
|
|
|
+ } else {
|
|
|
+ that.$modal.msgError(response.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -163,7 +319,7 @@ import { locationInvView } from "@/api/ams/locationView";
|
|
|
height: 30px;
|
|
|
width: 80px;
|
|
|
text-align: center;
|
|
|
- margin-top: 10px;
|
|
|
+ margin-top: 42.5px;
|
|
|
padding-top: 5px;
|
|
|
}
|
|
|
|