|
@@ -32,6 +32,8 @@ Page({
|
|
|
chooseFlag: false,
|
|
chooseFlag: false,
|
|
|
// 提示信息
|
|
// 提示信息
|
|
|
placeholder: [],
|
|
placeholder: [],
|
|
|
|
|
+ // tab页签
|
|
|
|
|
+ tagList: [],
|
|
|
// 确定按钮
|
|
// 确定按钮
|
|
|
buttonList: [{
|
|
buttonList: [{
|
|
|
name: 'confirm',
|
|
name: 'confirm',
|
|
@@ -71,7 +73,7 @@ Page({
|
|
|
chooseData(e) {
|
|
chooseData(e) {
|
|
|
let list = e.detail.list;
|
|
let list = e.detail.list;
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- choosedData:list
|
|
|
|
|
|
|
+ choosedData: list
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
@@ -118,6 +120,10 @@ Page({
|
|
|
case Constants.chooseType.staff:
|
|
case Constants.chooseType.staff:
|
|
|
data = { id: item.staffId, name: item.staffName }
|
|
data = { id: item.staffId, name: item.staffName }
|
|
|
break;
|
|
break;
|
|
|
|
|
+ // 供应商
|
|
|
|
|
+ case Constants.chooseType.supplier:
|
|
|
|
|
+ data = { id: item.supId, name: item.supName }
|
|
|
|
|
+ break;
|
|
|
// 对象类型
|
|
// 对象类型
|
|
|
case Constants.chooseType.objectType:
|
|
case Constants.chooseType.objectType:
|
|
|
data = {
|
|
data = {
|
|
@@ -158,6 +164,18 @@ Page({
|
|
|
if (this.data.dictCode) {
|
|
if (this.data.dictCode) {
|
|
|
params.dictCode = this.data.dictCode
|
|
params.dictCode = this.data.dictCode
|
|
|
}
|
|
}
|
|
|
|
|
+ let chooseType = this.data.chooseRoute.type;
|
|
|
|
|
+ // 供应商
|
|
|
|
|
+ if (chooseType == Constants.chooseType.supplier) {
|
|
|
|
|
+ params.supType = "";
|
|
|
|
|
+ let active = this.data.active
|
|
|
|
|
+ if (active == 1) { //采购供应商
|
|
|
|
|
+ params.supType = Constants.kindCode.supplierPur;
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (active == 2) { //服务供应商
|
|
|
|
|
+ params.supType = Constants.kindCode.supplierService;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
return params
|
|
return params
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
@@ -166,10 +184,11 @@ Page({
|
|
|
* @author : 周兴
|
|
* @author : 周兴
|
|
|
*/
|
|
*/
|
|
|
getData(params) {
|
|
getData(params) {
|
|
|
- return this.excute(this.data.service, this.data.service[this.data.method], params);
|
|
|
|
|
|
|
+ let service = app.globalData[this.data.routeObjName + 'Service'];
|
|
|
|
|
+ return this.excute(service, service[this.data.method], params);
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
- * @desc : tab切换
|
|
|
|
|
|
|
+ * @desc : tab切换(列表和已选)
|
|
|
* @date : 2024/3/25 15:49
|
|
* @date : 2024/3/25 15:49
|
|
|
* @author : 周兴
|
|
* @author : 周兴
|
|
|
*/
|
|
*/
|
|
@@ -178,6 +197,19 @@ Page({
|
|
|
active: e.detail.index
|
|
active: e.detail.index
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 切换tab
|
|
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
|
|
+ * @author : 周兴
|
|
|
|
|
+ */
|
|
|
|
|
+ onChangeTabs(e) {
|
|
|
|
|
+ let index = e.detail.detail.index
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ active: index,
|
|
|
|
|
+ })
|
|
|
|
|
+ // 查询
|
|
|
|
|
+ this.searchData()
|
|
|
|
|
+ },
|
|
|
/**
|
|
/**
|
|
|
* @desc : 生命周期函数(初始加载)
|
|
* @desc : 生命周期函数(初始加载)
|
|
|
* @date : 2024年3月23日
|
|
* @date : 2024年3月23日
|
|
@@ -192,6 +224,7 @@ Page({
|
|
|
|
|
|
|
|
// 读取传入的单据类型
|
|
// 读取传入的单据类型
|
|
|
let chooseType = route.type
|
|
let chooseType = route.type
|
|
|
|
|
+
|
|
|
switch (chooseType) {
|
|
switch (chooseType) {
|
|
|
// 部门
|
|
// 部门
|
|
|
case Constants.chooseType.org:
|
|
case Constants.chooseType.org:
|
|
@@ -222,6 +255,28 @@ Page({
|
|
|
placeholder: ['staffName']
|
|
placeholder: ['staffName']
|
|
|
})
|
|
})
|
|
|
break;
|
|
break;
|
|
|
|
|
+ // 供应商
|
|
|
|
|
+ case Constants.chooseType.supplier:
|
|
|
|
|
+ title = "供应商"
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ addUrl: '/package-purchase/pages/supplier-list/add/add',
|
|
|
|
|
+ routeObjName: 'supplier',
|
|
|
|
|
+ method: 'selectByCond',
|
|
|
|
|
+ title: 'supName',
|
|
|
|
|
+ tagList: [{
|
|
|
|
|
+ title: mixins.$t("all") //全部
|
|
|
|
|
+ }, {
|
|
|
|
|
+ title: mixins.$t("procurementSupplier") //采购供应商
|
|
|
|
|
+ }, {
|
|
|
|
|
+ title: mixins.$t("serviceProvider") // 服务供应商
|
|
|
|
|
+ }],
|
|
|
|
|
+ contentList: [
|
|
|
|
|
+ { name: 'supTypeName', title: '供应商类别' },
|
|
|
|
|
+ { name: 'returnAddress', title: '供应商地址' },
|
|
|
|
|
+ ],
|
|
|
|
|
+ placeholder: ['supplier']
|
|
|
|
|
+ })
|
|
|
|
|
+ break;
|
|
|
// 数据字典
|
|
// 数据字典
|
|
|
case Constants.chooseType.dictionary:
|
|
case Constants.chooseType.dictionary:
|
|
|
title = "数据字典"
|
|
title = "数据字典"
|
|
@@ -272,7 +327,7 @@ Page({
|
|
|
}
|
|
}
|
|
|
wx.setNavigationBarTitle({
|
|
wx.setNavigationBarTitle({
|
|
|
title: '选择' + title,
|
|
title: '选择' + title,
|
|
|
- })
|
|
|
|
|
|
|
+ })
|
|
|
// 调取查询
|
|
// 调取查询
|
|
|
this.searchData();
|
|
this.searchData();
|
|
|
},
|
|
},
|