liuying
2024-04-24 e4963529b19325117dcbf419c97503b86b16bf22
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/WmsControlRule/index.vue
@@ -14,8 +14,7 @@
              <a-col :md="8" :sm="24">
                <a-form-item label="规则名称">
                  <a-input v-model="queryParam.ruleName" allow-clear placeholder="请输入规则名称" />
                </a-form-item> </a-col
              ><template v-if="advanced">
                </a-form-item> </a-col><template v-if="advanced">
                <a-col :md="8" :sm="24">
                  <a-form-item label="规则描述">
                    <a-input v-model="queryParam.ruleDesc" allow-clear placeholder="请输入规则描述" />
@@ -23,12 +22,8 @@
                </a-col>
                <a-col :md="8" :sm="24">
                  <a-form-item label="是否禁用">
                    <a-select
                      :allowClear="true"
                      style="width: 100%"
                      v-model="queryParam.isDisabled"
                      placeholder="请选择是否禁用"
                    >
                    <a-select :allowClear="true" style="width: 100%" v-model="queryParam.isDisabled"
                      placeholder="请选择是否禁用">
                      <a-select-option v-for="(item, index) in isDisabledData" :key="index" :value="item.code">{{
                        item.name
                      }}</a-select-option>
@@ -40,18 +35,11 @@
                <a-col :md="8" :sm="24">
                  <a-form-item label="创建时间">
                    <a-range-picker
                      style="width: 100%"
                      :placeholder="['开始时间', '结束时间']"
                      :show-time="{
                    <a-range-picker style="width: 100%" :placeholder="['开始时间', '结束时间']" :show-time="{
                        format: 'HH:mm:ss',
                        defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')]
                      }"
                      v-model="queryParam.createdTime"
                      value-format="YYYY-MM-DD HH:mm:ss"
                      format="YYYY-MM-DD HH:mm:ss"
                      @change="onChangecreatedTime"
                    />
                    }" v-model="queryParam.createdTime" value-format="YYYY-MM-DD HH:mm:ss"
                      format="YYYY-MM-DD HH:mm:ss" @change="onChangecreatedTime" />
                  </a-form-item>
                </a-col>
                <!--年月日时分秒-->
@@ -59,18 +47,11 @@
                <a-col :md="8" :sm="24">
                  <a-form-item label="更新时间">
                    <a-range-picker
                      style="width: 100%"
                      :placeholder="['开始时间', '结束时间']"
                      :show-time="{
                    <a-range-picker style="width: 100%" :placeholder="['开始时间', '结束时间']" :show-time="{
                        format: 'HH:mm:ss',
                        defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')]
                      }"
                      v-model="queryParam.updatedTime"
                      value-format="YYYY-MM-DD HH:mm:ss"
                      format="YYYY-MM-DD HH:mm:ss"
                      @change="onChangeupdatedTime"
                    />
                    }" v-model="queryParam.updatedTime" value-format="YYYY-MM-DD HH:mm:ss"
                      format="YYYY-MM-DD HH:mm:ss" @change="onChangeupdatedTime" />
                  </a-form-item>
                </a-col>
@@ -102,16 +83,9 @@
      </a-card>
    </div>
    <a-card :bordered="false">
      <s-table
        ref="table"
        :columns="columns"
        :data="loadData"
        :alert="true"
        @changeTablePage="pageInfo = $event"
        :scroll="{ x: true, y: tableHeight }"
        :rowKey="record => record.id"
        :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
      >
      <s-table ref="table" :columns="columns" :data="loadData" :alert="true" @changeTablePage="pageInfo = $event"
        :scroll="{ x: true, y: tableHeight }" :rowKey="record => record.id"
        :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
        <template class="table-operator" slot="operator" v-if="hasPerm('WmsControlRule:add')">
          <!-- <div ref="actionBar" class="actionBar">
            <a-button
@@ -144,12 +118,11 @@
          </div>
          <div v-else=""></div>
        </span>
        <span slot="action" slot-scope="text, record">
          <!-- 自定义 -->
        <!-- <span slot="action" slot-scope="text, record">
          <a v-if="hasPerm('WmsControlRule:getdetail')" @click="$refs.detailForm.edit(record)">详情</a>
          &nbsp;&nbsp;
          </a-popconfirm>
        </span>
        </span> -->
      </s-table>
      <add-form ref="addForm" @ok="handleOk" />
      <edit-form ref="editForm" @ok="handleOk" />
@@ -204,12 +177,12 @@
          customRender: (text, record, index) => `${index + 1 + (this.pageInfo.current - 1) * this.pageInfo.pageSize}`
        },
        {
          title: '规则编号',
          title: '控制属性规则编号',
          align: 'center',
          customHeaderCell: () => {
            return {
              style: {
                'min-width': '120px' //最小列宽设置
                'min-width': '150px'//最小列宽设置
              }
            }
          },
@@ -224,7 +197,7 @@
          dataIndex: 'ruleCode'
        },
        {
          title: '规则名称',
          title: '最高库存',
          align: 'center',
          customHeaderCell: () => {
            return {
@@ -241,10 +214,10 @@
            }
          },
          sorter: true,
          dataIndex: 'ruleName'
          dataIndex: 'maxImumqty'
        },
        {
          title: '规则描述',
          title: '最低库存',
          align: 'center',
          customHeaderCell: () => {
            return {
@@ -261,7 +234,108 @@
            }
          },
          sorter: true,
          dataIndex: 'ruleDesc'
          dataIndex: 'minImumqty'
        },
        {
          title: '安全库存',
          align: 'center',
          customHeaderCell: () => {
            return {
              style: {
                'min-width': '120px'//最小列宽设置
              }
            }
          },
          customCell: () => {
            return {
              style: {
                'min-width': '120px'//最小列宽设置
              }
            }
          },
          sorter: true,
          dataIndex: 'safeImumqty'
        },
        {
          title: '最小库龄',
          align: 'center',
          customHeaderCell: () => {
            return {
              style: {
                'min-width': '120px'//最小列宽设置
              }
            }
          },
          customCell: () => {
            return {
              style: {
                'min-width': '120px'//最小列宽设置
              }
            }
          },
          sorter: true,
          dataIndex: 'minStorageAge'
        },
        {
          title: '最大库龄',
          align: 'center',
          customHeaderCell: () => {
            return {
              style: {
                'min-width': '120px'//最小列宽设置
              }
            }
          },
          customCell: () => {
            return {
              style: {
                'min-width': '120px'//最小列宽设置
              }
            }
          },
          sorter: true,
          dataIndex: 'maxStorageAge'
        },
        {
          title: '是否免检',
          align: 'center',
          customHeaderCell: () => {
            return {
              style: {
                'min-width': '120px'//最小列宽设置
              }
            }
          },
          customCell: () => {
            return {
              style: {
                'min-width': '120px'//最小列宽设置
              }
            }
          },
          sorter: true,
          dataIndex: 'isNotChek',
          scopedSlots: { customRender: 'isNotChekscopedSlots' }
        },
        {
          title: '保质期天数',
          align: 'center',
          customHeaderCell: () => {
            return {
              style: {
                'min-width': '120px'//最小列宽设置
              }
            }
          },
          customCell: () => {
            return {
              style: {
                'min-width': '120px'//最小列宽设置
              }
            }
          },
          sorter: true,
          dataIndex: 'shelfLifeDays'
        },
        {
          title: '是否禁用',
@@ -377,14 +451,14 @@
    }
  },
  created() {
    if (this.hasPerm('WmsControlRule:edit') || this.hasPerm('WmsControlRule:delete')) {
      this.columns.push({
        title: '操作',
        width: '150px',
        dataIndex: 'action',
        scopedSlots: { customRender: 'action' }
      })
    }
    // if (this.hasPerm('WmsControlRule:edit') || this.hasPerm('WmsControlRule:delete')) {
    //   this.columns.push({
    //     title: '操作',
    //     width: '150px',
    //     dataIndex: 'action',
    //     scopedSlots: { customRender: 'action' }
    //   })
    // }
    const path = this.$route.path
    const columnStr = window.localStorage.getItem(path)
    if (columnStr) {
@@ -506,6 +580,7 @@
.table-operator {
  margin-bottom: 18px;
}
button {
  margin-right: 8px;
}