Browse Source

1.合同管理新增SAP上传;2.库存汇总加是否零库存筛选条件

duanxiaoduan 1 year ago
parent
commit
18664ca05d

+ 25 - 2
src/views/custom/contractManagement/index.vue

@@ -992,7 +992,7 @@
 
 <script>
 // 引入
-import { GetDataByName, GetDataByNames, checkButtons, ExecDataByConfig, UpdateDataRelation, PostDataByName, failproccess } from '@/api/common'
+import { GetDataByName, GetDataByNames, checkButtons, ExecDataByConfig, UpdateDataRelation, PostDataByName, failproccess,postJson } from '@/api/common'
 import waves from '@/directive/waves'
 import { parseTime, json2excel, sortChange } from '@/utils/index.js'
 import Pagination from '@/components/Pagination'
@@ -2929,7 +2929,30 @@ export default {
         })
       })
     },
-    sapUpload(){}
+    sapUpload(){
+      if(this.selectList.length == 0){
+        this.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
+        return false
+      }
+      let url = 'authdata/contract/push'
+      let ids = []
+      this.selectList.forEach((i)=>{
+        ids.push(i.id)
+        console.log(i,'===')
+      })
+      let data = {
+        pastureId:parseInt(Cookies.get('pastureid')),
+        providerId:this.tab1.detailsSpareParts.detailsList.providerId,
+        contractIdList:ids
+      }
+      postJson(url,data).then(response => {
+        if (response.msg !== 'fail') {
+          this.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
+        } else {
+          this.$notify({ title: '上传失败', message: response.data, type: 'warning', duration: 2000 })
+        }
+      })
+    }
   }
 }
 </script>

+ 10 - 1
src/views/report/inventorySummary/index.vue

@@ -5,7 +5,10 @@
       <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
     </div>
     <div class="filter-container">
-      <el-date-picker v-model="monthDate" type="monthrange" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份"  @change="changeTime" />
+      <el-date-picker v-model="monthDate" type="monthrange" :clearable="false" range-separator="至" start-placeholder="开始月份" class="filter-item" end-placeholder="结束月份"  @change="changeTime" />
+      <el-select v-model="isZeroStock" placeholder="是否零库存" class="filter-item" style="width: 120px;" @change="changeIsZeroStock">
+        <el-option v-for="item in isZeroStockList" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
       <el-button class="filter-item" type="success" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
     </div>
     <div v-if="isTable1" class="table">
@@ -115,6 +118,8 @@ export default {
   data() {
     return {
       monthDate:[parseTime(new Date(), '{y}-{m}'), parseTime(new Date(), '{y}-{m}')],
+      isZeroStock:0,
+      isZeroStockList:[{id:0,'name':'非零库存'},{id:1,'name':'零库存'}],
       rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       types: [{ id: 0, name: '按供应商' }, { id: 1, name: '按备件类别' }],
@@ -208,6 +213,9 @@ export default {
       }
       this.get_table_data()
     },
+    changeIsZeroStock(item){
+      this.get_table_data()
+    },
     get_table_data() {
       this.listLoading = true
       if (Cookies.get('pastureid') == 18) {
@@ -217,6 +225,7 @@ export default {
       }
       this.getdataListParm.parammaps.startDate = this.monthDate[0]
       this.getdataListParm.parammaps.endDate = this.monthDate[1]
+      this.getdataListParm.parammaps.isZeroStock = this.isZeroStock
       GetDataByName(this.getdataListParm).then(response => {
         if (response.data.list !== null) {
           console.log('table数据', response.data.list)