|
|
@@ -641,16 +641,6 @@ export default {
|
|
|
|
|
|
});
|
|
|
}
|
|
|
- if (this.form.createUserId) {
|
|
|
- this.formData.fromId = this.form.createUserId;
|
|
|
- warehouseDefinition.getGroupById(this.form.createUserId).then((res) => {
|
|
|
- console.log(res, 'createUserId')
|
|
|
- this.$set(this.formData, 'fromUser', res.name);
|
|
|
- this.$set(this.formData.extInfo, 'verifyDeptCode', res.groupId);
|
|
|
- this.$set(this.formData.extInfo, 'verifyDeptName', res.groupName);
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
// 生产相关逻辑
|
|
|
console.log(this.detailList, 'this.detailList')
|
|
|
@@ -660,13 +650,24 @@ export default {
|
|
|
|
|
|
if (this.detailList?.length > 0) {
|
|
|
// 获取领料人列表
|
|
|
- this.getStaffList({ id: this.form.executorDeptId }).then(() => {
|
|
|
- // 获取领料人和领料部门
|
|
|
- this.formData.fromId = this.form.executorId;
|
|
|
- this.formData.fromUser = this.form.executorName;
|
|
|
- this.formData.extInfo.verifyDeptCode = this.form.executorDeptId;
|
|
|
- this.formData.extInfo.verifyDeptName = this.form.executorDeptName;
|
|
|
- });
|
|
|
+
|
|
|
+ if (this.form.executorDeptId) {
|
|
|
+ this.getStaffList({ id: this.form.executorDeptId }).then(() => {
|
|
|
+ // 获取领料人和领料部门
|
|
|
+ this.formData.fromId = this.form.executorId;
|
|
|
+ this.formData.fromUser = this.form.executorName;
|
|
|
+ this.formData.extInfo.verifyDeptCode = this.form.executorDeptId;
|
|
|
+ this.formData.extInfo.verifyDeptName = this.form.executorDeptName;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.formData.fromId = this.form.createUserId;
|
|
|
+ warehouseDefinition.getGroupById(this.form.createUserId).then((res) => {
|
|
|
+ console.log(res, 'form没有executorDeptId有createUserId')
|
|
|
+ this.$set(this.formData, 'fromUser', res.name);
|
|
|
+ this.$set(this.formData.extInfo, 'verifyDeptCode', res.groupId);
|
|
|
+ this.$set(this.formData.extInfo, 'verifyDeptName', res.groupName);
|
|
|
+ });
|
|
|
+ }
|
|
|
let pData = {
|
|
|
type: '1',
|
|
|
builders: this.detailList.map((item) => {
|