Commit 36e62166 by 董晓奇

Merge branch 'hongshun' of https://git.rokedata.com/jinmin/weiqiao-vue into hongshun

parents 8db3a91c 2bcfc0a9
node_modules
dist
.git
.gitignore
README.md
.env.local
.env.*.local
.vscode
.idea
*.log
.DS_Store
coverage
.nyc_output
......@@ -16,7 +16,7 @@ VITE_DROP_CONSOLE = false
# 接口地址
# 如果没有跨域问题,直接在这里配置即可
VITE_GLOB_API_URL=http://192.168.8.100:8053
VITE_GLOB_API_URL=http://127.0.0.1:8053
# 文件上传接口 可选
VITE_GLOB_UPLOAD_URL = /system/oss/upload
......
......@@ -16,14 +16,14 @@ VITE_BUILD_COMPRESS = 'gzip'
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
# 接口地址 可以由nginx做转发或者直接写实际地址
VITE_GLOB_API_URL=https://vue.xjrsoft.com:82
VITE_GLOB_API_URL=http://112.230.195.2:8053
# 文件上传地址 可以由nginx做转发或者直接写实际地址
VITE_GLOB_UPLOAD_URL = /system/oss/upload
# 文件预览接口 可选
VITE_GLOB_UPLOAD_PREVIEW = https://vue.xjrsoft.com:7001/onlinePreview?url=
VITE_GLOB_UPLOAD_PREVIEW = http://112.230.195.2:9012/onlinePreview?url=
#外部url地址
VITE_GLOB_OUT_LINK_URL = http://vue.xjrsoft.com:3200
......
NODE_ENV=production
# Whether to open mock
# 是否开启mock
VITE_USE_MOCK = true
# public path
# 资源公共路径,需要以 / 开头和结尾
VITE_PUBLIC_PATH = /
# Delete console
# 是否删除Console.log
VITE_DROP_CONSOLE = true
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
# 打包是否输出gz|br文件
# 可选: gzip | brotli | none
# 也可以有多个, 例如 ‘gzip’|'brotli',这样会同时生成 .gz和.br文件
VITE_BUILD_COMPRESS = 'gzip'
# Whether to delete origin files when using compress, default false
# 使用compress时是否删除源文件,默认false
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
# Basic interface address SPA
VITE_GLOB_API_URL=/basic-api
# 接口地址 可以由nginx做转发或者直接写实际地址
VITE_GLOB_API_URL=http://112.230.195.2:8053
# File upload address, optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL=/upload
# 文件上传地址 可以由nginx做转发或者直接写实际地址
VITE_GLOB_UPLOAD_URL = /system/oss/upload
# 文件预览接口 可选
VITE_GLOB_UPLOAD_PREVIEW = http://114.116.210.204:8012/onlinePreview?url=
VITE_GLOB_UPLOAD_PREVIEW = http://112.230.195.2:9012/onlinePreview?url=
#外部url地址
VITE_GLOB_OUT_LINK_URL = http://localhost:4100,http://localhost:8827
VITE_GLOB_OUT_LINK_URL = http://vue.xjrsoft.com:3200
#打印项目地址
VITE_GLOB_PRINT_BASE_URL = http://114.116.210.204:3300
VITE_GLOB_PRINT_BASE_URL = https://vue.xjrsoft.com:7002
#IM URL 地址
VITE_GLOB_IM_LINK_URL = http://localhost:8827
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
#调查问卷地址
VITE_GLOB_QN_LINK_URL = https://vue.xjrsoft.com
# Whether to enable image compression
VITE_USE_IMAGEMIN= true
# 接口地址前缀,有些系统所有接口地址都有前缀,可以在这里统一加,方便切换
VITE_GLOB_API_URL_PREFIX =
# use pwa
# 打包是否开启pwa功能
VITE_USE_PWA = false
# Is it compatible with older browsers
VITE_LEGACY = false
# 是否启用官网代码
VITE_GLOB_PRODUCTION = true
# 帆软服务地址
VITE_GLOB_FINE_REPORT_URL = http://127.0.0.1:8075
......@@ -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 目录)
ARG BUILD_MODE=production
RUN pnpm run build:${BUILD_MODE}
# ==========================================
# 阶段 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:
xjrsoft-vue:
build:
context: .
dockerfile: Dockerfile
args:
BUILD_MODE: production
#BUILD_MODE: test
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;
}
......@@ -11,6 +11,7 @@
"serve": "npm run dev",
"dev": "vite",
"build": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 vite build && esno ./build/script/postBuild.ts",
"build:production": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 vite build && esno ./build/script/postBuild.ts",
"build:test": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build --mode test && esno ./build/script/postBuild.ts",
"build:no-cache": "pnpm clean:cache && npm run build",
"report": "cross-env REPORT=true npm run build",
......
......@@ -8,7 +8,7 @@ enum Api {
List = '/chaiche/ccbg/list',
Info = '/chaiche/ccbg/info',
MesCheliangBg = '/chaiche/ccbg',
InWarehouse = '/chaiche/ccbg/in-warehouse',
}
......@@ -88,6 +88,19 @@ export async function deleteMesCheliangBg(ids: string[], mode: ErrorMessageMode
);
}
/**
* @description: 拆车物料入库
*/
export async function inWarehouse(wlList: Recordable[], mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.InWarehouse,
params: wlList,
},
{
errorMessageMode: mode,
},
);
}
......@@ -4,21 +4,25 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
* @description: MesCheliangBg分页参数 模型
*/
export interface MesCheliangBgPageParams extends BasicPageParams {
cphm: string;
clys: string;
gzr: string;
gzkssj: string;
cllx: string;
gzjssj: string;
clls: string;
gzxm: string;
gzsc: string;
gzjssj: string;
cphm: string;
wlzt: string;
clppxh: string;
gzkssj: string;
}
/**
......@@ -50,6 +54,8 @@ export interface MesCheliangBgPageModel {
bdsl: string;
gzsc: string;
wlzt: string;
}
/**
......@@ -124,6 +130,12 @@ export interface MesCheliangBgModel {
dhxx: string;
wlzt: string;
psqzp: string;
banzu: string;
bz: string;
createDate: string;
......@@ -155,6 +167,10 @@ export interface MesCheliangBgCpModel {
sl: string;
yrlsl: string;
bcrksl: string;
createDate: string;
modifyDate: string;
......
import { MesCheliangBgPageModel, MesCheliangBgPageParams, MesCheliangBgPageResult } from './model/GpsModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/chaiche/gps/page',
List = '/chaiche/gps/list',
Info = '/chaiche/gps/info',
MesCheliangBg = '/chaiche/gps',
}
/**
* @description: 查询MesCheliangBg分页列表
*/
export async function getMesCheliangBgPage(params: MesCheliangBgPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesCheliangBgPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取MesCheliangBg信息
*/
export async function getMesCheliangBg(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesCheliangBgPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增MesCheliangBg
*/
export async function addMesCheliangBg(mesCheliangBg: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesCheliangBg,
params: mesCheliangBg,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新MesCheliangBg
*/
export async function updateMesCheliangBg(mesCheliangBg: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesCheliangBg,
params: mesCheliangBg,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除MesCheliangBg(批量删除)
*/
export async function deleteMesCheliangBg(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesCheliangBg,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesCheliangBg分页参数 模型
*/
export interface MesCheliangBgPageParams extends BasicPageParams {
kjsj: string;
tjsj: string;
gzr: string;
sfwgcj: string;
pslb: string;
ghcj: string;
dhch: string;
dhpsxx: string;
dhxx: string;
drzcl: string;
}
/**
* @description: MesCheliangBg分页返回值模型
*/
export interface MesCheliangBgPageModel {
id: string;
kjsj: string;
tjsj: string;
kjsc: string;
kjhdl: string;
gzr: string;
sfwgcj: string;
pslb: string;
ghcj: string;
dhch: string;
dhpsxx: string;
dhxx: string;
drzcl: string;
}
/**
* @description: MesCheliangBg表类型
*/
export interface MesCheliangBgModel {
id: string;
bglx: string;
cheliangId: string;
gzr: string;
gzxm: string;
cllx: string;
cphm: string;
clzl: string;
clppxh: string;
clys: string;
clls: string;
gzkssj: string;
gzjssj: string;
clqzp1: string;
clqzp2: string;
clhzp1: string;
clhzp2: string;
bdsl: string;
bdzp: string;
gbswzp: string;
gznr: string;
gzsc: string;
sfwgcj: string;
drzcl: string;
kjsj: string;
tjsj: string;
kjsc: string;
kjhdl: string;
yxhm: string;
pslb: string;
ghcj: string;
dhch: string;
dhpsxx: string;
dhxx: string;
wlzt: string;
psqzp: string;
banzu: string;
bz: string;
createDate: string;
modifyDate: string;
createUserId: string;
modifyUserId: string;
mesCheliangTlmxList?: MesCheliangTlmxModel;
}
/**
* @description: MesCheliangTlmx表类型
*/
export interface MesCheliangTlmxModel {
id: string;
bgId: string;
kcId: string;
cpId: string;
cpbh: string;
cpmc: string;
dw: string;
kcsl: string;
tlsl: string;
createDate: string;
modifyDate: string;
createUserId: string;
modifyUserId: string;
}
/**
* @description: MesCheliangBg分页返回值结构
*/
export type MesCheliangBgPageResult = BasicFetchResult<MesCheliangBgPageModel>;
import { MesCheliangBgPageModel, MesCheliangBgPageParams, MesCheliangBgPageResult } from './model/LpsModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/chaiche/lps/page',
List = '/chaiche/lps/list',
Info = '/chaiche/lps/info',
MesCheliangBg = '/chaiche/lps',
}
/**
* @description: 查询MesCheliangBg分页列表
*/
export async function getMesCheliangBgPage(params: MesCheliangBgPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesCheliangBgPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取MesCheliangBg信息
*/
export async function getMesCheliangBg(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesCheliangBgPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增MesCheliangBg
*/
export async function addMesCheliangBg(mesCheliangBg: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesCheliangBg,
params: mesCheliangBg,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新MesCheliangBg
*/
export async function updateMesCheliangBg(mesCheliangBg: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesCheliangBg,
params: mesCheliangBg,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除MesCheliangBg(批量删除)
*/
export async function deleteMesCheliangBg(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesCheliangBg,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesCheliangBg分页参数 模型
*/
export interface MesCheliangBgPageParams extends BasicPageParams {
kjsj: string;
tjsj: string;
gzr: string;
sfwgcj: string;
pslb: string;
ghcj: string;
dhch: string;
dhpsxx: string;
dhxx: string;
}
/**
* @description: MesCheliangBg分页返回值模型
*/
export interface MesCheliangBgPageModel {
id: string;
kjsj: string;
tjsj: string;
kjsc: string;
kjhdl: string;
gzr: string;
sfwgcj: string;
pslb: string;
ghcj: string;
dhch: string;
dhpsxx: string;
dhxx: string;
drzcl: string;
}
/**
* @description: MesCheliangBg表类型
*/
export interface MesCheliangBgModel {
id: string;
bglx: string;
cheliangId: string;
gzr: string;
gzxm: string;
cllx: string;
cphm: string;
clzl: string;
clppxh: string;
clys: string;
clls: string;
gzkssj: string;
gzjssj: string;
clqzp1: string;
clqzp2: string;
clhzp1: string;
clhzp2: string;
bdsl: string;
bdzp: string;
gbswzp: string;
gznr: string;
gzsc: string;
sfwgcj: string;
drzcl: string;
kjsj: string;
tjsj: string;
kjsc: string;
kjhdl: string;
yxhm: string;
pslb: string;
ghcj: string;
dhch: string;
dhpsxx: string;
dhxx: string;
wlzt: string;
psqzp: string;
banzu: string;
bz: string;
createDate: string;
modifyDate: string;
createUserId: string;
modifyUserId: string;
mesCheliangTlmxList?: MesCheliangTlmxModel;
}
/**
* @description: MesCheliangTlmx表类型
*/
export interface MesCheliangTlmxModel {
id: string;
bgId: string;
kcId: string;
cpId: string;
cpbh: string;
cpmc: string;
dw: string;
kcsl: string;
tlsl: string;
createDate: string;
modifyDate: string;
createUserId: string;
modifyUserId: string;
}
/**
* @description: MesCheliangBg分页返回值结构
*/
export type MesCheliangBgPageResult = BasicFetchResult<MesCheliangBgPageModel>;
......@@ -112,6 +112,12 @@ export interface MesCheliangBgModel {
dhxx: string;
wlzt: string;
psqzp: string;
banzu: string;
bz: string;
createDate: string;
......
import { MesWarehouseDisasmoutPageModel, MesWarehouseDisasmoutPageParams, MesWarehouseDisasmoutPageResult } from './model/CcckModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/ckgl/ccck/page',
List = '/ckgl/ccck/list',
Info = '/ckgl/ccck/info',
MesWarehouseDisasmout = '/ckgl/ccck',
}
/**
* @description: 查询MesWarehouseDisasmout分页列表
*/
export async function getMesWarehouseDisasmoutPage(params: MesWarehouseDisasmoutPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesWarehouseDisasmoutPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取MesWarehouseDisasmout信息
*/
export async function getMesWarehouseDisasmout(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesWarehouseDisasmoutPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增MesWarehouseDisasmout
*/
export async function addMesWarehouseDisasmout(mesWarehouseDisasmout: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesWarehouseDisasmout,
params: mesWarehouseDisasmout,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新MesWarehouseDisasmout
*/
export async function updateMesWarehouseDisasmout(mesWarehouseDisasmout: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesWarehouseDisasmout,
params: mesWarehouseDisasmout,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除MesWarehouseDisasmout(批量删除)
*/
export async function deleteMesWarehouseDisasmout(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesWarehouseDisasmout,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesWarehouseDisasmout分页参数 模型
*/
export interface MesWarehouseDisasmoutPageParams extends BasicPageParams {
warehouse: string;
handler: string;
department: string;
orderCustomer: string;
documentStatus: string;
businessOrganization: string;
carrier: string;
deliveryDate: string;
receivingAddress: string;
consignee: string;
batchNumber: string;
remark: string;
}
/**
* @description: MesWarehouseDisasmout分页返回值模型
*/
export interface MesWarehouseDisasmoutPageModel {
id: string;
warehouse: string;
handler: string;
department: string;
orderCustomer: string;
documentStatus: string;
businessOrganization: string;
carrier: string;
deliveryDate: string;
receivingAddress: string;
consignee: string;
batchNumber: string;
remark: string;
}
/**
* @description: MesWarehouseDisasmout表类型
*/
export interface MesWarehouseDisasmoutModel {
id: string;
warehouse: string;
handler: string;
department: string;
batchNumber: string;
orderCustomer: string;
carrier: string;
deliveryDate: string;
receivingAddress: string;
consignee: string;
businessOrganization: string;
documentStatus: string;
remark: string;
mesWarehouseDisasmoutInfoList?: MesWarehouseDisasmoutInfoModel;
}
/**
* @description: MesWarehouseDisasmoutInfo表类型
*/
export interface MesWarehouseDisasmoutInfoModel {
id: string;
disasmoutId: string;
materialCode: string;
materialName: string;
specifications: string;
model: string;
batchNumber: string;
grossPayCount: string;
actualDisbursementCount: string;
remark: string;
}
/**
* @description: MesWarehouseDisasmout分页返回值结构
*/
export type MesWarehouseDisasmoutPageResult = BasicFetchResult<MesWarehouseDisasmoutPageModel>;
import { MesWarehouseDisassemblePageModel, MesWarehouseDisassemblePageParams, MesWarehouseDisassemblePageResult } from './model/CcrkModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/ckgl/ccrk/page',
List = '/ckgl/ccrk/list',
Info = '/ckgl/ccrk/info',
MesWarehouseDisassemble = '/ckgl/ccrk',
}
/**
* @description: 查询MesWarehouseDisassemble分页列表
*/
export async function getMesWarehouseDisassemblePage(params: MesWarehouseDisassemblePageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesWarehouseDisassemblePageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取MesWarehouseDisassemble信息
*/
export async function getMesWarehouseDisassemble(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesWarehouseDisassemblePageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增MesWarehouseDisassemble
*/
export async function addMesWarehouseDisassemble(mesWarehouseDisassemble: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesWarehouseDisassemble,
params: mesWarehouseDisassemble,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新MesWarehouseDisassemble
*/
export async function updateMesWarehouseDisassemble(mesWarehouseDisassemble: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesWarehouseDisassemble,
params: mesWarehouseDisassemble,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除MesWarehouseDisassemble(批量删除)
*/
export async function deleteMesWarehouseDisassemble(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesWarehouseDisassemble,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesWarehouseDisassemble分页参数 模型
*/
export interface MesWarehouseDisassemblePageParams extends BasicPageParams {
warehouseName: string;
storekeeper: string;
productionDepartment: string;
businessOrganization: string;
documentStatus: string;
batchNumber: string;
remark: string;
}
/**
* @description: MesWarehouseDisassemble分页返回值模型
*/
export interface MesWarehouseDisassemblePageModel {
id: string;
warehouseName: string;
storekeeper: string;
productionDepartment: string;
businessOrganization: string;
documentStatus: string;
batchNumber: string;
remark: string;
}
/**
* @description: MesWarehouseDisassemble表类型
*/
export interface MesWarehouseDisassembleModel {
id: string;
businessOrganization: string;
warehouseName: string;
storekeeper: string;
productionDepartment: string;
batchNumber: string;
documentStatus: string;
remark: string;
mesWarehouseDisassembleInfoList?: MesWarehouseDisassembleInfoModel;
}
/**
* @description: MesWarehouseDisassembleInfo表类型
*/
export interface MesWarehouseDisassembleInfoModel {
id: string;
disassembleId: string;
materialId: string;
materialCode: string;
materialName: string;
specifications: string;
model: string;
batchNumber: string;
warehousingNumber: string;
remark: string;
storageLocation: string;
}
/**
* @description: MesWarehouseDisassemble分页返回值结构
*/
export type MesWarehouseDisassemblePageResult = BasicFetchResult<MesWarehouseDisassemblePageModel>;
......@@ -6,6 +6,10 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesWarehouseInPageParams extends BasicPageParams {
djh: string;
djrq: string;
crklx: string;
ck: string;
gys: string;
......@@ -17,6 +21,8 @@ export interface MesWarehouseInPageParams extends BasicPageParams {
ywzz: string;
cspc: string;
bz: string;
}
/**
......
......@@ -13,6 +13,8 @@ export interface MesWarehouseOtheroutPageParams extends BasicPageParams {
lydj: string;
ck: string;
pch: string;
}
/**
......@@ -32,6 +34,8 @@ export interface MesWarehouseOtheroutPageModel {
ck: string;
cgy: string;
pch: string;
}
/**
......@@ -54,6 +58,8 @@ export interface MesWarehouseOtheroutModel {
cgy: string;
pch: string;
p1: string;
p2: string;
......@@ -135,16 +141,22 @@ export interface MesWarehouseOtheroutInfoModel {
qtid: string;
cpbm: string;
cp: string;
gg: string;
xh: string;
xqsl: string;
jldw: string;
hw: string;
pch: string;
bz: string;
p1: string;
......
......@@ -13,6 +13,8 @@ export interface MesWarehouseOtherPageParams extends BasicPageParams {
lydj: string;
ck: string;
pch: string;
}
/**
......@@ -32,6 +34,8 @@ export interface MesWarehouseOtherPageModel {
ck: string;
cgy: string;
pch: string;
}
/**
......@@ -54,6 +58,8 @@ export interface MesWarehouseOtherModel {
cgy: string;
pch: string;
p1: string;
p2: string;
......@@ -135,10 +141,14 @@ export interface MesWarehouseOtherInfoModel {
qtid: string;
cpbm: string;
cp: string;
gg: string;
xh: string;
xqsl: string;
hgsl: string;
......@@ -149,6 +159,8 @@ export interface MesWarehouseOtherInfoModel {
hw: string;
pch: string;
bz: string;
p1: string;
......
......@@ -6,11 +6,33 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesWarehouseSaleoutPageParams extends BasicPageParams {
djbh: string;
djrq: string;
ck: string;
crklx: string;
jbr: string;
bm: string;
ddkh: string;
djzt: string;
ywzz: string;
cydw: string;
shrq: string;
shdz: string;
shrxm: string;
pch: string;
bz: string;
}
/**
......@@ -41,13 +63,13 @@ export interface MesWarehouseSaleoutPageModel {
shdz: string;
shr: string;
ywzz: string;
djzt: string;
bz: string;
shrxm: string;
}
/**
......@@ -84,7 +106,7 @@ export interface MesWarehouseSaleoutModel {
shdz: string;
shr: string;
shrxm: string;
bz: string;
......
......@@ -6,9 +6,13 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesCollectionItemPageParams extends BasicPageParams {
code: string;
contentType: string;
name: string;
contentType: string;
qualityCategoryId: string;
dataType: string;
}
/**
......@@ -21,14 +25,102 @@ export interface MesCollectionItemPageModel {
name: string;
contentType: string;
dataType: string;
note: string;
qualityCategoryId: string;
}
/**
* @description: MesCollectionItem表类型
*/
export interface MesCollectionItemModel {
id: string;
code: string;
name: string;
required: string;
categoryId: string;
contentType: string;
dataType: string;
dictId: string;
relatedModelId: string;
relatedModelName: string;
relatedModelDomain: string;
standardValue: string;
upperValue: string;
lowerValue: string;
note: string;
companyId: string;
qualityCategoryId: string;
analysisMethod: string;
qualityMethodId: string;
destructive: string;
keyItem: string;
deleteMark: string;
createDate: string;
createUserId: string;
modifyDate: string;
modifyUserId: string;
sc: string;
dt: string;
bb: string;
mesCollectionScItOptionList?: MesCollectionScItOptionModel;
}
0;
/**
* @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;
}
/**
* @description: MesCollectionItem分页返回值结构
......
......@@ -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,9 +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;
}
/**
......@@ -23,11 +33,15 @@ export interface MesBaseBomPageModel {
bombb: string;
cpmc: string;
cpbh: string;
cpgg: string;
cpxh: string;
sfyy: string;
bz: string;
}
/**
......@@ -86,6 +100,8 @@ export interface MesBaseBomModel {
modifyUserId: string;
sjbom: string;
mesBaseBomItemList?: MesBaseBomItemModel;
}
......@@ -99,6 +115,8 @@ export interface MesBaseBomItemModel {
bomid: string;
wlid: string;
wlbh: string;
wlmc: string;
......
......@@ -6,11 +6,37 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesGongdanReportPageParams extends BasicPageParams {
bh: string;
gdbh: string;
zxbz: string;
cpbh: string;
cpid: string;
hj: string;
bgr: string;
zyr: string;
bc: string;
gdbh: string;
sccj: string;
gzzx: string;
gxId: string;
bgsj: string;
ywzz: string;
lch: string;
kssj: string;
jssj: string;
}
/**
......@@ -33,6 +59,8 @@ export interface MesGongdanReportPageModel {
zyr: string;
bc: string;
ywzz: string;
}
......@@ -157,6 +185,8 @@ export interface MesGongdanReportModel {
lch: string;
ywzz: string;
bc: string;
}
/**
......
import { MesQclbgRecordPageModel, MesQclbgRecordPageParams, MesQclbgRecordPageResult } from './model/QclywbgjlModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/scgl/qclywbgjl/page',
List = '/scgl/qclywbgjl/list',
Info = '/scgl/qclywbgjl/info',
MesQclbgRecord = '/scgl/qclywbgjl',
}
/**
* @description: 查询MesQclbgRecord分页列表
*/
export async function getMesQclbgRecordPage(params: MesQclbgRecordPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesQclbgRecordPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取MesQclbgRecord信息
*/
export async function getMesQclbgRecord(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesQclbgRecordPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增MesQclbgRecord
*/
export async function addMesQclbgRecord(mesQclbgRecord: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesQclbgRecord,
params: mesQclbgRecord,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新MesQclbgRecord
*/
export async function updateMesQclbgRecord(mesQclbgRecord: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesQclbgRecord,
params: mesQclbgRecord,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除MesQclbgRecord(批量删除)
*/
export async function deleteMesQclbgRecord(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesQclbgRecord,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesQclbgRecord分页参数 模型
*/
export interface MesQclbgRecordPageParams extends BasicPageParams {
bh: string;
bgr: string;
zyr: string;
ccwl: string;
gzzx: string;
ywzz: string;
lch: string;
lx: string;
kssj: string;
jssj: string;
}
/**
* @description: MesQclbgRecord分页返回值模型
*/
export interface MesQclbgRecordPageModel {
id: string;
bh: string;
lx: string;
ccwl: string;
lch: string;
bgsl: string;
zyr: string;
kssj: string;
jssj: string;
ywzz: string;
bgr: string;
bc: string;
}
/**
* @description: MesQclbgRecord表类型
*/
export interface MesQclbgRecordModel {
id: string;
bh: string;
lx: string;
mc: string;
ccwl: string;
kssj: string;
jssj: string;
gs: string;
bgsl: string;
lch: string;
gzzx: string;
bgr: string;
bgzz: string;
zyr: string;
ywzz: string;
fj: string;
bz: string;
deleteMark: string;
createDate: string;
createUserId: string;
modifyDate: string;
modifyUserId: string;
p1: string;
p2: string;
p3: string;
p4: string;
p5: string;
p6: string;
p7: string;
p8: string;
p9: string;
p10: string;
bc: string;
mesQclbgRecordMaterialList?: MesQclbgRecordMaterialModel;
}
/**
* @description: MesQclbgRecordMaterial表类型
*/
export interface MesQclbgRecordMaterialModel {
id: string;
wlid: string;
wlbh: string;
wlmc: string;
lch: string;
bgid: string;
tlsl: string;
bz: string;
deleteMark: string;
createDate: string;
createUserId: string;
modifyDate: string;
modifyUserId: string;
p1: string;
p2: string;
p3: string;
p4: string;
p5: string;
p6: string;
p7: string;
p8: string;
p9: string;
p10: string;
}
/**
* @description: MesQclbgRecord分页返回值结构
*/
export type MesQclbgRecordPageResult = BasicFetchResult<MesQclbgRecordPageModel>;
import { MesQclbgRecordOutputPageModel, MesQclbgRecordOutputPageParams, MesQclbgRecordOutputPageResult } from './model/QclywccmxModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/scgl/qclywccmx/page',
List = '/scgl/qclywccmx/list',
Info = '/scgl/qclywccmx/info',
MesQclbgRecordOutput = '/scgl/qclywccmx',
Rksq = '/scgl/qclywccmx/commitRk',
Zjsq = '/scgl/qclywccmx/commitZj',
}
/**
* @description: 查询MesQclbgRecordOutput分页列表
*/
export async function getMesQclbgRecordOutputPage(params: MesQclbgRecordOutputPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesQclbgRecordOutputPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取MesQclbgRecordOutput信息
*/
export async function getMesQclbgRecordOutput(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesQclbgRecordOutputPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增MesQclbgRecordOutput
*/
export async function addMesQclbgRecordOutput(mesQclbgRecordOutput: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesQclbgRecordOutput,
params: mesQclbgRecordOutput,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新MesQclbgRecordOutput
*/
export async function updateMesQclbgRecordOutput(mesQclbgRecordOutput: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesQclbgRecordOutput,
params: mesQclbgRecordOutput,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除MesQclbgRecordOutput(批量删除)
*/
export async function deleteMesQclbgRecordOutput(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesQclbgRecordOutput,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 入库
*/
export async function rksqMesProductOutput(params: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.Rksq,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 质检
*/
export async function zjsqMesProductOutput(params: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.Zjsq,
params,
},
{
errorMessageMode: mode,
},
);
}
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesQclbgRecordOutput分页参数 模型
*/
export interface MesQclbgRecordOutputPageParams extends BasicPageParams {
bh: string;
ccsj: string;
lch: string;
cpid: string;
rkzt: string;
zjzt: string;
}
/**
* @description: MesQclbgRecordOutput分页返回值模型
*/
export interface MesQclbgRecordOutputPageModel {
id: string;
bh: string;
lch: string;
cpid: string;
csl: string;
ccsj: string;
rkzt: string;
zjzt: string;
}
/**
* @description: MesQclbgRecordOutput表类型
*/
export interface MesQclbgRecordOutputModel {
id: string;
deleteMark: string;
ywid: string;
bh: string;
ywzz: string;
lch: string;
zl: string;
rkzt: string;
zjzt: string;
cpid: string;
cpmc: string;
cpbh: string;
csl: string;
ccsj: string;
bz: string;
p1: string;
p2: string;
p3: string;
p4: string;
p5: string;
p6: string;
p7: string;
p8: string;
p9: string;
p10: string;
createDate: string;
createUserId: string;
modifyDate: string;
modifyUserId: string;
}
/**
* @description: MesQclbgRecordOutput分页返回值结构
*/
export type MesQclbgRecordOutputPageResult = BasicFetchResult<MesQclbgRecordOutputPageModel>;
......@@ -6,9 +6,9 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesProductionPlanPageParams extends BasicPageParams {
jhbh: string;
ddbh: string;
kh: string;
ssgs: string;
ywzz: string;
zt: string;
}
......@@ -19,13 +19,15 @@ export interface MesProductionPlanPageParams extends BasicPageParams {
export interface MesProductionPlanPageModel {
id: string;
ddbh: string;
jhbh: string;
ddbh: string;
kh: string;
ssgs: string;
jhjhrq: string;
ywzz: string;
zt: string;
}
......@@ -107,6 +109,8 @@ export interface MesProductionPlanProductModel {
cpbh: string;
cpmc: string;
nbdm: string;
hjzt: string;
......
import { MesQualityInspectionLeaveFactoryWorkflowPageModel, MesQualityInspectionLeaveFactoryWorkflowPageParams, MesQualityInspectionLeaveFactoryWorkflowPageResult } from './model/CccpfxspdModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/zlgl/cccpfxspd/page',
List = '/zlgl/cccpfxspd/list',
Info = '/zlgl/cccpfxspd/info',
MesQualityInspectionLeaveFactoryWorkflow = '/zlgl/cccpfxspd',
}
/**
* @description: 查询MesQualityInspectionLeaveFactoryWorkflow分页列表
*/
export async function getMesQualityInspectionLeaveFactoryWorkflowPage(params: MesQualityInspectionLeaveFactoryWorkflowPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesQualityInspectionLeaveFactoryWorkflowPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取MesQualityInspectionLeaveFactoryWorkflow信息
*/
export async function getMesQualityInspectionLeaveFactoryWorkflow(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesQualityInspectionLeaveFactoryWorkflowPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增MesQualityInspectionLeaveFactoryWorkflow
*/
export async function addMesQualityInspectionLeaveFactoryWorkflow(mesQualityInspectionLeaveFactoryWorkflow: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesQualityInspectionLeaveFactoryWorkflow,
params: mesQualityInspectionLeaveFactoryWorkflow,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新MesQualityInspectionLeaveFactoryWorkflow
*/
export async function updateMesQualityInspectionLeaveFactoryWorkflow(mesQualityInspectionLeaveFactoryWorkflow: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesQualityInspectionLeaveFactoryWorkflow,
params: mesQualityInspectionLeaveFactoryWorkflow,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除MesQualityInspectionLeaveFactoryWorkflow(批量删除)
*/
export async function deleteMesQualityInspectionLeaveFactoryWorkflow(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesQualityInspectionLeaveFactoryWorkflow,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesQualityInspectionLeaveFactoryWorkflow分页参数 模型
*/
export interface MesQualityInspectionLeaveFactoryWorkflowPageParams extends BasicPageParams {
jyrq: string;
hjph: string;
lch: string;
jyy: string;
gkmc: string;
cpms: string;
gkyj: string;
}
/**
* @description: MesQualityInspectionLeaveFactoryWorkflow分页返回值模型
*/
export interface MesQualityInspectionLeaveFactoryWorkflowPageModel {
id: string;
jyrq: string;
hjph: string;
lch: string;
jyy: string;
gkmc: string;
cpms: string;
gkyj: string;
}
/**
* @description: MesQualityInspectionLeaveFactoryWorkflow表类型
*/
export interface MesQualityInspectionLeaveFactoryWorkflowModel {
id: string;
deleteMark: string;
gkyj: string;
images: string;
cpms: string;
gkmc: string;
jyy: string;
lch: string;
hjph: string;
jyrq: string;
createDate: string;
createUserId: string;
modifyDate: string;
modifyUserId: string;
}
/**
* @description: MesQualityInspectionLeaveFactoryWorkflow分页返回值结构
*/
export type MesQualityInspectionLeaveFactoryWorkflowPageResult =
BasicFetchResult<MesQualityInspectionLeaveFactoryWorkflowPageModel>;
import { MesQualityUnqualifiedWorkflowPageModel, MesQualityUnqualifiedWorkflowPageParams, MesQualityUnqualifiedWorkflowPageResult } from './model/CpbhgcllcdModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/zlgl/cpbhgcllcd/page',
List = '/zlgl/cpbhgcllcd/list',
Info = '/zlgl/cpbhgcllcd/info',
MesQualityUnqualifiedWorkflow = '/zlgl/cpbhgcllcd',
}
/**
* @description: 查询MesQualityUnqualifiedWorkflow分页列表
*/
export async function getMesQualityUnqualifiedWorkflowPage(params: MesQualityUnqualifiedWorkflowPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesQualityUnqualifiedWorkflowPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取MesQualityUnqualifiedWorkflow信息
*/
export async function getMesQualityUnqualifiedWorkflow(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesQualityUnqualifiedWorkflowPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增MesQualityUnqualifiedWorkflow
*/
export async function addMesQualityUnqualifiedWorkflow(mesQualityUnqualifiedWorkflow: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesQualityUnqualifiedWorkflow,
params: mesQualityUnqualifiedWorkflow,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新MesQualityUnqualifiedWorkflow
*/
export async function updateMesQualityUnqualifiedWorkflow(mesQualityUnqualifiedWorkflow: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesQualityUnqualifiedWorkflow,
params: mesQualityUnqualifiedWorkflow,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除MesQualityUnqualifiedWorkflow(批量删除)
*/
export async function deleteMesQualityUnqualifiedWorkflow(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesQualityUnqualifiedWorkflow,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesQualityUnqualifiedWorkflow分页参数 模型
*/
export interface MesQualityUnqualifiedWorkflowPageParams extends BasicPageParams {
bhgid: string;
jyrq: string;
hjph: string;
lch: string;
jyy: string;
gkmc: string;
qxmc: string;
qxms: string;
qxmssfss: string;
jzyfcsyz1: string;
jzcsyz2: string;
jzcsssyxxyz: string;
jzyfcs: string;
gbyyfx: string;
}
/**
* @description: MesQualityUnqualifiedWorkflow分页返回值模型
*/
export interface MesQualityUnqualifiedWorkflowPageModel {
id: string;
bhgid: string;
jyrq: string;
hjph: string;
lch: string;
jyy: string;
gkmc: string;
qxmc: string;
qxms: string;
qxmssfss: string;
jzyfcsyz1: string;
jzcsyz2: string;
jzcsssyxxyz: string;
jzyfcs: string;
gbyyfx: string;
}
/**
* @description: MesQualityUnqualifiedWorkflow表类型
*/
export interface MesQualityUnqualifiedWorkflowModel {
id: string;
deleteMark: string;
bhgid: string;
jzcsssyxxyz: string;
jzyfcs: string;
gbyyfx: string;
spr: string;
jzcsyz2: string;
jzyfcsyz1: string;
qxmssfss: string;
images: string;
qxms: string;
qxmc: string;
gkmc: string;
jyy: string;
lch: string;
hjph: string;
jyrq: string;
createDate: string;
createUserId: string;
modifyDate: string;
modifyUserId: string;
}
/**
* @description: MesQualityUnqualifiedWorkflow分页返回值结构
*/
export type MesQualityUnqualifiedWorkflowPageResult =
BasicFetchResult<MesQualityUnqualifiedWorkflowPageModel>;
import { MesQualityInspectionSteelScrapWorkflowPageModel, MesQualityInspectionSteelScrapWorkflowPageParams, MesQualityInspectionSteelScrapWorkflowPageResult } from './model/FgwgyscllcdModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/zlgl/fgwgyscllcd/page',
List = '/zlgl/fgwgyscllcd/list',
Info = '/zlgl/fgwgyscllcd/info',
MesQualityInspectionSteelScrapWorkflow = '/zlgl/fgwgyscllcd',
}
/**
* @description: 查询MesQualityInspectionSteelScrapWorkflow分页列表
*/
export async function getMesQualityInspectionSteelScrapWorkflowPage(params: MesQualityInspectionSteelScrapWorkflowPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesQualityInspectionSteelScrapWorkflowPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取MesQualityInspectionSteelScrapWorkflow信息
*/
export async function getMesQualityInspectionSteelScrapWorkflow(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesQualityInspectionSteelScrapWorkflowPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增MesQualityInspectionSteelScrapWorkflow
*/
export async function addMesQualityInspectionSteelScrapWorkflow(mesQualityInspectionSteelScrapWorkflow: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesQualityInspectionSteelScrapWorkflow,
params: mesQualityInspectionSteelScrapWorkflow,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新MesQualityInspectionSteelScrapWorkflow
*/
export async function updateMesQualityInspectionSteelScrapWorkflow(mesQualityInspectionSteelScrapWorkflow: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesQualityInspectionSteelScrapWorkflow,
params: mesQualityInspectionSteelScrapWorkflow,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除MesQualityInspectionSteelScrapWorkflow(批量删除)
*/
export async function deleteMesQualityInspectionSteelScrapWorkflow(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesQualityInspectionSteelScrapWorkflow,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesQualityInspectionSteelScrapWorkflow分页参数 模型
*/
export interface MesQualityInspectionSteelScrapWorkflowPageParams extends BasicPageParams {
createUserId: string;
createDate: string;
modifyDate: string;
dhrq: string;
gys: string;
ytgc: string;
cph: string;
cpmc: string;
sfpsyj: string;
scbmyj: string;
mybmyj: string;
pkyfbmyj: string;
}
/**
* @description: MesQualityInspectionSteelScrapWorkflow分页返回值模型
*/
export interface MesQualityInspectionSteelScrapWorkflowPageModel {
id: string;
gys: string;
dhrq: string;
ytgc: string;
cph: string;
cpmc: string;
sfpsyj: string;
createUserId: string;
createDate: string;
modifyDate: string;
scbmyj: string;
mybmyj: string;
pkyfbmyj: string;
}
/**
* @description: MesQualityInspectionSteelScrapWorkflow表类型
*/
export interface MesQualityInspectionSteelScrapWorkflowModel {
id: string;
pkyfbmyj: string;
mybmyj: string;
scbmyj: string;
images: string;
sfpsyj: string;
cpmc: string;
cph: string;
ytgc: string;
gys: string;
dhrq: string;
createDate: string;
createUserId: string;
modifyDate: string;
deleteMark: string;
modifyUserId: string;
}
/**
* @description: MesQualityInspectionSteelScrapWorkflow分页返回值结构
*/
export type MesQualityInspectionSteelScrapWorkflowPageResult =
BasicFetchResult<MesQualityInspectionSteelScrapWorkflowPageModel>;
import { MesQualityInspectionSteelScrapAbnormalWorkflowPageModel, MesQualityInspectionSteelScrapAbnormalWorkflowPageParams, MesQualityInspectionSteelScrapAbnormalWorkflowPageResult } from './model/FgysycqkfkModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/zlgl/fgysycqkfk/page',
List = '/zlgl/fgysycqkfk/list',
Info = '/zlgl/fgysycqkfk/info',
MesQualityInspectionSteelScrapAbnormalWorkflow = '/zlgl/fgysycqkfk',
}
/**
* @description: 查询MesQualityInspectionSteelScrapAbnormalWorkflow分页列表
*/
export async function getMesQualityInspectionSteelScrapAbnormalWorkflowPage(params: MesQualityInspectionSteelScrapAbnormalWorkflowPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesQualityInspectionSteelScrapAbnormalWorkflowPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取MesQualityInspectionSteelScrapAbnormalWorkflow信息
*/
export async function getMesQualityInspectionSteelScrapAbnormalWorkflow(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesQualityInspectionSteelScrapAbnormalWorkflowPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增MesQualityInspectionSteelScrapAbnormalWorkflow
*/
export async function addMesQualityInspectionSteelScrapAbnormalWorkflow(mesQualityInspectionSteelScrapAbnormalWorkflow: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesQualityInspectionSteelScrapAbnormalWorkflow,
params: mesQualityInspectionSteelScrapAbnormalWorkflow,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新MesQualityInspectionSteelScrapAbnormalWorkflow
*/
export async function updateMesQualityInspectionSteelScrapAbnormalWorkflow(mesQualityInspectionSteelScrapAbnormalWorkflow: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesQualityInspectionSteelScrapAbnormalWorkflow,
params: mesQualityInspectionSteelScrapAbnormalWorkflow,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除MesQualityInspectionSteelScrapAbnormalWorkflow(批量删除)
*/
export async function deleteMesQualityInspectionSteelScrapAbnormalWorkflow(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesQualityInspectionSteelScrapAbnormalWorkflow,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesQualityInspectionSteelScrapAbnormalWorkflow分页参数 模型
*/
export interface MesQualityInspectionSteelScrapAbnormalWorkflowPageParams extends BasicPageParams {
gys: string;
ytgc: string;
cph: string;
jyrq: string;
cpmc: string;
ycqkms: string;
clyj: string;
scyj: string;
}
/**
* @description: MesQualityInspectionSteelScrapAbnormalWorkflow分页返回值模型
*/
export interface MesQualityInspectionSteelScrapAbnormalWorkflowPageModel {
id: string;
gys: string;
ytgc: string;
cph: string;
jyrq: string;
cpmc: string;
ycqkms: string;
clyj: string;
scyj: string;
}
/**
* @description: MesQualityInspectionSteelScrapAbnormalWorkflow表类型
*/
export interface MesQualityInspectionSteelScrapAbnormalWorkflowModel {
id: string;
clyj: string;
scyj: string;
images: string;
ycqkms: string;
cpmc: string;
cph: string;
ytgc: string;
gys: string;
jyrq: string;
createDate: string;
createUserId: string;
modifyDate: string;
deleteMark: string;
modifyUserId: string;
}
/**
* @description: MesQualityInspectionSteelScrapAbnormalWorkflow分页返回值结构
*/
export type MesQualityInspectionSteelScrapAbnormalWorkflowPageResult =
BasicFetchResult<MesQualityInspectionSteelScrapAbnormalWorkflowPageModel>;
import { MesQualityInspectionOtherWorkflowPageModel, MesQualityInspectionOtherWorkflowPageParams, MesQualityInspectionOtherWorkflowPageResult } from './model/ScbmypwtdModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/zlgl/scbmypwtd/page',
List = '/zlgl/scbmypwtd/list',
Info = '/zlgl/scbmypwtd/info',
MesQualityInspectionOtherWorkflow = '/zlgl/scbmypwtd',
}
/**
* @description: 查询MesQualityInspectionOtherWorkflow分页列表
*/
export async function getMesQualityInspectionOtherWorkflowPage(params: MesQualityInspectionOtherWorkflowPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesQualityInspectionOtherWorkflowPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取MesQualityInspectionOtherWorkflow信息
*/
export async function getMesQualityInspectionOtherWorkflow(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesQualityInspectionOtherWorkflowPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增MesQualityInspectionOtherWorkflow
*/
export async function addMesQualityInspectionOtherWorkflow(mesQualityInspectionOtherWorkflow: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesQualityInspectionOtherWorkflow,
params: mesQualityInspectionOtherWorkflow,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新MesQualityInspectionOtherWorkflow
*/
export async function updateMesQualityInspectionOtherWorkflow(mesQualityInspectionOtherWorkflow: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesQualityInspectionOtherWorkflow,
params: mesQualityInspectionOtherWorkflow,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除MesQualityInspectionOtherWorkflow(批量删除)
*/
export async function deleteMesQualityInspectionOtherWorkflow(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesQualityInspectionOtherWorkflow,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesQualityInspectionOtherWorkflow分页参数 模型
*/
export interface MesQualityInspectionOtherWorkflowPageParams extends BasicPageParams {
wtbm: string;
jcmd: string;
ypmc: string;
syr: string;
lxfs: string;
ypsl: string;
ypzl: string;
jcxm: string;
pdbz: string;
jsbz: string;
}
/**
* @description: MesQualityInspectionOtherWorkflow分页返回值模型
*/
export interface MesQualityInspectionOtherWorkflowPageModel {
id: string;
wtbm: string;
jcmd: string;
ypmc: string;
syr: string;
lxfs: string;
ypsl: string;
ypzl: string;
jcxm: string;
pdbz: string;
jsbz: string;
}
/**
* @description: MesQualityInspectionOtherWorkflow表类型
*/
export interface MesQualityInspectionOtherWorkflowModel {
id: string;
deleteMark: string;
jsbz: string;
images: string;
pdbz: string;
jcxm: string;
ypzl: string;
ypsl: string;
lxfs: string;
syr: string;
ypmc: string;
jcmd: string;
wtbm: string;
createDate: string;
createUserId: string;
modifyDate: string;
modifyUserId: string;
}
/**
* @description: MesQualityInspectionOtherWorkflow分页返回值结构
*/
export type MesQualityInspectionOtherWorkflowPageResult =
BasicFetchResult<MesQualityInspectionOtherWorkflowPageModel>;
......@@ -123,7 +123,7 @@
};
let res = await getDesignPage(params);
page.total = res.total;
template.list = res.list;
// template.list = res.list;
} catch (error) {}
}
function submit() {
......
......@@ -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;
}
......
<template>
<BasicModal
:height="600"
:width="900"
v-bind="$attrs" @register="registerModal" :title="getTitle"
@ok="handleSubmit" @cancel="handleClose" >
<div style="margin: 20px;">
<a-button type="primary" style="margin-bottom: 10px; margin-right: 10px;" @click="handleAllInWarehouse">全部入库</a-button>
<a-button type="primary" style="margin-bottom: 10px;" @click="handleCancelInWarehouse">取消全部入库</a-button>
<a-table bordered :data-source="dataSource" :columns="columns" :pagination="false" >
<template #bodyCell="{ column, text, record, index }">
<template v-if="column.key === 'index'">
{{ index + 1 }}
</template>
<template v-if="column.dataIndex === 'bcrksl'">
<a-input-number v-model:value="record.bcrksl" :min="0" :max="record.sl - record.yrlsl" />
</template>
</template>
</a-table>
</div>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, onMounted, reactive, provide, Ref } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage';
import { getMesCheliangBg, inWarehouse } from '/@/api/chaiche/ccbg';
const emit = defineEmits(['success', 'register']);
const { notification } = useMessage();
const formRef = ref();
const isCopy = ref<boolean>(false)
const state = reactive({
formModel: {},
isUpdate: true,
isView: false,
rowId: '',
});
provide<Ref<boolean>>('isCopy', isCopy);
const [registerModal, { closeModal }] = useModalInner(async () => {
});
const props = defineProps(['recordId'])
const getTitle = computed(() => ('拆车物料入库'));
const dataSource = ref([]);
const columns = reactive([
{
title: '序号',
dataIndex: 'index',
key: 'index',
align: 'center',
},
{
title: '物料名称',
dataIndex: 'cpmc',
key: 'cpmc',
},
{
title: '物料编码',
dataIndex: 'cpbh',
key: 'cpbh',
},
{
title: '单位',
dataIndex: 'dw',
key: 'dw',
},
{
title: '总数量',
dataIndex: 'sl',
key: 'sl',
},
{
title: '已入库数量',
dataIndex: 'yrlsl',
key: 'yrlsl',
},
{
title: '本次入库数量',
dataIndex: 'bcrksl',
key: 'bcrksl',
},
]);
onMounted(async () => {
const recordInfo = await getMesCheliangBg(props.recordId);
recordInfo.mesCheliangBgCpList.forEach(item => {
item.bcrksl = 0;
})
dataSource.value = recordInfo.mesCheliangBgCpList;
})
function handleAllInWarehouse() {
dataSource.value.forEach(item => {
item.bcrksl = item.sl - item.yrlsl;
});
}
function handleCancelInWarehouse() {
dataSource.value.forEach(item => {
item.bcrksl = 0;
});
}
async function handleSubmit() {
await inWarehouse(dataSource.value);
notification.success({
message: 'Tip',
description: '入库成功',
});
handleClose();
}
function handleClose() {
emit('success')
}
</script>
......@@ -23,15 +23,14 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '工作人',
fieldId: 'gzr',
fieldName: '车牌号码',
fieldId: 'cphm',
isSubTable: false,
showChildren: true,
type: 'user',
key: '21906e99fb08459ea4318c04707797ca',
type: 'associate-popup',
key: 'f89a9cedaa7a4f98958d46860ac84ad6',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -40,14 +39,15 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '车辆类型',
fieldId: 'cllx',
fieldName: '车辆颜色',
fieldId: 'clys',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'e17f3687f30f4a2995ea2b07348150b5',
type: 'input',
key: 'b45d8135f4e24817874d285431d05eb4',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -56,12 +56,12 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '车辆颜色',
fieldId: 'clys',
fieldName: '工作人',
fieldId: 'gzr',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'b45d8135f4e24817874d285431d05eb4',
type: 'user',
key: '21906e99fb08459ea4318c04707797ca',
children: [],
options: {},
defaultValue: '',
......@@ -73,12 +73,12 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '工作结束时间',
fieldId: 'gzjssj',
fieldName: '工作开始时间',
fieldId: 'gzkssj',
isSubTable: false,
showChildren: true,
type: 'date',
key: 'a349e957579e47cb90727cdfa8c9d21f',
key: '4da55e5ac2c04a2dacd2cd58470b6820',
children: [],
options: {},
defaultValue: '',
......@@ -107,12 +107,12 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '工作项目',
fieldId: 'gzxm',
fieldName: '车辆类型',
fieldId: 'cllx',
isSubTable: false,
showChildren: true,
type: 'associate-popup',
key: '0d265387754f487886c4b77058fd49a0',
type: 'select',
key: 'e17f3687f30f4a2995ea2b07348150b5',
children: [],
options: {},
},
......@@ -123,12 +123,12 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '车辆重量(kg)',
fieldId: 'clzl',
fieldName: '拆解辆数',
fieldId: 'clls',
isSubTable: false,
showChildren: true,
type: 'number',
key: '059de967d74b44bba170351aff279c63',
key: '04a49a0fddc440f8a904d4094783455c',
children: [],
options: {},
defaultValue: '',
......@@ -140,15 +140,14 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '拆解辆数',
fieldId: 'clls',
fieldName: '工作项目',
fieldId: 'gzxm',
isSubTable: false,
showChildren: true,
type: 'number',
key: '04a49a0fddc440f8a904d4094783455c',
type: 'associate-popup',
key: '0d265387754f487886c4b77058fd49a0',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -157,12 +156,12 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '磅单数量',
fieldId: 'bdsl',
fieldName: '工作结束时间',
fieldId: 'gzjssj',
isSubTable: false,
showChildren: true,
type: 'number',
key: '5bd116e5f35344cb8780f747370cee8d',
type: 'date',
key: 'a349e957579e47cb90727cdfa8c9d21f',
children: [],
options: {},
defaultValue: '',
......@@ -174,15 +173,14 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '工作时长(h)',
fieldId: 'gzsc',
fieldName: '物料状态',
fieldId: 'wlzt',
isSubTable: false,
showChildren: true,
type: 'number',
key: 'ae4a15e58ffe4710b337560f7d3b0703',
type: 'select',
key: 'cb12104722cc47719a7e688667ee16fd',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -191,14 +189,15 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '车牌号码',
fieldId: 'cphm',
fieldName: '车辆重量(kg)',
fieldId: 'clzl',
isSubTable: false,
showChildren: true,
type: 'associate-popup',
key: 'f89a9cedaa7a4f98958d46860ac84ad6',
type: 'number',
key: '059de967d74b44bba170351aff279c63',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -224,12 +223,29 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '工作开始时间',
fieldId: 'gzkssj',
fieldName: '磅单数量',
fieldId: 'bdsl',
isSubTable: false,
showChildren: true,
type: 'date',
key: '4da55e5ac2c04a2dacd2cd58470b6820',
type: 'number',
key: '5bd116e5f35344cb8780f747370cee8d',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '工作时长(h)',
fieldId: 'gzsc',
isSubTable: false,
showChildren: true,
type: 'number',
key: 'ae4a15e58ffe4710b337560f7d3b0703',
children: [],
options: {},
defaultValue: '',
......@@ -435,6 +451,36 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
tableName: 'mesCheliangBgCpList',
fieldName: '已入库数量',
fieldId: 'yrlsl',
type: 'InputNumber',
key: '98c7516b685e4a758f51282bd1f59496',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesCheliangBgCpList',
fieldName: '本次入库数量',
fieldId: 'bcrksl',
type: 'InputNumber',
key: '25f2ca82097d4c0c896a81880be44891',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesCheliangBgCpList',
fieldName: '单位',
fieldId: 'dw',
type: 'Input',
......
......@@ -6,7 +6,7 @@
<template #resizeRight>
<BasicTable @register="registerTable" isMenuTable ref="tableRef"
<BasicTable @register="registerTable" isMenuTable ref="tableRef" :row-selection="{ selectedRowKeys: selectedKeys, onChange: onSelectChange }"
>
......@@ -50,6 +50,8 @@
<CcbgModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel"/>
<InWarehouse v-if="showInWarehouse" :visible="showInWarehouse" :recordId="recordId"
@success="handleInWarehouseSuccess" @cancel="handleInWarehouseCancel"/>
......@@ -84,6 +86,7 @@
import CcbgModal from './components/CcbgModal.vue';
import InWarehouse from './components/InWarehouse.vue';
......@@ -103,7 +106,8 @@
const showInWarehouse = ref(false);
const recordId = ref(null);
const listSpliceNum = ref(3); //操作列最先展示几个
......@@ -131,9 +135,9 @@
//展示在列表内的按钮
const actionButtons = ref<string[]>(["view","edit","delete"]);
const actionButtons = ref<string[]>(["view","inWarehouse","delete"]);
const buttonConfigs = computed(()=>{
const list = [{"buttonId":"2018972431831822336","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2018972431831822337","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"buttonId":"2018972431831822338","name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true,"isEnableLock":true},{"buttonId":"2018972431831822339","name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]
const list = [{"buttonId":"2018972431831822336","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2018972431831822337","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"buttonId":"2019669737161912320","name":"入库","code":"inWarehouse","icon":"ant-design:home-twotone","isDefault":false,"isUse":true,"setting":[],"showType":"inline","buttonType":"primary"},{"buttonId":"2018972431831822339","name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]
return filterButtonAuth(list);
})
......@@ -145,7 +149,7 @@
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
});
const btnEvent = {view : handleView,add : handleAdd,edit : handleEdit,delete : handleDelete,}
const btnEvent = {view : handleView,add : handleAdd,delete : handleDelete,inWarehouse : handleInWarehouse}
const { currentRoute } = useRouter();
......@@ -157,6 +161,8 @@
const selectedKeys = ref<string[]>([]);
const selectedRowsData = ref<any[]>([]);
......@@ -176,8 +182,8 @@
formConfig: {
labelWidth: 100,
schemas: searchFormSchema,
fieldMapToTime: [['gzjssj', ['gzjssjStart', 'gzjssjEnd'], 'YYYY-MM-DD HH:mm:ss ', true],
['gzkssj', ['gzkssjStart', 'gzkssjEnd'], 'YYYY-MM-DD HH:mm:ss ', true],],
fieldMapToTime: [['gzkssj', ['gzkssjStart', 'gzkssjEnd'], 'YYYY-MM-DD HH:mm:ss ', true],
['gzjssj', ['gzjssjStart', 'gzjssjEnd'], 'YYYY-MM-DD HH:mm:ss ', true],],
showResetButton: false,
},
bordered:false,
......@@ -190,6 +196,8 @@
selectedKeys.value = [];
selectedRowsData.value = [];
},
useSearchForm: true,
......@@ -230,30 +238,6 @@
}
async function handleEdit(record: Recordable) {
let field = 'id';
try {
let hasIn = handleHasEnableLocke(buttonConfigs.value, 'edit');
if (hasIn) {
let res = await handleOpenFormEnableLockeData(
record[field],
formIdComputedRef.value,
);
if (res !== null) {
return;
}
}
let info = {
id: record[field],
isUpdate: true,
};
openModal(true, info);
} catch (error) {}
}
......@@ -282,14 +266,31 @@
});
}
function handleInWarehouse(record: Recordable) {
showInWarehouse.value = true;
recordId.value = record.id;
}
function onSelectChange(selectedRowKeys: [], selectedRows) {
selectedKeys.value = selectedRowKeys;
selectedRowsData.value = selectedRows;
}
function customRow(record: Recordable) {
return {
onClick: () => {
let selectedRowKeys = [...selectedKeys.value];
if (selectedRowKeys.indexOf(record.id) >= 0) {
let index = selectedRowKeys.indexOf(record.id);
selectedRowKeys.splice(index, 1);
} else {
selectedRowKeys.push(record.id);
}
selectedKeys.value = selectedRowKeys;
},
ondblclick: () => {
if (record.isCanEdit && hasPermission("ccbg:edit")) {
handleEdit(record);
......@@ -301,6 +302,8 @@
function handleSuccess() {
selectedKeys.value = [];
selectedRowsData.value = [];
reload();
}
......@@ -314,6 +317,13 @@
handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
}
function handleInWarehouseSuccess() {
showInWarehouse.value = false;
}
function handleInWarehouseCancel() {
showInWarehouse.value = false;
}
function handleView(record: Recordable) {
let info={
......
<template>
<div class="pt-4">
<SimpleForm
ref="systemFormRef"
:formProps="data.formDataProps"
:formModel="state.formModel"
:isWorkFlow="props.fromPage!=FromPageType.MENU"
:isCamelCase="true"
@model-change="handleChange"
/>
</div>
</template>
<script lang="ts" setup>
import { reactive, ref, onMounted, nextTick, watch } from 'vue';
import { formProps, formEventConfigs } from './config';
import SimpleForm from '/@/components/SimpleForm/src/SimpleForm.vue';
import { addMesCheliangBg, getMesCheliangBg, updateMesCheliangBg } from '/@/api/chaiche/gps';
import { cloneDeep, isString } from 'lodash-es';
import { FormDataProps } from '/@/components/Designer/src/types';
import { usePermission } from '/@/hooks/web/usePermission';
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { FromPageType } from '/@/enums/workflowEnum';
import { createFormEvent, getFormDataEvent, loadFormEvent, submitFormEvent,} from '/@/hooks/web/useFormEvent';
import { changeWorkFlowForm, changeSchemaDisabled } from '/@/hooks/web/useWorkFlowForm';
import { WorkFlowFormParams } from '/@/model/workflow/bpmnConfig';
import { useRouter } from 'vue-router';
const { filterFormSchemaAuth } = usePermission();
const RowKey = 'id';
const emits = defineEmits(['changeUploadComponentIds','loadingCompleted', 'update:value']);
const props = defineProps({
fromPage: {
type: Number,
default: FromPageType.MENU,
},
});
const systemFormRef = ref();
const data: { formDataProps: FormDataProps } = reactive({
formDataProps: cloneDeep(formProps),
});
const state = reactive({
formModel: {},
formInfo:{formId:'',formName:''}
});
const { currentRoute } = useRouter();
watch(
() => state.formModel,
(val) => {
emits('update:value', val);
},
{
deep: true,
},
);
onMounted(async () => {
try {
if (props.fromPage == FromPageType.MENU) {
setMenuPermission();
if(currentRoute.value.meta){
state.formInfo.formName = currentRoute.value.meta.title&&isString(currentRoute.value.meta.title)?currentRoute.value.meta.title:'';
state.formInfo.formId = currentRoute.value.meta.formId&&isString(currentRoute.value.meta.formId)?currentRoute.value.meta.formId:'';
}
await createFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单
await nextTick();
await loadFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单
} else if (props.fromPage == FromPageType.FLOW) {
emits('loadingCompleted'); //告诉系统表单已经加载完毕
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
} else if (props.fromPage == FromPageType.PREVIEW) {
// 预览 无需权限,表单事件也无需执行
} else if (props.fromPage == FromPageType.DESKTOP) {
// 桌面设计 表单事件需要执行
emits('loadingCompleted'); //告诉系统表单已经加载完毕
await createFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单
await loadFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单
}
} catch (error) {}
});
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
function setMenuPermission() {
data.formDataProps.schemas = filterFormSchemaAuth(data.formDataProps.schemas!);
}
// 校验form 通过返回表单数据
async function validate() {
let values = [];
try {
values = await systemFormRef.value?.validate();
//添加隐藏组件
if (data.formDataProps.hiddenComponent?.length) {
data.formDataProps.hiddenComponent.forEach((component) => {
values[component.bindField] = component.value;
});
}
} finally {
}
return values;
}
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async function setFormDataFromId(rowId) {
try {
const record = await getMesCheliangBg(rowId);
setFieldsValue(record);
state.formModel = record;
await getFormDataEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:获取表单数据
} catch (error) {
}
}
// 辅助返回表单数据
async function getFieldsValue() {
let values = [];
try {
values = await systemFormRef.value?.getFieldsValue();
//添加隐藏组件
if (data.formDataProps.hiddenComponent?.length) {
data.formDataProps.hiddenComponent.forEach((component) => {
values[component.bindField] = component.value;
});
}
} finally {
}
return values;
}
// 辅助设置表单数据
function setFieldsValue(record) {
systemFormRef.value.setFieldsValue(record);
}
// 重置表单数据
async function resetFields() {
await systemFormRef.value.resetFields();
}
// 设置表单数据全部为Disabled 【查看】
async function setDisabledForm( ) {
data.formDataProps.schemas = changeSchemaDisabled(cloneDeep(data.formDataProps.schemas));
}
// 获取行键值
function getRowKey() {
return RowKey;
}
// 更新api表单数据
async function update({ values, rowId }) {
try {
values[RowKey] = rowId;
state.formModel = values;
let saveVal = await updateMesCheliangBg(values);
await submitFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:提交表单
return saveVal;
} catch (error) {}
}
// 新增api表单数据
async function add(values) {
try {
state.formModel = values;
let saveVal = await addMesCheliangBg(values);
await submitFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:提交表单
return saveVal;
} catch (error) {}
}
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
async function setWorkFlowForm(obj: WorkFlowFormParams) {
try {
if (obj.formId) state.formInfo.formId = obj.formId;
if (obj.formName) state.formInfo.formName = obj.formName;
let flowData = await changeWorkFlowForm(cloneDeep(formProps), obj);
let { buildOptionJson, uploadComponentIds, formModels, isViewProcess } = flowData;
data.formDataProps = buildOptionJson;
emits('changeUploadComponentIds', uploadComponentIds); //工作流中必须保存上传组件id【附件汇总需要】
if (isViewProcess) {
setDisabledForm(); //查看
}
state.formModel = formModels;
setFieldsValue(formModels);
} catch (error) {}
await createFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单
await loadFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单
}
function handleChange(val) {
emits('update:value', val);
}
async function sendMessageForAllIframe() {
try {
if (systemFormRef.value && systemFormRef.value.sendMessageForAllIframe) {
systemFormRef.value.sendMessageForAllIframe();
}
} catch (error) {}
}
defineExpose({
setFieldsValue,
resetFields,
validate,
add,
update,
setFormDataFromId,
setDisabledForm,
setMenuPermission,
setWorkFlowForm,
getRowKey,
getFieldsValue,
sendMessageForAllIframe
});
</script>
\ No newline at end of file
<template>
<BasicModal
:height="500"
v-bind="$attrs" @register="registerModal" :title="getTitle"
@ok="handleSubmit" @cancel="handleClose" >
<ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, reactive, provide, Ref } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { formProps } from './config';
import ModalForm from './Form.vue';
import { FromPageType } from '/@/enums/workflowEnum';
const emit = defineEmits(['success', 'register']);
const { notification } = useMessage();
const formRef = ref();
const isCopy = ref<boolean>(false)
const state = reactive({
formModel: {},
isUpdate: true,
isView: false,
rowId: '',
});
provide<Ref<boolean>>('isCopy', isCopy);
const { t } = useI18n();
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
await handleInner(data);
});
const getTitle = computed(() => (state.isView ? '查看' : state.isUpdate ? '编辑' : isCopy.value ? '复制数据' : '新增'));
async function handleInner(data){
state.isUpdate = !!data?.isUpdate;
state.isView = !!data?.isView;
isCopy.value = !!data?.isCopy;
setModalProps({
destroyOnClose: true,
maskClosable: false,
showCancelBtn: !state.isView,
showOkBtn: !state.isView,
canFullscreen: true,
width: 900,
footer: state.isView ? null : undefined,defaultFullscreen:true,
});
if (state.isUpdate || state.isView || isCopy.value) {
state.rowId = data.id;
if (state.isView) {
await formRef.value.setDisabledForm();
}
await formRef.value.setFormDataFromId(state.rowId);
} else {
formRef.value.resetFields();
}
}
async function saveModal() {
let saveSuccess = false;
try {
const values = await formRef.value?.validate();
//添加隐藏组件
if (formProps.hiddenComponent?.length) {
formProps.hiddenComponent.forEach((component) => {
values[component.bindField] = component.value;
});
}
if (values !== false) {
try {
if (!state.isUpdate || isCopy.value) {
saveSuccess = await formRef.value.add(values);
} else {
saveSuccess = await formRef.value.update({ values, rowId: state.rowId });
}
return saveSuccess;
} catch (error) {}
}
} catch (error) {
return saveSuccess;
}
}
async function handleSubmit() {
try {
const saveSuccess = await saveModal();
setModalProps({ confirmLoading: true });
if (saveSuccess) {
if (!state.isUpdate || isCopy.value) {
//false 新增
notification.success({
message: 'Tip',
description: isCopy.value ? '复制成功' : t('新增成功!'),
}); //提示消息
} else {
notification.success({
message: 'Tip',
description: t('修改成功!'),
}); //提示消息
}
closeModal();
formRef.value.resetFields();
emit('success');
}
} finally {
setModalProps({ confirmLoading: false });
}
}
function handleClose() {
formRef.value.resetFields();
}
</script>
\ No newline at end of file
export const permissionList = [
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '开机时间',
fieldId: 'kjsj',
isSubTable: false,
showChildren: true,
type: 'date',
key: '7eabdfdd3ac84a028c4f01451d9e025d',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '停机时间',
fieldId: 'tjsj',
isSubTable: false,
showChildren: true,
type: 'date',
key: '4b4608ce68d945f9b3c4dd1c824990ed',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '开机时长(h)',
fieldId: 'kjsc',
isSubTable: false,
showChildren: true,
type: 'number',
key: 'adde0339922147eeb28256a873512556',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '开机耗电量(kwh)',
fieldId: 'kjhdl',
isSubTable: false,
showChildren: true,
type: 'number',
key: '43df9e1dbcce4b6b8d4ec516245697f5',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '工作人',
fieldId: 'gzr',
isSubTable: false,
showChildren: true,
type: 'user',
key: '5764c97901a848bb8c8be56822bb6b1c',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '是否外购车架',
fieldId: 'sfwgcj',
isSubTable: false,
showChildren: true,
type: 'radio',
key: 'f79eeab71e5f4fc889c5c1f3928a0977',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '破碎类别',
fieldId: 'pslb',
isSubTable: false,
showChildren: true,
type: 'input',
key: '713eae175b124f8ca00068f13c14d815',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '供货厂家',
fieldId: 'ghcj',
isSubTable: false,
showChildren: true,
type: 'input',
key: '58949379c9a44ccc8e81c6ebeda74b02',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '到货车号',
fieldId: 'dhch',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'bbd015e4207640399d4722dd828ec45b',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '到货破碎信息',
fieldId: 'dhpsxx',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'f3758f19937945f485a2ab616f72cdb6',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '到货信息',
fieldId: 'dhxx',
isSubTable: false,
showChildren: true,
type: 'input',
key: '42b6ecf016c544169c8d5fd31e56fabf',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '当日总产量',
fieldId: 'drzcl',
isSubTable: false,
showChildren: true,
type: 'number',
key: '630a2ddcad0242909b459f5e967f9d12',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '备注',
fieldId: 'bz',
isSubTable: false,
showChildren: true,
type: 'textarea',
key: '1308d5f5b70a40aaa9b5a4f895ddd280',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '控制室电脑运行画面',
fieldId: 'yxhm',
isSubTable: false,
showChildren: true,
type: 'upload',
key: '4ebf6db8351d4eefaa64ea6f2f46e27f',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '破碎前物料照片',
fieldId: 'psqzp',
isSubTable: false,
showChildren: true,
type: 'upload',
key: '74c1ed8078c641e5bff19a11c4b92564',
children: [],
options: {},
defaultValue: '',
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: true,
showChildren: false,
tableName: 'mesCheliangTlmxList',
fieldName: '投料明细',
fieldId: 'mesCheliangTlmxList',
type: 'form',
key: '393c039b18ad4fc2a008664d1a5cf0e7',
children: [
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesCheliangTlmxList',
fieldName: '库存id',
fieldId: 'kcId',
type: 'Input',
key: '584bfd36753c4d558d4f6ca2aa874f46',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesCheliangTlmxList',
fieldName: '物料id',
fieldId: 'cpId',
type: 'Input',
key: '375c00bf2fc747db913764f1b5d7601e',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesCheliangTlmxList',
fieldName: '物料编号',
fieldId: 'cpbh',
type: 'Input',
key: 'fc36252191b442de821813bb0567719e',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesCheliangTlmxList',
fieldName: '物料名称',
fieldId: 'cpmc',
type: 'Input',
key: '4ad53aafbb344e4d9006652b4229b619',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesCheliangTlmxList',
fieldName: '库存数量',
fieldId: 'kcsl',
type: 'InputNumber',
key: 'ef6d5be7b722452c912953c76515a22c',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesCheliangTlmxList',
fieldName: '投料数量',
fieldId: 'tlsl',
type: 'InputNumber',
key: 'b9fd374345624f0580dcf8fd6c77d584',
children: [],
},
],
},
];
<template>
<ResizePageWrapper :hasLeft="false">
<template #resizeRight>
<BasicTable @register="registerTable" isMenuTable ref="tableRef"
>
<template #toolbar>
<template v-for="button in tableButtonConfig" :key="button.code">
<a-button v-if="button.isDefault" type="primary" @click="buttonClick(button.code)">
<template #icon><Icon :icon="button.icon" /></template>
{{ button.name }}
</a-button>
<CustomButtonModal v-else-if="button.buttonType == 'modal'" :info="button" />
<a-button v-else :type="button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'" :danger="button.buttonType === 'danger'" >
<template #icon><Icon :icon="button.icon" /></template>
{{ button.name }}
</a-button>
</template>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'action'">
<TableAction
:actions="getLessActions(record)"
:dropDownActions="getMoreActions(record)"
/>
</template>
<template v-else-if="column.dataIndex && column?.listStyle">
<span :style="executeListStyle(getValue(record, column, 'style'), column?.listStyle)">{{
getValue(record, column, 'value')
}}</span>
</template>
</template>
</BasicTable>
</template>
<GpsModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel"/>
</ResizePageWrapper>
</template>
<script lang="ts" setup>
import { ref, computed,provide,Ref, createVNode,
} from 'vue';
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
import { getMesCheliangBgPage, deleteMesCheliangBg} from '/@/api/chaiche/gps';
import { ResizePageWrapper } from '/@/components/Page';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { usePermission } from '/@/hooks/web/usePermission';
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { executeListStyle, getValue } from '/@/hooks/web/useListStyle';//列表样式配置
import { useRouter } from 'vue-router';
import { useModal } from '/@/components/Modal';
import GpsModal from './components/GpsModal.vue';
import { searchFormSchema, columns } from './components/config';
import Icon from '/@/components/Icon/index';
const listSpliceNum = ref(3); //操作列最先展示几个
import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock';
const pageParamsInfo = ref<any>({});
const { enableLockeData,handleOpenFormEnableLockeData, handleCloseFormEnableLocke, handleHasEnableLocke } =
useConcurrentLock();
const { notification } = useMessage();
const { t } = useI18n();
defineEmits(['register']);
const { filterColumnAuth, filterButtonAuth, hasPermission } = usePermission();
const filterColumns = filterColumnAuth(columns);
const tableRef = ref();
//展示在列表内的按钮
const actionButtons = ref<string[]>(["view","edit","delete"]);
const buttonConfigs = computed(()=>{
const list = [{"buttonId":"2020751420573388800","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2020751420573388801","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"buttonId":"2020751420573388802","name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true,"isEnableLock":true},{"buttonId":"2020751420573388803","name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]
return filterButtonAuth(list);
})
const tableButtonConfig = computed(() => {
return buttonConfigs.value?.filter((x) => !actionButtons.value.includes(x.code));
});
const actionButtonConfig = computed(() => {
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
});
const btnEvent = {view : handleView,add : handleAdd,edit : handleEdit,delete : handleDelete,}
const { currentRoute } = useRouter();
const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string);
provide<Ref<string>>('currentFormId', formIdComputedRef);
const [registerModal, { openModal }] = useModal();
const [registerTable, { reload, }] = useTable({
title: 'Gps列表',
api: getMesCheliangBgPage,
rowKey: 'id',
columns: filterColumns,
pagination: {
pageSize: 10,
},
formConfig: {
labelWidth: 100,
schemas: searchFormSchema,
fieldMapToTime: [['kjsj', ['kjsjStart', 'kjsjEnd'], 'YYYY-MM-DD HH:mm:ss ', true],
['tjsj', ['tjsjStart', 'tjsjEnd'], 'YYYY-MM-DD HH:mm:ss ', true],],
showResetButton: false,
},
bordered:false,
beforeFetch: (params) => {
pageParamsInfo.value = {...params, FormId: formIdComputedRef.value,PK: 'id' }
return pageParamsInfo.value;
},
afterFetch: (res) => {
},
useSearchForm: true,
showTableSetting: true,
striped: false,
actionColumn: {
width: 195,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
},
tableSetting: {
size: false,
},
customRow,
isAdvancedQuery: false,
querySelectOption: JSON.stringify(searchFormSchema),
objectId: formIdComputedRef.value, ////系统表单formId,自定义表单releaseId的id值
});
function buttonClick(code) {
btnEvent[code]();
}
function handleAdd() {
openModal(true, { isUpdate: false, });
}
async function handleEdit(record: Recordable) {
let field = 'id';
try {
let hasIn = handleHasEnableLocke(buttonConfigs.value, 'edit');
if (hasIn) {
let res = await handleOpenFormEnableLockeData(
record[field],
formIdComputedRef.value,
);
if (res !== null) {
return;
}
}
let info = {
id: record[field],
isUpdate: true,
};
openModal(true, info);
} catch (error) {}
}
function handleDelete(record: Recordable) {
deleteList([record.id]);
}
function deleteList(ids) {
Modal.confirm({
title: '提示信息',
icon: createVNode(ExclamationCircleOutlined),
content: '是否确认删除?',
okText: '确认',
cancelText: '取消',
onOk() {
deleteMesCheliangBg(ids).then((_) => {
handleSuccess();
notification.success({
message: 'Tip',
description: t('删除成功!'),
});
});
},
onCancel() {},
});
}
function customRow(record: Recordable) {
return {
ondblclick: () => {
if (record.isCanEdit && hasPermission("gps:edit")) {
handleEdit(record);
}
},
};
}
function handleSuccess() {
reload();
}
function handleFormSuccess() {
handleSuccess();
handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
}
function handleFormCancel() {
handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
}
function handleView(record: Recordable) {
let info={
isView: true,
id: record.id,
}
openModal(true, info);
}
function getLessActions(record: Recordable) {
let list = getActions(record);
return list.slice(0, listSpliceNum.value);
}
function getMoreActions(record: Recordable) {
let list = getActions(record);
return list.slice(listSpliceNum.value);
}
function getActions(record: Recordable):ActionItem[] {
record.isCanEdit = false;
let actionsList: ActionItem[] = [];
actionButtonConfig.value?.map((button) => {
if (!record?.workflowData?.processId) {
record.isCanEdit = true;
actionsList.push({
...button,
auth: `gps:${button.code}`,
label: button?.name,
color: button.code === 'delete' ? 'error' : undefined,
onClick: btnEvent[button.code]?.bind(null, record),
});
} else {
if (!['edit', 'delete'].includes(button.code)) {
actionsList.push({
auth: `gps:${button.code}`,
label: button?.name,
onClick: btnEvent[button.code]?.bind(null, record),
});
}
}
});
return actionsList;
}
</script>
<style lang="less" scoped>
:deep(.ant-table-selection-col) {
width: 50px;
}
.show{
display: flex;
}
.hide{
display: none !important;
}
</style>
\ 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