| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 |
- /*******************************************************************************
- * Copyright(c) 2022 dongke All rights reserved. / Confidential
- * 类的信息:
- * 1.程序名称: 出库办理列表
- * 编辑履历:
- * 作者 日期 版本 修改内容
- * jyh 2024-03-12 1.00
- *******************************************************************************/
- const Constants = require('@/utils/Constants.js');
- const mixins = require('@/mixins/index.js')
- Page({
- mixins: [mixins],
- /**
- * 页面的初始数据
- */
- data: {
- tagList: [
- { title: mixins.$t('outboundProcessing') },
- { title: mixins.$t('checkouted') }
- ],
- // 查询条件
- searchContent: [{
- code: 'createtime',
- title: mixins.$t('pastThirthtyDays'),
- defaultValue: 5,
- searchType: Constants.searchType.date
- }, {
- code: 'choose',
- title: mixins.$t('choose'),
- searchType: Constants.searchType.pick
- }],
- // 查询条件-筛选
- pullMenuList: [
- {
- code: 'outType',
- pullType: 'mSelect',
- typeName: 'outboundType'
- },
- {
- code: 'outReason',
- pullType: 'mSelect',
- typeName: 'outboundReason'
- },
- {
- code: 'cusName',
- },
- {
- code: 'cusPhone',
- },
- {
- code: 'addressFull',
- },
- {
- code: 'outDate',
- dataType: 'date'
- },
- {
- code: 'staffName',
- },
- {
- code: 'orgName',
- },
- {
- code: 'supplierName',
- },
- ],
- // 列表区(脚部金额)
- footerAmount: {
- name: 'outingAmt',
- title: mixins.$t('totalAmount')
- },
- // 列表区(脚部信息)
- footerInfo: [{ prefix: mixins.$t('together'),
- name: 'outingQty', title: mixins.$t('piece') }],
- // 列表区(内容)
- contentList: [],
- contentObj: {
- '采退出库': [{
- name: 'orderNo',
- title: mixins.$t('orderNo')
- }, {
- name: 'addressFull',
- title: mixins.$t('returnAddress')
- }, {
- name: [{
- name: 'orgName',
- title: ''
- }, {
- name: 'staffName',
- title: mixins.$t('staffId')
- }],
- title: mixins.$t('returnInfo')
- }, {
- name: 'outDate',
- title: mixins.$t('outDate')
- }],
- '销售出库': [{
- name: 'outNo',
- title: mixins.$t('outOrderNo')
- }, {
- name: 'cusPhone',
- title: mixins.$t('cusPhone')
- }, {
- name: 'addressFull',
- title: mixins.$t('addressFull')
- }, {
- name: [{
- name: 'orgName',
- title: ''
- }, {
- name: 'staffName',
- title: mixins.$t('staffId')
- }],
- title: mixins.$t('storeInformation')
- }, {
- name: 'outDate',
- title: mixins.$t('outDate')
- }],
- '其他出库': [{
- name: 'outNo',
- title: mixins.$t('outDoutOrderNoate')
- }, {
- name: 'outReasonName',
- title: mixins.$t('reasonOutbound')
- }, {
- name: [{
- name: 'orgName',
- title: ''
- }, {
- name: 'staffName',
- title: mixins.$t('staffId')
- }],
- title: mixins.$t('cpManager')
- }, {
- name: 'outObject',
- title: mixins.$t('outObject')
- }, {
- name: 'outDate',
- title: mixins.$t('outDate')
- }],
- },
- // 弹出按钮
- buttonList: [
- {
- name: 'customerRefundList',
- title: mixins.$t('invaidOrder'),
- }, {
- name: 'customerRefundList',
- title: mixins.$t('ticketPirnt'),
- }
- ],
- // 底部保存按钮
- buttonFootList: [{
- name: 'addOther',
- title: mixins.$t('otherOutWh'),
- }],
- contentnFootList: [
- {
- title:mixins.$t('totalAmount'),
- code: 'intoingAmt',
- content: 0,
- type: 'number'
- }, {
- type: 'count',
- code: 'count',
- bill: 1,
- quantity: 2
- }
- ],
- btnFormData: null,
- // 路由
- routeObjName: 'outbound',
- active: 0,
- // 主键Id
- primaryKey: 'outId',
- },
- /**
- * 切换 已出库 未出库
- */
- onChangeTabs(e) {
- let index = e.detail.detail.index
- this.setData({
- active: index,
- })
- this.searchData()
- },
- /**
- * @desc : addOther
- * @date : 2024年3月8日
- * @author : 姜永辉
- */
- addOther() {
- wx.navigateTo({
- url: this.data.route.addOther.url,
- success: function (res) {
- // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
- res.eventChannel.emit('params', {})
- }
- })
- },/**
- * @desc : 设置查询参数
- * @date : 2024年3月8日
- * @author : 姜永辉
- */
- setSearchParams(params) {
- if (this.data.active == 0) {
- //待出库的查询参数
- params.outStatus = Constants.outStatus.outBounding
- }
- if (this.data.active == 1) {
- //已出库的查询参数
- params.outStatus = Constants.outStatus.outBounded
- }
- return params;
- },
- /**
- * @desc : 查询 出库单
- * @date : 2024年3月8日
- * @author : 姜永辉
- */
- getData(params) {
- return this.excute(this.data.service, this.data.service.selectByCond, params);
- },
- /**
- * @desc : 处理接口返回数据
- * @date : 2024年3月8日
- * @author : 姜永辉
- */
- handleSearchData(tableData) {
- let temp = tableData
- temp.forEach(it => {
- it.makeTime = it.makeTime.substring(0, 10)
- // 出库对象
- if (it.outType == Constants.outType.other) {
- it.outObject = it.cusName != null ? it.cusName : it.supplierName
- }
- })
- this.setData({
- tableData:temp
- })
- },
- })
|