lilei 2 年之前
父節點
當前提交
b380be512b

+ 1 - 1
src/config/router.config.js

@@ -83,7 +83,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'hwSet/:id',
+                path: 'hwSet/:shelfSn',
                 name: 'goodsAllocationSet',
                 component: () => import('@/views/numsGoodsShelves/goodsShelvesAdministration/goodsAllocationSet.vue'),
                 meta: {

+ 0 - 1
src/views/numsGoodsShelves/goodsShelvesAdministration/chooseImportModal.vue

@@ -11,7 +11,6 @@
     <div class="chooseImport-con">
       <!-- 可导入数据 -->
       <p class="">可导入数据{{ loadData.length }}条</p>
-      <p class="red">注意:成功导入后,现有的货位将会被全部删除,即覆盖导入的方式,您所看到的货位就是可导入的数据,请谨慎操作</p>
       <a-table
         class="sTable"
         ref="table"

+ 10 - 56
src/views/numsGoodsShelves/goodsShelvesAdministration/goodsAllocationSet.vue

@@ -29,21 +29,21 @@
       </a-card>
       <a-card :bordered="false" size="small" class="pages-wrap">
         <div class="goodsAllocationSet-baseInfo">
-          <a-button id="goodsAllocationSet-addHW" @click="pageInfo&&pageInfo.state=='NOT_ENABLE'? addHW(0,pageInfo):addHW(1,pageInfo)" type="primary">{{ pageInfo&&pageInfo.state=='NOT_ENABLE'? '批量导入货位':'新增货位' }}</a-button>
+          <a-button id="goodsAllocationSet-impoort" type="primary" class="button-info" @click="addHW(0,pageInfo)">批量导入货位</a-button>
+          <a-button id="goodsAllocationSet-addHW" type="primary" class="button-error" @click="addHW(1,pageInfo)">新增货位</a-button>
         </div>
         <a-table
           class="sTable fixPagination"
           ref="table"
           size="small"
           :pagination="false"
-          :columns="pageInfo&&pageInfo.state=='NOT_ENABLE'?columns:columnsDat"
+          :columns="columns"
           :data-source="loadData"
           bordered>
           <template slot="status" slot-scope="text, record">
-            <a-button size="small" type="link" id="goodsAllocationSet-handleEdit" @click="handleEdit(record)" v-if=" !record.shelfProductEntity">编辑</a-button>
-            <a-button size="small" type="link" id="goodsAllocationSet-handleDel" @click="handleDel(record)" v-if=" !record.shelfProductEntity">删除</a-button>
+            <a-button size="small" type="link" id="goodsAllocationSet-handleEdit" @click="handleEdit(record)" v-if="!record.shelfProductEntity">编辑</a-button>
+            <a-button size="small" type="link" id="goodsAllocationSet-handleDel" @click="handleDel(record)" v-if="!record.shelfProductEntity">删除</a-button>
             <span v-if="record.shelfProductEntity" style="display: inline-block;padding-left: 7px;">--</span>
-            <!-- <span v-if="!($hasPermissions('B_powerMD_user_edit') && record.superAdmin!=1) && !(record.loginFlag==1 && record.ownerOrgFlag==1 && $hasPermissions('B_powerMD_user_restPwd')) && !(record.loginFlag==0 && record.ownerOrgFlag==1 && $hasPermissions('B_powerMD_user_del'))">--</span> -->
           </template>
         </a-table>
       </a-card>
@@ -75,52 +75,7 @@ export default {
       shelfSn: '', // 货架sn
       images: [], // 货架图片
       // 表头
-      columns: [{
-        title: '序号',
-        width: '4%',
-        align: 'center',
-        customRender: function (text, record, index) {
-          return index + 1
-        }
-      },
-      {
-        title: '货位号',
-        dataIndex: 'shelfPlaceCode',
-        width: '11%',
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '创建时间',
-        dataIndex: 'createDate',
-        width: '13%',
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '最后修改时间',
-        dataIndex: 'updateDate',
-        width: '18%',
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        },
-        ellipsis: true
-      },
-      {
-        title: '操作',
-        width: '9%',
-        align: 'left',
-        scopedSlots: {
-          customRender: 'status'
-        }
-      }
-      ],
-      columnsDat: [
+      columns: [
         {
           title: '序号',
           width: '4%',
@@ -144,16 +99,16 @@ export default {
           width: '10%',
           align: 'center',
           customRender: function (text) {
-            return text || ''
+            return text || '--'
           }
         },
         {
-          title: '绑定产品',
+          title: '绑定产品名称',
           dataIndex: 'shelfProductEntity.productName',
           width: '16%',
           align: 'left',
           customRender: function (text) {
-            return text || ''
+            return text || '--'
           }
         },
         {
@@ -196,7 +151,6 @@ export default {
     },
     // 导入或新增
     addHW (type, val) {
-      console.log(type, val, '=========val')
       this.shelfSn = val.shelfSn
       if (type == 0) {
         this.openModal = true
@@ -208,6 +162,7 @@ export default {
     // 获取货位列表
     getHwList () {
       this.spinning = true
+      this.shelfSn = this.$route.params.shelfSn
       shelfHWList(Object.assign({ shelfSn: this.$route.params.shelfSn, shelfProductEntity: {} })).then(res => {
         if (res.status == 200) {
           this.loadData = res.data
@@ -238,7 +193,6 @@ export default {
     },
     // 编辑
     handleEdit (row) {
-      // this.shelfPlaceSn = row.shelfPlaceSn
       this.shelfSn = row.shelfSn
       this.itemData = row
       this.openHWModal = true

+ 1 - 2
src/views/numsGoodsShelves/goodsShelvesAdministration/importHuoweiModal.vue

@@ -26,7 +26,6 @@
           <ul>
             <li>1) 导入的Excel文件中必须包含名为“货位号”的列,且名称必须相同</li>
             <li>2) 除了“货位号”一列,其他列可自定义,不影响数据导入</li>
-            <li>3) 注意:使用此功能时,现有的货位将会被全部删除,即覆盖导入的方式,请谨慎操作</li>
           </ul>
 
         </div>
@@ -91,7 +90,7 @@ export default {
     return {
       isShow: this.openModal, //  是否打开弹框
       openImportModal: false, //  导入
-      filePath: 'https://jg-ocs-test.oss-cn-beijing.aliyuncs.com/test/%E6%95%B0%E5%AD%97%E8%B4%A7%E6%9E%B6%E8%B4%A7%E4%BD%8D%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx', // 文件地址
+      filePath: 'https://jianguan-images.oss-cn-beijing.aliyuncs.com/template/goodsAllocationTempl.xlsx', // 文件地址
       attachAction: process.env.VUE_APP_API_BASE_URL + '/upload',
       paramsData: null,
       uploadParams: {

+ 3 - 4
src/views/numsGoodsShelves/goodsShelvesAdministration/list.vue

@@ -43,7 +43,7 @@
         </a-form>
       </div>
       <div class="table-operator">
-        <a-button size="small" type="primary" class="button-error" @click="handleEdit()" id="goodsShelvesAdministrationList-handleEdit">新增数字货架</a-button>
+        <a-button type="primary" class="button-error" @click="handleEdit()" id="goodsShelvesAdministrationList-handleEdit">新增数字货架</a-button>
       </div>
       <s-table
         class="sTable fixPagination"
@@ -170,8 +170,8 @@ export default {
       this.showModal = true
       if (row) { //  编辑
         this.itemData = row
-      }else{
-        this.itemData=null
+      } else {
+        this.itemData = null
       }
     },
     // 货位设置
@@ -184,7 +184,6 @@ export default {
     },
     // 修改状态
     changeFlagHandle (row) {
-      console.log(row, '------------状态')
       this.itemData = row
       if (row.state != 'CLOSE') {
         this.openStatusModal = true