add 托盘

This commit is contained in:
lb 2023-03-29 16:05:08 +08:00
parent 747f454d4b
commit 15978f6055
2 changed files with 151 additions and 0 deletions

View File

@ -0,0 +1,105 @@
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
import request from "@/utils/request";
import { timeFilter, dictFilter } from "@/utils/filters";
// import StateSelect from '@/components/StateSelect.vue';
export default function () {
const tableProps = [
{ type: "index", label: "序号" },
{ prop: "createTime", label: "添加时间", filter: timeFilter },
{ prop: "carCode", label: "窑车号" },
{ prop: "orderCode", label: "订单号" },
{ prop: "realQty", label: "数量" },
{ prop: "typeDictValue", label: "类型", filter: dictFilter('pallet_type') },
{ prop: "stifling", label: "熏蒸", },
{ prop: "printTime", label: "打印时间", filter: timeFilter },
{
prop: "operations",
name: "操作",
fixed: "right",
width: 90,
subcomponent: TableOperaionComponent,
options: [
{ name: "print", label: "打印", icon: "printer" },
{ name: "view-car-record", label: "窑车记录", emitFull: true, icon: "shopping-cart-1" },
],
},
];
const headFormFields = [
{
prop: "carId",
label: "窑车号",
select: [],
fn: () => this.$http.get("/pms/car/page", { params: { page: 1, limit: 999 } }),
bind: {
placeholder: "请选择窑车号",
filterable: true
},
},
{
prop: "orderId",
label: "订单号",
fieldOptionLabel: 'code',
// fieldOptionValue: 'id',
select: [],
fn: () => this.$http.post("/pms/order/pageView", { page: 1, limit: 999 }),
bind: {
placeholder: "请选择订单号",
filterable: true
},
},
{
button: {
type: "primary",
name: "查询",
},
},
];
const dialogJustFormConfigs = null;
const carPayloadDialogConfigs = {
dialogWidth: '70%',
carPayloadDialog: true,
clickModalToClose: true,
tableConfig: {
table: null,
column: [
// 窑车的 装载详情
// tableProps
{ width: 56, type: "index", label: "序号" },
{ prop: "orderCode", label: "订单号" },
{ width: 80, prop: "orderCate", label: "订单子号" },
{ prop: "bomCode", label: "配方" },
{ prop: "shapeCode", label: "砖型" },
{ width: 80, prop: "qty", label: "订单数量" },
{ width: 72, prop: "goodqty", label: "合格数" },
{ width: 72, prop: "badqty", label: "废砖数" },
// { prop: "startTime", label: "开始时间" },
// { prop: "endTime", label: "结束时间" },
// { prop: "remark", label: "备注" },
],
},
};
return {
carPayloadDialogConfigs,
dialogConfigs: dialogJustFormConfigs,
tableConfig: {
table: null, // 此处可省略el-table 上的配置项
column: tableProps, // el-column-item 上的配置项
},
headFormConfigs: {
rules: null, // 名称是由 BaseSearchForm.vue 组件固定的
fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的
},
urls: {
page: "/pms/pallet/pageView",
pageIsPostApi: true,
},
};
}

View File

@ -0,0 +1,46 @@
<template>
<ListViewWithHead
:table-config="tableConfig"
:head-config="headFormConfigs"
:dialog-configs="dialogConfigs"
:list-query-extra="[
/** { pos: [] } **/
]"
:trigger-update="triggerUpdateKey"
:car-payload-dialog-configs="carPayloadDialogConfigs"
/>
</template>
<script>
import initConfig from "./config";
import ListViewWithHead from "@/views/atomViews/ListViewWithHead.vue";
export default {
name: "currentCarLocationView",
components: { ListViewWithHead },
provide() {
return {
urls: this.allUrls,
};
},
data() {
const { tableConfig, headFormConfigs, urls, carPayloadDialogConfigs, dialogConfigs } = initConfig.call(this);
return {
carPayloadDialogConfigs,
tableConfig,
headFormConfigs,
allUrls: urls,
dialogConfigs,
triggerUpdateKey: "",
};
},
created() {},
mounted() {},
methods: {},
activated() {
this.triggerUpdateKey = Math.random().toString();
},
};
</script>
<style scoped></style>