diff --git a/public/index.html b/public/index.html index 8cd3f34..78aa5e3 100644 --- a/public/index.html +++ b/public/index.html @@ -38,9 +38,9 @@ <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %> <% } %> diff --git a/src/views/modules/pms/qualityInspectionRecord/config.js b/src/views/modules/pms/qualityInspectionRecord/config.js new file mode 100644 index 0000000..45c55f0 --- /dev/null +++ b/src/views/modules/pms/qualityInspectionRecord/config.js @@ -0,0 +1,230 @@ +import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent"; +import TableTextComponent from "@/components/noTemplateComponents/detailComponent"; +// import StatusComponent from "@/components/noTemplateComponents/statusComponent"; +import { timeFilter } from "@/utils/filters"; + +export default function () { + const tableProps = [ + { type: "index", label: "序号" }, + { width: 160, prop: "createTime", label: "添加时间", filter: timeFilter }, + { prop: "carCode", label: "窑车号" }, + { prop: "orderCode", label: "订单号" }, + { prop: "orderCate", label: "子号" }, + { prop: "scrap", label: "是否报废" }, + { prop: "qty", label: "抽检数量" }, + { prop: "badqty", label: "不合格数量" }, + { prop: 'description', label: '查看详情', subcomponent: TableTextComponent }, + { width: 160, prop: "checkTime", label: "检测时间", filter: timeFilter }, + { + prop: "operations", + name: "操作", + fixed: "right", + width: 90, + subcomponent: TableOperaionComponent, + options: [ + { name: "edit", label: "编辑", icon: "edit-outline", }, + { name: 'delete', label: '删除', icon: 'delete' }, + + // 只有 injectRow.task 为手动时,才允许编辑 + // { name:"edit", label: "编辑", icon: "edit-outline", enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual' } }, + // { name: 'delete', icon: 'delete', enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual' } }, + // 只有 injectRow.status 为 waiting 时,才允许编辑 + // { name: "edit", label: "编辑", icon: "edit-outline", enable: injectRow => { return 'status' in injectRow && injectRow.status === 'Waiting' } }, + // { name: 'delete', icon: 'delete', emitFull: true, promptField: 'batchNo', enable: injectRow => { return 'status' in injectRow && injectRow.status === 'Waiting' } }, + ] + }, + ]; + + const headFormFields = [ + { + prop: "orderId", + label: "订单号", + fieldOptionLabel: 'code', + // fieldOptionValue: 'id', + select: [], + fn: () => this.$http.post("/pms/order/pageView", { page: 1, limit: 999 }), + bind: { + placeholder: "请选择订单号", + filterable: true + }, + }, + { + prop: "carId", + label: "窑车号", + select: [], + fn: () => this.$http.get("/pms/car/page", { params: { page: 1, limit: 999 } }), + 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, + } + }, + ]; + + const dialogJustFormConfigs = { + // extra blenderOrderId + // extraIds: {}, + form: { + rows: [ + [ + { + input: true, + label: "窑车号", + prop: "carId", + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请输入批次编码" }, + }, + { + input: true, + label: "当前位置", + prop: "posCode", + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请入当前位置" }, + }, + { + select: true, + label: "当前状态", + prop: "carState", + options: [ + { label: '没有数据', value: 0 }, + { label: '正常窑车', value: 1 }, + { label: '判废窑车', value: 2 }, + { label: '摆渡车', value: 3 }, + { label: '空窑车', value: 4 }, + ], + rules: { required: true, message: "必选项不能为空", trigger: "blur" }, + elparams: { placeholder: "请选择状态" }, + }, + { + select: true, + label: "整车报废", + prop: "scrap", + options: [ + { label: '是', value: 'yes' }, + { label: '否', value: 'no', default: true }, + ], + rules: { required: true, message: "必选项不能为空", trigger: "blur" }, + elparams: { placeholder: "请选择报废状态" }, + }, + ], + [ + { + input: true, + label: "订单号", + prop: "orderId", + rules: { required: true, message: "必选项不能为空", trigger: "blur" }, + elparams: { placeholder: "请选择订单" }, + }, + { + input: true, + label: "子号", + prop: "orderCate" + }, + { + input: true, + label: "砖型", + prop: "shapeCode" + }, + { + input: true, + label: "订单砖数", + prop: "orderQty", + }, + ], + [ + { + input: true, + label: "抽检数量", + prop: "orderQty", + rules: [ + { required: true, message: "必填项不能为空", trigger: "blur" }, + { type: 'number', message: '请输入正确的数字类型', trigger: 'blur', transform: val => Number(val) } + ], + elparams: { placeholder: "请输入抽检数量" }, + }, + { + input: true, + label: "不合格量", + prop: "badqty", + rules: [ + { required: true, message: "必填项不能为空", trigger: "blur" }, + { type: 'number', message: '请输入正确的数字类型', trigger: 'blur', transform: val => Number(val) } + ], + elparams: { placeholder: "请输入不合格量" }, + }, + { + input: true, + label: "检测人", + prop: "checkPerson", + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请输入批次编码" }, + }, + { + datetime: true, + label: "检测时间", + prop: "checkTime", + rules: { required: true, message: "必填项不能为空", trigger: "blur" }, + elparams: { placeholder: "请选择检测时间", type: 'datetime' }, + }, + ], + [ + { + textarea: true, + label: "描述", + prop: "explainText", + 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/qualityInspectionRecord/pageView", + page: "/pms/qualityInspectionRecord/pageView", + pageIsPostApi: true, + // subase: "/pms/equipmentTechParam", + }, + }; +} diff --git a/src/views/modules/pms/qualityInspectionRecord/index.vue b/src/views/modules/pms/qualityInspectionRecord/index.vue new file mode 100644 index 0000000..669f231 --- /dev/null +++ b/src/views/modules/pms/qualityInspectionRecord/index.vue @@ -0,0 +1,64 @@ + + + + +