update 上料模块里的单位展示

This commit is contained in:
lb
2023-03-02 14:39:19 +08:00
parent 5b871f27f5
commit 59034e7caa
10 changed files with 172 additions and 103 deletions

View File

@@ -17,7 +17,7 @@
<div style="display: flex; flex-direction: column; min-width: 128px; justify-content: space-between">
<div style="font-size: 1.125em; line-height: 2.5; text-align: right">{{ material }}</div>
<div style="font-size: 1.5em; line-height: 1.25; text-align: right; font-weight: bold">
{{ qty }} <span style="color: #777; font-weight: normal; font-size: 1rem">存量</span>
{{ qty }} <span style="color: #777; font-weight: normal; font-size: 1rem">{{ computedUnit }}</span>
</div>
<div class="btn-group" style="text-align: right">
@@ -29,6 +29,8 @@
</template>
<script>
import { dictFilter } from "@/utils/filters";
export default {
name: "StorageBox",
props: {
@@ -52,9 +54,21 @@ export default {
type: String,
default: "-",
},
unitValue: {
type: String,
default: null
}
},
data() {
return {};
return {
unitList: dictFilter("unit"),
};
},
computed: {
computedUnit() {
if (!this.unitValue) return '存量'
return this.unitList(this.unitValue)+' 存量'
},
},
created() {},
mounted() {},

View File

@@ -30,6 +30,7 @@
color="#8899ff"
:material="st.material ?? '默认物料'"
:total="2"
:unit-value="st.unitDictValue"
/>
</div>
</div>
@@ -45,9 +46,9 @@
padding-left: 16px;
top: 10px;
left: -16px;
"
"
>
中间仓
中间仓
</h3>
<div class="middle-list" style="padding: 12px 0; display: flex; flex-wrap: wrap">
<storage-box
@@ -58,11 +59,12 @@
color="#99aa11"
:material="st.material ?? '默认物料'"
:total="2"
/>
:unit-value="st.unitDictValue"
/>
</div>
</div>
</div>
<div class="unknown-storage" v-if="unknownStorage.length">
<h3
<div class="unknown-storage" v-if="unknownStorage.length">
<h3
class=""
style="
position: relative;
@@ -73,19 +75,20 @@
padding-left: 16px;
top: 10px;
left: -16px;
"
"
>
未知仓
</h3>
<div class="unknown-list" style="padding: 12px 0; display: flex; flex-wrap: wrap">
<storage-box
v-for="(st, index) in unknownStorage"
:key="index"
未知仓
</h3>
<div class="unknown-list" style="padding: 12px 0; display: flex; flex-wrap: wrap">
<storage-box
v-for="(st, index) in unknownStorage"
:key="index"
:qty="st.qty ?? 0"
color="#3388ff"
:storage="st.name"
:material="st.material ?? '默认物料'"
:total="2"
:unit-value="st.unitDictValue"
/>
</div>
</div>