Bläddra i källkod

库存根据供应商查询调整

lizhenhao 2 år sedan
förälder
incheckning
892bb0131a

+ 1 - 0
src/views/modules/materialManagement/wareHouse/WareHouseAddForm.vue

@@ -833,6 +833,7 @@
           wareHouseType: this.inputForm.detailInfos[index].procurementType,
           tradeName: this.inputForm.detailInfos[index].tradeName,
           tradeNumber: this.inputForm.detailInfos[index].tradeNumber,
+          tradePrice: this.inputForm.detailInfos[index].tradePrice,
           company: this.inputForm.detailInfos[index].company,
           priceSum: this.inputForm.detailInfos[index].priceSum,
           supplierId: this.inputForm.detailInfos[index].supplierId,

+ 9 - 2
src/views/modules/materialManagement/wareHouseSummary/WareHouseHistory.vue

@@ -204,7 +204,8 @@
           collectNo: '',
           collectDates: []
         },
-        activeNameTop: 'wareHouse'
+        activeNameTop: 'wareHouse',
+        detailId: ''
       }
     },
     // projectRecordsService: null,
@@ -228,11 +229,16 @@
       view2 (id) {
         this.$refs.updateCollectInfoForm.init('view', id)
       },
-      init (tradeName) {
+      init (tradeName, detailId) {
         this.activeNameTop = 'wareHouse'
         this.visible = true
         this.searchForm.tradeName = tradeName
         this.searchForm2.tradeName = tradeName
+        if (this.commonJS.isNotEmpty(detailId)) {
+          this.detailId = detailId
+        } else {
+          this.detailId = ''
+        }
         this.list()
         this.list2()
       },
@@ -240,6 +246,7 @@
         this.loading = true
         // this.searchForm.createId = this.$store.state.user.id
         this.wareHouseService.wareHouseHistoryList({
+          'detailId': this.detailId,
           ...this.searchForm
         }).then(({data}) => {
           this.dataList = data.records

+ 5 - 4
src/views/modules/materialManagement/wareHouseSummary/WareHouseSummaryList.vue

@@ -98,8 +98,8 @@
 <!--          <vxe-column min-width="160" align="center" title="入库部门" field="wareHouseManOfficeName"></vxe-column>-->
           <vxe-column min-width="160" align="center" title="商品名称" field="tradeName">
             <template slot-scope="scope">
-              <el-link  type="primary" :underline="false" v-if="hasPermission('material:list')" @click="view(scope.row.tradeName)">{{scope.row.tradeName}}</el-link>
-              <el-link  type="primary" :underline="false" v-else-if="hasPermission('material:list')"  @click="view(scope.row.tradeName,)">{{scope.row.tradeName}}</el-link>
+              <el-link  type="primary" :underline="false" v-if="hasPermission('material:list')" @click="view(scope.row)">{{scope.row.tradeName}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('material:list')"  @click="view(scope.row)">{{scope.row.tradeName}}</el-link>
               <span v-else>{{scope.row.tradeName}}</span>
             </template>
           </vxe-column>
@@ -233,9 +233,10 @@
     },
     methods: {
       // 查看
-      view (tradeName) {
+      view (row) {
         // this.$refs.wareHouseHistoryPopup.init()
-        this.$refs.wareHouseHistory.init(tradeName)
+        let detailId = this.commonJS.isNotEmpty(this.searchForm.supplierId) ? row.id : ''
+        this.$refs.wareHouseHistory.init(row.tradeName, detailId)
       },
       // 查询当前用户是否是管理员用户
       checkIsAdmin () {