lilei 2 년 전
부모
커밋
6c976f0e37

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1658472429394
+  "version": 1658479050973
 }

+ 1 - 1
src/api/shelf.js

@@ -113,4 +113,4 @@ export const modifFinishFlag = (params) => {
     data: params,
     method: 'post'
   })
-}
+}

+ 7 - 0
src/api/shelfRecall.js

@@ -37,6 +37,13 @@ export const shelfRecallCancel = params => {
     method: 'post'
   })
 }
+// 删除回调单
+export const shelfRecallDelete = params => {
+  return axios({
+    url: `/shelfRecall/delete/${params.recallBillSn}`,
+    method: 'get'
+  })
+}
 // 保存 调回单
 export const shelfRecallSave = params => {
   return axios({

+ 7 - 0
src/api/shelfReplenish.js

@@ -35,6 +35,13 @@ export const shelfReplenishCancel = (params) => {
     method: 'post'
   })
 }
+// 删除补货单
+export const shelfReplenishDelete = (params) => {
+  return axios({
+    url: `/shelfReplenish/delete/${params.replenishBillSn}`,
+    method: 'get'
+  })
+}
 //  补货单 查询每个状态的数据条数
 export const shelfReplenishStateCount = (params) => {
   return axios({

+ 57 - 22
src/views/numsGoodsShelves/recallManagement/list.vue

@@ -2,7 +2,12 @@
   <a-card size="small" :bordered="false" class="accountManagementList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div ref="tableSearch" class="table-page-search-wrapper">
+      <div ref="tableSearch" style="width:100%;overflow: hidden;" class="table-page-search-wrapper">
+        <a-tabs type="card" v-model="queryParam.bizType" @change="tabChange" class="replenishmentManagementList-tabs">
+          <a-tab-pane v-for="item in tabsList" :key="item.code">
+            <p slot="tab">{{ item.name }}<span v-if="item.countNum&&item.code=='WAIT_CONFIRM'" style="color:red">({{ item.countNum }})</span></p>
+          </a-tab-pane>
+        </a-tabs>
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="36">
             <a-col :md="6" :sm="24">
@@ -43,11 +48,6 @@
           </a-row>
         </a-form>
       </div>
-      <a-tabs type="card" v-model="queryParam.bizType" @change="tabChange" class="replenishmentManagementList-tabs">
-        <a-tab-pane v-for="item in tabsList" :key="item.code">
-          <p slot="tab">{{ item.name }}<span v-if="item.countNum&&item.code=='WAIT_CONFIRM'" style="color:red">({{ item.countNum }})</span></p>
-        </a-tab-pane>
-      </a-tabs>
       <s-table
         class="sTable fixPagination"
         ref="table"
@@ -69,15 +69,22 @@
             v-if="record.billState=='WAIT_CONFIRM'"
             class="button-primary"
             @click.stop="handleRecall(record)"
-            id="shelfMonitoringList-warehousing-btn">退库</a-button>
+          >退库</a-button>
           <a-button
             size="small"
             v-if="record.billState=='WAIT_CONFIRM'"
             type="link"
             class="button-primary"
             @click.stop="handleCancel(record)"
-            id="shelfMonitoringList-warehousing-btn">取消调回单</a-button>
-          <span v-if="record.billState!='WAIT_CONFIRM'" style="display: inline-block;margin-left: 7px;">--</span>
+          >取消调回单</a-button>
+          <a-button
+            size="small"
+            v-if="record.billState=='CANCEL'"
+            type="link"
+            class="button-primary"
+            @click.stop="handleDelete(record)"
+          >删除</a-button>
+          <span v-if="record.billState=='FINISH'">--</span>
         </template>
         <a-table
           v-if="innerData&&innerData[index]"
@@ -92,9 +99,9 @@
         >
         </a-table>
       </s-table>
+      <!-- 退库 -->
+      <recallModal :isOpenModal="showModal" :currentData="currentData" @close="showModal=false" @refresh="$refs.table.refresh(true)"></recallModal>
     </a-spin>
-    <!-- 退库 -->
-    <recallModal :isOpenModal="showModal" :currentData="currentData" @close="showModal=false" @refresh="$refs.table.refresh(true)"></recallModal>
   </a-card>
 </template>
 
@@ -107,7 +114,7 @@ import recallModal from './recallModal.vue'
 import getDate from '@/libs/getDate.js'
 import { toThousands } from '@/libs/tools.js'
 import shelfList from '@/views/common/shelfList'
-import { shelfRecallList, shelfRecallDetailList, shelfRecallCancel, shelfRecallStateCount } from '@/api/shelfRecall.js'
+import { shelfRecallList, shelfRecallDetailList, shelfRecallCancel, shelfRecallStateCount, shelfRecallDelete } from '@/api/shelfRecall.js'
 export default {
   components: { STable, recallModal, rangeDate, shelfList },
   mixins: [commonMixin],
@@ -121,7 +128,6 @@ export default {
       currentData: null,
       activeKey: 0, // 默认的tab
       tabsList: [],
-      currentType: 'ALL',
       expandedRowKeys: [],
       time: [
         getDate.getCurrMonthDays().starttime,
@@ -198,7 +204,6 @@ export default {
       setTimeout(() => {
         this.queryParam.bizType = key
         this.$refs.table.refresh(true)
-        this.currentType = key
       }, 100)
     },
     // 获取各类型下的数量
@@ -211,7 +216,6 @@ export default {
           this.tabsList = [
             { code: 'ALL', name: '全部', countNum: 0 }, { code: 'WAIT_CONFIRM', name: '待退库', countNum: 0 }, { code: 'FINISH', name: '已完成', countNum: 0 }, { code: 'CANCEL', name: '已取消', countNum: 0 }
           ]
-          // this.queryParam.bizType = 'ALL'
           this.tabsList[1].countNum = res.data.WAIT_CONFIRM || 0
           this.tabsList[2].countNum = res.data.FINISH || 0
           this.tabsList[3].countNum = res.data.CANCEL || 0
@@ -249,21 +253,17 @@ export default {
     },
     // 重置
     resetSearchForm () {
-      // this.$refs.rangeDate.resetDate(this.time)
-      // this.queryParam.billState = this.currentType
-      // this.queryParam = {
       this.resetData()
-
       this.getSumByType()
     },
     resetData () {
       this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.bizType = 'ALL'
       this.queryParam = {
         beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
         endDate: getDate.getCurrMonthDays().endtime, // 结束时间
         recallBillNo: '', // 调回单号
-        shelfSn: undefined // 数字货架sn
+        shelfSn: undefined, // 数字货架sn
+        bizType: 'ALL'
       }
     },
     // 退库
@@ -292,9 +292,30 @@ export default {
         }
       })
     },
+    // 删除
+    handleDelete (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认删除调回单吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          shelfRecallDelete({ recallBillSn: row.recallBillSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 265
+      this.tableHeight = window.innerHeight - tableSearchH - 250
     },
     pageInit () {
       const _this = this
@@ -341,6 +362,7 @@ export default {
 
 <style lang="less">
   .accountManagementList-wrap{
+    width:100%;
     .inner-table{
       background-color: #fff;
       border-bottom: 1px solid #eee;
@@ -349,5 +371,18 @@ export default {
          border-bottom: 1px solid #eee;
       }
     }
+    .replenishmentManagementList-tabs.ant-tabs.ant-tabs-card .ant-tabs-bar{
+      margin: 0 0 10px 0!important;
+    }
+    .replenishmentManagementList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container{
+      height: 30px!important;
+    }
+    .replenishmentManagementList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{
+      height: 30px!important;
+    }
+    .replenishmentManagementList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{
+      line-height: 26px!important;
+      height: 30px!important;
+    }
   }
 </style>

+ 0 - 7
src/views/numsGoodsShelves/recallManagement/recallModal.vue

@@ -181,13 +181,6 @@ export default {
       this.opened = nVal
       if (nVal) {
         this.getData()
-        // if (this.currentData) {
-        //   this.currentData.map((item, index) => {
-        //     item.no = index + 1
-        //     item.confirmQty = item.qty
-        //   })
-        // }
-        // this.list = JSON.parse(JSON.stringify(this.currentData || []))
       }
     }
   }

+ 30 - 8
src/views/numsGoodsShelves/replenishmentManagement/list.vue

@@ -3,6 +3,12 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
+        <!-- 标签页 -->
+        <a-tabs type="card" v-model="queryParam.bizType" @change="handleTabChange" class="replenishmentManagementList-tabs">
+          <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
+            <p slot="tab">{{ item.bizName }}<span v-if="item.countNum && item.bizName!='全部'&&item.bizName!='已完成'&&item.bizName!='已取消'" style="color: red;">({{ item.countNum }})</span></p>
+          </a-tab-pane>
+        </a-tabs>
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -42,12 +48,6 @@
           </a-row>
         </a-form>
       </div>
-      <!-- 标签页 -->
-      <a-tabs type="card" v-model="queryParam.bizType" @change="handleTabChange" class="replenishmentManagementList-tabs ">
-        <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
-          <p slot="tab">{{ item.bizName }}<span v-if="item.countNum && item.bizName!='全部'&&item.bizName!='已完成'&&item.bizName!='已取消'" style="color: red;">({{ item.countNum }})</span></p>
-        </a-tab-pane>
-      </a-tabs>
       <s-table
         class="sTable fixPagination"
         ref="table"
@@ -81,6 +81,7 @@
           <a-button v-if="record.billState=='WAIT_OUT_STOCK'" size="small" type="link" class="button-primary" @click.stop="handleOutWarehousing(record)">出库</a-button>
           <a-button v-if="record.billState=='WAIT_CHECK'" size="small" type="link" class="button-primary" @click.stop="handlePutWarehousing(record)">签收</a-button>
           <a-button v-if="record.billState=='WAIT_CONFIRM' || record.billState=='WAIT_OUT_STOCK'" size="small" type="link" class="button-primary" @click.stop="handleCancelOrder(record)">取消补货单</a-button>
+          <a-button v-if="record.billState=='CANCEL'" size="small" type="link" class="button-primary" @click.stop="handleDelete(record)">删除</a-button>
         </template>
       </s-table>
       <!-- 确认 -->
@@ -114,7 +115,7 @@ import stockModal from './stockModal.vue'
 import printStickerModal from './printStickerModal.vue'
 import outWarehousingModal from './outWarehousingModal.vue'
 import putWarehousingModal from './putWarehousingModal.vue'
-import { shelfReplenishList, shelfReplenishDetailList, shelfReplenishCancel, shelfReplenishStateCount, shelfReplenishDetailStock, shelfReplenishConfirm, shelfReplenishTaskInsertBill } from '@/api/shelfReplenish'
+import { shelfReplenishList, shelfReplenishDetailList, shelfReplenishCancel, shelfReplenishStateCount, shelfReplenishDetailStock, shelfReplenishConfirm, shelfReplenishTaskInsertBill, shelfReplenishDelete } from '@/api/shelfReplenish'
 export default {
   components: { STable, VSelect, rangeDate, shelfSList, confirmModal, stockModal, printStickerModal, outWarehousingModal, putWarehousingModal },
   mixins: [commonMixin],
@@ -316,6 +317,27 @@ export default {
         }
       })
     },
+    // 删除
+    handleDelete (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认删除补货单吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          shelfReplenishDelete({ replenishBillSn: row.replenishBillSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
     expandFun (expanded, record) {
       if (expanded) {
         this.expandedRowKeys.push(record.id)
@@ -403,7 +425,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 240
+      this.tableHeight = window.innerHeight - tableSearchH - 200
     },
     pageInit () {
       const _this = this