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,
"htmlWhitespaceSensitivity": "ignore",
"semi": true,

View File

@ -78,6 +78,14 @@
<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">
<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-select>
<el-switch
@ -248,34 +256,38 @@ 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) => ({
let options = [];
if (col.customLabel) {
options = 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],
}))
);
}));
} 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
this.$set(
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,
}))
);
this.$set(col, "options", options);
//
if ("injectTo" in col || col.cached) {

View File

@ -279,12 +279,12 @@ 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") {

View File

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

@ -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;
});
});
}
@ -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: () => {

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: 188,
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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -11,33 +11,33 @@ export default function () {
{ width: 60, type: "index", label: "序号", fixed: true },
{ width: 120, prop: "code", label: "订单号", fixed: "left" },
{ 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: "shapeCode", label: "砖型" },
{ width: 120, prop: "brand", label: "牌号" },
{ width: 60, prop: "ai", label: "版本" },
{ width: 65, prop: "sapParam1", label: "addon" },
{ width: 200, prop: "shortDesc", label: "物料号销售文本" },
{ width: 160, prop: "brand", 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: "pressCode", 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: "sapParam7", label: "烧成时间(h)" },
{ width: 120, prop: "yieldqty", label: "已生产数量" },
{ width: 120, prop: "soqty", label: "销售订单数" },
{ width: 200, prop: "packTechCode", 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: "saleOrderItem", label: "销售订单item号" },
{ width: 200, prop: "packTechCode", label: "包装工艺代码" },
{ width: 120, prop: "specifications", label: "生产订单类型" },
{ width: 120, prop: "soqty", label: "销售订单数" },
{ width: 120, prop: "deliveryTime", label: "销售时间", filter: timeFilter },
{ width: 120, prop: "customerCode", label: "客户" },
{ width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" },
{ width: 65, prop: "sapParam1", label: "addon" },
{ width: 200, prop: "shortDesc", label: "喷码描述" },
{ width: 120, prop: "yieldqty", label: "已生产数量" },
{ width: 120, prop: "remark", label: "备注" },
{ width: 120, prop: "createTime", label: "添加时间", filter: timeFilter },
// { width: 120, prop: "createTime", label: "添加时间", filter: timeFilter },
{
prop: "operations",
name: "操作",

View File

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

View File

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

View File

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

View File

@ -18,8 +18,13 @@
:total="totalPage"
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
ref="batchDialog"
@ -31,12 +36,13 @@
<script>
import BaseListTable from "./BaseListTable.vue";
import DialogJustForm from "./DialogJustForm.vue";
// import DialogJustForm from "./DialogJustForm.vue";
import BatchDialog from "./BatchDialog.vue";
import BlenderOrderEdit from "./tabs/blenderOrder-edit.vue";
export default {
name: "TablePaginationComp",
components: { BaseListTable, DialogJustForm, BatchDialog },
components: { BaseListTable, BlenderOrderEdit, BatchDialog },
props: {
tableConfig: {
type: Object,
@ -68,6 +74,7 @@ export default {
},
totalPage: 0,
refreshLayoutKey: 0,
blenderOrderEditVisible: false,
/** batch related */
batchDialogVisible: false,
batchDialogConfigs: {},
@ -80,10 +87,11 @@ export default {
handleOperate({ type, data: id }) {
console.log("payload", type, id);
switch (type) {
case "edit":
//
this.$refs.vdialog.init(id);
console.log("编辑");
case "blender-edit":
this.blenderOrderEditVisible = true;
this.$nextTick(() => {
this.$refs.blenderOrderEdit.init(id);
});
break;
case "view-batch":
//

View File

@ -56,10 +56,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item
label="计划开始时间"
prop="planStartTime"
:rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }">
<el-form-item label="计划开始时间" prop="planStartTime">
<el-date-picker
v-model="dataForm.planStartTime"
v-bind="{
@ -282,7 +279,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item
<!-- <el-form-item
label="烧成温度"
prop="sapParam6"
:rules="[
@ -298,10 +295,10 @@
v-model="dataForm.sapParam6"
:disabled="mode.includes('detail')"
v-bind="{ placeholder: '输入烧成温度' }"></el-input>
</el-form-item>
</el-form-item> -->
</el-col>
<el-col :span="6">
<el-form-item
<!-- <el-form-item
label="烧成时间 H"
prop="sapParam7"
:rules="[
@ -317,7 +314,7 @@
v-model="dataForm.sapParam7"
:disabled="mode.includes('detail')"
v-bind="{ placeholder: '输入烧成时间' }"></el-input>
</el-form-item>
</el-form-item> -->
</el-col>
</el-row>
</InputsArea>
@ -393,8 +390,8 @@
<el-col :span="6">
<el-form-item
label="销售订单号"
prop="saleNo"
:rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }">
prop="saleNo">
<!-- :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> -->
<el-input
v-model="dataForm.saleNo"
:disabled="mode.includes('detail')"
@ -414,7 +411,7 @@
label="销售订单砖数"
prop="soqty"
:rules="[
{ required: true, message: '必填项不能为空', trigger: 'blur' },
// { required: true, message: '', trigger: 'blur' },
{
type: 'number',
message: '输入正确的数字类型',
@ -431,8 +428,8 @@
<el-col :span="6">
<el-form-item
label="销售时间"
prop="deliveryTime"
:rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }">
prop="deliveryTime">
<!-- :rules="{ required: true, message: '必填项不能为空', trigger: 'blur' }"> -->
<el-date-picker
v-model="dataForm.deliveryTime"
:disabled="mode.includes('detail')"
@ -468,12 +465,42 @@
</el-form-item>
</el-col>
<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>
</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 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 :gutter="20">
<el-col>
@ -592,12 +619,12 @@ export default {
label: "code",
},
{
url: "/pms/bom/page",
url: "/pms/bom/pageById",
params: {
limit: 999,
page: 1,
key: "",
externalCode: "",
id: "", // bomId
},
method: "get",
target: "bomOptions",
@ -781,6 +808,8 @@ export default {
.then(({ data: res }) => {
if (res && res.code === 0) {
this.dataForm = __pick(res.data, Object.keys(this.dataForm));
return res.data.bomId; // bomId
} else {
this.$message({
message: `${res.code}: ${res.msg}`,
@ -788,6 +817,28 @@ export default {
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;
})
.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-col style="margin-bottom: 12px">
<!-- 混料订单 -->
<TablePagi 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="{
<TablePagi
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,
column: blenderTableProps,
}" />
</el-col>
<el-col style="margin-bottom: 12px">
<!-- 压制订单 -->
<TablePagi 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="{
<TablePagi
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,
column: pressTableProps,
}" />
@ -22,16 +30,24 @@
<el-row :gutter="20">
<el-col style="margin-bottom: 12px">
<!-- 窑炉订单 -->
<TablePagi v-if="order !== null" :extra-query-fields="{ code: order.code, cate: order.cate }"
:urls="{ page: '/pms/kilnOrder/pageView' }" :page-is-post="true" :table-config="{
<TablePagi
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,
column: kilnTableProps,
}" />
</el-col>
<el-col style="margin-bottom: 12px">
<!-- 检测包装订单 -->
<TablePagi v-if="order !== null" :extra-query-fields="{ code: order.code, cate: order.cate }"
:urls="{ page: '/pms/qualityPackOrder/pageView' }" :page-is-post="true" :table-config="{
<TablePagi
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,
column: detectionTableProps,
}" />
@ -43,39 +59,37 @@
<script>
import TablePagi from "../TablePagi.vue";
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
// import BlenderOrderEdit from "./blenderOrder-edit.vue";
const percentComponent = {
name: "PercentComponent",
components: {},
props: {
injectData: {
type: Object,
default: () => ({})
}
default: () => ({}),
},
},
data() {
return {
}
},
methods: {
return {};
},
methods: {},
render: function (h) {
const value = this.injectData[this.injectData.head.prop]
const value = this.injectData[this.injectData.head.prop];
return h(
'div',
"div",
{
style: {
padding: '0 10px',
background: value > 0 && value <= 100 ? '#ffd400' : (value > 100 ? '#6797ff' : 'unset'),
color: value > 100 ? 'white' : 'unset'
}
padding: "0 10px",
background: value > 0 && value <= 100 ? "#ffd400" : value > 100 ? "#6797ff" : "unset",
color: value > 100 ? "white" : "unset",
},
},
value !== null && value !== undefined ? value + " %" : "-"
)
}
}
);
},
};
export default {
name: "SuborderDetailTag",
@ -92,12 +106,15 @@ export default {
//
blenderTableProps: [
{ 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,
prop: "statusDictValue",
label: "订单状态",
filter: (val) => (val !== null && val !== undefined ? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"][val] : "-"),
filter: (val) =>
val !== null && val !== undefined
? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"][val]
: "-",
},
{ prop: "qty", label: "混料总量 [kg]" },
{
@ -107,28 +124,33 @@ export default {
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: "blender-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" },
],
},
],
blenderEditConfig: {
form: {
field: [
[],
]
}
},
refreshLayoutKey1: "",
//
pressTableProps: [
{ 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",
label: "订单状态",
filter: (val) => (val !== null && val !== undefined ? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝"][val] : "-"),
filter: (val) =>
val !== null && val !== undefined ? ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝"][val] : "-",
},
{ prop: "qty", label: "生产量" },
{ prop: "qtyComplete", label: "完成量" },
@ -147,7 +169,12 @@ export default {
//
kilnTableProps: [
{ 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: "qtyComplete", label: "完成量" },
],
@ -155,7 +182,12 @@ export default {
//
detectionTableProps: [
{ 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: "qty1Complete", label: "完成量" },
{ prop: "goodqty1", label: "检测合格量" },

View File

@ -64,31 +64,31 @@ export default function () {
{ width: 60, type: "index", label: "序号", fixed: true },
{ width: 120, prop: "code", label: "订单号", fixed: "left" },
{ 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: "shapeCode", label: "砖型" }, // "砖型编号" }, // select, filterable
{ width: 120, 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: 160, prop: "brand", label: "牌号" }, // select, filterable
{ 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: "pressCode", 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: "sapParam7", label: "烧成时间(h)" },
{ width: 120, prop: "yieldqty", label: "已生产数量" }, // uneditable
{ width: 120, prop: "soqty", label: "销售订单数" },
{ width: 200, prop: "packTechCode", label: "包装工艺代码" }, // select, filterable
{ 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: "saleOrderItem", label: "销售订单item号" },
{ width: 200, prop: "packTechCode", label: "包装工艺代码" }, // select, filterable
{ width: 120, prop: "specifications", label: "生产订单类型" },
{ width: 120, prop: "soqty", label: "销售订单数" },
{ width: 120, prop: "deliveryTime", label: "销售时间", filter: timeFilter },
{ width: 120, prop: "customerCode", label: "客户" },
{ width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" },
{ width: 65, prop: "sapParam1", label: "addon" },
{ width: 200, prop: "shortDesc", label: "喷码描述" },
{ width: 120, prop: "yieldqty", label: "已生产数量" }, // uneditable
// { prop: "description", label: "详情", subcomponent: TableTextComponent },
{ width: 120, prop: "remark", label: "备注" },
{ width: 120, prop: "createTime", label: "添加时间", filter: timeFilter },
@ -283,11 +283,11 @@ export default function () {
datetime: true,
label: "计划开始时间",
prop: "planStartTime",
rules: {
required: true,
message: "必填项不能为空",
trigger: "blur",
},
// rules: {
// required: true,
// message: "必填项不能为空",
// trigger: "blur",
// },
elparams: {
placeholder: "选择计划开始时间",
type: "datetime",
@ -552,8 +552,24 @@ export default function () {
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: "备注" } },

View File

@ -6,21 +6,19 @@
:refresh-key="keys.ongoing"
:extra-search-conditions="{ code: '' }"
: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 }"
:dialog-config="dialogConfigs"
@refresh-tables="handleRefreshTable"
/>
@refresh-tables="handleRefreshTable" />
<ListSectionWithHead
id="pending"
:refresh-key="keys.pending"
:extra-search-conditions="{ code: '' }"
: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 }"
:dialog-config="dialogConfigs"
@refresh-tables="handleRefreshTable"
/>
@refresh-tables="handleRefreshTable" />
<!-- <ListSectionWithHead
id="finished"
:refresh-key="keys.finished"
@ -73,23 +71,30 @@ export default {
},
methods: {
scrollTo(pos) {
const el = document.querySelector(pos)
const el = document.querySelector(pos);
window.scrollTo({
top: el.offsetTop - 16,
behavior: 'smooth'
})
behavior: "smooth",
});
},
handleRefreshTable(tableNameList) {
if (Array.isArray(tableNameList)) {
tableNameList.forEach(name => {
this.keys[name] = Math.random().toString()
})
tableNameList.forEach((name) => {
this.keys[name] = Math.random().toString();
});
} 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>
@ -138,4 +143,10 @@ export default {
/* margin-left: 144px; */
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>

View File

@ -10,8 +10,20 @@ export default function () {
{ width: 160, prop: "orderCode", label: "主订单号" },
{ width: 60, prop: "orderCate", 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: 100, prop: "shapeCode", label: "砖型" },
{ prop: "pressCode", label: "压机" },
@ -30,7 +42,7 @@ export default function () {
fixed: "right",
width: 80,
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" }],
},
];
@ -233,7 +245,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"
:table-config="tableConfig"
:head-config="headFormConfigs"
:dialog-configs="dialogConfigs"
@ -30,4 +31,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

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

View File

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