add 库存订单表

This commit is contained in:
lb 2023-08-21 10:55:03 +08:00
rodzic a33784740d
commit 7b0f53f677
8 zmienionych plików z 461 dodań i 30 usunięć

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -77,17 +77,6 @@ export default {
dataForm: {},
};
},
// watch ......
// watch: {
// dataForm: {
// handler: (val) => {
// console.log("[BaseSearchForm::watcher::dataForm]", val);
// },
// deep: true,
// },
// },
created() {},
mounted() {
console.log("[BaseSearchForm] configs:", JSON.parse(JSON.stringify(this.headConfig)));

Wyświetl plik

@ -1,17 +1,14 @@
<template>
<el-dialog
class="dialog-just-form"
custom-class="pms-dialog"
:visible="dialogVisible"
@close="handleClose"
:destroy-on-close="false"
:close-on-click-modal="configs.clickModalToClose ?? false"
:width="configs.dialogWidth ?? '50%'">
<!-- title -->
<div slot="title" class="dialog-title">
<h1 class="">
{{ detailMode ? "查看详情" : dataForm.id ? "编辑" : "新增" }}
</h1>
</div>
:width="configs.width || '50%'"
:destroy-on-close="false">
<span slot="title" class="dialog-title">
{{ detailMode ? "查看详情" : dataForm.id ? "编辑" : "新增" }}
</span>
<!-- form -->
<el-form ref="dataForm" :model="dataForm" v-loading="loadingStatus">
@ -75,7 +72,9 @@
:label="opt.label"
:value="opt.value">
<span>{{ opt.label }}</span>
<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] || "无描述" }}
</span>
<template v-if="col.customLabels">
@ -787,20 +786,19 @@ export default {
<style scoped>
.dialog-just-form >>> .el-dialog__body {
/* padding-top: 16px !important;
padding-bottom: 16px !important; */
padding-top: 0 !important;
padding-bottom: 0 !important;
}
.dialog-just-form >>> .el-form {
padding: 16px;
max-height: 55vh;
overflow-y: auto;
}
.el-select,
.el-cascader,
.el-date-editor {
width: 100% !important;
}
.dialog-just-form >>> .el-dialog__header {
padding: 10px 20px 10px;
/* background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), white); */
}
</style>

Wyświetl plik

@ -734,7 +734,7 @@ export default {
console.log("报工ids:", this.tableSelectedIds);
this.carReportDialogVisible = true;
this.$nextTick(() => {
this.$refs['car-report-dialog'].init();
this.$refs["car-report-dialog"].init();
});
break;
}

Wyświetl plik

@ -63,10 +63,13 @@ export default function () {
},
{
button: {
type: "plain",
type: "success",
name: "导入",
permission: "",
},
bind: {
plain: true,
},
},
// {
// button: {

Wyświetl plik

@ -173,6 +173,7 @@ export default function () {
button: {
type: "success",
name: "导入订单",
permission :''
},
bind: {
plain: true,

Wyświetl plik

@ -0,0 +1,394 @@
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
import request from "@/utils/request";
import { timeFilter, dictFilter } from "@/utils/filters";
import { getDictDataList } from "@/utils";
// import StateSelect from '@/components/StateSelect.vue';
export default function () {
const tableProps = [
{ width: 60, type: "index", label: "序号", fixed: true },
{ width: 120, prop: "code", label: "订单号", fixed: "left" },
{ width: 100, prop: "productCode", label: "物料" },
{ width: 100, prop: "shapeCode", label: "砖型" },
{ width: 160, prop: "brand", label: "牌号" },
{ width: 100, prop: "bomCode", label: "配方编码" },
{ width: 60, prop: "prodqty", label: "数量" },
{ width: 120, prop: "planStartTime", label: "计划开始时间", filter: timeFilter },
{ 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: 120, prop: "soqty", label: "销售订单数" },
{ width: 120, prop: "deliveryTime", label: "销售时间", filter: timeFilter },
{ width: 65, prop: "sapParam1", label: "addon" },
{ width: 200, prop: "shortDesc", label: "喷码描述" },
{ width: 120, prop: "yieldqty", label: "已生产数量" },
// { prop: "description", label: "详情", subcomponent: TableTextComponent },
{ width: 120, prop: "remark", label: "备注" },
{ width: 120, prop: "createTime", label: "添加时间", filter: timeFilter },
{
prop: "operations",
name: "操作",
fixed: "right",
width: 90,
subcomponent: TableOperaionComponent,
options: [{ name: "view", label: "查看详情", icon: "view" }],
},
];
const headFormFields = [
{
prop: "code",
label: "订单号",
input: true,
bind: {
placeholder: "请输入订单号",
},
},
{
prop: "types",
label: "状态",
select: [
{ label: "生产", value: "2" },
{ label: "结束", value: "4" },
],
bind: {
placeholder: "请选择状态",
multiple: true,
filterable: true,
},
},
{
button: {
type: "primary",
name: "查询",
},
},
{
button: {
type: "success",
name: "导入",
permission: "",
},
bind: {
plain: true,
},
},
];
const textOnlyComponent = {
props: {
modelValue: {
type: String | Number,
required: true,
},
useBuiltin: {
type: Boolean,
default: true,
},
},
data() {
return {
orderStatusMap: ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝", "已下发"],
};
},
render: function (h) {
return h(
"span",
{ style: { display: "block", marginTop: "0" } },
this.useBuiltin
? this.orderStatusMap[this.modelValue] ?? "-"
: this.modelValue.toString().trim() === ""
? "-"
: this.modelValue.toString()
);
},
};
const dialogJustFormConfigs = {
width: "80%",
form: {
rows: [
[
{
label: "订单状态",
prop: "statusDictValue",
component: textOnlyComponent,
},
{
input: true,
label: "订单号",
prop: "code",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "输入订单号" },
},
{
datetime: true,
label: "计划开始时间",
prop: "planStartTime",
elparams: {
placeholder: "选择计划开始时间",
type: "datetime",
"value-format": "yyyy-MM-ddTHH:mm:ss",
},
},
{
input: true,
label: "Add on",
prop: "sapParam1",
elparams: { placeholder: "输入addon" },
},
],
[
{
select: true,
label: "牌号",
prop: "bomId",
options: [],
fetchData: () =>
this.$http.get("/pms/bom/page", {
params: { limit: 999, page: 1, key: "", externalCode: "" },
}),
elparams: { placeholder: "选择牌号", filterable: true },
injectTo: [
["bomCode", "code"],
["ai", "externalCode"],
],
},
{
label: "配方号",
prop: "bomCode",
component: textOnlyComponent,
bind: {
useBuiltin: false,
},
},
{
select: true,
label: "包装代码",
prop: "packTech",
options: [],
optionLabel: "code",
fetchData: () =>
this.$http.post("/pms/equipmentTech/pageView", {
limit: 999,
page: 1,
key: "",
shape: "",
wsId: 5,
}),
elparams: { placeholder: "选择包装代码", filterable: true },
},
{
select: true,
label: "物料",
prop: "productId",
options: [],
optionLabel: "code",
fetchData: () =>
this.$http.get("/pms/product/page", { params: { limit: 999, page: 1, key: "" } }),
elparams: { placeholder: "选择物料", filterable: true },
},
],
[
{
select: true,
label: "砖型",
prop: "shape",
optionLabel: "code",
options: [],
fetchData: () =>
this.$http.get("/pms/shape/page", { params: { limit: 999, page: 1, key: "" } }),
elparams: { placeholder: "选择砖型", filterable: true },
},
{
input: true,
label: "烧成温度",
prop: "sapParam6",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{
type: "number",
message: "输入正确的数字类型",
trigger: "blur",
transform: (val) => Number(val),
},
],
elparams: { placeholder: "输入烧成温度" },
},
{
input: true,
label: "烧成时间(min)",
prop: "sapParam7",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{
type: "number",
message: "输入正确的数字类型",
trigger: "blur",
transform: (val) => Number(val),
},
],
elparams: { placeholder: "输入烧成时间" },
},
{
input: true,
label: "生产订单类型",
prop: "specifications",
elparams: { placeholder: "输入生产订单类型" },
},
],
[
{
input: true,
label: "生产订单砖数",
prop: "prodqty",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{
type: "number",
message: "输入正确的数字类型",
trigger: "blur",
transform: (val) => Number(val),
},
],
elparams: { placeholder: "输入要求生产的数量" },
},
{
input: true,
label: "已生产数",
prop: "yieldqty",
rules: [
{
type: "number",
message: "输入正确的数字类型",
trigger: "blur",
transform: (val) => Number(val),
},
],
elparams: { placeholder: "输入已经生产的数量" },
},
{
input: true,
label: "托盘码放砖数",
prop: "pcsKilnCar",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{
type: "number",
message: "输入正确的数字类型",
trigger: "blur",
transform: (val) => Number(val),
},
],
elparams: { placeholder: "输入托盘码放砖数" },
},
{
input: true,
label: "销售订单号",
prop: "saleNo",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "输入销售订单号" },
},
],
[
{
input: true,
label: "销售订单item号",
prop: "saleOrderItem",
elparams: { placeholder: "输入销售订单item号" },
},
{
input: true,
label: "销售订单砖数",
prop: "soqty",
rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" },
{
type: "number",
message: "输入正确的数字类型",
trigger: "blur",
transform: (val) => Number(val),
},
],
elparams: { placeholder: "输入销售订单砖数" },
},
{
datetime: true,
label: "销售时间",
prop: "deliveryTime",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "选择销售时间" },
},
{
label: "物料号销售文本",
prop: "shortDesc",
component: textOnlyComponent,
bind: {
useBuiltin: false,
},
},
],
[
{
select: true,
label: "客户",
prop: "customerId",
options: [],
optionLabel: "name",
fetchData: () =>
this.$http.get("/pms/customer/page", { params: { limit: 999, page: 1, name: "" } }),
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "选择客户" },
},
{
label: "托板类型",
prop: "palletType",
select: true,
options: getDictDataList("pallet_type").map((item) => ({
label: item.dictLabel,
value: item.dictValue,
})),
},
{
label: "贴纸板",
prop: "paperboard",
select: true,
options: [
{ label: "否", value: "0" },
{ label: "是", value: "1" },
],
},
{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } },
],
],
operations: [
// { 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: dialogJustFormConfigs,
tableConfig: {
table: null, // 此处可省略el-table 上的配置项
column: tableProps, // el-column-item 上的配置项
},
headFormConfigs: {
rules: null, // 名称是由 BaseSearchForm.vue 组件固定的
fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的
},
urls: {
base: "/pms/stockOrder",
page: "/pms/stockOrder/pageView",
pageIsPostApi: true,
templateUrl: '/importTemplates/PPVPImport.xlsx'
},
};
}

Wyświetl plik

@ -0,0 +1,46 @@
<template>
<ListViewWithHead
:table-config="tableConfig"
:head-config="headFormConfigs"
:dialog-configs="dialogConfigs"
:car-payload-dialog-configs="carPayloadDialogConfigs"
: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, dialogConfigs } = initConfig.call(this);
return {
tableConfig,
headFormConfigs,
allUrls: urls,
dialogConfigs,
triggerUpdateKey: "",
};
},
created() {},
mounted() {},
methods: {},
activated() {
this.triggerUpdateKey = Math.random().toString();
},
};
</script>
<style scoped></style>