chenrui 2 年 前
コミット
60c8e13702

+ 1 - 1
public/version.json

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

+ 3 - 3
src/components/index.less

@@ -396,7 +396,7 @@
   }
   .ant-table-row{
     td{
-      > div:empty::after{
+      > div:not(.ant-table-row-expand-icon):empty::after{
         content: '--';
       }
       .ant-select-search__field__mirror{
@@ -408,7 +408,7 @@
     margin: 0;
     tr:hover{
       td{
-        > div:empty::after{
+        > div:not(.ant-table-row-expand-icon):empty::after{
           content: '--';
         }
       }
@@ -430,7 +430,7 @@
         }
       }
     }
-    td > div:empty{
+    td > div:not(.ant-table-row-expand-icon):empty{
       &::after{
         content:'--'
       }

+ 10 - 1
src/views/inventoryManagement/inventoryChecking/selfDisk.vue

@@ -49,6 +49,11 @@
                       <ProductBrand id="inventoryCheckSelfDiskList-productBrand" sysFlag="" v-model="queryParam.brandSn"></ProductBrand>
                     </a-form-item>
                   </a-col>
+                  <a-col :md="2" :sm="8">
+                    <a-form-item label="">
+                      <a-checkbox @change="onlySeeStock">只查看有库存</a-checkbox>
+                    </a-form-item>
+                  </a-col>
                   <template v-if="advanced">
                     <a-col :md="6" :sm="24">
                       <a-form-item label="产品分类">
@@ -63,7 +68,7 @@
                       </a-form-item>
                     </a-col>
                   </template>
-                  <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                  <a-col :md="4" :sm="16" style="margin-bottom: 10px;">
                     <a-button type="primary" @click="searchForm" :disabled="disabled" id="inventoryCheckSelfDiskList-refresh">查询</a-button>
                     <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckSelfDiskList-reset">重置</a-button>
                     <a @click="advanced=!advanced" style="margin-left: 5px">
@@ -575,6 +580,10 @@ export default {
           }
         }
       }
+    },
+    // 只查看有库存
+    onlySeeStock (e) {
+      console.log('1111111111:')
     }
   },
   mounted () {

+ 2 - 1
src/views/numsGoodsShelves/replenishmentManagement/confirmModal.vue

@@ -122,7 +122,8 @@ export default {
               arr.push({
                 productSn: item.productSn,
                 confirmQty: item.confirmQty,
-                replenishBillDetailSn: item.replenishBillDetailSn
+                replenishBillDetailSn: item.replenishBillDetailSn,
+                id: item.id
               })
             } else {
               arrInd.push(index + 1)

+ 156 - 0
src/views/numsGoodsShelves/replenishmentManagement/detailModal.vue

@@ -0,0 +1,156 @@
+<template>
+  <a-modal
+    centered
+    class="replenishmentManagement-confirm-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="modalTit"
+    v-model="isShow"
+    @cancel="isShow = false"
+    :width="800">
+    <div v-if="nowData">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 基础信息 -->
+        <div v-if="detailData">
+          <a-descriptions size="small" :column="3">
+            <a-descriptions-item label="补货单号">{{ detailData && detailData.replenishBillNo || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="创建时间">{{ detailData && detailData.createDate || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="状态">{{ detailData&&detailData.billStateDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="出库时间">{{ detailData&&detailData.outStockTime || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="签收时间">{{ detailData&&detailData.putStockTime || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="出库备注">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="关联销售单" :span="3" v-if="detailData.billState=='WAIT_CHECK' || detailData.billState=='WAIT_OUT_STOCK' || detailData.billState=='FINISH'">
+              <a-button type="link" class="button-info">XS234234234;</a-button>
+              <a-button type="primary" class="button-info">生成销售单</a-button>
+            </a-descriptions-item>
+          </a-descriptions>
+        </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 }"
+            :showPagination="false"
+            bordered>
+          </s-table>
+        </div>
+      </a-spin>
+    </div>
+    <div class="btn-cont">
+      <a-button @click="isShow = false">关闭</a-button>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import { shelfReplenishDetailList, shelfReplenishDetail } from '@/api/shelfReplenish'
+export default {
+  name: 'DetailModal',
+  components: { STable, VSelect },
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    nowData: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      spinning: false,
+      disabled: false,
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '产品编码', dataIndex: 'product.code', width: '22%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'product.name', 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: 'putQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return shelfReplenishDetailList({ replenishBillSn: this.nowData.replenishBillSn }).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = i + 1
+            }
+            this.disabled = false
+            this.listData = data || []
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      localDataSource: [],
+      detailData: null //  详情数据
+    }
+  },
+  computed: {
+    modalTit () {
+      const hjName = this.nowData && this.nowData.shelfInfo.shelfName ? this.nowData.shelfInfo.shelfName : ''
+      return '补货单详情 —— ' + hjName
+    }
+  },
+  methods: {
+    // 基本信息
+    getDetail () {
+      shelfReplenishDetail({ sn: this.nowData.replenishBillSn }).then(res => {
+        if (res.status == 200) {
+          this.detailData = res.data
+        } else {
+          this.detailData = null
+        }
+      })
+    },
+    pageInit () {
+      const vm = this
+      vm.$nextTick(() => {
+        vm.spinning = false
+        vm.disabled = false
+        vm.getDetail()
+      })
+    }
+  },
+  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>

+ 44 - 28
src/views/numsGoodsShelves/replenishmentManagement/list.vue

@@ -36,7 +36,7 @@
             </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="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">
@@ -47,6 +47,11 @@
             </a-col>
           </a-row>
         </a-form>
+        <!-- 操作按钮 -->
+        <div class="table-operator">
+          <a-button type="primary" class="button-error">待补货产品</a-button>
+          <span style="margin-left:10px;color:#999;">请点击此按钮,选择需要补货的产品创建补货单</span>
+        </div>
       </div>
       <s-table
         class="sTable fixPagination"
@@ -76,13 +81,17 @@
         </a-table>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <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_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="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-error" @click.stop="handleDelete(record)">删除</a-button>
           <a-button v-if="record.billState!='CANCEL'&&record.billState!='WAIT_CONFIRM'" size="small" type="link" class="button-primary" @click.stop="handlePrintSticker(record)">打印贴签</a-button>
         </template>
+        <!-- 补货单号 -->
+        <template slot="replenishBillNo" slot-scope="text, record">
+          <span class="table-td-link" @click.stop="handleDetail(record)">{{ record.replenishBillNo }}</span>
+        </template>
       </s-table>
       <!-- 确认 -->
       <confirm-modal :openModal="openConfirmModal" :nowData="nowData" @ok="handleValidate" @close="handleCancel" />
@@ -100,6 +109,8 @@
       <out-warehousing-modal :openModal="openOutWarehousingModal" :nowData="nowData" @ok="handleOutWarehousingOk" @close="handleCancel" />
       <!-- 签收 -->
       <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" />
     </a-spin>
@@ -118,9 +129,10 @@ 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 { shelfReplenishList, shelfReplenishDetailList, shelfReplenishCancel, shelfReplenishStateCount, shelfReplenishDetailStock, shelfReplenishConfirm, shelfReplenishDelete } from '@/api/shelfReplenish'
 export default {
-  components: { STable, VSelect, rangeDate, shelfSList, confirmModal, creatReplenishmentOrder, stockModal, printStickerModal, outWarehousingModal, putWarehousingModal },
+  components: { STable, VSelect, rangeDate, shelfSList, confirmModal, creatReplenishmentOrder, stockModal, printStickerModal, outWarehousingModal, putWarehousingModal, detailModal },
   mixins: [commonMixin],
   data () {
     return {
@@ -148,11 +160,10 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '补货单号', dataIndex: 'replenishBillNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '货架名称', dataIndex: 'shelfInfo.shelfName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '补货单号', dataIndex: 'replenishBillNo', scopedSlots: { customRender: 'replenishBillNo' }, width: '15%', align: 'center' },
+        { title: '货架名称', dataIndex: 'shelfInfo.shelfName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { 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: '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: '17%', align: 'left' }
       ],
@@ -184,17 +195,17 @@ export default {
       },
       subColumns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '货位号', dataIndex: 'product.code', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'product.code', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'product.name', width: '32%', 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: 'qty', 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: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       listData: [],
       tabPaneData: [
         { bizName: '全部', bizType: 'ALL', countNum: 0 },
-        { bizName: '待确认', bizType: 'WAIT_CONFIRM', countNum: 0 },
+        // { bizName: '待确认', bizType: 'WAIT_CONFIRM', countNum: 0 },
         { bizName: '待出库', bizType: 'WAIT_OUT_STOCK', countNum: 0 },
         { bizName: '待签收', bizType: 'WAIT_CHECK', countNum: 0 },
         { bizName: '已完成', bizType: 'FINISH', countNum: 0 },
@@ -207,6 +218,7 @@ export default {
       openOutWarehousingModal: false,
       openPutWarehousingModal: false,
       openCreatRoModal: false,
+      openDetailModal: false,
       validateType: 'confirm',
       stockList: [],
       paramsData: null
@@ -218,14 +230,10 @@ export default {
       this.nowData = row
       this.openConfirmModal = true
     },
-    // cancel
-    handleCancel () {
-      this.nowData = null
-      this.openConfirmModal = false
-      this.openStockModal = false
-      this.openPrintStickerModal = false
-      this.openOutWarehousingModal = false
-      this.openPutWarehousingModal = false
+    // 补货详情
+    handleDetail (row) {
+      this.nowData = row
+      this.openDetailModal = true
     },
     // 库存不足 确认 ok
     handleStockOk (type, params) {
@@ -248,9 +256,7 @@ export default {
       this.openPrintStickerModal = true
     },
     // 打印贴签 ok
-    handlePrintStickerOk () {
-
-    },
+    handlePrintStickerOk () {},
     // 出库
     handleOutWarehousing (row) {
       this.nowData = row
@@ -262,11 +268,21 @@ export default {
       this.openOutWarehousingModal = false
       this.queryByTypeSum(true)
     },
+    // cancel
+    handleCancel () {
+      this.nowData = null
+      this.openConfirmModal = false
+      this.openStockModal = false
+      this.openPrintStickerModal = false
+      this.openOutWarehousingModal = false
+      this.openPutWarehousingModal = false
+      this.openDetailModal = false
+    },
     handleValidate (type, params) {
-      // this.spinning = true
       if (type == 'confirm') { // 确认
         this.confirmFun(params)
       }
+      // this.spinning = true
       // 校验产品库存是否足够
       // shelfReplenishDetailStock(params).then(res => {
       //   if (res.status == 200) {
@@ -414,11 +430,11 @@ export default {
       this.spinning = true
       shelfReplenishStateCount(params).then(res => {
         if (res.data && res.status == 200) {
-          this.tabPaneData[1].countNum = res.data.WAIT_CONFIRM || 0
-          this.tabPaneData[2].countNum = res.data.WAIT_OUT_STOCK || 0
-          this.tabPaneData[3].countNum = res.data.WAIT_CHECK || 0
-          this.tabPaneData[4].countNum = res.data.FINISH || 0
-          this.tabPaneData[5].countNum = res.data.CANCEL || 0
+          // this.tabPaneData[1].countNum = res.data.WAIT_CONFIRM || 0
+          this.tabPaneData[1].countNum = res.data.WAIT_OUT_STOCK || 0
+          this.tabPaneData[2].countNum = res.data.WAIT_CHECK || 0
+          this.tabPaneData[3].countNum = res.data.FINISH || 0
+          this.tabPaneData[4].countNum = res.data.CANCEL || 0
           this.queryParam.bizType = this.curBizType
           this.$refs.table.refresh(!flag)
         }

+ 6 - 6
src/views/numsGoodsShelves/replenishmentManagement/outWarehousingModal.vue

@@ -32,7 +32,7 @@
           </a-col> -->
           <a-col :md="24" :sm="24">
             <a-form-model-item label="出库备注">
-              <a-input id="replenishmentManagement-outWarehousing-remarks" v-model.trim="form.remarks" allowClear placeholder="请输入出库备注"/>
+              <a-input id="replenishmentManagement-outWarehousing-remarks" :maxLength="100" v-model.trim="form.remarks" allowClear placeholder="请输入出库备注(最多100字符)"/>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -85,10 +85,9 @@ export default {
       isShow: this.openModal, //  是否打开弹框
       columns: [
         { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
-        { title: '产品编码', dataIndex: 'product.code', width: '22%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'product.name', 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: 'product.code', width: '29%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'product.name', width: '40%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '补货数量', dataIndex: 'confirmQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -146,7 +145,8 @@ export default {
                 arr.push({
                   productSn: item.productSn,
                   confirmQty: item.confirmQty,
-                  replenishBillDetailSn: item.replenishBillDetailSn
+                  replenishBillDetailSn: item.replenishBillDetailSn,
+                  id: item.id
                 })
               })
               const params = {

+ 3 - 3
src/views/numsGoodsShelves/replenishmentManagement/putWarehousingModal.vue

@@ -88,8 +88,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '产品编码', dataIndex: 'product.code', width: '22%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'product.name', 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: 'confirmQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '签收数量', scopedSlots: { customRender: 'putQty' }, width: '15%', align: 'center' },
         { title: '单位', dataIndex: 'product.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
@@ -140,7 +139,8 @@ export default {
                 putQty: item.putQty,
                 replenishBillDetailSn: item.replenishBillDetailSn,
                 shelfPlaceSn: item.shelfPlaceSn,
-                shelfPlaceCode: item.shelfPlaceCode
+                shelfPlaceCode: item.shelfPlaceCode,
+                id: item.id
               })
             } else if ((item.confirmQty || item.confirmQty == 0) && !(item.putQty || item.putQty == 0)) {
               arrInd.push(index + 1)

+ 11 - 2
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -151,7 +151,7 @@
             </a-col>
             <a-col :span="8">
               <a-form-model-item label="铺货出库" prop="distributionFlag">
-                <v-select code="FLAG" id="chooseCustom-distributionFlag" v-model="form.distributionFlag" allowClear placeholder="请选择"></v-select>
+                <v-select code="FLAG" id="chooseCustom-distributionFlag" v-model="form.distributionFlag" allowClear placeholder="请选择是否铺货出库"></v-select>
               </a-form-model-item>
             </a-col>
           </a-row>
@@ -206,6 +206,11 @@ export default {
   name: 'ChooseCustomModal',
   components: { VSelect, CustomerManagementEdit, selectCust, settleStyle },
   props: {
+    show: [Boolean],
+    distributionFlag: {
+      type: [String, Number],
+      default: '0'
+    }
     show: [Boolean],
     selType: {
       type: String,
@@ -244,7 +249,7 @@ export default {
         settleStyleSn: undefined, //  收款方式
         salesManSn: undefined, //  业务员
         salesManName: '',
-        distributionFlag: '0', // 铺货出库
+        distributionFlag: undefined, // 铺货出库
         salesTragetType: 'CUSTOMER',
         remarks: '' //  备注
       },
@@ -569,6 +574,10 @@ export default {
         this.getUserAllList()
       }
     },
+    distributionFlag (newValue, oldValue) {
+      console.log(newValue, oldValue)
+      this.form.distributionFlag = newValue.toString()
+    },
     selType (val) {
       if (val == '1') {
         this.form.distributionFlag = '1'

+ 315 - 0
src/views/salesManagement/salesQuery/chooseShelfProduct.vue

@@ -0,0 +1,315 @@
+<template>
+  <a-modal
+    centered
+    class="chooseShelf-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="mtitle"
+    v-model="isShow"
+    @cancel="isShow = false"
+    width="80%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-tabs>
+        <a-tab-pane key="1" tab="待补货产品">
+          <!-- 搜索条件 -->
+          <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="4" :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="4" :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="4" :sm="24">
+                  <a-form-model-item label="产品分类">
+                    <ProductType id="chooseShelf-productType" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="库存情况">
+                    <a-checkbox-group :options="options" @change="onStockChange" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="12" style="margin-bottom: 10px;">
+                  <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 class="chooseShelf-modal-table">
+            <!-- 列表 -->
+            <s-table
+              class="sTable"
+              ref="table"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="columns"
+              :data="loadData"
+              :scroll="{ y: 450 }"
+              :defaultLoadData="false"
+              :showPagination="false"
+              bordered>
+            </s-table>
+          </div>
+        </a-tab-pane>
+        <a-tab-pane key="2" tab="全部货架产品" force-render>
+          <!-- 搜索条件 -->
+          <div class="table-page-search-wrapper">
+            <a-form-model
+              ref="ruleForm1"
+              class="form-model-con"
+              layout="inline"
+              :model="queryParam1"
+              @keyup.enter.native="$refs.table1.refresh(true)" >
+              <a-row :gutter="5">
+                <a-col :md="4" :sm="24">
+                  <a-form-model-item label="产品编码">
+                    <a-input id="chooseShelf-code1" v-model.trim="queryParam1.productCode" allowClear placeholder="请输入产品编码"/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="4" :sm="24">
+                  <a-form-model-item label="产品名称">
+                    <a-input id="chooseShelf-name1" v-model.trim="queryParam1.productName" allowClear placeholder="请输入产品名称"/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="4" :sm="24">
+                  <a-form-model-item label="产品分类">
+                    <ProductType id="chooseShelf-productType1" :isDealer="true" @change="changeProductType1" v-model="productType1"></ProductType>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="12" style="margin-bottom: 10px;">
+                  <a-button type="primary" @click="$refs.table1.refresh(true)" id="chooseShelf-refresh">查询</a-button>
+                  <a-button style="margin-left: 5px" @click="resetSearchForm1" id="chooseShelf-reset">重置</a-button>
+                </a-col>
+              </a-row>
+            </a-form-model>
+          </div>
+          <div class="chooseShelf-modal-table">
+            <!-- 列表 -->
+            <s-table
+              class="sTable"
+              ref="table1"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="columns1"
+              :data="loadData1"
+              :scroll="{ y: 450 }"
+              :defaultLoadData="false"
+              :showPagination="false"
+              bordered>
+            </s-table>
+          </div>
+        </a-tab-pane>
+      </a-tabs>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable } from '@/components'
+import ProductType from '../../common/productType.js'
+import { stockOutDetailList } from '@/api/stockOut'
+export default {
+  name: 'OutinDetailModal',
+  components: { STable, ProductType },
+  mixins: [commonMixin],
+  props: {
+    openModal: {
+      //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    baseData: {
+      type: Object,
+      default: function () {
+        return null
+      }
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      advanced: false,
+      isShow: this.openModal, //  是否打开弹框
+      options: [
+        { label: '库存充足', value: '1' },
+        { label: '部分缺货', value: '2' },
+        { label: '全部缺货', value: '3' }
+      ],
+      productType: [],
+      queryParam: {
+        productCode: '', //  产品编码
+        productName: '', //  产品名称
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.spinning = true
+        return stockOutDetailList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+              data[i].totalCost = Number(data[i].putCost * data[i].outQty).toFixed(2)
+            }
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      // -------- 全部产品 --------
+      productType1: [],
+      queryParam1: {
+        productCode: '', //  产品编码
+        productName: '', //  产品名称
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData1: parameter => {
+        this.spinning = true
+        return stockOutDetailList(Object.assign(parameter, this.queryParam1)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+              data[i].totalCost = Number(data[i].putCost * data[i].outQty).toFixed(2)
+            }
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  computed: {
+    mtitle () {
+      return '货架产品' + (this.baseData && this.baseData.shelfName ? this.baseData.shelfName : '')
+    },
+    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
+    },
+    columns1 () {
+      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
+    }
+  },
+  methods: {
+    cansel () {
+      this.isShow = false
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    onStockChange (val) {
+      console.log(val)
+    },
+    resetSearchForm () {
+      this.queryParam.productCode = ''
+      this.queryParam.productName = ''
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.productType = []
+      this.$refs.ruleForm.resetFields()
+      this.$refs.table.refresh(true)
+    },
+    // ---------- 全部产品----------
+    //  产品分类  change
+    changeProductType1 (val, opt) {
+      this.queryParam1.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam1.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam1.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    resetSearchForm1 () {
+      this.queryParam1.productCode = ''
+      this.queryParam1.productName = ''
+      this.queryParam1.productTypeSn1 = ''
+      this.queryParam1.productTypeSn2 = ''
+      this.queryParam1.productTypeSn3 = ''
+      this.productType1 = []
+      this.$refs.ruleForm1.resetFields()
+      this.$refs.table1.refresh(true)
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      } else {
+        this.$nextTick(() => {
+          this.$refs.table.refresh(true)
+        })
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.chooseShelf-modal {
+	.ant-modal-body {
+		padding: 0;
+    .chooseShelf-modal-table{
+      padding: 0 20px 10px;
+    }
+    .table-page-search-wrapper{
+      padding: 5px 20px 0;
+    }
+	}
+}
+</style>

+ 16 - 8
src/views/salesManagement/salesQuery/edit.vue

@@ -66,7 +66,7 @@
         <!-- 搜索条件 -->
         <div class="table-page-search-wrapper">
           <a-row :gutter="15">
-            <a-col :span="16">
+            <a-col :md="24" :lg="14">
               <a-form-model :model="productForm" ref="ruleForm" layout="inline" @keyup.enter.native="$refs.table.refresh(true)" >
                 <a-row :gutter="15">
                   <a-col :md="8" :sm="24">
@@ -88,8 +88,8 @@
                 </a-row>
               </a-form-model>
             </a-col>
-            <a-col :span="8">
-              <div style="float:right;overflow: hidden;">
+            <a-col :md="24" :lg="10">
+              <div style="float:right;overflow: hidden;margin-bottom:10px;">
                 <a-checkbox :value="0" :checked="tbForm.indexOf('AUDIT')>=0" @change="(e)=>{tbFormChange(e,0)}" id="salesQuery-tbsh">同步审核</a-checkbox>
                 <a-checkbox :value="1" :checked="tbForm.indexOf('STOCK_OUT')>=0" @change="(e)=>{tbFormChange(e,1)}" id="salesQuery-tbck">同步出库</a-checkbox>
                 <a-checkbox :value="2" :checked="tbForm.indexOf('SETTLE')>=0" @change="(e)=>{tbFormChange(e,2)}" id="salesQuery-tbsk">同步收款</a-checkbox>
@@ -103,8 +103,12 @@
                 <a-button
                   type="default"
                   @click="openGuideModal=true"
-                  :loading="delLoading"
-                  id="salesEdit-del-all">导入产品</a-button>
+                  style="margin-right:5px;"
+                  id="salesEdit-import">导入产品</a-button>
+                <a-button
+                  type="default"
+                  @click="showShelfModal=true"
+                  id="salesEdit-shelf">货架产品</a-button>
                 <a-button
                   type="link"
                   @click="delSalerOrder"
@@ -197,12 +201,14 @@
     <!-- <div class="affix-cont"></div> -->
     <!-- 选择客户弹框 -->
     <choose-custom-modal ref="custModal" :show="openModal" @updateData="updateData" @cancel="openModal=false" />
-    <!-- 导入明细 -->
+    <!-- 导入产品 -->
     <importGuideModal :openModal="openGuideModal" :params="{salesBillSn: $route.params.sn, salesBillNo:detailData?detailData.salesBillNo:''}" @close="openGuideModal=false" @ok="hanldeImprotOk" />
     <!-- 收付款弹框 -->
     <settleModal ref="settleModal" @ok="settleAcountPay" :openModal="openSettleModal" @close="openSettleModal=false"></settleModal>
-    <!-- 出库明细 -->
+    <!-- 出库明细 -->
     <outInDetialModal ref="outInDetialModal" outBizType="SALES" :openModal="showOutInModal" @close="showOutInModal=false"></outInDetialModal>
+    <!-- 选择货架产品 -->
+    <chooseShelfProduct ref="chooseShelfProduct" :baseData="detailData" :openModal="showShelfModal" @close="showShelfModal=false"></chooseShelfProduct>
   </div>
 </template>
 <script>
@@ -217,11 +223,12 @@ import { stockByProductSn } from '@/api/stock'
 import { salesDetail, salesWriteSubmit, salesWriteDiscount, salesDetailPrint, salesDetailExport, salesDel } from '@/api/sales'
 import { salesDetailList, salesDetailInsert, salesDetailUpdatePrice, salesDetailUpdateQty, salesDetailDel, salesDetailDelAll, salesDetailInsertImport } from '@/api/salesDetail'
 import outInDetialModal from '@/views/common/outInDetialModal.vue'
+import chooseShelfProduct from './chooseShelfProduct.vue'
 import Print from '@/views/common/print.vue'
 import { hdPrint } from '@/libs/JGPrint'
 export default {
   name: 'SalesEdit',
-  components: { STable, VSelect, queryPart, chooseCustomModal, Print, importGuideModal, settleModal, outInDetialModal },
+  components: { STable, VSelect, queryPart, chooseCustomModal, Print, importGuideModal, settleModal, outInDetialModal, chooseShelfProduct },
   mixins: [commonMixin],
   data () {
     return {
@@ -236,6 +243,7 @@ export default {
       openGuideModal: false, // 导入产品弹框
       openSettleModal: false, // 打开收款弹框
       enableFundAccount: false, // 是否开启资金账户管理
+      showShelfModal: false, // 货架产品弹框
       delLoading: false,
       detailData: { discountAmount: 0, id: null, salesBillSn: '' }, // 订单基础数据
       dataSource: [],

+ 15 - 2
src/views/salesManagement/salesQuery/list.vue

@@ -80,6 +80,11 @@
                   <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
                 </a-form-item>
               </a-col>
+              <a-col :span="6">
+                <a-form-model-item label="铺货出库">
+                  <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
@@ -115,6 +120,8 @@
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator">
+        <a-button type="primary" class="button-error" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(0)">新增(零售)</a-button>
+        <a-button type="primary" class="button-warning" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(1)">新增(铺货)</a-button>
         <a-button type="primary" class="button-error" v-if="$hasPermissions('B_salesNews')" @click="handleAdd('0')">新增(零售)</a-button>
         <a-button type="primary" class="button-warning" v-if="$hasPermissions('B_salesNews')" @click="handleAdd('1')">新增(铺货)</a-button>
       </div>
@@ -219,6 +226,7 @@
       </s-table>
     </a-spin>
     <!-- 选择客户弹框 -->
+    <choose-custom-modal :show="openModal" :distributionFlag="distributionFlag" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
     <choose-custom-modal :show="openModal" :selType="selType" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
     <!-- 审核 -->
     <auditModal :openModal="visibleAudit" :spinning="spinningAudit" @close="visibleAudit=false" @ok="auditOrder('WAIT_OUT_WAREHOUSE')" @fail="auditOrder('AUDIT_REJECT')" />
@@ -270,7 +278,8 @@ export default {
         settleStyleSn: undefined, //  收款方式
         billStatus: undefined, //  业务状态
         financialStatus: undefined, //  财务状态
-        salesBillSource: undefined
+        salesBillSource: undefined,
+        distributionFlag: undefined
       },
       totalData: {
         totalAmount: 0,
@@ -325,7 +334,8 @@ export default {
       },
       visibleAudit: false,
       auditInfo: null,
-      spinningAudit: false
+      spinningAudit: false,
+      distributionFlag: '0'
     }
   },
   methods: {
@@ -353,9 +363,11 @@ export default {
       }
     },
     // 新增
+    handleAdd (flag) {
     handleAdd (type) {
       this.selType = type
       this.openModal = true
+      this.distributionFlag = flag
     },
     //  审核
     handleEexamine (row) {
@@ -468,6 +480,7 @@ export default {
       this.queryParam.billStatus = undefined
       this.queryParam.financialStatus = undefined
       this.queryParam.salesBillSource = undefined
+      this.queryParam.distributionFlag = undefined
       this.$refs.custList.resetForm()
       if (!flag) {
         this.setIsHomeNav(this.$route.name, null)

+ 23 - 22
src/views/salesManagement/salesReturn/list.vue

@@ -91,28 +91,29 @@
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button
-            size="small"
-            type="link"
-            class="button-primary"
-            v-if="record.state == 'WAIT_AUDIT'&&$hasPermissions('B_salesReturnAudit')"
-            @click="handleEexamine(record)"
-            id="salesReturn-eexamine-btn">审核</a-button>
-          <a-button
-            size="small"
-            v-if="(record.state == 'WAIT_AUDIT'||record.state == 'WAIT_SUBMIT') &&$hasPermissions('B_salesReturnEdit')"
-            type="link"
-            class="button-primary"
-            @click="handleEdit(record,1)"
-            id="salesReturn-edit-btn">编辑</a-button>
-          <a-button
-            size="small"
-            v-if="(record.state == 'WAIT_AUDIT'||record.state == 'WAIT_SUBMIT') &&$hasPermissions('B_salesReturnDel')"
-            type="link"
-            class="button-error"
-            @click="handleDel(record)"
-            id="salesReturn-del-btn">删除</a-button>
-          <span v-if="record.state == 'FINISH' || (!(record.state == 'WAIT_AUDIT'&&$hasPermissions('B_salesReturnAudit')) && !((record.state == 'WAIT_AUDIT'||record.state == 'WAIT_SUBMIT') &&$hasPermissions('B_salesReturnEdit')) && !((record.state == 'WAIT_AUDIT'||record.state == 'WAIT_SUBMIT') &&$hasPermissions('B_salesReturnDel')))">--</span>
+          <div>
+            <a-button
+              size="small"
+              type="link"
+              class="button-primary"
+              v-if="record.state == 'WAIT_AUDIT'&&$hasPermissions('B_salesReturnAudit')"
+              @click="handleEexamine(record)"
+              id="salesReturn-eexamine-btn">审核</a-button>
+            <a-button
+              size="small"
+              v-if="(record.state == 'WAIT_AUDIT'||record.state == 'WAIT_SUBMIT') &&$hasPermissions('B_salesReturnEdit')"
+              type="link"
+              class="button-primary"
+              @click="handleEdit(record,1)"
+              id="salesReturn-edit-btn">编辑</a-button>
+            <a-button
+              size="small"
+              v-if="(record.state == 'WAIT_AUDIT'||record.state == 'WAIT_SUBMIT') &&$hasPermissions('B_salesReturnDel')"
+              type="link"
+              class="button-error"
+              @click="handleDel(record)"
+              id="salesReturn-del-btn">删除</a-button>
+          </div>
         </template>
       </s-table>
     </a-spin>