|
@@ -118,35 +118,33 @@ Page({
|
|
|
title: mixins.$t("adddressFull")
|
|
title: mixins.$t("adddressFull")
|
|
|
}]
|
|
}]
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
// 弹出按钮
|
|
// 弹出按钮
|
|
|
buttonList: [
|
|
buttonList: [
|
|
|
-
|
|
|
|
|
- {
|
|
|
|
|
- name: 'saleOutBound', title: mixins.$t("saleOutBound"), formMode: Constants.formMode.other, other: { idKey: 'orderId' },
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ { name: 'saleOutBound', title: mixins.$t("saleOutBound"), formMode: Constants.formMode.other, other: { idKey: 'orderId' } },//出库
|
|
|
{
|
|
{
|
|
|
name: 'saleOrderReturn', title: mixins.$t("saleReturn"), formMode: Constants.formMode.other, other: {
|
|
name: 'saleOrderReturn', title: mixins.$t("saleReturn"), formMode: Constants.formMode.other, other: {
|
|
|
idKey: 'orderId'
|
|
idKey: 'orderId'
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- { name: 'collection', title: mixins.$t("cusCollection") },
|
|
|
|
|
- { name: 'merge', title: mixins.$t("printedBill") },
|
|
|
|
|
- { name: 'cancel', title: mixins.$t("invaidOrder") }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ },//退货
|
|
|
|
|
+ { name: 'collection', title: mixins.$t("cusCollection") },//收款
|
|
|
|
|
+ { name: 'merge', title: mixins.$t("printedBill") }, //打印
|
|
|
|
|
+ { name: 'invalid', title: mixins.$t("invaidOrder") } //作废
|
|
|
],
|
|
],
|
|
|
-
|
|
|
|
|
buttonSaveList: [{ code: 'add', title: mixins.$t("add") }],
|
|
buttonSaveList: [{ code: 'add', title: mixins.$t("add") }],
|
|
|
- contentSaveList: [{ code: 'need', title: mixins.$t("totalAmount"), type: 'str' }, { code: 'amount', content: 2000, type: 'number' }]
|
|
|
|
|
|
|
+ contentSaveList: [{ code: 'need', title: mixins.$t("totalAmount"), type: 'str' }, { code: 'amount', content: 0, type: 'number' }, {
|
|
|
|
|
+ type: 'count',
|
|
|
|
|
+ code: 'count',
|
|
|
|
|
+ bill: 0,
|
|
|
|
|
+ quantity: 0
|
|
|
|
|
+ }]
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
- //statusName
|
|
|
|
|
/**
|
|
/**
|
|
|
* @desc : 处理接口返回数据
|
|
* @desc : 处理接口返回数据
|
|
|
* @date : 2024年3月8日
|
|
* @date : 2024年3月8日
|
|
|
- * @author : 王英杰
|
|
|
|
|
|
|
+ * @author : 于继渤
|
|
|
*/
|
|
*/
|
|
|
handleSearchData(tableData) {
|
|
handleSearchData(tableData) {
|
|
|
-
|
|
|
|
|
tableData.forEach(res => {
|
|
tableData.forEach(res => {
|
|
|
if (res.outStatus !== Constants.outStatus.unOutBound) { //处理状态
|
|
if (res.outStatus !== Constants.outStatus.unOutBound) { //处理状态
|
|
|
res.statusName = res.outStatusName
|
|
res.statusName = res.outStatusName
|
|
@@ -158,10 +156,25 @@ Page({
|
|
|
this.setData({
|
|
this.setData({
|
|
|
tableData: tableData
|
|
tableData: tableData
|
|
|
})
|
|
})
|
|
|
|
|
+ //计算底部金额
|
|
|
|
|
+ this.calculateTotalAmount()
|
|
|
},
|
|
},
|
|
|
- // CalculateTotalAmount
|
|
|
|
|
- invalid(){
|
|
|
|
|
- console.log('invalid')
|
|
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 作废
|
|
|
|
|
+ * @date : 2024年3月8日
|
|
|
|
|
+ * @author : 于继渤
|
|
|
|
|
+ */
|
|
|
|
|
+ invalid(e) {
|
|
|
|
|
+ return this.excute(this.data.service, this.data.service.invalid + '/' + e.orderId, {}).then(res => {
|
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
|
+ wx.showToast({
|
|
|
|
|
+ title: mixins.$t('invalidSuccessfully'),
|
|
|
|
|
+ image: '/static/image/success.png',
|
|
|
|
|
+ duration: 1000
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* @desc : 加载数据
|
|
* @desc : 加载数据
|
|
@@ -173,6 +186,29 @@ Page({
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * @desc : 计算底部合计金额等
|
|
|
|
|
+ * @date : 2024年4月8日
|
|
|
|
|
+ * @author : 于继渤
|
|
|
|
|
+ */
|
|
|
|
|
+ calculateTotalAmount() {
|
|
|
|
|
+ let tableData = this.data.tableData
|
|
|
|
|
+ let contentSaveList = this.data.contentSaveList
|
|
|
|
|
+ let sumAmount = Number(0)
|
|
|
|
|
+ let sumQuantity = Number(0)
|
|
|
|
|
+ tableData.forEach(res => {
|
|
|
|
|
+ sumAmount += res.sumAmount
|
|
|
|
|
+ sumQuantity += res.sumQuantity
|
|
|
|
|
+ })
|
|
|
|
|
+ contentSaveList[1].content = sumAmount
|
|
|
|
|
+ contentSaveList[2].bill = tableData.length
|
|
|
|
|
+ contentSaveList[2].quantity = sumQuantity
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ contentSaveList: contentSaveList
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
* 生命周期函数--监听页面加载
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
*/
|
|
|
onLoad: function (options) {
|
|
onLoad: function (options) {
|