Bladeren bron

Merge branch 'deploy' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into deploy

lilei 4 jaren geleden
bovenliggende
commit
86520c477e

+ 20 - 1
src/api/sales.js

@@ -109,4 +109,23 @@ export const getPromoacActiveList = (params) => {
     data: params,
     method: 'get'
   })
-}
+}
+//  促销订单统计 列表  有分页
+export const salesPromoList = (params) => {
+  const url = `/sales/queryPageByPromo/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  促销订单统计 合计
+export const salesPromoCount = (params) => {
+  return axios({
+    url: '/sales/queryCountByPromo',
+    data: params,
+    method: 'post'
+  })
+}

+ 20 - 1
src/api/salesDetail.js

@@ -103,4 +103,23 @@ export const addPromoGoods = (params) => {
     data: params,
     method: 'post'
   })
-}
+}
+// 促销产品统计  列表  分页
+export const salesDetailPromoList = (params) => {
+  const url = `/sales/detail/queryPageByPromo/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 促销产品统计  合计
+export const salesDetailPromoCount = (params) => {
+  return axios({
+    url: `/sales/detail/queryCountByPromo`,
+    data: params,
+    method: 'post'
+  })
+}

+ 7 - 0
src/api/supplier.js

@@ -80,3 +80,10 @@ export const addProduct = (params) => {
     method: 'post'
   })
 }
+// 查询供应商产品sn集合
+export const supplierProductSnList = (params) => {
+  return axios({
+    url: `/supplierProduct/queryProductSnList/${params.sn}`,
+    method: 'get'
+  })
+}

+ 2 - 2
src/views/allocationManagement/transferOut/basicInfoModal.vue

@@ -80,7 +80,7 @@ export default {
         wrapperCol: { span: 16 }
       },
       form: {
-        targetType: '1',
+        targetType: 'DEALER',
         targetSn: undefined,
         targetName: '',
         allocateTypeSn: undefined,
@@ -101,7 +101,7 @@ export default {
   computed: {
     // 当前所选调往对象是否为经销商
     isDealer () {
-      return this.form.targetType == '1'
+      return this.form.targetType == 'DEALER'
     }
   },
   methods: {

+ 2 - 16
src/views/allocationManagement/transferOut/list.vue

@@ -46,18 +46,6 @@
                 <a-input id="allocateBillList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="客户类型">
-                <v-select
-                  v-model="queryParam.state"
-                  ref="state"
-                  id="allocateBillList-state"
-                  code="BILL_STATUS"
-                  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="allocateBillList-refresh">查询</a-button>
@@ -140,8 +128,7 @@ export default {
         targetName: '', //  调往对象
         allocateTypeSn: undefined, //  调拨类型
         state: undefined, //  业务状态
-        allocateNo: '', //  调拨单号
-        stasste: undefined //  客户类型
+        allocateNo: '' //  调拨单号
       },
       disabled: false, //  查询、重置按钮是否可操作
       dateFormat: 'YYYY-MM-DD',
@@ -150,7 +137,7 @@ export default {
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
         { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center' },
         { title: '调往对象', dataIndex: 'targetName', width: 220, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户类型', dataIndex: 'callOutTypeName', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户类型', dataIndex: 'dealerLevelDictValue', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '总数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总成本', dataIndex: 'totalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'totalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -201,7 +188,6 @@ export default {
       this.queryParam.allocateTypeSn = undefined
       this.queryParam.state = undefined
       this.queryParam.allocateNo = ''
-      this.queryParam.stasste = undefined
       this.createDate = []
       this.$refs.table.refresh(true)
     },

+ 59 - 27
src/views/common/chooseProductsModal.vue

@@ -68,7 +68,15 @@
           ref="table"
           size="small"
           :rowKey="(record) => record.productSn"
-          :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
+          :row-selection="{
+            selectedRowKeys: selectedRowKeys,
+            onChange: onChange,
+            onSelect: onSelectChange,
+            onSelectAll: onSelectAllChange,
+            getCheckboxProps:record =>({props: {
+              disabled: (this.type == 'supplier') && (this.selectedRowKeys.indexOf(record.productSn) > -1)
+            }})
+          }"
           :data-source="loadData"
           :columns="columns"
           :pagination="paginationProps"
@@ -102,7 +110,7 @@ import { STable } from '@/components'
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
 import { dealerScopeValidProduct } from '@/api/dealerScope'
-import { productPricedList } from '@/api/product'
+import { productPricedList, productList } from '@/api/product'
 export default {
   name: 'ChooseProductsModal',
   components: { STable },
@@ -117,7 +125,7 @@ export default {
         return []
       }
     },
-    type: { //  类型,经销权设置dealership
+    type: { //  类型,经销权设置dealership,  供应商添加产品supplier
       type: String,
       default: ''
     },
@@ -235,11 +243,22 @@ export default {
     },
     // 保存
     handleSave () {
+      const _this = this
       if (this.selectedRowKeys.length < 1) {
         this.$message.warning('请在列表勾选后再进行操作!')
         return
       }
-      this.$emit('ok', this.selectedRows)
+      if (this.type == 'supplier') { //  供应商增加产品
+        const arr = []
+        this.selectedRowKeys.map(item => {
+          if (_this.chooseData.indexOf(item) == -1) {
+            arr.push(item)
+          }
+        })
+        this.$emit('ok', arr)
+      } else {
+        this.$emit('ok', this.selectedRows)
+      }
       this.isShow = false
     },
     onChange (selectedRowKeys, selectedRows) {
@@ -247,29 +266,33 @@ export default {
     },
     onSelectChange (record, selected, selectedRows, nativeEvent) {
       const _this = this
-      if (selected) { //  选择
-        this.selectedRows.push(record)
-      } else { //  取消
-        this.selectedRows.map((item, index) => {
-          if (item.productSn == record.productSn) {
-            _this.selectedRows.splice(index, 1)
-          }
-        })
+      if (this.type != 'supplier') { //  供应商增加产品
+        if (selected) { //  选择
+          this.selectedRows.push(record)
+        } else { //  取消
+          this.selectedRows.map((item, index) => {
+            if (item.productSn == record.productSn) {
+              _this.selectedRows.splice(index, 1)
+            }
+          })
+        }
       }
     },
     // 本页全选/取消全选
     onSelectAllChange (selected, selectedRows, changeRows) {
       const _this = this
-      if (selected) { //  选择
-        this.selectedRows = [...this.selectedRows, ...changeRows]
-      } else { //  取消
-        this.selectedRows.map((item, index) => {
-          this.selectedRows.map((subItem, ind) => {
-            if (item.productSn == subItem.productSn) {
-              _this.selectedRows.splice(index, 1)
-            }
+      if (this.type != 'supplier') { //  供应商增加产品
+        if (selected) { //  选择
+          this.selectedRows = [...this.selectedRows, ...changeRows]
+        } else { //  取消
+          this.selectedRows.map((item, index) => {
+            this.selectedRows.map((subItem, ind) => {
+              if (item.productSn == subItem.productSn) {
+                _this.selectedRows.splice(index, 1)
+              }
+            })
           })
-        })
+        }
       }
     },
     // 产品列表
@@ -281,7 +304,11 @@ export default {
         pageSize: this.pageSize
       }
       this.loading = true
-      productPricedList(Object.assign(params, this.queryParam)).then(res => {
+      let url = productPricedList //  获取定过价的产品
+      if (this.type == 'supplier') { //  供应商增加产品
+        url = productList //  获取全部产品(包含定过价和未定过价的所有)
+      }
+      url(Object.assign(params, this.queryParam)).then(res => {
         this.loading = false
         if (res.status == 200) {
           const data = res.data
@@ -356,11 +383,16 @@ export default {
         this.disabled = false
         this.resetData()
       } else {
-        this.selectedRows = this.chooseData
-        this.selectedRowKeys = []
-        this.chooseData.map(item => {
-          this.selectedRowKeys.push(item.goodsSn)
-        })
+        if (this.type == 'supplier') { //  供应商增加产品
+          this.selectedRows = []
+          this.selectedRowKeys = this.chooseData
+        } else {
+          this.selectedRows = this.chooseData
+          this.selectedRowKeys = []
+          this.chooseData.map(item => {
+            this.selectedRowKeys.push(item.goodsSn)
+          })
+        }
         if (this.productBrandList.length == 0) {
           this.getProductBrand()
         }

+ 64 - 0
src/views/common/promoList.vue

@@ -0,0 +1,64 @@
+<template>
+  <a-select
+    show-search
+    label-in-value
+    :value="name"
+    placeholder="请输入名称搜索"
+    style="width: 100%"
+    :filter-option="false"
+    :not-found-content="fetching ? undefined : null"
+    @search="fetchUser"
+    @change="handleChange"
+    allowClear
+  >
+    <a-spin v-if="fetching" slot="notFoundContent" size="small" />
+    <a-select-option v-for="item in data" :key="item.promoActiveSn" :value="item.promoActiveSn">
+      {{ item.name }}
+    </a-select-option>
+  </a-select>
+</template>
+<script>
+import debounce from 'lodash/debounce'
+import { promoActiveList } from '@/api/promoActive'
+export default {
+  props: {
+  },
+  data () {
+    this.lastFetchId = 0
+    this.fetchUser = debounce(this.fetchUser, 800)
+    return {
+      data: [],
+      name: [],
+      fetching: false
+    }
+  },
+  methods: {
+    fetchUser (name) {
+      console.log('fetching user', name)
+      if (name == '') return
+      this.lastFetchId += 1
+      const fetchId = this.lastFetchId
+      this.data = []
+      this.fetching = true
+      promoActiveList({ 'name': name, pageNo: 1, pageSize: 20 }).then(res => {
+        if (fetchId !== this.lastFetchId) {
+          return
+        }
+        this.data = res.data.list || []
+        this.fetching = false
+      })
+    },
+    handleChange (value) {
+      Object.assign(this, {
+        name: value,
+        data: [],
+        fetching: false
+      })
+      this.$emit('change', value || { key: undefined })
+    },
+    resetForm () {
+      this.name = []
+    }
+  }
+}
+</script>

+ 26 - 45
src/views/promotionRulesManagement/orderStatistics/detailModal.vue

@@ -9,7 +9,7 @@
     @cancle="isShow=false"
     width="80%">
     <div>
-      <p>销售单号: 158907</p>
+      <p>销售单号: {{ nowData.salesBillNo || '--' }}</p>
       <!-- 列表 -->
       <s-table
         class="sTable"
@@ -18,18 +18,9 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1360, y: 400 }"
+        :defaultLoadData="false"
+        :scroll="{ x: 1400, y: 400 }"
         bordered>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-button
-            size="small"
-            type="link"
-            @click="handleDetail(record)"
-            class="button-success"
-            id="orderStatisticsDetail-edit-btn">详情</a-button>
-          <!-- <span>--</span> -->
-        </template>
       </s-table>
       <div class="btn-cont"><a-button id="orderStatisticsDetail-back" @click="isShow = false">返回列表</a-button></div>
     </div>
@@ -38,7 +29,7 @@
 
 <script>
 import { STable } from '@/components'
-// import { custFindById } from '@/api/customer'
+import { salesDetailList } from '@/api/salesDetail'
 export default {
   name: 'OrderStatisticsDetailModal',
   components: { STable },
@@ -47,9 +38,15 @@ export default {
       type: Boolean,
       default: false
     },
-    itemId: {
+    itemSn: {
       type: [Number, String],
       default: ''
+    },
+    nowData: {
+      type: Object,
+      default: () => {
+        return {}
+      }
     }
   },
   data () {
@@ -58,43 +55,27 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品编码', dataIndex: 'sparePartsPurchaseNo', width: 220, align: 'center' },
-        { title: '产品名称', dataIndex: 'supplierName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原价', dataIndex: 'productTotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销价', dataIndex: 'productTotalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '数量', dataIndex: 'psroductTotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'suppliersName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原价小计', dataIndex: 'productTotdalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销价小计', dataIndex: 'productTdotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '节省金额小计', dataIndex: 'productTdostalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销类型', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '产品编码', dataIndex: 'productEntity.code', width: 220, align: 'center' },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原价', dataIndex: 'origPrice', 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: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原价小计', dataIndex: 'totalAmounts', 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: 'totalEconomizeAmount', width: 130, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '促销类型', dataIndex: 'promotionRulesName', width: 150, align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        // return sparePartsPurList(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
-        //   }
-        //   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: '箭冠品牌', inventoryNumss: '0' },
-              { id: '2', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', inventoryNumss: '0' },
-              { id: '3', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', inventoryNumss: '0' }
-            ]
-          }
+        return salesDetailList(Object.assign(parameter, { salesBillSn: this.itemSn, promotionFlag: 1 })).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
+            // priceSubtotal
           }
-          resolve(data)
+          return data
         })
       }
     }
@@ -113,7 +94,7 @@ export default {
         this.$emit('close')
       }
     },
-    itemId (newValue, oldValue) {
+    itemSn (newValue, oldValue) {
       if (this.isShow && newValue) {
         const _this = this
         setTimeout(() => {

+ 71 - 102
src/views/promotionRulesManagement/orderStatistics/list.vue

@@ -17,36 +17,27 @@
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-              <a-select
-                id="orderStatisticsList-supplierSn"
-                placeholder="请选择客户名称"
-                allowClear
-                v-model="queryParam.supplierSn"
-                :showSearch="true"
-                option-filter-prop="children"
-                :filter-option="filterOption">
-                <a-select-option v-for="item in supplierList" :key="item.supplierSn" :value="item.supplierSn">{{ item.supplierName }}</a-select-option>
-              </a-select>
+              <custList ref="custList" id="orderStatisticsList-buyerSn" @change="custChange"></custList>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="销售单号">
-              <a-input id="orderStatisticsList-sparePartsPurchaseNo" v-model.trim="queryParam.sparePartsPurchaseNo" allowClear placeholder="请输入销售单号"/>
+              <a-input id="orderStatisticsList-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="orderStatisticsList-sparePartsPurchaseNo" v-model.trim="queryParam.sparePartsPurchaseNo" allowClear placeholder="请输入活动名称"/>
+              <a-form-item label="促销名称">
+                <promoList ref="promoList" id="orderStatisticsList-promoActiveSn" @change="promoChange"></promoList>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="业务状态">
                 <v-select
-                  v-model="queryParam.state"
-                  ref="state"
-                  id="orderStatisticsList-state"
-                  code="SPARE_PARTS_PURCHASE"
+                  v-model="queryParam.billStatus"
+                  ref="billStatus"
+                  id="orderStatisticsList-billStatus"
+                  code="SALES_BILL_STATUS"
                   placeholder="请选择业务状态"
                   allowClear
                 ></v-select>
@@ -68,7 +59,14 @@
     </div>
     <!-- alert -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">促销品原价总额: <strong>{{ dataTotalCount }}</strong> ;促销品促销价总额: <strong>{{ productTotal.productTotalQty }}</strong> ;总单数:<strong>{{ productTotal.productTotalCost }}</strong>;总款数:<strong>{{ productTotal.productTotalCost }}</strong>;节省总额:<strong>{{ productTotal.productTotalCost }}</strong>;总条数:<strong>{{ productTotal.productTotalCost }}</strong>。 </div>
+      <div slot="message">
+        促销品原价总额:<strong>{{ productTotal ? ((productTotal.totalOrigAmount || productTotal.totalOrigAmount==0) ? productTotal.totalOrigAmount : '--') : '--' }}</strong>,
+        促销品促销价总额:<strong>{{ productTotal ? ((productTotal.totalAmount || productTotal.totalAmount==0) ? productTotal.totalAmount : '--') : '--' }}</strong>,
+        节省总额:<strong>{{ productTotal ? ((productTotal.totalEconomizeAmount || productTotal.totalEconomizeAmount==0) ? productTotal.totalEconomizeAmount : '--') : '--' }}</strong>,
+        总单数:<strong>{{ productTotal ? ((productTotal.totalRecord || productTotal.totalRecord==0) ? productTotal.totalRecord : '--') : '--' }}</strong>,
+        总款数:<strong>{{ productTotal ? ((productTotal.totalCategory || productTotal.totalCategory==0) ? productTotal.totalCategory : '--') : '--' }}</strong>,
+        总数量:<strong>{{ productTotal ? ((productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--') : '--' }}</strong>
+      </div>
     </a-alert>
     <!-- 列表 -->
     <s-table
@@ -78,7 +76,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1360, y: tableHeight }"
+      :scroll="{ x: 1690, y: tableHeight }"
       bordered>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
@@ -88,22 +86,22 @@
           @click="handleDetail(record)"
           class="button-success"
           id="orderStatisticsList-edit-btn">详情</a-button>
-        <!-- <span>--</span> -->
       </template>
     </s-table>
     <!-- 详情 -->
-    <orderStatisticsDetailModal :openModal="openModal" :itemId="itemId" @close="closeModal" />
+    <orderStatisticsDetailModal :openModal="openModal" :itemSn="itemSn" :nowData="nowData" @close="closeModal" />
   </a-card>
 </template>
 
 <script>
 import moment from 'moment'
 import { STable, VSelect } from '@/components'
+import custList from '@/views/common/custList.vue'
+import promoList from '@/views/common/promoList.vue'
 import orderStatisticsDetailModal from './detailModal.vue'
-// import { sparePartsPurList, sparePartsPurCount } from '@/api/sparePartsPur'
-// import { supplierAllList } from '@/api/supplier'
+import { salesPromoList, salesPromoCount } from '@/api/sales'
 export default {
-  components: { STable, VSelect, orderStatisticsDetailModal },
+  components: { STable, VSelect, orderStatisticsDetailModal, custList, promoList },
   data () {
     return {
       advanced: false, // 高级搜索 展开/关闭
@@ -115,25 +113,25 @@ export default {
       tableHeight: 0,
       // 查询参数
       queryParam: {
-        sparePartsPurchaseNo: '', //  散件单号
-        supplierSn: undefined, //  供应商
-        state: undefined, //  单据状态
-        settleState: undefined //  结算状态
+        buyerSn: undefined,
+        promoActiveSn: undefined,
+        salesBillNo: '',
+        billStatus: undefined
       },
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
-        { title: '单据来源', dataIndex: 'suspplierName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', dataIndex: 'sparePartsPurchaseNo', width: 220, align: 'center' },
-        { title: '促销名称', dataIndex: 'supplierName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户名称', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '促销品款数', dataIndex: 'productTotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销品数量', dataIndex: 'productTotalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '原价总额', dataIndex: 'psroductTotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '促销品总额', dataIndex: 'productTotdalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '节省总额', dataIndex: 'productTdotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据来源', dataIndex: 'salesBillSourceDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '促销名称', dataIndex: 'promoName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'buyerName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '促销品款数', dataIndex: 'totalPromoCategory', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '促销品数量', dataIndex: 'totalPromoQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '原价总额', dataIndex: 'promoTotal', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '促销品总额', dataIndex: 'totalPromoAmount', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '节省总额', dataIndex: 'totalEconomizeAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -150,43 +148,26 @@ export default {
           this.queryParam.beginDate = undefined
           this.queryParam.endDate = undefined
         }
-        // return sparePartsPurList(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
-        //   this.dataTotalCount = data.count
-        //   this.getTotal(Object.assign(parameter, this.queryParam))
-        //   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: '箭冠品牌', inventoryNumss: '0' },
-              { id: '2', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', inventoryNumss: '0' },
-              { id: '3', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', inventoryNumss: '0' }
-            ]
-          }
+        return salesPromoList(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
+            const promotionActivityNameList = data.list[i].promotionActivityNameList || []
+            data.list[i].promoName = promotionActivityNameList.join(',')
+            const totalPromoAmount = data.list[i].totalPromoAmount || 0
+            const totalEconomizeAmount = data.list[i].totalEconomizeAmount || 0
+            data.list[i].promoTotal = Number(totalPromoAmount) + Number(totalEconomizeAmount)
           }
-          _this.disabled = false
-          resolve(data)
+          this.disabled = false
+          this.getTotal(Object.assign(parameter, this.queryParam))
+          return data
         })
       },
       openModal: false, //  弹框是否显示
-      itemId: '', //  当前id
-      productTotal: { // 合计信息
-        productTotalCost: '',
-        productTotalQty: ''
-      },
-      dataTotalCount: '' //  列表数据总条数
+      itemSn: '', //  当前sn
+      nowData: null,
+      productTotal: null
     }
   },
   methods: {
@@ -194,58 +175,46 @@ export default {
     disabledDate (date, dateStrings) {
       return date && date.valueOf() > Date.now()
     },
+    custChange (obj) {
+      this.queryParam.buyerSn = obj.key
+    },
+    promoChange (obj) {
+      this.queryParam.promoActiveSn = obj.key
+    },
     // 合计
     getTotal (param) {
-      // sparePartsPurCount(param).then(res => {
-      //   if (res.status == 200 && res.data) {
-      //     this.productTotal = res.data
-      //   } else {
-      //     this.productTotal = {
-      //       // 合计信息
-      //       productTotalCost: '',
-      //       productTotalQty: ''
-      //     }
-      //   }
-      // })
+      salesPromoCount(param).then(res => {
+        if (res.status == 200 && res.data) {
+          this.productTotal = res.data
+        } else {
+          this.productTotal = null
+        }
+      })
     },
     //  详情
     handleDetail (row) {
-      this.itemId = row.id
+      this.itemSn = row.salesBillSn
+      this.nowData = row
       this.openModal = true
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.sparePartsPurchaseNo = ''
-      this.queryParam.supplierSn = undefined
-      this.queryParam.state = undefined
-      this.queryParam.settleState = undefined
-      this.createDate = undefined
+      this.queryParam.buyerSn = undefined
+      this.queryParam.promoActiveSn = undefined
+      this.queryParam.salesBillNo = ''
+      this.queryParam.billStatus = undefined
+      this.createDate = []
       this.$refs.table.refresh(true)
     },
     // 关闭弹框
     closeModal () {
       this.openModal = false
-      this.itemId = ''
-    },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
-    // 供应商下拉数据
-    getSupplierList () {
-      // supplierAllList().then(res => {
-      //   if (res.status == 200) {
-      //     this.supplierList = res.data
-      //   } else {
-      //     this.supplierList = []
-      //   }
-      // })
+      this.itemSn = ''
     }
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      vm.getSupplierList()
+
     })
   }
 }

+ 48 - 63
src/views/promotionRulesManagement/productStatistics/list.vue

@@ -30,14 +30,14 @@
               <a-form-item label="产品分类">
                 <a-cascader
                   @change="changeProductType"
-                  change-on-select
-                  v-model="productType"
                   expand-trigger="hover"
+                  change-on-select
                   :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                  :fieldNames="{ label: 'productTypeName', value: 'id', children: 'children' }"
                   id="productStatisticsList-productType"
                   placeholder="请选择产品分类"
-                  allowClear />
+                  allowClear
+                  v-model="productType" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -105,10 +105,10 @@
 <script>
 import moment from 'moment'
 import { STable, VSelect } from '@/components'
-// import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-// import { dealerProductTypeList } from '@/api/dealerProductType'
-// import { dealerProductList, dealerProductUpdate, dealerProductExport } from '@/api/dealerProduct'
 import productStatisticsDetailModal from './detailModal.vue'
+import { productBrandQuery } from '@/api/productBrand'
+import { productTypeQuery } from '@/api/productType'
+import { salesDetailPromoList, salesDetailPromoCount } from '@/api/salesDetail'
 export default {
   components: { STable, VSelect, productStatisticsDetailModal },
   data () {
@@ -140,58 +140,33 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        // this.disabled = true
-        // if (this.tableHeight == 0) {
-        //   this.tableHeight = window.innerHeight - 380
-        // }
-        // // 统计时间
-        // if (this.createDate && this.createDate.length > 0) {
-        //   this.queryParam.beginDate = moment(this.createDate[0]).format(this.dateFormat)
-        //   this.queryParam.endDate = moment(this.createDate[1]).format(this.dateFormat)
-        // } else {
-        //   this.queryParam.beginDate = undefined
-        //   this.queryParam.endDate = undefined
-        // }
-        // return dealerProductList(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
-        //     const productTypeName1 = data.list[i].productTypeName1 ? data.list[i].productTypeName1 : ''
-        //     const productTypeName2 = data.list[i].productTypeName2 ? ' > ' + data.list[i].productTypeName2 : ''
-        //     const productTypeName3 = data.list[i].productTypeName3 ? ' > ' + data.list[i].productTypeName3 : ''
-        //     data.list[i].productTypeName = productTypeName1 + productTypeName2 + productTypeName3
-        //   }
-        //   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: '箭冠品牌', inventoryNumss: '0' },
-              { id: '2', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', inventoryNumss: '0' },
-              { id: '3', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', inventoryNumss: '0' }
-            ]
-          }
+        this.disabled = true
+        if (this.tableHeight == 0) {
+          this.tableHeight = window.innerHeight - 380
+        }
+        // 统计时间
+        if (this.createDate && this.createDate.length > 0) {
+          this.queryParam.beginDate = moment(this.createDate[0]).format(this.dateFormat)
+          this.queryParam.endDate = moment(this.createDate[1]).format(this.dateFormat)
+        } else {
+          this.queryParam.beginDate = undefined
+          this.queryParam.endDate = undefined
+        }
+        return salesDetailPromoList(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
-          resolve(data)
+          this.disabled = false
+          return data
         })
       },
       openModal: false, //  查看客户详情  弹框
       itemId: '', //  当前产品id
       productBrandList: [], //  品牌下拉数据
       productTypeList: [], //  分类下拉数据
-      productTotal: { // 合计信息
-        productTotalCost: '',
-        productTotalQty: ''
-      },
+      productTotal: null,
       dataTotalCount: '' //  列表数据总条数
     }
   },
@@ -212,6 +187,16 @@ export default {
       this.createDate = []
       this.$refs.table.refresh(true)
     },
+    // 合计
+    getTotal (param) {
+      salesDetailPromoCount(param).then(res => {
+        if (res.status == 200 && res.data) {
+          this.productTotal = res.data
+        } else {
+          this.productTotal = null
+        }
+      })
+    },
     //  详情
     handleDetail (row) {
       this.itemId = row.id
@@ -230,23 +215,23 @@ export default {
     },
     //  产品品牌  列表
     getProductBrand () {
-      // dealerProductBrandQuery({ 'sysFlag': '0' }).then(res => {
-      //   if (res.status == 200) {
-      //     this.productBrandList = res.data
-      //   } else {
-      //     this.productBrandList = []
-      //   }
-      // })
+      productBrandQuery({}).then(res => {
+        if (res.status == 200) {
+          this.productBrandList = res.data
+        } else {
+          this.productBrandList = []
+        }
+      })
     },
     //  产品分类  列表
     getProductType () {
-      // dealerProductTypeList({ 'sysFlag': '0' }).then(res => {
-      //   if (res.status == 200) {
-      //     this.productTypeList = res.data
-      //   } else {
-      //     this.productTypeList = []
-      //   }
-      // })
+      productTypeQuery({}).then(res => {
+        if (res.status == 200) {
+          this.productTypeList = res.data
+        } else {
+          this.productTypeList = []
+        }
+      })
     },
     filterOption (input, option) {
       return (

+ 28 - 17
src/views/promotionRulesManagement/promotionRules/choosePriceProductsModal.vue

@@ -25,14 +25,9 @@
           <div class="products-operation" v-if="goodsType=='normal'">
             <a-row :gutter="15">
               <a-col :span="9">
-                <v-select
-                  code="ORDER_GOODS_UNIT"
-                  id="choosePosPriceProducts-orderGoodsUnit"
-                  v-model="orderGoodsUnit"
-                  allowClear
-                  placeholder="请选择"
-                  style="width: 100%;"
-                ></v-select>
+                <a-select id="choosePosPriceProducts-orderGoodsUnit" v-model="orderGoodsUnit" placeholder="请选择" allowClear style="width: 100%;" >
+                  <a-select-option v-for="item in orderGoodsUnitData" :key="item.code" :value="item.code">{{ item.dispName }}</a-select-option>
+                </a-select>
               </a-col>
               <a-col :span="10">
                 <a-input-number
@@ -71,14 +66,9 @@
         </template>
         <!-- 起订量限制 -->
         <template slot="orderGoodsUnit" slot-scope="text, record">
-          <v-select
-            code="ORDER_GOODS_UNIT"
-            id="choosePosPriceProducts-orderGoodsUnit"
-            v-model="record.orderGoodsUnit"
-            allowClear
-            placeholder="请选择"
-            style="width: 40%;"
-          ></v-select>
+          <a-select id="choosePosPriceProducts-orderGoodsUnit" v-model="record.orderGoodsUnit" placeholder="请选择" allowClear style="width: 40%;" >
+            <a-select-option v-for="item in orderGoodsUnitData" :key="item.code" :value="item.code">{{ item.dispName }}</a-select-option>
+          </a-select>
           <a-input-number
             v-if="record.orderGoodsUnit=='PROD_UNIT'"
             id="choosePosPriceProducts-orderGoodsQty"
@@ -139,6 +129,7 @@ import ChooseBrandModal from '@/views/common/chooseBrandModal.vue'
 import ChooseTypeModal from '@/views/common/chooseTypeModal.vue'
 import ImportGuideModal from './importGuideModal.vue'
 import { VSelect } from '@/components'
+import { getLookUpData } from '@/api/data'
 export default {
   name: 'ChoosePriceProductsModal',
   components: { VSelect, ChooseProductsModal, ChooseBrandModal, ChooseTypeModal, ImportGuideModal },
@@ -199,7 +190,8 @@ export default {
       openGuideModal: false, //  导入产品引导
       chooseBrand: [], //  所选品牌
       chooseProducts: [], //  所选产品
-      chooseType: [] //  所选分类
+      chooseType: [], //  所选分类
+      orderGoodsUnitData: []
     }
   },
   computed: {
@@ -371,6 +363,21 @@ export default {
     // 删除
     handleDel (record, ind) {
       this.loadData.splice(ind, 1)
+    },
+    // 起订量限制  数据字典     (避免多次请求同一数据字典)
+    getOrderGoodsUnitList () {
+      const _this = this
+      getLookUpData({
+        pageNo: 1,
+        pageSize: 1000,
+        lookupCode: 'ORDER_GOODS_UNIT'
+      }).then(res => {
+        if (res.status == 200) {
+          _this.orderGoodsUnitData = res.data.list
+        } else {
+          _this.orderGoodsUnitData = []
+        }
+      })
     }
   },
   watch: {
@@ -387,6 +394,10 @@ export default {
         this.orderGoodsUnit = undefined //  起订量限制 批量
         this.orderGoodsQty = '' //  限制数量
         this.$emit('close')
+      } else {
+        if (this.orderGoodsUnitData.length == 0) {
+          this.getOrderGoodsUnitList()
+        }
       }
     },
     nowData: {

+ 1 - 0
src/views/purchasingManagement/bulkWarehousingOrder/productModal.vue

@@ -149,6 +149,7 @@ export default {
         product: {
           code: value
         },
+        supplierSn: this.nowData.supplierSn,
         pageNo: 1,
         pageSize: 20
       }

+ 16 - 14
src/views/salesManagement/outboundOrder/list.vue

@@ -44,16 +44,16 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
-			<a-col :md="6" :sm="24">
-			  <a-form-item label="业务单号">
-			    <a-input id="outboundOrderList-outBizNo" v-model.trim="queryParam.outBizNo" allowClear placeholder="请输入业务单号"/>
-			  </a-form-item>
-			</a-col>
-			<a-col :md="6" :sm="24">
-			  <a-form-item label="出库单号">
-			    <a-input id="outboundOrderList-stockOutNo" v-model.trim="queryParam.stockOutNo" allowClear placeholder="请输入出库单号"/>
-			  </a-form-item>
-			</a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务单号">
+                <a-input id="outboundOrderList-outBizNo" v-model.trim="queryParam.outBizNo" allowClear placeholder="请输入业务单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="出库单号">
+                <a-input id="outboundOrderList-stockOutNo" v-model.trim="queryParam.stockOutNo" 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="outboundOrderList-refresh" style="margin-bottom: 15px;">查询</a-button>
@@ -117,8 +117,8 @@ export default {
       queryParam: { //  查询条件
         demanderName: '', //  客户名称
         outBizType: undefined, //  出库类型
-		stockOutNo: '',
-		outBizNo: '',
+        stockOutNo: '',
+        outBizNo: '',
         state: undefined //  状态
       },
       disabled: false, //  查询、重置按钮是否可操作
@@ -207,10 +207,12 @@ export default {
     //  详情
     handleDetail (row) {
       //  根据出库类型跳转对应页面
-      if (row.outBizType == 'OUT_SALES') { //  销售出库
+      if (row.outBizType == 'SALES') { //  销售出库
         this.$router.push({ path: `/salesManagement/pushOrderManagement/detail/${row.outBizSubSn}` })
-      } else if (row.outBizType == 'OUT_ALLOT') { //  调拨出库
+      } else if (row.outBizType == 'ALLOCATE') { //  调拨出库
         this.$router.push({ path: `/allocationManagement/transferOut/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'CHECK_ORDER_OUT') { //  库存盘点盘亏
+
       }
     },
     // 出库/批量出库

+ 28 - 11
src/views/supplierManagement/associatedProduct/add.vue

@@ -8,7 +8,7 @@
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
-        <a-button key="2" type="primary" @click="newProduct=true" class="button-error" id="associatedProduct-addProduct-btn">增加产品</a-button>
+        <a-button key="2" type="primary" @click="choosePModal" class="button-error" id="associatedProduct-addProduct-btn">增加产品</a-button>
         <a-button key="1" type="primary" class="button-success" id="associatedProduct-import-btn">批量导入</a-button>
       </template>
     </a-page-header>
@@ -86,20 +86,20 @@
     </a-card>
     <!-- 设置成本价 -->
     <SettingCost ref="settingCost" :openModal="openModal" @ok="$refs.table.refresh()" @close="openModal=false"></SettingCost>
-    <!-- 添加产品 -->
-    <ChooseProduct ref="shooseProduct" :openModal="newProduct" @ok="addProduct" @close="newProduct=false"></ChooseProduct>
+    <!-- 选择产品 -->
+    <chooseProductsModal type="supplier" :openModal="newProduct" :chooseData="chooseProducts" @close="newProduct=false" @ok="handleProductsOk" />
   </div>
 </template>
 
 <script>
 import { STable, VSelect } from '@/components'
-import { supplierProductList, deleteProduct, addProduct } from '@/api/supplier'
+import { supplierProductList, deleteProduct, addProduct, supplierProductSnList } from '@/api/supplier'
 import ProductType from '@/views/common/productType.js'
 import ProductBrand from '@/views/common/productBrand.js'
 import SettingCost from './settingCost.vue'
-import ChooseProduct from './chooseProduct.vue'
+import ChooseProductsModal from '@/views/common/chooseProductsModal.vue'
 export default {
-  components: { STable, VSelect, ProductBrand, ProductType, SettingCost, ChooseProduct },
+  components: { STable, VSelect, ProductBrand, ProductType, SettingCost, ChooseProductsModal },
   data () {
     return {
       disabled: false,
@@ -144,7 +144,8 @@ export default {
           this.disabled = false
           return data
         })
-      }
+      },
+      chooseProducts: [] //  所选产品
     }
   },
   methods: {
@@ -192,12 +193,28 @@ export default {
       this.openModal = true
       this.$refs.settingCost.setData(row)
     },
-    // 添加产品
-    addProduct (snList) {
-      console.log(snList, 'addProduct')
+    // 增加产品
+    choosePModal () {
+      // 查询所有已选sn
+      supplierProductSnList({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.chooseProducts = res.data //  包含先前所选产品
+          this.newProduct = true
+        }
+      })
+    },
+    // 产品
+    handleProductsOk (obj) {
+      this.chooseProducts = obj
+      if (obj.length > 0) {
+        this.addProduct()
+      }
+    },
+    // 添加产品  数据处理
+    addProduct () {
       addProduct({
         supplierSn: this.$route.params.sn,
-        productSnList: snList
+        productSnList: this.chooseProducts
       }).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)

+ 0 - 179
src/views/supplierManagement/associatedProduct/chooseProduct.vue

@@ -1,179 +0,0 @@
-<template>
-  <a-modal
-    centered
-    :footer="null"
-    :maskClosable="false"
-    title="选择产品"
-    v-model="isShow"
-    @cancle="cansel"
-    width="80%">
-    <a-card size="small" :bordered="false" 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-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="产品编码/原厂编码">
-                <a-input id="productInfoList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="品牌">
-                <ProductBrand id="productInfoList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
-              </a-form-item>
-            </a-col>
-            <template v-if="advanced">
-              <a-col :md="6" :sm="24">
-                <a-form-item label="产品分类">
-                  <ProductType id="productInfoList-productType" v-model="productType" @change="changeProductType"></ProductType>
-                </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" id="productInfoList-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="small"
-        :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ y: tableHeight }"
-        bordered>
-      </s-table>
-      <div style="display: flex;justify-content: center;padding: 10px 0;">
-        <a-button size="large" type="primary" class="button-primary" @click="handleSubmit" style="padding: 0 60px;">
-          确定
-        </a-button>
-        <a-button size="large" style="padding: 0 60px;margin-left: 15px;font-size: 12px;" @click="cansel">
-          取消
-        </a-button>
-      </div>
-    </a-card>
-  </a-modal>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-import { productList } from '@/api/product'
-import ProductType from '@/views/common/productType.js'
-import ProductBrand from '@/views/common/productBrand.js'
-export default {
-  name: 'ChooseProduct',
-  components: { STable, VSelect, ProductType, ProductBrand },
-  props: {
-    openModal: { //  弹框显示状态
-      type: Boolean,
-      default: false
-    }
-  },
-  data () {
-    return {
-      isShow: this.openModal,
-      advanced: false, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      queryParam: { //  查询条件
-        name: '', //  产品名称
-        queryWord: '', // 产品编码/原厂编码
-        productBrandSn: undefined, //  产品品牌
-        productTypeSn1: '', //  产品一级分类
-        productTypeSn2: '', //  产品二级分类
-        productTypeSn3: '' //  产品三级分类
-      },
-      productType: [],
-      disabled: false, //  查询、重置按钮是否可操作
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'code', width: 220, align: 'center', customRender: function (text) { return text || '--' } }
-      ],
-      selectedRowKeys: [], // Check here to configure the default column
-      selectedRows: [],
-      loading: false,
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
-        return productList(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: {
-    onSelectChange (selectedRowKeys, selectedRows) {
-      this.selectedRowKeys = selectedRowKeys
-      this.selectedRows = selectedRows
-    },
-    // 选择产品
-    handleSubmit () {
-      const _this = this
-      if (_this.selectedRowKeys.length < 1) {
-        _this.$message.warning('请在选择产品!')
-        return
-      }
-      const obj = []
-      _this.selectedRows.map(item => {
-        obj.push(item.productSn)
-      })
-      _this.$emit('ok', obj)
-    },
-    //  重置
-    resetSearchForm () {
-      this.queryParam.name = ''
-      this.queryParam.queryWord = ''
-      this.queryParam.productBrandSn = undefined
-      this.queryParam.productTypeSn1 = ''
-      this.queryParam.productTypeSn2 = ''
-      this.queryParam.productTypeSn3 = ''
-      this.productType = []
-      this.$refs.table.refresh(true)
-    },
-    //  产品分类  change
-    changeProductType (val, opt) {
-      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
-      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
-      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
-    },
-    cansel () {
-      this.$emit('close')
-    }
-  },
-  watch: {
-    //  父页面传过来的弹框状态
-    openModal (newValue, oldValue) {
-      this.isShow = newValue
-    },
-    //  重定义的弹框状态
-    isShow (newValue, oldValue) {
-      if (!newValue) {
-        this.$emit('close')
-      }
-    }
-  }
-}
-</script>