基础,物料,设备

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 15:11:02
* @LastEditTime: 2023-11-06 19:44:24
* @Description:
-->
<template>
@@ -56,6 +56,7 @@
v-model="dataForm.type"
filterable
:disabled="isdetail"
style="width: 100%"
placeholder="请选择物料类型">
<el-option
v-for="dict in materialList"
@@ -83,6 +84,7 @@
filterable
clearable
:disabled="isdetail"
style="width: 100%"
placeholder="请选择供应商">
<el-option
v-for="dict in supplierList"
@@ -100,9 +102,10 @@
v-model="dataForm.unit"
filterable
:disabled="isdetail"
style="width: 100%"
placeholder="请选择物料单位">
<el-option
v-for="dict in unitList"
v-for="dict in getDictDatas('unit_dict')"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
@@ -172,6 +175,7 @@ import { listData } from "@/api/system/dict/data";
import SmallTitle from './SmallTitle';
import { parseTime } from '../../core/mixins/code-filter';
import attrAdd from './attr-add';
import { getDictDatas } from "@/utils/dict";
const tableBtn = [
{
@@ -265,17 +269,17 @@ export default {
const supplierRes = await getSupplierList();
this.supplierList = supplierRes.data;
// 物料单位列表
const unitRes = await listData({
pageNo: 1,
pageSize: 99,
dictType: 'goods_unit',
});
this.unitList = unitRes.data.list.map(item => {
return {
label: item.label,
value: Number(item.value)
}
});
// const unitRes = await listData({
// pageNo: 1,
// pageSize: 99,
// dictType: 'goods_unit',
// });
// this.unitList = unitRes.data.list.map(item => {
// return {
// label: item.label,
// value: Number(item.value)
// }
// });
},
initData() {
this.materialAttrList.splice(0);
@@ -341,6 +345,9 @@ export default {
// 获取物料详情
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data;
if (this.dataForm.unit) {
this.dataForm.unit = String(this.dataForm.unit)
}
});
// 获取物料的属性列表
this.getList();