更新触摸屏修正样式内容
This commit is contained in:
parent
063d116b32
commit
e0529713cb
|
|
@ -59,6 +59,17 @@
|
|||
</div>
|
||||
</template>
|
||||
</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"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }">
|
||||
|
|
@ -69,8 +80,7 @@
|
|||
</template>
|
||||
</vxe-column>
|
||||
|
||||
<vxe-column field="mold_code" title="模型编码" width="160"
|
||||
:edit-render="{ name: '$input' }"></vxe-column>
|
||||
<vxe-column field="mold_code" title="模型编码" width="160" :edit-render="{ name: '$input' }"></vxe-column>
|
||||
|
||||
<vxe-column field="mold_master_user_detail" title="师傅" width="160" :params="editor_staff" formatter="formatRef"
|
||||
: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 });
|
||||
console.log(this.formOptions.data)
|
||||
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) {
|
||||
this.pageStatus = 'approved';
|
||||
} else {
|
||||
|
|
@ -655,6 +672,25 @@ export default {
|
|||
sendApproved("");
|
||||
|
||||
},
|
||||
pageEdit(row) {
|
||||
|
||||
if (!row) {
|
||||
this.$mk.msg("请选择行");
|
||||
return;
|
||||
}
|
||||
this.$openPage('/Mold/MoldProductionOrderUpdate/' + row)
|
||||
},
|
||||
// 将进度百分比取小数点后两位
|
||||
formatProgress(progress) {
|
||||
// 判断如果大于5个字符串,就截取前6个字符串
|
||||
if (progress.length > 5) {
|
||||
progress = progress.substring(0, 6);
|
||||
// 将百分比转换为小数点后两位
|
||||
progress = parseFloat(progress).toFixed(2);
|
||||
}
|
||||
return progress;
|
||||
|
||||
},
|
||||
},
|
||||
// 监听属性
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -9,20 +9,22 @@
|
|||
<div class="container">
|
||||
<div class="left">
|
||||
|
||||
<div class="card">
|
||||
<div class="card" style="max-height: 585px;overflow-y: auto;">
|
||||
<h4>工艺布产工序</h4>
|
||||
|
||||
<div v-if="detailsData && detailsData.length">
|
||||
<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>
|
||||
<div>部件:{{ item.component_detail ? item.component_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 ? "已发料" : "未发料") }}
|
||||
<span v-if="item.complete_time">({{ getDateValueString(item.complete_time) }})</span>
|
||||
</div>
|
||||
|
|
@ -31,10 +33,8 @@
|
|||
<div>
|
||||
<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 style="margin-left: 3px;" type="primary" @click="pageReport(item)"
|
||||
v-if="item.is_send && item.is_complete !== 1">报工</a-button>
|
||||
|
||||
<a-button style="margin-left: 3px;" @click="pageReport(item, true)"
|
||||
v-if="item.is_complete == 1">撤销报工</a-button>
|
||||
</div>
|
||||
|
|
@ -45,21 +45,26 @@
|
|||
</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">
|
||||
|
||||
<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" />
|
||||
</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">
|
||||
<!-- -->
|
||||
|
||||
<h3>【部件】{{ ditem.component_detail ? ditem.component_detail.name : '' }}</h3>
|
||||
|
||||
|
|
@ -72,7 +77,7 @@
|
|||
}}</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 ? "已发料" : "未发料") }}
|
||||
<span v-if="item.complete_time">({{ getDateValueString(item.complete_time) }})</span>
|
||||
</div>
|
||||
|
|
@ -98,17 +103,19 @@
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card-item-progress">
|
||||
<div class="card-item-progress-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>
|
||||
</div>
|
||||
<div class="card-item-progress">
|
||||
|
||||
<a-progress type="circle" :percent="formatProgress(ditem.progress)" :width="50" />
|
||||
</div>
|
||||
|
||||
|
||||
<!-- -->
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -120,10 +127,10 @@
|
|||
<h4>部门进度汇总</h4>
|
||||
|
||||
|
||||
<vxe-table border show-overflow keep-source ref="xTable3" :height="240" :data="detailsData3">
|
||||
<vxe-column field="name" title="部门名称" width="160"></vxe-column>
|
||||
<vxe-column field="code" title="部门编码" width="160"></vxe-column>
|
||||
<vxe-column field="process_num" title="工序数" width="110"></vxe-column>
|
||||
<vxe-table border show-overflow keep-source ref="xTable3" :height="230" :data="detailsData3">
|
||||
<vxe-column field="name" title="部门名称" width="150"></vxe-column>
|
||||
<vxe-column field="code" 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">
|
||||
<template #content="{ row }">
|
||||
<a-table :columns="sub_columns" :data-source="row.progressList"
|
||||
|
|
@ -134,7 +141,7 @@
|
|||
</a-table>
|
||||
</template>
|
||||
</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>
|
||||
|
||||
|
||||
|
|
@ -166,15 +173,18 @@
|
|||
|
||||
</a-tab-pane>
|
||||
<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">
|
||||
<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="mold_master_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="mold_detail" formatter="formatRef" :params="{ dataType: 'object', textField: 'name' }"
|
||||
title="模具" width="auto"></vxe-column>
|
||||
<vxe-column field="complete_time" formatter="formatDate" title="预计完成时间" width="160"></vxe-column>
|
||||
<vxe-column title="图片" width="75">
|
||||
<template #default="{ row }">
|
||||
<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>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column title="操作" width="90">
|
||||
<template #default="{ row }">
|
||||
<a-button @click="selectPoInfo(row)">选择</a-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="mold_detail" formatter="formatRef" :params="{ dataType: 'object', textField: 'name' }"
|
||||
title="模具" width="400"></vxe-column>
|
||||
</vxe-table>
|
||||
|
||||
|
||||
|
|
@ -194,14 +201,7 @@
|
|||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div style="margin:10px 0;">
|
||||
|
||||
<div data-show="true" class="ant-alert ant-alert-info ant-alert-with-description"
|
||||
style="padding: 5px 5px 5px 20px;border:none;">
|
||||
|
|
@ -220,6 +220,18 @@
|
|||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -284,8 +296,8 @@ export default {
|
|||
// 是否编辑模式
|
||||
isEdit: false,
|
||||
currentId: 0,
|
||||
detailsData: [],
|
||||
detailsData3: [],
|
||||
detailsData: [], // 工序详情列表
|
||||
detailsData3: [], // 部门列表
|
||||
|
||||
|
||||
detailsData4: [], //按部件分组
|
||||
|
|
@ -696,7 +708,7 @@ export default {
|
|||
|
||||
},
|
||||
|
||||
loadDepartment({ id, code }) {
|
||||
loadDepartment({ id, code }) { // 加载部门
|
||||
let ds = [];
|
||||
|
||||
if (id) {
|
||||
|
|
@ -714,14 +726,17 @@ export default {
|
|||
this.detailsData = ds;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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) {
|
||||
ds.push(item);
|
||||
}
|
||||
|
|
@ -969,6 +984,7 @@ export default {
|
|||
font-size: 22px;
|
||||
}
|
||||
|
||||
|
||||
.formtabs .ant-tabs-tabpane {
|
||||
/* background: white; */
|
||||
padding: 12px;
|
||||
|
|
@ -1029,7 +1045,7 @@ export default {
|
|||
|
||||
.container {
|
||||
display: grid;
|
||||
grid-template-columns: 10fr 13fr;
|
||||
grid-template-columns: 550px 1fr;
|
||||
grid-gap: 0px;
|
||||
|
||||
}
|
||||
|
|
@ -1038,7 +1054,7 @@ export default {
|
|||
|
||||
.right {
|
||||
margin-left: 10px;
|
||||
overflow: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1073,6 +1089,7 @@ export default {
|
|||
.gx-item {
|
||||
display: flex;
|
||||
margin-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px dashed #d3d3d3;
|
||||
}
|
||||
|
||||
|
|
@ -1082,13 +1099,21 @@ export default {
|
|||
|
||||
.card-item {
|
||||
position: relative;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.card-item-progress {
|
||||
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 5px;
|
||||
top: 15px;
|
||||
}
|
||||
|
||||
.card-item-progress-img {
|
||||
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
bottom: 15px;
|
||||
}
|
||||
|
||||
.bottom-toast {
|
||||
|
|
|
|||
Loading…
Reference in New Issue