盘点添加属性 修改字段

master
Mr.sun 2 years ago
parent ed9f1b3a16
commit a740f63758
  1. 3
      src/api/wms/busFunctions/reportForms/lockInStock.js
  2. 186
      src/views/libraryManage/inventory/InventoryEntry.vue
  3. 189
      src/views/libraryManage/inventory/config.js
  4. 5
      src/views/libraryManage/inventory/inventory.vue
  5. 64
      src/views/libraryManage/lockOutStore/index.vue

@ -52,7 +52,8 @@ export function unLockStockQty(data) {
//锁定库存出库列表
export function getLockstockOutList(data) {
return request({
url: '/wms/lock/getLockstockOutList',
// url: '/wms/lock/getLockstockOutList',
url: 'wms/stock/lock/getLockstockOutList',
method: 'get',
params: data
})

@ -2,7 +2,10 @@
<div class="app-container">
<!-- 盘点录入 -->
<div class="search-box">
<el-form :inline="true" :model="enterForm">
<el-form
:inline="true"
:model="enterForm"
>
<el-form-item label="单据编号">
<el-input
v-model="enterForm.invOrderNo"
@ -10,9 +13,26 @@
clearable
></el-input>
</el-form-item>
<el-form-item label="物料">
<el-input
v-model="enterForm.invOrderNo"
placeholder="请输入物料"
clearable
></el-input>
</el-form-item>
<el-form-item label="货位">
<el-input
v-model="enterForm.locationCode"
placeholder="请输货位"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="queryTable">搜索</el-button>
<el-button
type="primary"
@click="queryTable"
>搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
@ -25,16 +45,14 @@
type="primary"
@click="calce"
:disabled="!handleSelect.length != 0"
>取消盘点</el-button
>
>取消盘点</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
:disabled="!handleSelect.length != 0"
@click="generateThePlan"
>保存</el-button
>
>执行</el-button>
</el-col>
</el-row>
</div>
@ -101,21 +119,16 @@
</div>
</template>
<script>
import { tableConfig } from "./config.js";
import { list, cancel, entrySave } from "@/api/libraryManage/inventory";
import { Debounce, getDictLabel } from "@/utils/index";
import { tableConfig } from './config.js'
import { list, cancel, entrySave } from '@/api/libraryManage/inventory'
import { Debounce, getDictLabel } from '@/utils/index'
export default {
name: "",
dicts: [
"goods_storage_conditions",
"goods_classify",
"goods_unit",
"inv_type_dict",
],
name: '',
dicts: ['goods_storage_conditions', 'goods_classify', 'goods_unit', 'inv_type_dict'],
data() {
return {
enterForm: {
invOrderNo: "",
invOrderNo: ''
},
selectData: [],
tableForm: { tableData: [] },
@ -125,115 +138,98 @@ export default {
paging: {
page: 1, //
size: 10, //
total: 0,
},
};
total: 0
}
}
},
mounted() {},
async created() {
this.queryTable();
this.queryTable()
this.tableConfig = await this.getTableHeaderCom(
"busin_inventory_add",
tableConfig.call(this),
"configEntry"
);
this.tableConfig = await this.getTableHeaderCom('busin_inventory_add', tableConfig.call(this), 'configEntry')
},
methods: {
//
queryTable() {
// if (!this.enterForm.invOrderNo) return this.$message("!");
this.loading = true;
this.loading = true
list({
invWay: "open",
...this.enterForm,
invWay: 'open',
...this.enterForm
})
.then((response) => {
if (response.code === 200) {
this.loading = false;
this.tableForm.tableData = response.rows;
this.loading = false
this.tableForm.tableData = response.rows
}
})
.catch(() => {
this.loading = false;
});
this.loading = false
})
},
//
handleselection(val) {
this.selectData = val;
this.handleSelect = val.map((ele) => ele.id);
this.selectData = val
this.handleSelect = val.map((ele) => ele.id)
},
//
resetQuery() {
this.enterForm = {};
this.enterForm = {}
},
onCalc3(row, prop) {
if (row.storageClassify === "0") {
if (row.storageClassify === '0') {
//
if (
prop === "invCase" &&
Number(row.invCase) !== 0 &&
Number(row.invPiece) !== 0
) {
this.$message.warning("整件和零散数不能同时录入");
if (prop === 'invCase' && Number(row.invCase) !== 0 && Number(row.invPiece) !== 0) {
this.$message.warning('整件和零散数不能同时录入')
// row.invCase = 0;
} else if (
prop === "invPiece" &&
Number(row.invCase) !== 0 &&
Number(row.invPiece) !== 0
) {
this.$message.warning("整件和零散数不能同时录入");
} else if (prop === 'invPiece' && Number(row.invCase) !== 0 && Number(row.invPiece) !== 0) {
this.$message.warning('整件和零散数不能同时录入')
// row.invPiece = 0;
}
} else {
// //
}
// (*+)
const [invCase, invPiece] = [row.invCase || 0, row.invPiece || 0];
row.invQty = Math.round(
Number(invCase) * Number(row.packageQty) + Number(invPiece)
);
const [invCase, invPiece] = [row.invCase || 0, row.invPiece || 0]
row.invQty = Math.round(Number(invCase) * Number(row.packageQty) + Number(invPiece))
},
onCalc2(row) {
// =/ =%
const [invQty, packageQty] = [row.invQty || 0, row.packageQty || 0];
row.invCase = Number(Math.floor(invQty / packageQty)); // 1.5 1
row.invPiece = Number(invQty - packageQty * row.invCase);
const [invQty, packageQty] = [row.invQty || 0, row.packageQty || 0]
row.invCase = Number(Math.floor(invQty / packageQty)) // 1.5 1
row.invPiece = Number(invQty - packageQty * row.invCase)
},
//
validateField(form, index, prop) {
let result = true;
let result = true
for (let item of this.$refs[form].fields) {
if (prop) {
if (
item.prop.split(".")[1] == index &&
item.prop.split(".")[2] !== prop
) {
if (item.prop.split('.')[1] == index && item.prop.split('.')[2] !== prop) {
this.$refs[form].validateField(item.prop, (err) => {
if (err != "") {
result = false;
if (err != '') {
result = false
}
});
})
}
} else {
if (item.prop.split(".")[1] == index) {
if (item.prop.split('.')[1] == index) {
this.$refs[form].validateField(item.prop, (err) => {
if (err != "") {
result = false;
if (err != '') {
result = false
}
});
})
}
}
// if (!result) break;
}
return result;
return result
},
//
async generateThePlan() {
let arr = [];
let arr = []
this.selectData.forEach((ele, index) => {
arr.push(this.validateField("tableForm", index));
});
arr.push(this.validateField('tableForm', index))
})
if (arr.some((k) => !k)) {
//
} else {
@ -241,20 +237,20 @@ export default {
// let valid2 = this.selectData.some((ele) => Number(ele.invPiece) === 0);
// let valid3 = this.selectData.some((ele) => Number(ele.invQty) === 0);
// if (!valid1 && !valid2 && !valid3) {
let arr2 = [];
let arr2 = []
this.selectData.forEach((ele, index) => {
let obj = {
id: ele.id,
invQty: ele.invQty,
invCase: ele.invCase,
invPiece: ele.invPiece,
};
arr2.push(obj);
});
invPiece: ele.invPiece
}
arr2.push(obj)
})
// ids
const { rows } = await entrySave(arr2);
this.$message.success("操作成功");
this.queryTable();
const { rows } = await entrySave(arr2)
this.$message.success('操作成功')
this.queryTable()
// } else {
// this.$message.warning("0");
// }
@ -262,13 +258,13 @@ export default {
},
//
calce() {
this.$confirm("是否确认删除所选明细?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm('是否确认删除所选明细?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.remove(this.handleSelect);
});
this.remove(this.handleSelect)
})
},
//
remove() {
@ -276,17 +272,17 @@ export default {
.then((response) => {
if (response.code === 200) {
this.$message({
message: "操作成功!",
type: "success",
});
this.queryTable();
message: '操作成功!',
type: 'success'
})
this.queryTable()
}
})
.catch(() => {
this.loading = false;
});
},
},
};
this.loading = false
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped></style>

@ -66,6 +66,11 @@ export function tableConfig() {
prop: "specifications",
istrue: true,
},
{
label: "库存数量",
prop: "quantity",
istrue: true,
},
{
label: "单位",
prop: "unit",
@ -84,26 +89,26 @@ export function tableConfig() {
type: "index",
istrue: true,
},
{
label: "业主编号",
prop: "consignorCode",
istrue: true,
},
{
label: "业主名称",
prop: "consignorName",
istrue: true,
},
// {
// label: "业主编号",
// prop: "consignorCode",
// istrue: true,
// },
// {
// label: "业主名称",
// prop: "consignorName",
// istrue: true,
// },
{
label: "单据编号",
prop: "invOrderNo",
istrue: true,
},
{
label: "日期",
prop: "productionDate",
istrue: true,
},
// {
// label: "日期",
// prop: "productionDate",
// istrue: true,
// },
{
label: "盘点类型",
prop: "invType",
@ -122,31 +127,31 @@ export function tableConfig() {
prop: "storageName",
istrue: true,
},
{
label: "区域编号",
prop: "areaCode",
istrue: true,
},
{
label: "产品编号",
prop: "goodNo",
istrue: true,
},
{
label: "产品名称",
prop: "goodName",
istrue: true,
},
{
label: "批号",
prop: "batchNo",
istrue: true,
},
{
label: "产品规格",
prop: "specifications",
istrue: true,
},
// {
// label: "区域编号",
// prop: "areaCode",
// istrue: true,
// },
// {
// label: "产品编号",
// prop: "goodNo",
// istrue: true,
// },
// {
// label: "产品名称",
// prop: "goodName",
// istrue: true,
// },
// {
// label: "批号",
// prop: "batchNo",
// istrue: true,
// },
// {
// label: "产品规格",
// prop: "specifications",
// istrue: true,
// },
{
label: "包装单位",
prop: "unit",
@ -155,21 +160,21 @@ export function tableConfig() {
// return getDictLabel(value, _that.dict.type.goods_unit);
// },
},
{
label: "包装数量",
prop: "packageQty",
istrue: true,
},
{
label: "生产厂家",
prop: "factory",
istrue: true,
},
{
label: "产地",
prop: "waster",
istrue: true,
},
// {
// label: "包装数量",
// prop: "packageQty",
// istrue: true,
// },
// {
// label: "生产厂家",
// prop: "factory",
// istrue: true,
// },
// {
// label: "产地",
// prop: "waster",
// istrue: true,
// },
{
label: "件数",
prop: "caseQty",
@ -185,28 +190,28 @@ export function tableConfig() {
// prop: "qty",
// istrue: true,
// },
{
label: "实盘件数",
prop: "invCase",
istrue: true,
type: "slot",
slotName: "invCase",
},
{
label: "实盘零散数",
prop: "invPiece",
istrue: true,
type: "slot",
slotName: "invPiece",
"min-width": 120,
},
{
label: "实盘数量",
prop: "invQty",
istrue: true,
type: "slot",
slotName: "invQty",
},
// {
// label: "实盘件数",
// prop: "invCase",
// istrue: true,
// type: "slot",
// slotName: "invCase",
// },
// {
// label: "实盘零散数",
// prop: "invPiece",
// istrue: true,
// type: "slot",
// slotName: "invPiece",
// "min-width": 120,
// },
// {
// label: "实盘数量",
// prop: "invQty",
// istrue: true,
// type: "slot",
// slotName: "invQty",
// },
],
rulesEntry: {
invCase: [
@ -232,21 +237,21 @@ export function tableConfig() {
prop: "consignorCode",
istrue: true,
},
{
label: "业主名称",
prop: "consignorName",
istrue: true,
},
{
label: "单据编号",
prop: "invOrderNo",
istrue: true,
},
{
label: "日期",
prop: "productionDate",
istrue: true,
},
// {
// label: "业主名称",
// prop: "consignorName",
// istrue: true,
// },
// {
// label: "单据编号",
// prop: "invOrderNo",
// istrue: true,
// },
// {
// label: "日期",
// prop: "productionDate",
// istrue: true,
// },
{
label: "盘点类型",
prop: "invType",

@ -161,7 +161,7 @@ export default {
storageId: '',
areaId: '',
locationCode: '',
invWay: 'close',
invWay: '',
invType: ''
},
options: [],
@ -236,6 +236,7 @@ export default {
//
handleselection(val) {
this.handleSelect = val.map((ele) => ele.id)
// this.ids = val.map((ele) => ele.stockId)
this.ids = val.map((ele) => ele.stockId)
},
//
@ -245,7 +246,7 @@ export default {
//
queryTable() {
// if (!this.enterForm.consignorId) return this.$message('!')
if (!this.enterForm.invWay) return this.$message('盘点方式必选!')
// if (!this.enterForm.invWay) return this.$message('!')
// if (!this.enterForm.invType) return this.$message('!')
this.loading = true
queryGoods({

@ -7,28 +7,6 @@
label-width="68px"
>
<el-form-item
label="机种"
prop="ptBreakCat"
style="width: 220px;"
>
<el-select
v-model="queryParams.ptBreakCat"
style="width:150px"
placeholder="请选择"
clearable
>
<el-option
v-for="item in BreakCatList"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="物料编号"
prop="ptPart"
@ -92,6 +70,7 @@
@handleUpdate="handleUpdate"
@handleselection="handleselection"
@handleDetail="handleDetail"
style="margin-top:50px"
>
</heavy-table>
</div>
@ -233,49 +212,48 @@ export default {
istrue: true
},
{
label: '锁定批',
prop: 'batch',
label: '锁定批',
prop: 'batchNo',
istrue: true
},
{
label: '机种',
prop: 'ptBreakCat',
width: '120px',
istrue: true
},
{
label: '物料号',
prop: 'ptPart',
label: '商品编号',
prop: 'goodNo',
istrue: true,
width: '200px'
},
{
label: '物料名称',
prop: 'ptName',
label: '深位',
prop: 'isDeep',
istrue: true
},
{
label: '商品名称',
prop: 'goodName',
istrue: true,
width: '200px'
},
{
label: '锁定车数',
prop: 'containers',
label: '商品规格',
prop: 'specifications',
istrue: true
},
{
label: '锁定数量',
prop: 'qty',
label: '单位',
prop: 'unit',
istrue: true,
width: '160px'
},
{
label: '已出库车数',
prop: 'outContainers',
label: '出库货位',
prop: 'locationName',
istrue: true,
width: '160px'
},
{
label: '已出库数量',
prop: 'outqty',
prop: 'outQty',
istrue: true,
width: '160px'
},
@ -321,7 +299,7 @@ export default {
//
jsonFields: {},
//
loading: true,
loading: false,
//
dateRange: '',
//
@ -403,7 +381,7 @@ export default {
},
/** 查询区域列表 */
getList() {
this.loading = true
// this.loading = true
getLockstockOutList(this.queryParams).then((response) => {
this.waitForLockList = response.rows
this.paging.total = response.total

Loading…
Cancel
Save