@@ -11,7 +11,13 @@ | |||||
<div class="storage-body" style="height: 120px; display: flex"> | <div class="storage-body" style="height: 120px; display: flex"> | ||||
<div class="storage-box__bg" style="height: 100%; width: 48px; margin-right: 12px; border-radius: 4px; overflow: hidden"> | <div class="storage-box__bg" style="height: 100%; width: 48px; margin-right: 12px; border-radius: 4px; overflow: hidden"> | ||||
<div class="storage-box__inner" style="position: absolute; bottom: 0; left: 0; height: 65%; width: 100%" :style="{ background: color }"></div> | |||||
<div | |||||
class="storage-box__inner" | |||||
style="position: absolute; bottom: 0; left: 0; height: 0; width: 100%; font-size: 1.125rem; text-align: center;" | |||||
:style="{ background: color, height: computedRatio + '%', color: computedRatio > 20 ? 'white' : '#ccc' }" | |||||
> | |||||
<span style="height: 100%; display: flex; flex-direction: column; justify-content: flex-end;">{{ computedRatio + '%' }}</span> | |||||
</div> | |||||
</div> | </div> | ||||
<div style="display: flex; flex-direction: column; min-width: 128px; justify-content: space-between"> | <div style="display: flex; flex-direction: column; min-width: 128px; justify-content: space-between"> | ||||
@@ -56,8 +62,12 @@ export default { | |||||
}, | }, | ||||
unitValue: { | unitValue: { | ||||
type: String, | type: String, | ||||
default: null | |||||
} | |||||
default: null, | |||||
}, | |||||
ratio: { | |||||
type: Number, | |||||
default: 0.0, | |||||
}, | |||||
}, | }, | ||||
data() { | data() { | ||||
return { | return { | ||||
@@ -66,9 +76,12 @@ export default { | |||||
}, | }, | ||||
computed: { | computed: { | ||||
computedUnit() { | computedUnit() { | ||||
if (!this.unitValue) return '存量' | |||||
return this.unitList(this.unitValue)+' 存量' | |||||
if (!this.unitValue) return "存量"; | |||||
return this.unitList(this.unitValue) + " 存量"; | |||||
}, | }, | ||||
computedRatio() { | |||||
return this.ratio ? this.ratio.toFixed(2) * 100 : 0 | |||||
} | |||||
}, | }, | ||||
created() {}, | created() {}, | ||||
mounted() {}, | mounted() {}, | ||||
@@ -7,8 +7,8 @@ | |||||
<section class="container-content"> | <section class="container-content"> | ||||
<div class="dialy-storage" v-if="dailyStorage.length"> | <div class="dialy-storage" v-if="dailyStorage.length"> | ||||
<h3 | <h3 | ||||
class="" | |||||
style=" | |||||
class="" | |||||
style=" | |||||
position: relative; | position: relative; | ||||
background: #eeee; | background: #eeee; | ||||
color: #666; | color: #666; | ||||
@@ -31,11 +31,12 @@ | |||||
:material="st.material ?? '默认物料'" | :material="st.material ?? '默认物料'" | ||||
:total="2" | :total="2" | ||||
:unit-value="st.unitDictValue" | :unit-value="st.unitDictValue" | ||||
/> | |||||
</div> | |||||
:ratio="st.ratio" | |||||
/> | |||||
</div> | </div> | ||||
<div class="middle-storage" v-if="middleStorage.length"> | |||||
<h3 | |||||
</div> | |||||
<div class="middle-storage" v-if="middleStorage.length"> | |||||
<h3 | |||||
class="" | class="" | ||||
style=" | style=" | ||||
position: relative; | position: relative; | ||||
@@ -46,9 +47,9 @@ | |||||
padding-left: 16px; | padding-left: 16px; | ||||
top: 10px; | top: 10px; | ||||
left: -16px; | left: -16px; | ||||
" | |||||
" | |||||
> | > | ||||
中间仓 | |||||
中间仓 | |||||
</h3> | </h3> | ||||
<div class="middle-list" style="padding: 12px 0; display: flex; flex-wrap: wrap"> | <div class="middle-list" style="padding: 12px 0; display: flex; flex-wrap: wrap"> | ||||
<storage-box | <storage-box | ||||
@@ -60,11 +61,12 @@ | |||||
:material="st.material ?? '默认物料'" | :material="st.material ?? '默认物料'" | ||||
:total="2" | :total="2" | ||||
:unit-value="st.unitDictValue" | :unit-value="st.unitDictValue" | ||||
/> | |||||
</div> | |||||
:ratio="st.ratio" | |||||
/> | |||||
</div> | </div> | ||||
<div class="unknown-storage" v-if="unknownStorage.length"> | |||||
<h3 | |||||
</div> | |||||
<div class="unknown-storage" v-if="unknownStorage.length"> | |||||
<h3 | |||||
class="" | class="" | ||||
style=" | style=" | ||||
position: relative; | position: relative; | ||||
@@ -75,20 +77,21 @@ | |||||
padding-left: 16px; | padding-left: 16px; | ||||
top: 10px; | top: 10px; | ||||
left: -16px; | 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" | :qty="st.qty ?? 0" | ||||
color="#3388ff" | color="#3388ff" | ||||
:storage="st.name" | :storage="st.name" | ||||
:material="st.material ?? '默认物料'" | :material="st.material ?? '默认物料'" | ||||
:total="2" | :total="2" | ||||
:unit-value="st.unitDictValue" | :unit-value="st.unitDictValue" | ||||
:ratio="st.ratio" | |||||
/> | /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -69,7 +69,7 @@ export default function () { | |||||
const dialogConfigs = { | const dialogConfigs = { | ||||
extraIds: { wsId: 4 }, // 工艺管理里面的相关模块的 dialogWithMenu 需要额外的工序 id | extraIds: { wsId: 4 }, // 工艺管理里面的相关模块的 dialogWithMenu 需要额外的工序 id | ||||
menu: [{ name: "压制工艺", key: 'info' }, { name: "工艺参数", key: 'attr', onlyEditMode: true }], | |||||
menu: [{ name: "检测工艺", key: 'info' }, { name: "工艺参数", key: 'attr', onlyEditMode: true }], | |||||
form: { | form: { | ||||
rows: [ | rows: [ | ||||
[ | [ | ||||