فهرست منبع

散件导入、库存导入

chenrui 1 سال پیش
والد
کامیت
0df4919dcc

+ 10 - 7
src/views/bulkManagement/bulkImport/list.vue

@@ -71,12 +71,11 @@
       centered
       class="chooseImport-modal"
       :footer="null"
-      :maskClosable="false"
       title="散件导入明细"
       v-model="openBulkImportDetail"
-      @cancel="openBulkImportDetail=false"
-      width="72%">
-      <detailList :detailSn="detailSn"></detailList>
+      @cancel="openBulkImportDetail=false;detailSn=undefined;"
+      width="70%">
+      <detailList ref="bulkImportDeail" typeInfo="SPARE_PARTS_IMPORT" :detailSn="detailSn"></detailList>
     </a-modal>
   </a-card>
 </template>
@@ -105,7 +104,7 @@ export default {
         ],
         beginDate: '',
         endDate: '',
-        stockImportNo: '',
+        stockImportNo: undefined,
         importType: 'SPARE_PARTS_IMPORT'
       },
       openGuideModal: false,
@@ -161,8 +160,11 @@ export default {
   methods: {
     // 详情
     handleDetail (row) {
-      this.openBulkImportModal = true
-      this.detailSn = row
+      this.openBulkImportDetail = true
+      this.detailSn = row.stockImportNo
+      this.$nextTick(() => {
+        this.$refs.bulkImportDeail.handleSearch()
+      })
     },
     // 合计
     getCount (params) {
@@ -204,6 +206,7 @@ export default {
       this.$refs.rangeDate.resetDate(this.queryParam.time)
       this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.stockImportNo = undefined
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.$refs.table.clearTable()

+ 30 - 3
src/views/inventoryManagement/inventoryImport/list.vue

@@ -58,10 +58,25 @@
         :data="loadData"
         :defaultLoadData="false"
         bordered>
+        <!-- 导入单号 -->
+        <template slot="stockImportNo" slot-scope="text, record">
+          <span class="table-td-link" @click="handleDetail(record)">{{ record.stockImportNo }}</span>
+        </template>
       </s-table>
     </a-spin>
     <!-- 库存导入 -->
     <importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="hanldeImprotOk" />
+    <!-- 库存导入详情 -->
+    <a-modal
+      centered
+      class="chooseImport-modal"
+      :footer="null"
+      title="库存导入明细"
+      v-model="openInventoryImportDetail"
+      @cancel="openInventoryImportDetail=false;detailSn=undefined;"
+      width="70%">
+      <detailList ref="inventoryImportDeail" typeInfo="STOCK_IMPORT" :detailSn="detailSn"></detailList>
+    </a-modal>
   </a-card>
 </template>
 
@@ -71,9 +86,10 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import getDate from '@/libs/getDate.js'
 import importGuideModal from './importGuideModal.vue'
+import detailList from '@/views/reportData/stockImportReport/detailList.vue'
 import { reportStockImportList, reportStockImportCount } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate, importGuideModal },
+  components: { STable, VSelect, rangeDate, importGuideModal, detailList },
   mixins: [commonMixin],
   data () {
     return {
@@ -88,10 +104,12 @@ export default {
         ],
         beginDate: '',
         endDate: '',
-        stockImportNo: '',
+        stockImportNo: undefined,
         importType: 'STOCK_IMPORT'
       },
       openGuideModal: false,
+      detailSn: undefined,
+      openInventoryImportDetail: false,
       rules: {
         'time': [{ required: true, message: '请选择导入时间', trigger: 'change' }]
       },
@@ -128,7 +146,7 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '导入时间', dataIndex: 'importTime', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '导入单号', dataIndex: 'stockImportNo', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '导入单号', dataIndex: 'stockImportNo', width: '18%', align: 'center', scopedSlots: { customRender: 'stockImportNo' } },
         { title: '款数', dataIndex: 'productTotalCategory', width: '18%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '数量', dataIndex: 'productTotalQty', width: '18%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
         // { title: '成本', dataIndex: 'totalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -140,6 +158,14 @@ export default {
     }
   },
   methods: {
+    // 详情
+    handleDetail (row) {
+      this.openInventoryImportDetail = true
+      this.detailSn = row.stockImportNo
+      this.$nextTick(() => {
+        this.$refs.inventoryImportDeail.handleSearch()
+      })
+    },
     // 合计
     getCount (params) {
       reportStockImportCount(params).then(res => {
@@ -181,6 +207,7 @@ export default {
       this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.$refs.ruleForm.resetFields()
+      this.queryParam.stockImportNo = undefined
       this.totalData = null
       this.$refs.table.clearTable()
       this.handleSearch()

+ 15 - 1
src/views/reportData/stockImportReport/detailList.vue

@@ -77,7 +77,7 @@
               @click="handleExport"
               :disabled="disabled"
               :loading="exportLoading"
-              v-if="$hasPermissions('B_StockImportDetailExport')"
+              v-if="$hasPermissions('B_StockImportDetailExport') && !detailSn"
               class="button-warning"
               id="salesDetailReportList-export-btn">导出</a-button>
             <a @click="advanced=!advanced" style="margin-left: 5px">
@@ -124,6 +124,16 @@ import { reportStockImportDetailList, reportStockImportDetailCount, reportStockI
 export default {
   components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier },
   mixins: [commonMixin],
+  props: {
+    detailSn: {
+      type: String,
+      default: null
+    },
+    typeInfo: {
+      type: String,
+      default: null
+    }
+  },
   data () {
     return {
       spinning: false,
@@ -160,6 +170,10 @@ export default {
         const params = Object.assign(parameter, this.queryParam)
         this.spinning = true
         delete params.time
+        if (this.detailSn) {
+          params.stockImportNo = this.detailSn
+          params.importType = this.typeInfo
+        }
         return reportStockImportDetailList(params).then(res => {
           let data
           if (res.status == 200) {