This commit is contained in:
parent
54d0491aeb
commit
db25f262fa
|
|
@ -215,7 +215,7 @@ export default {
|
|||
|
||||
|
||||
this.formOptions.data = this.$mk.formatDetailData({ 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 || []));
|
||||
|
||||
this.detailsDataInit();
|
||||
|
|
|
|||
|
|
@ -39,9 +39,8 @@
|
|||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
<vxe-column field="plan_complete_time" title="计划完成日期" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
|
||||
<vxe-column field="is_send" title="是否发料" width="160" :params="options_is_send"
|
||||
formatter='formatEnum'
|
||||
|
||||
<vxe-column field="is_send" title="是否发料" width="160" :params="options_is_send" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_is_send } }"></vxe-column>
|
||||
|
||||
<vxe-column field="send_time" title="发料时间" width="160" formatter="formatDate"
|
||||
|
|
@ -50,22 +49,19 @@
|
|||
<vxe-column field="send_uid" title="发料人员" width="160" :params="editor_staff" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="is_complete" title="是否完成" width="160" :params="options_is_complete"
|
||||
formatter='formatEnum'
|
||||
|
||||
<vxe-column field="is_complete" title="是否完成" width="160" :params="options_is_complete" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_is_complete } }"></vxe-column>
|
||||
|
||||
<vxe-column field="complete_time" title="实际完成时间" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="send_type" title="发料人员类型" width="160" :params="options_user_type"
|
||||
formatter='formatEnum'
|
||||
|
||||
<vxe-column field="send_type" title="发料人员类型" width="160" :params="options_user_type" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_user_type } }"></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="complete_type" title="完工人员类型" width="160" :params="options_user_type"
|
||||
formatter='formatEnum'
|
||||
<vxe-column field="complete_type" title="完工人员类型" width="160" :params="options_user_type" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_user_type } }"></vxe-column>
|
||||
<vxe-column field="remark" title="备注" width="160" :edit-render="{ name: '$input', props: {} }"></vxe-column>
|
||||
|
||||
|
|
@ -107,26 +103,22 @@
|
|||
<vxe-column field="plan_complete_time" title="计划完成日期" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="is_send" title="是否发料" width="160" :params="options_is_send"
|
||||
formatter='formatEnum'
|
||||
|
||||
<vxe-column field="is_send" title="是否发料" width="160" :params="options_is_send" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_is_send } }"></vxe-column>
|
||||
<vxe-column field="send_time" title="发料时间" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
|
||||
<vxe-column field="is_complete" title="是否完成" width="160" :params="options_is_complete"
|
||||
formatter='formatEnum'
|
||||
|
||||
<vxe-column field="is_complete" title="是否完成" width="160" :params="options_is_complete" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_is_complete } }"></vxe-column>
|
||||
<vxe-column field="complete_time" title="实际完成时间" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
|
||||
<vxe-column field="send_type" title="发料人员类型" width="160" :params="options_user_type"
|
||||
formatter='formatEnum'
|
||||
<vxe-column field="send_type" title="发料人员类型" width="160" :params="options_user_type" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_user_type } }"></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="complete_type" title="完工人员类型" width="160" :params="options_user_type"
|
||||
formatter='formatEnum'
|
||||
<vxe-column field="complete_type" title="完工人员类型" width="160" :params="options_user_type" formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_user_type } }"></vxe-column>
|
||||
<vxe-column field="remark" title="备注" width="160" :edit-render="{ name: '$input', props: {} }"></vxe-column>
|
||||
|
||||
|
|
@ -149,7 +141,7 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
export default {
|
||||
|
|
@ -169,8 +161,8 @@ export default {
|
|||
data() {
|
||||
|
||||
const options_production_type = [{ value: '1', label: '正常布产' }, { value: '2', label: '委托布产' }];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const options_is_complete = [{ value: '0', label: '未完成' }, { value: '1', label: '已完成' }];
|
||||
const options_is_send = [{ value: '0', label: '未发料' }, { value: '1', label: '已发料' }];
|
||||
|
|
@ -203,8 +195,8 @@ export default {
|
|||
isEdit: false,
|
||||
// 表单数据
|
||||
formOptions: {
|
||||
data: {
|
||||
production_type: 1
|
||||
data: {
|
||||
production_type:"1"
|
||||
},
|
||||
// 标题宽度
|
||||
titleWidth: 150,
|
||||
|
|
@ -219,11 +211,11 @@ export default {
|
|||
],
|
||||
},
|
||||
// 表单项
|
||||
items: [
|
||||
items: [
|
||||
|
||||
|
||||
{ field: 'code', title: '编号', span: 8, itemRender: { name: '$input' } },
|
||||
{
|
||||
title: '订单', span: 8,
|
||||
title: '选择订单', span: 8,
|
||||
field: 'mold_order',
|
||||
dataRule: {
|
||||
fromField: "id",
|
||||
|
|
@ -236,14 +228,59 @@ export default {
|
|||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MoldOrder',
|
||||
onDataChanged: ({ data }) => {
|
||||
this.$mk.post({
|
||||
url: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/detail`,
|
||||
loading: "加载中...",
|
||||
data: { id: data.id },
|
||||
useBigInt: true
|
||||
}).then(a => {
|
||||
|
||||
let d = a.data.mold_order;
|
||||
let detail = d.order_molds ? d.order_molds[0] : null;
|
||||
|
||||
console.log(detail)
|
||||
if (detail) {
|
||||
this.formOptions.data.mold_scheme = detail.mold_scheme;
|
||||
this.formOptions.data.mold_id = detail.mold_id;
|
||||
|
||||
if(detail.draw_start_time){
|
||||
this.formOptions.data.draw_start_time = this.getDateValue(detail.draw_start_time);
|
||||
}
|
||||
|
||||
if(detail.split_design_time){
|
||||
this.formOptions.data.split_design_time = this.getDateValue(detail.split_design_time);
|
||||
}
|
||||
|
||||
if(detail.draw_time){
|
||||
this.formOptions.data.draw_time = this.getDateValue(detail.draw_time);
|
||||
}
|
||||
if(detail.draw2D_time){
|
||||
this.formOptions.data.draw2D_time = this.getDateValue(detail.draw2D_time);
|
||||
}
|
||||
if(detail.draw3D_time){
|
||||
this.formOptions.data.draw3D_time = this.getDateValue(detail.draw3D_time);
|
||||
}
|
||||
if(detail.horizontal_frame_time){
|
||||
this.formOptions.data.horizontal_frame_time = this.getDateValue(detail.horizontal_frame_time);
|
||||
}
|
||||
|
||||
this.formOptions.data = JSON.parse(JSON.stringify( this.formOptions.data))
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/list`
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ field: 'code', title: '编号', span: 8, itemRender: { name: '$input' } },
|
||||
{
|
||||
title: '模具', span: 8,
|
||||
field: 'mold_id',
|
||||
field: 'mold_scheme',
|
||||
dataRule: {
|
||||
fromField: "id",
|
||||
saveField: "mold_id" // 如果表单项存储的是对象,将从fromField中取得值保存到saveField
|
||||
|
|
@ -364,7 +401,7 @@ export default {
|
|||
}).then(a => {
|
||||
|
||||
|
||||
this.formOptions.data = this.$mk.formatDetailData({ data: a.data[this.detailDataFieldName],rules:this.formOptions.items });
|
||||
this.formOptions.data = this.$mk.formatDetailData({ data: a.data[this.detailDataFieldName], rules: this.formOptions.items });
|
||||
|
||||
console.log(this.formOptions.data)
|
||||
this.detailsData = JSON.parse(JSON.stringify(a.data[this.detailDataFieldName].mold_production_order_component || []));
|
||||
|
|
@ -399,7 +436,9 @@ export default {
|
|||
methods: {
|
||||
|
||||
|
||||
|
||||
getDateValue(v) {
|
||||
return new Date(v * 1000) ;
|
||||
},
|
||||
|
||||
heightInit() {
|
||||
|
||||
|
|
@ -481,7 +520,7 @@ export default {
|
|||
{ field: 'production_type', type: 'integer' },
|
||||
{ field: 'component_num', type: 'integer' },
|
||||
|
||||
|
||||
|
||||
{ field: 'id', type: 'bigint' },
|
||||
{ field: 'update_uid', type: 'bigint' },
|
||||
{ field: 'create_uid', type: 'bigint' },
|
||||
|
|
|
|||
|
|
@ -0,0 +1,634 @@
|
|||
<template>
|
||||
<div class="page-body">
|
||||
<vxe-pulldown ref="pulldownRef" transfer>
|
||||
<template #default>
|
||||
<vxe-input ref="inputx" style="width:400px" v-model="searchName" suffix-icon="vxe-icon-table"
|
||||
placeholder="搜索员工,随车联,工序等信息" @keydown="keydownEvent" @suffix-click="suffixClick"></vxe-input>
|
||||
<a-icon type="scan" :style="{ fontSize: '22px', color: '#08c', marginLeft: '10px' }" @click="inputFocus" />
|
||||
</template>
|
||||
<template #dropdown>
|
||||
<div class="search-dropdown">
|
||||
<div class="search-dropdown-column">
|
||||
<h3>随车联</h3>
|
||||
<vxe-grid border auto-resize height="400" :row-config="{ isHover: true }" :loading="loading"
|
||||
:data="tableDataOrders" :columns="tableColumnOrders" @cell-click="cellClickEventOrders">
|
||||
</vxe-grid>
|
||||
</div>
|
||||
<div class="search-dropdown-column">
|
||||
<h3>员工</h3>
|
||||
<vxe-grid border auto-resize height="400" :row-config="{ isHover: true }" :loading="loading"
|
||||
:data="tableDataStaff" :columns="tableColumn" @cell-click="cellClickEventStaff">
|
||||
</vxe-grid>
|
||||
</div>
|
||||
<div class="search-dropdown-column">
|
||||
<h3>工序</h3>
|
||||
<vxe-grid border auto-resize height="400" :row-config="{ isHover: true }" :loading="loading"
|
||||
:data="tableDataProcesses" :columns="tableColumn" @cell-click="cellClickEventProcesses">
|
||||
</vxe-grid>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</vxe-pulldown>
|
||||
|
||||
<div class="container">
|
||||
<div class="left">
|
||||
|
||||
<div class="card">
|
||||
<h4>报工信息</h4>
|
||||
|
||||
|
||||
<div v-for="item in detailsData" :key="item">
|
||||
<div class="gx-item">
|
||||
<div class="gx-item-col">{{ item.name }}</div>
|
||||
<div class="gx-item-col">
|
||||
<a-button type="primary" @click="pageReport(item)">报工</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
|
||||
<div class="card">
|
||||
<h4>工艺布产信息</h4>
|
||||
<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>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
import JSONbig from 'json-bigint'
|
||||
export default {
|
||||
|
||||
name: '',
|
||||
components: {},
|
||||
props: {
|
||||
pageMode: {
|
||||
type: String,
|
||||
default: "edit"
|
||||
},
|
||||
dataId: {
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var pageData = {
|
||||
|
||||
actions: {
|
||||
},
|
||||
|
||||
keyName: 'id',
|
||||
// 是否编辑模式
|
||||
isEdit: false,
|
||||
|
||||
detailsData:[{name:'工序1'},{name:'工序2'}],
|
||||
|
||||
formOptions2: {
|
||||
data: {
|
||||
},
|
||||
// 标题宽度
|
||||
titleWidth: 130,
|
||||
// 标题对齐方式
|
||||
titleAlign: 'right',
|
||||
// 表单校验规则
|
||||
rules: {
|
||||
},
|
||||
// 表单项
|
||||
items: [
|
||||
|
||||
|
||||
|
||||
{ field: 'code', title: '订单编码', span: 24, itemRender: { name: 'MkFormInputShow' } },
|
||||
{ field: 'name', title: '客户名称', span: 24, itemRender: { name: 'MkFormInputShow' } },
|
||||
{ field: 'contact', title: '联系人', span: 24, itemRender: { name: 'MkFormInputShow' } },
|
||||
{ field: 'phone', title: '联系电话', span: 24, itemRender: { name: 'MkFormInputShow' } },
|
||||
{ field: 'salesman', title: '业务员姓名', span: 24, itemRender: { name: 'MkFormInputShow' } },
|
||||
{ field: 'contract_no', title: '合同号', span: 24, itemRender: { name: 'MkFormInputShow' } },
|
||||
{
|
||||
field: 'contract_start_time', dataRule: { type: "timestamp" }, title: '合同开始日期',
|
||||
span: 24, itemRender: { name: 'MkFormInputShow', props: { type: "date" } }
|
||||
},
|
||||
{
|
||||
field: 'contract_end_time', dataRule: { type: "timestamp" },
|
||||
title: '合同结束日期', span: 24, itemRender: { name: 'MkFormInputShow', props: { type: "date" } }
|
||||
},
|
||||
|
||||
{ field: 'remark', title: '备注', span: 24, itemRender: { name: 'MkFormInputShow' } },
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
formOptions3: {
|
||||
data: {
|
||||
},
|
||||
// 标题宽度
|
||||
titleWidth: 100,
|
||||
// 标题对齐方式
|
||||
titleAlign: 'right',
|
||||
// 表单校验规则
|
||||
rules: {
|
||||
},
|
||||
// 表单项
|
||||
items:
|
||||
[
|
||||
{
|
||||
span: 18,
|
||||
children: [
|
||||
{ field: 'code', title: '料品编号', span: 24, itemRender: { name: 'MkFormInputShow' } },
|
||||
{ field: 'name', title: '料品名称', span: 24, itemRender: { name: 'MkFormInputShow' } },
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
span: 6,
|
||||
children: [
|
||||
{
|
||||
field: 'avatar', span: 24, itemRender: {
|
||||
name: 'MkFormCropper', props: {
|
||||
isReadonly: true
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
formOptions: {
|
||||
data: {
|
||||
},
|
||||
// 标题宽度
|
||||
titleWidth: 110,
|
||||
// 标题对齐方式
|
||||
titleAlign: 'right',
|
||||
// 表单校验规则
|
||||
rules: {
|
||||
},
|
||||
// 表单项
|
||||
items: [
|
||||
|
||||
{ field: 'loss_number', title: '报损数量', span: 8, itemRender: { name: '$input', props: { type: 'number' } } },
|
||||
{ field: 'loss_staff_name', title: '损耗人员', span: 8, itemRender: { name: '$input', props: {} } },
|
||||
{ field: 'loss_remark', title: '损耗备注', span: 8, itemRender: { name: '$input', props: {} } },
|
||||
|
||||
|
||||
|
||||
|
||||
{ field: 'soil_date', title: '土质日期', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||
{ field: 'remark', title: '备注', span: 24, itemRender: { name: '$input', props: {} } },
|
||||
|
||||
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
searchName: '',
|
||||
lastTriggerTime: null,
|
||||
lastScanTime: null,
|
||||
|
||||
loading: false,
|
||||
tableColumnOrders: [
|
||||
{ field: 'production_number', title: '单号' },
|
||||
{ field: 'materials_name', title: '料品名' },
|
||||
],
|
||||
tableColumn: [
|
||||
{ field: 'name', title: '名称' },
|
||||
|
||||
{ field: 'code', title: '编号' }
|
||||
],
|
||||
tableDataStaff: [],
|
||||
tableDataProcesses: [],
|
||||
tableDataOrders: []
|
||||
|
||||
};
|
||||
|
||||
|
||||
// 合并表单数据及配置
|
||||
pageData.formOptions = Object.assign({}, this.$mk.config.defaults.formOptions, pageData.formOptions);
|
||||
|
||||
return pageData;
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
||||
},
|
||||
|
||||
|
||||
created() {
|
||||
|
||||
setTimeout(() => {
|
||||
this.$refs.inputx.focus();
|
||||
|
||||
}, 200)
|
||||
|
||||
//149433255169363968
|
||||
//this.loadStaff({id:"149433255169363968"})
|
||||
},
|
||||
// 函数
|
||||
methods: {
|
||||
|
||||
inputFocus() {
|
||||
this.$refs.inputx.focus();
|
||||
},
|
||||
|
||||
doLoadData() {
|
||||
|
||||
const now = Date.now();
|
||||
if (this.lastTriggerTime) {
|
||||
const elapsedTime = now - this.lastTriggerTime;
|
||||
if (elapsedTime < 1000) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const $pulldown = this.$refs.pulldownRef
|
||||
if ($pulldown) {
|
||||
$pulldown.showPanel()
|
||||
}
|
||||
this.lastTriggerTime = now;
|
||||
this.loadData({ key: this.searchName })
|
||||
|
||||
},
|
||||
|
||||
loadData({ key }) {
|
||||
|
||||
this.loading = true
|
||||
this.$mk.post({
|
||||
url: `${BASE_URL.BASE_URL}/MesReporting/Get/TouchScreen/v1/mes/reporting/touchScreen/search`,
|
||||
loading: "搜索中...",
|
||||
data: {
|
||||
"keyword": key,
|
||||
"ptyid": 0,
|
||||
"company_id": 1,
|
||||
"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": 1,
|
||||
"page": 1,
|
||||
"start_time": 0
|
||||
},
|
||||
useBigInt: true,
|
||||
}).then(a => {
|
||||
this.loading = false
|
||||
this.tableDataStaff = a.data.mes_staff || [];
|
||||
this.tableDataProcesses = a.data.mes_processes || [];
|
||||
this.tableDataOrders = a.data.production_order_array || [];
|
||||
|
||||
}).catch((a) => {
|
||||
this.loading = false
|
||||
this.$mk.error(a.data.msg);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
keydownEvent(e) {
|
||||
let event = e.$event;
|
||||
const input = event.target;
|
||||
let inputValue = input.value;
|
||||
this.scanEntry = input.value;
|
||||
const now = Date.now();
|
||||
if (event.key === 'Enter') {
|
||||
|
||||
|
||||
|
||||
if (inputValue && inputValue.indexOf('{') == 0) {
|
||||
inputValue = inputValue.replace(/:/g, ":");
|
||||
inputValue = inputValue.replace(/,/g, ",");
|
||||
inputValue = inputValue.replace(/”/g, "\"");
|
||||
console.log(inputValue)
|
||||
let v = JSONbig.parse(inputValue);
|
||||
console.log(v)
|
||||
this.lastScanTime = now;
|
||||
if (v.types == 'staff') {
|
||||
this.loadStaff({ id: v.id });
|
||||
}
|
||||
|
||||
if (v.types == "processes") {
|
||||
this.loadProcesses({ id: v.id });
|
||||
}
|
||||
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
const $pulldown = this.$refs.pulldownRef
|
||||
if ($pulldown) {
|
||||
$pulldown.hidePanel()
|
||||
}
|
||||
}, 20);
|
||||
|
||||
|
||||
input.value = '';
|
||||
this.scanEntry = '';
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
input.value = '';
|
||||
|
||||
this.scanEntry = '';
|
||||
|
||||
}, 10);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
|
||||
if (this.lastScanTime) {
|
||||
// 如果上次扫码时间在200毫秒以内,则什么也不做
|
||||
if (now - this.lastScanTime < 200) {
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.doLoadData();
|
||||
|
||||
|
||||
}, 100);
|
||||
|
||||
},
|
||||
|
||||
loadStaff({ id }) {
|
||||
this.loading = true
|
||||
this.$mk.get({
|
||||
url: `${BASE_URL.BASE_URL}/MesReporting/Get/TouchScreen/v1/mes/reporting/touchScreen/getIdentity/${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}`,
|
||||
|
||||
useBigInt: true,
|
||||
}).then(a => {
|
||||
this.selectStaff({ data: a.data.mes_staff })
|
||||
});
|
||||
},
|
||||
loadProcesses({ id }) {
|
||||
this.loading = true
|
||||
this.$mk.get({
|
||||
url: `${BASE_URL.BASE_URL}/MesReporting/Get/TouchScreen/v1/mes/reporting/touchScreen/getProcess/${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}`,
|
||||
|
||||
useBigInt: true,
|
||||
}).then(a => {
|
||||
this.formOptions3.data = a.data.mes_processes
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
selectStaff({ data }) {
|
||||
let data2 = Object.assign({}, data);
|
||||
if (data2.mes_processes) {
|
||||
data2.processName = data2.mes_processes.name;
|
||||
}
|
||||
|
||||
|
||||
this.formOptions2.data = data2
|
||||
},
|
||||
|
||||
suffixClick() {
|
||||
const $pulldown = this.$refs.pulldownRef
|
||||
if ($pulldown) {
|
||||
$pulldown.togglePanel()
|
||||
}
|
||||
},
|
||||
cellClickEventProcesses({ row }) {
|
||||
let data = Object.assign({}, row);
|
||||
this.formOptions3.data = data
|
||||
},
|
||||
cellClickEventOrders({ row }) {
|
||||
console.log(row)
|
||||
const $pulldown = this.$refs.pulldownRef
|
||||
if ($pulldown) {
|
||||
$pulldown.hidePanel()
|
||||
}
|
||||
|
||||
let data = Object.assign({}, row);
|
||||
|
||||
|
||||
this.formOptions4.data = data
|
||||
},
|
||||
cellClickEventStaff({ row }) {
|
||||
this.selectStaff({ data: row })
|
||||
},
|
||||
|
||||
|
||||
save() {
|
||||
|
||||
let postdata = Object.assign({}, this.formOptions.data);
|
||||
|
||||
postdata.staff_uid = this.formOptions2.data.id;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
postdata.stage_id = this.formOptions3.data.sort_id;
|
||||
postdata.step_id = this.formOptions3.data.id;
|
||||
postdata.step_name = this.formOptions3.data.name;
|
||||
|
||||
|
||||
if (postdata.soil_date) {
|
||||
postdata.soil_date = parseInt(new Date(postdata.soil_date).getTime() / 1000); // 转换为时间戳
|
||||
} else {
|
||||
postdata.soil_date = 0
|
||||
}
|
||||
|
||||
postdata.loss_number = parseFloat(postdata.loss_number || 0)
|
||||
|
||||
if (!postdata.staff_uid) {
|
||||
this.$mk.error("请先选择员工");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!postdata.production_order_id) {
|
||||
this.$mk.error("请先选择随车联");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!postdata.step_id) {
|
||||
this.$mk.error("请先选择工序");
|
||||
return;
|
||||
}
|
||||
|
||||
this.$mk.post({
|
||||
url: `${BASE_URL.BASE_URL}/MesReporting/Get/TouchScreen/v1/mes/reporting/touchScreen/create`,
|
||||
loading: "报工中...",
|
||||
data: {
|
||||
"ptyid": parseInt(process.env.VUE_APP_PTYID),
|
||||
"project_token": process.env.VUE_APP_APPTOKEN,
|
||||
"store_id": 0,
|
||||
"beid": parseInt(process.env.VUE_APP_BEID),
|
||||
"company_token": process.env.VUE_APP_COMPANYTOKEN,
|
||||
"mes_reporting_create_request": postdata,
|
||||
"company_id": parseInt(process.env.VUE_APP_COMPANY_ID)
|
||||
},
|
||||
useBigInt: true,
|
||||
}).then(a => {
|
||||
console.log(a)
|
||||
if (a.code == 200) {
|
||||
this.$mk.success("报工成功");
|
||||
} else {
|
||||
|
||||
this.$mk.error(a.msg || a.message);
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
// 监听属性
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
.page-body {
|
||||
padding: 30px;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.formtabs .ant-tabs-tabpane {
|
||||
/* background: white; */
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.gridPanel {
|
||||
height: calc(100vh - 600px);
|
||||
}
|
||||
|
||||
.footerbar {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.imagePanel {
|
||||
cursor: pointer;
|
||||
padding: 10px;
|
||||
width: 100px;
|
||||
|
||||
img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.oplinks2 svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.oplinks2 i {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.search-dropdown {
|
||||
width: 1000px;
|
||||
height: 440px;
|
||||
background-color: #fafafa;
|
||||
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.search-dropdown-column {
|
||||
flex: 1;
|
||||
margin-left: 6px;
|
||||
margin-right: 6px;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.search-dropdown-column h3 {
|
||||
background: #d2d2d2;
|
||||
line-height: 30px;
|
||||
margin: 0;
|
||||
padding-left: 10px;
|
||||
color: white;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.card {
|
||||
background-color: white;
|
||||
margin-top: 10px;
|
||||
padding: 20px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.card h4 {
|
||||
font-weight: bold;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.left {
|
||||
flex: 4;
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 6;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.card .vxe-form .vxe-form--item-inner {
|
||||
min-height: 24px;
|
||||
}
|
||||
|
||||
.card .vxe-form .vxe-form--item {
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.formtitle {
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.gx-item{
|
||||
display: flex;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.gx-item-col{
|
||||
flex:5;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<template>
|
||||
<div class="container2">
|
||||
<button class="button" @click="reportWork">报工</button>
|
||||
<button class="button" @click="dispatchMaterial">发料</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
reportWork() {
|
||||
|
||||
window.location.hash = '/touch/moldreporting'; // 跳转到指定链接
|
||||
|
||||
},
|
||||
dispatchMaterial() {
|
||||
window.location.hash = '/touch/moldsend'; // 跳转到指定链接
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.container2 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.button {
|
||||
padding: 40px 80px;
|
||||
font-size: 20px;
|
||||
background-color: #ddd;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
margin: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -138,6 +138,22 @@ const view = {
|
|||
path: '/touch/mesreporting',
|
||||
component: () => import('@/pages/Middle/Mes/MesReporting/MesReporting')
|
||||
},
|
||||
TouchMoldHome : {
|
||||
name: '触摸屏首页',
|
||||
path: '/touch/moldhome',
|
||||
component: () => import('@/pages/Middle/Mold/Touch/index')
|
||||
},
|
||||
TouchMoldReporting : {
|
||||
name: '报工',
|
||||
path: '/touch/moldreporting',
|
||||
component: () => import('@/pages/Middle/Mold/Touch/Reporting')
|
||||
},
|
||||
TouchMoldSend : {
|
||||
name: '发料',
|
||||
path: '/touch/moldsend',
|
||||
component: () => import('@/pages/Middle/Mold/Touch/Reporting')
|
||||
},
|
||||
|
||||
exp403: {
|
||||
authority: '*',
|
||||
name: 'exp403',
|
||||
|
|
|
|||
|
|
@ -45,7 +45,21 @@ if (Authorization != null) {
|
|||
|
||||
// console.log("=================touchRoute:"+[touchRoute,routesConfig])
|
||||
loadRoutes([touchRoute,routesConfig]) // 加载路由
|
||||
}else{
|
||||
}
|
||||
else if(process.env.VUE_APP_BEID == 5){
|
||||
let touchRoute = {
|
||||
router: "touch",
|
||||
children:[
|
||||
{router:'TouchMoldHome'},
|
||||
{router:'TouchMoldReporting'},
|
||||
{router:'TouchMoldSend'},
|
||||
]
|
||||
};
|
||||
|
||||
// console.log("=================touchRoute:"+[touchRoute,routesConfig])
|
||||
loadRoutes([touchRoute,routesConfig]) // 加载路由
|
||||
}
|
||||
else{
|
||||
// console.log("=================touchRoute:"+[routesConfig])
|
||||
loadRoutes([routesConfig]) // 加载路由
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue