This commit is contained in:
xielue 2023-10-18 14:59:01 +08:00
parent 7d3db0078a
commit d808d777a5
1 changed files with 117 additions and 34 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<div class="page-body"> <div class="page-body page-body-touch">
<vxe-input ref="inputx" style="width:400px" v-model="searchName" placeholder="搜索工艺布产等信息" <vxe-input ref="inputx" style="width:400px" v-model="searchName" placeholder="搜索工艺布产等信息"
@keydown="keydownEvent"></vxe-input> @keydown="keydownEvent"></vxe-input>
<a-icon type="scan" :style="{ fontSize: '22px', color: '#08c', marginLeft: '10px' }" @click="inputFocus" /> <a-icon type="scan" :style="{ fontSize: '22px', color: '#08c', marginLeft: '10px' }" @click="inputFocus" />
@ -26,16 +26,16 @@
<div class="gx-item-col"> <div class="gx-item-col">
<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>
<div style="margin-top: 10px;;" v-if="item.complete_time"> <div style="margin-top: 10px;;" v-if="item.complete_time">
{{ getDateValueString(item.complete_time) }} {{ getDateValueString(item.complete_time) }}
</div> </div>
</div> </div>
@ -68,20 +68,55 @@
</div> </div>
<div class="right"> <div class="right">
<div class="card"> <a-tabs v-model="tabKey" @change="tabChange">
<h4>工艺布产信息</h4> <a-tab-pane key="1" tab="布产详情">
<vxe-form :data="formOptions2.data" ref="xForm" :title-width="formOptions2.titleWidth"
:title-align="formOptions2.titleAlign" :rules="formOptions2.rules" :items="formOptions2.items" titleColon> <div class="card">
</vxe-form> <h4>工艺布产信息</h4>
</div> <vxe-form :data="formOptions2.data" ref="xForm" :title-width="formOptions2.titleWidth"
:title-align="formOptions2.titleAlign" :rules="formOptions2.rules" :items="formOptions2.items"
titleColon>
</vxe-form>
</div>
<div class="card">
<h4>模具信息</h4>
<vxe-form :data="formOptions3.data" ref="xForm" :title-width="formOptions3.titleWidth"
:title-align="formOptions3.titleAlign" :rules="formOptions3.rules" :items="formOptions3.items"
titleColon>
</vxe-form>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="即将超时布产列表" force-render>
<vxe-table border show-overflow keep-source ref="xTable3" :height="400" :row-config="{height: 60}" :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>
<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="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" />
<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-table>
</a-tab-pane>
</a-tabs>
<div class="card">
<h4>模具信息</h4>
<vxe-form :data="formOptions3.data" ref="xForm" :title-width="formOptions3.titleWidth"
:title-align="formOptions3.titleAlign" :rules="formOptions3.rules" :items="formOptions3.items" titleColon>
</vxe-form>
</div>
</div> </div>
@ -140,13 +175,14 @@ export default {
actions: { actions: {
}, },
tabKey: '2',
keyName: 'id', keyName: 'id',
// //
isEdit: false, isEdit: false,
currentId: 0, currentId: 0,
detailsData: [], detailsData: [],
detailsData3: [], detailsData3: [],
poData: [],
tips: ["点一", "点二", "点三"], tips: ["点一", "点二", "点三"],
current_mold_production_order_component_processes: [], current_mold_production_order_component_processes: [],
formOptions2: { formOptions2: {
@ -179,7 +215,7 @@ export default {
}, },
{ field: 'manufacture_cycle', dataRule: { type: 'timestamp' }, title: '制作周期', span: 24, itemRender: { name: 'MkFormInputShow', props: { params: { dataType: 'date' } } } }, { field: 'manufacture_cycle', dataRule: { type: 'timestamp' }, title: '制作周期', span: 24, itemRender: { name: 'MkFormInputShow', props: { params: { dataType: 'date' } } } },
{ field: 'remark', title: '备注', span: 24, itemRender: { name: 'MkFormInputShow', props: { params: { isTextarea:true } } } }, { field: 'remark', title: '备注', span: 24, itemRender: { name: 'MkFormInputShow', props: { params: { isTextarea: true } } } },
{ {
field: 'progress', title: '进度', span: 24, itemRender: { field: 'progress', title: '进度', span: 24, itemRender: {
name: 'MkFormProgress', props: { name: 'MkFormProgress', props: {
@ -201,7 +237,7 @@ export default {
data: { data: {
}, },
// //
titleWidth: 100, titleWidth: 150,
// //
titleAlign: 'right', titleAlign: 'right',
// //
@ -327,6 +363,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.$refs.inputx.focus(); this.$refs.inputx.focus();
this.loadPoData();
}, 200) }, 200)
//149433255169363968 //149433255169363968
@ -340,7 +377,40 @@ export default {
this.$refs.inputx.focus(); this.$refs.inputx.focus();
}, },
tabChange() {
if (this.tabKey == '2') {
this.loadPoData();
}
},
loadPoData() {
this.$mk.post({
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/order/list`,
loading: "搜索中...",
data: {
"ptyid": 0,
"company_id": parseInt(process.env.VUE_APP_COMPANY_ID),
"search_rules": [
],
"end_time": 0,
"company_token": process.env.VUE_APP_COMPANYTOKEN,
"store_id": 0,
"order_bys": [
],
"limit": 0,
"project_token": process.env.VUE_APP_APPTOKEN,
"beid": parseInt(process.env.VUE_APP_BEID),
"page": 1,
"start_time": 0
},
useBigInt: true,
}).then(a => {
this.poData = JSON.parse(JSON.stringify(a.data.MoldProductionOrder));
console.log(this.poData)
});
},
selectPoInfo(row) {
this.loadProductionOrder({ id: row.id })
},
loadData({ key }) { loadData({ key }) {
@ -511,12 +581,12 @@ export default {
resetProcesses() { resetProcesses() {
let ds = JSON.parse(JSON.stringify(this.detailsData || [])) let ds = JSON.parse(JSON.stringify(this.detailsData || []))
let newDs = []; let newDs = [];
this.current_mold_production_order_component_processes.forEach(item => { this.current_mold_production_order_component_processes.forEach(item => {
ds.forEach(o => { ds.forEach(o => {
if (item.id.toString() == o.id.toString()) { if (item.id.toString() == o.id.toString()) {
newDs.push(item); newDs.push(item);
} }
}) })
}) })
this.detailsData = newDs; this.detailsData = newDs;
@ -562,6 +632,8 @@ export default {
loadProductionOrder({ id, resetProcesses }) { loadProductionOrder({ id, resetProcesses }) {
this.currentId = id; this.currentId = id;
this.tabKey = '1';
this.loading = true this.loading = true
this.$mk.get({ this.$mk.get({
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/getMoldProductionOrder/${process.env.VUE_APP_BEID}/${process.env.VUE_APP_PTYID}/${process.env.VUE_APP_COMPANY_ID}/0/${process.env.VUE_APP_APPTOKEN}/${process.env.VUE_APP_COMPANYTOKEN}/${id}`, url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/getMoldProductionOrder/${process.env.VUE_APP_BEID}/${process.env.VUE_APP_PTYID}/${process.env.VUE_APP_COMPANY_ID}/0/${process.env.VUE_APP_APPTOKEN}/${process.env.VUE_APP_COMPANYTOKEN}/${id}`,
@ -587,8 +659,8 @@ export default {
if (resetProcesses === true) { if (resetProcesses === true) {
this.resetProcesses(); this.resetProcesses();
}else{ } else {
this.detailsData = []; this.detailsData = [];
} }
@ -604,7 +676,7 @@ export default {
}).then(a => { }).then(a => {
let row = a.data.mold_production_order_component_processes; let row = a.data.mold_production_order_component_processes;
this.loadProductionOrder({id:row.production_id}); this.loadProductionOrder({ id: row.production_id });
}); });
}, },
@ -667,8 +739,8 @@ export default {
if (a.code == 200) { if (a.code == 200) {
this.$mk.success("操作成功"); this.$mk.success("操作成功");
this.loadProductionOrder({ id: this.currentId , resetProcesses: true }); this.loadProductionOrder({ id: this.currentId, resetProcesses: true });
} else { } else {
this.$mk.error(a.msg || a.message); this.$mk.error(a.msg || a.message);
@ -737,6 +809,17 @@ export default {
padding: 30px; padding: 30px;
background: #f4f4f4; background: #f4f4f4;
} }
.page-body-touch{
font-size: 22px;
}
.page-body-touch
.vxe-form{
font-size: 22px;
}
.page-body-touch
.vxe-table--render-default{
font-size: 22px;
}
.formtabs .ant-tabs-tabpane { .formtabs .ant-tabs-tabpane {
/* background: white; */ /* background: white; */
@ -812,7 +895,7 @@ export default {
.card h4 { .card h4 {
font-weight: bold; font-weight: bold;
font-size: 17px; font-size: 22px;
} }
.left { .left {
@ -834,7 +917,7 @@ export default {
.formtitle { .formtitle {
font-weight: bold; font-weight: bold;
font-size: 14px; font-size: 22px;
} }
.gx-item { .gx-item {
@ -864,7 +947,7 @@ export default {
padding: 10px; padding: 10px;
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
font-size: 14px; font-size: 15px;
color: #333; color: #333;
} }
</style> </style>