diff --git a/src/components/BaseSearchForm.vue b/src/components/BaseSearchForm.vue index ffd0bae..5e85966 100644 --- a/src/components/BaseSearchForm.vue +++ b/src/components/BaseSearchForm.vue @@ -34,6 +34,32 @@ + + + {{ item.label }} + + {{ item[opt.customLabel] || "无描述" }} + + + + ({ - label: optionLabel ? item[optionLabel] : item.name, - value: optionValue ? item[optionValue] : item.id, - [field.customLabel]: item[field.customLabel], - })) - : res.data.list.map((item) => ({ - label: optionLabel ? item[optionLabel] : item.name, - value: optionValue ? item[optionValue] : item.id, - })) - ); + const optionProp = "complexSelect" in field ? "complexSelect" : "select"; + let options = []; + if (field.customLabel) { + options = res.data.list.map((item) => ({ + label: optionLabel ? item[optionLabel] : item.name, + value: optionValue ? item[optionValue] : item.id, + [field.customLabel]: item[field.customLabel], + })); + } else if (field.customLabels) { + options = res.data.list.map((item) => { + let extraOptions = {}; + field.customLabels.forEach((label) => { + extraOptions[label] = item[label]; + }); + return { + label: optionLabel ? item[optionLabel] : item.name, + value: optionValue ? item[optionValue] : item.id, + ...extraOptions, + }; + }); + } else { + options = res.data.list.map((item) => ({ + label: optionLabel ? item[optionLabel] : item.name, + value: optionValue ? item[optionValue] : item.id, + })); + } + this.$set(field, optionProp, options); } } else { this.$message({ diff --git a/src/views/modules/pms/blenderOrder/config.js b/src/views/modules/pms/blenderOrder/config.js index 941ea1c..3e0b252 100644 --- a/src/views/modules/pms/blenderOrder/config.js +++ b/src/views/modules/pms/blenderOrder/config.js @@ -9,7 +9,7 @@ export default function () { // { prop: "kilnCode", label: "窑炉" }, { width: 128, prop: "orderCode", label: "主订单号" }, { width: 60, prop: "orderCate", label: "子号" }, - { width: 128, prop: "code", label: "混料订单号" }, + // { width: 128, prop: "code", label: "混料订单号" }, { width: 80, prop: "percent", @@ -25,7 +25,7 @@ export default function () { // { prop: "startTime", label: "开始时间" }, // { prop: "shapeCode", label: "砖型" }, { prop: "bomCode", label: "配方" }, - { prop: "bomName", label: "牌号" }, + { width: 180, prop: "bomName", label: "牌号" }, { width: 60, prop: "ai", label: "版本" }, { width: 120, prop: "qty", label: "混料总量 [kg]" }, { width: 120, prop: "comqty", label: "已完成量 [kg]" }, @@ -40,7 +40,7 @@ export default function () { prop: "operations", name: "操作", fixed: "right", - width: 190, + width: 210, subcomponent: TableOperaionComponent, options: [ { diff --git a/src/views/modules/pms/brokeLog/config.js b/src/views/modules/pms/brokeLog/config.js index 30df20b..991dd16 100644 --- a/src/views/modules/pms/brokeLog/config.js +++ b/src/views/modules/pms/brokeLog/config.js @@ -7,21 +7,21 @@ export default function () { const tableProps = [ { type: "index", label: "序号" }, // { prop: "updateTime", label: "上料时间", filter: timeFilter }, - { prop: "materialName", label: "原料" }, + { width: 100, prop: "materialName", label: "原料" }, // { prop: "material", label: "原料编码" }, - { prop: "qty", label: "上料量" }, - { prop: "siloName1", label: "上料料仓1" }, - { prop: "siloName2", label: "上料料仓2" }, - { prop: "siloName3", label: "上料料仓3" }, - { prop: "startTime", label: "开始上料时间", filter: timeFilter }, - { prop: "endTime", label: "结束上料时间", filter: timeFilter }, - { prop: "silo1Change", label: "料仓1变化" }, - { prop: "silo2Change", label: "料仓2变化" }, - { prop: "silo3Change", label: "料仓3变化" }, - { prop: "statusDictValue", label: "破碎作业", filter: (val) => ["正常停止", "废除"][val] ?? "-" }, + { width: 90, prop: "qty", label: "上料量[kg]", filter: val => (val != null) ? (+val).toFixed(0) : '-' }, + { width: 100, prop: "siloName1", label: "上料料仓1" }, + { width: 100, prop: "siloName2", label: "上料料仓2" }, + { width: 100, prop: "siloName3", label: "上料料仓3" }, + { width: 256, prop: "startTime", label: "开始上料时间", filter: timeFilter }, + { width: 256, prop: "endTime", label: "结束上料时间", filter: timeFilter }, + { width: 128, prop: "silo1Change", label: "料仓1变化[kg]", filter: val => (val != null) ? (+val).toFixed(0) : '-' }, + { width: 128, prop: "silo2Change", label: "料仓2变化[kg]", filter: val => (val != null) ? (+val).toFixed(0) : '-' }, + { width: 128, prop: "silo3Change", label: "料仓3变化[kg]", filter: val => (val != null) ? (+val).toFixed(0) : '-' }, + // { width: 128, prop: "statusDictValue", label: "破碎作业", filter: (val) => ["正常停止", "废除"][val] ?? "-" }, // { prop: "description", label: "描述" }, - { prop: "remark", label: "备注" }, - { prop: "createTime", label: "添加时间", filter: timeFilter }, + { width: 128, prop: "remark", label: "备注" }, + // { width: 256, prop: "createTime", label: "添加时间", filter: timeFilter }, { prop: "operations", name: "操作", diff --git a/src/views/modules/pms/brokeLogHand/config.js b/src/views/modules/pms/brokeLogHand/config.js index af96f06..7f6de65 100644 --- a/src/views/modules/pms/brokeLogHand/config.js +++ b/src/views/modules/pms/brokeLogHand/config.js @@ -9,19 +9,19 @@ export default function () { // { prop: "updateTime", label: "上料时间", filter: timeFilter }, { prop: "materialName", label: "原料" }, // { prop: "material", label: "原料编码" }, - { prop: "qty", label: "计划上料量" }, + { prop: "qty", label: "计划上料量[kg]", filter: val => (val != null) ? (+val).toFixed(0) : '-' }, { prop: "siloName1", label: "上料料仓" }, // { prop: "siloName2", label: "上料料仓2" }, // { prop: "siloName3", label: "上料料仓3" }, { prop: "startTime", label: "开始上料时间", filter: timeFilter }, { prop: "endTime", label: "结束上料时间", filter: timeFilter }, - { prop: "silo1Change", label: "料仓变化" }, + { prop: "silo1Change", label: "料仓变化[kg]", filter: val => (val != null) ? (+val).toFixed(0) : '-' }, // { prop: "silo2Change", label: "料仓2变化" }, // { prop: "silo3Change", label: "料仓3变化" }, - { prop: "statusDictValue", label: "破碎作业", filter: (val) => ["正常停止", "废除"][val] ?? "-" }, + // { prop: "statusDictValue", label: "破碎作业", filter: (val) => ["正常停止", "废除"][val] ?? "-" }, // { prop: "description", label: "描述" }, { prop: "remark", label: "备注" }, - { prop: "createTime", label: "添加时间", filter: timeFilter }, + // { prop: "createTime", label: "添加时间", filter: timeFilter }, { prop: "operations", name: "操作", @@ -68,9 +68,11 @@ export default function () { prop: "material", label: "按原料搜索", // input: true, - select: [], - fieldOptionValue: "name", // 把料仓筛选条件的label改为展示code,而不是展示name + complexSelect: [], + fieldOptionLabel: 'code', + fieldOptionValue: "code", // 把料仓筛选条件的label改为展示code,而不是展示name default: { value: "" }, + customLabels: ["description", "name"], fn: () => this.$http.get("/pms/material/page", { params: { page: 1, limit: 999 } }), bind: { placeholder: "请输入原料名", diff --git a/src/views/modules/pms/firingStep/config.js b/src/views/modules/pms/firingStep/config.js index df3610c..b506cc6 100644 --- a/src/views/modules/pms/firingStep/config.js +++ b/src/views/modules/pms/firingStep/config.js @@ -110,7 +110,7 @@ export default function () { extraParams: ["techId", "key"], props: [ { prop: "name", label: "参数名称", isEditField: true }, - { prop: "code", label: "参数编码", isEditField: true }, + // { prop: "code", label: "参数编码", isEditField: true }, { width: 80, prop: "value", label: "参数值", isEditField: true }, { prop: "description", label: "描述", isEditField: true }, { @@ -141,20 +141,24 @@ export default function () { rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请输入参数名称" }, }, - { - input: true, - label: "参数编码", - prop: "code", - rules: { required: true, message: "必填项不能为空", trigger: "blur" }, - elparams: { placeholder: "请输入参数编码" }, - }, + // { + // input: true, + // label: "参数编码", + // prop: "code", + // rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + // elparams: { placeholder: "请输入参数编码" }, + // }, + ], + [ + { input: true, label: "参数值上限", prop: "valueTop", elparams: { placeholder: "请输入参数值上限" } } ], [ - { input: true, label: "参数值上限", prop: "valueTop", elparams: { placeholder: "请输入参数值上限" } }, { input: true, label: "参数值下限", prop: "valueFloor", elparams: { placeholder: "请输入参数值下限" } }, ], [ - { input: true, label: "参数值", prop: "value", elparams: { placeholder: "请输入参数值" } }, + { input: true, label: "参数值", prop: "value", elparams: { placeholder: "请输入参数值" } } + ], + [ { input: true, label: "描述", diff --git a/src/views/modules/pms/kilnOrder/config.js b/src/views/modules/pms/kilnOrder/config.js index 7c9f643..3bc9b3b 100644 --- a/src/views/modules/pms/kilnOrder/config.js +++ b/src/views/modules/pms/kilnOrder/config.js @@ -6,20 +6,21 @@ import { timeFilter } from "@/utils/filters"; export default function () { const tableProps = [ { type: "index", label: "序号" }, - { prop: "kilnCode", label: "窑炉" }, { width: 160, prop: "orderCode", label: "主订单号" }, { width: 60, prop: "orderCate", label: "子号" }, - { width: 160, prop: "code", label: "烧成订单号" }, + { prop: "kilnCode", label: "窑炉" }, { width: 60, prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") }, + // { width: 160, prop: "code", label: "烧成订单号" }, // { prop: "statusDictValue", label: "订单状态", filter: (val) => (val !== null && val !== undefined ? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝"][val] : "-"), }, // { prop: "startTime", label: "开始时间" }, - { prop: "bomCode", label: "配方" }, + { width: 180, prop: "bomName", label: "牌号" }, + { prop: 'sapParam6', label: '烧成温度' }, + { prop: 'sapParam7', label: '保温时间' }, { width: 80, prop: "ai", label: "版本号" }, { width: 80, prop: "qty", label: "生产量" }, { prop: "qtyComplete", label: "完成量" }, { width: 160, prop: "createTime", label: "添加时间", filter: timeFilter }, // { prop: "remark", label: "备注" }, - // { prop: 'version', label: '配方号' }, // { prop: 'status', label: '状态', subcomponent: StatusComponent }, // subcomponent // { prop: "description", label: "详情", subcomponent: TableTextComponent }, // { diff --git a/src/views/modules/pms/materialStorageQty/components/storageBox.vue b/src/views/modules/pms/materialStorageQty/components/storageBox.vue index 7cf84ed..25855aa 100644 --- a/src/views/modules/pms/materialStorageQty/components/storageBox.vue +++ b/src/views/modules/pms/materialStorageQty/components/storageBox.vue @@ -2,28 +2,52 @@
- + style=" + margin-bottom: 10px; + padding-bottom: 12px; + text-align: center; + font-weight: bold; + font-size: 1.125em; + border-bottom: 1px solid #ccc3; + "> + {{ storage }}
-
+
- {{ computedRatio + '%' }} + style=" + position: absolute; + bottom: 0; + left: 0; + height: 0; + width: 100%; + font-size: 1.125rem; + text-align: center; + " + :style="{ + background: color, + height: computedRatio + '%', + color: computedRatio > 20 ? 'white' : '#ccc', + }"> + + {{ computedRatio + "%" }} +
{{ material }}
- {{ qty }} {{ computedUnit }} + {{ qty }} + {{ computedUnit }}