chenrui 4 年之前
父节点
当前提交
450649226e

+ 109 - 0
src/api/sales.js

@@ -0,0 +1,109 @@
+import { axios } from '@/utils/request'
+
+//  销售 列表  有分页
+export const salesList = (params) => {
+  const url = `/sales/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 详情
+export const salesDetail = (params) => {
+  return axios({
+    url: `/sales/findById/${params.id}`,
+    data: params,
+    method: 'get'
+  })
+}
+//  销售 打印
+export const salesPrint = (params) => {
+  return axios({
+    url: '/sales/print',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 打印预览
+export const salesPrintPreview = (params) => {
+  return axios({
+    url: '/sales/printPreview',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 冲减
+export const salesWriteDown = (params) => {
+  return axios({
+    url: '/sales/writeDown',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 审核
+export const salesWriteAudit = (params) => {
+  return axios({
+    url: '/sales/audit',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 折扣
+export const salesWriteDiscount = (params) => {
+  return axios({
+    url: '/sales/discount',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 备货审核
+export const salesWritePrepareAudit = (params) => {
+  return axios({
+    url: '/sales/prepareAudit',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 收款
+export const salesWriteReceipt = (params) => {
+  return axios({
+    url: '/sales/receipt',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 出库
+export const salesWriteStockOut = (params) => {
+  return axios({
+    url: '/sales/stockOut',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 提交
+export const salesWriteSubmit = (params) => {
+  return axios({
+    url: '/sales/submit',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 保存
+export const salesSave = (params) => {
+  return axios({
+    url: '/sales/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 删除
+export const salesDel = (params) => {
+  return axios({
+    url: `/sales/delete/${params.id}`,
+    data: params,
+    method: 'post'
+  })
+}

+ 37 - 0
src/api/salesDetail.js

@@ -0,0 +1,37 @@
+import { axios } from '@/utils/request'
+
+//  销售详情 列表  分页
+export const salesDetailList = (params) => {
+  const url = `/salesDetail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  销售详情 保存
+export const salesDetailSave = (params) => {
+  return axios({
+    url: '/salesDetail/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售详情 删除
+export const salesDetailDel = (params) => {
+  return axios({
+    url: `/salesDetail/delete/${params.id}`,
+    data: params,
+    method: 'post'
+  })
+}
+//  销售详情 整单删除
+export const salesDetailDelAll = (params) => {
+  return axios({
+    url: `/salesDetail/deleteAll/${params.id}`,
+    data: params,
+    method: 'post'
+  })
+}

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

@@ -48,6 +48,149 @@ export const asyncRouterMap = [
         },
         hidden: true
       },
+      // 销售管理
+      {
+        path: '/salesManagement',
+        redirect: '/salesManagement/salesQuery',
+        component: PageView,
+        meta: {
+          title: '销售管理',
+          icon: 'account-book'
+          // permission: 'M_salesManagement'
+        },
+        children: [
+          {
+            path: '/salesManagement/salesQuery',
+            redirect: '/salesManagement/salesQuery/list',
+            name: 'salesQuery',
+            component: RouteView,
+            meta: {
+              title: '销售单查询',
+              icon: 'monitor'
+              // permission: 'M_salesQuery_list'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'salesQueryList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/list.vue'),
+                meta: {
+                  title: '销售单列表',
+                  icon: 'monitor',
+                  hidden: true
+                  // permission: 'M_salesQuery_list'
+                }
+              },
+              {
+                path: 'detail/:id/:sn',
+                name: 'salesDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/detail.vue'),
+                meta: {
+                  title: '销售单详情',
+                  icon: 'monitor',
+                  hidden: true
+                  // permission: 'M_salesDetail'
+                }
+              },
+              {
+                path: 'add',
+                name: 'salesAdd',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/edit.vue'),
+                meta: {
+                  title: '新增销售单',
+                  icon: 'monitor',
+                  hidden: true
+                  // permission: 'M_salesNew'
+                }
+              },
+              {
+                path: 'edit/:id',
+                name: 'salesEdit',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/edit.vue'),
+                meta: {
+                  title: '编辑销售单',
+                  icon: 'monitor',
+                  hidden: true
+                  // permission: 'M_salesNew'
+                }
+              }
+            ]
+          },
+          {
+            path: '/salesManagement/backorder',
+            redirect: '/salesManagement/backorder/list',
+            name: 'backorder',
+            component: RouteView,
+            meta: {
+              title: '缺货单',
+              icon: 'exception'
+              // permission: 'M_goodsManage_list'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'backorderList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/backorder/list.vue'),
+                meta: {
+                  title: '缺货单列表',
+                  icon: 'exception',
+                  hidden: true
+                  // permission: 'M_goodsManage_list'
+                }
+              },
+              {
+                path: 'detail/:id',
+                name: 'backorderDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/backorder/detail.vue'),
+                meta: {
+                  title: '缺货单详情',
+                  icon: 'exception',
+                  hidden: true
+                  // permission: 'M_goodsManage_list'
+                }
+              }
+            ]
+          },
+          {
+            path: '/salesManagement/examineVerify',
+            redirect: '/salesManagement/examineVerify/list',
+            name: 'examineVerify',
+            component: RouteView,
+            meta: {
+              title: '备货审核',
+              icon: 'audit'
+              // permission: 'M_outboundOrder'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'examineVerifyList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/examineVerify/list.vue'),
+                meta: {
+                  title: '备货审核列表',
+                  icon: 'audit',
+                  hidden: true
+                  // permission: 'M_outboundOrder_list'
+                }
+              },
+              {
+                path: 'detail/:id',
+                name: 'examineVerifyDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/examineVerify/detail.vue'),
+                meta: {
+                  title: '备货审核详情',
+                  icon: 'audit',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              }
+            ]
+          }
+        ]
+      },
       {
         path: '/menusAuth',
         redirect: '/bnSetting/menusAuth',

+ 5 - 0
src/libs/tools.js

@@ -0,0 +1,5 @@
+// 小数运算精度处理  4位小数运算后结果保留2位小数
+export const getOperationalPrecision = (num1, num2) => {
+  const val = ((num1 * 10000) * (num2 * 10000) / 100000000).toFixed(2) || 0
+  return val != 0 ? val : 0
+}

+ 128 - 0
src/views/salesManagement/backorder/detail.vue

@@ -0,0 +1,128 @@
+<template>
+  <div class="backorderDetail-wrap">
+    <a-page-header :ghost="false" @back="handleBack" class="backorderDetail-back">
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="backorderDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
+      </template>
+    </a-page-header>
+    <a-card size="small" :bordered="false" class="backorderDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions :column="3">
+            <a-descriptions-item label="客户名称">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="客户地址">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="支付方式">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="收款方式">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="联系手机">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="联系电话">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="销售单号">箭冠营销中心</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <a-card size="small" :bordered="false" class="backorderDetail-cont">
+      <!-- 总计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">缺货总款数:<strong>1</strong>,缺货总数量:<strong>1</strong>,缺货总售价:<strong>0</strong></div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 960 }"
+        bordered></s-table>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      queryParam: {
+
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      brandData: [], //  产品品牌  下拉数据
+      typeData: [], //  产品类别  下拉数据
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '缺货数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价小计', dataIndex: 'salePriceSubtotal', width: 100, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).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
+        //   }
+        //   this.disabled = false
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function (resolve, reject) {
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
+            ],
+            count: 10
+          }
+          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
+          resolve(data)
+        })
+      }
+    }
+  },
+  methods: {
+    //  重置
+    resetSearchForm () {
+      this.queryParam.orderBundleNo = ''
+      this.queryParam.orderBundle.custMobile = ''
+      this.queryParam.bundleName = ''
+      this.queryParam.itemName = ''
+      this.oldTime = undefined
+      this.newTime = undefined
+      this.$refs.table.refresh(true)
+    },
+    //  提交
+    handleSubmit () {},
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/salesManagement/backorder/list' })
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .backorderDetail-wrap{
+    .backorderDetail-back{
+      margin-bottom: 15px;
+    }
+    .backorderDetail-cont{
+      margin-bottom: 15px;
+    }
+  }
+</style>

+ 166 - 0
src/views/salesManagement/backorder/list.vue

@@ -0,0 +1,166 @@
+<template>
+  <a-card size="small" :bordered="false" class="backorderList-wrap">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="审核时间">
+              <a-range-picker
+                style="width:100%"
+                id="backorderList-creatTime"
+                :disabledDate="disabledDate"
+                v-model="time"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
+            </a-form-item>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="客户名称">
+              <a-select
+                id="backorderList-bundleName"
+                placeholder="请选择"
+                allowClear
+                v-model="queryParam.dataSourceNo"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="销售单号">
+              <a-input id="backorderList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入销售单号"/>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="采购单号">
+                <a-input id="backorderList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入采购单号"/>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="backorderList-refresh">查询</a-button>
+            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="backorderList-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 8px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1120 }"
+      bordered>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button size="small" type="link" @click="handleDetail(record)" id="backorderList-detail-btn">详情</a-button>
+      </template>
+    </s-table>
+  </a-card>
+</template>
+
+<script>
+// import { getProvince, getCityByPro, getDistrictByCity } from '@/api/data'
+import { STable, VSelect } from '@/components'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      queryParam: { //  查询条件
+        bundleName: '', //  供应商名称
+        state: undefined //  状态
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      dateFormat: 'YYYY-MM-DD',
+      time: [], //  创建时间
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: 140, align: 'center' },
+        { title: '采购单号', dataIndex: 'purchaseBillNo', width: 140, align: 'center' },
+        { title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '缺货款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '缺货数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '缺货售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).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
+        //   }
+        //   this.disabled = false
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function (resolve, reject) {
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
+            ]
+          }
+          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
+          resolve(data)
+        })
+      },
+      brandData: []
+    }
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    filterOption (input, option) {
+    	return (
+    		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    	)
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.orderBundleNo = ''
+      this.queryParam.orderBundle.custMobile = ''
+      this.queryParam.bundleName = ''
+      this.queryParam.itemName = ''
+      this.oldTime = undefined
+      this.newTime = undefined
+      this.$refs.table.refresh(true)
+    },
+    //  详情
+    handleDetail (row) {
+      this.$router.push({ path: `/salesManagement/backorder/detail/${row.id}` })
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .backorderList-wrap{
+    .sTable{
+      margin-top: 20px;
+    }
+  }
+</style>

+ 182 - 0
src/views/salesManagement/examineVerify/detail.vue

@@ -0,0 +1,182 @@
+<template>
+  <div class="examineVerifyDetail-page-wrapper">
+    <!-- 操作 -->
+    <a-page-header :ghost="false" @back="handleBack" class="examineVerifyDetail-operation-wrapper">
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="examineVerifyDetail-btn-back" href="javascript:;" @click="handleBack">返回列表</a>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <a-button key="2" @click="handlePreview" id="examineVerifyDetail-btn-preview">打印预览</a-button>
+        <a-button key="1" type="primary" @click="handlePrint" id="examineVerifyDetail-btn-print">快速打印</a-button>
+      </template>
+    </a-page-header>
+    <!-- 急件单信息 -->
+    <a-card size="small" :bordered="false" class="examineVerifyDetail-info-wrapper">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions :column="3">
+            <a-descriptions-item label="客户名称">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="客户地址">陕西省西安市未央区凤城八路</a-descriptions-item>
+            <a-descriptions-item label="支付方式">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="收款方式">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="联系手机">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="联系电话">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="备注" span="2">名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达</a-descriptions-item>
+            <a-descriptions-item label="销售单号">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="制单人">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="业务员">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="审核状态">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="完结状态">名称思密达</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <!-- 表格 -->
+    <a-card size="small" :bordered="false" class="examineVerifyDetail-table-wrapper">
+      <!-- 合计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">
+          总款数:<strong>998</strong>;总数量:<strong>2009</strong>;总数量:<strong>2009</strong>;急件总款数:<strong>2009</strong>;急件总数量:<strong>2009</strong>。<br/>
+          总售价:<strong>998</strong>;总成本:<strong>2009</strong>;总毛利:<strong>2009</strong>;折后总售价:<strong>2009</strong>;折扣:<strong>2009%</strong>;折扣金额:<strong>2009</strong>。
+        </div>
+      </a-alert>
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1660 }"
+        bordered>
+        <!-- 库存数量 -->
+        <template slot="inventoryQuantity" slot-scope="text, record">
+          <span :class="[record.inventoryQuantity < record.quantityNotOffset ? 'red' : '']">{{ record.inventoryQuantity }}</span>
+        </template>
+      </s-table>
+    </a-card>
+  </div>
+
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'costPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折后售价', dataIndex: 'discountedPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '销售数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价小计', dataIndex: 'salePriceSubtotal', width: 100, align: 'center' },
+        { title: '折后小计', dataIndex: 'discountedAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折扣金额', dataIndex: 'discountAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center' },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center' },
+        { title: '销售类型', dataIndex: 'salesBillType', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).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
+        //   }
+        //   this.disabled = false
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function (resolve, reject) {
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              { id: '1', productNum: 'jgqp11111111111', inventoryQuantity: 0, quantityNotOffset: 3, productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
+            ]
+          }
+          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
+          resolve(data)
+        })
+      }
+    }
+  },
+  methods: {
+    //  返回
+    handleBack () {
+      this.$router.push({ path: '/salesManagement/examineVerify/list' })
+    },
+    //  冲减
+    handleSubmit () {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确定要进行冲减吗?',
+        okText: '确定',
+        cancelText: '取消',
+        centered: true,
+        onOk () {
+          // delectRolePower({
+          //   id: row.id
+          // }).then(res => {
+          //   console.log(res, 'res1111')
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //   }
+          // })
+        }
+      })
+    },
+    //  快速打印
+    handlePrint () {
+
+    },
+    //  打印预览
+    handlePreview () {
+
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .examineVerifyDetail-page-wrapper{
+    .examineVerifyDetail-info-wrapper{
+      margin: 15px 0;
+      .item-cont {
+        margin-bottom: 15px;
+        display: flex;
+        .item-label {
+          width: 115px;
+          font-size: 14px;
+          color: rgba(0, 0, 0, 0.85);
+          flex-shrink: 0;
+        }
+        .item-main {
+          flex-grow: 1;
+          word-break: break-all;
+        }
+      }
+    }
+    .examineVerifyDetail-table-wrapper{
+      .red{
+        color: #ed1c24;
+      }
+    }
+  }
+</style>

+ 232 - 0
src/views/salesManagement/examineVerify/list.vue

@@ -0,0 +1,232 @@
+<template>
+  <a-card size="small" :bordered="false" class="examineVerifyList-wrap">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="创建时间">
+              <a-range-picker
+                style="width:100%"
+                id="examineVerifyList-bundleNamesss"
+                :disabledDate="disabledDate"
+                v-model="queryParam.brand"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
+            </a-form-item>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="客户名称">
+              <a-select
+                placeholder="请选择"
+                allowClear
+                v-model="queryParam.name"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in custData" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="出库类型">
+              <v-select
+                v-model="queryParam.billStatus"
+                ref="billStatus"
+                id="examineVerifyList-billStatus"
+                code="PAYMENT_TYPE"
+                placeholder="请选择出库类型"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="单据状态">
+                <v-select
+                  v-model="queryParam.billStatus"
+                  ref="billStatus"
+                  id="examineVerifyList-billStatus"
+                  code="PAYMENT_TYPE"
+                  placeholder="请选择单据状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="examineVerifyList-refresh">查询</a-button>
+            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="examineVerifyList-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 8px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 列表 -->
+    <div style="margin-bottom: 15px">
+      <a-button type="primary" id="examineVerifyList-export" :disabled="!hasSelected" :loading="loading" @click="handleBatchAudit">
+        批量审核
+      </a-button>
+      <span style="margin-left: 8px">
+        <template v-if="hasSelected">
+          {{ `已选 ${selectedRowKeys.length} 项` }}
+        </template>
+      </span>
+    </div>
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :showPagination="false"
+      :scroll="{ x: 1680 }"
+      bordered>
+      <!-- 状态 -->
+      <template slot="status" slot-scope="text, record">
+        <span :class="record.status==1?'green':'red'"> {{ record.status==1? '待入库': '待审核' }} </span>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button size="small" type="link" @click="handleExamine(record)" id="examineVerifyList-examine-btn" style="margin: 0 0 10px 8px;">备货审核</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDetail(record)" id="examineVerifyList-detail-btn" style="margin: 0 0 0 8px;">详情</a-button>
+      </template>
+    </s-table>
+  </a-card>
+</template>
+
+<script>
+// import { customerBundleDelayList, customerBundleExportDelay } from '@/api/FinancialManagement'
+import { STable, VSelect } from '@/components'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      queryParam: { //  查询条件
+        bundleName: '', //  品牌名称
+        state: undefined //  状态
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      dateFormat: 'YYYY-MM-DD',
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
+        { title: '单据来源', dataIndex: 'creasteDate', width: 100, align: 'center' },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: 140, align: 'center' },
+        { title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备货时间', dataIndex: 'audsitTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', scopedSlots: { customRender: 'status' }, width: 110, align: 'center' },
+        { title: '打印状态', dataIndex: 'audsitsTime', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印次数', dataIndex: 'audsitTsime', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
+      ],
+      selectedRowKeys: [], // Check here to configure the default column
+      loading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).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
+        //   }
+        //   this.disabled = false
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function (resolve, reject) {
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
+            ]
+          }
+          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
+          resolve(data)
+        })
+      },
+      custData: [] //  客户 下拉数据
+    }
+  },
+  computed: {
+    hasSelected () {
+      return this.selectedRowKeys.length > 0
+    }
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.orderBundleNo = ''
+      this.queryParam.orderBundle.custMobile = ''
+      this.queryParam.bundleName = ''
+      this.queryParam.itemName = ''
+      this.oldTime = undefined
+      this.newTime = undefined
+      this.$refs.table.refresh(true)
+    },
+    //  批量审核
+    handleExamine () {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要审核通过吗?',
+        okText: '确定',
+        cancelText: '取消',
+        centered: true,
+        onOk () {
+          // delectRolePower({
+          //   id: row.id
+          // }).then(res => {
+          //   console.log(res, 'res1111')
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //   }
+          // })
+        }
+      })
+    },
+    //  详情
+    handleDetail (row) {
+      this.$router.push({ path: `/salesManagement/examineVerify/detail/${row.id}` })
+    },
+    // 批量审核
+    handleBatchAudit () {
+      this.loading = true
+      // ajax request after empty completing
+      setTimeout(() => {
+        this.loading = false
+        this.selectedRowKeys = []
+      }, 1000)
+    },
+    onSelectChange (selectedRowKeys) {
+      console.log('selectedRowKeys changed: ', selectedRowKeys)
+      this.selectedRowKeys = selectedRowKeys
+    }
+  }
+}
+</script>

+ 341 - 0
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -0,0 +1,341 @@
+<template>
+  <a-modal
+    v-model="opened"
+    title="选择客户"
+    centered
+    :maskClosable="false"
+    :confirmLoading="confirmLoading"
+    width="80%"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-form-model
+      id="chooseCustom-form"
+      ref="ruleForm"
+      :model="form"
+      :rules="rules"
+      :label-col="formItemLayout.labelCol"
+      :wrapper-col="formItemLayout.wrapperCol"
+    >
+      <a-row :gutter="15">
+        <a-col :span="8">
+          <a-form-model-item label="客户名称" prop="name">
+            <a-input
+              id="chooseCustom-name"
+              :maxLength="30"
+              v-model="form.name"
+              placeholder="请输入客户名称(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item>
+            (未搜索到客户时为新增客户)
+          </a-form-model-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="15">
+        <a-col :span="16">
+          <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 4 }" :wrapperCol="{ span: 20 }">
+            <a-row :gutter="15">
+              <!-- 客户地址 -->
+              <a-col span="8">
+                <a-form-model-item prop="provinceCode">
+                  <a-select id="chooseCustom-provinceCode" @change="getCityList" v-model="form.provinceCode" placeholder="请选择省">
+                    <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col span="8">
+                <a-form-model-item prop="cityCode">
+                  <a-select id="chooseCustom-cityCode" @change="getAreaList" v-model="form.cityCode" placeholder="请选择市">
+                    <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col span="8">
+                <a-form-model-item prop="districtCode">
+                  <a-select id="chooseCustom-districtCode" @change="areaCharged" v-model="form.districtCode" placeholder="请选择区/县">
+                    <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+            </a-row>
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item prop="address">
+            <a-input
+              id="chooseCustom-address"
+              :maxLength="60"
+              v-model="form.address"
+              placeholder="请输入详细地址(最多60个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="15">
+        <a-col :span="8">
+          <a-form-model-item label="联系人" prop="contacts">
+            <a-input
+              id="chooseCustom-contacts"
+              :maxLength="30"
+              v-model="form.contacts"
+              placeholder="请输入联系人(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item label="客户电话" prop="customerPhone">
+            <a-input
+              id="chooseCustom-customerPhone"
+              :maxLength="11"
+              v-model="form.customerPhone"
+              placeholder="请输入客户电话(最多11个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="15">
+        <a-col :span="8">
+          <a-form-model-item label="价格类型" prop="priceType">
+            <a-row :gutter="15">
+              <a-col :span="20">
+                <a-select id="chooseCustom-priceType" v-model="form.priceType" placeholder="请选择价格类型">
+                  <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-col>
+              <a-col :span="4">
+                <a-popover>
+                  <template slot="content">
+                    (选择后在当前工单不可修改)
+                  </template>
+                  <a-icon type="question-circle" />
+                </a-popover>
+              </a-col>
+            </a-row>
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item label="支付方式" prop="payType">
+            <a-select id="chooseCustom-payType" v-model="form.payType" placeholder="请选择支付方式">
+              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item label="收款方式" prop="payment">
+            <a-select id="chooseCustom-payment" v-model="form.payment" placeholder="请选择收款方式">
+              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="15">
+        <a-col :span="8">
+          <a-form-model-item label="配送方式" prop="shipping">
+            <a-select id="chooseCustom-shipping" v-model="form.shippingCode" placeholder="请选择配送方式">
+              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item label="业务员" prop="salesman">
+            <a-select id="chooseCustom-salesman" v-model="form.salesman" placeholder="请选择业务员">
+              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item label="铺货出库" prop="salesman">
+            <a-select id="chooseCustom-salesman" v-model="form.salesman" placeholder="请选择是否铺货出库">
+              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="15">
+        <a-col :span="8">
+          <a-form-model-item label="备注" prop="remark">
+            <a-input
+              id="chooseCustom-remark"
+              type="textarea"
+              :maxLength="100"
+              v-model="form.remarks"
+              placeholder="请输入联系电话(最多100个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="8">
+          <a-form-model-item label="开单人">
+            王明
+          </a-form-model-item>
+        </a-col>
+      </a-row>
+      <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+        <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+        <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
+      </a-form-model-item>
+    </a-form-model>
+  </a-modal>
+</template>
+
+<script>
+import { getArea } from '@/api/data'
+export default {
+  name: 'ChooseCustomModal',
+  props: {
+    show: [Boolean]
+  },
+  data () {
+    return {
+      opened: this.show,
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: { span: 8 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        name: '', // 客户名称
+        provinceCode: undefined, //  省
+        provinceName: '',
+        cityCode: undefined, // 市
+        cityName: '',
+        districtCode: undefined, // 区
+        districtName: '',
+        address: '', //  详细地址
+        contactName: '', //  联系人
+        contactPhone: '', //  联系电话
+        remarks: '', //  备注
+        priceType: undefined, //  价格类型
+        payType: undefined, // 支付方式
+        payment: undefined // 收款方式
+      },
+      rules: {
+        name: [
+          { required: true, message: '请输入客户名称', trigger: 'blur' }
+        ],
+        provinceCode: [
+          { required: true, message: '请选择省', trigger: 'change' }
+        ],
+        cityCode: [
+          { required: true, message: '请选择市', trigger: 'change' }
+        ],
+        districtCode: [
+          { required: true, message: '请选择区/县', trigger: 'change' }
+        ],
+        address: [
+          { required: true, message: '请输入详细地址', trigger: 'blur' }
+        ],
+        contactName: [
+          { required: true, message: '请输入联系人', trigger: 'blur' }
+        ],
+        contactPhone: [
+          { required: true, message: '请输入联系人电话', trigger: 'blur' }
+        ],
+        priceType: [
+          { required: true, message: '请选择价格类型', trigger: 'change' }
+        ],
+        payType: [
+          { required: true, message: '请选择支付方式', trigger: 'change' }
+        ],
+        payment: [
+          { required: true, message: '请选择收款方式', trigger: 'change' }
+        ]
+      },
+      addrProvinceList: [], //  省下拉
+      addrCityList: [], //  市下拉
+      addrDistrictList: [] //  区下拉
+    }
+  },
+  methods: {
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$emit('ok', { id: 1000, customName: '车领主常青二路店' })
+      this.cancel()
+      // this.$refs.ruleForm.validate(valid => {
+      //   if (valid) {
+      //     const form = values.form
+      //     form.desc = _this.form.desc
+      //     form.id = this.isEdit ? this.$route.params.id : null
+      //     console.log(form,'-----提交信息')
+      //     // goodsSave(form).then(res => {
+      //     //   if (res.status == 200) {
+      //     //     _this.$message.success(res.message)
+      //     //   }
+      //     // })
+      //   } else {
+      //     console.log('error submit!!')
+      //     return false
+      //   }
+      // })
+    },
+    cancel () {
+      this.opened = false
+      this.$refs.ruleForm.resetFields()
+      this.$emit('cancel')
+    },
+    // 获取城市列表
+    getCityList (val) {
+      this.addrCityList = []
+      this.addrDistrictList = []
+      this.form.cityCode = undefined
+      this.form.districtCode = undefined
+      this.form.address = ''
+      this.getArea('city', val)
+    },
+    // 获取区县列表
+    getAreaList (val) {
+      this.addrDistrictList = []
+      this.form.districtCode = undefined
+      this.form.address = ''
+      this.getArea('district', val)
+    },
+    // 区县变更
+    areaCharged (val) {
+      this.form.address = ''
+    },
+    //  省/市/区
+    getArea (type, sn) {
+      let params
+      if (type == 'province') {
+        params = { level: '1' }
+      } else {
+        params = { psn: sn }
+      }
+      getArea(params).then(res => {
+        if (res.status == 200) {
+          if (type == 'province') {
+            this.addrProvinceList = res.data || []
+          } else if (type == 'city') {
+            this.addrCityList = res.data || []
+          } else if (type == 'district') {
+            this.addrDistrictList = res.data || []
+          }
+        } else {
+          if (type == 'province') {
+            this.addrProvinceList = []
+          } else if (type == 'city') {
+            this.addrCityList = []
+          } else if (type == 'district') {
+            this.addrDistrictList = []
+          }
+        }
+      })
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (newValue) {
+        this.getArea('province')
+      }
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 159 - 0
src/views/salesManagement/salesQuery/detail.vue

@@ -0,0 +1,159 @@
+<template>
+  <div class="salesDetail-wrap">
+    <a-page-header :ghost="false" @back="handleBack" class="salesDetail-cont">
+      <template slot="subTitle">
+        <a href="javascript:;" @click="handleBack">返回列表</a>
+      </template>
+      <template slot="extra">
+        <span>打印字段:</span>
+        <a-select key="1" style="width:150px" id="salesDetail-pritKey" placeholder="请选择打印字段" allowClear>
+          <a-select-option v-for="item in pritKey" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
+        </a-select>
+        <span><i style="color: red;">*</i>打印模板:</span>
+        <a-select key="2" style="width:150px" id="salesDetail-pritKey" placeholder="请选择打印模板" allowClear>
+          <a-select-option v-for="item in pritModal" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
+        </a-select>
+        <a-button key="3" id="salesDetail-preview-btn">打印预览</a-button>
+        <a-button key="4" type="primary" id="salesDetail-print-btn">快速打印</a-button>
+        <a-button key="5" id="salesDetail-export-btn">导出</a-button>
+      </template>
+    </a-page-header>
+    <!-- 基础信息 -->
+    <a-card size="small" :bordered="false" class="salesDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions size="small" :column="3" v-if="detailData">
+            <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="客户地址">{{ detailData.shippingAddressProvinceName || '--' }}{{ detailData.shippingAddressCityName || '--' }}{{ detailData.shippingAddressCountyName || '--' }}{{ detailData.shippingAddress || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="支付方式">{{ detailData.payType || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="收款方式">{{ detailData.settleStyleSn || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="联系电话">{{ detailData.consigneeTel || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="备注">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="销售单号">{{ detailData.salesBillNo || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="制单人">{{ detailData.operatorName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务员">{{ detailData.salesManName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务状态">{{ detailData.auditStatus || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="财务状态">{{ detailData.financialStatus || '--' }}</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <a-card size="small" :bordered="false" class="pages-wrap">
+      <!-- alert -->
+      <a-alert type="info" style="margin-bottom: 15px;" v-if="detailData">
+        <div slot="message">
+          总款数:<strong>{{ detailData.totalCategory || 0 }}</strong>;总数量:<strong>{{ detailData.totalQty || 0 }}</strong>;总赠品数量:<strong>{{ detailData.totalGiftNum || 0 }}</strong>;急件总款数:<strong>{{ detailData.urgentTotalCategory || 0 }}</strong>;急件总数量:<strong>{{ detailData.urgentTotalQty || 0 }}</strong>;<br/>
+          总售价:<strong>{{ detailData.totalAmount || 0 }}</strong>;总成本:<strong>{{ detailData.totalCost || 0 }}</strong>;总毛利:<strong>{{ detailData.grossProfit || 0 }}</strong>;折后总售价:<strong>{{ detailData.discountedAmount || 0 }}</strong>;折扣:<strong>{{ detailData.discountRate || 0 }}%</strong>;折扣金额:<strong>{{ detailData.discountAmount || 0 }}</strong>;
+        </div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1660 }"
+        bordered>
+      </s-table>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { getOperationalPrecision } from '@/libs/tools.js'
+import { STable, VSelect } from '@/components'
+import { salesDetail } from '@/api/sales'
+import { salesDetailList } from '@/api/salesDetail'
+export default {
+  name: 'SalesDetail',
+  components: { STable, VSelect },
+  data () {
+    return {
+      disabled: false,
+      pritKey: [
+        { id: 0, name: '打印促销' },
+        { id: 1, name: '打印支付方式' },
+        { id: 2, name: '打印收款方式' }
+      ],
+      pritModal: [
+        { id: 0, name: '普通模板一' },
+        { id: 1, name: '普通模板二' },
+        { id: 2, name: '仓库模板一' }
+      ],
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'costPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折后售价', dataIndex: 'discountedPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '销售数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价小计', dataIndex: 'salePriceSubtotal', width: 100, align: 'center' },
+        { title: '折后小计', dataIndex: 'discountedAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折扣金额', dataIndex: 'discountAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center' },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center' },
+        { title: '销售类型', dataIndex: 'salesBillType', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        return salesDetailList(Object.assign(parameter, { salesBillSn: this.$route.params.sn })).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
+            const productCode = (data.list[i].productEntity && data.list[i].productEntity.code) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.code)
+            const productName = (data.list[i].productEntity && data.list[i].productEntity.name) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.name)
+            const productOrigCode = (data.list[i].productEntity && data.list[i].productEntity.origCode) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.origCode)
+            const productOrigUnit = (data.list[i].productEntity && data.list[i].productEntity.unit) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.unit)
+            data.list[i].productCode = productCode || '--'
+            data.list[i].productName = productName || '--'
+            data.list[i].productOrigCode = productOrigCode || '--'
+            data.list[i].productOrigUnit = productOrigUnit || '--'
+            data.list[i].warehouseName = data.list[i].warehouseEntity && data.list[i].warehouseEntity.name || '--'
+            data.list[i].warehouseLocationName = data.list[i].warehouseLocationEntity && data.list[i].warehouseLocationEntity.name || '--'
+            // 售价小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+            data.list[i].salePriceSubtotal = getOperationalPrecision(data.list[i].price, data.list[i].qty)
+          }
+          this.disabled = false
+          return data
+        })
+      },
+      detailData: null //  详情数据
+    }
+  },
+  methods: {
+    //  返回
+    handleBack () {
+      this.$router.push({ path: '/salesManagement/salesQuery/list' })
+    },
+    //  详情
+    getDetail () {
+      salesDetail({ id: this.$route.params.id }).then(res => {
+        if (res.status == 200) {
+          this.detailData = res.data
+        } else {
+          this.detailData = null
+        }
+      })
+    }
+  },
+  mounted () {
+    this.getDetail()
+  }
+}
+</script>
+
+<style lang="less">
+  .salesDetail-wrap{
+    .salesDetail-cont{
+      margin-bottom: 15px;
+    }
+  }
+</style>

+ 196 - 0
src/views/salesManagement/salesQuery/edit.vue

@@ -0,0 +1,196 @@
+<template>
+  <div class="salesEdit-wrap">
+    <a-page-header :ghost="false" @back="handleBack" >
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack">客户名称:车领主常青二路店</a>
+        <a-button id="salesEdit-edit-btn" size="small" @click="handleEdit" style="margin-left:50px" key="0">编辑</a-button>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <a-button key="2" id="salesEdit-preview-btn">打印预览</a-button>
+        <a-button key="1" type="primary" id="salesEdit-print-btn">快速打印</a-button>
+      </template>
+    </a-page-header>
+    <a-card size="small" :bordered="false" class="salesEdit-cont">
+      <!-- 查询配件列表 -->
+      <queryPart></queryPart>
+    </a-card>
+    <a-card size="small" :bordered="false" class="salesEdit-cont">
+      <!-- 总计 -->
+      <a-alert style="margin-bottom: 15px;" type="info">
+        <div slot="message">总售价:<strong>6</strong>;总款数:<strong>6</strong>;总数量:<strong>6</strong>;赠品总数量:<strong>6</strong>;</div>
+      </a-alert>
+      <!-- 查询条件 -->
+      <a-row :gutter="15">
+        <a-col :span="18">
+          <a-form-model layout="inline" :model="productForm" @submit="handleSearch">
+            <a-form-model-item label="产品编码">
+              <a-input v-model="productForm.productNo" placeholder="输入产品编码" />
+            </a-form-model-item>
+            <a-form-model-item label="产品名称">
+              <a-input v-model="productForm.productName" placeholder="输入产品名称" />
+            </a-form-model-item>
+            <a-form-model-item>
+              <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
+              <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
+            </a-form-model-item>
+          </a-form-model>
+        </a-col>
+        <a-col :span="6">
+          <div style="float:right;overflow: hidden;">
+            <a-button size="small" id="salesEdit-dru">导入明细</a-button>
+            <a-button size="small" type="primary" style="margin-left: 10px" id="salesEdit-del-all">整单删除</a-button>
+          </div>
+        </a-col>
+      </a-row>
+      <!-- 已选配件列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1560 }"
+        bordered>
+        <!-- 售价 -->
+        <template slot="price" slot-scope="text, record">
+          <a-input-number
+            id="salesEdit-price"
+            :value="record.price"
+            :precision="0"
+            :min="0"
+            :max="999999"
+            placeholder="请输入" />
+        </template>
+        <!-- 销售数量 -->
+        <template slot="salesNums" slot-scope="text, record">
+          <a-input-number
+            id="salesEdit-salesNums"
+            :value="record.salesNums"
+            :precision="0"
+            :min="0"
+            :max="999999"
+            placeholder="请输入" />
+        </template>
+      </s-table>
+    </a-card>
+    <!-- 选择客户弹框 -->
+    <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false" />
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import queryPart from './queryPart.vue'
+import chooseCustomModal from './chooseCustomModal.vue'
+export default {
+  name: 'SalesDetail',
+  components: { STable, VSelect, queryPart, chooseCustomModal },
+  data () {
+    return {
+      disabled: false, //  查询、重置按钮是否可操作
+      openModal: false,
+      dataSource: [],
+      productForm: {
+        productNo: '',
+        productName: ''
+      },
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productNo', width: 140, align: 'center', sorter: true },
+        { title: '产品名称', dataIndex: 'productName', align: 'center' },
+        { title: '原厂编码', dataIndex: 'ycNo', width: 140, align: 'center' },
+        { title: '品牌', dataIndex: 'productBrand', width: 100, align: 'center', sorter: true },
+        { title: '仓库', dataIndex: 'cangku', width: 100, align: 'center', sorter: true },
+        { title: '仓位', dataIndex: 'cangwei', width: 100, align: 'center' },
+        { title: '辅助单位', dataIndex: 'pzdw', width: 100, align: 'center' },
+        { title: '售价', scopedSlots: { customRender: 'price' }, width: 150, align: 'center' },
+        { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: 150, align: 'center' },
+        { title: '单位', dataIndex: 'dw', width: 100, align: 'center' },
+        { title: '售价小计', dataIndex: 'xj', width: 100, align: 'center' },
+        { title: '折后小计', dataIndex: 'zhxj', width: 100, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).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
+        //   }
+        //   this.disabled = false
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function (resolve, reject) {
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              {
+                id: '1',
+                productNo: 'jgqp11111111111',
+                productName: '产品1',
+                ycNo: 'jgqp111123545',
+                productBrand: '箭冠品牌',
+                productType: '产品分类1',
+                price: 5.6,
+                salesNums: 12
+              }
+            ],
+            count: 10
+          }
+          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.dataSource = data.list
+          resolve(data)
+        })
+      }
+    }
+  },
+  methods: {
+    onCellChange (key, dataIndex, value) {
+      console.log(key, dataIndex, value)
+      console.log(this.dataSource)
+      const dataSource = [...this.dataSource]
+      const target = dataSource.find(item => item.id === key)
+      if (target) {
+        target[dataIndex] = Number(value)
+        this.dataSource = dataSource
+      }
+    },
+    handleSearch () {
+
+    },
+    // 选择客户成功
+    chooseCustomOk (data) {
+
+    },
+    handleEdit () {
+      this.openModal = true
+    },
+    //  重置
+    resetSearchForm () {},
+    //  返回
+    handleBack () {
+      this.$router.push({ path: '/salesManagement/salesQuery/list' })
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .salesEdit-wrap{
+    .salesEdit-cont{
+      margin-top: 15px;
+    }
+  }
+
+</style>

+ 308 - 0
src/views/salesManagement/salesQuery/list.vue

@@ -0,0 +1,308 @@
+<template>
+  <a-card size="small" :bordered="false" class="salesManagementList-wrap">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="创建时间">
+              <a-range-picker
+                style="width:100%"
+                id="salesManagementList-creatDate"
+                :disabledDate="disabledDate"
+                v-model="time"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <a-select
+                id="salesManagementList-buyerName"
+                placeholder="请选择客户"
+                allowClear
+                v-model="queryParam.buyerName"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in customeList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="销售单号">
+              <a-input id="salesManagementList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="采购单号">
+                <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="支付方式">
+                <v-select
+                  v-model="queryParam.payType"
+                  ref="payType"
+                  id="salesManagementList-payType"
+                  code="PAYMENT_TYPE"
+                  placeholder="请选择支付方式"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="收款方式">
+                <v-select
+                  v-model="queryParam.settleStyle"
+                  ref="settleStyle"
+                  id="salesManagementList-settleStyle"
+                  code="PAYMENT_TYPE"
+                  placeholder="请选择收款方式"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务状态">
+                <v-select
+                  v-model="queryParam.auditStatus"
+                  ref="auditStatus"
+                  id="salesManagementList-auditStatus"
+                  code="PAYMENT_TYPE"
+                  placeholder="请选择业务状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="财务状态">
+                <v-select
+                  v-model="queryParam.financialStatus"
+                  ref="financialStatus"
+                  id="salesManagementList-financialStatus"
+                  code="PAYMENT_TYPE"
+                  placeholder="请选择财务状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+          </template>
+          <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>
+              <a @click="advanced=!advanced" style="margin-left: 8px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 操作按钮 -->
+    <div class="table-operator">
+      <a-button type="primary" @click="handleAdd">新增销售单</a-button>
+    </div>
+    <!-- alert -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div slot="message">总售价:<strong>13.00</strong>元;总单数:<strong>13.00</strong>;总款数:<strong>13.00</strong>;总数量:<strong>13.00</strong>;</div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1960 }"
+      bordered>
+      <!-- 业务/审核状态 -->
+      <template slot="auditStatus" slot-scope="text, record">
+        <a-tag :color="record.state=='FINISH'?'green':'red'" >{{ record.state=='FINISH'? '待备货审核': '待单据审核' }}</a-tag>
+      </template>
+      <!-- 财务状态 -->
+      <template slot="financialStatus" slot-scope="text, record">
+        <a-tag :color="record.state==1?'green':'red'" >{{ record.state==1? '待提交': '待单据审核' }}</a-tag>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button size="small" type="link" @click="handleEexamine(record)" id="salesManagementList-eexamine-btn">审核</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleSend(record)" id="salesManagementList-send-btn">出库</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDetail(record)" id="salesManagementList-detail-btn">详情</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleEdit(record)" id="salesManagementList-edit-btn">编辑</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDel(record)" id="salesManagementList-del-btn">删除</a-button>
+      </template>
+    </s-table>
+    <!-- 选择客户弹框 -->
+    <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import chooseCustomModal from './chooseCustomModal.vue'
+import { salesList, salesDel } from '@/api/sales'
+export default {
+  name: 'TableList',
+  components: { STable, VSelect, chooseCustomModal },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      disabled: false, //  查询、重置按钮是否可操作
+      dateFormat: 'YYYY-MM-DD',
+      time: [], //  创建时间
+      openModal: false, // 选择客户弹框是否显示
+      customeList: [],
+      // 查询参数
+      queryParam: {
+        buyerName: undefined, //  客户名称
+        salesBillNo: '', //  销售单号
+        purchaseBillNo: '', //  采购单号
+        payType: undefined, //  支付方式
+        settleStyle: undefined, //  收款方式
+        auditStatus: undefined, //  业务状态
+        financialStatus: undefined //  财务状态
+      },
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: 140, align: 'center' },
+        { title: '采购单号', dataIndex: 'purchaseBillNo', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '支付方式', dataIndex: 'payType', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款方式', dataIndex: 'settleStyle', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '急件', dataIndex: 'urgentFlag', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', scopedSlots: { customRender: 'auditStatus' }, width: 110, align: 'center' },
+        { title: '财务状态', scopedSlots: { customRender: 'financialStatus' }, width: 110, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 260, align: 'center', fixed: 'right' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        return salesList(Object.assign(parameter, this.queryParam)).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
+          }
+          this.disabled = false
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 新增
+    handleAdd () {
+      this.openModal = true
+    },
+    // 选择客户成功
+    chooseCustomOk (data) {
+      this.$router.push({ path: '/salesManagement/salesQuery/add' })
+    },
+    //  审核
+    handleEexamine (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要审核吗?',
+        okText: '审核通过',
+        cancelText: '审核不通过',
+        centered: true,
+        onOk () {
+          // delectRolePower({
+          //   id: row.id
+          // }).then(res => {
+          //   console.log(res, 'res1111')
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //   }
+          // })
+        }
+      })
+    },
+    //  出库
+    handleSend (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要出库吗?',
+        centered: true,
+        onOk () {
+          // delectRolePower({
+          //   id: row.id
+          // }).then(res => {
+          //   console.log(res, 'res1111')
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //   }
+          // })
+        }
+      })
+    },
+    // 详情
+    handleDetail (row) {
+      this.$router.push({ path: `/salesManagement/salesQuery/detail/${row.id}/${row.salesBillSn}` })
+    },
+    // 编辑
+    handleEdit (row) {
+      this.$router.push({ path: `/salesManagement/salesQuery/edit/${row.id}` })
+    },
+    // 删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要删除吗?',
+        centered: true,
+        onOk () {
+          salesDel({ id: row.id }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
+    resetSearchForm () {
+      this.queryParam.buyerName = undefined
+      this.queryParam.salesBillNo = ''
+      this.queryParam.purchaseBillNo = ''
+      this.queryParam.payType = undefined
+      this.queryParam.settleStyle = undefined
+      this.queryParam.auditStatus = undefined
+      this.queryParam.financialStatus = undefined
+      this.time = []
+      this.$refs.table.refresh(true)
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    }
+  }
+}
+</script>
+<style lang="less">
+  .ssalesManagementList-wrap{
+    .sTable{
+      margin-top: 15px;
+    }
+  }
+</style>

+ 158 - 0
src/views/salesManagement/salesQuery/productSalesRecordModal.vue

@@ -0,0 +1,158 @@
+<template>
+  <a-modal
+    centered
+    class="salesRecord-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="modalTit"
+    v-model="isShow"
+    @cancle="isShow=false"
+    width="80%">
+    <div>
+      <a-tabs type="card" default-active-key="1" @change="callback">
+        <a-tab-pane key="1" tab="当前客户">
+        </a-tab-pane>
+        <a-tab-pane key="2" tab="全部客户">
+        </a-tab-pane>
+      </a-tabs>
+      <!-- 表格 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        bordered>
+      </s-table>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { STable } from '@/components'
+export default {
+  name: 'salesRecordModal',
+  components: { STable },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemId: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  computed: {
+    modalTit () {
+      return '销售记录'
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      // 表头
+      columns: [
+        {
+          title: '销售时间',
+          dataIndex: 'salesTime',
+          align: 'center',
+          width: 250
+        },
+        {
+          title: '销售价(¥)',
+          dataIndex: 'price',
+          align: 'center',
+          width: 150
+        },
+        {
+          title: '销售数量',
+          dataIndex: 'salesNums',
+          align: 'center',
+          width: 150
+        },
+        {
+          title: '客户名称',
+          dataIndex: 'productBrand',
+          align: 'center'
+        },
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
+        //   const data = res.data
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function(resolve, reject){
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              { 
+                id: '1', 
+                salesTime: '2020-12-23 15:23:15', 
+                price: 56, 
+                salesNums: 12, 
+                productBrand: '箭冠品牌', 
+              },
+              {
+                id: '23', 
+                salesTime: '2020-12-23 15:23:15', 
+                price: 56, 
+                salesNums: 12, 
+                productBrand: '箭冠品牌', 
+              },
+              {
+                id: '44', 
+                salesTime: '2020-12-23 15:23:15', 
+                price: 56, 
+                salesNums: 12, 
+                productBrand: '箭冠品牌', 
+              }
+            ],
+            count: 100
+          }
+          resolve(data)
+        })
+      },
+    }
+  },
+  methods: {
+    //  获取详情
+    getDetail(){
+      
+    },
+    callback(key){
+      console.log(key);
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    },
+    itemId (newValue, oldValue) {
+      if (this.isShow && newValue) {
+        this.getDetail()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .salesRecord-modal{
+    .ant-modal-body {
+    	padding: 10px;
+    }
+  }
+</style>

+ 224 - 0
src/views/salesManagement/salesQuery/queryPart.vue

@@ -0,0 +1,224 @@
+<template>
+  <div class="productInfoList-wrap">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品编码">
+              <a-input id="productInfoList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入产品编码"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品名称">
+              <a-input id="productInfoList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入产品名称"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="原厂编码">
+              <a-input id="productInfoList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入原厂编码"/>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="车架号(VIN)">
+                <a-input id="productInfoList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入车架号(VIN)"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品品牌">
+                <a-select
+                  placeholder="请选择产品品牌"
+                  id="productInfoList-state"
+                  allowClear
+                  v-model="queryParam.dataSourceNo"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品类别">
+                <a-cascader :options="typeData" id="productInfoList-state" placeholder="请选择产品类别" allowClear v-model="queryParam.brand" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="车型">
+                <v-select code="CHECK_ENABLE_STATE" id="productInfoList-state" v-model="queryParam.state" allowClear placeholder="请选择车型"></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="仓库">
+                <v-select code="CHECK_ENABLE_STATE" id="productInfoList-state" v-model="queryParam.state" allowClear placeholder="请选择仓库"></v-select>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24">
+            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
+            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin:0 15px 0 8px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
+            <a-popover>
+              <template slot="content">双击列表配件可快速选中添加</template>
+              <a-icon type="question-circle" theme="twoTone" />
+            </a-popover>
+            <a-icon style="margin:0 15px" type="setting" theme="twoTone" />
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1530 }"
+      bordered>
+      <!-- 售价 -->
+      <template slot="price" slot-scope="text, record">
+        <a-input-number
+          id="productInfoList-price"
+          :value="record.price"
+          :precision="0"
+          :min="0"
+          :max="999999"
+          placeholder="请输入" />
+      </template>
+      <!-- 销售数量 -->
+      <template slot="salesNums" slot-scope="text, record">
+        <a-input-number
+          id="productInfoList-salesNums"
+          :value="record.salesNums"
+          :precision="0"
+          :min="0"
+          :max="999999"
+          placeholder="请输入" />
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button size="small" type="link" @click="handleAdd(record)" id="productInfoList-edit-btn">添加</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDetail(record)" id="productInfoList-detail-btn" style="margin-left: 15px;">销售记录</a-button>
+      </template>
+    </s-table>
+    <!-- 销售记录 -->
+    <product-salesRecord-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
+  </div>
+</template>
+
+<script>
+// import { customerBundleDelayList, customerBundleExportDelay } from '@/api/FinancialManagement'
+import productSalesRecordModal from './productSalesRecordModal.vue'
+import { STable, VSelect } from '@/components'
+export default {
+  name: 'QueryPart',
+  components: { STable, VSelect, productSalesRecordModal },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      queryParam: { //  查询条件
+        bundleName: '', //  供应商名称
+        state: undefined //  状态
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出loading
+      brandData: [], //  下拉数据
+      typeData: [], //  产品类别  下拉数据
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品编码', dataIndex: 'productNo', width: 140, align: 'center', sorter: true },
+        { title: '产品名称', dataIndex: 'productName', align: 'center' },
+        { title: '原厂编码', dataIndex: 'ycNo', width: 140, align: 'center' },
+        { title: '品牌', dataIndex: 'productBrand', width: 100, align: 'center', sorter: true },
+        { title: '仓库', dataIndex: 'cangku', width: 100, align: 'center', sorter: true },
+        { title: '仓位', dataIndex: 'cangwei', width: 100, align: 'center' },
+        { title: '辅助单位', dataIndex: 'pzdw', width: 100, align: 'center' },
+        { title: '售价', scopedSlots: { customRender: 'price' }, width: 150, align: 'center' },
+        { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: 150, align: 'center' },
+        { title: '单位', dataIndex: 'dw', width: 100, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).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
+        //   }
+        //   this.disabled = false
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function (resolve, reject) {
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              {
+                id: '1',
+                productNo: 'jgqp1111111111',
+                productName: '产品1',
+                ycNo: 'jgqp111123545',
+                productBrand: '箭冠品牌',
+                productType: '产品分类1',
+                price: 5.6,
+                salesNums: 12,
+                dw: '个'
+              }
+            ],
+            count: 10
+          }
+          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
+          resolve(data)
+        })
+      },
+      openModal: false, //  查看客户详情  弹框
+      itemId: '' //  当前产品id
+    }
+  },
+  methods: {
+    //  重置
+    resetSearchForm () {
+      this.queryParam.orderBundleNo = ''
+      this.queryParam.orderBundle.custMobile = ''
+      this.queryParam.bundleName = ''
+      this.queryParam.itemName = ''
+      this.oldTime = undefined
+      this.newTime = undefined
+      this.$refs.table.refresh(true)
+    },
+    filterOption (input, option) {
+    	return (
+    		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    	)
+    },
+    // 选择配件
+    handleAdd (row) {
+      this.$emit('add', row)
+    },
+    // 销售记录
+    handleDetail (row) {
+      this.itemId = row.id
+      this.openModal = true
+    },
+    //  关闭弹框
+    closeModal () {
+      this.itemId = ''
+      this.openModal = false
+    }
+  }
+}
+</script>