Преглед на файлове

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

huangbin преди 4 години
родител
ревизия
5ca00e73e7

+ 5 - 0
src/assets/styles/mixin.less

@@ -1610,4 +1610,9 @@ input:-internal-autofill-selected {
 
 .topTableHeight {
     height: calc(100% - 28px);
+}
+
+// 折叠底部上面左边菜单高度
+.hiddenBottomLayout .layout-top .middleLayout .m-layout-left .ant-layout-sider-children ul.ant-menu.ant-menu-inline.left-menu {
+    height: calc(100vh - 126px);
 }

+ 12 - 0
src/common/components/uploadImg/index.vue

@@ -2,6 +2,7 @@
   <div class="upload">
     <a-upload :action="uploadUrl"
               v-model:file-list="uploadImgList"
+              :before-upload="beforeUpload"
               @change="uploadAction">
       <a-button class="uploadBtn">上传</a-button>
     </a-upload>
@@ -23,6 +24,7 @@ import { defineComponent } from '@/common/export/table';
 import { handlePreviewImg, handleUplodImg } from '@/common/setup/upload';
 import { FileInfo, FileItem } from '@/common/setup/upload/interface';
 import { PropType, watchEffect } from '@vue/runtime-core';
+import { message } from 'ant-design-vue';
 
 export default defineComponent({
     name: 'upload-img',
@@ -53,7 +55,17 @@ export default defineComponent({
                 uploadImgList.value = props.imgList;
             }
         });
+        // 文件上传校验
+        const beforeUpload = (file:any) => {
+          const isLt2M = file.size / 1024 / 1024 <= 1;
+          if (!isLt2M) {
+            message.error(file.name + "图片大小超出1M限制,请修改后重新上传", 0.8);
+            return isLt2M;
+          }
+          return isLt2M;
+        };
         return {
+            beforeUpload,
             uploadUrl,
             uploadAction,
             uploadChange,

+ 1 - 0
src/common/methods/format/index.ts

@@ -71,6 +71,7 @@ export function formatTime(value: string | Date | Moment, type: TIME) {
     } else if (type === 'm') {
         'YYYY-MM-DD HH:mm'
     }
+    if(value === '--') return '';
     if (value) return moment(value).format(str);
     return value;
 }

+ 2 - 3
src/common/setup/upload/index.ts

@@ -61,11 +61,10 @@ export function handleUplodImg(limitSize = 1) {
         let resFileList = [...fileList];
         // 1. Limit the number of uploaded files
         resFileList = resFileList.slice(-limitSize);
-
         // 2. 处理上传异常
         if (file.status !== 'uploading') {
-            if (file.xhr?.status !== 200) {
-                message.error(`服务器返回状态不为200: ${file.xhr?.statusText}`)
+            if (file.response.code !== 200) {
+                message.error(`服务器返回状态: ${file.response.code},${file.response.message}`)
             }
 
         }

+ 3 - 2
src/views/business/plan/components/add/index.vue

@@ -93,6 +93,7 @@
                        name="PlanQty">
             <a-input-number class="dialogInput"
                             style="width: 200px"
+                            max="99999999999"
                             v-model:value="formState.PlanQty"
                             placeholder="请输入计划量"></a-input-number>
           </a-form-item>
@@ -187,15 +188,15 @@ export default defineComponent({
                     PlanQty: Number(param.PlanQty), // 计划数量
                     OperateType: OperateType,
                     Currencyid: param.Currencyid,
-                    ConvertFactor: param.ConvertFactor,
                     ApplyId: Number(loginId),
                     PlanTime: formatTime(new Date(), 's'),
                     ProductType: 1,
                     Biztype: 1,
                     AreaUserID: userid,
                     Remark: param.Remark,
-                    Tradeuserid: param.Tradeuserid, // 交易用户id
                 };
+                if ( param.ConvertFactor) reqParam.ConvertFactor = param.ConvertFactor
+                if ( param.Tradeuserid) reqParam.Tradeuserid = param.Tradeuserid
                 requestResultLoadingAndInfo(hedgePlanReq, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['提交申请成功', '提交申请失败:']).then(() => {
                     cancel(true);
                 });

+ 1 - 1
src/views/information/account_info/compoments/modify-managers/index.vue

@@ -23,7 +23,7 @@
                        name="userid">
             <a-select class="inlineFormSelect"
                       style="width: 200px"
-                      v-model:value="formState.userid"
+                      v-model:value="selectedData.clientroleid"
                       placeholder="请选择账户权限">
               <a-select-option v-for="(item, index) in tableList"
                                :key="index"

+ 3 - 3
src/views/information/goods/components/rightSpot/index.vue

@@ -9,13 +9,13 @@
           </svg>
           {{selctedDeliveryGoods.data.deliverygoodsname}}({{selctedDeliveryGoods.data.enumdicname}})
         </span>
-        <span class="green ml10">{{selctedDeliveryGoods.data.dgstatus ? '正常' : '停用'}}</span>
+        <span class="green ml10">{{selctedDeliveryGoods.data.isvalid ? '正常' : '停用'}}</span>
       </div>
       <div class="tltBtns">
-        <template v-if="isNormal">
+        <template v-if="selctedDeliveryGoods.data.isvalid">
           <BtnList :btnList="forDataBtn" />
         </template>
-        <template>
+        <template v-else>
           <a-button class="blueBtn">恢复</a-button>
         </template>
       </div>

+ 11 - 13
src/views/information/goods/list/spot-variety/setup.ts

@@ -64,19 +64,17 @@ export function handleDG() {
         deliveryGoodsList.value = res;
         res.forEach(e => {
             const { dgstatus, isvalid, deliverygoodsname, deliverygoodsid } = e.data
-            if (isvalid) { // 有效 
-                const normal = 'goods_info_spot_normal', disable = 'goods_info_spot_disable';
-                const result = { key: deliverygoodsid.toString(), title: deliverygoodsname }
-                if (dgstatus) { //1:正常
-                    if (menuMap.has(normal)) {
-                        const index = menuMap.get(normal) as number;
-                        menuList.value[index].children?.push(result)
-                    }
-                } else {    // 0:未激活 
-                    if (menuMap.has(disable)) {
-                        const index = menuMap.get(disable) as number;
-                        menuList.value[index].children?.push(result)
-                    }
+            const normal = 'goods_info_spot_normal', disable = 'goods_info_spot_disable';
+            const result = { key: deliverygoodsid.toString(), title: deliverygoodsname }
+            if (isvalid) { //1:正常
+                if (menuMap.has(normal)) {
+                    const index = menuMap.get(normal) as number;
+                    menuList.value[index].children?.push(result)
+                }
+            } else {    // 0:未激活 
+                if (menuMap.has(disable)) {
+                    const index = menuMap.get(disable) as number;
+                    menuList.value[index].children?.push(result)
                 }
             }
         })

+ 1 - 1
src/views/manage/inventory-review/components/checkoutAudit/index.vue

@@ -78,7 +78,7 @@
           </a-col>
           <a-col :span="12">
             <a-form-item label="商品">
-              <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+              <span class="white">{{ formatValue(selectedRow.wrstandardname) }}</span>
             </a-form-item>
           </a-col>
         </a-row>

+ 2 - 2
src/views/search/inventory/components/add/setup.ts

@@ -78,7 +78,7 @@ export function handleDeliveryGoods(formState: UnwrapRef<FormState>) {
     function getDeliveryGoods() {
         QueryDeliveryGoods({}).then(res => {
             console.log('查询现货商品', res);
-            deliveryGoodsList.value = res;
+            deliveryGoodsList.value = res.filter(x=>x.isvalid === 1);
         }).catch(err => {
             message.error(err)
         })
@@ -98,7 +98,7 @@ export function handleDeliveryGoods(formState: UnwrapRef<FormState>) {
 
     // 查询现货商品详情
     function getDeliveryGoodsDetail(deliverygoodsid: number) {
-        const temp = APP.get('DeliveryGoodsList').find((e: ErmcpDeliveryGoodsDetailEx) => e.data.deliverygoodsid === deliverygoodsid)
+        const temp = APP.get('DeliveryGoodsList').find((e: ErmcpDeliveryGoodsDetailEx) => e.data.deliverygoodsid === deliverygoodsid && e.data.isvalid == 1)
         if (temp) {
             gblist.value = temp.gblist
             gmlist.value = temp.gmlist