ソースを参照

Merge branch 'develop_yh07' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into pre-release

lilei 3 年 前
コミット
ab04fd4b5b

+ 1 - 1
public/version.json

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

+ 0 - 3
src/App.vue

@@ -10,9 +10,6 @@
 <script>
 import zhCN from 'ant-design-vue/es/locale/zh_CN'
 import { AppDeviceEnquire } from '@/utils/mixin'
-import moment from 'moment'
-import 'moment/locale/zh-cn'
-moment.locale('zh-cn')
 export default {
   mixins: [AppDeviceEnquire],
   data () {

+ 48 - 0
src/api/reportData.js

@@ -632,3 +632,51 @@ export const reportStockPutOutMonthExport = params => {
     responseType: 'blob'
   })
 }
+// 库存导入报表
+export const reportStockImportList = (params) => {
+  const url = `/report/reportStockImport/reportPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+export const reportStockImportCount = (params) => {
+  const url = `/report/reportStockImport/reportCount`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 库存导入详细报表
+export const reportStockImportDetailList = (params) => {
+  const url = `/report/reportStockImportDetail/reportPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+export const reportStockImportDetailCount = (params) => {
+  const url = `/report/reportStockImportDetail/reportCount`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+export const reportStockImportDetailExport  = (params) => {
+  const url = `/report/reportStockImportDetail/export `
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 24 - 0
src/api/sparePartsPur.js

@@ -50,6 +50,13 @@ export const sparePartsPurDel = (params) => {
     method: 'get'
   })
 }
+// 整单删除
+export const sparePartsPurDeleteAll = (params) => {
+  return axios({
+    url: `/sparePartsPur/detail/deleteAll/${params.sn}`,
+    method: 'get'
+  })
+}
 //  散件采购(入库) 导出
 export const sparePartsPurExport = (params) => {
   return axios({
@@ -123,3 +130,20 @@ export const sparePartsPurDetailPrint = params => {
   }
   return axios.request(data)
 }
+// 散件入库导入确认
+export const sparePartsPurDetailInsertBatch = (params) => {
+  return axios({
+    url: '/sparePartsPur/detail/insertBatch',
+    data: params,
+    method: 'post'
+  })
+}
+// 导出错误项
+export const sparePartsPurExportErrorLine = (params) => {
+  return axios({
+    url: '/sparePartsPur/detail/exportErrorLine',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 12 - 1
src/api/sparePartsRet.js

@@ -46,7 +46,7 @@ export const sparePartsRetDetailCount = (params) => {
     method: 'post'
   })
 }
-//  散件退货  详情  产品(不抓单)  列表  分页
+//  采购退货  产品(不抓单)  列表  分页
 export const stockDetailProductList = (params) => {
   const url = `/stock/detail/findStockDetailPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
@@ -57,6 +57,17 @@ export const stockDetailProductList = (params) => {
     method: 'post'
   })
 }
+// 散件退货  产品(不抓单)  列表  分页
+export const stockDetailForPurProductList = (params) => {
+  const url = `/stock/detail/findStockDetailPageForPur/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
 //  散件退货  详情  删除
 export const sparePartsRetDetailDel = (params) => {
   const url = `/sparePartsRet/detail/delete/${params.id}`

+ 9 - 0
src/api/stockWarn.js

@@ -19,3 +19,12 @@ export const stockWarnSaveBatch = (params) => {
     method: 'post'
   })
 }
+//  库存预警 导出
+export const stockWarnExport = (params) => {
+  return axios({
+    url: '/stockWarn/export',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 12 - 8
src/components/GlobalHeader/GlobalHeader.vue

@@ -6,15 +6,19 @@
         :class="[fixedHeader && 'ant-header-fixedHeader', sidebarOpened ? 'ant-header-side-opened' : 'ant-header-side-closed', ]"
         :style="{ padding: '0' }">
         <div v-if="mode === 'sidemenu'" class="header">
-          <a-icon v-if="device==='mobile'" class="trigger" :type="collapsed ? 'menu-fold' : 'menu-unfold'" @click="toggle"/>
-          <a-icon v-else class="trigger" :type="collapsed ? 'menu-unfold' : 'menu-fold'" @click="toggle"/>
+          <div class="hleft">
+            <a-icon v-if="device==='mobile'" class="trigger" :type="collapsed ? 'menu-fold' : 'menu-unfold'" @click="toggle"/>
+            <a-icon v-else class="trigger" :type="collapsed ? 'menu-unfold' : 'menu-fold'" @click="toggle"/>
+            <div>
+              <a-alert
+                style="display: inline-block;"
+                type="warning"
+                show-icon
+                v-if="$store.state.app.isLastDayForMonth&&$hasPermissions('M_mothEndTips')"
+                message="临到月底了,请尽快处理系统中没有完结的单据!" />
+            </div>
+          </div>
           <user-menu></user-menu>
-          <a-alert
-            style="display: inline-block;"
-            type="warning"
-            show-icon
-            v-if="$store.state.app.isLastDayForMonth&&$hasPermissions('M_mothEndTips')"
-            message="临到月底了,请尽快处理系统中没有完结的单据!" />
         </div>
         <div v-else :class="['top-nav-header-index', theme]">
           <div class="header-index-wide">

+ 13 - 3
src/components/global.less

@@ -201,6 +201,9 @@ body {
     background: #fff;
     box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
     position: relative;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
   }
   .ant-layout-header{
     height: 44px;
@@ -208,10 +211,17 @@ body {
   }
   .header,
   .top-nav-header-index {
+    .hleft{
+      display:flex;
+    }
     .user-wrapper {
-      float: right;
-      height: 100%;
-
+      flex-grow:1;
+      overflow: auto;
+      height: 46px;
+      .content-box{
+        float:right;
+        text-align: right;
+      }
       .action {
         cursor: pointer;
         padding: 0 12px;

+ 33 - 70
src/config/router.config.js

@@ -1765,7 +1765,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'edit/:id/:sn',
+                path: 'edit/:id/:sn/:supplierSn',
                 name: 'bulkReturnGoodsEdit',
                 component: () => import(/* webpackChunkName: "bulkManagement" */ '@/views/bulkManagement/bulkReturnGoods/edit.vue'),
                 meta: {
@@ -1931,7 +1931,7 @@ export const asyncRouterMap = [
             meta: {
               title: '销售退货报表',
               icon: 'profile',
-              // permission: 'M_salesReturnReportList'
+              permission: 'M_salesReturnReportList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -1943,31 +1943,9 @@ export const asyncRouterMap = [
                   title: '销售退货报表',
                   icon: 'profile',
                   hidden: true,
-                  // permission: 'M_salesReturnReportList'
-                }
-              },
-              {
-                path: 'list',
-                name: 'salesReturnReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/salesReturnReport/list.vue'),
-                meta: {
-                  title: '销售退货报表列表',
-                  icon: 'profile',
-                  hidden: true,
                   permission: 'M_salesReturnReportList'
                 }
               },
-              {
-                path: 'list',
-                name: 'salesReturnDetailReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/salesReturnReport/detailList.vue'),
-                meta: {
-                  title: '销售退货明细报表列表',
-                  icon: 'profile',
-                  hidden: true,
-                  permission: 'M_salesReturnDetailReportList'
-                }
-              }
             ]
           },
           {
@@ -2020,6 +1998,31 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/reportData/stockImportReport',
+            redirect: '/reportData/stockImportReport/index',
+            name: 'stockImportReport',
+            component: BlankLayout,
+            meta: {
+              title: '库存/散件导入报表',
+              icon: 'profile',
+              permission: 'M_stockImportReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'stockImportReportIndex',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/stockImportReport/index.vue'),
+                meta: {
+                  title: '库存/散件导入报表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_stockImportReportList'
+                }
+              },
+            ]
+          },
           {
             path: '/reportData/receivedSendStorageReport',
             redirect: '/reportData/receivedSendStorageReport/list',
@@ -2128,7 +2131,7 @@ export const asyncRouterMap = [
             meta: {
               title: '散件入库报表',
               icon: 'profile',
-              // permission: 'M_bulkWarehousingReportList'
+              permission: 'M_bulkWarehousingReportList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -2140,29 +2143,9 @@ export const asyncRouterMap = [
                   title: '散件入库报表',
                   icon: 'profile',
                   hidden: true,
-                  // permission: 'M_bulkWarehousingReportList'
+                  permission: 'M_bulkWarehousingReportList'
                 }
               },
-              {
-                path: 'list',
-                name: 'bulkWarehousingReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/bulkWarehousingReport/list.vue'),
-                meta: {
-                  title: '散件入库报表列表',
-                  icon: 'profile',
-                  hidden: true,
-                }
-              },
-              {
-                path: 'list',
-                name: 'bulkWarehousingDetailReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/bulkWarehousingReport/detailList.vue'),
-                meta: {
-                  title: '散件入库明细报表列表',
-                  icon: 'profile',
-                  hidden: true,
-                }
-              }
             ]
           },
           {
@@ -2173,7 +2156,7 @@ export const asyncRouterMap = [
             meta: {
               title: '散件退货报表',
               icon: 'profile',
-              // permission: 'M_bulkReturnReportList'
+              permission: 'M_bulkReturnReportList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -2185,29 +2168,9 @@ export const asyncRouterMap = [
                   title: '散件退货报表',
                   icon: 'profile',
                   hidden: true,
-                  // permission: 'M_bulkReturnReportList'
-                }
-              },
-              {
-                path: 'list',
-                name: 'bulkReturnReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/bulkReturnReport/list.vue'),
-                meta: {
-                  title: '散件退货报表列表',
-                  icon: 'profile',
-                  hidden: true,
+                  permission: 'M_bulkReturnReportList'
                 }
               },
-              {
-                path: 'list',
-                name: 'bulkReturnDetailReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/bulkReturnReport/detailList.vue'),
-                meta: {
-                  title: '散件退货明细报表列表',
-                  icon: 'profile',
-                  hidden: true,
-                }
-              }
             ]
           },
           {
@@ -2218,7 +2181,7 @@ export const asyncRouterMap = [
             meta: {
               title: '店内调出报表',
               icon: 'profile',
-              // permission: 'M_storeTransferOutReportList'
+              permission: 'M_storeTransferOutReportList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -2230,7 +2193,7 @@ export const asyncRouterMap = [
                   title: '店内调出报表',
                   icon: 'profile',
                   hidden: true,
-                  // permission: 'M_storeTransferOutReportList'
+                  permission: 'M_storeTransferOutReportList'
                 }
               },
               {

+ 9 - 0
src/main.js

@@ -8,6 +8,15 @@ import { VueAxios } from './utils/request'
 import Viewer from 'v-viewer'
 import 'viewerjs/dist/viewer.css'
 
+import LocaleProvider from 'ant-design-vue'
+Vue.use(LocaleProvider)
+
+// moment
+import moment from 'moment'; 
+import 'moment/locale/zh-cn';
+moment.locale('zh-cn'); //设置语言 或 moment.lang('zh-cn'); 
+Vue.prototype.$moment = moment;//挂载到当前vue实例对象
+
 // mock
 // import './mock'
 

+ 11 - 3
src/views/bulkManagement/bulkReturnGoods/edit.vue

@@ -90,7 +90,14 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="link" class="button-primary" @click.stop="handleAdd(record)" id="bulkReturnGoodsEdit-add-btn">添加</a-button>
+            <a-button
+              size="small"
+              v-if="record.currentQty>0"
+              type="link"
+              class="button-primary"
+              @click.stop="handleAdd(record)"
+              id="bulkReturnGoodsEdit-add-btn">添加</a-button>
+            <span v-else>--</span>
           </template>
         </s-table>
       </a-card>
@@ -195,7 +202,7 @@ import { hdPrint } from '@/libs/JGPrint'
 import { warehouseAllList } from '@/api/warehouse'
 import {
   sparePartsRetDetailList,
-  stockDetailProductList,
+  stockDetailForPurProductList,
   sparePartsRetDetailSave,
   sparePartsRetDetailCount,
   sparePartsRetDetailDel,
@@ -231,11 +238,12 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        return stockDetailProductList(Object.assign(parameter, this.queryParam)).then(res => {
+        return stockDetailForPurProductList(Object.assign(parameter, this.queryParam, { supplierSn: this.$route.params.supplierSn })).then(res => {
           const 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].purchaseCost = data.list[i].dealerProduct.purchasePrice
           }
           this.dataSource = data.list
           this.disabled = false

+ 1 - 1
src/views/bulkManagement/bulkReturnGoods/list.vue

@@ -282,7 +282,7 @@ export default {
       if (row.isGrab == 1) {
         this.$router.push({ name: 'bulkReturnGoodsGrabEdit', params: { id: row.id, sn: row.sparePartsReturnSn, supplierSn: row.supplierSn } })
       } else {
-        this.$router.push({ name: 'bulkReturnGoodsEdit', params: { id: row.id, sn: row.sparePartsReturnSn } })
+        this.$router.push({ name: 'bulkReturnGoodsEdit', params: { id: row.id, sn: row.sparePartsReturnSn, supplierSn: row.supplierSn } })
       }
     },
     //  详情

+ 243 - 0
src/views/bulkManagement/bulkWarehousingOrder/chooseImportModal.vue

@@ -0,0 +1,243 @@
+<template>
+  <a-modal
+    centered
+    wrapClassName="chooseImport-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="确认导入"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="80%">
+    <div class="chooseImport-con">
+      <!-- 可导入数据 -->
+      <div style="display:flex;justify-content: space-between;align-items: center;padding:10px 0;">
+        <div style="display:flex;align-items: center;">
+          可导入数据{{ loadData.length }}条
+          <div v-if="disableProduct.length">
+            ,其中<span style="color: red;">{{ disableProduct.length }}个禁用产品</span>,请确认已禁用的产品是否导入?
+            <a-radio-group v-model="importDisabled">
+              <a-radio :value="1">
+                导入
+              </a-radio>
+              <a-radio :value="0">
+                不导入
+              </a-radio>
+            </a-radio-group>
+          </div>
+        </div>
+        <div v-if="disableProduct.length">
+          <a-checkbox v-model="showDisable">
+            仅显示已禁用产品
+          </a-checkbox>
+        </div>
+      </div>
+      <a-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.productCode"
+        :rowClassName="(record, index) => record.productEnableFlag == 0 ? 'redBg-row':''"
+        :columns="nowColumns"
+        :dataSource="loadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+      </a-table>
+      <a-divider />
+      <!-- 不可导入数据 -->
+      <p class="red">不可导入数据{{ unLoadData.length }}条</p>
+      <a-table
+        class="unTable"
+        ref="unTable"
+        size="small"
+        :rowKey="(record) => record.productCode"
+        :columns="nowUnColumns"
+        :dataSource="unLoadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+        <template slot="errorMsg" slot-scope="text,record">
+          <a-popover placement="topRight">
+            <template slot="content">
+              <p v-for="d in record.errorMsgList">{{ d }}</p>
+            </template>
+            <a-button type="link">
+              查看
+            </a-button>
+          </a-popover>
+        </template>
+      </a-table>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="chooseImport-submit"
+          size="large"
+          :class="loadData.length==0?'button-grey':'button-primary'"
+          @click="handleSubmit"
+          style="padding: 0 40px;">确认导入</a-button>
+        <a-button
+          id="chooseImport-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 40px;margin-left: 15px;">取消</a-button>
+        <a-button
+          type="primary"
+          id="chooseImport-error"
+          size="large"
+          class="button-error"
+          @click="handleError"
+          style="padding: 0 40px;margin-left: 15px;">导出错误项</a-button>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { hdExportExcel } from '@/libs/exportExcel'
+import { sparePartsPurExportErrorLine } from '@/api/sparePartsPur.js'
+export default {
+  name: 'ChooseImportModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    paramsData: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      nowColumns: [
+        { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'putCost', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'putQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productUnit', align: 'center', width: '15%', customRender: function (text) { return text || '--' } }
+      ],
+      nowUnColumns: [
+        { title: '序号', dataIndex: 'no', width: '9%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'putQty', width: '20%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '错误说明', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
+      ],
+      unLoadData: [],
+      loading: false,
+      importDisabled: undefined,
+      showDisable: false,
+      rightData: []
+    }
+  },
+  computed: {
+    // 启用产品
+    enableProduct () {
+      return this.rightData.filter(item => item.productEnableFlag == 1)
+    },
+    // 禁用产品
+    disableProduct () {
+      return this.rightData.filter(item => item.productEnableFlag == 0)
+    },
+    loadData () {
+      return this.showDisable ? this.rightData.filter(item => item.productEnableFlag == 0) : this.rightData
+    }
+  },
+  methods: {
+    getData () {
+      const paramsData = JSON.parse(JSON.stringify(this.paramsData))
+      this.rightData = paramsData.okList || []
+      this.rightData.map((item, index) => {
+        item.no = index + 1
+        item.sparePartsPurchaseSn = paramsData.sparePartsPurchaseSn
+      })
+      this.unLoadData = paramsData.errorList || []
+      this.unLoadData.map((item, index) => {
+        item.no = index + 1
+        item.sparePartsPurchaseSn = paramsData.sparePartsPurchaseSn
+      })
+    },
+    // 确认导入
+    handleSubmit () {
+      if (this.loadData.length == 0) {
+        this.$message.warning('无可导入的产品!')
+      } else {
+        // 有禁用产品
+        if (this.disableProduct.length > 0) {
+          if (this.importDisabled == undefined) {
+            this.$message.warning('请先确认已禁用的产品是否导入?')
+          } else {
+            this.$emit('ok', this.importDisabled == 1 ? this.rightData : this.enableProduct)
+            this.isShow = false
+          }
+        } else {
+          this.$emit('ok', this.rightData)
+          this.isShow = false
+        }
+      }
+    },
+    // 导出
+    handleError () {
+      const _this = this
+      if (_this.paramsData.errorList.length < 1) {
+        _this.$message.info('暂无可导出错误项~')
+        return
+      }
+      _this.spinning = true
+      hdExportExcel(sparePartsPurExportErrorLine, _this.paramsData.errorList, '散件入库导出错误项', function () {
+        _this.spinning = false
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.rightData = []
+        this.unLoadData = []
+        this.importDisabled = undefined
+        this.showDisable = false
+      } else {
+        this.getData()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .chooseImport-modal{
+    .chooseImport-con{
+      .red{
+        color: #f30;
+      }
+      .btn-con{
+        text-align: center;
+        margin: 30px 0 20px;
+        .button-cancel,.button-error{
+          font-size: 12px;
+        }
+      }
+    }
+   .redBg-row{
+      background-color: #f5cdc8;
+    }
+  }
+</style>

+ 97 - 18
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -162,6 +162,40 @@
                   总成本 <strong>{{ (productTotal&&(productTotal.productTotalCost || productTotal.productTotalCost==0)) ? '¥'+productTotal.productTotalCost : '--' }}</strong>
                 </div>
               </a-alert>
+              <div class="table-page-search-wrapper">
+                <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
+                  <a-row :gutter="15">
+                    <a-col :md="4" :sm="24">
+                      <a-form-model-item label="产品编码">
+                        <a-input id="bulkWarehousingOrderEdit-code" v-model.trim="queryChooseParam.productCode" allowClear placeholder="请输入产品编码"/>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                      <a-form-model-item label="产品名称">
+                        <a-input id="bulkWarehousingOrderEdit-name" v-model.trim="queryChooseParam.productName" allowClear placeholder="请输入产品名称"/>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
+                      <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderEdit-choose-refresh">查询</a-button>
+                      <a-button style="margin-left: 8px" @click="resetChooseSearchForm" :disabled="disabled" id="bulkWarehousingOrderEdit-choose-reset">重置</a-button>
+                    </a-col>
+                    <a-col :md="4" :sm="24">
+                    </a-col>
+                    <a-col :md="8" :sm="24" style="text-align:right;">
+                      <a-button
+                        type="default"
+                        @click="openGuideModal=true"
+                        :loading="delLoading"
+                        id="bulkWarehousingOrderEdit-del-all">导入产品</a-button>
+                      <a-button
+                        type="link"
+                        @click="delBulkOrder"
+                        :loading="delLoading"
+                        id="bulkWarehousingOrderEdit-del-all">整单删除</a-button>
+                    </a-col>
+                  </a-row>
+                </a-form>
+              </div>
               <!-- 列表 -->
               <s-table
                 class="sTable"
@@ -233,8 +267,13 @@
         @click="handleSubmit"
         style="padding: 0 60px;">提交</a-button>
     </div>
-    <!-- 选择基本信息弹框 -->
-    <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
+    <!-- 导入弹框 -->
+    <!-- 导入费用明细 -->
+    <importGuideModal
+      :openModal="openGuideModal"
+      :params="{sparePartsPurchaseSn: $route.params.sn}"
+      @close="openGuideModal=false"
+      @ok="hanldeImprotOk" />
     <!-- 新增产品 -->
     <a-modal
       centered
@@ -259,27 +298,38 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import basicInfoModal from './basicInfoModal.vue'
 import { getOperationalPrecision } from '@/libs/tools.js'
-import { sparePartsPurDetail, sparePartsPurDetailList, sparePartsPurDetailCount, sparePartsPurDetailSave, sparePartsPurDetailDel, sparePartsPurSubmit, sparePartsPurDetailPrint } from '@/api/sparePartsPur'
+import {
+  sparePartsPurDetail,
+  sparePartsPurDetailList,
+  sparePartsPurDetailCount,
+  sparePartsPurDetailSave,
+  sparePartsPurDetailDel,
+  sparePartsPurSubmit,
+  sparePartsPurDetailPrint,
+  sparePartsPurDeleteAll,
+  sparePartsPurDetailInsertBatch } from '@/api/sparePartsPur'
 import { bulkProductList } from '@/api/dealerProduct'
 import { warehouseCascadeList } from '@/api/warehouse'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import Print from '@/views/common/print.vue'
+import importGuideModal from './importGuideModal.vue'
 import newProduct from '@/views/productManagement/productInfo/edit.vue'
 import { hdPrint } from '@/libs/JGPrint'
 export default {
   name: 'BulkWarehousingEdit',
-  components: { STable, VSelect, basicInfoModal, Print, ProductType, ProductBrand, newProduct },
+  components: { STable, VSelect, Print, ProductType, ProductBrand, newProduct, importGuideModal },
   mixins: [commonMixin],
   data () {
     return {
       advanced: false,
       spinning: false,
       loading: false,
+      delLoading: false,
       chooseLoading: false,
       showNewProduct: false,
+      openGuideModal: false,
       queryParam: {
         code: '', //  产品编码
         name: '', //  产品名称
@@ -289,6 +339,10 @@ export default {
         productTypeSn2: undefined,
         productTypeSn3: undefined
       },
+      queryChooseParam: {
+        productCode: '', //  产品编码
+        productName: '' //  产品名称
+      },
       productType: [],
       warehouseCascadeData: [], //  仓库仓位
       disabled: false, //  查询、重置按钮是否可操作
@@ -358,7 +412,7 @@ export default {
           parameter.sortField = 'productCode'
           parameter.sortAlias = 'sppd'
         }
-        const params = Object.assign(parameter, { sparePartsPurchaseSn: this.$route.params.sn })
+        const params = Object.assign(parameter, this.queryChooseParam, { sparePartsPurchaseSn: this.$route.params.sn })
         return sparePartsPurDetailList(params).then(res => {
           this.getDetailCount(params)
           const data = res.data
@@ -385,7 +439,6 @@ export default {
       },
       loadDataSource: [],
       chooseLoadDataSource: [],
-      openModal: false, // 选择基本信息弹框是否显示
       warehouseList: [], //  仓库  下拉数据
       warehouseLocList: {}, //  仓位  下拉数据
       defaultWarehouseCascade: [], //  默认仓库仓位
@@ -437,7 +490,7 @@ export default {
       this.queryParam.code = data.code
       this.$refs.table.refresh(true)
     },
-    //  重置
+    //  重置产品列表
     resetSearchForm () {
       this.queryParam.name = ''
       this.queryParam.code = ''
@@ -449,6 +502,12 @@ export default {
       this.productType = []
       this.$refs.table.refresh(true)
     },
+    //  重置已选产品列表
+    resetChooseSearchForm () {
+      this.queryChooseParam.productName = ''
+      this.queryChooseParam.productCode = ''
+      this.$refs.chooseTable.refresh(true)
+    },
     // 打印预览/快捷打印
     handlePrint (type, printerType) {
       const _this = this
@@ -577,6 +636,7 @@ export default {
         title: '提示',
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
+        closable: true,
         onOk () {
           _this.spinning = true
           sparePartsPurDetailDel({ id: row.id }).then(res => {
@@ -591,15 +651,25 @@ export default {
         }
       })
     },
-    //  编辑基本信息
-    handleEditInfo () {
-      this.openModal = true
-    },
-    //  基本信息  保存
-    handleOk () {},
-    //  导入明细
-    handleImport () {
-      console.log(333)
+    // 整单删除
+    delBulkOrder () {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '删除后不可恢复,确认删除所有已选产品吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.spinning = true
+          sparePartsPurDeleteAll({ sn: _this.$route.params.sn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.chooseTable.refresh()
+            }
+            _this.spinning = false
+          })
+        }
+      })
     },
     //  返回列表
     handleBack () {
@@ -694,12 +764,21 @@ export default {
         }
       })
     },
+    // 确认导入明细
+    hanldeImprotOk (obj) {
+      this.spinning = true
+      sparePartsPurDetailInsertBatch(obj).then(res => {
+        if (res.status == 200) {
+          this.resetChooseSearchForm()
+        }
+        this.spinning = false
+      })
+    },
     initPage () {
       this.getWarehouseCascade()
       this.getDetail()
       this.resetSearchForm()
       this.$refs.chooseTable.refresh(true)
-      this.openModal = false
       this.$refs.searchProductCode.focus()
     }
   },

+ 201 - 0
src/views/bulkManagement/bulkWarehousingOrder/importGuideModal.vue

@@ -0,0 +1,201 @@
+<template>
+  <a-modal
+    centered
+    class="importGuide-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="导入产品"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="800">
+    <div class="importGuide-con">
+      <div class="explain-con">
+        <div class="explain-item">
+          <div class="explain-tit">
+            <span>1</span>准备导入
+          </div>
+          <ul>
+            <li>1) 导入的Excel文件中必须包含名为“产品编码”、“成本价”、“数量”、“仓库”、“仓位”的列,且名称必须相同,其它列可自定义,不影响数据导入</li>
+            <li>2) 如果导入的产品已经存在,则不会导入该行</li>
+          </ul>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+        </div>
+        <div class="explain-item">
+          <div class="explain-tit">
+            <span>2</span>上传数据文件
+          </div>
+          <p>目前支持的文件类型*.xls,*.xlsx.</p>
+          <div style="overflow: hidden;padding-left: 23px;">
+            <Upload
+              id="importGuide-attachList"
+              ref="importUpload"
+              :maxNums="1"
+              fileType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
+              uploadType="attach"
+              :action="attachAction"
+              :uploadParams="uploadParams"
+              upText="选择导入文件"
+              @remove="resetSearchForm"
+              @change="changeImport"></Upload>
+          </div>
+        </div>
+      </div>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="importGuide-nextStep"
+          size="large"
+          class="button-primary"
+          @click="handlerNextStep"
+          style="padding: 0 60px;">下一步</a-button>
+        <a-button
+          id="importGuide-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 60px;margin-left: 15px;">取消</a-button>
+      </div>
+    </div>
+    <!-- 导入 -->
+    <chooseImportModal :openModal="openImportModal" :paramsData="paramsData" @close="handleClose" @ok="hanldeOk" />
+  </a-modal>
+</template>
+
+<script>
+import ChooseImportModal from './chooseImportModal.vue'
+import { Upload } from '@/components'
+export default {
+  name: 'ImportGuideModal',
+  components: { ChooseImportModal, Upload },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    params: {
+      type: Object,
+      default: null
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      openImportModal: false, //  导入
+      attachAction: process.env.VUE_APP_API_BASE_URL + '/sparePartsPur/detail/import',
+      paramsData: null,
+      uploadParams: {
+        savePathType: 'local',
+        sparePartsPurchaseSn: this.params.sparePartsPurchaseSn
+      }
+    }
+  },
+  methods: {
+    // 清空数据
+    resetSearchForm () {
+      this.$refs.importUpload.setFileList() //  清空导入文件
+      this.paramsData = null //  清空上传数据
+    },
+    // 下一步
+    handlerNextStep () {
+      if (this.paramsData) {
+        this.openImportModal = true
+      } else {
+        this.$message.warning('添加文件后再进行下一步操作!')
+      }
+    },
+    // 上传文件  change
+    changeImport (file) {
+      // console.log(file, JSON.parse(file))
+      if (file && JSON.parse(file).length > 0) {
+        this.paramsData = Object.assign({}, JSON.parse(file)[0] || null, this.params)
+      } else {
+        this.paramsData = null
+      }
+    },
+    // 导入
+    hanldeOk (obj) {
+      if (obj && obj.length > 0) {
+        this.$emit('ok', obj)
+        this.isShow = false
+      }
+    },
+    // 关闭
+    handleClose () {
+      this.openImportModal = false
+      this.isShow = false
+    },
+    // 下载模板
+    handleExport () {
+      const link = document.createElement('a')
+      link.style.display = 'none'
+      link.href = 'https://jianguan-images.oss-cn-beijing.aliyuncs.com/template/散件入库产品导入模板.xlsx'
+      link.setAttribute('download', '散件入库产品导入模板' + '.xlsx')
+      document.body.appendChild(link)
+      link.click()
+      document.body.removeChild(link)
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.resetSearchForm()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .importGuide-modal{
+    .importGuide-con{
+      .explain-con{
+        .explain-item{
+          margin-bottom: 10px;
+          .explain-tit{
+            font-weight: bold;
+            span{
+              display: inline-block;
+              width: 18px;
+              height: 18px;
+              line-height: 16px;
+              text-align: center;
+              margin-right: 5px;
+              border-radius: 50%;
+              border: 1px solid rgba(0, 0, 0, 0.3);
+            }
+          }
+          p{
+            margin: 8px 0;
+            padding-left: 23px;
+          }
+          ul{
+            list-style: none;
+            padding: 0;
+            padding-left: 23px;
+            margin: 0;
+            li{
+              line-height: 26px;
+            }
+          }
+        }
+        #importGuide-attachList{
+          width: 100%;
+        }
+      }
+      .btn-con{
+        margin: 10px 0 20px;
+        text-align: center;
+        .button-cancel{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 5 - 1
src/views/inventoryManagement/inventoryImport/list.vue

@@ -23,7 +23,7 @@
             <div class="explain-tit">导入文件说明</div>
             <ul>
               <li>1) 导入的EXCEL文件中必须包含名为"产品编码"、"仓库"、"仓位"、"入库数量"、"成本价";列顺序可忽略、行顺序可忽略。以产品编码,仓库,仓位,成本价作为导入的是否有效判断依据。</li>
-              <li>2) 红色底白字为错误项,错误项忽略不能导入,正确项可直接导入。</li>
+              <li>2) 红色底为错误项,错误项忽略不能导入,正确项可直接导入。</li>
               <li>3) 入库数量必须大于0,且为正整数,为了保证数据的正确性,请检查上传文件数据无误后再上传操作。</li>
               <li>4) 成本价为必填项,必须填写大于等于零的数字。</li>
               <li>5) 支持上传文件格式:.xls、.xlsx。</li>
@@ -165,6 +165,10 @@ export default {
     // 确认导入
     handleConfirm () {
       const _this = this
+      if (this.isAllError) {
+        this.$message.error('没有可导入的数据!')
+        return false
+      }
       this.$confirm({
         title: '提示',
         content: '您是否确认导入库存?',

+ 19 - 1
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -47,6 +47,14 @@
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryWarningList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryWarningList-reset">重置</a-button>
+              <a-button
+                type="primary"
+                style="margin-left: 5px"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                class="button-warning"
+                id="inventoryWarningList-export-btn">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -155,7 +163,8 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import { stockWarnList, stockWarnSaveBatch } from '@/api/stockWarn'
+import { stockWarnList, stockWarnSaveBatch, stockWarnExport } from '@/api/stockWarn'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 export default {
@@ -242,6 +251,15 @@ export default {
         }
       }
     },
+    // 导出
+    handleExport () {
+      const _this = this
+      _this.exportLoading = true
+      stockWarnExport(_this.queryParam).then(res => {
+        downloadExcel(res, '库存预警')
+        _this.exportLoading = false
+      })
+    },
     //  保存
     handleSave (row, isBatch) {
       const params = []

+ 4 - 4
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -98,14 +98,14 @@
           <a-button
             size="small"
             type="link"
-            v-if="(record.hasStockBill == '0' && (record.state == 'CHECKED'||record.state == 'FINISH')) && $hasPermissions('B_purchaseReturnOutStock')"
+            v-else-if="(record.hasStockBill == '0' && (record.state == 'CHECKED'||record.state == 'FINISH')) && $hasPermissions('B_purchaseReturnOutStock')"
             @click="handleWarehouse(record)"
             class="button-primary"
             id="bulkReturnGoodsList-warehouse-btn">生成出库单</a-button>
           <a-button
             size="small"
             type="link"
-            v-if="record.state == 'CHECKED' && $hasPermissions('B_purchaseReturnFinishBill')"
+            v-else-if="record.state == 'CHECKED' && $hasPermissions('B_purchaseReturnFinishBill')"
             @click="handleFinishBill(record)"
             class="button-primary"
             id="bulkReturnGoodsList-warehouse-btn">完结单据</a-button>
@@ -113,10 +113,10 @@
             size="small"
             type="link"
             class="button-error"
-            v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_purchaseReturnDel')"
+            v-else-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_purchaseReturnDel')"
             @click="handleDel(record)"
             id="purchaseReturnList-del-btn">删除</a-button>
-          <span v-if="!((record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && ($hasPermissions('B_purchaseReturnEdit') || $hasPermissions('B_purchaseReturnDel'))) && !(record.hasStockBill == '0' && ($hasPermissions('B_purchaseReturnOutStock') || $hasPermissions('B_purchaseReturnFinishBill')))">--</span>
+          <span v-else>--</span>
         </template>
       </s-table>
     </a-spin>

+ 37 - 18
src/views/reportData/salesDetailReport/list.vue

@@ -15,21 +15,26 @@
         @keyup.enter.native="handleSearch" >
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
-            <a-form-model-item label="审核时间" prop="time">
-              <rangeDate ref="rangeDate" @change="dateChange" />
+            <a-form-model-item label="创建时间">
+              <rangeDate ref="creatDate" v-model="creatTime" @change="creatDateChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="审核时间">
+              <rangeDate ref="rangeDate" v-model="time" @change="dateChange" />
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="出库时间">
-              <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
+              <rangeDate ref="outWareRangeDate" v-model="outWareTime" @change="outWareDateChange" />
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
-            <a-form-model-item label="客户名称">
-              <a-input id="salesDetailReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
-            </a-form-model-item>
-          </a-col>
           <template v-if="advanced">
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="客户名称">
+                <a-input id="salesDetailReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+              </a-form-model-item>
+            </a-col>
             <a-col :md="4" :sm="24">
               <a-form-model-item label="客户类型">
                 <a-select id="salesDetailReportList-customerType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
@@ -189,8 +194,11 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       outWareTime: [],
+      time: [],
+      creatTime: [],
       queryParam: { //  查询条件
-        time: [],
+        createBeginDate: '',
+        createEndDate: '',
         beginDate: '',
         endDate: '',
         salesTargetName: '',
@@ -286,26 +294,33 @@ export default {
         }
       })
     },
+    creatDateChange (date) {
+      this.creatTime = date
+      this.queryParam.createBeginDate = date[0] || ''
+      this.queryParam.createEndDate = date[1] || ''
+    },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      this.time = date
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
     outWareDateChange (date) {
+      this.outWareTime = date
       this.queryParam.outWarehouseBeginDate = date[0]
       this.queryParam.outWarehouseEndDate = date[1]
     },
     //  查询
     handleSearch () {
-      this.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          this.$refs.table.refresh(true)
-        } else {
-          console.log('error submit!!')
-          return false
-        }
-      })
+      const str = JSON.stringify(this.queryParam)
+      const ret = str.replace(/\[|\]/g, '"').replace(/"},"/g, '","').replace(/"}/g, '","').match(/"\:".*?","/g)
+      const ret1 = ret.filter(item => item != '":"","')
+      console.log(ret1)
+      if (ret1.length) {
+        this.$refs.table.refresh(true)
+      } else {
+        this.$message.info('请至少输入一个查询条件')
+      }
     },
     //  重置
     resetSearchForm () {
@@ -317,6 +332,10 @@ export default {
       this.outWareTime = []
       this.queryParam.outWarehouseBeginDate = ''
       this.queryParam.outWarehouseEndDate = ''
+      this.$refs.creatDate.resetDate()
+      this.creatTime = []
+      this.queryParam.createBeginDate = ''
+      this.queryParam.createEndDate = ''
       this.queryParam.salesTargetName = ''
       this.queryParam.salesTargetType = undefined
       this.queryParam.provinceSn = undefined

+ 40 - 18
src/views/reportData/salesReport/list.vue

@@ -15,21 +15,26 @@
         @keyup.enter.native="handleSearch" >
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
-            <a-form-model-item label="审核时间" prop="time">
-              <rangeDate ref="rangeDate" @change="dateChange" />
+            <a-form-model-item label="创建时间">
+              <rangeDate ref="creatDate" v-model="creatTime" @change="creatDateChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="审核时间">
+              <rangeDate ref="rangeDate" v-model="time" @change="dateChange" />
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="出库时间">
-              <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
+              <rangeDate ref="outWareRangeDate" v-model="outWareTime" @change="outWareDateChange" />
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
-            <a-form-model-item label="客户名称">
-              <a-input id="salesReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
-            </a-form-model-item>
-          </a-col>
           <template v-if="advanced">
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="客户名称">
+                <a-input id="salesReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+              </a-form-model-item>
+            </a-col>
             <a-col :md="4" :sm="24">
               <a-form-model-item label="客户类型">
                 <a-select id="salesReportList-salesTargetType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
@@ -153,7 +158,8 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        time: [],
+        createBeginDate: '',
+        createEndDate: '',
         beginDate: '',
         endDate: '',
         outWarehouseBeginDate: '',
@@ -167,6 +173,8 @@ export default {
         salesBillNo: '',
         salesManName: ''
       },
+      creatTime: [],
+      time: [],
       outWareTime: [],
       rules: {
         'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
@@ -237,37 +245,51 @@ export default {
         }
       })
     },
+    creatDateChange (date) {
+      this.creatTime = date
+      this.queryParam.createBeginDate = date[0] || ''
+      this.queryParam.createEndDate = date[1] || ''
+    },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      this.time = date
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
     outWareDateChange (date) {
+      this.outWareTime = date
       this.queryParam.outWarehouseBeginDate = date[0]
       this.queryParam.outWarehouseEndDate = date[1]
     },
     //  查询
     handleSearch () {
-      this.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          this.$refs.table.refresh(true)
-        } else {
-          console.log('error submit!!')
-          return false
+      let hasVal = false
+      for (const key in this.queryParam) {
+        if (this.queryParam[key]) {
+          hasVal = true
+          break
         }
-      })
+      }
+      if (hasVal) {
+        this.$refs.table.refresh(true)
+      } else {
+        this.$message.info('请至少输入一个查询条件')
+      }
     },
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()
-      this.queryParam.time = []
+      this.time = []
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.$refs.outWareRangeDate.resetDate('')
       this.outWareTime = []
       this.queryParam.outWarehouseBeginDate = ''
       this.queryParam.outWarehouseEndDate = ''
+      this.$refs.creatDate.resetDate()
+      this.creatTime = []
+      this.queryParam.createBeginDate = ''
+      this.queryParam.createEndDate = ''
 
       this.queryParam.salesTargetName = ''
       this.queryParam.salesTargetType = undefined

+ 307 - 0
src/views/reportData/stockImportReport/detailList.vue

@@ -0,0 +1,307 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="salesDetailReportList-form"
+        ref="ruleForm"
+        class="form-model-con"
+        layout="inline"
+        :model="queryParam"
+        :rules="rules"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol"
+        @keyup.enter.native="handleSearch" >
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="库存导入单号">
+              <a-input v-model.trim="queryParam.stockImportNo" allowClear placeholder="请输入库存导入单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="导入类型">
+              <a-select
+                placeholder="请选择导入类型"
+                v-model="queryParam.importType">
+                <a-select-option value="STOCK_IMPORT">
+                  库存导入
+                </a-select-option>
+                <a-select-option value="SPARE_PARTS_IMPORT">
+                  散件导入
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="供应商">
+              <supplier
+                v-model="supplierSn"
+                placeholder="请选择供应商"
+                @change="supplierChange"
+              ></supplier>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品品牌">
+                <ProductBrand placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品分类">
+                <ProductType placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="queryParam.productType"></ProductType>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="导入时间">
+                <rangeDate ref="rangeDate" @change="dateChange" />
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesDetailReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesDetailReportList-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('B_StockImportDetailExport')"
+              class="button-warning"
+              id="salesDetailReportList-export-btn">导出</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 5px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" style="margin-bottom:10px">
+      <div class="ftext" slot="message">
+        产品总数量:<strong>{{ (totalData && (totalData.putQty || totalData.putQty==0)) ? totalData.putQty : '--' }}</strong>;
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          总成本:<strong>{{ (totalData && (totalData.cost || totalData.cost==0)) ? '¥'+totalData.cost : '--' }}</strong>。
+        </div>
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
+import supplier from '@/views/common/supplier'
+import { reportStockImportDetailList, reportStockImportDetailCount, reportStockImportDetailExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      supplierSn: undefined,
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: '',
+        productType: undefined,
+        importType: undefined,
+        productEntity: {
+          productBrandSn: undefined, //  产品品牌
+          productTypeSn1: '', //  产品一级分类
+          productTypeSn2: '', //  产品二级分类
+          productTypeSn3: '', //  产品三级分类
+          code: '', //  产品编码
+          name: '' //  产品名称
+        },
+        stockImportNo: '',
+        supplierName: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择导入时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportStockImportDetailList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            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].inStockQty = data.list[i].qty
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      totalData: null //  合计
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '库存导入单号', dataIndex: 'stockImportNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '导入类型', dataIndex: 'importTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '供应商', dataIndex: 'supplierName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'putQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '成本', dataIndex: 'cost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '导入时间', dataIndex: 'importTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(8, 0, { title: '成本', dataIndex: 'cost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    supplierChange (val, row) {
+      this.queryParam.supplierName = row ? row.supplierName : ''
+    },
+    // 合计
+    getCount (params) {
+      reportStockImportDetailCount(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.time = date
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    //  查询
+    handleSearch () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      if (this.advanced) {
+        this.$refs.rangeDate.resetDate()
+      }
+      this.supplierSn = undefined
+      this.queryParam.time = []
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.stockImportNo = ''
+      this.queryParam.supplierName = ''
+      this.queryParam.importType = undefined
+      this.queryParam.productEntity.productBrandSn = undefined
+      this.queryParam.productEntity.productTypeSn1 = ''
+      this.queryParam.productEntity.productTypeSn2 = ''
+      this.queryParam.productEntity.productTypeSn3 = ''
+      this.queryParam.productEntity.code = ''
+      this.queryParam.productEntity.name = ''
+      this.queryParam.productType = []
+      this.productType = []
+      this.$refs.ruleForm.resetFields()
+      this.totalData = null
+      this.$refs.table.clearTable()
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
+          _this.exportLoading = true
+          _this.spinning = true
+          reportStockImportDetailExport(params).then(res => {
+            downloadExcel(res, '库存导入明细报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productEntity.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productEntity.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    pageInit () {
+      this.disabled = false
+      this.spinning = false
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 46 - 0
src/views/reportData/stockImportReport/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <div class="tabsReportList-wrap">
+    <div style="background-color: #fff;margin-bottom: 5px;">
+      <a-tabs default-active-key="1" v-model="curTab">
+        <a-tab-pane key="1" tab="库存/散件导入报表"></a-tab-pane>
+        <a-tab-pane key="2" tab="库存/散件导入明细报表" force-render></a-tab-pane>
+      </a-tabs>
+    </div>
+    <a-card size="small" :bordered="false">
+      <report v-show="curTab==1"></report>
+      <detailReport v-show="curTab==2"></detailReport>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import report from './list.vue'
+import detailReport from './detailList.vue'
+export default {
+  name: 'StockImportReportIndex',
+  components: {
+    report,
+    detailReport
+  },
+  data () {
+    return {
+      curTab: '1'
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .tabsReportList-wrap{
+    display: flex;
+    flex-direction: column;
+    height: 100%;
+    .ant-tabs-bar{
+      margin: 0;
+    }
+    .ant-card{
+      flex-grow: 1;
+      overflow: auto;
+    }
+  }
+</style>

+ 194 - 0
src/views/reportData/stockImportReport/list.vue

@@ -0,0 +1,194 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="salesReturnReportList-form"
+        ref="ruleForm"
+        class="form-model-con"
+        layout="inline"
+        :model="queryParam"
+        :rules="rules"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol"
+        @keyup.enter.native="handleSearch" >
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="导入类型">
+              <a-select
+                placeholder="请选择导入类型"
+                v-model="queryParam.importType">
+                <a-select-option value="STOCK_IMPORT">
+                  库存导入
+                </a-select-option>
+                <a-select-option value="SPARE_PARTS_IMPORT">
+                  散件导入
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="导入时间">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesReturnReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesReturnReportList-reset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" style="margin-bottom:10px">
+      <div class="ftext" slot="message">
+        总单数:<strong>{{ (totalData && (totalData.totalRowSize || totalData.totalRowSize==0)) ? totalData.totalRowSize : '--' }}</strong>;
+        产品总数量:<strong>{{ (totalData && (totalData.productTotalQty || totalData.productTotalQty==0)) ? totalData.productTotalQty : '--' }}</strong>;
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          总成本:<strong>{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? '¥'+totalData.productTotalCost : '--' }}</strong>。
+        </div>
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { reportStockImportList, reportStockImportCount } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: '',
+        importType: undefined
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择导入时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportStockImportList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            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
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      totalData: null //  合计
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '库存导入单号', dataIndex: 'stockImportNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '导入类型', dataIndex: 'importTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '款数', dataIndex: 'productTotalCategory', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'productTotalQty', width: '15%', 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 : '--') } },
+        { title: '导入时间', dataIndex: 'importTime', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(5, 0, { title: '成本', dataIndex: 'productTotalCost', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportStockImportCount(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.time = date
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    //  查询
+    handleSearch () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.time = []
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.importType = undefined
+      this.$refs.ruleForm.resetFields()
+      this.totalData = null
+      this.$refs.table.clearTable()
+      this.$nextTick(() => {
+        this.$refs.rangeDate.resetDate()
+      })
+    },
+    pageInit () {}
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 2 - 2
src/views/salesManagement/giftRecord/list.vue

@@ -122,8 +122,8 @@ export default {
         // { title: '成本小计', dataIndex: 'totalCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(8, 0, { title: '成本价', dataIndex: 'cost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(9, 0, { title: '成本小计', dataIndex: 'totalCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        // arr.splice(8, 0, { title: '成本价', dataIndex: 'cost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(8, 0, { title: '成本小计', dataIndex: 'totalCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr
   	}

+ 5 - 1
src/views/salesManagement/salesReturn/detail.vue

@@ -25,9 +25,10 @@
                 <span v-else>--</span>
               </a-descriptions-item>
               <a-descriptions-item label="联系电话">{{ detailData&&detailData.contactTel || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="备注">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
               <a-descriptions-item label="退货单号">{{ detailData&&detailData.salesReturnNo || '--' }}</a-descriptions-item>
               <a-descriptions-item label="业务状态">{{ detailData&&detailData.stateDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="是否抓单">{{ detailData&&detailData.grabFlag==1?'抓单':'不抓单' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
         </a-collapse>
@@ -141,6 +142,9 @@ export default {
       salesReturnDetail({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.detailData = res.data
+          if (res.data.grabFlag == '1') {
+            this.columns.splice(1, 0, { title: '销售单号', dataIndex: 'salesBillNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
+          }
         } else {
           this.detailData = null
         }

+ 1 - 1
vue.config.js

@@ -211,7 +211,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.151:8503/qpls-md',
+        // target: 'http://192.168.0.215:8076/qpls-md',
         target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,