diff --git a/src/assets/scss/common.scss b/src/assets/scss/common.scss
index 583ee35..f54edbc 100644
--- a/src/assets/scss/common.scss
+++ b/src/assets/scss/common.scss
@@ -271,7 +271,8 @@ img {
&:focus,
&:hover {
color: #fff;
- background-color: mix(#fff, $--color-primary, 15%);
+ // background-color: mix(#fff, $--color-primary, 15%);
+ background-color: rgb(210, 210, 210);
}
}
> .el-menu-item.is-active,
@@ -280,6 +281,7 @@ img {
&:focus,
&:hover {
color: #fff;
+ background-color: rgb(210, 210, 210);
}
}
.el-menu-item i,
diff --git a/src/components/DialogWithMenu.vue b/src/components/DialogWithMenu.vue
index 7ad81f8..8fdbe31 100644
--- a/src/components/DialogWithMenu.vue
+++ b/src/components/DialogWithMenu.vue
@@ -154,7 +154,7 @@
@size-change="handleSizeChange"
@current-change="handlePageChange"
:current-page.sync="attrPage"
- :page-sizes="[5, 10, 20]"
+ :page-sizes="[10, 20, 50]"
:page-size="attrSize"
:total="attrTotal"
layout="total, sizes, prev, next">
@@ -411,7 +411,7 @@ export default {
scrollingContainer: null,
},
attrPage: 1,
- attrSize: 10,
+ attrSize: 20,
attrTotal: 0,
fileList: [],
imgPreviewDialogVisible: false,
@@ -463,7 +463,7 @@ export default {
dialogVisible: function (val) {
if (!!val) {
this.attrPage = 1;
- this.attrSize = 10;
+ this.attrSize = 20;
}
},
},
diff --git a/src/components/SmallDialog.vue b/src/components/SmallDialog.vue
index 429c905..9c0641f 100644
--- a/src/components/SmallDialog.vue
+++ b/src/components/SmallDialog.vue
@@ -10,26 +10,35 @@
:width="'30%'"
:modal="false"
:fullscreen="false"
- :top="'10vh'"
- >
+ :top="'10vh'">
-
+
-
+
-
+ @change="handleSelectChange(col, $event)">
+
{{ opt.label }}
- {{ opt[col.customLabel] || '-' }}
+
+ {{ opt[col.customLabel] || "-" }}
+
+
-
+ v-bind="col.elparams" />
@@ -56,9 +69,9 @@
:key="'operation_' + index"
:type="operate.type"
@click="handleBtnClick(operate)"
- :loading="(operate.name === 'add' || operate.name === 'update') && btnLoading"
- >{{ operate.label }}
+ :loading="(operate.name === 'add' || operate.name === 'update') && btnLoading">
+ {{ operate.label }}
+
取消
@@ -99,10 +112,20 @@ export default {
col,
"options",
!col.customLabel
- ? res.data.list.map((item) => ({ label: item.name, value: item.id }))
- : res.data.list.map((item) => ({ label: item.name, value: item.id, [col.customLabel]: item[col.customLabel] }))
+ ? res.data.list.map((item) => ({ label: item[col.optionLabel ?? "name"], value: item.id }))
+ : res.data.list.map((item) => ({
+ label: item[col.optionLabel ?? "name"],
+ value: item.id,
+ [col.customLabel]: item[col.customLabel],
+ }))
+ );
+ console.log(
+ res.data.list.map((item) => ({
+ label: item.name,
+ value: item.id,
+ [col.customLabel]: item[col.customLabel],
+ }))
);
- console.log(res.data.list.map((item) => ({ label: item.name, value: item.id, [col.customLabel]: item[col.customLabel] })))
} else {
this.$set(col, "options", []);
}
@@ -111,6 +134,7 @@ export default {
});
return {
+ loading: false,
btnLoading: false,
visible: false,
detailMode: false,
@@ -132,7 +156,7 @@ export default {
resetForm(excludeId = false) {
setTimeout(() => {
Object.keys(this.dataForm).forEach((key) => {
- console.log(">>> clearing key: ", key);
+ // console.log(">>> clearing key: ", key);
if (excludeId && key === "id") return;
this.dataForm[key] = null;
});
@@ -141,7 +165,8 @@ export default {
},
init(id, isdetail = false) {
- console.log("[small dialog] init", id, isdetail);
+ // console.log("[small dialog] init", id, isdetail);
+ this.visible = true;
this.detailMode = isdetail;
if (this.$refs.dataForm) this.$refs.dataForm.clearValidate();
@@ -152,16 +177,22 @@ export default {
if (this.dataForm.id) {
// 如果是编辑
- this.$http.get(this.urls.subase + `/${this.dataForm.id}`).then(({ data: res }) => {
- if (res && res.code === 0) {
- const dataFormKeys = Object.keys(this.dataForm);
- this.dataForm = __pick(res.data, dataFormKeys);
- }
- this.visible = true;
- });
- } else {
- // 如果不是编辑
- this.visible = true;
+ this.loading = true;
+ this.$http
+ .get(this.urls.subase + `/${this.dataForm.id}`)
+ .then(({ data: res }) => {
+ if (res && res.code === 0) {
+ const dataFormKeys = Object.keys(this.dataForm);
+ this.dataForm = __pick(res.data, dataFormKeys);
+ } else {
+ throw new Error(res.msg);
+ }
+ this.loading = false;
+ })
+ .catch((err) => {
+ this.loading = false;
+ this.$message.error(err.message);
+ });
}
});
},
diff --git a/src/views/modules/pms/bomDetails/config.js b/src/views/modules/pms/bomDetails/config.js
index a546197..9af60d8 100644
--- a/src/views/modules/pms/bomDetails/config.js
+++ b/src/views/modules/pms/bomDetails/config.js
@@ -139,11 +139,12 @@ export default function () {
props: [
{ type: "index", label: "序号" },
{ prop: "material", label: "原料", isEditField: true },
+ { prop: "materialDesc", label: "原料描述", isEditField: true },
+ { prop: "materialName", label: "中文名称", isEditField: true },
{ width: 130, prop: "qty", label: "配方原料重量", filter: (val) => (!!val ? val + " kg" : "-"), isEditField: true },
{ width: 130, prop: "sumqty", label: "配方总重量", filter: (val) => (!!val ? val + " kg" : "-"), isEditField: true },
- { prop: "percent", label: "配比 [%]", filter: (val) => (!!val ? val + " %" : "-"), isEditField: true },
- { prop: "remark", label: "备注", isEditField: true },
- { prop: "materialDesc", label: "原料描述", isEditField: true },
+ // { prop: "percent", label: "配比 [%]", filter: (val) => (!!val ? val + " %" : "-"), isEditField: true },
+ // { prop: "remark", label: "备注", isEditField: true },
{ prop: "createTime", label: "添加时间", filter: timeFilter },
{
prop: "operations",
@@ -169,11 +170,12 @@ export default function () {
[
{
select: true,
- label: "物料",
+ label: "原料",
prop: "materialId",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
- elparams: { placeholder: "请选择物料", filterable: true },
+ elparams: { placeholder: "请选择原料", filterable: true },
options: [],
+ optionLabel: 'code',
customLabel: 'description',
fetchData: () => this.$http.get("/pms/material/page", { params: { limit: 999, page: 1 } }),
},
@@ -181,10 +183,10 @@ export default function () {
[
{
input: true,
- label: "物料重量[kg]",
+ label: "原料重量[kg]",
prop: "qty",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
- elparams: { placeholder: "请输入物料重量" },
+ elparams: { placeholder: "请输入原料重量" },
},
],
[
diff --git a/src/views/modules/pms/material/components/ListViewWithHead.vue b/src/views/modules/pms/material/components/ListViewWithHead.vue
index 881df41..98c1d7b 100644
--- a/src/views/modules/pms/material/components/ListViewWithHead.vue
+++ b/src/views/modules/pms/material/components/ListViewWithHead.vue
@@ -112,7 +112,7 @@ export default {
topBtnConfig: null,
totalPage: 100,
page: 1,
- size: 20, // 默认20
+ size: 100, // 默认20
dataList: [],
tableLoading: false,
subdialogVisible: false,
diff --git a/src/views/modules/pms/materialStorageDynamic/config.js b/src/views/modules/pms/materialStorageDynamic/config.js
index 7aa554c..96f8940 100644
--- a/src/views/modules/pms/materialStorageDynamic/config.js
+++ b/src/views/modules/pms/materialStorageDynamic/config.js
@@ -34,6 +34,7 @@ export default function () {
],
},
];
+ tableProps.defaultPageSize = 100;
const headFormFields = [
{
@@ -108,6 +109,7 @@ export default function () {
prop: "materialId",
fetchData: () => this.$http.get("/pms/material/page", { params: { key: '', limit: 999, page: 1 } }),
options: [],
+ optionLabel: 'code',
customLabel: 'description',
rules: { required: true, message: "必填项不能为空", trigger: "change" },
elparams: { filterable: true, placeholder: "请选择原料" },
diff --git a/src/views/modules/pms/materialStorageQty/index.vue b/src/views/modules/pms/materialStorageQty/index.vue
index e7e0a03..20f1fc3 100644
--- a/src/views/modules/pms/materialStorageQty/index.vue
+++ b/src/views/modules/pms/materialStorageQty/index.vue
@@ -3,6 +3,17 @@
@@ -17,8 +28,7 @@
padding-left: 16px;
top: 10px;
left: -16px;
- "
- >
+ ">
日料仓
@@ -31,8 +41,7 @@
:material="st.material ?? '默认物料'"
:total="2"
:unit-value="st.unitDictValue"
- :ratio="st.ratio"
- />
+ :ratio="st.ratio" />
@@ -47,8 +56,7 @@
padding-left: 16px;
top: 10px;
left: -16px;
- "
- >
+ ">
中间仓
@@ -61,8 +69,7 @@
:material="st.material ?? '默认物料'"
:total="2"
:unit-value="st.unitDictValue"
- :ratio="st.ratio"
- />
+ :ratio="st.ratio" />
@@ -77,8 +84,7 @@
padding-left: 16px;
top: 10px;
left: -16px;
- "
- >
+ ">
未知仓
@@ -91,8 +97,7 @@
:material="st.material ?? '默认物料'"
:total="2"
:unit-value="st.unitDictValue"
- :ratio="st.ratio"
- />
+ :ratio="st.ratio" />
@@ -108,6 +113,9 @@ export default {
props: {},
data() {
return {
+ limit: 100,
+ page: 1,
+ totalPage: 0,
middleStorage: [],
dailyStorage: [],
unknownStorage: [],
@@ -123,12 +131,25 @@ export default {
this.unknownStorage.splice(0);
},
+ handleSizeChange(val) {
+ this.page = 1;
+ this.limit = val;
+ this.getList();
+ },
+
+ handlePageChange(val) {
+ this.getList();
+ },
+
getList(storageType) {
this.resetAllStorages();
- const params = storageType ? { limit: this.limit, page: this.page, typeDictValue: storageType } : { limit: this.limit, page: this.page };
+ const params = storageType
+ ? { limit: this.limit, page: this.page, typeDictValue: storageType }
+ : { limit: this.limit, page: this.page };
this.$http.get("/pms/materialStorageDynamic/page", { params }).then(({ data: res }) => {
if (res.code === 0) {
if ("list" in res.data) {
+ this.totalPage = res.data.total;
res.data.list.forEach((item) => {
if (item.typeDictValue === "1") {
this.dailyStorage.push(item);
@@ -169,4 +190,8 @@ export default {
background: #0b58ff;
/* position: absolute; */
}
+
+.float-right__pagination >>> .el-pagination {
+ margin: 0;
+}
diff --git a/src/views/modules/pms/shapeStep/config.js b/src/views/modules/pms/shapeStep/config.js
index b40d0d2..744bf59 100644
--- a/src/views/modules/pms/shapeStep/config.js
+++ b/src/views/modules/pms/shapeStep/config.js
@@ -105,7 +105,7 @@ export default function () {
label: "工艺编码",
prop: "code",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
- elparams: { placeholder: "请输入混料程序编码" }, // disabled: true },
+ elparams: { placeholder: "请输入混料工艺编码" }, // disabled: true },
},
],
// [
@@ -138,7 +138,7 @@ export default function () {
// { type: 'index', label: '序号' },
// { prop: "createTime", label: "添加时间", filter: timeFilter },
{ prop: "name", label: "参数名称", isEditField: true },
- { prop: "code", label: "参数编码", isEditField: true },
+ // { prop: "code", label: "参数编码", isEditField: true },
// { prop: "specifications", label: "规格", isEditField: true },
{ width: 80, prop: "value", label: "参数值", isEditField: true },
// { prop: "valueFloor", label: "参数值下限", isEditField: true },