| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441 |
- /*******************************************************************************
- * Copyright(c) 2022 dongke All rights reserved. / Confidential
- * 类的信息:
- * 1.程序名称:
- * 编辑履历:
- * 作者 日期 版本 修改内容
- * 于继渤 2024-1-23 1.00 基础资料
- *******************************************************************************/
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- sideKey: 0,
- listTitle: '',
- showPopup: false,
- leftData: [],
- showPopupItem: {},
- fieldData: {},
- statusItem: {
- text: '全部',
- value: -1
- },
- statusList: [
- { checked: false, text: '有效', value: 1},
- { checked: false, text: '无效', value: 0 },
- { checked: true, text: '全部', value: -1 },
- ], //状态
- fieldList: [
- {
- typeName: '仓库档案',
- warehouseCode: '仓库编码',
- warehouseName: '仓库名称',
- supervisorName: '仓库主管'
- },
- {
- typeName: '销售渠道',
- channelCode: '渠道编码',
- channelName: '渠道名称'
- },
- {
- typeName: '收入类别',
- incomeCode: '收入编码',
- incomeName: '收入名称'
- },
- {
- typeName: '支出类别',
- expenditureCode: '支出编码',
- expenditureName: '支出名称'
- },
- {
- typeName: '入库原因',
- reasonCode: '原因编码',
- reasonName: '原因名称'
- },
- {
- typeName: '出库原因',
- reasonCode: '原因编码',
- reasonName: '原因名称'
- },
- {
- typeName: '收付方式',
- paymentCode: '收付编码',
- paymentName: '收付名称'
- },
- ], //字段渲染
- // 渲染数据
- test00: [{
- warehouseCode: 'CK00001',
- warehouseName: '运营主仓',
- supervisorName: '王仓管员/15640556650',
- flagValue: true
- },
- {
- warehouseCode: 'CK00002',
- warehouseName: '红星店面仓库',
- supervisorName: '王店长/15640556650',
- flagValue: false
- },
- {
- warehouseCode: 'CK00003',
- warehouseName: '红星店面仓库',
- supervisorName: '王店长/15640556650',
- flagValue: true
- }],
- test01: [
- {
- channelCode: 'QD00001',
- channelName: '零售',
- flagValue: true
- },
- {
- channelCode: 'QD00002',
- channelName: '家装',
- flagValue: true
- },
- {
- channelCode: 'QD00003',
- channelName: '分销',
- flagValue: true
- },
- {
- channelCode: 'QD00004',
- channelName: '工程',
- flagValue: true
- },
- {
- channelCode: 'QD00005',
- channelName: '其他',
- flagValue: true
- }
- ],
- test02: [
- {
- incomeCode: 'SR00001',
- incomeName: '配送费',
- flagValue: true
- },
- {
- incomeCode: 'SR00002',
- incomeName: '安装费',
- flagValue: true
- },
- {
- incomeCode: 'SR00003',
- incomeName: '加工费',
- flagValue: true
- },
- {
- incomeCode: 'SR00004',
- incomeName: '拆旧费',
- flagValue: true
- },
- {
- incomeCode: 'SR00005',
- incomeName: '其他收入',
- flagValue: true
- }
- ],
- test03: [
- {
- expenditureCode: 'SR00001',
- expenditureName: '房租费',
- flagValue: true
- },
- {
- expenditureCode: 'SR00002',
- expenditureName: '水电费',
- flagValue: true
- },
- {
- expenditureCode: 'SR00003',
- expenditureName: '送货费',
- flagValue: true
- },
- {
- expenditureCode: 'SR00004',
- expenditureName: '员工工资',
- flagValue: true
- },
- {
- expenditureCode: 'SR00005',
- expenditureName: '促销活动费',
- flagValue: true
- }
- ],
- test04: [
- {
- reasonCode: 'RK00001',
- reasonName: '期初入库',
- flagValue: true
- },
- {
- reasonCode: 'RK00002',
- reasonName: '其他入库',
- flagValue: true
- },
- {
- reasonCode: 'RK00003',
- reasonName: '采购入库',
- flagValue: true
- },
- {
- reasonCode: 'RK00004',
- reasonName: '销售回库',
- flagValue: true
- }
- ],
- test05: [
- {
- reasonCode: 'CK00001',
- reasonName: '销售出库',
- flagValue: true
- },
- {
- reasonCode: 'CK00002',
- reasonName: '其他出库',
- flagValue: true
- },
- {
- reasonCode: 'CK00003',
- reasonName: '采购退货出库',
- flagValue: true
- },
- {
- reasonCode: 'CK00004',
- reasonName: '调货出库',
- flagValue: true
- }
- ],
- test06: [
- {
- paymentCode: 'SF00001',
- paymentName: '微信',
- flagValue: true
- },
- {
- paymentCode: 'SF00002',
- paymentName: '现金',
- flagValue: true
- },
- {
- paymentCode: 'SF00003',
- paymentName: '银行转账',
- flagValue: true
- },
- {
- paymentCode: 'SF00004',
- paymentName: '支付宝',
- flagValue: true
- }
- ],
- },
- dropdownSwitchCommit(e) {
- console.log(e)
- },
- /**
- * @desc : 分类切换
- * @author : 于继渤
- * @date : 2022/5/26 20:16
- */
- changeSidebar(e) {
- console.log(e)
- let id = this.data.leftData[e.detail].id
- let name = this.data.leftData[e.detail].name
- let fieldList = this.data.fieldList
- let tableData = this.data.tableData
- let sidebarList = fieldList.filter(res => {
- return res.typeName == name
- })
- if (name == '仓库档案') {
- tableData = this.data.test00
- }
- if (name == '销售渠道') {
- tableData = this.data.test01
- }
- if (name == '收入类别') {
- tableData = this.data.test02
- }
- if (name == '支出类别') {
- tableData = this.data.test03
- }
- if (name == '入库原因') {
- tableData = this.data.test04
- }
- if (name == '出库原因') {
- tableData = this.data.test05
- }
- if (name == '收付方式') {
- tableData = this.data.test06
- }
- this.setData({
- sideKey: e.detail,
- specsId: e.detail.id,
- fieldData: sidebarList[0],
- tableData: tableData
- })
- this.setData({
- searchText: ''
- })
- // 查询
- // this.doSearch()
- },
- /**
- * @desc : 左滑功能
- * @author : 于继渤
- * @date : 2024/1/23 9:16
- */
- onCloseDel(e) {
- console.log(e)
- },
- /**
- * @desc : 列表对象点击
- * @author : 于继渤
- * @date : 2024/1/23 9:16
- */
- toDetail(e) {
- console.log(e)
- let index = e.currentTarget.dataset.index
- let tableData = this.data.tableData
- this.setData({
- showPopup: true,
- showPopupItem: tableData[index]
- })
- },
- /**
- * @desc : 关闭弹窗
- * @author : 于继渤
- * @date : 2024/1/23 9:16
- */
- onClosePopup() {
- this.setData({
- showPopup: false
- })
- },
- /**
- * @desc : 新建
- * @author : 于继渤
- * @date : 2024/1/23 9:16
- */
- toAdd() {
- this.setData({
- showPopupItem: {},
- showPopup: true
- })
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- let _this = this;
- wx.getSystemInfo({
- success: function (res) {
- _this.setData({
- windowHeight: res.windowHeight,
- windowWidth: res.windowWidth
- })
- }
- })
- let leftData = [
- {
- id: 1,
- name: '仓库档案'
- },
- {
- id: 1,
- name: '销售渠道'
- },
- {
- id: 1,
- name: '收入类别'
- },
- {
- id: 1,
- name: '支出类别'
- },
- {
- id: 1,
- name: '入库原因'
- },
- {
- id: 1,
- name: '出库原因'
- },
- {
- id: 1,
- name: '收付方式'
- },
- ]
- let tableData = this.data.test00
- this.setData({
- leftData: leftData,
- tableData: tableData,
- listTitle: leftData[0].name,
- fieldData: this.data.fieldList[0]
- })
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
- }
- })
|