|
@@ -239,10 +239,10 @@
|
|
|
</template>
|
|
|
<template slot="storageId" slot-scope="{ row, index }">
|
|
|
<el-select
|
|
|
- v-if="row.$cellEdit"
|
|
|
v-model="row.storageId"
|
|
|
filterable
|
|
|
@change="storageChange(row)"
|
|
|
+ disabled
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in storageOptions"
|
|
@@ -251,7 +251,6 @@
|
|
|
:label="item.cname"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
- <span v-else>{{ row.storageName }}</span>
|
|
|
</template>
|
|
|
<template slot="remarks" slot-scope="{ row, index }">
|
|
|
<el-input
|
|
@@ -320,6 +319,9 @@
|
|
|
>移除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
+ <template slot="storageId" slot-scope="scope">
|
|
|
+ <span>{{scope.row.storageId | storageFormat(storageOptions)}}</span>
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
</span>
|
|
|
|
|
@@ -610,6 +612,9 @@ export default {
|
|
|
},
|
|
|
decimalFormat(num) {
|
|
|
return num ? Number(num).toFixed(2) : "0.00";
|
|
|
+ },
|
|
|
+ storageFormat(row, storageOptions) {
|
|
|
+ return row = storageOptions.find(item => item.id == row).cname
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -907,6 +912,7 @@ export default {
|
|
|
item.unit = e.unit;
|
|
|
item.priceCategory = e.goodsTypeName;
|
|
|
item.price = e.unitPrice;
|
|
|
+ item.storageId = e.storageId;
|
|
|
item.$cellEdit = true;
|
|
|
}
|
|
|
});
|
|
@@ -925,8 +931,9 @@ export default {
|
|
|
price: e.unitPrice,
|
|
|
amount: 0,
|
|
|
orderQuantity: 0,
|
|
|
- storageId: this.storageOptions.length > 0? this.storageOptions[0].id: null,
|
|
|
- storageName: this.storageOptions.length > 0? this.storageOptions[0].cname: null,
|
|
|
+ storageId: e.storageId,
|
|
|
+ // storageId: this.storageOptions.length > 0? this.storageOptions[0].id: null,
|
|
|
+ // storageName: this.storageOptions.length > 0? this.storageOptions[0].cname: null,
|
|
|
$cellEdit: true
|
|
|
});
|
|
|
});
|
|
@@ -942,8 +949,9 @@ export default {
|
|
|
amount: 0,
|
|
|
orderQuantity: 0,
|
|
|
price: e.unitPrice,
|
|
|
- storageId: this.storageOptions.length > 0? this.storageOptions[0].id: null,
|
|
|
- storageName: this.storageOptions.length > 0? this.storageOptions[0].cname: null,
|
|
|
+ // storageId: this.storageOptions.length > 0? this.storageOptions[0].id: null,
|
|
|
+ // storageName: this.storageOptions.length > 0? this.storageOptions[0].cname: null,
|
|
|
+ storageId: e.storageId,
|
|
|
$cellEdit: true
|
|
|
});
|
|
|
});
|