Преглед изворни кода

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

chenrui пре 9 месеци
родитељ
комит
179b08cae0

+ 13 - 6
src/views/salesManagement/salesQuery/list.vue

@@ -128,10 +128,13 @@
         </div>
         <div>
           <a-dropdown v-model="showCell">
-            <a-button type="link" class="button-default"> <a-icon type="setting" />  显示</a-button>
+            <a-button type="link" class="button-default" id="salesQuery-discount-showCell"> <a-icon type="setting" />  显示</a-button>
             <a-menu slot="overlay">
               <a-menu-item>
-                <a-checkbox v-model="showDiscount" id="salesQuery-edit-discount">折后总售价</a-checkbox>
+                <a-checkbox v-model="showDiscount" id="salesQuery-discount">折后总售价</a-checkbox>
+              </a-menu-item>
+              <a-menu-item>
+                <a-checkbox v-model="showKhgx" id="salesQuery-khgx">客户关系</a-checkbox>
               </a-menu-item>
             </a-menu>
           </a-dropdown>
@@ -276,6 +279,7 @@ export default {
       openModal: false, // 选择客户弹框是否显示
       isByCustQuery: false, // 是否按客户查询
       showDiscount: false,
+      showKhgx: false,
       showCell: false,
       time: [
         getDate.getMonthDays(3).starttime,
@@ -346,7 +350,7 @@ export default {
         { title: '来源', dataIndex: 'sourceTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '9%', align: 'center' },
         { title: '客户名称', dataIndex: 'buyerNameCurrent', align: 'center', width: '15%', customRender: function (text) { return text || '--' } },
-        { title: '客户关系', dataIndex: 'buyerRelationTypeDictValue', align: 'center', width: '9%', customRender: function (text) { return text || '--' } },
+        // { title: '客户关系', dataIndex: 'buyerRelationTypeDictValue', align: 'center', width: '9%', customRender: function (text) { return text || '--' } },
         { title: '总款数', dataIndex: 'totalCategory', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'totalAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
@@ -363,11 +367,14 @@ export default {
         // { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
-
+      if (this.showKhgx) {
+        arr.splice(4, 0, { title: '客户关系', dataIndex: 'buyerRelationTypeDictValue', align: 'center', width: '5%', customRender: function (text) { return text || '--' } })
+      }
       // 显示折扣
       if (this.showDiscount) {
-        arr.splice(7, 0, { title: '折扣金额', dataIndex: 'discountAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(8, 0, { title: '折后总售价', dataIndex: 'discountedAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        const dx = this.showKhgx ? 1 : 0
+        arr.splice(7 + dx, 0, { title: '折扣金额', dataIndex: 'discountAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(8 + dx, 0, { title: '折后总售价', dataIndex: 'discountedAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }

+ 12 - 5
src/views/salesManagement/salesQueryNew/list.vue

@@ -142,11 +142,14 @@
             <a-button type="primary" class="button-error" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(0)"><a-icon type="plus" /> 新增(零售)</a-button>
             <a-button type="primary" class="button-error" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(1)"><a-icon type="plus" /> 新增(铺货)</a-button>
             <a-dropdown v-model="showCell">
-              <a-button type="link" class="button-default"> <a-icon type="setting" />  显示</a-button>
+              <a-button type="link" class="button-default" id="salesQuery-discount-showCell"> <a-icon type="setting" />  显示</a-button>
               <a-menu slot="overlay">
                 <a-menu-item>
                   <a-checkbox v-model="showDiscount" id="salesQuery-edit-discount">折后总售价</a-checkbox>
                 </a-menu-item>
+                <a-menu-item>
+                  <a-checkbox v-model="showKhgx" id="salesQuery-khgx">客户关系</a-checkbox>
+                </a-menu-item>
               </a-menu>
             </a-dropdown>
           </div>
@@ -279,6 +282,7 @@ export default {
       openModal: false, // 选择客户弹框是否显示
       isByCustQuery: false, // 是否按客户查询
       showDiscount: false,
+      showKhgx: false,
       showCell: false,
       time: [
         getDate.getMonthDays(3).starttime,
@@ -349,7 +353,7 @@ export default {
         { title: '来源', dataIndex: 'sourceTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: this.showDiscount ? '6%' : '9%', align: 'center' },
         { title: '客户名称', dataIndex: 'buyerNameCurrent', align: 'center', width: this.showDiscount ? '12%' : '15%', customRender: function (text) { return text || '--' } },
-        { title: '客户关系', dataIndex: 'buyerRelationTypeDictValue', align: 'center', width: '9%', customRender: function (text) { return text || '--' } },
+        // { title: '客户关系', dataIndex: 'buyerRelationTypeDictValue', align: 'center', width: '9%', customRender: function (text) { return text || '--' } },
         { title: '总款数', dataIndex: 'totalCategory', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'totalAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
@@ -366,11 +370,14 @@ export default {
         // { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
-
+      if (this.showKhgx) {
+        arr.splice(4, 0, { title: '客户关系', dataIndex: 'buyerRelationTypeDictValue', align: 'center', width: '6%', customRender: function (text) { return text || '--' } })
+      }
       // 显示折扣
       if (this.showDiscount) {
-        arr.splice(7, 0, { title: '折扣金额', dataIndex: 'discountAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(8, 0, { title: '折后总售价', dataIndex: 'discountedAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        const dx = this.showKhgx ? 1 : 0
+        arr.splice(7 + dx, 0, { title: '折扣金额', dataIndex: 'discountAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(8 + dx, 0, { title: '折后总售价', dataIndex: 'discountedAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }