guarantee-lsq 2 rokov pred
rodič
commit
412d532d97

+ 14 - 0
src/views/store/purchaseform/PurchaseStoreForm.vue

@@ -32,6 +32,10 @@
             <a-button style='margin-left: 8px' v-if="$auth('purchase-store-forms-export')" type='primary' icon='download'
                       @click='doExport'>导出
             </a-button>
+            <a-divider type="vertical" />
+            <a-button v-if="$auth('purchase-store-forms-add')" type='primary' icon='plus' @click='handleRouter(1)'>预警列表</a-button>
+            <a-divider type="vertical" />
+            <a-button v-if="$auth('purchase-store-forms-add')" type='primary' icon='plus' @click='handleRouter(2)'>备件列表</a-button>
             <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('purchase-store-forms-del')">
               <a-menu slot='overlay'>
                 <a-popconfirm title='是否要删除所选数据?' @confirm='batchDelete()'>
@@ -296,6 +300,16 @@ export default {
         this.BaseTool.Util.downLoadExportExcel(file)
       })
     },
+    handleRouter (numType) {
+      var routeUrl = ''
+      if (numType === 1) {
+        routeUrl = this.$router.resolve({ path: '/store/SpareStoreTotalMinStock' })
+      }
+      if (numType === 2) {
+        routeUrl = this.$router.resolve({ path: '/spare/part/info' })
+      }
+      window.open(routeUrl.href, '_blank')
+    },
     handleEnter () {
       this.$refs.table.refresh(true)
     },

+ 3 - 5
src/views/store/purchaseform/modules/Detail.vue

@@ -91,7 +91,8 @@ export default {
         'totalNum': null,
         'name': null,
         'spareStoreName': null,
-        'detailList': null
+        'detailList': null,
+        'sparePartInfoName': null
       },
       rowSelection: {
         onChange: (selectedRowKeys, selectedRows) => {
@@ -110,10 +111,7 @@ export default {
         },
         {
           title: '备件名称',
-          dataIndex: 'sparePartInfoName',
-          customRender: (text, record, index) => {
-            return record.spareName
-          }
+          dataIndex: 'sparePartInfoName'
         },
         {
           title: '采购数量',