|
|
@@ -37,7 +37,7 @@ Page({
|
|
|
// 是否多选
|
|
|
chooseFlag: false,
|
|
|
// 供应商类别
|
|
|
- supTypeList:null,
|
|
|
+ supTypeList: null,
|
|
|
// 提示信息
|
|
|
placeholder: [],
|
|
|
// tab页签
|
|
|
@@ -88,10 +88,13 @@ Page({
|
|
|
},
|
|
|
success: function (res) {
|
|
|
// 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
|
|
|
- res.eventChannel.emit('params', {
|
|
|
- item:{defaultSupplier: _this.data.item.defaultSupplier},
|
|
|
- formType: _this.data.chooseRoute.type,
|
|
|
- backFlag: true })
|
|
|
+ res.eventChannel.emit('params', {
|
|
|
+ item: {
|
|
|
+ defaultSupplier: _this.data.item.defaultSupplier
|
|
|
+ },
|
|
|
+ formType: _this.data.chooseRoute.type,
|
|
|
+ backFlag: true
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
} else if (this.data.popContent && this.data.popContent.length > 0) {
|
|
|
@@ -230,7 +233,7 @@ Page({
|
|
|
name: item.orgName
|
|
|
}
|
|
|
break;
|
|
|
- // 员工
|
|
|
+ // 员工
|
|
|
case Constants.chooseType.staff:
|
|
|
data = {
|
|
|
id: item.staffId,
|
|
|
@@ -240,14 +243,14 @@ Page({
|
|
|
staffPhone: item.staffPhone,
|
|
|
}
|
|
|
break;
|
|
|
- // 角色
|
|
|
+ // 角色
|
|
|
case Constants.chooseType.role:
|
|
|
data = {
|
|
|
id: item.roleId,
|
|
|
name: item.roleName,
|
|
|
}
|
|
|
break;
|
|
|
- //渠道
|
|
|
+ //渠道
|
|
|
case Constants.chooseType.saleChannel:
|
|
|
data = {
|
|
|
id: item.channelId,
|
|
|
@@ -255,7 +258,14 @@ Page({
|
|
|
code: item.channelCode
|
|
|
}
|
|
|
break;
|
|
|
- //资金账户
|
|
|
+ //发票抬头
|
|
|
+ case Constants.chooseType.invoiceType:
|
|
|
+ data = {
|
|
|
+ id: item.cpId,
|
|
|
+ name: item.cpName,
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ //资金账户
|
|
|
case Constants.chooseType.moneyAccount:
|
|
|
data = {
|
|
|
id: item.macId,
|
|
|
@@ -263,7 +273,7 @@ Page({
|
|
|
code: item.macCode
|
|
|
}
|
|
|
break;
|
|
|
- //客户来源
|
|
|
+ //客户来源
|
|
|
case Constants.chooseType.cusFrom:
|
|
|
data = {
|
|
|
id: item.dataId,
|
|
|
@@ -271,7 +281,7 @@ Page({
|
|
|
code: item.dataCode
|
|
|
}
|
|
|
break;
|
|
|
- // 供应商
|
|
|
+ // 供应商
|
|
|
case Constants.chooseType.supplier:
|
|
|
case Constants.chooseType.outSupplier:
|
|
|
data = {
|
|
|
@@ -280,7 +290,7 @@ Page({
|
|
|
item: item
|
|
|
}
|
|
|
break;
|
|
|
- // 对象类型
|
|
|
+ // 对象类型
|
|
|
case Constants.chooseType.objectType:
|
|
|
data = {
|
|
|
id: item.objId,
|
|
|
@@ -289,7 +299,7 @@ Page({
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
- // 仓库
|
|
|
+ // 仓库
|
|
|
case Constants.chooseType.warehouse:
|
|
|
data = {
|
|
|
id: item.whId,
|
|
|
@@ -303,21 +313,21 @@ Page({
|
|
|
item: item
|
|
|
}
|
|
|
break;
|
|
|
- // 品牌
|
|
|
+ // 品牌
|
|
|
case Constants.chooseType.brand:
|
|
|
data = {
|
|
|
id: item.brandId,
|
|
|
name: item.brandName
|
|
|
}
|
|
|
break;
|
|
|
- // 系列 刘尧 2024.05.29
|
|
|
+ // 系列 刘尧 2024.05.29
|
|
|
case Constants.chooseType.series:
|
|
|
data = {
|
|
|
id: item.seriesId,
|
|
|
name: item.seriesName
|
|
|
}
|
|
|
break;
|
|
|
- // 计量单位 刘尧 2024.05.29
|
|
|
+ // 计量单位 刘尧 2024.05.29
|
|
|
case Constants.chooseType.unit:
|
|
|
data = {
|
|
|
id: item.unitId,
|
|
|
@@ -325,14 +335,14 @@ Page({
|
|
|
decimalPlaces: item.decimalPlaces
|
|
|
}
|
|
|
break;
|
|
|
- // 系统数据
|
|
|
+ // 系统数据
|
|
|
case Constants.chooseType.kindData:
|
|
|
data = {
|
|
|
id: item.kindCode,
|
|
|
name: item.kindName
|
|
|
}
|
|
|
break;
|
|
|
- // 数据字典
|
|
|
+ // 数据字典
|
|
|
case Constants.chooseType.dictionary:
|
|
|
data = {
|
|
|
id: item.dataId,
|
|
|
@@ -342,7 +352,7 @@ Page({
|
|
|
flgDefault: item.flgDefault,
|
|
|
}
|
|
|
break;
|
|
|
- // 系统数据
|
|
|
+ // 系统数据
|
|
|
case Constants.chooseType.kindType:
|
|
|
data = {
|
|
|
id: item.id,
|
|
|
@@ -388,7 +398,7 @@ Page({
|
|
|
params.supType = "";
|
|
|
let active = this.data.active
|
|
|
// params.supType = Constants.kindCode.supplierPur;
|
|
|
- params.supTypeList = this.data.supTypeList;
|
|
|
+ params.supTypeList = this.data.supTypeList;
|
|
|
|
|
|
if (active == 1) { //采购供应商
|
|
|
params.supType = Constants.kindCode.supplierPur;
|
|
|
@@ -618,11 +628,11 @@ Page({
|
|
|
contentList: [{
|
|
|
name: 'roleCode',
|
|
|
title: '编码'
|
|
|
- },],
|
|
|
+ }, ],
|
|
|
placeholder: ['roleName']
|
|
|
})
|
|
|
break;
|
|
|
- // 部门
|
|
|
+ // 部门
|
|
|
case Constants.chooseType.org:
|
|
|
title = "部门"
|
|
|
this.setData({
|
|
|
@@ -639,7 +649,7 @@ Page({
|
|
|
placeholder: ['orgName']
|
|
|
})
|
|
|
break;
|
|
|
- // 员工
|
|
|
+ // 员工
|
|
|
case Constants.chooseType.staff:
|
|
|
title = "员工"
|
|
|
this.setData({
|
|
|
@@ -649,19 +659,19 @@ Page({
|
|
|
valueKey: 'staffId',
|
|
|
title: 'staffName',
|
|
|
contentList: [{
|
|
|
- name: 'staffCode',
|
|
|
- title: '员工工号'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'orgName',
|
|
|
- title: '部门'
|
|
|
- },
|
|
|
+ name: 'staffCode',
|
|
|
+ title: '员工工号'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'orgName',
|
|
|
+ title: '部门'
|
|
|
+ },
|
|
|
],
|
|
|
placeholder: ['staffName']
|
|
|
})
|
|
|
break;
|
|
|
|
|
|
- //客户来源
|
|
|
+ //客户来源
|
|
|
case Constants.chooseType.cusFrom:
|
|
|
title = "客户来源"
|
|
|
this.setData({
|
|
|
@@ -670,19 +680,19 @@ Page({
|
|
|
valueKey: 'dataId',
|
|
|
title: 'dataValue',
|
|
|
contentList: [{
|
|
|
- name: 'dataCode',
|
|
|
- title: '来源编码'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'dataValue',
|
|
|
- title: '来源名称'
|
|
|
- },
|
|
|
+ name: 'dataCode',
|
|
|
+ title: '来源编码'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'dataValue',
|
|
|
+ title: '来源名称'
|
|
|
+ },
|
|
|
],
|
|
|
placeholder: ['sourceName']
|
|
|
})
|
|
|
break;
|
|
|
|
|
|
- // 资金账户
|
|
|
+ // 资金账户
|
|
|
case Constants.chooseType.moneyAccount:
|
|
|
title = "资金账户"
|
|
|
this.setData({
|
|
|
@@ -692,20 +702,37 @@ Page({
|
|
|
valueKey: 'macId',
|
|
|
title: 'macName',
|
|
|
contentList: [{
|
|
|
- name: 'macCode',
|
|
|
- title: '账户编码'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'macName',
|
|
|
- title: '账户名称'
|
|
|
- },
|
|
|
+ name: 'macCode',
|
|
|
+ title: '账户编码'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'macName',
|
|
|
+ title: '账户名称'
|
|
|
+ },
|
|
|
|
|
|
],
|
|
|
placeholder: ['moneyAccount']
|
|
|
})
|
|
|
break;
|
|
|
+ // 资金账户
|
|
|
+ case Constants.chooseType.invoiceType:
|
|
|
+ title = "发票抬头"
|
|
|
+ this.setData({
|
|
|
+ addUrl: '/package-basic-data/pages/invoice-header/add/add',
|
|
|
+ routeObjName: 'receiptSet',
|
|
|
+ pageFlag: false,
|
|
|
+ method: 'getdata',
|
|
|
+ valueKey: 'cpId',
|
|
|
+ title: 'cpName',
|
|
|
+ contentList: [{
|
|
|
+ name: 'taxNo',
|
|
|
+ title: mixins.$t('companyTaxNumber')
|
|
|
+ }, ],
|
|
|
+ placeholder: ['receiptSet']
|
|
|
+ })
|
|
|
+ break;
|
|
|
|
|
|
- //销售渠道
|
|
|
+ //销售渠道
|
|
|
case Constants.chooseType.saleChannel:
|
|
|
title = "销售渠道"
|
|
|
this.setData({
|
|
|
@@ -717,7 +744,7 @@ Page({
|
|
|
placeholder: ['channelName']
|
|
|
})
|
|
|
break;
|
|
|
- // 供应商
|
|
|
+ // 供应商
|
|
|
case Constants.chooseType.supplier:
|
|
|
case Constants.chooseType.outSupplier:
|
|
|
title = "供应商"
|
|
|
@@ -729,41 +756,40 @@ Page({
|
|
|
valueKey: 'supId',
|
|
|
labelKey: 'supName',
|
|
|
chooseFlag: route.chooseFlag,
|
|
|
- supTypeList:route.supTypeList,
|
|
|
+ supTypeList: route.supTypeList,
|
|
|
placeholder: ['supplier']
|
|
|
})
|
|
|
- if(this.data.item.defaultSupplier){
|
|
|
+ if (this.data.item.defaultSupplier) {
|
|
|
this.setData({
|
|
|
- contentList: [
|
|
|
- {
|
|
|
- name: 'returnAddress',
|
|
|
- title: '供应商地址'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'payableResidue',
|
|
|
- title: '供应商欠款'
|
|
|
- },
|
|
|
+ contentList: [{
|
|
|
+ name: 'returnAddress',
|
|
|
+ title: '供应商地址'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'payableResidue',
|
|
|
+ title: '供应商欠款'
|
|
|
+ },
|
|
|
],
|
|
|
})
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.setData({
|
|
|
contentList: [{
|
|
|
- name: 'supTypeName',
|
|
|
- title: '供应商类别'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'returnAddress',
|
|
|
- title: '供应商地址'
|
|
|
- },
|
|
|
- //bug 7524 跟采购订单保持一致
|
|
|
- // {
|
|
|
- // name: 'balance',
|
|
|
- // title: '余额'
|
|
|
- // },
|
|
|
- {
|
|
|
- name: 'payableResidue',
|
|
|
- title: '供应商欠款'
|
|
|
- },
|
|
|
+ name: 'supTypeName',
|
|
|
+ title: '供应商类别'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'returnAddress',
|
|
|
+ title: '供应商地址'
|
|
|
+ },
|
|
|
+ //bug 7524 跟采购订单保持一致
|
|
|
+ // {
|
|
|
+ // name: 'balance',
|
|
|
+ // title: '余额'
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ name: 'payableResidue',
|
|
|
+ title: '供应商欠款'
|
|
|
+ },
|
|
|
],
|
|
|
})
|
|
|
}
|
|
|
@@ -781,9 +807,9 @@ Page({
|
|
|
// })
|
|
|
// }
|
|
|
break;
|
|
|
- // 仓库
|
|
|
+ // 仓库
|
|
|
case Constants.chooseType.warehouse:
|
|
|
- title = "仓库"
|
|
|
+ title = "仓库"
|
|
|
dataItemData['supervisor'] = app.globalData.user.staffName
|
|
|
dataItemData['contactPhone'] = app.globalData.user.userPhone
|
|
|
|
|
|
@@ -795,30 +821,44 @@ Page({
|
|
|
title: 'whName',
|
|
|
simpleFlag: true,
|
|
|
contentList: [{
|
|
|
- name: 'supervisor',
|
|
|
- title: '仓库主管'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'contactPhone',
|
|
|
- title: '联系电话'
|
|
|
- },
|
|
|
+ name: 'supervisor',
|
|
|
+ title: '仓库主管'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'contactPhone',
|
|
|
+ title: '联系电话'
|
|
|
+ },
|
|
|
],
|
|
|
placeholder: ['whName'],
|
|
|
- popContent:
|
|
|
- [
|
|
|
- // { code: 'whCode', type: 'str', title: mixins.$t('whCode'), required: false, readonly: true, },
|
|
|
- { code: 'whName', type: 'str', title: mixins.$t('whName'), required: true },
|
|
|
- {
|
|
|
- name: 'supervisor',
|
|
|
- code: 'supervisor',
|
|
|
- title: mixins.$t("supervisor"),
|
|
|
- type: 'choose',
|
|
|
- required: true,
|
|
|
- urlKey: 'chooseStaff'
|
|
|
- },
|
|
|
- { code: 'contactPhone', type: 'str', title: mixins.$t('contactPhone'), required: true },
|
|
|
- { code: 'remarks', type: 'textarea', title: mixins.$t('remarks'), required: false }
|
|
|
- ],
|
|
|
+ popContent: [
|
|
|
+ // { code: 'whCode', type: 'str', title: mixins.$t('whCode'), required: false, readonly: true, },
|
|
|
+ {
|
|
|
+ code: 'whName',
|
|
|
+ type: 'str',
|
|
|
+ title: mixins.$t('whName'),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'supervisor',
|
|
|
+ code: 'supervisor',
|
|
|
+ title: mixins.$t("supervisor"),
|
|
|
+ type: 'choose',
|
|
|
+ required: true,
|
|
|
+ urlKey: 'chooseStaff'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'contactPhone',
|
|
|
+ type: 'str',
|
|
|
+ title: mixins.$t('contactPhone'),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'remarks',
|
|
|
+ type: 'textarea',
|
|
|
+ title: mixins.$t('remarks'),
|
|
|
+ required: false
|
|
|
+ }
|
|
|
+ ],
|
|
|
//设置默认主管
|
|
|
dataItem: JSON.stringify(dataItemData)
|
|
|
})
|
|
|
@@ -829,8 +869,7 @@ Page({
|
|
|
routeObjName: 'common',
|
|
|
method: 'getInventory',
|
|
|
title: 'skuName',
|
|
|
- contentList: [
|
|
|
- {
|
|
|
+ contentList: [{
|
|
|
name: 'skuCode',
|
|
|
title: '商品编码'
|
|
|
},
|
|
|
@@ -862,7 +901,7 @@ Page({
|
|
|
placeholder: ['whName']
|
|
|
})
|
|
|
break;
|
|
|
- // 品牌
|
|
|
+ // 品牌
|
|
|
case Constants.chooseType.brand:
|
|
|
title = "品牌"
|
|
|
this.setData({
|
|
|
@@ -890,22 +929,51 @@ Page({
|
|
|
// 标准版没有供应商
|
|
|
if (this.data.gradeCode == Constants.gradeCode.STD) {
|
|
|
this.setData({
|
|
|
- popContent: [
|
|
|
- { code: 'brandName', type: 'str', title: mixins.$t('brandName'), required: true },
|
|
|
- { code: 'remarks', type: 'textarea', title: mixins.$t('remarks'), required: false }
|
|
|
+ popContent: [{
|
|
|
+ code: 'brandName',
|
|
|
+ type: 'str',
|
|
|
+ title: mixins.$t('brandName'),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'remarks',
|
|
|
+ type: 'textarea',
|
|
|
+ title: mixins.$t('remarks'),
|
|
|
+ required: false
|
|
|
+ }
|
|
|
],
|
|
|
})
|
|
|
} else {
|
|
|
this.setData({
|
|
|
- popContent: [
|
|
|
- { code: 'brandName', type: 'str', title: mixins.$t('brandName'), required: true },
|
|
|
- { code: 'supplierIds', name: 'supplierNames', title: 'supplier', type: 'choose', dropType: 'supplier', urlKey: '', code: 'supplierIds', formMode: 'index', idKey: 'roleId', title: mixins.$t('supplier') },
|
|
|
- { code: 'remarks', type: 'textarea', title: mixins.$t('remarks'), required: false }
|
|
|
+ popContent: [{
|
|
|
+ code: 'brandName',
|
|
|
+ type: 'str',
|
|
|
+ title: mixins.$t('brandName'),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'supplierIds',
|
|
|
+ name: 'supplierNames',
|
|
|
+ title: 'supplier',
|
|
|
+ type: 'choose',
|
|
|
+ dropType: 'supplier',
|
|
|
+ urlKey: '',
|
|
|
+ code: 'supplierIds',
|
|
|
+ formMode: 'index',
|
|
|
+ idKey: 'roleId',
|
|
|
+ title: mixins.$t('supplier')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'remarks',
|
|
|
+ type: 'textarea',
|
|
|
+ title: mixins.$t('remarks'),
|
|
|
+ required: false
|
|
|
+ }
|
|
|
],
|
|
|
})
|
|
|
}
|
|
|
break;
|
|
|
- // 系列 刘尧 2024.05.29
|
|
|
+ // 系列 刘尧 2024.05.29
|
|
|
case Constants.chooseType.series:
|
|
|
title = "系列"
|
|
|
this.setData({
|
|
|
@@ -920,15 +988,24 @@ Page({
|
|
|
title: 'seriesName',
|
|
|
simpleFlag: true,
|
|
|
placeholder: ['seriesName'],
|
|
|
- popContent: [
|
|
|
- { code: 'seriesName', type: 'str', title: mixins.$t('seriesName'), required: true },
|
|
|
- { code: 'remarks', type: 'textarea', title: mixins.$t('remarks'), required: false }
|
|
|
+ popContent: [{
|
|
|
+ code: 'seriesName',
|
|
|
+ type: 'str',
|
|
|
+ title: mixins.$t('seriesName'),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'remarks',
|
|
|
+ type: 'textarea',
|
|
|
+ title: mixins.$t('remarks'),
|
|
|
+ required: false
|
|
|
+ }
|
|
|
]
|
|
|
})
|
|
|
break;
|
|
|
- // 计量单位 刘尧 2024.05.29
|
|
|
+ // 计量单位 刘尧 2024.05.29
|
|
|
case Constants.chooseType.unit:
|
|
|
- title = "单位"
|
|
|
+ title = "单位"
|
|
|
dataItemData['decimalPlaces'] = 0
|
|
|
this.setData({
|
|
|
routeObjName: 'common',
|
|
|
@@ -944,16 +1021,35 @@ Page({
|
|
|
title: 'unitName',
|
|
|
simpleFlag: true,
|
|
|
placeholder: ['unitName'],
|
|
|
- popContent: [
|
|
|
- { code: 'unitName', type: 'str', title: mixins.$t('unitName'), required: true },
|
|
|
- { code: 'decimalPlaces', max: 6, type: 'number', sign: "", digits: 0, title: mixins.$t('decimalPlaces'), required: true, formatThousandth: false, content: 0 },
|
|
|
- { code: 'remarks', type: 'textarea', title: mixins.$t('remarks'), required: false }
|
|
|
+ popContent: [{
|
|
|
+ code: 'unitName',
|
|
|
+ type: 'str',
|
|
|
+ title: mixins.$t('unitName'),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'decimalPlaces',
|
|
|
+ max: 6,
|
|
|
+ type: 'number',
|
|
|
+ sign: "",
|
|
|
+ digits: 0,
|
|
|
+ title: mixins.$t('decimalPlaces'),
|
|
|
+ required: true,
|
|
|
+ formatThousandth: false,
|
|
|
+ content: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'remarks',
|
|
|
+ type: 'textarea',
|
|
|
+ title: mixins.$t('remarks'),
|
|
|
+ required: false
|
|
|
+ }
|
|
|
],
|
|
|
//设置小数位数
|
|
|
dataItem: JSON.stringify(dataItemData)
|
|
|
})
|
|
|
break;
|
|
|
- // 数据字典
|
|
|
+ // 数据字典
|
|
|
case Constants.chooseType.dictionary:
|
|
|
title = "数据字典"
|
|
|
let dictCode = route.dictCode
|
|
|
@@ -970,29 +1066,37 @@ Page({
|
|
|
valueKey: 'dataId',
|
|
|
title: 'dataValue',
|
|
|
contentList: [{
|
|
|
- name: 'dataCode',
|
|
|
- title: '数据编码'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'dictCode',
|
|
|
- title: '字典项目'
|
|
|
- },
|
|
|
+ name: 'dataCode',
|
|
|
+ title: '数据编码'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'dictCode',
|
|
|
+ title: '字典项目'
|
|
|
+ },
|
|
|
],
|
|
|
placeholder: ['dicName'],
|
|
|
|
|
|
})
|
|
|
if (dictCode == mixins.$t('reasonStorageSys')) {
|
|
|
- let popContent =
|
|
|
- [
|
|
|
- { code: 'dataValue', type: 'str', title: mixins.$t('reasonName'), required: true },
|
|
|
- { code: 'remarks', type: 'textarea', title: mixins.$t('remarks'), required: false, },
|
|
|
- ]
|
|
|
+ let popContent = [{
|
|
|
+ code: 'dataValue',
|
|
|
+ type: 'str',
|
|
|
+ title: mixins.$t('reasonName'),
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'remarks',
|
|
|
+ type: 'textarea',
|
|
|
+ title: mixins.$t('remarks'),
|
|
|
+ required: false,
|
|
|
+ },
|
|
|
+ ]
|
|
|
this.setData({
|
|
|
popContent
|
|
|
})
|
|
|
}
|
|
|
break;
|
|
|
- // 系统数据
|
|
|
+ // 系统数据
|
|
|
case Constants.chooseType.kindData:
|
|
|
title = "系统数据"
|
|
|
this.setData({
|
|
|
@@ -1005,18 +1109,18 @@ Page({
|
|
|
chooseFlag: route.chooseFlag,
|
|
|
repeatFlag: route.repeatFlag,
|
|
|
contentList: [{
|
|
|
- name: 'kindCode',
|
|
|
- title: '数据代码'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'kindName',
|
|
|
- title: '数据名称'
|
|
|
- },
|
|
|
+ name: 'kindCode',
|
|
|
+ title: '数据代码'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'kindName',
|
|
|
+ title: '数据名称'
|
|
|
+ },
|
|
|
],
|
|
|
placeholder: ['sensitiveName']
|
|
|
})
|
|
|
break;
|
|
|
- // 对象类型
|
|
|
+ // 对象类型
|
|
|
case Constants.chooseType.objectType:
|
|
|
|
|
|
this.setData({
|
|
|
@@ -1028,35 +1132,37 @@ Page({
|
|
|
title = "对象类型"
|
|
|
this.setData({
|
|
|
contentList: [{
|
|
|
- name: 'objCode',
|
|
|
- title: '对象编码'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'objTypeName',
|
|
|
- title: '对象'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'addressFull',
|
|
|
- title: '地址'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'phone',
|
|
|
- title: '电话'
|
|
|
- }],
|
|
|
+ name: 'objCode',
|
|
|
+ title: '对象编码'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'objTypeName',
|
|
|
+ title: '对象'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'addressFull',
|
|
|
+ title: '地址'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'phone',
|
|
|
+ title: '电话'
|
|
|
+ }
|
|
|
+ ],
|
|
|
searchContent: [{
|
|
|
code: 'supplier-customer',
|
|
|
title: '选择对象',
|
|
|
searchType: Constants.searchType.switch,
|
|
|
list: [{
|
|
|
- code: 'supplier',
|
|
|
- title: '供应商',
|
|
|
- value: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'customer',
|
|
|
- title: '客户',
|
|
|
- value: 2
|
|
|
- }]
|
|
|
+ code: 'supplier',
|
|
|
+ title: '供应商',
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: 'customer',
|
|
|
+ title: '客户',
|
|
|
+ value: 2
|
|
|
+ }
|
|
|
+ ]
|
|
|
}],
|
|
|
placeholder: ['customerName', 'supplierName', 'address', 'telephone']
|
|
|
})
|
|
|
@@ -1066,30 +1172,36 @@ Page({
|
|
|
title = "客户"
|
|
|
this.setData({
|
|
|
contentList: [{
|
|
|
- name: 'phone',
|
|
|
- title: '客户电话'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'addressFull',
|
|
|
- title: '客户地址'
|
|
|
- }],
|
|
|
+ name: 'phone',
|
|
|
+ title: '客户电话'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'addressFull',
|
|
|
+ title: '客户地址'
|
|
|
+ }
|
|
|
+ ],
|
|
|
placeholder: ['customerName', 'address', 'telephone'],
|
|
|
- otherSearchParam: { 'supplier-customerList': "2" }
|
|
|
+ otherSearchParam: {
|
|
|
+ 'supplier-customerList': "2"
|
|
|
+ }
|
|
|
})
|
|
|
} else {
|
|
|
// 供应商
|
|
|
title = "供应商"
|
|
|
this.setData({
|
|
|
contentList: [{
|
|
|
- name: 'phone',
|
|
|
- title: '供应商电话'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'addressFull',
|
|
|
- title: '供应商地址'
|
|
|
- }],
|
|
|
+ name: 'phone',
|
|
|
+ title: '供应商电话'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'addressFull',
|
|
|
+ title: '供应商地址'
|
|
|
+ }
|
|
|
+ ],
|
|
|
placeholder: ['supplierName', 'address', 'telephone'],
|
|
|
- otherSearchParam: { 'supplier-customerList': "1" }
|
|
|
+ otherSearchParam: {
|
|
|
+ 'supplier-customerList': "1"
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -1111,10 +1223,10 @@ Page({
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * @desc : 对获取到的数据进行处理
|
|
|
- * @date : 2024年5月29日
|
|
|
- * @author : 刘尧
|
|
|
- */
|
|
|
+ * @desc : 对获取到的数据进行处理
|
|
|
+ * @date : 2024年5月29日
|
|
|
+ * @author : 刘尧
|
|
|
+ */
|
|
|
handleSearchData(tableData) {
|
|
|
let addItem = this.data.addItem
|
|
|
let valueKey = this.data.valueKey
|
|
|
@@ -1123,21 +1235,23 @@ Page({
|
|
|
if (addItem && valueKey) {
|
|
|
if (item[valueKey] == addItem[valueKey]) {
|
|
|
item.checked = true;
|
|
|
- choosedData.push({ ...item });
|
|
|
+ choosedData.push({
|
|
|
+ ...item
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
// 判断数据中是否存在计量单位的小数位数字段
|
|
|
if (item && (item.decimalPlaces || item.decimalPlaces === 0)) {
|
|
|
item.decimalPlacesStr = '小数:' + item.decimalPlaces
|
|
|
}
|
|
|
- if(this.data.item.defaultSupplier){
|
|
|
+ if (this.data.item.defaultSupplier) {
|
|
|
// todo
|
|
|
const targetData = this.data.contentList.filter(res => res.title === '供应商欠款')
|
|
|
item[targetData[0].name] = item.payableResidue - item.paymentResidue
|
|
|
}
|
|
|
- if(this.data.routeObjName=='supplier'){
|
|
|
+ if (this.data.routeObjName == 'supplier') {
|
|
|
// item.balance = item.paymentResidue - item.payableResidue //bug 7524 跟采购订单保持一致
|
|
|
- item. payableResidue = item.payableResidue - item.paymentResidue
|
|
|
+ item.payableResidue = item.payableResidue - item.paymentResidue
|
|
|
|
|
|
}
|
|
|
})
|
|
|
@@ -1145,7 +1259,7 @@ Page({
|
|
|
tableData: tableData,
|
|
|
choosedData: choosedData
|
|
|
})
|
|
|
- if(this.data.item.defaultSupplier){
|
|
|
+ if (this.data.item.defaultSupplier) {
|
|
|
wx.setNavigationBarTitle({
|
|
|
title: '选择采购供应商',
|
|
|
})
|