添加锁定库存出库 部分属性隐藏

master
Mr.sun 2 years ago
parent 96be887eec
commit ab358f7a17
  1. 189
      src/views/libraryManage/inventoryLock/apply/ProductBatchNumberLocked.vue
  2. 189
      src/views/libraryManage/inventoryLock/apply/ProductLock.vue
  3. 193
      src/views/libraryManage/inventoryLock/apply/heLotNumberOfTheProductIsLocked.vue
  4. 482
      src/views/libraryManage/lockOutStore/index.vue
  5. 9
      src/views/taskManagement/index.vue
  6. 1
      vue.config.js

@ -2,8 +2,11 @@
<!-- 产品批号锁定 -->
<div class="app-container">
<div class="search-box">
<el-form :inline="true" :model="enterForm">
<el-form-item label="货主名称">
<el-form
:inline="true"
:model="enterForm"
>
<!-- <el-form-item label="货主名称">
<el-select
v-model="enterForm.consignorId"
placeholder="请选择货主名称"
@ -35,7 +38,7 @@
>
</el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<!-- <el-form-item>
<el-button type="primary" @click="queryTable">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
@ -44,16 +47,19 @@
</div>
<div class="opt-box">
<div class="opt-box-right">
<el-button type="primary" @click="addLocation">新增</el-button>
<el-button
type="primary"
@click="addLocation"
>新增</el-button>
<el-button
type="primary"
@click="saveLocation"
:disabled="!this.tableForm.config.length != 0"
>保存</el-button
>
<el-button :disabled="!handleSelect.length != 0" @click="delLocation"
>删除</el-button
>
>保存</el-button>
<el-button
:disabled="!handleSelect.length != 0"
@click="delLocation"
>删除</el-button>
</div>
</div>
@ -96,52 +102,56 @@
</heavy-table>
</el-form>
</div>
<goods ref="goods" @getGoodsInfo="getGoodsInfo" :queryParams="enterForm" />
<goods
ref="goods"
@getGoodsInfo="getGoodsInfo"
:queryParams="enterForm"
/>
</div>
</template>
<script>
import { getTableHeader } from "@/api/system/table";
import { mapGetters } from "vuex";
import goods from "@/views/libraryManage/components/goods.vue";
import { dealEmptyQueryCondition } from "@/utils/index";
import { tableConfig } from "./config.js";
import { listUser } from "@/api/libraryManage/common";
import { consignorList } from "@/api/warehousing/acceptance";
import { add } from "@/api/libraryManage/inventoryLock";
import { getTableHeader } from '@/api/system/table'
import { mapGetters } from 'vuex'
import goods from '@/views/libraryManage/components/goods.vue'
import { dealEmptyQueryCondition } from '@/utils/index'
import { tableConfig } from './config.js'
import { listUser } from '@/api/libraryManage/common'
import { consignorList } from '@/api/warehousing/acceptance'
import { add } from '@/api/libraryManage/inventoryLock'
export default {
components: { goods },
dicts: ["lock_reason_dict", "goods_unit"],
dicts: ['lock_reason_dict', 'goods_unit'],
data() {
return {
options: [],
options2: [],
enterForm: {
consignorId: "",
userId: "",
consignorId: '',
userId: ''
},
goodsData: [],
queryData: [],
handleSelect: [],
tableConfig: {
configProductBatchNumberLocked: [],
configProductBatchNumberLocked: []
},
tableForm: {
config: [],
config: []
},
tableProps: {},
};
tableProps: {}
}
},
computed: {
...mapGetters(["user"]),
...mapGetters(['user'])
},
async created() {
await this.getBasicList();
await this.getList();
getTableHeader("busin_lock_batch_no").then((res) => {
this.tableConfig = tableConfig.call(this);
let propList = this.updatePropList(res.data, this.tableConfig.config);
this.tableConfig.configProductBatchNumberLocked = propList;
});
await this.getBasicList()
await this.getList()
getTableHeader('busin_lock_batch_no').then((res) => {
this.tableConfig = tableConfig.call(this)
let propList = this.updatePropList(res.data, this.tableConfig.config)
this.tableConfig.configProductBatchNumberLocked = propList
})
},
watch: {},
mounted() {},
@ -149,137 +159,132 @@ export default {
//
getBasicList() {
consignorList().then((res) => {
this.options = res.rows;
});
this.options = res.rows
})
},
/** 查询用户列表 */
async getList() {
listUser({}).then((response) => {
this.options2 = response.data;
this.enterForm.userId = this.user.userId;
});
this.options2 = response.data
this.enterForm.userId = this.user.userId
})
},
//
addLocation() {
if (!this.enterForm.consignorId) return this.$message("货主必选!");
this.$refs.goods.dialogVisible = true;
// if (!this.enterForm.consignorId) return this.$message('!')
this.$refs.goods.dialogVisible = true
},
//
getGoodsInfo(dataList) {
dataList.forEach((element) => {
this.tableForm.config.unshift(element);
});
this.goodsData = this.tableForm.config;
this.tableForm.config.unshift(element)
})
this.goodsData = this.tableForm.config
},
//
async queryTable() {
this.queryData = [];
this.queryData = []
this.goodsData.forEach((element) => {
if (element.consignorId === this.enterForm.consignorId) {
this.queryData.push(element);
this.queryData.push(element)
}
});
this.tableForm.config = this.queryData;
})
this.tableForm.config = this.queryData
},
//
resetQuery() {
this.enterForm = {};
this.enterForm = {}
},
//
handleselection(val) {
this.handleSelect = val.map((ele) => ele.id);
this.handleSelect = val.map((ele) => ele.id)
},
//
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
},
//
saveLocation() {
let arr = [];
let arr = []
this.tableForm.config.forEach((ele, index) => {
arr.push(this.validateField("tableForm", index));
});
arr.push(this.validateField('tableForm', index))
})
if (arr.some((k) => !k)) {
//
this.$message.warning("校验不通过,申请原因必填");
this.$message.warning('校验不通过,申请原因必填')
} else {
this.$confirm("是否保存数据?", "保存确认", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm('是否保存数据?', '保存确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
let arr = this.tableForm.config.map((ele) => {
return {
stockId: ele.stockId,
reason: ele.reason,
userName: this.enterForm.userId,
lockType: "batchNo",
};
});
lockType: 'batchNo'
}
})
add(arr).then((res) => {
if (res.code === 200) {
this.$message.success("产品批号锁定成功");
this.tableForm.config = [];
this.$message.success('产品批号锁定成功')
this.tableForm.config = []
}
});
});
})
})
}
},
//
delLocation() {
if (this.handleSelect.length === 0) {
this.$message.warning("请至少选择一行数据");
return;
this.$message.warning('请至少选择一行数据')
return
}
this.delCom();
this.delCom()
},
//
delCom() {
this.$confirm("是否确认删除所选明细?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm('是否确认删除所选明细?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.tableForm.config = this.tableForm.config.filter(
(item) => !this.handleSelect.includes(item.id)
);
this.tableForm.config = this.tableForm.config.filter((item) => !this.handleSelect.includes(item.id))
// this.tableForm.config.forEach((element, index) => {
// if (this.handleSelect.includes(element.id)) {
// this.tableForm.config.splice(index, 1);
// }
// });
this.$message.success("删除成功");
});
},
},
};
this.$message.success('删除成功')
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

@ -2,8 +2,11 @@
<!-- 产品锁定 -->
<div class="app-container">
<div class="search-box">
<el-form :inline="true" :model="enterForm">
<el-form-item label="货主名称">
<el-form
:inline="true"
:model="enterForm"
>
<!-- <el-form-item label="货主名称">
<el-select
v-model="enterForm.consignorId"
placeholder="请选择货主名称"
@ -35,7 +38,7 @@
>
</el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<!-- <el-form-item>
<el-button type="primary" @click="queryTable">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
@ -44,16 +47,19 @@
</div>
<div class="opt-box">
<div class="opt-box-right">
<el-button type="primary" @click="addLocation">新增</el-button>
<el-button
type="primary"
@click="addLocation"
>新增</el-button>
<el-button
type="primary"
@click="saveLocation"
:disabled="!this.tableForm.config.length != 0"
>保存</el-button
>
<el-button :disabled="!handleSelect.length != 0" @click="delLocation"
>删除</el-button
>
>保存</el-button>
<el-button
:disabled="!handleSelect.length != 0"
@click="delLocation"
>删除</el-button>
</div>
</div>
@ -97,53 +103,57 @@
</heavy-table>
</el-form>
</div>
<goods ref="goods" @getGoodsInfo="getGoodsInfo" :queryParams="enterForm" />
<goods
ref="goods"
@getGoodsInfo="getGoodsInfo"
:queryParams="enterForm"
/>
</div>
</template>
<script>
import { getTableHeader } from "@/api/system/table";
import { mapGetters } from "vuex";
import goods from "@/views/libraryManage/components/goods.vue";
import { dealEmptyQueryCondition } from "@/utils/index";
import { tableConfig } from "./config.js";
import { listUser } from "@/api/libraryManage/common";
import { consignorList } from "@/api/warehousing/acceptance";
import { add } from "@/api/libraryManage/inventoryLock";
import { getTableHeader } from '@/api/system/table'
import { mapGetters } from 'vuex'
import goods from '@/views/libraryManage/components/goods.vue'
import { dealEmptyQueryCondition } from '@/utils/index'
import { tableConfig } from './config.js'
import { listUser } from '@/api/libraryManage/common'
import { consignorList } from '@/api/warehousing/acceptance'
import { add } from '@/api/libraryManage/inventoryLock'
export default {
components: { goods },
dicts: ["lock_reason_dict", "goods_unit"], //
dicts: ['lock_reason_dict', 'goods_unit'], //
data() {
return {
options: [], //
options2: [], //
enterForm: {
consignorId: "",
userId: "",
consignorId: '',
userId: ''
},
goodsData: [],
queryData: [],
handleSelect: [],
tableConfig: {
config: [],
config: []
},
tableForm: {
config: [],
config: []
},
tableProps: {},
};
tableProps: {}
}
},
computed: {
...mapGetters(["user"]),
...mapGetters(['user'])
},
async created() {
await this.getBasicList();
await this.getList();
await this.getBasicList()
await this.getList()
getTableHeader("busin_lock_goods_add").then((res) => {
this.tableConfig = tableConfig.call(this);
let propList = this.updatePropList(res.data, this.tableConfig.config);
this.tableConfig.config = propList;
});
getTableHeader('busin_lock_goods_add').then((res) => {
this.tableConfig = tableConfig.call(this)
let propList = this.updatePropList(res.data, this.tableConfig.config)
this.tableConfig.config = propList
})
},
watch: {},
mounted() {},
@ -151,137 +161,132 @@ export default {
//
getBasicList() {
consignorList().then((res) => {
this.options = res.rows;
});
this.options = res.rows
})
},
/** 查询用户列表 */
async getList() {
listUser({}).then((response) => {
this.options2 = response.data;
this.enterForm.userId = this.user.userId;
});
this.options2 = response.data
this.enterForm.userId = this.user.userId
})
},
//
addLocation() {
if (!this.enterForm.consignorId) return this.$message("货主必选!");
this.$refs.goods.dialogVisible = true;
// if (!this.enterForm.consignorId) return this.$message('!')
this.$refs.goods.dialogVisible = true
},
//
getGoodsInfo(dataList) {
dataList.forEach((element) => {
this.tableForm.config.unshift(element);
});
this.goodsData = this.tableForm.config;
this.tableForm.config.unshift(element)
})
this.goodsData = this.tableForm.config
},
//
async queryTable() {
this.queryData = [];
this.queryData = []
this.goodsData.forEach((element) => {
if (element.consignorId === this.enterForm.consignorId) {
this.queryData.push(element);
this.queryData.push(element)
}
});
this.tableForm.config = this.queryData;
})
this.tableForm.config = this.queryData
},
//
resetQuery() {
this.enterForm = {};
this.enterForm = {}
},
//
handleselection(val) {
this.handleSelect = val.map((ele) => ele.id);
this.handleSelect = val.map((ele) => ele.id)
},
//
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
},
//
saveLocation() {
let arr = [];
let arr = []
this.tableForm.config.forEach((ele, index) => {
arr.push(this.validateField("tableForm", index));
});
arr.push(this.validateField('tableForm', index))
})
if (arr.some((k) => !k)) {
//
this.$message.warning("校验不通过,申请原因必填");
this.$message.warning('校验不通过,申请原因必填')
} else {
this.$confirm("是否保存数据?", "保存确认", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm('是否保存数据?', '保存确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
let arr = this.tableForm.config.map((ele) => {
return {
stockId: ele.stockId,
reason: ele.reason,
userName: this.enterForm.userId,
lockType: "batchNoLocation",
};
});
lockType: 'batchNoLocation'
}
})
add(arr).then((res) => {
if (res.code === 200) {
this.$message.success("产品锁定成功");
this.tableForm.config = [];
this.$message.success('产品锁定成功')
this.tableForm.config = []
}
});
});
})
})
}
},
//
delLocation() {
if (this.handleSelect.length === 0) {
this.$message.warning("请至少选择一行数据");
return;
this.$message.warning('请至少选择一行数据')
return
}
this.delCom();
this.delCom()
},
//
delCom() {
this.$confirm("是否确认删除所选明细?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm('是否确认删除所选明细?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.tableForm.config = this.tableForm.config.filter(
(item) => !this.handleSelect.includes(item.id)
);
this.tableForm.config = this.tableForm.config.filter((item) => !this.handleSelect.includes(item.id))
// this.tableForm.config.forEach((element, index) => {
// if (this.handleSelect.includes(element.id)) {
// this.tableForm.config.splice(index, 1);
// }
// });
this.$message.success("删除成功");
});
},
},
};
this.$message.success('删除成功')
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

@ -2,8 +2,11 @@
<!-- 产品批号货位锁定 -->
<div class="app-container">
<div class="search-box">
<el-form :inline="true" :model="enterForm">
<el-form-item label="货主名称">
<el-form
:inline="true"
:model="enterForm"
>
<!-- <el-form-item label="货主名称">
<el-select
v-model="enterForm.consignorId"
placeholder="请选择货主名称"
@ -18,9 +21,9 @@
>
</el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="操作员" prop="userId">
<!-- <el-form-item label="操作员" prop="userId">
<el-select
v-model="enterForm.userId"
filterable
@ -35,7 +38,7 @@
>
</el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<!-- <el-form-item>
<el-button type="primary" @click="queryTable">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
@ -44,16 +47,19 @@
</div>
<div class="opt-box">
<div class="opt-box-right">
<el-button type="primary" @click="addLocation">新增</el-button>
<el-button
type="primary"
@click="addLocation"
>新增</el-button>
<el-button
type="primary"
@click="saveLocation"
:disabled="!this.tableForm.config.length != 0"
>保存</el-button
>
<el-button :disabled="!handleSelect.length != 0" @click="delLocation"
>删除</el-button
>
>保存</el-button>
<el-button
:disabled="!handleSelect.length != 0"
@click="delLocation"
>删除</el-button>
</div>
</div>
@ -96,52 +102,56 @@
</heavy-table>
</el-form>
</div>
<goods ref="goods" @getGoodsInfo="getGoodsInfo" :queryParams="enterForm" />
<goods
ref="goods"
@getGoodsInfo="getGoodsInfo"
:queryParams="enterForm"
/>
</div>
</template>
<script>
import { getTableHeader } from "@/api/system/table";
import { mapGetters } from "vuex";
import goods from "@/views/libraryManage/components/goods.vue";
import { dealEmptyQueryCondition } from "@/utils/index";
import { tableConfig } from "./config.js";
import { listUser } from "@/api/libraryManage/common";
import { consignorList } from "@/api/warehousing/acceptance";
import { add } from "@/api/libraryManage/inventoryLock";
import { getTableHeader } from '@/api/system/table'
import { mapGetters } from 'vuex'
import goods from '@/views/libraryManage/components/goods.vue'
import { dealEmptyQueryCondition } from '@/utils/index'
import { tableConfig } from './config.js'
import { listUser } from '@/api/libraryManage/common'
import { consignorList } from '@/api/warehousing/acceptance'
import { add } from '@/api/libraryManage/inventoryLock'
export default {
components: { goods },
dicts: ["lock_reason_dict", "goods_unit"],
dicts: ['lock_reason_dict', 'goods_unit'],
data() {
return {
options: [], //
options2: [], //
enterForm: {
consignorId: "",
userId: "",
consignorId: '',
userId: ''
},
goodsData: [],
queryData: [],
handleSelect: [],
tableConfig: {
configHeLotNumberOfTheProductIsLocked: [],
configHeLotNumberOfTheProductIsLocked: []
},
tableForm: {
config: [],
config: []
},
tableProps: {},
};
tableProps: {}
}
},
computed: {
...mapGetters(["user"]),
...mapGetters(['user'])
},
async created() {
await this.getBasicList();
await this.getList();
getTableHeader("busin_lock_batch_no_location").then((res) => {
this.tableConfig = tableConfig.call(this);
let propList = this.updatePropList(res.data, this.tableConfig.config);
this.tableConfig.configHeLotNumberOfTheProductIsLocked = propList;
});
await this.getBasicList()
await this.getList()
getTableHeader('busin_lock_batch_no_location').then((res) => {
this.tableConfig = tableConfig.call(this)
let propList = this.updatePropList(res.data, this.tableConfig.config)
this.tableConfig.configHeLotNumberOfTheProductIsLocked = propList
})
},
watch: {},
mounted() {},
@ -149,137 +159,132 @@ export default {
//
getBasicList() {
consignorList().then((res) => {
this.options = res.rows;
});
this.options = res.rows
})
},
/** 查询用户列表 */
async getList() {
listUser({}).then((response) => {
this.options2 = response.data;
this.enterForm.userId = this.user.userId;
});
this.options2 = response.data
this.enterForm.userId = this.user.userId
})
}, //
addLocation() {
if (!this.enterForm.consignorId) return this.$message("货主必选!");
this.$refs.goods.dialogVisible = true;
// if (!this.enterForm.consignorId) return this.$message('!')
this.$refs.goods.dialogVisible = true
},
//
getGoodsInfo(dataList) {
dataList.forEach((element) => {
this.tableForm.config.unshift(element);
});
this.goodsData = this.tableForm.config;
this.tableForm.config.unshift(element)
})
this.goodsData = this.tableForm.config
},
//
async queryTable() {
this.queryData = [];
this.queryData = []
this.goodsData.forEach((element) => {
if (element.consignorId === this.enterForm.consignorId) {
this.queryData.push(element);
this.queryData.push(element)
}
});
this.tableForm.config = this.queryData;
})
this.tableForm.config = this.queryData
},
//
resetQuery() {
this.enterForm = {};
this.enterForm = {}
},
//
handleselection(val) {
this.handleSelect = val.map((ele) => ele.id);
this.handleSelect = val.map((ele) => ele.id)
},
//
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
},
//
saveLocation() {
let arr = [];
let arr = []
this.tableForm.config.forEach((ele, index) => {
arr.push(this.validateField("tableForm", index));
});
arr.push(this.validateField('tableForm', index))
})
if (arr.some((k) => !k)) {
//
this.$message.warning("校验不通过,申请原因必填");
this.$message.warning('校验不通过,申请原因必填')
} else {
this.$confirm("是否保存数据?", "保存确认", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm('是否保存数据?', '保存确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
let arr = this.tableForm.config.map((ele) => {
return {
stockId: ele.stockId,
reason: ele.reason,
userName: this.enterForm.userId,
lockType: "goods",
};
});
lockType: 'goods'
}
})
add(arr).then((res) => {
if (res.code === 200) {
this.$message.success("产品批号货位锁定成功");
this.tableForm.config = [];
this.$message.success('产品批号货位锁定成功')
this.tableForm.config = []
}
});
});
})
})
}
},
//
delLocation() {
if (this.handleSelect.length === 0) {
this.$message.warning("请至少选择一行数据");
return;
this.$message.warning('请至少选择一行数据')
return
}
this.delCom();
this.delCom()
},
//
delCom() {
this.$confirm("是否确认删除所选明细?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm('是否确认删除所选明细?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.tableForm.config = this.tableForm.config.filter(
(item) => !this.handleSelect.includes(item.id)
);
this.tableForm.config = this.tableForm.config.filter((item) => !this.handleSelect.includes(item.id))
// this.tableForm.config.forEach((element, index) => {
// if (this.handleSelect.includes(element.id)) {
// this.tableForm.config.splice(index, 1);
// }
// });
this.$message.success("删除成功");
});
},
},
};
this.$message.success('删除成功')
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

@ -0,0 +1,482 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
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"
>
<el-input
v-model="queryParams.ptPart"
placeholder="请输入物料编号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item
label="批次号"
prop="batch"
>
<el-select
v-model="queryParams.batch"
style="width:80%;"
placeholder="请选择"
clearable
>
<el-option
v-for="item in lockstockBatch"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
</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>
<div class=" layout-full">
<heavy-table
class="heavy-table tablem"
highlight-current-row
:data="waitForLockList"
:loading="loading"
ref="multipleTable"
:paging="paging"
:config="tableConfig"
:tableProps="tableProps"
@current-change="handleCurrentChange"
@handleUpdate="handleUpdate"
@handleselection="handleselection"
@handleDetail="handleDetail"
>
</heavy-table>
</div>
<!-- 添加或修改区域对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
width="450px"
append-to-body
:close-on-click-modal=false
>
<el-form
ref="form"
:model="form"
:rules="rules"
style="width: 400px;"
label-width="95px"
>
<el-form-item
label="物料编号"
prop="ptPart"
>
<el-input
v-model="form.ptPart"
placeholder="请输入物料编号"
style="width:80%;"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item
label="批次号"
prop="batch"
>
<el-select
v-model="form.batch"
style="width:80%;"
placeholder="请选择"
clearable
>
<el-option
v-for="item in lockstockBatch"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="叫料位置"
prop="trolleyType"
>
<el-select
v-model="form.station"
style="width: 80%;"
placeholder="请选择叫料工位"
>
<el-option
v-for="item in dict.type.production_pay_into"
:key="item.value"
:label="item.label"
:value="Number(item.value)"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="需求量"
prop="ptPart"
>
<el-input
v-model="form.containers"
placeholder="请输入需求量"
style="width: 70%;"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
<span></span>
</el-form-item>
</el-form>
<div
slot="footer"
class="dialog-footer"
>
<el-button
type="primary"
@click="submitForm"
>确认</el-button>
<el-button @click="cancel">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
// import { queryStoragePlan, IniteminCancel, queryIteminPlan, InPlanCancel } from '@/api/wms/busFunctions/inManagement/planInStore'
import { lockStockQty, getLockstockOutList, getLockstockBatch, addLockstockOut } from '@/api/wms/busFunctions/reportForms/lockInStock'
import { getItemDataBreakCat } from '@/api/wms/busFunctions/storeManager/sysStock'
// import { stationList } from '@/api/wms/busFunctions/outManagement/productCall.js'
import moment from 'moment'
export default {
name: 'LockInstock',
dicts: ['production_pay_into', 'dict_inv_station'],
data() {
const _that = this
return {
paging: {
page: 1, //
size: 50, //
total: 0
},
//
value1: [moment().locale('zh-cn').format('yyyy-MM-DD 07:15:00'), moment().locale('zh-cn').add(1, 'days').format('yyyy-MM-DD 07:15:00')],
//
dateRange: [],
tableConfig: [
{
label: '选择',
prop: 'selection',
type: 'selection',
istrue: true,
width: '80px'
},
{
label: '序号',
prop: 'index',
type: 'index',
istrue: true
},
{
label: '锁定批次',
prop: 'batch',
istrue: true
},
{
label: '机种',
prop: 'ptBreakCat',
width: '120px',
istrue: true
},
{
label: '物料号',
prop: 'ptPart',
istrue: true,
width: '200px'
},
{
label: '物料名称',
prop: 'ptName',
istrue: true,
width: '200px'
},
{
label: '锁定车数',
prop: 'containers',
istrue: true
},
{
label: '锁定数量',
prop: 'qty',
istrue: true,
width: '160px'
},
{
label: '已出库车数',
prop: 'outContainers',
istrue: true,
width: '160px'
},
{
label: '已出库数量',
prop: 'outqty',
istrue: true,
width: '160px'
},
{
label: '操作',
prop: 'operating',
istrue: true,
type: 'button',
width: 180,
fixed: 'right',
buttons: [
{
name: '叫料出库',
event: 'handleUpdate'
}
]
}
// {
// label: '',
// prop: 'operating',
// istrue: true,
// type: 'button',
// width: 180,
// fixed: 'right',
// buttons: [
// {
// name: '',
// event: 'handleDelete'
// }
// ]
// }
],
tableProps: {
'max-height': 550
},
//
allSelects: [],
//
BreakCatList: [],
//
exportList: [],
//
jsonFields: {},
//
loading: true,
//
dateRange: '',
//
showSearch: true,
lockstockBatch: [],
//
waitForLockList: [],
//
title: '叫料出库',
//
open: false,
//
openAllocation: false,
// stationList: [],
//
queryParams: {
pageNum: 1,
pageSize: 50
// ttPart: ''
// type: 'in'
// loName: null
},
//
form: {},
//
rules: {
devNo: [{ required: true, trigger: 'blur', message: '请输入设备编码' }],
devName: [{ required: true, trigger: 'blur', message: '请输入设备名称' }],
devType: [{ required: true, trigger: 'change', message: '请选择设备类型' }]
}
}
},
created() {
this.getList()
// getItemDataBreakCat({ pageSize: 999, pageNum: 1 }).then((response) => {
// this.BreakCatList = response.data
// })
getLockstockBatch({ pageSize: 999, pageNum: 1 }).then((response) => {
this.lockstockBatch = response.data
})
},
methods: {
//
handleCurrentChange(val) {
if (Object.prototype.toString.call(val) === '[object Object]') {
this.queryParams.pageSize = val.size
this.paging.size = val.size
this.getList()
}
{
this.paging.page = val
this.queryParams.pageNum = val
this.getList()
}
},
//
handleselection(data) {
this.allSelects = []
this.allSelects = data.map((item) => {
return { batch: item.batch, ptPart: item.ptPart }
})
},
//
handleLockInStock() {
this.$confirm('确定锁定该物料吗?锁定后该物料无法正常使用', '锁定确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
lockStockQty(this.allSelects).then((response) => {
this.$modal.msgSuccess('锁定成功')
this.open = false
if (this.paging.total % 10 === 1) {
this.queryParams.pageNum == 1 ? this.queryParams.pageNum : (this.queryParams.pageNum = this.queryParams.pageNum - 1)
}
this.resetQuery()
})
})
},
/** 查询区域列表 */
getList() {
this.loading = true
getLockstockOutList(this.queryParams).then((response) => {
this.waitForLockList = response.rows
this.paging.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null
// logicAreaName: nulls
// value1: [moment().locale('zh-cn').format('yyyy-MM-DD 07:30:00'), moment().locale('zh-cn').format('yyyy-MM-DD 31:30:00')]
}
;(this.value1 = [moment().locale('zh-cn').format('yyyy-MM-DD 07:15:00'), moment().locale('zh-cn').add(1, 'days').format('yyyy-MM-DD 07:15:00')]), this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
pageNum: 1,
pageSize: 50
}
this.$refs.queryForm.resetFields()
this.resetForm('queryForm')
this.handleQuery()
},
//
handleDetail(row) {
this.open = true
// this.$router.push({ path: '/wms/busFunctions/reportForms/lockInstock/lockDetail/index', query: { ptPart: row.ptPart, batch: row.batch } })
},
/** 修改按钮操作 */
handleUpdate(row) {
let tempRow = JSON.parse(JSON.stringify(row))
this.reset()
let data = {
id: tempRow.id,
batch: tempRow.batch,
ptPart: tempRow.ptPart,
lockNo: tempRow.lockNo
}
this.form = data
this.open = true
// this.title = ''
},
submitForm() {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.title === '叫料出库') {
// console.log(this.form)
addLockstockOut(this.form).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess('叫料确认成功')
this.open = false
this.getList()
}
})
}
}
})
}
}
}
</script>

@ -580,7 +580,6 @@ export default {
this.getList()
} else {
this.paging.page = val
// console.log(val)
this.queryParams.pageNum = val
this.getList()
}
@ -605,15 +604,7 @@ export default {
res.data.forEach((item, index) => {
this.devNameArr.push({ devName: item.devName, devCode: item.id })
})
// console.log(this.devNameArr)
})
// queryPointList(this.queryParams).then((response) => {
// console.log(response)
// this.pointList = response.rows
// // this.paging.total = response.total
// // this.paging.total = this.cheshiList.length
// // this.loading = false
// })
},
//
cancel() {

@ -36,6 +36,7 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://127.0.0.1:8030`,
// target: `http://192.168.0.110:8030`,
// target: `http://120.77.94.227:8030`,
// target: `http://xiaowen.vaiwan.com`,
changeOrigin: true,

Loading…
Cancel
Save