|
|
@@ -9,7 +9,7 @@
|
|
|
*******************************************************************************/
|
|
|
const Constants = require('@/utils/Constants.js');
|
|
|
const util = require('@/utils/util.js')
|
|
|
-const app = getApp()
|
|
|
+const app = getApp()
|
|
|
const mixins = require('@/mixins/index.js')
|
|
|
Page({
|
|
|
mixins: [mixins],
|
|
|
@@ -17,7 +17,7 @@ Page({
|
|
|
* 页面的初始数据
|
|
|
*/
|
|
|
data: {
|
|
|
- active:0,
|
|
|
+ active: 0,
|
|
|
// 查询条件
|
|
|
searchContent: [{
|
|
|
code: 'makeTime',
|
|
|
@@ -49,20 +49,30 @@ Page({
|
|
|
|
|
|
// 查询条件-筛选
|
|
|
pullMenuList: [{
|
|
|
- code: 'orderNo',
|
|
|
- }, {
|
|
|
- code: 'cusName',
|
|
|
- }, {
|
|
|
- code: 'cusPhone',
|
|
|
- }, {
|
|
|
- code: 'addressFull',
|
|
|
- title: mixins.$t('address')
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'viewVoidedDocuments',
|
|
|
- dataType: 'checkbox'
|
|
|
- },
|
|
|
- ],
|
|
|
+ code: 'skuModel',
|
|
|
+ title: mixins.$t('skuModel')
|
|
|
+ }, {
|
|
|
+ code: 'skuName',
|
|
|
+ title: mixins.$t('skuName')
|
|
|
+ }, {
|
|
|
+ code: 'goodsBrand',
|
|
|
+ title: mixins.$t('goodsBrand')
|
|
|
+ }, {
|
|
|
+ code: 'sukSpec',
|
|
|
+ title: mixins.$t('sukSpec')
|
|
|
+ }, {
|
|
|
+ code: 'colorNumber',
|
|
|
+ title: mixins.$t('colorNumber')
|
|
|
+ }, {
|
|
|
+ code: 'goodsSeries',
|
|
|
+ title: mixins.$t('goodsSeries')
|
|
|
+ }, {
|
|
|
+ code: 'cusName',
|
|
|
+ title: mixins.$t('cusName')
|
|
|
+ }, {
|
|
|
+ code: 'cusPhone',
|
|
|
+ title: mixins.$t('cusPhone')
|
|
|
+ }, ],
|
|
|
tagList: [{
|
|
|
title: mixins.$t("goods"),
|
|
|
code: mixins.$t("goods")
|
|
|
@@ -72,49 +82,7 @@ Page({
|
|
|
code: mixins.$t("customer")
|
|
|
}
|
|
|
],
|
|
|
- tableData: [{
|
|
|
- "brandName": "冠珠GUANZHU",
|
|
|
- "currentIntoAmt": 0,
|
|
|
- "currentIntoQty": 0,
|
|
|
- "currentOutAmt": 0,
|
|
|
- "currentOutQty": 0,
|
|
|
- "decimalPlaces": 0,
|
|
|
- "endingIvtAmt": 99,
|
|
|
- "endingIvtQty": 99,
|
|
|
- "invId": "10112024-0624-0000-0000-00045b3b9096",
|
|
|
- "nonStdCode": "WW",
|
|
|
- "openingIvtAmt": 99,
|
|
|
- "openingIvtQty": 99,
|
|
|
- "packBox": 1,
|
|
|
- "shortName": "冠珠GUANZHU",
|
|
|
- "skuModel": "WAGYJ",
|
|
|
- "skuName": "WANGYJ",
|
|
|
- "skuSpec": "1",
|
|
|
- "unitName": "套",
|
|
|
- "whName": "主仓"
|
|
|
- },
|
|
|
- {
|
|
|
- "brandName": "冠珠GUANZHU",
|
|
|
- "currentIntoAmt": 0,
|
|
|
- "currentIntoQty": 0,
|
|
|
- "currentOutAmt": 0,
|
|
|
- "currentOutQty": 0,
|
|
|
- "decimalPlaces": 0,
|
|
|
- "endingIvtAmt": 33,
|
|
|
- "endingIvtQty": 1,
|
|
|
- "invId": "10112024-0624-0000-0000-00045b53e1fc",
|
|
|
- "nonStdCode": "-",
|
|
|
- "openingIvtAmt": 33,
|
|
|
- "openingIvtQty": 1,
|
|
|
- "packBox": 1,
|
|
|
- "shortName": "冠珠GUANZHU",
|
|
|
- "skuModel": "WAGYJ",
|
|
|
- "skuName": "WANGYJ",
|
|
|
- "skuSpec": "1",
|
|
|
- "unitName": "套",
|
|
|
- "whName": "主仓"
|
|
|
- },
|
|
|
- ],
|
|
|
+ tableData: [],
|
|
|
// 路由
|
|
|
routeObjName: 'report',
|
|
|
},
|
|
|
@@ -125,10 +93,19 @@ Page({
|
|
|
*/
|
|
|
setSearchParams(params) {
|
|
|
let querys = {
|
|
|
- accDatestart: "2024-6-1",
|
|
|
- accDateEnd: "2024-7-1",
|
|
|
- type: this.data.active==0?1:2,
|
|
|
- sortAmt: "1"
|
|
|
+ accDatestart: params.makeTimeStart,
|
|
|
+ accDateEnd: params.makeTimeEnd,
|
|
|
+ type: this.data.active == 0 ? 1 : 2,
|
|
|
+ sortAmt: params.sort ? params.sort : '1',
|
|
|
+ searchText: params.searchText,
|
|
|
+ skuModel: params.skuModel,
|
|
|
+ skuName: params.skuName,
|
|
|
+ brandName: params.goodsBrand,
|
|
|
+ skuSpec: params.sukSpec,
|
|
|
+ nonStdCode: params.colorNumber,
|
|
|
+ seriesName: params.goodsSeries,
|
|
|
+ cusName: params.cusName,
|
|
|
+ cusPhone: params.cusPhone,
|
|
|
}
|
|
|
params.querys = JSON.stringify(querys)
|
|
|
return params;
|
|
|
@@ -141,39 +118,54 @@ Page({
|
|
|
getData(params) {
|
|
|
return this.excute(this.data.service, this.data.service.getOrderSummary, params).then(res => {
|
|
|
if (res.data.code === Constants.SUCESS_CODE) {
|
|
|
- console.log('getData',res);
|
|
|
- let total = {}
|
|
|
- let tableData = []
|
|
|
- if(res.data&&res.data.data&&res.data.data.total){ //头部数据
|
|
|
+ console.log('getData', res);
|
|
|
+ let total = {}
|
|
|
+ let tableData = []
|
|
|
+ if (res.data && res.data.data && res.data.data.total) { //头部数据
|
|
|
total = res.data.data.total[0]
|
|
|
- }
|
|
|
- if(res.data&&res.data.data&&res.data.data.detail){ //头部数据
|
|
|
+ }
|
|
|
+ if (res.data && res.data.data && res.data.data.detail) { //头部数据
|
|
|
tableData = res.data.data.detail
|
|
|
- }
|
|
|
+ }
|
|
|
this.setData({
|
|
|
- total:total,
|
|
|
- tableData:tableData
|
|
|
+ total: total,
|
|
|
+ tableData: tableData
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
-/**
|
|
|
- * @desc : 切换 商品 客户
|
|
|
- * @date : 2024年3月8日
|
|
|
- * @author : 王英杰
|
|
|
- */
|
|
|
- onChangeTabs(e) {
|
|
|
- let index = e.detail.detail.index
|
|
|
- this.setData({
|
|
|
- active: index,
|
|
|
- })
|
|
|
- if(index==0){
|
|
|
- this.selectComponent('#dk-list-report').setReportNameKey('saleSumGoods')
|
|
|
- }else{
|
|
|
- this.selectComponent('#dk-list-report').setReportNameKey('saleSumCus')
|
|
|
- }
|
|
|
-
|
|
|
- this.searchData()
|
|
|
-},
|
|
|
+ /**
|
|
|
+ * @desc : 切换 商品 客户
|
|
|
+ * @date : 2024年3月8日
|
|
|
+ * @author : 王英杰
|
|
|
+ */
|
|
|
+ onChangeTabs(e) {
|
|
|
+ let index = e.detail.detail.index
|
|
|
+ this.setData({
|
|
|
+ active: index,
|
|
|
+ })
|
|
|
+ if (index == 0) {
|
|
|
+ this.selectComponent('#dk-list-report').setReportNameKey('saleSumGoods')
|
|
|
+ } else {
|
|
|
+ this.selectComponent('#dk-list-report').setReportNameKey('saleSumCus')
|
|
|
+ }
|
|
|
|
|
|
+ this.searchData()
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 跳转明细
|
|
|
+ * @date : 2024年3月8日
|
|
|
+ * @author : 王英杰
|
|
|
+ */
|
|
|
+ toDetail(e) {
|
|
|
+ console.log('toDetail',e);
|
|
|
+ let skuId = e.detail.item.skuId
|
|
|
+ wx.navigateTo({
|
|
|
+ url: this.data.route.orderSumReportDetail.url,
|
|
|
+ success: function (res) {
|
|
|
+ // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
|
|
|
+ res.eventChannel.emit('params', { id: skuId, formMode: Constants.formMode.detail, formType: Constants.formMode.detail })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
})
|