li.shaoyi 2 lat temu
rodzic
commit
9d70b2a823

+ 1 - 1
.env.pc

@@ -1,4 +1,4 @@
 VUE_APP_ENV = 'pc'
-VUE_APP_TITLE = 广钻石交易中心
+VUE_APP_TITLE = 广钻石交易中心
 VUE_APP_ROOT = src/packages/pc/
 VUE_APP_HOST = localhost

+ 1 - 1
src/business/table/columns.ts

@@ -216,7 +216,7 @@ export const pcTableColumnMap = new Map<TableColumnKey, Ermcp.TableColumn[]>([
         { prop: 'zsshapetypedisplay', label: '形状' },
         { prop: 'zscolortype1display', label: '颜色' },
         { prop: 'sizedisplay', label: '尺寸' },
-        { prop: 'zspolishtype1display', label: '重量' },
+        { prop: 'weight', label: '重量' },
         { prop: 'price', label: '履约金额' },
         { prop: 'accountname', label: '对手方' },
         { prop: 'paidamount', label: '已付/已付金额' },

+ 4 - 1
src/packages/pc/components/modules/auth-operation/index.vue

@@ -86,7 +86,10 @@ const auth = shallowRef<Ermcp.UserRoutes[]>([]);
 const dataList = computed(() => {
     const menus = props.menus
     if (menus) {
-        return auth.value.filter((e) => menus.includes(e.code) || menus.includes(e.buttonName));
+        if (menus.length) {
+            return auth.value.filter((e) => menus.includes(e.code) || menus.includes(e.buttonName));
+        }
+        return [];
     } else {
         return auth.value;
     }

+ 1 - 1
src/packages/pc/views/customs/exit/components/edit/detail-edit/index.vue

@@ -30,7 +30,7 @@
                     </el-select>
                 </el-form-item>
                 <el-form-item label="服务类别" prop="GZCJServiceType">
-                    <el-select v-model="formItem.GZCJServiceType">
+                    <el-select v-model="formItem.GZCJServiceType" filterable>
                         <el-option :label="item.enumdicname" :value="item.enumitemname"
                             v-for="(item, index) in gzcjServiceTypeList" :key="index" />
                     </el-select>

+ 60 - 3
src/packages/pc/views/customs/exit/components/edit/index.vue

@@ -89,8 +89,10 @@
                 </template>
                 <!-- 操作 -->
                 <template #operate="{ row, index }">
-                    <el-button size="small" @click="openEdit(row)">修改</el-button>
-                    <el-button size="small" @click="deleteDetail(index)">删除</el-button>
+                    <el-button-group size="small">
+                        <el-button @click="openEdit(row)">修改</el-button>
+                        <el-button @click="deleteDetail(index)">删除</el-button>
+                    </el-button-group>
                 </template>
             </app-table>
         </div>
@@ -111,6 +113,7 @@ import type { FormInstance, FormRules, UploadFile } from 'element-plus'
 import { read, utils } from 'xlsx'
 import { useComponent } from '@/hooks/component'
 import { validateRules } from '@/constants/regex'
+import { enumStore } from '@/stores'
 import { getGZCJAccountTypeList, getGZCJCategoryTypeList, getGZCJDeliveryTypeList, getGZCJShapeTypeName, getGZCJPublishTypeName, getGZCJMarkTypeName, getGZCJServiceTypeName } from '@/constants/customs'
 import { useCJJCOrderApply } from '@/business/customs/exit'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
@@ -271,8 +274,62 @@ const handleExcel = (uploadFile: UploadFile) => {
     fileReader.onload = (ev) => {
         const data = ev.target?.result
         if (data) {
+            const { getEnumTypeList } = enumStore.actions
+            const shapeTypeList = getEnumTypeList('GZCJShapeType')
+            const markTypeList = getEnumTypeList('GZCJMarkType')
+            const publishType = getEnumTypeList('GZCJPublishType')
+            const serviceType = getEnumTypeList('GZCJServiceType')
+
             const workbook = read(data, { type: 'binary' })
-            console.log(workbook)
+            const wsname = workbook.SheetNames[0]
+            const list = utils.sheet_to_json(workbook.Sheets[wsname], { header: ['Index', 'GZNo', 'GZCJShapeType', 'Weight', 'Amount', 'GZCJMarkType', 'GZCJPublishType', 'GZCJServiceType', 'OriginCertNo', 'ColorInfo', 'Remark'] })
+
+            clearList()
+            list.forEach((row, index) => {
+                if (index > 0) {
+                    const item: Proto.GZCJCategoryDetail = {
+                        OrderIndex: 0, // 顺序,必填
+                        GZNo: '', // 货物编号,必填
+                        GZCJShapeType: 0, // 形状,必填
+                        Weight: 0, // 重量(CT),3位小数,必填
+                        Amount: 0, // 参考货值(USD),2位小数,必填
+                        ColorInfo: '', // 彩钻信息
+                        Remark: '', // 备注
+                        GZCJMarkType: 0,// 刻印服务,必填
+                        GZCJPublishType: 0,// 是否披露处理,必填
+                        GZCJServiceType: 0, // 服务类别,必填
+                        OriginCertNo: '', // 原证书号
+                    }
+                    Object.entries(row as { [key: string]: unknown }).forEach(([key, value], index) => {
+                        if (index > 0 && Reflect.has(item, key)) {
+                            let enumType
+                            switch (key) {
+                                case 'GZCJShapeType': {
+                                    enumType = shapeTypeList.find((e) => e.label === value)
+                                    break
+                                }
+                                case 'GZCJMarkType': {
+                                    enumType = markTypeList.find((e) => e.label === value)
+                                    break
+                                }
+                                case 'GZCJPublishType': {
+                                    enumType = publishType.find((e) => e.label === value)
+                                    break
+                                }
+                                case 'GZCJServiceType': {
+                                    enumType = serviceType.find((e) => e.label === value)
+                                    break
+                                }
+                                default: {
+                                    enumType = { value }
+                                }
+                            }
+                            Object.defineProperty(item, key, { value: enumType?.value ?? 0 })
+                        }
+                    })
+                    formData.GZCJCategoryDetails?.push(item)
+                }
+            })
         }
     }
 }

+ 1 - 1
src/packages/pc/views/warehousing/goods/components/details/index.vue

@@ -15,7 +15,7 @@
                             </li>
                             <li>
                                 <span>联系电话</span>
-                                <span>{{ details.mobile }}</span>
+                                <span>{{ handleNoneValue(details.mobile) }}</span>
                             </li>
                             <li>
                                 <span>仓库地址</span>

+ 1 - 1
src/stores/modules/futures.ts

@@ -75,7 +75,7 @@ const handleQuote = timerInterceptor.setThrottle(() => {
             Object.entries(item).forEach(([key, value]) => {
                 // 只更新存在的属性
                 if (Reflect.has(quote, key)) {
-                    Object.defineProperty(quote, key, value)
+                    Object.defineProperty(quote, key, { value })
                 }
             })
             // 处理最高最低价

+ 1 - 0
src/types/ermcp/trade.d.ts

@@ -681,6 +681,7 @@ declare namespace Ermcp {
         sizedisplay: string; // 尺寸
         steptypeid: number; // PerformanceStep
         warehousenamedisplay: string;
+        weight: number; // 总重量(克拉重量)
         zscategorydisplay: string;
         zscerttypedisplay: string;
         zsclaritytype1display: string;

+ 1 - 1
src/utils/storage/index.ts

@@ -4,7 +4,7 @@ import { shallowRef, ShallowRef, watch } from 'vue'
  * 本地存储类
  */
 export default class <T extends object> {
-    constructor(storage: Storage, source: T, prefix = '@') {
+    constructor(storage: Storage, source: T, prefix = window.location.host + '@') {
         this.prefix = prefix
         this.storage = storage
         this.source = source