库存冻结功能
This commit is contained in:
parent
ca8bcc00b9
commit
8a00d82a45
@ -42,3 +42,16 @@ export function delArea(areaId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//更改库位的冻结状态
|
||||||
|
export function changeFrozenState(areaId, status) {
|
||||||
|
const data = {
|
||||||
|
'areaId': areaId,
|
||||||
|
'frozenFlag': status
|
||||||
|
}
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/area',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -42,3 +42,16 @@ export function delLocation(locationId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//更改库区的冻结状态
|
||||||
|
export function changeFrozenState(locationId, status) {
|
||||||
|
const data = {
|
||||||
|
'locationId': locationId,
|
||||||
|
'frozenFlag': status
|
||||||
|
}
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/location',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -49,3 +49,16 @@ export function delWarehouse(warehouseId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//更改仓库的冻结状态
|
||||||
|
export function changeFrozenState(warehouseId, status) {
|
||||||
|
const data = {
|
||||||
|
'warehouseId': warehouseId,
|
||||||
|
'frozenFlag': status
|
||||||
|
}
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/warehouse',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -42,3 +42,16 @@ export function delWmstock(materialStockId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//更改库存的冻结状态
|
||||||
|
export function changeFrozenState(materialStockId, status) {
|
||||||
|
const data = {
|
||||||
|
'materialStockId': materialStockId,
|
||||||
|
'frozenFlag': status
|
||||||
|
}
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/wmstock',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -127,6 +127,18 @@
|
|||||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag"/>
|
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="是否冻结" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.frozenFlag"
|
||||||
|
active-text="是"
|
||||||
|
inactive-text="否"
|
||||||
|
active-value="Y"
|
||||||
|
inactive-value="N"
|
||||||
|
@change="handleFrozenChange(scope.row)"
|
||||||
|
></el-switch>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -245,7 +257,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listArea, getArea, delArea, addArea, updateArea } from "@/api/mes/wm/area";
|
import { listArea, getArea, delArea, addArea, updateArea, changeFrozenState } from "@/api/mes/wm/area";
|
||||||
import {genCode} from "@/api/system/autocode/rule"
|
import {genCode} from "@/api/system/autocode/rule"
|
||||||
export default {
|
export default {
|
||||||
name: "Area",
|
name: "Area",
|
||||||
@ -413,6 +425,20 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 冻结状态变更
|
||||||
|
* @param row
|
||||||
|
*/
|
||||||
|
handleFrozenChange(row){
|
||||||
|
let text = row.frozenFlag === "Y" ? "冻结" : "解冻";
|
||||||
|
this.$modal.confirm('确认要"' + text + '""' + row.areaName + '"库位吗?').then(function() {
|
||||||
|
return changeFrozenState(row.areaId,row.frozenFlag);
|
||||||
|
}).then(() => {
|
||||||
|
this.$modal.msgSuccess(text + "成功");
|
||||||
|
}).catch(function() {
|
||||||
|
row.frozenFlag = row.frozenFlag === "N" ? "Y" : "N";
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const areaIds = row.areaId || this.ids;
|
const areaIds = row.areaId || this.ids;
|
||||||
|
@ -64,6 +64,18 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库区名称" align="center" prop="locationName" />
|
<el-table-column label="库区名称" align="center" prop="locationName" />
|
||||||
<el-table-column label="面积" align="center" prop="area" />
|
<el-table-column label="面积" align="center" prop="area" />
|
||||||
|
<el-table-column label="是否冻结" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.frozenFlag"
|
||||||
|
active-text="是"
|
||||||
|
inactive-text="否"
|
||||||
|
active-value="Y"
|
||||||
|
inactive-value="N"
|
||||||
|
@change="handleFrozenChange(scope.row)"
|
||||||
|
></el-switch>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -149,7 +161,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listLocation, getLocation, delLocation, addLocation, updateLocation } from "@/api/mes/wm/location";
|
import { listLocation, getLocation, delLocation, addLocation, updateLocation, changeFrozenState} from "@/api/mes/wm/location";
|
||||||
import {genCode} from "@/api/system/autocode/rule"
|
import {genCode} from "@/api/system/autocode/rule"
|
||||||
export default {
|
export default {
|
||||||
name: "Location",
|
name: "Location",
|
||||||
@ -330,6 +342,21 @@ export default {
|
|||||||
debugger;
|
debugger;
|
||||||
this.$router.push({ path: '/mes/wm/area/index', query: { locationId: locationId || 0 ,optType: this.optType} })
|
this.$router.push({ path: '/mes/wm/area/index', query: { locationId: locationId || 0 ,optType: this.optType} })
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 冻结状态变更
|
||||||
|
* @param row
|
||||||
|
*/
|
||||||
|
handleFrozenChange(row){
|
||||||
|
let text = row.frozenFlag === "Y" ? "冻结" : "解冻";
|
||||||
|
this.$modal.confirm('确认要"' + text + '""' + row.locationName + '"库区吗?').then(function() {
|
||||||
|
return changeFrozenState(row.locationId,row.frozenFlag);
|
||||||
|
}).then(() => {
|
||||||
|
this.$modal.msgSuccess(text + "成功");
|
||||||
|
}).catch(function() {
|
||||||
|
row.frozenFlag = row.frozenFlag === "N" ? "Y" : "N";
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
//自动生成编码
|
//自动生成编码
|
||||||
handleAutoGenChange(autoGenFlag){
|
handleAutoGenChange(autoGenFlag){
|
||||||
if(autoGenFlag){
|
if(autoGenFlag){
|
||||||
|
@ -78,7 +78,19 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="负责人" align="center" prop="charge" />
|
<el-table-column label="负责人" align="center" prop="charge" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
<el-table-column label="是否冻结" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.frozenFlag"
|
||||||
|
active-text="是"
|
||||||
|
inactive-text="否"
|
||||||
|
active-value="Y"
|
||||||
|
inactive-value="N"
|
||||||
|
@change="handleFrozenChange(scope.row)"
|
||||||
|
></el-switch>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="操作" align="center" width="200px" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="200px" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -175,7 +187,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listWarehouse, getWarehouse, delWarehouse, addWarehouse, updateWarehouse } from "@/api/mes/wm/warehouse";
|
import { listWarehouse, getWarehouse, delWarehouse, addWarehouse, updateWarehouse,changeFrozenState } from "@/api/mes/wm/warehouse";
|
||||||
import {genCode} from "@/api/system/autocode/rule"
|
import {genCode} from "@/api/system/autocode/rule"
|
||||||
export default {
|
export default {
|
||||||
name: "Warehouse",
|
name: "Warehouse",
|
||||||
@ -330,6 +342,22 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冻结状态变更
|
||||||
|
* @param row
|
||||||
|
*/
|
||||||
|
handleFrozenChange(row){
|
||||||
|
let text = row.frozenFlag === "Y" ? "冻结" : "解冻";
|
||||||
|
this.$modal.confirm('确认要"' + text + '""' + row.warehouseName + '"仓库吗?').then(function() {
|
||||||
|
return changeFrozenState(row.warehouseId,row.frozenFlag);
|
||||||
|
}).then(() => {
|
||||||
|
this.$modal.msgSuccess(text + "成功");
|
||||||
|
}).catch(function() {
|
||||||
|
row.frozenFlag = row.frozenFlag === "N" ? "Y" : "N";
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const warehouseIds = row.warehouseId || this.ids;
|
const warehouseIds = row.warehouseId || this.ids;
|
||||||
|
@ -128,6 +128,18 @@
|
|||||||
<span>{{ parseTime(scope.row.expireDate, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.expireDate, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="是否冻结" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.frozenFlag"
|
||||||
|
active-text="是"
|
||||||
|
inactive-text="否"
|
||||||
|
active-value="Y"
|
||||||
|
inactive-value="N"
|
||||||
|
@change="handleFrozenChange(scope.row)"
|
||||||
|
></el-switch>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
@ -143,7 +155,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listWmstock, getWmstock, delWmstock, addWmstock, updateWmstock } from "@/api/mes/wm/wmstock";
|
import { listWmstock, getWmstock, delWmstock, addWmstock, updateWmstock, changeFrozenState } from "@/api/mes/wm/wmstock";
|
||||||
import { treeselect } from "@/api/mes/md/itemtype";
|
import { treeselect } from "@/api/mes/md/itemtype";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
@ -231,6 +243,21 @@ export default {
|
|||||||
this.itemTypeOptions = response.data;
|
this.itemTypeOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 冻结状态变更
|
||||||
|
* @param row
|
||||||
|
*/
|
||||||
|
handleFrozenChange(row){
|
||||||
|
let text = row.frozenFlag === "Y" ? "冻结" : "解冻";
|
||||||
|
this.$modal.confirm('确认要"' + text + '""' + row.materialStockId + '"此库存吗?').then(function() {
|
||||||
|
return changeFrozenState(row.materialStockId,row.frozenFlag);
|
||||||
|
}).then(() => {
|
||||||
|
this.$modal.msgSuccess(text + "成功");
|
||||||
|
}).catch(function() {
|
||||||
|
row.frozenFlag = row.frozenFlag === "N" ? "Y" : "N";
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
// 筛选节点
|
// 筛选节点
|
||||||
filterNode(value, data) {
|
filterNode(value, data) {
|
||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user