浏览代码

modify create device

haojianlong 5 年之前
父节点
当前提交
7e3a54cf89
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/views/ledger/facility/addfacility.vue

+ 4 - 4
src/views/ledger/facility/addfacility.vue

@@ -210,9 +210,9 @@ export default {
         params.Family = this.firmId;
         params.Category = this.category.deviceId;
         if (newData[i].Checked) {//同时创建资产
-          await createPropertyData(params, async res => {
-            params.PropertyId = res.Id
-            await createEquip(params, res => {
+          await createPropertyData([params], async res => {
+            params.PropertyId = res.EntityList[0].EquipID
+            await createEquip([params], res => {
               if (i == newData.length - 1) {
                 this.$router.push({
                   path: "/ledger/facility",
@@ -223,7 +223,7 @@ export default {
             })
           })
         } else {
-          await createEquip(params, res => {
+          await createEquip([params], res => {
             if (i == newData.length - 1) {
               this.$router.push({
                 path: "/ledger/partsmanage",