|
@@ -258,23 +258,22 @@ export default {
|
|
|
if(newData[i].Checked){//同时创建资产
|
|
|
await createPropertyData(params, res => {
|
|
|
let response = res;
|
|
|
- if(response.Result=='success'){
|
|
|
- params.data.PropertyId = response.Id;
|
|
|
- createPart(params, res=>{});
|
|
|
- if(i==newData.length-1){
|
|
|
- this.$router.push({
|
|
|
- path: "/ledger/partsmanage",
|
|
|
- query: {
|
|
|
- deviceId: this.category.deviceId,
|
|
|
- typeId: this.category.ParentId
|
|
|
- }
|
|
|
- });
|
|
|
- session.remove("partsAddData")
|
|
|
- }
|
|
|
+ params.data.PropertyId = response.Id;
|
|
|
+ })
|
|
|
+ await createPart(params, res=>{
|
|
|
+ if(i==newData.length-1){
|
|
|
+ this.$router.push({
|
|
|
+ path: "/ledger/partsmanage",
|
|
|
+ query: {
|
|
|
+ deviceId: this.category.deviceId,
|
|
|
+ typeId: this.category.ParentId
|
|
|
+ }
|
|
|
+ });
|
|
|
+ session.remove("partsAddData")
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
- createPart(params, res=>{
|
|
|
+ await createPart(params, res=>{
|
|
|
if(i==newData.length-1){
|
|
|
this.$router.push({
|
|
|
path: "/ledger/partsmanage",
|