更新触摸屏修正样式内容

This commit is contained in:
zxx 2023-10-25 14:32:54 +08:00
parent 063d116b32
commit e0529713cb
2 changed files with 131 additions and 70 deletions

View File

@ -59,6 +59,17 @@
</div> </div>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column field="production_id" title="布产状态" width="160">
<template #default="{ row }">
<span v-if="row.production_id === 0"> 未布产</span>
<a-button type="primary" @click="pageEdit(row.production_id)"
v-if="row.production_id > 0">已布产,点击进入</a-button>
</template>
</vxe-column>
<vxe-column field="progress" title="进度" width="170" :cellRender="{ name: 'progress' }">
</vxe-column>
<vxe-column field="mold_scheme" title="模型名" width="160" :params="editor_scheme" formatter="formatRef" <vxe-column field="mold_scheme" title="模型名" width="160" :params="editor_scheme" formatter="formatRef"
:edit-render="{ name: 'MkGridDataSelector' }"> :edit-render="{ name: 'MkGridDataSelector' }">
@ -69,8 +80,7 @@
</template> </template>
</vxe-column> </vxe-column>
<vxe-column field="mold_code" title="模型编码" width="160" <vxe-column field="mold_code" title="模型编码" width="160" :edit-render="{ name: '$input' }"></vxe-column>
:edit-render="{ name: '$input' }"></vxe-column>
<vxe-column field="mold_master_user_detail" title="师傅" width="160" :params="editor_staff" formatter="formatRef" <vxe-column field="mold_master_user_detail" title="师傅" width="160" :params="editor_staff" formatter="formatRef"
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column> :edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
@ -291,6 +301,13 @@ export default {
this.formOptions.data = this.$mk.formatDetailData({ dataset: this.dataset, data: a.data[this.detailDataFieldName], rules: this.formOptions.items }); this.formOptions.data = this.$mk.formatDetailData({ dataset: this.dataset, data: a.data[this.detailDataFieldName], rules: this.formOptions.items });
console.log(this.formOptions.data) console.log(this.formOptions.data)
this.detailsData = JSON.parse(JSON.stringify(a.data[this.detailDataFieldName].order_molds || [])); this.detailsData = JSON.parse(JSON.stringify(a.data[this.detailDataFieldName].order_molds || []));
// detailsData progress formatProgress
this.detailsData.forEach(item => {
item.progress = this.formatProgress(item.progress);
});
if (a.data[this.detailDataFieldName].auditor_uid) { if (a.data[this.detailDataFieldName].auditor_uid) {
this.pageStatus = 'approved'; this.pageStatus = 'approved';
} else { } else {
@ -655,6 +672,25 @@ export default {
sendApproved(""); sendApproved("");
}, },
pageEdit(row) {
if (!row) {
this.$mk.msg("请选择行");
return;
}
this.$openPage('/Mold/MoldProductionOrderUpdate/' + row)
},
//
formatProgress(progress) {
// 56
if (progress.length > 5) {
progress = progress.substring(0, 6);
//
progress = parseFloat(progress).toFixed(2);
}
return progress;
},
}, },
// //
watch: { watch: {

View File

@ -9,20 +9,22 @@
<div class="container"> <div class="container">
<div class="left"> <div class="left">
<div class="card"> <div class="card" style="max-height: 585px;overflow-y: auto;">
<h4>工艺布产工序</h4> <h4>工艺布产工序</h4>
<div v-if="detailsData && detailsData.length"> <div v-if="detailsData && detailsData.length">
<div v-for="item in detailsData" :key="item.id" class="card-item"> <div v-for="item in detailsData" :key="item.id" class="card-item">
<div class="gx-item"> <!-- -->
<div class="gx-item-col">
<h3>部件{{ item.component_detail ? item.component_detail.name : '' }}</h3>
<div class="gx-item">
<div class="gx-item-col">
<div v-if="item.department_detail && item.department_detail.name">部门{{ item.department_detail.name }} <div v-if="item.department_detail && item.department_detail.name">部门{{ item.department_detail.name }}
</div> </div>
<div>部件{{ item.component_detail ? item.component_detail.name : '' }}</div>
<div>工序{{ item.process_detail ? item.process_detail.name : '' }}</div> <div>工序{{ item.process_detail ? item.process_detail.name : '' }}</div>
<div> <div style="font-size: 16px;font-weight: bold;">
状态{{ item.is_complete ? "已完成" : (item.is_send ? "已发料" : "未发料") }} 状态{{ item.is_complete ? "已完成" : (item.is_send ? "已发料" : "未发料") }}
<span v-if="item.complete_time">({{ getDateValueString(item.complete_time) }})</span> <span v-if="item.complete_time">({{ getDateValueString(item.complete_time) }})</span>
</div> </div>
@ -31,10 +33,8 @@
<div> <div>
<a-button type="primary" @click="pageSend(item)" v-if="item.is_send !== 1">发料</a-button> <a-button type="primary" @click="pageSend(item)" v-if="item.is_send !== 1">发料</a-button>
<a-button @click="pageSend(item, true)" v-else-if="!item.is_complete">撤销发料</a-button> <a-button @click="pageSend(item, true)" v-else-if="!item.is_complete">撤销发料</a-button>
<a-button style="margin-left: 3px;" type="primary" @click="pageReport(item)" <a-button style="margin-left: 3px;" type="primary" @click="pageReport(item)"
v-if="item.is_send && item.is_complete !== 1">报工</a-button> v-if="item.is_send && item.is_complete !== 1">报工</a-button>
<a-button style="margin-left: 3px;" @click="pageReport(item, true)" <a-button style="margin-left: 3px;" @click="pageReport(item, true)"
v-if="item.is_complete == 1">撤销报工</a-button> v-if="item.is_complete == 1">撤销报工</a-button>
</div> </div>
@ -45,21 +45,26 @@
</div> </div>
</div> </div>
<div class="card-item-progress-img">
<img v-if="item.component_detail && item.component_detail.image"
@click.stop="$hevueImgPreview(item.component_detail.image)" style="width:50px;height:50px;"
:src="item.component_detail.image" />
<span v-else></span>
</div>
<div class="card-item-progress"> <div class="card-item-progress">
<img v-if="item.component_detail && item.component_detail.image"
@click.stop="$hevueImgPreview(item.component_detail.image)"
style="width:50px;height:50px;margin-right: 10px;" :src="item.component_detail.image" />
<span v-else></span>
<a-progress type="circle" :percent="formatProgress(item.progress)" :width="50" /> <a-progress type="circle" :percent="formatProgress(item.progress)" :width="50" />
</div> </div>
<!-- -->
</div> </div>
</div> </div>
<div v-else style="height: 350px;overflow:auto;;"> <div v-else style="min-height: 500px;">
<div v-for="ditem in detailsData4" :key="ditem.id" class="card-item"> <div v-for="ditem in detailsData4" :key="ditem.id" class="card-item">
<!-- -->
<h3>部件{{ ditem.component_detail ? ditem.component_detail.name : '' }}</h3> <h3>部件{{ ditem.component_detail ? ditem.component_detail.name : '' }}</h3>
@ -72,7 +77,7 @@
}}</div> }}</div>
<div>工序{{ item.process_detail ? item.process_detail.name : '' }}</div> <div>工序{{ item.process_detail ? item.process_detail.name : '' }}</div>
<div>状态 <div style="font-size: 14px;font-weight: bold;">状态
{{ item.is_complete ? "已完成" : (item.is_send ? "已发料" : "未发料") }} {{ item.is_complete ? "已完成" : (item.is_send ? "已发料" : "未发料") }}
<span v-if="item.complete_time">({{ getDateValueString(item.complete_time) }})</span> <span v-if="item.complete_time">({{ getDateValueString(item.complete_time) }})</span>
</div> </div>
@ -98,17 +103,19 @@
</div> </div>
<div class="card-item-progress-img">
<div class="card-item-progress">
<img v-if="ditem.component_img" @click.stop="$hevueImgPreview(ditem.component_img)" <img v-if="ditem.component_img" @click.stop="$hevueImgPreview(ditem.component_img)"
style="width:50px;height:50px;margin-right: 10px;" :src="ditem.component_img" /> style="width:50px;height:50px;" :src="ditem.component_img" />
<span v-else></span> <span v-else></span>
</div>
<div class="card-item-progress">
<a-progress type="circle" :percent="formatProgress(ditem.progress)" :width="50" /> <a-progress type="circle" :percent="formatProgress(ditem.progress)" :width="50" />
</div> </div>
<!-- -->
</div> </div>
@ -120,10 +127,10 @@
<h4>部门进度汇总</h4> <h4>部门进度汇总</h4>
<vxe-table border show-overflow keep-source ref="xTable3" :height="240" :data="detailsData3"> <vxe-table border show-overflow keep-source ref="xTable3" :height="230" :data="detailsData3">
<vxe-column field="name" title="部门名称" width="160"></vxe-column> <vxe-column field="name" title="部门名称" width="150"></vxe-column>
<vxe-column field="code" title="部门编码" width="160"></vxe-column> <vxe-column field="code" title="部门编码" width="110"></vxe-column>
<vxe-column field="process_num" title="工序数" width="110"></vxe-column> <vxe-column field="process_num" title="工序数" width="90"></vxe-column>
<vxe-column type="expand" title="工序明细" width="160" v-if="false"> <vxe-column type="expand" title="工序明细" width="160" v-if="false">
<template #content="{ row }"> <template #content="{ row }">
<a-table :columns="sub_columns" :data-source="row.progressList" <a-table :columns="sub_columns" :data-source="row.progressList"
@ -134,7 +141,7 @@
</a-table> </a-table>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column field="progress" :cellRender="{ name: 'progress' }" title="进度" width="180"></vxe-column> <vxe-column field="progress" :cellRender="{ name: 'progress' }" title="进度" width="150"></vxe-column>
</vxe-table> </vxe-table>
@ -166,15 +173,18 @@
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2" tab="即将超时布产列表" force-render> <a-tab-pane key="2" tab="即将超时布产列表" force-render>
<vxe-table border show-overflow keep-source ref="xTable3" :height="610" :row-config="{ height: 80 }" <vxe-table border show-overflow keep-source ref="xTable3" :height="715" :row-config="{ height: 80 }"
:data="poData"> :data="poData">
<vxe-column title="操作" width="90">
<template #default="{ row }">
<a-button @click="selectPoInfo(row)">选择</a-button>
</template>
</vxe-column>
<vxe-column field="code" title="编码" width="130"></vxe-column> <vxe-column field="code" title="编码" width="130"></vxe-column>
<vxe-column field="mold_master_name" title="模具师傅" width="110"></vxe-column> <vxe-column field="mold_master_name" title="模具师傅" width="110"></vxe-column>
<vxe-column field="engineer_name" title="工程师傅" width="110"></vxe-column> <vxe-column field="engineer_name" title="工程师傅" width="110"></vxe-column>
<vxe-column field="complete_time" formatter="formatDate" title="要求完成时间" width="160"></vxe-column> <vxe-column field="complete_time" formatter="formatDate" title="预计完成时间" width="160"></vxe-column>
<vxe-column field="mold_detail" formatter="formatRef" :params="{ dataType: 'object', textField: 'name' }"
title="模具" width="auto"></vxe-column>
<vxe-column title="图片" width="75"> <vxe-column title="图片" width="75">
<template #default="{ row }"> <template #default="{ row }">
<img v-if="row.mold_detail.image" style="width:52px;height:52px;" :src="row.mold_detail.image" <img v-if="row.mold_detail.image" style="width:52px;height:52px;" :src="row.mold_detail.image"
@ -182,11 +192,8 @@
<span v-else></span> <span v-else></span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="操作" width="90"> <vxe-column field="mold_detail" formatter="formatRef" :params="{ dataType: 'object', textField: 'name' }"
<template #default="{ row }"> title="模具" width="400"></vxe-column>
<a-button @click="selectPoInfo(row)">选择</a-button>
</template>
</vxe-column>
</vxe-table> </vxe-table>
@ -194,14 +201,7 @@
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
<div style="margin:10px 0;">
</div>
</div>
</div>
<div data-show="true" class="ant-alert ant-alert-info ant-alert-with-description" <div data-show="true" class="ant-alert ant-alert-info ant-alert-with-description"
style="padding: 5px 5px 5px 20px;border:none;"> style="padding: 5px 5px 5px 20px;border:none;">
@ -220,6 +220,18 @@
</div> </div>
</div>
</div>
</div>
</div>
</div> </div>
</template> </template>
@ -284,8 +296,8 @@ export default {
// //
isEdit: false, isEdit: false,
currentId: 0, currentId: 0,
detailsData: [], detailsData: [], //
detailsData3: [], detailsData3: [], //
detailsData4: [], // detailsData4: [], //
@ -696,7 +708,7 @@ export default {
}, },
loadDepartment({ id, code }) { loadDepartment({ id, code }) { //
let ds = []; let ds = [];
if (id) { if (id) {
@ -714,14 +726,17 @@ export default {
this.detailsData = ds; this.detailsData = ds;
} }
else if (code) { else if (code) {
if (ds.filter(item => item.department_detail && item.department_detail.code == code).length) {
return;
}
this.current_mold_production_order_component_processes.forEach(item => {
this.current_mold_production_order_component_processes.forEach(item => { //
//
if (item.department_detail && item.department_detail.code == code) { if (item.department_detail && item.department_detail.code == code) {
ds.push(item); ds.push(item);
} }
@ -969,6 +984,7 @@ export default {
font-size: 22px; font-size: 22px;
} }
.formtabs .ant-tabs-tabpane { .formtabs .ant-tabs-tabpane {
/* background: white; */ /* background: white; */
padding: 12px; padding: 12px;
@ -1029,7 +1045,7 @@ export default {
.container { .container {
display: grid; display: grid;
grid-template-columns: 10fr 13fr; grid-template-columns: 550px 1fr;
grid-gap: 0px; grid-gap: 0px;
} }
@ -1038,7 +1054,7 @@ export default {
.right { .right {
margin-left: 10px; margin-left: 10px;
overflow: hidden; overflow-x: scroll;
} }
@ -1073,6 +1089,7 @@ export default {
.gx-item { .gx-item {
display: flex; display: flex;
margin-top: 10px; margin-top: 10px;
padding-bottom: 10px;
border-bottom: 1px dashed #d3d3d3; border-bottom: 1px dashed #d3d3d3;
} }
@ -1082,13 +1099,21 @@ export default {
.card-item { .card-item {
position: relative; position: relative;
padding-top: 5px;
} }
.card-item-progress { .card-item-progress {
position: absolute; position: absolute;
right: 5px; right: 5px;
top: 5px; top: 15px;
}
.card-item-progress-img {
position: absolute;
right: 5px;
bottom: 15px;
} }
.bottom-toast { .bottom-toast {