Преглед на файлове

Merge branch 'develop_yh21' of jianguan-web/jg-ocs-html into pre-release

李磊 преди 2 години
родител
ревизия
5d75b6ef2e

+ 9 - 0
src/api/product.js

@@ -491,3 +491,12 @@ export const excelOnlineList = (params) => {
     responseType: 'blob'
   })
 }
+
+// 显示/隐藏
+export const updateShowFlag = (params) => {
+  return axios({
+    url: '/productLog/updateShowFlag',
+    data: params,
+    method: 'post'
+  })
+}

+ 51 - 0
src/api/sales.js

@@ -239,3 +239,54 @@ export const updateWarehouse = (params) => {
     data: params
   })
 }
+
+//  按仓库查询销售单 列表  有分页
+export const queryPageForWarehouse = (params) => {
+  const url = `/sales/queryPageForWarehouse/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 获取按仓库查询销售单数量
+export const queryCountForWarehouse = (params) => {
+  return axios({
+    url: '/sales/queryCountForWarehouse',
+    method: 'post',
+    data: params
+  })
+}
+// 按仓库查询销售明细 列表
+export const queryPageForWarehouseDetail = (params) => {
+  const url = `/sales/detail/queryPageForWarehouse/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 获取按仓库查询销售单明细数量
+export const queryCountForWarehouseDetail = (params) => {
+  return axios({
+    url: '/sales/detail/queryCountForWarehouse',
+    method: 'post',
+    data: params
+  })
+}
+// 按仓库导出销售单
+
+export const exportForWarehouse = params => {
+  const url = `/sales/exportForWarehouse`
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 37 - 0
src/config/router.config.js

@@ -210,6 +210,43 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/salesManagement/salesOrderWarehouse',
+            redirect: '/salesManagement/salesOrderWarehouse/list',
+            name: 'salesOrderWarehouse',
+            component: BlankLayout,
+            meta: {
+              title: '仓库销售单',
+              icon: 'vertical-align-bottom',
+              permission: 'M_salesOrderWarehouseList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'salesOrderWarehouseList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesOrderWarehouse/list.vue'),
+                meta: {
+                  title: '仓库销售单列表',
+                  icon: 'vertical-align-bottom',
+                  hidden: true,
+                  permission: 'M_salesOrderWarehouseList'
+                }
+              },
+              {
+                path: 'detail/:sn/:wsn',
+                name: 'saleOrderDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesOrderWarehouse/detail.vue'),
+                meta: {
+                  title: '仓库销售单列表详情',
+                  icon: 'vertical-align-bottom',
+                  replaceTab: true,
+                  hidden: true,
+                  permission: 'B_salesOrderWarehouseDetail'
+                }
+              }
+            ]
+          },
           {
             path: '/salesManagement/pushOrderManagement',
             redirect: '/salesManagement/pushOrderManagement/list',

+ 2 - 2
src/views/productManagement/newProduct/list.vue

@@ -66,7 +66,7 @@
         </template>
         <!-- 上/下线时间 内容 -->
         <template slot="auditTime" slot-scope="text, record">
-          {{ $route.params.onlineFalg=='1'?record.onlineAuditTime:record.offlineAuditTime }}
+          {{ $route.params.onlineFalg=='1'?record.auditTime:record.auditTime }}
         </template>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -149,7 +149,7 @@ export default {
         })
       },
       openModal: false, //  查看详情  弹框
-      itemId: '', //  当前产品productSn
+      itemId: '' //  当前产品productSn
     }
   },
   methods: {

+ 3 - 3
src/views/productManagement/newProduct/modal.vue

@@ -15,7 +15,7 @@
         bordered>
       </s-table>
       <div style="padding-top: 15px;">
-        <a-button @click="viewMore" block type="primary" ghost>查看更多{{onlineFalg==1?'新品':'下线产品'}}</a-button>
+        <a-button @click="viewMore" block type="primary" ghost>查看更多{{ onlineFalg==1?'新品':'下线产品' }}</a-button>
       </div>
     </a-spin>
   </div>
@@ -67,9 +67,9 @@ export default {
         { title: '单位', dataIndex: 'unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.onlineFalg == '1') {
-        arr.push({ title: '上线时间', dataIndex: 'onlineAuditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } })
+        arr.push({ title: '上线时间', dataIndex: 'auditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } })
       } else if (this.onlineFalg == '0') {
-        arr.push({ title: '下线时间', dataIndex: 'offlineAuditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } })
+        arr.push({ title: '下线时间', dataIndex: 'auditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } })
       }
       return arr
     }

+ 45 - 6
src/views/productManagement/productLaunchAudit/list.vue

@@ -16,12 +16,12 @@
         <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
             <a-row :gutter="15">
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-item label="产品名称">
                   <a-input id="productLaunchAuditList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-item label="产品编码">
                   <a-input id="productLaunchAuditList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
                 </a-form-item>
@@ -31,7 +31,12 @@
                   <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-col :md="4" :sm="24" v-if="queryParam.bizState == 'PASS'">
+                <a-form-item label="是否新品">
+                  <v-select code="FLAG" id="productLaunchAuditList-isNew" v-model="queryParam.newProductFlag" allowClear placeholder="请选择产品是否为新品"></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
                 <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productLaunchAuditList-refresh">查询</a-button>
                 <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productLaunchAuditList-reset">重置</a-button>
               </a-col>
@@ -64,6 +69,15 @@
             <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
             <span v-else>--</span>
           </template>
+          <!-- 显示状态 -->
+          <template slot="showFlag" slot-scope="text, record">
+            <a-switch
+              checkedChildren="显示"
+              unCheckedChildren="隐藏"
+              id="productLaunchAuditList-isEnable"
+              v-model="record.isEnable"
+              @change="changeFlagHandle(record)" />
+          </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
             <a-button
@@ -85,7 +99,7 @@
 import rangeDate from '@/views/common/rangeDate.vue'
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import { productLogList, productLogAuditBatch, productLogAudit } from '@/api/product'
+import { productLogList, productLogAuditBatch, productLogAudit, updateShowFlag } from '@/api/product'
 export default {
   name: 'ProductLaunchAuditList',
   mixins: [commonMixin],
@@ -100,7 +114,8 @@ export default {
         name: '', //  名称
         code: '', //  编码
         bizType: 'ONLINE', // 上线
-        bizState: 'WAIT' //  状态
+        bizState: 'WAIT', //  状态
+        newProductFlag: undefined// 是否新品
       },
       tableHeight: 0,
       disabled: false, //  查询、重置按钮是否可操作
@@ -113,6 +128,11 @@ export default {
           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
+              data.list[i].isEnable = data.list[i].showFlag + '' === '1'
+            }
             this.disabled = false
           }
           this.spinning = false
@@ -134,9 +154,12 @@ export default {
       ]
       if (this.queryParam.bizState == 'WAIT') {
         arr.splice(6, 1, { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' })
-      } else {
+      } else if (this.queryParam.bizState != 'WAIT') {
         arr.splice(6, 1, { title: '审核时间', dataIndex: 'auditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
         arr.splice(7, 1, { title: '审核人', dataIndex: 'auditPerson', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
+        if (this.queryParam.bizState === 'PASS') {
+          arr.splice(8, 1, { title: '显示状态', scopedSlots: { customRender: 'showFlag' }, width: '10%', align: 'center' })
+        }
       }
       return arr
     }
@@ -157,6 +180,7 @@ export default {
       this.queryParam.code = ''
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
+      this.queryParam.newProductFlag = undefined
       this.time = []
       this.$refs.rangeDate.resetDate(this.time)
       this.$refs.table.refresh(true)
@@ -240,6 +264,21 @@ export default {
         }
       })
     },
+    // 修改显示状态
+    changeFlagHandle (record) {
+      const _data = {
+        productLogSn: record.productLogSn,
+        showFlag: record.isEnable ? '1' : '0'
+      }
+      this.spinning = true
+      updateShowFlag(_data).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+        }
+        this.$refs.table.refresh()
+        this.spinning = false
+      })
+    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 10 - 1
src/views/reportData/salesReturnsReport/list.vue

@@ -49,6 +49,11 @@
                     <AreaList id="salesReturnsReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="退货仓库">
+                  <chooseWarehouse ref="warehouse" isPermission v-model="queryParam.warehouseSn"></chooseWarehouse>
+                </a-form-model-item>
+              </a-col>
             </template>
             <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
               <a-button
@@ -113,13 +118,14 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import reportModal from '@/views/common/reportModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import AreaList from '@/views/common/areaList.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { reportSalesReturnList, reportSalesReturnCount, salesReturnsExport } from '@/api/reportData'
 export default {
   name: 'SalesReturnsReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, dealerSubareaScopeList, reportModal, AreaList },
+  components: { STable, VSelect, rangeDate, subarea, dealerSubareaScopeList, reportModal, AreaList, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -139,6 +145,7 @@ export default {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
+        warehouseSn: undefined,
         dealerSn: '',
         dealerLevel: undefined,
         dealerProvinceSn: undefined,
@@ -184,6 +191,7 @@ export default {
         { title: '直接绑定客户名称', dataIndex: 'directDealerName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '间接绑定客户名称', dataIndex: 'indirectDealerName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '退货数量', dataIndex: 'totalQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货仓库', dataIndex: 'warehouseName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         // { title: '开单退货金额', dataIndex: 'totalAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '经销商价', dataIndex: 'totalWholesalePrice2', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '服务中心价', dataIndex: 'totalWholesalePrice1', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -292,6 +300,7 @@ export default {
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.dealerSn = undefined
+      this.queryParam.warehouseSn = undefined
       this.queryParam.dealerLevel = undefined
       this.queryParam.dealerProvinceSn = undefined
       this.queryParam.dealerCitySn = undefined

+ 1 - 1
src/views/reportData/urchaseDetailReturn/detailList.vue

@@ -60,7 +60,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="出库仓库">
-                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                  <chooseWarehouse isPermission ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">

+ 10 - 1
src/views/reportData/urchaseReturn/list.vue

@@ -27,6 +27,11 @@
                 <supplier v-model="queryParam.supplierSn" isPermission placeholder="请输入供应商名称"></supplier>
               </a-form-model-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+                <a-form-model-item label="退货仓库">
+                  <chooseWarehouse isPermission ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                </a-form-model-item>
+              </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="退货原因">
                 <v-select
@@ -100,12 +105,13 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import supplier from '@/views/common/supplier.js'
 import { hdExportExcel } from '@/libs/exportExcel'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import reportModal from '@/views/common/reportModal.vue'
 import { sparePartsReturnReportList, sparePartsReturnReportStat, sparePartsReturnReportExport } from '@/api/reportData'
 export default {
   name: 'UrchaseReturn',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, supplier, reportModal },
+  components: { STable, VSelect, rangeDate, supplier, reportModal, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -121,6 +127,7 @@ export default {
         endDate: getDate.getCurrMonthDays().endtime,
         sparePartsReturnNo: undefined,
         supplierSn: undefined,
+        warehouseSn: undefined,
         returnReason: undefined
       },
       rules: {
@@ -155,6 +162,7 @@ export default {
         { title: '退货完成日期', dataIndex: 'auditDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '供应商名称', dataIndex: 'supplierName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '退货原因', dataIndex: 'returnReasonDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货仓库', dataIndex: 'warehouseName', width: 150, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '补充说明', dataIndex: 'explainInfo', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '附件', width: 120, align: 'center', scopedSlots: { customRender: 'attachmentList' } },
         { title: '入库数量', dataIndex: 'totalPutQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -231,6 +239,7 @@ export default {
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.sparePartsReturnNo = ''
       this.queryParam.supplierSn = undefined
+      this.queryParam.warehouseSn = undefined
       this.queryParam.returnReason = undefined
       this.totalData = null
       this.$refs.ruleForm.resetFields()

+ 171 - 0
src/views/salesManagement/salesOrderWarehouse/detail.vue

@@ -0,0 +1,171 @@
+<template>
+  <div class="salesDetail-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont" style="padding:16px 24px;">
+        <template slot="subTitle">
+          <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="salesDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息" v-if="detailData">
+            <a-descriptions size="small" :column="3">
+              <a-descriptions-item label="销售单号">{{ detailData.salesBillNo || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="创建时间">{{ detailData.createDate || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货地址" :span="2" v-if="detailData&&detailData.salesBillExtEntity">
+                {{ detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddrProvinceName || '' }}
+                {{ detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddrCityName || '' }}
+                {{ detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddrCountyName || '' }}
+                {{ detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddr || '' }}
+              </a-descriptions-item>
+              <a-descriptions-item label="收货人" v-if="detailData.salesBillExtEntity">{{ detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货电话" v-if="detailData.salesBillExtEntity">{{ detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="业务状态">{{ detailData.billStatusDictValue || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="pages-wrap">
+        <!-- alert -->
+        <a-alert type="info" style="margin-bottom: 10px;" v-if="detailData!=null">
+          <div slot="message">
+            <span>
+              总款数:<strong>{{ countData.totalCategory || countData.totalCategory==0? countData.totalCategory : '--' }}</strong>;
+            </span>
+            总数量:<strong>{{ countData.totalQty || countData.totalQty==0? countData.totalQty : '--' }}</strong>;
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: 500 }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 产品编码 -->
+          <template slot="productCode" slot-scope="text, record">
+            <a-badge count="促" v-if="record.promotionFlag == 1">
+              <div style="padding-right: 15px;">{{ text }}</div>
+            </a-badge>
+            <span v-else>{{ text }}</span>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import { queryPageForWarehouseDetail, queryCountForWarehouseDetail, salesDetailBySn } from '@/api/sales'
+export default {
+  name: 'SalesOrderWarehouseDetail',
+  mixins: [commonMixin],
+  components: { STable, VSelect },
+  data () {
+    return {
+      disabled: false,
+      spinning: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        return queryPageForWarehouseDetail(Object.assign(parameter, { salesBillSn: this.$route.params.sn, warehouseSn: this.$route.params.wsn })).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          return data
+        })
+      },
+      detailData: null, //  详情数据
+      countData: null, // 数量数据
+      fromRouter: null
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '25%', scopedSlots: { customRender: 'productCode' }, align: 'center' },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '33%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售数量', dataIndex: 'qty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ]
+      if (this.$hasPermissions('B_dispatchDetail_salesPrice')) { //  售价权限
+        arr.splice(4, 0, { title: '出库仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    //  返回
+    handleBack () {
+      this.$router.push({ name: 'salesOrderWarehouseList' })
+    },
+    //  详情
+    getDetail () {
+      salesDetailBySn({ salesBillSn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.$refs.table.refresh(true)
+          this.detailData = res.data || null
+        } else {
+          this.detailData = null
+        }
+      })
+    },
+    // 数量
+    getCount () {
+      queryCountForWarehouseDetail({ salesBillSn: this.$route.params.sn, warehouseSn: this.$route.params.wsn }).then(res => {
+        if (res.status == 200) {
+          this.countData = res.data
+        } else {
+          this.countData = null
+        }
+      })
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab || this.outBizSubSn || this.bizSn) { // 页签刷新 或 为弹框时调用
+      this.getDetail()
+      this.getCount()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.getDetail()
+      this.getCount()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.fromRouter = from
+    })
+  }
+}
+</script>
+
+<style lang="less">
+  .salesDetail-wrap{
+    .salesDetail-cont{
+      margin-bottom: 10px;
+    }
+    .footer-cont{
+      margin-top: 5px;
+      text-align: center;
+    }
+  }
+</style>

+ 269 - 0
src/views/salesManagement/salesOrderWarehouse/list.vue

@@ -0,0 +1,269 @@
+<template>
+  <a-card size="small" :bordered="false" class="salesOrderWarehouseList-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="客户名称">
+                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="salesManagementList-buyerName" @change="custChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="销售单号">
+                <a-input id="salesOrderWarehouseList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务状态">
+                <v-select
+                  v-model="queryParam.billStatus"
+                  ref="billStatus"
+                  id="salesManagementList-billStatus"
+                  code="SALES_BILL_STATUS"
+                  placeholder="请选择业务状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="地区" prop="shippingAddrProvinceSn">
+                <Area id="salesOrderWarehouseList-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24" v-show="isShowWarehouse">
+              <a-form-model-item label="出库仓库">
+                <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesOrderWarehouseList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesOrderWarehouseList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_salesOrderWarehouseExport')"
+              >导出</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- alert -->
+      <a-alert type="info" style="margin-bottom:10px">
+        <div slot="message">
+          <!-- 总款数:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '0' }}</strong>; -->
+          总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
+        </div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.no"
+        rowKeyName="no"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 单号 -->
+        <template slot="stockOutNo" slot-scope="text, record" v-if="$hasPermissions('B_salesOrderWarehouseDetail')">
+          <span class="link-bule" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
+        </template>
+      </s-table>
+    </a-spin>
+    <!-- 导出提示框 -->
+    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+  </a-card>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import moment from 'moment'
+import rangeDate from '@/views/common/rangeDate.vue'
+import getDate from '@/libs/getDate.js'
+import Area from '@/views/common/area.js'
+import reportModal from '@/views/common/reportModal.vue'
+import { STable, VSelect } from '@/components'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
+import { queryPageForWarehouse, queryCountForWarehouse, exportForWarehouse } from '@/api/sales'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import { hdExportExcel } from '@/libs/exportExcel'
+export default {
+  name: 'SalesOrderWarehouseList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate, Area, chooseWarehouse, reportModal, dealerSubareaScopeList },
+  data () {
+    return {
+      spinning: false,
+      tableHeight: 0,
+      time: [
+        moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ],
+      queryParam: { //  查询条件
+        beginDate: getDate.getThreeMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
+        buyerSn: '', //  客户名称
+        billStatus: undefined, //  业务状态
+        salesBillNo: '', // 销售单号
+        shippingAddrProvinceSn: undefined,
+        warehouseSn: undefined
+      },
+      exportLoading: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      loading: false,
+      totalData: null,
+      showExport: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        return queryPageForWarehouse(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.getCount(params)
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  computed: {
+    isShowWarehouse () {
+      return this.$store.state.app.isWarehouse
+    },
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售单号', scopedSlots: { customRender: 'stockOutNo' }, width: '10%', align: 'center' },
+        { title: '提交时间', dataIndex: 'submitDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总数量', dataIndex: 'totalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+	  if (this.isShowWarehouse) {
+	    arr.splice(5, 0, { title: '出库仓库', dataIndex: 'warehouseName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
+	  }
+      return arr
+    }
+  },
+  methods: {
+    custChange (val) {
+      this.queryParam.buyerSn = val.key
+    },
+    // 获取总数量
+    getCount (params) {
+      queryCountForWarehouse(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    //  导出
+    handleExport () {
+      const _this = this
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(exportForWarehouse, _this.queryParam, '仓库销售单明细', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+        _this.showExport = true
+      })
+    },
+    //  时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate(this.time)
+      this.$refs.dealerSubareaScopeList.resetForm()
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.buyerSn = ''
+      this.queryParam.billStatus = undefined
+      this.queryParam.salesBillNo = ''
+      this.queryParam.shippingAddrProvinceSn = undefined
+      this.queryParam.warehouseSn = undefined
+      this.$refs.table.refresh(true)
+    },
+    //  详情
+    handleDetail (row) {
+      this.$router.push({ path: `/salesManagement/salesOrderWarehouse/detail/${row.salesBillSn}/${row.warehouseSn}` })
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.rowSelectionInfo = null
+      this.$refs.table.clearSelected()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+<style lang="less">
+  .salesOrderWarehouseList-wrap{
+    .active{
+      color: #ed1c24;
+      cursor: pointer;
+    }
+    .common{
+      color: rgba(0, 0, 0);
+    }
+  }
+</style>

+ 27 - 1
src/views/salesManagement/sendOutOrder/detailModal.vue

@@ -58,6 +58,18 @@
             <a-textarea v-model="form.transportRemark" placeholder="请输入备注" v-if="type==0"/>
             <span v-else>{{ detail.transportRemark||'--' }}</span>
           </div>
+          <div style="flex-basis:60%;display:flex;" v-if="detail.receiveFlag == 1 && type!=0">
+            问题反馈:
+            <div style="padding:0 10px;max-width: 60%;">
+              <div v-if="showEditQus" style="width:400px;">
+                <a-textarea ref="issue" @blur="saveIssue" allowClear v-model="detail.issueRemark" placeholder="请输入问题反馈(最多100字符)" :maxLength="100" auto-size />
+              </div>
+              <div style="word-break: break-all;" v-else>{{ detail.issueRemark||'--' }}</div>
+            </div>
+            <div v-if="!showEditQus">
+              <a-icon @click="editIssue" style="color:#00aaff;font-size:16px;cursor:pointer;" type="form" />
+            </div>
+          </div>
         </div>
         <div>
           <a-table class="sTable" :columns="columns" :pagination="false" :data-source="tableData" bordered></a-table>
@@ -81,7 +93,7 @@ import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import printModel from './printModel.vue'
 import commonModal from '@/views/common/commonModal.vue'
-import { updateTransportInfo, sendBillFindBySn } from '@/api/sendBill'
+import { updateTransportInfo, sendBillFindBySn, updateIssueRemark } from '@/api/sendBill'
 export default {
   name: 'SendOutDetailModal',
   mixins: [commonMixin],
@@ -163,6 +175,19 @@ export default {
         this.showTipModal = false
       }
     },
+    editIssue(){
+      this.showEditQus = !this.showEditQus
+      this.$nextTick(()=>{
+        this.$refs.issue.focus()
+      })
+    },
+    saveIssue(){
+      updateIssueRemark({issueRemark: this.detail.issueRemark, sendBillSn: this.sendBillSn}).then(res => {
+        this.showEditQus = false
+      }).catch(res => {
+        this.$refs.issue.focus()
+      })
+    },
     // 编辑
     getDetail (data, type, title) {
       this.type = type // 0 是物流跟踪,1是详情
@@ -176,6 +201,7 @@ export default {
         if (res.data) {
           this.detail = res.data
           this.detail.receiveFlag = res.data.receiveFlag == 1
+          this.detail.issueRemark = this.detail.issueRemark || ''
           this.form.receiveFlag = false
           this.form.receiveDate = ''
           this.form.transportState = res.data.transportState

+ 10 - 2
src/views/salesManagement/shortageStatisticsP/list.vue

@@ -31,6 +31,11 @@
                   <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品状态">
+                  <v-select code="OOS_PRODUCT_STATE" id="shortageStatisticsPList-state" v-model="queryParam.state" allowClear placeholder="请选择产品状态"></v-select>
+                </a-form-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="shortageStatisticsPList-refresh">查询</a-button>
@@ -109,7 +114,8 @@ export default {
         productName: '',
         productCode: '',
         origCode: '',
-        warehouseSn: undefined
+        warehouseSn: undefined,
+        state: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
@@ -156,7 +162,8 @@ export default {
         { title: '缺货数量', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '缺货金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '客户名称', dataIndex: 'buyerName', width: '18%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓库', dataIndex: 'warehouseName', width: '18%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+        { title: '仓库', dataIndex: 'warehouseName', width: '18%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品状态', dataIndex: 'productShowStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('M_shortageStatisticsPList_salesPrice')) { //  售价权限
         arr.splice(6, 0, { title: '缺货金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
@@ -237,6 +244,7 @@ export default {
       this.queryParam.productCode = ''
       this.queryParam.origCode = ''
       this.queryParam.warehouseSn = undefined
+      this.queryParam.state = undefined
       this.$refs.table.refresh(true)
     },
     pageInit () {

+ 29 - 1
src/views/salesReturnManagement/salesReturn/list.vue

@@ -181,6 +181,13 @@
               v-if="record.billStatus == 'WAIT_RECEIVE'&& $hasPermissions('B_newPickUp')"
               @click="handlePickUp(record)"
               id="salesReturn-edit-btn">申请提货</a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-error"
+              v-if="record.billStatus == 'WAIT_RECEIVE'&&record.salesReturnBillSource=='PURCHASE'&&record.cancelFlag==1"
+              @click="handleCansel(record)"
+              id="salesReturn-cansel-btn">取消</a-button>
             <a-button
               size="small"
               type="link"
@@ -212,7 +219,7 @@ import verifyModal from './verifyModal.vue'
 import chooseDepartUserModal from './chooseDepartUserModal.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import warehouse from '@/views/common/chooseWarehouse.js'
-import { salesReturnList, salesReturnQueryCount, salesReturnDel, salesReturnSubmit } from '@/api/salesReturn'
+import { salesReturnList, salesReturnQueryCount, salesReturnDel, salesReturnCancelBill, salesReturnSubmit } from '@/api/salesReturn'
 import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 export default {
@@ -359,6 +366,27 @@ export default {
         this.$router.push({ name: 'billOfLadingList', query: { billNo: row.salesReturnBillNo } })
       }
     },
+    // 取消
+    handleCansel(row){
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要取消吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          salesReturnCancelBill({ salesReturnBillSn: row.salesReturnBillSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
     // 删除
     handleDel (row) {
       const _this = this