Procházet zdrojové kódy

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

chenrui před 1 rokem
rodič
revize
d73f174bd2

+ 8 - 0
src/api/salesNew.js

@@ -72,6 +72,14 @@ export const salesPromoQueryList = (params) => {
         method: 'post'
     })
 }
+// 更换促销活动
+export const queryMatchPromoProduct = (params) => {
+  return axios({
+      url: `/promotion/queryMatchProduct`,
+      data: params,
+      method: 'post'
+  })
+}
 
 //  销售 审核
 export const salesWriteAudit = (params) => {

+ 16 - 5
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -3,8 +3,8 @@
     <a-spin :spinning="spinning" tip="Loading...">
         <ve-table
               border-y
-              :border-around="false"
-              :max-height="tableHeight+'px'"
+              :scroll-width="0"
+              :max-height="tableHeight"
               :row-style-option="{clickHighlight: true}"
               :cellSelectionOption="{enable: false}"
               :virtual-scroll-option="{enable: true}"
@@ -12,6 +12,7 @@
               :table-data="dataSource"
               row-key-field-name="id"
               :cell-style-option="cellStyleOption"
+              :column-width-resize-option="columnWidthResizeOption"
             />
         <div v-show="showEmpty" class="empty-data">暂无数据</div>
     </a-spin>
@@ -53,14 +54,24 @@
         authCode: {
           type: String,
           default: ''
-        }
+        },
+        maxHeight:{
+          type: [String,Number],
+          default: '250'
+        },
       },
       data () {
         return {
           spinning: false,
           dataSource: [],
-          tableHeight: 200,
+          tableHeight: this.maxHeight,
           cellStyleOption: {},
+          columnWidthResizeOption: {
+              // default false
+              enable: true,
+              // column resize min width
+              minWidth: 50
+          },
           isCityPrice: false,
           outStockStr: '',
           showEmpty: false
@@ -204,7 +215,7 @@
                     this.outStockStr = '产品编号为:' + str + '的产品库存不足;'
                 }
                 this.showEmpty = data.length <= 0
-                this.tableHeight = this.showEmpty ? 30 : 200
+                this.tableHeight = (this.showEmpty ? 30 : this.maxHeight) + 'px'
                 this.spinning = false
                 this.dataSource = data
               }

+ 1 - 0
src/views/salesManagement/salesQueryNew/comps/productList.vue

@@ -617,6 +617,7 @@
           if (res.status == 200) {
             this.resetSearchForm()
             this.$message.success('产品添加成功', 2.5)
+            this.$emit('insterOk')
           }
           this.spinning = false
           this.isInster = false

+ 6 - 2
src/views/salesManagement/salesQueryNew/detail.vue

@@ -114,6 +114,7 @@
         :warehouseSn="warehouseSn"
         :salesBillSn="$route.params.sn || bizSn" 
         :authCode="authCode"
+        :maxHeight="activeList.length?'250':pageHeight"
         :showCityPrice="isCityPrice"></detailProductList> 
 
         <!-- 活动列表 -->
@@ -124,7 +125,7 @@
         <div class="active-title">
           <div>
             <strong style="margin-right:10px;font-size:14px;">{{item.promotion.title}}</strong> ({{item.promotionRule.description}})
-            <span style="margin-left:20px;color:#00aaff;cursor: pointer;"  @click="(event) => {showDesc(event, item)}">
+            <span style="margin-left:10px;color:#00aaff;cursor: pointer;"  @click="(event) => {showDesc(event, item)}">
               <a-icon title="查看活动详情" type="eye"/> 活动详情
             </span>
           </div>
@@ -271,6 +272,9 @@ export default {
         return shippingAddrProvinceName + shippingAddrCityName + shippingAddrCountyName + shippingAddr
       }
     },
+    pageHeight(){
+      return window.innerHeight - 320
+    }
   },
   methods: {
     //  返回
@@ -480,7 +484,7 @@ export default {
       align-items: center;
       justify-content: space-between;
       padding: 10px;
-      background: #e3f9ff;
+      background: #dafafa;
     }
     .flexBox{
       display: flex;

+ 7 - 0
src/views/salesManagement/salesQueryNew/edit.vue

@@ -62,6 +62,7 @@
           :ref="'productList-'+item.promoRuleSn" 
           :id="item.promoRuleSn" 
           @openCpModal="openProductModal" 
+          @insterOk="insterActiveOk"
           :promo="item"
           :detailData="detailData" 
           :warehouseSn="warehouseSn" 
@@ -215,6 +216,7 @@ export default {
         this.cpCurRefId = ''
         this.showCpModal = false
     },
+    // 打开选择产品弹框
     openProductModal(type, refId){
         console.log(type, refId)
         const promo = this.activeList.find(item => item.promoRuleSn == refId)
@@ -222,6 +224,11 @@ export default {
         this.cpCurRefId = 'productList-' + refId
         this.showCpModal = true
     },
+    // 添加活动产品成功的回调
+    insterActiveOk(){
+      // 刷新正常产品列表
+      this.$refs.productNormalList.resetSearchForm()
+    },
     // 新增产品
     insterProduct(row, promotionFlag, type){
       // 正常产品

+ 1 - 1
vue.config.js

@@ -108,7 +108,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.2.113:8660/ocs-admin',
+        target: 'http://192.168.2.117/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
         // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,