| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072 |
- /*******************************************************************************
- * Copyright(c) 2021 dongke All rights reserved. / Confidential
- * 类的信息:
- * 1.程序名称:
- * 2.功能描述:出库办理
- * 编辑履历:
- * 作者 日期 版本 修改内容
- * 王英杰 2023年8月17日 1.00 一览
- *******************************************************************************/
- const app = getApp()
- const Constants = require('@/utils/Constants.js');
- const api = require('@/utils/api.js');
- const util = require('@/utils/util.js')
- const common = require('@/utils/common.js')
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- active: 0,
- createTimeType: {
- text: '近30天',
- value: 5
- },
- //筛选字段
- searchForm: {
- checked: false,
- entryKinds: [],
- entryReasons: [],
- customerName: '',
- customerPhone: '',
- addressFullReturn: '',
- supplierName: '',
- warehousingTime: '',
- warehousingTimeList: [],
- deliveryTime: '',
- deliveryTimeList: [],
- },
- outStatus: 0,
- list: [],
- totallength: 0, //合计
- selectlength: 0,
- selectTotallength: 0,
- pageInfo: {
- pageSize: 10,
- currentPage: 1
- },
- searchText: '',
- form: {
- deliveryTime: ''
- },
- },
- /**查找冲正数据监听切换事件 */
- onCheckboxChange(event) {
- let searchForm = this.data.searchForm
- searchForm.checked = event.detail
- this.setData({
- searchForm: searchForm
- })
- },
- /**
- * @desc : 单据状态点击事件
- * @author : 王英杰
- * @date : 2023年10月12日
- */
- dropdowncommit(e) {
- this.selectComponent("#statusItem").toggle(false) //取消选中样式
- console.log("dropdowncommit", e)
- let dataList = e.detail.dataList
- let type = e.currentTarget.dataset.type
- this.setData({
- objectType: e.detail.values
- })
- this.doSearch()
- },
- /**
- * @desc : 页面上拉触底事件的处理函数
- * @author : 于继渤
- * @date : 2022/5/24 08:49
- */
- onReachBottom: function () {
- if (this.data.loading || this.data.noMore) {
- return;
- }
- this.setData({
- pageInfo: {
- pageSize: this.data.pageInfo.pageSize,
- currentPage: this.data.pageInfo.currentPage + 1
- }
- })
- this.getData('more')
- },
- /**跳转入库撤回 */
- toOutboundWithdrawal(e) {
- wx.navigateTo({
- url: '/package6/pages/received-order/received-order?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)) + '&sourcePage=outbound-processing',
- })
- },
- // 明细数据
- toDetail(e) {
- //待出库
- if (this.data.active == 0) {
- this.toOutboundProcessing(e)
- } else {
- this.toRevokel(e)
- }
- },
- /**
- * @desc : 跳转扫码入库
- * @author : 王英杰
- * @date : 2023年9月5日
- */
- toScanProcessing(e) {
- this.setData({
- showShare: false
- })
- let item = e.currentTarget.dataset.item
- if (item.entryKindName == "其他入库") {
- wx.navigateTo({
- url: '/package7/pages/scan-show-other-warehousing/scan-show-other-warehousing?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)) + '&sourcePage=scan-Warehousing-processing',
- })
- } else if (item.entryKindName == "采购入库") {
- wx.navigateTo({
- url: 'add/add?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)),
- })
- } else if (item.entryKindName == "销售回库") {
- wx.navigateTo({
- url: '/package7/pages/sales-return-reversal/sales-return-reversal?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)) + '&sourcePage=sales-return-reversal-add'+ '&scanflag=true',
- })
- }
-
- },
- /**
- * @desc : 跳转入库办理
- * @author : 王英杰
- * @date : 2023年9月5日
- */
- toOutboundProcessing(e) {
- this.setData({
- showShare: false
- })
- let item = e.currentTarget.dataset.item
- if (item.entryKindName == "其他入库") {
- wx.navigateTo({
- url: '/package7/pages/scan-show-other-warehousing/scan-show-other-warehousing?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)) + '&sourcePage=Warehousing-processing',
- })
- } else if (item.entryKindName == "采购入库") {
- wx.navigateTo({
- url: 'add/add?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)) + '&sourcePage=scan-show-purchase',
- })
- } else if (item.entryKindName == "销售回库") {
- wx.navigateTo({
- url: '/package7/pages/sales-return-reversal/sales-return-reversal?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)) + '&sourcePage=sales-return-reversal-add',
- })
- }
- },
- //入库撤回
- toRevokel(e) {
- this.setData({
- showShare: false
- })
- let item = e.currentTarget.dataset.item
- if (item.entryKindName == "其他入库") {
- wx.navigateTo({
- url: '/package7/pages/receipt-rollback/receipt-rollback?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)) + '&sourcePage=outbound-withdrawal',
- })
- } else if (item.entryKindName == "采购入库") {
- wx.navigateTo({
- url: 'add/add?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)) + '&sourcePage=scan-show-purchase',
- })
- } else if (item.entryKindName == "销售回库") {
- wx.navigateTo({
- url: '/package7/pages/sales-return-details/sales-return-details?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)) + '&sourcePage=sales-return-details',
- })
- }
- },
- /**
- * @desc : 列表右上角三个点触发事件
- * @author : 王英杰
- * @date : 2023年8月21日
- */
- onclik(e) {
- this.setData({
- bottomItem: e.currentTarget.dataset.item,
- showShare: true
- })
- },
- /** 复制事件 */
- toCopy(e) {
- let copyValue = e.currentTarget.dataset.text
- if (!copyValue) return;
- wx.setClipboardData({
- data: copyValue,
- success: res => {
- wx.showToast({
- title: "出库单号" +
- '已复制',
- duration: 1000,
- })
- }
- })
- },
- /**
- * @desc : 列表右上角三个点关闭触发事件
- * @author : wangyingjie
- * @date : 2023年8月21日
- */
- onCloseShare() {
- this.setData({
- showShare: false
- })
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- //订单新建
- // let ORDER_OUTBOUND = common.hasButtonRight(Constants.ORDER_OUTBOUND)
- this.setData({
- ORDER_OUTBOUND: true,
- })
- },
- onShow(options) {
- this.selectComponent("#pick").toggle(false) //取消选中样式
- this.doSearch();
- },
- /**
- * @desc : 小程序出库办理查询
- * @author : 王英杰
- * @date : 2023年8月21日
- */
- doSearch() {
- let pageInfo = this.data.pageInfo;
- pageInfo.pageSize = 10;
- pageInfo.currentPage = 1;
- this.setData({
- show: false,
- noMore: false,
- pageInfo: pageInfo,
- totallength: 0, //合计
- selectlength: 0, //单数
- list: [],
- })
- this.getData()
- },
- /**
- * @desc : 小程序出库办理分页查询
- * @author : 王英杰
- * @date : 2023年8月21日
- */
- getData(e) {
-
- //日期相关
- var createtime = this.selectComponent('#createtime');
- this.setData({
- createTimeSearch: [createtime.data.dataDefaultSearch[0].replaceAll('/', '-'), createtime.data.dataDefaultSearch[1].replaceAll('/', '-')]
- })
- let searchForm = this.data.searchForm
- let pageInfo = this.data.pageInfo
- let param = {
- pageSize: pageInfo.pageSize,
- currentPage: pageInfo.currentPage
- }
- param.screenCondition = this.data.searchText ? this.data.searchText : '' //查询框
- param.opCreateTimeStart = this.data.createTimeSearch[0] ? this.data.createTimeSearch[0] + ' 00:00:00' : '' // 开始时间
- param.opCreateTimeEnd = this.data.createTimeSearch[1] ? this.data.createTimeSearch[1] + ' 23:59:59' : '' //结束时间
- //判断是否选择入库选中的时间
- if (searchForm.deliveryTimeList.length > 0) {
- param.deliveryTimeStart = searchForm.deliveryTimeList[0] ? searchForm.deliveryTimeList[0] : ''
- param.deliveryTimeEnd = searchForm.deliveryTimeList[1] ? searchForm.deliveryTimeList[1] : ''
- }
- if (searchForm.warehousingTimeList.length > 0) {
- param.entryDateStart = searchForm.warehousingTimeList[0] ? searchForm.warehousingTimeList[0] : ''
- param.entryDateEnd = searchForm.warehousingTimeList[1] ? searchForm.warehousingTimeList[1] : ''
- }
- if (this.data.active == 0) { //待出库
- if (searchForm.checked) { //筛选--选择查看冲正数据
- param.entryStatuses = [-1]
- } else {
- param.entryStatuses = [2, 4]
- }
- } else { //已出库
- if (searchForm.checked) { //筛选--选择查看冲正数据
- param.entryStatuses = [-2]
- } else {
- param.entryStatuses = [3]
- }
- }
- param.entryKinds = searchForm.entryKinds
- param.entryReasons = searchForm.entryReasons
- param.customerNameEntry = searchForm.customerName
- param.customerPhoneEntry = searchForm.customerPhone
- param.addressFullEntry = searchForm.addressFullReturn
- param.supplierName = searchForm.supplierName
- let tList =
- [
- {
- "entryId": 523,
- "customerId": 1022,
- "customerName": "怀化辰溪恒洁卫浴",
- "customerPhone": "15096295820",
- "contactName": "营养快线",
- "contactPhones": "17642008208",
- "salesChannel": null,
- "orgId": 30883,
- "entryNo": "WE-0726-726-202310270KDB",
- "supplierId": 114,
- "orderId": 8680,
- "orderNo": "PA-0726-726-202310270KD9",
- "entryStatus": 2,
- "sumEntryGoingQuantity": 300,
- "sumEntryGoingAmount": 500000,
- "sumEntryQuantity": 0,
- "sumEntryAmount": 0,
- "remarks": "AAAA",
- "flgValid": true,
- "cpId": 20834,
- "opCreateTime": "2023-10-27 15:22:15",
- "opCreateUserId": 254,
- "opUpdateTime": "2023-11-14 16:42:55",
- "opUpdateUserId": 74,
- "sale1Id": 20834,
- "sale2Id": 29039,
- "ascpId": 29039,
- "entryKind": "入库类型-采购",
- "entryReason": null,
- "sale1OutId": 1263,
- "staffId": 634,
- "rejectId": null,
- "rejectNo": null,
- "orgName": "辰溪县金海店",
- "entryReasonName": null,
- "responsibleName": null,
- "entryDate": null,
- "sale1OutDate": "2023-10-27",
- "entryWhId": 585,
- "addressArea": null,
- "addressName": null,
- "addressGcj02": null,
- "addressFull": "辽宁省沈阳市浑南区辽宁心选网络科技有限公司1111B🙄",
- "sale2IvtType": null,
- "whName": "1",
- "makingUser": 74,
- "salesChannelCode": null,
- "doneUser": 74,
- "doneTime": "2023-11-14 16:41:19",
- "orderEntryItemList": null,
- "entryStatusName": "入库中",
- "entryObjectName": "怀化辰溪恒洁卫浴",
- "erpOutNo": "CSSAYYY23102700002",
- "categoryQuantity": null,
- "staffName": "姜宁",
- "sale1ErpOutDoneNo": "CSIDYYY23102700002",
- "flgAllowTodone": null,
- "flgAllowReverse": true,
- "entryObjectId": 1022,
- "entryObjectType": 1,
- "sale2Name": null,
- "procureOrderNo": null,
- "invoiceDate": null,
- "entryKindName": "采购入库",
- "supplierName": "怀化辰溪恒洁卫浴-供应商",
- "statusName": null,
- "inOutStatus": null,
- "inOutDate": null,
- "sumQuantity": null,
- "sumAmount": null,
- "consignee": null,
- "consigneePhone": null,
- "takeOverAddress": null,
- "makingUserName": "常皓宁",
- "doneUserName": null,
- "makingTime": "2023/11/14 16:41:19",
- "totalRemarks": null,
- "entryStatusString": null,
- "nonStandardCode": null,
- "annexPaths": [
- {
- "url": "https://hgscrm-dev.oss-cn-shenzhen.aliyuncs.com/test/t_order_entry/annex_paths/2023-11-02/6042cfcb-323e-4d35-8ca7-2cc0634f115a.jpg"
- },
- {
- "url": "https://hgscrm-dev.oss-cn-shenzhen.aliyuncs.com/test/t_order_entry/annex_paths/2023-11-02/a363d70b-ef4d-4fef-a69d-5f2d2b3c831d.png"
- },
- {
- "url": "https://hgscrm-dev.oss-cn-shenzhen.aliyuncs.com/test/t_order_entry/annex_paths/2023-11-02/e4e40703-68a3-414a-926f-dd52475955b6.jpg"
- }
- ],
- "supplierContactName": null,
- "supplierContactPhone": null,
- "supplierAddressFull": null,
- "outNo": null,
- "outId": null,
- "outTime": null,
- "receiverName": null,
- "receiverPhone": null,
- "receiverAddress": null,
- "editTime": null,
- "saveAscpId": null,
- "addressNo": null,
- "contractNo": null,
- "customerFrom": null,
- "toiletCount": null,
- "toiletCountName": null,
- "houseType": null,
- "houseTypeName": null,
- "fitupType": null,
- "fitupTypeName": null,
- "fitupStyle": null,
- "fitupStyleName": null,
- "ageComposition": null,
- "ageCompositionName": null,
- "decisionMaker": null,
- "decisionMakerName": null,
- "deliveryTypeName": null,
- "fromName": null,
- "sumRejectQuantity": -2,
- "sumRejectAmount": -5000,
- "docCode": null,
- "sale2OpeMode": null,
- "sentryId": null
- },
- {
- "entryId": 486,
- "customerId": null,
- "customerName": '王软',
- "customerPhone": '13900138000',
- "contactName": null,
- "contactPhones": null,
- "salesChannel": null,
- "orgId": 30883,
- "entryNo": "WE-0726-555-202310260K7I",
- "supplierId": null,
- "orderId": null,
- "orderNo": null,
- "entryStatus": 2,
- "sumEntryGoingQuantity": 1,
- "sumEntryGoingAmount": 0,
- "sumEntryQuantity": 0,
- "sumEntryAmount": 0,
- "remarks": null,
- "flgValid": true,
- "cpId": 20834,
- "opCreateTime": "2023-10-26 15:20:31",
- "opCreateUserId": 937,
- "opUpdateTime": "2023-10-26 15:20:31",
- "opUpdateUserId": 937,
- "sale1Id": 20834,
- "sale2Id": 29039,
- "ascpId": 29039,
- "entryKind": "入库类型-其他",
- "entryReason": 193,
- "sale1OutId": null,
- "staffId": 937,
- "rejectId": null,
- "rejectNo": null,
- "orgName": "辰溪县金海店",
- "entryReasonName": "库存盘盈",
- "responsibleName": null,
- "entryDate": "2023-10-26",
- "sale1OutDate": null,
- "entryWhId": null,
- "addressArea": null,
- "addressName": null,
- "addressGcj02": null,
- "addressFull": '沈阳市国际软件园F9-102',
- "sale2IvtType": null,
- "whName": null,
- "makingUser": 937,
- "salesChannelCode": null,
- "doneUser": 937,
- "doneTime": "2023-10-26 15:20:31",
- "orderEntryItemList": null,
- "entryStatusName": "入库中",
- "entryObjectName": null,
- "erpOutNo": null,
- "categoryQuantity": 1,
- "staffName": "张德亮",
- "sale1ErpOutDoneNo": null,
- "flgAllowTodone": null,
- "flgAllowReverse": null,
- "entryObjectId": null,
- "entryObjectType": null,
- "sale2Name": null,
- "procureOrderNo": null,
- "invoiceDate": null,
- "entryKindName": "退货回库",
- "supplierName": null,
- "statusName": null,
- "inOutStatus": null,
- "inOutDate": null,
- "sumQuantity": null,
- "sumAmount": null,
- "consignee": null,
- "consigneePhone": null,
- "takeOverAddress": null,
- "makingUserName": "张德亮",
- "doneUserName": null,
- "makingTime": "2023/10/26 15:20:31",
- "totalRemarks": null,
- "entryStatusString": null,
- "nonStandardCode": null,
- "annexPaths": [],
- "supplierContactName": null,
- "supplierContactPhone": null,
- "supplierAddressFull": null,
- "outNo": null,
- "outId": null,
- "outTime": null,
- "receiverName": null,
- "receiverPhone": null,
- "receiverAddress": null,
- "editTime": null,
- "saveAscpId": null,
- "addressNo": null,
- "contractNo": null,
- "customerFrom": null,
- "toiletCount": null,
- "toiletCountName": null,
- "houseType": null,
- "houseTypeName": null,
- "fitupType": null,
- "fitupTypeName": null,
- "fitupStyle": null,
- "fitupStyleName": null,
- "ageComposition": null,
- "ageCompositionName": null,
- "decisionMaker": null,
- "decisionMakerName": null,
- "deliveryTypeName": null,
- "fromName": null,
- "sumRejectQuantity": 0,
- "sumRejectAmount": 0,
- "docCode": null,
- "sale2OpeMode": null,
- "sentryId": null
- },
- {
- "entryId": 418,
- "customerId": null,
- "customerName": null,
- "customerPhone": null,
- "contactName": null,
- "contactPhones": null,
- "salesChannel": null,
- "orgId": 30883,
- "entryNo": "WE-0726-555-202310180JT6",
- "supplierId": null,
- "orderId": null,
- "orderNo": null,
- "entryStatus": 2,
- "sumEntryGoingQuantity": 1,
- "sumEntryGoingAmount": 0,
- "sumEntryQuantity": 0,
- "sumEntryAmount": 0,
- "remarks": null,
- "flgValid": true,
- "cpId": 20834,
- "opCreateTime": "2023-10-18 10:58:31",
- "opCreateUserId": 643,
- "opUpdateTime": "2023-10-18 10:58:31",
- "opUpdateUserId": 643,
- "sale1Id": 20834,
- "sale2Id": 29039,
- "ascpId": 29039,
- "entryKind": "入库类型-其他",
- "entryReason": 192,
- "sale1OutId": null,
- "staffId": 643,
- "rejectId": null,
- "rejectNo": null,
- "orgName": "辰溪县金海店",
- "entryReasonName": "其他采购",
- "responsibleName": null,
- "entryDate": "2023-10-18",
- "sale1OutDate": null,
- "entryWhId": null,
- "addressArea": null,
- "addressName": null,
- "addressGcj02": null,
- "addressFull": null,
- "sale2IvtType": null,
- "whName": null,
- "makingUser": 643,
- "salesChannelCode": null,
- "doneUser": 643,
- "doneTime": "2023-10-18 10:58:30",
- "orderEntryItemList": null,
- "entryStatusName": "入库中",
- "entryObjectName": null,
- "erpOutNo": null,
- "categoryQuantity": 1,
- "staffName": "王英杰",
- "sale1ErpOutDoneNo": null,
- "flgAllowTodone": null,
- "flgAllowReverse": null,
- "entryObjectId": null,
- "entryObjectType": null,
- "sale2Name": null,
- "procureOrderNo": null,
- "invoiceDate": null,
- "entryKindName": "其他入库",
- "supplierName": null,
- "statusName": null,
- "inOutStatus": null,
- "inOutDate": null,
- "sumQuantity": null,
- "sumAmount": null,
- "consignee": null,
- "consigneePhone": null,
- "takeOverAddress": null,
- "makingUserName": "王英杰",
- "doneUserName": null,
- "makingTime": "2023/10/18 10:58:30",
- "totalRemarks": null,
- "entryStatusString": null,
- "nonStandardCode": null,
- "annexPaths": [],
- "supplierContactName": null,
- "supplierContactPhone": null,
- "supplierAddressFull": null,
- "outNo": null,
- "outId": null,
- "outTime": null,
- "receiverName": null,
- "receiverPhone": null,
- "receiverAddress": null,
- "editTime": null,
- "saveAscpId": null,
- "addressNo": null,
- "contractNo": null,
- "customerFrom": null,
- "toiletCount": null,
- "toiletCountName": null,
- "houseType": null,
- "houseTypeName": null,
- "fitupType": null,
- "fitupTypeName": null,
- "fitupStyle": null,
- "fitupStyleName": null,
- "ageComposition": null,
- "ageCompositionName": null,
- "decisionMaker": null,
- "decisionMakerName": null,
- "deliveryTypeName": null,
- "fromName": null,
- "sumRejectQuantity": 0,
- "sumRejectAmount": 0,
- "docCode": null,
- "sale2OpeMode": null,
- "sentryId": null
- },
- {
- "entryId": 416,
- "customerId": null,
- "customerName": null,
- "customerPhone": null,
- "contactName": null,
- "contactPhones": null,
- "salesChannel": null,
- "orgId": 30883,
- "entryNo": "WE-0726-555-202310170JSR",
- "supplierId": null,
- "orderId": null,
- "orderNo": null,
- "entryStatus": 2,
- "sumEntryGoingQuantity": 1,
- "sumEntryGoingAmount": 0,
- "sumEntryQuantity": 0,
- "sumEntryAmount": 0,
- "remarks": null,
- "flgValid": true,
- "cpId": 20834,
- "opCreateTime": "2023-10-17 17:21:13",
- "opCreateUserId": 643,
- "opUpdateTime": "2023-10-17 17:21:13",
- "opUpdateUserId": 643,
- "sale1Id": 20834,
- "sale2Id": 29039,
- "ascpId": 29039,
- "entryKind": "入库类型-其他",
- "entryReason": 193,
- "sale1OutId": null,
- "staffId": 643,
- "rejectId": null,
- "rejectNo": null,
- "orgName": "辰溪县金海店",
- "entryReasonName": "库存盘盈",
- "responsibleName": null,
- "entryDate": "2023-10-17",
- "sale1OutDate": null,
- "entryWhId": null,
- "addressArea": null,
- "addressName": null,
- "addressGcj02": null,
- "addressFull": null,
- "sale2IvtType": null,
- "whName": null,
- "makingUser": 643,
- "salesChannelCode": null,
- "doneUser": 643,
- "doneTime": "2023-10-17 17:21:12",
- "orderEntryItemList": null,
- "entryStatusName": "入库中",
- "entryObjectName": null,
- "erpOutNo": null,
- "categoryQuantity": 1,
- "staffName": "王英杰",
- "sale1ErpOutDoneNo": null,
- "flgAllowTodone": null,
- "flgAllowReverse": null,
- "entryObjectId": null,
- "entryObjectType": null,
- "sale2Name": null,
- "procureOrderNo": null,
- "invoiceDate": null,
- "entryKindName": "其他入库",
- "supplierName": null,
- "statusName": null,
- "inOutStatus": null,
- "inOutDate": null,
- "sumQuantity": null,
- "sumAmount": null,
- "consignee": null,
- "consigneePhone": null,
- "takeOverAddress": null,
- "makingUserName": "王英杰",
- "doneUserName": null,
- "makingTime": "2023/10/17 17:21:12",
- "totalRemarks": null,
- "entryStatusString": null,
- "nonStandardCode": null,
- "annexPaths": [],
- "supplierContactName": null,
- "supplierContactPhone": null,
- "supplierAddressFull": null,
- "outNo": null,
- "outId": null,
- "outTime": null,
- "receiverName": null,
- "receiverPhone": null,
- "receiverAddress": null,
- "editTime": null,
- "saveAscpId": null,
- "addressNo": null,
- "contractNo": null,
- "customerFrom": null,
- "toiletCount": null,
- "toiletCountName": null,
- "houseType": null,
- "houseTypeName": null,
- "fitupType": null,
- "fitupTypeName": null,
- "fitupStyle": null,
- "fitupStyleName": null,
- "ageComposition": null,
- "ageCompositionName": null,
- "decisionMaker": null,
- "decisionMakerName": null,
- "deliveryTypeName": null,
- "fromName": null,
- "sumRejectQuantity": 0,
- "sumRejectAmount": 0,
- "docCode": null,
- "sale2OpeMode": null,
- "sentryId": null
- },
-
- ]
- this.setData({
- totallength: 10, //合计
- selectTotallength: 10, //数量
- list: tList
- })
- this.setData({
- selectlength: this.data.list.length, //单数
- })
- // api.request(Constants.OTHER_IN + 'list_by', 'POST', param).then(res => {
- // this.setData({
- // loading: false
- // })
- // if (res.data.code === 200) {
- // let tList = this.data.list;
- // let list = res.data.data.list; //后台返回数据
- // if (!list || list.length == 0) {
- // // 如果不是翻页,需要清空
- // if (e != 'more') {
- // this.setData({
- // list: [],
- // noMore: false
- // })
- // } else {
- // this.setData({
- // noMore: true
- // })
- // }
- // return
- // }
- // if (list.length < this.data.pageInfo.pageSize) {
- // this.setData({
- // noMore: false
- // })
- // }
- // tList = tList.concat(list)
- // let sumAmountTotal = 0
- // let sumQuantityTotal = 0
- // tList.forEach(res => {
- // let num1 = util.numAdd(Number(res.sumEntryAmount), Number(sumAmountTotal))
- // let num2 = util.numAdd(Number(res.sumEntryGoingQuantity), Number(sumQuantityTotal))
- // sumAmountTotal = num1
- // sumQuantityTotal = num2
- // })
- // if (tList.length > 0) {
- // tList.forEach(item => {
- // if (item.addressFull == 'undefined') {
- // item.addressFull = null
- // }
- // if (item.makingTime) {
- // item.makingTime = (item.makingTime).replace(/\-/g, "/")
- // }
- // });
- // }
- // this.setData({
- // totallength: sumQuantityTotal, //合计
- // selectTotallength: sumQuantityTotal, //数量
- // list: tList
- // })
- // this.setData({
- // selectlength: this.data.list.length, //单数
- // })
- // }
- // })
- },
- changField(e) {
- let searchForm = this.data.searchForm
- searchForm[e.currentTarget.dataset.key] = e.detail
- this.setData({
- searchForm: searchForm
- })
- },
- /**
- * @desc : 日期组件后的回调
- * @author : wyj
- * @date : 2023年8月17日
- */
- dateCommit(e) {
- let dateType = e.detail.dateType
- if (dateType === 'createtime') {
- let data = e.detail.date
- this.setData({
- createTimeSearch: data,
- createTimeType: e.detail.dateDefault
- })
- this.selectComponent('#create-time-type').toggle();
- }
- this.doSearch()
- },
- /**
- * @desc : 筛选抽屉打开
- * @author : 王英杰
- * @date : 2023年8月17日
- */
- openSearchPop() {
- this.setData({
- show: true
- })
- },
- /**
- * @desc : 抽屉离焦关闭
- * @author : 王英杰
- * @date : 2023年8月17日
- */
- onClose() {
- this.setData({
- show: false
- })
- this.selectComponent("#pick").toggle(false) //取消选中样式
- },
- /**
- * @desc : 抽屉确定
- * @author : 王英杰
- * @date : 2023年8月17日
- */
- doSearchData(e) {
- this.selectComponent("#pick").toggle(false) //取消选中样式
- this.setData({
- show: false,
- searchFormNumber: e.detail.searchFormNumber
- })
- // 查询数据
- this.doSearch()
- },
- /**
- * @desc : 筛选抽屉关闭
- * @author : 于继渤
- * @date : 2022/5/27 12:16
- */
- closeSearchPop() {
- this.selectComponent("#pick").toggle(false) //取消选中样式
- this.setData({
- show: false
- })
- },
- /**
- * @desc : 筛选重置事件
- * @author : 王英杰
- * @date : 2023年8月17日
- */
- clearSearchForm() {
- let searchForm = {
- checked: false,
- entryKinds: [],
- entryReasons: [],
- customerName: '',
- customerPhone: '',
- addressFullReturn: '',
- supplierName: '',
- warehousingTime: '',
- warehousingTimeList: [],
- deliveryTime: '',
- deliveryTimeList: [],
- }
- this.selectComponent("#receiptType").clearForm()
- this.selectComponent("#receiptReason").clearForm()
- this.setData({
- searchForm: searchForm
- })
- },
- /**
- * @desc : 筛选数据源组件点击事件
- * @author : 于继渤
- * @date : 2022/5/31 08:59
- */
- onClickTag(e) {
- console.log("onClickTag", e)
- let key = e.detail.key
- let dataList = e.detail.dataList
- let searchForm = this.data.searchForm
- if (key === 'receiptType') { //入库类型
- searchForm.entryKinds = dataList
- }
- if (key === 'receiptReason') { //入库原因
- searchForm.entryReasons = dataList
- }
- this.setData({
- searchForm
- })
- },
- /**
- * @desc : 筛选时间打开事件
- * @author :王英杰
- * @date : 2023年8月21日
- */
- onClickTime(e) {
- let key = e.currentTarget.dataset.key
- if (key === 'deliveryTime') {
- this.setData({
- deliveryTimeDefaultSearch: new Date().getTime() + 100,
- deliveryFlag: true
- })
- }
- //入库日期
- if (key === 'warehousingTime') {
- this.setData({
- warehousingTimeDefaultSearch: new Date().getTime() + 100,
- warehousingFlag: true
- })
- }
- },
- /**
- * 时间
- * @param {} e
- */
- onConfirmChooseDate(e) {
- let searchForm = this.data.searchForm
- let deliveryTime = searchForm.deliveryTime
- deliveryTime = e.detail.date[0] + '-' + e.detail.date[1]
- searchForm.deliveryTime = deliveryTime
- searchForm.deliveryTimeList = e.detail.date;
- this.setData({
- searchForm: searchForm,
- })
- },
- /**
- * 时间
- * @param {} e
- */
- onConfirmChooseWarehousingDate(e) {
- let searchForm = this.data.searchForm
- let warehousingTime = searchForm.warehousingTime
- warehousingTime = e.detail.date[0] + '-' + e.detail.date[1]
- searchForm.warehousingTime = warehousingTime
- searchForm.warehousingTimeList = e.detail.date;
- this.setData({
- searchForm: searchForm,
- })
- },
- onChangeTabs(e) {
- let title = e.detail.title
- console.log("qeaqwewa", e)
- this.setData({
- active: e.detail.name
- })
- this.doSearch()
- },
- /** 跳转其他入库 */
- submit() {
- wx.navigateTo({
- url: 'choose-sku-product/choose-sku-product?sourcePage=' + 'warehousingProcessing' + '&title=其他出库',
- })
- // wx.navigateTo({
- // url: './detail/detail?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)),
- // })
- },
- //冲正重开
- toReverse(e) {
- if (this.data.loading) {
- return
- }
- let item = e.currentTarget.dataset.item
- if (item.entryKindName == "其他入库") {
- this.otherOutboundReversal(item)
- }
-
- },
-
- //其他出库冲正
- otherOutboundReversal(item) {
- let param = {
- sale1Id: app.globalData.user.sale1Id,
- sale2Id: app.globalData.user.sale2Id,
- cpId: app.globalData.user.cpId,
- ascpId: app.globalData.user.ascpId,
- entryId: item.entryId
- }
- this.setData({
- loading: true
- })
- api.request(Constants.OTHER_IN + 'order_entry_other_reverse', 'POST', param).then(res => {
- this.setData({
- loading: false
- })
- if (res.data.code === 200) {
- this.doSearch()
- this.setData({
- showShare: false
- })
- }
- })
- },
- })
|