Quellcode durchsuchen

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

chenrui vor 1 Jahr
Ursprung
Commit
16cc0a823b

+ 27 - 9
src/views/salesManagement/salesQueryNew/comps/productList.vue

@@ -1,9 +1,9 @@
 <template>
   <div>
-    <div class="table-page-search-wrapper" v-show="showDescBox&&descDetail">
-      <a-descriptions :column="4">
+    <div class="table-page-search-wrapper" v-show="showDescBox">
+      <a-descriptions :column="4" v-if="descDetail">
           <a-descriptions-item label="促销类型">
-            {{ descDetail.promotionRuleTypeDictValue }}
+            {{ descDetail.promotionRuleTypeDictValue||'--' }}
           </a-descriptions-item>
           <a-descriptions-item label="促销门槛" span="3">
             <div v-if="descDetail.gateFlag === '1'">
@@ -270,6 +270,10 @@
         type: Object,
         default: function(){return null}
       },
+      promo: {
+        type: Object,
+        default: function(){return null}
+      },
       id: {
         type: String,
         default: ''
@@ -290,7 +294,12 @@
         loadData: parameter => {
           this.disabled = true
           this.queryParam.salesBillSn = this.salesBillSn || ''
-          return salesDetailList(Object.assign(parameter, this.queryParam, {showStock: true})).then(res => {
+          return salesDetailList(Object.assign(parameter, this.queryParam, {
+            showStock: true, 
+            promoRuleSn: this.promo.promoRuleSn,
+            promoSn: this.promo.promoSn,
+            salesPromoSn: this.promo.salesPromoSn
+          })).then(res => {
             let data
             if (res.status == 200) {
               data = res.data
@@ -411,7 +420,7 @@
           centered: true,
           onOk () {
             _this.spinning = true
-            deleteAll({ salesBillSn: _this.salesBillSn }).then(res => {
+            deleteAll({ salesBillSn: _this.salesBillSn, salesPromoSn: _this.promo.salesPromoSn }).then(res => {
               if (res.status == 200) {
                 _this.resetSearchForm(true)
                 _this.$message.success(res.message)
@@ -440,6 +449,7 @@
             _this.spinning = true
             salesDetailBatchDel({
               salesBillSn: _this.salesBillSn,
+              salesPromoSn: _this.promo.salesPromoSn,
               salesBillDetailSnList: obj
             }).then(res => {
               if (res.status == 200) {
@@ -457,7 +467,8 @@
         const ajax_data = {
           warehouseSn: row.warehouseSn,
           salesBillDetailSnList: snArr,
-          salesBillSn: this.salesBillSn
+          salesBillSn: this.salesBillSn,
+          salesPromoSn: this.promo.salesPromoSn
         }
         this.setWarehouseInfo(ajax_data)
       },
@@ -470,7 +481,8 @@
         const ajax_data = {
           warehouseSn: sn,
           salesBillDetailSnList: snArr,
-          salesBillSn: _this.salesBillSn
+          salesBillSn: _this.salesBillSn,
+          salesPromoSn: _this.promo.salesPromoSn
         }
         _this.setWarehouseInfo(ajax_data)
       },
@@ -517,7 +529,8 @@
           salesDetailUpdateQty({
             salesBillDetailSn: record.salesBillDetailSn,
             qty: record.qty,
-            salesBillSn: _this.salesBillSn
+            salesBillSn: _this.salesBillSn,
+            salesPromoSn: _this.promo.salesPromoSn
           }).then(res => {
             _this.resetSearchForm(true)
             if (res.status == 200) {
@@ -541,7 +554,7 @@
           onOk () {
             _this.delLoading = true
             _this.spinning = true
-            salesDetailDel({ salesBillDetailSn: row.salesBillDetailSn, salesBillSn: _this.salesBillSn }).then(res => {
+            salesDetailDel({ salesBillDetailSn: row.salesBillDetailSn, salesBillSn: _this.salesBillSn, salesPromoSn: _this.promo.salesPromoSn }).then(res => {
               if (res.status == 200) {
                 _this.resetSearchForm(true)
                 _this.$message.success(res.message)
@@ -566,6 +579,11 @@
         this.isInster = true
         this.spinning = true
         salesDetailInsert({
+          salesPromoDetailDTO:{
+            salesPromoSn: this.promo.salesPromoSn,
+            promoRuleSn: this.promo.promoRuleSn,
+            promoSn: this.promo.promoSn
+          },
           packQty: row.productPackQty,
           productSn: row.productSn,
           showCost: row.lastStockCost,

+ 9 - 2
src/views/salesManagement/salesQueryNew/edit.vue

@@ -43,7 +43,7 @@
       :key="item.promoRuleSn" 
       >
         <div slot="title" style="display: inline-block;width:100%;">
-          <strong style="margin-right:10px;font-size:14px;">{{item.promotion.title}}</strong> ({{item.promotion.description}})
+          <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)}">
             <a-icon title="查看活动详情" type="eye"/> 活动详情
           </span>
@@ -53,7 +53,14 @@
         </div>
         <div slot="extra" @click="tooglePanel(item)" style="cursor: pointer;">{{ item.isActive ? '收起' : '展开' }} <a-icon type="caret-right" :rotate="item.isActive ? 90 : 0"/> </div>
         <div v-show="item.isActive" style="padding: 10px;">
-          <productList :ref="'productList-'+item.promoRuleSn" :id="item.promoRuleSn" @openCpModal="openProductModal" :detailData="detailData" :warehouseSn="warehouseSn" :salesBillSn="salesBillSn"></productList>
+          <productList 
+          :ref="'productList-'+item.promoRuleSn" 
+          :id="item.promoRuleSn" 
+          @openCpModal="openProductModal" 
+          :promo="item"
+          :detailData="detailData" 
+          :warehouseSn="warehouseSn" 
+          :salesBillSn="salesBillSn"></productList>
         </div>
       </a-card>
     </a-spin>

+ 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.111/ocs-admin',
+        target: 'http://192.168.2.113:8660/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
         // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,