2023-03-07 15:29:08 +08:00
|
|
|
|
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
|
|
|
|
|
import TableTextComponent from "@/components/noTemplateComponents/detailComponent";
|
2023-03-17 11:32:29 +08:00
|
|
|
|
// import StatusComponent from "@/components/noTemplateComponents/statusComponent";
|
2023-03-07 15:29:08 +08:00
|
|
|
|
import { timeFilter, dictFilter } from "@/utils/filters";
|
|
|
|
|
|
2023-03-07 15:34:43 +08:00
|
|
|
|
function changeOrderSort(orderId, location) {
|
|
|
|
|
/** this - vue instance, 0 - to top, 1 - up, 2 - down, 3 - to bottom */
|
2023-03-10 11:22:53 +08:00
|
|
|
|
return this.$http
|
|
|
|
|
.get("/pms/order/change", { params: { id: orderId, location } })
|
|
|
|
|
.then(({ data: res }) => {
|
|
|
|
|
if (res.code === 0) {
|
|
|
|
|
} else throw new Error(`${res.code}: ${res.msg}`);
|
2023-03-07 15:34:43 +08:00
|
|
|
|
})
|
2023-03-10 11:22:53 +08:00
|
|
|
|
.catch((err) => {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: err,
|
|
|
|
|
type: "error",
|
|
|
|
|
duration: 1500,
|
|
|
|
|
});
|
|
|
|
|
});
|
2023-03-07 15:34:43 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-07 15:29:08 +08:00
|
|
|
|
export default function () {
|
|
|
|
|
const operations = {
|
2023-03-10 11:22:53 +08:00
|
|
|
|
ongoing: [
|
2023-03-09 15:07:55 +08:00
|
|
|
|
// { name: 'confirm-order', label: '确认', icon: 'success', showText: true },
|
2023-03-17 11:32:29 +08:00
|
|
|
|
{ name: 'view', label: '查看详情', icon: 'view' },
|
|
|
|
|
{ name: "end-order", label: "结束", icon: "finished" },
|
|
|
|
|
{ name: "move-up", label: "上移", icon: "arrow-up" },
|
|
|
|
|
{ name: "move-down", label: "下移", icon: "arrow-down" },
|
|
|
|
|
{ name: "move-to-top", label: "至顶", icon: "upload2" },
|
|
|
|
|
{ name: "move-to-bottom", label: "至底", icon: "download" },
|
|
|
|
|
{ name: "destroy-order", label: "废除", icon: "close" },
|
2023-03-07 15:34:43 +08:00
|
|
|
|
],
|
2023-03-10 11:22:53 +08:00
|
|
|
|
pending: [
|
2023-03-17 11:32:29 +08:00
|
|
|
|
{ name: "edit", label: "编辑", icon: "edit-outline" },
|
|
|
|
|
{ name: 'view', label: '查看详情', icon: 'view' },
|
|
|
|
|
{ name: "confirm-order", label: "确认订单", icon: "success" },
|
|
|
|
|
{ name: "move-up", label: "上移", icon: "arrow-up" },
|
|
|
|
|
{ name: "move-down", label: "下移", icon: "arrow-down" },
|
|
|
|
|
{ name: "move-to-top", label: "至顶", icon: "upload2" }, // , showText: true },
|
|
|
|
|
{ name: "move-to-bottom", label: "至底", icon: "download" }, // , showText: true },
|
|
|
|
|
{ name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "" },
|
2023-03-07 15:34:43 +08:00
|
|
|
|
],
|
2023-03-10 11:22:53 +08:00
|
|
|
|
finished: [
|
2023-03-10 15:59:56 +08:00
|
|
|
|
{ name: 'view', label: '查看详情' },
|
|
|
|
|
{} // 占位
|
2023-03-09 15:07:55 +08:00
|
|
|
|
// { name: 'view', label: '查看详情' }
|
|
|
|
|
// { name: 'end-order', label: '结束订单', icon: 'error', showText: true },
|
2023-03-10 11:22:53 +08:00
|
|
|
|
],
|
|
|
|
|
};
|
2023-03-07 15:29:08 +08:00
|
|
|
|
|
2023-03-10 11:22:53 +08:00
|
|
|
|
const genTableProps = (type /** ongoing, pending, finished */) => [
|
|
|
|
|
{ width: 80, type: "index", label: "序号", fixed: true },
|
|
|
|
|
{ width: 120, prop: "code", label: "订单号", fixed: "left" },
|
|
|
|
|
{ width: 120, prop: "createTime", label: "添加时间", filter: timeFilter },
|
|
|
|
|
{ width: 120, prop: "statusDictValue", label: "订单状态", filter: dictFilter("order_status") }, // 不可编辑
|
|
|
|
|
{ width: 200, prop: "cate", label: "子订单号" },
|
|
|
|
|
{ width: 200, prop: "productCode", label: "物料编号" }, // select, filterable
|
|
|
|
|
{ width: 200, prop: "shapeCode", label: "砖型编号" }, // select, filterable
|
|
|
|
|
{ width: 120, prop: "brand", label: "牌号" }, // select, filterable
|
|
|
|
|
{ width: 80, prop: "addon", label: "addon" },
|
|
|
|
|
{ width: 120, prop: "ai", label: "版本号" }, // auto display according to the 配方
|
|
|
|
|
{ width: 200, prop: "shortDesc", label: "物料号销售文本" },
|
|
|
|
|
{ width: 200, prop: "bomCode", label: "配方编码" },
|
|
|
|
|
{ width: 200, prop: "pressCode", label: "压机号" }, // select, filterable
|
|
|
|
|
{ width: 200, prop: "blenderCode", label: "混料机号" }, // select, filterable
|
|
|
|
|
{ width: 200, prop: "kilnCode", label: "隧道窑号" }, // select, filterable
|
|
|
|
|
{ width: 120, prop: "prodqty", label: "订单砖数" },
|
|
|
|
|
{ width: 120, prop: "ktmp", label: "烧成温度" },
|
|
|
|
|
{ width: 120, prop: "tt", label: "烧成时间" },
|
|
|
|
|
{ width: 120, prop: "yieldqty", label: "已生产数量" }, // uneditable
|
|
|
|
|
{ width: 120, prop: "soqty", label: "销售订单数" },
|
|
|
|
|
{ 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: "deliveryTime", label: "发货时间" },
|
|
|
|
|
{ width: 120, prop: "customerCode", label: "客户" },
|
|
|
|
|
{ width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" },
|
2023-03-10 15:59:56 +08:00
|
|
|
|
// { prop: "description", label: "详情", subcomponent: TableTextComponent },
|
2023-03-10 11:22:53 +08:00
|
|
|
|
{ width: 200, prop: "remark", label: "备注" },
|
2023-03-10 15:59:56 +08:00
|
|
|
|
{
|
|
|
|
|
prop: "operations",
|
|
|
|
|
name: "操作",
|
|
|
|
|
fixed: "right",
|
|
|
|
|
subcomponent: TableOperaionComponent,
|
|
|
|
|
options: operations[type],
|
2023-03-17 14:03:13 +08:00
|
|
|
|
width: operations[type].length * 35,
|
2023-03-10 15:59:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// type !== "finished"
|
|
|
|
|
// ? {
|
|
|
|
|
// prop: "operations",
|
|
|
|
|
// name: "操作",
|
|
|
|
|
// fixed: "right",
|
|
|
|
|
// subcomponent: TableOperaionComponent,
|
|
|
|
|
// options: operations[type],
|
|
|
|
|
// width: operations[type].length * 64,
|
|
|
|
|
// }
|
|
|
|
|
// : {},
|
2023-03-10 11:22:53 +08:00
|
|
|
|
];
|
2023-03-08 10:52:14 +08:00
|
|
|
|
|
2023-03-10 11:22:53 +08:00
|
|
|
|
const genHeadFormFields = (type) =>
|
2023-03-10 15:59:56 +08:00
|
|
|
|
({
|
|
|
|
|
ongoing: [
|
|
|
|
|
{
|
|
|
|
|
label: "订单号",
|
|
|
|
|
prop: "code",
|
|
|
|
|
input: true,
|
|
|
|
|
default: { value: "" },
|
|
|
|
|
bind: { placeholder: "请输入订单号" },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
// 时间段
|
|
|
|
|
timerange: true,
|
|
|
|
|
prop: "timerange",
|
|
|
|
|
label: "时间段",
|
|
|
|
|
bind: {
|
|
|
|
|
placeholder: "选择日期时间",
|
|
|
|
|
type: "datetimerange",
|
|
|
|
|
"start-placeholder": "开始时间",
|
|
|
|
|
"end-placeholder": "结束时间",
|
2023-03-08 10:52:14 +08:00
|
|
|
|
},
|
2023-03-10 15:59:56 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
// 查询
|
|
|
|
|
button: {
|
|
|
|
|
type: "primary",
|
|
|
|
|
name: "查询",
|
2023-03-08 10:52:14 +08:00
|
|
|
|
},
|
2023-03-10 15:59:56 +08:00
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
pending: [
|
|
|
|
|
{
|
|
|
|
|
label: "订单号",
|
|
|
|
|
prop: "code",
|
|
|
|
|
input: true,
|
|
|
|
|
bind: { placeholder: "请输入订单号" },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
// 查询
|
|
|
|
|
button: {
|
|
|
|
|
type: "primary",
|
|
|
|
|
name: "查询",
|
2023-03-08 10:52:14 +08:00
|
|
|
|
},
|
2023-03-10 15:59:56 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
// 新增订单
|
|
|
|
|
button: {
|
|
|
|
|
type: "primary",
|
|
|
|
|
name: "新增",
|
|
|
|
|
permission: "",
|
2023-03-10 11:22:53 +08:00
|
|
|
|
},
|
2023-03-10 15:59:56 +08:00
|
|
|
|
bind: {
|
|
|
|
|
plain: true,
|
2023-03-08 10:52:14 +08:00
|
|
|
|
},
|
2023-03-10 15:59:56 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
// 导入订单 - TODO: 需完善具体接口和功能
|
|
|
|
|
button: {
|
|
|
|
|
type: "success",
|
|
|
|
|
name: "导入订单",
|
2023-03-08 10:52:14 +08:00
|
|
|
|
},
|
2023-03-10 15:59:56 +08:00
|
|
|
|
bind: {
|
|
|
|
|
plain: true,
|
2023-03-08 10:52:14 +08:00
|
|
|
|
},
|
2023-03-10 15:59:56 +08:00
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
finished: [
|
|
|
|
|
{
|
|
|
|
|
label: "订单号",
|
|
|
|
|
prop: "code",
|
|
|
|
|
input: true,
|
|
|
|
|
bind: { placeholder: "请输入订单号" },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
// 查询
|
|
|
|
|
button: {
|
|
|
|
|
type: "primary",
|
|
|
|
|
name: "查询",
|
2023-03-10 11:22:53 +08:00
|
|
|
|
},
|
2023-03-10 15:59:56 +08:00
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
}[type]);
|
2023-03-08 10:52:14 +08:00
|
|
|
|
|
2023-03-09 17:01:53 +08:00
|
|
|
|
const textOnlyComponent = {
|
|
|
|
|
props: {
|
|
|
|
|
modelValue: {
|
2023-03-10 11:22:53 +08:00
|
|
|
|
type: String | Number,
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
useBuiltin: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2023-03-09 17:01:53 +08:00
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2023-03-10 11:22:53 +08:00
|
|
|
|
orderStatusMap: ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝"],
|
|
|
|
|
};
|
2023-03-09 17:01:53 +08:00
|
|
|
|
},
|
|
|
|
|
render: function (h) {
|
2023-03-10 11:22:53 +08:00
|
|
|
|
return h(
|
|
|
|
|
"span",
|
|
|
|
|
{ style: { display: "block", marginTop: "0" } },
|
|
|
|
|
this.useBuiltin ? this.orderStatusMap[this.modelValue] ?? "-" : this.modelValue.toString().trim() === "" ? "-" : this.modelValue.toString()
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
};
|
2023-03-09 17:01:53 +08:00
|
|
|
|
|
2023-03-07 15:29:08 +08:00
|
|
|
|
const dictList = JSON.parse(localStorage.getItem("dictList"));
|
|
|
|
|
const dialogConfigs = {
|
|
|
|
|
form: {
|
|
|
|
|
rows: [
|
|
|
|
|
[
|
2023-03-10 11:22:53 +08:00
|
|
|
|
{
|
|
|
|
|
label: "订单状态",
|
|
|
|
|
prop: "statusDictValue",
|
|
|
|
|
component: textOnlyComponent,
|
|
|
|
|
},
|
2023-03-07 15:29:08 +08:00
|
|
|
|
{
|
|
|
|
|
input: true,
|
2023-03-09 17:01:53 +08:00
|
|
|
|
label: "订单号",
|
|
|
|
|
prop: "code",
|
2023-03-07 15:29:08 +08:00
|
|
|
|
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
2023-03-09 17:01:53 +08:00
|
|
|
|
elparams: { placeholder: "请输入订单号" },
|
2023-03-07 15:29:08 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
input: true,
|
2023-03-09 17:01:53 +08:00
|
|
|
|
label: "订单子号",
|
|
|
|
|
prop: "cate",
|
|
|
|
|
rules: [
|
|
|
|
|
{ required: true, message: "必填项不能为空", trigger: "blur" },
|
2023-03-10 11:22:53 +08:00
|
|
|
|
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
|
2023-03-09 17:01:53 +08:00
|
|
|
|
],
|
|
|
|
|
elparams: { placeholder: "请输入订单子号" },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
input: true,
|
|
|
|
|
label: "生产订单类型",
|
|
|
|
|
prop: "specifications",
|
|
|
|
|
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
|
|
|
|
elparams: { placeholder: "请输入生产订单类型" },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
select: true,
|
2023-03-10 11:22:53 +08:00
|
|
|
|
label: "物料编号",
|
|
|
|
|
prop: "productId",
|
2023-03-09 17:01:53 +08:00
|
|
|
|
options: [],
|
2023-03-10 11:22:53 +08:00
|
|
|
|
optionLabel: "code",
|
|
|
|
|
// optionValue: 'code',
|
|
|
|
|
// fetchedDataIdConvertTo: 'productId',
|
|
|
|
|
// optionValue: 'id',
|
|
|
|
|
fetchData: () => this.$http.get("/pms/product/page", { params: { limit: 999, page: 1, key: "" } }),
|
|
|
|
|
// label: "单位",
|
|
|
|
|
// prop: "unitDictValue",
|
|
|
|
|
// options: dictList["unit"].map((u) => ({ label: u.dictLabel, value: u.dictValue })),
|
|
|
|
|
elparams: { placeholder: "请选择物料", filterable: true },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
select: true,
|
|
|
|
|
label: "包装代码",
|
|
|
|
|
prop: "packTech",
|
|
|
|
|
options: [],
|
|
|
|
|
optionLabel: "code",
|
|
|
|
|
fetchData: () => this.$http.post("/pms/equipmentTech/pageView", { limit: 999, page: 1, key: "", shape: "", wsId: 5 }),
|
2023-03-09 17:01:53 +08:00
|
|
|
|
// label: "单位",
|
|
|
|
|
// prop: "unitDictValue",
|
|
|
|
|
// options: dictList["unit"].map((u) => ({ label: u.dictLabel, value: u.dictValue })),
|
|
|
|
|
elparams: { placeholder: "请选择物料", filterable: true },
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
input: true,
|
|
|
|
|
label: "生产订单砖数",
|
|
|
|
|
prop: "prodqty",
|
2023-03-10 15:03:36 +08:00
|
|
|
|
rules: [
|
|
|
|
|
{ required: true, message: "必填项不能为空", trigger: "blur" },
|
|
|
|
|
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
|
|
|
|
|
],
|
2023-03-09 17:01:53 +08:00
|
|
|
|
elparams: { placeholder: "请输入要求生产的数量" },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
input: true,
|
|
|
|
|
label: "已生产数",
|
|
|
|
|
prop: "yieldqty",
|
|
|
|
|
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
2023-03-10 15:03:36 +08:00
|
|
|
|
rules: [
|
|
|
|
|
// { required: true, message: "必填项不能为空", trigger: "blur" },
|
|
|
|
|
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
|
|
|
|
|
],
|
2023-03-09 17:01:53 +08:00
|
|
|
|
elparams: { placeholder: "请输入已经生产的数量" },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
input: true,
|
|
|
|
|
label: "托盘码放砖数",
|
|
|
|
|
prop: "pcsKilnCar",
|
2023-03-10 15:03:36 +08:00
|
|
|
|
rules: [
|
|
|
|
|
{ required: true, message: "必填项不能为空", trigger: "blur" },
|
|
|
|
|
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
|
|
|
|
|
],
|
2023-03-09 17:01:53 +08:00
|
|
|
|
elparams: { placeholder: "请输入要求生产的数量" },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
input: true,
|
|
|
|
|
label: "Add on",
|
2023-03-10 15:59:56 +08:00
|
|
|
|
prop: "sapParam1",
|
2023-03-09 17:01:53 +08:00
|
|
|
|
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
|
|
|
|
elparams: { placeholder: "请输入addon" },
|
2023-03-07 15:29:08 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
select: true,
|
2023-03-10 11:22:53 +08:00
|
|
|
|
label: "砖型",
|
|
|
|
|
prop: "shape",
|
|
|
|
|
optionLabel: "code",
|
2023-03-09 17:01:53 +08:00
|
|
|
|
options: [],
|
2023-03-10 11:22:53 +08:00
|
|
|
|
fetchData: () => this.$http.get("/pms/shape/page", { params: { limit: 999, page: 1, key: "" } }),
|
2023-03-09 17:01:53 +08:00
|
|
|
|
// label: "单位",
|
|
|
|
|
// prop: "unitDictValue",
|
|
|
|
|
// options: dictList["unit"].map((u) => ({ label: u.dictLabel, value: u.dictValue })),
|
2023-03-10 11:22:53 +08:00
|
|
|
|
elparams: { placeholder: "请选择砖型", filterable: true },
|
2023-03-07 15:29:08 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
select: true,
|
2023-03-10 11:22:53 +08:00
|
|
|
|
label: "压机",
|
|
|
|
|
prop: "press",
|
2023-03-07 15:29:08 +08:00
|
|
|
|
options: [],
|
2023-03-10 11:22:53 +08:00
|
|
|
|
optionLabel: "code",
|
2023-03-10 15:14:55 +08:00
|
|
|
|
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
2023-03-10 11:22:53 +08:00
|
|
|
|
fetchData: () => this.$http.get("/pms/equipment/page", { params: { limit: 999, page: 1, name: "" } }),
|
|
|
|
|
elparams: { placeholder: "请选择压机号", filterable: true },
|
2023-03-07 15:29:08 +08:00
|
|
|
|
},
|
2023-03-10 11:22:53 +08:00
|
|
|
|
],
|
|
|
|
|
[
|
2023-03-07 15:29:08 +08:00
|
|
|
|
{
|
|
|
|
|
select: true,
|
2023-03-09 17:01:53 +08:00
|
|
|
|
label: "牌号",
|
2023-03-10 15:59:56 +08:00
|
|
|
|
prop: "bomId",
|
2023-03-09 17:01:53 +08:00
|
|
|
|
options: [],
|
2023-03-10 11:22:53 +08:00
|
|
|
|
// optionLabel: '',
|
2023-03-10 15:03:36 +08:00
|
|
|
|
fetchData: () => this.$http.get("/pms/bom/page", { params: { limit: 999, page: 1, key: "", externalCode: "" } }),
|
2023-03-09 17:01:53 +08:00
|
|
|
|
elparams: { placeholder: "请选择牌号", filterable: true },
|
|
|
|
|
// TODO: 选择后,需要带出一些数据
|
2023-03-10 15:03:36 +08:00
|
|
|
|
injectTo: [
|
2023-03-10 15:59:56 +08:00
|
|
|
|
['bomCode', 'code'],
|
|
|
|
|
['ai', 'externalCode']
|
2023-03-10 15:03:36 +08:00
|
|
|
|
]
|
2023-03-09 17:01:53 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-10 11:22:53 +08:00
|
|
|
|
// input: true,
|
|
|
|
|
// select: true,
|
|
|
|
|
label: "配方号代码",
|
|
|
|
|
prop: "bomCode",
|
|
|
|
|
// options: [],
|
|
|
|
|
// optionLabel: 'code',
|
|
|
|
|
// fetchData: () => this.$http.get("/pms/bom/page", { params: { limit: 999, page: 1, key: "" } }),
|
|
|
|
|
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
|
|
|
|
// elparams: { placeholder: "请选择配方" },
|
|
|
|
|
component: textOnlyComponent,
|
|
|
|
|
bind: {
|
|
|
|
|
useBuiltin: false,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "版本号",
|
|
|
|
|
prop: "ai",
|
|
|
|
|
component: textOnlyComponent,
|
|
|
|
|
bind: {
|
|
|
|
|
useBuiltin: false,
|
|
|
|
|
},
|
2023-03-09 17:01:53 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
select: true,
|
|
|
|
|
label: "混料机号",
|
2023-03-10 11:22:53 +08:00
|
|
|
|
prop: "blender",
|
2023-03-09 17:01:53 +08:00
|
|
|
|
options: [],
|
2023-03-10 11:22:53 +08:00
|
|
|
|
optionLabel: "code",
|
2023-03-10 15:14:55 +08:00
|
|
|
|
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
2023-03-10 11:22:53 +08:00
|
|
|
|
fetchData: () => this.$http.get("/pms/equipment/page", { params: { limit: 999, page: 1, name: "" } }),
|
2023-03-09 17:01:53 +08:00
|
|
|
|
elparams: { placeholder: "请选择混料机号", filterable: true },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
select: true,
|
|
|
|
|
label: "隧道窑号",
|
2023-03-10 11:22:53 +08:00
|
|
|
|
prop: "kiln",
|
2023-03-09 17:01:53 +08:00
|
|
|
|
options: [],
|
2023-03-10 11:22:53 +08:00
|
|
|
|
optionLabel: "code",
|
|
|
|
|
fetchData: () => this.$http.get("/pms/equipment/page", { params: { limit: 999, page: 1, name: "" } }),
|
2023-03-09 17:01:53 +08:00
|
|
|
|
elparams: { placeholder: "请选择隧道窑号", filterable: true },
|
2023-03-07 15:29:08 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
input: true,
|
2023-03-10 11:22:53 +08:00
|
|
|
|
label: "烧成温度 ℃",
|
2023-03-10 15:59:56 +08:00
|
|
|
|
prop: "sapParam6",
|
2023-03-10 15:03:36 +08:00
|
|
|
|
rules: [
|
|
|
|
|
{ required: true, message: "必填项不能为空", trigger: "blur" },
|
|
|
|
|
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
|
|
|
|
|
],
|
2023-03-09 17:01:53 +08:00
|
|
|
|
elparams: { placeholder: "请输入烧成温度" },
|
|
|
|
|
},
|
2023-03-10 11:22:53 +08:00
|
|
|
|
// {
|
2023-03-10 15:59:56 +08:00
|
|
|
|
// input: true,
|
2023-03-10 11:22:53 +08:00
|
|
|
|
// label: "版本号",
|
|
|
|
|
// prop: "ai",
|
|
|
|
|
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
|
|
|
|
// elparams: { placeholder: "请输入版本号" },
|
|
|
|
|
// },
|
|
|
|
|
],
|
|
|
|
|
[
|
2023-03-09 17:01:53 +08:00
|
|
|
|
{
|
|
|
|
|
input: true,
|
2023-03-10 11:22:53 +08:00
|
|
|
|
label: "烧成时间 H",
|
2023-03-10 15:59:56 +08:00
|
|
|
|
prop: "sapParam7",
|
2023-03-10 15:03:36 +08:00
|
|
|
|
rules: [
|
|
|
|
|
{ required: true, message: "必填项不能为空", trigger: "blur" },
|
|
|
|
|
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
|
|
|
|
|
],
|
2023-03-09 17:01:53 +08:00
|
|
|
|
elparams: { placeholder: "请输入烧成时间" },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
input: true,
|
|
|
|
|
label: "销售订单号",
|
|
|
|
|
prop: "saleNo",
|
|
|
|
|
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
|
|
|
|
elparams: { placeholder: "请输入销售订单号" },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
input: true,
|
|
|
|
|
label: "销售订单item号",
|
|
|
|
|
prop: "saleOrderItem",
|
2023-03-10 11:22:53 +08:00
|
|
|
|
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
2023-03-09 17:01:53 +08:00
|
|
|
|
elparams: { placeholder: "请输入销售订单item号" },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
input: true,
|
|
|
|
|
label: "销售订单砖数",
|
|
|
|
|
prop: "soqty",
|
2023-03-10 15:03:36 +08:00
|
|
|
|
rules: [
|
|
|
|
|
{ required: true, message: "必填项不能为空", trigger: "blur" },
|
|
|
|
|
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
|
|
|
|
|
],
|
2023-03-09 17:01:53 +08:00
|
|
|
|
elparams: { placeholder: "请输入销售订单砖数" },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
// time
|
2023-03-10 11:22:53 +08:00
|
|
|
|
datetime: true,
|
2023-03-09 17:01:53 +08:00
|
|
|
|
label: "销售时间",
|
|
|
|
|
prop: "deliveryTime",
|
|
|
|
|
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
2023-03-10 11:22:53 +08:00
|
|
|
|
elparams: { placeholder: "请选择销售时间" },
|
2023-03-07 15:29:08 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-10 11:22:53 +08:00
|
|
|
|
select: true,
|
2023-03-09 17:01:53 +08:00
|
|
|
|
label: "客户",
|
2023-03-10 11:22:53 +08:00
|
|
|
|
prop: "customerId",
|
|
|
|
|
option: [],
|
|
|
|
|
optionLabel: "name",
|
|
|
|
|
fetchData: () => this.$http.get("/pms/customer/page", { params: { limit: 999, page: 1, name: "" } }),
|
2023-03-09 17:01:53 +08:00
|
|
|
|
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
2023-03-10 11:22:53 +08:00
|
|
|
|
elparams: { placeholder: "请选择客户" },
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
// {
|
|
|
|
|
// input: true,
|
|
|
|
|
// label: "物料号销售文本",
|
|
|
|
|
// prop: "shortDesc",
|
|
|
|
|
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
|
|
|
|
// elparams: { placeholder: "请输入物料号销售文本" },
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
label: "物料号销售文本",
|
|
|
|
|
prop: "shortDesc",
|
|
|
|
|
component: textOnlyComponent,
|
|
|
|
|
bind: {
|
|
|
|
|
useBuiltin: false,
|
|
|
|
|
},
|
2023-03-07 15:29:08 +08:00
|
|
|
|
},
|
|
|
|
|
],
|
2023-03-09 17:01:53 +08:00
|
|
|
|
|
|
|
|
|
// 备注
|
|
|
|
|
[{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
|
2023-03-10 11:22:53 +08:00
|
|
|
|
// {
|
|
|
|
|
// select: true,
|
|
|
|
|
// label: "原料类别",
|
|
|
|
|
// prop: "typeDictValue",
|
|
|
|
|
// options: dictList["material_category"].map((u) => ({ label: u.dictLabel, value: u.dictValue })),
|
|
|
|
|
// elparams: { placeholder: "原料类别" },
|
|
|
|
|
// // autoDisabled: true
|
|
|
|
|
// },
|
2023-03-07 15:29:08 +08:00
|
|
|
|
],
|
|
|
|
|
operations: [
|
2023-03-10 11:22:53 +08:00
|
|
|
|
{ name: "add", label: "保存", type: "primary", permission: "", showOnEdit: false },
|
|
|
|
|
{ name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true },
|
2023-03-07 15:29:08 +08:00
|
|
|
|
{ name: "reset", label: "重置", type: "warning", showAlways: true },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
dialogConfigs,
|
|
|
|
|
tableConfigs: {
|
2023-03-10 11:22:53 +08:00
|
|
|
|
ongoingTable: genTableProps("ongoing"),
|
|
|
|
|
pendingTable: genTableProps("pending"),
|
|
|
|
|
finishedTable: genTableProps("finished"),
|
2023-03-07 15:29:08 +08:00
|
|
|
|
},
|
|
|
|
|
headFormConfigs: {
|
2023-03-10 11:22:53 +08:00
|
|
|
|
ongoingTableSearch: genHeadFormFields("ongoing"),
|
|
|
|
|
pendingTableSearch: genHeadFormFields("pending"),
|
|
|
|
|
finishedTableSearch: genHeadFormFields("finished"),
|
2023-03-07 15:29:08 +08:00
|
|
|
|
},
|
|
|
|
|
urls: {
|
2023-03-10 11:22:53 +08:00
|
|
|
|
confirmedOrder: "/pms/order/pageCom",
|
|
|
|
|
finishedOrder: "/pms/order/pageEnd",
|
|
|
|
|
unConfirmedOrder: "/pms/order/pageUnCom",
|
|
|
|
|
base: "/pms/order",
|
2023-03-07 15:29:08 +08:00
|
|
|
|
// base: "/pms/material",
|
|
|
|
|
// page: "/pms/material/page",
|
|
|
|
|
// tree: "/pms/material/tree",
|
|
|
|
|
// subase: "/pms/materialArrt",
|
|
|
|
|
// subpage: "/pms/materialArrt/page",
|
|
|
|
|
// more...
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
2023-03-08 11:17:52 +08:00
|
|
|
|
|
2023-03-10 11:22:53 +08:00
|
|
|
|
// const headFormFields = [
|
|
|
|
|
// {
|
|
|
|
|
// label: '订单号',
|
|
|
|
|
// prop: 'code',
|
|
|
|
|
// input: true,
|
|
|
|
|
// bind: { placeholder: '请输入订单号' }
|
|
|
|
|
// },
|
|
|
|
|
// // {
|
|
|
|
|
// // label: '子订单号',
|
|
|
|
|
// // prop: 'cate',
|
|
|
|
|
// // input: true,
|
|
|
|
|
// // bind: { placeholder: '请输入子订单号', rules: [{ type: 'number', message: '请输入整数', trigger: 'blur', transform: val => Number(val) }] }
|
|
|
|
|
// // },
|
|
|
|
|
// // {
|
|
|
|
|
// // label: "配方",
|
|
|
|
|
// // prop: "bomId",
|
|
|
|
|
// // select: [],
|
|
|
|
|
// // fn: () => this.$http.get('/pms/bom/page', { params: { key: '', limit: 999, page: 1 } }),
|
|
|
|
|
// // bind: { placeholder: "请选择配方" },
|
|
|
|
|
// // },
|
|
|
|
|
// // {
|
|
|
|
|
// // label: '砖型',
|
|
|
|
|
// // prop: 'shapeId',
|
|
|
|
|
// // select: [],
|
|
|
|
|
// // fn: () => this.$http.get('/pms/shape/page', { params: { key: '', limit: 999, page: 1 } }),
|
|
|
|
|
// // bind: { placeholder: "请选择砖型" },
|
|
|
|
|
// // },
|
|
|
|
|
// // {
|
|
|
|
|
// // label: '工艺',
|
|
|
|
|
// // prop: 'techId',
|
|
|
|
|
// // select: [],
|
|
|
|
|
// // fn: () => this.$http.post('/pms/equipmentTech/pageView', { key: '', shape: '', wsId: 0, limit: 999, page: 1 }),
|
|
|
|
|
// // bind: { placeholder: "请选择砖型" },
|
|
|
|
|
// // },
|
|
|
|
|
// // {
|
|
|
|
|
// // label: '订单状态',
|
|
|
|
|
// // prop: 'types', // 0等待, 1确认, 2生产,3暂停, 4结束, 5接受, 6拒绝
|
|
|
|
|
// // select: [
|
|
|
|
|
// // {label: '等待', value: 0},
|
|
|
|
|
// // {label: '确认', value: 1},
|
|
|
|
|
// // {label: '生产', value: 2},
|
|
|
|
|
// // {label: '暂停', value: 3},
|
|
|
|
|
// // {label: '结束', value: 4},
|
|
|
|
|
// // {label: '接受', value: 5},
|
|
|
|
|
// // {label: '拒绝', value: 6},
|
|
|
|
|
// // ],
|
|
|
|
|
// // // fn: () => this.$http.post('/pms/equipmentTech/pageView', { key: '', shape: '', wsId: 0, limit: 999, page: 1 }),
|
|
|
|
|
// // bind: { placeholder: "请选择订单状态" },
|
|
|
|
|
// // },
|
|
|
|
|
// {
|
|
|
|
|
// button: {
|
|
|
|
|
// type: "primary",
|
|
|
|
|
// name: "查询",
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// button: {
|
|
|
|
|
// type: "primary",
|
|
|
|
|
// name: "新增",
|
|
|
|
|
// permission: "",
|
|
|
|
|
// },
|
|
|
|
|
// bind: {
|
|
|
|
|
// plain: true,
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// ];
|