Merge branch 'docs_0727'

This commit is contained in:
lb 2023-08-09 14:12:46 +08:00
commit e3346be048
29 changed files with 678 additions and 237 deletions

View File

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

View File

@ -78,6 +78,14 @@
<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] || "无描述" }} {{ opt[col.customLabel] || "无描述" }}
</span> </span>
<template v-if="col.customLabels">
<span
v-for="(label, idx) in col.customLabels"
:key="Math.random()"
style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
{{ opt[label] || " - " }}
</span>
</template>
</el-option> </el-option>
</el-select> </el-select>
<el-switch <el-switch
@ -248,34 +256,38 @@ export default {
const promiseHistory = {}; const promiseHistory = {};
const getData = (col, param) => { 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 }) => { promiseHistory[col.prop] = col.fetchData(param).then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
if ("list" in res.data) { if ("list" in res.data) {
console.log( let options = [];
"SdASD ", if (col.customLabel) {
res.data.list.map((i) => ({ options = res.data.list.map((i) => ({
label: col.optionLabel ? i[col.optionLabel] : i.name, label: col.optionLabel ? i[col.optionLabel] : i.name,
value: col.optionValue ? i[col.optionValue] : i.id, value: col.optionValue ? i[col.optionValue] : i.id,
[col.customLabel]: i[col.customLabel], [col.customLabel]: i[col.customLabel],
})) }));
); } else if (col.customLabels) {
options = res.data.list.map((i) => {
let extraOptions = {};
col.customLabels.forEach((label) => {
extraOptions[label] = i[label];
});
return {
label: col.optionLabel ? i[col.optionLabel] : i.name,
value: col.optionValue ? i[col.optionValue] : i.id,
...extraOptions,
};
});
} else {
options = res.data.list.map((i) => ({
label: col.optionLabel ? i[col.optionLabel] : i.name,
value: col.optionValue ? i[col.optionValue] : i.id,
}));
}
// options // options
this.$set( this.$set(col, "options", options);
col,
"options",
col.customLabel
? 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],
}))
: res.data.list.map((i) => ({
label: col.optionLabel ? i[col.optionLabel] : i.name,
value: col.optionValue ? i[col.optionValue] : i.id,
}))
);
// //
if ("injectTo" in col || col.cached) { if ("injectTo" in col || col.cached) {

View File

@ -279,12 +279,12 @@ export default {
}, },
handleSwitchChange(val) { handleSwitchChange(val) {
console.log("[dialog] switch change: ", val, this.dataForm); // console.log("[dialog] switch change: ", val, this.dataForm);
}, },
handleComponentModelUpdate(propName, { subject, payload: { data } }) { handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data); this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]); // console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
}, },
addOrUpdate(method = "POST") { addOrUpdate(method = "POST") {

View File

@ -305,7 +305,13 @@ export default function () {
return { return {
dialogConfigs, dialogConfigs,
tableConfig: { 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 上的配置项 column: tableProps, // el-column-item 上的配置项
}, },
headFormConfigs: { headFormConfigs: {

View File

@ -1,5 +1,6 @@
<template> <template>
<ListViewWithHead <ListViewWithHead
class="highlight-cell"
key="blender-order" key="blender-order"
:table-config="tableConfig" :table-config="tableConfig"
:head-config="headFormConfigs" :head-config="headFormConfigs"
@ -34,4 +35,11 @@ export default {
}; };
</script> </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

@ -220,8 +220,11 @@ export default {
}).then(() => { }).then(() => {
this.overlayVisible = true; this.overlayVisible = true;
return this.$http 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 }) => { .then(({ data: res }) => {
this.overlayVisible = false;
if (res.code === 0) { if (res.code === 0) {
this.$message({ this.$message({
message: `下发成功`, message: `下发成功`,
@ -238,7 +241,6 @@ export default {
duration: 1500, duration: 1500,
}); });
} }
this.overlayVisible = false;
}); });
}); });
} }
@ -329,7 +331,9 @@ export default {
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
this.$message({ this.$message({
message: `${type === "detach" ? "下发" : type === "pause-blender" ? "暂停" : "开始"}成功`, message: `${
type === "detach" ? "下发" : type === "pause-blender" ? "暂停" : "开始"
}成功`,
type: "success", type: "success",
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {

View File

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

View File

@ -1,12 +1,12 @@
<template> <template>
<ListViewWithHead <ListViewWithHead
class="highlight-cell"
key="blender-order" key="blender-order"
:table-config="tableConfig" :table-config="tableConfig"
:press-table-config="pressTableConfig" :press-table-config="pressTableConfig"
:head-config="headFormConfigs" :head-config="headFormConfigs"
:dialog-configs="dialogConfigs" :dialog-configs="dialogConfigs"
:list-query-extra="[]" :list-query-extra="[]" />
/>
</template> </template>
<script> <script>
@ -37,4 +37,11 @@ export default {
}; };
</script> </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

@ -12,9 +12,9 @@ export default function () {
{ prop: "name", label: "牌号" }, { prop: "name", label: "牌号" },
{ prop: "syncTime", label: "同步时间", filter: timeFilter }, { prop: "syncTime", label: "同步时间", filter: timeFilter },
{ width: 120, prop: "techCode", label: "烧制曲线", subcomponent: techBox }, { width: 120, prop: "techCode", label: "烧制曲线", subcomponent: techBox },
{ prop: "upweight", label: "建议混料上限" }, { width: 110, prop: "upweight", label: "建议混料上限" },
{ prop: "downweight", label: "建议混料下限" }, { width: 110, prop: "downweight", label: "建议混料下限" },
// { prop: "externalCode", label: "版本号" }, { prop: "shortDesc", label: "喷码描述" },
// { prop: "specifications", label: "程序号" }, // { prop: "specifications", label: "程序号" },
// { prop: "unitDictValue", label: "砖型", filter: dictFilter("unit") }, // { prop: "unitDictValue", label: "砖型", filter: dictFilter("unit") },
// { prop: "unitDictValue", label: "物料号", filter: dictFilter("unit") }, // { prop: "unitDictValue", label: "物料号", filter: dictFilter("unit") },
@ -256,7 +256,7 @@ export default function () {
rows: [ rows: [
[ [
{ {
input: true, forceDisabled: true,
label: "配方号", label: "配方号",
prop: "code", prop: "code",
rules: { required: true, message: "必填项不能为空", trigger: "blur" }, rules: { required: true, message: "必填项不能为空", trigger: "blur" },
@ -264,7 +264,7 @@ export default function () {
elparams: { disabled: true }, elparams: { disabled: true },
}, },
{ {
input: true, forceDisabled: true,
label: "牌号", label: "牌号",
prop: "name", prop: "name",
rules: { required: true, message: "必填项不能为空", trigger: "blur" }, rules: { required: true, message: "必填项不能为空", trigger: "blur" },
@ -286,7 +286,17 @@ export default function () {
rules: [{ type: "number", trigger: "blur", message: "请输入数字类型", transform: (val) => Number(val) }], rules: [{ type: "number", trigger: "blur", message: "请输入数字类型", transform: (val) => Number(val) }],
elparams: { placeholder: "请输入建议混料上限" }, elparams: { placeholder: "请输入建议混料上限" },
}, },
] ],
[
{
input: true,
label: "喷码描述",
prop: "shortDesc",
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
// elparams: { disabled: true },
},
null
],
], ],
operations: [ operations: [
{ name: "add-bom", label: "保存", type: "primary", permission: "", showOnEdit: false }, { name: "add-bom", label: "保存", type: "primary", permission: "", showOnEdit: false },

View File

@ -37,8 +37,8 @@ export default function () {
{ prop: "name", label: "牌号" }, { prop: "name", label: "牌号" },
{ prop: "version", label: "版本" }, { prop: "version", label: "版本" },
{ prop: "sumqty", label: "总重量" }, { prop: "sumqty", label: "总重量" },
{ prop: "description", label: "物料销售文本" }, // { prop: "description", label: "物料销售文本" },
{ width: 150, prop: "shortDesc", label: "物料销售文本短描述" }, // { width: 150, prop: "shortDesc", label: "物料销售文本短描述" },
{ prop: "remark", label: "备注" }, { prop: "remark", label: "备注" },
{ prop: "createTime", label: "添加时间", filter: timeFilter }, { prop: "createTime", label: "添加时间", filter: timeFilter },
{ {

View File

@ -60,6 +60,7 @@ export default function () {
} }
}; };
const now = new Date().getTime();
const headFormFields = [ const headFormFields = [
{ {
prop: "material", prop: "material",
@ -95,6 +96,7 @@ export default function () {
"start-placeholder": "开始时间", "start-placeholder": "开始时间",
"end-placeholder": "结束时间", "end-placeholder": "结束时间",
}, },
default: { value: [now - 3600 * 24 * 7 * 1000, now] },
}, },
{ {
button: { button: {

View File

@ -60,6 +60,7 @@ export default function () {
} }
}; };
const now = new Date().getTime();
const headFormFields = [ const headFormFields = [
{ {
prop: "material", prop: "material",
@ -95,6 +96,7 @@ export default function () {
"start-placeholder": "开始时间", "start-placeholder": "开始时间",
"end-placeholder": "结束时间", "end-placeholder": "结束时间",
}, },
default: { value: [now - 3600 * 24 * 7 * 1000, now] },
}, },
{ {
button: { button: {

View File

@ -1,7 +1,7 @@
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
import StateSelect from '@/components/StateSelect.vue'; import StateSelect from "@/components/StateSelect.vue";
import request from "@/utils/request"; import request from "@/utils/request";
import { timeFilter } from '@/utils/filters' import { timeFilter } from "@/utils/filters";
export default function () { export default function () {
const tableProps = [ const tableProps = [
@ -21,31 +21,32 @@ export default function () {
width: 180, width: 180,
subcomponent: TableOperaionComponent, subcomponent: TableOperaionComponent,
options: [ options: [
{ name: "temperature", label: "烧制温度", }, { name: "temperature", label: "烧制温度" },
{ name: "to-car-payload", label: "装载详情", icon: 'document' }, { name: "to-car-payload", label: "装载详情", icon: "document" },
{ name: "delete", label: "删除", icon: 'delete', emitFull: true, promptField: 'code' } { name: "delete", label: "删除", icon: "delete", emitFull: true, promptField: "code" },
], ],
}, },
]; ];
const now = new Date().getTime();
const headFormFields = [ const headFormFields = [
{ {
input: true, input: true,
prop: 'code', prop: "code",
label: "窑车号", label: "窑车号",
default: { value: "" }, default: { value: "" },
bind: { bind: {
placeholder: '请输入窑车号' placeholder: "请输入窑车号",
} },
}, },
{ {
input: true, input: true,
prop: 'orderCode', prop: "orderCode",
label: "订单号", label: "订单号",
default: { value: "" }, default: { value: "" },
bind: { bind: {
placeholder: '请输入订单号' placeholder: "请输入订单号",
} },
}, },
{ {
timerange: true, timerange: true,
@ -57,6 +58,7 @@ export default function () {
"start-placeholder": "开始时间", "start-placeholder": "开始时间",
"end-placeholder": "结束时间", "end-placeholder": "结束时间",
}, },
default: { value: [now - 3600 * 24 * 7 * 1000, now] },
}, },
{ {
button: { button: {
@ -79,7 +81,7 @@ export default function () {
const dialogJustFormConfigs = null; const dialogJustFormConfigs = null;
const carPayloadDialogConfigs = { const carPayloadDialogConfigs = {
dialogWidth: '70%', dialogWidth: "70%",
carPayloadDialog: true, carPayloadDialog: true,
clickModalToClose: false, clickModalToClose: false,
tableConfig: { tableConfig: {
@ -102,7 +104,6 @@ export default function () {
}, },
}; };
return { return {
carPayloadDialogConfigs, carPayloadDialogConfigs,
dialogConfigs: dialogJustFormConfigs, dialogConfigs: dialogJustFormConfigs,
@ -117,7 +118,7 @@ export default function () {
urls: { urls: {
base: "/pms/carHandle", base: "/pms/carHandle",
page: "/pms/carHandle/pageHis", page: "/pms/carHandle/pageHis",
pageIsPostApi: true pageIsPostApi: true,
// subase: '/pms/blenderStepParam', // subase: '/pms/blenderStepParam',
// subpage: '/pms/blenderStepParam/page', // subpage: '/pms/blenderStepParam/page',
// more... // more...

View File

@ -266,7 +266,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <!-- <el-form-item
label="烧成温度" label="烧成温度"
prop="sapParam6" prop="sapParam6"
:rules="[ :rules="[
@ -282,10 +282,10 @@
v-model="dataForm.sapParam6" v-model="dataForm.sapParam6"
:disabled="mode.includes('detail')" :disabled="mode.includes('detail')"
v-bind="{ placeholder: '输入烧成温度' }"></el-input> v-bind="{ placeholder: '输入烧成温度' }"></el-input>
</el-form-item> </el-form-item> -->
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <!-- <el-form-item
label="烧成时间 H" label="烧成时间 H"
prop="sapParam7" prop="sapParam7"
:rules="[ :rules="[
@ -301,7 +301,7 @@
v-model="dataForm.sapParam7" v-model="dataForm.sapParam7"
:disabled="mode.includes('detail')" :disabled="mode.includes('detail')"
v-bind="{ placeholder: '输入烧成时间' }"></el-input> v-bind="{ placeholder: '输入烧成时间' }"></el-input>
</el-form-item> </el-form-item> -->
</el-col> </el-col>
</el-row> </el-row>
</InputsArea> </InputsArea>
@ -377,8 +377,8 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item
label="销售订单号" label="销售订单号"
prop="saleNo" prop="saleNo">
:rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> <!-- :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> -->
<el-input <el-input
v-model="dataForm.saleNo" v-model="dataForm.saleNo"
:disabled="mode.includes('detail')" :disabled="mode.includes('detail')"
@ -398,7 +398,7 @@
label="销售订单砖数" label="销售订单砖数"
prop="soqty" prop="soqty"
:rules="[ :rules="[
{ required: true, message: '必填项不能为空', trigger: 'blur' }, // { required: true, message: '', trigger: 'blur' },
{ {
type: 'number', type: 'number',
message: '输入正确的数字类型', message: '输入正确的数字类型',
@ -415,8 +415,8 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item
label="销售时间" label="销售时间"
prop="deliveryTime" prop="deliveryTime">
:rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> <!-- :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> -->
<el-date-picker <el-date-picker
v-model="dataForm.deliveryTime" v-model="dataForm.deliveryTime"
:disabled="mode.includes('detail')" :disabled="mode.includes('detail')"
@ -452,7 +452,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="物料号销售文本" prop="shortDesc" :rules="null"> <el-form-item label="喷码描述" prop="shortDesc" :rules="null">
<span style="display: block; margin-top: 32px">{{ dataForm.shortDesc }}</span> <span style="display: block; margin-top: 32px">{{ dataForm.shortDesc }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -11,33 +11,33 @@ export default function () {
{ width: 60, type: "index", label: "序号", fixed: true }, { width: 60, type: "index", label: "序号", fixed: true },
{ width: 120, prop: "code", label: "订单号", fixed: "left" }, { width: 120, prop: "code", label: "订单号", fixed: "left" },
{ width: 60, prop: "cate", label: "子号" }, { width: 60, prop: "cate", label: "子号" },
{ width: 60, prop: "statusDictValue", label: "状态", filter: dictFilter("order_status") },
{ width: 120, prop: "planStartTime", label: "计划开始时间", filter: timeFilter },
{ width: 120, prop: "startTime", label: "开始时间", filter: timeFilter },
{ width: 60, prop: "prodqty", label: "数量" },
{ width: 100, prop: "productCode", label: "物料" }, { width: 100, prop: "productCode", label: "物料" },
{ width: 100, prop: "shapeCode", label: "砖型" }, { width: 100, prop: "shapeCode", label: "砖型" },
{ width: 120, prop: "brand", label: "牌号" }, { width: 160, prop: "brand", label: "牌号" },
{ width: 60, prop: "ai", label: "版本" },
{ width: 65, prop: "sapParam1", label: "addon" },
{ width: 200, prop: "shortDesc", label: "物料号销售文本" },
{ width: 100, prop: "bomCode", label: "配方编码" }, { width: 100, prop: "bomCode", label: "配方编码" },
{ width: 80, prop: "pressCode", label: "压机号" }, { width: 60, prop: "ai", label: "版本" },
{ width: 60, prop: "prodqty", label: "数量" },
{ width: 80, prop: "blenderCode", label: "混料机号" }, { width: 80, prop: "blenderCode", label: "混料机号" },
{ width: 80, prop: "pressCode", label: "压机号" },
{ width: 80, prop: "kilnCode", label: "隧道窑号" }, { width: 80, prop: "kilnCode", label: "隧道窑号" },
{ width: 120, prop: "planStartTime", label: "计划开始时间", filter: timeFilter },
{ width: 120, prop: "startTime", label: "开始时间", filter: timeFilter },
{ width: 120, prop: "sapParam6", label: "烧成温度" }, { width: 120, prop: "sapParam6", label: "烧成温度" },
{ width: 120, prop: "sapParam7", label: "烧成时间(h)" }, { width: 120, prop: "sapParam7", label: "烧成时间(h)" },
{ width: 120, prop: "yieldqty", label: "已生产数量" }, { width: 200, prop: "packTechCode", label: "包装工艺代码" },
{ width: 120, prop: "soqty", label: "销售订单数" }, { width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" },
{ width: 120, prop: "customerCode", label: "客户" },
{ width: 120, prop: "specifications", label: "生产订单类型" },
{ width: 60, prop: "statusDictValue", label: "状态", filter: dictFilter("order_status") },
{ width: 200, prop: "saleNo", label: "销售订单号" }, { width: 200, prop: "saleNo", label: "销售订单号" },
{ width: 200, prop: "saleOrderItem", label: "销售订单item号" }, { width: 200, prop: "saleOrderItem", label: "销售订单item号" },
{ width: 200, prop: "packTechCode", label: "包装工艺代码" }, { width: 120, prop: "soqty", label: "销售订单数" },
{ width: 120, prop: "specifications", label: "生产订单类型" },
{ width: 120, prop: "deliveryTime", label: "销售时间", filter: timeFilter }, { width: 120, prop: "deliveryTime", label: "销售时间", filter: timeFilter },
{ width: 120, prop: "customerCode", label: "客户" }, { width: 65, prop: "sapParam1", label: "addon" },
{ width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" }, { width: 200, prop: "shortDesc", label: "喷码描述" },
{ width: 120, prop: "yieldqty", label: "已生产数量" },
{ width: 120, prop: "remark", label: "备注" }, { width: 120, prop: "remark", label: "备注" },
{ width: 120, prop: "createTime", label: "添加时间", filter: timeFilter }, // { width: 120, prop: "createTime", label: "添加时间", filter: timeFilter },
{ {
prop: "operations", prop: "operations",
name: "操作", name: "操作",

View File

@ -4,11 +4,11 @@ import { timeFilter } from "@/utils/filters";
export default function () { export default function () {
const tableProps = [ const tableProps = [
{ type: "index", label: "序号" }, { type: "index", label: "序号" },
{ prop: "name", label: "名称" },
{ prop: "code", label: "编码" }, { prop: "code", label: "编码" },
// { prop: "enName", label: "英文名称" }, // { prop: "enName", label: "英文名称" },
// { prop: "enAb", label: "缩写" }, // { prop: "enAb", label: "缩写" },
{ prop: "description", label: "描述" }, { prop: "description", label: "描述" },
{ prop: "name", label: "名称" },
{ prop: "remark", label: "备注" }, { prop: "remark", label: "备注" },
{ prop: "createTime", label: "添加时间", filter: timeFilter }, { prop: "createTime", label: "添加时间", filter: timeFilter },
{ {

View File

@ -7,20 +7,21 @@ import { timeFilter } from "@/utils/filters";
export default function () { export default function () {
const tableProps = [ const tableProps = [
{ type: "index", label: "序号" }, { type: "index", label: "序号" },
{ prop: "name", label: "料仓名称" }, { width: 90, prop: "name", label: "料仓名称" },
{ prop: "code", label: "料仓编码" }, { width: 90, prop: "code", label: "料仓编码" },
{ prop: "typeDictValue", label: "料仓类型", filter: dictFilter("liaocang") }, { width: 90, prop: "typeDictValue", label: "料仓类型", filter: dictFilter("liaocang") },
// { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent // { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent
{ prop: "materialDescription", label: "原料" }, { width: 220, prop: "materialDescription", label: "原料" },
{ prop: "qty", label: "料位" }, { prop: "qty", label: "料位[kg]" },
// { prop: "unitDictValue", label: "单位", filter: dictFilter('unit') }, // { prop: "unitDictValue", label: "单位", filter: dictFilter('unit') },
{ prop: "materialTypeDictValue", label: "原料类型", filter: dictFilter("material_category") }, { width: 128, prop: "materialTypeDictValue", label: "原料类型", filter: dictFilter("material_category") },
{ prop: "density", label: "原料堆积密度" }, { width: 128, prop: "density", label: "原料堆积密度" },
{ prop: "dosLow", label: "加料下限" }, { width: 90, prop: "dosLow", label: "加料下限" },
{ prop: "dosHigh", label: "加料上限" }, { width: 90, prop: "dosHigh", label: "加料上限" },
{ prop: "description", label: "描述" }, { width: 128, prop: "description", label: "描述" },
{ width: 128, prop: "materialName", label: "中文描述" },
// { prop: "remark", label: "备注" }, // { prop: "remark", label: "备注" },
{ prop: "createTime", label: "添加时间", filter: timeFilter }, { width: 128, prop: "createTime", label: "添加时间", filter: timeFilter },
{ {
prop: "operations", prop: "operations",
name: "操作", name: "操作",
@ -123,7 +124,8 @@ export default function () {
fetchData: () => this.$http.get("/pms/material/page", { params: { key: "", limit: 999, page: 1 } }), fetchData: () => this.$http.get("/pms/material/page", { params: { key: "", limit: 999, page: 1 } }),
options: [], options: [],
optionLabel: "code", optionLabel: "code",
customLabel: "description", // customLabel: "description+name",
customLabels: ["description", "name"],
rules: { required: true, message: "必填项不能为空", trigger: "change" }, rules: { required: true, message: "必填项不能为空", trigger: "change" },
elparams: { filterable: true, placeholder: "请选择原料" }, elparams: { filterable: true, placeholder: "请选择原料" },
}, },

View File

@ -66,7 +66,7 @@
<script> <script>
import BaseListTable from "./BaseListTable.vue"; import BaseListTable from "./BaseListTable.vue";
import BaseSearchForm from "./BaseSearchForm.vue"; import BaseSearchForm from "./BaseSearchForm.vue";
import DialogJustForm from "./DialogJustForm.vue"; // import DialogJustForm from "./DialogJustForm.vue";
import DialogUpload from "@/components/DialogUpload.vue"; import DialogUpload from "@/components/DialogUpload.vue";
import moment from "moment"; import moment from "moment";
import Overlay from "@/components/Overlay.vue"; import Overlay from "@/components/Overlay.vue";
@ -76,7 +76,7 @@ import DialogWithMenu from "./DialogWithMenu.vue";
// const dictList = JSON.parse(localStorage.getItem("dictList")); // const dictList = JSON.parse(localStorage.getItem("dictList"));
export default { export default {
name: "ListSectionWithHead", name: "ListSectionWithHead",
components: { OrderEditDialog, BaseSearchForm, DialogWithMenu, BaseListTable, DialogJustForm, DialogUpload, Overlay }, components: { OrderEditDialog, BaseSearchForm, DialogWithMenu, BaseListTable, DialogUpload, Overlay },
props: { props: {
headConfig: { headConfig: {
type: Object, type: Object,

View File

@ -18,8 +18,13 @@
:total="totalPage" :total="totalPage"
layout="total, prev, pager, next, jumper"></el-pagination> layout="total, prev, pager, next, jumper"></el-pagination>
<!-- 编辑弹窗 --> <!-- 混料订单的 编辑弹窗 -->
<DialogJustForm ref="vdialog" v-if="false" /> <blender-order-edit
ref="blenderOrderEdit"
v-if="blenderOrderEditVisible"
@destroy="blenderOrderEditVisible = false"
@refreshDataList="getAList" />
<!-- 批次弹窗 --> <!-- 批次弹窗 -->
<BatchDialog <BatchDialog
ref="batchDialog" ref="batchDialog"
@ -31,12 +36,13 @@
<script> <script>
import BaseListTable from "./BaseListTable.vue"; import BaseListTable from "./BaseListTable.vue";
import DialogJustForm from "./DialogJustForm.vue"; // import DialogJustForm from "./DialogJustForm.vue";
import BatchDialog from "./BatchDialog.vue"; import BatchDialog from "./BatchDialog.vue";
import BlenderOrderEdit from "./tabs/blenderOrder-edit.vue";
export default { export default {
name: "TablePaginationComp", name: "TablePaginationComp",
components: { BaseListTable, DialogJustForm, BatchDialog }, components: { BaseListTable, BlenderOrderEdit, BatchDialog },
props: { props: {
tableConfig: { tableConfig: {
type: Object, type: Object,
@ -68,6 +74,7 @@ export default {
}, },
totalPage: 0, totalPage: 0,
refreshLayoutKey: 0, refreshLayoutKey: 0,
blenderOrderEditVisible: false,
/** batch related */ /** batch related */
batchDialogVisible: false, batchDialogVisible: false,
batchDialogConfigs: {}, batchDialogConfigs: {},
@ -80,10 +87,11 @@ export default {
handleOperate({ type, data: id }) { handleOperate({ type, data: id }) {
console.log("payload", type, id); console.log("payload", type, id);
switch (type) { switch (type) {
case "edit": case "blender-edit":
// this.blenderOrderEditVisible = true;
this.$refs.vdialog.init(id); this.$nextTick(() => {
console.log("编辑"); this.$refs.blenderOrderEdit.init(id);
});
break; break;
case "view-batch": case "view-batch":
// //

View File

@ -56,10 +56,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item label="计划开始时间" prop="planStartTime">
label="计划开始时间"
prop="planStartTime"
:rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }">
<el-date-picker <el-date-picker
v-model="dataForm.planStartTime" v-model="dataForm.planStartTime"
v-bind="{ v-bind="{
@ -282,7 +279,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <!-- <el-form-item
label="烧成温度" label="烧成温度"
prop="sapParam6" prop="sapParam6"
:rules="[ :rules="[
@ -298,10 +295,10 @@
v-model="dataForm.sapParam6" v-model="dataForm.sapParam6"
:disabled="mode.includes('detail')" :disabled="mode.includes('detail')"
v-bind="{ placeholder: '输入烧成温度' }"></el-input> v-bind="{ placeholder: '输入烧成温度' }"></el-input>
</el-form-item> </el-form-item> -->
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <!-- <el-form-item
label="烧成时间 H" label="烧成时间 H"
prop="sapParam7" prop="sapParam7"
:rules="[ :rules="[
@ -317,7 +314,7 @@
v-model="dataForm.sapParam7" v-model="dataForm.sapParam7"
:disabled="mode.includes('detail')" :disabled="mode.includes('detail')"
v-bind="{ placeholder: '输入烧成时间' }"></el-input> v-bind="{ placeholder: '输入烧成时间' }"></el-input>
</el-form-item> </el-form-item> -->
</el-col> </el-col>
</el-row> </el-row>
</InputsArea> </InputsArea>
@ -393,8 +390,8 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item
label="销售订单号" label="销售订单号"
prop="saleNo" prop="saleNo">
:rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> <!-- :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> -->
<el-input <el-input
v-model="dataForm.saleNo" v-model="dataForm.saleNo"
:disabled="mode.includes('detail')" :disabled="mode.includes('detail')"
@ -414,7 +411,7 @@
label="销售订单砖数" label="销售订单砖数"
prop="soqty" prop="soqty"
:rules="[ :rules="[
{ required: true, message: '必填项不能为空', trigger: 'blur' }, // { required: true, message: '', trigger: 'blur' },
{ {
type: 'number', type: 'number',
message: '输入正确的数字类型', message: '输入正确的数字类型',
@ -431,8 +428,8 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item
label="销售时间" label="销售时间"
prop="deliveryTime" prop="deliveryTime">
:rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> <!-- :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> -->
<el-date-picker <el-date-picker
v-model="dataForm.deliveryTime" v-model="dataForm.deliveryTime"
:disabled="mode.includes('detail')" :disabled="mode.includes('detail')"
@ -468,12 +465,42 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="物料号销售文本" prop="shortDesc" :rules="null"> <el-form-item label="喷码描述" prop="shortDesc" :rules="null">
<span style="display: block; margin-top: 32px">{{ dataForm.shortDesc }}</span> <span style="display: block; margin-top: 32px">{{ dataForm.shortDesc }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"></el-col> <el-col :span="6">
<el-col :span="6"></el-col> <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 label="非熏蒸" value="0"></el-option>
<el-option label="熏蒸" value="1"></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>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col> <el-col>
@ -592,12 +619,12 @@ export default {
label: "code", label: "code",
}, },
{ {
url: "/pms/bom/page", url: "/pms/bom/pageById",
params: { params: {
limit: 999, limit: 999,
page: 1, page: 1,
key: "", key: "",
externalCode: "", id: "", // bomId
}, },
method: "get", method: "get",
target: "bomOptions", target: "bomOptions",
@ -781,6 +808,8 @@ export default {
.then(({ data: res }) => { .then(({ data: res }) => {
if (res && res.code === 0) { if (res && res.code === 0) {
this.dataForm = __pick(res.data, Object.keys(this.dataForm)); this.dataForm = __pick(res.data, Object.keys(this.dataForm));
return res.data.bomId; // bomId
} else { } else {
this.$message({ this.$message({
message: `${res.code}: ${res.msg}`, message: `${res.code}: ${res.msg}`,
@ -788,6 +817,28 @@ export default {
duration: 1500, duration: 1500,
}); });
} }
})
.then((bomId) => {
return this.$http({
url: "/pms/bom/pageById",
method: "get",
params: {
limit: 999,
page: 1,
key: "",
id: bomId,
},
});
})
.then(({ data: res }) => {
if (res.code == 0) {
this.bomOptions = res.data.list.map((item) => ({
name: item.name,
label: item.code,
value: item.id,
}));
}
this.formLoading = false; this.formLoading = false;
}) })
.catch((err) => { .catch((err) => {

View File

@ -0,0 +1,200 @@
<!--
filename: blenderOrder-edit.vue
author: liubin
date: 2023-08-08 16:20:48
description:
-->
<template>
<el-dialog
class="blender-order-dialog"
:visible="visible"
width="30%"
@close="close"
@closed="$emit('destroy')"
:close-on-click-modal="false"
:append-to-body="true"
v-loading="optionsLoading || formLoading">
<div slot="title" class="dialog-title">
<h2 class="">
{{ mode.includes("detail") ? "查看详情" : dataForm.id ? "修改订单" : "新增订单" }}
</h2>
</div>
<!-- form -->
<el-form ref="dataForm" :model="dataForm" v-loading="optionsLoading || formLoading">
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="混料订单" prop="code" :rules="null">
<el-input v-model="dataForm.code" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item
label="配方"
prop="bomId"
:rules="[{ required: true, message: '必填项不能为空', trigger: 'blur' }]">
<el-select v-model="dataForm.bomId" placeholder="请选择配方">
<el-option v-for="bom in bomList" :key="bom.value" :label="bom.label" :value="bom.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item
label="混料机"
prop="blender"
:rules="[{ required: true, message: '必填项不能为空', trigger: 'blur' }]">
<el-select v-model="dataForm.blender" placeholder="请选择混料机">
<el-option
v-for="bdr in blenderList"
:key="bdr.value"
:label="bdr.label"
:value="bdr.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- footer -->
<div slot="footer">
<!-- TODO: permission 相关内容 未添加 -->
<el-button
v-if="mode.includes('create')"
type="primary"
@click="handleSave('POST')"
:loading="btnLoading">
保存
</el-button>
<el-button
v-if="mode.includes('edit')"
type="primary"
@click="handleSave('PUT')"
:loading="btnLoading">
更新
</el-button>
<el-button v-if="mode.includes('reset')" type="warning" @click="handleReset">重置</el-button>
<el-button @click="close">取消</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: "BlenderOrderEdit",
components: {},
props: {},
data() {
return {
visible: false,
mode: "#create#reset",
optionsLoading: false,
formLoading: false,
btnLoading: false,
dataForm: {
id: null,
code: null,
bomId: null,
blender: null,
},
bomList: [],
blenderList: [],
};
},
computed: {},
mounted() {},
methods: {
init({ id, blender, blenderCode, bomCode, bomId, bomName, code, orderCode, orderId }) {
// console.log("[blenderOrderEdit] init");
Promise.all([this.getBlenderList(), this.getBomList(bomCode)])
.then((r1, r2) => {
this.dataForm = {
id: id,
code: code,
bomId: bomId,
blender: blender,
};
this.visible = true;
})
.catch((err) => {
console.log(err);
this.close();
});
},
close() {
this.visible = false;
},
async getBomList(bomCode) {
this.optionsLoading = true;
const { data: res } = await this.$http.get("/pms/bom/pageVersion", {
params: { key: bomCode, limit: 999, page: 1 },
});
this.optionsLoading = false;
if (res.code === 0) {
this.bomList = res.data.list.map((bom) => ({
label: bom.code,
value: bom.id,
}));
}
},
async getBlenderList() {
this.optionsLoading = true;
const { data: res } = await this.$http.get("/pms/equipment/list", {
params: { workSequenceName: "混料工序" },
});
this.optionsLoading = false;
if (res.code === 0) {
this.blenderList = res.data.map((bdr) => ({
label: bdr.code,
value: bdr.id,
}));
}
},
handleSave(type) {
this.$refs.dataForm.validate(async (valid) => {
if (valid) {
this.btnLoading = true;
const { id, blender, bomId } = this.dataForm;
const { data: res } = await this.$http.get("/pms/order/changeBlender", {
params: { id, blender, bomId },
});
this.btnLoading = false;
if (res.code == 0) {
this.$message.success("修改成功");
this.close();
this.$emit("refreshDataList");
} else {
this.$message.error(res.msg);
}
}
});
// switch (type) {
// case "POST":
// break;
// case "PUT":
// break;
// }
},
handleReset() {
Object.keys(this.dataForm).forEach((key) => {
if (key != "id" && key != "code") this.dataForm[key] = null;
});
this.$refs.dataForm.clearValidate();
},
},
};
</script>
<style lang="scss">
.blender-order-dialog .el-dialog__body {
padding: 10px 20px;
}
.el-select {
width: 100%;
}
</style>

View File

@ -3,16 +3,24 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col style="margin-bottom: 12px"> <el-col style="margin-bottom: 12px">
<!-- 混料订单 --> <!-- 混料订单 -->
<TablePagi v-if="order !== null" :extra-query-fields="{ code: order.code, cate: order.cate }" <TablePagi
:urls="{ page: '/pms/blenderOrder/pageView', detach: '/pms/trans/blenderDeli' }" :page-is-post="true" :table-config="{ v-if="order !== null"
:extra-query-fields="{ code: order.code, cate: order.cate }"
:urls="{ page: '/pms/blenderOrder/pageView', detach: '/pms/trans/blenderDeli' }"
:page-is-post="true"
:table-config="{
table: null, table: null,
column: blenderTableProps, column: blenderTableProps,
}" /> }" />
</el-col> </el-col>
<el-col style="margin-bottom: 12px"> <el-col style="margin-bottom: 12px">
<!-- 压制订单 --> <!-- 压制订单 -->
<TablePagi v-if="order !== null" :extra-query-fields="{ code: order.code, cate: order.cate }" <TablePagi
:urls="{ page: '/pms/pressOrder/pageView', detach: '/pms/trans/pressDeli' }" :page-is-post="true" :table-config="{ v-if="order !== null"
:extra-query-fields="{ code: order.code, cate: order.cate }"
:urls="{ page: '/pms/pressOrder/pageView', detach: '/pms/trans/pressDeli' }"
:page-is-post="true"
:table-config="{
table: null, table: null,
column: pressTableProps, column: pressTableProps,
}" /> }" />
@ -22,16 +30,24 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col style="margin-bottom: 12px"> <el-col style="margin-bottom: 12px">
<!-- 窑炉订单 --> <!-- 窑炉订单 -->
<TablePagi v-if="order !== null" :extra-query-fields="{ code: order.code, cate: order.cate }" <TablePagi
:urls="{ page: '/pms/kilnOrder/pageView' }" :page-is-post="true" :table-config="{ v-if="order !== null"
:extra-query-fields="{ code: order.code, cate: order.cate }"
:urls="{ page: '/pms/kilnOrder/pageView' }"
:page-is-post="true"
:table-config="{
table: null, table: null,
column: kilnTableProps, column: kilnTableProps,
}" /> }" />
</el-col> </el-col>
<el-col style="margin-bottom: 12px"> <el-col style="margin-bottom: 12px">
<!-- 检测包装订单 --> <!-- 检测包装订单 -->
<TablePagi v-if="order !== null" :extra-query-fields="{ code: order.code, cate: order.cate }" <TablePagi
:urls="{ page: '/pms/qualityPackOrder/pageView' }" :page-is-post="true" :table-config="{ v-if="order !== null"
:extra-query-fields="{ code: order.code, cate: order.cate }"
:urls="{ page: '/pms/qualityPackOrder/pageView' }"
:page-is-post="true"
:table-config="{
table: null, table: null,
column: detectionTableProps, column: detectionTableProps,
}" /> }" />
@ -43,39 +59,37 @@
<script> <script>
import TablePagi from "../TablePagi.vue"; import TablePagi from "../TablePagi.vue";
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
// import BlenderOrderEdit from "./blenderOrder-edit.vue";
const percentComponent = { const percentComponent = {
name: "PercentComponent", name: "PercentComponent",
components: {},
props: { props: {
injectData: { injectData: {
type: Object, type: Object,
default: () => ({}) default: () => ({}),
} },
}, },
data() { data() {
return { return {};
}
},
methods: {
}, },
methods: {},
render: function (h) { render: function (h) {
const value = this.injectData[this.injectData.head.prop] const value = this.injectData[this.injectData.head.prop];
return h( return h(
'div', "div",
{ {
style: { style: {
padding: '0 10px', padding: "0 10px",
background: value > 0 && value <= 100 ? '#ffd400' : (value > 100 ? '#6797ff' : 'unset'), background: value > 0 && value <= 100 ? "#ffd400" : value > 100 ? "#6797ff" : "unset",
color: value > 100 ? 'white' : 'unset' color: value > 100 ? "white" : "unset",
} },
}, },
value !== null && value !== undefined ? value + " %" : "-" value !== null && value !== undefined ? value + " %" : "-"
) );
} },
} };
export default { export default {
name: "SuborderDetailTag", name: "SuborderDetailTag",
@ -92,12 +106,15 @@ export default {
// //
blenderTableProps: [ blenderTableProps: [
{ width: 200, prop: "code", label: "混料订单号" }, { width: 200, prop: "code", label: "混料订单号" },
{ width: 350, prop: "percent", label: "进度", className: 'no-padding-class', subcomponent: percentComponent }, // filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") }, { width: 350, prop: "percent", label: "进度", className: "no-padding-class", subcomponent: percentComponent }, // filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") },
{ {
width: 575, width: 575,
prop: "statusDictValue", prop: "statusDictValue",
label: "订单状态", label: "订单状态",
filter: (val) => (val !== null && val !== undefined ? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"][val] : "-"), filter: (val) =>
val !== null && val !== undefined
? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"][val]
: "-",
}, },
{ prop: "qty", label: "混料总量 [kg]" }, { prop: "qty", label: "混料总量 [kg]" },
{ {
@ -107,28 +124,33 @@ export default {
width: 200, width: 200,
subcomponent: TableOperaionComponent, subcomponent: TableOperaionComponent,
options: [ options: [
{ name: "edit", label: "编辑", emitFull: true, icon: "edit-outline" }, { name: "blender-edit", label: "编辑", emitFull: true, icon: "edit-outline" },
{ name: "view-batch", label: "查看批次", color: "#ff8000", toRouter: "pms-blenderBatch", icon: "document-copy" }, // pms-blenderBatch {
name: "view-batch",
label: "查看批次",
color: "#ff8000",
toRouter: "pms-blenderBatch",
icon: "document-copy",
}, // pms-blenderBatch
{ name: "detach", label: "下发", color: "#099", icon: "bottom-right" }, { name: "detach", label: "下发", color: "#099", icon: "bottom-right" },
], ],
}, },
], ],
blenderEditConfig: {
form: {
field: [
[],
]
}
},
refreshLayoutKey1: "", refreshLayoutKey1: "",
// //
pressTableProps: [ pressTableProps: [
{ width: 200, prop: "code", label: "压制订单号" }, { width: 200, prop: "code", label: "压制订单号" },
{ width: 350, prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") }, {
width: 350,
prop: "percent",
label: "进度",
filter: (val) => (val !== null && val !== undefined ? val + " %" : "-"),
},
{ {
prop: "statusDictValue", prop: "statusDictValue",
label: "订单状态", label: "订单状态",
filter: (val) => (val !== null && val !== undefined ? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝"][val] : "-"), filter: (val) =>
val !== null && val !== undefined ? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝"][val] : "-",
}, },
{ prop: "qty", label: "生产量" }, { prop: "qty", label: "生产量" },
{ prop: "qtyComplete", label: "完成量" }, { prop: "qtyComplete", label: "完成量" },
@ -147,7 +169,12 @@ export default {
// //
kilnTableProps: [ kilnTableProps: [
{ width: 200, prop: "code", label: "烧成订单号" }, { width: 200, prop: "code", label: "烧成订单号" },
{ width: 350, prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") }, {
width: 350,
prop: "percent",
label: "进度",
filter: (val) => (val !== null && val !== undefined ? val + " %" : "-"),
},
{ prop: "qty", label: "生产量" }, { prop: "qty", label: "生产量" },
{ prop: "qtyComplete", label: "完成量" }, { prop: "qtyComplete", label: "完成量" },
], ],
@ -155,7 +182,12 @@ export default {
// //
detectionTableProps: [ detectionTableProps: [
{ width: 200, prop: "code", label: "检测包装订单号" }, { width: 200, prop: "code", label: "检测包装订单号" },
{ width: 350, prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") }, {
width: 350,
prop: "percent",
label: "进度",
filter: (val) => (val !== null && val !== undefined ? val + " %" : "-"),
},
{ prop: "qty1", label: "检测量" }, { prop: "qty1", label: "检测量" },
{ prop: "qty1Complete", label: "完成量" }, { prop: "qty1Complete", label: "完成量" },
{ prop: "goodqty1", label: "检测合格量" }, { prop: "goodqty1", label: "检测合格量" },

View File

@ -64,31 +64,31 @@ export default function () {
{ width: 60, type: "index", label: "序号", fixed: true }, { width: 60, type: "index", label: "序号", fixed: true },
{ width: 120, prop: "code", label: "订单号", fixed: "left" }, { width: 120, prop: "code", label: "订单号", fixed: "left" },
{ width: 60, prop: "cate", label: "子号" }, { width: 60, prop: "cate", label: "子号" },
{ width: 60, prop: "statusDictValue", label: "状态", filter: dictFilter("order_status") }, // 不可编辑
{ width: 120, prop: "planStartTime", label: "计划开始时间", filter: timeFilter }, // "订单砖数" },
...startTimeProp(type),
{ width: 60, prop: "prodqty", label: "数量" }, // "订单砖数" },
{ width: 100, prop: "productCode", label: "物料" }, // "物料编号" }, // select, filterable { width: 100, prop: "productCode", label: "物料" }, // "物料编号" }, // select, filterable
{ width: 100, prop: "shapeCode", label: "砖型" }, // "砖型编号" }, // select, filterable { width: 100, prop: "shapeCode", label: "砖型" }, // "砖型编号" }, // select, filterable
{ width: 120, prop: "brand", label: "牌号" }, // select, filterable { width: 160, prop: "brand", label: "牌号" }, // select, filterable
{ width: 60, prop: "ai", label: "版本" }, // "版本号" }, // auto display according to the 配方
{ width: 65, prop: "sapParam1", label: "addon" },
{ width: 200, prop: "shortDesc", label: "物料号销售文本" },
{ width: 100, prop: "bomCode", label: "配方编码" }, { width: 100, prop: "bomCode", label: "配方编码" },
{ width: 80, prop: "pressCode", label: "压机号" }, // select, filterable { width: 60, prop: "ai", label: "版本" }, // "版本号" }, // auto display according to the 配方
{ width: 60, prop: "prodqty", label: "数量" }, // "订单砖数" },
{ width: 80, prop: "blenderCode", label: "混料机号" }, // select, filterable { width: 80, prop: "blenderCode", label: "混料机号" }, // select, filterable
{ width: 80, prop: "pressCode", label: "压机号" }, // select, filterable
{ width: 80, prop: "kilnCode", label: "隧道窑号" }, // select, filterable { width: 80, prop: "kilnCode", label: "隧道窑号" }, // select, filterable
{ width: 120, prop: "planStartTime", label: "计划开始时间", filter: timeFilter }, // "订单砖数" },
...startTimeProp(type),
{ width: 120, prop: "sapParam6", label: "烧成温度" }, { width: 120, prop: "sapParam6", label: "烧成温度" },
{ width: 120, prop: "sapParam7", label: "烧成时间(h)" }, { width: 120, prop: "sapParam7", label: "烧成时间(h)" },
{ width: 120, prop: "yieldqty", label: "已生产数量" }, // uneditable { width: 200, prop: "packTechCode", label: "包装工艺代码" }, // select, filterable
{ width: 120, prop: "soqty", label: "销售订单数" }, { width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" },
{ width: 120, prop: "customerCode", label: "客户" },
{ width: 120, prop: "specifications", label: "生产订单类型" },
{ width: 60, prop: "statusDictValue", label: "状态", filter: dictFilter("order_status") }, // 不可编辑
{ width: 200, prop: "saleNo", label: "销售订单号" }, { width: 200, prop: "saleNo", label: "销售订单号" },
{ width: 200, prop: "saleOrderItem", label: "销售订单item号" }, { width: 200, prop: "saleOrderItem", label: "销售订单item号" },
{ width: 200, prop: "packTechCode", label: "包装工艺代码" }, // select, filterable { width: 120, prop: "soqty", label: "销售订单数" },
{ width: 120, prop: "specifications", label: "生产订单类型" },
{ width: 120, prop: "deliveryTime", label: "销售时间", filter: timeFilter }, { width: 120, prop: "deliveryTime", label: "销售时间", filter: timeFilter },
{ width: 120, prop: "customerCode", label: "客户" }, { width: 65, prop: "sapParam1", label: "addon" },
{ width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" }, { width: 200, prop: "shortDesc", label: "喷码描述" },
{ width: 120, prop: "yieldqty", label: "已生产数量" }, // uneditable
// { prop: "description", label: "详情", subcomponent: TableTextComponent }, // { prop: "description", label: "详情", subcomponent: TableTextComponent },
{ width: 120, prop: "remark", label: "备注" }, { width: 120, prop: "remark", label: "备注" },
{ width: 120, prop: "createTime", label: "添加时间", filter: timeFilter }, { width: 120, prop: "createTime", label: "添加时间", filter: timeFilter },
@ -283,11 +283,11 @@ export default function () {
datetime: true, datetime: true,
label: "计划开始时间", label: "计划开始时间",
prop: "planStartTime", prop: "planStartTime",
rules: { // rules: {
required: true, // required: true,
message: "必填项不能为空", // message: "必填项不能为空",
trigger: "blur", // trigger: "blur",
}, // },
elparams: { elparams: {
placeholder: "选择计划开始时间", placeholder: "选择计划开始时间",
type: "datetime", type: "datetime",
@ -552,8 +552,24 @@ export default function () {
useBuiltin: false, useBuiltin: false,
}, },
}, },
{}, {
{} label: '托板类型',
prop: 'palletType',
select: true,
options: [
{ label: '非熏蒸', value: '0' },
{ label: '熏蒸', value: '1' },
]
},
{
label: '贴纸板',
prop: 'paperboard',
select: true,
options: [
{ label: '不要', value: '0' },
{ label: '要', value: '1' },
]
},
], ],
[ [
{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }, { input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } },

View File

@ -6,21 +6,19 @@
:refresh-key="keys.ongoing" :refresh-key="keys.ongoing"
:extra-search-conditions="{ code: '' }" :extra-search-conditions="{ code: '' }"
:page-url="allUrls.confirmedOrder" :page-url="allUrls.confirmedOrder"
:table-config="{ table: null, column: tableConfigs.ongoingTable }" :table-config="{ table: { 'cell-class-name': cellClassName }, column: tableConfigs.ongoingTable }"
:head-config="{ title: '进行中的订单', form: headFormConfigs.ongoingTableSearch }" :head-config="{ title: '进行中的订单', form: headFormConfigs.ongoingTableSearch }"
:dialog-config="dialogConfigs" :dialog-config="dialogConfigs"
@refresh-tables="handleRefreshTable" @refresh-tables="handleRefreshTable" />
/>
<ListSectionWithHead <ListSectionWithHead
id="pending" id="pending"
:refresh-key="keys.pending" :refresh-key="keys.pending"
:extra-search-conditions="{ code: '' }" :extra-search-conditions="{ code: '' }"
:page-url="allUrls.unConfirmedOrder" :page-url="allUrls.unConfirmedOrder"
:table-config="{ table: null, column: tableConfigs.pendingTable }" :table-config="{ table: { 'cell-class-name': cellClassName }, column: tableConfigs.pendingTable }"
:head-config="{ title: '等待中的订单', form: headFormConfigs.pendingTableSearch }" :head-config="{ title: '等待中的订单', form: headFormConfigs.pendingTableSearch }"
:dialog-config="dialogConfigs" :dialog-config="dialogConfigs"
@refresh-tables="handleRefreshTable" @refresh-tables="handleRefreshTable" />
/>
<!-- <ListSectionWithHead <!-- <ListSectionWithHead
id="finished" id="finished"
:refresh-key="keys.finished" :refresh-key="keys.finished"
@ -73,23 +71,30 @@ export default {
}, },
methods: { methods: {
scrollTo(pos) { scrollTo(pos) {
const el = document.querySelector(pos) const el = document.querySelector(pos);
window.scrollTo({ window.scrollTo({
top: el.offsetTop - 16, top: el.offsetTop - 16,
behavior: 'smooth' behavior: "smooth",
}) });
}, },
handleRefreshTable(tableNameList) { handleRefreshTable(tableNameList) {
if (Array.isArray(tableNameList)) { if (Array.isArray(tableNameList)) {
tableNameList.forEach(name => { tableNameList.forEach((name) => {
this.keys[name] = Math.random().toString() this.keys[name] = Math.random().toString();
}) });
} else { } else {
console.log('handleRefreshTable 需要传递数组!') console.log("handleRefreshTable 需要传递数组!");
} }
},
cellClassName({ row, column, rowIndex, columnIndex }) {
if ("statusDictValue" in row && row.statusDictValue == "2") {
console.log("setting cell style.....", row);
return "cell-in-production";
} }
}, },
},
}; };
</script> </script>
@ -138,4 +143,10 @@ export default {
/* margin-left: 144px; */ /* margin-left: 144px; */
flex-grow: 1; flex-grow: 1;
} }
.list-section-with-head >>> .cell-in-production {
background: rgba(33, 207, 134, 0.35);
}
.list-section-with-head >>> .hover-row .cell-in-production {
background: rgba(33, 207, 134, 0.7);
}
</style> </style>

View File

@ -10,8 +10,20 @@ export default function () {
{ width: 160, prop: "orderCode", label: "主订单号" }, { width: 160, prop: "orderCode", label: "主订单号" },
{ width: 60, prop: "orderCate", label: "子号" }, { width: 60, prop: "orderCate", label: "子号" },
{ width: 160, prop: "code", label: "压制订单号" }, { width: 160, prop: "code", label: "压制订单号" },
{ width: 90, prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") }, {
{ prop: "statusDictValue", label: "订单状态", filter: (val) => (val !== null && val !== undefined ? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"][val] : "-"), }, width: 90,
prop: "percent",
label: "进度",
filter: (val) => (val !== null && val !== undefined ? val + " %" : "-"),
},
{
prop: "statusDictValue",
label: "订单状态",
filter: (val) =>
val !== null && val !== undefined
? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"][val]
: "-",
},
{ width: 160, prop: "startTime", label: "开始时间", filter: timeFilter }, { width: 160, prop: "startTime", label: "开始时间", filter: timeFilter },
{ width: 100, prop: "shapeCode", label: "砖型" }, { width: 100, prop: "shapeCode", label: "砖型" },
{ prop: "pressCode", label: "压机" }, { prop: "pressCode", label: "压机" },
@ -30,7 +42,7 @@ export default function () {
fixed: "right", fixed: "right",
width: 80, width: 80,
subcomponent: TableOperaionComponent, subcomponent: TableOperaionComponent,
options: [{ name: 'detach', label: '下发', icon: 'bottom-right' }] // , url: '/pms/trans/pressDeli' }] options: [{ name: "detach", label: "下发", icon: "bottom-right" }], // , url: '/pms/trans/pressDeli' }]
// options: ["copy", { name: "edit", label: "编辑", icon: "edit-outline" }, { name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "pms:blenderStep:delete" }], // options: ["copy", { name: "edit", label: "编辑", icon: "edit-outline" }, { name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "pms:blenderStep:delete" }],
}, },
]; ];
@ -233,7 +245,13 @@ export default function () {
return { return {
// dialogConfigs, // dialogConfigs,
tableConfig: { 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 上的配置项 column: tableProps, // el-column-item 上的配置项
}, },
headFormConfigs: { headFormConfigs: {

View File

@ -1,5 +1,6 @@
<template> <template>
<ListViewWithHead <ListViewWithHead
class="highlight-cell"
:table-config="tableConfig" :table-config="tableConfig"
:head-config="headFormConfigs" :head-config="headFormConfigs"
:dialog-configs="dialogConfigs" :dialog-configs="dialogConfigs"
@ -30,4 +31,11 @@ export default {
}; };
</script> </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

@ -14,8 +14,8 @@ export default function () {
{ prop: "line", label: "中心线颜色", filter: dictFilter("line") }, { prop: "line", label: "中心线颜色", filter: dictFilter("line") },
{ prop: "tequipmentTechCode1", label: "压制工艺", subcomponent: techBox }, { prop: "tequipmentTechCode1", label: "压制工艺", subcomponent: techBox },
{ prop: "tequipmentTechCode2", label: "检测工艺", subcomponent: techBox }, { prop: "tequipmentTechCode2", label: "检测工艺", subcomponent: techBox },
{ prop: "description", label: "长描述" }, // { prop: "description", label: "长描述" },
{ prop: "shortDesc", label: "描述" }, { prop: "shortDesc", label: "喷码描述" },
{ prop: "remark", label: "备注" }, { prop: "remark", label: "备注" },
{ {
prop: "toggle-attachment-dialog", prop: "toggle-attachment-dialog",

View File

@ -132,8 +132,8 @@ export default {
baseImg: require("../../assets/img/login-back.png"), baseImg: require("../../assets/img/login-back.png"),
coverImgUrl: "", coverImgUrl: "",
dataForm: { dataForm: {
username: "admin", username: "",
password: "admin", password: "",
uuid: "string", uuid: "string",
captcha: "", captcha: "",
}, },