lilei hace 7 meses
padre
commit
c934be9d00

+ 1 - 1
src/api/salesNew.js

@@ -207,7 +207,7 @@ export const salesPromoValidaSubmit = (params) => {
 // 审核时活动规则校验
 export const salesPromoValidaAudit = (params) => {
   return axios({
-    url: `/salesPromo/validationAudit/${params.salesBillSn}`,
+    url: `/salesPromo/validationSubmit/${params.salesBillSn}`,
     data: params,
     method: 'post',
     headers: {

+ 3 - 0
src/main.js

@@ -19,7 +19,10 @@ Vue.component("ItemWrap",ItemWrap)
 Vue.component("Reacquire",Reacquire)
 
 // 引入组件库
+import "vue-easytable/libs/theme-default/index.css";
+import zhCN from "vue-easytable/libs/locale/lang/zh-CN.js";
 import VueEasytable from "vue-easytable";
+VueEasytable.VeLocale.use(zhCN);
 Vue.use(VueEasytable);
 
 // datav组件

+ 42 - 6
src/views/salesManagement/salesQueryNew/comps/activeStatisticsList.vue

@@ -69,7 +69,7 @@ export default {
       handler (val) {
         if (!this.hasInit) {
           this.tableData = []
-          this.getDataList()
+          this.getDataList(val)
         }
       },
       immediate: true
@@ -100,7 +100,7 @@ export default {
           const endSelProduct = selectedRowKeys[selectedRowKeys.length - 1]
           // 叠加多选
           if (endSelProduct && row.promotion && row.promotion.stackFlag == '1') {
-            const rows = this.activeList.filter(item => selectedRowKeys.includes(item.salesPromoSn) && item.promotion && item.promotion.stackFlag == '1')
+            const rows = this.tableData.filter(item => selectedRowKeys.includes(item.salesPromoSn) && item.promotion && item.promotion.stackFlag == '1')
             this.checkboxOption.selectedRowKeys = rows.map(item => item.salesPromoSn)
           } else {
             // 非叠加单选
@@ -132,6 +132,15 @@ export default {
         bodyCellClass: ({ row, column, rowIndex }) => {
         }
       },
+      // 筛选
+      ruleTypeList: [
+        { value: 'BUY_PROD_GIVE_PROD', label: '卖产品送产品', selected: true },
+        { value: 'BUY_PROD_GIVE_MONEY', label: '卖产品送采购额', selected: true },
+        { value: 'PROMO_PROD', label: '特价活动', selected: true }
+      ],
+      searchData: {
+        ruleType: []
+      },
       // 表格列表
       tableData: [],
       openDetailModal: false, // 规则详情弹框
@@ -174,7 +183,7 @@ export default {
           fixed: 'left',
           renderBodyCell: ({ row, column, rowIndex }, h) => {
             const isTejia = row && row.promotionRule && row.promotionRule.promotionRuleType == 'PROMO_PROD' && _this.type == 'edit' // 是否特价
-            const tejiaLen = _this.activeList.filter(item => item.promotionRule && item.promotionRule.promotionRuleType == 'PROMO_PROD').length // 特价活动数量
+            const tejiaLen = _this.tableData.filter(item => item.promotionRule && item.promotionRule.promotionRuleType == 'PROMO_PROD').length // 特价活动数量
             // 特价活动上移下移排序
             const equalWord = <div class="table-arrow-box">
               {rowIndex != 0 ? <span class="up" onClick={() => _this.moveTjRow(row, rowIndex, 1)} title="上移">⇡</span> : ''}
@@ -192,6 +201,25 @@ export default {
                 {isTejia ? equalWord : ''}
               </div>)
             }
+          },
+          // 筛选项
+          filter: {
+            filterList: _this.ruleTypeList,
+            isMultiple: true,
+            // filter confirm
+            filterConfirm: (filterList) => {
+              const labels = filterList
+                .filter((x) => x.selected)
+                .map((x) => x.value)
+              _this.searchData.ruleType = labels
+              _this.filtrateList()
+            },
+            // filter reset
+            filterReset: (filterList) => {
+              filterList.map(x => { x.selected = true })
+              _this.searchData.ruleType = []
+              _this.filtrateList()
+            }
           }
         },
         { field: 'promotionRuleDesc',
@@ -488,10 +516,17 @@ export default {
     }
   },
   methods: {
-    getDataList () {
+    // 筛选
+    filtrateList () {
+      const { ruleType } = this.searchData
+      const list = this.activeList.filter(item => ruleType.length === 0 || ruleType.includes(item.promotionRule.promotionRuleType))
+      this.tableData = []
+      this.getDataList(list)
+    },
+    getDataList (list) {
       this.hasInit = true
-      for (let i = 0; i < this.activeList.length; i++) {
-        const item = this.activeList[i]
+      for (let i = 0; i < list.length; i++) {
+        const item = list[i]
         // 门槛统计
         const isYuan = item.gateRuleUnit == 'YUAN'
         const gateUnit = isYuan ? '元' : '个' // 单位
@@ -528,6 +563,7 @@ export default {
         // 促销品
         this.tableData.push({
           ...item,
+          ruleType: item.promotionRule.promotionRuleType,
           promotionRuleType: item.promotionRule.promotionRuleTypeDictValue,
           promotionRuleDesc: item.promotionRule.description,
           // 门槛

+ 87 - 53
src/views/salesManagement/salesQueryNew/detail.vue

@@ -194,7 +194,7 @@
         v-if="(detailData&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus=='WAIT_UP_AUDIT_PASS'))&&$hasPermissions('B_salesAudit')"
         @click="handleAudit()"
       >
-        审核
+        {{ detailData.billStatus=='WAIT_UP_AUDIT_PASS'?'上级':'' }}审核
       </a-button>
       <a-button
         type="primary"
@@ -255,10 +255,9 @@
     <!-- 审核时校验销售价低于成本价提示 -->
     <vaildPriceModal
       ref="vaildPriceModal"
-      modalType="0"
       :openModal="openVaildPriceModal"
       :dataObj="tempData"
-      @close="openVaildPriceModal=false"
+      @close="closeVaildPrice"
       @ok="vaildPriceOk"></vaildPriceModal>
   </div>
 </template>
@@ -427,32 +426,6 @@ export default {
       this.openTipModal = false
       this.$router.push({ name: 'salesNewEdit', params: { sn: this.$route.params.sn || this.bizSn } })
     },
-    // 价格低于成本校验提示,继续审核
-    vaildPriceOk (type) {
-      // 不通过
-      if (type == 'AUDIT_REJECT') {
-        this.auditOrder(type)
-      } else {
-        // 如果时 待上级审核,调用
-        if (this.detailData.billStatus == 'WAIT_UP_AUDIT_PASS') {
-          this.auditOrder(type)
-          return
-        }
-        this.spinning = true
-        // 通过,业务状态变更 待上级审核
-        salesWriteUpAuditPass({
-          salesBillSn: this.bizSn || this.$route.params.sn,
-          billStatus: type
-        }).then(res => {
-          if (res.status == 200) {
-            this.$message.success(res.message)
-            this.handleBack()
-          }
-          this.$refs.vaildPriceModal.spinning = false
-          this.spinning = false
-        })
-      }
-    },
     // 查询第三方库存
     getThreeStock () {
       this.spinning = true
@@ -523,12 +496,14 @@ export default {
     // 打开审核/一键审核弹框
     async handleAudit (isBatch) {
       const _this = this
+      this.spinning = true
       // 校验产品是否付个促销活动规则
       const vaildActive = await salesPromoValidaAudit({ salesBillSn: this.bizSn || this.$route.params.sn }).then(res => res.data)
       if (vaildActive && vaildActive.length > 0) {
         const a = vaildActive.filter(item => item.type == 1) // 不可提交
-        const b = vaildActive.filter(item => item.type == 0) // 可跳过继续提交
-        const d = vaildActive.filter(item => item.type == 'audit') // 售价是否低于参考成本价
+        const c = vaildActive.filter(item => item.type == 'price_less_0') // 不可提交
+        const b = vaildActive.filter(item => item.type == 0) // 文字提示,可跳过继续提交
+        const d = vaildActive.filter(item => item.type == 'price_less_cost' || item.type == 'wait_up_audit_price_less_cost') // 价格校验表格提示,可跳过继续提交
         // 弹出不符合规则弹框,不可提交
         if (a.length) {
           this.$info({
@@ -546,14 +521,29 @@ export default {
               <div style="padding:10px 0;text-align:center"><strong>请按照以上提示修改后再提交</strong></div>
             </div>
           })
-          this.spinning = false
-        } else if (b.length) {
+          _this.spinning = false
+          return
+        }
+        // 不可提交
+        if (c.length) {
+          // 弹框显示表格提示
+          if (!isBatch) {
+            _this.openVaildPrice(c[0])
+          } else {
+            // 弹框文字提示
+            _this.tempData = { vaildPriceList: c[0].data.map(item => item.productCode) }
+            _this.verificationSuccess(isBatch)
+          }
+          return
+        }
+        // 文字提示,可跳过继续提交
+        if (b.length) {
           // 弹出确认提示信息,可跳过继续提交
           _this.$confirm({
             title: '提示',
             centered: true,
             class: 'confirm-center',
-            okText: '提交',
+            okText: '确定',
             width: 600,
             content: <div style="padding-top:15px;">
               <ol>
@@ -563,33 +553,49 @@ export default {
               </ol>
             </div>,
             onOk () {
-              _this.verificationSuccess(isBatch)
+              // 售价是否低于参考成本价
+              if (d.length) {
+                if (isBatch) { // 一键审核,弹框文字提示
+                  _this.tempData = { vaildPriceList: d[0].data.map(item => item.productCode) }
+                  _this.verificationSuccess(isBatch)
+                } else {
+                  // 审核或上级审核,弹框表格提示
+                  d[0].type = 'audit_price_less_cost'
+                  _this.openVaildPrice(d[0])
+                }
+              } else {
+                _this.verificationSuccess(isBatch)
+              }
+            },
+            onCancel () {
+              _this.spinning = false
             }
           })
-          _this.spinning = false
-        } else if (d.length) {
-          // 售价是否低于参考成本价
-          if (isBatch) { // 一键审核
-            _this.tempData = { vaildPriceList: d[0].salesPromoDetailEntityList.map(item => item.productCode) }
-            this.verificationSuccess(isBatch)
-          } else {
-            // 审核
-            _this.tempData = d[0]
-            _this.openVaildPriceModal = true
-          }
-        } else {
-          this.verificationSuccess(isBatch)
         }
       } else {
-        this.verificationSuccess(isBatch)
+        _this.verificationSuccess(isBatch)
       }
     },
+    // 校验销售价低于成本价提示
+    openVaildPrice (data) {
+      this.tempData = data
+      this.openVaildPriceModal = true
+    },
+    // 关闭校验销售价低于成本价提示
+    closeVaildPrice () {
+      this.spinning = false
+      this.tempData = null
+      this.openVaildPriceModal = false
+    },
     // 消息提示
     messageInfo (content) {
       this.$info({
         title: '提示',
         content: content,
-        centered: true
+        centered: true,
+        onOk: () => {
+          this.spinning = false
+        }
       })
     },
     // 验证通过
@@ -608,7 +614,7 @@ export default {
           return
         }
         if (this.tempData && this.tempData.vaildPriceList) {
-          this.messageInfo(this.tempData.vaildPriceList + '售价已低于成本价,不可一键审核!')
+          this.messageInfo('产品' + this.tempData.vaildPriceList + '售价已低于成本价,不可一键审核!')
           return
         }
         // 一键审核成功
@@ -619,7 +625,7 @@ export default {
         this.visibleAudit = true
       }
     },
-    // 一键审核
+    // 一键审核确定
     handleOnceAudit (data) {
       const params = {
         salesBillSn: this.bizSn || this.$route.params.sn,
@@ -638,6 +644,32 @@ export default {
         this.spinning = false
       })
     },
+    // 价格低于成本校验提示,继续审核
+    vaildPriceOk (type) {
+      if (type == 'confirm') {
+        this.auditOrder(type)
+        return
+      }
+      // 不通过 或 是 如果是待上级审核,调用
+      if (type == 'AUDIT_REJECT' || this.detailData.billStatus == 'WAIT_UP_AUDIT_PASS') {
+        this.auditOrder(type)
+      } else {
+        this.spinning = true
+        // 通过审核,业务状态变更 待上级审核
+        salesWriteUpAuditPass({
+          salesBillSn: this.bizSn || this.$route.params.sn,
+          billStatus: type
+        }).then(res => {
+          if (res.status == 200) {
+            this.$message.success(res.message)
+            this.closeVaildPrice()
+            this.handleBack()
+          }
+          this.$refs.vaildPriceModal.spinning = false
+          this.spinning = false
+        })
+      }
+    },
     // 审核
     auditOrder (billStatus) {
       this.spinningAudit = true
@@ -651,11 +683,13 @@ export default {
           this.$message.success(res.message)
           this.spinningAudit = false
           const _this = this
+          this.closeVaildPrice()
           this.$nextTick(() => {
+            // 审核通过,跳转到带下推页面
             if (billStatus == 'AUDIT_PASS' && !_this.auditText) {
               _this.$router.push({ name: 'waitDispatchNew', params: { salesBillSn: _this.bizSn || _this.$route.params.sn } })
             } else {
-              //  关闭详情跳列表
+              // 不通过关闭详情返回列表
               _this.handleBack()
             }
           })

+ 65 - 53
src/views/salesManagement/salesQueryNew/edit.vue

@@ -167,10 +167,9 @@
     <!-- 提交时校验销售价低于成本价提示 -->
     <vaildPriceModal
       ref="vaildPriceModal"
-      modalType="1"
       :openModal="openVaildPriceModal"
       :dataObj="tempData"
-      @close="openVaildPriceModal=false"
+      @close="closeVaildPrice"
       @ok="vaildPriceOk"></vaildPriceModal>
   </div>
 </template>
@@ -337,13 +336,16 @@ export default {
     // 提交销售单
     async submitResult () {
       const _this = this
-      const data = { salesBillSn: _this.salesBillSn }
+      this.spinning = true
       // 校验活动规则
       const vaildActive = await salesPromoValidaSubmit({ salesBillSn: this.salesBillSn }).then(res => res.data)
       const a = vaildActive.filter(item => item.type == 1) // 不可提交
-      const b = vaildActive.filter(item => item.type == 0) // 可跳过继续提交
-      // 弹出不符合规则弹框,不可提交
-      if (a.length) {
+      const d = vaildActive.filter(item => item.type == 'price_less_0') // 不可提交
+      const b = vaildActive.filter(item => item.type == 0) // 文字提示,可跳过继续提交
+      const c = vaildActive.filter(item => item.type == 'price_less_cost' || item.type == 'wait_up_audit_price_less_cost') // 价格校验表格提示,可跳过继续提交
+      // 不可提交
+      // 弹出不符合规则弹框
+      if (a.length > 0) {
         this.$info({
           title: '提示',
           centered: true,
@@ -359,58 +361,70 @@ export default {
             <div style="padding:10px 0;text-align:center"><strong>请按照以上提示修改后再提交</strong></div>
           </div>
         })
-        this.spinning = false
-      } else {
-        // 弹出确认提示信息,可跳过继续提交
-        if (b.length) {
-          this.$confirm({
-            title: '提示',
-            centered: true,
-            class: 'confirm-center',
-            okText: '提交',
-            width: 600,
-            content: <div style="padding-top:15px;">
-              <ol>
-                {b.map(item => (
-                  <li style="padding:3px 0;">{item.message}</li>
-                ))}
-              </ol>
-            </div>,
-            onOk () {
-              _this.submitOrder(data)
+        _this.spinning = false
+        return
+      }
+      if (d.length > 0) { // 价格校验弹框提示
+        _this.openVaildPrice(d[0])
+        return
+      }
+      // 弹出确认提示信息,可跳过继续提交
+      if (b.length > 0) {
+        this.$confirm({
+          title: '提示',
+          centered: true,
+          class: 'confirm-center',
+          okText: '提交',
+          width: 600,
+          content: <div style="padding-top:15px;">
+            <ol>
+              {b.map(item => (
+                <li style="padding:3px 0;">{item.message}</li>
+              ))}
+            </ol>
+          </div>,
+          onOk () {
+            // 价格校验弹框
+            if (c.length > 0) {
+              _this.openVaildPrice(c[0])
+            } else {
+              _this.submitOrder()
             }
-          })
-          _this.spinning = false
-        } else {
-          _this.submitOrder(data)
-        }
+          },
+          onCancel () {
+            _this.spinning = false
+          }
+        })
+      }
+    },
+    // 校验销售价低于成本价提示
+    openVaildPrice (data) {
+      this.tempData = data
+      this.openVaildPriceModal = true
+    },
+    // 关闭校验销售价低于成本价提示
+    closeVaildPrice () {
+      this.spinning = false
+      this.tempData = null
+      this.openVaildPriceModal = false
+    },
+    // 校验销售价低于成本价提示成功,关闭弹窗
+    vaildPriceOk (type) {
+      if (type == 'confirm') {
+        this.submitOrder()
       }
     },
     // 提交销售单
-    async submitOrder (data) {
+    async submitOrder () {
       this.spinning = true
-      const res = await salesWriteSubmit(data)
+      const res = await salesWriteSubmit({ salesBillSn: this.salesBillSn })
       if (res.status == 200) {
-        // 售价是否低于参考成本价
-        if (res.data && res.data.length) {
-          const objData = {
-            salesPromoDetailEntityList: res.data,
-            message: '共' + res.data.length + '款产品售价小于等于0'
-          }
-          this.tempData = objData
-          this.openVaildPriceModal = true
-        } else {
-          this.handleBack()
-          this.$message.success(res.message)
-        }
+        this.closeVaildPrice()
+        this.handleBack()
+        this.$message.success(res.message)
       }
       this.spinning = false
     },
-    // 校验销售价低于成本价提示成功,关闭弹窗
-    vaildPriceOk () {
-      this.tempData = null
-      this.openVaildPriceModal = false
-    },
     // 刷新查询列表数据
     getTableListData () {
       // 刷新正常产品列表
@@ -443,13 +457,11 @@ export default {
     // 获取销售单参与的活动列表,flag: true 查询产品明细列表,false 不查
     async getActiveList (flag) {
       this.spinning = true
+      // 触发活动统计查询变量
+      if (this.$refs.activeTjList) this.$refs.activeTjList.hasInit = false
       // 已参与活动列表
       const list = await salesPromoQueryList({ salesBillSn: this.$route.params.sn }).then(res => res.data || [])
       this.activeList = list.filter(item => item.promotion && item.promotionRule)
-      // 触发活动统计查询变量
-      this.$nextTick(() => {
-        if (this.activeList.length) this.$refs.activeTjList.hasInit = false
-      })
       this.spinning = false
       if (flag) {
         setTimeout(() => {

+ 36 - 27
src/views/salesManagement/salesQueryNew/vaildPriceModal.vue

@@ -24,12 +24,15 @@
         <div style="padding: 20px;text-align: center;" v-if="dataObj&&dataObj.message">
           {{ dataObj.message }}
         </div>
-        <div style="margin-top:36px;text-align:center;" v-if="modalType==='0'">
-          <!-- <a-button @click="handleCancel" style="margin-right: 15px" id="chooseCustom-btn-back">关闭</a-button> -->
+        <div style="margin-top:36px;text-align:center;" v-if="modalType == 'wait_up_audit_price_less_cost'||modalType == 'audit_price_less_cost'">
           <a-button type="primary" style="margin-right: 15px" @click="handleSubmit('AUDIT_REJECT')" id="chooseCustom-btn-noPasss">审核不通过</a-button>
           <a-button type="primary" class="button-info" @click="handleSubmit('AUDIT_PASS')" id="chooseCustom-btn-Pass">审核通过</a-button>
         </div>
-        <div style="margin-top:36px;text-align:center;" v-else>
+        <div style="margin-top:36px;text-align:center;" v-if="modalType == 'price_less_cost'">
+          <a-button @click="handleCancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" class="button-info" @click="handleSubmit('confirm')" id="chooseCustom-btn-Pass">确定</a-button>
+        </div>
+        <div style="margin-top:36px;text-align:center;" v-if="modalType == 'price_less_0'">
           <a-button @click="handleCancel" style="margin-right: 15px" id="chooseCustom-btn-back">关闭</a-button>
         </div>
       </div>
@@ -52,10 +55,6 @@ export default {
       default: () => {
         return null
       }
-    },
-    modalType: {// 0  来源审核页面  1来源提交页面
-      type: String,
-      default: '0'
     }
   },
   data () {
@@ -65,34 +64,44 @@ export default {
     }
   },
   computed: {
+    modalType () {
+      return this.dataObj && this.dataObj.type
+    },
     dataList () {
-      const list = this.dataObj && this.dataObj.salesPromoDetailEntityList || []
+      const list = this.dataObj && this.dataObj.data || []
       list.map(item => {
-        item.totalAmount = this.modalType == 0 ? item.promotionPrice * item.qty : item.totalAmount
-        item.totalCostAmount = item.showCost * item.qty
-        item.totalKsAmount = item.totalAmount - item.totalCostAmount
+        item.totalKsAmount = item.totalShowCost - item.totalAmount
       })
       return list
     },
     columns () {
       const _this = this
-      const arr = [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center', customRender: function (text, row, index) { return index + 1 } },
-        { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '销售数量', dataIndex: 'qty', width: '10%', align: 'center', isShow: false, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '售价小计', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
-      ]
-      if (_this.modalType == 0) {
-        arr.splice(2, 0, { title: '参考成本价', dataIndex: 'showCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(3, 0, { title: '售价', dataIndex: 'promotionPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(5, 0, { title: '单位', dataIndex: 'product.unit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.push({ title: '参考成本价小计', dataIndex: 'totalCostAmount', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.push({ title: '亏损金额', dataIndex: 'totalKsAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-      } else {
-        arr.splice(2, 0, { title: '售价', dataIndex: 'price', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(4, 0, { title: '单位', dataIndex: 'productEntity.unit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      // 特价产品,销售价小于等于0
+      if (this.modalType == 'price_less_0') {
+        return [
+          { title: '序号', dataIndex: 'no', width: '5%', align: 'center', customRender: function (text, row, index) { return index + 1 } },
+          { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '售价', dataIndex: 'price', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '销售数量', dataIndex: 'qty', width: '10%', align: 'center', isShow: false, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '单位', dataIndex: 'productEntity.unit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '售价小计', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        ]
+      }
+      // 特价产品,销售价是否低于成本价
+      if (this.modalType == 'price_less_cost' || _this.modalType == 'wait_up_audit_price_less_cost' || _this.modalType == 'audit_price_less_cost') {
+        return [
+          { title: '序号', dataIndex: 'no', width: '5%', align: 'center', customRender: function (text, row, index) { return index + 1 } },
+          { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '参考成本价', dataIndex: 'showCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '售价', dataIndex: 'promotionPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '销售数量', dataIndex: 'qty', width: '10%', align: 'center', isShow: false, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '单位', dataIndex: 'productEntity.unit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '售价小计', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '参考成本价小计', dataIndex: 'totalShowCost', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '亏损金额', dataIndex: 'totalKsAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        ]
       }
-      return arr
+      return []
     }
   },
   methods: {

+ 2 - 2
vue.config.js

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