From 03da130aeb26ec30a63a22eebdaaca18d7e29f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?= <14103883+leaf-phos@user.noreply.gitee.com> Date: Wed, 18 Dec 2024 18:06:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.production | 2 +- .env.staging | 2 +- src/api/bst/order.js | 14 ++- src/assets/styles/index.scss | 5 +- src/components/Business/Dept/DeptDialog.vue | 2 +- src/components/TableFormCol/index.vue | 17 ++- src/router/index.js | 12 +- src/utils/constants.js | 109 ------------------ src/utils/enums.js | 18 +++ .../order/edit/components/ProdProcessList.vue | 85 +++++++++++--- .../order/edit/components/orderProdList.vue | 95 +++++++++++---- src/views/bst/order/edit/edit.vue | 54 ++++++--- src/views/bst/order/index.vue | 32 +++++ src/views/bst/order/view/view.vue | 11 ++ src/views/bst/orderProd/index.vue | 72 +++--------- src/views/index.vue | 2 +- src/views/login.vue | 2 +- src/views/register.vue | 2 +- vue.config.js | 2 +- 20 files changed, 302 insertions(+), 238 deletions(-) create mode 100644 src/utils/enums.js create mode 100644 src/views/bst/order/view/view.vue diff --git a/.env.development b/.env.development index 6544f50..455553f 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ # 页面标题 -VUE_APP_TITLE = 生产管理系统 +VUE_APP_TITLE = 伟旺生产管理系统 # 开发环境配置 ENV = 'development' diff --git a/.env.production b/.env.production index bbec1d0..e75d335 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ # 页面标题 -VUE_APP_TITLE = 生产管理系统 +VUE_APP_TITLE = 伟旺生产管理系统 # 生产环境配置 ENV = 'production' diff --git a/.env.staging b/.env.staging index 44cca16..5d19b9b 100644 --- a/.env.staging +++ b/.env.staging @@ -1,5 +1,5 @@ # 页面标题 -VUE_APP_TITLE = 生产管理系统 +VUE_APP_TITLE = 伟旺生产管理系统 NODE_ENV = production diff --git a/src/api/bst/order.js b/src/api/bst/order.js index 299f588..81d6c7f 100644 --- a/src/api/bst/order.js +++ b/src/api/bst/order.js @@ -18,20 +18,26 @@ export function getOrder(id) { } // 新增生产订单 -export function addOrder(data) { +export function addOrder(data, submit) { return request({ url: '/bst/order', method: 'post', - data: data + data: data, + params: { + submit + } }) } // 修改生产订单 -export function updateOrder(data) { +export function updateOrder(data, submit) { return request({ url: '/bst/order', method: 'put', - data: data + data: data, + params: { + submit + } }) } diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 56aa8fa..2941e06 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -197,8 +197,9 @@ aside { } .required-label::before { - content: "*"; - color: #F56C6C; + content: "* "; + color: #ff4949; + font-size: 14px; } // mini版本的树选择器 diff --git a/src/components/Business/Dept/DeptDialog.vue b/src/components/Business/Dept/DeptDialog.vue index 8f32481..8257c20 100644 --- a/src/components/Business/Dept/DeptDialog.vue +++ b/src/components/Business/Dept/DeptDialog.vue @@ -2,7 +2,7 @@ @@ -14,6 +14,7 @@ diff --git a/src/router/index.js b/src/router/index.js index 6a3391c..86d2e31 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -84,7 +84,7 @@ export const constantRoutes = [ { path: 'order', component: () => import('@/views/bst/order/edit/edit.vue'), - name: 'OrderEdit', + name: 'OrderAdd', meta: { title: '新增订单', noCache: false @@ -119,7 +119,15 @@ export const constantRoutes = [ component: Layout, hidden: true, children: [ - + { + path: 'order/:id', + component: () => import('@/views/bst/order/view/view.vue'), + name: 'OrderView', + meta: { + title: '订单详情', + noCache: false + } + } ] }, { diff --git a/src/utils/constants.js b/src/utils/constants.js index 57a6df9..0c91892 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -4,115 +4,6 @@ import { getLastDate, getLastDateTimeEnd, getLastDateTimeStart, getLastMonth, ge export const views = { } -// 单价状态 -export const PriceStatus = { - WAIT_SUBMIT: "1", // 未提交 - WAIT_VERIFY: "2", // 待审核 - PASS: "3", // 已通过 - REJECT: "4", // 未通过 - // 允许编辑 - canEdit(status) { - return [this.WAIT_SUBMIT, this.REJECT].includes(status); - }, - // 允许提交 - canSubmit(status) { - return [this.WAIT_SUBMIT].includes(status); - }, - // 允许取消提交 - canCancel(status) { - return [this.WAIT_VERIFY].includes(status); - }, - // 允许审核 - canVerify(status) { - return [this.WAIT_VERIFY].includes(status); - }, - // 允许禁用 - canDisable(status) { - return [this.PASS].includes(status); - }, - // 允许启用 - canEnable(status) { - return [this.PASS].includes(status); - }, -} - -// 工资模式 -export const IncomeMode = { - SCORE: "1", // 计分 - COUNT: "2", // 计量 -} - -// 报表状态 -export const ReportStatus = { - WAIT_SUBMIT: "1", // 未提交 - WAIT_VERIFY: "2", // 待审核 - PASS: "3", // 已通过 - REJECT: "4", // 未通过 - // 允许编辑 - canEdit(status) { - return [this.WAIT_SUBMIT, this.REJECT].includes(status); - }, - // 允许提交 - canSubmit(status) { - return [this.WAIT_SUBMIT].includes(status); - }, - // 允许取消提交 - canCancel(status) { - return [this.WAIT_VERIFY].includes(status); - }, - // 允许审核 - canVerify(status) { - return [this.WAIT_VERIFY].includes(status); - }, - // 允许删除 - canDel(status) { - return [this.WAIT_SUBMIT, this.REJECT].includes(status); - }, - // 是否已审核过的状态 - isVerified(status) { - return [this.PASS, this.REJECT].includes(status); - } -} - -/** - * 生产订单ERP业务状态 - */ -export const ProdOrderErpStatus = { - PLAN: "1", // 计划 - PLAN_CONFIRM: "2", // 计划确认 - ISSUED: "3", // 下达 - START_WORK: "4", // 开工 - END_WORK: "5", // 完工 - CLOSED: "6", // 结案 - FINISHED: "7", // 结算 -} - -/** - * 报表工序类型 - */ -export const ReportPriceType = { - PUBLIC: "1", // 公共工序 - BILL: "2", // 订单工序 -} - -/** - * 导入日志业务类型 - */ -export const LogImportBizType = { - PRICE: "1", // 单价 - PROD_ORDER: "2", // 生产订单 -} - -// 操作日志业务类型 -export const OperLogBizType = { - UNKNOWN: "0", // 未知 - PRICE: "1", // 单价 - REPORT: "2", // 报表 - PROD_ORDER: "3", // 生产订单 - MATERIAL: "4", // 物料 - UNIT: "5", // 单位 -} - // 日期选择器快捷选项 export const DatePickerOptions = { // 默认 diff --git a/src/utils/enums.js b/src/utils/enums.js new file mode 100644 index 0000000..dbf2683 --- /dev/null +++ b/src/utils/enums.js @@ -0,0 +1,18 @@ +export const OrderStatus = { + PROPOSED: "1", // 拟定 + RELEASED: "2", // 已发布 + FINISHED: "3", // 完工 + + // 允许编辑 + canEdit() { + return [this.PROPOSED]; + }, + // 允许完工 + canFinished() { + return [this.RELEASED]; + }, + // 允许删除 + canDel() { + return [this.PROPOSED]; + } +} diff --git a/src/views/bst/order/edit/components/ProdProcessList.vue b/src/views/bst/order/edit/components/ProdProcessList.vue index f9c418f..28dc320 100644 --- a/src/views/bst/order/edit/components/ProdProcessList.vue +++ b/src/views/bst/order/edit/components/ProdProcessList.vue @@ -11,33 +11,48 @@ class="mini-table" > - + - + - + - + - + - + - + + + + - + + + @@ -145,55 +151,6 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -201,6 +158,7 @@ import { addOrderProd, getOrderProd, listOrderProd, updateOrderProd } from '@/api/bst/orderProd' import FormCol from '@/components/FormCol/index.vue' import { $showColumns } from '@/utils/mixins' +import BooleanTag from '@/components/BooleanTag/index.vue' // 默认排序字段 const defaultSort = { @@ -212,7 +170,7 @@ export default { name: "OrderProd", mixins: [$showColumns], dicts: ['order_prod_work_type'], - components: {FormCol}, + components: { BooleanTag, FormCol}, data() { return { span: 24, @@ -220,13 +178,13 @@ export default { columns: [ {key: 'id', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"}, {key: 'orderNo', visible: true, label: '订单', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, - {key: 'workType', visible: true, label: '加工类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, - {key: 'isEnd', visible: true, label: '是否成品', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, - {key: 'materialNo', visible: true, label: '物料编码', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, {key: 'picture', visible: true, label: '主图', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, {key: 'name', visible: true, label: '名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, - {key: 'spec', visible: true, label: '规格', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, {key: 'num', visible: true, label: '数量', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, + {key: 'workType', visible: true, label: '加工商', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, + {key: 'materialNo', visible: true, label: '物料编码', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, + {key: 'spec', visible: true, label: '规格', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, + {key: 'isEnd', visible: true, label: '是否成品', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, {key: 'remark', visible: true, label: '备注', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, ], // 排序方式 @@ -274,7 +232,7 @@ export default { { required: true, message: "订单ID不能为空", trigger: "blur" } ], workType: [ - { required: true, message: "加工类型不能为空", trigger: "change" } + { required: true, message: "加工商不能为空", trigger: "change" } ], isEnd: [ { required: true, message: "是否成品不能为空", trigger: "blur" } diff --git a/src/views/index.vue b/src/views/index.vue index 0b4e7f9..76e3c27 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,6 +1,6 @@ diff --git a/src/views/login.vue b/src/views/login.vue index 75a38fa..20cdda4 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -4,7 +4,7 @@