基础,物料,设备

This commit is contained in:
helloDy
2023-11-07 15:53:01 +08:00
parent 1d38a560ec
commit fcb1885bf7
21 changed files with 827 additions and 588 deletions

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-10-27 16:06:44
* @LastEditTime: 2023-11-06 20:04:03
* @Description:
-->
<template>
@@ -30,7 +30,9 @@
<el-select
v-model="dataForm.productId"
filterable
clearable
:disabled="isdetail"
style="width: 100%"
placeholder="请选择产品">
<el-option
v-for="dict in productList"
@@ -88,6 +90,7 @@
<el-select
v-model="scope.row.materialId"
filterable
clearable
:disabled="!scope.row.isEdit"
placeholder="请选择物料"
@change="setCode(scope.row)">
@@ -125,7 +128,7 @@
<!-- <span>{{ item.btnName | i18nFilter }}</span> -->
</el-button>
</el-tooltip>
<el-button v-else type="primary" size="small" @click="saveData(scope.row)">保存</el-button>
<el-button v-else type="text" size="small" @click="saveData(scope.row)">保存</el-button>
<el-tooltip placement="top" content="删除">
<el-button
type="text"
@@ -256,7 +259,7 @@ export default {
const unitRes = await listData({
pageNo: 1,
pageSize: 99,
dictType: 'goods_unit',
dictType: 'unit_dict',
});
this.unitList = unitRes.data.list.map(item => {
return {
@@ -295,17 +298,17 @@ export default {
.catch(() => {});
},
setCode(row) {
this.materialList.filter(item => {
const tempM = this.materialList.filter(item => {
if (row.materialId === item.id) {
row.materialCode = item.code
}
this.unitList.filter(u => {
if (item.unit === u.value) {
row.unit = u.value
row.mUnit = u.label
}
})
// return row.materialId === item.id
return row.materialId === item.id
})
this.unitList.filter(u => {
if (tempM[0].unit === u.value) {
row.unit = u.value
row.mUnit = u.label
}
})
// row.materialCode = tempList[0].code
// row.unit = tempList[0].unit
@@ -343,8 +346,7 @@ export default {
// 获取产品Bom详细列表
getProBomList({
...this.listQuery,
bomId: this.dataForm.id,
createTime: ['2023-10-26 00:00:00', '2023-10-27 12:00:00']
bomId: this.dataForm.id
}).then((response) => {
this.tableData = response.data.records.map(item => {
this.unitList.filter(u => {
@@ -450,7 +452,7 @@ export default {
.drawer >>> .visual-part {
flex: 1 auto;
max-height: 76vh;
max-height: 30vh;
overflow: hidden;
overflow-y: scroll;
padding-right: 10px; /* 调整滚动条样式 */

View File

@@ -97,16 +97,10 @@ export default {
formConfig: [
{
type: 'input',
label: '关键字',
placeholder: '物料名称',
label: '产品名称',
placeholder: '产品名称',
param: 'name',
},
{
type: 'input',
label: '关键字',
placeholder: '物料编码',
param: 'code',
},
{
type: 'button',
btnName: '查询',
@@ -158,7 +152,6 @@ export default {
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.name = val.name ? val.name : undefined;
this.listQuery.code = val.code ? val.code : undefined;
this.getDataList();
break;
case 'reset':