Browse Source

upp-增加字段(藏品号-藏品编号)

shaogen1995 1 year ago
parent
commit
c8894d3749

+ 2 - 2
src/components/ZlistTable.tsx

@@ -30,7 +30,7 @@ function ZlistTable({ btnDom, list, y }: Props) {
       },
       {
         title: "编号",
-        dataIndex: "num",
+        render: (item: A2tableType) =>item.goodsNum||'(空)'
       },
       {
         title: "名称",
@@ -38,7 +38,7 @@ function ZlistTable({ btnDom, list, y }: Props) {
       },
       {
         title: "级别",
-        dataIndex: "dictLevel",
+        render: (item: A2tableType) =>item.dictLevel||'(空)'
       },
       {
         title: "藏品状态",

+ 1 - 1
src/pages/A1Stat/index.tsx

@@ -87,7 +87,7 @@ function A1Stat() {
     if (res.code === 0) {
       const data: EchDataType = res.data.map((v: any) => ({
         value: v.count,
-        name: v.groupKey,
+        name: v.groupKey||'未定级',
       }));
       baseEchartFu(echartRef2.current!, data);
     }

+ 1 - 1
src/pages/A2Goods/A2Register/A2AddModal/index.module.scss

@@ -22,7 +22,7 @@
           width: 700px;
 
           .ant-form-item-label{
-            width: 52px;
+            width: 64px;
           }
 
           .A2RArow {

+ 11 - 6
src/pages/A2Goods/A2Register/A2AddModal/index.tsx

@@ -128,6 +128,8 @@ function A2AddModal({ addInfo, upTableFu, closeFu, idOldToNew }: Props) {
         // console.log(oldInfo.current);
         const tempApp = [
           "name",
+          // 新增加的藏品号
+          "goodsNum",
           "num",
           "dictAge",
           "dictTexture",
@@ -255,8 +257,15 @@ function A2AddModal({ addInfo, upTableFu, closeFu, idOldToNew }: Props) {
           </Form.Item>
           <Form.Item
             label="编号"
+            name="goodsNum"
+            getValueFromEvent={(e) => e.target.value.replace(/\s+/g, "")}
+          >
+            <Input maxLength={20} showCount placeholder="请输入内容" />
+          </Form.Item>
+
+          <Form.Item
+            label="藏品号"
             name="num"
-            rules={[{ required: true, message: "请输入名称!" }]}
             getValueFromEvent={(e) => e.target.value.replace(/\s+/g, "")}
           >
             <Input maxLength={20} showCount placeholder="请输入内容" />
@@ -341,11 +350,7 @@ function A2AddModal({ addInfo, upTableFu, closeFu, idOldToNew }: Props) {
           </div>
 
           <div className="A2RArow">
-            <Form.Item
-              label="级别"
-              name="dictLevel"
-              rules={[{ required: true, message: "请选择级别!" }]}
-            >
+            <Form.Item label="级别" name="dictLevel">
               <Select
                 placeholder="请选择"
                 options={options1.filter((v) => v.label !== "全部")}

+ 9 - 5
src/pages/A2Goods/A2Register/A2SelectModal/index.tsx

@@ -45,7 +45,7 @@ function A2SelectModal({ oldList, upTableFu, closeFu, myType }: Props) {
     if (!txtRes) setList(listAll);
     else
       setList(
-        listAll.filter((v) => v.name.includes(txtRes) || v.num.includes(txtRes))
+        listAll.filter((v) => v.name.includes(txtRes) || v.num.includes(txtRes)|| v.goodsNum.includes(txtRes))
       );
   }, [listAll, txtRes]);
 
@@ -70,7 +70,11 @@ function A2SelectModal({ oldList, upTableFu, closeFu, myType }: Props) {
     arr = [
       {
         title: "编号",
-        dataIndex: "num",
+        render: (item: A2tableType) =>item.goodsNum||'(空)'
+      },
+      {
+        title: "藏品号",
+        render: (item: A2tableType) =>item.num||'(空)'
       },
       {
         title: "名称",
@@ -78,7 +82,7 @@ function A2SelectModal({ oldList, upTableFu, closeFu, myType }: Props) {
       },
       {
         title: "级别",
-        dataIndex: "dictLevel",
+        render: (item: A2tableType) =>item.dictLevel||'(空)'
       },
       {
         title: "藏品状态",
@@ -169,8 +173,8 @@ function A2SelectModal({ oldList, upTableFu, closeFu, myType }: Props) {
         {/* 搜索框 */}
         <div className="A2Cinput">
           <Input
-            style={{ width: 260 }}
-            placeholder="请输入藏品编号/名称,最多10字"
+            style={{ width: 290 }}
+            placeholder="请输入藏品编号/藏品号/名称,最多10字"
             maxLength={10}
             value={txt}
             onChange={(e) => setTxt(e.target.value.replace(/\s+/g, ""))}

+ 11 - 8
src/pages/A2Goods/index.tsx

@@ -105,8 +105,12 @@ function A2Goods() {
         ),
       },
       {
-        title: "编号",
-        dataIndex: "num",
+        title: "藏品编号",
+        render: (item: A2tableType) =>item.goodsNum||'(空)'
+      },
+      {
+        title: "藏品号",
+        render: (item: A2tableType) =>item.num||'(空)'
       },
       {
         title: "名称",
@@ -164,8 +168,8 @@ function A2Goods() {
             <Input
               key={inputKey}
               maxLength={10}
-              style={{ width: 248 }}
-              placeholder="请输入藏品编号/名称,最多10字"
+              style={{ width: 290 }}
+              placeholder="请输入藏品编号/藏品号/名称,最多10字"
               allowClear
               onChange={(e) => txtChangeFu(e.target.value, "searchKey")}
             />
@@ -174,7 +178,7 @@ function A2Goods() {
           <div className="A2topRow">
             <span>级别:</span>
             <Select
-              style={{ width: 150 }}
+              style={{ width: 130 }}
               value={tableSelect.dictLevel}
               onChange={(e) =>
                 setTableSelect({ ...tableSelect, dictLevel: e, pageNum: 1 })
@@ -186,7 +190,7 @@ function A2Goods() {
           <div className="A2topRow">
             <span>藏品状态:</span>
             <Select
-              style={{ width: 150 }}
+              style={{ width: 130 }}
               value={tableSelect.status}
               onChange={(e) =>
                 setTableSelect({ ...tableSelect, status: e, pageNum: 1 })
@@ -198,7 +202,7 @@ function A2Goods() {
           <div className="A2topRow">
             <span>库存状态:</span>
             <Select
-              style={{ width: 150 }}
+              style={{ width: 130 }}
               value={tableSelect.storageStatus}
               onChange={(e) =>
                 setTableSelect({ ...tableSelect, storageStatus: e, pageNum: 1 })
@@ -221,7 +225,6 @@ function A2Goods() {
           </Button>
           &emsp;
           <Button
-            disabled={A2TableList.total <= 0}
             type="primary"
             onClick={() => {
               setOutInfo({ id: -1, txt: "新增" });

+ 1 - 1
src/pages/A3Stock/A3RoomStatu/index.tsx

@@ -211,7 +211,7 @@ function A3RoomStatu({ closeFu, outInfo, myType, isLookItem }: Props) {
                     value: "id",
                     children: "children",
                   }}
-                  style={{ width: 160 }}
+                  style={{ width: 'auto' }}
                   options={roomTree}
                   placeholder="请选择"
                   value={roomId}

+ 7 - 3
src/pages/A3Stock/index.tsx

@@ -113,7 +113,11 @@ function A3Stock() {
       },
       {
         title: "藏品编号",
-        dataIndex: "num",
+        render: (item: A2tableType) =>item.goodsNum||'(空)'
+      },
+      {
+        title: "藏品号",
+        render: (item: A2tableType) =>item.num||'(空)'
       },
       {
         title: "名称",
@@ -163,8 +167,8 @@ function A3Stock() {
             <Input
               key={inputKey}
               maxLength={10}
-              style={{ width: 248 }}
-              placeholder="请输入藏品编号/名称,最多10字"
+              style={{ width: 290 }}
+              placeholder="请输入藏品编号/藏品号/名称,最多10字"
               allowClear
               onChange={(e) => txtChangeFu(e.target.value, "searchKey")}
             />

+ 2 - 1
src/pages/B1Submit/B1Info/data.ts

@@ -1,6 +1,7 @@
 export const B1EditKeyObj = {
   name: "名称",
-  num: "编号",
+  goodsNum:'藏品编号',
+  num: "藏品号",
   dictAge: "时代",
   dictTexture: "质地",
   size: "尺寸",

+ 9 - 2
src/pages/B1Submit/B1Info/index.module.scss

@@ -141,10 +141,17 @@
       }
 
       .ant-cascader {
-        pointer-events: none;
-
         .ant-select-selector {
           border: none;
+          // padding: 0;
+        }
+
+        .ant-select-selection-item {
+          padding: 0;
+        }
+
+        .ant-select-clear {
+          opacity: 0;
         }
 
         .ant-select-arrow {

+ 1 - 2
src/pages/B1Submit/B1Info/index.tsx

@@ -251,7 +251,6 @@ function B1Info({ closeFu, lookId, pageKey, upTableFu }: Props) {
             : undefined;
 
           return (
-            // 待完善 这里逻辑有问题
             <div className="A3RTableDZ">
               <Cascader
                 // 自定义字段
@@ -412,7 +411,7 @@ function B1Info({ closeFu, lookId, pageKey, upTableFu }: Props) {
                 value: "id",
                 children: "children",
               }}
-              style={{ width: 160 }}
+              style={{ width: 'auto' }}
               options={roomTree}
               placeholder=""
               value={

+ 5 - 1
src/pages/B1Submit/B1Look/index.tsx

@@ -247,7 +247,7 @@ function B1Look({ closeFu, goodsId, isCance }: Props) {
               </div>
               <div className="B1LcRowIn">
                 <div>编号:</div>
-                <div>{info.num}</div>
+                <div>{info.goodsNum|| "(空)"}</div>
               </div>
               <div className="B1LcRowIn">
                 <div>时代:</div>
@@ -277,6 +277,10 @@ function B1Look({ closeFu, goodsId, isCance }: Props) {
                 <div>{info.pcs || "(空)"}</div>
               </div>
               <div className="B1LcRowIn">
+                <div>藏品号:</div>
+                <div>{info.num || "(空)"}</div>
+              </div>
+              <div className="B1LcRowIn">
                 <div>来源:</div>
                 <div>{info.source || "(空)"}</div>
               </div>

+ 2 - 0
src/types/api/A2Goods.d.ts

@@ -24,4 +24,6 @@ export type A2tableType ={
 	// 库房位置
 	storageIds:string
 	beforeStorageIds:string
+	// 更新的字段
+	goodsNum:string
 }

+ 6 - 6
src/utils/http.ts

@@ -7,10 +7,10 @@ import { domShowFu } from "./domShow";
 // 请求基地址
 export const baseURL =
   // 线下的图片地址需要加上/api/
-  process.env.NODE_ENV === "development"
-    ? "http://192.168.20.61:8061/api2"
-    : "";
-  // process.env.NODE_ENV === "development" ? "https://tower3d.4dkankan.com" : "";
+  // process.env.NODE_ENV === "development"
+  //   ? "http://192.168.20.61:8061/api"
+  //   : "";
+  process.env.NODE_ENV === "development" ? "https://sit-qiushoucms.4dage.com" : "";
 
 // 处理  类型“AxiosResponse<any, any>”上不存在属性“code”
 declare module "axios" {
@@ -23,10 +23,10 @@ declare module "axios" {
 // 创建 axios 实例
 const http = axios.create({
   // --------线下的地址不用加/api/
-  baseURL: baseURL+'/',
+  // baseURL: baseURL+'/',
 
   // --------打包或线上环境接口需要加上api/
-  // baseURL: baseURL + "/api2/",
+  baseURL: baseURL + "/api/",
   timeout: 5000,
 });