|
|
@@ -0,0 +1,205 @@ |
|
|
|
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; |
|
|
|
// import switchBtn from "@/components/noTemplateComponents/switchBtn"; |
|
|
|
import TableTextComponent from '@/components/noTemplateComponents/detailComponent' |
|
|
|
import request from "@/utils/request"; |
|
|
|
import { timeFilter, dictFilter } from "@/utils/filters"; |
|
|
|
|
|
|
|
export default function () { |
|
|
|
const tableProps = [ |
|
|
|
{ type: "index", label: "序号" }, |
|
|
|
{ prop: "code", label: "任务编码" }, |
|
|
|
{ prop: "type", label: "任务类型" }, |
|
|
|
{ prop: "orderCode", label: "订单号" }, |
|
|
|
{ prop: "orderCate", label: "订单子号" }, |
|
|
|
{ prop: "eqCode", label: "目标设备" }, |
|
|
|
// { prop: "line", label: "中心线颜色", filter: dictFilter('line') }, |
|
|
|
{ prop: "startTime", label: "开始时间", filter: timeFilter }, |
|
|
|
{ prop: "endTime", label: "结束时间", filter: timeFilter }, |
|
|
|
{ prop: "status", label: "任务状态" }, |
|
|
|
{ prop: "view-detail", label: "查看详情", subcomponent: TableTextComponent }, |
|
|
|
{ prop: "createTime", label: "添加时间", filter: timeFilter }, |
|
|
|
{ |
|
|
|
prop: "operations", |
|
|
|
name: "操作", |
|
|
|
fixed: "right", |
|
|
|
width: 90, |
|
|
|
subcomponent: TableOperaionComponent, |
|
|
|
options: [ |
|
|
|
{ name: "detach", label: "下发", color: "#099", icon: "bottom-right", enable: injectData => injectData.startTime === null || injectData.startTime === undefined }, |
|
|
|
// { name: "edit", label: "编辑", icon: "edit-outline" }, |
|
|
|
// { name: "view", label: "查看详情", icon: "view" }, |
|
|
|
// { name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "" } |
|
|
|
], |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
const headFormFields = [ |
|
|
|
{ |
|
|
|
prop: "key", |
|
|
|
label: "任务编码", |
|
|
|
input: true, |
|
|
|
default: { value: "" }, |
|
|
|
bind: { |
|
|
|
placeholder: "请输入任务编码", |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: 'type', |
|
|
|
label: "任务类型", |
|
|
|
select: [ |
|
|
|
{ |
|
|
|
label: '送料至压机', |
|
|
|
value: '送料至压机', |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '混料机送出', |
|
|
|
value: '混料机送出', |
|
|
|
}, |
|
|
|
], |
|
|
|
default: { value: '' }, |
|
|
|
// fn: () => this.$http.get("/pms/material/page", { params: { page: 1, limit: 999 } }), |
|
|
|
// fieldOptionValue: 'name', // 把料仓筛选条件的label改为展示code,而不是展示name |
|
|
|
bind: { |
|
|
|
placeholder: '请选择任务类型', |
|
|
|
filterable: true |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: "eqId", |
|
|
|
label: "目标设备", |
|
|
|
select: [], |
|
|
|
default: { value: "" }, |
|
|
|
fn: () => this.$http.get(), |
|
|
|
bind: { |
|
|
|
placeholder: "请选择目标设备", |
|
|
|
filterable: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
timerange: true, |
|
|
|
prop: "timerange", |
|
|
|
label: "时间段", |
|
|
|
bind: { |
|
|
|
placeholder: "选择日期时间", |
|
|
|
type: "datetimerange", |
|
|
|
"start-placeholder": "开始时间", |
|
|
|
"end-placeholder": "结束时间", |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
button: { |
|
|
|
type: "primary", |
|
|
|
name: "查询", |
|
|
|
}, |
|
|
|
}, |
|
|
|
// { |
|
|
|
// button: { |
|
|
|
// type: "primary", |
|
|
|
// name: "新增", |
|
|
|
// permission: "", |
|
|
|
// }, |
|
|
|
// bind: { |
|
|
|
// plain: true, |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
]; |
|
|
|
|
|
|
|
/** |
|
|
|
* dialog config 有两个版本,一个适用于 DialogWithMenu 组件,另一个适用于 DialogJustForm 组件 |
|
|
|
* 适用于 DialogWithMenu 组件的配置示例详见 blenderStep/config.js |
|
|
|
* 此为后者的配置: |
|
|
|
*/ |
|
|
|
const dialogJustFormConfigs = { |
|
|
|
form: { |
|
|
|
rows: [ |
|
|
|
[ |
|
|
|
{ |
|
|
|
input: true, |
|
|
|
label: "批次号", |
|
|
|
prop: "batchNo", |
|
|
|
// rules: { required: true, message: "必填项不能为空", trigger: "blur" }, |
|
|
|
elparams: { placeholder: "-" }, |
|
|
|
}, |
|
|
|
], |
|
|
|
[ |
|
|
|
{ |
|
|
|
input: true, |
|
|
|
label: "配方", |
|
|
|
prop: "bom", |
|
|
|
// rules: { required: true, message: "必填项不能为空", trigger: "blur" }, |
|
|
|
elparams: { placeholder: "-" }, |
|
|
|
}, |
|
|
|
], |
|
|
|
[ |
|
|
|
{ |
|
|
|
input: true, |
|
|
|
label: "重量", |
|
|
|
prop: "batchSize", |
|
|
|
// rules: { required: true, message: "必填项不能为空", trigger: "blur" }, |
|
|
|
elparams: { placeholder: "-" }, |
|
|
|
}, |
|
|
|
], |
|
|
|
// [ |
|
|
|
// { |
|
|
|
// select: true, |
|
|
|
// label: "所属工厂", |
|
|
|
// prop: "factoryId", |
|
|
|
// fetchData: () => this.$http.get("/pms/factory/page", { params: { limit: 999, page: 1 } }), |
|
|
|
// option: [], |
|
|
|
// rules: { required: true, message: "必填项不能为空", trigger: "change" }, |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// input: true, |
|
|
|
// label: "产线TT值", |
|
|
|
// prop: "tvalue", |
|
|
|
// rules: [ |
|
|
|
// { required: true, message: "必填项不能为空", trigger: "blur" }, |
|
|
|
// { type: "number", message: "数字", trigger: "blur", transform: (val) => Number(val) }, |
|
|
|
// ], |
|
|
|
// elparams: { placeholder: "设定TT值(每小时下片数量)" }, |
|
|
|
// }, |
|
|
|
// ], |
|
|
|
// [ |
|
|
|
// { input: true, label: "规格", prop: "specifications", elparams: { placeholder: "规格" } }, |
|
|
|
// { |
|
|
|
// input: true, |
|
|
|
// label: "重量", |
|
|
|
// prop: "externalCode", |
|
|
|
// rules: [{ type: 'number', trigger: "blur", message: "请输入数字类型", transform: val => Number(val) }], |
|
|
|
// elparams: { placeholder: "外部编码" }, |
|
|
|
// }, |
|
|
|
// { input: true, label: "短描述", prop: "shortDesc", elparams: { placeholder: "短描述" } }, |
|
|
|
// ], |
|
|
|
// [{ textarea: true, label: "描述", prop: "description", elparams: { placeholder: "描述" } }], |
|
|
|
// [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }], |
|
|
|
], |
|
|
|
operations: [ |
|
|
|
// { name: "add", label: "保存", type: "primary", permission: "pms:shape:save", showOnEdit: false }, |
|
|
|
// { name: "update", label: "更新", type: "primary", permission: "pms:shape:update", showOnEdit: true }, |
|
|
|
// { name: "reset", label: "重置", type: "warning", showAlways: true }, |
|
|
|
// { name: 'cancel', label: '取消', 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/agvMission", |
|
|
|
page: "/pms/agvMission/page", |
|
|
|
detach: "/pms/agvTrans/delivery" |
|
|
|
// subase: '/pms/blenderStepParam', |
|
|
|
// subpage: '/pms/blenderStepParam/page', |
|
|
|
// more... |
|
|
|
}, |
|
|
|
}; |
|
|
|
} |