Browse Source

chore: tld调整

xyh 3 năm trước cách đây
mục cha
commit
d98bd624e2

+ 2 - 3
cypress/e2e/Login.cy.ts

@@ -1,9 +1,8 @@
-import {loginIntercept, menuIntercept} from './utils';
+import {beforeSetup} from './utils';
 
 describe('登录测试', function () {
   beforeEach(function () {
-    loginIntercept();
-    menuIntercept();
+    beforeSetup();
   });
 
   function inputLogin() {

+ 5 - 0
cypress/e2e/utils/setup.ts

@@ -76,3 +76,8 @@ export function optionsIntercept() {
 export function exportIntercept(url: string) {
   successIntercept(url).as('export');
 }
+
+export function beforeSetup() {
+  loginIntercept();
+  menuIntercept();
+}

+ 2 - 1
packages/app/src/apis/semiManufactures.ts

@@ -14,6 +14,7 @@ import {
   GetSemiOutStreamListParams,
 } from '@models';
 import {request} from './request';
+import {ENABLED_GS} from '@utils';
 
 const BASE_URL = '/warehousing',
   BASE_URL2 = '/askGoods';
@@ -68,7 +69,7 @@ export async function semiManufacturesOut(data: SemiManufacturesOutParams): Base
 
   // 成功后触发成功回传
   // 触发向gs回调接口
-  if (result.msg === '200') {
+  if (result.msg === '200' && ENABLED_GS) {
     request({
       method: 'GET',
       url: '/gsPlugOut/plugOutRemoval',

+ 1 - 0
packages/app/src/assets/images/dialog/filter.svg

@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 9L20.4 25.8178V38.4444L27.6 42V25.8178L42 9H6Z" fill="none" stroke="#ffffff" stroke-width="4" stroke-linejoin="round"/></svg>

+ 3 - 0
packages/app/src/components/filter-field/Select.tsx

@@ -2,6 +2,7 @@ import {Select as SelectOri} from 'antd';
 import css from './index.module.css';
 import {FC} from 'react';
 import classNames from 'classnames';
+import {filterOptions} from '@utils';
 
 type Props = {
   label: string;
@@ -21,6 +22,8 @@ const Select: FC<Props> = function ({label, value, onChange, placeholder, name,
       </label>
       <div className={css.fieldWrapper}>
         <SelectOri
+          showSearch
+          filterOption={filterOptions}
           className={classNames('width-full')}
           id={`filter_${name}`}
           data-testid={`filter_${name}`}

+ 2 - 0
packages/app/src/components/filter-selector-modal/index.tsx

@@ -2,6 +2,7 @@ import {Modal, FilterGroupMap} from '@components';
 import {Transfer} from 'antd';
 import {FC} from 'react';
 import {useTransfer} from './hooks';
+import icon from '@assets/images/dialog/filter.svg';
 
 type Props = {
   visible: boolean;
@@ -25,6 +26,7 @@ const FilterSelectorModal: FC<Props> = function ({visible, onClose, filtermap, o
       height='480px'
       width='580px'
       onSubmit={onSubmit}
+      icon={icon}
     >
       <div className='flex-center'>
         <Transfer

+ 3 - 3
packages/app/src/components/modal-field/Select.tsx

@@ -12,6 +12,7 @@ type Props = {
   width?: string;
   data: {value: string; label: string}[];
   required?: boolean;
+  /** @deprecated */
   showSearch?: boolean;
   tip?: string;
   onSearch?: (value: string) => void;
@@ -26,7 +27,6 @@ const ModalSelect: FC<Props> = function ({
   placeholder,
   data,
   required = true,
-  showSearch,
   tip,
   onSearch,
   loading,
@@ -52,7 +52,7 @@ const ModalSelect: FC<Props> = function ({
             return (
               <>
                 <Select
-                  showSearch={showSearch || Boolean(onSearch)}
+                  showSearch
                   rootClassName={classNames([
                     css.modalSelect,
                     css.filedWidth,
@@ -60,7 +60,7 @@ const ModalSelect: FC<Props> = function ({
                   ])}
                   data-testid={`select_${name}`}
                   defaultActiveFirstOption={false}
-                  filterOption={showSearch ? filterOptions : false}
+                  filterOption={onSearch ? false : filterOptions}
                   placeholder={placeholder ?? '请选择'}
                   id={`operation_${name}`}
                   // 处理placeholder不显示问题

+ 3 - 4
packages/app/src/components/modal/Modal.tsx

@@ -19,6 +19,7 @@ type Props = {
   testId?: string;
   height?: string;
   width?: string;
+  icon?: string;
 };
 
 const Modal: FC<Props> = function ({
@@ -31,6 +32,7 @@ const Modal: FC<Props> = function ({
   testId,
   height,
   width,
+  icon,
 }) {
   const styles: ReactModalStyle = {
     content: {
@@ -61,10 +63,7 @@ const Modal: FC<Props> = function ({
         <div className={css.dialogDecorate}>
           <span className={css.dialogDecorateIcon1} />
           <div className={css.dialogDecorateCircle}>
-            <img
-              src={isAdd ? addIcon : editIcon}
-              style={{transform: `translateX(${isAdd ? '1px' : '0px'})`}}
-            />
+            <img src={icon ? icon : isAdd ? addIcon : editIcon} />
           </div>
           <span className={css.dialogDecorateIcon2} />
         </div>

+ 1 - 1
packages/app/src/pages/container-scrap/filter/index.tsx

@@ -19,7 +19,7 @@ const Filter: FC = function () {
     <Card>
       <FilterFieldWrapper onSearch={onSearch}>
         <FilterField
-          label='用户名称'
+          label='工号'
           name='operationName'
           value={fields.operationName}
           onChange={onChange('operationName')}

+ 1 - 1
packages/app/src/pages/material-bind/filter/index.tsx

@@ -31,7 +31,7 @@ const Filter: FC = function () {
         />
         <FilterField
           value={fields.userName}
-          label='用户名称'
+          label='工号'
           onChange={onChange('userName')}
           name='userName'
         />

+ 1 - 1
packages/app/src/pages/material-bind/table/hooks.tsx

@@ -8,7 +8,7 @@ import {DOUBLE_BTN_WIDTH, HUGE_TABLE_WIDTH, MIDDLE_TABLE_WIDTH, NORMAL_TABLE_WID
 const tableColumns: ColumnsType<MaterialBindListData> = [
   {title: '物料编号', dataIndex: 'wllbCode', key: 'wllbCode', width: MIDDLE_TABLE_WIDTH},
   {title: '物料名称', dataIndex: 'materialName', key: 'materialName', width: HUGE_TABLE_WIDTH},
-  {title: '用户名称', dataIndex: 'userName', key: 'userName', width: MIDDLE_TABLE_WIDTH},
+  {title: '工号', dataIndex: 'userName', key: 'userName', width: MIDDLE_TABLE_WIDTH},
   {title: '真实姓名', dataIndex: 'realName', key: 'realName', width: MIDDLE_TABLE_WIDTH},
   {title: '修改人', dataIndex: 'modifyUser', key: 'modifyUser', width: NORMAL_TABLE_WIDTH},
   {title: '修改时间', dataIndex: 'modifyTime', key: 'modifyTime', width: MIDDLE_TABLE_WIDTH},

+ 1 - 1
packages/app/src/pages/material-bind/table/modal/Info.tsx

@@ -21,7 +21,7 @@ const Info: FC<Props> = function ({id}) {
 
   return (
     <>
-      <ModalSelect control={control} label='用户名称' name='userId' data={userOptions} />
+      <ModalSelect control={control} label='工号' name='userId' data={userOptions} />
       <ModalSelect
         name='materialId'
         label='物料编号'

+ 1 - 1
packages/app/src/pages/order-log/filter/index.tsx

@@ -56,7 +56,7 @@ const Filter: FC = function () {
         />
         <FilterField
           name='userName'
-          label='用户名称'
+          label='工号'
           value={fields.userName}
           onChange={onChange('userName')}
         />

+ 1 - 1
packages/app/src/pages/product-draw/table/index.tsx

@@ -10,8 +10,8 @@ import {useContextSection, useQueryTableList} from '@hooks';
 
 const columns: ColumnsType<SemiDrawListData> = [
   {title: '要货单编号', dataIndex: 'askGoodsId', key: 'askGoodsId', width: NORMAL_TABLE_WIDTH},
-  {title: '物料名称', dataIndex: 'materialName', key: 'materialName', width: MIDDLE_TABLE_WIDTH},
   {title: '物料编号', dataIndex: 'materialCode', key: 'materialCode', width: NORMAL_TABLE_WIDTH},
+  {title: '物料名称', dataIndex: 'materialName', key: 'materialName', width: MIDDLE_TABLE_WIDTH},
   {title: '数量', dataIndex: 'num', key: 'num', width: SMALL_TABLE_WIDTH},
   {
     title: '生产订单号',

+ 1 - 1
packages/app/src/pages/product-report/table/hooks.tsx

@@ -20,8 +20,8 @@ const columns: ColumnsType<NoticeListData> = [
   },
   {title: '报工单ID', dataIndex: 'noticeId', width: MIDDLE_TABLE_WIDTH},
   {title: '报工单编号', dataIndex: 'noticeCode', width: MIDDLE_TABLE_WIDTH},
-  {title: '物料名称', dataIndex: 'materialName', width: HUGE_TABLE_WIDTH},
   {title: '物料编号', dataIndex: 'wllbCode', width: MIDDLE_TABLE_WIDTH},
+  {title: '物料名称', dataIndex: 'materialName', width: HUGE_TABLE_WIDTH},
   {title: '数量', dataIndex: 'num', width: SMALL_TABLE_WIDTH, align: 'right'},
   {title: '报工时间', dataIndex: 'noticeTime', width: NORMAL_TABLE_WIDTH},
   {title: '分录号', dataIndex: 'entryNumber', width: NORMAL_TABLE_WIDTH},

+ 1 - 1
packages/app/src/pages/semi-report/table/hooks.tsx

@@ -21,8 +21,8 @@ const tableColumns: ColumnsType<NoticeListData> = [
   },
   {title: '报工单ID', dataIndex: 'noticeId', width: MIDDLE_TABLE_WIDTH},
   {title: '报工单编号', dataIndex: 'noticeCode', width: MIDDLE_TABLE_WIDTH},
-  {title: '物料名称', dataIndex: 'materialName', width: HUGE_TABLE_WIDTH},
   {title: '物料编号', dataIndex: 'wllbCode', width: MIDDLE_TABLE_WIDTH},
+  {title: '物料名称', dataIndex: 'materialName', width: HUGE_TABLE_WIDTH},
   {title: '数量', dataIndex: 'num', width: SMALL_TABLE_WIDTH, align: 'right'},
   {title: '报工时间', dataIndex: 'noticeTime', width: NORMAL_TABLE_WIDTH},
   {title: '分录号', dataIndex: 'entryNumber', width: NORMAL_TABLE_WIDTH},

+ 1 - 1
packages/app/src/pages/user/filter/state.ts

@@ -10,6 +10,6 @@ export const sourceMap: FilterGroupMap<typeof contextState> = new Map([
 ]);
 
 export const fixedMap: MapValue<typeof contextState>[] = [
-  {label: '用户名称', type: 'field', value: 'userName'},
+  {label: '工号', type: 'field', value: 'userName'},
   {label: '真实姓名', type: 'field', value: 'realName'},
 ];

+ 3 - 3
packages/app/src/pages/user/table/hooks.tsx

@@ -18,7 +18,7 @@ export function useResetPassword() {
     return function () {
       Modal.confirm({
         title: '重置密码',
-        content: `你确定要重置${name}的密码吗?`,
+        content: `你确定要将${name}的密码重置为123456吗?`,
         onOk() {
           mutate(id);
         },
@@ -31,8 +31,8 @@ export function useResetPassword() {
 
 const tableColumns: ColumnsType<UserListData> = [
   {title: '用户编号', dataIndex: 'code', key: 'code', width: NORMAL_TABLE_WIDTH},
-  {title: '用户名称', dataIndex: 'userName', key: 'userName', width: SMALL_TABLE_WIDTH},
-  {title: '真实名', dataIndex: 'realName', key: 'realName', width: SMALL_TABLE_WIDTH},
+  {title: '工号', dataIndex: 'userName', key: 'userName', width: SMALL_TABLE_WIDTH},
+  {title: '真实名', dataIndex: 'realName', key: 'realName', width: SMALL_TABLE_WIDTH},
   {title: '部门', dataIndex: 'department', key: 'department', width: NORMAL_TABLE_WIDTH},
   {title: '角色名称', dataIndex: 'role', key: 'role', width: NORMAL_TABLE_WIDTH},
   {title: '邮箱', dataIndex: 'email', key: 'email', width: NORMAL_TABLE_WIDTH},

+ 9 - 0
packages/app/src/styles/index.css

@@ -190,6 +190,15 @@ img {
   &:hover {
     background-color: #ebfafd !important;
   }
+
+  &:disabled {
+    color: rgb(0 0 0 / 25%) !important;
+    cursor: not-allowed;
+
+    &:hover {
+      background-color: transparent !important;
+    }
+  }
 }
 
 .ant-text-btn-color-cyan {

+ 2 - 0
packages/app/src/utils/constants.ts

@@ -38,3 +38,5 @@ export const HUGE_TABLE_WIDTH = 300;
 export const GREAT_TABLE_WIDTH = 350;
 /** 最大的table宽度 */
 export const MAXIMAL_TABLE_WIDTH = 400;
+/** 是否向gs回传 */
+export const ENABLED_GS = false;