diff --git a/public/index.html b/public/index.html index 3b60c3f..18e8c15 100644 --- a/public/index.html +++ b/public/index.html @@ -40,8 +40,8 @@ // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.103:8080/pms-am'; // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.49:8080/pms-am'; // tengyun // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.67:8080/pms-am'; // wenzhang - // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tao - window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv + window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tao + // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv // window.SITE_CONFIG['apiURL'] = 'http://localhost:3000/p//////ms-am'; // xv <% } %> diff --git a/src/components/DialogCarPayload.vue b/src/components/DialogCarPayload.vue index 9c2f56b..654bcb7 100644 --- a/src/components/DialogCarPayload.vue +++ b/src/components/DialogCarPayload.vue @@ -100,15 +100,6 @@ export default { methods: { /** init **/ init(id) { - if (!id) { - this.$message({ - message: `没有传 id!`, - type: "error", - duration: 1500, - }); - //console.log("[*] 传入car payload对话框的id是", id); - return; - } this.showPaination = false; this.id = id; this.getList(); diff --git a/src/views/atomViews/ListViewWithHead.vue b/src/views/atomViews/ListViewWithHead.vue index cba10b4..c5129b3 100644 --- a/src/views/atomViews/ListViewWithHead.vue +++ b/src/views/atomViews/ListViewWithHead.vue @@ -659,6 +659,14 @@ export default { }, openCarPayloadDialog(id) { + if (!id) { + //console.log("[*] 传入car payload对话框的id是", id); + return this.$message({ + message: `没有传 id!`, + type: "error", + duration: 1500, + }); + } this.carPayloadDialogVisible = true; this.$nextTick(() => { this.$refs["car-payload-dialog"].init(id); diff --git a/src/views/modules/pms/agvList/config.js b/src/views/modules/pms/agvList/config.js new file mode 100644 index 0000000..c119871 --- /dev/null +++ b/src/views/modules/pms/agvList/config.js @@ -0,0 +1,143 @@ +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: "name", label: "库位" }, + { prop: "order", label: "订单" }, + { prop: "orderSub", label: "子号" }, + { prop: "batchNo", label: "批次号" }, + { prop: "gradeId", label: "配方" }, + { prop: "status", label: "状态", filter: val => (val != null) ? ['空库位', '满料盅', '空料盅'][val] : '-' }, + ]; + + const now = new Date(); + const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()]; + const today = new Date(y, m, d, 0, 0, 0, 0).getTime(); + const headFormFields = [ + { + // prop: "key", + label: "AGV库位", + }, + { + button: { + type: "primary", + permission: 'pms:agvList:info', + 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 } }), + // options: [], + // 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/trans/agvVisual", + page: "/pms/trans/agvVisual", + // detach: "/pms/agvTrans/delivery" + // subase: '/pms/blenderStepParam', + // subpage: '/pms/blenderStepParam/page', + // more... + }, + }; +} diff --git a/src/views/modules/pms/agvList/index.vue b/src/views/modules/pms/agvList/index.vue new file mode 100644 index 0000000..16fe9c0 --- /dev/null +++ b/src/views/modules/pms/agvList/index.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/src/views/modules/pms/agvMission/index.vue b/src/views/modules/pms/agvMission/index.vue index 7ccdd8e..3745068 100644 --- a/src/views/modules/pms/agvMission/index.vue +++ b/src/views/modules/pms/agvMission/index.vue @@ -7,7 +7,7 @@ import initConfig from './config'; import ListViewWithHead from '@/views/atomViews/ListViewWithHead.vue'; export default { - name: 'ProductionLineView', + name: 'AGVMission', components: { ListViewWithHead }, provide() { return { diff --git a/src/views/modules/pms/carHistory/components/ListViewWithHead.vue b/src/views/modules/pms/carHistory/components/ListViewWithHead.vue index 5b7bd1d..3a15460 100644 --- a/src/views/modules/pms/carHistory/components/ListViewWithHead.vue +++ b/src/views/modules/pms/carHistory/components/ListViewWithHead.vue @@ -141,9 +141,9 @@ export default { }; }, inject: ["urls"], - mounted() { - this.initDataWhenLoad && this.getList(); - }, + // mounted() { + // this.initDataWhenLoad && this.getList(); + // }, methods: { /** 获取 列表数据 */ getList(queryParams) { @@ -170,6 +170,7 @@ export default { // if (this.urls.pageIsPostApi) { // } else { // 默认是 get 方式请求 page + console.log("params: ", params); this.$http[this.urls.pageIsPostApi ? "post" : "get"]( this.urls.page, this.urls.pageIsPostApi diff --git a/src/views/modules/pms/carHistory/config.js b/src/views/modules/pms/carHistory/config.js index 149344e..fcf20c6 100644 --- a/src/views/modules/pms/carHistory/config.js +++ b/src/views/modules/pms/carHistory/config.js @@ -96,6 +96,7 @@ export default function () { { width: 80, prop: "orderCate", label: "订单子号" }, { prop: "bomCode", label: "配方" }, { prop: "shapeCode", label: "砖型" }, + { prop: "weight", label: "重量" }, { width: 80, prop: "qty", label: "订单数量" }, { width: 72, prop: "goodqty", label: "合格数" }, { width: 72, prop: "badqty", label: "废砖数" }, diff --git a/src/views/modules/pms/carHistory/index.vue b/src/views/modules/pms/carHistory/index.vue index 7b470fc..ca9a252 100644 --- a/src/views/modules/pms/carHistory/index.vue +++ b/src/views/modules/pms/carHistory/index.vue @@ -27,7 +27,8 @@ export default { // }, // }, data() { - const { tableConfig, headFormConfigs, carPayloadDialogConfigs, urls, dialogConfigs } = initConfig.call(this); + const { tableConfig, headFormConfigs, carPayloadDialogConfigs, urls, dialogConfigs } = + initConfig.call(this); return { carPayloadDialogConfigs, tableConfig, @@ -39,7 +40,6 @@ export default { }; }, activated() { - //console.log("activated", this.$route.query) this.code = this.$route.query.code || ""; this.triggerUpdateKey = Math.random().toString(); }, diff --git a/src/views/modules/pms/currentCarLocation/config.js b/src/views/modules/pms/currentCarLocation/config.js index 5e83d77..b25b981 100644 --- a/src/views/modules/pms/currentCarLocation/config.js +++ b/src/views/modules/pms/currentCarLocation/config.js @@ -89,6 +89,7 @@ export default function () { { width: 80, prop: "orderCate", label: "订单子号" }, { prop: "brand", label: "配方" }, { prop: "shapeCode", label: "砖型" }, + { prop: "weight", label: "重量" }, { width: 80, prop: "qty", label: "订单数量" }, { width: 72, prop: "goodqty", label: "合格数" }, { width: 72, prop: "badqty", label: "废砖数" }, diff --git a/src/views/modules/pms/workReport/config.js b/src/views/modules/pms/workReport/config.js index e68d1e7..c79d72e 100644 --- a/src/views/modules/pms/workReport/config.js +++ b/src/views/modules/pms/workReport/config.js @@ -56,17 +56,17 @@ export default function () { prop: "operations", name: "操作", fixed: "right", - width: 90, + width: 128, subcomponent: TableOperaionComponent, options: [ { name: "edit", label: "编辑", icon: "edit-outline" }, // enable: (row) => row.report == 0 }, - // { - // name: "delete", - // icon: "delete", - // label: "删除", - // emitFull: true, - // permission: "pms:workReport:delete", - // }, + { + name: "delete", + icon: "delete", + label: "删除", + emitFull: true, + permission: "pms:workReport:delete", + }, ], }, ];