Compare commits

..

41 Commits

Author SHA1 Message Date
lb
6b978fa93b done 1019 again 2023-10-19 16:22:56 +08:00
lb
82171c8ea8 done 1019 again 2023-10-19 16:14:00 +08:00
lb
41f2f01fd7 done 1019 2023-10-19 16:12:33 +08:00
lb
002c5a80e5 update 1019 2023-10-19 14:47:18 +08:00
lb
31b2cfcee6 add car maintain 2023-09-26 09:43:43 +08:00
lb
506cab65a4 bugfix 0922 2023-09-22 14:41:11 +08:00
lb
33d13b3eb4 update docs0918 2023-09-19 15:17:30 +08:00
lb
3c44fbc636 update 2023-09-15 16:56:51 +08:00
lb
61ca7b82cd update 2023-09-15 15:19:39 +08:00
lb
eafb0f7c2a update 2023-09-15 09:20:22 +08:00
lb
1f99830600 update 2023-09-14 17:03:23 +08:00
lb
1bd826b21c update 0913 2023-09-13 10:50:10 +08:00
lb
71851b65e0 update orderimport template 2023-09-11 15:46:40 +08:00
lb
13de0ce8ea update 订单-导出 2023-09-08 14:18:35 +08:00
lb
bd73613803 update 0904docs 2023-09-05 10:49:37 +08:00
lb
847b2c787c update docs_0825 2023-08-25 15:21:27 +08:00
lb
7de3355106 update print dom 2023-08-25 11:04:27 +08:00
lb
807766f83f add 包装报工-检测线报工 2023-08-25 10:51:16 +08:00
lb
521563bd00 Merge branch 'docs_0815' 2023-08-23 16:38:09 +08:00
lb
d4a427ec5e update docs_0822 2023-08-23 16:30:59 +08:00
lb
a28544b671 add 生成托盘弹窗 2023-08-22 10:36:46 +08:00
lb
7513d82d4d add 报工历史 2023-08-21 16:16:23 +08:00
lb
02c8538d47 update dialog style 2023-08-21 13:30:42 +08:00
lb
7b0f53f677 add 库存订单表 2023-08-21 10:56:21 +08:00
lb
a33784740d update 订单编辑相关页面 2023-08-21 09:37:33 +08:00
lb
0939b96386 update report dialog 2023-08-21 08:58:41 +08:00
lb
58f86a9b2b update 压机报工页面 2023-08-18 11:02:01 +08:00
lb
3adabb68b8 add 报工预览 2023-08-17 17:01:53 +08:00
lb
725fa19bd1 update 批量打印 2023-08-16 16:58:55 +08:00
lb
cdaa2c1f6c update 压机报工的search logic 2023-08-16 11:30:16 +08:00
lb
84a4b2999d add 压机报工 2023-08-15 13:24:39 +08:00
lb
99619fdc0a bug PrintDom 打印成功也会提示失败 2023-08-15 10:41:43 +08:00
lb
d1bc97f42a update 更新包装托盘打印 2023-08-14 17:00:28 +08:00
lb
62f625197f add print logic 2023-08-11 16:23:58 +08:00
lb
4addca6d97 update docs_0811 2023-08-11 11:05:05 +08:00
lb
09c6a609b8 update docs_0810 2023-08-10 16:14:53 +08:00
lb
e3346be048 Merge branch 'docs_0727' 2023-08-09 14:12:46 +08:00
lb
bc5b6c2868 update 订单管理的cell-class-name 2023-08-09 14:11:57 +08:00
lb
bfd6a42349 update blender-order 2023-08-09 10:52:02 +08:00
lb
42a7fb8bc9 Merge branch 'docs_0727' 2023-08-03 10:00:55 +08:00
lb
c5b99b3ec4 Merge branch 'docs_0727' 2023-07-27 17:01:09 +08:00
149 changed files with 5378 additions and 1158 deletions

View File

@ -1,5 +1,5 @@
{
"printWidth": 120,
"printWidth": 108,
"bracketSameLine": true,
"htmlWhitespaceSensitivity": "ignore",
"semi": true,

View File

@ -17,12 +17,15 @@
"babel-plugin-component": "^1.1.1",
"code-brick-zj": "^0.0.7",
"core-js": "^3.6.5",
"dayjs": "^1.11.9",
"echarts": "^5.3.3",
"element-theme": "^2.0.1",
"element-ui": "^2.15.7",
"js-cookie": "^2.2.1",
"jsbarcode": "^3.11.5",
"lodash": "^4.17.19",
"moment": "^2.29.4",
"qrcode": "^1.5.3",
"qs": "^6.9.4",
"quill": "^1.3.7",
"sass": "^1.26.5",

Binary file not shown.

View File

@ -38,10 +38,10 @@
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
<script>
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.103:8080/pms-am';
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.49:8080/pms-am'; // tengyun
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.49:8080/pms-am'; // tengyun
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.67:8080/pms-am'; // wenzhang
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tao
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
// window.SITE_CONFIG['apiURL'] = 'http://localhost:3000/p//////ms-am'; // xv
</script>
<% } %>
@ -60,7 +60,7 @@
<!-- 生产环境 -->
<% if (process.env.VUE_APP_NODE_ENV === 'prod') { %>
<script>
window.SITE_CONFIG['apiURL'] = 'http://10.196.233.155:8080/pms-am';
window.SITE_CONFIG['apiURL'] = 'http://10.196.233.155/pms-am';
</script>
<% } %>
</head>

View File

@ -538,7 +538,7 @@ img {
.aui-content {
position: relative;
padding: $content--padding;
min-height: calc(100vh - #{$navbar--height});
min-height: calc(100vh - 30px - #{$navbar--height});
&__wrapper {
position: relative;
margin-left: $sidebar--width;
@ -673,7 +673,8 @@ img {
z-index: 830;
}
> .el-tab-pane {
min-height: calc(#{$content--fill-height-tabs});
// min-height: calc(#{$content--fill-height-tabs});
min-height: calc(100vh - 144px);
> .aui-card--fill > .el-card__body {
min-height: calc(#{$content--fill-height-tabs} - 2px);
}

View File

@ -11,8 +11,7 @@
row-key="id"
:cell-style="{ padding: 0 }"
@selection-change="handleSelectionChange"
border
>
border>
<!-- :cell-style="{ padding: 0 }" -->
<!-- @cell-mouse-enter="(row, col, cell, event) => $emit('cell-mouse-enter', row, col, cell, event)"> -->
<!-- @cell-mouse-leave="(row, col, cell, event) => $emit('cell-mouse-leave', row, col, cell, event)"> -->
@ -34,8 +33,7 @@
}
: null
"
v-bind="head.more"
></el-table-column>
v-bind="head.more"></el-table-column>
<!-- 普通的表头 -->
<el-table-column
v-else
@ -50,8 +48,7 @@
:align="head.align || null"
:class-name="head.className ?? 'initial-column-class'"
v-bind="head.more"
:show-overflow-tooltip="head.showOverflowTooltip ?? !(head.prop === 'operations')"
>
:show-overflow-tooltip="head.showOverflowTooltip ?? !(head.prop === 'operations')">
<!-- :show-overflow-tooltip="head.showOverflowTooltip || true" -->
<!-- 子组件 -->
<template v-if="head.prop" slot-scope="scope">
@ -60,15 +57,17 @@
:is="head.subcomponent"
:key="idx + 'sub'"
:inject-data="{ ...scope.row, head }"
@emit-data="handleSubEmitData"
/>
@emit-data="handleSubEmitData" />
<!-- 直接展示数据或应用过滤器 -->
<span v-else>{{ scope.row[head.prop] | commonFilter(head.filter) }}</span>
</template>
<!-- 多级表头 -->
<template v-if="!head.prop && head.children">
<TableHead v-for="(subhead, subindex) in head.children" :key="'subhead-' + idx + '-subindex-' + subindex" :opt="subhead" />
<TableHead
v-for="(subhead, subindex) in head.children"
:key="'subhead-' + idx + '-subindex-' + subindex"
:opt="subhead" />
</template>
</el-table-column>
</template>
@ -109,12 +108,16 @@ export default {
type: Number,
default: 0,
},
selectProps: {
type: Array,
default: null,
},
},
// inject: ["urls"],
data() {
return {
dataList: [],
selections: []
selections: [],
};
},
watch: {
@ -124,14 +127,30 @@ export default {
},
methods: {
handleSubEmitData(payload) {
console.log("[component] BaseListTable handleSubEmitData(): ", payload);
//console.log("[component] BaseListTable handleSubEmitData(): ", payload);
this.$emit("operate-event", payload);
},
handleSelectionChange(val) {
// this.selections = val;
console.log('selections change: ', val)
this.$emit('select', val.map(item => item.id))
}
//console.log("selections change: ", val);
if (this.selectProps.length == 0)
this.$emit(
"select",
val.map((item) => item.id)
);
else {
this.$emit(
"select",
val.map((item) => {
const payload = {};
this.selectProps.forEach((key) => {
payload[key] = item[key];
});
return payload;
})
);
}
},
},
};
</script>
@ -145,7 +164,7 @@ export default {
text-shadow: unset;
}
.base-list-table >>> .no-padding-class .cell {
.base-list-table >>> .no-padding-class .cell {
line-height: 1.75;
padding: 0;
}

View File

@ -34,6 +34,32 @@
</span>
</el-option>
</el-select>
<el-select
v-if="opt.complexSelect"
v-model="dataForm[opt.prop]"
v-bind="opt.bind"
clearable
size="small"
@keydown.enter.native.prevent="handleBtnClick('查询')">
<el-option
v-for="item in opt.complexSelect"
:key="item.value + Math.random().toString()"
:label="item.label"
:value="item.value">
<span>{{ item.label }}</span>
<span v-if="opt.customLabel" style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
{{ item[opt.customLabel] || "无描述" }}
</span>
<template v-if="opt.customLabels">
<span
v-for="(label, idx) in opt.customLabels"
:key="Math.random()"
style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
{{ item[label] || " - " }}
</span>
</template>
</el-option>
</el-select>
<el-date-picker
v-if="opt.timerange"
v-model="dataForm[opt.prop]"
@ -77,20 +103,9 @@ export default {
dataForm: {},
};
},
// watch ......
// watch: {
// dataForm: {
// handler: (val) => {
// console.log("[BaseSearchForm::watcher::dataForm]", val);
// },
// deep: true,
// },
// },
created() {},
mounted() {
console.log("[BaseSearchForm] configs:", JSON.parse(JSON.stringify(this.headConfig)));
//console.log("[BaseSearchForm] configs:", JSON.parse(JSON.stringify(this.headConfig)));
this.headConfig.fields.forEach((field, index) => {
// field.prop
@ -114,20 +129,33 @@ export default {
if (res.code === 0 && res.data) {
// TODO:
if ("list" in res.data) {
this.$set(
field,
"select",
"customLabel" in field
? res.data.list.map((item) => ({
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({
@ -143,7 +171,7 @@ export default {
// TODO: ...
if (field.watch) {
// const { index: innerIdx, condition } = field.watch;
// console.log("=====field.watch=====", innerIdx, this.searchForm[innerIdx], this.headConfig.fields[innerIdx].default);
// //console.log("=====field.watch=====", innerIdx, this.searchForm[innerIdx], this.headConfig.fields[innerIdx].default);
// //
// this.$watch(
// () => this.searchForm[innerIdx],
@ -153,19 +181,19 @@ export default {
// // queryParams
// // })
// this.$http(field.url, queryParams).then((res) => {
// console.log("[==>] !!!", queryParams, res);
// //console.log("[==>] !!!", queryParams, res);
// // index
// this.searchForm[index] = Math.floor(Math.random() * 10);
// });
// }
// );
// console.log("[BaseSearchForm] mounted(): ", this.searchForm);
// //console.log("[BaseSearchForm] mounted(): ", this.searchForm);
// //
// if (this.searchForm[innerIdx]) {
// // TODO: ...
// console.log("TODO: ...");
// //console.log("TODO: ...");
// } else {
// console.log("TODO: ...");
// //console.log("TODO: ...");
// }
}
});

View File

@ -100,15 +100,6 @@ export default {
methods: {
/** init **/
init(id) {
if (!id) {
this.$message({
message: `没有传 id!`,
type: "error",
duration: 1500,
});
console.log("[*] 传入car payload对话框的id是", id);
return;
}
this.showPaination = false;
this.id = id;
this.getList();
@ -130,7 +121,7 @@ export default {
params,
})
.then(({ data: res }) => {
console.log("[car payload dialog] [http response] res is: ", res);
//console.log("[car payload dialog] [http response] res is: ", res);
if (res.code === 0) {
// page :
@ -183,7 +174,7 @@ export default {
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -199,7 +190,7 @@ export default {
// break;
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] ! name");
}
},

View File

@ -1,17 +1,14 @@
<template>
<el-dialog
class="dialog-just-form"
custom-class="pms-dialog"
:visible="dialogVisible"
@close="handleClose"
:destroy-on-close="false"
:close-on-click-modal="configs.clickModalToClose ?? false"
:width="configs.dialogWidth ?? '50%'">
<!-- title -->
<div slot="title" class="dialog-title">
<h1 class="">
{{ detailMode ? "查看详情" : dataForm.id ? "编辑" : "新增" }}
</h1>
</div>
:width="configs.width || '50%'"
:destroy-on-close="false">
<span slot="title" class="dialog-title">
{{ detailMode ? "查看详情" : dataForm.id ? "编辑" : "新增" }}
</span>
<!-- form -->
<el-form ref="dataForm" :model="dataForm" v-loading="loadingStatus">
@ -75,7 +72,9 @@
:label="opt.label"
:value="opt.value">
<span>{{ opt.label }}</span>
<span v-if="col.customLabel" style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
<span
v-if="col.customLabel"
style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
{{ opt[col.customLabel] || "无描述" }}
</span>
<template v-if="col.customLabels">
@ -256,7 +255,7 @@ export default {
const promiseHistory = {};
const getData = (col, param) => {
// console.log("getData: ", col.prop, "/", param ?? "no param!");
// //console.log("getData: ", col.prop, "/", param ?? "no param!");
// -
promiseHistory[col.prop] = col.fetchData(param).then(({ data: res }) => {
if (res.code === 0) {
@ -296,13 +295,13 @@ export default {
//
if ("injectTo" in col) {
console.log("set watcher: ", col.prop);
//console.log("set watcher: ", col.prop);
const valueProp = "optionValue" in col ? col.optionValue : "id";
const unwatch = this.$watch(
() => this.dataForm[col.prop],
(val) => {
console.log("do watcher: ", col.prop);
//console.log("do watcher: ", col.prop);
if (col.disableWatcherOnEdit && this.editMode) return;
if (!val) {
col.injectTo.map((item) => {
@ -318,7 +317,7 @@ export default {
this.$forceUpdate();
});
} else {
console.log('[x] if ("injectTo" in col) {');
//console.log('[x] if ("injectTo" in col) {');
}
},
{
@ -357,14 +356,14 @@ export default {
//
if ("injectTo" in col && !col.watcher) {
console.log("set watcher: ", col.prop);
//console.log("set watcher: ", col.prop);
const valueProp = "optionValue" in col ? col.optionValue : "id";
const unwatch = this.$watch(
() => this.dataForm[col.prop],
(val) => {
if (col.disableWatcherOnEdit && this.editMode) return;
console.log("do watcher: ", col.prop);
//console.log("do watcher: ", col.prop);
if (!val) {
col.injectTo.map((item) => {
this.$set(this.dataForm, item[0], null);
@ -379,7 +378,7 @@ export default {
this.$forceUpdate();
});
} else {
console.log('[x] if ("injectTo" in col) {');
//console.log('[x] if ("injectTo" in col) {');
}
},
{
@ -400,16 +399,16 @@ export default {
}
});
console.log("after getData: ", promiseHistory);
//console.log("after getData: ", promiseHistory);
};
/** 处理函数 */
const handleFn = (prevProp, anchorField, anchorValue, targetField, col) => {
console.log("[handleFn]: ", prevProp, anchorField, anchorValue, targetField);
//console.log("[handleFn]: ", prevProp, anchorField, anchorValue, targetField);
/** 此时 cachedList 已经确保可用了 */
const target = this.cachedList[prevProp].find((i) => i[anchorField] === anchorValue);
const param = target ? target[targetField] : "";
console.log("((( chosenObject )))", target);
//console.log("((( chosenObject )))", target);
getData(col, param);
};
@ -428,13 +427,13 @@ export default {
row.forEach((col) => {
if (col == null) return;
if (col.fetchData && typeof col.fetchData === "function" && col.hasPrev) {
console.log("[hasPrev] set watcher: ", col.hasPrev);
//console.log("[hasPrev] set watcher: ", col.hasPrev);
// -
const unwatch = this.$watch(
() => this.dataForm[col.hasPrev],
(val) => {
console.log("[hasPrev] do watcher: ", col.hasPrev);
//console.log("[hasPrev] do watcher: ", col.hasPrev);
if (!val) {
col.injectTo.map((item) => {
this.$set(this.dataForm, item[0], null);
@ -468,11 +467,11 @@ export default {
if (this.configs.extraFields)
this.configs.extraFields.forEach((cnf) => {
if (cnf.listenTo) {
console.log("set watcher for: ", cnf.prop);
//console.log("set watcher for: ", cnf.prop);
const unwatch = this.$watch(
() => this.dataForm[cnf.listenTo.prop],
(carId) => {
console.log("do watcher for: ", cnf.prop);
//console.log("do watcher for: ", cnf.prop);
if (!carId) return;
if (cnf.disableWatcherOnEdit && this.editMode) return;
cnf.listenTo.handler.call(this, this.cachedList[cnf.listenTo.prop], carId);
@ -528,14 +527,14 @@ export default {
resetSpecificFields(fields) {
Object.keys(this.dataForm).forEach((key) => {
// console.log(`${key} ${fields}`, key in fields, fields.indexOf(key))
// //console.log(`${key} ${fields}`, key in fields, fields.indexOf(key))
if (fields.indexOf(key) !== -1) {
// console.log(`key ${key} in fields`)
// //console.log(`key ${key} in fields`)
// this.dataForm[key] = null;
this.$set(this.dataForm, key, null);
}
});
console.log("this.dataform", this.dataForm);
//console.log("this.dataform", this.dataForm);
},
resetForm(excludeId = false, immediate = false) {
@ -557,9 +556,9 @@ export default {
/** init **/
init(id, detailMode, tagInfo, extraParams) {
// console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
// //console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
if (this.$refs.dataForm) {
// console.log("[DialogJustForm] clearing form validation...");
// //console.log("[DialogJustForm] clearing form validation...");
// dialog dataForm [0]
this.$refs.dataForm.clearValidate();
}
@ -570,7 +569,7 @@ export default {
/** 判断 extraParams */
if (extraParams && typeof extraParams === "object") {
for (const [key, value] of Object.entries(extraParams)) {
// console.log("[dialog] dataForm | key | value", this.dataForm, key, value);
// //console.log("[dialog] dataForm | key | value", this.dataForm, key, value);
this.$set(this.dataForm, key, value);
}
}
@ -603,7 +602,7 @@ export default {
url: file.fileUrl,
}));
}
// console.log("[DialogJustForm] init():", this.dataForm);
// //console.log("[DialogJustForm] init():", this.dataForm);
} else {
this.$message({
message: `${res.code}: ${res.msg}`,
@ -629,7 +628,7 @@ export default {
handleButtonClick(col) {
if (!("onClick" in col)) {
console.log("[handleButtonClick] 配置文件config.js 里没有绑定 onClick");
//console.log("[handleButtonClick] config.js onClick");
return;
}
@ -640,7 +639,7 @@ export default {
handleSelectChange(col, eventValue) {
if ("autoUpdateProp" in col) {
//
// console.log(col.options, eventValue, this.savedDatalist);
// //console.log(col.options, eventValue, this.savedDatalist);
const item = this.savedDatalist[col.prop].find((item) => item.id === eventValue);
this.shadowDataForm[col.autoUpdateProp] = item.cate ?? null;
}
@ -648,17 +647,17 @@ export default {
},
handleSwitchChange(val) {
console.log("[dialog] switch change: ", val, this.dataForm);
//console.log("[dialog] switch change: ", val, this.dataForm);
},
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
//console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
addOrUpdate(method = "POST", url) {
if ("parentId" in this.dataForm) {
console.log("[DialogJustForm parentId]", this.dataForm.parentId);
//console.log("[DialogJustForm parentId]", this.dataForm.parentId);
// parentId cascader ["xxx"]xxx
const lastItem = this.dataForm.parentId.length - 1;
this.dataForm.parentId = this.dataForm.parentId[lastItem];
@ -710,7 +709,7 @@ export default {
data: httpPayload,
})
.then(({ data: res }) => {
console.log("[add&update] res is: ", res);
//console.log("[add&update] res is: ", res);
this.loadingStatus = false;
if (res.code === 0) {
this.$message.success(method === "POST" ? "添加成功" : "更新成功");
@ -736,7 +735,7 @@ export default {
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -748,7 +747,7 @@ export default {
break;
case "resetSpecific":
// qualityInspectionRecord config
console.log("resetFields", this.resetFields);
//console.log("resetFields", this.resetFields);
this.resetSpecificFields(this.resetFields);
break;
case "add":
@ -763,18 +762,18 @@ export default {
break;
}
case "add-car-payload": {
console.log("edit-car-payload", payload);
//console.log("edit-car-payload", payload);
this.addOrUpdate("POST", this.urls.payloadFormUrl);
break;
}
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] ! name");
}
},
handleUploadChange(file, fileList) {
console.log("[Upload] handleUploadChange...", file, fileList);
//console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {
@ -787,20 +786,19 @@ export default {
<style scoped>
.dialog-just-form >>> .el-dialog__body {
/* padding-top: 16px !important;
padding-bottom: 16px !important; */
padding-top: 0 !important;
padding-bottom: 0 !important;
}
.dialog-just-form >>> .el-form {
padding: 16px;
max-height: 56vh;
overflow-y: auto;
}
.el-select,
.el-cascader,
.el-date-editor {
width: 100% !important;
}
.dialog-just-form >>> .el-dialog__header {
padding: 10px 20px 10px;
/* background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), white); */
}
</style>

View File

@ -4,6 +4,7 @@
element-loading-text="处理中,请耐心等待..."
element-loading-background="rgba(0,0,0,0.1)"
class="dialog-just-form"
custom-class="pms-dialog"
:visible="visible"
@close="handleClose"
width="30%"
@ -136,7 +137,7 @@ export default {
},
handleSuccess(response, file, fileList) {
console.log("success response", response);
//console.log("success response", response);
this.loadingStatus = false
try {
if ("code" in response && response.code === 500) {
@ -177,7 +178,7 @@ export default {
handleError(err, file, fileList) {
this.loadingStatus = false
console.log("err", err);
//console.log("err", err);
},
handleBtnClick(payload) {
@ -210,7 +211,7 @@ export default {
},
handleUploadChange(file, fileList) {
// console.log("[Upload] handleUploadChange...", file, fileList);
// //console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {
@ -229,7 +230,7 @@ export default {
/* padding-top: 16px !important;
padding-bottom: 16px !important; */
padding-top: 0 !important;
padding-bottom: 0 !important;
padding-bottom: 12px !important;
}
.el-select,
@ -238,11 +239,6 @@ export default {
width: 100% !important;
}
.dialog-just-form >>> .el-dialog__header {
padding: 10px 20px 10px;
/* background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), white); */
}
.h0 {
height: 0;
width: 0;

View File

@ -12,12 +12,9 @@
:destroy-on-close="false"
@close="handleClose"
:close-on-click-modal="configs.clickModalToClose ?? false">
<!-- title -->
<div slot="title" class="dialog-title">
<h1 class="">
{{ detailMode ? "查看详情" : dataForm.id ? "编辑" : "新增" }}
</h1>
</div>
<h1 slot="title" class="dialog-title">
{{ detailMode ? "查看详情" : dataForm.id ? "编辑" : "新增" }}
</h1>
<div class="dialog-body__inner relative">
<!-- v-if="dataForm.id && !detailMode && /属性|详情/.test(activeMenu) && $hasPermission()" -->
@ -100,7 +97,9 @@
:label="opt.label"
:value="opt.value">
<span>{{ opt.label }}</span>
<span v-if="col.customLabel" style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
<span
v-if="col.customLabel"
style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
{{ opt[col.customLabel] || "无描述" }}
</span>
</el-option>
@ -169,7 +168,9 @@
<!-- 附件标签页 -->
<div v-if="dataForm.id && tab.key === 'attachment'" key="attachment">
<div class="upload-tips" style="font-size: 0.8em; margin-bottom: 12px">文件大小不要超过 2MB</div>
<div class="upload-tips" style="font-size: 0.8em; margin-bottom: 12px">
文件大小不要超过 2MB
</div>
<!-- 附件列表 -->
<div class="" v-loading="loadingStatus">
<ul class="file-list">
@ -212,6 +213,7 @@
:url="urls.subase"
:configs="configs.subDialog"
:related-id="dataForm.id"
:code="extraCode"
@refreshDataList="getSubList"></small-dialog>
<!-- footer -->
@ -293,11 +295,12 @@ export default {
if (col.fetchData)
col.fetchData().then(({ data: res }) => {
console.log("[Fetch Data]", "list" in res.data, res.data, res.data.list);
//console.log("[Fetch Data]", "list" in res.data, res.data, res.data.list);
if (res.code === 0) {
if (col.cacheFetchedData) {
// cache fetched data
cached[col.prop] = "list" in res.data ? res.data.list : Array.isArray(res.data) ? res.data : [];
cached[col.prop] =
"list" in res.data ? res.data.list : Array.isArray(res.data) ? res.data : [];
}
if (!col.options || !col.options.length) {
@ -329,7 +332,9 @@ export default {
}
// col.options = res.data.list;
else if (col.options.length) {
"list" in res.data ? res.data.list.unshift(...col.options) : res.data.unshift(...col.options);
"list" in res.data
? res.data.list.unshift(...col.options)
: res.data.unshift(...col.options);
this.$set(
col,
"options",
@ -352,7 +357,7 @@ export default {
else if (col.fetchTreeData) {
// parentId 0
col.fetchTreeData().then(({ data: res }) => {
console.log("[Fetch Tree Data]", res.data);
//console.log("[Fetch Tree Data]", res.data);
if (res.code === 0) {
//
const obj = {};
@ -368,7 +373,7 @@ export default {
}
//
let filteredList = reConstructTreeData(obj);
console.log("** filteredList **", filteredList);
//console.log("** filteredList **", filteredList);
// options
this.$set(col, "options", filteredList);
} else {
@ -381,6 +386,7 @@ export default {
});
return {
extraCode: null,
// configs,
btnLoading: false,
loadingStatus: false,
@ -438,11 +444,16 @@ export default {
() => this.dataForm[col.prop],
(val) => {
if (val && col.prop in this.cached) {
console.log("here changeReflects", col.prop, col.changeReflects.toProp, this.cached[col.prop]);
//console.log(
// "here changeReflects",
// col.prop,
// col.changeReflects.toProp,
// this.cached[col.prop]
// );
if (typeof col.changeReflects.fromKey === "string") {
this.dataForm[col.changeReflects.toProp] = this.cached[col.prop].find((item) => item.id === val)?.[
col.changeReflects.fromKey
];
this.dataForm[col.changeReflects.toProp] = this.cached[col.prop].find(
(item) => item.id === val
)?.[col.changeReflects.fromKey];
} else if (Array.isArray(col.changeReflects.fromKey) && col.changeReflects.delimiter) {
const foundItem = (this.dataForm[col.changeReflects.toProp] = this.cached[col.prop].find(
(item) => item.id === val
@ -452,7 +463,7 @@ export default {
this.dataForm[col.changeReflects.toProp] = values.join(col.changeReflects.delimiter);
} else {
this.dataForm[col.changeReflects.toProp] = col.changeReflects.delimiter;
console.log("[DialogWithMenu] mounted() 没找到对应数据");
//console.log("[DialogWithMenu] mounted() ");
}
}
}
@ -510,14 +521,16 @@ export default {
const addMode = !operate.showOnEdit && !this.dataForm.id;
const permission = operate.permission ? this.$hasPermission(operate.permission) : true;
const currentMenuKey = this.configs.menu.find((item) => item.name === this.activeMenu)?.key;
return notDetailMode && (showAlways || ((editMode || addMode) && permission)) && currentMenuKey === "info";
return (
notDetailMode && (showAlways || ((editMode || addMode) && permission)) && currentMenuKey === "info"
);
},
resetForm(excludeId = false, immediate = false) {
setTimeout(
() => {
Object.keys(this.dataForm).forEach((key) => {
console.log("reset form, key", key);
//console.log("reset form, key", key);
if (excludeId && key === "id") return;
if ("files" in this.dataForm) this.dataForm.files = [];
else if ("fileIds" in this.dataForm) this.dataForm.fileIds = [];
@ -528,7 +541,7 @@ export default {
});
this.activeMenu = this.configs.menu[0].name;
this.$refs.dataForm[0].resetFields();
console.log("清除Form...", this.dataForm);
//console.log("Form...", this.dataForm);
},
immediate ? 0 : 200
);
@ -538,7 +551,7 @@ export default {
return new Promise((resolve, reject) => {
if (this.watingToRefreshQueue.length) {
this.watingToRefreshQueue.forEach((opt) => {
console.log("[刷新数据, ", opt, "]");
//console.log("[, ", opt, "]");
if ("fetchData" in opt) {
opt.fetchData(this.dataForm.id ? this.dataForm.id : -1).then(({ data: res }) => {
if (res.code === 0) {
@ -574,7 +587,7 @@ export default {
// dialog dataForm [0]
this.$refs.dataForm[0].clearValidate();
}
console.log("[dialog] DialogWithHead init():", id, detailMode);
//console.log("[dialog] DialogWithHead init():", id, detailMode);
this.detailMode = detailMode ?? false;
this.$nextTick(() => {
@ -590,11 +603,11 @@ export default {
this.$http.get(this.urls.base + `/${this.dataForm.id}`).then(({ data: res }) => {
if (res && res.code === 0) {
const dataFormKeys = Object.keys(this.dataForm);
console.log("[DialogWithMenu] dataFormKeys -------->", dataFormKeys);
//console.log("[DialogWithMenu] dataFormKeys -------->", dataFormKeys);
this.dataForm = __pick(res.data, dataFormKeys);
if ("files" in res.data) {
console.log("[DialogWithMenu] fileList===>", res.data.files, this.fileList);
//console.log("[DialogWithMenu] fileList===>", res.data.files, this.fileList);
/** 返回的文件列表 */
this.fileList = res.data.files
? res.data.files.map((file) => ({
@ -635,7 +648,7 @@ export default {
responseType: "blob",
})
.then(({ data: res }) => {
console.log("preivew", res);
//console.log("preivew", res);
if (/image/i.test(res.type)) {
//
this.currentImgUrl = URL.createObjectURL(res);
@ -646,9 +659,9 @@ export default {
a.setAttribute("target", "_blank");
a.href = URL.createObjectURL(res);
a.click();
console.log("before remove a ", a);
//console.log("before remove a ", a);
a.remove();
console.log("removed a ", a);
//console.log("removed a ", a);
} else {
this.$message({
message: "非图片和PDF文件请下载后预览",
@ -728,7 +741,7 @@ export default {
},
handleUploadSuccess(response, file, fileList) {
console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
//console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
if (response.code === 0) {
const uploadedFile = response.data[0];
@ -768,7 +781,7 @@ export default {
},
handleUploadCheck(file) {
console.log("[before upload]", file);
//console.log("[before upload]", file);
const LIMIT = 2 * 1024 * 1024; // bytes
if (file.size > LIMIT) {
this.$message({
@ -782,16 +795,16 @@ export default {
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
//console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
handleSelectChange(col, eventValue) {
console.log("[dialog] select change: ", col, eventValue);
//console.log("[dialog] select change: ", col, eventValue);
},
handleSwitchChange(val) {
console.log("[dialog] switch change: ", val, this.dataForm);
//console.log("[dialog] switch change: ", val, this.dataForm);
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -832,7 +845,7 @@ export default {
// this.configs.excludeProps.forEach((prop) => {
// delete actualPayload[prop];
// });
// console.log('actualPayload', actualPayload);
// //console.log('actualPayload', actualPayload);
// }
//
@ -848,7 +861,7 @@ export default {
.then(({ data: res }) => {
this.btnLoading = false;
this.loadingStatus = false;
console.log("[add&update] res is: ", res);
//console.log("[add&update] res is: ", res);
if (res.code === 0) {
this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");
this.$emit("refreshDataList");
@ -857,7 +870,7 @@ export default {
// if (this.watingToRefreshQueue.length) {
// //
// this.watingToRefreshQueue.forEach((opt) => {
// console.log("[, ", opt, "]");
// //console.log("[, ", opt, "]");
// if ("fetchData" in opt) {
// opt.fetchData().then(({ data: res }) => {
// if (res.code === 0) {
@ -898,7 +911,7 @@ export default {
}
},
handleTabClick(payload) {
// console.log("tab click payload: ", this.activeMenu);
// //console.log("tab click payload: ", this.activeMenu);
// if (this.activeMenu === this.configs.menu[1].name) {
// //
// this.getSubList();
@ -936,7 +949,7 @@ export default {
}
}
this.$http.get(this.urls.subpage, { params }).then(({ data: res }) => {
console.log("[DialogWithMenu] getSubList:", res);
//console.log("[DialogWithMenu] getSubList:", res);
if (res.code === 0 && res.data?.list) {
//
this.subList = res.data.list;
@ -962,20 +975,21 @@ export default {
/** 列表handlers */
handleAddItem() {
// console.log('[dialog] handleAddItem ot list...');
// //console.log('[dialog] handleAddItem ot list...');
this.showBaseDialog = true;
this.$nextTick(() => {
console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
//console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
});
},
handleTableRowOperate({ type, data }) {
console.log("handleTableRowOperate", type, data);
//console.log("handleTableRowOperate", type, data);
switch (type) {
case "delete": {
//
console.log("delete....", data);
const itemName = typeof data === "object" ? data.attrName || data.name || data.material || data.id : data;
//console.log("delete....", data);
const itemName =
typeof data === "object" ? data.attrName || data.name || data.material || data.id : data;
return this.$confirm(`是否删除条目: ${itemName}`, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
@ -1002,6 +1016,7 @@ export default {
.catch((err) => {});
}
case "edit": {
this.extraCode = this.subList?.find((item) => item.id == data)?.code;
this.handleAddParam(data); /** data is ==> id */
break;
}
@ -1024,10 +1039,6 @@ export default {
/* background: #0f02 !important; */
}
/* .el-menu--horizontal > .el-menu-item.is-active { */
/* border-bottom-color: #0b58ff; */
/* } */
.dialog-with-menu >>> .el-dialog__body {
/* padding-top: 16px !important;
padding-bottom: 16px !important; */
@ -1035,16 +1046,15 @@ export default {
padding-bottom: 0 !important;
}
/* .dialog-with-menu >>> .dialog-body__inner {
padding: 16px;
} */
.el-select,
.el-cascader {
width: 100% !important;
}
.dialog-with-menu >>> .el-dialog__header {
padding: 10px 20px 10px;
/* background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), white); */
}
.relative {
position: relative;
}

345
src/components/PrintDom.vue Normal file
View File

@ -0,0 +1,345 @@
<!--
filename: PrintDom.vue
author: liubin
date: 2023-08-11 13:59:22
description:
-->
<template>
<div
class="print-area"
style="
box-sizing: border-box;
margin: 4px;
border: 1px solid #000;
padding: 8px;
display: inline-block;
width: calc(6cm - 8px);
height: 14.5cm;
font-family: Arial, Helvetica, sans-serif;
">
<!-- 6cm - margin -->
<h4
class="datetime"
style="
font-size: 10px;
margin: 0 0 10px 0;
font-weight: 400;
display: flex;
align-items: center;
justify-content: space-between;
">
<span>{{ datetime.toLocaleDateString() }}</span>
<span>{{ datetime.toLocaleTimeString() }}</span>
</h4>
<!-- 物料号 -->
<h2 class="material-code" style="font-size: 20px; margin: 10px 0">{{ dataForm.pdtCode }}</h2>
<!-- 牌号 -->
<h2 class="brand" style="font-size: 16px; letter-spacing: 1px; margin: 10px 0">{{ dataForm.brand }}</h2>
<!-- 配方号 -->
<h3 class="bom-code" style="font-size: 14px; margin: 10px 0">{{ dataForm.bomCode }}</h3>
<!-- 砖型 -->
<h2 class="shape" style="font-size: 20px; letter-spacing: 1px; margin: 10px 0">
{{ dataForm.shapeCode }}
</h2>
<!-- 生产订单 -->
<h3 class="order-id" style="font-size: 14px; margin: 10px 0">{{ dataForm.orderCode }}</h3>
<!-- 客户 -->
<h3 class="client" style="font-size: 14px; text-transform: uppercase; margin: 10px 0">
{{ dataForm.customer }}
</h3>
<h2
class="sale-order-id sale-item-id"
style="
display: flex;
align-items: center;
font-size: 20px;
justify-content: space-between;
margin: 10px 0;
">
<!-- 托盘号 -->
<span>{{ dataForm.code }}</span>
<!-- 销售订单号 -->
<span>{{ dataForm.saleNo }}</span>
</h2>
<!-- 销售订单发货时间 -->
<h2 class="delivery-time" style="font-size: 18px; margin: 10px 0">
{{ new Date(dataForm.deliveryTime).toLocaleDateString() }}
<!-- {{
new Date(dataForm.deliveryTime).toLocaleDateString() +
" " +
new Date(dataForm.deliveryTime).toLocaleTimeString()
}} -->
</h2>
<!-- 托盘类型 满托 尾托 余托 -->
<h2
class="pan-no"
style="
padding: 4px;
border: 1px solid #000;
font-size: 18px;
margin: 10px 0;
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', '微软雅黑',
'Microsoft YaHei UI', 'Microsoft YaHei', 'Source Han Sans SC', 'Noto Sans CJK SC',
'WenQuanYi Micro Hei', sans-serif;
/* background: #000; */
/* color: #fff; */
">
{{ palletType }}
<!-- {{ dataForm.code }} -->
</h2>
<div
class="bottom-area"
style="margin-bottom: 8px; display: flex; align-items: flex-start; justify-content: space-between">
<!-- 二维码 -->
<div
class="qrcode"
style="flex-shrink: 0; width: 128px; height: 128px; /* border: 1px solid #0003; */">
<img id="qrcode" style="width: 100%; height: 100%" />
</div>
<div class="" style="text-align: right">
<!-- 订单生产总砖数 -->
<h2 class="shape-count" style="font-size: 20px; margin: 0 0 10px 8px">{{ dataForm.prodqty }}</h2>
<!-- 实际码放在托盘上的砖数 -->
<h2 class="shape-placed" style="font-size: 20px; margin: 0 0 10px 8px">{{ dataForm.realQty }}</h2>
<!-- 需要码放 24 托木托盘每托120块砖 -->
<h2 class="shape-24" style="font-size: 20px; margin: 0 0 10px 8px">{{ dataForm.fpText }}</h2>
<!-- 需要码放 1 托木托盘每托10块砖 -->
<h2 class="shape-1" style="font-size: 20px; margin: 0 0 10px 8px">{{ dataForm.tpText }}</h2>
</div>
</div>
<!-- <h2 class="pack-code" style="font-size: 20px; margin: 0 0 10px">S653</h2> -->
<svg id="barcode"></svg>
</div>
</template>
<script>
import JsBarcode from "jsbarcode";
import QRCode from "qrcode";
import { getLodop } from "@/utils/Lodop";
export default {
name: "PrintDom",
components: {},
props: {},
data() {
return {
lodop: null,
datetime: new Date(),
dataForm: {
pdtCode: null,
brand: null,
bomCode: null,
shapeCode: null,
orderCode: null,
customer: null,
code: null,
saleNo: null,
deliveryTime: null,
typeDictValue: null,
prodqty: null,
realQty: null,
fpText: null,
tpText: null,
packTechCode: null,
hu: null,
},
jobId: null,
palletId: null,
};
},
computed: {
// comp120() {
// if (this.dataForm.realQty == null) return 0;
// return Math.floor(this.dataForm.realQty / 120);
// },
// comp10() {
// if (this.dataForm.realQty == null) return 0;
// return Math.ceil((this.dataForm.realQty % 120) / 10);
// },
palletType() {
switch (this.dataForm.typeDictValue?.toString()) {
case "0":
return "满 托";
case "1":
return "尾 托";
case "2":
return "余 托";
default:
return "-";
}
},
},
methods: {
/**
*
* @param {string|object} data 当source为api时data为id当source为local时data为对象
* @param {'api'|'local'} source 数据来源
*/
async print(data, source = "api") {
//
if (!this.initPrintPlugin()) return this.close();
if (source === "api") {
this.palletId = data;
await this.printByApi(data);
} else {
await this.printByLocalData(data);
}
this.close();
},
async printByApi(id) {
const { data: res } = await this.$http.get("/pms/pallet/" + id);
this.dataForm = res.data;
await this.printByLocalData(res.data);
// this.getPrintStatus(id);
},
async printByLocalData(data) {
//
this.paintBarCode(data.packTechCode || "0000-0000-0000");
// HU
await this.paintQrCode(data.hu || "- 无HU数据 -");
this.handlePrint();
},
initPrintPlugin() {
this.lodop = getLodop();
if (!this.lodop) {
return this.$confirm("请先安装打印控件", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
window.open("http://www.c-lodop.com/download.html");
})
.catch(() => {
return false;
});
}
return true;
},
paintBarCode(data) {
JsBarcode("#barcode", data, {
format: "CODE128",
width: 2.5,
height: 48,
displayValue: true,
margin: 0,
});
},
async paintQrCode(data) {
try {
const url = await QRCode.toDataURL(data, {
width: 128,
height: 128,
});
document.querySelector("#qrcode").src = url;
} catch (err) {
document.querySelector(".qrcode").innerHTML = "NO QRCode";
}
},
// handlePrint() {
// return new Promise((resolve, reject) => {
// this.lodop.PRINT_INIT("RGV");
// //
// this.lodop.SET_PRINT_MODE("CATCH_PRINT_STATUS", true);
// if (this.lodop.CVERSION) {
// // jobId
// this.lodop.On_Return = (TaskID, Value) => {
// this.jobId = Value;
// resolve();
// };
// }
// // 60mm150mm
// this.lodop.SET_PRINT_PAGESIZE(1, 600, 1500, "ZebraT231 Tag Paper");
// this.lodop.ADD_PRINT_HTM(0, 0, "100%", "100%", document.querySelector(".print-area").outerHTML);
// this.lodop.PRINT();
// });
// },
// getPrintStatus(id) {
// return new Promise((resolve, reject) => {
// if (!this.jobId || !this.lodop) reject(-1);
// this.lodop.SET_PRINT_MODE("CATCH_PRINT_STATUS", true);
// if (this.lodop.CVERSION) {
// this.lodop.On_Return = (TaskID, Value) => {
// //console.log("this.lodop.On_Return", this.lodop.On_Return, this.jobId, Value);
// if (Value.toString() == "1") {
// //
// this.sendSuccess()
// .then(() => {
// this.$message.success(` ${id} `);
// this.$emit("refresh-list");
// resolve();
// })
// .catch((err) => {
// this.$message.error(err);
// reject(err);
// });
// } else {
// this.$message.error(` ${id} `);
// }
// };
// this.lodop.GET_VALUE("PRINT_STATUS_OK", this.jobId);
// }
// });
// },
handlePrint() {
this.lodop.PRINT_INIT("RGV小票打印");
// 60mm150mm
this.lodop.SET_PRINT_PAGESIZE(1, 600, 1500, "ZebraT231 Tag Paper");
this.lodop.ADD_PRINT_HTM(0, 0, "100%", "100%", document.querySelector(".print-area").outerHTML);
this.lodop.PRINT();
},
// getPrintStatus(id) {
// //
// this.sendSuccess()
// .then(() => {
// this.$message.success(` ${id} `);
// this.$emit("refresh-list");
// })
// .catch((err) => {
// this.$message.error("code" in err && "msg" in err ? `${err.code}: ${err.msg}` : err);
// });
// },
// sendSuccess() {
// return this.$http({
// url: "/pms/pallet/print",
// method: "post",
// data: this.palletId,
// headers: {
// "Content-Type": "application/json",
// },
// }).then(({ data: res }) => {
// if (res.code == 0) return;
// else throw new Error(res.msg);
// });
// },
close() {
this.$emit("destroy");
},
},
};
</script>
<style scoped lang="scss">
.print-area {
position: fixed;
top: 0;
left: 0;
opacity: 0;
visibility: hidden;
}
</style>

View File

@ -0,0 +1,347 @@
<!--
filename: ReportDialog.vue
author: liubin
date: 2023-08-17 14:46:32
description: 报工弹窗
-->
<template>
<el-dialog
:visible.sync="visible"
width="700px"
v-bind="$attrs"
@close="close"
@closed="$emit('destroy')"
custom-class="pms-dialog">
<!-- :class="{ 'pms-dialog--rotate-down': startLeave }"> -->
<span slot="title" class="dialog-title">报工预览</span>
<!-- 面包屑导航 -->
<div style="padding: 12px; background: #f7f7f7">
<el-breadcrumb separator="/">
<el-breadcrumb-item>预报工单</el-breadcrumb-item>
<el-breadcrumb-item v-if="mode.includes('form')">编辑</el-breadcrumb-item>
</el-breadcrumb>
</div>
<transition class="l" mode="out-in">
<BaseListTable
v-if="mode.includes('table')"
v-loading="loading"
:column-config="tableProps"
:table-data="dataList"
@operate-event="handleOperate"
:current-page="page"
:current-size="size" />
<el-form
v-if="mode.includes('form')"
ref="dataForm"
:model="dataForm"
size="small"
style="padding: 16px"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="订单号" prop="orderCode" :rules="null">
<el-input v-model="dataForm.orderCode" disabled placeholder="-" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="订单子号" prop="orderCate" :rules="null">
<el-input v-model="dataForm.orderCate" disabled placeholder="-" />
</el-form-item>
</el-col>
<el-col :span="8">
<!-- 总量 - 前端计算 -->
<el-form-item label="生产总量" prop="qty" :rules="null">
<el-input v-model="dataForm.qty" disabled placeholder="-" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="合格砖数量" prop="goodqty" :rules="[$fv.isRequired, $fv.isNumber]">
<el-input v-model="dataForm.goodqty" placeholder="请输入合格砖数量" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报废砖数量" prop="badqty" :rules="[$fv.isRequired, $fv.isNumber]">
<el-input v-model="dataForm.badqty" placeholder="请输入报废砖数量" />
</el-form-item>
</el-col>
<el-col :span="8">
<!-- 报废率 - 前端计算 -->
<el-form-item label="报废率" prop="badratio" :rules="null">
<el-input v-model="dataForm.badratio" disabled placeholder="-" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="报工班次" prop="team" :rules="null">
<el-select v-model="dataForm.team" placeholder="请选择报工班次">
<el-option label="早班" value="0" />
<el-option label="中班" value="1" />
<el-option label="晚班" value="2" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" style="padding-top: 32px">
<el-button type="primary" size="small" @click="handleSaveEdit">预保存</el-button>
<el-button size="small" @click="mode = 'table'">取消</el-button>
</el-col>
</el-row>
</el-form>
</transition>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="close">取消</el-button>
<el-button size="small" type="primary" @click="handleConfirm">提交更改</el-button>
</div>
</el-dialog>
</template>
<script>
import BaseListTable from "@/components/BaseListTable.vue";
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
export default {
name: "ReportDialog",
components: { BaseListTable },
props: ["ids"],
data() {
return {
mode: "table",
visible: false,
loading: false,
dataList: [],
page: 1,
dataForm: {
id: null,
orderCate: null,
orderCode: null,
qty: null,
goodqty: null,
badqty: null,
badratio: null,
team: null,
},
formLoading: false,
dataFormList: [],
tableProps: [
{ prop: "orderCode", label: "订单号" },
{ prop: "orderCate", label: "订单子号" },
{ width: 90, prop: "qty", label: "生产量" },
{ width: 90, prop: "goodqty", label: "合格数量" },
{ width: 90, prop: "badqty", label: "报废数量" },
{ width: 90, prop: "badratio", label: "报废率", filter: (val) => (val ?? "-") + "%" },
{
width: 64,
prop: "team",
label: "班次",
filter: (val) => (val != null ? ["早班", "中班", "晚班"][val] : "-"),
},
{
prop: "operations",
name: "操作",
fixed: "right",
width: 90,
subcomponent: TableOperaionComponent,
options: [
{ name: "edit", label: "编辑", icon: "edit-outline", emitFull: true },
// {
// name: "delete",
// icon: "delete",
// label: "",
// emitFull: true,
// permission: "pms:carOrderReport:delete",
// },
],
},
],
currentEditing: null,
};
},
computed: {
size() {
return this.dataList.length;
},
},
inject: ['urls'],
watch: {
"dataForm.goodqty"(val) {
const qty = +val + +this.dataForm.badqty;
this.dataForm.qty = qty;
this.dataForm.badratio = ((+this.dataForm.badqty / qty) * 100).toFixed(2);
},
"dataForm.badqty"(val) {
const qty = +val + +this.dataForm.goodqty;
this.dataForm.qty = qty;
this.dataForm.badratio = ((+val / qty) * 100).toFixed(2);
},
},
methods: {
async init() {
this.visible = true;
this.loading = true;
// const { data: res } = await this.$http.post("/pms/workReport/pressReportPre", {
const { data: res } = await this.$http.post(this.urls.reportPre, {
datas: [],
ids: this.ids,
});
if (res.code === 0) {
this.dataList = res.data.map((item, index) => ({
...item,
qty: item.goodqty + item.badqty,
// __LOCAL_INDEX
__LOCAL_INDEX: index,
}));
}
this.loading = false;
},
close() {
this.visible = false;
},
handleOperate({ type, data }) {
//console.log("payload", type, data);
switch (type) {
case "edit":
this.mode = "form";
this.currentEditing = data.__LOCAL_INDEX;
const { id, orderCate, orderCode, qty, goodqty, badqty, badratio, team } = data;
this.dataForm = {
id,
orderCate,
orderCode,
qty,
goodqty,
badqty,
badratio,
team,
};
break;
}
},
async handleConfirm() {
this.loading = true;
const { data: res } = await this.$http.post(this.urls.report, {
datas: this.dataList,
ids: this.ids,
});
this.loading = false;
if (res.code === 0) {
this.$message.success("提交成功");
this.$emit("refresh-list");
this.close();
}
},
//
handleSaveEdit() {
Object.keys(this.dataForm).forEach((key) => {
this.dataList[this.currentEditing][key] = this.dataForm[key];
});
this.mode = "table";
this.$nextTick(() => {
this.clearDataForm();
});
},
//
clearDataForm() {
this.currentEditing = null;
this.dataForm = {
id: null,
orderCate: null,
orderCode: null,
qty: null,
goodqty: null,
badqty: null,
badratio: null,
team: null,
};
},
},
};
</script>
<style scoped>
.dialog-just-form >>> .dialog-title {
color: #000;
}
.dialog-just-form >>> .el-dialog__body {
/* padding-top: 16px !important;
padding-bottom: 16px !important; */
padding-top: 0 !important;
padding-bottom: 0 !important;
}
.el-select,
.el-cascader,
.el-date-editor {
width: 100% !important;
}
.dialog-just-form >>> .el-dialog__header {
padding: 10px 20px 10px;
/* background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), white); */
}
</style>
<style>
.pms-dialog {
box-shadow: 0 0 24px 8px rgba(0, 0, 0, 0.125);
border-radius: 4px;
transition: transform 1.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.pms-dialog .el-dialog__header {
padding: 16px;
border-bottom: 1px solid #eaeaea;
}
.pms-dialog .el-dialog__header .dialog-title {
font-size: 1.2rem;
}
.pms-dialog .el-dialog__body {
padding: 0;
overflow-x: hidden;
}
.pms-dialog .el-dialog__footer {
background: #fafafa;
min-height: 3.2rem;
padding: 0;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
text-align: unset;
display: flex;
justify-content: flex-end;
padding: 8px 16px;
align-items: center;
}
.v-enter,
.v-leave-to {
opacity: 0;
/* transform: translateX(20px); */
transform: scale(0);
}
.v-enter-active,
.v-leave-active {
transition: all 0.3s;
}
.v-enter-to,
.v-leave {
/* transform: translateX(0); */
transform: scale(1);
}
</style>

View File

@ -36,7 +36,9 @@
:label="opt.label"
:value="opt.value">
<span>{{ opt.label }}</span>
<span v-if="col.customLabel" style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
<span
v-if="col.customLabel"
style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
{{ opt[col.customLabel] || "-" }}
</span>
</el-option>
@ -96,6 +98,10 @@ export default {
type: String,
default: "",
},
code: {
type: String,
default: null,
},
},
inject: ["urls"],
data() {
@ -103,7 +109,7 @@ export default {
this.configs.rows.forEach((row) => {
row.forEach((col) => {
dataForm[col.prop] = col.default ?? "";
console.log("[small dialog]==========>", col.prop, dataForm[col.prop]);
//console.log("[small dialog]==========>", col.prop, dataForm[col.prop]);
if (typeof col.fetchData === "function")
col.fetchData().then(({ data: res }) => {
@ -112,20 +118,23 @@ export default {
col,
"options",
!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,
}))
: 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", []);
}
@ -156,7 +165,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;
});
@ -165,7 +174,7 @@ 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;
@ -201,8 +210,8 @@ export default {
handleSwitchChange() {},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
console.log("configs", this.configs);
//console.log("btn click payload: ", payload);
//console.log("configs", this.configs);
if ("name" in payload) {
switch (payload.name) {
case "cancel":
@ -213,23 +222,31 @@ export default {
this.$refs.dataForm.validate((passed, result) => {
if (passed) {
this.btnLoading = true;
console.log("update extraParam: ", this.configs.extraParam);
//console.log("update extraParam: ", this.configs.extraParam);
const method = payload.name === "add" ? "POST" : "PUT";
const fields = {};
fields[this.configs.extraParam] = this.relatedId;
// [this.configs.extraParam]: this.relatedId, // this.configs.extraParam
if (this.configs.forceAttachCode) fields["code"] = "";
let body = {
...this.dataForm,
...fields,
};
if (payload.name == "update") {
if (this.code != null) {
body.code = this.code;
}
}
console.log("body", body);
this.$http({
url: this.urls.subase,
method,
data: {
...this.dataForm,
...fields,
},
data: body,
}).then(({ data: res }) => {
console.log("[add&update] res is: ", res);
//console.log("[add&update] res is: ", res);
this.btnLoading = false;
if (res.code === 0) {
this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");
@ -242,7 +259,7 @@ export default {
}
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] ! name");
}
},

View File

@ -17,7 +17,7 @@ export default {
},
methods: {
emitClick() {
// console.log('inject data:' ,this.injectData)
// //console.log('inject data:' ,this.injectData)
this.$emit('emit-data', {
type: this.injectData.head?.actionName || 'view-detail-action',
data: this.injectData.head?.emitFullData ? this.injectData : this.injectData.id
@ -25,7 +25,7 @@ export default {
}
},
render: function (h) {
// console.log('button content:', this.injectData)
// //console.log('button content:', this.injectData)
return h('span', null, [h('el-button', { props: { type: 'text' }, style: { padding: 0, margin: '5px 0' }, on: { click: this.emitClick } }, this.injectData.head?.buttonContent || this.defaultText)])
}
}

View File

@ -53,7 +53,7 @@ export default {
};
},
// mounted() {
// console.log('inject data', this.injectData)
// //console.log('inject data', this.injectData)
// },
methods: {
// 发射事件
@ -94,7 +94,7 @@ export default {
if ("enable" in opt && typeof opt.enable === "function") {
shouldDisabled = !opt.enable(this.injectData);
}
// console.log('should disabled', shouldDisabled)
// //console.log('should disabled', shouldDisabled)
btns.push(
h(
"el-button",

View File

@ -26,7 +26,7 @@ export default {
},
// modelValue(val) {
// // 这样不行,会导致编辑时富文本内容是反过来的...
// console.log('[modelValue] val is: ', val)
// //console.log('[modelValue] val is: ', val)
// this.editor && this.editor.setContents(JSON.parse(val), "user")
// }
modelValue(val) {

View File

@ -16,7 +16,7 @@ export default {
},
methods: {
emitClick() {
// console.log('inject data:' ,this.injectData)
// //console.log('inject data:' ,this.injectData)
this.$emit('emit-data', {
type: this.injectData.head?.actionName || 'select-change-action',
data: this.injectData.head?.emitFullData ? this.injectData : this.injectData.id
@ -24,7 +24,7 @@ export default {
}
},
render: function (h) {
// console.log('button content:', this.injectData)
// //console.log('button content:', this.injectData)
return h('span', null, [h('el-button', { props: { type: 'text' }, style: { paddingLeft: 0 }, on: { click: this.emitClick } }, this.injectData.head?.buttonContent || this.defaultText)])
}
}

View File

@ -49,7 +49,7 @@ export default {
}
},
mounted() {
// console.log("[component] StatusComponent: ", this.injectData);
// //console.log("[component] StatusComponent: ", this.injectData);
},
methods: {
// 发射事件

View File

@ -19,7 +19,7 @@ export default {
};
},
mounted() {
// console.log("[SwitchBtn] injectData: ", this.injectData);
// //console.log("[SwitchBtn] injectData: ", this.injectData);
},
computed: {
status: {

View File

@ -0,0 +1,193 @@
<!--
filename: palletDialog.vue
author: liubin
date: 2023-08-22 09:15:49
description: 生成托盘弹窗
-->
<template>
<el-dialog
:visible.sync="visible"
width="500px"
v-bind="$attrs"
@close="close"
@closed="$emit('destroy')"
custom-class="pms-dialog">
<!-- :class="{ 'pms-dialog--rotate-down': startLeave }"> -->
<span slot="title" class="dialog-title">生成托盘</span>
<el-form ref="dataForm" :model="dataForm" size="small" style="padding: 16px" v-loading="formLoading">
<el-row :gutter="20">
<el-col>
<el-form-item label="订单号" prop="orderId" :rules="null">
<el-select v-model="dataForm.orderId" filterable clearable placeholder="请选择订单号">
<el-option v-for="o in orderList" :key="o.id" :label="o.code" :value="o.id">
<div class="option-label">
<span>{{ o.code }}</span>
<span>{{ o.cate }}</span>
</div>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="ids.length > 0" :gutter="20">
<el-col>
<el-form-item label="尾托" prop="ids" :rules="null">
<el-input disabled v-model="ids[0].orderCode" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="close">取消</el-button>
<el-button size="small" type="primary" @click="handleConfirm">生成</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: "PalletDialog",
components: {},
props: ["ids"],
data() {
return {
visible: false,
loading: false,
orderList: [],
dataForm: {
orderId: null,
ids: [],
},
formLoading: false,
};
},
methods: {
async init() {
this.visible = true;
this.loading = true;
//
const { data: res } = await this.$http.post("/pms/order/listWithStock");
if (res.code === 0) {
this.orderList = res.data.map((item, index) => ({
code: item.code, //
cate: item.cate, //
id: item.id, // id
}));
} else this.$message.error(res.msg);
this.loading = false;
},
close() {
this.visible = false;
},
async handleConfirm() {
this.loading = true;
try {
const { data: res } = await this.$http.post("/pms/pallet/newPallet", {
...this.dataForm,
ids: this.ids.map((item) => item.id),
});
if (res.code === 0) {
this.$message.success("提交成功");
this.$emit("refresh-list");
this.close();
this.loading = false;
} else throw new Error(res.msg);
} catch (err) {
this.$message.error('message' in err ? err.message : err);
this.loading = false;
}
},
//
clearDataForm() {
this.dataForm = {
orderId: null,
ids: [],
};
},
},
};
</script>
<style scoped>
.dialog-just-form >>> .dialog-title {
color: #000;
}
.dialog-just-form >>> .el-dialog__body {
/* padding-top: 16px !important;
padding-bottom: 16px !important; */
padding-top: 0 !important;
padding-bottom: 0 !important;
}
.el-select,
.el-cascader,
.el-date-editor {
width: 100% !important;
}
.dialog-just-form >>> .el-dialog__header {
padding: 10px 20px 10px;
/* background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), white); */
}
</style>
<style>
.pms-dialog {
box-shadow: 0 0 24px 8px rgba(0, 0, 0, 0.125);
border-radius: 4px;
transition: transform 1.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.pms-dialog .el-dialog__header {
padding: 16px;
border-bottom: 1px solid #eaeaea;
}
.pms-dialog .el-dialog__header .dialog-title {
font-size: 1.2rem;
}
.pms-dialog .el-dialog__body {
padding: 0;
overflow-x: hidden;
}
.pms-dialog .el-dialog__footer {
background: #fafafa;
min-height: 3.2rem;
padding: 0;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
text-align: unset;
display: flex;
justify-content: flex-end;
padding: 8px 16px;
align-items: center;
}
.option-label {
display: flex;
align-items: center;
}
.option-label > span {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.option-label > span:first-child {
width: 128px;
margin-right: 8px;
}
/* .option-label > span:last-child {
} */
</style>

View File

@ -59,7 +59,7 @@ export default {
watch: {
fileList(val) {
if (val) {
console.log("[FileList] fileList prop:", val);
//console.log("[FileList] fileList prop:", val);
}
},
},
@ -82,7 +82,7 @@ export default {
responseType: "blob",
})
.then(({ data: res }) => {
console.log("preivew", res);
//console.log("preivew", res);
if (/image/i.test(res.type) || /pdf/i.test(res.type)) {
let a = document.createElement('a')
a.setAttribute('target', '_blank')
@ -100,7 +100,7 @@ export default {
},
handleDownload(file) {
console.log("[FileList] handleDownload", file);
//console.log("[FileList] handleDownload", file);
this.$http
.get("/pms/attachment/downloadFile", {
params: {
@ -136,12 +136,12 @@ export default {
});
},
handleDelete(file) {
console.log("[FileList] handleDelete", file);
//console.log("[FileList] handleDelete", file);
// TODO:
this.$emit("delete-a-file", file.id);
},
handleSearchClick() {
console.log("[FileList] handleSearchClick()");
//console.log("[FileList] handleSearchClick()");
this.showSearchInput = true;
},
},

View File

@ -77,12 +77,12 @@ export default {
},
},
mounted() {
console.log("[UploadBtn] mounted()", this.fileList, this.uploadedFileList);
//console.log("[UploadBtn] mounted()", this.fileList, this.uploadedFileList);
this.uploadedFileList = this.fileList ?? [];
},
methods: {
handleRemoveFile(fileId) {
console.log("[UploadBtn] handleRemoveFile", fileId);
//console.log("[UploadBtn] handleRemoveFile", fileId);
this.$confirm("确定删除此文件?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -112,7 +112,7 @@ export default {
},
handleUploadSuccess(response, file, fileList) {
console.log("[UploadBtn] uploadedFileList", response, file, fileList, this.uploadedFileList);
//console.log("[UploadBtn] uploadedFileList", response, file, fileList, this.uploadedFileList);
if (response.code === 0) {
const uploadedFile = response.data[0];

View File

@ -23,7 +23,8 @@ import { hasPermission, getDictLabel } from '@/utils'
import cloneDeep from 'lodash/cloneDeep'
// main.js
import myComponents from 'code-brick-zj'
// 表单验证
import { formValidateRules } from '@/utils/validate'
// import mocks from './mocks'
@ -44,6 +45,7 @@ Vue.use(myComponents)
Vue.prototype.$http = http
Vue.prototype.$hasPermission = hasPermission
Vue.prototype.$getDictLabel = getDictLabel
Vue.prototype.$fv = formValidateRules
// 保存整站vuex本地储存初始状态
window.SITE_CONFIG['storeState'] = cloneDeep(store.state)

View File

@ -70,14 +70,14 @@ export default {
},
// 表单提交
dataFormSubmit() {
console.log('in minxin basic-page dataformsubmit')
//console.log('in minxin basic-page dataformsubmit')
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
// console.log('[confirm] here...')
// //console.log('[confirm] here...')
if (res.code !== 0) {
return this.$message.error(res.msg);
}

View File

@ -103,7 +103,7 @@ export default {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "delete") {
console.log('va', val)
//console.log('va', val)
this.deleteHandle(val.data.id, val.data.name)
}
},
@ -151,7 +151,7 @@ export default {
this.addOrUpdateHandle()
break;
default:
console.log(val)
//console.log(val)
}
},
handleCancel() {
@ -165,7 +165,7 @@ export default {
refreshLocalstorage() {
// 刷新数据字典数据
this.$http("/sys/dict/type/all", { limit: 999, page: 1 }).then(({ data: res }) => {
// console.log("[dictData] loading...", res);
// //console.log("[dictData] loading...", res);
if (res.code === 0 && res.data) {
let dictList = {}
res.data.map(item => {

View File

@ -9,7 +9,7 @@ function m(url, type, fn) {
m(carManagement.url, carManagement.type, opt => {
let { limit, page } = JSON.parse(opt.body)
// console.log('limit, page', limit, page, opt.body)
// //console.log('limit, page', limit, page, opt.body)
// limit = 5
return {
code: 0,

77
src/utils/Lodop.js Normal file
View File

@ -0,0 +1,77 @@
//用双端口加载主JS文件Lodop.js(或CLodopfuncs.js兼容老版本)以防其中某端口被占:
var MainJS = "CLodopfuncs.js",
URL_WS1 = "ws://localhost:8000/" + MainJS, //ws用8000/18000
URL_WS2 = "ws://localhost:18000/" + MainJS,
URL_HTTP1 = "http://localhost:8000/" + MainJS, //http用8000/18000
URL_HTTP2 = "http://localhost:18000/" + MainJS,
URL_HTTP3 = "https://localhost.lodop.net:8443/" + MainJS; //https用8000/8443
//==检查加载成功与否如没成功则用http(s)再试==
//==低版本CLODOP6.561/Lodop7.043及前)用本方法==
function checkOrTryHttp() {
if (window.getCLodop) return true;
var head = document.head || document.getElementsByTagName("head")[0] || document.documentElement;
var JS1 = document.createElement("script"),
JS2 = document.createElement("script"),
JS3 = document.createElement("script");
JS1.src = URL_HTTP1;
JS2.src = URL_HTTP2;
JS3.src = URL_HTTP3;
JS1.onerror = function (e) {
if (window.location.protocol !== "https:") head.insertBefore(JS2, head.firstChild);
else head.insertBefore(JS3, head.firstChild);
};
JS2.onerror = JS3.onerror = function () {
var JSelf = document.createElement("script");
JSelf.src = "/" + MainJS; //JSelf让其它电脑通过本机打印仅适用CLodop自带例子
document.head.insertBefore(JSelf, document.head.firstChild);
};
head.insertBefore(JS1, head.firstChild);
}
//==加载Lodop对象的主过程:==
(function loadCLodop() {
if (!window.WebSocket && window.MozWebSocket) window.WebSocket = window.MozWebSocket;
//ws方式速度快(小于200ms)且可避免CORS错误,但要求Lodop版本足够新:
try {
var WSK1 = new WebSocket(URL_WS1);
WSK1.onopen = function (e) {
setTimeout(checkOrTryHttp, 200);
};
WSK1.onmessage = function (e) {
if (!window.getCLodop) eval(e.data);
};
WSK1.onerror = function (e) {
var WSK2 = new WebSocket(URL_WS2);
WSK2.onopen = function (e) {
setTimeout(checkOrTryHttp, 200);
};
WSK2.onmessage = function (e) {
if (!window.getCLodop) eval(e.data);
};
WSK2.onerror = function (e) {
checkOrTryHttp();
};
};
} catch (e) {
checkOrTryHttp();
}
})();
//==获取LODOP对象的主过程:==
export function getLodop(oOBJECT, oEMBED) {
var LODOP;
try {
LODOP = window.getCLodop();
if (!LODOP && document.readyState !== "complete") {
alert("C-Lodop没准备好请稍后再试");
return;
}
//清理原例子内的object或embed元素避免乱提示
if (oEMBED && oEMBED.parentNode) oEMBED.parentNode.removeChild(oEMBED);
if (oOBJECT && oOBJECT.parentNode) oOBJECT.parentNode.removeChild(oOBJECT);
return LODOP;
} catch (err) {
alert("getLodop出错:" + err);
}
}

View File

@ -17,7 +17,7 @@ const http = axios.create({
http.interceptors.request.use(config => {
config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN'
config.headers['token'] = 'token' in config.headers ? config.headers.token : (Cookies.get('token') || '')
// console.log('[request interceptor] token is:', config.headers['token'])
// //console.log('[request interceptor] token is:', config.headers['token'])
// 默认参数
var defaults = {}
// 防止缓存GET请求默认带_t参数

View File

@ -2,30 +2,47 @@
* 邮箱
* @param {*} s
*/
export function isEmail (s) {
return /^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s)
export function isEmail(s) {
return /^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s);
}
/**
* 手机号码
* @param {*} s
*/
export function isMobile (s) {
return /^1[0-9]{10}$/.test(s)
export function isMobile(s) {
return /^1[0-9]{10}$/.test(s);
}
/**
* 电话号码
* @param {*} s
*/
export function isPhone (s) {
return /^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s)
export function isPhone(s) {
return /^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s);
}
/**
* URL地址
* @param {*} s
*/
export function isURL (s) {
return /^http[s]?:\/\/.*/.test(s)
export function isURL(s) {
return /^http[s]?:\/\/.*/.test(s);
}
/**
* 表单验证
*/
export const formValidateRules = {
isRequired: {
required: true,
message: "必填项",
trigger: "blur",
},
isNumber: {
type: "number",
message: "请输入正确的数字类型",
trigger: "blur",
transform: (val) => Number(val),
},
};

View File

@ -115,7 +115,7 @@ export default {
},
},
activated() {
console.log("list view with ehad activated..........");
//console.log("list view with ehad activated..........");
this.refreshLayoutKey = this.layoutTable();
},
watch: {
@ -182,7 +182,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -232,7 +232,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -289,7 +289,7 @@ export default {
break;
}
case "status": {
console.log("status", data);
//console.log("status", data);
// TODO:
const { id, code } = data;
const queryCondition = { id, code };
@ -318,7 +318,7 @@ export default {
break;
}
case "to-bom-detail": {
// console.log('to-bom-detail', data.name)
// //console.log('to-bom-detail', data.name)
//
return this.$router.push({
name: "pms-bomDetails",
@ -386,7 +386,7 @@ export default {
});
}
case "preview": {
console.log("[PREVIEW] data", data);
//console.log("[PREVIEW] data", data);
// report preview
return this.$router.push({
name: "pms-reportPreview",
@ -396,7 +396,7 @@ export default {
});
}
case "design": {
console.log("[DESIGN] data", data);
//console.log("[DESIGN] data", data);
// report design
return this.$router.push({
name: "pms-reportDesign",
@ -431,7 +431,7 @@ export default {
case "sync": {
let shouldShowOverlay = false;
let payload = "";
console.log("sync...", type, data);
//console.log("sync...", type, data);
if (typeof data === "object") {
const head = data.head;
const syncOpt =
@ -469,7 +469,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -503,7 +503,7 @@ export default {
});
}
});
console.log("查询", params);
//console.log("", params);
this.getList(params);
break;
}
@ -541,7 +541,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

@ -13,6 +13,7 @@
:current-page="page"
:current-size="size"
@select="handleTableSelect"
:select-props="tableConfig.selectProps ?? []"
:refresh-layout-key="refreshLayoutKey" />
<el-pagination
@ -61,6 +62,22 @@
}
" />
<Overlay v-if="overlayVisible" />
<PrintDom ref="print" v-if="printDOMmount" @destroy="printDOMmount = false" @refresh-list="getList" />
<ReportDialog
ref="car-report-dialog"
v-if="carReportDialogVisible"
@destroy="carReportDialogVisible = false"
@refresh-list="getList"
:ids="tableSelectedIds" />
<PalletDialog
ref="pallet-dialog"
v-if="palletDialogVisible"
@destroy="palletDialogVisible = false"
@refresh-list="getList"
:ids="tableSelectedIds" />
</div>
</template>
@ -74,6 +91,9 @@ import DialogUpload from "@/components/DialogUpload.vue";
import Overlay from "@/components/Overlay.vue";
import moment from "moment";
import AttachmentDialog from "@/components/attachmentDialog.vue";
import PrintDom from "../../components/PrintDom.vue";
import ReportDialog from "../../components/ReportDialog.vue";
import PalletDialog from "../../components/palletDialog.vue";
const DIALOG_WITH_MENU = "DialogWithMenu";
const DIALOG_JUST_FORM = "DialogJustForm";
@ -90,6 +110,9 @@ export default {
DialogUpload,
Overlay,
AttachmentDialog,
PrintDom,
ReportDialog,
PalletDialog,
},
props: {
navigator: {
@ -142,16 +165,17 @@ export default {
},
watch: {
page: (val) => {
console.log("page changed:", val);
//console.log("page changed:", val);
},
size: (val) => {
console.log("size changed:", val);
//console.log("size changed:", val);
},
triggerUpdate(val, oldVal) {
if (val && val !== oldVal) {
// get list
this.page = 1;
this.size = "defaultPageSize" in this.tableConfig.column ? this.tableConfig.column.defaultPageSize : 20;
this.size =
"defaultPageSize" in this.tableConfig.column ? this.tableConfig.column.defaultPageSize : 20;
this.getList();
}
},
@ -175,14 +199,33 @@ export default {
cachedSearchCondition: {},
needAttachmentDialog: false,
tableSelectedIds: [],
printDOMmount: false,
queryParams: {},
carReportDialogVisible: false,
palletDialogVisible: false,
};
},
inject: ["urls"],
mounted() {
// size
const size = "defaultPageSize" in this.tableConfig.column ? this.tableConfig.column.defaultPageSize : 20;
const size =
"defaultPageSize" in this.tableConfig.column ? this.tableConfig.column.defaultPageSize : 20;
this.size = size;
// listQueryExtra queryParams
if (this.listQueryExtra && Array.isArray(this.listQueryExtra)) {
this.listQueryExtra.map((item) => {
if (typeof item === "string") this.$set(this.queryParams, item, "");
else if (typeof item === "object") {
Object.keys(item).forEach((key) => {
this.$set(this.queryParams, key, item[key]);
});
}
});
}
//console.log("this.queryParams is: ", JSON.stringify(this.queryParams));
this.initDataWhenLoad && this.getList();
},
methods: {
@ -196,43 +239,29 @@ export default {
page: this.page,
limit: this.size,
};
if (!queryParams && this.listQueryExtra && this.listQueryExtra.length) {
this.listQueryExtra.map((nameOrObj) => {
if (typeof nameOrObj === "string") params[nameOrObj] = "";
else if (typeof nameOrObj === "object") {
Object.keys(nameOrObj).forEach((key) => {
params[key] = nameOrObj[key];
});
}
});
this.cachedSearchCondition = Object.assign({}, params);
}
// this.dataList = [{}];
// this.tableLoading = false;
// return;
this.$http[this.urls.pageIsPostApi ? "post" : "get"](
this.urls.page,
this.urls.pageIsPostApi
? {
...this.queryParams,
...params,
}
: {
params,
params: {
...this.queryParams,
...params,
},
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
if ("list" in res.data) {
// if (res.data.list.length == 0 && res.data.total != 0) {
// // refresh list
// if (this.page > 1) {
// this.page -= 1
// this.getList()
// return
// } else return
// }
/** 破碎记录的特殊需求:数据要结合单位 material + materialUnitDictValue */
if ("attachDictValue" in this.tableConfig.column) {
this.dataList = res.data.list.map((row) => {
@ -241,12 +270,6 @@ export default {
});
} else this.dataList = res.data.list;
this.totalPage = res.data.total;
} else if ("records" in res.data) {
this.dataList = res.data.records.map((item) => ({
...item,
id: item._id ?? item.id,
}));
this.totalPage = res.data.total;
} else if (Array.isArray(res.data)) {
this.dataList = res.data;
@ -284,7 +307,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -340,7 +363,7 @@ export default {
.catch((err) => {});
}
case "edit": {
console.log("[edit] ", data);
//console.log("[edit] ", data);
this.openDialog(data); /** data is ==> id */
break;
}
@ -372,7 +395,7 @@ export default {
break;
}
case "status": {
console.log("status", data);
//console.log("status", data);
// TODO:
const { id, code } = data;
const queryCondition = { id, code };
@ -397,7 +420,7 @@ export default {
break;
}
case "view-attachment-justform-version": {
console.log(data);
//console.log(data);
break;
}
case "view-recipe": {
@ -405,7 +428,7 @@ export default {
break;
}
case "to-bom-detail": {
console.log("to-bom-detail", data);
//console.log("to-bom-detail", data);
//
return this.$router.push({
name: "pms-bomDetails",
@ -424,7 +447,7 @@ export default {
.then(() => {
//
let payload = "";
console.log("copying...", type, data);
//console.log("copying...", type, data);
if (typeof data === "object") {
const head = data.head;
const copyOpt =
@ -494,7 +517,7 @@ export default {
});
}
case "preview": {
console.log("[PREVIEW] data", data);
//console.log("[PREVIEW] data", data);
// report preview
return this.$router.push({
name: "pms-reportPreview",
@ -504,7 +527,7 @@ export default {
});
}
case "design": {
console.log("[DESIGN] data", data);
//console.log("[DESIGN] data", data);
// report design
return this.$router.push({
name: "pms-reportDesign",
@ -521,7 +544,9 @@ export default {
})
.then(() => {
this.$http
.post(this.urls.detach, data /* { id: data } */, { headers: { "Content-Type": "application/json" } })
.post(this.urls.detach, data /* { id: data } */, {
headers: { "Content-Type": "application/json" },
})
.then(({ data: res }) => {
if (res.code === 0) {
this.$message({
@ -562,46 +587,86 @@ export default {
break;
}
case "sync": {
let shouldShowOverlay = false;
let payload = "";
console.log("sync...", type, data);
if (typeof data === "object") {
const head = data.head;
const syncOpt =
("options" in head && Array.isArray(head.options) && head.options.find((item) => item.name === "sync")) ||
null;
if (syncOpt && "showOverlay" in syncOpt && syncOpt.showOverlay) {
this.overlayVisible = true;
shouldShowOverlay = true;
payload = data.id;
}
} else payload = data;
return this.$confirm(`是否开始同步`, "提示", {
confirmButtonText: "同步",
cancelButtonText: "我再想想",
type: "warning",
}).then(() => {
let shouldShowOverlay = false;
let payload = "";
// //console.log("sync...", type, data);
if (typeof data === "object") {
const head = data.head;
const syncOpt =
("options" in head &&
Array.isArray(head.options) &&
head.options.find((item) => item.name === "sync")) ||
null;
if (syncOpt && "showOverlay" in syncOpt && syncOpt.showOverlay) {
this.overlayVisible = true;
shouldShowOverlay = true;
payload = data.id;
}
} else payload = data;
this.$message({
message: "正在发起同步...",
type: "success",
});
//
this.$http
.post(this.urls.syncSingleUrl, payload, {
headers: {
"Content-Type": "application/json",
},
})
.then(({ data: res }) => {
this.$message({
message: res.msg,
type: res.code === 0 ? "success" : "error",
});
this.getList();
if (shouldShowOverlay) this.overlayVisible = false;
this.$message({
message: "正在发起同步...",
type: "success",
});
//
this.$http
.post(this.urls.syncSingleUrl, payload, {
headers: {
"Content-Type": "application/json",
},
})
.then(({ data: res }) => {
this.$message({
message: res.msg,
type: res.code === 0 ? "success" : "error",
});
this.getList();
if (shouldShowOverlay) this.overlayVisible = false;
});
});
}
case "print": {
return this.$confirm("开始打印么", "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",
})
.then(this.printOnce.bind(null, data))
.then(() => {
// send successful request
return this.$http({
url: "/pms/pallet/print",
method: "post",
data: data,
headers: {
"Content-Type": "application/json",
},
});
})
.then(() => {
this.$message.success("打印成功!");
this.getList();
})
.catch(console.error);
}
}
},
openCarPayloadDialog(id) {
if (!id) {
//console.log("[*] car payloadid", id);
return this.$message({
message: `没有传 id!`,
type: "error",
duration: 1500,
});
}
this.carPayloadDialogVisible = true;
this.$nextTick(() => {
this.$refs["car-payload-dialog"].init(id);
@ -609,7 +674,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "批量同步":
this.overlayVisible = true;
@ -625,43 +690,71 @@ export default {
case "导入":
this.openUploadDialog();
break;
case "导出":
this.$http({
method: "post",
url: this.urls.export,
data: { page: this.page },
responseType: "blob",
}).then((res) => {
// //console.log("", res);
const filename = res.headers["content-disposition"].split("filename=")[1];
const blob = new Blob([res.data]);
/** 通知 */
this.$notify({
title: "成功",
message: "开始下载",
type: "success",
duration: 1200,
});
if ("download" in document.createElement("a")) {
const alink = document.createElement("a");
alink.download = filename;
alink.style.display = "none";
alink.target = "_blank";
alink.href = URL.createObjectURL(blob);
document.body.appendChild(alink);
alink.click();
URL.revokeObjectURL(alink.href);
document.body.removeChild(alink);
} else {
navigator.msSaveBlob(blob, filename);
}
});
break;
case "手动添加": {
this.openDialog();
return;
}
case "查询": {
if (typeof payload === "object") {
// BaseSearchForm
Object.assign(this.cachedSearchCondition, payload);
if ("timerange" in payload) {
if (!!payload.timerange) {
const [startTime, endTime] = payload["timerange"];
this.cachedSearchCondition.startTime = moment(startTime).format("YYYY-MM-DDTHH:mm:ss");
this.cachedSearchCondition.endTime = moment(endTime).format("YYYY-MM-DDTHH:mm:ss");
} else {
delete this.cachedSearchCondition.startTime;
delete this.cachedSearchCondition.endTime;
}
delete this.cachedSearchCondition.timerange;
const params = Object.assign({}, payload);
if ("timerange" in params) {
if (!!params.timerange) {
const [startTime, endTime] = params["timerange"];
params.startTime = moment(startTime).format("YYYY-MM-DDTHH:mm:ss");
params.endTime = moment(endTime).format("YYYY-MM-DDTHH:mm:ss");
} else {
params.startTime = null;
params.endTime = null;
}
delete params.timerange;
}
/** 处理 listQueryExtra 里的数据 */
this.listQueryExtra?.map((cond) => {
if (typeof cond === "string") {
if (!!payload[cond]) {
this.cachedSearchCondition[cond] = payload[cond];
} else {
this.cachedSearchCondition[cond] = "";
}
} else if (typeof cond === "object") {
Object.keys(cond).forEach((key) => {
this.cachedSearchCondition[key] = cond[key];
});
}
});
console.log("查询", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
// //console.log(
// " params",
// JSON.stringify({
// // ...this.queryParams,
// ...params,
// })
// );
this.queryParams = {
...this.queryParams,
...params,
};
this.getList();
break;
}
case "同步":
@ -675,7 +768,7 @@ export default {
this.$http
.post(this.urls.syncUrl)
.then(({ data: res }) => {
console.log("同步", res);
//console.log("", res);
this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
this.getList();
this.overlayVisible = false;
@ -685,20 +778,102 @@ export default {
});
});
break;
case "打印":
if (this.tableSelectedIds.length === 0) {
return this.$message({
message: "请先选择要打印的项",
type: "warning",
duration: 1500,
});
}
return this.$confirm("开始打印么", "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",
})
.then(async () => {
const batchPrint = async function* () {
for (const item of this.tableSelectedIds) {
if (typeof item == "object" && "id" in item) {
yield { id: item.id, result: await this.printOnce(item.id) };
} else {
yield { id: item, result: await this.printOnce(item) }; // item id
}
}
};
for await (const { id } of batchPrint.call(this)) {
await this.$http({
url: "/pms/pallet/print",
method: "post",
data: id,
headers: {
"Content-Type": "application/json",
},
});
}
})
.then(() => {
this.$message.success("打印成功!");
this.getList();
})
.catch((err) => {
// this.$message.error(`: ${err}`);
});
case "报工":
//console.log("ids:", this.tableSelectedIds);
this.carReportDialogVisible = true;
this.$nextTick(() => {
this.$refs["car-report-dialog"].init();
});
break;
case "生成托盘":
if (this.tableSelectedIds.length > 1) {
return this.$message({
message: "只能选择一项",
type: "warning",
duration: 1500,
});
}
// // -
// if (this.tableSelectedIds.length == 1 && this.tableSelectedIds[0].typeDictValue != "2") {
// return this.$message({
// message: "",
// type: "warning",
// duration: 1500,
// });
// }
this.palletDialogVisible = true;
this.$nextTick(() => {
this.$refs["pallet-dialog"].init();
});
break;
}
},
/** 打印一次 */
printOnce(id) {
return new Promise((resolve) => {
this.printDOMmount = true;
this.$nextTick(async () => {
//console.log("[Print] :", id);
await this.$refs["print"].print(id);
resolve();
});
});
},
/** 导航器的操作 */
handleSizeChange(val) {
// val
this.page = 1;
this.size = val;
this.getList(this.cachedSearchCondition);
this.getList();
},
handlePageChange(val) {
// val
this.getList(this.cachedSearchCondition);
this.getList();
},
/** 打开对话框 */
@ -712,7 +887,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

@ -56,7 +56,7 @@ export default {
}
list.push(newRouteItem);
} else {
// console.log(menu.name, '')
// //console.log(menu.name, '')
}
});
}

View File

@ -0,0 +1,143 @@
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
// import switchBtn from "@/components/noTemplateComponents/switchBtn";
import TableTextComponent from '@/components/noTemplateComponents/detailComponent'
import request from "@/utils/request";
import { timeFilter, dictFilter } from "@/utils/filters";
export default function () {
const tableProps = [
{ type: "index", label: "序号" },
{ prop: "name", label: "库位" },
{ prop: "order", label: "订单" },
{ prop: "orderSub", label: "子号" },
{ prop: "batchNo", label: "批次号" },
{ prop: "gradeId", label: "配方" },
{ prop: "status", label: "状态", filter: val => (val != null) ? ['空库位', '满料盅', '空料盅'][val] : '-' },
];
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0, 0).getTime();
const headFormFields = [
{
// prop: "key",
label: "AGV库位",
},
{
button: {
type: "primary",
permission: 'pms:agvList:info',
name: "刷新",
},
},
// {
// button: {
// type: "primary",
// name: "新增",
// permission: "",
// },
// bind: {
// plain: true,
// },
// },
];
/**
* dialog config 有两个版本一个适用于 DialogWithMenu 组件另一个适用于 DialogJustForm 组件
* 适用于 DialogWithMenu 组件的配置示例详见 blenderStep/config.js
* 此为后者的配置:
*/
const dialogJustFormConfigs = {
form: {
rows: [
[
{
input: true,
label: "批次号",
prop: "batchNo",
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "-" },
},
],
[
{
input: true,
label: "配方",
prop: "bom",
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "-" },
},
],
[
{
input: true,
label: "重量",
prop: "batchSize",
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "-" },
},
],
// [
// {
// select: true,
// label: "所属工厂",
// prop: "factoryId",
// fetchData: () => this.$http.get("/pms/factory/page", { params: { limit: 999, page: 1 } }),
// options: [],
// rules: { required: true, message: "必填项不能为空", trigger: "change" },
// },
// {
// input: true,
// label: "产线TT值",
// prop: "tvalue",
// rules: [
// { required: true, message: "必填项不能为空", trigger: "blur" },
// { type: "number", message: "数字", trigger: "blur", transform: (val) => Number(val) },
// ],
// elparams: { placeholder: "设定TT值每小时下片数量" },
// },
// ],
// [
// { input: true, label: "规格", prop: "specifications", elparams: { placeholder: "规格" } },
// {
// input: true,
// label: "重量",
// prop: "externalCode",
// rules: [{ type: 'number', trigger: "blur", message: "请输入数字类型", transform: val => Number(val) }],
// elparams: { placeholder: "外部编码" },
// },
// { input: true, label: "短描述", prop: "shortDesc", elparams: { placeholder: "短描述" } },
// ],
// [{ textarea: true, label: "描述", prop: "description", elparams: { placeholder: "描述" } }],
// [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
],
operations: [
// { name: "add", label: "保存", type: "primary", permission: "pms:shape:save", showOnEdit: false },
// { name: "update", label: "更新", type: "primary", permission: "pms:shape:update", showOnEdit: true },
// { name: "reset", label: "重置", type: "warning", showAlways: true },
// { name: 'cancel', label: '取消', showAlways: true },
],
},
};
// 备注:弹窗弹出的时间和网速有关......
return {
dialogConfigs: dialogJustFormConfigs,
tableConfig: {
table: null, // 此处可省略el-table 上的配置项
column: tableProps, // el-column-item 上的配置项
},
headFormConfigs: {
rules: null, // 名称是由 BaseSearchForm.vue 组件固定的
fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的
},
urls: {
base: "/pms/trans/agvVisual",
page: "/pms/trans/agvVisual",
// detach: "/pms/agvTrans/delivery"
// subase: '/pms/blenderStepParam',
// subpage: '/pms/blenderStepParam/page',
// more...
},
};
}

View File

@ -0,0 +1,80 @@
<template>
<!-- <ListViewWithHead
:table-config="tableConfig"
:head-config="headFormConfigs"
:dialog-configs="dialogConfigs" /> -->
<div class="list-view-with-head">
<BaseSearchForm :head-config="headFormConfigs" @btn-click="handleBtnClick" />
<BaseListTable
v-loading="tableLoading"
:table-config="tableConfig.table"
:column-config="tableConfig.column"
:table-data="dataList"
:refresh-layout-key="refreshLayoutKey" />
</div>
</template>
<script>
import BaseListTable from "@/components/BaseListTable.vue";
import initConfig from "./config";
import BaseSearchForm from "@/components/BaseSearchForm.vue";
export default {
name: "AGVList",
components: { BaseListTable, BaseSearchForm },
provide() {
return {
urls: this.allUrls,
};
},
data() {
const { tableConfig, headFormConfigs, urls, dialogConfigs } = initConfig.call(this);
return {
tableLoading: false,
dataList: [],
refreshLayoutKey: Math.random(),
tableConfig,
headFormConfigs,
allUrls: urls,
dialogConfigs,
};
},
created() {},
mounted() {
this.getlist();
},
methods: {
async getlist() {
const { data: res } = await this.$http({
url: this.allUrls.page,
method: "get",
});
if (res.code == 0) {
this.dataList = res.data;
}
},
handleBtnClick({ btnName, payload }) {
switch (btnName) {
case "查询": {
this.getlist();
break;
}
}
},
},
};
</script>
<style scoped>
.list-view-with-head {
background: white;
/* height: 100%; */
min-height: inherit;
border-radius: 6px;
padding: 16px;
box-shadow: 0 0 1.125px 0.125px rgba(0, 0, 0, 0.125);
}
</style>

View File

@ -33,6 +33,9 @@ export default function () {
},
];
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0, 0).getTime();
const headFormFields = [
{
prop: "key",
@ -85,6 +88,7 @@ export default function () {
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
},
default: { value: [today - 24 * 7 * 1000 * 3600, today + 3600 * 24 * 1000] },
},
{
button: {

View File

@ -7,7 +7,7 @@ import initConfig from './config';
import ListViewWithHead from '@/views/atomViews/ListViewWithHead.vue';
export default {
name: 'ProductionLineView',
name: 'AGVMission',
components: { ListViewWithHead },
provide() {
return {

View File

@ -190,19 +190,19 @@ export default {
const promiseHistory = {};
const getData = (col, param) => {
console.log("getData: ", col.prop, "/", param ?? "no param!");
//console.log("getData: ", col.prop, "/", param ?? "no param!");
// -
promiseHistory[col.prop] = col.fetchData(param).then(({ data: res }) => {
if (res.code === 0) {
if ("list" in res.data) {
console.log(
"SdASD ",
res.data.list.map((i) => ({
label: col.optionLabel ? i[col.optionLabel] : i.name,
value: col.optionValue ? i[col.optionValue] : i.id,
[col.customLabel]: i[col.customLabel],
}))
);
//console.log(
// "SdASD ",
// res.data.list.map((i) => ({
// label: col.optionLabel ? i[col.optionLabel] : i.name,
// value: col.optionValue ? i[col.optionValue] : i.id,
// [col.customLabel]: i[col.customLabel],
// }))
// );
// options
this.$set(
col,
@ -226,13 +226,13 @@ export default {
//
if ("injectTo" in col) {
console.log("set watcher: ", col.prop);
//console.log("set watcher: ", col.prop);
const valueProp = "optionValue" in col ? col.optionValue : "id";
const unwatch = this.$watch(
() => this.dataForm[col.prop],
(val) => {
console.log("do watcher: ", col.prop);
//console.log("do watcher: ", col.prop);
if (col.disableWatcherOnEdit && this.editMode) return;
if (!val) {
col.injectTo.map((item) => {
@ -248,7 +248,7 @@ export default {
this.$forceUpdate();
});
} else {
console.log('[x] if ("injectTo" in col) {');
//console.log('[x] if ("injectTo" in col) {');
}
},
{
@ -287,14 +287,14 @@ export default {
//
if ("injectTo" in col && !col.watcher) {
console.log("set watcher: ", col.prop);
//console.log("set watcher: ", col.prop);
const valueProp = "optionValue" in col ? col.optionValue : "id";
const unwatch = this.$watch(
() => this.dataForm[col.prop],
(val) => {
if (col.disableWatcherOnEdit && this.editMode) return;
console.log("do watcher: ", col.prop);
//console.log("do watcher: ", col.prop);
if (!val) {
col.injectTo.map((item) => {
this.$set(this.dataForm, item[0], null);
@ -309,7 +309,7 @@ export default {
this.$forceUpdate();
});
} else {
console.log('[x] if ("injectTo" in col) {');
//console.log('[x] if ("injectTo" in col) {');
}
},
{
@ -330,16 +330,16 @@ export default {
}
});
console.log("after getData: ", promiseHistory);
//console.log("after getData: ", promiseHistory);
};
/** 处理函数 */
const handleFn = (prevProp, anchorField, anchorValue, targetField, col) => {
console.log("[handleFn]: ", prevProp, anchorField, anchorValue, targetField);
//console.log("[handleFn]: ", prevProp, anchorField, anchorValue, targetField);
/** 此时 cachedList 已经确保可用了 */
const target = this.cachedList[prevProp].find((i) => i[anchorField] === anchorValue);
const param = target ? target[targetField] : "";
console.log("((( chosenObject )))", target);
//console.log("((( chosenObject )))", target);
getData(col, param);
};
@ -358,13 +358,13 @@ export default {
row.forEach((col) => {
if (col == null) return;
if (col.fetchData && typeof col.fetchData === "function" && col.hasPrev) {
console.log("[hasPrev] set watcher: ", col.hasPrev);
//console.log("[hasPrev] set watcher: ", col.hasPrev);
// -
const unwatch = this.$watch(
() => this.dataForm[col.hasPrev],
(val) => {
console.log("[hasPrev] do watcher: ", col.hasPrev);
//console.log("[hasPrev] do watcher: ", col.hasPrev);
if (!val) {
col.injectTo.map((item) => {
this.$set(this.dataForm, item[0], null);
@ -398,11 +398,11 @@ export default {
if (this.configs.extraFields)
this.configs.extraFields.forEach((cnf) => {
if (cnf.listenTo) {
console.log("set watcher for: ", cnf.prop);
//console.log("set watcher for: ", cnf.prop);
const unwatch = this.$watch(
() => this.dataForm[cnf.listenTo.prop],
(carId) => {
console.log("do watcher for: ", cnf.prop);
//console.log("do watcher for: ", cnf.prop);
if (!carId) return;
if (cnf.disableWatcherOnEdit && this.editMode) return;
cnf.listenTo.handler.call(this, this.cachedList[cnf.listenTo.prop], carId);
@ -439,14 +439,14 @@ export default {
resetSpecificFields(fields) {
Object.keys(this.dataForm).forEach((key) => {
// console.log(`${key} ${fields}`, key in fields, fields.indexOf(key))
// //console.log(`${key} ${fields}`, key in fields, fields.indexOf(key))
if (fields.indexOf(key) !== -1) {
// console.log(`key ${key} in fields`)
// //console.log(`key ${key} in fields`)
// this.dataForm[key] = null;
this.$set(this.dataForm, key, null);
}
});
console.log("this.dataform", this.dataForm);
//console.log("this.dataform", this.dataForm);
},
resetForm(excludeId = false, immediate = false) {
@ -468,9 +468,9 @@ export default {
/** init **/
init(id, detailMode, tagInfo, extraParams) {
// console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
// //console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
if (this.$refs.dataForm) {
// console.log("[DialogJustForm] clearing form validation...");
// //console.log("[DialogJustForm] clearing form validation...");
// dialog dataForm [0]
this.$refs.dataForm.clearValidate();
}
@ -481,7 +481,7 @@ export default {
/** 判断 extraParams */
if (extraParams && typeof extraParams === "object") {
for (const [key, value] of Object.entries(extraParams)) {
// console.log("[dialog] dataForm | key | value", this.dataForm, key, value);
// //console.log("[dialog] dataForm | key | value", this.dataForm, key, value);
this.$set(this.dataForm, key, value);
}
}
@ -514,7 +514,7 @@ export default {
url: file.fileUrl,
}));
}
// console.log("[DialogJustForm] init():", this.dataForm);
// //console.log("[DialogJustForm] init():", this.dataForm);
} else {
this.$message({
message: `${res.code}: ${res.msg}`,
@ -540,7 +540,7 @@ export default {
handleButtonClick(col) {
if (!("onClick" in col)) {
console.log("[handleButtonClick] 配置文件config.js 里没有绑定 onClick");
//console.log("[handleButtonClick] config.js onClick");
return;
}
@ -551,7 +551,7 @@ export default {
handleSelectChange(col, eventValue) {
if ("autoUpdateProp" in col) {
//
// console.log(col.options, eventValue, this.savedDatalist);
// //console.log(col.options, eventValue, this.savedDatalist);
const item = this.savedDatalist[col.prop].find((item) => item.id === eventValue);
this.shadowDataForm[col.autoUpdateProp] = item.cate ?? null;
}
@ -559,17 +559,17 @@ export default {
},
handleSwitchChange(val) {
console.log("[dialog] switch change: ", val, this.dataForm);
//console.log("[dialog] switch change: ", val, this.dataForm);
},
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
//console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
addOrUpdate(method = "POST", url) {
if ("parentId" in this.dataForm) {
console.log("[DialogJustForm parentId]", this.dataForm.parentId);
//console.log("[DialogJustForm parentId]", this.dataForm.parentId);
// parentId cascader ["xxx"]xxx
const lastItem = this.dataForm.parentId.length - 1;
this.dataForm.parentId = this.dataForm.parentId[lastItem];
@ -621,7 +621,7 @@ export default {
data: httpPayload,
})
.then(({ data: res }) => {
console.log("[add&update] res is: ", res);
//console.log("[add&update] res is: ", res);
this.loadingStatus = false;
if (res.code === 0) {
this.$message.success(method === "POST" ? "添加成功" : "更新成功");
@ -647,7 +647,7 @@ export default {
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -659,7 +659,7 @@ export default {
break;
case "resetSpecific":
// qualityInspectionRecord config
console.log("resetFields", this.resetFields);
//console.log("resetFields", this.resetFields);
this.resetSpecificFields(this.resetFields);
break;
case "add":
@ -674,18 +674,18 @@ export default {
break;
}
case "add-car-payload": {
console.log("edit-car-payload", payload);
//console.log("edit-car-payload", payload);
this.addOrUpdate("POST", this.urls.payloadFormUrl);
break;
}
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] ! name");
}
},
handleUploadChange(file, fileList) {
console.log("[Upload] handleUploadChange...", file, fileList);
//console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {

View File

@ -95,7 +95,7 @@ export default {
},
blenderOrderId() {
const item = this.listQueryExtra.find((item) => item.blenderOrderId);
console.log("Find blenderOrderId", item);
//console.log("Find blenderOrderId", item);
return item ? item.blenderOrderId : null;
},
},
@ -104,10 +104,10 @@ export default {
},
watch: {
page: (val) => {
console.log("page changed:", val);
//console.log("page changed:", val);
},
size: (val) => {
console.log("size changed:", val);
//console.log("size changed:", val);
},
triggerUpdate(val, oldVal) {
if (val && val !== oldVal) {
@ -191,7 +191,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -240,7 +240,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -381,7 +381,7 @@ export default {
this.$http
.post(this.urls.syncUrl)
.then(({ data: res }) => {
console.log("同步", res);
//console.log("", res);
this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
this.getList();
this.overlayVisible = false;

View File

@ -100,7 +100,7 @@ export default {
watch: {
blenderOrderId: {
handler(val) {
// console.log("blenderOrderId changed", val);
// //console.log("blenderOrderId changed", val);
},
immediate: true,
},

View File

@ -23,11 +23,11 @@ export default {
computed: {
// id
id() {
console.log("computed id", this.$route.query.id || "");
//console.log("computed id", this.$route.query.id || "");
return this.$route.query.id || "";
},
refreshPage() {
console.log("computed refreshPage");
//console.log("computed refreshPage");
const val = this.$route.query.refreshPage ? Math.random().toString() : null;
// location.href refreshPage
location.href = location.href.replace(/&refreshPage=[^&]*/, "");
@ -50,7 +50,7 @@ export default {
// handler: function (route) {
// if (route.query.id) {
// this.triggerUpdateKey = Math.random().toString()
// console.log('[$oute changed] val.params.id', route.query.id, this.triggerUpdateKey)
// //console.log('[$oute changed] val.params.id', route.query.id, this.triggerUpdateKey)
// }
// },
// immediate: true,
@ -60,7 +60,7 @@ export default {
watch: {
refreshPage: {
handler: function (val) {
console.log("refreshPage", val);
//console.log("refreshPage", val);
if (val) {
// this.triggerUpdateKey = Math.random().toString();
this.triggerUpdateKey = val;

View File

@ -86,10 +86,23 @@ export default {
dialogBomCode: "",
overlayVisible: false,
cachedSearchCondition: {},
queryParams: {},
};
},
inject: ["urls"],
mounted() {
// listQueryExtra queryParams
if (this.listQueryExtra && Array.isArray(this.listQueryExtra)) {
this.listQueryExtra.map((item) => {
if (typeof item === "string") this.$set(this.queryParams, item, "");
else if (typeof item === "object") {
Object.keys(item).forEach((key) => {
this.$set(this.queryParams, key, item[key]);
});
}
});
}
this.initDataWhenLoad && this.getList();
},
methods: {
@ -104,17 +117,6 @@ export default {
limit: this.size,
};
if (!queryParams && this.listQueryExtra && this.listQueryExtra.length) {
this.listQueryExtra.map((nameOrObj) => {
if (typeof nameOrObj === "string") params[nameOrObj] = "";
else if (typeof nameOrObj === "object") {
Object.keys(nameOrObj).forEach((key) => {
params[key] = nameOrObj[key];
});
}
});
}
// if (this.urls.pageIsPostApi) {
// } else {
// get page
@ -122,14 +124,18 @@ export default {
this.urls.page,
this.urls.pageIsPostApi
? {
...this.queryParams,
...params,
}
: {
params,
params: {
...this.queryParams,
...params
},
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -170,7 +176,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data, toRouter }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -253,7 +259,9 @@ export default {
.then(({ data: res }) => {
if (res.code === 0) {
this.$message({
message: `${type === "detach" ? "下发" : type === "pause-blender" ? "暂停" : "开始"}成功`,
message: `${
type === "detach" ? "下发" : type === "pause-blender" ? "暂停" : "开始"
}成功`,
type: "success",
duration: 1500,
onClose: () => {
@ -275,7 +283,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -312,7 +320,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}

View File

@ -120,7 +120,7 @@ export default {
if (col.delayRequest) delayList.push(col);
// let doRequest = null;
// if (col.fetchData.length) {
// console.log(`this.bomCode '${this.bomCode}'`);
// //console.log(`this.bomCode '${this.bomCode}'`);
// //
// doRequest = col.fetchData.bind(this.bomCode);
// } else doRequest = col.fetchData;
@ -146,7 +146,7 @@ export default {
}))
);
} else {
console.log("请检查返回的数据类型");
//console.log("");
}
} else {
col.options.splice(0);
@ -207,7 +207,7 @@ export default {
if (excludeId && key === "id") return;
this.dataForm[key] = null;
});
console.log("[DialogJustForm resetForm()] clearing form...");
//console.log("[DialogJustForm resetForm()] clearing form...");
this.$refs.dataForm.clearValidate();
this.$emit("dialog-closed"); //
},
@ -220,17 +220,17 @@ export default {
// id ID id
const { id, code, blender, bomId } = row;
// console.log(" { id, code, blender } = row;", row);
// //console.log(" { id, code, blender } = row;", row);
if (this.$refs.dataForm) {
this.$refs.dataForm.clearValidate();
}
this.delayList.forEach((col) => {
// console.log("delay fetch", col);
// //console.log("delay fetch", col);
// col
if (col.fetchDataParam in row) {
// console.log("delay row ", row, row[col.fetchDataParam]);
// //console.log("delay row ", row, row[col.fetchDataParam]);
col.fetchData(row[col.fetchDataParam]).then(({ data: res }) => {
if (res.code === 0) {
if ("list" in res.data) {
@ -252,7 +252,7 @@ export default {
}))
);
} else {
console.log("请检查返回的数据类型");
//console.log("");
}
} else {
col.options.splice(0);
@ -274,17 +274,17 @@ export default {
/** handlers */
handleSelectChange(col, eventValue) {
// console.log("[dialog] select change: ", col, eventValue);
// //console.log("[dialog] select change: ", col, eventValue);
this.$forceUpdate();
},
handleSwitchChange(val) {
console.log("[dialog] switch change: ", val, this.dataForm);
// //console.log("[dialog] switch change: ", val, this.dataForm);
},
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
// //console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
addOrUpdate(method = "POST") {
@ -321,7 +321,7 @@ export default {
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -333,12 +333,12 @@ export default {
break;
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] ! name");
}
},
handleUploadChange(file, fileList) {
console.log("[Upload] handleUploadChange...", file, fileList);
//console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {

View File

@ -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: [
{
@ -305,7 +305,13 @@ export default function () {
return {
dialogConfigs,
tableConfig: {
table: null, // 此处可省略el-table 上的配置项
table: {
"cell-class-name": ({ row, column, rowIndex, columnIndex }) => {
if ("statusDictValue" in row && row.statusDictValue == "2") {
return "cell-in-production";
}
},
},
column: tableProps, // el-column-item 上的配置项
},
headFormConfigs: {

View File

@ -1,5 +1,6 @@
<template>
<ListViewWithHead
class="highlight-cell"
key="blender-order"
:table-config="tableConfig"
:head-config="headFormConfigs"
@ -34,4 +35,11 @@ export default {
};
</script>
<style scoped></style>
<style scoped>
.highlight-cell >>> .cell-in-production {
background: rgba(33, 207, 134, 0.35);
}
.highlight-cell >>> .hover-row .cell-in-production {
background: rgba(33, 207, 134, 0.7);
}
</style>

View File

@ -170,7 +170,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -209,7 +209,7 @@ export default {
},
handleOperatePress({ type, data, toRouter }) {
console.log("payload", type, data);
//console.log("payload", type, data);
switch (type) {
case "detach": {
//
@ -220,8 +220,11 @@ export default {
}).then(() => {
this.overlayVisible = true;
return this.$http
.post(this.urls.pressDetach, data /* { id: data } */, { headers: { "Content-Type": "application/json" } })
.post(this.urls.pressDetach, data /* { id: data } */, {
headers: { "Content-Type": "application/json" },
})
.then(({ data: res }) => {
this.overlayVisible = false;
if (res.code === 0) {
this.$message({
message: `下发成功`,
@ -238,7 +241,6 @@ export default {
duration: 1500,
});
}
this.overlayVisible = false;
});
});
}
@ -247,7 +249,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data, toRouter }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -329,7 +331,9 @@ export default {
.then(({ data: res }) => {
if (res.code === 0) {
this.$message({
message: `${type === "detach" ? "下发" : type === "pause-blender" ? "暂停" : "开始"}成功`,
message: `${
type === "detach" ? "下发" : type === "pause-blender" ? "暂停" : "开始"
}成功`,
type: "success",
duration: 1500,
onClose: () => {
@ -351,7 +355,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -388,7 +392,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
this.getList(this.cachedSearchCondition, "press");
break;

View File

@ -120,7 +120,7 @@ export default {
if (col.delayRequest) delayList.push(col);
// let doRequest = null;
// if (col.fetchData.length) {
// console.log(`this.bomCode '${this.bomCode}'`);
// //console.log(`this.bomCode '${this.bomCode}'`);
// //
// doRequest = col.fetchData.bind(this.bomCode);
// } else doRequest = col.fetchData;
@ -146,7 +146,7 @@ export default {
}))
);
} else {
console.log("请检查返回的数据类型");
//console.log("");
}
} else {
col.options.splice(0);
@ -207,7 +207,7 @@ export default {
if (excludeId && key === "id") return;
this.dataForm[key] = null;
});
console.log("[DialogJustForm resetForm()] clearing form...");
//console.log("[DialogJustForm resetForm()] clearing form...");
this.$refs.dataForm.clearValidate();
this.$emit("dialog-closed"); //
},
@ -220,17 +220,17 @@ export default {
// id ID id
const { id, code, blender, bomId } = row;
// console.log(" { id, code, blender } = row;", row);
// //console.log(" { id, code, blender } = row;", row);
if (this.$refs.dataForm) {
this.$refs.dataForm.clearValidate();
}
this.delayList.forEach((col) => {
// console.log("delay fetch", col);
// //console.log("delay fetch", col);
// col
if (col.fetchDataParam in row) {
// console.log("delay row ", row, row[col.fetchDataParam]);
// //console.log("delay row ", row, row[col.fetchDataParam]);
col.fetchData(row[col.fetchDataParam]).then(({ data: res }) => {
if (res.code === 0) {
if ("list" in res.data) {
@ -252,7 +252,7 @@ export default {
}))
);
} else {
console.log("请检查返回的数据类型");
//console.log("");
}
} else {
col.options.splice(0);
@ -274,17 +274,17 @@ export default {
/** handlers */
handleSelectChange(col, eventValue) {
// console.log("[dialog] select change: ", col, eventValue);
// //console.log("[dialog] select change: ", col, eventValue);
this.$forceUpdate();
},
handleSwitchChange(val) {
console.log("[dialog] switch change: ", val, this.dataForm);
//console.log("[dialog] switch change: ", val, this.dataForm);
},
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
//console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
addOrUpdate(method = "POST") {
@ -321,7 +321,7 @@ export default {
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -333,12 +333,12 @@ export default {
break;
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] ! name");
}
},
handleUploadChange(file, fileList) {
console.log("[Upload] handleUploadChange...", file, fileList);
//console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {

View File

@ -9,11 +9,19 @@ export default function () {
{ width: 160, prop: "orderCode", label: "主订单号" },
{ width: 60, prop: "orderCate", label: "子号" },
{ width: 160, prop: "code", label: "混料订单号" },
{ width: 60, prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") },
{
width: 60,
prop: "percent",
label: "进度",
filter: (val) => (val !== null && val !== undefined ? val + " %" : "-"),
},
{
prop: "statusDictValue",
label: "订单状态",
filter: (val) => (val !== null && val !== undefined ? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"][val] : "-"),
filter: (val) =>
val !== null && val !== undefined
? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"][val]
: "-",
},
{ prop: "bomCode", label: "配方" },
{ width: 120, prop: "qty", label: "混料总量 [kg]" },
@ -25,20 +33,30 @@ export default function () {
prop: "operations",
name: "操作",
fixed: "right",
width: 180,
width: 196,
subcomponent: TableOperaionComponent,
options: [
{
name: "edit", label: "编辑", emitFull: true, icon: 'edit-outline', enable: injectData => {
const v = injectData.statusDictValue
if (v && +v === 1) return true
return false
}
name: "edit",
label: "编辑",
emitFull: true,
icon: "edit-outline",
enable: (injectData) => {
const v = injectData.statusDictValue;
if (v && +v === 1) return true;
return false;
},
},
{ name: "view-batch", label: "查看批次", color: "#ff8000", toRouter: 'pms-blenderBatch', icon: 'document-copy' }, // 路由跳转至 pms-blenderBatch
{ name: "pause-blender", label: "暂停", color: "#f10000", icon: 'video-pause' },
{ name: "start-blender", label: "开始", color: "#0b58ff", icon: 'video-play' },
{ name: "detach", label: "下发", color: "#099", icon: 'bottom-right' },
{
name: "view-batch",
label: "查看批次",
color: "#ff8000",
toRouter: "pms-blenderBatch",
icon: "document-copy",
}, // 路由跳转至 pms-blenderBatch
{ name: "pause-blender", label: "暂停", color: "#f10000", icon: "video-pause" },
{ name: "start-blender", label: "开始", color: "#0b58ff", icon: "video-play" },
{ name: "detach", label: "下发", color: "#099", icon: "bottom-right" },
],
},
];
@ -48,8 +66,20 @@ export default function () {
{ width: 160, prop: "orderCode", label: "主订单号" },
{ width: 60, prop: "orderCate", label: "子号" },
{ width: 160, prop: "code", label: "压制订单号" },
{ width: 60, prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") },
{ prop: "statusDictValue", label: "订单状态", filter: (val) => (val !== null && val !== undefined ? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"][val] : "-"), },
{
width: 60,
prop: "percent",
label: "进度",
filter: (val) => (val !== null && val !== undefined ? val + " %" : "-"),
},
{
prop: "statusDictValue",
label: "订单状态",
filter: (val) =>
val !== null && val !== undefined
? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"][val]
: "-",
},
{ prop: "startTime", label: "开始时间" },
{ width: 100, prop: "shapeCode", label: "砖型" },
{ prop: "pressCode", label: "压机" },
@ -64,11 +94,10 @@ export default function () {
fixed: "right",
width: 80,
subcomponent: TableOperaionComponent,
options: [{ name: 'detach', label: '下发', icon: 'bottom-right' }]
options: [{ name: "detach", label: "下发", icon: "bottom-right" }],
},
];
const headFormFields = [
{
prop: "code",
@ -109,8 +138,8 @@ export default function () {
[
{
forceDisabled: true,
prop: 'code',
label: '混料订单号'
prop: "code",
label: "混料订单号",
},
],
[
@ -119,10 +148,11 @@ export default function () {
label: "配方",
prop: "bomId",
options: [],
optionLabelProp: 'code',
optionLabelProp: "code",
/** ====== */
fetchData: (bomCode) => this.$http.get('/pms/bom/pageVersion', { params: { key: bomCode, limit: 999, page: 1 } }),
fetchDataParam: 'bomCode',
fetchData: (bomCode) =>
this.$http.get("/pms/bom/pageVersion", { params: { key: bomCode, limit: 999, page: 1 } }),
fetchDataParam: "bomCode",
delayRequest: true,
/** ====== */
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
@ -135,8 +165,9 @@ export default function () {
label: "混料机",
prop: "blender",
options: [],
optionLabelProp: 'code',
fetchData: () => this.$http.get('/pms/equipment/list', { params: { workSequenceName: '混料工序' } }),
optionLabelProp: "code",
fetchData: () =>
this.$http.get("/pms/equipment/list", { params: { workSequenceName: "混料工序" } }),
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { clearable: true, filterable: true, placeholder: "请选择混料机" },
},
@ -146,18 +177,30 @@ export default function () {
{ name: "add", label: "保存", type: "primary", permission: "", showOnEdit: false },
{ name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true },
// { name: "reset", label: "重置", type: "warning", showAlways: true },
]
],
},
};
return {
dialogConfigs,
tableConfig: {
table: null,
table: {
"cell-class-name": ({ row, column, rowIndex, columnIndex }) => {
if ("statusDictValue" in row && row.statusDictValue == "2") {
return "cell-in-production";
}
},
},
column: tableProps,
},
pressTableConfig: {
table: null,
table: {
"cell-class-name": ({ row, column, rowIndex, columnIndex }) => {
if ("statusDictValue" in row && row.statusDictValue == "2") {
return "cell-in-production";
}
},
},
column: pressTableProps,
},
headFormConfigs: {
@ -171,7 +214,7 @@ export default function () {
pauseBlender: "/pms/trans/blenderPause",
startBlender: "/pms/trans/blenderStart",
pageIsPostApi: true, // 使用post接口来获取page数据极少用目前基本上只有工艺管理模块里在用
changeBlender: '/pms/order/changeBlender',
changeBlender: "/pms/order/changeBlender",
pressPage: "/pms/pressOrder/pageView",
pressDetach: "/pms/trans/pressDeli",
},

View File

@ -1,12 +1,12 @@
<template>
<ListViewWithHead
class="highlight-cell"
key="blender-order"
:table-config="tableConfig"
:press-table-config="pressTableConfig"
:head-config="headFormConfigs"
:dialog-configs="dialogConfigs"
:list-query-extra="[]"
/>
:list-query-extra="[]" />
</template>
<script>
@ -37,4 +37,11 @@ export default {
};
</script>
<style scoped></style>
<style scoped>
.highlight-cell >>> .cell-in-production {
background: rgba(33, 207, 134, 0.35);
}
.highlight-cell >>> .hover-row .cell-in-production {
background: rgba(33, 207, 134, 0.7);
}
</style>

View File

@ -63,10 +63,13 @@ export default function () {
},
{
button: {
type: "plain",
type: "success",
name: "导入",
permission: "",
},
bind: {
plain: true,
},
},
// {
// button: {

View File

@ -15,7 +15,7 @@ const syncTimeComponent = {
return {}
},
mounted() {
console.log('syncTimeComponent mounted', this.injectData)
//console.log('syncTimeComponent mounted', this.injectData)
},
render: function (h) {
return h('div', {

View File

@ -40,7 +40,7 @@ export default {
handler: function (route) {
if (route.query.code) {
this.triggerUpdateKey = Math.random().toString();
console.log("[$oute changed] val.query.name", route.query.code, this.triggerUpdateKey);
//console.log("[$oute changed] val.query.name", route.query.code, this.triggerUpdateKey);
}
},
immediate: true,

View File

@ -155,12 +155,12 @@ export default {
},
async getTechDetailInfo() {
console.log("[getTechDetailInfo] this.techId: ", this.techId);
//console.log("[getTechDetailInfo] this.techId: ", this.techId);
// dataForm
try {
const { data: res } = await this.$http.get(`/pms/equipmentTech/${this.techId}`);
if (res.code == 0) {
// console.log('[getTechDetailInfo] res.data: ', res.data)
// //console.log('[getTechDetailInfo] res.data: ', res.data)
// return;
this.$set(this.dataForm, "code", res.data.code);
this.$set(this.dataForm, "remark", res.data.remark);
@ -179,7 +179,7 @@ export default {
try {
const { data: res } = await this.$http.get("/pms/equipmentTechParam/page", { params });
if (res.code == 0) {
console.log("[getTechDetailList] res.data: ", res.data);
//console.log("[getTechDetailList] res.data: ", res.data);
this.dataList = res.data.list;
this.total = res.data.total;
}
@ -189,7 +189,7 @@ export default {
},
handleTabClick(v) {
// console.log("handleTabClick: ", v);
// //console.log("handleTabClick: ", v);
},
handleOperate() {},

View File

@ -108,7 +108,7 @@ export default {
page: 1,
});
if (res.code == 0) {
console.log("res", res);
//console.log("res", res);
this.techList = res.data.list.map((item) => {
return {
label: item.code,

View File

@ -91,7 +91,7 @@ export default {
params,
})
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
if ("list" in res.data) {
@ -127,7 +127,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "查询":
this.getList({ ...payload });
@ -136,7 +136,7 @@ export default {
},
handleDestroy(type, refresh) {
console.log("[handleDestroy] ", type);
//console.log("[handleDestroy] ", type);
switch (type) {
case "edit":
this.editVisible = false;
@ -151,7 +151,7 @@ export default {
},
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
switch (type) {
case "delete": {
// prompt
@ -197,7 +197,7 @@ export default {
.catch((err) => {});
}
case "edit": {
console.log("[edit] ", data);
//console.log("[edit] ", data);
this.editVisible = true;
this.$nextTick(() => {
this.$refs.edit.init({
@ -211,7 +211,7 @@ export default {
break;
}
case "view-detail-action": {
console.log("[detail] ", data, data.techId);
//console.log("[detail] ", data, data.techId);
if (!data || !data.techId) {
this.$message.warning("暂无详请可供查看");
return;

View File

@ -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: "操作",
@ -60,7 +60,9 @@ export default function () {
}
};
const now = new Date().getTime();
const now = new Date()
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()]
const today = new Date(y, m, d, 0, 0, 0, 0).getTime()
const headFormFields = [
{
prop: "material",
@ -96,7 +98,7 @@ export default function () {
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
},
default: { value: [now - 3600 * 24 * 7 * 1000, now] },
default: { value: [today - 3600 * 24 * 1000 * 7, today + 3600 * 1000 * 24] },
},
{
button: {

View File

@ -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: "操作",
@ -60,15 +60,19 @@ export default function () {
}
};
const now = new Date().getTime();
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0, 0).getTime();
const headFormFields = [
{
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: "请输入原料名",
@ -96,7 +100,7 @@ export default function () {
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
},
default: { value: [now - 3600 * 24 * 7 * 1000, now] },
default: { value: [today - 24 * 7 * 1000 * 3600, today + 3600 * 24 * 1000] },
},
{
button: {

View File

@ -65,7 +65,14 @@ const DIALOG_CARPAYLOAD = "DialogCarPayload";
export default {
name: "ListViewWithHead",
components: { BaseSearchForm, BaseListTable, DialogWithMenu, DialogJustForm, DialogCarPayload, TemperatureDialog },
components: {
BaseSearchForm,
BaseListTable,
DialogWithMenu,
DialogJustForm,
DialogCarPayload,
TemperatureDialog,
},
props: {
tableConfig: {
type: Object,
@ -109,7 +116,7 @@ export default {
},
},
activated() {
console.log("list view with ehad activated..........", this.triggerUpdate);
//console.log("list view with ehad activated..........", this.triggerUpdate);
this.refreshLayoutKey = this.layoutTable();
},
watch: {
@ -141,9 +148,9 @@ export default {
};
},
inject: ["urls"],
mounted() {
this.initDataWhenLoad && this.getList();
},
// mounted() {
// this.initDataWhenLoad && this.getList();
// },
methods: {
/** 获取 列表数据 */
getList(queryParams) {
@ -170,6 +177,7 @@ export default {
// if (this.urls.pageIsPostApi) {
// } else {
// get page
// console.log("params: ", params);
this.$http[this.urls.pageIsPostApi ? "post" : "get"](
this.urls.page,
this.urls.pageIsPostApi
@ -181,7 +189,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -231,7 +239,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -304,7 +312,7 @@ export default {
break;
}
case "status": {
console.log("status", data);
//console.log("status", data);
// TODO:
const { id, code } = data;
const queryCondition = { id, code };
@ -333,7 +341,7 @@ export default {
break;
}
case "to-bom-detail": {
// console.log('to-bom-detail', data.name)
// //console.log('to-bom-detail', data.name)
//
return this.$router.push({
name: "pms-bomDetails",
@ -394,7 +402,7 @@ export default {
});
}
case "preview": {
console.log("[PREVIEW] data", data);
//console.log("[PREVIEW] data", data);
// report preview
return this.$router.push({
name: "pms-reportPreview",
@ -404,7 +412,7 @@ export default {
});
}
case "design": {
console.log("[DESIGN] data", data);
//console.log("[DESIGN] data", data);
// report design
return this.$router.push({
name: "pms-reportDesign",
@ -415,7 +423,9 @@ export default {
}
case "detach": {
return this.$http
.post(this.urls.detach, data /* { id: data } */, { headers: { "Content-Type": "application/json" } })
.post(this.urls.detach, data /* { id: data } */, {
headers: { "Content-Type": "application/json" },
})
.then(({ data: res }) => {
if (res.code === 0) {
this.$message({
@ -470,7 +480,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -512,7 +522,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
@ -551,7 +561,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

@ -2,69 +2,209 @@ const colors = {
line: '#555'
}
export default (x_data, y_data) => ({
title: {
text: "窑车温度",
},
grid: {
show: true,
top: 96,
left: 52,
right: 32,
bottom: 24,
},
xAxis: {
type: "category",
data: Array(65)
.fill(1)
.map((val, index) => {
return val + index;
}),
axisLine: {
lineStyle: {
color: colors.line
},
export default ({ x_data, y_data }, graph2) => {
// debugger;
return {
title: {
text: "窑车温度",
},
},
yAxis: {
type: "value",
name: "温度",
nameTextStyle: {
fontSize: 18,
align: "right",
verticalAlign: "bottom",
lineHeight: 36,
padding: 10,
legend: {
icon: 'circle',
top: 280,
left: 'center',
itemHeight: 8,
itemWidth: 8
},
axisLine: {
tooltip: {
show: true,
lineStyle: {
color: colors.line,
},
},
axisLabel: {
formatter: '{value} ℃'
},
splitLine: {
lineStyle: {
color: '#ddd'
trigger: 'axis',
formatter: function (params) {
// debugger;
return `<span>位置${params[0].name}</span>` + params.map(item => {
return item.value ? `<div style="min-width: 180px; display: flex; justify-content: space-between;"><span>${item.seriesName}</span><span style="color: #888">${item.value}${item.seriesName == 'lambda' ? '' : item.seriesName == '温度' ? '℃' : 'm³'}</span></div>` : ''
}).join('')
}
// formatter:
// '<strong style="font-size: 16px">位置</strong> ({b}) <span style="font-size: 16px; font-weight: bold;">{c}</span> ℃'
},
},
tooltip: {
trigger: 'axis',
formatter: '<strong style="font-size: 16px">位置</strong> ({b}) <span style="font-size: 16px; font-weight: bold;">{c}</span> ℃'
},
dataZoom: {
type: 'inside'
},
series: [
{
data: y_data,
// data: Array(65)
// .fill(1)
// .map((val) => Math.floor(Math.random() * 1000)),
type: "line",
grid: [
{
id: 'temp-grid',
top: 72,
left: 56,
right: 56,
bottom: 24,
height: 180,
},
{
id: 'lambda-grid',
top: 320,
left: 56,
right: 56,
bottom: 24,
height: 180,
}
],
xAxis: [
{
gridIndex: 0,
id: 'temp-x-axis',
type: "category",
data: Array(65)
.fill(1)
.map((val, index) => {
return val + index;
}),
axisLine: {
lineStyle: {
color: colors.line
},
},
},
{
gridIndex: 1,
id: 'lambda-x-axis',
data: Array(65)
.fill(1)
.map((val, index) => {
return val + index;
}),
axisLine: {
lineStyle: {
color: colors.line
}
}
}
],
yAxis: [
{
gridIndex: 0,
type: "value",
interval: 20,
name: "温度",
nameTextStyle: {
fontSize: 14,
align: "right",
verticalAlign: "bottom",
lineHeight: 20,
padding: 6,
},
axisLine: {
show: true,
lineStyle: {
color: colors.line,
},
},
axisLabel: {
formatter: '{value} ℃'
},
splitLine: {
show: false,
lineStyle: {
color: '#ddd'
}
},
},
{
gridIndex: 1,
type: "value",
interval: 20,
name: "消耗量",
nameTextStyle: {
fontSize: 14,
align: "right",
verticalAlign: "bottom",
lineHeight: 20,
padding: 6,
},
axisLine: {
show: true,
lineStyle: {
color: colors.line,
},
},
axisLabel: {
formatter: '{value} m³'
},
splitLine: {
lineStyle: {
color: '#ddd'
}
},
},
{
gridIndex: 0,
type: "value",
name: "lambda",
nameTextStyle: {
fontSize: 14,
align: "left",
verticalAlign: "bottom",
lineHeight: 20,
padding: 6,
},
axisLine: {
show: true,
lineStyle: {
color: colors.line,
},
},
axisLabel: {
formatter: '{value}'
},
splitLine: {
lineStyle: {
color: '#ddd'
}
},
}
],
dataZoom: {
type: 'inside'
},
],
})
series: [
{
id: 'temp-series',
name: '温度',
data: y_data,
xAxisIndex: 0,
yAxisIndex: 0,
// data: Array(65)
// .fill(1)
// .map((val) => Math.floor(Math.random() * 1000)),
type: "line",
},
{
id: 'gas-series',
name: '燃气消耗量(m³)',
xAxisIndex: 1,
yAxisIndex: 1,
data: graph2?.gas || [],
// data: Array(65)
// .fill(1)
// .map((val) => Math.floor(Math.random() * 128)),
type: "line",
},
{
id: 'lambda-series',
name: 'lambda',
// data: [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 33, 11, 21, 3, 5, 67, 8, 88, 90, 12, 32, 2, 31, 33, null, null],
data: [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, ...(graph2?.lambda || []), null, null],
xAxisIndex: 0,
yAxisIndex: 2,
// data: Array(65)
// .fill(1)
// .map((val) => Math.floor(Math.random() * 1000)),
type: "line",
},
],
}
}

View File

@ -8,7 +8,8 @@ export default [
{ width: 60, prop: "code", label: "位置" },
{ width: 60, prop: "temp1", label: "温度" },
{ width: 80, prop: "press1", label: "窑内压力" },
{ width: 80, prop: "press2", label: "车下压力" },
{ width: 128, prop: "press2", label: "燃气消耗量(m3)" },
{ prop: "remark", label: "lambda" },
{ prop: "createTime", label: "时间", filter: timeFilter },
// { prop: "endTime", label: "结束时间", filter: timeFilter },
// {

View File

@ -3,15 +3,14 @@
:visible="visible"
title="烧制温度"
class="temperature-dialog"
width="80%"
width="90%"
@close="handleClose"
:destroy-on-close="false"
:close-on-click-modal="false"
>
:close-on-click-modal="false">
<div class="data-list">
<BaseListTable
v-loading="tableLoading"
style="height: 85%"
style="height: 90%"
:table-config="{ height: '100%' }"
:column-config="tableConfig"
:table-data="dataList"
@ -30,8 +29,9 @@
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div>
<div class="temp-chart" style="height: 300px;">
<div id="temp-chart" class="temp-chart__inner" style="height: 100%;" />
<div class="temp-chart" style="height: 100%; overflow: hidden">
<div id="temp-chart" class="temp-chart__inner" style="height: 100%" />
<!-- <div id="lambda-chart" class="lambda-chart__inner" style="height: 50%; background: #f001;" /> -->
</div>
</el-dialog>
</template>
@ -80,6 +80,50 @@ export default {
});
},
getList() {
// this.dataList = [
// {
// code: "1",
// temp1: 39,
// press1: 12,
// press2: 10,
// remark: 9.9,
// createTime: "2021-09-09 12:00:00",
// },
// {
// code: "2",
// temp1: 49,
// press1: 11,
// press2: 32,
// remark: 9.9,
// createTime: "2021-09-09 12:00:00",
// },
// {
// code: "3",
// temp1: 59,
// press1: 32,
// press2: 43,
// remark: 39,
// createTime: "2021-09-09 12:00:00",
// },
// {
// code: "1",
// temp1: 39,
// press1: 21,
// press2: 94,
// remark: 19,
// createTime: "2021-09-09 12:00:00",
// },
// {
// code: "1",
// temp1: 22,
// press1: 55,
// press2: 42,
// remark: 98,
// createTime: "2021-09-09 12:00:00",
// },
// ];
// return;
this.tableLoading = true;
this.$http
.post("/pms/kilnPosHistory/pageView", {
@ -88,41 +132,38 @@ export default {
hisId: this.hisId,
})
.then(({ data: res }) => {
console.log("temp dialog res", res);
//console.log("temp dialog res", res);
this.tableLoading = false;
if (res.code === 0) {
if ("list" in res.data) {
this.dataList = res.data.list;
this.totalPage = res.data.total
this.totalPage = res.data.total;
} else if (Array.isArray(res.data)) {
this.dataList = res.data;
this.totalPage = res.data.length
this.totalPage = res.data.length;
} // else ...
} else {
this.dataList.splice(0);
this.totalPage = 0
this.totalPage = 0;
}
// this.dataList = [
// { id: 1, code: 1, press1: 1, press2: 1, createTime: "2023-4-21 01:00:00", temp1: 1000 },
// { id: 2, code: 2, press1: 2, press2: 2, createTime: "2023-4-21 02:00:00", temp1: 2000 },
// { id: 3, code: 3, press1: 3, press2: 3, createTime: "2023-4-21 03:00:00", temp1: 3000 },
// { id: 4, code: 4, press1: 4, press2: 4, createTime: "2023-4-21 04:00:00", temp1: 4000 },
// { id: 5, code: 5, press1: 5, press2: 5, createTime: "2023-4-21 05:00:00", temp1: 5000 },
// { id: 6, code: 6, press1: 6, press2: 6, createTime: "2023-4-21 06:00:00", temp1: 6000 },
// { id: 7, code: 7, press1: 7, press2: 7, createTime: "2023-4-21 07:00:00", temp1: 7000 },
// { id: 8, code: 8, press1: 8, press2: 8, createTime: "2023-4-21 08:00:00", temp1: 8000 },
// { id: 9, code: 9, press1: 9, press2: 9, createTime: "2023-4-21 09:00:00", temp1: 9000 },
// { id: 10, code: 10, press1: 10, press2: 10, createTime: "2023-4-21 10:00:00", temp1: 10000 },
// { id: 11, code: 11, press1: 11, press2: 11, createTime: "2023-4-21 11:00:00", temp1: 11000 },
// { id: 12, code: 12, press1: 12, press2: 12, createTime: "2023-4-21 12:00:00", temp1: 12000 },
// ];
});
},
drawChart() {
// dataList 线
if (!this.chart) this.chart = echarts.init(document.getElementById("temp-chart"));
// const y_data = Array(65).fill(0)
this.chart.setOption(loadChartConfig(null, this.dataList.map(i => i.temp1)));
// debugger;
this.chart.setOption(
loadChartConfig({
x_data: null,
y_data: this.dataList.map((i) => i.temp1),
},
{
gas: this.dataList.map((i) => i.press2),
lambda: this.dataList.map((i) => i.remark),
})
);
},
handleOperate() {},
handlePageChange(page) {
@ -152,7 +193,7 @@ export default {
.data-list,
.temp-chart {
/* border: 1px solid #ccc; */
width: 35%;
width: 45%;
overflow-y: auto;
position: relative;
}
@ -161,7 +202,7 @@ export default {
flex: 1;
/* margin-left: 18px; */
padding-left: 10px;
margin-left: 10px;
/* border-left: 1px solid #ccc; */
/* background-color: lightblue; */
}

View File

@ -1,6 +1,6 @@
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
import StateSelect from "@/components/StateSelect.vue";
import request from "@/utils/request";
// import StateSelect from "@/components/StateSelect.vue";
// import request from "@/utils/request";
import { timeFilter } from "@/utils/filters";
export default function () {
@ -8,7 +8,7 @@ export default function () {
// { type: 'index', label: '序号' },
// { prop: "createTime", label: "添加时间", filter: timeFilter },
{ prop: "code", label: "窑车号" },
{ prop: "stateDictValue", label: "状态", subcomponent: StateSelect },
// { prop: "stateDictValue", label: "状态", subcomponent: StateSelect },
// { prop: "stateDictValue", label: "状态", filter: v => (v !== null && v !== undefined) ? ['没有数据', '正常', '判废', '过渡'][v] : '-' }, // subcomponent
{ prop: "orderCode", label: "订单号" },
{ prop: "posCode", label: "位置" },
@ -28,7 +28,9 @@ export default function () {
},
];
const now = new Date().getTime();
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0, 0).getTime();
const headFormFields = [
{
input: true,
@ -58,7 +60,7 @@ export default function () {
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
},
default: { value: [now - 3600 * 24 * 7 * 1000, now] },
default: { value: [today - 24 * 7 * 1000 * 3600, today + 3600 * 24 * 1000] },
},
{
button: {
@ -81,7 +83,7 @@ export default function () {
const dialogJustFormConfigs = null;
const carPayloadDialogConfigs = {
dialogWidth: "70%",
dialogWidth: "100%",
carPayloadDialog: true,
clickModalToClose: false,
tableConfig: {
@ -94,6 +96,9 @@ export default function () {
{ width: 80, prop: "orderCate", label: "订单子号" },
{ prop: "bomCode", label: "配方" },
{ prop: "shapeCode", label: "砖型" },
{ prop: "weight", label: "重量" },
{ width: 128, prop: "gas", label: "燃气用量(m³)" },
{ width: 144, prop: "gp", label: "燃气(m³)/砖(kg)" },
{ width: 80, prop: "qty", label: "订单数量" },
{ width: 72, prop: "goodqty", label: "合格数" },
{ width: 72, prop: "badqty", label: "废砖数" },

View File

@ -27,7 +27,8 @@ export default {
// },
// },
data() {
const { tableConfig, headFormConfigs, carPayloadDialogConfigs, urls, dialogConfigs } = initConfig.call(this);
const { tableConfig, headFormConfigs, carPayloadDialogConfigs, urls, dialogConfigs } =
initConfig.call(this);
return {
carPayloadDialogConfigs,
tableConfig,
@ -39,7 +40,6 @@ export default {
};
},
activated() {
console.log("activated", this.$route.query)
this.code = this.$route.query.code || "";
this.triggerUpdateKey = Math.random().toString();
},

View File

@ -0,0 +1,144 @@
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
import request from "@/utils/request";
import { timeFilter, dictFilter } from '@/utils/filters'
import { getDictDataList } from '@/utils'
export default function () {
const tableProps = [
{ type: 'index', label: '序号' },
{ prop: "code", label: "窑车号" },
{ prop: "typeDictValue", label: "维修类别", filter: dictFilter('carMain') },
{ prop: "description", label: "维修描述" },
{ prop: "remark", label: "备注" },
{ prop: "startTime", label: "开始时间", filter: timeFilter },
{ prop: "endTime", label: "结束时间", filter: timeFilter },
// { prop: "prtTag", label: "是否打印标签", filter: val => ({ yes: '是', no: '否' })[val] ?? '-' },
{ prop: "creatorName", label: "创建人" },
// { prop: "remark", label: "创建时间" },
{ prop: "createTime", label: "创建时间", filter: timeFilter },
{
prop: "operations",
name: "操作",
fixed: "right",
width: 90,
subcomponent: TableOperaionComponent,
options: [{ name: "edit", label: "编辑", icon: "edit-outline" }, { name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "pms:carMaintain:delete" }],
},
];
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0, 0).getTime();
const headFormFields = [
{
prop: 'code',
label: "窑车号",
input: true,
default: { value: "" },
bind: {
placeholder: '请输入窑车号'
}
},
{
timerange: true,
prop: "timerange",
label: "时间段",
bind: {
placeholder: "请选择时间段",
type: "datetimerange",
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
},
default: { value: [today - 24 * 7 * 1000 * 3600, today + 3600 * 24 * 1000] },
},
{
button: {
type: "primary",
name: "查询",
},
},
{
button: {
type: "primary",
name: "新增",
permission: "pms:carMaintain:save"
},
bind: {
plain: true,
}
},
];
/**
* dialog config 有两个版本一个适用于 DialogWithMenu 组件另一个适用于 DialogJustForm 组件
* 适用于 DialogWithMenu 组件的配置示例详见 blenderStep/config.js
* 此为后者的配置:
*/
const dialogJustFormConfigs = {
form: {
rows: [
[
{
input: true,
label: "窑车号",
prop: "code",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入窑车号" },
},
{
select: true,
label: "维修类别",
prop: "typeDictValue",
options: getDictDataList('carMain').map(_ => ({ label: _.dictLabel, value: _.dictValue })),
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入维修类别" },
},
],
[
{
datetime: true,
label: "开始时间",
prop: "startTime",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请选择开始时间", type: "datetime" },
},
{
datetime: true,
label: "结束时间",
prop: "endTime",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请选择结束时间", type: "datetime" },
},
],
[{ textarea: true, label: "维修描述", prop: "description", elparams: { placeholder: "维修描述" } }],
[{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
],
operations: [
{ name: "add", label: "保存", type: "primary", permission: "pms:carMaintain:save", showOnEdit: false },
{ name: "update", label: "更新", type: "primary", permission: "pms:carMaintain:update", showOnEdit: true },
{ name: "reset", label: "重置", type: "warning", showAlways: true },
],
},
};
// 备注:弹窗弹出的时间和网速有关......
return {
dialogConfigs: dialogJustFormConfigs,
tableConfig: {
table: null, // 此处可省略el-table 上的配置项
column: tableProps, // el-column-item 上的配置项
},
headFormConfigs: {
rules: null, // 名称是由 BaseSearchForm.vue 组件固定的
fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的
},
urls: {
base: "/pms/carMaintain",
page: "/pms/carMaintain/pageView",
pageIsPostApi: true
// subase: '/pms/blenderStepParam',
// subpage: '/pms/blenderStepParam/page',
// more...
},
};
}

View File

@ -0,0 +1,35 @@
<template>
<ListViewWithHead
:table-config="tableConfig"
:head-config="headFormConfigs"
:dialog-configs="dialogConfigs" />
</template>
<script>
import initConfig from "./config";
import ListViewWithHead from "@/views/atomViews/ListViewWithHead.vue";
export default {
name: "ProductionLineView",
components: { ListViewWithHead },
provide() {
return {
urls: this.allUrls,
};
},
data() {
const { tableConfig, headFormConfigs, urls, dialogConfigs } = initConfig.call(this);
return {
tableConfig,
headFormConfigs,
allUrls: urls,
dialogConfigs,
};
},
created() {},
mounted() {},
methods: {},
};
</script>
<style scoped></style>

View File

@ -0,0 +1,261 @@
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
// import switchBtn from "@/components/noTemplateComponents/switchBtn";
// import QuillRichInput from "@/components/noTemplateComponents/richInput";
// import request from "@/utils/request";
import { timeFilter } from "@/utils/filters";
export default function () {
const tableProps = [
// 多选框
{ type: "selection", width: 60, align: "center" },
{ width: 128, prop: "createTime", label: "添加时间", filter: timeFilter },
{ width: 128, prop: "updaterName", label: "更改人" },
{ width: 128, prop: "posCode", label: "位置" },
{ width: 72, prop: "code", label: "窑车号" },
{ width: 128, prop: "orderCode", label: "订单号" },
{ width: 88, prop: "orderCate", label: "订单子号" },
{ width: 72, prop: "shapeCode", label: "砖型" },
{ width: 256, prop: "brand", label: "配方" },
{ width: 128, prop: "goodqty", label: "合格数量" },
{ width: 128, prop: "badqty", label: "报废数量" },
// { prop: "typeDictValue", label: "过渡车", filter: val => ['否', '是'][val] },
// { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent
{
width: 128,
prop: "team",
label: "班次",
filter: (val) => (val != null ? ["早班", "中班", "晚班"][val] : "-"),
},
{
width: 128,
prop: "report",
label: "报工",
filter: (val) => (val != null ? ["未报工", "已报工"][val] : "-"),
},
{ width: 128, prop: "rtime", label: "报工时间", filter: timeFilter },
{
prop: "operations",
name: "操作",
fixed: "right",
width: 90,
subcomponent: TableOperaionComponent,
options: [
{ name: "edit", label: "编辑", icon: "edit-outline", enable: (row) => row.report == 0 },
// {
// name: "delete",
// icon: "delete",
// label: "删除",
// emitFull: true,
// permission: "pms:carOrderReport:delete",
// },
],
},
];
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0, 0).getTime();
const headFormFields = [
{
prop: "orderCode",
label: "订单号",
input: true,
default: { value: "" },
bind: {
placeholder: "请输入订单号",
},
},
{
prop: "carCode",
label: "窑车号",
input: true,
default: { value: "" },
bind: {
placeholder: "请输入窑车号",
},
},
{
prop: "team",
label: "班次",
select: [
{ label: "早班", value: "0" },
{ label: "中班", value: "1" },
{ label: "晚班", value: "2" },
],
default: { value: "" },
bind: {
placeholder: "请选择班次",
},
},
{
prop: "report",
label: "报工",
select: [
{ label: "未报工", value: "0" },
{ label: "已报工", value: "1" },
],
default: { value: "0" },
bind: {
placeholder: "请选择报工状态",
},
},
{
prop: "pos",
label: "压机",
select: [
{ label: "压机1", value: "1" },
{ label: "压机2", value: "7" },
],
bind: {
placeholder: "请选择压机",
},
},
{
timerange: true,
prop: "timerange",
label: "时间段",
default: { value: [now - 3600 * 24 * 7 * 1000, now] },
bind: {
placeholder: "请选择时间段",
type: "datetimerange",
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
},
default: { value: [today - 24 * 7 * 1000 * 3600, today + 3600 * 24 * 1000] },
},
{
button: {
type: "primary",
name: "查询",
},
},
{
button: {
type: "primary",
name: "报工",
permission: "pms:carOrderReport:report",
},
bind: {
plain: true,
},
},
];
/**
* dialog config 有两个版本一个适用于 DialogWithMenu 组件另一个适用于 DialogJustForm 组件
* 适用于 DialogWithMenu 组件的配置示例详见 blenderStep/config.js
* 此为后者的配置:
*/
const dialogJustFormConfigs = {
clickModalToClose: false,
form: {
rows: [
[
{
forceDisabled: true,
label: "窑车号",
prop: "code",
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入窑车号" },
},
],
[
{
forceDisabled: true,
label: "订单号",
prop: "orderCode",
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入订单号" },
},
],
[
{
forceDisabled: true,
label: "订单子号",
prop: "orderCate",
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入订单子号" },
},
],
[
{
input: true,
label: "合格数量",
prop: "goodqty",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{
type: "number",
message: "请输入正确的数字类型",
trigger: "blur",
transform: (val) => Number(val),
},
],
elparams: { placeholder: "请输入合格数量" },
},
],
[
{
input: true,
label: "报废数量",
prop: "badqty",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{
type: "number",
message: "请输入正确的数字类型",
trigger: "blur",
transform: (val) => Number(val),
},
],
elparams: { placeholder: "请输入报废数量" },
},
],
// [
// {
// richInput: true,
// label: "描述信息",
// prop: "description",
// },
// ],
// [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
],
operations: [
{
name: "add",
label: "保存",
type: "primary",
permission: "pms:carOrderReport:save",
showOnEdit: false,
},
{
name: "update",
label: "更新",
type: "primary",
permission: "pms:carOrderReport:update",
showOnEdit: true,
},
{ name: "reset", label: "重置", type: "warning", showAlways: true },
],
},
};
return {
dialogConfigs: dialogJustFormConfigs,
tableConfig: {
table: null, // 此处可省略el-table 上的配置项
column: tableProps, // el-column-item 上的配置项
},
headFormConfigs: {
rules: null, // 名称是由 BaseSearchForm.vue 组件固定的
fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的
},
urls: {
base: "/pms/carOrderReport",
page: "/pms/carOrderReport/pageView",
pageIsPostApi: true,
reportPre: "/pms/workReport/pressReportPre",
report: "/pms/workReport/pressReport",
},
};
}

View File

@ -0,0 +1,44 @@
<template>
<ListViewWithHead
:table-config="tableConfig"
:head-config="headFormConfigs"
:dialog-configs="dialogConfigs"
:listQueryExtra="['carCode', 'orderCode', 'team', { report: 0, startTime: now[0], endTime: now[1] }]" />
</template>
<script>
import initConfig from "./config";
import ListViewWithHead from "@/views/atomViews/ListViewWithHead.vue";
import moment from "moment";
export default {
name: "CarView",
components: { ListViewWithHead },
provide() {
return {
urls: this.allUrls,
};
},
data() {
const { tableConfig, headFormConfigs, urls, dialogConfigs } = initConfig.call(this);
return {
tableConfig,
headFormConfigs,
allUrls: urls,
dialogConfigs,
};
},
computed: {
now() {
const curr = this.headFormConfigs.fields.find((item) => item.prop == "timerange").default.value;
return [
moment(curr[0]).format("YYYY-MM-DDTHH:mm:ss"),
moment(curr[1]).format("YYYY-MM-DDTHH:mm:ss"),
]
},
},
methods: {},
};
</script>
<style scoped></style>

View File

@ -87,8 +87,11 @@ export default function () {
{ width: 56, type: "index", label: "序号" },
{ prop: "orderCode", label: "订单号" },
{ width: 80, prop: "orderCate", label: "订单子号" },
{ prop: "bomCode", label: "配方" },
{ prop: "brand", label: "配方" },
{ prop: "shapeCode", label: "砖型" },
{ prop: "weight", label: "重量" },
{ width: 128, prop: "gas", label: "燃气用量(m³)" },
{ width: 144, prop: "gp", label: "燃气(m³)/砖(kg)" },
{ width: 80, prop: "qty", label: "订单数量" },
{ width: 72, prop: "goodqty", label: "合格数" },
{ width: 72, prop: "badqty", label: "废砖数" },

View File

@ -112,7 +112,7 @@ export default {
},
},
activated() {
console.log("list view with ehad activated..........", this.triggerUpdate);
//console.log("list view with ehad activated..........", this.triggerUpdate);
this.refreshLayoutKey = this.layoutTable();
},
watch: {
@ -182,7 +182,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -221,7 +221,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -291,7 +291,7 @@ export default {
// break;
// }
// case "status": {
// console.log("status", data);
// //console.log("status", data);
// // TODO:
// const { id, code } = data;
// const queryCondition = { id, code };
@ -320,7 +320,7 @@ export default {
// break;
// }
// case "to-bom-detail": {
// // console.log('to-bom-detail', data.name)
// // //console.log('to-bom-detail', data.name)
// //
// return this.$router.push({
// name: "pms-bomDetails",
@ -381,7 +381,7 @@ export default {
// });
// }
// case "preview": {
// console.log("[PREVIEW] data", data);
// //console.log("[PREVIEW] data", data);
// // report preview
// return this.$router.push({
// name: "pms-reportPreview",
@ -391,7 +391,7 @@ export default {
// });
// }
// case "design": {
// console.log("[DESIGN] data", data);
// //console.log("[DESIGN] data", data);
// // report design
// return this.$router.push({
// name: "pms-reportDesign",
@ -457,7 +457,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -500,7 +500,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
@ -539,7 +539,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

@ -66,7 +66,7 @@ export default {
},
methods: {
handleTabClick(tab) {
console.log("handle tab click", tab);
//console.log("handle tab click", tab);
if (tab > this.oldActiveTab) this.toLeft = true;
else this.toLeft = false;
switch (tab) {
@ -89,7 +89,7 @@ export default {
/** init **/
init(order, detailMode) {
console.log("init menu dialog,", order);
//console.log("init menu dialog,", order);
this.order = order;
this.detailMode = detailMode ?? false;
this.visible = true;

View File

@ -260,7 +260,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -300,14 +300,14 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
case "同步":
case "全部同步":
this.$http.post(this.urls.syncUrl).then(({ data: res }) => {
console.log("全部同步", res);
//console.log("", res);
if (res.code === 0) {
this.$message({ message: "同步成功", type: "success" });
this.getList();
@ -334,7 +334,7 @@ export default {
openDialog(row, detail) {
this.dialogVisible = true;
console.log("row detail", row, detail);
//console.log("row detail", row, detail);
let extraParams = null;
if (this.attachListQueryExtra && this.listQueryExtra.length) {
@ -344,7 +344,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row, detail);
});
},

View File

@ -66,7 +66,7 @@ export default {
},
methods: {
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
},
handleSizeChange(newSize) {
@ -89,7 +89,7 @@ export default {
...this.extraQueryFields,
};
console.log("getAlist", data, this.pageIsPost);
//console.log("getAlist", data, this.pageIsPost);
return this.$http({
url: this.urls.page ?? this.urls.base + "/page",

View File

@ -114,7 +114,7 @@ export default {
orderId: {
handler: function (val) {
if (val) {
console.log("get car list based on orderId: ", val);
//console.log("get car list based on orderId: ", val);
this.getAList(val);
}
},
@ -125,7 +125,7 @@ export default {
},
},
// activated() {
// console.log("hhh");
// //console.log("hhh");
// this.refreshLayoutKey = Math.random();
// },
methods: {
@ -218,7 +218,7 @@ export default {
},
getAList(orderId) {
console.log("geting car list, ", orderId);
//console.log("geting car list, ", orderId);
if (!orderId) orderId = this.orderId;
this.tableLoading = true;
@ -227,7 +227,7 @@ export default {
if ("list" in res.data) {
this.dataList = res.data.list;
this.totalPage = res.data.total;
} else console.log("没有res.data.list属性");
}
} else {
this.dataList.splice(0);
this.totalPage = 0;

View File

@ -7,7 +7,11 @@
<el-col :span="6">
<el-form-item label="订单状态" prop="statusDictValue" :rules="null">
<span style="display: block; margin-top: 32px">
{{ ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"][dataForm.statusDictValue] }}
{{
["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"][
dataForm.statusDictValue
]
}}
</span>
</el-form-item>
</el-col>
@ -160,7 +164,9 @@
:label="opt.label"
:value="opt.value"
style="display: flex; align-items: center">
<span style="display: inline-block; width: 128px; text-overflow: ellipsis">{{ opt.label }}</span>
<span style="display: inline-block; width: 128px; text-overflow: ellipsis">
{{ opt.label }}
</span>
<span
v-if="requestList[3].extraLabel"
style="display: inline-block; margin-left: 12px; font-size: 0.9em">
@ -375,9 +381,7 @@
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item
label="销售订单号"
prop="saleNo">
<el-form-item label="销售订单号" prop="saleNo">
<!-- :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> -->
<el-input
v-model="dataForm.saleNo"
@ -413,9 +417,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item
label="销售时间"
prop="deliveryTime">
<el-form-item label="销售时间" prop="deliveryTime">
<!-- :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> -->
<el-date-picker
v-model="dataForm.deliveryTime"
@ -456,8 +458,41 @@
<span style="display: block; margin-top: 32px">{{ dataForm.shortDesc }}</span>
</el-form-item>
</el-col>
<el-col :span="6"></el-col>
<el-col :span="6"></el-col>
<el-col :span="6">
<el-form-item
label="托盘类型"
prop="palletType"
:rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }">
<el-select
v-model="dataForm.palletType"
filterable
clearable
:disabled="mode.includes('detail')"
v-bind="{ placeholder: '选择托盘类型' }">
<el-option
v-for="pt in palletType"
:key="pt.dictValue"
:label="pt.dictLabel"
:value="pt.dictValue"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item
label="贴纸板"
prop="paperboard"
:rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }">
<el-select
v-model="dataForm.paperboard"
filterable
clearable
:disabled="mode.includes('detail')"
v-bind="{ placeholder: '选择贴纸板' }">
<el-option label="否" value="0"></el-option>
<el-option label="是" value="1"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col>
@ -477,6 +512,7 @@
<script>
import { pick as __pick } from "@/utils/filters";
import InputsArea from "./InputsArea.vue";
import { getDictDataList } from "@/utils";
export default {
name: "OrderDetailTag",
@ -526,6 +562,8 @@ export default {
customerId: null,
shortDesc: null,
remark: null,
palletType: null,
paperboard: null,
},
requestList: [
{
@ -619,6 +657,11 @@ export default {
promiseList: [],
};
},
computed: {
palletType() {
return getDictDataList("pallet_type");
},
},
methods: {
/**
* 打开弹窗后准备下拉选项数据

View File

@ -25,7 +25,7 @@ export default {
},
created() { },
mounted() {
console.log('this.order', this.order)
//console.log('this.order', this.order)
this.$nextTick(() => {
this.$refs["order-detail-tag"].init(this.order.id, this.detailMode);
});

View File

@ -100,18 +100,18 @@ export default {
filter: (val) => (val !== null && val !== undefined ? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"][val] : "-"),
},
{ prop: "qty", label: "混料总量 [kg]" },
{
prop: "operations",
name: "操作",
fixed: "right",
width: 200,
subcomponent: TableOperaionComponent,
options: [
{ name: "edit", label: "编辑", emitFull: true, icon: "edit-outline" },
{ name: "view-batch", label: "查看批次", color: "#ff8000", toRouter: "pms-blenderBatch", icon: "document-copy" }, // pms-blenderBatch
{ name: "detach", label: "下发", color: "#099", icon: "bottom-right" },
],
},
// {
// prop: "operations",
// name: "",
// fixed: "right",
// width: 200,
// subcomponent: TableOperaionComponent,
// options: [
// { name: "edit", label: "", emitFull: true, icon: "edit-outline" },
// { name: "view-batch", label: "", color: "#ff8000", toRouter: "pms-blenderBatch", icon: "document-copy" }, // pms-blenderBatch
// { name: "detach", label: "", color: "#099", icon: "bottom-right" },
// ],
// },
],
refreshLayoutKey1: "",
//
@ -127,14 +127,14 @@ export default {
{ prop: "qtyComplete", label: "完成量" },
{ prop: "goodqty", label: "合格数量" },
{ prop: "badqty", label: "不合格数量" },
{
prop: "operations",
name: "操作",
fixed: "right",
width: 200,
subcomponent: TableOperaionComponent,
options: [{ name: "detach", label: "下发", icon: "bottom-right" }], // , url: '/pms/trans/pressDeli' }]
},
// {
// prop: "operations",
// name: "",
// fixed: "right",
// width: 200,
// subcomponent: TableOperaionComponent,
// options: [{ name: "detach", label: "", icon: "bottom-right" }], // , url: '/pms/trans/pressDeli' }]
// },
],
refreshLayoutKey2: "",
//

View File

@ -88,7 +88,7 @@ export default {
hisId: this.hisId,
})
.then(({ data: res }) => {
console.log("temp dialog res", res);
//console.log("temp dialog res", res);
this.tableLoading = false;
if (res.code === 0) {
if ("list" in res.data) {

View File

@ -8,8 +8,8 @@ import { getDictDataList } from '@/utils';
export default function () {
const tableProps = [
{ width: 60, type: "index", label: "序号", fixed: true },
{ width: 120, prop: "code", label: "订单号", fixed: "left" },
{ width: 60, type: "index", label: "序号", fixed: true },
{ width: 60, prop: "cate", label: "子号" },
{ width: 100, prop: "productCode", label: "物料" },
{ width: 100, prop: "shapeCode", label: "砖型" },
@ -23,7 +23,7 @@ export default function () {
{ width: 120, prop: "planStartTime", label: "计划开始时间", filter: timeFilter },
{ width: 120, prop: "startTime", label: "开始时间", filter: timeFilter },
{ width: 120, prop: "sapParam6", label: "烧成温度" },
{ width: 120, prop: "sapParam7", label: "烧成时间(h)" },
{ width: 120, prop: "sapParam7", label: "烧成时间(min)" },
{ width: 200, prop: "packTechCode", label: "包装工艺代码" },
{ width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" },
{ width: 120, prop: "customerCode", label: "客户" },
@ -37,6 +37,7 @@ export default function () {
{ width: 200, prop: "shortDesc", label: "喷码描述" },
{ width: 120, prop: "yieldqty", label: "已生产数量" },
{ width: 120, prop: "remark", label: "备注" },
{ width: 120, prop: "description", label: "结束备注" },
// { width: 120, prop: "createTime", label: "添加时间", filter: timeFilter },
{
prop: "operations",
@ -495,7 +496,7 @@ export default function () {
},
{
input: true,
label: "烧成时间 H",
label: "烧成时间(min)",
prop: "sapParam7",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },

View File

@ -88,29 +88,6 @@ export default function () {
form: {
rows: [
[
// {
// input: true,
// label: "工艺名称",
// prop: "name",
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
// elparams: { placeholder: "请输入烧成曲线名称" },
// },
// {
// select: true,
// label: "配方",
// prop: "bomId",
// options: [],
// refreshOptionsAfterConfirm: true,
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
// elparams: { clearable: true, filterable: true, placeholder: "请选择配方" },
// fetchData: (techId = -1) => this.$http.get("/pms/bom/listUnR", { params: { wsId: 3, version: '', key: '', techId } }),
// cacheFetchedData: true,
// changeReflects: {
// fromKey: ['code', 'version'],
// delimiter: '-',
// toProp: 'code'
// }
// },
{
input: true,
autoDisabled: true,
@ -120,13 +97,6 @@ export default function () {
elparams: { placeholder: "请输入烧成曲线编码" },
},
],
// [
// {
// forceDisabled: true,
// prop: 'bomCode',
// label: '当前配方'
// },
// ],
[{ textarea: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
],
operations: [
@ -139,14 +109,9 @@ export default function () {
table: {
extraParams: ["techId", "key"],
props: [
// { type: 'index', label: '序号' },
// { prop: "createTime", label: "添加时间", filter: timeFilter },
{ prop: "name", label: "参数名称", isEditField: true },
{ prop: "code", label: "参数编码", isEditField: true },
// { prop: "specifications", label: "规格", isEditField: true },
// { prop: "code", label: "参数编码", isEditField: true },
{ width: 80, prop: "value", label: "参数值", isEditField: true },
// { prop: "valueFloor", label: "参数值下限", isEditField: true },
// { prop: "valueTop", label: "参数值上限", isEditField: true },
{ prop: "description", label: "描述", isEditField: true },
{
prop: "operations",
@ -155,7 +120,7 @@ export default function () {
width: 90,
subcomponent: TableOperaionComponent,
options: [
{ name: "edit", label: "编辑", icon: "edit-outline", permission: "pms:blenderStepParam:update" },
{ name: "edit", label: "编辑", icon: "edit-outline", permission: "pms:equipmentTechParam:update" },
// { name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "pms:blenderStepParam:delete" },
],
},
@ -176,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: "描述",
@ -200,8 +169,8 @@ export default function () {
],
],
operations: [
{ name: "add", label: "保存", type: "primary", showOnEdit: false },
{ name: "update", label: "更新", type: "primary", showOnEdit: true },
{ name: "add", label: "保存", type: "primary", showOnEdit: false, permission: 'pms:equipmentTechParam:save' },
{ name: "update", label: "更新", type: "primary", showOnEdit: true, permission: 'pms:equipmentTechParam:update' },
// { name: "update", label: "更新", type: "primary", permission: "pms:blenderStepParam:update", showOnEdit: true },
// { name: 'reset', label: '重置', type: 'warning', showAlways: true },
// { name: 'cancel', label: '取消', showAlways: true },

View File

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

View File

@ -110,7 +110,7 @@ export default {
},
},
activated() {
console.log("list view with ehad activated..........", this.triggerUpdate);
//console.log("list view with ehad activated..........", this.triggerUpdate);
this.refreshLayoutKey = this.layoutTable();
},
watch: {
@ -179,7 +179,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -218,7 +218,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -287,7 +287,7 @@ export default {
// break;
// }
// case "status": {
// console.log("status", data);
// //console.log("status", data);
// // TODO:
// const { id, code } = data;
// const queryCondition = { id, code };
@ -316,7 +316,7 @@ export default {
// break;
// }
// case "to-bom-detail": {
// // console.log('to-bom-detail', data.name)
// // //console.log('to-bom-detail', data.name)
// //
// return this.$router.push({
// name: "pms-bomDetails",
@ -377,7 +377,7 @@ export default {
// });
// }
// case "preview": {
// console.log("[PREVIEW] data", data);
// //console.log("[PREVIEW] data", data);
// // report preview
// return this.$router.push({
// name: "pms-reportPreview",
@ -387,7 +387,7 @@ export default {
// });
// }
// case "design": {
// console.log("[DESIGN] data", data);
// //console.log("[DESIGN] data", data);
// // report design
// return this.$router.push({
// name: "pms-reportDesign",
@ -453,7 +453,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -495,7 +495,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
@ -534,7 +534,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

@ -127,7 +127,7 @@ export default {
},
methods: {
handleSubEmitData(payload) {
console.log("[component] BaseListTable handleSubEmitData(): ", payload);
//console.log("[component] BaseListTable handleSubEmitData(): ", payload);
this.$emit("operate-event", payload);
},
loadSubClassFn(tree, treeNode, resolve) {

View File

@ -155,12 +155,12 @@ export default {
resetForm(excludeId = false, immediate = false) {
setTimeout(
() => {
console.log("[Dialog Just Form] clearing form...");
//console.log("[Dialog Just Form] clearing form...");
Object.keys(this.dataForm).forEach((key) => {
if (excludeId && key === "id") return;
this.dataForm[key] = null;
});
console.log("[Dialog Just Form] cleared form...", this.dataForm);
//console.log("[Dialog Just Form] cleared form...", this.dataForm);
this.$refs.dataForm.clearValidate();
this.$emit("dialog-closed"); //
},
@ -182,11 +182,11 @@ export default {
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
//console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -209,7 +209,7 @@ export default {
data: this.dataForm,
})
.then(({ data: res }) => {
console.log("[add&update] res is: ", res);
//console.log("[add&update] res is: ", res);
this.loadingStatus = false;
if (res.code === 0) {
this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");

View File

@ -201,7 +201,7 @@ export default {
},
methods: {
handleLoadSub({ tree, treeNode, resolve }) {
// console.log("tree, treeNOde, resovle is:", tree, treeNode, resolve);
// //console.log("tree, treeNOde, resovle is:", tree, treeNode, resolve);
this.$http.get(`${this.urls.tree}?rootId=${tree.id}`).then(({ data: res }) => {
if (res.code === 0 && res.data) {
resolve(
@ -246,7 +246,7 @@ export default {
},
})
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
// page :
if ("list" in res.data) {
@ -267,7 +267,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -307,7 +307,7 @@ export default {
break;
}
case "status": {
console.log("status", data);
//console.log("status", data);
// TODO:
const { id, code } = data;
const queryCondition = { id, code };
@ -346,7 +346,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();

View File

@ -12,14 +12,14 @@ export default function () {
{ width: 90, prop: "typeDictValue", label: "料仓类型", filter: dictFilter("liaocang") },
// { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent
{ width: 220, prop: "materialDescription", label: "原料" },
{ width: 128, prop: "materialName", label: "中文描述" },
{ prop: "qty", label: "料位[kg]" },
// { prop: "unitDictValue", label: "单位", filter: dictFilter('unit') },
{ width: 128, prop: "materialTypeDictValue", label: "原料类型", filter: dictFilter("material_category") },
{ width: 128, prop: "density", label: "原料堆积密度" },
{ width: 90, prop: "dosLow", label: "加料下限" },
{ width: 90, prop: "dosHigh", label: "加料上限" },
// { width: 128, prop: "density", label: "原料堆积密度" },
// { width: 90, prop: "dosLow", label: "加料下限" },
// { width: 90, prop: "dosHigh", label: "加料上限" },
{ width: 128, prop: "description", label: "描述" },
{ width: 128, prop: "materialName", label: "中文描述" },
// { prop: "remark", label: "备注" },
{ width: 128, prop: "createTime", label: "添加时间", filter: timeFilter },
{

View File

@ -2,28 +2,52 @@
<div class="storage-box" :style="{ outlineColor: color }">
<div
class="storage-title"
style="margin-bottom: 10px; padding-bottom: 12px; text-align: center; font-weight: bold; font-size: 1.125em; border-bottom: 1px solid #ccc3"
>
<span style="display: inline-block; color: white; padding: 6px 12px; border-radius: 6px 20px" :style="{ background: color }">
style="
margin-bottom: 10px;
padding-bottom: 12px;
text-align: center;
font-weight: bold;
font-size: 1.125em;
border-bottom: 1px solid #ccc3;
">
<span
style="display: inline-block; color: white; padding: 6px 12px; border-radius: 6px 20px"
:style="{ background: color }">
{{ storage }}
</span>
</div>
<div class="storage-body" style="height: 120px; display: flex">
<div class="storage-box__bg" style="height: 100%; width: 48px; margin-right: 12px; border-radius: 4px; overflow: hidden">
<div
class="storage-box__bg"
style="height: 100%; width: 48px; margin-right: 12px; border-radius: 4px; overflow: hidden">
<div
class="storage-box__inner"
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' }"
>
<span style="height: 100%; display: flex; flex-direction: column; justify-content: flex-end;">{{ computedRatio + '%' }}</span>
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',
}">
<span style="height: 100%; display: flex; flex-direction: column; justify-content: flex-end">
{{ computedRatio + "%" }}
</span>
</div>
</div>
<div style="display: flex; flex-direction: column; min-width: 128px; justify-content: space-between">
<div style="font-size: 1.125em; line-height: 2.5; text-align: right">{{ material }}</div>
<div style="font-size: 1.5em; line-height: 1.25; text-align: right; font-weight: bold">
{{ qty }} <span style="color: #777; font-weight: normal; font-size: 1rem">{{ computedUnit }}</span>
{{ qty }}
<span style="color: #777; font-weight: normal; font-size: 1rem">{{ computedUnit }}</span>
</div>
<!-- <div class="btn-group" style="text-align: right">
@ -76,12 +100,12 @@ export default {
},
computed: {
computedUnit() {
if (!this.unitValue) return "存量";
return this.unitList(this.unitValue) + " 存量";
if (!this.unitValue) return "存量[kg]";
return this.unitList(this.unitValue) + " 存量[kg]";
},
computedRatio() {
return this.ratio ? this.ratio.toFixed(2) * 100 : 0
}
return this.ratio ? this.ratio.toFixed(2) * 100 : 0;
},
},
created() {},
mounted() {},

View File

@ -15,7 +15,7 @@
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div>
</section>
<section class="container-content">
<section class="container-content" v-if="dailyStorage.length || middleStorage.length || unknownStorage.length">
<div class="dialy-storage" v-if="dailyStorage.length">
<h3
class=""
@ -38,7 +38,7 @@
:qty="st.qty ?? 0"
:storage="st.name"
color="#8899ff"
:material="st.material ?? '默认物料'"
:material="st.materialName ?? '默认物料'"
:total="2"
:unit-value="st.unitDictValue"
:ratio="st.ratio" />
@ -66,7 +66,7 @@
:qty="st.qty ?? 0"
:storage="st.name"
color="#99aa11"
:material="st.material ?? '默认物料'"
:material="st.materialName ?? '默认物料'"
:total="2"
:unit-value="st.unitDictValue"
:ratio="st.ratio" />
@ -94,13 +94,17 @@
:qty="st.qty ?? 0"
color="#3388ff"
:storage="st.name"
:material="st.material ?? '默认物料'"
:material="st.materialName ?? '默认物料'"
:total="2"
:unit-value="st.unitDictValue"
:ratio="st.ratio" />
</div>
</div>
</section>
<div v-else style="color: #ccc; letter-spacing: 1px; font-size: 18px; padding: 12px;">
无数据
</div>
</div>
</template>

View File

@ -70,7 +70,7 @@ export default {
deep: true,
},
"dataForm.description": function (val) {
console.log("here", val);
//console.log("here", val);
if (val === "batch备用服务器") {
this.loadData(0);
} else {

View File

@ -3,9 +3,9 @@
<div class="base-list-table w-full">
<el-table
:data="tableData"
:cell-style="{ padding: 0 }"
v-bind="tableConfig"
ref="base-list-table"
:cell-style="{ padding: 0 }"
:header-cell-style="/** 重写表格样式 **/ {
padding: '5px 0',
}"
@ -129,7 +129,7 @@ export default {
},
methods: {
handleSubEmitData(payload) {
// console.log("[component] BaseListTable handleSubEmitData(): ", payload);
// //console.log("[component] BaseListTable handleSubEmitData(): ", payload);
this.$emit("operate-event", payload);
},
loadSubClassFn(tree, treeNode, resolve) {

View File

@ -126,7 +126,7 @@ export default {
// TODO: ...
if (field.watch) {
// const { index: innerIdx, condition } = field.watch;
// console.log("=====field.watch=====", innerIdx, this.searchForm[innerIdx], this.headConfig.fields[innerIdx].default);
// //console.log("=====field.watch=====", innerIdx, this.searchForm[innerIdx], this.headConfig.fields[innerIdx].default);
// //
// this.$watch(
// () => this.searchForm[innerIdx],
@ -136,19 +136,19 @@ export default {
// // queryParams
// // })
// this.$http(field.url, queryParams).then((res) => {
// console.log("[==>] !!!", queryParams, res);
// //console.log("[==>] !!!", queryParams, res);
// // index
// this.searchForm[index] = Math.floor(Math.random() * 10);
// });
// }
// );
// console.log("[BaseSearchForm] mounted(): ", this.searchForm);
// //console.log("[BaseSearchForm] mounted(): ", this.searchForm);
// //
// if (this.searchForm[innerIdx]) {
// // TODO: ...
// console.log("TODO: ...");
// //console.log("TODO: ...");
// } else {
// console.log("TODO: ...");
// //console.log("TODO: ...");
// }
}
});

View File

@ -80,7 +80,7 @@ export default {
methods: {
init(id) {
this.visible = true;
console.log("[BatchDialog--detail] init", id);
//console.log("[BatchDialog--detail] init", id);
this.batchId = id;
this.getBatchDetailList();
},
@ -98,7 +98,7 @@ export default {
batchId: this.batchId,
},
});
console.log("[BatchDialog] getBatchList", data);
//console.log("[BatchDialog] getBatchList", data);
if (code == 0) {
this.dataList = data.list;
this.total = data.total;

View File

@ -91,7 +91,7 @@ export default {
data: { code, data, msg },
} = await this.$http.get("/pms/blenderBatch/" + batchId);
if (code == 0) {
console.log("[BatchDialog] getBatch", data);
//console.log("[BatchDialog] getBatch", data);
this.$set(this.dataForm, "id", data.id);
this.$set(this.dataForm, "batchSize", data.batchSize);
} else {

View File

@ -148,7 +148,7 @@ export default {
methods: {
init(id) {
this.visible = true;
console.log("[BatchDialog] init", id);
//console.log("[BatchDialog] init", id);
this.blenderOrderId = id;
this.getBatchList();
},
@ -166,7 +166,7 @@ export default {
blenderOrderId: this.blenderOrderId,
},
});
console.log("[BatchDialog] getBatchList", data);
//console.log("[BatchDialog] getBatchList", data);
if (code == 0) {
this.dataList = data.list;
this.total = data.total;
@ -185,7 +185,7 @@ export default {
},
handleOperate({ type, data }) {
console.log("[BatchDialog] handleOperate", type, data);
//console.log("[BatchDialog] handleOperate", type, data);
switch (type) {
case "create":
this.editDialogVisible = true;

View File

@ -165,7 +165,7 @@ export default {
else if (col.fetchTreeData) {
// parentId 0
col.fetchTreeData().then(({ data: res }) => {
// console.log("[DialogJustForm fetchTreeData -->]", res.data);
// //console.log("[DialogJustForm fetchTreeData -->]", res.data);
if (res.code === 0 && res.data) {
if ("list" in res.data) {
this.$set(col, "options", res.data.list);
@ -198,7 +198,7 @@ export default {
row.forEach((col) => {
if (!col.prop) return;
if ("injectTo" in col && Array.isArray(col.injectTo)) {
// console.log("watching options ..... ", col);
// //console.log("watching options ..... ", col);
col.injectTo.map((item) => {
const unwatch = this.$watch(
() => this.dataForm[col.prop],
@ -264,7 +264,7 @@ export default {
if (excludeId && key === "id") return;
this.dataForm[key] = null;
});
// console.log("[DialogJustForm resetForm()] clearing form...");
// //console.log("[DialogJustForm resetForm()] clearing form...");
this.$refs.dataForm.clearValidate();
this.$emit("dialog-closed"); //
this.watchList.map((unwatch) => unwatch());
@ -277,9 +277,9 @@ export default {
/** init **/
init(id, detailMode) {
this.visible = true;
// console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
// //console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
if (this.$refs.dataForm) {
// console.log("[DialogJustForm] clearing form validation...");
// //console.log("[DialogJustForm] clearing form validation...");
// dialog dataForm [0]
this.$refs.dataForm.clearValidate();
}
@ -306,7 +306,7 @@ export default {
url: file.fileUrl,
}));
}
// console.log("[DialogJustForm] init():", this.dataForm);
// //console.log("[DialogJustForm] init():", this.dataForm);
} else {
this.$message({
message: `${res.code}: ${res.msg}`,
@ -333,22 +333,22 @@ export default {
/** handlers */
handleSelectChange(col, eventValue) {
// console.log("[dialog] select change: ", col, eventValue);
// //console.log("[dialog] select change: ", col, eventValue);
this.$forceUpdate();
},
handleSwitchChange(val) {
// console.log("[dialog] switch change: ", val, this.dataForm);
// //console.log("[dialog] switch change: ", val, this.dataForm);
},
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
// console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
// //console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
addOrUpdate(method = "POST") {
if ("parentId" in this.dataForm) {
// console.log("[DialogJustForm parentId]", this.dataForm.parentId);
// //console.log("[DialogJustForm parentId]", this.dataForm.parentId);
// parentId cascader ["xxx"]xxx
const lastItem = this.dataForm.parentId.length - 1;
this.dataForm.parentId = this.dataForm.parentId[lastItem];
@ -400,7 +400,7 @@ export default {
// Object.getOwnPropertyNames(this.dataForm).forEach((prop) => {
// if (/.*?Time/.test(prop)) {
// console.log("HTTP prop", prop, this.dataForm[prop]);
// //console.log("HTTP prop", prop, this.dataForm[prop]);
// }
// });
@ -413,7 +413,7 @@ export default {
data: httpPayload,
})
.then(({ data: res }) => {
// console.log("[add&update] res is: ", res);
// //console.log("[add&update] res is: ", res);
this.loadingStatus = false;
if (res.code === 0) {
this.$message.success(method === "POST" ? "添加成功" : "更新成功");
@ -438,7 +438,7 @@ export default {
},
handleBtnClick(payload) {
// console.log("btn click payload: ", payload);
// //console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -454,12 +454,12 @@ export default {
break;
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] ! name");
}
},
handleUploadChange(file, fileList) {
// console.log("[Upload] handleUploadChange...", file, fileList);
// //console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {

View File

@ -110,7 +110,7 @@ export default {
},
handleSuccess(response, file, fileList) {
// console.log("success response", response);
// //console.log("success response", response);
if ("code" in response && response.code === 500) {
this.$message({
@ -141,7 +141,7 @@ export default {
},
handleError(err, file, fileList) {
console.log("err", err);
//console.log("err", err);
},
handleBtnClick(payload) {
@ -174,7 +174,7 @@ export default {
},
handleUploadChange(file, fileList) {
// console.log("[Upload] handleUploadChange...", file, fileList);
// //console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {

View File

@ -66,7 +66,7 @@ export default {
},
methods: {
handleTabClick(tab) {
console.log("handle tab click", tab);
//console.log("handle tab click", tab);
if (tab > this.oldActiveTab) this.toLeft = true;
else this.toLeft = false;
switch (tab) {
@ -89,7 +89,7 @@ export default {
/** init **/
init(order, detailMode) {
console.log("init menu dialog,", order);
//console.log("init menu dialog,", order);
this.order = order;
this.detailMode = detailMode ?? false;
this.visible = true;

View File

@ -156,7 +156,7 @@ export default {
if ("list" in res.data) {
this.dataList = res.data.list;
this.totalPage = res.data.total;
} else console.log("没有res.data.list属性");
}
} else {
this.dataList.splice(0);
this.totalPage = 0;
@ -183,7 +183,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -211,7 +211,9 @@ export default {
type: "success",
duration: 2000,
onClose: () => {
this.getAList(Object.assign({}, this.listQuery, this.extraSearchConditions, this.params));
this.getAList(
Object.assign({}, this.listQuery, this.extraSearchConditions, this.params)
);
this.$emit("refresh-tables", ["ongoing"]);
},
});
@ -221,7 +223,7 @@ export default {
}
})
.catch((errMsg) => {
console.log("ere...");
//console.log("ere...");
this.$message({
message: errMsg,
type: "error",
@ -234,6 +236,60 @@ export default {
case "destroy-order":
//
case "end-order": {
this.$prompt("确认结束请输入结束备注", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
})
.then(({ value }) => {
return value;
})
.catch(() => {
this.$message({
type: "info",
message: "取消输入",
});
return Promise.reject();
})
.then((value) => {
return this.$http({
method: "post",
url: "/pms/order/end",
headers: {
"Content-Type": "application/json",
},
data: {
id: data,
description: value,
},
});
})
.then(({ data: res }) => {
if (res.code === 0) {
// success
this.$message({
message: "已结束订单!",
type: "success",
duration: 2000,
onClose: () => {
this.getAList(
Object.assign({}, this.listQuery, this.extraSearchConditions, this.params)
);
this.$emit("refresh-tables", ["finished"]);
},
});
} else {
// failed
throw new Error(res.msg);
}
})
.catch((err) => {
this.$message({
type: "error",
message: err,
});
});
return;
this.$confirm(`确定${type === "end-order" ? "结束订单" : "废除订单"}?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -254,7 +310,9 @@ export default {
type: "success",
duration: 2000,
onClose: () => {
this.getAList(Object.assign({}, this.listQuery, this.extraSearchConditions, this.params));
this.getAList(
Object.assign({}, this.listQuery, this.extraSearchConditions, this.params)
);
this.$emit("refresh-tables", ["finished"]);
},
});
@ -340,13 +398,29 @@ export default {
this.openDialog(data); /** data is ==> id */
break;
}
case "copy": {
this.$http({
url: "/pms/order/copy",
method: "post",
headers: {
"Content-Type": "application/json",
},
data,
}).then(({ data: res }) => {
if (res.code === 0) {
this.$message.success("复制成功!");
this.getAList(Object.assign({}, this.listQuery, this.extraSearchConditions, this.params));
}
});
break;
}
case "view":
case "view-detail-action": {
this.openDialog(data, true);
break;
}
case "view-ongoing": {
console.log("view-ongoing", data);
//console.log("view-ongoing", data);
this.openMenuDialog(data, false);
break;
}
@ -358,12 +432,12 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("SearchForm", btnName, payload);
//console.log("SearchForm", btnName, payload);
switch (btnName) {
case "查询": {
this.params = Object.assign({}, payload);
console.log("this.params", this.params);
//console.log("this.params", this.params);
if ("timerange" in payload) {
//
if (!!payload.timerange) {
@ -384,6 +458,57 @@ export default {
this.showUploadDialog(payload);
// alert('/pms/order/importExcelOrder');
break;
case "导出订单":
this.$confirm(`确定要导出订单吗?`, "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
})
.then(() => {
this.overlayVisible = true;
console.log("导出: ", payload);
return this.$http({
url: "/pms/order/export",
method: "post",
headers: {
"Content-Type": "application/json",
},
responseType: "blob",
});
})
.then(({ data: res }) => {
const blob = new Blob([res]);
/** 通知 */
this.$notify({
title: "成功",
message: "开始下载",
type: "success",
duration: 1200,
});
const fileName = "订单导出.xlsx";
if ("download" in document.createElement("a")) {
const alink = document.createElement("a");
alink.download = fileName;
alink.style.display = "none";
alink.target = "_blank";
alink.href = URL.createObjectURL(blob);
document.body.appendChild(alink);
alink.click();
URL.revokeObjectURL(alink.href);
document.body.removeChild(alink);
} else {
navigator.msSaveBlob(blob, fileName);
}
this.overlayVisible = false;
})
.catch((err) => {
this.$message.error("导出出错!");
this.overlayVisible = false;
});
break;
case "压制工艺":
//
this.$router.push({ name: "pms-shapeStep" });
@ -421,7 +546,7 @@ export default {
this.renderDialog = true;
this.$nextTick(() => {
// console.log("init dialog", row_id, detail_mode);
// //console.log("init dialog", row_id, detail_mode);
this.$refs["order-dialog"].init(/** some args... */ row_id, detail_mode);
});
},

View File

@ -148,7 +148,7 @@ export default {
watch: {
$route: function (route) {
if (route.hash) {
console.log("acitive hash", route.hash);
//console.log("acitive hash", route.hash);
this.activeTable = route.hash;
}
},
@ -269,7 +269,7 @@ export default {
inject: ["urls"],
mounted() {
this.getSpecificList("ongoing", this.conditions.ongoing);
console.log("[list view with head]", this.headConfigs);
//console.log("[list view with head]", this.headConfigs);
},
activated() {
this.refreshLayoutKey = this.layoutTable();
@ -296,7 +296,7 @@ export default {
if ("list" in res.data) {
this.dataLists[type] = res.data.list;
this.totalPage[type] = res.data.total;
} else console.log("没有res.data.list属性");
}
} else {
this.dataLists[type].splice(0);
this.totalPage[type] = 0;
@ -339,7 +339,7 @@ export default {
},
})
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
// page :
if ("list" in res.data) {
@ -360,7 +360,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -404,7 +404,7 @@ export default {
break;
}
case "status": {
console.log("status", data);
//console.log("status", data);
// TODO:
const { id, code } = data;
const queryCondition = { id, code };
@ -448,13 +448,13 @@ export default {
}
delete params.timerange;
}
console.log("[search form btn click]", Object.assign({}, this.conditions.ongoing, params));
//console.log("[search form btn click]", Object.assign({}, this.conditions.ongoing, params));
//
this.getSpecificList("ongoing", Object.assign({}, this.conditions.ongoing, params));
}
}
case "pending":
console.log("[search form btn click]", type, btnName, payload);
//console.log("[search form btn click]", type, btnName, payload);
if (btnName === "压制工艺") {
//
alert("跳转至压制工艺页面");
@ -470,7 +470,7 @@ export default {
case "finished":
break;
}
// console.log("[search] form handleBtnClick", type, btnName, payload);
// //console.log("[search] form handleBtnClick", type, btnName, payload);
// switch (btnName) {
// case "":
// this.openDialog();

View File

@ -85,7 +85,7 @@ export default {
},
methods: {
handleOperate({ type, data: id }) {
console.log("payload", type, id);
//console.log("payload", type, id);
switch (type) {
case "blender-edit":
this.blenderOrderEditVisible = true;
@ -108,7 +108,7 @@ export default {
type: "warning",
})
.then(() => {
console.log("here");
//console.log("here");
this.$http
.post(this.urls.detach, id /* { id: data } */, { headers: { "Content-Type": "application/json" } })
.then(({ data: res }) => {
@ -159,7 +159,7 @@ export default {
...this.extraQueryFields,
};
console.log("getAlist", data, this.pageIsPost);
//console.log("getAlist", data, this.pageIsPost);
return this.$http({
url: this.urls.page ?? this.urls.base + "/page",

Some files were not shown because too many files have changed in this diff Show More