Explorar o código

add台账详情

huang_an %!s(int64=2) %!d(string=hai) anos
pai
achega
4638d919c1

+ 42 - 0
src/api/classifyManage/itemInformation.js

@@ -53,3 +53,45 @@ export async function getOrderNo(prefix) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+// 查询仓库下拉列表
+export async function getWarehouseList() {
+  const res = await request.post(`/wms/warehouse/getWarehouseList`, {});
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 查询库存台账首页列表
+export async function pageeLedgerMain(params) {
+  const res = await request.get(`/wms/inout/pageeLedgerMain`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 库存台账-详情-基本信息
+export async function getCateInfo(id) {
+  const res = await request.get(`/wms/ledger/getCateInfo/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 分页
+export async function ledgerdetailPage(params) {
+  const res = await request.get(`/wms/ledgerdetail/page`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+//库存台账-详情-出库单分页
+export async function ledgerPage(params) {
+  const res = await request.get(`/wms/ledger/page`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 19 - 0
src/api/sys/index.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request';
+/**
+ * 查询字典列表
+ * @param params 查询条件
+ */
+export async function listDictionaries(params) {
+  const res = await request.get('/system/dict/getPage', { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function pageDictionaryData(id) {
+  const res = await request.get(`/system/dict/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 34 - 0
src/utils/sys.js

@@ -0,0 +1,34 @@
+import { listDictionaries, pageDictionaryData } from '@/api/sys';
+import dict from '@/enum/dict';
+
+export async function sysDict(name, value) {
+  const code = dict[name];
+  let names = '';
+
+  try {
+    const res = await listDictionaries({ pageNum: 1, size: 10, code: code });
+    const id = res.list[0].id;
+
+    const rep = await pageDictionaryData(id);
+    const list = rep.data.dictStaticVOList;
+
+    for (const key in list) {
+      if (list[key].code == value) {
+        names = list[key].name;
+        break;
+      }
+    }
+  } catch (error) {
+    console.error('Error fetching dictionary data:', error);
+  }
+
+  return names;
+}
+
+export function isExit(value, obj) {
+  console.log(value);
+  if (value != '') {
+    return value == '0' ? obj.isFalse : obj.isTrue;
+  }
+  return null;
+}

+ 1 - 1
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -791,6 +791,7 @@
               )
             };
             delete newObj.inOutAddPO.extInfo;
+            console.log('wqwq===');
             console.log('2222', newObj);
 
             const res = await outin.addInOut(newObj);
@@ -822,7 +823,6 @@
               ? 1
               : 0;
             arr[key].warehouseLedgerDetails[k].bizStatus = 2;
-            arr[key].warehouseLedgerDetails[k].categoryLevelId = id;
           }
         }
         return arr;

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

@@ -349,7 +349,7 @@
           ...this.formData,
           ledgerId: this.infoData.id,
           pageNum: 1,
-          size: 1
+          size: 15
         });
         console.log(res);
         this.tableData = res.data.list;

+ 52 - 10
src/views/warehouseManagement/outgoingManagement/index.vue

@@ -26,7 +26,7 @@
               ></el-input> </el-form-item
           ></el-col>
           <el-col :span="4">
-            <el-form-item label="经手人" prop="fromUser">
+            <el-form-item label="领料人" prop="fromUser">
               <el-input
                 size="small"
                 class="w100"
@@ -107,11 +107,10 @@
           <p class="col">出库:{{ row.createTime }}</p>
         </template>
         <!-- 单号链接 -->
-        <template v-slot:bizNo="{ row }">
+        <template v-slot:bizNum="{ row }">
           <el-link @click="details(row)">
-            {{ row.bizNo }}
+            {{ row.bizNum }}
           </el-link>
-          <p class="col">{{ row.createTime }}</p>
         </template>
 
         <!-- 操作列 -->
@@ -167,10 +166,52 @@
           },
 
           {
-            prop: 'bizNo',
+            prop: 'bizNum',
             label: '单号',
             align: 'center',
-            slot: 'bizNo',
+            slot: 'bizNum',
+            showOverflowTooltip: true,
+            width: 140
+          },
+          {
+            prop: 'assetCode',
+            label: '编码',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'assetName',
+            label: '名称',
+            align: 'center'
+          },
+          {
+            prop: '',
+            label: '牌号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: '',
+            label: '型号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: '',
+            label: '数量',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: '',
+            label: '计量单位',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: '',
+            label: '重量单位',
+            align: 'center',
             showOverflowTooltip: true
           },
           {
@@ -192,18 +233,19 @@
             label: '领料人',
             align: 'center',
             slot: 'deliveryName',
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            width: 200
           },
           {
-            prop: 'extInfo.createUserName',
-            label: '登记人',
+            prop: '',
+            label: '领料时间',
             align: 'center',
             showOverflowTooltip: true
           },
           {
             columnKey: 'action',
             label: '操作',
-            width: 230,
+            width: 100,
             align: 'center',
             slot: 'action',
             showOverflowTooltip: true

+ 114 - 82
src/views/warehouseManagement/stockLedger/batchDetails.vue

@@ -1,19 +1,24 @@
 <template>
   <div class="page">
-<!--    <div class="page-title">
+    <!--    <div class="page-title">
       <PageHeader :title="`批次号${baseInfo.batchNum || ''}`"></PageHeader>
     </div> -->
     <div class="content-detail">
       <el-tabs v-model="activeName">
         <el-tab-pane label="基本信息" name="zero">
-          <BaseInfo :baseInfo="baseInfo"></BaseInfo>
+          <BaseInfo :baseInfo="baseInfo" ref="baseInfoRef"></BaseInfo>
+          <warehouseConfigVue ref="warehouseConfigRef"></warehouseConfigVue>
         </el-tab-pane>
         <el-tab-pane label="库存明细" name="first">
           <WarehouseDetail
             :baseInfo="baseInfo"
             :baseParams="baseParams"
+            :stockList="stockList"
           ></WarehouseDetail>
         </el-tab-pane>
+        <el-tab-pane label="批次明细" name="pcmx">
+          <BatchDetail></BatchDetail>
+        </el-tab-pane>
         <el-tab-pane label="入库单" name="second" lazy>
           <InWarehouse :baseInfo="baseInfo" :baseParams="baseParams"
         /></el-tab-pane>
@@ -42,97 +47,124 @@
 </template>
 
 <script>
-import BaseInfo from './components/details/BaseInfo.vue'
-import OutWarehouse from './components/details/OutWarehouse.vue'
-import InWarehouse from './components/details/InWarehouse.vue'
-import ReportLoss from './components/details/ReportLoss.vue'
-import InventoryAllocation from './components/details/InventoryAllocation.vue'
-import WarehouseDetail from './components/details/WarehouseDetail.vue'
-import BatchDetail from './components/details/BatchDetail.vue'
-
-// import PageHeader from '@/components/PageHeader'
-import BatchDetailDialog from './components/BatchDetailDialog.vue'
+  import BaseInfo from './components/details/BaseInfo.vue';
+  import OutWarehouse from './components/details/OutWarehouse.vue';
+  import InWarehouse from './components/details/InWarehouse.vue';
+  import ReportLoss from './components/details/ReportLoss.vue';
+  import InventoryAllocation from './components/details/InventoryAllocation.vue';
+  import WarehouseDetail from './components/details/WarehouseDetail.vue';
+  import BatchDetail from './components/details/BatchDetail.vue';
+  import warehouseConfigVue from './components/details/warehouseConfig.vue';
 
-export default {
-  components: {
-    // PageHeader,
-    BaseInfo,
-    BatchDetailDialog,
-    InWarehouse,
-    OutWarehouse,
-    InventoryAllocation,
-    ReportLoss,
-    BatchDetail,
-    WarehouseDetail
-  },
-  data () {
-    return {
-      activeName: 'zero',
-      tableData: {
-        first: [],
-        second: [],
-        third: [],
-        fourth: [],
-        fifth: []
-      },
-      certificate: ''
-    }
-  },
-  computed: {
-    dimension () {
-      return this.$route.query.dimension
+  // import PageHeader from '@/components/PageHeader'
+  import BatchDetailDialog from './components/BatchDetailDialog.vue';
+  import {
+    getCateInfo,
+    getDetails,
+    ledgerdetailPage,
+    ledgerPage
+  } from '@/api/classifyManage/itemInformation';
+  export default {
+    components: {
+      // PageHeader,
+      BaseInfo,
+      BatchDetailDialog,
+      InWarehouse,
+      OutWarehouse,
+      InventoryAllocation,
+      ReportLoss,
+      BatchDetail,
+      WarehouseDetail,
+      warehouseConfigVue
     },
-    baseInfo () {
-      return (
-			{}
+    data() {
+      return {
+        activeName: 'zero',
+        tableData: {
+          first: [],
+          second: [],
+          third: [],
+          fourth: [],
+          fifth: []
+        },
+        certificate: '',
+        stockList: []
+      };
+    },
+    computed: {
+      dimension() {
+        return this.$route.query.dimension;
+      },
+      baseInfo() {
+        return {};
         // this.$store.state.stockManagement.stockLedgerBaseInfo[
         //   this.$route.query.key
         // ] || {}
-      )
+      },
+      tableColumn() {
+        return this.tableColumnConfig[this.activeName] || [];
+      },
+      baseParams() {
+        return {
+          inventoryCode: this.baseInfo.assetCode,
+          // // name: this.baseInfo.assetName,
+          // // warehousingType: _warehousingType(this.baseInfo.assetType)
+          // //   .warehousingType,
+          batchNum: this.baseInfo.batchNum
+        };
+      }
     },
-    tableColumn () {
-      return this.tableColumnConfig[this.activeName] || []
+    created() {
+      this.getDetailInfo(this.$route.query);
     },
-    baseParams () {
-      return {
-        inventoryCode: this.baseInfo.assetCode,
-        // // name: this.baseInfo.assetName,
-        // // warehousingType: _warehousingType(this.baseInfo.assetType)
-        // //   .warehousingType,
-        batchNum: this.baseInfo.batchNum
+    methods: {
+      async getDetailInfo(row) {
+        const res = await getDetails(row.assetId);
+        this.$nextTick(() => {
+          console.log(res);
+          this.$refs.baseInfoRef.getDetailInfoAugr(res.category);
+          this.$refs.warehouseConfigRef.getDetailInfoAugr(res.categoryWms);
+        });
+        const rep = await ledgerdetailPage({
+          pageNum: 1,
+          size: -1,
+          ledgerId: row.id
+        });
+        this.stockList = rep.list;
+        // const ledger = await ledgerPage({
+        //   pageNum: 1,
+        //   size: -1,
+        //   inLedgerId: row.id
+        // });
+      },
+      handleCellClick(row) {
+        this.$refs.batchDetailRef.open(this.activeName, {
+          ...row,
+          batchNum: this.baseInfo.batchNum
+        });
       }
     }
-  },
-  created () {},
-  methods: {
-    handleCellClick (row) {
-      this.$refs.batchDetailRef.open(this.activeName, {
-        ...row,
-        batchNum: this.baseInfo.batchNum
-      })
-    }
-  }
-}
+  };
 </script>
 
 <style lang="scss" scoped>
-.page {
-  background: #fff;
-  padding: 10px;
-  margin: 10px 0 10px 0;
-  height: calc(100vh - 80px);
-  padding: 10px;
-  overflow-y: auto;
-}
-.page-title {
-}
-.content-detail {
-  padding: 20px;
-}
+  .page {
+    background: #fff;
+    padding: 10px;
+    margin: 10px 0 10px 0;
+    height: calc(100vh - 80px);
+    padding: 10px;
+    overflow-y: auto;
+  }
+  .page-title {
+  }
+  .content-detail {
+    padding: 20px;
+  }
 
-.certificate {
-  height: 65vh;
-  display: block;
-  margin: 10px auto;
-}
+  .certificate {
+    height: 65vh;
+    display: block;
+    margin: 10px auto;
+  }
 </style>

+ 135 - 372
src/views/warehouseManagement/stockLedger/components/details/BaseInfo.vue

@@ -1,389 +1,152 @@
 <template>
-  <div class="detail-box">
-    <el-descriptions title="" :column="5" size="medium" border>
-      <el-descriptions-item label="类型标识">
-        {{ baseInfo.classificationCode }}
-      </el-descriptions-item>
-      <el-descriptions-item label="物品类型">
-        {{ getDictValue('类型用途', baseInfo.assetType) }}
-      </el-descriptions-item>
-      <el-descriptions-item label="物品编码">
-        {{ baseInfo.assetCode }}
-      </el-descriptions-item>
-      <el-descriptions-item label="物品名称">
-        {{ baseInfo.assetName }}
-      </el-descriptions-item>
-      <el-descriptions-item label="允许拆包">
-        {{ baseInfo.isUnpack ? '是' : '否' }}
-      </el-descriptions-item>
-
-      <el-descriptions-item
-        :label="item.label"
-        v-for="(item, index) in uniqueData"
-        :key="index"
-      >
-        <template v-if="item.formatter">{{
-          item.formatter(baseInfo)
-        }}</template>
-        <template v-else>{{ baseInfo[item.prop] }}</template>
-      </el-descriptions-item>
-
-      <el-descriptions-item label="分类">
-        {{ baseInfo.classificationUrl }}
-      </el-descriptions-item>
-      <el-descriptions-item label="计量单位">
-        {{ baseInfo.unit }}
-      </el-descriptions-item>
-      <el-descriptions-item label="安全库存">
-        {{ baseInfo.safeStock }}
-      </el-descriptions-item>
-      <el-descriptions-item label="实时库存">
-        {{ baseInfo.realInventoryNum }}
-      </el-descriptions-item>
-      <el-descriptions-item label="锁单数量">
-        <!-- {{ baseInfo.assetType }} -->
-      </el-descriptions-item>
-      <el-descriptions-item label="空闲数量">
-        <!-- {{ baseInfo.assetType }} -->
-      </el-descriptions-item>
-      <!-- <el-descriptions-item label="允许转资产">
-        {{ baseInfo.assetType }}
-      </el-descriptions-item> -->
-      <el-descriptions-item label="包装单位">
-        {{ baseInfo.minPackUnit }}
-      </el-descriptions-item>
-      <!-- <el-descriptions-item label="包装数量">
-        {{ baseInfo.outInNum }}{{ baseInfo.minPackUnit }}
-      </el-descriptions-item> -->
-      <el-descriptions-item label="保质期">
-        <template
-          v-if="baseInfo.expirationDate || baseInfo.expirationDate === 0"
-        >
-          {{ baseInfo.expirationDate
-          }}{{ dateDict[baseInfo.expirationDateUnit] }}
-        </template>
-      </el-descriptions-item>
-      <el-descriptions-item label="库存累计重量" v-if="baseInfo.assetType == 4">
-      </el-descriptions-item>
-      <el-descriptions-item
-        :label="item.key"
-        v-for="(item, index) in selfDefinedParameter"
-        :key="index"
-      >
-        {{ item.value }}
-      </el-descriptions-item>
-      <el-descriptions-item label="描述" :span="5">
-        {{ baseInfo.description }}
+  <!-- 基本信息 -->
+  <div class="baseinfo-container" style="padding: 0">
+    <HeaderTitle
+      title="基本信息"
+      size="16px"
+      style="margin-top: 20px"
+    ></HeaderTitle>
+    <el-descriptions title="" :column="4" size="medium" border>
+      <el-descriptions-item>
+        <template slot="label"> 分类 </template>
+        {{ idata.categoryLevelName }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 编码 </template>
+        {{ idata.code }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 名称 </template>
+        {{ idata.name }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 牌号</template>
+        {{ idata.brandNum }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 型号 </template>
+        {{ idata.modelType }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 规格 </template>
+        {{ idata.specification }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 计量单位 </template>
+        {{ idata.measuringUnit }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 重量单位 </template>
+        {{ idata.weightUnit }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 包装单位 </template>
+        {{ idata.packingUnit }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 体积 </template>
+        {{ idata.volume ? idata.volume + '/' : null }}{{ idata.volumeUnit }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 毛重 </template>
+        {{ idata.roughWeight }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">净重 </template>
+        {{ idata.netWeight }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">所属部门 </template>
+        {{ idata.groupName }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">负责人 </template>
+        {{ idata.name }}
       </el-descriptions-item>
     </el-descriptions>
-    <!-- 模具、物料 -->
-    <template v-if="[6, 3].includes(baseInfo.assetType)">
-      <div class="basic-details-title border-none">
-        <span class="border-span">匹配产品</span>
-      </div>
-      <el-descriptions title="" :column="5" size="medium" border>
-        <el-descriptions-item
-          v-for="(item, index) in productData"
-          :key="index"
-          :label="item.informationCode"
-        >
-          {{ item.informationName }}
-        </el-descriptions-item>
-      </el-descriptions>
-    </template>
-    <!-- 生产设备、产品 -->
-    <template v-if="[1, 4].includes(baseInfo.assetType)">
-      <div class="basic-details-title border-none">
-        <span class="border-span">匹配模具</span>
-      </div>
-      <el-descriptions title="" :column="5" size="medium" border>
-        <el-descriptions-item
-          v-for="(item, index) in mouldData"
-          :key="index"
-          :label="item.informationCode"
-        >
-          {{ item.informationName }}
-        </el-descriptions-item>
-      </el-descriptions>
-    </template>
-    <!-- 生产设备 -->
-    <!-- <template v-if="[1].includes(baseInfo.assetType)"> -->
-	<template>
-      <!-- <div class="basic-details-title border-none">
-        <span class="border-span">匹配备品备件</span>
-      </div> -->
-	  <HeaderTitle title="匹配备品备件" size="16px"></HeaderTitle>
-      <el-descriptions title="" :column="5" size="medium" border>
-        <el-descriptions-item
-          v-for="(item, index) in partData"
-          :key="index"
-          :label="item.informationCode"
-        >
-          {{ item.informationName }}
-        </el-descriptions-item>
-      </el-descriptions>
-    </template>
-    <!-- 模具、备品备件 -->
-    <!-- <template v-if="[6, 7].includes(baseInfo.assetType)"> -->
-	<template>
-      <!-- <div class="basic-details-title border-none">
-        <span class="border-span">匹配设备</span>
-      </div> -->
-	  <HeaderTitle title="匹配设备" size="16px"></HeaderTitle>
-      <el-descriptions title="" :column="5" size="medium" border>
-        <el-descriptions-item
-          v-for="(item, index) in facilityData"
-          :key="index"
-          :label="item.informationCode"
-        >
-          {{ item.informationName }}
-        </el-descriptions-item>
-      </el-descriptions>
-    </template>
   </div>
 </template>
-
 <script>
-import { mapGetters, mapActions } from 'vuex'
-// import { getDetails as getMatchData } from '@/api/stockManagement/itemInformation'
-export default {
-  data () {
-    return {
-      productData: [],
-      mouldData: [],
-      partData: [],
-      bomData: [],
-      facilityData: [],
-      dateDict: {
-        minute: '分钟',
-        hour: '小时',
-        day: '天',
-        month: '月',
-        year: '年'
-      }
-    }
-  },
-  props: {
-    baseInfo: {
-      type: Object,
-      default: () => ({})
-    }
-  },
-  computed: {
-    ...mapGetters(['getDictValue']),
-    selfDefinedParameter () {
-			[]
-      // return JSON.parse(this.baseInfo.selfDefinedParameter) || []
+  import { getUserPage } from '@/api/system/organization';
+  export default {
+    data() {
+      return {
+        depInfo: {},
+        idata: {}
+      };
     },
-    uniqueData () {
-      switch (+this.baseInfo.assetType) {
-        case 3: //物料
-          return [{ label: '牌号', prop: 'brandNum' }]
-        case 8: //耗材
-          return [
-            { label: '型号', prop: 'modelType' },
-            { label: '规格', prop: 'specification' }
-          ]
-        case 4: //产品
-          return [
-            { label: '牌号', prop: 'brandNum' },
-            { label: '型号', prop: 'modelType' },
-            {
-              label: '标准单重',
-              prop: 'modelType',
-              formatter (row) {
-                if (!row?.extendField) return ''
-                const extendField = JSON.parse(row.extendField)
-                return `${extendField.unqualifiedRate || '-'}KG`
-              }
-            },
-            {
-              label: '不良品率',
-              prop: 'modelType',
-              formatter (row) {
-                if (!row?.extendField) return ''
-                const extendField = JSON.parse(row.extendField)
-                return `${extendField.unqualifiedRate || '-'}%`
-              }
-            }
-          ]
-        case 5: //'周转车'
-          return [
-            { label: '规格', prop: 'specification' },
-            {
-              label: '材质',
-              prop: 'texture',
-              formatter (row) {
-                if (!row?.extendField) return ''
-                const extendField = JSON.parse(row.extendField)
-                return extendField.texture
-              }
-            },
-            {
-              label: '长宽高',
-              prop: '',
-              formatter (row) {
-                if (!row?.extendField) return ''
-                const extendField = JSON.parse(row.extendField)
-                return `${extendField.length || '-'}/${
-                  extendField.width || '-'
-                }/${extendField.high || '-'}`
-              }
-            }
-          ]
-        case 2: //'舟皿'
-          return [
-            { label: '规格', prop: 'specification' },
-            { label: '型号', prop: 'modelType' },
-            {
-              label: '角度',
-              prop: '',
-              formatter (row) {
-                if (!row?.extendField) return ''
-                const extendField = JSON.parse(row.extendField)
-
-                return { notA: '非A', A: 'A' }[extendField.angle]
-              }
-            },
-            {
-              label: '长宽高',
-              prop: '',
-              formatter (row) {
-                if (!row?.extendField) return ''
-                const extendField = JSON.parse(row.extendField)
-                return `${extendField.length || '-'}*${
-                  extendField.width || '-'
-                }*${extendField.high || '-'}`
-              }
-            }
-          ]
-        case 1: //'设备'
-          return [
-            { label: '型号', prop: 'modelType' },
-            { label: '规格', prop: 'specification' }
-          ]
-        case 6: //'模具'
-          return [
-            { label: '牌号', prop: 'brandNum' },
-            { label: '型号', prop: 'modelType' },
-            {
-              label: '大模体型号',
-              prop: '',
-              formatter (row) {
-                if (!row?.extendField) return ''
-                const extendField = JSON.parse(row.extendField)
-                return extendField.dieBodyModel
-              }
-            },
-            {
-              label: '最大冲压次数',
-              prop: '',
-              formatter (row) {
-                if (!row?.extendField) return ''
-                const extendField = JSON.parse(row.extendField)
-                return extendField.maximumStampingTimes
-              }
-            },
-            {
-              label: '收缩系数',
-              prop: '',
-              formatter (row) {
-                if (!row?.extendField) return ''
-                const extendField = JSON.parse(row.extendField)
-                return extendField.shrinkageCoefficient
-              }
-            },
-            {
-              label: '芯杆数量',
-              prop: '',
-              formatter (row) {
-                if (!row?.extendField) return ''
-                const extendField = JSON.parse(row.extendField)
-                return extendField.mandrelNum
-              }
-            },
-            {
-              label: '模孔数量',
-              prop: '',
-              formatter (row) {
-                if (!row?.extendField) return ''
-                const extendField = JSON.parse(row.extendField)
-                return extendField.dieHoleNum
-              }
-            },
-            {
-              label: '上冲头数量',
-              prop: '',
-              formatter (row) {
-                if (!row?.extendField) return ''
-                const extendField = JSON.parse(row.extendField)
-                return extendField.upperPunchNum
-              }
-            },
-            {
-              label: '下冲头数量',
-              prop: '',
-              formatter (row) {
-                if (!row?.extendField) return ''
-                const extendField = JSON.parse(row.extendField)
-                return extendField.lowerPunchNum
-              }
-            }
-          ]
-        case 7: //'备品备件'
-          return [
-            { label: '规格', prop: 'specification' },
-            { label: '型号', prop: 'modelType' }
-          ]
+    methods: {
+      async getDetailInfoAugr(data) {
+        const dep = await this.getDepUser(data.deptLeaderId, data.deptId);
+        this.idata = { ...data, groupName: dep.groupName, name: dep.name };
+      },
+      async getDepUser(id, depId) {
+        const res = await getUserPage({
+          pageNum: 1,
+          size: -1,
+          executeGroupId: id
+        });
+        const list = res.list;
+        for (const key in list) {
+          if (list[key].id == depId) {
+            return list[key];
+          } else {
+            return {};
+          }
+        }
       }
+    }
+  };
+</script>
 
-      return []
+<style lang="scss" scoped>
+  .baseinfo-container {
+    background-color: #fff;
+    padding: 0px 20px 20px;
+    .content {
+      padding: 0 20px;
+    }
+    .basic-details-title {
+      font-size: 16px;
+      margin: 15px 0;
     }
-  },
-  created () {
-    // this.requestDict('类型用途')
-    // this._getMatchData()
-  },
-  methods: {
-    ...mapActions('dict', ['requestDict']),
-    async _getMatchData () {
-      const res = await getMatchData({ id: this.baseInfo.materialId })
-      if (res?.success) {
-        for (const key in res.data.informationRelationMap) {
-          this.matchList(key, res.data.informationRelationMap)
+    .upload-container {
+      display: flex;
+      .img-box {
+        width: 280px;
+        height: 342px;
+        border: 1px solid rgba(215, 215, 215, 1);
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        img {
+          max-width: 100%;
         }
       }
-    },
-    matchList (key, data) {
-      switch (key) {
-        case 'w01': {
-          this.facilityData = data[key]
-          break
-        }
-        case 'w04': {
-          this.mouldData = data[key]
-          break
+      .file-list {
+        margin-left: 50px;
+        flex: 1;
+        display: flex;
+        justify-content: space-between;
+        flex-wrap: wrap;
+        justify-items: baseline;
+        align-content: flex-start;
+        .file-box {
+          width: 30%;
+          margin-bottom: 20px;
+          height: 57px;
+          text-align: center;
+          line-height: 55px;
+          border: 1px solid #1890ff;
+          color: #1890ff;
+          cursor: pointer;
+          &.disabled {
+            cursor: not-allowed;
+            border-color: rgba(215, 215, 215, 1);
+            color: rgba(215, 215, 215, 1);
+          }
         }
-        case 'w05': {
-          this.partData = data[key]
-          break
-        }
-        case 'w07': {
-          this.productData = data[key]
-          break
-        }
-        default:
-          break
       }
     }
   }
-}
-</script>
-<style lang="scss" scoped>
-.detail-box{
-	margin: 0 auto;
-	.el-descriptions{
-		margin: 20px 0;
-	}
-}
 </style>

+ 131 - 162
src/views/warehouseManagement/stockLedger/components/details/BatchDetail.vue

@@ -1,47 +1,6 @@
 <!-- 批次明细 -->
 <template>
   <div class="detail-box">
-    <el-form label-width="70px">
-      <el-row>
-        <el-col :span="6">
-          <el-form-item label="批次号">
-            <el-input
-              v-model="searchForm.batchNum"
-              placeholder="请输入"
-              size="small"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="6" style="text-align: right">
-          <el-button
-            @click="search"
-            type="primary"
-            icon="el-icon-search"
-            size="small"
-            >搜索</el-button
-          >
-          <el-button @click="reset" icon="el-icon-refresh-left" size="small"
-            >重置</el-button
-          >
-        </el-col>
-        <el-col
-          :span="12"
-          style="
-            display: flex;
-            align-items: flex-end;
-            justify-content: flex-end;
-          "
-        >
-          <el-checkbox
-            v-model="searchForm.isZero"
-            true-label="true"
-            false-label="false"
-            @change="search"
-            >显示0库存批次号</el-checkbox
-          >
-        </el-col>
-      </el-row>
-    </el-form>
     <el-table
       :data="tableData"
       :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
@@ -69,26 +28,29 @@
               }"
               v-loading="row.loading"
             >
+              <el-table-column width="80px" label="序号">
+                <template slot-scope="{ $index }">
+                  {{ $tableIndex($index, page, size) }}
+                </template>
+              </el-table-column>
               <el-table-column label="入库单号" prop="bizNum"></el-table-column>
               <el-table-column label="入库场景" prop="bizScene">
                 <template slot-scope="{ row }">
                   {{ getSceneState(+row.bizScene) }}
                 </template>
               </el-table-column>
+              <el-table-column label="数量" prop=""></el-table-column>
               <el-table-column
-                label="入库数量"
-                prop="outInNum"
-              ></el-table-column>
-              <el-table-column label="计量单位" prop="unit"></el-table-column>
-              <el-table-column
-                label="包装数量"
-                prop="measurementUnit"
+                label="包装单位"
+                width="120"
+                prop="minPackUnit"
               ></el-table-column>
               <el-table-column
-                label="包装单位"
+                label="最小包装单位"
                 width="120"
                 prop="minPackUnit"
               ></el-table-column>
+
               <el-table-column
                 label="库位"
                 prop=""
@@ -105,6 +67,11 @@
                 label="入库时间"
                 prop="createTime"
               ></el-table-column>
+              <el-table-column
+                label="入库人"
+                prop="createTime"
+              ></el-table-column>
+              <el-table-column label="条码" prop=""></el-table-column>
             </el-table>
             <el-link
               type="primary"
@@ -119,12 +86,14 @@
         label="库存数量"
         prop="realInventoryNum"
       ></el-table-column>
+      <el-table-column label="库存数量" prop=""></el-table-column>
       <el-table-column label="计量单位" prop="unit"></el-table-column>
+      <el-table-column label="重量单位" prop="unit"></el-table-column>
       <el-table-column
         label="包装数量"
         prop="measurementUnit"
       ></el-table-column>
-      <el-table-column label="包装单位" prop="minPackUnit"></el-table-column>
+      <el-table-column label="最小包装单元" prop=""></el-table-column>
       <el-table-column label="首次入库时间" prop="firstTime"></el-table-column>
       <el-table-column label="最近出库时间" prop="lastTime"></el-table-column>
       <el-table-column label="质检单" prop="" v-if="baseInfo.assetType === 3">
@@ -150,126 +119,126 @@
   </div>
 </template>
 <script>
-import Pagination from '@/components/Pagination'
-// import { sceneState } from '@/utils/dict/index'
-// import { useDictLabel } from '@/utils/dict/index'
-// import {
-//   inWarehouseSceneDetail,
-//   getAnalysisCertificate,
-//   getDetail
-// } from '@/api/stockManagement/stockLedger'
-// import { imageView } from '@/utils/index'
-export default {
-  components: { Pagination },
-  props: {
-    baseInfo: {
-      type: Object,
-      default: () => ({})
+  import Pagination from '@/components/Pagination';
+  // import { sceneState } from '@/utils/dict/index'
+  // import { useDictLabel } from '@/utils/dict/index'
+  // import {
+  //   inWarehouseSceneDetail,
+  //   getAnalysisCertificate,
+  //   getDetail
+  // } from '@/api/stockManagement/stockLedger'
+  // import { imageView } from '@/utils/index'
+  export default {
+    components: { Pagination },
+    props: {
+      baseInfo: {
+        type: Object,
+        default: () => ({})
+      },
+      baseParams: {
+        type: Object,
+        default: () => ({})
+      }
     },
-    baseParams: {
-      type: Object,
-      default: () => ({})
-    }
-  },
-  data () {
-    return {
-      searchForm: { batchNum: '', isZero: '' },
-      tableData: [],
-      size: 15,
-      page: 1,
-      total: 0,
-      certificateVisible: false,
-      certificate: ''
-    }
-  },
-  created () {
-    // this.getList()
-  },
-  methods: {
-    // getSceneState: useDictLabel(sceneState),
-    //质检单  资产类型、资产编码以及批次号获取质检单
-    async _getAnalysisCertificate (row) {
-      if (row.certificate) {
-        this.certificate = row.certificate
-        this.certificateVisible = true
+    data() {
+      return {
+        searchForm: { batchNum: '', isZero: '' },
+        tableData: [],
+        size: 15,
+        page: 1,
+        total: 0,
+        certificateVisible: false,
+        certificate: ''
+      };
+    },
+    created() {
+      // this.getList()
+    },
+    methods: {
+      // getSceneState: useDictLabel(sceneState),
+      //质检单  资产类型、资产编码以及批次号获取质检单
+      async _getAnalysisCertificate(row) {
+        if (row.certificate) {
+          this.certificate = row.certificate;
+          this.certificateVisible = true;
 
-        return
-      }
-      const res = await getAnalysisCertificate({
-        code: this.baseInfo.assetType,
-        ...this.baseParams,
-        batchNum: row.batchNum
-      })
-      if (res?.success) {
-        if (res.data?.length) {
-          imageView(res.data[0]).then(res => {
-            this.certificate = res
-            this.$set(row, 'certificate', res)
-            this.certificateVisible = true
-          })
-        } else {
-          this.$message.error('未上传质检单!')
+          return;
         }
-      }
-    },
-    // 批次入库详情
-    async handleExpand (row) {
-      if (!row.children?.length) {
-        this.$set(row, 'loading', true)
-        const res = await inWarehouseSceneDetail({
+        const res = await getAnalysisCertificate({
+          code: this.baseInfo.assetType,
           ...this.baseParams,
-          bizStatus: 1,
           batchNum: row.batchNum
-        })
+        });
         if (res?.success) {
-          this.$set(
-            row,
-            'children',
-            res.data.map((item, index) => ({
-              index: index + '' + Date.now(),
-              ...item
-            }))
-          )
+          if (res.data?.length) {
+            imageView(res.data[0]).then((res) => {
+              this.certificate = res;
+              this.$set(row, 'certificate', res);
+              this.certificateVisible = true;
+            });
+          } else {
+            this.$message.error('未上传质检单!');
+          }
+        }
+      },
+      // 批次入库详情
+      async handleExpand(row) {
+        if (!row.children?.length) {
+          this.$set(row, 'loading', true);
+          const res = await inWarehouseSceneDetail({
+            ...this.baseParams,
+            bizStatus: 1,
+            batchNum: row.batchNum
+          });
+          if (res?.success) {
+            this.$set(
+              row,
+              'children',
+              res.data.map((item, index) => ({
+                index: index + '' + Date.now(),
+                ...item
+              }))
+            );
+          }
+          this.$set(row, 'loading', false);
+        }
+      },
+      search() {
+        this.page = 1;
+        this.getList();
+      },
+      reset() {
+        this.searchForm = {};
+        this.search();
+      },
+      handlePageChange() {
+        this.getList();
+      },
+      async getList() {
+        const params = {
+          size: this.size,
+          page: this.page,
+          ...this.baseParams,
+          batchNum: this.baseParams.batchNum || this.searchForm.batchNum,
+          isZero: this.searchForm.isZero,
+          inventoryCode: this.baseInfo.assetCode,
+          name: this.baseInfo.assetName,
+          dimension: +this.$route.query.dimension
+        };
+        const res = await getDetail(params);
+        if (res?.success) {
+          this.tableData = (res.data.records || []).map((item, index) => ({
+            index: index + '' + Date.now(),
+            ...item
+          }));
+          this.total = res.data.total;
         }
-        this.$set(row, 'loading', false)
-      }
-    },
-    search () {
-      this.page = 1
-      this.getList()
-    },
-    reset () {
-      this.searchForm = {}
-      this.search()
-    },
-    handlePageChange () {
-      this.getList()
-    },
-    async getList () {
-      const params = {
-        size: this.size,
-        page: this.page,
-        ...this.baseParams,
-        batchNum: this.baseParams.batchNum || this.searchForm.batchNum,
-        isZero: this.searchForm.isZero,
-        inventoryCode: this.baseInfo.assetCode,
-        name: this.baseInfo.assetName,
-        dimension: +this.$route.query.dimension
-      }
-      const res = await getDetail(params)
-      if (res?.success) {
-        this.tableData = (res.data.records || []).map((item, index) => ({
-          index: index + '' + Date.now(),
-          ...item
-        }))
-        this.total = res.data.total
       }
     }
-  }
-}
+  };
 </script>
 <style lang="scss" scoped>
-.detail-box{
-	margin: 20px auto;
-}
-</style>
+  .detail-box {
+    margin: 20px auto;
+  }
+</style>

+ 18 - 164
src/views/warehouseManagement/stockLedger/components/details/WarehouseDetail.vue

@@ -1,184 +1,34 @@
 <!-- 库存明细 -->
 <template>
   <div class="detail-box">
-    <el-form label-width="90px">
-      <el-row>
-        <el-col :span="6">
-          <!-- :label="`${getDictValue('类型用途', baseInfo.assetType)}编码`" -->
-          <el-form-item label="物品编码" prop="onlyCode">
-            <el-input
-              v-model="searchForm.onlyCode"
-              placeholder="请输入"
-              size="small"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="6" v-if="dimension != 2">
-          <el-form-item label="批次号" prop="batchNum">
-            <el-input
-              v-model="searchForm.batchNum"
-              placeholder="请输入"
-              size="small"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="6">
-          <el-form-item label="入库单号" prop="bizNum">
-            <el-input
-              v-model="searchForm.bizNum"
-              placeholder="请输入"
-              size="small"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="6">
-          <el-form-item label="入库天数" prop="">
-            <el-col :span="11">
-              <el-input
-                v-model="searchForm.dayStart"
-                @blur="
-                  () => {
-                    if (!/^\d+(\.\d+)?$/.test(searchForm.dayStart)) {
-                      searchForm.dayStart = '';
-                    }
-                  }
-                "
-                placeholder="请输入"
-                size="small"
-              ></el-input
-            ></el-col>
-            <el-col :span="2" style="text-align: center">~</el-col>
-            <el-col :span="11">
-              <el-input
-                v-model="searchForm.dayEnd"
-                @blur="
-                  () => {
-                    if (!/^\d+(\.\d+)?$/.test(searchForm.dayEnd)) {
-                      searchForm.dayEnd = '';
-                    }
-                  }
-                "
-                placeholder="请输入"
-                size="small"
-              ></el-input
-            ></el-col>
-          </el-form-item>
-        </el-col>
-        <el-col :span="6">
-          <el-form-item label="单价" prop="univalence">
-            <el-col :span="11">
-              <el-input
-                v-model="searchForm.univalenceStart"
-                @blur="
-                  () => {
-                    if (!/^\d+(\.\d+)?$/.test(searchForm.univalenceStart)) {
-                      searchForm.univalenceStart = '';
-                    }
-                  }
-                "
-                placeholder="请输入"
-                size="small"
-              ></el-input
-            ></el-col>
-            <el-col :span="2" style="text-align: center">~</el-col>
-            <el-col :span="11">
-              <el-input
-                v-model="searchForm.univalenceEnd"
-                @blur="
-                  () => {
-                    if (!/^\d+(\.\d+)?$/.test(searchForm.univalenceEnd)) {
-                      searchForm.univalenceEnd = '';
-                    }
-                  }
-                "
-                placeholder="请输入"
-                size="small"
-              ></el-input
-            ></el-col>
-          </el-form-item>
-        </el-col>
-        <el-col :span="dimension == 1 ? 6 : 24" style="text-align: right">
-          <el-form-item label="">
-            <el-button
-              @click="search"
-              type="primary"
-              icon="el-icon-search"
-              size="small"
-              >搜索</el-button
-            >
-            <el-button @click="reset" icon="el-icon-refresh-left" size="small"
-              >重置</el-button
-            >
-          </el-form-item>
-        </el-col>
-      </el-row>
-    </el-form>
     <el-table
-      :data="tableData"
+      :data="stockList"
       :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
-      ><el-table-column width="80px" label="序号">
-        <template slot-scope="{ $index }">
-          {{ $tableIndex($index, page, size) }}
-        </template>
+      ><el-table-column width="80px" label="序号" type="index">
       </el-table-column>
       <!-- <el-table-column
         :label="`${getDictValue('类型用途', baseInfo.assetType)}编码`"
         prop="onlyCode"
         width="200px"
       ></el-table-column> -->
-      <el-table-column label="包装编码" prop="num"></el-table-column>
-      <el-table-column
-        label="最小包装单元"
-        width="150"
-        align="center"
-        prop=""
-        v-if="!baseInfo.isUnpack"
-      >
-        <template slot-scope="{ row }">
-          {{ row.measurementUnit }}{{ row.unit }} /{{ row.minPackUnit }}
-        </template>
-      </el-table-column>
-      <el-table-column
-        label="批次号"
-        prop="batchNum"
-        v-if="dimension != 2"
-      ></el-table-column>
-      <el-table-column label="单价" prop="">
+      <el-table-column label="批次号" prop="batchNum"></el-table-column>
+      <el-table-column label="编码" prop="assetCode"></el-table-column>
+      <el-table-column label="名称" prop="assetName"></el-table-column>
+      <el-table-column label="牌号" prop="brandNum"></el-table-column>
+      <el-table-column label="型号" prop="modelType"></el-table-column>
+      <el-table-column label="规格" prop=""></el-table-column>
+      <el-table-column label="最小包装单元"> </el-table-column>
+      <el-table-column label="数量" prop=""></el-table-column>
+      <el-table-column label="单价" prop="univalence">
         <template slot-scope="{ row }">
           <template v-if="row.univalence || row.univalence === 0">
             {{ row.univalence }} {{ priceList[row.univalenceUnit] }}
           </template>
         </template></el-table-column
       >
-      <el-table-column label="生产日期" prop="" width="200px">
-        <template slot-scope="{ row }">
-          {{ row.manufactureTime }}
-        </template>
-      </el-table-column>
-      <el-table-column label="采购日期" prop="" width="200px">
-        <template slot-scope="{ row }">
-          {{ row.procurementTime }}
-        </template>
-      </el-table-column>
-      <el-table-column
-        label="过期日期"
-        prop="expirationTime"
-        width="200px"
-      ></el-table-column>
-      <el-table-column label="入库单号" prop="bizNum"></el-table-column>
-      <el-table-column
-        label="入库时间"
-        prop="createTime"
-        width="200px"
-      ></el-table-column>
-      <el-table-column label="入库天数" prop="day"></el-table-column>
-      <el-table-column label="货位" prop="" show-overflow-tooltip>
-        <template slot-scope="{ row }">
-          {{
-            `${row.warehouseName}-${row.areaName}-${row.shelfCode}-${row.cargoSpaceCode}`
-          }}
-        </template>
-      </el-table-column>
+      <el-table-column label="质保期" prop="expirationDate"></el-table-column>
+      <el-table-column label="入库人" prop=""></el-table-column>
+      <el-table-column label="入库时间" prop="createTime"></el-table-column>
     </el-table>
     <Pagination
       :total="total"
@@ -204,6 +54,10 @@
       baseParams: {
         type: Object,
         default: () => ({})
+      },
+      stockList: {
+        type: Array,
+        default: () => []
       }
     },
     data() {

+ 136 - 0
src/views/warehouseManagement/stockLedger/components/details/warehouseConfig.vue

@@ -0,0 +1,136 @@
+<template>
+  <div>
+    <HeaderTitle
+      title="仓储配置"
+      size="16px"
+      style="margin-top: 20px"
+    ></HeaderTitle>
+    <el-descriptions title="" :column="4" size="medium" border>
+      <el-descriptions-item>
+        <template slot="label"> 启用库存预警</template>
+        {{ dictType[idata.isWarn] }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">允许拆包</template>
+        {{ dictType[idata.isUnpack] }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">安全库存</template>
+        {{ idata.secureInventory }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">最小库存</template>
+        {{ idata.minInventory }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 最大库存</template>
+        {{ idata.maxInventory }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">盘点模式</template>
+        {{ dictPd[idata.inventoryMode] }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">质保预警参考</template>
+        <!-- <DictSelection
+                dictName="质保预警参考"
+                clearable
+                v-model="idata.warrantyWarnRefer"
+              >
+              </DictSelection> -->
+        {{ idata.warrantyWarnRefer }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">保质期</template>
+        {{ idata.warrantyPeriod ? idata.warrantyPeriod + '/' : null
+        }}{{ idata.warrantyPeriodUnit }}
+      </el-descriptions-item>
+    </el-descriptions>
+  </div>
+</template>
+<script>
+  import { sysDict } from '@/utils/sys';
+  export default {
+    data() {
+      return {
+        dictType: {
+          1: '是',
+          0: '否'
+        },
+        dictPd: {
+          1: '逐个盘点',
+          2: '批量盘点'
+        },
+        depInfo: {},
+        idata: {}
+      };
+    },
+    methods: {
+      async getDetailInfoAugr(data) {
+        this.idata = {
+          ...data,
+          warrantyPeriodUnit: await sysDict(
+            '保质期单位',
+            data.warrantyPeriodUnit
+          ),
+          warrantyWarnRefer: await sysDict(
+            '质保预警参考',
+            data.warrantyWarnRefer
+          )
+        };
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .baseinfo-container {
+    background-color: #fff;
+    padding: 0px 20px 20px;
+    .content {
+      padding: 0 20px;
+    }
+    .basic-details-title {
+      font-size: 16px;
+      margin: 15px 0;
+    }
+    .upload-container {
+      display: flex;
+      .img-box {
+        width: 280px;
+        height: 342px;
+        border: 1px solid rgba(215, 215, 215, 1);
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        img {
+          max-width: 100%;
+        }
+      }
+      .file-list {
+        margin-left: 50px;
+        flex: 1;
+        display: flex;
+        justify-content: space-between;
+        flex-wrap: wrap;
+        justify-items: baseline;
+        align-content: flex-start;
+        .file-box {
+          width: 30%;
+          margin-bottom: 20px;
+          height: 57px;
+          text-align: center;
+          line-height: 55px;
+          border: 1px solid #1890ff;
+          color: #1890ff;
+          cursor: pointer;
+          &.disabled {
+            cursor: not-allowed;
+            border-color: rgba(215, 215, 215, 1);
+            color: rgba(215, 215, 215, 1);
+          }
+        }
+      }
+    }
+  }
+</style>

+ 88 - 55
src/views/warehouseManagement/stockLedger/components/item-list.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <!-- 数据表格 -->
-	<item-search @search="reload"> </item-search>
+    <item-search @search="reload" @handledime="handledime"> </item-search>
     <ele-pro-table
       ref="table"
       :initLoad="false"
@@ -13,8 +13,7 @@
       cache-key="systemOrgUserTable"
     >
       <!-- 表头工具栏 -->
-      <template v-slot:toolbar>
-      </template>
+      <template v-slot:toolbar> </template>
       <!-- 操作列 -->
       <template v-slot:action="{ row }">
         <el-link
@@ -37,7 +36,11 @@
   //   removePersonnel,
   //   unbindLoginName
   // } from '@/api/system/organization';
-  import { getList, removeItem } from '@/api/classifyManage/itemInformation';
+  import {
+    pageeLedgerMain,
+    removeItem,
+    getWarehouseList
+  } from '@/api/classifyManage/itemInformation';
 
   export default {
     components: { ItemSearch },
@@ -51,64 +54,77 @@
         default: () => ({})
       }
     },
-    data () {
+    data() {
       return {
-		  searchForm:{
-		  	dimension:2
-		  }
-	  };
+        searchForm: {
+          dimension: 2
+        },
+        isShow: false
+      };
     },
     computed: {
       // 表格列配置
-      columns () {
-        const privateColumn = [];
-        if (!['8', '1', '2', '5', '6', '7'].includes(this.current?.type)) {
-          // privateColumn.push({
-          //   prop: 'brandNum',
-          //   label: '牌号',
-          //   showOverflowTooltip: true
-          // });
-        }
-        return [
+      columns() {
+        let obj = [
           {
             columnKey: 'index',
             type: 'index',
             width: 50,
             align: 'center',
-			label: '序号',
+            label: '序号',
             showOverflowTooltip: true,
             fixed: 'left'
           },
-		   ...privateColumn,
+
           {
-            prop: 'code',
-            label: '物品编码',
+            prop: 'assetCode',
+            label: '编码',
             showOverflowTooltip: true
           },
           {
-            prop: 'name',
-            label: '物品名称',
+            prop: 'assetName',
+            label: '名称',
             showOverflowTooltip: true
           },
           {
-            prop: 'classificationCode',
-            label: '物品类型',
+            prop: 'brandNum',
+            label: '牌号',
             showOverflowTooltip: true
-          },        
+          },
+          {
+            prop: 'modelType',
+            label: '型号',
+            showOverflowTooltip: true
+          },
           {
-            prop: 'measuringUnit',
+            prop: 'realInventoryNum',
             label: '实时库存',
             sortable: 'custom',
             showOverflowTooltip: true
           },
           {
-            prop: 'packingUnit',
+            prop: 'measurementUnit',
             label: '计量单位',
             align: 'center'
           },
           {
-            prop: 'categoryLevelPath',
-            label: '分类',
+            prop: '',
+            label: '重量单位',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'minPackUnit',
+            label: '包装单位',
+            showOverflowTooltip: true
+          },
+          {
+            prop: '',
+            label: '安全库存',
+            showOverflowTooltip: true
+          },
+          {
+            prop: '',
+            label: '质保期',
             showOverflowTooltip: true
           },
           {
@@ -120,19 +136,30 @@
             slot: 'action'
           }
         ];
+        if (this.isShow) {
+          obj.splice(1, 0, {
+            prop: 'batchNum',
+            label: '批次号',
+            showOverflowTooltip: true
+          });
+        }
+        return obj;
       }
     },
     methods: {
+      handledime(val) {
+        this.$set(this, 'isShow', val == 2);
+      },
       /* 表格数据源 */
-      datasource ({ page, limit, where }) {
-        return getList({
+      datasource({ page, limit, where }) {
+        return pageeLedgerMain({
           ...where,
           pageNum: page,
           size: limit
         });
       },
       /* 刷新表格 */
-      reload (where) {
+      reload(where) {
         this.$nextTick(() => {
           this.$refs.table.reload({
             pageNum: 1,
@@ -143,30 +170,36 @@
           });
         });
       },
-      
-		details (row) {
-		  const key = Date.now()
-		  this.$store.commit('stockManagement/CLEAR_BASEINFO')
-		  this.$store.commit('stockManagement/CHANGE_BASEINFO', { key, value: row })
-		
-		  const url =
-			this.searchForm.dimension === 1
-			  ? '/warehouseManagement/stockLedger/allBatchDetails'
-			  : '/warehouseManagement/stockLedger/batchDetails'
-		
-		  this.$router.push({
-			path:url,
-			query: {
-			  key,
-			  dimension: this.searchForm.dimension
-			}
-		  })
-		},
+
+      details(row) {
+        const key = Date.now();
+        this.$store.commit('stockManagement/CLEAR_BASEINFO');
+        this.$store.commit('stockManagement/CHANGE_BASEINFO', {
+          key,
+          value: row
+        });
+
+        const url =
+          this.searchForm.dimension === 1
+            ? '/warehouseManagement/stockLedger/allBatchDetails'
+            : '/warehouseManagement/stockLedger/batchDetails';
+
+        this.$router.push({
+          path: url,
+          query: {
+            key,
+            dimension: this.searchForm.dimension,
+            id: row.id,
+            assetId: row.assetId
+          }
+        });
+      }
     },
+
     watch: {
       // 监听机构id变化
       current: {
-        handler () {
+        handler() {
           this.reload();
         }
       }

+ 63 - 33
src/views/warehouseManagement/stockLedger/components/item-search.vue

@@ -7,38 +7,55 @@
     @submit.native.prevent
   >
     <el-row :gutter="15">
-		<el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-		  <el-form-item label="仓库:" prop="informationCode" label-width="60px">
-			<el-input
-			  clearable
-			  placeholder="请输入"
-			  v-model.trim="params.informationCode"
-			></el-input>
-		  </el-form-item>
-		</el-col>
-		<el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-		  <el-form-item label="列表维度:" prop="informationName">
-			<el-input
-			  clearable
-			  v-model="params.informationName"
-			  placeholder="请输入"
-			></el-input>
-		  </el-form-item>
-		</el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="物品编码:" prop="informationCode">
+        <el-form-item label="仓库:" prop="warehouseId" label-width="60px">
+          <template>
+            <el-select
+              clearable
+              style="width: 100%"
+              v-model="params.warehouseId"
+              placeholder="请选择"
+            >
+              <el-option
+                v-for="item in warehouseList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="列表维度:" prop="dimension">
+          <template>
+            <el-select
+              clearable
+              @change="$emit('handledime', $event)"
+              v-model="dimension"
+              placeholder="请选择"
+            >
+              <el-option label="物品维度" value="1"> </el-option>
+              <el-option label="批次维度" value="2"> </el-option>
+            </el-select>
+          </template>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="物品编码:" prop="assetCode">
           <el-input
             clearable
             placeholder="请输入"
-            v-model.trim="params.informationCode"
+            v-model.trim="params.assetCode"
           ></el-input>
         </el-form-item>
       </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="物品名称:" prop="informationName">
+        <el-form-item label="物品名称:" prop="assetName">
           <el-input
             clearable
-            v-model="params.informationName"
+            v-model="params.assetName"
             placeholder="请输入"
           ></el-input>
         </el-form-item>
@@ -54,45 +71,58 @@
           >
             查询
           </el-button>
-           <el-button @click="reset"
-             icon="el-icon-refresh-left"
-             size="small"
-             type="primary"
-           >重置</el-button>
+          <el-button
+            @click="reset"
+            icon="el-icon-refresh-left"
+            size="small"
+            type="primary"
+            >重置</el-button
+          >
         </div>
       </el-col>
     </el-row>
   </el-form>
 </template>
 <script>
+  import { getWarehouseList } from '@/api/classifyManage/itemInformation';
   export default {
-    data () {
+    data() {
       // 默认表单数据
       const defaultParams = {
         informationName: '',
-        informationCode: ''
+        warehouseId: ''
       };
       return {
         // 表单数据
-        params: { ...defaultParams }
+        params: { ...defaultParams },
+        warehouseList: [],
+        dimension: ''
       };
     },
     computed: {
       // 是否开启响应式布局
-      styleResponsive () {
+      styleResponsive() {
         return this.$store.state.theme.styleResponsive;
       }
     },
+    created() {
+      this.getArguInfo();
+    },
     methods: {
+      //搜索数据源
+      async getArguInfo() {
+        const { data } = await getWarehouseList();
+        this.warehouseList = data;
+      },
       /* 搜索 */
-      search () {
+      search() {
         console.log(this.current);
         this.$emit('search', {
           ...this.params
         });
       },
       /*  重置 */
-      reset () {
+      reset() {
         this.params = { ...this.defaultParams };
         this.search();
       }

+ 4 - 4
src/views/warehouseManagement/stockLedger/index.vue

@@ -45,18 +45,18 @@
 
   export default {
     components: { itemList, AssetTree },
-    data () {
+    data() {
       return {
         treeData: [],
         current: {}
       };
     },
-    created () {},
+    created() {},
     methods: {
-      onNodeClick (data, node) {
+      onNodeClick(data, node) {
         this.current = node;
       },
-      openEdit () {
+      openEdit() {
         const data = this.$refs.commonTree.getSelectList();
 
         if (data?.id) {

+ 3 - 6
src/views/warehouseManagement/stockManagement/add.vue

@@ -582,7 +582,7 @@
               </el-table-column>
               <el-table-column label="" prop="minPackingCount">
                 <template slot-scope="{ row, $index }">
-                  {{ row.unit }} /{{ row.minPackUnit }}
+                  {{ handleRowUnit(row) }} /{{ row.minPackUnit }}
                 </template>
               </el-table-column>
             </el-table-column>
@@ -1275,9 +1275,7 @@
                     parmasObj.warehouseLedgerInfos[i] = {
                       ...parmasObj.warehouseLedgerInfos[i],
                       ...houseList[j],
-                      rootCategoryLevelId:
-                        parmasObj.warehouseLedgerInfos[i]
-                          .categoryLevelPathIdParent,
+                      rootCategoryLevelId: parmasObj.inOutAddPO.assetType,
 
                       categoryLevelId:
                         parmasObj.warehouseLedgerInfos[i].categoryLevelId
@@ -1297,8 +1295,7 @@
                   warehouseLedgerDetails[g] = {
                     ...warehouseLedgerDetails[g],
                     ...warehouseLedgerDetails[g].houseList[q],
-                    rootCategoryLevelId:
-                      warehouseLedgerDetails[g].categoryLevelPathIdParent,
+                    rootCategoryLevelId: parmasObj.inOutAddPO.assetType,
                     categoryLevelId:
                       parmasObj.warehouseLedgerInfos[i].categoryLevelId
                   };

+ 60 - 9
src/views/warehouseManagement/stockManagement/index.vue

@@ -3,7 +3,7 @@
     <el-card shadow="never">
       <el-form :model="formData" ref="formName" label-width="80px">
         <el-row :gutter="10">
-          <el-col :span="6">
+          <el-col :span="5">
             <el-form-item label="入库时间" prop="time">
               <el-date-picker
                 class="w100"
@@ -26,12 +26,21 @@
               ></el-input> </el-form-item
           ></el-col>
           <el-col :span="4">
-            <el-form-item label="送货人" prop="deliveryName">
+            <el-form-item label="编码" prop="assetCode">
               <el-input
                 size="small"
                 class="w100"
                 placeholder="请输入"
-                v-model="formData.deliveryName"
+                v-model="formData.assetCode"
+              ></el-input> </el-form-item
+          ></el-col>
+          <el-col :span="4">
+            <el-form-item label="名称" prop="assetName">
+              <el-input
+                size="small"
+                class="w100"
+                placeholder="请输入"
+                v-model="formData.assetName"
               ></el-input> </el-form-item
           ></el-col>
 
@@ -66,7 +75,7 @@
               value-format="yyyy-MM-dd"
             ></el-date-picker> </el-form-item
         ></el-col> -->
-          <el-col :span="6">
+          <el-col :span="3">
             <div>
               <el-button icon="el-icon-refresh-left" size="small" @click="reset"
                 >重置</el-button
@@ -170,6 +179,48 @@
             label: '单号',
             align: 'center',
             slot: 'bizNum',
+            showOverflowTooltip: true,
+            width: 140
+          },
+          {
+            prop: 'assetCode',
+            label: '编码',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'assetName',
+            label: '名称',
+            align: 'center'
+          },
+          {
+            prop: '',
+            label: '牌号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: '',
+            label: '型号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: '',
+            label: '数量',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: '',
+            label: '计量单位',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: '',
+            label: '重量单位',
+            align: 'center',
             showOverflowTooltip: true
           },
           {
@@ -187,21 +238,21 @@
             showOverflowTooltip: true
           },
           {
-            prop: 'deliveryName',
-            label: '送货人',
+            prop: '',
+            label: '入库人',
             align: 'center',
             showOverflowTooltip: true
           },
           {
-            prop: 'createUserName',
-            label: '登记人',
+            prop: '',
+            label: '入库时间',
             align: 'center',
             showOverflowTooltip: true
           },
           {
             columnKey: 'action',
             label: '操作',
-            width: 230,
+            width: 100,
             align: 'center',
             slot: 'action',
             showOverflowTooltip: true

+ 2 - 2
vue.config.js

@@ -32,8 +32,8 @@ module.exports = {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
         // target: 'http://192.168.3.51:18086', // 测试环境
-        target: 'http://124.71.68.31:50001',
-        // target: 'http://192.168.1.100:18086', //朱
+        // target: 'http://124.71.68.31:50001',
+        target: 'http://192.168.1.134:18086', //朱
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {