Commit d0b06b32 authored by 全洪江's avatar 全洪江

Merge branch 'dev' of http://git.local.topsunit.com/mes/mes-ui into dev

parents 3e886fcd a04bcf3d
import request from '@/utils/request' import request from "@/utils/request";
// 查询量产制作列表 // 查询样品制作单列表
export function listProductionMake(query) { export function listProductionMake(query) {
return request({ return request({
url: '/pro/productionMake/list', url: "/mes/pro/productionMake/list",
method: 'get', method: "get",
params: query params: query,
}) });
} }
// 查询量产制作详细 // 查询样品制作单详细
export function getProductionMake(productionMakeId) { export function getProductionMake(productionMakeId) {
return request({ return request({
url: '/pro/productionMake/' + productionMakeId, url: "/mes/pro/productionMake/" + productionMakeId,
method: 'get' method: "get",
}) });
} }
// 新增量产制作 // 新增样品制作单
export function addProductionMake(data) { export function addProductionMake(data) {
return request({ return request({
url: '/pro/productionMake', url: "/mes/pro/productionMake",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 修改量产制作 // 修改样品制作单
export function updateProductionMake(data) { export function updateProductionMake(data) {
return request({ return request({
url: '/pro/productionMake', url: "/mes/pro/productionMake",
method: 'put', method: "put",
data: data data: data,
}) });
} }
// 删除量产制作 // 删除样品制作单
export function delProductionMake(productionMakeId) { export function delProductionMake(productionMakeId) {
return request({ return request({
url: '/pro/productionMake/' + productionMakeId, url: "/mes/pro/productionMake/" + productionMakeId,
method: 'delete' method: "delete",
}) });
}
// 修改状态
export function dofinish(data) {
return request({
url: "/mes/pro/productionMake/modifyState",
method: "put",
data: data,
});
} }
import request from "@/utils/request"; import request from "@/utils/request";
// 查询打样申请列表 // 查询量产申请列表
export function listProductionRequest(query) { export function listProductionRequest(query) {
return request({ return request({
url: "/mes/pro/productionRequest/list", url: "/mes/pro/productionRequest/list",
...@@ -9,7 +9,7 @@ export function listProductionRequest(query) { ...@@ -9,7 +9,7 @@ export function listProductionRequest(query) {
}); });
} }
// 查询打样申请详细 // 查询量产申请详细
export function getProductionRequest(productionRequestId) { export function getProductionRequest(productionRequestId) {
return request({ return request({
url: "/mes/pro/productionRequest/" + productionRequestId, url: "/mes/pro/productionRequest/" + productionRequestId,
...@@ -17,7 +17,7 @@ export function getProductionRequest(productionRequestId) { ...@@ -17,7 +17,7 @@ export function getProductionRequest(productionRequestId) {
}); });
} }
// 新增打样申请 // 新增量产申请
export function addProductionRequest(data) { export function addProductionRequest(data) {
return request({ return request({
url: "/mes/pro/productionRequest", url: "/mes/pro/productionRequest",
...@@ -26,7 +26,7 @@ export function addProductionRequest(data) { ...@@ -26,7 +26,7 @@ export function addProductionRequest(data) {
}); });
} }
// 修改打样申请 // 修改量产申请
export function updateProductionRequest(data) { export function updateProductionRequest(data) {
return request({ return request({
url: "/mes/pro/productionRequest", url: "/mes/pro/productionRequest",
...@@ -35,7 +35,7 @@ export function updateProductionRequest(data) { ...@@ -35,7 +35,7 @@ export function updateProductionRequest(data) {
}); });
} }
// 删除打样申请 // 删除量产申请
export function delProductionRequest(productionRequestId) { export function delProductionRequest(productionRequestId) {
return request({ return request({
url: "/mes/pro/productionRequest/" + productionRequestId, url: "/mes/pro/productionRequest/" + productionRequestId,
...@@ -46,7 +46,7 @@ export function delProductionRequest(productionRequestId) { ...@@ -46,7 +46,7 @@ export function delProductionRequest(productionRequestId) {
// 修改状态 // 修改状态
export function dofinish(data) { export function dofinish(data) {
return request({ return request({
url: "/mes/pro/productionRequest/modifyState/", url: "/mes/pro/productionRequest/modifyState",
method: "put", method: "put",
data: data, data: data,
}); });
......
...@@ -295,14 +295,15 @@ export default { ...@@ -295,14 +295,15 @@ export default {
}, },
/**表单提交 */ /**表单提交 */
submitForm() { submitForm() {
let thisObj = this;
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.optType == "add") { if (thisObj.optType == "add") {
this.tableData.unshift({ ...this.form }); thisObj.tableData.unshift({ ...thisObj.form });
} else { } else {
this.tableData.splice(this.currentRowIdx, 1, this.form); thisObj.tableData.splice(thisObj.currentRowIdx, 1, thisObj.form);
} }
this.showFlag = false; thisObj.showFlag = false;
} }
}); });
}, },
......
...@@ -17,37 +17,6 @@ ...@@ -17,37 +17,6 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="单据状态" prop="prototypeRequestStatus">
<el-select
v-model="queryParams.prototypeRequestStatus"
clearable
placeholder="请选择单据状态"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item> -->
<!-- <el-form-item label="样品名称" prop="abbreviation">
<el-input
v-model="queryParams.itemName"
placeholder="请输入样品名称"
clearable
@keyup.enter.native="handleQuery"
/> -->
<!-- <el-date-picker
clearable
v-model="queryParams.abbreviation"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择申请日期"
>
</el-date-picker>-->
<!-- </el-form-item> -->
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
...@@ -70,7 +39,7 @@ ...@@ -70,7 +39,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['mes:pro:prototypeRequest:add']" v-hasPermi="['mes:pro:productionMake:add']"
>新增</el-button >新增</el-button
> >
</el-col> </el-col>
...@@ -82,7 +51,7 @@ ...@@ -82,7 +51,7 @@
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['mes:pro:prototypeRequest:edit']" v-hasPermi="['mes:pro:productionMake:edit']"
>修改</el-button >修改</el-button
> >
</el-col> </el-col>
...@@ -94,7 +63,7 @@ ...@@ -94,7 +63,7 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['mes:pro:prototypeRequest:remove']" v-hasPermi="['mes:pro:productionMake:remove']"
>删除</el-button >删除</el-button
> >
</el-col> </el-col>
...@@ -105,7 +74,7 @@ ...@@ -105,7 +74,7 @@
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['mes:pro:prototypeRequest:export']" v-hasPermi="['mes:pro:productionMake:export']"
>导出</el-button >导出</el-button
> >
</el-col> </el-col>
...@@ -117,10 +86,21 @@ ...@@ -117,10 +86,21 @@
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="prototypeRequestList" :data="productionMakeList"
row-key="prototypeMakeId" row-key="productionMakeId"
default-expand-all default-expand-all
> >
<el-table-column label="量产制作单编码" width="180" prop="productionMakeCode">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="handleView(scope.row)"
v-hasPermi="['mes:pro:productionMake:query']"
>{{ scope.row.productionMakeCode }}</el-button
>
</template>
</el-table-column>
<el-table-column <el-table-column
label="产品名称" label="产品名称"
width="120" width="120"
...@@ -140,62 +120,22 @@ ...@@ -140,62 +120,22 @@
/> />
<el-table-column label="印刷正面颜色" width="120" align="center" prop="printingFrontcolor" /> <el-table-column label="印刷正面颜色" width="120" align="center" prop="printingFrontcolor" />
<el-table-column label="印刷背面颜色" width="120" align="center" prop="printingBackcolor" /> <el-table-column label="印刷背面颜色" width="120" align="center" prop="printingBackcolor" />
<el-table-column label="产品正面" width="120" align="center" prop="shoeImg" /> <el-table-column label="产品正面" width="120" align="center" prop="frontImg" />
<el-table-column label="产品背面" width="120" align="center" prop="prototype" /> <el-table-column label="产品背面" width="120" align="center" prop="backImg" />
<el-table-column label="制作单状态" width="120" align="center" prop="productionMakeStatus" /> <el-table-column label="测试标准" align="center" prop="testStandard" />
<!-- <el-table-column label="列" width="120" align="center" prop="col" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="行" width="120" align="center" prop="row" />
<el-table-column label="搭板数" width="120" align="center" prop="buttstrapNum" />
<el-table-column label="列双刀位" width="120" align="center" prop="coldoubleCutspacing" />
<el-table-column label="行双刀位" width="120" align="center" prop="rowdoubleCutspacing" />
<el-table-column label="派工倍数" width="120" align="center" prop="sendworkMultiple" />
<el-table-column label="印张长度" width="120" align="center" prop="printingPaperlenth" />
<el-table-column label="印张宽度" width="120" align="center" prop="printPaperwidth" />
<el-table-column label="印刷正面颜色" width="120" align="center" prop="front_color_id" />
<el-table-column label="印刷反面颜色" width="120" align="center" prop="opposite_color_id" /> -->
<!-- <el-table-column
label="分配方式"
align="center"
prop="modality"
:show-overflow-tooltip="true"
/>
<el-table-column
label="表面处理"
align="center"
prop="surfaceTreatment"
/>
<el-table-column label="NG原因" align="center" prop="ngReason" />
<el-table-column
label="计划完成日期"
align="center"
prop="plannedFinishDate"
width="180"
>
<template slot-scope="scope">
<span>{{
parseTime(scope.row.plannedFinishDate, "{y}-{m}-{d}")
}}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
label="版面需求时间" label="制作单状态"
align="center" align="center"
prop="plannedLayoutDate" prop="productionMakeStatus"
width="180"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <dict-tag
parseTime(scope.row.plannedLayoutDate, "{y}-{m}-{d}") :options="dict.type.mes_productionMake_status"
}}</span> :value="scope.row.productionMakeStatus"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="申请单状态"
align="center"
prop="prototypeRequestStatus"
/>
<el-table-column label="测试标准" align="center" prop="testStandard" /> -->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column <el-table-column
label="操作" label="操作"
width="200px" width="200px"
...@@ -207,28 +147,37 @@ ...@@ -207,28 +147,37 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
v-if="scope.row.prototypeRequestStatus == '审批中'" v-if="scope.row.productionMakeStatus == 0"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['mes:pro:prototypeRequest:edit']" v-hasPermi="['mes:pro:productionMake:edit']"
>修改</el-button >修改</el-button
> >
<!-- <el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-circle-check" icon="el-icon-circle-check"
v-if="scope.row.prototypeRequestStatus == '审批中'" v-if="scope.row.productionMakeStatus == 0"
@click="handleFinish(scope.row)" @click="handleFinish(scope.row)"
v-hasPermi="['mes:pro:prototypeRequest:update']" v-hasPermi="['mes:pro:productionMake:update']"
>完成</el-button >完成</el-button
> --> >
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['mes:pro:prototypeRequest:remove']" v-hasPermi="['mes:pro:productionMake:remove']"
>删除</el-button >删除</el-button
> >
<el-button
size="mini"
type="text"
icon="el-icon-circle-check"
v-if="scope.row.productionMakeStatus == 1"
@click="handleStartMake(scope.row)"
v-hasPermi="['mes:pro:productionMake:update']"
>开始制作</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -240,305 +189,24 @@ ...@@ -240,305 +189,24 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改生产工单对话框 -->
<!-- <el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="8">
<el-form-item label="工单编号" prop="prototypeRequestCode">
<el-input
v-model="form.prototypeRequestCode"
placeholder="请输入工单编号"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="80">
<el-switch
v-model="autoGenFlag"
active-color="#13ce66"
active-text="自动生成"
@change="handleAutoGenChange(autoGenFlag)"
v-if="optType != 'view' && form.status == 'PREPARE'"
>
</el-switch>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工单名称" prop="prototypeRequestName">
<el-input
v-model="form.prototypeRequestName"
placeholder="请输入工单名称"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="来源类型" prop="orderSource">
<el-radio-group
v-model="form.orderSource"
disabled
v-if="optType == 'view'"
>
<el-radio
v-for="dict in dict.type.mes_prototypeRequest_sourcetype"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}</el-radio
>
</el-radio-group>
<el-radio-group v-model="form.orderSource" v-else>
<el-radio
v-for="dict in dict.type.mes_prototypeRequest_sourcetype"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}</el-radio
>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8" v-if="form.orderSource == 'ORDER'">
<el-form-item label="订单编号" prop="sourceCode">
<el-input
v-model="form.sourceCode"
placeholder="请输入订单编号"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单据状态" prop="status">
<el-select
v-model="form.status"
disabled
placeholder="请选择单据状态"
>
<el-option
v-for="dict in dict.type.mes_order_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="工单类型" prop="prototypeRequestType">
<el-select
v-model="form.prototypeRequestType"
placeholder="请选择类型"
>
<el-option
v-for="dict in dict.type.mes_prototypeRequest_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="产品编号" prop="productCode">
<el-input v-model="form.productCode" placeholder="请选择产品">
<el-button
slot="append"
@click="handleSelectProduct"
icon="el-icon-search"
></el-button>
</el-input>
<ItemSelect ref="itemSelect" @onSelected="onItemSelected">
</ItemSelect>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="产品名称" prop="productName">
<el-input
v-model="form.productName"
placeholder="请选择产品"
disabled
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="规格型号" prop="productSpc">
<el-input
v-model="form.productSpc"
placeholder="请选择产品"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="单位" prop="unitOfMeasure">
<el-input
v-model="form.unitOfMeasure"
placeholder="请选择产品"
disabled
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="工单数量" prop="quantity">
<el-input-number
:min="1"
v-model="form.quantity"
placeholder="请输入生产数量"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="需求日期" prop="requestDate">
<el-date-picker
clearable
v-model="form.requestDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择需求日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="批次号" prop="batchCode">
<el-input v-model="form.batchCode" placeholder="请输入批次号" />
</el-form-item>
</el-col>
</el-row>
<el-row v-if="form.orderSource == 'ORDER'">
<el-col :span="12">
<el-form-item label="客户编码" prop="clientCode">
<el-input v-model="form.clientCode" placeholder="请选择客户">
<el-button
slot="append"
@click="handleSelectClient"
icon="el-icon-search"
></el-button>
</el-input>
<ClientSelect ref="clientSelect" @onSelected="onClientSelected">
</ClientSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="客户名称" prop="clientName">
<el-input
v-model="form.clientName"
readonly="readonly"
placeholder="请输入客户名称"
/>
</el-form-item>
</el-col>
<el-col></el-col>
</el-row>
<el-row
v-if="
form.prototypeRequestType == 'OUTSOURCE' ||
form.prototypeRequestType == 'PURCHASE'
"
>
<el-col :span="12">
<el-form-item label="供应商编码" prop="vendorCode">
<el-input v-model="form.vendorCode" placeholder="请选择供应商">
<el-button
slot="append"
@click="handleSelectVendor"
icon="el-icon-search"
></el-button>
</el-input>
<VendorSelect ref="vendorSelect" @onSelected="onVendorSelected" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="供应商名称" prop="vendorName">
<el-input
v-model="form.vendorName"
readonly="readonly"
placeholder="请选择供应商"
/>
</el-form-item>
</el-col>
<el-col></el-col>
</el-row>
<el-row>
<el-col></el-col>
<el-col></el-col>
<el-col></el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
type="textarea"
placeholder="请输入内容"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-tabs type="border-card" v-if="form.prototypeMakeId != null">
<el-tab-pane label="BOM组成">
<prototypeRequestbom ref="bomlist" :optType="optType" :prototypeRequest="form" @handleAddSub="handleSubAdd" ></prototypeRequestbom>
</el-tab-pane>
<el-tab-pane label="物料需求">
</el-tab-pane>
</el-tabs>
<div slot="footer" class="dialog-footer">
<el-button
type="primary"
@click="cancel"
v-if="optType == 'view' || form.status != 'PREPARE'"
>返回</el-button
>
<el-button
type="primary"
@click="submitForm"
v-if="form.status == 'PREPARE' && optType != 'view'"
> </el-button
>
<el-button
type="success"
@click="handleConfirm"
v-if="
form.status == 'PREPARE' &&
optType != 'view' &&
form.prototypeMakeId != null
"
> </el-button
>
<el-button @click="cancel"> </el-button>
</div></el-dialog> -->
</div> </div>
</template> </template>
<script> <script>
import {
listPrototypeRequest,
getPrototypeRequest,
delPrototypeRequest,
addPrototypeRequest,
updatePrototypeRequest,
} from "@/api/mes/pro/prototypeRequest";
import ItemSelect from "@/components/itemSelect/single.vue"; import ItemSelect from "@/components/itemSelect/single.vue";
import ClientSelect from "@/components/clientSelect/single.vue"; import ClientSelect from "@/components/clientSelect/single.vue";
import VendorSelect from "@/components/vendorSelect/single.vue"; import VendorSelect from "@/components/vendorSelect/single.vue";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
// 新增js // 新增js
import { listPrototypeMake, getPrototypeMake, delPrototypeMake, addPrototypeMake, updatePrototypeMake } from "@/api/mes/pro/prototypeMake"; import { listProductionMake, getProductionMake, delProductionMake, addProductionMake, dofinish } from "@/api/mes/pro/productionMake";
import { listProductionMake, getProductionMake, delProductionMake, addProductionMake, updateProductionMake } from "@/api/mes/pro/productionMake";
export default { export default {
name: "PrototypeRequest", name: "ProductionMake",
dicts: [ dicts: [
"mes_order_status", "mes_order_status",
"mes_prototypeRequest_sourcetype", "mes_productionMake_sourcetype",
"mes_prototypeRequest_type", "mes_productionMake_type",
"mes_productionMake_status"
], ],
components: { components: {
Treeselect, Treeselect,
...@@ -564,9 +232,9 @@ export default { ...@@ -564,9 +232,9 @@ export default {
// 非多个禁用 // 非多个禁用
multiple: true, multiple: true,
// 生产工单表格数据 // 生产工单表格数据
prototypeRequestList: [], productionMakeList: [],
// 生产工单树选项 // 生产工单树选项
prototypeRequestOptions: [], productionMakeOptions: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
...@@ -576,12 +244,12 @@ export default { ...@@ -576,12 +244,12 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
itemName: null,// 可以查简称与英文名 itemName: null,// 可以查简称与英文名
prototypeRequestStatus: null, productionMakeStatus: null,
}, },
options: [ options: [
{ value: "审批中", label: "审批中" }, { value: "审批中", label: "审批中" },
{ value: "待制作", label: "待制作" }, { value: "待制作", label: "待制作" },
{ value: "打样中", label: "打样中" }, { value: "制造中", label: "制造中" },
{ value: "待质检", label: "待质检" }, { value: "待质检", label: "待质检" },
{ value: "待确认", label: "待确认" }, { value: "待确认", label: "待确认" },
{ value: "已完成", label: "已完成" }, { value: "已完成", label: "已完成" },
...@@ -591,7 +259,7 @@ export default { ...@@ -591,7 +259,7 @@ export default {
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
// prototypeRequestCode: [ // productionMakeCode: [
// { required: true, message: "工单编码不能为空", trigger: "blur" } // { required: true, message: "工单编码不能为空", trigger: "blur" }
// ], // ],
}, },
...@@ -604,8 +272,8 @@ export default { ...@@ -604,8 +272,8 @@ export default {
/** 查询生产工单列表 */ /** 查询生产工单列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listPrototypeRequest(this.queryParams).then((response) => { listProductionMake(this.queryParams).then((response) => {
this.prototypeRequestList = response.rows; this.productionMakeList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
...@@ -618,47 +286,41 @@ export default { ...@@ -618,47 +286,41 @@ export default {
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
prototypeMakeId: null, screenItem: null,
prototypeMakeCode: null, pibanItem: null,
prototypeMakeId: null, diecuttingItem: null,
routeId: null, standardColor: null,
itemId: null, module: null,
screenItem: null, col: null,
pibanItem: null, row: null,
diecuttingItem: null, buttstrapNum: null,
standardColor: null, coldoubleCutspacing: null,
module: null, rowdoubleCutspacing: null,
col: null, sendworkMultiple: null,
row: null, printingPaperlenth: null,
buttstrapNum: null, printPaperwidth: null,
coldoubleCutspacing: null, frontColorId: null,
rowdoubleCutspacing: null, oppositeColorId: null,
sendworkMultiple: null, ngReason: null,
printingPaperlenth: null, createBy: null,
printPaperwidth: null, createTime: null,
frontColorId: null, updateBy: null,
oppositeColorId: null, updateTime: null,
ngReason: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
//新增产量制作单 //新增产量制作单
productionMakeId: null, productionMakeId: null,
productionMakeCode: null, productionMakeCode: null,
productionRequestId: null, productionRequestId: null,
itemId: null, itemId: null,
routeId: null, routeId: null,
identifyingPeople: null, identifyingPeople: null,
identifyingDate: null, identifyingDate: null,
printingFrontcolor: null, printingFrontcolor: null,
printingBackcolor: null, printingBackcolor: null,
shoeimg: null, shoeImg: null,
prototype: null, prototype: null,
productionMakeStatus: null, productionMakeStatus: null,
remark: null remark: null
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -677,77 +339,29 @@ remark: null ...@@ -677,77 +339,29 @@ remark: null
// 跳转到申请单界面 // 跳转到申请单界面
this.$router.push("/mes/pro/productionMake/apply"); this.$router.push("/mes/pro/productionMake/apply");
return; return;
// this.reset();
// this.getTreeselect();
// if (row != null && row.prototypeMakeId) {
// this.form.parentId = row.prototypeMakeId;
// this.form.orderSource = row.orderSource;
// this.form.sourceCode = row.sourceCode;
// this.form.clientId = row.clientId;
// this.form.clientCode = row.clientCode;
// this.form.clientName = row.clientName;
// } else {
// this.form.parentId = 0;
// }
// this.open = true;
}, },
// 查询明细按钮操作 // 查询明细按钮操作
handleView(row) { handleView(row) {
this.reset(); this.reset();
const prototypeMakeId = row.prototypeMakeId || this.ids; const productionMakeId = row.productionMakeId || this.ids;
this.$router.push( this.$router.push(
"/mes/proofing/info?prototypeMakeId="+prototypeMakeId "/mes/pro/productionMake/info?productionMakeId="+productionMakeId
); );
// getprototypeRequest(prototypeMakeId).then((response) => {
// this.form = response.data;
// this.open = true;
// this.title = "查看工单信息";
// this.optType = "view";
// });
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const prototypeMakeId = row.prototypeMakeId || this.ids; const productionMakeId = row.productionMakeId || this.ids;
this.$router.push( this.$router.push(
"/mes/proofing/edit?prototypeMakeId="+prototypeMakeId "/mes/pro/productionMake/edit?productionMakeId="+productionMakeId
); );
// getPrototypeRequest(prototypeMakeId).then((response) => {
// // this.form = response.data;
// // this.open = true;
// // this.title = "修改生产工单";
// // this.optType="edit";
// // 跳转修改
// });
}, },
// /** 提交按钮 */
// submitForm() {
// this.$refs["form"].validate(valid => {
// if (valid) {
// if (this.form.prototypeMakeId != null) {
// updateprototypeRequest(this.form).then(response => {
// this.$modal.msgSuccess("修改成功");
// //this.open = false;
// this.$refs["bomlist"].getList();
// this.getList();
// });
// } else {
// addprototypeRequest(this.form).then(response => {
// this.$modal.msgSuccess("新增成功");
// //this.open = false;
// this.form.prototypeMakeId = response.data;
// this.getList();
// });
// }
// }
// });
// },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
this.$modal this.$modal
.confirm('是否确认删除编号为"' + row.prototypeMakeId + '"的打样制作单?') .confirm('是否确认删除编号为"' + row.productionMakeCode + '"的量产制作单?')
.then(function () { .then(function () {
return delPrototypeRequest(row.prototypeMakeId); return delProductionMake(row.productionMakeId);
}) })
.then(() => { .then(() => {
this.getList(); this.getList();
...@@ -765,72 +379,41 @@ remark: null ...@@ -765,72 +379,41 @@ remark: null
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download( this.download(
"mes/pro/prototypeRequest/export", "mes/pro/productionMake/export",
{ {
...this.queryParams, ...this.queryParams,
}, },
`打样申请单_${new Date().getTime()}.xlsx` `量产申请单_${new Date().getTime()}.xlsx`
); );
}, },
// // 审批通过 // 审批
// handleConfirm(){ handleFinish(row) {
// let that = this; row.productionMakeStatus = 1;
// this.$modal.confirm('是确认完成工单编制?【确认后将不能更改】').then(function(){ this.$modal
// that.form.status = '待制作'; .confirm("确认通过量产制作单?一旦确认,此工单将无法继续修改")
// that.submitForm(); .then(function () {
// }); return dofinish(row); //完成申请单审批
// }, })
// // 审批 .then(() => {
// handleFinish(row){ this.getList();
// const prototypeMakeIds = row.prototypeMakeId || this.ids; this.$modal.msgSuccess("审批成功");
// this.$modal.confirm('确认完成工单?一旦完成,此工单将无法继续报工').then(function() { })
// return dofinish(prototypeMakeIds) //完成工单 .catch(() => {});
// }).then(() => { },
// this.getList(); handleStartMake(row) {
// this.$modal.msgSuccess("更改成功"); row.productionMakeStatus = 2;
// }).catch(() => {}); this.$modal
// }, .confirm("确认通过量产制作单?一旦确认,此工单将无法继续修改")
// //物料选择弹出框 .then(function () {
// onItemSelected(obj) { return dofinish(row); //完成申请单审批
// if (obj != undefined && obj != null) { })
// this.form.productId = obj.itemId; .then(() => {
// this.form.productCode = obj.itemCode; this.getList();
// this.form.productName = obj.itemName; this.$modal.msgSuccess("审批成功");
// this.form.productSpc = obj.specification; })
// this.form.unitOfMeasure = obj.unitOfMeasure; .catch(() => {});
// } },
// },
// //客户选择弹出框
// onClientSelected(obj) {
// if (obj != undefined && obj != null) {
// this.form.clientId = obj.clientId;
// this.form.clientCode = obj.clientCode;
// this.form.clientName = obj.clientName;
// }
// },
// //供应商选择
// handleSelectVendor() {
// this.$refs.vendorSelect.showFlag = true;
// },
// //供应商选择弹出框
// onVendorSelected(obj) {
// debugger;
// if (obj != undefined && obj != null) {
// this.form.vendorId = obj.vendorId;
// this.form.vendorCode = obj.vendorCode;
// this.form.vendorName = obj.vendorName;
// }
// },
// //自动生成编码
// handleAutoGenChange(autoGenFlag) {
// if (autoGenFlag) {
// genCode("WORKORDER_CODE").then((response) => {
// this.form.prototypeRequestCode = response;
// });
// } else {
// this.form.prototypeRequestCode = null;
// }
// },
}, },
}; };
</script> </script>
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
slot="append" slot="append"
icon="el-icon-search" icon="el-icon-search"
@click="$refs['ItemSelectRef'].showFlag = true" @click="$refs['ItemSelectRef'].showFlag = true"
v-if="false"
></el-button> ></el-button>
</el-input> </el-input>
<ItemSelect ref="ItemSelectRef" @onSelected="onItemSelect" /> <ItemSelect ref="ItemSelectRef" @onSelected="onItemSelect" />
...@@ -60,6 +61,7 @@ ...@@ -60,6 +61,7 @@
slot="append" slot="append"
icon="el-icon-search" icon="el-icon-search"
@click="$refs['RoutesProcessSelectRef'].showFlag = true" @click="$refs['RoutesProcessSelectRef'].showFlag = true"
v-if="false"
></el-button> ></el-button>
</el-input> </el-input>
<RoutesProcessSelect <RoutesProcessSelect
...@@ -70,23 +72,6 @@ ...@@ -70,23 +72,6 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :md="8" :xs="12">
<el-form-item label="确认人" prop="identifyingPeople">
<el-input
v-model="form.identifyingPeople"
placeholder="请输入确认人"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="确认日期" prop="identifyingDate">
<el-date-picker
value-format="yyyy-MM-dd"
v-model="form.identifyingDate"
placeholder="请输入确认日期"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12"> <el-col :md="8" :xs="12">
<el-form-item label="印刷正面颜色" prop="printingFrontcolor"> <el-form-item label="印刷正面颜色" prop="printingFrontcolor">
<el-input v-model="form.printingFrontcolor" placeholder="请输入印刷正面颜色"> <el-input v-model="form.printingFrontcolor" placeholder="请输入印刷正面颜色">
...@@ -102,211 +87,23 @@ ...@@ -102,211 +87,23 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="8" :xs="12"> <el-col :md="8" :xs="12">
<el-form-item label="产品正面" prop="shoeImg"> <el-form-item label="产品正面" prop="frontImg">
<el-input <el-input
v-model="form.shoeImg" v-model="form.frontImg"
placeholder="请选择产品正面" placeholder="请选择产品正面"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="8" :xs="12"> <el-col :md="8" :xs="12">
<el-form-item label="产品背面" prop="prototype"> <el-form-item label="产品背面" prop="backImg">
<el-input <el-input
v-model="form.prototype" v-model="form.backImg"
placeholder="请输入产品背面" placeholder="请输入产品背面"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="8" :xs="12">
<el-form-item label="制作单状态" prop="productionMakeStatus">
<el-input
v-model="form.productionMakeStatus"
placeholder="请输入制作单状态"
></el-input>
</el-form-item>
</el-col>
<!-- <el-col :md="8" :xs="12">
<el-form-item label="版面需求时间" prop="plannedLayoutDate">
<el-date-picker
value-format="yyyy-MM-dd"
v-model="form.plannedLayoutDate"
placeholder="请输入版面需求时间"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="测试标准" prop="testStandard">
<el-input
v-model="form.testStandard"
placeholder="测试标准"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="样品制作单编码" prop="prototypeMakeCode">
<el-input
disabled
v-model="form.prototypeMakeCode"
placeholder="自动生成"
></el-input>
</el-form-item>
</el-col> -->
<!-- <el-col :md="8" :xs="12" style="height: 50.5px">
<el-form-item label="样品申请单" prop="prototypeRequestId">
<el-input
v-model="form.prototypeRequestName"
readonly
placeholder="请选择样品申请单"
>
<el-button
slot="append"
icon="el-icon-search"
@click="$refs['PrototypeRequestSelectRef'].showFlag = true"
></el-button>
</el-input>
<PrototypeRequestSelect ref="PrototypeRequestSelectRef" @onSelected="onPrototypeRequestSelect" />
</el-form-item>
</el-col> -->
<!-- <el-col :md="8" :xs="12">
<el-form-item label="网版目数" prop="screenItem">
<el-input
v-model="form.screenItem"
placeholder="请输入网版目数"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="啤版目数" prop="pibanItem">
<el-input
v-model="form.pibanItem"
placeholder="请输入啤版目数"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="模切版目数" prop="diecuttingItem">
<el-input v-model="form.diecuttingItem" placeholder="请输入模切版目数">
<template slot="suffix">{{ form.unit }}</template>
</el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="标准色号" prop="standardColor">
<el-input
v-model="form.standardColor"
placeholder="请选择标准色号"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="NG原因" prop="ngReason">
<el-input
v-model="form.ngReason"
placeholder="请输入NG原因"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="模数" prop="module">
<el-input
v-model="form.module"
placeholder="请输入模数"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="列" prop="col">
<el-input
v-model="form.col"
placeholder="请输入列"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12"> </el-row>
<el-form-item label="行" prop="row">
<el-input
v-model="form.row"
placeholder="请输入行"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="搭板数" prop="buttstrapNum">
<el-input
v-model="form.buttstrapNum"
placeholder="请输入搭板数"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="列双刀位" prop="coldoubleCutspacing">
<el-input
v-model="form.coldoubleCutspacing"
placeholder="请输入列双刀位"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="行双刀位" prop="rowdoubleCutspacing">
<el-input
v-model="form.rowdoubleCutspacing"
placeholder="请输入行双刀位"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="派工倍数" prop="sendworkMultiple">
<el-input
v-model="form.sendworkMultiple"
placeholder="请输入派工倍数"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="印张长度" prop="printingPaperlenth">
<el-input
v-model="form.printingPaperlenth"
placeholder="请输入印张长度"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="印张宽度" prop="printPaperwidth">
<el-input
v-model="form.printPaperwidth"
placeholder="请输入印张宽度"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="印刷正面颜色" prop="frontColorId">
<el-input
v-model="form.frontColorId"
placeholder="请输入印刷正面颜色"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="印刷反面颜色" prop="oppositeColorId">
<el-input
v-model="form.oppositeColorId"
placeholder="请输入印刷反面颜色"
></el-input>
</el-form-item>
</el-col>
</el-row> -->
</el-row>
<el-row> <el-row>
...@@ -343,14 +140,10 @@ import ItemSelect from "@/components/itemSelect/single.vue"; ...@@ -343,14 +140,10 @@ import ItemSelect from "@/components/itemSelect/single.vue";
import RoutesProcessSelect from "@/components/routesProcessSelect/index.vue"; import RoutesProcessSelect from "@/components/routesProcessSelect/index.vue";
import { listRouteprocess } from "@/api/mes/pro/routeprocess"; import { listRouteprocess } from "@/api/mes/pro/routeprocess";
import { closeOpenPage } from "@/plugins/tab"; import { closeOpenPage } from "@/plugins/tab";
import {
addPrototypeRequest,
getPrototypeRequest,
updatePrototypeRequest,
} from "@/api/mes/pro/prototypeRequest";
//新增方法的js //新增方法的js
import { listProductionMake, getProductionMake, delProductionMake, addProductionMake, updateProductionMake } from "@/api/mes/pro/productionMake"; import { listProductionMake, getProductionMake, delProductionMake, addProductionMake, updateProductionMake } from "@/api/mes/pro/productionMake";
import { getProductionRequest } from "@/api/mes/pro/productionRequest";
export default { export default {
components: { ProogingBom, ProogingProcess, ItemSelect, RoutesProcessSelect }, components: { ProogingBom, ProogingProcess, ItemSelect, RoutesProcessSelect },
...@@ -383,25 +176,21 @@ export default { ...@@ -383,25 +176,21 @@ export default {
plannedLayoutDate: "", plannedLayoutDate: "",
testStandard: "", testStandard: "",
remark: "", remark: "",
//量产制作单参数(注意修改---------------------------------------------------------)
//量产制作单参数(注意修改---------------------------------------------------------) productionMakeId: null,
productionMakeId: null, productionMakeCode: null,
productionMakeCode: null, productionRequestId: null,
productionRequestId: null, identifyingPeople: null,
itemId: null, identifyingDate: null,
routeId: null, printingFrontcolor: null,
identifyingPeople: null, printingBackcolor: null,
identifyingDate: null, shoeimg: null,
printingFrontcolor: null, prototype: null,
printingBackcolor: null, productionMakeStatus: null,
shoeimg: null, createBy: null,
prototype: null, createTime: null,
productionMakeStatus: null, updateBy: null,
remark: null, updateTime: null
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
}, },
rules: {}, rules: {},
}; };
...@@ -438,7 +227,20 @@ updateTime: null ...@@ -438,7 +227,20 @@ updateTime: null
this.bomList = data.bomList; this.bomList = data.bomList;
// 设置组件数据 // 设置组件数据
this.$refs["ProogingBomRef"].tableData = data.bomList; this.$refs["ProogingBomRef"].tableData = data.bomList;
this.$refs["ProogingProcess"].tableData = data.processList; this.$refs["ProogingProcessRef"].tableData = data.processList;
})
.finally(() => {
this.loading = false;
});
}else if(this.$route.query.productionRequestId){
this.loading = true;
getProductionRequest(this.$route.query.productionRequestId)
.then(({ data }) => {
Object.assign(this.form, data);
this.bomList = data.bomList;
// 设置组件数据
this.$refs["ProogingBomRef"].tableData = data.bomList;
this.$refs["ProogingProcessRef"].tableData = data.processList;
}) })
.finally(() => { .finally(() => {
this.loading = false; this.loading = false;
...@@ -490,7 +292,7 @@ updateTime: null ...@@ -490,7 +292,7 @@ updateTime: null
}; };
this.loading = true; this.loading = true;
if (this.mode == "apply") { if (this.mode == "apply") {
addPrototypeRequest(params) addProductionMake(params)
.then((res) => { .then((res) => {
this.loading = false; this.loading = false;
this.$modal.msgSuccess("提交成功!"); this.$modal.msgSuccess("提交成功!");
...@@ -502,7 +304,7 @@ updateTime: null ...@@ -502,7 +304,7 @@ updateTime: null
this.loading = false; this.loading = false;
}); });
} else { } else {
updatePrototypeRequest(params) updateProductionMake(params)
.then(() => { .then(() => {
this.loading = false; this.loading = false;
this.$modal.msgSuccess("提交成功!"); this.$modal.msgSuccess("提交成功!");
...@@ -530,23 +332,20 @@ updateTime: null ...@@ -530,23 +332,20 @@ updateTime: null
plannedLayoutDate: "", plannedLayoutDate: "",
testStandard: "", testStandard: "",
remark: "", remark: "",
//量产制作单参数(注意修改---------------------------------------------------------) //量产制作单参数(注意修改---------------------------------------------------------)
productionMakeId: null, productionMakeId: null,
productionMakeCode: null, productionMakeCode: null,
productionRequestId: null, productionRequestId: null,
itemId: null, identifyingPeople: null,
routeId: null, identifyingDate: null,
identifyingPeople: null, printingFrontcolor: null,
identifyingDate: null, printingBackcolor: null,
printingFrontcolor: null, shoeimg: null,
printingBackcolor: null, prototype: null,
shoeimg: null, createBy: null,
prototype: null, createTime: null,
remark: null, updateBy: null,
createBy: null, updateTime: null
createTime: null,
updateBy: null,
updateTime: null
}; };
this.$refs["ProogingBomRef"].resetState(); this.$refs["ProogingBomRef"].resetState();
this.$refs["ProogingProcessRef"].resetState(); this.$refs["ProogingProcessRef"].resetState();
......
...@@ -146,9 +146,9 @@ export default { ...@@ -146,9 +146,9 @@ export default {
}; };
}, },
computed: { computed: {
title () { title() {
return '设置' + this.process.itemName + '物料' return "设置" + this.process.itemName + "物料";
} },
}, },
watch: { watch: {
process: { process: {
...@@ -216,7 +216,9 @@ export default { ...@@ -216,7 +216,9 @@ export default {
}, },
/** 提交编辑关联信息 */ /** 提交编辑关联信息 */
submitEditConnect() { submitEditConnect() {
this.tableData.splice(this.currentRowIdx, 1, this.form); this.tableData.splice(this.currentRowIdx, 1, {
...this.form,
});
this.editConnectVisible = false; this.editConnectVisible = false;
}, },
}, },
......
<template> <template>
<div> <div>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8" v-if="mode != 'info'">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
...@@ -85,7 +85,12 @@ ...@@ -85,7 +85,12 @@
prop="itemRemark" prop="itemRemark"
min-width="120" min-width="120"
/> />
<el-table-column label="操作" align="center" width="120"> <el-table-column
v-if="mode != 'info'"
label="操作"
align="center"
width="120"
>
<template slot-scope="{ row, $index }"> <template slot-scope="{ row, $index }">
<el-button <el-button
type="text" type="text"
...@@ -116,11 +121,11 @@ ...@@ -116,11 +121,11 @@
> >
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="产品" prop="itemId"> <el-form-item label="物料" prop="itemId">
<el-input <el-input
v-model="form.itemName" v-model="form.itemName"
readonly readonly
placeholder="请选择产品" placeholder="请选择物料"
> >
<el-button <el-button
slot="append" slot="append"
...@@ -232,7 +237,7 @@ export default { ...@@ -232,7 +237,7 @@ export default {
rules: {}, rules: {},
/**多选 */ /**多选 */
selection: [], selection: [],
optType: 'add', optType: "add",
/**表单初始化数据 */ /**表单初始化数据 */
form: { form: {
quantity: "", quantity: "",
...@@ -247,7 +252,7 @@ export default { ...@@ -247,7 +252,7 @@ export default {
bomItemRemark: "", bomItemRemark: "",
itemRemark: "", itemRemark: "",
}, },
currentRowIdx: undefined currentRowIdx: undefined,
}; };
}, },
created() {}, created() {},
...@@ -262,13 +267,13 @@ export default { ...@@ -262,13 +267,13 @@ export default {
handleAdd() { handleAdd() {
this.resetForm(); this.resetForm();
this.showFlag = true; this.showFlag = true;
this.optType = 'add' this.optType = "add";
}, },
/**更新行 */ /**更新行 */
updateRow(row, idx) { updateRow(row, idx) {
Object.assign(this.form, row); Object.assign(this.form, row);
this.currentRowIdx = idx this.currentRowIdx = idx;
this.optType = 'edit' this.optType = "edit";
this.showFlag = true; this.showFlag = true;
}, },
/**删除行 */ /**删除行 */
...@@ -284,7 +289,8 @@ export default { ...@@ -284,7 +289,8 @@ export default {
if (row != undefined && row != null) { if (row != undefined && row != null) {
this.form.itemId = row.itemId; this.form.itemId = row.itemId;
this.form.itemName = row.itemName; this.form.itemName = row.itemName;
this.form.unit = row.unitOfMeasure; this.form.unitOfMeasure = row.unitOfMeasure;
this.form.itemRemark = row.remark;
} }
}, },
/**表单提交 */ /**表单提交 */
...@@ -317,6 +323,11 @@ export default { ...@@ -317,6 +323,11 @@ export default {
itemRemark: "", itemRemark: "",
}; };
}, },
/**重置组件状态 */
resetState() {
this.resetForm();
this.tableData = [];
},
/**获取组件数据 */ /**获取组件数据 */
getComData() { getComData() {
return this.tableData; return this.tableData;
......
...@@ -8,9 +8,15 @@ ...@@ -8,9 +8,15 @@
prop="linkType" prop="linkType"
align="center" align="center"
/> />
<el-table-column label="工作站" prop="workstationId" align="center" /> <el-table-column label="工作站" prop="workstationName" align="center" />
<el-table-column label="标准工时" prop="stdWorkingTime" align="center" />
<el-table-column label="甘特图显示颜色" prop="colorCode" align="center" /> <el-table-column label="甘特图显示颜色" prop="colorCode" align="center" />
<el-table-column label="操作" align="center" width="150"> <el-table-column
v-if="mode != 'info'"
label="操作"
align="center"
width="150"
>
<template slot-scope="{ row, $index }"> <template slot-scope="{ row, $index }">
<el-button <el-button
type="text" type="text"
...@@ -42,7 +48,7 @@ ...@@ -42,7 +48,7 @@
v-dialogDrag v-dialogDrag
:visible.sync="showFlag" :visible.sync="showFlag"
width="800px" width="800px"
title="添加工序" title="工序修改"
> >
<el-form <el-form
ref="form" ref="form"
...@@ -54,75 +60,31 @@ ...@@ -54,75 +60,31 @@
> >
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="组件数量" prop="quantity"> <el-form-item label="工作站" prop="workstationId">
<el-input
type="number"
v-model="form.quantity"
placeholder="请输入组件数量"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计量单位" prop="unitOfMeasure">
<el-input
v-model="form.unitOfMeasure"
placeholder="请输入计量单位"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报废百分比" prop="scrapPercentage">
<el-input
v-model="form.scrapPercentage"
placeholder="请输入报废百分比"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="替代组" prop="alternativeGroup">
<el-input
v-model="form.alternativeGroup"
placeholder="请输入替代组"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="替代优先级" prop="alternativePriorities">
<el-input
v-model="form.alternativePriorities"
placeholder="请输入替代优先级"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="策略" prop="alternativeStrategy">
<el-input
v-model="form.alternativeStrategy"
placeholder="请输入策略"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="使用概率" prop="alternativeProbability">
<el-input <el-input
v-model="form.alternativeProbability" v-model="form.workstationName"
placeholder="请输入使用概率" disabled
></el-input> placeholder="请选择工作站信息"
>
<el-button
slot="append"
icon="el-icon-search"
@click="handleWorkstationSelect"
></el-button>
</el-input>
<WorkstationSelect
ref="WorkstationSelect"
:processId="form.processId"
@onSelected="onWorkstationSelected"
></WorkstationSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="BOM行备注" prop="bomItemRemark"> <el-form-item label="标准工时" prop="stdWorkingTime">
<el-input <el-input
v-model="form.bomItemRemark" type="number"
placeholder="请输入BOM行备注" v-model="form.stdWorkingTime"
></el-input> placeholder="请输入标准工时"
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料备注" prop="itemRemark">
<el-input
v-model="form.itemRemark"
placeholder="请输入物料备注"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -139,8 +101,10 @@ ...@@ -139,8 +101,10 @@
<script> <script>
import ItemBomSelect from "@/components/itemBomSelect/single.vue"; import ItemBomSelect from "@/components/itemBomSelect/single.vue";
import ProcessProd from "./ProcessProd.vue"; import ProcessProd from "./ProcessProd.vue";
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue";
export default { export default {
components: { ItemBomSelect, ProcessProd }, components: { ItemBomSelect, ProcessProd, WorkstationSelect },
inject: ["mode"],
props: { props: {
bomList: { bomList: {
type: Array, type: Array,
...@@ -157,15 +121,9 @@ export default { ...@@ -157,15 +121,9 @@ export default {
rules: {}, rules: {},
/**表单初始化数据 */ /**表单初始化数据 */
form: { form: {
quantity: "", stdWorkingTime: "",
unitOfMeasure: "", workstationId: "",
scrapPercentage: "", workstationName: "",
alternativeGroup: "",
alternativePriorities: "",
alternativeStrategy: "",
alternativeProbability: "",
bomItemRemark: "",
itemRemark: "",
}, },
currentRow: {}, currentRow: {},
currentRowIndex: undefined, currentRowIndex: undefined,
...@@ -173,9 +131,9 @@ export default { ...@@ -173,9 +131,9 @@ export default {
}, },
methods: { methods: {
setList(rows) { setList(rows) {
this.tableData = rows.map(item => { this.tableData = rows.map((item) => {
item.processItemList = [] item.processItemList = [];
return item return item;
}); });
}, },
/** 更新工序的物料信息 */ /** 更新工序的物料信息 */
...@@ -198,6 +156,10 @@ export default { ...@@ -198,6 +156,10 @@ export default {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.showFlag = false; this.showFlag = false;
this.tableData.splice(this.currentRowIndex, 1, {
...this.currentRow,
...this.form,
});
} }
}); });
}, },
...@@ -207,17 +169,27 @@ export default { ...@@ -207,17 +169,27 @@ export default {
/**重置表单 */ /**重置表单 */
resetForm() { resetForm() {
this.form = { this.form = {
quantity: "", stdWorkingTime: "",
unitOfMeasure: "", workstationId: "",
scrapPercentage: "", workstationName: "",
alternativeGroup: "",
alternativePriorities: "",
alternativeStrategy: "",
alternativeProbability: "",
bomItemRemark: "",
itemRemark: "",
}; };
}, },
/**重置组件状态 */
resetState() {
this.resetForm();
this.tableData = [];
},
// 查询工作站信息
handleWorkstationSelect() {
this.$refs.WorkstationSelect.showFlag = true;
},
onWorkstationSelected(row) {
if (row != undefined && row != null) {
this.form.workstationId = row.workstationId;
this.form.workstationName = row.workstationName;
this.form.stdWorkingTime = row.stdWorkingTime;
}
},
}, },
}; };
</script> </script>
......
...@@ -182,27 +182,7 @@ ...@@ -182,27 +182,7 @@
:formatter="yesNoFmt"/> :formatter="yesNoFmt"/>
<el-table-column label="是否禁用" align="center" prop="isDisabled" <el-table-column label="是否禁用" align="center" prop="isDisabled"
:formatter="yesNoFmt"/> :formatter="yesNoFmt"/>
<!-- <template slot-scope="scope">
<dict-tag
:options="dict.type.sys_yes_no"
:value="scope.row.isNeedShoeImg"
/>
</template> -->
<!-- <dict-tag
:options="dict.type.sys_yes_no"
:value="scope.row.isNeedPrototype"
/>
<dict-tag
:options="dict.type.sys_yes_no"
:value="scope.row.isConsiderColor"
/>
<dict-tag
:options="dict.type.sys_yes_no"
:value="scope.row.enableFlag"
/>
<dict-tag
:options="dict.type.sys_yes_no"
:value="scope.row.isDisabled" -->
/> />
<el-table-column <el-table-column
label="申请单状态" label="申请单状态"
...@@ -431,7 +411,7 @@ ...@@ -431,7 +411,7 @@
this.reset(); this.reset();
const productionRequestId = row.productionRequestId || this.ids; const productionRequestId = row.productionRequestId || this.ids;
this.$router.push( this.$router.push(
"/mes/proofing/info?productionRequestId=" + productionRequestId "/mes/pro/productiorequest/info?productionRequestId=" + productionRequestId
); );
// getproductionRequest(productionRequestId).then((response) => { // getproductionRequest(productionRequestId).then((response) => {
// this.form = response.data; // this.form = response.data;
...@@ -511,7 +491,10 @@ ...@@ -511,7 +491,10 @@
// 生成制作单 // 生成制作单
generate(row) { generate(row) {
// 跳转到制作单界面 // 跳转到制作单界面
this.$router.push("/mes/proofing/apply"); const prototypeRequestId = row.productionRequestId || this.ids;
this.$router.push(
"/mes/pro/productionMake/apply?productionRequestId=" + prototypeRequestId
);
return; return;
}, },
}; };
......
...@@ -344,7 +344,6 @@ ...@@ -344,7 +344,6 @@
.then((res) => { .then((res) => {
this.loading = false; this.loading = false;
this.$modal.msgSuccess("提交成功!"); this.$modal.msgSuccess("提交成功!");
// 关闭页签 // 关闭页签
tabPlugins.closeOpenPage(); tabPlugins.closeOpenPage();
}) })
......
...@@ -359,6 +359,7 @@ export default { ...@@ -359,6 +359,7 @@ export default {
.then(() => { .then(() => {
this.loading = false; this.loading = false;
this.$modal.msgSuccess("提交成功!"); this.$modal.msgSuccess("提交成功!");
getFormInfo();
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment