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

+ 1 - 1
public/version.json

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

+ 22 - 3
src/views/salesManagement/productPricing/list.vue

@@ -44,7 +44,7 @@
     </div>
     <!-- 价格 -->
     <div style="border-top: 1px solid #eee;padding: 10px 0;text-align: right;">
-      <a-checkbox v-model="isCostPrice" v-if="$hasPermissions('M_ShowAllCost')"><span style="display: inline-block;">成本价</span></a-checkbox>
+      <a-checkbox v-model="isCostPrice"><span style="display: inline-block;">成本价</span></a-checkbox>
       <!-- 特约加盟商不可见市级价 -->
       <a-checkbox v-model="isCityPrice" v-if="dealerData && dealerData.dealerLevel != 'SPECIAL'"><span style="display: inline-block;">市级价</span></a-checkbox>
       <!-- 是否展示特约价 -->
@@ -63,7 +63,18 @@
       :scroll="{ y: tableHeight }"
       :defaultLoadData="false"
       bordered>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button
+          size="small"
+          type="link"
+          class="button-primary"
+          @click="handleDetail(record)"
+        >销售记录</a-button>
+      </template>
     </s-table>
+    <!-- 销售记录 -->
+    <product-salesRecord-modal ref="salseRecord" :openModal="openModal" @close="openModal = false" />
   </a-card>
 </template>
 
@@ -74,13 +85,15 @@ import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import { getCurrentDealer } from '@/api/product'
 import { dealerProductPriceList } from '@/api/dealerProduct'
+import productSalesRecordModal from './productSalesRecordModal.vue'
 export default {
   name: 'DealerProductPriceList',
-  components: { STable, VSelect, ProductType, ProductBrand },
+  components: { STable, VSelect, ProductType, ProductBrand, productSalesRecordModal },
   mixins: [commonMixin],
   data () {
     return {
       tableHeight: 0,
+      openModal: false,
       advanced: true, // 高级搜索 展开/关闭
       queryParam: { //  查询条件
         name: '',
@@ -131,7 +144,8 @@ export default {
         // { title: '市级价', dataIndex: 'cityPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '特约价', dataIndex: 'specialPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '终端会员价', dataIndex: 'terminalPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '车主价', dataIndex: 'carOwnersPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '车主价', dataIndex: 'carOwnersPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
       ]
       if (this.isCostPrice) {
         arr.splice(6, 0, { title: '成本价', dataIndex: 'offerCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
@@ -176,6 +190,11 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
+    // 销售记录
+    handleDetail (row) {
+      this.openModal = true
+      this.$refs.salseRecord.getDetail(row)
+    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调