| | |
| | | */ |
| | | fetchForkliftOperators() { |
| | | this.$u.api |
| | | .dictData({ |
| | | dictType: "forklift", |
| | | .NuclearScaleEntry.listStaff({ |
| | | postNames: ["叉车工"], |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 0 && res.data.length > 0) { |
| | | res.data.forEach((i) => { |
| | | const list = res?.data?.records || res?.data || []; |
| | | if (res.code === 0 && Array.isArray(list) && list.length > 0) { |
| | | list.forEach((i) => { |
| | | const obj = Object.assign({ |
| | | label: i.label, |
| | | value: i.label, |
| | | label: i.staffName, |
| | | value: i.staffName, |
| | | }); |
| | | this.checkboxList.push(obj); |
| | | }); |
| | |
| | | */ |
| | | fetchWeighmen() { |
| | | this.$u.api |
| | | .dictData({ |
| | | dictType: "weighing", |
| | | .NuclearScaleEntry.listStaff({ |
| | | postNames: ["司磅员"], |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 0 && res.data.length > 0) { |
| | | res.data.forEach((i) => { |
| | | const list = res?.data?.records || res?.data || []; |
| | | if (res.code === 0 && Array.isArray(list) && list.length > 0) { |
| | | list.forEach((i) => { |
| | | const obj = Object.assign({ |
| | | label: i.label, |
| | | value: i.label, |
| | | label: i.staffName, |
| | | value: i.staffName, |
| | | }); |
| | | this.weighmanList.push(obj); |
| | | }); |