huang_an 2 gadi atpakaļ
vecāks
revīzija
4b7a364b1d

+ 8 - 0
src/views/warehouseManagement/components/AssetsDialog.vue

@@ -80,6 +80,7 @@
             :reserve-selection="true"
             width="55"
             align="center"
+            :selectable="selectable"
           >
           </el-table-column>
         </el-table>
@@ -150,6 +151,13 @@
       };
     },
     methods: {
+      selectable(row, index) {
+        if (row.canUsedCount != 0) {
+          return true;
+        } else {
+          return false;
+        }
+      },
       open() {
         this.visible = true;
         this.$nextTick(() => {

+ 1 - 1
src/views/warehouseManagement/outgoingManagement/components/detailSelect.vue

@@ -234,7 +234,7 @@
         formData: {
           cargoSpaceCode: '',
           time: '',
-          dateType: 1,
+          dateType: 2,
           batchNo: '',
           packageNo: '',
           onlyCode: '',

+ 21 - 2
src/views/warehouseManagement/outgoingManagement/index.vue

@@ -113,6 +113,9 @@
           <p class="col">出库:{{ row.createTime }}</p>
         </template>
 
+        <template v-slot:bizType="{ row }">
+          {{ handleBizType(row.bizType) }}
+        </template>
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
           <el-link
@@ -133,7 +136,8 @@
   import outin from '@/api/warehouseManagement/outin';
   import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
 
-  import { auditStatus, useDict } from '@/utils/dict/index';
+  import { auditStatus, useDict, outputSceneState } from '@/utils/dict/index';
+
   // import { getPage } from '@/api/stockManagement'
   // import { deepClone } from '@/utils'
   export default {
@@ -141,7 +145,7 @@
     data() {
       return {
         auditStatus,
-
+        outputSceneState,
         tableData: [],
         fromUserList: [],
         formData: {
@@ -202,6 +206,14 @@
             align: 'center',
             slot: 'action',
             showOverflowTooltip: true
+          },
+          {
+            prop: 'bizType',
+            slot: 'bizType',
+            label: '出库场景',
+            align: 'center',
+            showOverflowTooltip: true,
+            width: 150
           }
         ]
       };
@@ -210,6 +222,13 @@
       this.getUser();
     },
     methods: {
+      handleBizType(code) {
+        for (const key in this.outputSceneState) {
+          if (this.outputSceneState[key].code == code) {
+            return this.outputSceneState[key].label;
+          }
+        }
+      },
       getUserName(id) {
         let obj = this.fromUserList.find((x) => x.id == id);
         return obj && obj.name;

+ 21 - 0
src/views/warehouseManagement/stockManagement/index.vue

@@ -116,6 +116,7 @@
             {{ row.bizNo }}
           </el-link>
         </template>
+
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
           <el-link
@@ -127,6 +128,9 @@
             查看详情
           </el-link>
         </template>
+        <template v-slot:bizType="{ row }">
+          {{ handleBizType(row.bizType) }}
+        </template>
       </ele-pro-table>
     </el-card>
   </div>
@@ -187,12 +191,14 @@
             align: 'center',
             showOverflowTooltip: true
           },
+
           {
             prop: 'createUserName',
             label: '入库人',
             align: 'center',
             showOverflowTooltip: true
           },
+
           {
             width: 160,
             prop: 'createTime',
@@ -220,12 +226,27 @@
             align: 'center',
             slot: 'action',
             showOverflowTooltip: true
+          },
+          {
+            prop: 'bizType',
+            slot: 'bizType',
+            label: '入库类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            width: 150
           }
         ]
       };
     },
     created() {},
     methods: {
+      handleBizType(code) {
+        for (const key in this.sceneState) {
+          if (this.sceneState[key].code == code) {
+            return this.sceneState[key].label;
+          }
+        }
+      },
       async datasource({ page, limit, where }) {
         const params = Object.assign({}, this.formData);
         if (params.time?.length) {

+ 148 - 156
src/views/warehouseManagement/stocktaking/reportLoss/index.vue

@@ -1,36 +1,35 @@
 <template>
   <div class="ele-body">
-     <el-card shadow="never" v-loading="loading">
-	   <reportloss-search @search="reload">
-	   </reportloss-search>
-	   <!-- 数据表格 -->
-	   <ele-pro-table
-	     ref="table"
-	     :columns="columns"
-	     :datasource="datasource"
-	     cache-key="systemRoleTable"
-	   >
-	     <!-- 表头工具栏 -->
-	     <template v-slot:toolbar>
-			 <el-button
-			   size="small"
-			   type="primary"
-			   icon="el-icon-plus"
-			   class="ele-btn-icon"
-			   @click="addClick()"
-			 >
-			   新建
-			 </el-button>
-		   <el-button
-		     size="small"
-		     type="primary"
-		     class="ele-btn-icon"
-		     @click="goDetail()"
-		   >
-		     详情
-		   </el-button>
-	     </template>
-<!-- 	     <template v-slot:enable="{ row }">
+    <el-card shadow="never" v-loading="loading">
+      <reportloss-search @search="reload"> </reportloss-search>
+      <!-- 数据表格 -->
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        cache-key="systemRoleTable"
+      >
+        <!-- 表头工具栏 -->
+        <template v-slot:toolbar>
+          <el-button
+            size="small"
+            type="primary"
+            icon="el-icon-plus"
+            class="ele-btn-icon"
+            @click="addClick()"
+          >
+            新建
+          </el-button>
+          <el-button
+            size="small"
+            type="primary"
+            class="ele-btn-icon"
+            @click="goDetail()"
+          >
+            详情
+          </el-button>
+        </template>
+        <!-- 	     <template v-slot:enable="{ row }">
 	       <el-switch
 	         v-model="row.enable"
 	         active-color="#13ce66"
@@ -41,115 +40,113 @@
 	       >
 	       </el-switch>
 	     </template> -->
-		 <template v-slot:action="{ row }">
-		   <el-link
-		     type="primary"
-		     :underline="false"
-		     icon="el-icon-edit"
-		     @click="editRow(row)"
-		   >
-		     编辑
-		   </el-link>
-		 </template>
-	   </ele-pro-table>
-     </el-card>
+        <template v-slot:action="{ row }">
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            @click="editRow(row)"
+          >
+            编辑
+          </el-link>
+        </template>
+      </ele-pro-table>
+    </el-card>
   </div>
 </template>
 
 <script>
   import ReportlossSearch from './components/reportloss-search.vue';
-  import { pageRoles } from '@/api/system/role'; 
+  import { pageRoles } from '@/api/system/role';
   export default {
     components: {
       ReportlossSearch
     },
-    data () {
+    data() {
       return {
-		// 表格列配置
-		columns: [
-		  {
-		    columnKey: 'index',
-		    label: '序号',
-		    type: 'index',
-		    width: 55,
-		    align: 'center',
-		    showOverflowTooltip: true,
-		    fixed: 'left'
-		  },
-		  {
-		    prop: 'code',
-		    label: '状态',
-		    align: 'center',	
-		    showOverflowTooltip: true,
-		    minWidth: 110
-		  },
-		  {
-		    prop: 'enable',
-		    label: '单号',
-		    align: 'center',	
-		    showOverflowTooltip: true,
-		    slot: 'enable',
-		    minWidth: 110
-		  },
-			{
-			  prop: 'groupId',
-			  label: '名称',
-			  align: 'center',
-			  showOverflowTooltip: true,
-			  minWidth: 110
-			},
-		  {
-		    prop: 'name',
-		    label: '类型',
-		    align: 'center',	
-		    showOverflowTooltip: true,
-		    minWidth: 110
-		  },
-		  {
-		    prop: 'cycle',
-		    label: '报损报溢部门',
-		    align: 'center',	
-		    showOverflowTooltip: true,
-		    minWidth: 110
-		  },
-			{
-			  prop: 'auto',
-			  label: '报损报溢人',
-			  align: 'center',	
-			  showOverflowTooltip: true,
-			  minWidth: 110
-			},
-			{
-			  prop: 'sk',
-			  label: '报损时间',
-			  align: 'center',	
-			  showOverflowTooltip: true,
-			  minWidth: 110
-			},
-			{
-			  prop: 'zt',
-			  label: '审核人',
-			  align: 'center',	
-			  showOverflowTooltip: true,
-			  minWidth: 110
-			},
-			{
-			columnKey: 'action',
-			label: '操作',
-			width: 230,
-			align: 'center',
-			resizable: false,
-			slot: 'action',
-			showOverflowTooltip: true
-			}
-		],
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'code',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'enable',
+            label: '单号',
+            align: 'center',
+            showOverflowTooltip: true,
+            slot: 'enable',
+            minWidth: 110
+          },
+          {
+            prop: 'groupId',
+            label: '名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'name',
+            label: '类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'cycle',
+            label: '报损报溢部门',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'auto',
+            label: '报损报溢人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'sk',
+            label: '报损时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'zt',
+            label: '审核人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 230,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ],
         // 加载状态
-        loading: false,
+        loading: false
       };
     },
-    computed: {
-
-    },
+    computed: {},
     methods: {
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
@@ -170,36 +167,31 @@
       reload(where) {
         this.$refs.table.reload({ page: 1, where });
       },
-	  
-	  // 详情
-	  goDetail(){
-		  this.$router.push({
-		    path: '/warehouseManagement/stocktaking/reportLoss/details',
-		    // query: {
-		    //   id
-		    // }
-		  })
-	  },
-	  
-	  // 新增
-	  addClick(){
-		 this.$router.push({
-		   path: '/warehouseManagement/stocktaking/reportLoss/add',
-		   // query: {
-		   //   id
-		   // }
-		 })
-	  },
-	  
-	  // 撤回
-	  editRow(row){
-		  
-	  }
-	  
+
+      // 详情
+      goDetail() {
+        this.$router.push({
+          path: '/warehouseManagement/stocktaking/reportLoss/details'
+          // query: {
+          //   id
+          // }
+        });
+      },
+
+      // 新增
+      addClick() {
+        this.$router.push({
+          path: '/warehouseManagement/stocktaking/reportLoss/add'
+          // query: {
+          //   id
+          // }
+        });
+      },
+
+      // 撤回
+      editRow(row) {}
     }
   };
 </script>
 
-<style lang="scss" scoped>
-
-</style>
+<style lang="scss" scoped></style>