Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

yu jie 4 gadi atpakaļ
vecāks
revīzija
e58166f6f5

+ 13 - 9
public/config/readMe.txt

@@ -5,6 +5,10 @@ http://192.168.31.114:8080/cfg?key=test_114
 
 李倩:http://192.168.31.220:8080/cfg?key=test_220
 
+李倩:http://192.168.30.125:8080/cfg?key=test_125 账号:epm, 密码:123456
+
+姚姐:http://192.168.30.211:8080/cfg?key=test_211 账号:1000, 密码:123456
+
 http://192.168.30.211:8080/cfg?key=test_211
 
 透传  "apiUrl": "http://192.168.31.175:8080/cfg?key=test_175"
@@ -13,7 +17,7 @@ http://192.168.30.211:8080/cfg?key=test_211
 
 "apiUrl": "http://192.168.30.211:8080/cfg?key=test_211"
 
-31.175 账号 
+31.175 账号
     110000000001
     199990000012
     199990000013
@@ -36,11 +40,11 @@ http://192.168.30.211:8080/cfg?key=test_211
     110000000001
     1100010010000001
     1100010020000001
-    2100002 
-    11000000000010 
-    11000000000011 
-    11000000000007 
-    120000000001 
-    110000000002 
-    199990000001 
-    188880000001 
+    2100002
+    11000000000010
+    11000000000011
+    11000000000007
+    120000000001
+    110000000002
+    199990000001
+    188880000001

+ 8 - 2
src/layout/components/top.vue

@@ -65,8 +65,14 @@ export default defineComponent({
                 const i = value.children.findIndex((e) => e.code === temp);
                 if (i === -1) {
                     // 切换左边菜单栏
-                    name = value.code;
-                    index.value = ['0'];
+                    if (value?.children.length) {
+                        // 默认第一个tab页
+                        name = value.children[0].code;
+                        index.value = ['0'];
+                    } else {
+                        router.push({ name: '404' });
+                        return;
+                    }
                 } else {
                     // 切换右边上面tab 栏
                     index.value = [`${i}`];

+ 10 - 4
src/services/socket/protobuf/buildReq.ts

@@ -189,7 +189,10 @@ function parseSoleProtoRsp(rspPackage: any, funCodeName: string): ParseRsp {
         } if (RetCode === -1) { // 管理端错误消息
             return { isSuccess: false, result: RetDesc };
         } else {    // 数据库获取的错误信息
-            const errMsg = getErrorInfoByCode(String(RetCode));
+            // sb服务   定义好的错误规则信息又修改了
+            // 原本一开始 RetCode -1 代表着管理端错误信息,现在管理端 RetCode 不为 -1 也包括管理端错误信息,
+            // 数据库中存放的错误信息枚举,只包含http请求的,不包含管理端proto的。所有又要添加一层判断
+            const errMsg = RetDesc ? RetDesc : getErrorInfoByCode(String(RetCode));
             const result = errMsg ? errMsg : `未知错误:${RetCode}`;
             return { isSuccess: false, result };
         }
@@ -262,7 +265,7 @@ function lower(value: string): string {
  * @param headerEnum 自定义的proto参数枚举值,减小重复抒写 默认0
  * @param reqFuncodeName proto 发送请求定义的头名字,特别需要注意,自已的funCodeName要与这个一致
  * @param rspFuncodeName proto 响应请求定义的头名字
- * @returns 
+ * @returns
  */
 export function protoMiddleware<T>(param: T, reqName: string, rspName: string, headerEnum: HeadEnum = 0): Promise<any> {
     return new Promise((resolve, reject) => {
@@ -282,7 +285,10 @@ export function protoMiddleware<T>(param: T, reqName: string, rspName: string, h
                     reject(result);
                 }
             },
-            onFail: (err) => reject(err.message),
+            onFail: (err) => {
+                console.log(`proto:${reqName}错误消息:${err}`)
+                reject(err.message)
+            },
         } as Callback);
     });
 }
@@ -293,7 +299,7 @@ export function protoMiddleware<T>(param: T, reqName: string, rspName: string, h
  * @param headParam IMessageHead
  * @param reqFuncodeName proto 发送请求定义的头名字,特别需要注意,自已的funCodeName要与这个一致
  * @param rspFuncodeName proto 响应请求定义的头名字
- * @returns 
+ * @returns
  */
 export function protoMiddleware_manager<T>(param: T, reqName: string, rspName: string, headParam: IMessageHead): Promise<any> {
     return new Promise((resolve, reject) => {

+ 2 - 2
src/views/information/spot-contract/components/add/index.vue

@@ -78,7 +78,7 @@
                   <a-select-option :value="item.userid"
                                    v-for="item in customList"
                                    :key="item.userid">
-                    {{item.nickname}}
+                    {{item.customername}}
                   </a-select-option>
                 </a-select>
               </a-form-item>
@@ -107,7 +107,7 @@
                   <a-select-option :value="item.userid"
                                    v-for="item in customList"
                                    :key="item.userid">
-                    {{item.nickname}}
+                    {{item.customername}}
                   </a-select-option>
                 </a-select>
               </a-form-item>

+ 1 - 1
src/views/information/spot-contract/components/common-detail/index.vue

@@ -89,7 +89,7 @@ export default defineComponent({
                 const price = [
                     { label: '定价类型', value: getPriceTypeName(data.pricetype) },
                     { label: '数量', value: formatValue(data.qty) },
-                    { label: '点价合约', value: formatValue(data.goodscode) },
+                    { label: '点价合约', value: formatValue(data.goodsname) },
                     { label: '升贴水', value: formatValue(data.pricemove) },
                     { label: '点价期', value: formatValue(formatTime(data.startdate, 'd') + '--' + formatTime(data.enddate, 'd')) },
                     { label: '交收期', value: formatValue(formatTime(data.deliverystartdate, 'd') + '--' + formatTime(data.deliveryenddate, 'd')) },

+ 7 - 7
src/views/information/spot-contract/components/setup.ts

@@ -24,8 +24,8 @@ import { FormState } from './interface';
 /**
  * 合同操作相关 针对操作类型 1: 保存草稿  2: 提交申请 3: 删除成功 4:审核通过
  * @param reqs GldErmcpSpotContractOperateReq
- * @param loading 
- * @returns 
+ * @param loading
+ * @returns
  */
 export function orderContractControl(reqs: GldErmcpSpotContractOperateReq, loading: Ref<boolean>): Promise<string> {
     //处理 合同id
@@ -44,9 +44,9 @@ export function orderContractControl(reqs: GldErmcpSpotContractOperateReq, loadi
 
 /**
  * 修改合同类型 针对操作类型 4:审核拒绝 6:正常完结 5:撤销
- * @param reqs 
- * @param loading 
- * @returns 
+ * @param reqs
+ * @param loading
+ * @returns
  */
 export function orderContractOperateControl(reqs: SpotContractOperateReq, loading: Ref<boolean>): Promise<string> {
     //处理 合同id
@@ -66,7 +66,7 @@ export function orderContractOperateControl(reqs: SpotContractOperateReq, loadin
 
 /**
  * 新增和修改的表单数据
- * @returns 
+ * @returns
  */
 export function handleFromState() {
     function initFormData() {
@@ -215,7 +215,7 @@ export function handleContract(formState: UnwrapRef<FormState>) {
     function queryCustomList() {
         QueryCustomInfo(3)
             .then((res) => {
-                customList.value = res.filter(e => e.status === 4)
+                customList.value = res.filter(e => (e.status === 4))
                 console.log('客户资料', customList);
             })
             .catch((err) => {

+ 1 - 1
src/views/search/inventory/components/add/index.vue

@@ -10,7 +10,7 @@
     <template #footer>
       <a-button key="submit"
                 class="cancelBtn"
-                @click="cancel">取消</a-button>
+                @click="closeAction">取消</a-button>
       <a-button key="submit"
                 type="primary"
                 :loading="loading"

+ 0 - 23
src/views/search/inventory/index.vue

@@ -1,23 +0,0 @@
-<template>
-  <!-- 库存查询 -->
-  <div class="inventory">
-    "库存查询"
-  </div>
-</template>
-
-<script lang="ts">
-import { defineComponent } from 'vue';
-
-export default defineComponent({
-    name: 'inventory',
-    components: {},
-    setup() {
-        return {};
-    },
-});
-</script>
-
-<style lang="less">
-.inventory {
-}
-</style>;

+ 1 - 1
src/views/search/inventory/list/inventory_applyrecord/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 现货合同: 待审核-->
+  <!-- 库存查询: 当前库存-->
   <div class="inventory_current"
        :loading="loading">
     <Filter @search="updateColumn">

+ 1 - 1
src/views/search/inventory/list/inventory_current/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 现货合同: 待审核-->
+  <!-- 库存查询: 申请记录-->
   <div class="inventory_current"
        :loading="loading">
     <Filter @search="updateColumn">