Переглянути джерело

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

lilei 3 роки тому
батько
коміт
c58deaabf2

+ 40 - 33
src/views/productManagement/newProduct/list.vue

@@ -6,47 +6,47 @@
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="上线日期" prop="time">
-                <rangeDate ref="rangeDate" v-model.trim="time" @change="dateChange" />
-              </a-form-model-item>
+              <a-form-item label="产品编码">
+                <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品品牌">
-                <a-select
-                  placeholder="请选择产品品牌"
-                  id="productInfoList-productBrandSn"
-                  allowClear
-                  v-model="queryParam.productBrandSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                </a-select>
+              <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-cascader
-                  @change="changeProductType"
-                  change-on-select
-                  v-model="productType"
-                  expand-trigger="hover"
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="productInfoList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear />
-              </a-form-item>
+              <a-form-model-item :label="($route.params.onlineFalg=='1'?'上':'下')+'线时间'">
+                <rangeDate ref="rangeDate" @change="dateChange" />
+              </a-form-model-item>
             </a-col>
             <template v-if="advanced">
               <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 label="产品品牌">
+                  <a-select
+                    placeholder="请选择产品品牌"
+                    id="productInfoList-productBrandSn"
+                    allowClear
+                    v-model="queryParam.productBrandSn"
+                    :showSearch="true"
+                    option-filter-prop="children"
+                    :filter-option="filterOption">
+                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                  </a-select>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="产品编码">
-                  <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+                <a-form-item label="产品分类">
+                  <a-cascader
+                    @change="changeProductType"
+                    change-on-select
+                    v-model="productType"
+                    expand-trigger="hover"
+                    :options="productTypeList"
+                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                    id="productInfoList-productType"
+                    placeholder="请选择产品分类"
+                    allowClear />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -78,6 +78,14 @@
         :defaultLoadData="false"
         :scroll="{ x: 1090, y: tableHeight }"
         bordered>
+        <!-- 上/下线时间 表头 -->
+        <template slot="auditTimeTit">
+          {{ $route.params.onlineFalg=='1'?'上':'下' }}线时间
+        </template>
+        <!-- 上/下线时间 内容 -->
+        <template slot="auditTime" slot-scope="text, record">
+          {{ $route.params.onlineFalg=='1'?record.onlineAuditTime:record.offlineAuditTime }}
+        </template>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
           <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
@@ -111,7 +119,6 @@ export default {
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
       productType: [],
-      time: [],
       queryParam: { //  查询条件
         beginDate: '',
         endDate: '',
@@ -129,7 +136,7 @@ export default {
       exportLoading: false, // 导出loading
       columns: [
         { title: '序号', dataIndex: 'no', width: 50, align: 'center' },
-        { title: '上线日期', dataIndex: 'onlineAuditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { slots: { title: 'auditTimeTit' }, scopedSlots: { customRender: 'auditTime' }, width: 140, align: 'center' },
         { title: '产品品牌', dataIndex: 'productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
         { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
@@ -162,12 +169,12 @@ export default {
   methods: {
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
     //  重置
     resetSearchForm () {
+      this.$refs.rangeDate.resetDate()
       this.queryParam.code = ''
       this.queryParam.name = ''
       this.queryParam.origCode = ''

+ 37 - 2
src/views/reportData/customerReport/list.vue

@@ -14,6 +14,20 @@
           :wrapperCol="wrapperCol"
           @keyup.enter.native="handleSearch" >
           <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="连锁店" prop="dealerSn">
+                <a-select
+                  placeholder="请选择连锁店"
+                  id="customerReportList-dealerSn"
+                  allowClear
+                  v-model="queryParam.dealerSn"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in linkageGroupData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="添加时间" prop="time">
                 <rangeDate ref="rangeDate" @change="dateChange" />
@@ -100,7 +114,7 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { getArea } from '@/api/data'
 import { dealerProductTypeList } from '@/api/dealerProductType'
-import { reportBigCustomerList, reportBigCustomerCount } from '@/api/reportData'
+import { reportBigCustomerList, reportBigCustomerCount, linkageGroupList } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate },
   data () {
@@ -111,6 +125,7 @@ export default {
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
+        dealerSn: undefined,
         time: [],
         beginDate: '',
         endDate: '',
@@ -123,6 +138,7 @@ export default {
       },
       productType: [],
       rules: {
+        'dealerSn': [{ required: true, message: '请选择连锁店', trigger: 'change' }],
         'time': [{ required: true, message: '请选择添加时间', trigger: 'change' }]
       },
       disabled: false, //  查询、重置按钮是否可操作
@@ -173,7 +189,8 @@ export default {
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
       addrDistrictList: [], //  区下拉
-      productTypeList: [] //  分类下拉数据
+      productTypeList: [], //  分类下拉数据
+      linkageGroupData: []
     }
   },
   methods: {
@@ -206,6 +223,7 @@ export default {
     },
     //  重置
     resetSearchForm () {
+      this.queryParam.dealerSn = undefined
       this.$refs.rangeDate.resetDate()
       this.queryParam.time = []
       this.queryParam.beginDate = ''
@@ -287,10 +305,27 @@ export default {
           }
         }
       })
+    },
+    // 连锁店
+    getLinkageGroup () {
+      linkageGroupList({}).then(res => {
+        const all = [{ dealerName: '全部', dealerSn: 'all' }]
+        if (res.status == 200) {
+          const data = res.data || []
+          if (data.length > 0) {
+            this.linkageGroupData = [...all, ...data]
+          } else {
+            this.linkageGroupData = []
+          }
+        } else {
+          this.linkageGroupData = []
+        }
+      })
     }
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
+      vm.getLinkageGroup()
       vm.getArea('province')
       vm.getProductType()
     })

+ 19 - 7
src/views/salesManagement/salesQuery/edit.vue

@@ -26,7 +26,13 @@
       </a-page-header>
       <a-card size="small" :bordered="false" class="salesEdit-cont">
         <!-- 查询配件列表 -->
-        <queryPart ref="partQuery" :buyerSn="(detailData&&detailData.buyerSn&&detailData.salesBillSource&&detailData.salesBillSource=='PURCHASE')?'':detailData.buyerSn" :priceType="$route.params.priceType" :newLoading="isInster" @add="insterProduct"></queryPart>
+        <queryPart
+          ref="partQuery"
+          :buyerSn="(detailData&&detailData.buyerSn&&detailData.salesBillSource&&detailData.salesBillSource=='PURCHASE')?'':detailData.buyerSn"
+          :priceType="$route.params.priceType"
+          :newLoading="isInster"
+          @add="insterProduct"
+          @isCost="isCost"></queryPart>
       </a-card>
       <a-card size="small" :bordered="false" class="salesEdit-cont">
         <!-- 总计 -->
@@ -37,6 +43,10 @@
               总款数:<strong>{{ detailData&&(detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--' }}</strong>;
               总数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
               赠品总数量:<strong>{{ detailData&&(detailData.giftQty || detailData.giftQty==0) ? detailData.giftQty : '--' }}</strong>;
+              <span v-if="isCosts">
+                总成本价:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? detailData.totalCost : '--' }}</strong>;
+                毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? detailData.grossProfit : '--' }}</strong>;
+              </span>
             </div>
             <div>
               <div>
@@ -199,9 +209,9 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品编码', dataIndex: 'dealerProductEntity.code', scopedSlots: { customRender: 'productCode' }, width: 150, align: 'center', sorter: true },
-        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', scopedSlots: { customRender: 'productCode' }, align: 'center', sorter: true },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'dealerProductEntity.productBrandName', width: 100, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
         { title: '仓库', dataIndex: 'warehouseEntity.name', width: 100, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
         { title: '仓位', dataIndex: 'warehouseLocationEntity.name', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
@@ -229,7 +239,8 @@ export default {
           return data
         })
       },
-      printerType: 'NEEDLE' //  打印机类型
+      printerType: 'NEEDLE', //  打印机类型
+      isCosts: false
     }
   },
   methods: {
@@ -303,6 +314,9 @@ export default {
         record.price = record.priceBackups
       }
     },
+    isCost (val) {
+      this.isCosts = val
+    },
     // 打印预览/快捷打印
     handlePrint (type) {
       const _this = this
@@ -519,10 +533,8 @@ export default {
     //  销售单详情
     getOrderDetail () {
       salesDetail({ id: this.$route.params.id }).then(res => {
-        console.log('getOrderDetail')
         if (res.status == 200) {
           this.detailData = res.data
-          console.log(this.detailData)
         }
       })
     },

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

@@ -219,8 +219,8 @@ export default {
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '来源', dataIndex: 'salesBillSourceDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: 120, align: 'center' },
-        { title: '采购单号', dataIndex: 'purchaseBillNo', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, align: 'center' },
+        { title: '采购单号', dataIndex: 'purchaseBillNo', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '总款数', dataIndex: 'totalCategory', width: 60, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', width: 60, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 42 - 93
src/views/salesManagement/salesQuery/queryPart.vue

@@ -9,8 +9,8 @@
         :rules="rules"
         :model="queryParam"
         @keyup.enter.native="$refs.table.refresh(true)" >
-        <a-row :gutter="15">
-          <a-col :md="7" :sm="24">
+        <a-row :gutter="5">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="车架号(VIN)" prop="vinCode">
               <a-input id="productInfoList-vinCode" v-model.trim="queryParam.vinCode" allowClear placeholder="请输入车架号(VIN)">
                 <a-icon @click="uploadFun" :type="vinLoading?'loading':'camera'" slot="addonAfter" :style="{ fontSize: '18px', verticalAlign: 'bottom' }" />
@@ -18,7 +18,7 @@
               <input type="file" id="filed" hidden="" @change="filePreview">
             </a-form-model-item>
           </a-col>
-          <a-col :md="6" :sm="24">
+          <a-col :md="5" :sm="24">
             <a-form-model-item label="产品编码">
               <a-input id="productInfoList-code" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
             </a-form-model-item>
@@ -29,12 +29,12 @@
             </a-form-model-item>
           </a-col>
           <template v-if="advanced">
-            <a-col :md="6" :sm="24">
+            <a-col :md="8" :sm="24">
               <a-form-model-item label="原厂编码">
                 <a-input id="productInfoList-origCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
               </a-form-model-item>
             </a-col>
-            <a-col :md="7" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="产品分类">
                 <a-cascader
                   @change="changeProductType"
@@ -48,7 +48,7 @@
                   allowClear />
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="5" :sm="24">
               <a-form-model-item label="产品品牌">
                 <a-select
                   placeholder="请选择产品品牌"
@@ -77,21 +77,15 @@
               </a-form-model-item>
             </a-col>
           </template>
-          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+          <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" id="productInfoList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin:0 15px 0 8px">
+            <a @click="advanced=!advanced" style="margin:0 5px">
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
             </a>
-            <a-popover>
-              <template slot="content">双击列表配件可快速选中添加</template>
-              <a-icon type="question-circle" theme="twoTone" />
-            </a-popover>
-            <a-popover>
-              <template slot="content">点击设置列的显示</template>
-              <a-icon style="margin:0 5px;cursor: pointer;" @click="showSetting = true" type="setting" theme="twoTone" />
-            </a-popover>
+            <a-checkbox v-model="cost" id="salesQuery-cost">成本价</a-checkbox>
+            <a-checkbox v-model="cityPrice" id="salesQuery-cityPrice">市级价</a-checkbox>
           </a-col>
         </a-row>
       </a-form-model>
@@ -101,12 +95,12 @@
       class="sTable"
       ref="table"
       size="small"
-      :rowKey="(record) => record.productSn"
+      :rowKey="(record) => record.productSn+record.currentQty"
       :columns="columns"
       :data="loadData"
       :customRow="handleClickRow"
       :defaultLoadData="false"
-      :scroll="{ x: tableWidth, y: 300 }"
+      :scroll="{ x: 1290, y: 300 }"
       bordered>
       <!-- 售价 -->
       <template slot="salePrice" slot-scope="text, record">
@@ -151,23 +145,6 @@
     </s-table>
     <!-- 销售记录 -->
     <product-salesRecord-modal ref="salseRecord" :openModal="openModal" @close="closeModal" />
-    <!-- 设置列 -->
-    <a-modal
-      v-model="showSetting"
-      title="设置要显示的列"
-      centered
-      :footer="null"
-      @ok="() => (showSetting = false)">
-      <a-checkbox-group v-model="settingColVal" @change="onSettingChange">
-        <a-row>
-          <a-col :span="8" v-for="item in settingColList" :key="item.value">
-            <a-checkbox :value="item.value">
-              {{ item.label }}
-            </a-checkbox>
-          </a-col>
-        </a-row>
-      </a-checkbox-group>
-    </a-modal>
   </div>
 </template>
 
@@ -196,20 +173,7 @@ export default {
   data () {
     return {
       advanced: false, // 高级搜索 展开/关闭
-      showSetting: false, // 设置弹框
       vinLoading: false,
-      tableWidth: 0,
-      settingColVal: ['productOrigCode', 'brandName', 'warehouseName', 'warehouseLocationName', 'currentQty', 'unit'],
-      settingColList: [
-        { label: '原厂编码', value: 'productOrigCode' },
-        { label: '品牌', value: 'brandName' },
-        { label: '仓库', value: 'warehouseName' },
-        { label: '仓位', value: 'warehouseLocationName' },
-        { label: '库存数量', value: 'currentQty' },
-        { label: '单位', value: 'unit' },
-        { label: '成本价', value: 'putCost' },
-        { label: '市级价', value: 'dealerProduct.cityPrice' }
-      ],
       productType: [],
       queryParam: { //  查询条件
         customerSn: '',
@@ -232,22 +196,6 @@ export default {
       productBrandList: [], //  下拉数据
       productTypeList: [], //  产品分类  下拉数据
       warehouseList: [], // 仓库列表
-      columnsBak: [
-        { title: '产品编码', dataIndex: 'productCode', width: 150, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'brandName', width: 100, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
-        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
-        { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '库存数量', dataIndex: 'currentQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价', dataIndex: 'putCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '市级价', dataIndex: 'dealerProduct.cityPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '售价', dataIndex: 'salePrice', scopedSlots: { customRender: 'salePrice' }, width: 100, align: 'center' },
-        { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: 100, align: 'center' },
-        { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
-      ],
-      columns: [],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -288,12 +236,34 @@ export default {
           return data
         })
       },
-      openModal: false //  查看客户详情  弹框
+      openModal: false, //  查看客户详情  弹框
+      cost: false,
+      cityPrice: false
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '产品编码', dataIndex: 'productCode', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'brandName', width: 100, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+        { title: '库存数量', dataIndex: 'currentQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价', dataIndex: 'salePrice', scopedSlots: { customRender: 'salePrice' }, width: 100, align: 'center' },
+        { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: 100, align: 'center' },
+        { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
+      ]
+      if (this.cost) {
+        arr.splice(6, 0, { title: '成本价', dataIndex: 'putCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      if (this.cityPrice) {
+        arr.splice(this.cost ? 7 : 6, 0, { title: '市级价', dataIndex: 'dealerProduct.cityPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
     }
   },
   created () {
-    this.columns = this.columnsBak
-    this.onSettingChange()
     // 产品品牌
     if (this.productBrandList.length == 0) {
       this.getProductBrand()
@@ -322,32 +292,6 @@ export default {
         this.queryParam.productCodeList = undefined
       }
     },
-    // 设置列
-    onSettingChange (v) {
-      const k = ['productOrigCode', 'brandName', 'warehouseName', 'warehouseLocationName', 'currentQty', 'unit', 'putCost', 'dealerProduct.cityPrice']
-      const a = ['productCode', 'productName']
-      const b = ['salePrice', 'salesNums', 'action']
-      const c = this.settingColVal
-      const q = k.filter(item => c.indexOf(item) >= 0)
-      const o = a.concat(q).concat(b) //  列
-      const r = q.concat(b) //  计算表格宽度
-      const d = []
-      let w = 0
-      for (let i = 0; i < o.length; i++) {
-        const row = this.columnsBak.find(item => item.dataIndex == o[i])
-        if (row) {
-          d.push(row)
-        }
-      }
-      for (let i = 0; i < r.length; i++) {
-        const row = this.columnsBak.find(item => item.dataIndex == r[i])
-        if (row) {
-          w = w + row.width
-        }
-      }
-      this.tableWidth = w + 350
-      this.columns = d
-    },
     // 双击列表
     handleClickRow (record) {
       const _this = this
@@ -468,6 +412,11 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     }
+  },
+  watch: {
+    cost (newValue, oldValue) {
+      this.$emit('isCost', newValue)
+    }
   }
 }
 </script>