update 0727docs

This commit is contained in:
lb 2023-07-27 15:01:42 +08:00
parent 070013b7b2
commit d35f0ba843
8 changed files with 73 additions and 92 deletions

View File

@ -9,7 +9,8 @@ export default function () {
{ prop: "batchNo", label: "批次编码" },
{ prop: "batchSize", label: "批次重量 [kg]" },
{ prop: "status", label: "状态" },
{ prop: "startTime", label: "开始时间" },
// { prop: "startTime", label: "开始时间" },
{ prop: "endTime", label: "结束时间" },
{ prop: "task", label: "任务分类" },
{ prop: "blenderCode", label: "混料机" },
// { width: 120, prop: "orderCate", label: "主订单子号" },

View File

@ -5,8 +5,7 @@
:dialog-configs="dialogConfigs"
:list-query-extra="[{ blenderOrderId: id }]"
attach-list-query-extra="blenderOrderId"
:trigger-update="triggerUpdateKey"
/>
:trigger-update="triggerUpdateKey" />
</template>
<script>
@ -24,8 +23,17 @@ export default {
computed: {
// id
id() {
console.log("computed id");
return this.$route.query.id || "";
},
refreshPage() {
console.log("computed refreshPage");
const val = this.$route.query.refreshPage ? Math.random().toString() : null;
// location.href refreshPage
location.href = location.href.replace(/&refreshPage=[^&]*/, "");
return val
},
},
data() {
const { tableConfig, headFormConfigs, urls, dialogConfigs } = initConfig.call(this);
@ -34,20 +42,32 @@ export default {
headFormConfigs,
allUrls: urls,
dialogConfigs,
triggerUpdateKey: ''
triggerUpdateKey: "",
};
},
// watch: {
// $route: {
// handler: function (route) {
// if (route.query.id) {
// this.triggerUpdateKey = Math.random().toString()
// console.log('[$oute changed] val.params.id', route.query.id, this.triggerUpdateKey)
// }
// },
// immediate: true,
// deep: true
// }
// },
watch: {
$route: {
handler: function (route) {
if (route.query.id) {
this.triggerUpdateKey = Math.random().toString()
console.log('[$oute changed] val.params.id', route.query.id, this.triggerUpdateKey)
refreshPage: {
handler: function (val) {
console.log("refreshPage", val);
if (val) {
// this.triggerUpdateKey = Math.random().toString();
this.triggerUpdateKey = val;
}
},
immediate: true,
deep: true
}
},
},
created() {},
mounted() {},

View File

@ -223,6 +223,7 @@ export default {
name: toRouter,
query: {
id: data, // id
refreshPage: 1, // 1 or 0
},
});
break;

View File

@ -3,8 +3,7 @@
:table-config="tableConfig"
:head-config="headFormConfigs"
:dialog-configs="dialogConfigs"
:list-query-extra="[]"
/>
:list-query-extra="[{ viewType: 0 }]" />
</template>
<script>
@ -12,27 +11,13 @@ import initConfig from "./config";
import ListViewWithHead from "@/views/atomViews/ListViewWithHead.vue";
export default {
name: "BlenderView",
name: "KilnOrderView",
components: { ListViewWithHead },
provide() {
return {
urls: this.allUrls,
};
},
// urls: {
// type: Object,
// required: true,
// default: () => ({
// /** url **/ list: null,
// /** url **/ page: null,
// /** url **/ edit: null,
// /** url **/ delete: null,
// /** url **/ detail: null,
// /** url **/ export: null,
// /** url **/ import: null,
// /** url **/ other: null,
// }),
// },
data() {
const { tableConfig, headFormConfigs, urls, dialogConfigs } = initConfig.call(this);
return {
@ -42,9 +27,6 @@ export default {
dialogConfigs,
};
},
created() {},
mounted() {},
methods: {},
};
</script>

View File

@ -1,20 +1,20 @@
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
// import switchBtn from "@/components/noTemplateComponents/switchBtn";
import request from "@/utils/request";
import { dictFilter } from '@/utils/filters'
import { timeFilter } from '@/utils/filters'
import { dictFilter } from "@/utils/filters";
import { timeFilter } from "@/utils/filters";
export default function () {
const tableProps = [
{ type: 'index', label: '序号' },
{ type: "index", label: "序号" },
{ prop: "name", label: "料仓名称" },
{ prop: "code", label: "料仓编码" },
{ prop: "typeDictValue", label: "料仓类型", filter: dictFilter('liaocang') },
{ prop: "typeDictValue", label: "料仓类型", filter: dictFilter("liaocang") },
// { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent
{ prop: "materialDescription", label: "原料" },
{ prop: "qty", label: "料位" },
// { prop: "unitDictValue", label: "单位", filter: dictFilter('unit') },
{ prop: "materialTypeDictValue", label: "原料类型", filter: dictFilter('material_category') },
{ prop: "materialTypeDictValue", label: "原料类型", filter: dictFilter("material_category") },
{ prop: "density", label: "原料堆积密度" },
{ prop: "dosLow", label: "加料下限" },
{ prop: "dosHigh", label: "加料上限" },
@ -38,14 +38,27 @@ export default function () {
const headFormFields = [
{
prop: 'name',
prop: "name",
label: "料仓名称",
input: true,
default: { value: "" },
bind: {
// placeholder: '请输入产线名称或编码'
placeholder: '请输入料仓名称'
}
placeholder: "请输入料仓名称",
},
},
{
prop: "typeDictValue",
label: "料仓类型",
select: JSON.parse(localStorage.getItem("dictList"))["liaocang"].map((item) => ({
label: item.dictLabel,
value: item.dictValue,
})),
default: { value: null },
bind: {
placeholder: "请选择料仓类型",
filterable: true,
},
},
{
button: {
@ -57,11 +70,11 @@ export default function () {
button: {
type: "primary",
name: "全部同步",
permission: ""
permission: "",
},
bind: {
plain: true,
}
},
},
];
@ -97,8 +110,8 @@ export default function () {
// fetchData: () => this.$http.get("/pms/factory/page", { params: { limit: 999, page: 1 } }),
options: [
// TODO: 或许映射可以全权交给数据字典
{ label: '中间仓', value: '0' },
{ label: '日料仓', value: '1' },
{ label: "中间仓", value: "0" },
{ label: "日料仓", value: "1" },
],
rules: { required: true, message: "必填项不能为空", trigger: "change" },
elparams: { placeholder: "请选择料仓类型" },
@ -107,10 +120,10 @@ export default function () {
select: true,
label: "原料",
prop: "materialId",
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: [],
optionLabel: 'code',
customLabel: 'description',
optionLabel: "code",
customLabel: "description",
rules: { required: true, message: "必填项不能为空", trigger: "change" },
elparams: { filterable: true, placeholder: "请选择原料" },
},
@ -162,7 +175,7 @@ export default function () {
base: "/pms/materialStorageDynamic",
page: "/pms/materialStorageDynamic/page",
syncUrl: "/pms/trans/matStoreSync",
syncSingleUrl: "/pms/trans/matStoreSingleSync"
syncSingleUrl: "/pms/trans/matStoreSingleSync",
// subase: '/pms/blenderStepParam',
// subpage: '/pms/blenderStepParam/page',
// more...

View File

@ -3,8 +3,7 @@
:table-config="tableConfig"
:head-config="headFormConfigs"
:dialog-configs="dialogConfigs"
:list-query-extra="[]"
/>
:list-query-extra="[{ viewType: 0 }]" />
</template>
<script>
@ -12,27 +11,13 @@ import initConfig from "./config";
import ListViewWithHead from "@/views/atomViews/ListViewWithHead.vue";
export default {
name: "BlenderView",
name: "PressOrderView",
components: { ListViewWithHead },
provide() {
return {
urls: this.allUrls,
};
},
// urls: {
// type: Object,
// required: true,
// default: () => ({
// /** url **/ list: null,
// /** url **/ page: null,
// /** url **/ edit: null,
// /** url **/ delete: null,
// /** url **/ detail: null,
// /** url **/ export: null,
// /** url **/ import: null,
// /** url **/ other: null,
// }),
// },
data() {
const { tableConfig, headFormConfigs, urls, dialogConfigs } = initConfig.call(this);
return {
@ -42,9 +27,6 @@ export default {
dialogConfigs,
};
},
created() {},
mounted() {},
methods: {},
};
</script>

View File

@ -6,10 +6,10 @@ import { timeFilter, dictFilter } from "@/utils/filters";
export default function () {
const tableProps = [
{ type: "index", label: "序号" },
{ prop: "name", label: "物料名称" },
{ prop: "code", label: "物料编码" },
{ prop: "name", label: "物料描述" },
// { prop: "typeDictValue", label: "物料类型", filter: dictFilter("product_type") },
{ prop: "specifications", label: "规格" },
// { prop: "specifications", label: "规格" },
// { prop: "unitDictValue", label: "单位", filter: dictFilter("unit") },
{ prop: "weight", label: "重量", filter: (val) => (val ? val + " kg" : "-") },
{ prop: "processTime", label: "产线完成单位产品用时", width: 200, filter: (val) => val + " (分钟)" },
@ -43,11 +43,11 @@ export default function () {
const headFormFields = [
{
label: "物料名称/编码",
label: "物料描述/编码",
prop: "key",
input: true,
default: { value: "" },
bind: { placeholder: "请输入物料名称或编码" },
bind: { placeholder: "请输入物料描述或编码" },
},
{
button: {
@ -97,14 +97,14 @@ export default function () {
label: "物料描述",
prop: "name",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入设备名称" },
elparams: { placeholder: "请输入物料描述" },
},
{
input: true,
label: "物料编码",
prop: "code",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入设备编码" },
elparams: { placeholder: "请输入物料编码" },
},
// { input: true, label: '版本号', prop: 'version', elparams: { placeholder: '请输入版本号' } },
// {

View File

@ -3,8 +3,7 @@
:table-config="tableConfig"
:head-config="headFormConfigs"
:dialog-configs="dialogConfigs"
:list-query-extra="[]"
/>
:list-query-extra="[{ viewType: 0 }]" />
</template>
<script>
@ -19,20 +18,6 @@ export default {
urls: this.allUrls,
};
},
// urls: {
// type: Object,
// required: true,
// default: () => ({
// /** url **/ list: null,
// /** url **/ page: null,
// /** url **/ edit: null,
// /** url **/ delete: null,
// /** url **/ detail: null,
// /** url **/ export: null,
// /** url **/ import: null,
// /** url **/ other: null,
// }),
// },
data() {
const { tableConfig, headFormConfigs, urls, dialogConfigs } = initConfig.call(this);
return {
@ -42,9 +27,6 @@ export default {
dialogConfigs,
};
},
created() {},
mounted() {},
methods: {},
};
</script>