Jelajahi Sumber

生成补货单

lilei 2 tahun lalu
induk
melakukan
5d2a6f792d

+ 1 - 1
public/version.json

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

+ 16 - 1
src/api/shelfReplenish.js

@@ -1,5 +1,20 @@
 import { axios } from '@/utils/request'
 import { axios } from '@/utils/request'
 
 
+// 货架列表
+export const queryListForSettle = (params) => {
+  return axios({
+    url: '/shelf/queryListForSettle',
+    method: 'get'
+  })
+}
+// 生成补货单
+export const shelfTaskInsertBill = (params) => {
+  return axios({
+    url: '/shelfReplenish/taskInsertBill',
+    data: params,
+    method: 'post'
+  })
+}
 //  补货单列表  有分页
 //  补货单列表  有分页
 export const shelfReplenishList = (params) => {
 export const shelfReplenishList = (params) => {
   const url = `/shelfReplenish/queryPage/${params.pageNo}/${params.pageSize}`
   const url = `/shelfReplenish/queryPage/${params.pageNo}/${params.pageSize}`
@@ -101,7 +116,7 @@ export const shelfReplenishPrintSign = (params) => {
   })
   })
 }
 }
 
 
-// 定时任务
+// 定时任务,废弃
 export const shelfReplenishTaskInsertBill = (params) => {
 export const shelfReplenishTaskInsertBill = (params) => {
   return axios({
   return axios({
     url: '/shelfReplenish/taskInsertBill',
     url: '/shelfReplenish/taskInsertBill',

+ 130 - 0
src/views/numsGoodsShelves/replenishmentManagement/creatReplenishmentOrder.vue

@@ -0,0 +1,130 @@
+<template>
+  <a-modal
+    centered
+    class="creatReplenish-confirm-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="生成补货单"
+    v-model="isShow"
+    @cancel="isShow = false"
+    :width="800">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div style="padding:0 0 20px;text-align: center;">
+        <h4>请选择需要生成补货单的数字货架</h4>
+        <div style="color:#999;font-size:14px;">(请从左侧选择货架并移动到右侧区域)</div>
+      </div>
+      <!-- 列表 -->
+      <div>
+        <a-transfer
+          :titles="['货架列表', '已选货架']"
+          :listStyle="{width:'45%',height:'400px'}"
+          :data-source="shelfList"
+          show-search
+          :filter-option="filterOption"
+          :target-keys="targetKeys"
+          :render="item => item.title"
+          @change="handleChange"
+        />
+      </div>
+      <div class="btn-cont">
+        <a-button type="primary" id="creatReplenish-confirm-modal-save" @click="handleSave">确定</a-button>
+        <a-button id="creatReplenish-confirm-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { queryListForSettle, shelfTaskInsertBill } from '@/api/shelfReplenish'
+export default {
+  name: 'ConfirmModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    nowData: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      shelfList: [],
+      targetKeys: []
+    }
+  },
+  methods: {
+    getShelf () {
+      this.spinning = true
+      queryListForSettle().then(res => {
+        if (res.status == 200) {
+          this.shelfList = res.data || []
+          this.shelfList.map(item => {
+            item.title = item.shelfName
+            item.key = item.shelfSn
+          })
+        } else {
+          this.shelfList = []
+        }
+        this.spinning = false
+      })
+    },
+    filterOption (inputValue, option) {
+      return option.title.indexOf(inputValue) > -1
+    },
+    handleChange (targetKeys, direction, moveKeys) {
+      console.log(targetKeys, direction, moveKeys)
+      this.targetKeys = targetKeys
+    },
+    //  确认补货
+    handleSave () {
+      if (this.targetKeys.length == 0) {
+        this.$message.info('请选择货架!')
+        return false
+      }
+
+      this.spinning = true
+      shelfTaskInsertBill(this.targetKeys).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.$emit('ok')
+        }
+        this.spinning = false
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      } else {
+        const _this = this
+        this.$nextTick(() => { // 页面渲染完成后的回调
+          _this.getShelf()
+        })
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.creatReplenish-confirm-modal {
+	.btn-cont {
+		text-align: center;
+		margin: 35px 0 10px;
+	}
+}
+</style>

+ 7 - 10
src/views/numsGoodsShelves/replenishmentManagement/list.vue

@@ -36,7 +36,7 @@
             </template>
             </template>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
               <span class="table-page-search-submitButtons">
-                <a-button type="info" style="margin-left: 5px" @click="taskIn" :disabled="disabled" >生成补货单</a-button>
+                <a-button type="info" style="margin-left: 5px" @click="openCreatRoModal=true" >生成补货单</a-button>
                 <a-button type="primary" style="margin-left: 5px" @click="queryByTypeSum" :disabled="disabled" id="replenishmentManagementList-refresh">查询</a-button>
                 <a-button type="primary" style="margin-left: 5px" @click="queryByTypeSum" :disabled="disabled" id="replenishmentManagementList-refresh">查询</a-button>
                 <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="replenishmentManagementList-reset">重置</a-button>
                 <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="replenishmentManagementList-reset">重置</a-button>
                 <a @click="advanced = !advanced" style="margin-left: 5px">
                 <a @click="advanced = !advanced" style="margin-left: 5px">
@@ -100,6 +100,8 @@
       <out-warehousing-modal :openModal="openOutWarehousingModal" :nowData="nowData" @ok="handleOutWarehousingOk" @close="handleCancel" />
       <out-warehousing-modal :openModal="openOutWarehousingModal" :nowData="nowData" @ok="handleOutWarehousingOk" @close="handleCancel" />
       <!-- 签收 -->
       <!-- 签收 -->
       <put-warehousing-modal :openModal="openPutWarehousingModal" :nowData="nowData" @ok="handlePutWarehousingOk" @close="handleCancel" />
       <put-warehousing-modal :openModal="openPutWarehousingModal" :nowData="nowData" @ok="handlePutWarehousingOk" @close="handleCancel" />
+      <!-- 生成补货单 -->
+      <creatReplenishmentOrder :openModal="openCreatRoModal" :nowData="nowData" @ok="resetSearchForm" @close="openCreatRoModal=false" />
     </a-spin>
     </a-spin>
   </a-card>
   </a-card>
 </template>
 </template>
@@ -111,13 +113,14 @@ import getDate from '@/libs/getDate.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import shelfSList from '@/views/common/shelfList'
 import shelfSList from '@/views/common/shelfList'
 import confirmModal from './confirmModal.vue'
 import confirmModal from './confirmModal.vue'
+import creatReplenishmentOrder from './creatReplenishmentOrder.vue'
 import stockModal from './stockModal.vue'
 import stockModal from './stockModal.vue'
 import printStickerModal from './printStickerModal.vue'
 import printStickerModal from './printStickerModal.vue'
 import outWarehousingModal from './outWarehousingModal.vue'
 import outWarehousingModal from './outWarehousingModal.vue'
 import putWarehousingModal from './putWarehousingModal.vue'
 import putWarehousingModal from './putWarehousingModal.vue'
-import { shelfReplenishList, shelfReplenishDetailList, shelfReplenishCancel, shelfReplenishStateCount, shelfReplenishDetailStock, shelfReplenishConfirm, shelfReplenishTaskInsertBill, shelfReplenishDelete } from '@/api/shelfReplenish'
+import { shelfReplenishList, shelfReplenishDetailList, shelfReplenishCancel, shelfReplenishStateCount, shelfReplenishDetailStock, shelfReplenishConfirm, shelfReplenishDelete } from '@/api/shelfReplenish'
 export default {
 export default {
-  components: { STable, VSelect, rangeDate, shelfSList, confirmModal, stockModal, printStickerModal, outWarehousingModal, putWarehousingModal },
+  components: { STable, VSelect, rangeDate, shelfSList, confirmModal, creatReplenishmentOrder, stockModal, printStickerModal, outWarehousingModal, putWarehousingModal },
   mixins: [commonMixin],
   mixins: [commonMixin],
   data () {
   data () {
     return {
     return {
@@ -203,19 +206,13 @@ export default {
       openPrintStickerModal: false,
       openPrintStickerModal: false,
       openOutWarehousingModal: false,
       openOutWarehousingModal: false,
       openPutWarehousingModal: false,
       openPutWarehousingModal: false,
+      openCreatRoModal: false,
       validateType: 'confirm',
       validateType: 'confirm',
       stockList: [],
       stockList: [],
       paramsData: null
       paramsData: null
     }
     }
   },
   },
   methods: {
   methods: {
-    // 定时任务
-    taskIn () {
-      shelfReplenishTaskInsertBill().then(res => {
-        this.$message.success(res.message)
-        this.resetSearchForm()
-      })
-    },
     // 确认
     // 确认
     handleConfirm (row) {
     handleConfirm (row) {
       this.nowData = row
       this.nowData = row

+ 2 - 2
vue.config.js

@@ -211,8 +211,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
     proxy: {
       '/api': {
       '/api': {
-        // target: 'http://192.168.0.215:8503/qpls-md',
-        target: 'http://p.iscm.360arrow.com/qpls-md',
+        target: 'http://192.168.0.183:8503/qpls-md',
+        // target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         // ws: false,
         ws: true,
         ws: true,
         changeOrigin: true,
         changeOrigin: true,