linan 4 rokov pred
rodič
commit
9e7204f060

+ 1 - 1
src/store/index.js

@@ -16,7 +16,7 @@ export default new Vuex.Store({
 		areaList: [{ id: 1 }],  // 栋舍列表
 		drugBasicsList: [{ id: 1 }],  // 基础药品列表
 		batchList: [],  // 批次列表
-		storeList: [],  // 批次列表
+		storeList: [],  // 库存列表
 		...publicType
 	},
 	getters: {},

+ 1 - 0
src/store/publicType.js

@@ -136,6 +136,7 @@ const deviceStatus = [
 /* areaList 栋舍信息  动态获取了 在home.vue中获取了 */
 /* drugBasicsList 基础药品列表   动态获取了 在home.vue中获取了 */
 /* batchList 批次列表   动态获取了 在home.vue、batch.vue中获取了 */
+/* storeList  // 库存列表   动态获取了 在home.vue、storeList.vue中获取了 */
 
 
 

+ 1 - 1
src/views/Home/Home.vue

@@ -2,7 +2,7 @@
     <div class="home">
         <header class="header">
             <div class="left">
-                湖羊生产管理 
+                湖羊养殖管理 
                 <el-button
                     @click="onMenuCollapse"
                     circle

+ 5 - 7
src/views/material/materialInStore.vue

@@ -30,8 +30,6 @@
                     <el-table-column prop="medicineName" label="药品名"></el-table-column>
                     <el-table-column prop="factory" label="生产厂家"></el-table-column>
                     <el-table-column prop="batchNumber" label="生产批号"></el-table-column>
-                    <el-table-column prop="mdf" label="生产日期"></el-table-column>
-                    <el-table-column prop="price" label="价格(元)"></el-table-column>
                     <el-table-column prop="source" label="来源"></el-table-column>
                     <el-table-column label="数量">
                         <template v-slot="scope">
@@ -170,7 +168,7 @@ export default {
         };
     },
     created() {
-        // 物料入库列表
+        // 基础信息列表
         this.getMInStoreList();
     },
     computed: {},
@@ -180,7 +178,7 @@ export default {
                 if (valid) {
                     reqAddMInStore(this.formData)
                         .then(res => {
-                            // 物料入库列表
+                            // 基础信息列表
                             this.getMInStoreList();
                             // 获取基础药品列表 给后面下拉选择器使用
                             this.$store.dispatch("getDrugBasicsList");
@@ -196,7 +194,7 @@ export default {
                 }
             });
         },
-        // 物料入库列表
+        // 基础信息列表
         getMInStoreList() {
             reqMInStoreList({
                 searchStr: this.search,
@@ -223,7 +221,7 @@ export default {
         del(row) {
             reqDelMInStore(row.id)
                 .then(res => {
-                    // 物料入库列表
+                    // 基础信息列表
                     this.getMInStoreList();
                     if (res.code == "success") {
                         this.$message.success(res.msg);
@@ -240,7 +238,7 @@ export default {
         pageChange(p) {
             console.log(p);
             this.pageNum = p;
-            // 物料入库列表
+            // 基础信息列表
             this.getMInStoreList();
         },
         CPeriodOfValidityUnit(v) {

+ 15 - 4
src/views/material/storeList.vue

@@ -29,7 +29,6 @@
                         </template>
                     </el-table-column>
                     <el-table-column prop="medicineName" label="药品名称"></el-table-column>
-                    <el-table-column prop="specifications" label="规格"></el-table-column>
                     <el-table-column prop="factory" label="生产厂家"></el-table-column>
                     <el-table-column label="生产日期">
                         <template v-slot="scope">
@@ -37,9 +36,16 @@
                         </template>
                     </el-table-column>
                     <el-table-column prop="source" label="来源(经销商)"></el-table-column>
-                    <el-table-column prop="number" label="库存数量"></el-table-column>
-                    <el-table-column prop="periodOfValidity" label="质保期"></el-table-column>
-                    <el-table-column prop="unit" label="质保期单位"></el-table-column>
+                    <el-table-column label="库存数量">
+                        <template v-slot="scope">
+                            <span>{{ scope.row['number'] + scope.row['specifications'] }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="periodOfValidity" label="质保期">
+                        <template v-slot="scope">
+                            <span>{{ scope.row['periodOfValidity'] + calcUnit(scope.row['unit']) }}</span>
+                        </template>
+                    </el-table-column>
                     <el-table-column prop="price" label="价格(元)"></el-table-column>
                 </el-table>
 
@@ -123,6 +129,7 @@ export default {
                 price: 8.5
             },
             isAdd: false,
+
             rules
         };
     },
@@ -177,6 +184,10 @@ export default {
             this.pageNum = p;
             // 库存盘点列表
             this.getStoreList();
+        },
+        calcUnit(unit) {
+            let obj = this.$store.state['periodOfValidityUnit'].find(item => item.value == unit)
+            return obj.label
         }
     }
 };