|
|
@@ -17,32 +17,94 @@ Page({
|
|
|
* 页面的初始数据
|
|
|
*/
|
|
|
data: {
|
|
|
- tagList: [{ title: "全部", code: '' }, { title: "待出库", code: ['出库状态-待出库'] }, { title: "已出库", code: ['出库状态-出库中', '出库状态-已出库'] }],
|
|
|
+ tagList: [{
|
|
|
+ title: "全部",
|
|
|
+ code: ''
|
|
|
+ }, {
|
|
|
+ title: "待出库",
|
|
|
+ code: ['出库状态-待出库']
|
|
|
+ }, {
|
|
|
+ title: "已出库",
|
|
|
+ code: ['出库状态-出库中', '出库状态-已出库']
|
|
|
+ }],
|
|
|
routeObjName: 'order',
|
|
|
// 查询条件
|
|
|
- searchContent: [
|
|
|
- { code: 'createtime', title: mixins.$t("pastThirthtyDays"), defaultValue: 5, searchType: Constants.searchType.date },
|
|
|
- { code: 'staff', title: mixins.$t("staffId"), dropType: 'staff' },
|
|
|
- { code: 'org', title: mixins.$t("orgId"), dropType: 'org' },
|
|
|
- { code: 'choose', title: mixins.$t("choose"), searchType: Constants.searchType.pick }
|
|
|
+ searchContent: [{
|
|
|
+ code: 'createtime',
|
|
|
+ title: mixins.$t("pastThirthtyDays"),
|
|
|
+ defaultValue: 5,
|
|
|
+ searchType: Constants.searchType.date
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'staff',
|
|
|
+ title: mixins.$t("staffId"),
|
|
|
+ dropType: 'staff'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'org',
|
|
|
+ title: mixins.$t("orgId"),
|
|
|
+ dropType: 'org'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'choose',
|
|
|
+ title: mixins.$t("choose"),
|
|
|
+ searchType: Constants.searchType.pick
|
|
|
+ }
|
|
|
],
|
|
|
// 查询条件-筛选
|
|
|
- pullMenuList: [
|
|
|
- { code: 'outStatus', pullType: 'mSelect', typeName: 'outStatus' },
|
|
|
- { code: 'receiveStatus', pullType: 'mSelect', typeName: 'receiveStatus' },
|
|
|
- { code: 'deliveryDate', dataType: 'date' },
|
|
|
- { code: 'viewVoidedDocuments', dataType: 'checkbox' },
|
|
|
+ pullMenuList: [{
|
|
|
+ code: 'outStatus',
|
|
|
+ pullType: 'mSelect',
|
|
|
+ typeName: 'outStatus'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'receiveStatus',
|
|
|
+ pullType: 'mSelect',
|
|
|
+ typeName: 'receiveStatus'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'deliveryDate',
|
|
|
+ dataType: 'date'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'viewVoidedDocuments',
|
|
|
+ dataType: 'checkbox'
|
|
|
+ },
|
|
|
],
|
|
|
// 列表区(脚部金额)
|
|
|
- footerAmount: { name: 'sumAmount', title: mixins.$t("totalAmount") },
|
|
|
+ footerAmount: {
|
|
|
+ name: 'sumAmount',
|
|
|
+ title: mixins.$t("totalAmount")
|
|
|
+ },
|
|
|
// 列表区(脚部信息)
|
|
|
- footerInfo: [{ name: 'sumQuantity', title: mixins.$t("piece"), prefix: mixins.$t("together"), }],
|
|
|
+ footerInfo: [{
|
|
|
+ name: 'sumQuantity',
|
|
|
+ title: mixins.$t("piece"),
|
|
|
+ prefix: mixins.$t("together"),
|
|
|
+ }],
|
|
|
// 列表区(内容)
|
|
|
- contentList: [
|
|
|
- { name: 'orderNo', title: mixins.$t("saleOrderNo") },
|
|
|
- { name: 'cusPhone', title: mixins.$t("cusPhone")},
|
|
|
- { name: 'addressFull', title: mixins.$t("adddressFull") },
|
|
|
- { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t("staffId") }], title: mixins.$t("storeInformation") }
|
|
|
+ contentList: [{
|
|
|
+ name: 'orderNo',
|
|
|
+ title: mixins.$t("saleOrderNo")
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'cusPhone',
|
|
|
+ title: mixins.$t("cusPhone")
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'addressFull',
|
|
|
+ title: mixins.$t("adddressFull")
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: [{
|
|
|
+ name: 'orgName',
|
|
|
+ title: ''
|
|
|
+ }, {
|
|
|
+ name: 'staffName',
|
|
|
+ title: mixins.$t("staffId")
|
|
|
+ }],
|
|
|
+ title: mixins.$t("storeInformation")
|
|
|
+ }
|
|
|
],
|
|
|
|
|
|
contentObj: {
|
|
|
@@ -83,23 +145,50 @@ Page({
|
|
|
}]
|
|
|
},
|
|
|
// 弹出按钮
|
|
|
- buttonList: [
|
|
|
- {
|
|
|
+ buttonList: [{
|
|
|
name: 'editInto',
|
|
|
title: mixins.$t('edit')
|
|
|
},
|
|
|
- { 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: 'saleOutBound',
|
|
|
+ title: mixins.$t("saleOutBound"),
|
|
|
+ formMode: Constants.formMode.other,
|
|
|
+ other: {
|
|
|
idKey: 'orderId'
|
|
|
}
|
|
|
- },//退货
|
|
|
- { name: 'collection', title: mixins.$t("cusCollection"), idKey: 'cusId' },//跳转客户收款
|
|
|
- { name: 'printedBill', title: mixins.$t("printedBill") }, //打印
|
|
|
- { name: 'invalid', title: mixins.$t("invaidOrder") } //作废
|
|
|
+ }, //出库
|
|
|
+ {
|
|
|
+ name: 'saleOrderReturn',
|
|
|
+ title: mixins.$t("saleReturn"),
|
|
|
+ formMode: Constants.formMode.other,
|
|
|
+ other: {
|
|
|
+ idKey: 'orderId'
|
|
|
+ }
|
|
|
+ }, //退货
|
|
|
+ {
|
|
|
+ name: 'collection',
|
|
|
+ title: mixins.$t("cusCollection"),
|
|
|
+ idKey: 'cusId'
|
|
|
+ }, //跳转客户收款
|
|
|
+ {
|
|
|
+ name: 'printedBill',
|
|
|
+ title: mixins.$t("printedBill")
|
|
|
+ }, //打印
|
|
|
+ {
|
|
|
+ name: 'invalid',
|
|
|
+ title: mixins.$t("invaidOrder")
|
|
|
+ } //作废
|
|
|
],
|
|
|
- buttonSaveList: [{ code: 'add', title: mixins.$t("add") }],
|
|
|
- contentSaveList: [{ code: 'amount', content: 0, type: 'number', title: mixins.$t("totalAmount") }, {
|
|
|
+ buttonSaveList: [{
|
|
|
+ code: 'add',
|
|
|
+ title: mixins.$t("add")
|
|
|
+ }],
|
|
|
+ contentSaveList: [{
|
|
|
+ code: 'amount',
|
|
|
+ content: 0,
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("totalAmount")
|
|
|
+ }, {
|
|
|
type: 'count',
|
|
|
code: 'count',
|
|
|
bill: 0,
|
|
|
@@ -108,10 +197,65 @@ Page({
|
|
|
primaryKey: 'orderId'
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 处理接口返回数据
|
|
|
- * @date : 2024年3月8日
|
|
|
- * @author : 于继渤
|
|
|
- */
|
|
|
+ * @desc : 三个小点打开
|
|
|
+ * @date : 2024年3月8日
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
+ toPoint(e) {
|
|
|
+ let item = e.detail.item
|
|
|
+ let buttonList = null
|
|
|
+ if (!item.flgValid) { //作废
|
|
|
+ buttonList = [{
|
|
|
+ name: 'printedBill',
|
|
|
+ title: mixins.$t("printedBill")
|
|
|
+ }, ] //打印
|
|
|
+ } else {
|
|
|
+ // 弹出按钮
|
|
|
+ buttonList = [{
|
|
|
+ name: 'editInto',
|
|
|
+ title: mixins.$t('edit')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'saleOutBound',
|
|
|
+ title: mixins.$t("saleOutBound"),
|
|
|
+ formMode: Constants.formMode.other,
|
|
|
+ other: {
|
|
|
+ idKey: 'orderId'
|
|
|
+ }
|
|
|
+ }, //出库
|
|
|
+ {
|
|
|
+ name: 'saleOrderReturn',
|
|
|
+ title: mixins.$t("saleReturn"),
|
|
|
+ formMode: Constants.formMode.other,
|
|
|
+ other: {
|
|
|
+ idKey: 'orderId'
|
|
|
+ }
|
|
|
+ }, //退货
|
|
|
+ {
|
|
|
+ name: 'collection',
|
|
|
+ title: mixins.$t("cusCollection"),
|
|
|
+ idKey: 'cusId'
|
|
|
+ }, //跳转客户收款
|
|
|
+ {
|
|
|
+ name: 'printedBill',
|
|
|
+ title: mixins.$t("printedBill")
|
|
|
+ }, //打印
|
|
|
+ {
|
|
|
+ name: 'invalid',
|
|
|
+ title: mixins.$t("invaidOrder")
|
|
|
+ } //作废
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ this.setData({
|
|
|
+ // 弹出按钮
|
|
|
+ buttonList: buttonList
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 处理接口返回数据
|
|
|
+ * @date : 2024年3月8日
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
handleSearchData(tableData) {
|
|
|
tableData.forEach(res => {
|
|
|
if (res.outStatus !== Constants.outStatus.unOutBound) { //处理状态
|
|
|
@@ -129,10 +273,10 @@ Page({
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * @desc : 作废
|
|
|
- * @date : 2024年3月8日
|
|
|
- * @author : 于继渤
|
|
|
- */
|
|
|
+ * @desc : 作废
|
|
|
+ * @date : 2024年3月8日
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
invalid(e) {
|
|
|
this.setData({
|
|
|
loading: true
|
|
|
@@ -154,10 +298,10 @@ Page({
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * @desc : 销售出库方法提示校验
|
|
|
- * @date : 2024年3月8日
|
|
|
- * @author : 于继渤
|
|
|
- */
|
|
|
+ * @desc : 销售出库方法提示校验
|
|
|
+ * @date : 2024年3月8日
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
isAllowedSaleOutBound(e) {
|
|
|
let result = ''
|
|
|
//判断出库量是否小于订单量
|
|
|
@@ -167,10 +311,10 @@ Page({
|
|
|
return result
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 销售出库退货方法提示校验
|
|
|
- * @date : 2024年3月8日
|
|
|
- * @author : 于继渤
|
|
|
- */
|
|
|
+ * @desc : 销售出库退货方法提示校验
|
|
|
+ * @date : 2024年3月8日
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
isAllowedSaleOrderReturn(e) {
|
|
|
console.log(e)
|
|
|
let result = ''
|
|
|
@@ -184,10 +328,10 @@ Page({
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * @desc : 切换
|
|
|
- * @date : 2024/2/1 15:49
|
|
|
- * @author : 于继渤
|
|
|
- */
|
|
|
+ * @desc : 切换
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
onChangeTabs(e) {
|
|
|
let code = e.detail.detail.code
|
|
|
this.setData({
|
|
|
@@ -196,10 +340,10 @@ Page({
|
|
|
this.searchData()
|
|
|
},
|
|
|
/**
|
|
|
-* @desc : 设置查询参数
|
|
|
-* @date : 2024/2/1 15:49
|
|
|
-* @author : 于继渤
|
|
|
-*/
|
|
|
+ * @desc : 设置查询参数
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
setSearchParams(params) {
|
|
|
if (!params.outStatusList) {
|
|
|
params.outStatusList = this.data.outStatus == 'all' ? [] : this.data.outStatus
|
|
|
@@ -210,33 +354,37 @@ Page({
|
|
|
return params
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 加载数据
|
|
|
- * @author : 于继渤
|
|
|
- * @date : 2024/1/23 9:16
|
|
|
- */
|
|
|
+ * @desc : 加载数据
|
|
|
+ * @author : 于继渤
|
|
|
+ * @date : 2024/1/23 9:16
|
|
|
+ */
|
|
|
getData(params) {
|
|
|
return this.excute(this.data.service, this.data.service.selectByCond, params);
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 编辑
|
|
|
- * @author : 于继渤
|
|
|
- * @date : 2024/1/23 9:16
|
|
|
- */
|
|
|
+ * @desc : 编辑
|
|
|
+ * @author : 于继渤
|
|
|
+ * @date : 2024/1/23 9:16
|
|
|
+ */
|
|
|
editInto(e) {
|
|
|
let item = e
|
|
|
wx.navigateTo({
|
|
|
url: this.data.route.add.url,
|
|
|
success: function (res) {
|
|
|
// 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
|
|
|
- res.eventChannel.emit('params', { id: item.orderId, formMode: Constants.formMode.edit, item: item })
|
|
|
+ res.eventChannel.emit('params', {
|
|
|
+ id: item.orderId,
|
|
|
+ formMode: Constants.formMode.edit,
|
|
|
+ item: item
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 计算底部合计金额等
|
|
|
- * @date : 2024年4月8日
|
|
|
- * @author : 于继渤
|
|
|
- */
|
|
|
+ * @desc : 计算底部合计金额等
|
|
|
+ * @date : 2024年4月8日
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
calculateTotalAmount() {
|
|
|
let tableData = this.data.tableData
|
|
|
let contentSaveList = this.data.contentSaveList
|