Commit 728ea620 authored by 李驰骋's avatar 李驰骋

量产制作代码调整

parent 70407814
import request from '@/utils/request'
import request from "@/utils/request";
// 查询量产制作列表
// 查询样品制作单列表
export function listProductionMake(query) {
return request({
url: '/pro/productionMake/list',
method: 'get',
params: query
})
url: "/mes/pro/productionMake/list",
method: "get",
params: query,
});
}
// 查询量产制作详细
// 查询样品制作单详细
export function getProductionMake(productionMakeId) {
return request({
url: '/pro/productionMake/' + productionMakeId,
method: 'get'
})
url: "/mes/pro/productionMake/" + productionMakeId,
method: "get",
});
}
// 新增量产制作
// 新增样品制作单
export function addProductionMake(data) {
return request({
url: '/pro/productionMake',
method: 'post',
data: data
})
url: "/mes/pro/productionMake",
method: "post",
data: data,
});
}
// 修改量产制作
// 修改样品制作单
export function updateProductionMake(data) {
return request({
url: '/pro/productionMake',
method: 'put',
data: data
})
url: "/mes/pro/productionMake",
method: "put",
data: data,
});
}
// 删除量产制作
// 删除样品制作单
export function delProductionMake(productionMakeId) {
return request({
url: '/pro/productionMake/' + productionMakeId,
method: 'delete'
})
url: "/mes/pro/productionMake/" + productionMakeId,
method: "delete",
});
}
// 修改状态
export function dofinish(data) {
return request({
url: "/mes/pro/productionMake/modifyState",
method: "put",
data: data,
});
}
import request from "@/utils/request";
// 查询打样申请列表
// 查询量产申请列表
export function listProductionRequest(query) {
return request({
url: "/mes/pro/productionRequest/list",
......@@ -9,7 +9,7 @@ export function listProductionRequest(query) {
});
}
// 查询打样申请详细
// 查询量产申请详细
export function getProductionRequest(productionRequestId) {
return request({
url: "/mes/pro/productionRequest/" + productionRequestId,
......@@ -17,7 +17,7 @@ export function getProductionRequest(productionRequestId) {
});
}
// 新增打样申请
// 新增量产申请
export function addProductionRequest(data) {
return request({
url: "/mes/pro/productionRequest",
......@@ -26,7 +26,7 @@ export function addProductionRequest(data) {
});
}
// 修改打样申请
// 修改量产申请
export function updateProductionRequest(data) {
return request({
url: "/mes/pro/productionRequest",
......@@ -35,7 +35,7 @@ export function updateProductionRequest(data) {
});
}
// 删除打样申请
// 删除量产申请
export function delProductionRequest(productionRequestId) {
return request({
url: "/mes/pro/productionRequest/" + productionRequestId,
......@@ -46,7 +46,7 @@ export function delProductionRequest(productionRequestId) {
// 修改状态
export function dofinish(data) {
return request({
url: "/mes/pro/productionRequest/modifyState/",
url: "/mes/pro/productionRequest/modifyState",
method: "put",
data: data,
});
......
......@@ -295,14 +295,15 @@ export default {
},
/**表单提交 */
submitForm() {
let thisObj = this;
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.optType == "add") {
this.tableData.unshift({ ...this.form });
if (thisObj.optType == "add") {
thisObj.tableData.unshift({ ...thisObj.form });
} 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 @@
@keyup.enter.native="handleQuery"
/>
</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-button
type="primary"
......@@ -70,7 +39,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['mes:pro:prototypeRequest:add']"
v-hasPermi="['mes:pro:productionMake:add']"
>新增</el-button
>
</el-col>
......@@ -82,7 +51,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['mes:pro:prototypeRequest:edit']"
v-hasPermi="['mes:pro:productionMake:edit']"
>修改</el-button
>
</el-col>
......@@ -94,7 +63,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['mes:pro:prototypeRequest:remove']"
v-hasPermi="['mes:pro:productionMake:remove']"
>删除</el-button
>
</el-col>
......@@ -105,7 +74,7 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['mes:pro:prototypeRequest:export']"
v-hasPermi="['mes:pro:productionMake:export']"
>导出</el-button
>
</el-col>
......@@ -117,10 +86,21 @@
<el-table
v-loading="loading"
:data="prototypeRequestList"
row-key="prototypeMakeId"
:data="productionMakeList"
row-key="productionMakeId"
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
label="产品名称"
width="120"
......@@ -140,62 +120,22 @@
/>
<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="shoeImg" />
<el-table-column label="产品背面" width="120" align="center" prop="prototype" />
<el-table-column label="制作单状态" width="120" align="center" prop="productionMakeStatus" />
<!-- <el-table-column label="列" width="120" align="center" prop="col" />
<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 label="产品正面" width="120" align="center" prop="frontImg" />
<el-table-column label="产品背面" width="120" align="center" prop="backImg" />
<el-table-column label="测试标准" align="center" prop="testStandard" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column
label="版面需求时间"
label="制作单状态"
align="center"
prop="plannedLayoutDate"
width="180"
prop="productionMakeStatus"
>
<template slot-scope="scope">
<span>{{
parseTime(scope.row.plannedLayoutDate, "{y}-{m}-{d}")
}}</span>
<dict-tag
:options="dict.type.mes_productionMake_status"
:value="scope.row.productionMakeStatus"
/>
</template>
</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
label="操作"
width="200px"
......@@ -207,28 +147,37 @@
size="mini"
type="text"
icon="el-icon-edit"
v-if="scope.row.prototypeRequestStatus == '审批中'"
v-if="scope.row.productionMakeStatus == 0"
@click="handleUpdate(scope.row)"
v-hasPermi="['mes:pro:prototypeRequest:edit']"
v-hasPermi="['mes:pro:productionMake:edit']"
>修改</el-button
>
<!-- <el-button
<el-button
size="mini"
type="text"
icon="el-icon-circle-check"
v-if="scope.row.prototypeRequestStatus == '审批中'"
v-if="scope.row.productionMakeStatus == 0"
@click="handleFinish(scope.row)"
v-hasPermi="['mes:pro:prototypeRequest:update']"
v-hasPermi="['mes:pro:productionMake:update']"
>完成</el-button
> -->
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:pro:prototypeRequest:remove']"
v-hasPermi="['mes:pro:productionMake:remove']"
>删除</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>
</el-table-column>
</el-table>
......@@ -240,305 +189,24 @@
@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>
</template>
<script>
import {
listPrototypeRequest,
getPrototypeRequest,
delPrototypeRequest,
addPrototypeRequest,
updatePrototypeRequest,
} from "@/api/mes/pro/prototypeRequest";
import ItemSelect from "@/components/itemSelect/single.vue";
import ClientSelect from "@/components/clientSelect/single.vue";
import VendorSelect from "@/components/vendorSelect/single.vue";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
// 新增js
import { listPrototypeMake, getPrototypeMake, delPrototypeMake, addPrototypeMake, updatePrototypeMake } from "@/api/mes/pro/prototypeMake";
import { listProductionMake, getProductionMake, delProductionMake, addProductionMake, updateProductionMake } from "@/api/mes/pro/productionMake";
import { listProductionMake, getProductionMake, delProductionMake, addProductionMake, dofinish } from "@/api/mes/pro/productionMake";
export default {
name: "PrototypeRequest",
name: "ProductionMake",
dicts: [
"mes_order_status",
"mes_prototypeRequest_sourcetype",
"mes_prototypeRequest_type",
"mes_productionMake_sourcetype",
"mes_productionMake_type",
"mes_productionMake_status"
],
components: {
Treeselect,
......@@ -564,9 +232,9 @@ export default {
// 非多个禁用
multiple: true,
// 生产工单表格数据
prototypeRequestList: [],
productionMakeList: [],
// 生产工单树选项
prototypeRequestOptions: [],
productionMakeOptions: [],
// 弹出层标题
title: "",
// 是否显示弹出层
......@@ -576,12 +244,12 @@ export default {
pageNum: 1,
pageSize: 10,
itemName: null,// 可以查简称与英文名
prototypeRequestStatus: null,
productionMakeStatus: null,
},
options: [
{ value: "审批中", label: "审批中" },
{ value: "待制作", label: "待制作" },
{ value: "打样中", label: "打样中" },
{ value: "制造中", label: "制造中" },
{ value: "待质检", label: "待质检" },
{ value: "待确认", label: "待确认" },
{ value: "已完成", label: "已完成" },
......@@ -591,7 +259,7 @@ export default {
form: {},
// 表单校验
rules: {
// prototypeRequestCode: [
// productionMakeCode: [
// { required: true, message: "工单编码不能为空", trigger: "blur" }
// ],
},
......@@ -604,8 +272,8 @@ export default {
/** 查询生产工单列表 */
getList() {
this.loading = true;
listPrototypeRequest(this.queryParams).then((response) => {
this.prototypeRequestList = response.rows;
listProductionMake(this.queryParams).then((response) => {
this.productionMakeList = response.rows;
this.total = response.total;
this.loading = false;
});
......@@ -618,47 +286,41 @@ export default {
// 表单重置
reset() {
this.form = {
prototypeMakeId: null,
prototypeMakeCode: null,
prototypeMakeId: null,
routeId: null,
itemId: null,
screenItem: null,
pibanItem: null,
diecuttingItem: null,
standardColor: null,
module: null,
col: null,
row: null,
buttstrapNum: null,
coldoubleCutspacing: null,
rowdoubleCutspacing: null,
sendworkMultiple: null,
printingPaperlenth: null,
printPaperwidth: null,
frontColorId: null,
oppositeColorId: null,
ngReason: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
screenItem: null,
pibanItem: null,
diecuttingItem: null,
standardColor: null,
module: null,
col: null,
row: null,
buttstrapNum: null,
coldoubleCutspacing: null,
rowdoubleCutspacing: null,
sendworkMultiple: null,
printingPaperlenth: null,
printPaperwidth: null,
frontColorId: null,
oppositeColorId: null,
ngReason: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
//新增产量制作单
productionMakeId: null,
productionMakeCode: null,
productionRequestId: null,
itemId: null,
routeId: null,
identifyingPeople: null,
identifyingDate: null,
printingFrontcolor: null,
printingBackcolor: null,
shoeimg: null,
prototype: null,
productionMakeStatus: null,
remark: null
//新增产量制作单
productionMakeId: null,
productionMakeCode: null,
productionRequestId: null,
itemId: null,
routeId: null,
identifyingPeople: null,
identifyingDate: null,
printingFrontcolor: null,
printingBackcolor: null,
shoeImg: null,
prototype: null,
productionMakeStatus: null,
remark: null
};
this.resetForm("form");
},
......@@ -677,77 +339,29 @@ remark: null
// 跳转到申请单界面
this.$router.push("/mes/pro/productionMake/apply");
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) {
this.reset();
const prototypeMakeId = row.prototypeMakeId || this.ids;
const productionMakeId = row.productionMakeId || this.ids;
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) {
this.reset();
const prototypeMakeId = row.prototypeMakeId || this.ids;
const productionMakeId = row.productionMakeId || this.ids;
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) {
this.$modal
.confirm('是否确认删除编号为"' + row.prototypeMakeId + '"的打样制作单?')
.confirm('是否确认删除编号为"' + row.productionMakeCode + '"的量产制作单?')
.then(function () {
return delPrototypeRequest(row.prototypeMakeId);
return delProductionMake(row.productionMakeId);
})
.then(() => {
this.getList();
......@@ -765,72 +379,41 @@ remark: null
/** 导出按钮操作 */
handleExport() {
this.download(
"mes/pro/prototypeRequest/export",
"mes/pro/productionMake/export",
{
...this.queryParams,
},
`打样申请单_${new Date().getTime()}.xlsx`
`量产申请单_${new Date().getTime()}.xlsx`
);
},
// // 审批通过
// handleConfirm(){
// let that = this;
// this.$modal.confirm('是确认完成工单编制?【确认后将不能更改】').then(function(){
// that.form.status = '待制作';
// that.submitForm();
// });
// },
// // 审批
// handleFinish(row){
// const prototypeMakeIds = row.prototypeMakeId || this.ids;
// this.$modal.confirm('确认完成工单?一旦完成,此工单将无法继续报工').then(function() {
// return dofinish(prototypeMakeIds) //完成工单
// }).then(() => {
// this.getList();
// this.$modal.msgSuccess("更改成功");
// }).catch(() => {});
// },
// //物料选择弹出框
// onItemSelected(obj) {
// if (obj != undefined && obj != null) {
// this.form.productId = obj.itemId;
// this.form.productCode = obj.itemCode;
// this.form.productName = obj.itemName;
// this.form.productSpc = obj.specification;
// this.form.unitOfMeasure = obj.unitOfMeasure;
// }
// },
// //客户选择弹出框
// 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;
// }
// },
// 审批
handleFinish(row) {
row.productionMakeStatus = 1;
this.$modal
.confirm("确认通过量产制作单?一旦确认,此工单将无法继续修改")
.then(function () {
return dofinish(row); //完成申请单审批
})
.then(() => {
this.getList();
this.$modal.msgSuccess("审批成功");
})
.catch(() => {});
},
handleStartMake(row) {
row.productionMakeStatus = 2;
this.$modal
.confirm("确认通过量产制作单?一旦确认,此工单将无法继续修改")
.then(function () {
return dofinish(row); //完成申请单审批
})
.then(() => {
this.getList();
this.$modal.msgSuccess("审批成功");
})
.catch(() => {});
},
},
};
</script>
......@@ -44,6 +44,7 @@
slot="append"
icon="el-icon-search"
@click="$refs['ItemSelectRef'].showFlag = true"
v-if="false"
></el-button>
</el-input>
<ItemSelect ref="ItemSelectRef" @onSelected="onItemSelect" />
......@@ -60,6 +61,7 @@
slot="append"
icon="el-icon-search"
@click="$refs['RoutesProcessSelectRef'].showFlag = true"
v-if="false"
></el-button>
</el-input>
<RoutesProcessSelect
......@@ -70,23 +72,6 @@
</el-col>
</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-form-item label="印刷正面颜色" prop="printingFrontcolor">
<el-input v-model="form.printingFrontcolor" placeholder="请输入印刷正面颜色">
......@@ -102,211 +87,23 @@
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="产品正面" prop="shoeImg">
<el-form-item label="产品正面" prop="frontImg">
<el-input
v-model="form.shoeImg"
v-model="form.frontImg"
placeholder="请选择产品正面"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="产品背面" prop="prototype">
<el-form-item label="产品背面" prop="backImg">
<el-input
v-model="form.prototype"
v-model="form.backImg"
placeholder="请输入产品背面"
></el-input>
</el-form-item>
</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-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";
import RoutesProcessSelect from "@/components/routesProcessSelect/index.vue";
import { listRouteprocess } from "@/api/mes/pro/routeprocess";
import { closeOpenPage } from "@/plugins/tab";
import {
addPrototypeRequest,
getPrototypeRequest,
updatePrototypeRequest,
} from "@/api/mes/pro/prototypeRequest";
//新增方法的js
import { listProductionMake, getProductionMake, delProductionMake, addProductionMake, updateProductionMake } from "@/api/mes/pro/productionMake";
import { getProductionRequest } from "@/api/mes/pro/productionRequest";
export default {
components: { ProogingBom, ProogingProcess, ItemSelect, RoutesProcessSelect },
......@@ -383,25 +176,21 @@ export default {
plannedLayoutDate: "",
testStandard: "",
remark: "",
//量产制作单参数(注意修改---------------------------------------------------------)
productionMakeId: null,
productionMakeCode: null,
productionRequestId: null,
itemId: null,
routeId: null,
identifyingPeople: null,
identifyingDate: null,
printingFrontcolor: null,
printingBackcolor: null,
shoeimg: null,
prototype: null,
productionMakeStatus: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
//量产制作单参数(注意修改---------------------------------------------------------)
productionMakeId: null,
productionMakeCode: null,
productionRequestId: null,
identifyingPeople: null,
identifyingDate: null,
printingFrontcolor: null,
printingBackcolor: null,
shoeimg: null,
prototype: null,
productionMakeStatus: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
},
rules: {},
};
......@@ -438,7 +227,20 @@ updateTime: null
this.bomList = 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(() => {
this.loading = false;
......@@ -490,7 +292,7 @@ updateTime: null
};
this.loading = true;
if (this.mode == "apply") {
addPrototypeRequest(params)
addProductionMake(params)
.then((res) => {
this.loading = false;
this.$modal.msgSuccess("提交成功!");
......@@ -502,7 +304,7 @@ updateTime: null
this.loading = false;
});
} else {
updatePrototypeRequest(params)
updateProductionMake(params)
.then(() => {
this.loading = false;
this.$modal.msgSuccess("提交成功!");
......@@ -530,23 +332,20 @@ updateTime: null
plannedLayoutDate: "",
testStandard: "",
remark: "",
//量产制作单参数(注意修改---------------------------------------------------------)
productionMakeId: null,
productionMakeCode: null,
productionRequestId: null,
itemId: null,
routeId: null,
identifyingPeople: null,
identifyingDate: null,
printingFrontcolor: null,
printingBackcolor: null,
shoeimg: null,
prototype: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
//量产制作单参数(注意修改---------------------------------------------------------)
productionMakeId: null,
productionMakeCode: null,
productionRequestId: null,
identifyingPeople: null,
identifyingDate: null,
printingFrontcolor: null,
printingBackcolor: null,
shoeimg: null,
prototype: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.$refs["ProogingBomRef"].resetState();
this.$refs["ProogingProcessRef"].resetState();
......
......@@ -146,9 +146,9 @@ export default {
};
},
computed: {
title () {
return '设置' + this.process.itemName + '物料'
}
title() {
return "设置" + this.process.itemName + "物料";
},
},
watch: {
process: {
......@@ -216,7 +216,9 @@ export default {
},
/** 提交编辑关联信息 */
submitEditConnect() {
this.tableData.splice(this.currentRowIdx, 1, this.form);
this.tableData.splice(this.currentRowIdx, 1, {
...this.form,
});
this.editConnectVisible = false;
},
},
......
<template>
<div>
<el-row :gutter="10" class="mb8">
<el-row :gutter="10" class="mb8" v-if="mode != 'info'">
<el-col :span="1.5">
<el-button
type="primary"
......@@ -85,7 +85,12 @@
prop="itemRemark"
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 }">
<el-button
type="text"
......@@ -116,11 +121,11 @@
>
<el-row>
<el-col :span="24">
<el-form-item label="产品" prop="itemId">
<el-form-item label="物料" prop="itemId">
<el-input
v-model="form.itemName"
readonly
placeholder="请选择产品"
placeholder="请选择物料"
>
<el-button
slot="append"
......@@ -232,7 +237,7 @@ export default {
rules: {},
/**多选 */
selection: [],
optType: 'add',
optType: "add",
/**表单初始化数据 */
form: {
quantity: "",
......@@ -247,7 +252,7 @@ export default {
bomItemRemark: "",
itemRemark: "",
},
currentRowIdx: undefined
currentRowIdx: undefined,
};
},
created() {},
......@@ -262,13 +267,13 @@ export default {
handleAdd() {
this.resetForm();
this.showFlag = true;
this.optType = 'add'
this.optType = "add";
},
/**更新行 */
updateRow(row, idx) {
Object.assign(this.form, row);
this.currentRowIdx = idx
this.optType = 'edit'
this.currentRowIdx = idx;
this.optType = "edit";
this.showFlag = true;
},
/**删除行 */
......@@ -284,7 +289,8 @@ export default {
if (row != undefined && row != null) {
this.form.itemId = row.itemId;
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 {
itemRemark: "",
};
},
/**重置组件状态 */
resetState() {
this.resetForm();
this.tableData = [];
},
/**获取组件数据 */
getComData() {
return this.tableData;
......
......@@ -8,9 +8,15 @@
prop="linkType"
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="操作" align="center" width="150">
<el-table-column
v-if="mode != 'info'"
label="操作"
align="center"
width="150"
>
<template slot-scope="{ row, $index }">
<el-button
type="text"
......@@ -42,7 +48,7 @@
v-dialogDrag
:visible.sync="showFlag"
width="800px"
title="添加工序"
title="工序修改"
>
<el-form
ref="form"
......@@ -54,75 +60,31 @@
>
<el-row>
<el-col :span="12">
<el-form-item label="组件数量" prop="quantity">
<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-form-item label="工作站" prop="workstationId">
<el-input
v-model="form.alternativeProbability"
placeholder="请输入使用概率"
></el-input>
v-model="form.workstationName"
disabled
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-col>
<el-col :span="12">
<el-form-item label="BOM行备注" prop="bomItemRemark">
<el-form-item label="标准工时" prop="stdWorkingTime">
<el-input
v-model="form.bomItemRemark"
placeholder="请输入BOM行备注"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料备注" prop="itemRemark">
<el-input
v-model="form.itemRemark"
placeholder="请输入物料备注"
type="number"
v-model="form.stdWorkingTime"
placeholder="请输入标准工时"
></el-input>
</el-form-item>
</el-col>
......@@ -139,8 +101,10 @@
<script>
import ItemBomSelect from "@/components/itemBomSelect/single.vue";
import ProcessProd from "./ProcessProd.vue";
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue";
export default {
components: { ItemBomSelect, ProcessProd },
components: { ItemBomSelect, ProcessProd, WorkstationSelect },
inject: ["mode"],
props: {
bomList: {
type: Array,
......@@ -157,15 +121,9 @@ export default {
rules: {},
/**表单初始化数据 */
form: {
quantity: "",
unitOfMeasure: "",
scrapPercentage: "",
alternativeGroup: "",
alternativePriorities: "",
alternativeStrategy: "",
alternativeProbability: "",
bomItemRemark: "",
itemRemark: "",
stdWorkingTime: "",
workstationId: "",
workstationName: "",
},
currentRow: {},
currentRowIndex: undefined,
......@@ -173,9 +131,9 @@ export default {
},
methods: {
setList(rows) {
this.tableData = rows.map(item => {
item.processItemList = []
return item
this.tableData = rows.map((item) => {
item.processItemList = [];
return item;
});
},
/** 更新工序的物料信息 */
......@@ -198,6 +156,10 @@ export default {
this.$refs["form"].validate((valid) => {
if (valid) {
this.showFlag = false;
this.tableData.splice(this.currentRowIndex, 1, {
...this.currentRow,
...this.form,
});
}
});
},
......@@ -207,17 +169,27 @@ export default {
/**重置表单 */
resetForm() {
this.form = {
quantity: "",
unitOfMeasure: "",
scrapPercentage: "",
alternativeGroup: "",
alternativePriorities: "",
alternativeStrategy: "",
alternativeProbability: "",
bomItemRemark: "",
itemRemark: "",
stdWorkingTime: "",
workstationId: "",
workstationName: "",
};
},
/**重置组件状态 */
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>
......
......@@ -182,27 +182,7 @@
:formatter="yesNoFmt"/>
<el-table-column label="是否禁用" align="center" prop="isDisabled"
: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
label="申请单状态"
......@@ -431,7 +411,7 @@
this.reset();
const productionRequestId = row.productionRequestId || this.ids;
this.$router.push(
"/mes/proofing/info?productionRequestId=" + productionRequestId
"/mes/pro/productiorequest/info?productionRequestId=" + productionRequestId
);
// getproductionRequest(productionRequestId).then((response) => {
// this.form = response.data;
......@@ -511,7 +491,10 @@
// 生成制作单
generate(row) {
// 跳转到制作单界面
this.$router.push("/mes/proofing/apply");
const prototypeRequestId = row.productionRequestId || this.ids;
this.$router.push(
"/mes/pro/productionMake/apply?productionRequestId=" + prototypeRequestId
);
return;
},
};
......
......@@ -344,7 +344,6 @@
.then((res) => {
this.loading = false;
this.$modal.msgSuccess("提交成功!");
// 关闭页签
tabPlugins.closeOpenPage();
})
......
......@@ -359,6 +359,7 @@ export default {
.then(() => {
this.loading = false;
this.$modal.msgSuccess("提交成功!");
getFormInfo();
})
.catch(() => {
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