update 2023.4.10
This commit is contained in:
@@ -127,7 +127,7 @@ export default {
|
||||
const unwatch = this.$watch(
|
||||
() => this.dataForm[col.prop],
|
||||
(newVal) => {
|
||||
const chosenObject = this.cachedList[col.prop].find((i) => i.id === newVal);
|
||||
const chosenObject = this.cachedList[col.prop]?.find((i) => i.id === newVal);
|
||||
if (chosenObject) {
|
||||
this.$set(this.dataForm, item[0], chosenObject[item[1]]);
|
||||
}
|
||||
|
||||
@@ -1,61 +1,40 @@
|
||||
<template>
|
||||
<div class="suborder-detail">
|
||||
<!-- 四分表格/田字格 -->
|
||||
<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' }"
|
||||
: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' }" :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' }"
|
||||
: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' }" :page-is-post="true" :table-config="{
|
||||
table: null,
|
||||
column: pressTableProps,
|
||||
}"
|
||||
/>
|
||||
}" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<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,
|
||||
}"
|
||||
/>
|
||||
}" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -65,6 +44,39 @@
|
||||
import TablePagi from "../TablePagi.vue";
|
||||
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
|
||||
|
||||
const percentComponent = {
|
||||
name: "PercentComponent",
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
render: function (h) {
|
||||
const value = this.injectData[this.injectData.head.prop]
|
||||
|
||||
return h(
|
||||
'div',
|
||||
{
|
||||
style: {
|
||||
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",
|
||||
components: { TablePagi },
|
||||
@@ -79,9 +91,10 @@ export default {
|
||||
return {
|
||||
// 混料
|
||||
blenderTableProps: [
|
||||
{ prop: "code", label: "混料订单号" },
|
||||
{ prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") },
|
||||
{ width: 200, prop: "code", label: "混料订单号" },
|
||||
{ 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] : "-"),
|
||||
@@ -91,7 +104,7 @@ export default {
|
||||
prop: "operations",
|
||||
name: "操作",
|
||||
fixed: "right",
|
||||
|
||||
width: 200,
|
||||
subcomponent: TableOperaionComponent,
|
||||
options: [
|
||||
{ name: "edit", label: "编辑", emitFull: true, icon: "edit-outline" },
|
||||
@@ -103,8 +116,8 @@ export default {
|
||||
refreshLayoutKey1: "",
|
||||
// 压制
|
||||
pressTableProps: [
|
||||
{ prop: "code", label: "压制订单号" },
|
||||
{ prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") },
|
||||
{ width: 200, prop: "code", label: "压制订单号" },
|
||||
{ width: 350, prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") },
|
||||
{
|
||||
prop: "statusDictValue",
|
||||
label: "订单状态",
|
||||
@@ -118,7 +131,7 @@ export default {
|
||||
prop: "operations",
|
||||
name: "操作",
|
||||
fixed: "right",
|
||||
|
||||
width: 200,
|
||||
subcomponent: TableOperaionComponent,
|
||||
options: [{ name: "detach", label: "下发", icon: "bottom-right" }], // , url: '/pms/trans/pressDeli' }]
|
||||
},
|
||||
@@ -126,16 +139,16 @@ export default {
|
||||
refreshLayoutKey2: "",
|
||||
// 窑炉
|
||||
kilnTableProps: [
|
||||
{ prop: "code", label: "烧成订单号" },
|
||||
{ prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") },
|
||||
{ width: 200, prop: "code", label: "烧成订单号" },
|
||||
{ width: 350, prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") },
|
||||
{ prop: "qty", label: "生产量" },
|
||||
{ prop: "qtyComplete", label: "完成量" },
|
||||
],
|
||||
refreshLayoutKey3: "",
|
||||
// 检测
|
||||
detectionTableProps: [
|
||||
{ prop: "code", label: "检测包装订单号" },
|
||||
{ prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") },
|
||||
{ width: 200, prop: "code", label: "检测包装订单号" },
|
||||
{ width: 350, prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") },
|
||||
{ prop: "qty1", label: "检测量" },
|
||||
{ prop: "qty1Complete", label: "完成量" },
|
||||
{ prop: "goodqty1", label: "检测合格量" },
|
||||
@@ -144,8 +157,8 @@ export default {
|
||||
refreshLayoutKey4: "",
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
mounted() {},
|
||||
created() { },
|
||||
mounted() { },
|
||||
methods: {
|
||||
init(/** 参数 */) {
|
||||
// Promise.all(
|
||||
|
||||
Reference in New Issue
Block a user