Parcourir la source

Merge branch 'master' into test

liujt il y a 8 mois
Parent
commit
43fcfd2a4e
1 fichiers modifiés avec 30 ajouts et 7 suppressions
  1. 30 7
      src/views/bpm/stockManagement/storage.vue

+ 30 - 7
src/views/bpm/stockManagement/storage.vue

@@ -83,7 +83,15 @@
               <el-input
                 placeholder="登记人"
                 disabled
-                v-model="formData.extInfo.createUserName"
+                v-model="formData.createUserName"
+                clearable /></el-form-item
+          ></el-col>
+          <el-col :span="6">
+            <el-form-item label="审核人">
+              <el-input
+                placeholder="审核人"
+                disabled
+                v-model="formData.approvalUserName"
                 clearable /></el-form-item
           ></el-col>
           <!-- <el-col :span="6" v-if="formData.bizType == 2">
@@ -1197,7 +1205,8 @@
       detailList: { type: Array, default: () => [] },
       saleProductList: { type: Array, default: () => [] },
       detailProductList: { type: Array, default: () => [] },
-      isMoreProduct: { type: Boolean, default: false } //多产品包装明细
+      isMoreProduct: { type: Boolean, default: false }, //多产品包装明细
+      processInstance: { type: Object, default: () => {} }
     },
     data() {
       return {
@@ -1466,11 +1475,25 @@
         }
 
         // 入库登记人
-        this.formData.extInfo.createUserId = this.$store.state.user.info.userId;
-        this.formData.extInfo.createUserName = this.$store.state.user.info.name;
-        this.formData.extInfo.deliveryPhone = this.$store.state.user.info.phone;
-        this.formData.createUserId = this.$store.state.user.info.userId;
-        this.formData.extInfo.deptName = this.$store.state.user.info.deptName;
+        // this.formData.extInfo.createUserId = this.$store.state.user.info.userId;
+        // this.formData.extInfo.createUserName = this.$store.state.user.info.name;
+        // this.formData.extInfo.deliveryPhone = this.$store.state.user.info.phone;
+        // this.formData.createUserId = this.$store.state.user.info.userId;
+        // this.formData.extInfo.deptName = this.$store.state.user.info.deptName;
+
+         // 入库登记人
+        // const startUser = this.processInstance?.startUser || {};
+        const userInfo = this.$store.state.user.info || {};
+
+        // 确保所有值都是原始类型,防止对象被绑定到DOM属性
+        this.formData.extInfo.createUserId = this.form.createUserId || userInfo.userId || '';
+        this.formData.extInfo.createUserName = this.form.createUserName || userInfo.name || '';
+        this.formData.extInfo.deliveryPhone = userInfo.phone || '';
+        this.formData.createUserId = this.form.createUserId || userInfo.userId || '';
+        this.formData.createUserName = this.form.createUserName || userInfo.name || '';
+        this.formData.extInfo.deptName = this.form.deptName || userInfo.deptName || '';
+        this.formData.approvalUserName = this.form.approvalUserName || '';
+        this.formData.approvalUserId = this.form.approvalUserId || '';
 
         // this.formData.extInfo.supplierName = this.form.supplierName;
         // this.formData.extInfo.supplierId = this.form.supplierId;