This commit is contained in:
parent
e83c4ff0cf
commit
9ba0283985
|
|
@ -10,7 +10,8 @@
|
||||||
<a-button type="primary" @click="print">打印</a-button>
|
<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>
|
<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() {
|
pageApproved() {
|
||||||
let dataId = this.getDataId();
|
let dataId = this.getDataId();
|
||||||
if (!dataId) {
|
if (!dataId) {
|
||||||
|
|
|
||||||
|
|
@ -12,42 +12,99 @@
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h4>工艺布产工序</h4>
|
<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">
|
||||||
|
|
||||||
<div v-for="item in detailsData" :key="item.id" class="card-item">
|
<div>部门:{{ item.department_detail ? item.department_detail.name : '' }}</div>
|
||||||
<div class="gx-item">
|
<div>部件:{{ item.component_detail ? item.component_detail.name : '' }}</div>
|
||||||
<div class="gx-item-col">
|
<div>工序:{{ item.process_detail ? item.process_detail.name : '' }}</div>
|
||||||
|
|
||||||
<div>部门:{{ item.department_detail ? item.department_detail.name : '' }}</div>
|
<div>状态:{{ item.is_complete ? "已完成" : (item.is_send ? "已发料" : "未发料") }}</div>
|
||||||
<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>
|
||||||
<div style="margin-top: 10px;;" v-if="item.complete_time">
|
<div class="gx-item-col">
|
||||||
{{ getDateValueString(item.complete_time) }}
|
<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 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-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>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -56,10 +113,20 @@
|
||||||
<h4>部门进度汇总</h4>
|
<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="name" title="部门名称" width="160"></vxe-column>
|
||||||
<vxe-column field="code" 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 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-column field="progress" :cellRender="{ name: 'progress' }" title="进度" width="180"></vxe-column>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
|
|
||||||
|
|
@ -92,7 +159,8 @@
|
||||||
|
|
||||||
</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}" :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="code" title="编码" width="130"></vxe-column>
|
||||||
<vxe-column field="mold_master_name" 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>
|
<vxe-column field="engineer_name" title="工程师傅" width="130"></vxe-column>
|
||||||
|
|
@ -101,7 +169,8 @@
|
||||||
title="模具" width="130"></vxe-column>
|
title="模具" width="130"></vxe-column>
|
||||||
<vxe-column title="模具图片" width="110">
|
<vxe-column title="模具图片" width="110">
|
||||||
<template #default="{ row }">
|
<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>
|
<span v-else></span>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
@ -175,6 +244,32 @@ export default {
|
||||||
|
|
||||||
actions: {
|
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',
|
tabKey: '2',
|
||||||
keyName: 'id',
|
keyName: 'id',
|
||||||
// 是否编辑模式
|
// 是否编辑模式
|
||||||
|
|
@ -383,12 +478,12 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadPoData() {
|
loadPoData() {
|
||||||
|
|
||||||
|
|
||||||
this.$mk.post({
|
this.$mk.post({
|
||||||
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/order/list`,
|
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/order/list`,
|
||||||
loading: "搜索中...",
|
loading: "搜索中...",
|
||||||
data: {
|
data: {
|
||||||
"ptyid": 0,
|
"ptyid": 0,
|
||||||
"company_id": parseInt(process.env.VUE_APP_COMPANY_ID),
|
"company_id": parseInt(process.env.VUE_APP_COMPANY_ID),
|
||||||
"search_rules": [
|
"search_rules": [
|
||||||
|
|
@ -396,7 +491,7 @@ export default {
|
||||||
"end_time": 0,
|
"end_time": 0,
|
||||||
"company_token": process.env.VUE_APP_COMPANYTOKEN,
|
"company_token": process.env.VUE_APP_COMPANYTOKEN,
|
||||||
"store_id": 0,
|
"store_id": 0,
|
||||||
"order_bys": [{"column":"complete_time","order":"asc"}],
|
"order_bys": [{ "column": "complete_time", "order": "asc" }],
|
||||||
"limit": 0,
|
"limit": 0,
|
||||||
"project_token": process.env.VUE_APP_APPTOKEN,
|
"project_token": process.env.VUE_APP_APPTOKEN,
|
||||||
"beid": parseInt(process.env.VUE_APP_BEID),
|
"beid": parseInt(process.env.VUE_APP_BEID),
|
||||||
|
|
@ -404,9 +499,9 @@ export default {
|
||||||
"start_time": 0
|
"start_time": 0
|
||||||
},
|
},
|
||||||
useBigInt: true,
|
useBigInt: true,
|
||||||
}).then(a => {
|
}).then(a => {
|
||||||
this.poData = JSON.parse(JSON.stringify(a.data.MoldProductionOrder));
|
this.poData = JSON.parse(JSON.stringify(a.data.MoldProductionOrder));
|
||||||
console.log(this.poData)
|
console.log(this.poData)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
selectPoInfo(row) {
|
selectPoInfo(row) {
|
||||||
|
|
@ -633,7 +728,7 @@ export default {
|
||||||
loadProductionOrder({ id, resetProcesses }) {
|
loadProductionOrder({ id, resetProcesses }) {
|
||||||
|
|
||||||
this.currentId = id;
|
this.currentId = id;
|
||||||
this.tabKey = '1';
|
this.tabKey = '1';
|
||||||
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.$mk.get({
|
this.$mk.get({
|
||||||
|
|
@ -647,10 +742,26 @@ export default {
|
||||||
let data3 = Object.assign({}, row.mold_detail);
|
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;
|
data3.mold_master_user_detail = row.mold_master_user_detail;
|
||||||
|
|
||||||
|
|
@ -810,15 +921,16 @@ export default {
|
||||||
padding: 30px;
|
padding: 30px;
|
||||||
background: #f4f4f4;
|
background: #f4f4f4;
|
||||||
}
|
}
|
||||||
.page-body-touch{
|
|
||||||
|
.page-body-touch {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
.page-body-touch
|
|
||||||
.vxe-form{
|
.page-body-touch .vxe-form {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
.page-body-touch
|
|
||||||
.vxe-table--render-default{
|
.page-body-touch .vxe-table--render-default {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue