|
@@ -1,7 +1,7 @@
|
|
|
/*******************************************************************************
|
|
/*******************************************************************************
|
|
|
* Copyright(c) 2022 dongke All rights reserved. / Confidential
|
|
* Copyright(c) 2022 dongke All rights reserved. / Confidential
|
|
|
* 类的信息:
|
|
* 类的信息:
|
|
|
- * 1.程序名称: 入库办理列表
|
|
|
|
|
|
|
+ * 1.程序名称: 入库办理列表-采购入库 其它入库 销售退货出库的数据240408
|
|
|
* 编辑履历:
|
|
* 编辑履历:
|
|
|
* 作者 日期 版本 修改内容
|
|
* 作者 日期 版本 修改内容
|
|
|
* 姜永辉 2024-03-12 1.00
|
|
* 姜永辉 2024-03-12 1.00
|
|
@@ -179,7 +179,7 @@ Page({
|
|
|
// 路由
|
|
// 路由
|
|
|
routeObjName: 'inboundProcessing',
|
|
routeObjName: 'inboundProcessing',
|
|
|
inboundOtherService: app.globalData['inboundOtherService'],
|
|
inboundOtherService: app.globalData['inboundOtherService'],
|
|
|
- inboundReturnService: app.globalData['inboundReturnService'],
|
|
|
|
|
|
|
+ outboundSaleReturnService: app.globalData['outboundSaleReturnService'],
|
|
|
// active
|
|
// active
|
|
|
active: 0,
|
|
active: 0,
|
|
|
// 主键Id
|
|
// 主键Id
|
|
@@ -196,6 +196,20 @@ Page({
|
|
|
this.setData({
|
|
this.setData({
|
|
|
active: index,
|
|
active: index,
|
|
|
})
|
|
})
|
|
|
|
|
+ let buttonList = this.data.buttonList
|
|
|
|
|
+ buttonList = buttonList.filter(item => item.name !== 'returnCancel')
|
|
|
|
|
+ console.log();
|
|
|
|
|
+ if (index == 1 && buttonList.length == 3) {
|
|
|
|
|
+ buttonList.push(
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'returnCancel',
|
|
|
|
|
+ title: mixins.$t('returnCancel'),
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ buttonList,
|
|
|
|
|
+ })
|
|
|
this.searchData()
|
|
this.searchData()
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -213,6 +227,39 @@ Page({
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 跳转明细
|
|
|
|
|
+ * @author : 周兴
|
|
|
|
|
+ * @date : 2024/1/22
|
|
|
|
|
+ */
|
|
|
|
|
+ toDetail(e) {
|
|
|
|
|
+ console.log(e, "toDetail");
|
|
|
|
|
+ if (e) {
|
|
|
|
|
+ let item = null;
|
|
|
|
|
+ if (e.currentTarget.dataset.item) {
|
|
|
|
|
+ item = e.currentTarget.dataset.item
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!e.detail) {
|
|
|
|
|
+ e.detail = {
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item) {
|
|
|
|
|
+ e.detail.item = item;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (e.detail.item) {
|
|
|
|
|
+ let button = {
|
|
|
|
|
+ formMode: Constants.formMode.edit
|
|
|
|
|
+ }
|
|
|
|
|
+ e.detail.item.button = button
|
|
|
|
|
+ }
|
|
|
|
|
+ // 如果name不传递,默认为edit
|
|
|
|
|
+
|
|
|
|
|
+ e.detail.name = 'edit'
|
|
|
|
|
+ }
|
|
|
|
|
+ this.open(e);
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @desc : 设置查询参数
|
|
* @desc : 设置查询参数
|
|
|
* @date : 2024年3月8日
|
|
* @date : 2024年3月8日
|
|
@@ -224,7 +271,7 @@ Page({
|
|
|
params.intoStatus = Constants.intoStatus.inBounding
|
|
params.intoStatus = Constants.intoStatus.inBounding
|
|
|
params.outStatus = Constants.outStatus.outBounding
|
|
params.outStatus = Constants.outStatus.outBounding
|
|
|
}
|
|
}
|
|
|
- if (this.data.active == 1) {
|
|
|
|
|
|
|
+ if (this.data.active == 1) {
|
|
|
//已入库的查询参数
|
|
//已入库的查询参数
|
|
|
params.intoStatus = Constants.intoStatus.inBounded
|
|
params.intoStatus = Constants.intoStatus.inBounded
|
|
|
params.outStatus = Constants.outStatus.outBounded
|
|
params.outStatus = Constants.outStatus.outBounded
|
|
@@ -299,12 +346,47 @@ Page({
|
|
|
contentnFootList,
|
|
contentnFootList,
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @desc : (编辑)
|
|
|
|
|
|
|
+ * @desc : (撤销)
|
|
|
* @date : 2024/2/1 15:49
|
|
* @date : 2024/2/1 15:49
|
|
|
* @author : 姜永辉
|
|
* @author : 姜永辉
|
|
|
*/
|
|
*/
|
|
|
|
|
+ returnCancel(e) {
|
|
|
|
|
+ let item = e
|
|
|
|
|
+ let id = item.intoId
|
|
|
|
|
+ // 采购入库
|
|
|
|
|
+ if (item.intoType == Constants.intoType.pur) {
|
|
|
|
|
+ this.excute(this.data.service, this.data.service.inBoundCancel, item).then(res => {
|
|
|
|
|
+ if (res.data.code == Constants.SUCESS_CODE) {
|
|
|
|
|
+ // 重新查询
|
|
|
|
|
+ this.searchData()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ // 其他入库
|
|
|
|
|
+ else if (item.intoType == Constants.intoType.other) {
|
|
|
|
|
+ this.excute(this.data.inboundOtherService, this.data.inboundOtherService.inBoundCancel, item).then(res => {
|
|
|
|
|
+ if (res.data.code == Constants.SUCESS_CODE) {
|
|
|
|
|
+ // 重新查询
|
|
|
|
|
+ this.searchData()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ // 销售退货
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.excute(this.data.outboundSaleReturnService, this.data.outboundSaleReturnService.cancel, { outId: id }).then(res => {
|
|
|
|
|
+ if (res.data.code == Constants.SUCESS_CODE) {
|
|
|
|
|
+ // 重新查询
|
|
|
|
|
+ this.searchData()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : (编辑)
|
|
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
|
|
+ * @author : 姜永辉
|
|
|
|
|
+ */
|
|
|
editOrder(e) {
|
|
editOrder(e) {
|
|
|
let item = e
|
|
let item = e
|
|
|
let id = item.intoId
|
|
let id = item.intoId
|
|
@@ -339,7 +421,7 @@ Page({
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- // 采购退货
|
|
|
|
|
|
|
+ // 销售退货
|
|
|
} else {
|
|
} else {
|
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
|
url: this.data.route.addReturn.url,
|
|
url: this.data.route.addReturn.url,
|
|
@@ -350,7 +432,8 @@ Page({
|
|
|
success: function (res) {
|
|
success: function (res) {
|
|
|
res.eventChannel.emit('params', {
|
|
res.eventChannel.emit('params', {
|
|
|
id: id,
|
|
id: id,
|
|
|
- formMode: Constants.formMode.edit
|
|
|
|
|
|
|
+ formMode: Constants.formMode.other,
|
|
|
|
|
+ formType: Constants.formType.edit,
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -383,9 +466,9 @@ Page({
|
|
|
this.searchData()
|
|
this.searchData()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- // 采购退货
|
|
|
|
|
|
|
+ // 销售退货
|
|
|
} else {
|
|
} else {
|
|
|
- this.excute(this.data.inboundReturnService, this.data.inboundReturnService.cancel, { intoId: id }).then(res => {
|
|
|
|
|
|
|
+ this.excute(this.data.outboundSaleReturnService, this.data.outboundSaleReturnService.outboundRepeal + id, null).then(res => {
|
|
|
if (res.data.code == Constants.SUCESS_CODE) {
|
|
if (res.data.code == Constants.SUCESS_CODE) {
|
|
|
// 重新查询
|
|
// 重新查询
|
|
|
this.searchData()
|
|
this.searchData()
|