|
|
@@ -138,42 +138,6 @@ Page({
|
|
|
v.value = data[v.valueName] || "";
|
|
|
return v
|
|
|
});
|
|
|
- form.splice(2, 0, {
|
|
|
- label: "收货人",
|
|
|
- error: false,
|
|
|
- errMsg: "",
|
|
|
- type: "route",
|
|
|
- url: "/packageA/select/contacts/select",
|
|
|
- value: [data.name, [data.rec_contactsid]],
|
|
|
- params: {
|
|
|
- "id": "20221022165503",
|
|
|
- "content": {
|
|
|
- nocache: true,
|
|
|
- sys_enterpriseid: data.sys_enterpriseid[1][0],
|
|
|
- "where": {
|
|
|
- "condition": "",
|
|
|
- "workaddress": 0
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- query: "&radio=true",
|
|
|
- interrupt: true,
|
|
|
- placeholder: "选择收货人",
|
|
|
- valueName: "rec_contactsid",
|
|
|
- checking: "base",
|
|
|
- required: true
|
|
|
- })
|
|
|
- form.splice(3, 0, {
|
|
|
- label: "收货人电话",
|
|
|
- error: false,
|
|
|
- errMsg: "",
|
|
|
- type: "textare",
|
|
|
- value: data.phonenumber,
|
|
|
- placeholder: "收货人电话",
|
|
|
- valueName: "phonenumber",
|
|
|
- disabled: true,
|
|
|
- required: false
|
|
|
- })
|
|
|
project = data;
|
|
|
this.setData({
|
|
|
disabled: false,
|
|
|
@@ -309,43 +273,7 @@ Page({
|
|
|
if (temporary.item.value[0] == data.value[0]) return wx.navigateBack();
|
|
|
temporary.item.value = data.value;
|
|
|
if (temporary.item.valueName == "sys_enterpriseid") {
|
|
|
- form.splice(2, form.some(v => v.label == '收货人') ? 1 : 0, {
|
|
|
- label: "收货人",
|
|
|
- error: false,
|
|
|
- errMsg: "",
|
|
|
- type: "route",
|
|
|
- url: "/packageA/select/contacts/select",
|
|
|
- value: "",
|
|
|
- params: {
|
|
|
- "id": "20221022165503",
|
|
|
- "content": {
|
|
|
- nocache: true,
|
|
|
- sys_enterpriseid: data.value[1][0],
|
|
|
- "where": {
|
|
|
- "condition": "",
|
|
|
- "workaddress": 0
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- query: "&radio=true",
|
|
|
- interrupt: true,
|
|
|
- placeholder: "选择收货人",
|
|
|
- valueName: "rec_contactsid",
|
|
|
- checking: "base",
|
|
|
- required: true
|
|
|
- })
|
|
|
- form.splice(3, form.some(v => v.label == '收货人电话') ? 1 : 0, {
|
|
|
- label: "收货人电话",
|
|
|
- error: false,
|
|
|
- errMsg: "",
|
|
|
- type: "textare",
|
|
|
- value: "",
|
|
|
- placeholder: "收货人电话",
|
|
|
- valueName: "phonenumber",
|
|
|
- disabled: true,
|
|
|
- required: false
|
|
|
- })
|
|
|
- if (source == 0) form.splice(4, form.some(v => v.label == '项目') ? form.some(v => v.label == '项目地址') ? 3 : 1 : 0, {
|
|
|
+ if (source == 0) form.splice(temporary.index - 0 + 1, form.some(v => v.label == '项目') ? (form.some(v => v.label == '项目地址') ? 3 : 1) : 0, {
|
|
|
label: "项目",
|
|
|
error: false,
|
|
|
errMsg: "",
|
|
|
@@ -415,8 +343,6 @@ Page({
|
|
|
checking: "base",
|
|
|
required: true
|
|
|
})
|
|
|
- } else if (temporary.item.valueName == "rec_contactsid") {
|
|
|
- form.find(v => v.label == '收货人电话').value = data.item.phonenumber;
|
|
|
}
|
|
|
form[temporary.index] = temporary.item;
|
|
|
wx.navigateBack()
|
|
|
@@ -436,7 +362,6 @@ Page({
|
|
|
content.enddate = content.invaliddate[1];
|
|
|
content.sa_projectid = content.sa_projectid[1] ? content.sa_projectid[1][0] : 0;
|
|
|
content.sys_enterpriseid = content.sys_enterpriseid[1] ? content.sys_enterpriseid[1][0] : 0;
|
|
|
- content.rec_contactsid = content.rec_contactsid[1] ? content.rec_contactsid[1][0] : 0;
|
|
|
content.saler_hrid = content.saler_hrid[1] ? content.saler_hrid[1][0] : 0;
|
|
|
content.discountrate = (content.discountrate / 100).toFixed(4) || 1;
|
|
|
content.paytype = content.sa_receivableruleid[1] ? content.sa_receivableruleid[0] : "";
|