增加第二单位下拉选择(暂时隐藏)
This commit is contained in:
@@ -172,7 +172,18 @@
|
||||
<!-- <div class="tips" v-if="scope.row.stockNumber">库存:{{ scope.row.stockNumber }}</div> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" prop="conUnit"></el-table-column>
|
||||
<el-table-column label="单位" prop="conUnit">
|
||||
<!-- <template v-slot="scope">
|
||||
<el-select v-model="scope.row.conUnit" reserve-keyword placeholder="请输入关键词">
|
||||
<el-option
|
||||
v-for="item in returnConUnits(scope.row.consInfoId)"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column label="使用数量" prop="surplusStock" min-width="150px">
|
||||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.surplusStock" :min="0" />
|
||||
@@ -249,6 +260,20 @@ const myDialogRefhaocai = ref(null);
|
||||
const myDialogRefkucun = ref(null);
|
||||
let haocaiData = ref({});
|
||||
let options = ref([]);
|
||||
//选择耗材单位
|
||||
const returnConUnits = (consInfoId) => {
|
||||
const arr = [];
|
||||
const item = options.value.find((item) => item.id === consInfoId);
|
||||
if (item) {
|
||||
if (item.conUnit) {
|
||||
arr.push(item.conUnit);
|
||||
}
|
||||
if (item.conUnitTwo) {
|
||||
arr.push(item.conUnitTwo);
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
let kucundata = ref(0);
|
||||
const form = reactive({
|
||||
warnLine: "",
|
||||
@@ -357,6 +382,8 @@ async function confirmkucun() {
|
||||
}
|
||||
function editOpen(item: any) {
|
||||
haocaiData.value = item;
|
||||
console.log(item);
|
||||
|
||||
if (haocaiData.value.consList.length == 0) {
|
||||
let items = {
|
||||
productId: item.id,
|
||||
|
||||
Reference in New Issue
Block a user