浏览代码

bug 修复

lilei 2 年之前
父节点
当前提交
ef8ce0699c

+ 1 - 1
public/version.json

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

+ 120 - 59
src/views/numsGoodsShelves/replenishmentManagement/creatReplenishmentOrder.vue

@@ -4,31 +4,69 @@
     class="creatReplenish-confirm-modal"
     :footer="null"
     :maskClosable="false"
-    title="生成补货单"
+    :title="modalTit"
     v-model="isShow"
     @cancel="isShow = false"
-    :width="800">
+    width="80%">
     <a-spin :spinning="spinning" tip="Loading...">
-      <div style="padding:0 0 20px;text-align: center;">
-        <h3>请选择需要生成补货单的数字货架</h3>
-        <div style="color:#999;font-size:12px;">(请从左侧选择货架并移动到右侧区域)</div>
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form-model
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :model="queryParam"
+          @keyup.enter.native="$refs.table.refresh(true)" >
+          <a-row :gutter="5">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input id="chooseShelf-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="8" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="chooseShelf-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="10" :sm="24">
+              <a-form-model-item label="库存情况">
+                <a-checkbox-group :options="options" @change="onStockChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:right;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" id="chooseShelf-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" id="chooseShelf-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form-model>
       </div>
-      <!-- 列表 -->
-      <div v-if="isShow">
-        <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>
+        <div class="table-operator">
+          <div>
+            <a-button type="primary" class="button-error" @click="handleSave">创建补货单</a-button>
+            <span v-if="selectTotal">已选{{ selectTotal }}款产品,共15件</span>
+          </div>
+          <div style="margin-left:20px;">
+            <a-checkbox>
+              仅显示已选产品
+            </a-checkbox>
+          </div>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :row-selection="{columnWidth: 40}"
+          @rowSelection="rowSelectionFun"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: 450 }"
+          :defaultLoadData="false"
+          :showPagination="false"
+          bordered>
+        </s-table>
       </div>
     </a-spin>
   </a-modal>
@@ -36,9 +74,11 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { queryListForSettle, shelfTaskInsertBill } from '@/api/shelfReplenish'
+import { STable, VSelect } from '@/components'
+import { shelfReplenishList, shelfTaskInsertBill } from '@/api/shelfReplenish'
 export default {
   name: 'ConfirmModal',
+  components: { STable, VSelect },
   mixins: [commonMixin],
   props: {
     openModal: { //  弹框显示状态
@@ -52,44 +92,71 @@ export default {
       }
     }
   },
+  computed: {
+    modalTit () {
+      const hjName = this.nowData && this.nowData.shelfInfo.shelfName ? this.nowData.shelfInfo.shelfName : ''
+      return '待补货产品 —— ' + hjName
+    },
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '库存批次', dataIndex: 'stockBatchNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '本次出库数量', dataIndex: 'outQty', width: '10%', 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 : '--') } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(5, 0, { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(7, 0, { title: '成本小计', dataIndex: 'totalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   data () {
     return {
       spinning: false,
       isShow: this.openModal, //  是否打开弹框
-      shelfList: [],
-      targetKeys: []
+      options: [
+        { label: '库存充足', value: '1' },
+        { label: '部分缺货', value: '2' },
+        { label: '全部缺货', value: '3' }
+      ],
+      queryParam: {
+        productCode: '', //  产品编码
+        productName: '' //  产品名称
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.spinning = true
+        return shelfReplenishList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data.list
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+            }
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      rowSelectionInfo: null
     }
   },
   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
+    onStockChange (val) {
+      console.log(val)
     },
-    handleChange (targetKeys, direction, moveKeys) {
-      console.log(targetKeys, direction, moveKeys)
-      this.targetKeys = targetKeys
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
     },
     //  确认补货
     handleSave () {
-      if (this.targetKeys.length == 0) {
-        this.$message.info('请选择货架!')
-        return false
-      }
-
       this.spinning = true
       shelfTaskInsertBill(this.targetKeys).then(res => {
         if (res.status == 200) {
@@ -109,13 +176,6 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
-        this.targetKeys = []
-        this.shelfList = []
-      } else {
-        const _this = this
-        this.$nextTick(() => { // 页面渲染完成后的回调
-          _this.getShelf()
-        })
       }
     }
   }
@@ -124,9 +184,10 @@ export default {
 
 <style lang="less">
 .creatReplenish-confirm-modal {
-	.btn-cont {
-		text-align: center;
-		margin: 35px 0 10px;
+	.table-operator {
+		padding:0 10px 10px 0;
+		display:flex;
+		align-items: center;
 	}
 }
 </style>

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

@@ -36,7 +36,6 @@
             </template>
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
-                <!-- <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 style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="replenishmentManagementList-reset">重置</a-button>
                 <a @click="advanced = !advanced" style="margin-left: 5px">
@@ -49,7 +48,7 @@
         </a-form>
         <!-- 操作按钮 -->
         <div class="table-operator">
-          <a-button type="primary" class="button-error">待补货产品</a-button>
+          <a-button type="primary" class="button-error" @click="openSlodOut=true">待补货产品</a-button>
           <span style="margin-left:10px;color:#999;">请点击此按钮,选择需要补货的产品创建补货单</span>
         </div>
       </div>
@@ -111,8 +110,8 @@
       <put-warehousing-modal :openModal="openPutWarehousingModal" :nowData="nowData" @ok="handlePutWarehousingOk" @close="handleCancel" />
       <!-- 详情 -->
       <detailModal :openModal="openDetailModal" :nowData="nowData" @close="handleCancel" />
-      <!-- 生成补货单 -->
-      <creatReplenishmentOrder :openModal="openCreatRoModal" :nowData="nowData" @ok="resetSearchForm" @close="openCreatRoModal=false" />
+      <!-- 待补货产品 -->
+      <slodOutModal :openModal="openSlodOut" @close="openSlodOut=false" />
     </a-spin>
   </a-card>
 </template>
@@ -124,15 +123,15 @@ import getDate from '@/libs/getDate.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 import shelfSList from '@/views/common/shelfList'
 import confirmModal from './confirmModal.vue'
-import creatReplenishmentOrder from './creatReplenishmentOrder.vue'
 import stockModal from './stockModal.vue'
 import printStickerModal from './printStickerModal.vue'
 import outWarehousingModal from './outWarehousingModal.vue'
 import putWarehousingModal from './putWarehousingModal.vue'
 import detailModal from './detailModal.vue'
+import slodOutModal from './slodOutModal.vue'
 import { shelfReplenishList, shelfReplenishDetailList, shelfReplenishCancel, shelfReplenishStateCount, shelfReplenishDetailStock, shelfReplenishConfirm, shelfReplenishDelete } from '@/api/shelfReplenish'
 export default {
-  components: { STable, VSelect, rangeDate, shelfSList, confirmModal, creatReplenishmentOrder, stockModal, printStickerModal, outWarehousingModal, putWarehousingModal, detailModal },
+  components: { STable, VSelect, rangeDate, shelfSList, confirmModal, stockModal, printStickerModal, outWarehousingModal, putWarehousingModal, detailModal, slodOutModal },
   mixins: [commonMixin],
   data () {
     return {
@@ -217,8 +216,8 @@ export default {
       openPrintStickerModal: false,
       openOutWarehousingModal: false,
       openPutWarehousingModal: false,
-      openCreatRoModal: false,
       openDetailModal: false,
+      openSlodOut: false,
       validateType: 'confirm',
       stockList: [],
       paramsData: null
@@ -397,7 +396,6 @@ export default {
     },
     // 重置数据
     resetData () {
-      this.openCreatRoModal = false
       this.$refs.rangeDate.resetDate(this.time)
       this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime

+ 153 - 0
src/views/numsGoodsShelves/replenishmentManagement/slodOutModal.vue

@@ -0,0 +1,153 @@
+<template>
+  <a-modal
+    centered
+    class="replenishmentManagement-confirm-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="待补货产品"
+    v-model="isShow"
+    @cancel="isShow = false"
+    width="80%">
+    <div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-row :gutter="15">
+              <a-col :md="8" :sm="24">
+                <a-form-item label="货架名称">
+                  <shelfSList v-model="queryParam.shelfSn"></shelfSList>
+                </a-form-item>
+              </a-col>
+              <a-col :md="8" :sm="24">
+                <span class="table-page-search-submitButtons">
+                  <a-button type="primary" style="margin-left: 5px" @click="$refs.table.refresh(true)" :disabled="disabled">查询</a-button>
+                  <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled">重置</a-button>
+                </span>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <div class="pages-wrap" style="margin-top:10px;">
+          <!-- 列表 -->
+          <s-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.id"
+            :columns="columns"
+            :data="loadData"
+            :scroll="{ y: 400 }"
+            bordered>
+            <template slot="action" slot-scope="text, record">
+              <span class="table-td-link" @click.stop="handleDetail(record)">产品明细</span>
+            </template>
+          </s-table>
+        </div>
+      </a-spin>
+      <!-- 生成补货单 -->
+      <creatReplenishmentOrder :openModal="openCreatRoModal" :nowData="nowData" @ok="resetSearchForm" @close="openCreatRoModal=false" />
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import shelfSList from '@/views/common/shelfList'
+import { shelfReplenishList } from '@/api/shelfReplenish'
+import creatReplenishmentOrder from './creatReplenishmentOrder.vue'
+export default {
+  name: 'SlodOutModal',
+  components: { STable, VSelect, shelfSList, creatReplenishmentOrder },
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      spinning: false,
+      openCreatRoModal: false,
+      disabled: false,
+      queryParam: {
+        shelfSn: undefined
+      },
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '货架名称', dataIndex: 'shelfInfo.shelfName', width: '35%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '待补产品款数', dataIndex: 'totalConfirmQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '待补产品数量', dataIndex: 'totalPutQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '最近一次补货时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return shelfReplenishList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.listData = data.list || []
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      localDataSource: [],
+      detailData: null, //  详情数据
+      nowData: null
+    }
+  },
+  methods: {
+    // 重置
+    resetSearchForm () {
+      this.queryParam.shelfSn = undefined
+      this.$refs.table.refresh(true)
+    },
+    handleDetail (row) {
+      this.nowData = row
+      this.openCreatRoModal = true
+    },
+    pageInit () {
+      const vm = this
+      vm.$nextTick(() => {
+        vm.spinning = false
+        vm.disabled = false
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      } else {
+        this.pageInit()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.replenishmentManagement-confirm-modal {
+	.btn-cont {
+		text-align: center;
+		margin: 35px 0 10px;
+	}
+}
+</style>

+ 27 - 1
src/views/salesManagement/salesQuery/chooseShelfProduct.vue

@@ -10,7 +10,7 @@
     width="80%">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-tabs>
-        <a-tab-pane key="1" tab="待补货产品">
+        <a-tab-pane key="1" tab="待补货产品" force-render>
           <!-- 搜索条件 -->
           <div class="table-page-search-wrapper">
             <a-form-model
@@ -48,12 +48,24 @@
             </a-form-model>
           </div>
           <div class="chooseShelf-modal-table">
+            <div class="table-operator">
+              <div>
+                <a-button type="primary" class="button-error">批量添加</a-button>
+                <span v-if="selectTotal">已选{{ selectTotal }}项</span>
+              </div>
+              <div>
+                <a-icon type="info-circle" />
+                此界面仅显示货架上需要补货的产品
+              </div>
+            </div>
             <!-- 列表 -->
             <s-table
               class="sTable"
               ref="table"
               size="small"
               :rowKey="(record) => record.id"
+              :row-selection="{columnWidth: 40}"
+              @rowSelection="rowSelectionFun"
               :columns="columns"
               :data="loadData"
               :scroll="{ y: 450 }"
@@ -173,6 +185,7 @@ export default {
           return data
         })
       },
+      rowSelectionInfo: null,
       // -------- 全部产品 --------
       productType1: [],
       queryParam1: {
@@ -205,6 +218,9 @@ export default {
     mtitle () {
       return '货架产品' + (this.baseData && this.baseData.shelfName ? this.baseData.shelfName : '')
     },
+    selectTotal () {
+      return this.rowSelectionInfo && this.rowSelectionInfo.selectedRows.length
+    },
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -244,6 +260,10 @@ export default {
     cansel () {
       this.isShow = false
     },
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
@@ -306,6 +326,12 @@ export default {
 		padding: 0;
     .chooseShelf-modal-table{
       padding: 0 20px 10px;
+      .table-operator{
+        padding:0 10px 10px 0;
+        display:flex;
+        justify-content: space-between;
+        align-items: center;
+      }
     }
     .table-page-search-wrapper{
       padding: 5px 20px 0;

+ 0 - 11
src/views/salesManagement/salesQuery/list.vue

@@ -85,17 +85,6 @@
                   <v-select code="FLAG" id="salesManagementList-distributionFlag" v-model="queryParam.distributionFlag" allowClear placeholder="请选择是否铺货出库"></v-select>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="铺货出库">
-                  <v-select
-                    v-model="queryParam.financialStatus"
-                    ref="financialStatus"
-                    code="FLAG"
-                    id="chooseCustom-distributionFlag"
-                    placeholder="请选择是否铺货出库"
-                    allowClear></v-select>
-                </a-form-item>
-              </a-col>
             </template>
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">