This commit is contained in:
xielue 2023-10-21 11:45:42 +08:00
parent e83c4ff0cf
commit 9ba0283985
2 changed files with 190 additions and 45 deletions

View File

@ -10,7 +10,8 @@
<a-button type="primary" @click="print">打印</a-button>
<a-button type="primary" @click="pageComplete">完成布产</a-button>
<a-button @click="pageUnComplete" v-if="formOptions.data.is_complete">取消完成布产</a-button>
<a-button type="primary" @click="pageComplete" v-else>完成布产</a-button>
<a-button type="primary" @click="pageCopy">改模</a-button>
@ -919,6 +920,38 @@ export default {
},
pageUnComplete() {
let dataId = this.getDataId();
if (!dataId) {
return;
}
let sendComplete = () => {
this.$mk.post({
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/cancelComplete`,
loading: '操作中...',
data: {
id: this.getDataId_BigInt()
},
useBigInt: true
}).then(a => {
if (a.code == "200") {
this.$mk.success("操作成功");
this.pageInit();
}
else {
this.$mk.error(a.msg);
}
});
}
this.$mk.confirm('您确定要取消完成布产吗?').then(type => {
if (type == 'confirm') {
sendComplete("");
}
});
},
pageApproved() {
let dataId = this.getDataId();
if (!dataId) {

View File

@ -12,7 +12,7 @@
<div class="card">
<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">
@ -40,9 +40,11 @@
</div>
</div>
<div class="card-item-progress">
<img v-if="item.component_detail && item.component_detail.image" @click.stop="$hevueImgPreview(item.component_detail.image)"
<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>
@ -50,16 +52,81 @@
</div>
</div>
</div>
<div v-else style="height: 300px;overflow:auto;;">
<div v-for="ditem in detailsData3" :key="ditem.id" class="card-item" >
<h3>部门{{ ditem.name }}</h3>
<div v-for="item in ditem.progressList" :key="item.id">
<div class="gx-item">
<div class="gx-item-col">
<div>部件{{ item.component_detail ? item.component_detail.name : '' }}</div>
<div>工序{{ item.process_detail ? item.process_detail.name : '' }}</div>
<div>状态{{ item.is_complete ? "已完成" : (item.is_send ? "已发料" : "未发料") }}</div>
</div>
<div class="gx-item-col">
<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>
<div style="margin-top: 10px;;" v-if="item.complete_time">
{{ getDateValueString(item.complete_time) }}
</div>
</div>
</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="item.progress" :width="50" />
</div>
</div>
</div>
</div>
</div>
<div class="card">
<h4>部门进度汇总</h4>
<vxe-table border show-overflow keep-source ref="xTable3" :height="200" :data="detailsData3">
<vxe-table border show-overflow keep-source ref="xTable3" :height="300" :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="160"></vxe-column>
<vxe-column type="expand" title="工序明细" width="160">
<template #content="{ row }">
<a-table :columns="sub_columns" :data-source="row.progressList"
style="border:1px solid #afafaf;margin: 15px;">
<span slot="progress" slot-scope="progress">
<a-progress type="line" :percent="progress" />
</span>
</a-table>
</template>
</vxe-column>
<vxe-column field="progress" :cellRender="{ name: 'progress' }" title="进度" width="180"></vxe-column>
</vxe-table>
@ -92,7 +159,8 @@
</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}" :data="poData">
<vxe-table border show-overflow keep-source ref="xTable3" :height="610" :row-config="{ height: 80 }"
:data="poData">
<vxe-column field="code" title="编码" width="130"></vxe-column>
<vxe-column field="mold_master_name" title="模具师傅" width="130"></vxe-column>
<vxe-column field="engineer_name" title="工程师傅" width="130"></vxe-column>
@ -101,7 +169,8 @@
title="模具" width="130"></vxe-column>
<vxe-column title="模具图片" width="110">
<template #default="{ row }">
<img v-if="row.mold_detail.image" style="width:50px;height:50px;" :src="row.mold_detail.image" @click.stop="$hevueImgPreview(row.mold_detail.image)" />
<img v-if="row.mold_detail.image" style="width:50px;height:50px;" :src="row.mold_detail.image"
@click.stop="$hevueImgPreview(row.mold_detail.image)" />
<span v-else></span>
</template>
</vxe-column>
@ -175,6 +244,32 @@ export default {
actions: {
},
sub_columns: [
{
title: '工序名',
dataIndex: 'process_detail_name',
key: 'process_detail_name',
},
{
title: '工序编号',
dataIndex: 'process_detail_code',
key: 'process_detail_code',
},
{
title: '部件名',
dataIndex: 'component_detail_name',
key: 'component_detail_name',
},
{
title: '进度',
dataIndex: 'progress',
key: 'progress',
slots: { title: 'progress' },
scopedSlots: { customRender: 'progress' },
},
],
tabKey: '2',
keyName: 'id',
//
@ -396,7 +491,7 @@ export default {
"end_time": 0,
"company_token": process.env.VUE_APP_COMPANYTOKEN,
"store_id": 0,
"order_bys": [{"column":"complete_time","order":"asc"}],
"order_bys": [{ "column": "complete_time", "order": "asc" }],
"limit": 0,
"project_token": process.env.VUE_APP_APPTOKEN,
"beid": parseInt(process.env.VUE_APP_BEID),
@ -647,10 +742,26 @@ export default {
let data3 = Object.assign({}, row.mold_detail);
this.detailsData3 = JSON.parse(JSON.stringify(row.department_progress || []));
let mold_production_order_component_processes = JSON.parse(JSON.stringify(row.mold_production_order_component_processes));
let ds3 = JSON.parse(JSON.stringify(row.department_progress || []));
ds3.forEach(item => {
item.progressList = [];
mold_production_order_component_processes.forEach(pitem => {
if (pitem.department_id == item.id) {
pitem.process_detail_name = pitem.process_detail.name
pitem.process_detail_code = pitem.process_detail.code
pitem.component_detail_name = pitem.component_detail.name
item.progressList.push(pitem);
}
})
})
this.detailsData3 = ds3;
console.log(this.detailsData3)
data3.mold_master_user_detail = row.mold_master_user_detail;
@ -810,15 +921,16 @@ export default {
padding: 30px;
background: #f4f4f4;
}
.page-body-touch{
.page-body-touch {
font-size: 22px;
}
.page-body-touch
.vxe-form{
.page-body-touch .vxe-form {
font-size: 22px;
}
.page-body-touch
.vxe-table--render-default{
.page-body-touch .vxe-table--render-default {
font-size: 22px;
}