|
|
@@ -63,7 +63,7 @@ Page({
|
|
|
// 新加的数据
|
|
|
addItem: null,
|
|
|
// 其他查询条件
|
|
|
- otherSearchParam:null,
|
|
|
+ otherSearchParam: null,
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 调到新建
|
|
|
@@ -90,6 +90,17 @@ Page({
|
|
|
}
|
|
|
})
|
|
|
} else if (this.data.popContent && this.data.popContent.length > 0) {
|
|
|
+ let popContent = this.data.popContent
|
|
|
+ popContent.forEach(it => {
|
|
|
+ if (it.code == 'decimalPlaces') {
|
|
|
+ let formData = this.data.formData ? JSON.parse(this.data.formData) : {
|
|
|
+ decimalPlaces: 1
|
|
|
+ }
|
|
|
+ this.setData({
|
|
|
+ formData: JSON.stringify(formData)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
this.setData({
|
|
|
showPop: true
|
|
|
})
|
|
|
@@ -365,8 +376,8 @@ Page({
|
|
|
if (this.data.kindType) {
|
|
|
params.kindType = this.data.kindType
|
|
|
}
|
|
|
- if(this.data.otherSearchParam){
|
|
|
- Object.assign(params,this.data.otherSearchParam)
|
|
|
+ if (this.data.otherSearchParam) {
|
|
|
+ Object.assign(params, this.data.otherSearchParam)
|
|
|
}
|
|
|
let chooseType = this.data.chooseRoute.type;
|
|
|
// 供应商
|
|
|
@@ -589,6 +600,8 @@ Page({
|
|
|
let title;
|
|
|
// 读取传入的单据类型
|
|
|
let chooseType = route.type
|
|
|
+ //
|
|
|
+ let dataItemData = {}
|
|
|
switch (chooseType) {
|
|
|
// 角色
|
|
|
case Constants.chooseType.role:
|
|
|
@@ -747,8 +760,7 @@ Page({
|
|
|
break;
|
|
|
// 仓库
|
|
|
case Constants.chooseType.warehouse:
|
|
|
- title = "仓库"
|
|
|
- let dataItemData = {}
|
|
|
+ title = "仓库"
|
|
|
dataItemData['supervisor'] = app.globalData.user.staffName
|
|
|
dataItemData['contactPhone'] = app.globalData.user.userPhone
|
|
|
|
|
|
@@ -892,7 +904,8 @@ Page({
|
|
|
break;
|
|
|
// 计量单位 刘尧 2024.05.29
|
|
|
case Constants.chooseType.unit:
|
|
|
- title = "单位"
|
|
|
+ title = "单位"
|
|
|
+ dataItemData['decimalPlaces'] = 0
|
|
|
this.setData({
|
|
|
routeObjName: 'common',
|
|
|
routeObjNamePop: 'unit',
|
|
|
@@ -909,9 +922,11 @@ Page({
|
|
|
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 },
|
|
|
+ { code: 'decimalPlaces', max: 6, type: 'number', sign: "", digits: 0, title: mixins.$t('decimalPlaces'), required: true, formatThousandth: false, content: 0 },
|
|
|
{ code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ //设置小数位数
|
|
|
+ dataItem: JSON.stringify(dataItemData)
|
|
|
})
|
|
|
break;
|
|
|
// 数据字典
|
|
|
@@ -956,7 +971,7 @@ Page({
|
|
|
case Constants.chooseType.kindData:
|
|
|
title = "系统数据"
|
|
|
this.setData({
|
|
|
- pageFlag:false,
|
|
|
+ pageFlag: false,
|
|
|
routeObjName: 'common',
|
|
|
method: 'getDataKind',
|
|
|
kindType: route.kindType,
|
|
|
@@ -978,13 +993,13 @@ Page({
|
|
|
break;
|
|
|
// 对象类型
|
|
|
case Constants.chooseType.objectType:
|
|
|
-
|
|
|
+
|
|
|
this.setData({
|
|
|
- title:'objName',
|
|
|
+ title: 'objName',
|
|
|
routeObjName: 'common',
|
|
|
method: 'getSupplierAndCustomerData',
|
|
|
})
|
|
|
- if(!route.objectType){
|
|
|
+ if (!route.objectType) {
|
|
|
title = "对象类型"
|
|
|
this.setData({
|
|
|
contentList: [{
|
|
|
@@ -1017,12 +1032,12 @@ Page({
|
|
|
title: '客户',
|
|
|
value: 2
|
|
|
}]
|
|
|
- } ],
|
|
|
+ }],
|
|
|
placeholder: ['customerName', 'supplierName', 'address', 'telephone']
|
|
|
})
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
// 客户
|
|
|
- if(route.objectType == 'customer'){
|
|
|
+ if (route.objectType == 'customer') {
|
|
|
title = "客户"
|
|
|
this.setData({
|
|
|
contentList: [{
|
|
|
@@ -1033,10 +1048,10 @@ Page({
|
|
|
name: 'addressFull',
|
|
|
title: '客户地址'
|
|
|
}],
|
|
|
- placeholder: ['customerName','address', 'telephone'],
|
|
|
- otherSearchParam:{'supplier-customerList': "2"}
|
|
|
+ placeholder: ['customerName', 'address', 'telephone'],
|
|
|
+ otherSearchParam: { 'supplier-customerList': "2" }
|
|
|
})
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
// 供应商
|
|
|
title = "供应商"
|
|
|
this.setData({
|
|
|
@@ -1048,8 +1063,8 @@ Page({
|
|
|
name: 'addressFull',
|
|
|
title: '供应商地址'
|
|
|
}],
|
|
|
- placeholder: ['supplierName','address', 'telephone'],
|
|
|
- otherSearchParam:{'supplier-customerList': "1"}
|
|
|
+ placeholder: ['supplierName', 'address', 'telephone'],
|
|
|
+ otherSearchParam: { 'supplier-customerList': "1" }
|
|
|
})
|
|
|
}
|
|
|
}
|