Commit 41092844 by 王宝涛

合并分支

parents 5372490c d88d585d
node_modules
dist
.git
.gitignore
README.md
.env.local
.env.*.local
.vscode
.idea
*.log
.DS_Store
coverage
.nyc_output
......@@ -39,3 +39,5 @@ jinayi
/src/api/jianyi
/src/views/code/demo3
.history
*.log
# ==========================================
# 阶段 1: 构建环境 (Builder)
# ==========================================
# 使用指定的 Node 22.22.0 版本
FROM node:22.22.0-alpine AS builder
# 设置工作目录
WORKDIR /app
# 安装 pnpm
# Alpine 镜像通常没有 pnpm,需要通过 corepack 启用或 npm 全局安装
# Node 22 默认内置 corepack,推荐以下方式启用 pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
# 复制 package.json 和 pnpm-lock.yaml (利用 Docker 缓存层)
COPY package.json pnpm-lock.yaml ./
# 安装依赖
# --frozen-lockfile 确保安装版本与锁文件严格一致,适合生产环境
RUN pnpm install --frozen-lockfile
# 复制所有源代码
COPY . .
# 执行构建命令 (假设你的构建脚本是 build,输出到 dist 目录)
RUN pnpm run build
# ==========================================
# 阶段 2: 生产环境 (Production)
# ==========================================
# 使用轻量级 Nginx 镜像
FROM nginx:alpine AS production
# 设置工作目录
WORKDIR /usr/share/nginx/html
# 从 builder 阶段复制构建好的 dist 目录内容到 Nginx 静态目录
# 注意:Vue 3 + Vite 默认输出到 dist/,如果是 webpack 可能是 dist/ 或其他
COPY --from=builder /app/dist .
# 复制自定义的 Nginx 配置文件 (可选,但推荐用于解决 Vue Router History 模式刷新 404 问题)
COPY nginx.conf /etc/nginx/conf.d/default.conf
# 暴露端口
EXPOSE 8052
# 启动 Nginx
CMD ["nginx", "-g", "daemon off;"]
services:
vue-app:
build:
context: .
dockerfile: Dockerfile
image: xjrsoft-vue:1.0.0
container_name: xjrsoft-vue
ports:
- "8052:8052"
restart: unless-stopped
server {
listen 8052;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# Gzip压缩
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/json;
# 缓存静态资源
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
access_log off;
}
# Vue Router history模式支持
location / {
try_files $uri $uri/ /index.html;
}
# 安全响应头
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
}
......@@ -6,11 +6,13 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesCollectionItemPageParams extends BasicPageParams {
code: string;
name: string;
contentType: string;
name: string;
qualityCategoryId: string;
dataType: string;
}
/**
......@@ -27,8 +29,6 @@ export interface MesCollectionItemPageModel {
dataType: string;
standardValue: string;
qualityCategoryId: string;
}
......@@ -93,6 +93,33 @@ export interface MesCollectionItemModel {
dt: string;
bb: string;
mesCollectionScItOptionList?: MesCollectionScItOptionModel;
}
/**
* @description: MesCollectionScItOption表类型
*/
export interface MesCollectionScItOptionModel {
id: string;
code: string;
name: string;
stemId: string;
note: string;
deleteMark: string;
createDate: string;
createUserId: string;
modifyDate: string;
modifyUserId: string;
}
/**
......
......@@ -28,6 +28,8 @@ export interface MesBaseProductInfoPageModel {
cplx: string;
bzzl: string;
sfqypc: string;
}
/**
......@@ -101,6 +103,8 @@ export interface MesBaseProductInfoModel {
modifyUserId: string;
p1: string;
sfqypc: string;
}
/**
......
......@@ -6,7 +6,19 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesBaseBomPageParams extends BasicPageParams {
bommc: string;
cpid: string;
bomsl: string;
bombb: string;
cpbh: string;
cpgg: string;
cpxh: string;
sfyy: string;
bz: string;
}
/**
......@@ -17,7 +29,9 @@ export interface MesBaseBomPageModel {
bommc: string;
cpmc: string;
bomsl: string;
bombb: string;
cpbh: string;
......@@ -25,9 +39,9 @@ export interface MesBaseBomPageModel {
cpxh: string;
bomsl: string;
sfyy: string;
bombb: string;
bz: string;
}
/**
......
......@@ -521,7 +521,7 @@ export function testPwdState(pwd) {
} else if (pwd.length >= 5 && pwd.length <= 7) {
//5-7个字符
score += 10;
} else if (pwd.length > 8) {
} else if (pwd.length >= 8) {
//8个字符以上
score += 25;
}
......
......@@ -1031,7 +1031,7 @@ export const formProps: FormProps = {
{
key: '54d24d79d45b465aae192edd0afb5bcd',
title: '物料编码',
dataIndex: 'wlbm',
dataIndex: 'wlid',
componentType: 'MultiplePopup',
componentProps: {
popupType: 'associate',
......@@ -1061,7 +1061,15 @@ export const formProps: FormProps = {
script:
'var sql ="select *,cpmc as value,cpmc as label from mes_base_product_info where delete_mark = 0"+\r\n\' ?{keyword, AND cpmc LIKE CONCAT("%", #{keyword}, "%")}\';\r\nreturn db.select(sql);',
outputParams: [
{ name: 'label', tableTitle: '物料编码', show: true, width: 150 },
{
name: 'label',
tableTitle: '物料编码',
show: true,
width: 150,
component: '9ebd9378b9154d6789b918febd229fa0',
bindField: 'wlbm',
bindTable: 'mes_warehouse_saleout_info',
},
{
name: 'cpmc',
tableTitle: '物料名称',
......@@ -1100,6 +1108,36 @@ export const formProps: FormProps = {
},
},
{
key: '9ebd9378b9154d6789b918febd229fa0',
title: '物料编码',
dataIndex: 'wlbm',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '92b05df5ae0d4ba2b89a9916bab6b5b7',
title: '物料名称',
dataIndex: 'wlmc',
......@@ -1125,7 +1163,7 @@ export const formProps: FormProps = {
isShow: true,
scan: false,
bordered: true,
isShowAi: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
......@@ -1403,7 +1441,6 @@ export const formButtons = [
isShow: true,
index: 2,
type: 1,
modal: null,
},
{
key: 'cancel',
......@@ -1414,7 +1451,6 @@ export const formButtons = [
isShow: true,
index: 1,
type: 1,
modal: null,
},
{
key: 'reset',
......@@ -1425,6 +1461,5 @@ export const formButtons = [
isShow: true,
index: 0,
type: 1,
modal: null,
},
];
......@@ -290,7 +290,7 @@ export const permissionList = [
showChildren: false,
tableName: 'mesWarehouseSaleoutInfoList',
fieldName: '物料编码',
fieldId: 'wlbm',
fieldId: 'wlid',
type: 'MultiplePopup',
key: '54d24d79d45b465aae192edd0afb5bcd',
children: [],
......@@ -304,6 +304,21 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehouseSaleoutInfoList',
fieldName: '物料编码',
fieldId: 'wlbm',
type: 'Input',
key: '9ebd9378b9154d6789b918febd229fa0',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehouseSaleoutInfoList',
fieldName: '物料名称',
fieldId: 'wlmc',
type: 'Input',
......
......@@ -9,12 +9,6 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input',
},
{
field: 'name',
label: '名称',
defaultValue: undefined,
component: 'Input',
},
{
field: 'contentType',
label: '采集内容',
defaultValue: undefined,
......@@ -30,6 +24,12 @@ export const searchFormSchema: FormSchema[] = [
},
},
{
field: 'name',
label: '名称',
defaultValue: undefined,
component: 'Input',
},
{
field: 'qualityCategoryId',
label: '项目类别',
defaultValue: undefined,
......@@ -44,6 +44,21 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body,
},
},
{
field: 'dataType',
label: '数据类型',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2004076331787718658' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
];
export const columns: BasicColumn[] = [
......@@ -101,19 +116,6 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'standardValue',
title: '标准值',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'qualityCategoryId',
title: '项目类别',
componentType: 'select',
......@@ -444,7 +446,7 @@ export const formProps: FormProps = {
componentProps: {
width: '100%',
span: 7,
placeholder: '请选择下拉选择数据类型',
placeholder: '',
showLabel: true,
showSearch: false,
isMultiple: false,
......@@ -548,6 +550,166 @@ export const formProps: FormProps = {
margin: '10px',
},
},
{
key: '0b0cc0ebc7c0471b85de8d6894339d09',
field: '',
label: '',
type: 'tab',
colProps: { span: 24 },
component: 'Tab',
children: [
{
span: 24,
name: '选项',
prefix: '',
suffix: '',
activeColor: '#1c8dff',
folderId: '',
imageUrl: '',
conFolderId: '',
conImageUrl: '',
list: [
{
key: 'df08e26c0e8a40c6bb78510f7091d068',
label: '',
field: 'mesCollectionScItOptionList',
type: 'form',
component: 'SubForm',
required: true,
colProps: { span: 24 },
componentProps: {
mainKey: 'mesCollectionScItOptionList',
columns: [
{
key: '56b0f6cb30cd421286fe2c0bb2bb729e',
title: '选项名称',
dataIndex: 'name',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '7cccbcf52f1c45b3916221a20f593586',
title: '备注',
dataIndex: 'note',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{ title: '操作', key: 'action', fixed: 'right', width: '50px' },
],
span: '24',
preloadType: 'api',
apiConfig: {},
itemId: '',
dicOptions: [],
useSelectButton: false,
buttonName: '选择数据',
showLabel: true,
showComponentBorder: true,
showBorder: false,
backgroundStyle: {
isShow: false,
bgColor: '#ffffff',
bgImgUrl: '',
fontColor: '',
borderColor: '',
},
theadStyle: {
isShow: false,
fontSize: 14,
fontColor: '#000000',
bgType: 'color',
gradientDegree: '',
gradientColors: '',
bgImageUrl: '',
bgColor: '',
bgRepeat: 'no-repeat',
},
tbodyStyle: {
isShow: false,
fontSize: 14,
fontColor: '#000000',
bgType: 'color',
gradientDegree: '',
gradientColors: '',
bgImageUrl: '',
bgColor: '',
bgRepeat: 'no-repeat',
},
bordercolor: '#f0f0f0',
bordershowtype: [true, true, true, true],
borderwidth: 1,
showIndex: true,
isShow: true,
multipleHeads: [],
buttonList: [],
topButtonList: [],
isExport: false,
isImport: false,
isDeleteSelected: false,
isListView: false,
viewList: [],
isShowAdd: true,
isShowDelete: true,
hasCheckedCol: false,
checkedColType: 'checkbox',
pageSize: 10,
events: {},
showPagenation: true,
},
},
],
},
],
componentProps: { tabPosition: 'top', size: 'default', type: 'line', isShow: true },
},
],
showActionButtonGroup: false,
buttonLocation: 'center',
......
......@@ -163,4 +163,49 @@ export const permissionList = [
options: {},
defaultValue: '',
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: true,
showChildren: false,
tableName: 'mesCollectionScItOptionList',
fieldName: '',
fieldId: 'mesCollectionScItOptionList',
type: 'form',
key: 'df08e26c0e8a40c6bb78510f7091d068',
children: [
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesCollectionScItOptionList',
fieldName: '选项名称',
fieldId: 'name',
type: 'Input',
key: '56b0f6cb30cd421286fe2c0bb2bb729e',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesCollectionScItOptionList',
fieldName: '备注',
fieldId: 'note',
type: 'Input',
key: '7cccbcf52f1c45b3916221a20f593586',
children: [],
},
],
},
];
import { FormProps, FormSchema } from '/@/components/Form';
import { BasicColumn } from '/@/components/Table';
import { uploadApi } from '/@/api/sys/upload';
export const searchFormSchema: FormSchema[] = [
{
......@@ -137,6 +136,19 @@ export const columns: BasicColumn[] = [
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'sfqypc',
title: '是否启用批次',
componentType: 'switch',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
];
//表头合并配置
export const headerMergingData = [];
......@@ -686,6 +698,29 @@ export const formProps: FormProps = {
style: { width: '100%' },
},
},
{
key: '1c96dccdc764461690cb631d5cc2662b',
field: 'sfqypc',
label: '是否启用批次',
type: 'switch',
component: 'Switch',
colProps: { span: 24 },
defaultValue: 1,
componentProps: {
span: 7,
defaultValue: 1,
checkedChildren: '',
unCheckedChildren: '',
checkedColor: '#1C8DFF',
unCheckedColor: '#bbbdbf',
showLabel: true,
disabled: false,
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
style: {},
},
},
],
},
{
......@@ -846,44 +881,6 @@ export const formProps: FormProps = {
},
],
},
{
span: 24,
name: '作业规范',
prefix: '',
suffix: '',
activeColor: '#1c8dff',
folderId: '',
imageUrl: '',
conFolderId: '',
conImageUrl: '',
list: [
{
key: '18b105f9641a4a03841e8397876a6a1e',
field: 'zygf',
label: '作业规范(文件)',
type: 'upload',
component: 'Upload',
colProps: { span: 24 },
componentProps: {
api: uploadApi,
span: 2,
defaultValue: '',
accept: '',
maxNumber: 10,
maxSize: '',
showLabel: true,
multiple: false,
disabled: false,
required: false,
isShow: true,
events: {},
listType: 'text',
sourceType: 'album,camera',
tooltipConfig: { visible: false, title: '提示文本' },
},
},
],
},
],
componentProps: { tabPosition: 'top', size: 'default', type: 'line', isShow: true },
},
......
......@@ -207,6 +207,23 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '是否启用批次',
fieldId: 'sfqypc',
isSubTable: false,
showChildren: true,
type: 'switch',
key: '1c96dccdc764461690cb631d5cc2662b',
children: [],
options: {},
defaultValue: 1,
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '型号',
fieldId: 'xh',
isSubTable: false,
......@@ -268,21 +285,4 @@ export const permissionList = [
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '作业规范(文件)',
fieldId: 'zygf',
isSubTable: false,
showChildren: true,
type: 'upload',
key: '18b105f9641a4a03841e8397876a6a1e',
children: [],
options: {},
defaultValue: '',
},
];
......@@ -28,7 +28,14 @@
</template>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.componentType === 'switch'">
<a-switch
v-model:checked="record[column.dataIndex]"
:unCheckedValue="0"
:checkedValue="1"
:disabled="true"
/>
</template>
<template v-if="column.dataIndex === 'action'">
......@@ -421,4 +428,4 @@
</style>
</style>
\ No newline at end of file
......@@ -148,7 +148,7 @@
function customClick(item) {
if (item.key == 'confirm') {
handleSubmit();
} else if (item.key == 'cancel' && props.formType !== 'normal') {
} else if (item.key == 'cancel') {
handleClose();
closeModal();
} else if (item.key == 'reset') {
......@@ -163,4 +163,3 @@
</script>
\ No newline at end of file
......@@ -4,90 +4,102 @@ import { BasicColumn } from '/@/components/Table';
export const searchFormSchema: FormSchema[] = [
{
field: 'bommc',
label: '物料名称',
label: '产品名称',
defaultValue: undefined,
component: 'Input',
},
{
field: 'cpid',
label: '产品',
field: 'bomsl',
label: '产品数量',
defaultValue: undefined,
component: 'XjrSelect',
component: 'InputNumber',
componentProps: {
style: { width: '100%' },
},
},
{
field: 'bombb',
label: 'BOM版本',
defaultValue: undefined,
component: 'Input',
},
{
field: 'cpbh',
label: '产品编号',
defaultValue: undefined,
component: 'Input',
},
{
field: 'cpgg',
label: '产品规格',
defaultValue: undefined,
component: 'Input',
},
{
field: 'cpxh',
label: '产品型号',
defaultValue: undefined,
component: 'Input',
},
{
field: 'sfyy',
label: '是否有效',
defaultValue: 1,
component: 'Select',
componentProps: {
datasourceType: 'api',
apiConfig: {
path: '/scgl/scjh/getAllProduct',
method: 'GET',
apiId: 'f4fbb57f2f18425e97918a031c8aa7d8',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0';\r\nreturn db.select(sql)",
outputParams: [
{
name: 'cpbh',
tableTitle: '产品编号',
bindField: 'cpbh',
show: true,
width: 150,
component: 'b2682f1ff2dc48448211cacb4bf48bfd',
},
{
name: 'cpmc',
tableTitle: '产品名称',
bindField: 'cpmc',
show: true,
width: 150,
component: 'db0bea5c2dbf4505833e67179e8618f3',
},
{
name: 'gg',
tableTitle: '产品规格',
bindField: 'cpgg',
show: true,
width: 150,
component: '3e7491b6d43c4ef7a7b6c2fd49a94a7f',
},
{
name: 'xh',
tableTitle: '产品型号',
bindField: 'cpxh',
show: true,
width: 150,
component: 'cf7d04d1e6374a3fbc4a9dfb9ebdf19e',
},
],
},
labelField: 'label',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
options: [
{
label: '开',
value: 1,
},
{
label: '关',
value: 0,
},
],
},
},
{
field: 'bz',
label: '备注',
defaultValue: undefined,
component: 'Input',
},
];
export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'bommc',
title: '物料名称',
title: '产品名称',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'cpmc',
title: '产品名称',
dataIndex: 'bomsl',
title: '产品数量',
componentType: 'number',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'bombb',
title: 'BOM版本',
componentType: 'input',
fixed: false,
......@@ -138,9 +150,9 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'bomsl',
title: '物料数量',
componentType: 'number',
dataIndex: 'sfyy',
title: '是否有效',
componentType: 'switch',
fixed: false,
sorter: true,
......@@ -151,15 +163,15 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'bombb',
title: '物料版本',
componentType: 'input',
dataIndex: 'bz',
title: '备注',
componentType: 'textarea',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
listStyle: undefined,
},
];
//表头合并配置
......@@ -245,116 +257,9 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '0bb6edfef8ac486482e02a6e650306e6',
field: 'bommc',
label: '物料名称',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入物料名称',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: true,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: '4bc74304a0144e879b2fc45ae28ab1c5',
field: 'bomsl',
label: '物料数量',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: 0,
componentProps: {
width: '100%',
span: 7,
min: 0,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: true,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
defaultValue: 0,
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: '50bff2d4c82d40a98ace5fd2b1d3b41e',
field: 'bombb',
label: '物料版本',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入物料版本',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: 'c42ef62f38e1445b89e5c3362ffd3af2',
field: 'cpid',
label: '产品',
label: '产品名称',
type: 'associate-popup',
component: 'MultiplePopup',
colProps: { span: 24 },
......@@ -362,7 +267,7 @@ export const formProps: FormProps = {
popupType: 'associate',
width: '100%',
span: 7,
placeholder: '请产品选择',
placeholder: '请产品名称选择',
showLabel: true,
disabled: false,
datasourceType: 'api',
......@@ -393,10 +298,10 @@ export const formProps: FormProps = {
{
name: 'cpmc',
tableTitle: '产品名称',
bindField: 'cpmc',
show: true,
width: 150,
component: 'db0bea5c2dbf4505833e67179e8618f3',
component: 'b44ff861a87d45b5b264515d85935042',
bindField: 'bommc',
},
{
name: 'gg',
......@@ -431,9 +336,40 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: 'b2682f1ff2dc48448211cacb4bf48bfd',
field: 'cpbh',
label: '产品编号',
key: '4bc74304a0144e879b2fc45ae28ab1c5',
field: 'bomsl',
label: '产品数量',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: 0,
componentProps: {
width: '100%',
span: 7,
min: 0,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: true,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
defaultValue: 0,
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: '50bff2d4c82d40a98ace5fd2b1d3b41e',
field: 'bombb',
label: 'BOM版本',
type: 'input',
component: 'Input',
colProps: { span: 24 },
......@@ -442,12 +378,12 @@ export const formProps: FormProps = {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '',
placeholder: '请输入BOM版本',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: true,
disabled: false,
allowClear: false,
showLabel: true,
required: false,
......@@ -469,9 +405,9 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: 'db0bea5c2dbf4505833e67179e8618f3',
field: 'cpmc',
label: '产品名称',
key: 'b2682f1ff2dc48448211cacb4bf48bfd',
field: 'cpbh',
label: '产品编号',
type: 'input',
component: 'Input',
colProps: { span: 24 },
......@@ -610,6 +546,45 @@ export const formProps: FormProps = {
],
},
{
span: 8,
list: [
{
key: 'b44ff861a87d45b5b264515d85935042',
field: 'bommc',
label: '产品名称',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入产品名称',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
{ span: 8, list: [] },
{
span: 24,
list: [
{
......
......@@ -6,15 +6,14 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '物料名称',
fieldId: 'bommc',
fieldName: '产品名称',
fieldId: 'cpid',
isSubTable: false,
showChildren: true,
type: 'input',
key: '0bb6edfef8ac486482e02a6e650306e6',
type: 'associate-popup',
key: 'c42ef62f38e1445b89e5c3362ffd3af2',
children: [],
options: {},
defaultValue: '',
},
{
required: true,
......@@ -23,7 +22,7 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '物料数量',
fieldName: '产品数量',
fieldId: 'bomsl',
isSubTable: false,
showChildren: true,
......@@ -40,7 +39,7 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '物料版本',
fieldName: 'BOM版本',
fieldId: 'bombb',
isSubTable: false,
showChildren: true,
......@@ -51,22 +50,6 @@ export const permissionList = [
defaultValue: '',
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产品',
fieldId: 'cpid',
isSubTable: false,
showChildren: true,
type: 'associate-popup',
key: 'c42ef62f38e1445b89e5c3362ffd3af2',
children: [],
options: {},
},
{
required: false,
view: true,
edit: false,
......@@ -90,23 +73,6 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产品名称',
fieldId: 'cpmc',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'db0bea5c2dbf4505833e67179e8618f3',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产品规格',
fieldId: 'cpgg',
isSubTable: false,
......@@ -158,6 +124,23 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产品名称',
fieldId: 'bommc',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'b44ff861a87d45b5b264515d85935042',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '备注',
fieldId: 'bz',
isSubTable: false,
......
......@@ -24,7 +24,14 @@
</template>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.componentType === 'switch'">
<a-switch
v-model:checked="record[column.dataIndex]"
:unCheckedValue="0"
:checkedValue="1"
:disabled="true"
/>
</template>
<template v-if="column.dataIndex === 'action'">
......
......@@ -118,7 +118,7 @@
import ApprovalProcess from '/@/views/workflow/task/components/ApprovalProcess.vue';
import { getFormExecuteWorkflow } from '/@/api/form/execute';
import MesProcessPlErrorModal from './components/MesProcessPlErrorModal.vue';
import MesProcessPlErrorModal from './components/MesProcessPLErrorModal.vue';
import propsModal from '../mesprocessplerror/components/propsModal.vue';
import { searchFormSchema, columns } from './components/config';
import Icon from '/@/components/Icon/index';
......
......@@ -58,7 +58,7 @@
import { useModal } from '/@/components/Modal';
import ProOrderWorkStepModal from './components/ProOrderWorkStepModal.vue';
import ProOrderWorkStepModal from './components/ProorderworkstepModal.vue';
import { searchFormSchema, columns } from './components/config';
import Icon from '/@/components/Icon/index';
......
......@@ -59,7 +59,7 @@
import { useModal } from '/@/components/Modal';
import WhStockModal from './components/WhStockModal.vue';
import WhStockModal from './components/WhstockModal.vue';
import { downloadByData } from '/@/utils/file/download';
......
......@@ -16,6 +16,12 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input',
},
{
field: 'jhbh',
label: '计划编号',
defaultValue: undefined,
component: 'Input',
},
{
field: 'ywzz',
label: '业务组织',
defaultValue: undefined,
......@@ -45,7 +51,18 @@ export const columns: BasicColumn[] = [
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'gxId',
title: '工序',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'jhbh',
......
......@@ -119,6 +119,7 @@
import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock';
import {rksqMesProductOutput} from "/@/api/scgl/ccmx";
const pageParamsInfo = ref<any>({});
const {
......@@ -288,6 +289,14 @@
}
async function handleEdit(record: Recordable) {
const hasNonDraft = (record.zt !== '草稿');
if (hasNonDraft) {
Modal.warning({
title: '提示',
content: '已下发任务无法编辑',
});
return;
}
let field = 'id';
try {
let hasIn = handleHasEnableLocke(buttonConfigs.value, 'edit');
......@@ -395,29 +404,40 @@
}
function handleXiafa(record: Recordable) {
if (selectedKeys.value.length === 0) {
Modal.warning({
title: '提示',
content: '请选择计划',
});
return;
}
Modal.confirm({
title: t('提示信息'),
icon: createVNode(ExclamationCircleOutlined),
content: t('是否下发?'),
okText: t('确认'),
cancelText: t('取消'),
async onOk() {
if (selectedKeys.value.length === 0) {
Modal.warning({
title: '提示',
content: '请选择计划',
});
return;
}
const hasNonDraft = selectedRowsData.value.some((item) => item.zt !== '草稿');
if (hasNonDraft) {
Modal.warning({
title: '提示',
content: '非草稿计划无法下发任务任务',
});
return;
}
const ids = selectedRowsData.value.map((x) => x.id);
issueMesProductionPlan(ids).then((_) => {
handleSuccess();
notification.success({
message: 'Tip',
description: '下发成功!',
});
const hasNonDraft = selectedRowsData.value.some((item) => item.zt !== '草稿');
if (hasNonDraft) {
Modal.warning({
title: '提示',
content: '非草稿计划无法下发任务任务',
});
return;
}
const ids = selectedRowsData.value.map((x) => x.id);
issueMesProductionPlan(ids).then((_) => {
handleSuccess();
notification.success({
message: 'Tip',
description: '下发成功!',
});
});
},
onCancel() {},
});
}
......
......@@ -532,12 +532,15 @@ export const formProps: FormProps = {
style: { width: '100%' },
},
},
{
key: '427fc55accd744d0a6359faf80e45a1b',
field: 'sccx',
label: '产线',
type: 'associate-select',
component: 'AssociateSelect',
key: '21610208f2b8428e84de66979709d296',
field: 'sccj',
label: '车间',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
......@@ -545,34 +548,29 @@ export const formProps: FormProps = {
placeholder: '请选择',
showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: '',
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
apiConfig: {
path: '/scgl/scrw/getCxByCjbh',
path: '/scgl/scrw/getAllChejian',
method: 'GET',
apiId: 'ecbc0291292c49fca50468561b9770e8',
apiId: '59730efb7b4a4439a013cac04926e00e',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'cjid',
value:
'{"bindField":"sccj","fieldKey":"21610208f2b8428e84de66979709d296"}',
required: true,
defaultValue: '0',
bindType: 'data',
},
],
},
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql='select cx.*,cx.id as value,cx.cxmc as label from mes_base_chanxian cx join mes_base_cj_cx rela on cx.id=rela.cxid where rela.delete_mark=0 and cx.delete_mark=0 and rela.cjid=#{cjid}'\r\nreturn db.select(sql)",
"var sql='select *,id as value,cjmc as label from mes_base_chejian where delete_mark=0'\r\nreturn db.select(sql)",
},
dicOptions: [],
required: false,
......@@ -693,11 +691,11 @@ export const formProps: FormProps = {
},
},
{
key: '21610208f2b8428e84de66979709d296',
field: 'sccj',
label: '车间',
type: 'select',
component: 'XjrSelect',
key: '427fc55accd744d0a6359faf80e45a1b',
field: 'sccx',
label: '产线',
type: 'associate-select',
component: 'AssociateSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
......@@ -705,29 +703,34 @@ export const formProps: FormProps = {
placeholder: '请选择',
showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: '',
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
apiConfig: {
path: '/scgl/scrw/getAllChejian',
path: '/scgl/scrw/getCxByCjbh',
method: 'GET',
apiId: '59730efb7b4a4439a013cac04926e00e',
apiId: 'ecbc0291292c49fca50468561b9770e8',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'cjid',
value:
'{"bindField":"sccj","fieldKey":"21610208f2b8428e84de66979709d296"}',
required: true,
defaultValue: '0',
bindType: 'data',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql='select *,id as value,cjmc as label from mes_base_chejian where delete_mark=0'\r\nreturn db.select(sql)",
"var sql='select cx.*,cx.id as value,cx.cxmc as label from mes_base_chanxian cx join mes_base_cj_cx rela on cx.id=rela.cxid where rela.delete_mark=0 and cx.delete_mark=0 and rela.cjid=#{cjid}'\r\nreturn db.select(sql)",
},
dicOptions: [],
required: false,
......
......@@ -234,6 +234,14 @@
async function handleEdit(record: Recordable) {
const hasNonDraft = (record.zt !== '草稿');
if (hasNonDraft) {
Modal.warning({
title: '提示',
content: '非草稿状态无法编辑',
});
return;
}
let field = 'id';
try {
let hasIn = handleHasEnableLocke(buttonConfigs.value, 'edit');
......
......@@ -89,9 +89,9 @@
</template>
</BasicTable>
</a-tab-pane>
<a-tab-pane key="6" tab="所持证书" force-render>
<BasicForm @register="registerForm3" />
</a-tab-pane>
<!-- <a-tab-pane key="6" tab="所持证书" force-render>-->
<!-- <BasicForm @register="registerForm3" />-->
<!-- </a-tab-pane>-->
</a-tabs>
<RoleModal @register="registerRoleModal" @success="handleRoleSuccess" />
<PostModal @register="registerPostModal" @success="handlePostSuccess" />
......@@ -148,10 +148,10 @@
},
{
field: 'departmentIds',
label: t('所属机构'),
label: t('部门'),
component: 'TreeSelect',
componentProps: {
placeholder: '请选择所属机构',
placeholder: '请选择部门',
fieldNames: {
label: 'name',
key: 'id',
......@@ -175,10 +175,10 @@
required: true,
validator: (_, value) => {
if (!value) {
return Promise.reject('请输入登录密码');
return Promise.reject('请输入登录密码');
}
if (pwdText.value === '弱') {
return Promise.reject('密码强度设置过低,请至少保证中等强度。');
return Promise.reject('密码强度设置过低,请至少保证长度>=5且包含大小写字母和至少3位数字!');
}
return Promise.resolve();
},
......@@ -200,7 +200,6 @@
label: t('邮箱'),
field: 'email',
component: 'Input',
required: true,
colProps: { span: 12 },
componentProps: {
placeholder: '请输入邮箱',
......
......@@ -54,11 +54,18 @@
deep: true,
},
);
// 1. 定义初始化标记(默认不执行)
let isInitialized = false;
// 质检方案联动:根据方案id从接口获取明细,并整体替换当前明细列表
let zjfaReqSeq = 0;
async function handleZjfaChange(zjfaId: string) {
const seq = ++zjfaReqSeq;
// 2. 初始化阶段直接返回(不执行后续逻辑)
if (!isInitialized) {
// 可选:初始化完成后开启开关(如果需要后续操作生效)
isInitialized = true;
return;
}
try {
const resp = await axios.get(
import.meta.env.VITE_GLOB_API_URL + '/magic-api/zlgl/zjjcsj/getFaById',
......@@ -103,6 +110,8 @@
if (!newZjfaId) {
state.formModel = { ...(state.formModel as any), mesQualityInspectionDetailList: [] };
systemFormRef.value?.setFieldsValue?.({ mesQualityInspectionDetailList: [] });
//没有值将初始化标识改为true
isInitialized = true;
return;
}
await handleZjfaChange(newZjfaId);
......@@ -171,12 +180,12 @@
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:获取表单数据
// 打开编辑弹窗时:用当前方案id刷新明细(放在 getFormDataEvent 后,避免被其覆盖)
await nextTick();
const zjfaId = (state.formModel as any)?.zjfa;
if (zjfaId) {
await handleZjfaChange(zjfaId);
}
const nextModel = {
...(state.formModel as any),
mesQualityInspectionDetailList: record["mesQualityInspectionDetailList"],
};
state.formModel = nextModel;
} catch (error) {
}
......@@ -285,4 +294,3 @@
});
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment