chenrui преди 1 година
родител
ревизия
84d6387380

BIN
src/assets/img/ongoing.png


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

@@ -431,6 +431,17 @@ export const asyncRouterMap = [
                   hidden: true,
                   permission: 'M_outboundOrderList'
                 }
+              },
+              {
+                path: 'uniqueCode',
+                name: 'uniqueCodeList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/outboundOrder/uniqueCodeList.vue'),
+                meta: {
+                  title: '轮胎唯一码',
+                  icon: 'export',
+                  hidden: true
+                  // permission: 'M_uniqueCodeList'
+                }
               }
             ]
           },
@@ -2450,6 +2461,31 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/reportData/tireSalesReport',
+            redirect: '/reportData/tireSalesReport/list',
+            name: 'tireSalesReport',
+            component: BlankLayout,
+            meta: {
+              title: '轮胎销售统计报表',
+              icon: 'profile'
+              // permission: 'M_tireSalesReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'tireSalesReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/tireSalesReport/list.vue'),
+                meta: {
+                  title: '轮胎销售统计报表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_tireSalesReportList'
+                }
+              }
+            ]
           }
           // {
           //   path: '/reportData/allCountryCostReport',
@@ -2873,6 +2909,31 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/productManagement/productSourcePath',
+            redirect: '/productManagement/productSourcePath/list',
+            name: 'productSourcePath',
+            component: BlankLayout,
+            meta: {
+              title: '产品追溯列表',
+              icon: 'radar-chart'
+              // permission: 'M_productSourcePathList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'productSourcePathList',
+                component: () => import(/* webpackChunkName: "productManagement" */ '@/views/productManagement/productSourcePath/list.vue'),
+                meta: {
+                  title: '产品追溯列表',
+                  icon: 'radar-chart',
+                  hidden: true
+                  // permission: 'M_productSourcePathList'
+                }
+              }
+            ]
           }
         ]
       },

+ 409 - 0
src/views/productManagement/productSourcePath/list.vue

@@ -0,0 +1,409 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="tireSalesReportList-wrap searchBox">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="tireSalesReportList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :model="queryParam"
+          :rules="rules"
+          @keyup.enter.native="handleSearch">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="出库时间" prop="time">
+                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务单号">
+                <a-input id="inventoryQueryList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入业务单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品编码">
+                <a-input id="inventoryQueryList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="唯一码">
+                <a-input id="inventoryQueryList-productOrigCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入唯一码"/>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品名称">
+                  <a-input id="inventoryQueryList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品名称"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户名称">
+                  <a-input
+                    id="salesOrderTotalList-dealerName"
+                    v-model.trim="queryParam.dealerName"
+                    allowClear
+                    placeholder="请输入客户名称" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="当前所在客户">
+                  <a-input id="inventoryQueryList-productOrigCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入客户名称"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="质保状态">
+                  <v-select
+                    v-model="queryParam.dealerLevel"
+                    ref="dealerLevel"
+                    id="salesOrderTotalList-dealerLevel"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择业务状态"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="24" :sm="24" style="text-align: center;">
+              <a-button
+                style="margin-left: 5px"
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="salesOrderTotalList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="salesOrderTotalList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_salesOrderTotalExport')"
+                id="salesOrderTotalList-export">导出</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-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 统计 -->
+        <a-row :gutter="15">
+          <a-col :md="20" :sm="24">
+            <div class="tongji-bar" style="margin-bottom:10px">
+              产品总款数:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '0' }}</strong>;
+              产品总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
+            </div>
+          </a-col>
+          <a-col :md="4" :sm="24" style="text-align:right;">
+            <a-checkbox @change="onTiresChange">
+              已退货轮胎
+            </a-checkbox>
+          </a-col>
+        </a-row>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.salesBillNo"
+          :style="{ height: tableHeight+70+'px' }"
+          rowKeyName="salesBillNo"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight-10 }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              class="button-warning"
+              @click="openRecordModal = true"
+            >流转记录</a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-warning"
+              @click="openInfoModal = true"
+            >质保信息</a-button>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 质保信息-->
+      <warranty-info-modal v-drag :openModal="openInfoModal" @close="openInfoModal = false" />
+      <!-- 流转记录 -->
+      <roam-record-modal v-drag :openModal="openRecordModal" @close="openRecordModal = false" />
+    </a-card>
+  </div>
+</template>
+
+<script>
+import {
+  commonMixin
+} from '@/utils/mixin'
+import getDate from '@/libs/getDate.js'
+import {
+  STable,
+  VSelect
+} from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import subarea from '@/views/common/subarea.js'
+import custList from '@/views/common/custList.vue'
+import reportModal from '@/views/common/reportModal.vue'
+import AreaList from '@/views/common/areaList.js'
+import warrantyInfoModal from './warrantyInfoModal.vue'
+import roamRecordModal from './roamRecordModal.vue'
+import {
+  hdExportExcel
+} from '@/libs/exportExcel'
+import {
+  userQueryList
+} from '@/api/power-user'
+import {
+  reportSalesBillList,
+  reportSalesBillCount,
+  reportSalesBillExport
+} from '@/api/reportData'
+export default {
+  name: 'SalesOrderTotalList',
+  mixins: [commonMixin],
+  components: {
+    STable,
+    VSelect,
+    rangeDate,
+    custList,
+    subarea,
+    reportModal,
+    AreaList,
+    warrantyInfoModal,
+    roamRecordModal
+  },
+  data () {
+    return {
+      spinning: false,
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      showExport: false,
+      isReturnedTires: false,
+      queryParam: { //  查询条件
+        time: [
+          getDate.getCurrMonthDays().starttime,
+          getDate.getCurrMonthDays().endtime
+        ],
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
+        salesBillNo: '',
+        dealerName: '',
+        dealerLevel: undefined,
+        operatorSn: undefined,
+        subareaArea: {
+          subareaSn: undefined,
+          subareaAreaSn: undefined
+        },
+        dealerProvinceSn: undefined
+      },
+      openInfoModal: false, // 质保信息弹窗
+      openRecordModal: false, // 流转记录弹窗
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '产品编码', dataIndex: 'indirectDealerName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '唯一码', dataIndex: 'giftQty', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务单号', dataIndex: 'salesBillNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库时间', dataIndex: 'giftQty', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'totalQty', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'dealerName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '出库仓库', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '当前所在客户', dataIndex: 'giftQty', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '质保状态', dataIndex: 'giftQty', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
+      ],
+      rules: {
+        'time': [{
+          required: true,
+          message: '请选择销售日期',
+          trigger: 'change'
+        }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        return reportSalesBillList(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,
+      operatorList: [], //  操作员下拉数据
+      addrProvinceList: [] //  省下拉
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  methods: {
+    onTiresChange (e) {
+      console.log(`checked = ${e.target.checked}`)
+    },
+    // 盘点库存日期
+    handleStock () {
+      this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')
+    },
+    // 总计
+    getCount (params) {
+      reportSalesBillCount(params).then(res => {
+        if (res.status == 200 && res.data) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    handleSearch () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$refs.table.refresh(true)
+        } else {
+          _this.$message.error('请选择销售日期')
+          return false
+        }
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    custChange (val) {
+      this.queryParam.dealerSn = val.key
+    },
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ]
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.salesBillNo = ''
+      this.queryParam.dealerName = ''
+      this.queryParam.dealerLevel = undefined
+      this.queryParam.operatorSn = undefined
+      this.queryParam.subareaArea.subareaSn = undefined
+      this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.dealerProvinceSn = undefined
+      this.totalData = null
+      if (this.advanced) {
+        this.$refs.subarea.clearData()
+      }
+      this.$refs.ruleForm.resetFields()
+      this.$refs.table.clearTable()
+    },
+    //  导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.$store.state.app.curActionPermission = 'B_salesOrderTotalExport'
+          _this.showExport = true
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(reportSalesBillExport, params, '销售(开单统计)报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
+            _this.$store.state.app.curActionPermission = ''
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 操作员
+    getUserList () {
+      userQueryList({}).then(res => {
+        if (res.status == 200) {
+          this.operatorList = res.data
+        } else {
+          this.operatorList = []
+        }
+      })
+    },
+    pageInit () {
+      const _this = this
+      _this.getUserList()
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 236
+    }
+  },
+  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>

+ 111 - 0
src/views/productManagement/productSourcePath/roamRecordModal.vue

@@ -0,0 +1,111 @@
+<template>
+  <a-modal
+    centered
+    class="warrantyInfo-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="流转记录"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="600">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-timeline mode="alternate">
+        <a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
+        <a-timeline-item color="green">
+          Solve initial network problems 2015-09-01
+        </a-timeline-item>
+        <a-timeline-item>
+          <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;" />
+          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
+          laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
+          beatae vitae dicta sunt explicabo.
+        </a-timeline-item>
+        <a-timeline-item color="red">
+          Network problems being solved 2015-09-01
+        </a-timeline-item>
+        <a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
+        <a-timeline-item>
+          <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;" />
+          Technical testing 2015-09-01
+        </a-timeline-item>
+      </a-timeline>
+      <div class="btn-cont">
+        <a-button id="warrantyInfo-back" @click="isShow = false">关闭</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { productPricingSnDetail } from '@/api/product'
+export default {
+  name: 'ProductPricingAuditModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      spinning: false,
+      detailsData: null //  详情数据
+    }
+  },
+  methods: {
+    //  获取详情
+    getDetail () {
+      productPricingSnDetail({ sn: this.itemSn }).then(res => {
+        if (res.status == 200) {
+          this.detailsData = res.data
+        } else {
+          this.detailsData = null
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .warrantyInfo-modal{
+    .ant-modal-body {
+      padding: 30px 40px 24px;
+    }
+    .infoList {
+      margin-bottom:26px;
+      .ant-descriptions-title{
+        margin-bottom:10px !important;
+      }
+      .ant-descriptions-row > th, .ant-descriptions-row > td{
+        padding-bottom: 5px !important;
+      }
+    }
+    .infoTopList{
+      display:flex;
+      .ant-descriptions-row:nth-child(2),.ant-descriptions-row:nth-child(3){
+        font-weight: bold;
+      }
+      .ant-descriptions-row:nth-child(2) .ant-descriptions-item > span,.ant-descriptions-row:nth-child(3) .ant-descriptions-item > span{
+        font-weight: bold;
+      }
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 20px;
+    }
+  }
+</style>

+ 150 - 0
src/views/productManagement/productSourcePath/warrantyInfoModal.vue

@@ -0,0 +1,150 @@
+<template>
+  <a-modal
+    centered
+    class="warrantyInfo-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="质保信息"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="600">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="infoList infoTopList">
+        <img
+          style="margin-right:20px;"
+          src="https://img2.baidu.com/it/u=2868393532,862853407&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800"
+          alt=""
+          width="120"
+          height="80"
+          align="middle" />
+        <a-descriptions :column="1">
+          <a-descriptions-item label="轮胎名称">
+            Zhou Maomao
+          </a-descriptions-item >
+          <a-descriptions-item label="轮胎唯一码">
+            1810000000
+          </a-descriptions-item>
+          <a-descriptions-item label="质保时间">
+            Hangzhou, Zhejiang
+          </a-descriptions-item>
+        </a-descriptions>
+        <img src="@/assets/img/ongoing.png" alt="" width="60" height="60">
+      </div>
+      <div class="infoList">
+        <a-descriptions title="门店信息" :column="1">
+          <a-descriptions-item label="门店名称">
+            Zhou Maomao
+          </a-descriptions-item>
+          <a-descriptions-item label="汽配经销商">
+            1810000000
+          </a-descriptions-item>
+          <a-descriptions-item label="姓名">
+            Hangzhou, Zhejiang
+          </a-descriptions-item>
+          <a-descriptions-item label="电话">
+            empty
+          </a-descriptions-item>
+        </a-descriptions>
+      </div>
+      <div class="infoList">
+        <a-descriptions title="车辆信息" :column="1">
+          <a-descriptions-item label="车辆品牌">
+            Zhou Maomao
+          </a-descriptions-item>
+          <a-descriptions-item label="车型">
+            1810000000
+          </a-descriptions-item>
+          <a-descriptions-item label="里程数">
+            Hangzhou, Zhejiang
+          </a-descriptions-item>
+          <a-descriptions-item label="车牌号">
+            empty
+          </a-descriptions-item>
+          <a-descriptions-item label="客户姓名">
+            empty
+          </a-descriptions-item>
+          <a-descriptions-item label="手机号码">
+            empty
+          </a-descriptions-item>
+        </a-descriptions>
+      </div>
+      <div class="btn-cont">
+        <a-button id="warrantyInfo-back" @click="isShow = false">关闭</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { productPricingSnDetail } from '@/api/product'
+export default {
+  name: 'ProductPricingAuditModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      spinning: false,
+      detailsData: null //  详情数据
+    }
+  },
+  methods: {
+    //  获取详情
+    getDetail () {
+      productPricingSnDetail({ sn: this.itemSn }).then(res => {
+        if (res.status == 200) {
+          this.detailsData = res.data
+        } else {
+          this.detailsData = null
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .warrantyInfo-modal{
+    .ant-modal-body {
+      padding: 30px 40px 24px;
+    }
+    .infoList {
+      margin-bottom:26px;
+      .ant-descriptions-title{
+        margin-bottom:10px !important;
+      }
+      .ant-descriptions-row > th, .ant-descriptions-row > td{
+        padding-bottom: 5px !important;
+      }
+    }
+    .infoTopList{
+      display:flex;
+      .ant-descriptions-row:nth-child(2),.ant-descriptions-row:nth-child(3){
+        font-weight: bold;
+      }
+      .ant-descriptions-row:nth-child(2) .ant-descriptions-item > span,.ant-descriptions-row:nth-child(3) .ant-descriptions-item > span{
+        font-weight: bold;
+      }
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 20px;
+    }
+  }
+</style>

+ 396 - 0
src/views/reportData/tireSalesReport/list.vue

@@ -0,0 +1,396 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="tireSalesReportList-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper" ref="tableSearch">
+        <a-form-model
+          id="tireSalesReportList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :model="queryParam"
+          :rules="rules"
+          @keyup.enter.native="handleSearch">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="出库时间" prop="time">
+                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品名称">
+                <a-input id="inventoryQueryList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品编码">
+                <a-input id="inventoryQueryList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="唯一码">
+                  <a-input id="inventoryQueryList-productOrigCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入唯一码"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="售出状态">
+                  <v-select
+                    v-model="queryParam.dealerLevel"
+                    ref="dealerLevel"
+                    id="salesOrderTotalList-dealerLevel"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择售出状态"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="地区">
+                  <AreaList id="chooseCustomer-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="所在区域">
+                  <subarea id="allocateBillList-subarea" ref="subarea" @change="subareaChange"></subarea>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户名称">
+                  <a-input
+                    id="salesOrderTotalList-dealerName"
+                    v-model.trim="queryParam.dealerName"
+                    allowClear
+                    placeholder="请输入客户名称" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="当前所在客户">
+                  <a-input id="inventoryQueryList-productOrigCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入客户名称"/>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button
+                style="margin-left: 5px"
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="salesOrderTotalList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="salesOrderTotalList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_salesOrderTotalExport')"
+                id="salesOrderTotalList-export">导出</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-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 统计 -->
+        <div class="tongji-bar" style="margin-bottom:10px">
+          总销售款数:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '0' }}</strong>;
+          总销售数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
+          总销售金额:<strong>{{ totalData&&(totalData.totalPushedAmount || totalData.totalPushedAmount==0) ? toThousands(totalData.totalPushedAmount) : '--' }}</strong>;
+          已售出数量(从客户系统销售出库):<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
+          已售出金额:<strong>{{ totalData&&(totalData.totalPushedAmount || totalData.totalPushedAmount==0) ? toThousands(totalData.totalPushedAmount) : '--' }}</strong>;
+          未售出数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
+          未售出金额:<strong>{{ totalData&&(totalData.totalPushedAmount || totalData.totalPushedAmount==0) ? toThousands(totalData.totalPushedAmount) : '--' }}</strong>;
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.salesBillNo"
+          :style="{ height: tableHeight+70+'px' }"
+          rowKeyName="salesBillNo"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight-10 }"
+          :defaultLoadData="false"
+          bordered>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import {
+  commonMixin
+} from '@/utils/mixin'
+import getDate from '@/libs/getDate.js'
+import {
+  STable,
+  VSelect
+} from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import subarea from '@/views/common/subarea.js'
+import custList from '@/views/common/custList.vue'
+import reportModal from '@/views/common/reportModal.vue'
+import AreaList from '@/views/common/areaList.js'
+import {
+  hdExportExcel
+} from '@/libs/exportExcel'
+import {
+  userQueryList
+} from '@/api/power-user'
+import {
+  reportSalesBillList,
+  reportSalesBillCount,
+  reportSalesBillExport
+} from '@/api/reportData'
+export default {
+  name: 'SalesOrderTotalList',
+  mixins: [commonMixin],
+  components: {
+    STable,
+    VSelect,
+    rangeDate,
+    custList,
+    subarea,
+    reportModal,
+    AreaList
+  },
+  data () {
+    return {
+      spinning: false,
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      showExport: false,
+      queryParam: { //  查询条件
+        time: [
+          getDate.getCurrMonthDays().starttime,
+          getDate.getCurrMonthDays().endtime
+        ],
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
+        salesBillNo: '',
+        dealerName: '',
+        dealerLevel: undefined,
+        operatorSn: undefined,
+        subareaArea: {
+          subareaSn: undefined,
+          subareaAreaSn: undefined
+        },
+        dealerProvinceSn: undefined
+      },
+      rules: {
+        'time': [{
+          required: true,
+          message: '请选择销售日期',
+          trigger: 'change'
+        }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        return reportSalesBillList(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,
+      operatorList: [], //  操作员下拉数据
+      addrProvinceList: [] //  省下拉
+    }
+  },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '地区', dataIndex: 'salesBillNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '商户类型', dataIndex: 'dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户级别', dataIndex: 'directDealerName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'indirectDealerName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'totalQty', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '唯一码', dataIndex: 'giftQty', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '售价(开单金额)', dataIndex: 'totalRealSaleAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '出库时间', dataIndex: 'giftQty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户出库日期', dataIndex: 'giftQty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '当前所在客户', dataIndex: 'giftQty', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '销售状态', dataIndex: 'giftQty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_salesOrderTotalList_salesPrice')) {
+        arr.splice(10, 0, { title: '售价(开单金额)', dataIndex: 'totalRealSaleAmount', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      }
+      return arr
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  methods: {
+    // 盘点库存日期
+    handleStock () {
+      this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')
+    },
+    // 总计
+    getCount (params) {
+      reportSalesBillCount(params).then(res => {
+        if (res.status == 200 && res.data) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    handleSearch () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$refs.table.refresh(true)
+        } else {
+          _this.$message.error('请选择销售日期')
+          return false
+        }
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    custChange (val) {
+      this.queryParam.dealerSn = val.key
+    },
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ]
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.salesBillNo = ''
+      this.queryParam.dealerName = ''
+      this.queryParam.dealerLevel = undefined
+      this.queryParam.operatorSn = undefined
+      this.queryParam.subareaArea.subareaSn = undefined
+      this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.dealerProvinceSn = undefined
+      this.totalData = null
+      if (this.advanced) {
+        this.$refs.subarea.clearData()
+      }
+      this.$refs.ruleForm.resetFields()
+      this.$refs.table.clearTable()
+    },
+    //  导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.$store.state.app.curActionPermission = 'B_salesOrderTotalExport'
+          _this.showExport = true
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(reportSalesBillExport, params, '销售(开单统计)报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
+            _this.$store.state.app.curActionPermission = ''
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 操作员
+    getUserList () {
+      userQueryList({}).then(res => {
+        if (res.status == 200) {
+          this.operatorList = res.data
+        } else {
+          this.operatorList = []
+        }
+      })
+    },
+    pageInit () {
+      const _this = this
+      _this.getUserList()
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 226
+    }
+  },
+  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>

+ 197 - 0
src/views/salesManagement/outboundOrder/importGuideModal.vue

@@ -0,0 +1,197 @@
+<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) 请先下载导入模板,模板中已标示出必填项</li>
+            <li>2) “产品编码”该出库单中存在的产品编码</li>
+            <li>3) “唯一码”具有唯一性,必填,需输入正确唯一码,不能为空,不可重复</li>
+            <li>4) “工厂出库单号”非必填,可重复,可为空</li>
+            <li>5) 一次需要全部导完,多次导入则会覆盖上一次导入数据</li>
+            <li>
+              <a :href="filePath" style="margin: 5px 0 0;display: block;">
+                <a-icon type="download" style="padding-right: 5px;" />下载导入模板
+              </a>
+            </li>
+          </ul>
+        </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: { 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 + '/sendBill/importSendBill',
+      paramsData: null,
+      uploadParams: {
+        savePathType: 'local'
+      },
+      exportLoading: false,
+      filePath: location.protocol + '//' + location.host + '/templ/发货单信息导入模板.xlsx'
+    }
+  },
+  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) {
+      this.$emit('ok', obj)
+      this.isShow = false
+    },
+    // 关闭
+    handleClose () {
+      this.openImportModal = false
+      this.isShow = false
+    }
+  },
+  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>

+ 96 - 86
src/views/salesManagement/outboundOrder/list.vue

@@ -87,94 +87,101 @@
         </a-form>
       </div>
     </a-card>
-  
-  <a-card size="small" :bordered="false" class="outboundOrderList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <!-- 列表 -->
-      <div style="margin-bottom: 10px">
-        <a-button
-          type="primary"
-          v-if="$hasPermissions('B_stockOut')"
-          id="outboundOrder-export"
-          :loading="loading"
-          @click="handleOutbound()">批量出库</a-button>
-        <a-button
-          type="primary"
-          v-if="$hasPermissions('B_stockSend')"
-          class="button-info"
-          id="outboundOrder-send"
-          :loading="loading"
-          @click="handleSendGood()">批量发货</a-button>
-        <span style="margin-left: 5px">
-          <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
-        </span>
-      </div>
-      <s-table
-        class="sTable fixPagination"
-        ref="table"
-        :style="{ height: tableHeight+70+'px' }"
-        size="small"
-        :rowKey="(record) => record.stockOutSn"
-        rowKeyName="stockOutSn"
-        :row-selection="($hasPermissions('B_stockOut')||$hasPermissions('B_stockSend'))?{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.state == 'CANCEL' } }) }:null"
-        @rowSelection="rowSelectionFun"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ y: tableHeight }"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 单号 -->
-        <template slot="stockOutNo" slot-scope="text, record">
-          <span v-if="record.stockOutNo && detailPermissions(record)" class="link-bule" @click="handleDetail(record)">{{ record.stockOutNo }}</span>
-          <span v-else-if="record.stockOutNo && !detailPermissions(record)">{{ record.stockOutNo }}</span>
-          <span v-else>--</span>
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
+
+    <a-card size="small" :bordered="false" class="outboundOrderList-wrap">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <div style="margin-bottom: 10px">
           <a-button
-            size="small"
-            type="link"
-            v-if="record.state=='WAIT'&&$hasPermissions('B_stockOut')"
-            class="button-primary"
-            @click="handleOutbound(record)"
-            id="outboundOrderList-out-btn">出库</a-button>
+            type="primary"
+            v-if="$hasPermissions('B_stockOut')"
+            id="outboundOrder-export"
+            :loading="loading"
+            @click="handleOutbound()">批量出库</a-button>
           <a-button
-            size="small"
-            type="link"
-            class="button-primary"
-            v-if="record.sendFlag==0&&$hasPermissions('B_stockSend')"
-            @click="handleSendGood(record)"
-            id="outboundOrderList-sendBill">发货</a-button>
-          <span v-if="record.sendFlag==1&&record.state=='FINISH'">--</span>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 详情 -->
-    <a-modal
-      centered
-      v-drag
-      class="outboundOrderDetail-modal"
-      :footer="null"
-      :maskClosable="false"
-      title="详情"
-      v-model="openModal"
-      v-if="openModal"
-      @cancel="cancleModal"
-      width="70%">
-      <div>
-        <pushOrderDetailModal v-if="outBizType=='SALES'" :outBizSubSn="orderSn" />
-        <allocationDetailModal v-if="outBizType=='ALLOCATE'" :outBizSn="orderSn" />
-      </div>
-    </a-modal>
-    <!-- 发货信息 -->
-    <sendGoodModal
-      v-drag
-      ref="detailModal"
-      modalTit="新增发货单"
-      :openModal="showDetailModal"
-      @ok="sendSuccess"
-      @cancel="showDetailModal=false"></sendGoodModal>
-  </a-card>
+            type="primary"
+            v-if="$hasPermissions('B_stockSend')"
+            class="button-info"
+            id="outboundOrder-send"
+            :loading="loading"
+            @click="handleSendGood()">批量发货</a-button>
+          <span style="margin-left: 5px">
+            <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
+          </span>
+        </div>
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+70+'px' }"
+          size="small"
+          :rowKey="(record) => record.stockOutSn"
+          rowKeyName="stockOutSn"
+          :row-selection="($hasPermissions('B_stockOut')||$hasPermissions('B_stockSend'))?{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.state == 'CANCEL' } }) }:null"
+          @rowSelection="rowSelectionFun"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 单号 -->
+          <template slot="stockOutNo" slot-scope="text, record">
+            <span v-if="record.stockOutNo && detailPermissions(record)" class="link-bule" @click="handleDetail(record)">{{ record.stockOutNo }}</span>
+            <span v-else-if="record.stockOutNo && !detailPermissions(record)">{{ record.stockOutNo }}</span>
+            <span v-else>--</span>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              v-if="record.state=='WAIT'&&$hasPermissions('B_stockOut')"
+              class="button-primary"
+              @click="handleUniqueCode(record)"
+              id="outboundOrderList-out-btn">唯一码</a-button>
+            <a-button
+              size="small"
+              type="link"
+              v-if="record.state=='WAIT'&&$hasPermissions('B_stockOut')"
+              class="button-primary"
+              @click="handleOutbound(record)"
+              id="outboundOrderList-out-btn">出库</a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-primary"
+              v-if="record.sendFlag==0&&$hasPermissions('B_stockSend')"
+              @click="handleSendGood(record)"
+              id="outboundOrderList-sendBill">发货</a-button>
+            <span v-if="record.sendFlag==1&&record.state=='FINISH'">--</span>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 详情 -->
+      <a-modal
+        centered
+        v-drag
+        class="outboundOrderDetail-modal"
+        :footer="null"
+        :maskClosable="false"
+        title="详情"
+        v-model="openModal"
+        v-if="openModal"
+        @cancel="cancleModal"
+        width="70%">
+        <div>
+          <pushOrderDetailModal v-if="outBizType=='SALES'" :outBizSubSn="orderSn" />
+          <allocationDetailModal v-if="outBizType=='ALLOCATE'" :outBizSn="orderSn" />
+        </div>
+      </a-modal>
+      <!-- 发货信息 -->
+      <sendGoodModal
+        v-drag
+        ref="detailModal"
+        modalTit="新增发货单"
+        :openModal="showDetailModal"
+        @ok="sendSuccess"
+        @cancel="showDetailModal=false"></sendGoodModal>
+    </a-card>
   </div>
 </template>
 
@@ -343,6 +350,9 @@ export default {
       this.orderSn = undefined
       this.openModal = false
     },
+    handleUniqueCode () {
+      this.$router.push({ name: 'uniqueCodeList' })
+    },
     // 出库/批量出库
     handleOutbound (row) {
       const _this = this

+ 202 - 0
src/views/salesManagement/outboundOrder/uniqueCodeList.vue

@@ -0,0 +1,202 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品编码">
+                <a-input v-model.trim="queryParam.outBizSubNo" allowClear placeholder="请输入产品编码"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="唯一码">
+                <a-input v-model.trim="queryParam.demanderName" allowClear placeholder="请输入唯一码"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品名称">
+                <a-input v-model.trim="queryParam.demanderName" allowClear placeholder="请输入产品名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <div v-if="isHasId" style="margin-bottom:10px;">
+          <a-button
+            type="primary"
+            id="outboundOrder-export"
+            :loading="loading"
+            @click="openGuideModal = true">导入</a-button>
+        </div>
+        <a-alert type="info" style="margin-bottom: 10px;" v-if="detailData!=null">
+          <div slot="message">
+            <span v-if="$route.params.type!='stockOut'">
+              轮胎款数:<strong>{{ detailData&&(detailData.totalSalesQty || detailData.totalSalesQty==0) ? detailData.totalSalesQty : '--' }}</strong>;
+            </span>
+            轮胎总数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
+          </div>
+        </a-alert>
+        <!-- 表格数据 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          :style="{ height: tableHeight+70+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :pageSize="30"
+          :scroll="{ y: tableHeight }"
+          bordered>
+        </s-table>
+      </a-spin>
+    </a-card>
+    <!-- 导入轮胎唯一码 -->
+    <importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="handleGuideOk" />
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable } from '@/components'
+import { stockOutList } from '@/api/stockOut'
+import importGuideModal from './importGuideModal.vue'
+export default {
+  name: 'UniqueCodeList',
+  mixins: [commonMixin],
+  components: { STable, importGuideModal },
+  data () {
+    return {
+      disabled: false,
+      spinning: false,
+      handlePlData: [],
+      queryParam: {
+        outBizSubNo: '',
+        demanderName: '',
+        receiverSn: undefined,
+        warehouseSn: undefined,
+        outBizTypeList: ['SALES', 'ALLOCATE']
+      },
+      orginData: [],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return stockOutList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          this.orginData = data.list
+          return data
+        })
+      },
+      snList: [],
+      openGuideModal: false,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'stockOutNo', width: '25%', align: 'center' },
+        { title: '唯一码', dataIndex: 'outBizSubNo', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'demanderName', width: '50%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ],
+      detailData: null,
+      tableHeight: 0,
+      isHasId: true
+    }
+  },
+  methods: {
+    handleGuideOk () {
+
+    },
+    custChange (val) {
+      this.queryParam.receiverSn = val.key || ''
+    },
+    // 删除
+    handleDel (row) {
+      const i = this.chooseData.findIndex(item => row.stockOutSn == item.stockOutSn)
+      this.chooseData.splice(i, 1)
+      const oi = this.orginData.findIndex(item => row.stockOutSn == item.stockOutSn)
+      if (oi >= 0) {
+        this.orginData[oi].checked = false
+      }
+    },
+    // 选择
+    handleChoose (row) {
+      row.checked = true
+      this.chooseData.push(row)
+      this.$emit('choose')
+    },
+    // 取消
+    handleCommonCancel () {
+      this.$emit('cancel')
+    },
+    // 重置
+    resetSearchForm () {
+      this.queryParam = {
+        outBizSubNo: '',
+        demanderName: '',
+        receiverSn: undefined,
+        warehouseSn: undefined,
+        outBizTypeList: ['SALES', 'ALLOCATE']
+      }
+      this.orginData = []
+      if (this.$refs.table) {
+        this.$refs.table.refresh(true)
+      }
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      const fixHeight = this.isHasId ? (!this.detailData ? 242 : 275) : (!this.detailData ? 198 : 275)
+      this.tableHeight = window.innerHeight - tableSearchH - fixHeight
+    }
+  },
+  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">
+
+</style>

+ 2 - 2
src/views/salesManagement/pushOrderManagement/detailForOut.vue

@@ -61,7 +61,7 @@
               </a-descriptions-item>
               <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
               <a-descriptions-item label="备注">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="唯一码"><span class="link-bule">查看</span></a-descriptions-item>
+              <a-descriptions-item label="唯一码"><span class="link-bule" @click="showCodeModal = true">查看</span></a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
         </a-collapse>
@@ -194,7 +194,7 @@ export default {
       openExcelModal: false,
       fromRouter: null,
       nowType: 'print',
-      showCodeModal: true
+      showCodeModal: false
     }
   },
   computed: {

+ 7 - 22
src/views/salesManagement/pushOrderManagement/uniqueCodeModal.vue

@@ -13,23 +13,23 @@
         <!-- 搜索条件 -->
         <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline">
-            <a-row type="flex" :gutter="15">
-              <a-col flex="300px">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="产品编码">
                   <a-input v-model.trim="queryParam.outBizSubNo" allowClear placeholder="请输入产品编码"/>
                 </a-form-item>
               </a-col>
-              <a-col flex="300px">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="唯一码">
                   <a-input v-model.trim="queryParam.demanderName" allowClear placeholder="请输入唯一码"/>
                 </a-form-item>
               </a-col>
-              <a-col flex="300px">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="产品名称">
                   <a-input v-model.trim="queryParam.demanderName" allowClear placeholder="请输入产品名称"/>
                 </a-form-item>
               </a-col>
-              <a-col flex="auto">
+              <a-col :md="6" :sm="24">
                 <span class="table-page-search-submitButtons">
                   <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                   <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
@@ -57,22 +57,6 @@
           :scroll="{ y: 400 }"
           :pageSize="10"
           bordered>
-          <!-- 操作 -->
-          <template slot="action" slot-scope="text, record">
-            <div v-if="!(record.outBizType == 'SALES'&&record.financialStatus=='WAIT')&&record.sendFlag==0">
-              <a-button
-                size="small"
-                type="link"
-                class="button-warning"
-                v-if="!record.checked"
-                @click="handleChoose(record)"
-              >选择</a-button>
-              <span style="color:#55aa00;" v-else>已选</span>
-            </div>
-            <span style="color:#55aa00;" v-else>
-              {{ record.checked?'已选':'--' }}
-            </span>
-          </template>
         </s-table>
       </div>
     </a-spin>
@@ -144,7 +128,8 @@ export default {
         { title: '产品编码', dataIndex: 'stockOutNo', width: '25%', align: 'center' },
         { title: '唯一码', dataIndex: 'outBizSubNo', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'demanderName', width: '50%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true }
-      ]
+      ],
+      detailData: null
     }
   },
   methods: {