|
|
@@ -145,7 +145,8 @@ Page({
|
|
|
required: true,
|
|
|
interrupt: true
|
|
|
});
|
|
|
- form.splice(form.findIndex(v => v.label == '备注'), 0, {
|
|
|
+ //业务员
|
|
|
+ let hr = {
|
|
|
label: "业务员",
|
|
|
error: false,
|
|
|
errMsg: "",
|
|
|
@@ -168,7 +169,38 @@ Page({
|
|
|
valueName: "saler_hrid",
|
|
|
checking: "base",
|
|
|
required: true
|
|
|
- });
|
|
|
+ };
|
|
|
+ _Http.basic({
|
|
|
+ "id": "20230306144402",
|
|
|
+ "content": {
|
|
|
+ "nocache": true,
|
|
|
+ "type": 2, //type:1客户2:项目
|
|
|
+ "sa_projectid": data.sa_projectid[1][0],
|
|
|
+ "where": {
|
|
|
+ "condition": ""
|
|
|
+ },
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 1,
|
|
|
+ },
|
|
|
+ }).then(res => {
|
|
|
+ console.log('获取一个业务员', res)
|
|
|
+ if (res.code == 1 && res.data.length) {
|
|
|
+ hr.value = [res.data[0].name, [res.data[0].hrid]]
|
|
|
+ if (form.some(v => v.label == '业务员')) {
|
|
|
+ form.splice(form.findIndex(v => v.label == '备注') - 1, 1, hr);
|
|
|
+ } else {
|
|
|
+ form.splice(form.findIndex(v => v.label == '备注'), 0, hr);
|
|
|
+ }
|
|
|
+ this.setData({
|
|
|
+ form
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (form.some(v => v.label == '业务员')) {
|
|
|
+ form.splice(form.findIndex(v => v.label == '备注') - 1, 1, hr);
|
|
|
+ } else {
|
|
|
+ form.splice(form.findIndex(v => v.label == '备注'), 0, hr);
|
|
|
+ }
|
|
|
};
|
|
|
this.setData({
|
|
|
disabled: false,
|