update 0710反馈

This commit is contained in:
lb 2023-07-14 15:25:17 +08:00
부모 5b9e03a5a7
커밋 7ce44fadd9
8개의 변경된 파일117개의 추가작업 그리고 55개의 파일을 삭제

파일 보기

@ -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,

파일 보기

@ -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"></el-pagination>
@ -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;
}
},
},

파일 보기

@ -10,26 +10,35 @@
:width="'30%'"
:modal="false"
:fullscreen="false"
:top="'10vh'"
>
:top="'10vh'">
<!-- :append-to-body="appendToBody"> -->
<div>
<div v-loading="loading">
<el-form ref="dataForm" :model="dataForm">
<el-row v-for="(row, rowIndex) in configs.rows" :key="'row_' + rowIndex" :gutter="20">
<el-col v-for="(col, colIndex) in row" :key="colIndex" :span="col.span ?? 24 / row.length">
<el-form-item :prop="col.prop" :rules="col.rules || null" :label="col.label">
<el-input v-if="col.input" v-model="dataForm[col.prop]" clearable :disabled="detailMode" v-bind="col.elparams" />
<el-input
v-if="col.input"
v-model="dataForm[col.prop]"
clearable
:disabled="detailMode"
v-bind="col.elparams" />
<el-select
v-if="col.select"
v-model="dataForm[col.prop]"
clearable
:disabled="detailMode"
v-bind="col.elparams"
@change="handleSelectChange(col, $event)"
>
<el-option v-for="(opt, optIdx) in col.options" :key="'option_' + optIdx" :label="opt.label" :value="opt.value">
@change="handleSelectChange(col, $event)">
<el-option
v-for="(opt, optIdx) in col.options"
:key="'option_' + optIdx"
:label="opt.label"
:value="opt.value">
<span>{{ opt.label }}</span>
<span v-if="col.customLabel" style="display: inline-clock; margin-left: 12px; font-size: .9em;">{{ opt[col.customLabel] || '-' }}</span>
<span v-if="col.customLabel" style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
{{ opt[col.customLabel] || "-" }}
</span>
</el-option>
</el-select>
<el-switch
@ -38,9 +47,13 @@
:active-value="1"
:inactive-value="0"
@change="handleSwitchChange"
:disabled="detailMode" />
<el-input
v-if="col.textarea"
type="textarea"
v-model="dataForm[col.prop]"
:disabled="detailMode"
/>
<el-input v-if="col.textarea" type="textarea" v-model="dataForm[col.prop]" :disabled="detailMode" v-bind="col.elparams" />
v-bind="col.elparams" />
<!-- add more... -->
</el-form-item>
</el-col>
@ -56,9 +69,9 @@
:key="'operation_' + index"
:type="operate.type"
@click="handleBtnClick(operate)"
:loading="(operate.name === 'add' || operate.name === 'update') && btnLoading"
>{{ operate.label }}</el-button
>
:loading="(operate.name === 'add' || operate.name === 'update') && btnLoading">
{{ operate.label }}
</el-button>
</template>
<el-button @click="handleBtnClick({ name: 'cancel' })">取消</el-button>
</div>
@ -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);
});
}
});
},

파일 보기

@ -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: "请输入料重量" },
},
],
[

파일 보기

@ -112,7 +112,7 @@ export default {
topBtnConfig: null,
totalPage: 100,
page: 1,
size: 20, // 20
size: 100, // 20
dataList: [],
tableLoading: false,
subdialogVisible: false,

파일 보기

@ -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: "请选择原料" },

파일 보기

@ -3,6 +3,17 @@
<section class="container-title" style="margin-top: 10px; display: flex; align-items: center">
<div class="brand-color-line"></div>
<span style="line-height: 20px">料仓料位</span>
<!-- 导航器 -->
<div class="float-right__pagination" style="flex: 1 auto; display:flex; align-items:center; justify-content: flex-end;">
<el-pagination
@size-change="handleSizeChange"
@current-change="handlePageChange"
:current-page.sync="page"
:page-size.sync="limit"
:page-sizes="[20, 50, 100, 200, 1000]"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div>
</section>
<section class="container-content">
<div class="dialy-storage" v-if="dailyStorage.length">
@ -17,8 +28,7 @@
padding-left: 16px;
top: 10px;
left: -16px;
"
>
">
日料仓
</h3>
<div class="storage-list" style="padding: 12px 0; display: flex; flex-wrap: wrap">
@ -31,8 +41,7 @@
:material="st.material ?? '默认物料'"
:total="2"
:unit-value="st.unitDictValue"
:ratio="st.ratio"
/>
:ratio="st.ratio" />
</div>
</div>
<div class="middle-storage" v-if="middleStorage.length">
@ -47,8 +56,7 @@
padding-left: 16px;
top: 10px;
left: -16px;
"
>
">
中间仓
</h3>
<div class="middle-list" style="padding: 12px 0; display: flex; flex-wrap: wrap">
@ -61,8 +69,7 @@
:material="st.material ?? '默认物料'"
:total="2"
:unit-value="st.unitDictValue"
:ratio="st.ratio"
/>
:ratio="st.ratio" />
</div>
</div>
<div class="unknown-storage" v-if="unknownStorage.length">
@ -77,8 +84,7 @@
padding-left: 16px;
top: 10px;
left: -16px;
"
>
">
未知仓
</h3>
<div class="unknown-list" style="padding: 12px 0; display: flex; flex-wrap: wrap">
@ -91,8 +97,7 @@
:material="st.material ?? '默认物料'"
:total="2"
:unit-value="st.unitDictValue"
:ratio="st.ratio"
/>
:ratio="st.ratio" />
</div>
</div>
</section>
@ -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;
}
</style>

파일 보기

@ -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 },