Ver Fonte

销售单选择货架产品

lilei há 2 anos atrás
pai
commit
ca5f51d96d

+ 1 - 1
public/version.json

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

+ 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>

+ 26 - 14
src/views/numsGoodsShelves/replenishmentManagement/list.vue

@@ -88,6 +88,10 @@
           <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" />
@@ -105,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>
@@ -123,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 {
@@ -153,7 +160,7 @@ 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: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { 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: 'totalConfirmQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -211,6 +218,7 @@ export default {
       openOutWarehousingModal: false,
       openPutWarehousingModal: false,
       openCreatRoModal: false,
+      openDetailModal: false,
       validateType: 'confirm',
       stockList: [],
       paramsData: null
@@ -222,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) {
@@ -252,9 +256,7 @@ export default {
       this.openPrintStickerModal = true
     },
     // 打印贴签 ok
-    handlePrintStickerOk () {
-
-    },
+    handlePrintStickerOk () {},
     // 出库
     handleOutWarehousing (row) {
       this.nowData = row
@@ -266,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) {

+ 11 - 3
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,7 +206,11 @@ export default {
   name: 'ChooseCustomModal',
   components: { VSelect, CustomerManagementEdit, selectCust, settleStyle },
   props: {
-    show: [Boolean]
+    show: [Boolean],
+    distributionFlag: {
+      type: [String, Number],
+      default: '0'
+    }
   },
   data () {
     return {
@@ -240,7 +244,7 @@ export default {
         settleStyleSn: undefined, //  收款方式
         salesManSn: undefined, //  业务员
         salesManName: '',
-        distributionFlag: '0', // 铺货出库
+        distributionFlag: undefined, // 铺货出库
         salesTragetType: 'CUSTOMER',
         remarks: '' //  备注
       },
@@ -564,6 +568,10 @@ export default {
         this.getArea('province')
         this.getUserAllList()
       }
+    },
+    distributionFlag (newValue, oldValue) {
+      console.log(newValue, oldValue)
+      this.form.distributionFlag = newValue.toString()
     }
   }
 }

+ 8 - 5
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,11 @@
                 <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"
+                  id="salesEdit-shelf">货架产品</a-button>
                 <a-button
                   type="link"
                   @click="delSalerOrder"

+ 15 - 5
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>
             </template>
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
@@ -104,7 +109,8 @@
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button type="primary" class="button-error" v-if="$hasPermissions('B_salesNews')" @click="handleAdd">新增(零售)</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>
       <!-- alert -->
       <a-alert type="info" style="margin-bottom:10px">
@@ -207,7 +213,7 @@
       </s-table>
     </a-spin>
     <!-- 选择客户弹框 -->
-    <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
+    <choose-custom-modal :show="openModal" :distributionFlag="distributionFlag" @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')" />
   </a-card>
@@ -258,7 +264,8 @@ export default {
         settleStyleSn: undefined, //  收款方式
         billStatus: undefined, //  业务状态
         financialStatus: undefined, //  财务状态
-        salesBillSource: undefined
+        salesBillSource: undefined,
+        distributionFlag: undefined
       },
       totalData: {
         totalAmount: 0,
@@ -312,7 +319,8 @@ export default {
       },
       visibleAudit: false,
       auditInfo: null,
-      spinningAudit: false
+      spinningAudit: false,
+      distributionFlag: '0'
     }
   },
   methods: {
@@ -340,8 +348,9 @@ export default {
       }
     },
     // 新增
-    handleAdd () {
+    handleAdd (flag) {
       this.openModal = true
+      this.distributionFlag = flag
     },
     //  审核
     handleEexamine (row) {
@@ -454,6 +463,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)