chenrui há 3 anos atrás
pai
commit
3d7dc643dd

+ 24 - 0
src/api/shelfReplenish.js

@@ -61,3 +61,27 @@ export const shelfReplenishDetail = (params) => {
     method: 'get'
   })
 }
+//  补货单 入库
+export const shelfReplenishPutStock = (params) => {
+  return axios({
+    url: '/shelfReplenish/putStock',
+    data: params,
+    method: 'post'
+  })
+}
+//  补货单 出库
+export const shelfReplenishOutStock = (params) => {
+  return axios({
+    url: '/shelfReplenish/outStock',
+    data: params,
+    method: 'post'
+  })
+}
+//  补货单 打印贴签
+export const shelfReplenishPrintSign = (params) => {
+  return axios({
+    url: '/shelfReplenish/detail/printSign',
+    data: params,
+    method: 'post'
+  })
+}

+ 3 - 8
src/views/numsGoodsShelves/replenishmentManagement/confirmModal.vue

@@ -10,8 +10,8 @@
     :width="800">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-descriptions>
-        <a-descriptions-item label="补货单号">{{ this.nowData && this.nowData.replenishBillNo || '--' }}</a-descriptions-item>
-        <!-- <a-descriptions-item label="单据来源">{{this.nowData && this.nowData.billType || '--'}}</a-descriptions-item> -->
+        <a-descriptions-item label="补货单号">{{ nowData && nowData.replenishBillNo || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="创建时间">{{ nowData && nowData.createDate || '--' }}</a-descriptions-item>
       </a-descriptions>
       <!-- 列表 -->
       <s-table
@@ -128,12 +128,7 @@ export default {
             }
           })
           if (arrInd.length > 0) {
-            let str = ''
-            arrInd.map(item => {
-              str += item + '、'
-            })
-            str = str.substr(0, str.length - 1)
-            _this.$message.warning('请完善第' + str + '行数据后再提交')
+            _this.$message.warning('操作失败!实发数量不能为空')
             return
           }
           const params = {

+ 41 - 39
src/views/numsGoodsShelves/replenishmentManagement/list.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -69,15 +69,16 @@
           :columns="subColumns"
           :data-source="listData[index].subList"
           :pagination="false"
-          bordered>
+          :bordered="false"
+          style="margin: 15px 10px;">
         </a-table>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button size="small" type="link" class="button-primary" @click.stop="handleConfirm(record)">确认</a-button>
-          <a-button size="small" type="link" class="button-primary" @click.stop="handlePrintSticker(record)">打印贴签</a-button>
-          <a-button size="small" type="link" class="button-primary" @click.stop="handleOutWarehousing(record)">出库</a-button>
-          <a-button size="small" type="link" class="button-primary" @click.stop="handlePutWarehousing(record)">入库</a-button>
-          <a-button size="small" type="link" class="button-primary" @click.stop="handleCancelOrder(record)">取消补货单</a-button>
+          <a-button v-if="record.billState=='WAIT_CONFIRM'" size="small" type="link" class="button-primary" @click.stop="handleConfirm(record)">确认</a-button>
+          <a-button v-if="record.billState=='WAIT_OUT_STOCK'" size="small" type="link" class="button-primary" @click.stop="handlePrintSticker(record)">打印贴签</a-button>
+          <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>
         </template>
       </s-table>
       <!-- 确认 -->
@@ -93,8 +94,8 @@
       <!-- 打印贴签 -->
       <print-sticker-modal :openModal="openPrintStickerModal" :nowData="nowData" @ok="handlePrintStickerOk" @close="handleCancel" />
       <!-- 出库 -->
-      <out-warehousing-modal :openModal="openOutWarehousingModal" :nowData="nowData" @ok="handleValidate" @close="handleCancel" />
-      <!-- 入库 -->
+      <out-warehousing-modal :openModal="openOutWarehousingModal" :nowData="nowData" @ok="handleOutWarehousingOk" @close="handleCancel" />
+      <!-- 签收 -->
       <put-warehousing-modal :openModal="openPutWarehousingModal" :nowData="nowData" @ok="handlePutWarehousingOk" @close="handleCancel" />
     </a-spin>
   </a-card>
@@ -103,6 +104,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
+import getDate from '@/libs/getDate.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 import shelfSList from '@/views/common/shelfList.vue'
 import confirmModal from './confirmModal.vue'
@@ -121,10 +123,15 @@ export default {
       tableHeight: 0,
       disabled: false, //  查询、重置按钮是否可操作
       curBizType: 'ALL',
+      time: [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ],
+      // 查询参数
       queryParam: {
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         bizType: 'ALL',
-        beginDate: null,
-        endDate: null,
         replenishBillNo: '',
         shelfSn: undefined,
         productCode: '',
@@ -138,8 +145,8 @@ export default {
         { title: '状态', dataIndex: 'billStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '补货应发总量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '实发总量', dataIndex: 'totalConfirmQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库总量', dataIndex: 'totalPutQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '18%', align: 'center' }
+        { title: '签收总量', dataIndex: 'totalPutQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '18%', align: 'left' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -167,7 +174,7 @@ export default {
         { title: '产品名称', dataIndex: 'productName', width: '28%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '补货应发总量', dataIndex: 'qty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '实发总量', dataIndex: 'confirmQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库总量', dataIndex: 'putQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '签收总量', dataIndex: 'putQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'productUnit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       listData: [],
@@ -189,11 +196,6 @@ export default {
       this.nowData = row
       this.openConfirmModal = true
     },
-    // 确认 ok
-    handleConfirmOk () {
-      // 校验产品库存是否足够
-      this.openStockModal = true
-    },
     // cancel
     handleCancel () {
       this.nowData = null
@@ -224,7 +226,11 @@ export default {
       this.openPrintStickerModal = true
     },
     // 打印贴签 ok
-    handlePrintStickerOk () {},
+    handlePrintStickerOk () {
+      this.nowData = null
+      this.openPrintStickerModal = false
+      this.$refs.table.refresh(true)
+    },
     // 出库
     handleOutWarehousing (row) {
       this.nowData = row
@@ -232,7 +238,9 @@ export default {
     },
     // 出库 ok
     handleOutWarehousingOk () {
-
+      this.nowData = null
+      this.openOutWarehousingModal = false
+      this.$refs.table.refresh(true)
     },
     handleValidate (type, params) {
       // 校验产品库存是否足够
@@ -261,14 +269,16 @@ export default {
         }
       })
     },
-    // 入库
+    // 签收
     handlePutWarehousing (row) {
       this.nowData = row
       this.openPutWarehousingModal = true
     },
-    // 入库 ok
+    // 签收 ok
     handlePutWarehousingOk () {
+      this.nowData = null
       this.openPutWarehousingModal = false
+      this.$refs.table.refresh(true)
     },
     // 取消补货单
     handleCancelOrder (row) {
@@ -295,14 +305,6 @@ export default {
     shelfChange (obj) {
       this.queryParam.shelfSn = obj.key || undefined
     },
-    // 自定义展开图标
-    customExpandIcon (props) {
-      if (props.expanded) {
-        return <a style={{ color: 'black', marginRight: 8 }} onClick={e => { props.onExpand(props.record, e) }}><a-button size="small" type="link" class="button-primary">收起</a-button></a>
-      } else {
-        return <a style={{ color: 'black', marginRight: 8 }} onClick={e => { props.onExpand(props.record, e) }}><a-button size="small" type="link" class="button-primary">展开</a-button></a>
-      }
-    },
     expandFun (expanded, record) {
       if (expanded) {
         this.getSubItem(record) // 获取表格内部数据
@@ -333,10 +335,10 @@ export default {
     },
     // 重置数据
     resetData () {
-      this.$refs.rangeDate.resetDate()
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.bizType = this.curBizType
-      this.queryParam.beginDate = null
-      this.queryParam.endDate = null
       this.queryParam.replenishBillNo = ''
       this.queryParam.shelfSn = undefined
       this.$refs.shelfList.resetForm()
@@ -364,11 +366,11 @@ export default {
         if (res.data && res.status == 200) {
           this.tabPaneData = [
             { bizName: '全部', bizType: 'ALL', countNum: null },
-            { bizName: '待确认', bizType: 'SAF', countNum: 0 },
-            { bizName: '待出库', bizType: 'DFG', countNum: 0 },
-            { bizName: '待入库', bizType: 'CDE', countNum: 0 },
-            { bizName: '已完成', bizType: 'VBN', countNum: null },
-            { bizName: '已取消', bizType: 'XCV', countNum: null }
+            { bizName: '待确认', bizType: 'WAIT_CONFIRM', countNum: 0 },
+            { bizName: '待出库', bizType: 'WAIT_OUT_STOCK', countNum: 0 },
+            { bizName: '待签收', bizType: 'WAIT_CHECK', countNum: 0 },
+            { bizName: '已完成', bizType: 'FINISH', countNum: null },
+            { bizName: '已取消', bizType: 'CANCEL', countNum: null }
           ]
           this.queryParam.bizType = 'ALL'
           this.tabPaneData[1].countNum = res.data.dqr || 0

+ 83 - 37
src/views/numsGoodsShelves/replenishmentManagement/outWarehousingModal.vue

@@ -18,21 +18,21 @@
         style="margin-bottom: 10px;" >
         <a-row :gutter="15">
           <a-col :md="12" :sm="24">
-            <a-form-model-item label="补货单号">BH202101010001</a-form-model-item>
+            <a-form-model-item label="补货单号">{{ basicInfoData && basicInfoData.replenishBillNo || '--' }}</a-form-model-item>
           </a-col>
           <a-col :md="12" :sm="24">
-            <a-form-model-item label="单据来源">系统创建</a-form-model-item>
+            <a-form-model-item label="创建时间">{{ basicInfoData && basicInfoData.createDate || '--' }}</a-form-model-item>
           </a-col>
           <a-col :md="12" :sm="24">
-            <a-form-model-item label="调往对象" prop="type">
-              <a-radio-group v-model="form.type">
-                <a-radio v-for="(item,index) in typeList" :key="index" :value="item.val">{{ item.name }}</a-radio>
+            <a-form-model-item label="配送方式" prop="dispatchType" style="margin: 0;">
+              <a-radio-group v-model="form.dispatchType">
+                <a-radio v-for="(item,index) in dispatchTypeList" :key="index" :value="item.code">{{ item.dispName }}</a-radio>
               </a-radio-group>
             </a-form-model-item>
           </a-col>
           <a-col :md="12" :sm="24">
             <a-form-model-item label="出库备注">
-              <a-input id="replenishmentManagement-outWarehousing-remark" v-model.trim="form.remark" allowClear placeholder="请输入出库备注"/>
+              <a-input id="replenishmentManagement-outWarehousing-remarks" v-model.trim="form.remarks" allowClear placeholder="请输入出库备注"/>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -61,7 +61,8 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import { storeCallOutList } from '@/api/storeCallOut'
+import { getLookUpItem } from '@/api/lookup'
+import { shelfReplenishDetailList, shelfReplenishDetail, shelfReplenishOutStock } from '@/api/shelfReplenish'
 export default {
   name: 'OutWarehousingModal',
   components: { STable, VSelect },
@@ -84,46 +85,48 @@ export default {
       isShow: this.openModal, //  是否打开弹框
       columns: [
         { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
-        { title: '产品编码', dataIndex: 'allocationLinkagePutNo', width: '22%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'outTenantName', width: '32%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '补货应发数量', dataIndex: 'productTotalCategory', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '实发数量', dataIndex: 'outQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品编码', dataIndex: 'productCode', width: '22%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '32%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '补货应发数量', dataIndex: 'qty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '实发数量', dataIndex: 'confirmQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'productUnit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return storeCallOutList(Object.assign(parameter, this.queryParam)).then(res => {
+        return shelfReplenishDetailList(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
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = i + 1
             }
             this.disabled = false
+            this.listData = data || []
           }
           this.spinning = false
           return data
         })
       },
       form: {
-        type: undefined,
-        remark: ''
+        dispatchType: undefined,
+        remarks: ''
       },
       rules: {
-        'type': [{ required: true, message: '请选择配送方式', trigger: ['blur', 'change'] }]
+        'dispatchType': [{ required: true, message: '请选择配送方式', trigger: ['blur', 'change'] }]
       },
-      typeList: [
+      dispatchTypeList: [
         { name: '送货到店', val: 1 },
         { name: '快递到店', val: 2 }
-      ]
+      ],
+      listData: [],
+      basicInfoData: null
     }
   },
   computed: {
     modalTit () {
-      const hjName = this.nowData && this.nowData.settleClientName ? this.nowData.settleClientName : ''
+      const hjName = this.nowData && this.nowData.shelfName ? this.nowData.shelfName : ''
       return '补货单出库——' + hjName
     }
   },
@@ -131,22 +134,62 @@ export default {
     //  确认出库
     handleSave () {
       const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确认信息无误并进行出库吗?',
-        centered: true,
-        onOk () {
-          _this.$emit('ok', 'outWarehousing')
-          // _this.spinning = true
-          // storeCallOutOut({ storeCallOutSn: row.storeCallOutSn }).then(res => {
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //     _this.spinning = false
-          //   } else {
-          //     _this.spinning = false
-          //   }
-          // })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$confirm({
+            title: '提示',
+            content: '确认信息无误并进行出库吗?',
+            centered: true,
+            onOk () {
+              const arr = []
+              _this.listData.map((item, index) => {
+                arr.push({
+                  productSn: item.productSn,
+                  confirmQty: item.confirmQty
+                })
+              })
+              const params = {
+                replenishBillSn: _this.nowData && _this.nowData.replenishBillSn,
+                detailList: arr,
+                dispatchType: _this.form.dispatchType,
+                remarks: _this.form.remarks
+              }
+              _this.spinning = true
+              shelfReplenishOutStock(params).then(res => {
+                if (res.status == 200) {
+                  _this.$message.success(res.message)
+                  _this.$emit('ok')
+                  _this.spinning = false
+                  _this.isShow = false
+                } else {
+                  _this.spinning = false
+                }
+              })
+            }
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    // 基本信息
+    getDetail () {
+      shelfReplenishDetail({ sn: this.nowData && this.nowData.replenishBillSn }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData = res.data
+        } else {
+          this.basicInfoData = null
+        }
+      })
+    },
+    // 配送方式
+    getLookUpItem () {
+      getLookUpItem({ lookupCode: 'DISTRIBUTION_MODE', pageNo: 1, pageSize: 1000 }).then(res => {
+        if (res.status == 200 && res.data && res.data.list) {
+          this.dispatchTypeList = res.data.list
+        } else {
+          this.basicInfoData = []
         }
       })
     }
@@ -161,8 +204,11 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.$refs.table.clearTable()
+        this.$refs.ruleForm.resetFields()
       } else {
         const _this = this
+        this.getLookUpItem()
+        this.getDetail()
         this.$nextTick(() => { // 页面渲染完成后的回调
           _this.$refs.table.refresh(true)
         })

+ 50 - 32
src/views/numsGoodsShelves/replenishmentManagement/printStickerModal.vue

@@ -9,13 +9,10 @@
     @cancle="isShow = false"
     :width="800">
     <a-spin :spinning="spinning" tip="Loading...">
-      <div style="display: flex;justify-content: space-between;margin-bottom: 10px;">
-        <a-descriptions>
-          <a-descriptions-item label="补货单号">BH202101010001</a-descriptions-item>
-          <a-descriptions-item label="单据来源">系统创建</a-descriptions-item>
-        </a-descriptions>
-        <a-button type="primary" class="button-primary" id="replenishmentManagement-printSticker-export" @click="handlePrint">开始打印</a-button>
-      </div>
+      <a-descriptions>
+        <a-descriptions-item label="补货单号">{{ basicInfoData && basicInfoData.replenishBillNo || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="创建时间">{{ basicInfoData && basicInfoData.createDate || '--' }}</a-descriptions-item>
+      </a-descriptions>
       <!-- 列表 -->
       <s-table
         class="sTable"
@@ -23,7 +20,7 @@
         size="small"
         :rowKey="(record) => record.id"
         rowKeyName="id"
-        :row-selection="{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.state == 'FINISH' } }) }"
+        :row-selection="{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.confirmQty == 0 } }) }"
         @rowSelection="rowSelectionFun"
         :columns="columns"
         :data="loadData"
@@ -32,20 +29,22 @@
         :defaultLoadData="false"
         bordered>
         <!-- 打印数量 -->
-        <template slot="outQty" slot-scope="text, record">
+        <template slot="printQty" slot-scope="text, record">
           <a-input-number
+            v-if="record.confirmQty!=0"
             size="small"
-            id="replenishmentManagement-printSticker-outQty"
-            v-model="record.outQty"
+            id="replenishmentManagement-printSticker-printQty"
+            v-model="record.printQty"
             :precision="0"
-            :min="0"
-            :max="record.qty"
+            :min="1"
+            :max="record.confirmQty"
             placeholder="请输入"
-            :style="{width: '100%', color: record.outQty==0 ? 'red': ''}" />
+            style="width: 100%" />
+          <span v-else>--</span>
         </template>
       </s-table>
       <div class="btn-cont">
-        <a-button type="primary" id="replenishmentManagement-printSticker-modal-save" @click="handleSave">确认打印完成</a-button>
+        <a-button type="primary" id="replenishmentManagement-printSticker-modal-save" @click="handleSave">开始打印</a-button>
         <a-button id="replenishmentManagement-printSticker-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
       </div>
     </a-spin>
@@ -55,7 +54,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import { storeCallOutList } from '@/api/storeCallOut'
+import { shelfReplenishDetailList, shelfReplenishDetail, shelfReplenishPrintSign } from '@/api/shelfReplenish'
 export default {
   name: 'PrintStickerModal',
   components: { STable, VSelect },
@@ -77,37 +76,40 @@ export default {
       spinning: false,
       isShow: this.openModal, //  是否打开弹框
       columns: [
-        { title: '产品编码', dataIndex: 'allocationLinkagePutNo', width: '22%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'outTenantName', width: '30%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '补货应发数量', dataIndex: 'productTotalCategory', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '实发数量', dataIndex: 'productTotalCategssory', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '打印数量', scopedSlots: { customRender: 'outQty' }, width: '15%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '22%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '30%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '补货应发数量', dataIndex: 'qty', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '实发数量', dataIndex: 'confirmQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '打印数量', scopedSlots: { customRender: 'printQty' }, width: '15%', align: 'center' },
         { title: '单位', dataIndex: 'productUnit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return storeCallOutList(Object.assign(parameter, this.queryParam)).then(res => {
+        return shelfReplenishDetailList(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
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = i + 1
+              data[i].printQty = data[i].confirmQty
             }
             this.disabled = false
+            this.listData = data || []
           }
           this.spinning = false
           return data
         })
       },
-      rowSelectionInfo: null
+      rowSelectionInfo: null,
+      listData: [],
+      basicInfoData: null
     }
   },
   computed: {
     modalTit () {
-      const hjName = this.nowData && this.nowData.settleClientName ? this.nowData.settleClientName : ''
+      const hjName = this.nowData && this.nowData.shelfName ? this.nowData.shelfName : ''
       return '补货单打印贴签——' + hjName
     }
   },
@@ -116,15 +118,30 @@ export default {
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
     },
-    //  确认打印完成
+    //  开始打印
     handleSave () {
-      this.$emit('ok')
-    },
-    // 开始打印
-    handlePrint () {
       if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRows.length < 1)) {
         this.$message.warning('请至少选择一个产品')
+        return
       }
+      this.spinning = true
+      shelfReplenishPrintSign({ replenishBillSn: this.nowData && this.nowData.replenishBillSn }).then(res => {
+        if (res.status == 200) {
+          this.$emit('ok')
+          this.isShow = false
+        }
+        this.spinning = false
+      })
+    },
+    // 基本信息
+    getDetail () {
+      shelfReplenishDetail({ sn: this.nowData && this.nowData.replenishBillSn }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData = res.data
+        } else {
+          this.basicInfoData = null
+        }
+      })
     }
   },
   watch: {
@@ -139,6 +156,7 @@ export default {
         this.$refs.table.clearTable()
       } else {
         const _this = this
+        this.getDetail()
         this.$nextTick(() => { // 页面渲染完成后的回调
           _this.$refs.table.refresh(true)
         })

+ 48 - 23
src/views/numsGoodsShelves/replenishmentManagement/putWarehousingModal.vue

@@ -13,15 +13,18 @@
         <a-descriptions-item label="补货单号">{{ basicInfoData && basicInfoData.replenishBillNo || '--' }}</a-descriptions-item>
         <a-descriptions-item label="创建时间">{{ basicInfoData && basicInfoData.createDate || '--' }}</a-descriptions-item>
         <a-descriptions-item label="配送方式">{{ basicInfoData && basicInfoData.dispatchTypeDictValue || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="出库备注" :span="3">
+      </a-descriptions>
+      <div style="padding-bottom: 16px;display: flex;">
+        <p style="margin: 0;display: inline-block;flex-shrink: 0;">出库备注:</p>
+        <div style="display: inline-block;vertical-align: bottom;flex-grow: 1;max-width: 90%;cursor: pointer;">
           <a-tooltip placement="bottom">
             <template slot="title">
               <span>{{ basicInfoData && basicInfoData.remarks || '--' }}</span>
             </template>
             <p class="text-ellipsis">{{ basicInfoData && basicInfoData.remarks || '--' }}</p>
           </a-tooltip>
-        </a-descriptions-item>
-      </a-descriptions>
+        </div>
+      </div>
       <!-- 列表 -->
       <s-table
         class="sTable"
@@ -34,21 +37,23 @@
         :showPagination="false"
         :defaultLoadData="false"
         bordered>
-        <!-- 入库数量 -->
+        <!-- 签收数量 -->
         <template slot="putQty" slot-scope="text, record">
           <a-input-number
+            v-if="record.confirmQty!=0"
             size="small"
             id="replenishmentManagement-outWarehousing-putQty"
             v-model="record.putQty"
             :precision="0"
             :min="0"
-            :max="record.qty"
+            :max="record.confirmQty"
             placeholder="请输入"
             style="width: 100%" />
+          <span v-else>--</span>
         </template>
       </s-table>
       <div class="btn-cont">
-        <a-button type="primary" id="replenishmentManagement-outWarehousing-modal-save" @click="handleSave">确认入库</a-button>
+        <a-button type="primary" id="replenishmentManagement-outWarehousing-modal-save" @click="handleSave">确认签收</a-button>
         <a-button id="replenishmentManagement-outWarehousing-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
       </div>
     </a-spin>
@@ -58,7 +63,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import { shelfReplenishDetailList, shelfReplenishDetail } from '@/api/shelfReplenish'
+import { shelfReplenishDetailList, shelfReplenishDetail, shelfReplenishPutStock } from '@/api/shelfReplenish'
 export default {
   name: 'PutWarehousingModal',
   components: { STable, VSelect },
@@ -85,7 +90,7 @@ export default {
         { title: '产品名称', dataIndex: 'productName', width: '28%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '补货应发数量', dataIndex: 'qty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '实发数量', dataIndex: 'confirmQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库数量', scopedSlots: { customRender: 'putQty' }, width: '15%', align: 'center' },
+        { title: '签收数量', scopedSlots: { customRender: 'putQty' }, width: '15%', align: 'center' },
         { title: '单位', dataIndex: 'productUnit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -98,42 +103,62 @@ export default {
             data = res.data
             for (var i = 0; i < data.length; i++) {
               data[i].no = i + 1
+              data[i].putQty = data[i].confirmQty
             }
             this.disabled = false
+            this.listData = data || []
           }
           this.spinning = false
           return data
         })
       },
+      listData: [],
       basicInfoData: null
     }
   },
   computed: {
     modalTit () {
-      const hjName = this.nowData && this.nowData.settleClientName ? this.nowData.settleClientName : ''
-      return '补货单入库——' + hjName
+      const hjName = this.nowData && this.nowData.shelfName ? this.nowData.shelfName : ''
+      return '补货单签收——' + hjName
     }
   },
   methods: {
-    //  确认入库
+    //  确认签收
     handleSave () {
       const _this = this
       this.$confirm({
         title: '提示',
-        content: '入库后数字货架的产品数量将增加,确认入库吗?',
+        content: '签收后数字货架的产品数量将增加,确认签收吗?',
         centered: true,
         onOk () {
-          _this.$emit('ok')
-          // _this.spinning = true
-          // storeCallOutOut({ storeCallOutSn: row.storeCallOutSn }).then(res => {
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //     _this.spinning = false
-          //   } else {
-          //     _this.spinning = false
-          //   }
-          // })
+          const arr = []
+          const arrInd = []
+          _this.listData.map((item, index) => {
+            if (item.putQty || item.putQty == 0) {
+              arr.push({ productSn: item.productSn, putQty: item.putQty })
+            } else {
+              arrInd.push(index + 1)
+            }
+          })
+          if (arrInd.length > 0) {
+            _this.$message.warning('操作失败!签收数量不能为空')
+            return
+          }
+          const params = {
+            replenishBillSn: _this.nowData && _this.nowData.replenishBillSn,
+            detailList: arr
+          }
+          _this.spinning = true
+          shelfReplenishPutStock(params).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$emit('ok')
+              _this.spinning = false
+              _this.isShow = false
+            } else {
+              _this.spinning = false
+            }
+          })
         }
       })
     },

+ 1 - 1
src/views/numsGoodsShelves/replenishmentManagement/stockModal.vue

@@ -59,7 +59,7 @@ export default {
         return []
       }
     },
-    type: { // 校验类型。confirm:确认;outWarehousing:出库
+    type: { // 校验类型。confirm:确认;
       type: String,
       default: 'confirm'
     }

+ 1 - 6
src/views/numsGoodsShelves/shelfMonitoring/addModal.vue

@@ -114,12 +114,7 @@ export default {
         }
       })
       if (arrInd.length > 0) {
-        let str = ''
-        arrInd.map(item => {
-          str += item + '、'
-        })
-        str = str.substr(0, str.length - 1)
-        this.$message.warning('第' + str + '条数据调回数量为空或0,请移除后提交')
+        this.$message.warning('调回数量不能为空或0,请移除后提交')
         return
       }
       const params = {

+ 1 - 1
src/views/numsGoodsShelves/shelfMonitoring/list.vue

@@ -185,7 +185,7 @@ export default {
         { title: '当前库存', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '最大库容', dataIndex: 'maxQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '滞销天数', dataIndex: 'unsalableDays', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'left' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 2 - 21
src/views/numsGoodsShelves/shelfSet/basicInfoModal.vue

@@ -20,22 +20,6 @@
         <a-form-model-item label="关联客户" prop="customerSn">
           <custList ref="custList" @change="custChange"></custList>
         </a-form-model-item>
-        <a-form-model-item label="临配运费" prop="tempFreight">
-          <a-row>
-            <a-col :span="20">
-              <a-input-number
-                id="shelfSet-basicInfo-tempFreight"
-                v-model="form.tempFreight"
-                :precision="2"
-                :min="0"
-                :max="999999"
-                placeholder="请输入正数(最多允许两位小数)"
-                suffix="元"
-                style="width: 100%;display: inline-block;" />
-            </a-col>
-            <a-col :span="4"><span style="margin-left: 10px;">元</span></a-col>
-          </a-row>
-        </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
         <a-button type="primary" id="shelfSet-basicInfo-modal-save" @click="handleSave">保存</a-button>
@@ -76,12 +60,10 @@ export default {
         wrapperCol: { span: 18 }
       },
       form: {
-        customerSn: undefined,
-        tempFreight: ''
+        customerSn: undefined
       },
       rules: {
-        customerSn: [{ required: true, message: '请选择关联客户', trigger: 'change' }],
-        tempFreight: [{ required: true, message: '请输入临配运费', trigger: 'blur' }]
+        customerSn: [{ required: true, message: '请选择关联客户', trigger: 'change' }]
       }
     }
   },
@@ -136,7 +118,6 @@ export default {
             _this.form.customerSn = _this.nowData.customerSn
           })
         }
-        this.form.tempFreight = this.nowData.tempFreight || ''
       }
     }
   }

+ 3 - 4
src/views/numsGoodsShelves/shelfSet/list.vue

@@ -94,9 +94,8 @@ export default {
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '货架名称', dataIndex: 'shelfName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '关联客户', dataIndex: 'customerName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '临配运费', dataIndex: 'tempFreight', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '货位数量', scopedSlots: { customRender: 'shelfPlaceNum' }, width: '10%', align: 'center' },
-        { title: '是否设置完成', scopedSlots: { customRender: 'finishFlag' }, width: '15%', align: 'center' },
+        { title: '货位数量', scopedSlots: { customRender: 'shelfPlaceNum' }, width: '15%', align: 'center' },
+        { title: '是否设置完成', scopedSlots: { customRender: 'finishFlag' }, width: '20%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'left' }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -124,7 +123,7 @@ export default {
   methods: {
     // 设置/修改
     handleSet (row) {
-      if (row.customerSn && row.tempFreight) {
+      if (row.customerSn) {
         this.$router.push({ path: `/numsGoodsShelves/shelfSet/set/${row.shelfSn}` })
       } else {
         this.nowData = {

+ 0 - 1
src/views/numsGoodsShelves/shelfSet/set.vue

@@ -18,7 +18,6 @@
             </template>
             <a-descriptions :column="3">
               <a-descriptions-item label="关联客户">{{ (basicInfoData&&basicInfoData.customerName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="临配运费">{{ (basicInfoData&&(basicInfoData.tempFreight || basicInfoData.tempFreight==0)) ? basicInfoData.tempFreight : '--' }}</a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
         </a-collapse>