diff --git a/.env.dev b/.env.dev index f246ea0d..d0716c26 100644 --- a/.env.dev +++ b/.env.dev @@ -1,7 +1,7 @@ ### # @Author: Do not edit # @Date: 2023-08-29 09:40:39 - # @LastEditTime: 2024-07-22 16:34:50 + # @LastEditTime: 2024-07-31 14:57:31 # @LastEditors: zhp # @Description: ### @@ -16,12 +16,14 @@ VUE_APP_TITLE = MES系统 # VUE_APP_BASE_API = 'http://192.168.0.33:48082' # VUE_APP_BASE_API = 'http://192.168.4.173:48080' # VUE_APP_BASE_API = 'http://192.168.2.173:48080' -# VUE_APP_BASE_API = 'http://192.168.1.49:48082' +# VUE_APP_BASE_API = 'http://192.168.1.81:48082' # VUE_APP_BASE_API = 'http://192.168.1.8:48082' # VUE_APP_BASE_API = 'http://192.168.4.159:48080' # VUE_APP_BASE_API = 'http://192.168.1.56:48082' # VUE_APP_BASE_API = 'http://192.168.4.159:48080' -VUE_APP_BASE_API = 'http://192.168.1.64:48082' +# VUE_APP_BASE_API = 'http://192.168.1.64:48082' +VUE_APP_BASE_API = 'http://192.168.1.99:48082' + # 积木报表指向地址 diff --git a/package.json b/package.json index 570a5c86..b51a8bc6 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "benz-amr-recorder": "^1.1.5", "bpmn-js-token-simulation": "0.10.0", "clipboard": "2.0.8", - "code-brick-zj": "^1.0.2", + "code-brick-zj": "^1.0.5", "core-js": "^3.26.0", "crypto-js": "^4.0.0", "diagram-js": "^12.3.0", diff --git a/src/api/base/orderGroup.js b/src/api/base/orderGroup.js new file mode 100644 index 00000000..5751107f --- /dev/null +++ b/src/api/base/orderGroup.js @@ -0,0 +1,72 @@ +import request from '@/utils/request' +// 获得集团订单分页 +export function getOrderGroupPage(query) { + return request({ + url: '/base/order-group/page', + method: 'get', + params: query + }) +} + +// 获得集团订单 +export function getOrderGroup(query) { + return request({ + url: '/base/order-group/get', + method: 'get', + params: query + }) +} + +// 更新集团订单 +export function updateOrderGroup(data) { + return request({ + url: '/base/order-group/update', + method: 'put', + data: data + }) +} + +// 创建集团订单 +export function createOrderGroup(data) { + return request({ + url: '/base/order-group/create', + method: 'post', + data: data + }) +} + +// 修改集团订单状态,结束-终止-作废用 +export function groupOrderStatusSet(data) { + return request({ + url: '/base/order-group/groupOrderStatusSet', + method: 'put', + data: data + }) +} + +// 获得集团订单详情 +export function orderGroupDetail(query) { + return request({ + url: '/base/order-group/getDetail', + method: 'get', + params: query + }) +} + +// 创建集团订单与厂务订单表关联表 一对多 +export function orderConGroupOrder(data) { + return request({ + url: '/base/order-con-group-order/create', + method: 'post', + data: data + }) +} + +// 订单监控 +export function orderGroupMonitor(query) { + return request({ + url: '/base/order-group/orderGroupMonitor', + method: 'get', + params: query + }) +} diff --git a/src/api/base/orderManage.js b/src/api/base/orderManage.js index 9933c9b7..61e8c222 100644 --- a/src/api/base/orderManage.js +++ b/src/api/base/orderManage.js @@ -125,7 +125,7 @@ export function orderAssignmentList(query) { // 获得所有客户列表 export function customerList() { return request({ - url: '/base/core-customer/listAll', + url: 'base/core-customer/listAll', method: 'get' }) } @@ -155,4 +155,13 @@ export function orderFinish(query) { method: 'post', params: query }) -} \ No newline at end of file +} + +// 作废订单 +export function orderVoid(data) { + return request({ + url: 'base/order/invalid', + method: 'put', + data + }) +} diff --git a/src/api/equipment/analysis/statistics.js b/src/api/equipment/analysis/statistics.js index ebd60e17..3c0d7b80 100644 --- a/src/api/equipment/analysis/statistics.js +++ b/src/api/equipment/analysis/statistics.js @@ -24,4 +24,14 @@ export function exportEqAnalysisExcel(query) { params: query, responseType: 'blob' }) +} + +// 导出设备状态追溯 +export function exportEfficiencyExcel(query) { + return request({ + url: '/analysis/equipment-analysis/export-efficiency', + method: 'get', + params: query, + responseType: 'blob' + }) } \ No newline at end of file diff --git a/src/api/equipment/base/inspection/items.js b/src/api/equipment/base/inspection/items.js index 96c6bf62..da183b67 100644 --- a/src/api/equipment/base/inspection/items.js +++ b/src/api/equipment/base/inspection/items.js @@ -1,7 +1,7 @@ /* * @Author: zhp * @Date: 2024-07-23 13:44:00 - * @LastEditTime: 2024-07-23 13:44:00 + * @LastEditTime: 2024-07-31 09:34:17 * @LastEditors: zhp * @Description: */ @@ -14,7 +14,7 @@ */ import request from '@/utils/request' -// 删除设备保养记录 + export function deleteData(id) { return request({ url: '/base/equipment-check-program/delete?id=' + id, diff --git a/src/api/equipment/base/maintain/items.js b/src/api/equipment/base/maintain/items.js index 5cded3eb..e4cd33b8 100644 --- a/src/api/equipment/base/maintain/items.js +++ b/src/api/equipment/base/maintain/items.js @@ -1,7 +1,7 @@ /* * @Author: zhp * @Date: 2024-07-12 15:31:41 - * @LastEditTime: 2024-07-22 09:33:20 + * @LastEditTime: 2024-07-30 16:44:47 * @LastEditors: zhp * @Description: */ @@ -19,7 +19,7 @@ export function getItemPageData(data) { return request({ url: '/base/equipment-maintain-program/page', method: 'get', - data + params:data }) } diff --git a/src/api/equipment/base/maintain/logConfig.js b/src/api/equipment/base/maintain/logConfig.js new file mode 100644 index 00000000..a636174e --- /dev/null +++ b/src/api/equipment/base/maintain/logConfig.js @@ -0,0 +1,104 @@ +/* + * @Author: zhp + * @Date: 2024-07-30 15:46:23 + * @LastEditTime: 2024-07-31 09:18:25 + * @LastEditors: zhp + * @Description: + */ +import request from '@/utils/request' + +// 获得设备保养计划配置分页 +export function getLogPage(query) { + return request({ + url: '/base/equipment-maintain-log/page', + method: 'get', + params: query + }) +} + +// 创建设备保养计划 +export function createLog(data) { + return request({ + url: '/base/equipment-maintain-log/create', + method: 'post', + data: data + }) +} + +// 更新设备保养计划 +export function updateLog(data) { + return request({ + url: '/base/equipment-maintain-log/update', + method: 'put', + data: data + }) +} + +// 获得计划code +export function getCode() { + return request({ + url: '/base/equipment-maintain-log/getCode', + method: 'get' + }) +} + +// 获得计划 +export function getLog(query) { + return request({ + url: '/base/equipment-maintain-log/get', + method: 'get', + params: query + }) +} + +// 获得设备保养计划配置详情分页 +export function getLogDetPage(query) { + return request({ + url: '/base/equipment-maintain-log-det/page', + method: 'get', + params: query + }) +} + +// 创建设备保养计划详情 +export function createLogDet(data) { + return request({ + url: '/base/equipment-maintain-log-det/create', + method: 'post', + data: data + }) +} + +// 更新设备保养计划详情 +export function updateLogDet(data) { + return request({ + url: '/base/equipment-maintain-log-det/update', + method: 'put', + data: data + }) +} + +// 获得计划详情 +export function getLogDet(query) { + return request({ + url: '/base/equipment-maintain-log-det/get', + method: 'get', + params: query + }) +} + +// 删除设备保养计划 +export function deleteLog(id) { + return request({ + url: '/base/equipment-maintain-log/delete?id=' + id, + method: 'delete' + }) +} + +// 删除设备保养计划详情 +export function deleteLogDet(id) { + return request({ + url: '/base/equipment-maintain-log-det/delete?id=' + id, + method: 'delete' + }) +} diff --git a/src/api/monitoring/statisticalData.js b/src/api/monitoring/statisticalData.js index 0bc1200e..6e1d1cb7 100644 --- a/src/api/monitoring/statisticalData.js +++ b/src/api/monitoring/statisticalData.js @@ -38,3 +38,11 @@ export function getInspectionData(query) { params: query, }) } + +export function getRecordInOneDay(query) { + return request({ + url: '/analysis/record-in-one-day/get', + method: 'get', + params: query, + }) +} diff --git a/src/assets/images/choicepart/Produce.png b/src/assets/images/choicepart/Produce.png new file mode 100644 index 00000000..7c8a3216 Binary files /dev/null and b/src/assets/images/choicepart/Produce.png differ diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index 046e334a..50ae3e74 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -125,11 +125,8 @@ export default { // 取消自动聚焦 start this.Quill?.enable(false); this.$nextTick(() => { - this.Quill?.enable(true); this.Quill?.blur(); - // if (!this.readOnly) { - // this.Quill?.enable(); - // } + this.Quill?.enable(true); }); // 如果设置了上传地址则自定义图片上传事件 if (this.type === 'url') { diff --git a/src/views/choicePart/index.vue b/src/views/choicePart/index.vue index 58bd8aed..270409f9 100644 --- a/src/views/choicePart/index.vue +++ b/src/views/choicePart/index.vue @@ -72,8 +72,8 @@ export default { }, }, { - name: 'Order', - title: '订单管理', + name: 'Produce', + title: '生产管理', visible: false, meta: { title: '', @@ -197,6 +197,7 @@ export default { methods: { getMsg() { let menuList = this.$store.state.permission.sidebarRouters; + console.log('sss', menuList); console.log(menuList); if (menuList.length > 0) { for (let i = 0; i < menuList.length; i++) { diff --git a/src/views/core/base/factory/add-or-updata.vue b/src/views/core/oldBase/factory/add-or-updata.vue similarity index 100% rename from src/views/core/base/factory/add-or-updata.vue rename to src/views/core/oldBase/factory/add-or-updata.vue diff --git a/src/views/core/base/factory/index.vue b/src/views/core/oldBase/factory/index.vue similarity index 100% rename from src/views/core/base/factory/index.vue rename to src/views/core/oldBase/factory/index.vue diff --git a/src/views/core/oldBase/lineBindProduct/index.vue b/src/views/core/oldBase/lineBindProduct/index.vue new file mode 100644 index 00000000..3abff327 --- /dev/null +++ b/src/views/core/oldBase/lineBindProduct/index.vue @@ -0,0 +1,100 @@ + + + + diff --git a/src/views/core/oldBase/lineBindProduct/selectProduct.vue b/src/views/core/oldBase/lineBindProduct/selectProduct.vue new file mode 100644 index 00000000..d0442ac2 --- /dev/null +++ b/src/views/core/oldBase/lineBindProduct/selectProduct.vue @@ -0,0 +1,79 @@ + + + + diff --git a/src/views/core/oldBase/lineBindProductLog/index.vue b/src/views/core/oldBase/lineBindProductLog/index.vue new file mode 100644 index 00000000..e8a1f613 --- /dev/null +++ b/src/views/core/oldBase/lineBindProductLog/index.vue @@ -0,0 +1,144 @@ + + + diff --git a/src/views/base/coreProduct/SmallTitle.vue b/src/views/core/oldBase/product/SmallTitle.vue similarity index 100% rename from src/views/base/coreProduct/SmallTitle.vue rename to src/views/core/oldBase/product/SmallTitle.vue diff --git a/src/views/core/oldBase/product/add-or-updata.vue b/src/views/core/oldBase/product/add-or-updata.vue new file mode 100644 index 00000000..eb5b51b1 --- /dev/null +++ b/src/views/core/oldBase/product/add-or-updata.vue @@ -0,0 +1,448 @@ + + + + + diff --git a/src/views/core/oldBase/product/attr-add.vue b/src/views/core/oldBase/product/attr-add.vue new file mode 100644 index 00000000..d5c46d11 --- /dev/null +++ b/src/views/core/oldBase/product/attr-add.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/views/core/oldBase/product/index.vue b/src/views/core/oldBase/product/index.vue new file mode 100644 index 00000000..7090b1bf --- /dev/null +++ b/src/views/core/oldBase/product/index.vue @@ -0,0 +1,200 @@ + + + + diff --git a/src/views/base/packagingPrintLog/unitDict.vue b/src/views/core/oldBase/product/unitDict.vue similarity index 100% rename from src/views/base/packagingPrintLog/unitDict.vue rename to src/views/core/oldBase/product/unitDict.vue diff --git a/src/views/core/oldBase/productAttr/index.vue b/src/views/core/oldBase/productAttr/index.vue new file mode 100644 index 00000000..a78e71b2 --- /dev/null +++ b/src/views/core/oldBase/productAttr/index.vue @@ -0,0 +1,228 @@ + + + diff --git a/src/views/core/oldBase/productionLine/add-or-updata.vue b/src/views/core/oldBase/productionLine/add-or-updata.vue new file mode 100644 index 00000000..32b83db5 --- /dev/null +++ b/src/views/core/oldBase/productionLine/add-or-updata.vue @@ -0,0 +1,153 @@ + + + + + + diff --git a/src/views/core/oldBase/productionLine/index.vue b/src/views/core/oldBase/productionLine/index.vue new file mode 100644 index 00000000..474bfcad --- /dev/null +++ b/src/views/core/oldBase/productionLine/index.vue @@ -0,0 +1,217 @@ + + + diff --git a/src/views/core/oldBase/productionLineRecDay/index.vue b/src/views/core/oldBase/productionLineRecDay/index.vue new file mode 100644 index 00000000..6b09138a --- /dev/null +++ b/src/views/core/oldBase/productionLineRecDay/index.vue @@ -0,0 +1,271 @@ + + + diff --git a/src/views/core/oldBase/productionLineRecSch/index.vue b/src/views/core/oldBase/productionLineRecSch/index.vue new file mode 100644 index 00000000..5801e932 --- /dev/null +++ b/src/views/core/oldBase/productionLineRecSch/index.vue @@ -0,0 +1,271 @@ + + + diff --git a/src/views/core/oldBase/workshopSection/add-or-updata.vue b/src/views/core/oldBase/workshopSection/add-or-updata.vue new file mode 100644 index 00000000..d0b5afc9 --- /dev/null +++ b/src/views/core/oldBase/workshopSection/add-or-updata.vue @@ -0,0 +1,112 @@ + + + + diff --git a/src/views/core/oldBase/workshopSection/index.vue b/src/views/core/oldBase/workshopSection/index.vue new file mode 100644 index 00000000..7bc1514f --- /dev/null +++ b/src/views/core/oldBase/workshopSection/index.vue @@ -0,0 +1,182 @@ + + + diff --git a/src/views/devConfig/energy/energyPlc/index.vue b/src/views/devConfig/energy/energyPlc/index.vue index 84629de4..5b48b281 100644 --- a/src/views/devConfig/energy/energyPlc/index.vue +++ b/src/views/devConfig/energy/energyPlc/index.vue @@ -1,218 +1,215 @@ diff --git a/src/views/devConfig/quality/qualityInspectionBoxBtn/index.vue b/src/views/devConfig/quality/qualityInspectionBoxBtn/index.vue index 3fdd7d79..8387c7fa 100644 --- a/src/views/devConfig/quality/qualityInspectionBoxBtn/index.vue +++ b/src/views/devConfig/quality/qualityInspectionBoxBtn/index.vue @@ -307,7 +307,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm('是否确认删除"' + row.sectionName + '"?') + .delConfirm(row.buttonId) .then(function () { return deleteQualityInspectionBoxBtn(id); }) diff --git a/src/views/devConfig/quality/qualityInspectionDet/index.vue b/src/views/devConfig/quality/qualityInspectionDet/index.vue index da6240b4..97d533fb 100644 --- a/src/views/devConfig/quality/qualityInspectionDet/index.vue +++ b/src/views/devConfig/quality/qualityInspectionDet/index.vue @@ -288,7 +288,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm('是否确认删除检测信息"' + row.content + '"?') + .delConfirm(row.content) .then(function () { return deleteQualityInspectionDet(id); }) diff --git a/src/views/devConfig/quality/qualityInspectionType/index.vue b/src/views/devConfig/quality/qualityInspectionType/index.vue index 46183389..17318da0 100644 --- a/src/views/devConfig/quality/qualityInspectionType/index.vue +++ b/src/views/devConfig/quality/qualityInspectionType/index.vue @@ -273,7 +273,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm('是否确认删除该质量检测类型?') + .delConfirm(row.name) .then(function () { return deleteQualityInspectionType(id); }) diff --git a/src/views/devConfig/quality/qualityScrapDet/basic-page.js b/src/views/devConfig/quality/qualityScrapDet/basic-page.js new file mode 100644 index 00000000..81886d1f --- /dev/null +++ b/src/views/devConfig/quality/qualityScrapDet/basic-page.js @@ -0,0 +1,159 @@ +/* + * @Author: zwq + * @Date: 2022-08-24 11:19:43 + * @LastEditors: DY + * @LastEditTime: 2023-09-21 16:02:07 + * @Description: + */ +export default { + data() { + /* eslint-disable */ + return { + urlOptions: { + getDataListURL: '', + deleteURL: '', + statusUrl: '', + exportURL: '' + }, + tableData: [], + listQuery: { + pageSize: 10, + pageNo: 1, + total: 1, + }, + exportLoading: false, + dataListLoading: false, + addOrEditTitle: '', + addOrUpdateVisible: false, + } + }, + created() { + }, + mounted() { + this.getDataList() + }, + methods: { + // 获取数据列表 + getDataList() { + this.dataListLoading = true; + this.urlOptions.getDataListURL(this.listQuery).then(response => { + this.tableData = response.data.list; + this.listQuery.total = response.data.total; + this.dataListLoading = false; + }); + }, + // 每页数 + sizeChangeHandle(val) { + this.listQuery.pageSize = val; + this.listQuery.pageNo = 1; + this.getDataList(); + }, + // 当前页 + currentChangeHandle(val) { + this.listQuery.pageNo = val; + this.getDataList(); + }, + // 新增 / 修改 + addOrUpdateHandle(id) { + this.addOrUpdateVisible = true; + this.$nextTick(() => { + this.$refs.addOrUpdate.init(id); + }); + }, + cancel(id) { + this.$refs["popover-" + id].showPopper = false; + }, + //改变状态 + changeStatus(id) { + this.$http + .post(this.urlOptions.statusUrl, { id }) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg); + } + this.$refs["popover-" + id].showPopper = false; + this.$message({ + message: this.$t("prompt.success"), + type: "success", + duration: 500, + onClose: () => { + this.getDataList(); + }, + }); + }) + .catch(() => { }); + }, + //tableBtn点击 + handleClick(val) { + if (val.type === "edit") { + this.addOrUpdateVisible = true; + this.addOrEditTitle = "编辑"; + this.$nextTick(() => { + this.$refs.addOrUpdate.init(val.data.id); + }); + } else if (val.type === "delete") { + this.deleteHandle(val.data.id, val.data.content) + } else if (val.type === "change") { + this.changeStatus(val.data.id) + } else { + this.otherMethods(val) + } + }, + // 删除 + deleteHandle(id,name) { + this.$modal + .delConfirm(name) + .then(() => { + this.urlOptions.deleteURL(id).then(({ data }) => { + this.getDataList(); + this.$modal.msgSuccess('删除成功'); + }); + }) + .catch(() => { }); + }, + //search-bar点击 + buttonClick(val) { + switch (val.btnName) { + case "search": + this.listQuery.xm1 = val.xm1; + this.listQuery.xm2 = val.xm2; + this.listQuery.pageNo = 1; + this.getDataList(); + break; + case "add": + this.addOrEditTitle = '新增' + this.addOrUpdateVisible = true; + this.addOrUpdateHandle() + break; + default: + console.log(val) + } + }, + handleCancel() { + this.$refs.addOrUpdate.formClear() + this.addOrUpdateVisible = false + this.addOrEditTitle = '' + }, + handleConfirm() { + this.$refs.addOrUpdate.dataFormSubmit() + }, + successSubmit() { + this.handleCancel() + this.getDataList() + }, + /** 导出按钮操作 */ + handleExport() { + // 处理查询参数 + let params = { ...this.queryParams }; + params.pageNo = undefined; + params.pageSize = undefined; + this.$modal.confirm('是否确认导出所有数据项?').then(() => { + this.exportLoading = true; + return this.urlOptions.exportURL(params); + }).then(response => { + this.$download.excel(response, '工厂.xls'); + this.exportLoading = false; + }).catch(() => { }); + } + } +} diff --git a/src/views/devConfig/quality/qualityScrapDet/index.vue b/src/views/devConfig/quality/qualityScrapDet/index.vue index 6bb2f75d..78ea8b36 100644 --- a/src/views/devConfig/quality/qualityScrapDet/index.vue +++ b/src/views/devConfig/quality/qualityScrapDet/index.vue @@ -40,7 +40,7 @@ diff --git a/src/views/equipment/base/maintain/Confirm/attr-add.vue b/src/views/equipment/base/maintain/Confirm/attr-add.vue new file mode 100644 index 00000000..66822ca2 --- /dev/null +++ b/src/views/equipment/base/maintain/Confirm/attr-add.vue @@ -0,0 +1,186 @@ + + + + + + diff --git a/src/views/equipment/base/maintain/PlanConfig/addContent.vue b/src/views/equipment/base/maintain/PlanConfig/addContent.vue index 62bc69b5..2c45a753 100644 --- a/src/views/equipment/base/maintain/PlanConfig/addContent.vue +++ b/src/views/equipment/base/maintain/PlanConfig/addContent.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2021-11-18 14:16:25 * @LastEditors: zhp - * @LastEditTime: 2024-07-23 10:11:24 + * @LastEditTime: 2024-07-31 14:07:11 * @Description: --> @@ -101,19 +101,20 @@ export default { listQuery: { pageSize: 10, pageNo: 1, - total: 0, workOrderId: undefined, startTime: undefined, endTime: undefined, }, + total: 0, formConfig: [ { type: 'select', label: '工单名称', selectOptions: [], - labelField: 'name', - valueField: 'id', param: 'workOrderId', + defaultSelect: '', + filterable: true, + clearable: false, }, { type: 'datePicker', @@ -153,14 +154,13 @@ export default { // AddOrUpdate, }, created() { - this.getList(); this.getDict(); }, methods: { getList() { getMaterialUseLogPage({ ...this.listQuery }).then((res) => { this.list = res.data || []; - this.listQuery.total = res.data.total || 0; + this.total = res.data.total || 0; }); }, getDict() { @@ -172,6 +172,11 @@ export default { }; }); console.log(this.formConfig[0].selectOptions); + this.formConfig[0].defaultSelect = + this.formConfig[0].selectOptions[0].id || ''; + this.listQuery.workOrderId = + this.formConfig[0].selectOptions[0].id || ''; + this.getList(); }); }, handleExport() { @@ -179,12 +184,8 @@ export default { let params = { ...this.listQuery }; params.pageNo = undefined; params.pageSize = undefined; - this.$modal - .confirm('是否确认导出所有数据项?') - .then(() => { - this.exportLoading = true; - return exportEnergyPlcExcel(params); - }) + this.exportLoading = true; + exportEnergyPlcExcel(params) .then((response) => { this.$download.excel(response, '物料信息追溯 '); this.exportLoading = false; diff --git a/src/views/quality/monitoring/rawMaterialTraceability/index.vue b/src/views/quality/monitoring/rawMaterialTraceability/index.vue index 7eec6d9b..d9980604 100644 --- a/src/views/quality/monitoring/rawMaterialTraceability/index.vue +++ b/src/views/quality/monitoring/rawMaterialTraceability/index.vue @@ -101,6 +101,9 @@ export default { labelField: 'name', valueField: 'id', param: 'workOrderId', + clearable: false, + filterable: true, + defaultSelect: '', }, { type: 'button', @@ -112,7 +115,6 @@ export default { }; }, created() { - this.getList(); this.getDict(); }, methods: { @@ -130,7 +132,11 @@ export default { id: item.id, }; }); - console.log(this.formConfig[0].selectOptions); + this.formConfig[0].defaultSelect = + this.formConfig[0].selectOptions[0].id || ''; + this.listQuery.workOrderId = + this.formConfig[0].selectOptions[0].id || ''; + this.getList(); }); }, buttonClick(val) { diff --git a/src/views/quality/qualityInspectionRecord/index.vue b/src/views/quality/qualityInspectionRecord/index.vue index f88acb43..604a80de 100644 --- a/src/views/quality/qualityInspectionRecord/index.vue +++ b/src/views/quality/qualityInspectionRecord/index.vue @@ -120,7 +120,7 @@ export default { this.$auth.hasPermi('base:quality-inspection-record:update') ? { type: 'edit', - btnName: '修改', + btnName: '编辑', } : undefined, this.$auth.hasPermi('base:quality-inspection-record:delete') @@ -322,7 +322,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm('是否确认删除"' + row.inspectionDetContent + '"?') + .delConfirm(row.inspectionDetContent) .then(function () { return deleteQualityInspectionRecord(id); }) diff --git a/src/views/quality/qualityScrapLog/add-or-updata.vue b/src/views/quality/qualityScrapLog/add-or-updata.vue index b40e9df9..edf4696b 100644 --- a/src/views/quality/qualityScrapLog/add-or-updata.vue +++ b/src/views/quality/qualityScrapLog/add-or-updata.vue @@ -7,10 +7,10 @@ label-width="auto"> - + diff --git a/src/views/quality/qualityScrapLog/basic-page.js b/src/views/quality/qualityScrapLog/basic-page.js new file mode 100644 index 00000000..975ac96e --- /dev/null +++ b/src/views/quality/qualityScrapLog/basic-page.js @@ -0,0 +1,159 @@ +/* + * @Author: zwq + * @Date: 2022-08-24 11:19:43 + * @LastEditors: DY + * @LastEditTime: 2023-09-21 16:02:07 + * @Description: + */ +export default { + data() { + /* eslint-disable */ + return { + urlOptions: { + getDataListURL: '', + deleteURL: '', + statusUrl: '', + exportURL: '' + }, + tableData: [], + listQuery: { + pageSize: 10, + pageNo: 1, + total: 1, + }, + exportLoading: false, + dataListLoading: false, + addOrEditTitle: '', + addOrUpdateVisible: false, + } + }, + created() { + }, + mounted() { + this.getDataList() + }, + methods: { + // 获取数据列表 + getDataList() { + this.dataListLoading = true; + this.urlOptions.getDataListURL(this.listQuery).then(response => { + this.tableData = response.data.list; + this.listQuery.total = response.data.total; + this.dataListLoading = false; + }); + }, + // 每页数 + sizeChangeHandle(val) { + this.listQuery.pageSize = val; + this.listQuery.pageNo = 1; + this.getDataList(); + }, + // 当前页 + currentChangeHandle(val) { + this.listQuery.pageNo = val; + this.getDataList(); + }, + // 新增 / 修改 + addOrUpdateHandle(id) { + this.addOrUpdateVisible = true; + this.$nextTick(() => { + this.$refs.addOrUpdate.init(id); + }); + }, + cancel(id) { + this.$refs["popover-" + id].showPopper = false; + }, + //改变状态 + changeStatus(id) { + this.$http + .post(this.urlOptions.statusUrl, { id }) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg); + } + this.$refs["popover-" + id].showPopper = false; + this.$message({ + message: this.$t("prompt.success"), + type: "success", + duration: 500, + onClose: () => { + this.getDataList(); + }, + }); + }) + .catch(() => { }); + }, + //tableBtn点击 + handleClick(val) { + if (val.type === "edit") { + this.addOrUpdateVisible = true; + this.addOrEditTitle = "编辑"; + this.$nextTick(() => { + this.$refs.addOrUpdate.init(val.data.id); + }); + } else if (val.type === "delete") { + this.deleteHandle(val.data.id, val.data.detContent) + } else if (val.type === "change") { + this.changeStatus(val.data.id) + } else { + this.otherMethods(val) + } + }, + // 删除 + deleteHandle(id, detContent) { + this.$modal + .delConfirm(detContent) + .then(() => { + this.urlOptions.deleteURL(id).then(({ data }) => { + this.getDataList(); + this.$modal.msgSuccess('删除成功'); + }); + }) + .catch(() => { }); + }, + //search-bar点击 + buttonClick(val) { + switch (val.btnName) { + case "search": + this.listQuery.xm1 = val.xm1; + this.listQuery.xm2 = val.xm2; + this.listQuery.pageNo = 1; + this.getDataList(); + break; + case "add": + this.addOrEditTitle = '新增' + this.addOrUpdateVisible = true; + this.addOrUpdateHandle() + break; + default: + console.log(val) + } + }, + handleCancel() { + this.$refs.addOrUpdate.formClear() + this.addOrUpdateVisible = false + this.addOrEditTitle = '' + }, + handleConfirm() { + this.$refs.addOrUpdate.dataFormSubmit() + }, + successSubmit() { + this.handleCancel() + this.getDataList() + }, + /** 导出按钮操作 */ + handleExport() { + // 处理查询参数 + let params = { ...this.queryParams }; + params.pageNo = undefined; + params.pageSize = undefined; + this.$modal.confirm('是否确认导出所有数据项?').then(() => { + this.exportLoading = true; + return this.urlOptions.exportURL(params); + }).then(response => { + this.$download.excel(response, '工厂.xls'); + this.exportLoading = false; + }).catch(() => { }); + } + } +} diff --git a/src/views/quality/qualityScrapLog/index.vue b/src/views/quality/qualityScrapLog/index.vue index ca0c8731..c5a98e65 100644 --- a/src/views/quality/qualityScrapLog/index.vue +++ b/src/views/quality/qualityScrapLog/index.vue @@ -54,7 +54,7 @@