基础,物料,设备
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -58,10 +58,6 @@ const tableProps = [
|
||||
prop: 'engName',
|
||||
label: '英文名称'
|
||||
},
|
||||
{
|
||||
prop: 'abbr',
|
||||
label: '缩写'
|
||||
},
|
||||
{
|
||||
prop: 'materialType',
|
||||
label: '物料类型'
|
||||
@@ -117,13 +113,13 @@ export default {
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '关键字',
|
||||
label: '物料名称',
|
||||
placeholder: '物料名称',
|
||||
param: 'name',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '关键字',
|
||||
label: '物料编码',
|
||||
placeholder: '物料编码',
|
||||
param: 'code',
|
||||
},
|
||||
@@ -228,6 +224,27 @@ export default {
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id, name, index) {
|
||||
this.$confirm(`是否删除物料名称为"${name}"的数据项?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.urlOptions.deleteURL(id).then(({ data }) => {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user