Procházet zdrojové kódy

准备再次开发库房管理模块

shaogen1995 před 3 měsíci
rodič
revize
e3ffaf245a

+ 2 - 7
src/assets/styles/base.css

@@ -296,17 +296,12 @@ textarea {
   display: flex;
 }
 .Y1info .Y1rowZ .Y1z2 .y1z2_1 .y1z2_1row1 .y1z2_1r11 {
-  width: 120px;
+  width: 130px;
   text-align: right;
   font-weight: 700;
 }
-.Y1info .Y1rowZ .Y1z2 .y1z2_1 .y1z2_1row1 .y1z2_1r11long {
-  width: 132px;
-  position: relative;
-  left: -6px;
-}
 .Y1info .Y1rowZ .Y1z2 .y1z2_1 .y1z2_1row1 .y1z2_1r12 {
-  width: calc(100% - 120px);
+  width: calc(100% - 130px);
   word-wrap: break-word;
   max-height: 130px;
   overflow-y: auto;

+ 7 - 7
src/assets/styles/base.less

@@ -431,17 +431,17 @@ textarea {
           width: 48%;
           display: flex;
           .y1z2_1r11 {
-            width: 120px;
+            width: 130px;
             text-align: right;
             font-weight: 700;
           }
-          .y1z2_1r11long {
-            width: 132px;
-            position: relative;
-            left: -6px;
-          }
+          // .y1z2_1r11long {
+          //   width: 132px;
+          //   position: relative;
+          //   left: -6px;
+          // }
           .y1z2_1r12 {
-            width: calc(100% - 120px);
+            width: calc(100% - 130px);
             word-wrap: break-word;
             max-height: 130px;
             overflow-y: auto;

+ 1 - 1
src/pages/A3_ledger/A32Routing/data.ts

@@ -13,7 +13,7 @@ export const A32treeData: A32treeDataType[] = [
     name: '馆藏与非馆藏',
     show: true,
     key: 'accountType',
-    son: selectObj['入藏去向']
+    son: selectObj['入藏去向'].map(v => ({ id: v.value, name: v.label }))
   },
   {
     name: '类别分账',

+ 4 - 0
src/pages/A3_ledger/C1ledger/type.d.ts

@@ -126,4 +126,8 @@ export type C1GoodType = {
   // 入馆-入藏
   relatedOrderId: number
   subNum: string
+
+  // 新加的字段 馆内藏品分类
+  dictHouse1: string
+  dictHouse2: string
 }

+ 23 - 47
src/pages/Y_goodsDetails/Y1cathet/Y11com.tsx

@@ -4,6 +4,13 @@ import classNames from 'classnames'
 import { Y11infoArr1, Y11infoArr2, Y11infoArr3, Y11infoArr4, Y11infoArr5 } from './data'
 import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
 
+const domArr = [
+  { name: '藏品基本信息', arr: Y11infoArr2 },
+  { name: '尺寸和质量', arr: Y11infoArr3 },
+  { name: '入藏及来源', arr: Y11infoArr4 },
+  { name: '藏品历史及流传', arr: Y11infoArr5 }
+]
+
 type Props = {
   info: C1GoodType
 }
@@ -31,56 +38,25 @@ function Y11com({ info }: Props) {
         </div>
       </div>
 
-      <div className='Y1z2'>
-        <div className='Y1tit'>藏品基本信息</div>
-        <div className='y1z2_1'>
-          {Y11infoArr2.map((v, i) => (
-            <div className={classNames('y1z2_1row1', v.full ? 'y1z2_1row1Full' : '')} key={v.name}>
-              <div className='y1z2_1r11'>{v.name}:</div>
-
-              <div className='y1z2_1r12'>{v.backFu ? v.backFu(info) : info[v.key] || '(空)'}</div>
-            </div>
-          ))}
-        </div>
-      </div>
+      {domArr.map(v1 => (
+        <div className='Y1z2' key={v1.name}>
+          <div className='Y1tit'>{v1.name}</div>
+          <div className='y1z2_1'>
+            {v1.arr.map((v2, i) => (
+              <div
+                className={classNames('y1z2_1row1', v2.full ? 'y1z2_1row1Full' : '')}
+                key={v2.name}
+              >
+                <div className='y1z2_1r11'>{v2.name}:</div>
 
-      <div className='Y1z2'>
-        <div className='Y1tit'>尺寸和质量</div>
-        <div className='y1z2_1'>
-          {Y11infoArr3.map((v, i) => (
-            <div className={classNames('y1z2_1row1', v.full ? 'y1z2_1row1Full' : '')} key={v.name}>
-              <div className='y1z2_1r11'>{v.name}:</div>
-              <div className='y1z2_1r12'>{v.backFu ? v.backFu(info) : info[v.key] || '(空)'}</div>
-            </div>
-          ))}
-        </div>
-      </div>
-
-      <div className='Y1z2'>
-        <div className='Y1tit'>入藏及来源</div>
-        <div className='y1z2_1'>
-          {Y11infoArr4.map((v, i) => (
-            <div className={classNames('y1z2_1row1', v.full ? 'y1z2_1row1Full' : '')} key={v.name}>
-              <div className='y1z2_1r11'>{v.name}:</div>
-              <div className='y1z2_1r12'>{v.backFu ? v.backFu(info) : info[v.key] || '(空)'}</div>
-            </div>
-          ))}
-        </div>
-      </div>
-
-      <div className='Y1z2'>
-        <div className='Y1tit'>藏品历史及流传</div>
-        <div className='y1z2_1'>
-          {Y11infoArr5.map((v, i) => (
-            <div className={classNames('y1z2_1row1')} key={v.name}>
-              <div className={classNames('y1z2_1r11', v.name.length >= 7 ? 'y1z2_1r11long' : '')}>
-                {v.name}:
+                <div className='y1z2_1r12'>
+                  {v2.backFu ? v2.backFu(info) : info[v2.key] || '(空)'}
+                </div>
               </div>
-              <div className='y1z2_1r12'>{v.backFu ? v.backFu(info) : info[v.key] || '(空)'}</div>
-            </div>
-          ))}
+            ))}
+          </div>
         </div>
-      </div>
+      ))}
     </div>
   )
 }

+ 17 - 3
src/pages/Y_goodsDetails/Y1cathet/data.tsx

@@ -29,6 +29,20 @@ export const Y11infoArr2: ArrKeyType = [
     }
   },
   {
+    name: '馆内藏品分类1',
+    key: 'dictHouse1',
+    backFu: info => {
+      return resJiLianFu(info.dictHouse1)
+    }
+  },
+  {
+    name: '馆内藏品分类2',
+    key: 'dictHouse2',
+    backFu: info => {
+      return resJiLianFu(info.dictHouse2)
+    }
+  },
+  {
     name: '年代',
     key: 'dictAge',
 
@@ -36,12 +50,12 @@ export const Y11infoArr2: ArrKeyType = [
       return info.dictAge === '其他' ? '其他' : resJiLianFu(info.dictAge)
     }
   },
-  { name: '制作时间', key: 'dateMaking' },
   {
     name: '具体年代',
-    key: 'ageInfo',
-    full: true
+    key: 'ageInfo'
   },
+  { name: '制作时间', key: 'dateMaking', full: true },
+
   { name: '作者', key: 'author' },
   { name: '作者介绍', key: 'authorDesc' },
   {

+ 183 - 0
src/pages/Y_goodsDetails/Y1cathet/data重新排版.tsx

@@ -0,0 +1,183 @@
+import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
+import { resJiLianFu, textFu } from '@/utils/history'
+import { selectObj } from '@/utils/select'
+
+export type ArrKeyType = {
+  name: string
+  key: keyof C1GoodType
+  full?: boolean
+  backFu?: (info: C1GoodType) => any
+}[]
+
+export const Y11infoArr1: ArrKeyType = [
+  { name: '编号类型', key: 'numName' },
+  { name: '藏品编号', key: 'num' },
+  { name: '制档人', key: 'creatorName' },
+  { name: '分类号', key: 'numType' },
+  { name: '制档日期', key: 'createTime' }
+]
+
+export const Y11infoArr2: ArrKeyType = [
+  { name: '藏品名称', key: 'name' },
+  { name: '藏品原名', key: 'namePrimitive' },
+  { name: '文物级别', key: 'dictLevel' },
+  {
+    name: '文物类别',
+    key: 'dictType',
+    backFu: info => {
+      return resJiLianFu(info.dictType)
+    }
+  },
+  {
+    name: '馆内藏品分类1',
+    key: 'dictHouse1',
+    backFu: info => {
+      return resJiLianFu(info.dictHouse1)
+    }
+  },
+  {
+    name: '馆内藏品分类2',
+    key: 'dictHouse2',
+    backFu: info => {
+      return resJiLianFu(info.dictHouse2)
+    }
+  },
+  {
+    name: '年代',
+    key: 'dictAge',
+
+    backFu: info => {
+      return info.dictAge === '其他' ? '其他' : resJiLianFu(info.dictAge)
+    }
+  },
+  {
+    name: '具体年代',
+    key: 'ageInfo'
+  },
+  { name: '制作时间', key: 'dateMaking' },
+
+  { name: '作者', key: 'author' },
+  { name: '作者介绍', key: 'authorDesc', full: true },
+  {
+    name: '数量',
+    key: 'pcs',
+    backFu: info => {
+      return info.pcs + resJiLianFu(info.pcsUnit)
+    }
+  },
+  { name: '实际数量', key: 'pcsActual' },
+  {
+    name: '质地',
+    key: 'dictTexture1',
+    backFu: info => {
+      let txt1 = resJiLianFu(info.dictTexture1)
+      let txt2 = resJiLianFu(info.dictTexture2)
+      let txt3 = resJiLianFu(info.dictTexture3)
+
+      txt1 = txt1 ? txt1 + ' - ' : ''
+      txt2 = txt2 ? txt2 + ' - ' : ''
+
+      return txt1 + txt2 + txt3
+    }
+  },
+  {
+    name: '完残程度',
+    key: 'dictTorn',
+    backFu: info => {
+      return resJiLianFu(info.dictTorn)
+    }
+  },
+  { name: '完残情况', key: 'torn', full: true },
+  { name: '保存状态', key: 'preserveState', full: true },
+
+  { name: '色泽', key: 'color', full: true },
+  { name: '用途', key: 'uses', full: true },
+  { name: '形状描述', key: 'shape', full: true },
+  { name: '著者', key: 'pressAuthor' },
+  { name: '版本', key: 'pressVersion' },
+  { name: '存卷', key: 'pressFile', full: true },
+  {
+    name: '备注',
+    key: 'rtf',
+    full: true,
+    backFu: info => {
+      let txt = textFu(info.rtf)
+      return txt ? <div dangerouslySetInnerHTML={{ __html: txt }}></div> : '(空)'
+    }
+  }
+]
+
+export const Y11infoArr3: ArrKeyType = [
+  {
+    name: '尺寸',
+    key: 'sizeL',
+    backFu: info => {
+      let danWei = resJiLianFu(info.sizeUnit, ' ')
+
+      let txt1 = info.sizeL ? `通长${info.sizeL}` : ''
+      let txt2 = info.sizeW ? `通宽${info.sizeW}` : ''
+      let txt3 = info.sizeH ? `通高${info.sizeH}` : ''
+
+      txt1 = txt1 ? txt1 + danWei : ''
+      txt2 = txt2 ? txt2 + danWei : ''
+      txt3 = txt3 ? txt3 + danWei : ''
+
+      let arr = [txt1, txt2, txt3]
+      arr = arr.filter(v => v)
+
+      if (!txt1 && !txt2 && !txt3) return '(空)'
+      else return arr.join(' - ')
+    }
+  },
+  { name: '具体尺寸', key: 'sizeInfo', full: true },
+  {
+    name: '质量范围',
+    key: 'qualityDictScope',
+    backFu: info => {
+      return resJiLianFu(info.qualityDictScope)
+    }
+  },
+  {
+    name: '具体质量',
+    key: 'quality',
+    backFu: info => {
+      return info.quality + resJiLianFu(info.qualityUnit)
+    }
+  }
+]
+
+export const Y11infoArr4: ArrKeyType = [
+  { name: '入馆凭证号', key: 'inHouseNum' },
+  { name: '入藏凭证号', key: 'inGoodsNum' },
+  { name: '入藏日期', key: 'inGoodsDate' },
+  {
+    name: '入藏日期范围',
+    key: 'inDictDateScope',
+    backFu: info => {
+      return resJiLianFu(info.inDictDateScope)
+    }
+  },
+  {
+    name: '入藏去向',
+    key: 'accountType',
+    backFu: info => {
+      return (selectObj['入藏去向'].find(c => c.value === info.accountType) || {}).label || '(空)'
+    }
+  },
+  {
+    name: '来源',
+    key: 'source',
+    backFu: info => {
+      return resJiLianFu(info.source)
+    }
+  },
+  { name: '来源详情', key: 'sourceInfo', full: true },
+  { name: '征集经过', key: 'sourcePass', full: true },
+  { name: '铭记题跋', key: 'sourcePreface', full: true },
+  { name: '鉴藏印记', key: 'sourceStamp', full: true }
+]
+
+export const Y11infoArr5: ArrKeyType = [
+  { name: '著作及有关书目', key: 'historyWork', full: true },
+  { name: '流传经历', key: 'historyUndergo', full: true }
+]

+ 7 - 7
src/pages/Y_goodsDetails/Y2look/index.module.scss

@@ -121,17 +121,17 @@
               width: 48%;
               display: flex;
               .y1z2_1r11 {
-                width: 120px;
+                width: 130px;
                 text-align: right;
                 font-weight: 700;
               }
-              .y1z2_1r11long {
-                width: 132px;
-                position: relative;
-                left: -6px;
-              }
+              // .y1z2_1r11long {
+              //   width: 132px;
+              //   position: relative;
+              //   left: -6px;
+              // }
               .y1z2_1r12 {
-                width: calc(100% - 120px);
+                width: calc(100% - 130px);
                 word-wrap: break-word;
                 max-height: 130px;
                 overflow-y: auto;