盘点添加属性 修改字段

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) { export function getLockstockOutList(data) {
return request({ return request({
url: '/wms/lock/getLockstockOutList', // url: '/wms/lock/getLockstockOutList',
url: 'wms/stock/lock/getLockstockOutList',
method: 'get', method: 'get',
params: data params: data
}) })

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

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

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

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

Loading…
Cancel
Save