更新触摸屏修正样式内容

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

@ -8,7 +8,7 @@
<a-button type="primary" @click="ok" :disabled="pageStatus == 'approved'">保存</a-button>
<a-button type="primary" @click="ok" :disabled="pageStatus == 'approved'">保存</a-button>
<a-button @click="pageApproved" type="primary" :disabled="!this.getDataId() || pageStatus == 'approved'">审批
</a-button>
<a-button @click="pageUnApproved" type="primary" :disabled="!this.getDataId() || pageStatus != 'approved'">弃审
@ -59,18 +59,28 @@
</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' }">
<template #default="{ row }">
<div>
{{ row.mold_name ? row.mold_name : (row.mold_scheme ? (row.mold_scheme.name || '') : '') }}
{{ row.mold_name ? row.mold_name : (row.mold_scheme ? (row.mold_scheme.name || '') : '') }}
</div>
</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>
@ -134,7 +144,7 @@ export default {
//
var pageData = {
dataset:dataset,
dataset: dataset,
options_paid_status: options_paid_status,
options_production_type: [{ value: '1', label: '正常布产' }, { value: '2', label: '委托布产' }],
//
@ -227,7 +237,7 @@ export default {
valueField: "id",
textField: "name",
listdataFieldName: 'MoldScheme',
inputSaveField:'mold_name',
inputSaveField: 'mold_name',
mapper: [
{ fromField: "id", field: "mold_id" },
{ fromField: "code", field: "mold_code" },
@ -288,9 +298,16 @@ export default {
}).then(a => {
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)
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 {
@ -404,7 +421,7 @@ export default {
let action = !this.isEdit ? this.actions.create : this.actions.update;
// id id
let postdata = Object.assign({}, this.formOptions.data);
postdata.order_molds = this.$mk.getPostFieldValue({
rowFilter: (row) => { return row.id || (row.mold_id || row.mold_code) },
dataId: this.getDataId_BigInt(),
@ -413,12 +430,12 @@ export default {
fieldName: 'order_id',
dataRule: this.dataset.order_molds.fields
});
//
this.$mk.formatFormData({ dataset:this.dataset, data: postdata, rules: this.formOptions.items });
this.$mk.formatFormData({ dataset: this.dataset, data: postdata, rules: this.formOptions.items });
//
this.$mk.post({
@ -525,7 +542,7 @@ export default {
}
});
}
});
});
},
pageAuditDetail(row) {
this.$mk.confirm('您确定要审批吗?').then(type => {
@ -547,7 +564,7 @@ export default {
}
});
}
});
});
},
@ -571,7 +588,7 @@ export default {
}
});
}
});
});
},
pageAuditDetail2(row) {
this.$mk.confirm('您确定要审批吗?').then(type => {
@ -593,7 +610,7 @@ export default {
}
});
}
});
});
},
pageApproved() {
@ -655,6 +672,25 @@ export default {
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: {

View File

@ -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,6 +201,26 @@
</a-tab-pane>
</a-tabs>
<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;">
<span class="ant-alert-message">操作性提示</span>
<span class="ant-alert-description" style="line-height:18px;">
<p>
1先选择布产单可以输入编码(输入后回车) 也可以扫码
</p>
<p>
2输入1#部门编码 搜索当前布产单的部门相关工序 也可以扫码
</p>
<p>
3输入2#工序编码 搜索当前布产单的相关工序追加 也可以扫码
</p>
</span>
</div>
</div>
@ -203,22 +230,7 @@
</div>
<div data-show="true" class="ant-alert ant-alert-info ant-alert-with-description"
style="padding: 5px 5px 5px 20px;border:none;">
<span class="ant-alert-message">操作性提示</span>
<span class="ant-alert-description" style="line-height:18px;">
<p>
1先选择布产单可以输入编码(输入后回车) 也可以扫码
</p>
<p>
2输入1#部门编码 搜索当前布产单的部门相关工序 也可以扫码
</p>
<p>
3输入2#工序编码 搜索当前布产单的相关工序追加 也可以扫码
</p>
</span>
</div>
</div>
@ -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 {