当前位置: 首页 > news >正文

乐仓VUE常用点

  1. 页面跳转

发送

 router.push({

        name: config.editRouteName,

        query: {

          type: 'create',

          from: route.name as string,

        },

      });

 router.push({ name: 'MbdCalScheme' });

接收

const route = useRoute();

const type = computed(() => {

  return route.query.type;

});

 const objId = route.query.objId;

  1. 查询条件多列设置

<Header

      :searchNum="2"

      :labelCol="{ span: 4 }"

      :wrapperCol="{ span: 8 }"

      :formConfig="searchConfig"

      @onQuery="handleSearch"

      @onReset="handleReset"

    />

  1. 动态下拉

列表

人员:通过人员id查询出人员姓名

{

    key: 'tj0MaterialRequisitionRecipi',

    dataIndex: 'tj0MaterialRequisitionRecipi',

    type: 'user',

  },

表单

计量单位-前台

 <!-- 单位 -->

          <query-select

            v-if="column?.key == 'unit'"

            class="w-full"

            detail

            :record="currentRecord"

            :class-name="WMS_CLASS_NAME.MeUnit"

            :svr-name="_svrMap.mbd"

            v-model:value="currentRecord.unit"

          />

 <!-- 人员 -->

<query-select

        class="w-full"

        :placeholder="getLangText(commonLangPrefix, 'operator')"

        :svr-name="_svrMap.mbd"

        class-name="User"

        v-model:value="modalConfig.operator"

        mode="multiple"

      />

人员、计量单位-后台

const formConfigSHXD = computed<FormConfig[]>(() => {

  return [

    {

      prop: 'userName',

      label: '收货人',

      type: 'query-select',

      className: 'User',

      svrName: svrPath.mbd,

      rules: [{ required: true, message: '请选择', trigger: 'change' }],

      attrs: {

        maxlength: 50,

        disabled: false,

      }, {

      prop: 'defaultUnit',

      label: '计量单位', 

      type: 'query',

      className: COMMON_CLASS.MeUnit,

      svrName: svrMap.mbd,

    },{

      prop: 'tj0status',

      label: '状态',

      type: 'select',

      options: [{value:'启用',label:'启用'},{value:'禁用',label:'禁用'}],

      attrs: {

        maxLength: 50,

        placeholder: '请选择',

      },

    }

   },    

  ].map((item: any) => {

    item.labelCol = { span: 4 };

    item.wrapperCol = { span: 20 };

    return item;

  });

});

  1. 列表

单选  :checkbox="radio"

复选  :checkbox="checkbox"

序列号       is-serial-number

 <base-table class-name="ReceiveJobTask" ref="tableRef" row-key="index" :page-opt="pageOpt" :is-page="false" :dataSource="dataSource" :columns="currentJobColumns">

        <template #columns="{ column, currentRecord }">

          <WmsMaterialSelect v-model:value="currentRecord.materialCode" :record="currentRecord" v-if="column.key == 'materialCode' && type != 'detail'" />

          <!-- 批次号 -->

          <n-input

            class="w-full"

            :disabled="currentRecord.enableBatch === '0'"

            :placeholder="t('common.pleaseEnter')"

            v-model:value="currentRecord.batchNumber"

            v-if="column.key == 'batchNumber' && type != 'detail'"

            :maxlength="50"

          ></n-input>

          <!-- 外部批次号 -->

          <n-input

            class="w-full"

            :placeholder="t('common.pleaseEnter')"

            v-model:value="currentRecord.externalBatchNumber"

            v-if="column.key == 'externalBatchNumber' && type != 'detail'"

            :maxlength="50"

          ></n-input>

          <!-- 计划收货数量 -->

          <n-input-number

            class="w-full"

            :placeholder="t('common.pleaseEnter')"

            v-model:value="currentRecord.taskQuantity"

            v-if="column.key == 'taskQuantity' && type != 'detail'"

            :min="0"

            :max="9999999"

          />

          <!-- 单位 -->

          <query-select

            v-if="column?.key == 'unit'"

            class="w-full"

            detail

            :record="currentRecord"

            :class-name="WMS_CLASS_NAME.MeUnit"

            :svr-name="_svrMap.mbd"

            v-model:value="currentRecord.unit"

          />

          <!-- 库房 -->

          <query-select :svr-name="_svrMap.mbd" :class-name="WMS_CLASS_NAME.Whs" :detail="type == 'detail'" v-if="column?.key == 'storeId'" v-model:value="currentRecord.storeId" />

          <!-- 有效期 -->

          <fix-date-picker v-if="column.key == 'matEffectiveDate' && type != 'detail'" v-model:value="currentRecord.matEffectiveDate" />

          <AgentSeqSelect

            v-if="column.key == 'agentSeqMgts'"

            v-model:value="currentRecord.agentSeqMgts"

            :detail="type === 'detail'"

            :record="currentRecord"

            :disabled="currentRecord.enableSerialNum === '0'"

          />

        </template>

      </base-table>

工厂下拉

  <FactorySelect
            v-if="column.key == 'materialCode' && type != 'detail'"
            :record="currentRecord"
            v-model:value="currentRecord.materialCode"
            :disabled="currentRecord.relatedJobTaskId"
          />

import FactorySelect from "../../mbd/components/FactorySelect.vue";

相关文章:

  • 工具介绍《WireShark》
  • 结构型设计模式
  • Linux cma预留内存使用与理解
  • “产业大数据”区域产业经济发展的新引擎!
  • dbeaver连接mongodb 插入日期变成了字符串
  • 希尔排序:算法原理与应用解析
  • 云端存储新纪元:SAN架构驱动的智能网盘解决方案
  • 机器学习实战之数据预处理、监督算法、无监督算法、模型评估与改进-思维导图拆分篇
  • Verilog 中寄存器类型(reg)与线网类型(wire)的区别
  • leetcode 2255. 统计是给定字符串前缀的字符串数目 简单
  • flutter-实现瀑布流布局及下拉刷新上拉加载更多
  • 详解java体系实用知识总结
  • 创新前沿 | 接管主机即刻增量CDP备份,高效保障接管期间业务安全!
  • 工业4G路由器赋能智慧停车场高效管理
  • 基于Linux下的MyBash命令解释器
  • 【13】Ajax爬取案例实战
  • 通过Docker快速搭建VoceChat | 开源轻量自托管聊天工具
  • 基于Spring Boot的网上商城系统的设计与实现(LW+源码+讲解)
  • 213.SpringSecurity:授权,授权实战,OAuth2,SpringSecurity中OAuth2认证服务器、资源服务器搭建,JWT
  • Oracle 19C 备份
  • 庄语乐︱宋代历史是被“塑造”出来的吗?
  • 成都警方:在地铁公共区域用改装设备偷拍女乘客,男子被行拘
  • 财政部农业农村司司长吴奇修接受纪律审查和监察调查
  • 六部门:进一步优化离境退税政策扩大入境消费
  • 大家聊中国式现代化|邓智团:践行人民城市理念,开创人民城市建设新局面
  • 美联储官员:货币政策不会立即改变,金融市场波动或致美国经济增长承压