From c5a838c8f43a1fbb030abc6c167c8d1c1bebc6d3 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期六, 18 十一月 2023 11:31:50 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before
---
src/views/quality/finishedProductInspection/finishedProducter-print.vue | 86 +++++--
src/views/plan/manufacturingorder/index.vue | 13
src/views/quality/finishedProductInspection/index.vue | 17 +
src/views/plan/operationtask/operationtask-form.vue | 490 +++++++++++++------------------------------
4 files changed, 229 insertions(+), 377 deletions(-)
diff --git a/src/views/plan/manufacturingorder/index.vue b/src/views/plan/manufacturingorder/index.vue
index 0e1c7b3..d1e2b8b 100644
--- a/src/views/plan/manufacturingorder/index.vue
+++ b/src/views/plan/manufacturingorder/index.vue
@@ -48,7 +48,7 @@
</el-dropdown-menu>
</el-dropdown>
- <el-dropdown
+ <!-- <el-dropdown
v-if="permissions.manufacturingorder_issue_material"
@command="issueMaterialHandleCommand"
style="margin-left:10px;"
@@ -64,7 +64,7 @@
>{{ item.label }}</el-dropdown-item
>
</el-dropdown-menu>
- </el-dropdown>
+ </el-dropdown> -->
<!-- <el-button
v-if="permissions.manufacturingorder_orderto_ifs"
@click="commitOrderIfs()"
@@ -110,8 +110,8 @@
@click="updateOrderNo"
type="primary"
style="margin-left:10px;"
- >鏇存柊璁㈠崟鍙� -->
- </el-button>
+ >鏇存柊璁㈠崟鍙�
+ </el-button>-->
</template>
</ttable>
<customerorder
@@ -1658,3 +1658,8 @@
}
}
</script>
+<style lang="scss">
+.gantt-info {
+ display: none !important;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/plan/operationtask/operationtask-form.vue b/src/views/plan/operationtask/operationtask-form.vue
index 1b441e0..50f0caa 100644
--- a/src/views/plan/operationtask/operationtask-form.vue
+++ b/src/views/plan/operationtask/operationtask-form.vue
@@ -1,223 +1,125 @@
<template>
- <el-dialog
- :title="!dataForm.id ? '鏂板' : '淇敼'"
- :fullscreen="isFullScreen"
- :close-on-click-modal="false"
- :visible.sync="visible"
- >
+ <el-dialog :title="!dataForm.id ? '鏂板' : '淇敼'" :fullscreen="isFullScreen" :close-on-click-modal="false"
+ :visible.sync="visible">
<el-tabs type="border-card" ref="resource">
<el-tab-pane label="宸ュ崟">
<el-row>
<el-col :span="12">
<div class="mod-config">
<basic-container>
- <el-form
- :model="dataForm"
- :rules="dataRule"
- ref="dataForm"
- label-width="100px"
- class="l-mes"
- :disabled="!editable"
- >
+ <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="100px" class="l-mes"
+ :disabled="!editable">
<el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="宸ュ崟缂栧彿" prop="optaskNo">
- <el-input
- v-model="dataForm.optaskNo"
- placeholder="宸ュ崟缂栧彿"
- disabled
- ></el-input>
+ <el-input v-model="dataForm.optaskNo" placeholder="宸ュ崟缂栧彿" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="宸ヨ壓" prop="routingNo">
- <el-input
- v-model="dataForm.routingNo"
- placeholder="宸ヨ壓"
- disabled
- >
- <el-button
- disabled
- slot="append"
- icon="el-icon-search"
- @click="openRoutingDialog()"
- ></el-button>
+ <el-input v-model="dataForm.routingNo" placeholder="宸ヨ壓" disabled>
+ <!-- <el-button slot="append" icon="el-icon-search" disabled @click="openRoutingDialog"></el-button> -->
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="绫诲瀷" prop="operationTaskType">
- <el-select
- v-model="dataForm.operationTaskType"
- placeholder="璇烽�夋嫨绫诲瀷"
- style="width:100%"
- >
- <el-option
- v-for="(item, index) in workshopTypeOptions"
- :label="item.label"
- :value="item.value"
- :key="index"
- >
+ <el-select v-model="dataForm.operationTaskType" placeholder="璇烽�夋嫨绫诲瀷" style="width:100%">
+ <el-option v-for="(item, index) in workshopTypeOptions" :label="item.label"
+ :value="item.value" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
- <el-col :span="8">
+ <!-- <el-col :span="8">
<el-form-item label="搴撲綅" prop="locationId">
- <el-select
- v-model="dataForm.locationId"
- filterable
- placeholder="璇烽�夋嫨搴撲綅"
- style="width:100%"
- clearable
- >
- <el-option
- v-for="(item, index) in locationOptions"
- :label="item.locName"
- :value="item.id"
- :key="index"
- >
+ <el-select v-model="dataForm.locationId" filterable placeholder="璇烽�夋嫨搴撲綅" style="width:100%"
+ clearable>
+ <el-option v-for="(item, index) in locationOptions" :label="item.locName" :value="item.id"
+ :key="index">
</el-option>
</el-select>
</el-form-item>
- </el-col>
+ </el-col> -->
<el-col :span="8">
<el-form-item label="瀹屾垚鏁伴噺" prop="completedQuantity">
- <el-input
- v-model="dataForm.completedQuantity"
- placeholder="瀹屾垚鏁伴噺"
- ></el-input>
+ <el-input v-model="dataForm.completedQuantity" placeholder="瀹屾垚鏁伴噺"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item
- label="瀹為檯寮�濮嬫椂闂�"
- prop="actualStartDate"
- >
- <el-date-picker
- v-model="dataForm.actualStartDate"
- style="width: 100%; color: red"
- type="datetime"
- placeholder="瀹為檯寮�濮嬫椂闂�"
- value-format="yyyy-MM-dd HH:mm:ss"
- >
+ <el-form-item label="瀹為檯寮�濮嬫椂闂�" prop="actualStartDate">
+ <el-date-picker v-model="dataForm.actualStartDate" style="width: 100%; color: red"
+ type="datetime" placeholder="瀹為檯寮�濮嬫椂闂�" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
- <el-form-item
- label="瀹為檯瀹屾垚鏃堕棿"
- prop="actualFinishDate"
- >
- <el-date-picker
- v-model="dataForm.actualFinishDate"
- style="width: 100%"
- type="datetime"
- placeholder="瀹為檯瀹屾垚鏃堕棿"
- value-format="yyyy-MM-dd HH:mm:ss"
- >
+ <el-form-item label="瀹為檯瀹屾垚鏃堕棿" prop="actualFinishDate">
+ <el-date-picker v-model="dataForm.actualFinishDate" style="width: 100%" type="datetime"
+ placeholder="瀹為檯瀹屾垚鏃堕棿" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="宸ュ崟绫诲瀷" prop="combineState">
- <el-select
- v-model="dataForm.combineState"
- filterable
- placeholder="璇烽�夋嫨宸ュ崟绫诲瀷"
- style="width:100%"
- clearable
- >
- <el-option
- v-for="(item, index) in combineStateOptions"
- :label="item.label"
- :value="item.value"
- :key="index"
- >
+ <el-select v-model="dataForm.combineState" filterable placeholder="璇烽�夋嫨宸ュ崟绫诲瀷" style="width:100%"
+ clearable>
+ <el-option v-for="(item, index) in combineStateOptions" :label="item.label"
+ :value="item.value" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="浼樺厛绾�" prop="priority">
- <el-input
- v-model="dataForm.priority"
- placeholder="浼樺厛绾�"
- ></el-input>
+ <el-input v-model="dataForm.priority" placeholder="浼樺厛绾�"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
- <el-col :span="8">
+ <!-- <el-col :span="8">
<el-form-item label="璁″垝鏁伴噺2" prop="splannedQuantity">
- <el-input
- v-model="dataForm.splannedQuantity"
- placeholder="璁″垝鏁伴噺2"
- style="width:calc(100% - 20px)"
- ></el-input>
+ <el-input v-model="dataForm.splannedQuantity" placeholder="璁″垝鏁伴噺2"
+ style="width:calc(100% - 20px)"></el-input>
<span>{{ dataForm.sunit }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="鐩樻暟" prop="discNum">
- <el-input
- v-model="dataForm.discNum"
- placeholder="鐩樻暟"
- disabled
- ></el-input>
+ <el-input v-model="dataForm.discNum" placeholder="鐩樻暟"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="鐢熶骇宸ユ椂瀹氶" prop="hourQuota">
- <el-input
- v-model="dataForm.hourQuota"
- placeholder="鐢熶骇宸ユ椂瀹氶"
- ></el-input>
+ <el-input v-model="dataForm.hourQuota" placeholder="鐢熶骇宸ユ椂瀹氶"></el-input>
</el-form-item>
- </el-col>
+ </el-col> -->
</el-row>
<el-row :gutter="10">
- <el-col :span="8">
+ <!-- <el-col :span="8">
<el-form-item label="杞藉叿瑙勬牸" prop="reelSpec">
- <el-input
- v-model="dataForm.reelSpec"
- placeholder="杞藉叿瑙勬牸"
- ></el-input>
+ <el-input v-model="dataForm.reelSpec" placeholder="杞藉叿瑙勬牸"></el-input>
</el-form-item>
- </el-col>
- <el-col :span="8">
+ </el-col> -->
+ <!-- <el-col :span="8">
<el-form-item label="鍒堕�犲睘鎬�" prop="manufactureAttr">
- <el-select
- v-model="dataForm.manufactureAttr"
- filterable
- placeholder="璇烽�夋嫨鍒堕�犲睘鎬�"
- style="width:100%"
- disabled
- >
- <el-option
- v-for="(item, index) in manufactureAttrs"
- :label="item.label"
- :value="item.value"
- :key="index"
- >
+ <el-select v-model="dataForm.manufactureAttr" filterable placeholder="璇烽�夋嫨鍒堕�犲睘鎬�"
+ style="width:100%">
+ <el-option v-for="(item, index) in manufactureAttrs" :label="item.label" :value="item.value"
+ :key="index">
</el-option>
</el-select>
</el-form-item>
- </el-col>
+ </el-col> -->
<el-col :span="8">
<el-form-item label="澶囨敞" prop="remark">
- <el-input
- type="textarea"
- :rows="2"
- autosize
- v-model="dataForm.remark"
- placeholder="澶囨敞"
- ></el-input>
+ <el-input type="textarea" :rows="2" autosize v-model="dataForm.remark"
+ placeholder="澶囨敞"></el-input>
</el-form-item>
</el-col>
</el-row>
@@ -229,75 +131,36 @@
<el-col :span="12">
<div class="mod-config">
<basic-container>
- <el-form
- :model="dataForm"
- :rules="dataRule"
- ref="dataForm"
- label-width="100px"
- class="l-mes"
- >
+ <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="100px" class="l-mes">
<el-row>
<el-row :gutter="10">
<el-col :span="11">
<el-form-item label="宸ュ簭" prop="moRoutingOperationId">
- <el-select
- v-model="dataForm.moRoutingOperationId"
- :disabled="!editable"
- filterable
- placeholder="璇烽�夋嫨宸ュ簭"
- style="width:100%"
- @change="selectChangedRoutingOperation"
- >
- <el-option
- v-for="(item, index) in routingOptions"
- :label="
- item.operationName +
- (item.partName ? ' + ' + item.partName : '')
- "
- :value="item.id"
- :key="index"
- >
+ <el-select v-model="dataForm.moRoutingOperationId" :disabled="!editable" filterable
+ placeholder="璇烽�夋嫨宸ュ簭" style="width:100%" @change="selectChangedRoutingOperation">
+ <el-option v-for="(item, index) in routingOptions" :label="item.operationName +
+ (item.partName ? ' + ' + item.partName : '')
+ " :value="item.id" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="宸ヤ綔涓績" prop="workCenter">
- <el-select
- v-model="dataForm.workCenter"
- :disabled="!editable"
- filterable
- placeholder="璇烽�夋嫨宸ヤ綔涓績"
- style="width:100%"
- @change="changeWorkCenter"
- >
- <el-option
- v-for="(item, index) in workCenterOptions"
- :label="item.label"
- :value="item.value"
- :key="index"
- >
+ <el-select v-model="dataForm.workCenter" :disabled="!editable" filterable placeholder="璇烽�夋嫨宸ヤ綔涓績"
+ style="width:100%" @change="changeWorkCenter">
+ <el-option v-for="(item, index) in workCenterOptions" :label="item.label" :value="item.value"
+ :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="宸ヤ綔绔�" prop="workstationId">
- <el-select
- v-model="dataForm.workstationId"
- :disabled="!editable"
- filterable
- placeholder="璇烽�夋嫨宸ヤ綔绔�"
- style="width:100%"
- clearable
- @change="selectLocationByWorkstation"
- >
- <el-option
- v-for="(item, index) in workstations"
- :label="item.name"
- :value="item.id"
- :key="index"
- >
+ <el-select v-model="dataForm.workstationId" :disabled="!editable" filterable
+ placeholder="璇烽�夋嫨宸ヤ綔绔�" style="width:100%" clearable @change="selectLocationByWorkstation">
+ <el-option v-for="(item, index) in workstations" :label="item.name" :value="item.id"
+ :key="index">
</el-option>
</el-select>
</el-form-item>
@@ -306,79 +169,42 @@
<el-row :gutter="10">
<el-col :span="14">
<el-form-item label="璁″垝鏃堕棿" prop="localDateTimes">
- <el-date-picker
- :class="tattimest ? 'sed' : ''"
- v-model="dataForm.localDateTimes"
- readonly
- type="datetimerange"
- range-separator="鑷�"
- start-placeholder="寮�濮�"
- end-placeholder="缁撴潫"
- value-format="yyyy-MM-dd HH:mm:ss"
- @change="selectChangedplannedDate"
- >
+ <el-date-picker :class="tattimest ? 'sed' : ''" v-model="dataForm.localDateTimes"
+ type="datetimerange" range-separator="鑷�" start-placeholder="寮�濮�" end-placeholder="缁撴潫"
+ value-format="yyyy-MM-dd HH:mm:ss" @change="selectChangedplannedDate">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="璁″垝鏁伴噺" prop="plannedQuantity">
- <el-input
- v-model="dataForm.plannedQuantity"
- :disabled="!editable"
- placeholder="璁″垝鏁伴噺"
- style="width:calc(100% - 30px)"
- @change="automaticScheduling()"
- ></el-input>
+ <el-input v-model="dataForm.plannedQuantity" :disabled="!editable" placeholder="璁″垝鏁伴噺"
+ style="width:calc(100% - 30px)"></el-input>
<span>{{ dataForm.unit }}</span>
</el-form-item>
- </el-col></el-row
- >
+ </el-col></el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="闆朵欢" prop="partName">
- <el-input
- v-model="dataForm.partName"
- placeholder="闆朵欢"
- disabled
- ></el-input>
+ <el-input v-model="dataForm.partName" placeholder="闆朵欢" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="闆朵欢鍙�" prop="partNo">
- <el-input
- v-model="dataForm.partNo"
- placeholder="闆朵欢鍙�"
- disabled
- ></el-input>
+ <el-input v-model="dataForm.partNo" placeholder="闆朵欢鍙�" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item
- label="宸ュ崟鎵�闇�鏃堕棿"
- prop="taskTheoreticalTime"
- >
- <el-input
- v-model="dataForm.taskTheoreticalTime"
- placeholder="宸ュ崟鎵�闇�鏃堕棿"
- style="width:calc(100% - 30px)"
- disabled
- ></el-input>
+ <el-form-item label="宸ュ崟鎵�闇�鏃堕棿" prop="taskTheoreticalTime">
+ <el-input v-model="dataForm.taskTheoreticalTime" placeholder="宸ュ崟鎵�闇�鏃堕棿"
+ style="width:calc(100% - 30px)"></el-input>
<span>min</span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
- <span
- style="float:right; margin-right:30px; margin-top: 55px"
- >
- <el-button
- type="primary"
- :disabled="!editable"
- style="margin-left: 12px; margin-bottom:10px"
- @click="automaticScheduling"
- >鑷姩鎺掔▼</el-button
- ></span
- >
+ <span style="float:right; margin-right:30px; margin-top: 55px">
+ <el-button type="primary" :disabled="!editable" style="margin-left: 12px; margin-bottom:10px"
+ @click="automaticScheduling">鑷姩鎺掔▼</el-button></span>
</el-row>
</el-row>
</el-form>
@@ -415,11 +241,7 @@
</div>
</div>
<div style="margin-top:40px">
- <gantt-index
- v-if="isshow"
- ref="ganttIndex"
- :dataForm="dataForm"
- ></gantt-index>
+ <gantt-index v-if="isshow" ref="ganttIndex" :dataForm="dataForm"></gantt-index>
</div>
</basic-container>
</div>
@@ -570,28 +392,17 @@
<!-- </el-card>-->
<!-- </el-tab-pane>-->
<el-tab-pane label="宸ュ崟渚涘簲琛�" v-if="this.dataForm.id">
- <manufacturing-order
- :operationId="this.dataForm.id"
- ref="manufacturing"
- ></manufacturing-order>
+ <manufacturing-order :operationId="this.dataForm.id" ref="manufacturing"></manufacturing-order>
</el-tab-pane>
<el-tab-pane label="宸ュ崟鎵�闇�鐗╂枡" v-if="this.dataForm.id">
- <operation-supply
- :operationId="this.dataForm.id"
- :routingOperationId="this.dataForm.moRoutingOperationId"
- ref="manufacturing"
- ></operation-supply>
+ <operation-supply :operationId="this.dataForm.id" :routingOperationId="this.dataForm.moRoutingOperationId"
+ ref="manufacturing"></operation-supply>
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">鍙栨秷</el-button>
- <el-button
- type="primary"
- :disabled="isSubmit"
- v-thinclick="`dataFormSubmit`"
- >纭畾</el-button
- >
+ <el-button type="primary" :disabled="isSubmit" v-thinclick="`dataFormSubmit`">纭畾</el-button>
<!--<el-button
type="primary"
:disabled="isSubmit"
@@ -600,33 +411,16 @@
>纭畾骞剁墿鏂欓鐣�</el-button
>-->
</span>
- <routingDialog
- :currshowlist.sync="showRouting"
- :mutiSelect="false"
- :queryParam="queryParam"
- @listenToRoutingEvent="selectRouting"
- />
- <workstationDialog
- :currshowlist.sync="showWorkstation"
- @listenToWorkStationEvent="selectWorkstation"
- />
- <locationDialog
- :currshowlist.sync="showLocation"
- @listenToLocationEvent="selectLocation"
- :queryParam="queryParamLocation"
- />
+ <routingDialog :currshowlist.sync="showRouting" :mutiSelect="false" :queryParam="queryParam"
+ @listenToRoutingEvent="selectRouting" />
+ <workstationDialog :currshowlist.sync="showWorkstation" @listenToWorkStationEvent="selectWorkstation" />
+ <locationDialog :currshowlist.sync="showLocation" @listenToLocationEvent="selectLocation"
+ :queryParam="queryParamLocation" />
- <ParamTemplateDialog
- :currshowlist.sync="showOperationTemplate"
- @handleSelectionParamTemplateChange="selectOperationTemplate"
- :paramTemplateObj="templateDefaultObj"
- />
- <ParamDialog
- :currshowlist.sync="showTemplateParam"
- @handleSelectionChange="selectTemplateParam"
- :paramSelArr="paramSelArr"
- :paramSelCol="paramSelCol"
- />
+ <ParamTemplateDialog :currshowlist.sync="showOperationTemplate"
+ @handleSelectionParamTemplateChange="selectOperationTemplate" :paramTemplateObj="templateDefaultObj" />
+ <ParamDialog :currshowlist.sync="showTemplateParam" @handleSelectionChange="selectTemplateParam"
+ :paramSelArr="paramSelArr" :paramSelCol="paramSelCol" />
</el-dialog>
</template>
@@ -635,9 +429,11 @@
border: none;
border-bottom: 1px solid gainsboro;
}
+
/deep/ .sed .el-range-input {
color: red !important;
}
+
.no-padding-top .el-card__body {
padding: 0px 0px 5px;
}
@@ -650,6 +446,7 @@
justify-content: space-between;
align-items: center;
}
+
.status label {
font-size: 12px;
font-weight: 500;
@@ -677,7 +474,7 @@
</style>
<script>
import { fetchListExt } from '@/api/warehouse/location'
-import { addObj, getObj, putObj } from '@/api/plan/operationtask'
+import { addObj, getObj, putObj, getTechnologyRouting } from '@/api/plan/operationtask'
import { getAllWorkstationList, loadWorkstation } from '@/api/basic/workstation'
import { getOperationParam } from '@/api/basic/template'
import { getQpaNumber } from '@/api/plan/manufacturingorder'
@@ -691,7 +488,7 @@
validateSixDecimalNotNull,
validateSixDecimal
} from '../../../util/validate'
-import { getObj as getRout } from '@/api/technology/routing'
+import { getObjCopy as getRout } from '@/api/technology/routing'
import ManufacturingOrder from './manufacturingorder'
import ganttIndex from './gantt-index'
import OperationSupply from './operationMaterial'
@@ -734,9 +531,11 @@
tattimest: false,
tableData: [],
dataForm: {
+ ifsOrderNo: '',
id: 0,
optaskNo: '',
routingId: '',
+ moRoutingId: '',
priority: '',
routingOperationId: null,
state: '',
@@ -812,11 +611,11 @@
}
},
computed: {
- editable: function() {
+ editable: function () {
if (!this.dataForm.id) {
return true
}
- if (this.dataForm.id && this.dataForm.state == '01pending') {
+ if (this.dataForm.id && this.dataForm.state == '07unsubmit') {
return true
}
return false
@@ -828,11 +627,12 @@
this.getWrkshopTypeOptions()
this.getWorkCenterOptions()
this.getManufactureAttrs('manufacture_attr_type')
+
},
mounted() {
window.addEventListener(
'popstate',
- function(e) {
+ function (e) {
this.visible = false
}.bind(this),
false
@@ -844,7 +644,6 @@
if (newValue) {
getMoRouting(this.dataForm.moId).then((response) => {
this.routingList = response.data.data
- this.routingOptions = this.routingList.moRoutingOperationDTOList
})
}
}
@@ -855,6 +654,7 @@
// fullscreen() {
// this.isFullScreen = !this.isFullScreen
// },
+ // 鏍规嵁杞﹂棿璁㈠崟鐨処d鏌ヨ宸ヨ壓璺嚎鍙傛暟
getManufactureAttrs(type) {
remote(type).then((response) => {
const code = response.data.code
@@ -894,7 +694,6 @@
remote('work_center_type').then((response) => {
if (response.data.code === 0) {
this.workCenterOptions = response.data.data
- console.log(this.workCenterOptions)
this.workCenterOptions.forEach((item) => {
item.label = '(' + item.value + ') ' + item.label
})
@@ -927,9 +726,9 @@
this.dataForm.routingId = routing.id
this.dataForm.routingNo = routing.routingNo
this.dataForm.moRoutingOperationId = null
- // this.dataForm.partName = routing.partName
- // this.dataForm.partId = routing.partId
- this.$refs.dataForm.validateField('routingNo', (valid) => {})
+ this.routingOptions = routing.operations
+
+ this.$refs.dataForm.validateField('routingNo', (valid) => { })
},
openWorkstationDialog() {
this.showWorkstation = true
@@ -948,7 +747,6 @@
// this.showLocation = true
// },
selectWorkstation(workstation) {
- console.log(workstation)
if (workstation) {
this.dataForm.workstationId = workstation.id
this.dataForm.workstationName = workstation.name
@@ -965,7 +763,8 @@
init(id, param, outPutBatchList, qtyPlaned) {
if (param) {
- console.log(param)
+ console.log(param);
+ this.dataForm.ifsOrderNo = param.ifsOrderNo
this.qtyRequired = param.qtyRequired
this.dataForm.moId = param.id
this.dataForm.moNo = param.moNo
@@ -974,9 +773,9 @@
if (param.technologyRoutingId) {
getMoRouting(this.dataForm.moId).then((response) => {
this.routingList = response.data.data
- this.routingOptions = this.routingList.moRoutingOperationDTOList
- this.dataForm.routingId = this.routingList.technologyRoutingId
+ this.dataForm.routingId = this.routingList.moRoutingId
this.dataForm.routingNo = this.routingList.routingNo
+ this.routingOptions = this.routingList.moRoutingOperationDTOList
// this.dataForm.partName = this.routingList.partName
// this.dataForm.partId = this.routingList.partId
// 鍒堕�犺鍗昮orm鍒涘缓鐨勶紝鑷姩甯﹀嚭宸ュ簭
@@ -1011,6 +810,10 @@
this.$nextTick(() => {
this.$refs.ganttIndex.init(this.dataForm.workCenter)
})
+ getTechnologyRouting(id).then(res => {
+ this.routingOptions = res.data.data.operations
+ this.dataForm.routingNo = res.data.data.routing_no
+ })
})
} else {
this.dataForm.plannedQuantity = qtyPlaned
@@ -1028,7 +831,7 @@
this.$refs.ganttIndex.init(this.dataForm.workCenter, 1)
})
}
- })
+ })
},
// 琛ㄥ崟鎻愪氦
dataFormSubmit() {
@@ -1036,33 +839,43 @@
this.dataForm.plannedStartDate = this.dataForm.localDateTimes[0]
this.dataForm.plannedFinishDate = this.dataForm.localDateTimes[1]
this.$refs.dataForm.validate((valid) => {
- if (valid) {
- if (this.dataForm.id) {
- putObj(this.dataForm)
- .then((data) => {
- this.$message.success('淇敼鎴愬姛')
- this.visible = false
- this.isSubmit = false
- this.$emit('refreshDataList')
- })
- .catch(() => {
- this.isSubmit = false
- })
- } else {
- addObj(this.dataForm)
- .then((data) => {
- this.$message.success('娣诲姞鎴愬姛')
- this.visible = false
- this.isSubmit = false
- this.$emit('refreshDataList')
- })
- .catch(() => {
- this.isSubmit = false
- })
- }
+ // if (valid) {
+ if (this.dataForm.id) {
+ if(this.dataForm.plannedQuantity==0){
+ this.$message.error('璁″垝鏁伴噺涓嶈兘涓�0')
+ this.isSubmit = false
+ return
+ }
+ putObj(this.dataForm)
+ .then((data) => {
+ this.$message.success('淇敼鎴愬姛')
+ this.visible = false
+ this.isSubmit = false
+ this.$emit('refreshDataList')
+ })
+ .catch(() => {
+ this.isSubmit = false
+ })
} else {
- this.isSubmit = false
+ if(this.dataForm.plannedQuantity==0){
+ this.$message.error('璁″垝鏁伴噺涓嶈兘涓�0')
+ this.isSubmit = false
+ return
+ }
+ addObj(this.dataForm)
+ .then((data) => {
+ this.$message.success('娣诲姞鎴愬姛')
+ this.visible = false
+ this.isSubmit = false
+ this.$emit('refreshDataList')
+ })
+ .catch(() => {
+ this.isSubmit = false
+ })
}
+ // } else {
+ // this.isSubmit = false
+ // }
})
},
// 纭畾骞剁墿鏂欓鐣�
@@ -1075,7 +888,6 @@
if (this.dataForm.id) {
putObj(this.dataForm)
.then((data) => {
- console.log(data)
this.$message.success('淇敼鎴愬姛')
this.$router.push({
path: '../operationtaskreserved/index',
@@ -1091,7 +903,6 @@
} else {
addObj(this.dataForm)
.then((data) => {
- console.log(data)
this.$message.success('娣诲姞鎴愬姛')
this.$router.push({
path: '../operationtaskreserved/index',
@@ -1115,9 +926,12 @@
const routingOperation = this.routingOptions.find(
(item) => item.id == moRoutingOperationId
)
- console.log(routingOperation)
this.dataForm.partName = routingOperation.partName
this.dataForm.partNo = routingOperation.partNo
+ // getRout(routingOperation.partId).then(res => {
+ // this.dataForm.partNo = res.data.data.partNo
+ // })
+
this.dataForm.partId = routingOperation.partId
this.dataForm.unit = routingOperation.unit
this.dataForm.sunit = routingOperation.sunit
@@ -1193,7 +1007,6 @@
this.$nextTick(() => {
this.$refs.ganttIndex.show(this.operationTasks)
- console.log(this.operationTasks)
})
})
},
@@ -1215,7 +1028,6 @@
this.dataForm.workCenter,
this.dataForm.plannedQuantity
).then((res) => {
- console.log(res)
this.dataForm.localDateTimes = [
res.data.data.plannedStartDate,
res.data.data.plannedFinishDate
@@ -1334,7 +1146,7 @@
)
})
- Promise.all(promiseList).then((res) => {})
+ Promise.all(promiseList).then((res) => { })
}
},
// 寮瑰嚭鍩虹鍙傛暟闆嗘ā鏉垮璇濇
diff --git a/src/views/quality/finishedProductInspection/finishedProducter-print.vue b/src/views/quality/finishedProductInspection/finishedProducter-print.vue
index 9fdd394..df1bb35 100644
--- a/src/views/quality/finishedProductInspection/finishedProducter-print.vue
+++ b/src/views/quality/finishedProductInspection/finishedProducter-print.vue
@@ -1,6 +1,6 @@
<template>
- <div id="20230721_24921" align=center x:publishsource="Excel" style="margin-top: 60pt;margin-left: 20pt;">
- <table border=0 cellpadding=0 cellspacing=0 width=1194 style='border-collapse:collapse;table-layout:fixed;width:629pt'>
+ <div id="20230721_24921" align=center x:publishsource="Excel" style="margin-top: 65pt;margin-left: 15pt;">
+ <table border=0 cellpadding=0 cellspacing=0 width=1194 style='border-collapse:collapse;table-layout:fixed;width:629pt;page-break-after: always;'>
<tr class=xl6524921 height=20 style='mso-height-source:userset;height:30.0pt'>
<td colspan=3 rowspan=2 height=40 width=122 style='width:150pt;border: 1pt solid windowtext'>
<span style='mso-ignore:vglayout;margin-left:12px;margin-top:14px;width:104px;height:42px'>
@@ -77,7 +77,7 @@
<td colspan=1 class=xl6624921 style='border-right:.5pt solid black;border-left:none'>
鏍囧噯鍊�
</td>
- <td colspan=1 v-for="a in 9" class=xl6624921 style='border-right:.5pt solid black; border-left:none'>
+ <td colspan=1 v-for="a in columnLength" class=xl6624921 style='border-right:.5pt solid black; border-left:none'>
{{a>9?item:'0'+a}}
</td>
<td colspan=2 class=xl6624921 style='border-right:.5pt solid black;border-left:none'>
@@ -89,9 +89,9 @@
<tbody v-for="(item,index) in prjdata" :key="index">
<tr class=xl6524921 height=53 style='mso-height-source:userset;height:40.05pt'>
- <td rowspan=16 height=53 class=xl7624921 style='border-right:.5pt solid black; height:40.05pt'>
- <p class="MsoNormal" align="center" style="text-align:centerdisplay:flex ;">
- <span style="font-family:瀹嬩綋; writing-mode: vertical-rl;">{{item.father}}</span>
+ <td :rowspan="item.children.length" height=53 class=xl7624921 style='border-right:.5pt solid black; height:40.05pt'>
+ <p >
+ <span style=" writing-mode: vertical-rl;font-size: 26pt;">{{item.father}}</span>
</p>
</td>
<td colspan=2 class=xl6624921 style='border-right:.5pt solid black;border-left:none'>
@@ -146,10 +146,12 @@
<td width=235 style='width:176pt'></td>
</tr>
</table>
- <div>
+ <!-- <div v-for="items in prjdata">
+ <div v-for="aa in items.length"> -->
<template>
- <div style="margin-top: 100pt;width: 75%;">
- <div class="head">
+ <div style="page-break-after: always;">
+ <div>
+ <div class="head" id="head">
<div class="head-1">
<img width=174 height=58 src="../../../../public/img/image002.png">
</div>
@@ -222,10 +224,12 @@
</span></p>
</div>
</div>
+ </div>
</template>
<template>
- <div style="margin-top: 100pt;width: 75%;">
+ <div style="page-break-after: always;">
+ <div >
<div class="head">
<div class="head-1">
<img width=174 height=58 src="../../../../public/img/image002.png">
@@ -268,10 +272,12 @@
<br>Add: No 1 Xinkainan Road, NETDZ Nantong, Jiangsu, China (226010); TEL: 051389191125 ; Fax:051389191123
</span></p>
</div>
+ </div>
</template>
<template>
- <div style="margin-top: 100pt;width: 75%;">
+ <div style="page-break-after: always;" >
+ <div >
<div class="head">
<div class="head-1">
<img width=174 height=58 src="../../../../public/img/image002.png">
@@ -342,10 +348,12 @@
<br>Add: No 1 Xinkainan Road, NETDZ Nantong, Jiangsu, China (226010); TEL: 051389191125 ; Fax:051389191123
</span></p>
</div>
+ </div>
</template>
<template>
- <div style="margin-top: 100pt;width: 75%;">
+ <div style="page-break-after: always;">
+ <div >
<div class="head">
<div class="head-1">
<img width=174 height=58 src="../../../../public/img/image002.png">
@@ -372,9 +380,9 @@
<div>
<table border="2px" style="width: 800px;height: 100px;margin-top: 10px;">
<tr style="height: 80px;">
- <td class="x1111113"><span style="font-size 40pt;margin-left: 80px;font-family:榛戜綋">娴嬭瘯鍓嶇収鐗�</span></td>
- <td class="x1111113"><span style="font-size 40pt;margin-left: 80px;font-family:榛戜綋">娴嬭瘯鍓嶇収鐗�</span></td>
- <td class="x1111113"><span style="font-size 40pt;margin-left: 80px;font-family:榛戜綋">娴嬭瘯鍓嶇収鐗�</span></td>
+ <td class="x1111113"><span style="font-size 40pt;margin-left: 80px;font-family:榛戜綋">娴嬭瘯椤圭洰</span></td>
+ <td class="x1111113"><span style="font-size 40pt;margin-left: 80px;font-family:榛戜綋">鏍峰搧鏁伴噺</span></td>
+ <td class="x1111113"><span style="font-size 40pt;margin-left: 80px;font-family:榛戜綋">娴嬭瘯缁撴灉</span></td>
</tr>
<tr style="height: 100px;">
<td></td>
@@ -411,10 +419,12 @@
<br>Add: No 1 Xinkainan Road, NETDZ Nantong, Jiangsu, China (226010); TEL: 051389191125 ; Fax:051389191123
</span></p>
</div>
+ </div>
</template>
<template>
- <div style="margin-top: 100pt;width: 75%;">
+ <div style="page-break-after: always;">
+ <div >
<div class="head">
<div class="head-1">
<img width=174 height=58 src="../../../../public/img/image002.png">
@@ -473,9 +483,11 @@
<br>Add: No 1 Xinkainan Road, NETDZ Nantong, Jiangsu, China (226010); TEL: 051389191125 ; Fax:051389191123
</span></p>
</div>
+ </div>
</template>
- </div>
- </div>
+ <!-- </div>
+ </div> -->
+</div>
</template>
<script>
@@ -505,6 +517,7 @@
quantity:null,
username:null,
iname:null,
+ columnLength: 9,
}
},
filters:{
@@ -565,28 +578,30 @@
required: '',
iunit: '',
itype: '',
- testValueList: new Array(9)
+ testValueList: new Array(this.columnLength)
}
- if(list && list.length<10){
+ let rowNum = 15
+ let columnNum = this.columnLength
+ if(list && list.length<2){
list.forEach(item=>{
- if(item.children && item.children.length < 7){
- let size = 15 - item.children.length
+ if(item.children && item.children.length < rowNum){
+ rowNum = 15 - item.children.length
for(let j=0;j<item.children.length;j++){
let arr = []
if(item.children[j].inspectionValue){
arr = item.children[j].inspectionValue.split(",")
}
item.children[j].testValueList = arr
- if(item.children[0].testValueList.length<12){
- let num = 9 - item.children[j].testValueList.length
+ if(item.children[j].testValueList.length<columnNum){
+ let num = columnNum - item.children[j].testValueList.length
for(let i=0;i<num;i++){
item.children[j].testValueList.push("")
}
}
}
- for(let i=0;i< size;i++){
+ for(let i=0;i< rowNum;i++){
item.children.push(data)
- item.father
+ // item.father
}
}
})
@@ -595,15 +610,30 @@
list.forEach(item=>{
if(item.children){
size+=item.children.length
+ item.children.forEach(obj=>{
+ if(obj.inspectionValue){
+ let testValueList = obj.inspectionValue.split(",")
+ obj.testValueList = testValueList
+ if(testValueList.length < columnNum){
+ let len = columnNum-testValueList.length
+ for(var i=0;i<len;i++){
+ obj.testValueList.push("")
+ }
+ }
+ }else{
+ obj.testValueList = new Array(12)
+ }
+ })
}
})
- if(size<15){
- let num = 15 - size
+ if(size < rowNum){
+ let num = rowNum - size
for(let i=0;i<num;i++){
list[list.length-1].children.push(data)
}
}
}
+ this.prjdata = list
}
},
watch:{
diff --git a/src/views/quality/finishedProductInspection/index.vue b/src/views/quality/finishedProductInspection/index.vue
index 72df78d..9d582da 100644
--- a/src/views/quality/finishedProductInspection/index.vue
+++ b/src/views/quality/finishedProductInspection/index.vue
@@ -217,14 +217,21 @@
},
//鎵撳嵃鎸夐挳
printFun() {
- this.printDialogVisible = false;
+ const printSettings = {
+ paper: {
+ width: 827, // A4绾哥殑瀹藉害锛堝崟浣嶏細鍍忕礌锛�
+ height: 595, // A4绾哥殑楂樺害锛堝崟浣嶏細鍍忕礌锛�
+ orientation: 'portrait', // 绔栧悜鎵撳嵃
+ }}
+
PrintJS({
printable: "printRaw",
type: "html",
- maxWidth: 950,
- style: '@page {margin: 2.0mm 2.0mm}',
+ header:"",
+ maxWidth: 1000,
+ printSettings,
+ style: '@page {margin: 2.0mm 2.0mm;size:A4;}',
targetStyles: ["*"],
- // importCSS: true,
fontSize: '30px',
ignoreElements: ["no-ignore"],
orientation: 'portrait'
@@ -236,10 +243,8 @@
this.printFormData = res.data.data
this.printFormData.createTime = row.createTime
this.printFormData.updateTime = row.updateTime
- // console.log(this.printFormData,"7777777777=====");
this.printDialogVisible = true
}).catch(error=>{
- // console.log(error);
})
},
exportExcel(){
--
Gitblit v1.9.3