Commit 97f661ca authored by hiyonx's avatar hiyonx

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

parents 337c7d83 631cb859
...@@ -32,3 +32,4 @@ pnpm-debug.log* ...@@ -32,3 +32,4 @@ pnpm-debug.log*
/.vscode/ /.vscode/
/.history/ /.history/
/svn clear.bat /svn clear.bat
package-lock.json
...@@ -3,7 +3,7 @@ import request from '@/utils/request' ...@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询生产方案列表 // 查询生产方案列表
export function listProductionSolution(query) { export function listProductionSolution(query) {
return request({ return request({
url: '/mes/pro/productionSolution/list', url: 'pro/productionSolution/list',
method: 'get', method: 'get',
params: query params: query
}) })
...@@ -12,7 +12,7 @@ export function listProductionSolution(query) { ...@@ -12,7 +12,7 @@ export function listProductionSolution(query) {
// 查询生产方案详细 // 查询生产方案详细
export function getProductionSolution(productionSolutionId) { export function getProductionSolution(productionSolutionId) {
return request({ return request({
url: '/mes/pro/productionSolution/' + productionSolutionId, url: 'pro/productionSolution/' + productionSolutionId,
method: 'get' method: 'get'
}) })
} }
...@@ -20,7 +20,7 @@ export function getProductionSolution(productionSolutionId) { ...@@ -20,7 +20,7 @@ export function getProductionSolution(productionSolutionId) {
// 新增生产方案 // 新增生产方案
export function addProductionSolution(data) { export function addProductionSolution(data) {
return request({ return request({
url: '/mes/pro/productionSolution', url: 'pro/productionSolution',
method: 'post', method: 'post',
data: data data: data
}) })
...@@ -29,7 +29,7 @@ export function addProductionSolution(data) { ...@@ -29,7 +29,7 @@ export function addProductionSolution(data) {
// 修改生产方案 // 修改生产方案
export function updateProductionSolution(data) { export function updateProductionSolution(data) {
return request({ return request({
url: '/mes/pro/productionSolution', url: 'pro/productionSolution',
method: 'put', method: 'put',
data: data data: data
}) })
...@@ -38,7 +38,7 @@ export function updateProductionSolution(data) { ...@@ -38,7 +38,7 @@ export function updateProductionSolution(data) {
// 删除生产方案 // 删除生产方案
export function delProductionSolution(productionSolutionId) { export function delProductionSolution(productionSolutionId) {
return request({ return request({
url: '/mes/pro/productionSolution/' + productionSolutionId, url: 'pro/productionSolution/' + productionSolutionId,
method: 'delete' method: 'delete'
}) })
} }
...@@ -58,3 +58,11 @@ export function dofinish(workorderId){ ...@@ -58,3 +58,11 @@ export function dofinish(workorderId){
method: 'put' method: 'put'
}) })
} }
//单个完成工单,将草稿->已确认
export function confirmedWorkorder(workorderId){
return request({
url: '/mes/pro/workorder/setStatus/'+workorderId,
method: 'get'
})
}
\ No newline at end of file
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
v-if="showFlag" v-if="showFlag"
:visible.sync="showFlag" :visible.sync="showFlag"
:modal="true" :modal="true"
width="80%" width="900"
append-to-body
center center
> >
<el-form <el-form
...@@ -31,16 +32,16 @@ ...@@ -31,16 +32,16 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="工装夹具类型" prop="toolTypeId"> <!-- <el-form-item label="工装夹具类型" prop="toolTypeId">-->
<el-select v-model="form.toolTypeId" placeholder="请选择类型"> <!-- <el-select v-model="form.toolTypeId" placeholder="请选择类型">-->
<el-option <!-- <el-option-->
v-for="dict in toolTypeOptions" <!-- v-for="dict in toolTypeOptions"-->
:key="dict.toolTypeId" <!-- :key="dict.toolTypeId"-->
:label="dict.toolTypeName" <!-- :label="dict.toolTypeName"-->
:value="dict.toolTypeId" <!-- :value="dict.toolTypeId"-->
></el-option> <!-- ></el-option>-->
</el-select> <!-- </el-select>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="品牌" label-width="60px" prop="brand"> <el-form-item label="品牌" label-width="60px" prop="brand">
<el-input <el-input
v-model="queryParams.brand" v-model="queryParams.brand"
...@@ -101,6 +102,22 @@ ...@@ -101,6 +102,22 @@
> >
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="编号" align="center" prop="toolCode" >
</el-table-column>
<el-table-column label="名称" align="center" prop="toolName" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-button
type="text"
@click="handleView(scope.row)"
v-hasPermi="['mes:tm:tool:query']"
>{{scope.row.toolName}}</el-button>
</template>
</el-table-column>
<el-table-column label="品牌" align="center" prop="brand" :show-overflow-tooltip="true"/>
<el-table-column label="型号" align="center" prop="spec" :show-overflow-tooltip="true"/>
<el-table-column label="类型" align="center" prop="toolTypeName" />
<el-table-column label="库存数量" align="center" prop="quantity" />
<el-table-column label="可用数量" align="center" prop="quantityAvail" />
</el-table> </el-table>
<pagination <pagination
......
...@@ -5,13 +5,14 @@ ...@@ -5,13 +5,14 @@
:visible.sync="showFlag" :visible.sync="showFlag"
:modal="true" :modal="true"
width="80%" width="80%"
append-to-body
center center
> >
<el-form <el-form
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
size="small" size="small"
:inline="true" inline
v-show="showSearch" v-show="showSearch"
label-width="110px" label-width="110px"
> >
......
...@@ -290,6 +290,7 @@ export default { ...@@ -290,6 +290,7 @@ export default {
itemName: null, // 可以查简称与英文名 itemName: null, // 可以查简称与英文名
brandQuotationName: null, brandQuotationName: null,
brandName: null, brandName: null,
amount: null,
}, },
options: [ options: [
// { value: null, label: "全部订单" }, // { value: null, label: "全部订单" },
...@@ -346,6 +347,7 @@ export default { ...@@ -346,6 +347,7 @@ export default {
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
amount: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<el-row> <el-row>
<el-col :md="6" :sm="12" :xs="12"> <el-col :md="6" :sm="12" :xs="12">
<el-form-item prop="brandQuotationCode"> <el-form-item prop="brandQuotationCode">
<template slot="label"> 品牌报价单编码 </template> <template slot="label"> 编码 </template>
<el-input <el-input
disabled disabled
v-model="form.brandQuotationCode" v-model="form.brandQuotationCode"
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</el-col> </el-col>
<el-col :md="6" :sm="12" :xs="12"> <el-col :md="6" :sm="12" :xs="12">
<el-form-item label="品牌报价单名称" prop="brandQuotationName"> <el-form-item label="名称" prop="brandQuotationName">
<el-input <el-input
v-model="form.brandQuotationName" v-model="form.brandQuotationName"
placeholder="请输入品牌报价单名称" placeholder="请输入品牌报价单名称"
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
<el-form-item label="总金额" prop="amount"> <el-form-item label="总金额" prop="amount">
<el-input-money <el-input-money
v-model="form.amount" v-model="form.amount"
placeholder="请输入总金额"/> v-bind:disabled="form.brandQuotationId==0"
placeholder="新增时不可输入,请修改时操作"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="6"> <!-- <el-col :span="6">
...@@ -87,9 +88,7 @@ ...@@ -87,9 +88,7 @@
@onSelected="onBrandSelected" @onSelected="onBrandSelected"
></BrandSelect> ></BrandSelect>
</el-col> --> </el-col> -->
</el-row>
<el-row>
<el-col :md="6" :sm="12" :xs="12"> <el-col :md="6" :sm="12" :xs="12">
<el-form-item label="产品" prop="itemId"> <el-form-item label="产品" prop="itemId">
<el-input <el-input
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
> >
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="工作站" prop="workstationId"> <el-form-item label="工作站" prop="workstationName">
<el-input <el-input
v-model="form.workstationName" v-model="form.workstationName"
disabled disabled
...@@ -172,6 +172,7 @@ export default { ...@@ -172,6 +172,7 @@ export default {
stdWorkingTime: "", stdWorkingTime: "",
workstationId: "", workstationId: "",
workstationName: "", workstationName: "",
}; };
}, },
/**重置组件状态 */ /**重置组件状态 */
......
...@@ -8,27 +8,21 @@ ...@@ -8,27 +8,21 @@
v-show="showSearch" v-show="showSearch"
label-width="100px" label-width="100px"
> >
<el-form-item label="产品名称" prop="itemName"> <el-form-item label="生产方案名称" prop="productionSolutionName">
<el-input <el-input
v-model="queryParams.itemName" v-model="queryParams.itemName"
placeholder="请输入产品名称" placeholder="请输入方案名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="单据状态" prop="prototypeRequestStatus"> <el-form-item label="生产用途" prop="usageName">
<el-select <el-select
v-model="queryParams.prototypeRequestStatus" v-model="queryParams.prototypeRequestStatus"
clearable clearable
placeholder="请选择单据状态" placeholder="请输入生产用途"
@keyup.enter.native="usageName"
> >
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item label="样品名称" prop="abbreviation"> <!-- <el-form-item label="样品名称" prop="abbreviation">
...@@ -61,7 +55,7 @@ ...@@ -61,7 +55,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
...@@ -72,8 +66,8 @@ ...@@ -72,8 +66,8 @@
v-hasPermi="['mes:pro:prototypeRequest:add']" v-hasPermi="['mes:pro:prototypeRequest:add']"
>新增</el-button >新增</el-button
> >
</el-col> </el-col>-->
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
...@@ -84,8 +78,8 @@ ...@@ -84,8 +78,8 @@
v-hasPermi="['mes:pro:prototypeRequest:edit']" v-hasPermi="['mes:pro:prototypeRequest:edit']"
>修改</el-button >修改</el-button
> >
</el-col> </el-col>-->
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
plain plain
...@@ -96,8 +90,8 @@ ...@@ -96,8 +90,8 @@
v-hasPermi="['mes:pro:prototypeRequest:remove']" v-hasPermi="['mes:pro:prototypeRequest:remove']"
>删除</el-button >删除</el-button
> >
</el-col> </el-col> -->
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
plain plain
...@@ -107,83 +101,41 @@ ...@@ -107,83 +101,41 @@
v-hasPermi="['mes:pro:prototypeRequest:export']" v-hasPermi="['mes:pro:prototypeRequest:export']"
>导出</el-button >导出</el-button
> >
</el-col> </el-col> -->
<right-toolbar <!-- <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
@queryTable="getList" @queryTable="getList"
></right-toolbar> ></right-toolbar>
</el-row> </el-row> -->
<el-table <el-table v-loading="loading" :data="productionSolutionList" row-key="productionSolutionId" default-expand-all >
v-loading="loading" <el-table-column label="生产方案编码" prop="productionSolutionCode">
:data="prototypeRequestList"
row-key="prototypeRequestId"
default-expand-all
>
<el-table-column label="样品编码" width="180" prop="prototypeRequestCode">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@click="handleView(scope.row)" @click="handleView(scope.row)"
v-hasPermi="['mes:pro:prototypeRequest:query']" v-hasPermi="['mes:pro:productionSolutionCode:query']"
>{{ scope.row.prototypeRequestCode }}</el-button >{{ scope.row.productionSolutionCode }}</el-button
>
</template>
</el-table-column>
<el-table-column
label="产品名称"
width="120"
align="center"
prop="itemName"
:show-overflow-tooltip="true"
/>
<el-table-column label="工艺路线名称" align="center" prop="routeName">
</el-table-column>
<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="版面需求时间"
align="center"
prop="plannedLayoutDate"
width="180"
>
<template slot-scope="scope">
<span>{{
parseTime(scope.row.plannedLayoutDate, "{y}-{m}-{d}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="产品方案名称" align="center" prop="productionSolutionName" :show-overflow-tooltip="true"
label="申请单状态"
align="center"
prop="prototypeRequestStatus"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.mes_pr_status"
:value="scope.row.prototypeRequestStatus"
/> />
</template> <el-table-column label="生产用途" align="center" prop="usageName" />
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column <!-- <el-table-column label="备注" align="center" prop="usageName" width="180"/> -->
<!-- <el-table-column
label="操作" label="操作"
width="200px" width="200px"
align="center" align="center"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> /> -->
<template slot-scope="scope">
<!-- <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
...@@ -192,8 +144,8 @@ ...@@ -192,8 +144,8 @@
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['mes:pro:prototypeRequest:edit']" v-hasPermi="['mes:pro:prototypeRequest: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"
...@@ -201,16 +153,16 @@ ...@@ -201,16 +153,16 @@
@click="handleFinish(scope.row)" @click="handleFinish(scope.row)"
v-hasPermi="['mes:pro:prototypeRequest:update']" v-hasPermi="['mes:pro:prototypeRequest: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:prototypeRequest:remove']"
>删除</el-button >删除</el-button
> > -->
<el-button <!-- <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
...@@ -218,9 +170,9 @@ ...@@ -218,9 +170,9 @@
@click="generatea(scope.row)" @click="generatea(scope.row)"
v-hasPermi="['mes:pro:prototypeRequest:edit']" v-hasPermi="['mes:pro:prototypeRequest:edit']"
>生成制作单</el-button >生成制作单</el-button
> > -->
</template> <!-- </template> -->
</el-table-column> <!-- </el-table-column>-->
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
...@@ -230,17 +182,23 @@ ...@@ -230,17 +182,23 @@
@pagination="getList" @pagination="getList"
/> />
</div> </div>
</template> </template>
<script> <script>
import { import {
listPrototypeRequest, // listPrototypeRequest,
getPrototypeRequest, // getPrototypeRequest,
delPrototypeRequest, // delPrototypeRequest,
addPrototypeRequest, // addPrototypeRequest,
updatePrototypeRequest, // updatePrototypeRequest,
dofinish, // dofinish,
} from "@/api/mes/pro/prototypeRequest"; listProductionSolution,
getProductionSolution,
addProductionSolution,
updateProductionSolution,
delProductionSolution,
} from "@/api/mes/pro/productionSolution";
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";
...@@ -289,8 +247,17 @@ export default { ...@@ -289,8 +247,17 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
itemName: null, // 可以查简称与英文名 productionSolutionId: null, // 可以查简称与英文名
prototypeRequestStatus: null, productionSolutionCode: null,
productionSolutionName: null,
itemId: null,
routeId: null,
usageId: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
}, },
options: [ options: [
// { value: null, label: "全部订单" }, // { value: null, label: "全部订单" },
...@@ -319,8 +286,8 @@ export default { ...@@ -319,8 +286,8 @@ export default {
/** 查询生产工单列表 */ /** 查询生产工单列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listPrototypeRequest(this.queryParams).then((response) => { listProductionSolution(this.queryParams).then((response) => {
this.prototypeRequestList = response.rows; this.productionSolutionList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
...@@ -333,23 +300,12 @@ export default { ...@@ -333,23 +300,12 @@ export default {
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
prototypeRequestId: null, productionSolutionId: null,
prototypeRequestCode: null, productionSolutionCode: null,
productionSolutionName: null,
itemId: null, itemId: null,
itemName: null,
routeId: null, routeId: null,
routeName: null, usageId: null,
abbreviation: null,
enName: null,
num: null,
type: null,
modality: null,
surfaceTreatment: null,
ngReason: null,
plannedFinishDate: null,
plannedLayoutDate: null,
prototypeRequestStatus: null,
testStandard: null,
remark: null, remark: null,
createBy: null, createBy: null,
createTime: null, createTime: null,
...@@ -390,9 +346,9 @@ export default { ...@@ -390,9 +346,9 @@ export default {
// 查询明细按钮操作 // 查询明细按钮操作
handleView(row) { handleView(row) {
this.reset(); this.reset();
const prototypeRequestId = row.prototypeRequestId || this.ids; const productionSolutionId = row.productionSolutionId || this.ids;
this.$router.push( this.$router.push(
"/mes/proofing/info?prototypeRequestId=" + prototypeRequestId "/mes/pro/productionSolution/info?productionSolutionId=" + productionSolutionId
); );
// getprototypeRequest(prototypeRequestId).then((response) => { // getprototypeRequest(prototypeRequestId).then((response) => {
// this.form = response.data; // this.form = response.data;
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
{{ pageTitle }} {{ pageTitle }}
<!-- 申请按钮显示 --> <!-- 申请按钮显示 -->
<template slot="buttons" v-if="mode == 'apply'"> <template slot="buttons" v-if="mode == 'apply'">
<el-button size="mini" @click="resetForm">重置</el-button> <!-- <el-button size="mini" @click="resetForm">重置</el-button>
<el-button size="mini" type="primary" @click="saveForm">提交</el-button> <el-button size="mini" type="primary" @click="saveForm">提交</el-button> -->
</template> </template>
<!-- 修改 按钮显示 --> <!-- 修改 按钮显示 -->
<template slot="buttons" v-if="mode == 'edit'"> <template slot="buttons" v-if="mode == 'edit'">
<el-button size="mini" type="primary" @click="saveForm">提交</el-button> <!-- <el-button size="mini" type="primary" @click="saveForm">提交</el-button> -->
</template> </template>
</PageTitle> </PageTitle>
...@@ -23,143 +23,65 @@ ...@@ -23,143 +23,65 @@
label-width="8em" label-width="8em"
> >
<el-row> <el-row>
<el-col :md="8" :xs="12"> <el-col :md="12" :xs="12">
<el-form-item label="申请单编码" prop="prototypeRequestCode"> <el-form-item label="生产方法编码" prop="productionSolutionCode">
<el-input <el-input
v-model="form.productionSolutionCode"
disabled disabled
v-model="form.prototypeRequestCode" placeholder
placeholder="自动生成"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :xs="12">
<el-col :md="8" :xs="12" style="height: 50.5px"> <el-form-item label="生产方法名称" prop="productionSolutionName">
<el-form-item label="产品" prop="itemId">
<el-input
v-model="form.itemName"
readonly
placeholder="请选择产品"
>
<el-button
slot="append"
icon="el-icon-search"
@click="$refs['ItemSelectRef'].showFlag = true"
></el-button>
</el-input>
<ItemSelect ref="ItemSelectRef" @onSelected="onItemSelect" />
</el-form-item>
</el-col>
<el-col :md="8" :xs="12" style="height: 50.5px">
<el-form-item label="工艺路线" prop="routeId">
<el-input
v-model="form.routeName"
readonly
placeholder="请选择工艺路线"
>
<el-button
slot="append"
icon="el-icon-search"
@click="$refs['RoutesProcessSelectRef'].showFlag = true"
></el-button>
</el-input>
<RoutesProcessSelect
ref="RoutesProcessSelectRef"
@onSelected="onRoutesProcessSelect"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="8" :xs="12">
<el-form-item label="简称" prop="abbreviation">
<el-input
v-model="form.abbreviation"
placeholder="请输入简称"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="样品英文名" prop="enName">
<el-input
v-model="form.enName"
placeholder="请输入样品英文名称"
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="样品数量" prop="num">
<el-input v-model="form.num" 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="type">
<el-input <el-input
v-model="form.type" v-model="form.productionSolutionName"
placeholder="请选择打样形式" disabled
></el-input> placeholder
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="分配方式" prop="modality">
<el-input
v-model="form.modality"
placeholder="请选择分配方式"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="8" :xs="12"> <el-col :md="12" :xs="12">
<el-form-item label="表面处理" prop="surfaceTreatment"> <el-form-item label="产品名称" prop="itemName">
<el-input <el-input
v-model="form.surfaceTreatment" v-model="form.itemName"
placeholder="请输入表面处理" disabled
placeholder
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="8" :xs="12"> </el-row>
<el-form-item label="NG原因" prop="ngReason"> <el-row>
<el-col :md="12" :xs="12">
<el-form-item label="工艺路线" prop="routeName">
<el-input <el-input
v-model="form.ngReason" v-model="form.routeName"
placeholder="请输入NG原因" disabled
placeholder
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="8" :xs="12"> <el-col :md="12" :xs="12">
<el-form-item label="计划完成日期" prop="plannedFinishDate"> <el-form-item label="生产用途" prop="usageName">
<el-date-picker
value-format="yyyy-MM-dd"
v-model="form.plannedFinishDate"
placeholder="请输入计划完成日期"
></el-date-picker>
</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 <el-input
v-model="form.testStandard" v-model="form.usageName"
placeholder="测试标准" disabled
placeholder
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :md="24" :xs="12"> <el-col :md="24" :xs="12">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input <el-input
type="textarea" type="textarea"
:rows="3" :rows="3"
v-model="form.remark" v-model="form.remark"
placeholder="备注" disabled
placeholder
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -187,10 +109,11 @@ import RoutesProcessSelect from "@/components/routesProcessSelect/index.vue"; ...@@ -187,10 +109,11 @@ import RoutesProcessSelect from "@/components/routesProcessSelect/index.vue";
import { listRouteprocess } from "@/api/mes/pro/routeprocess"; import { listRouteprocess } from "@/api/mes/pro/routeprocess";
import tabPlugins from "@/plugins/tab"; import tabPlugins from "@/plugins/tab";
import { import {
addPrototypeRequest, // addPrototypeRequest,
getPrototypeRequest, // getPrototypeRequest,
updatePrototypeRequest, // updatePrototypeRequest,
} from "@/api/mes/pro/prototypeRequest"; getProductionSolution
} from "@/api/mes/pro/productionSolution";
export default { export default {
components: { ProogingBom, ProogingProcess, ItemSelect, RoutesProcessSelect }, components: { ProogingBom, ProogingProcess, ItemSelect, RoutesProcessSelect },
...@@ -206,23 +129,19 @@ export default { ...@@ -206,23 +129,19 @@ export default {
bomList: [], bomList: [],
// 表单参数 // 表单参数
form: { form: {
prototypeRequestCode: "", productionSolutionId: "",
productionSolutionCode: "",
productionSolutionName: "",
itemId: "", itemId: "",
itemName: "", itemName: "",
unit: "",
routeId: "", routeId: "",
routeName: "", routeName: "",
abbreviation: "", usageId: "",
enName: "",
num: "",
type: "",
modality: "",
surfaceTreatment: "",
ngReason: "",
plannedFinishDate: "",
plannedLayoutDate: "",
testStandard: "",
remark: "", remark: "",
createBy: "",
createTime: "",
updateBy: "",
updateTime: "",
}, },
rules: {}, rules: {},
}; };
...@@ -237,7 +156,7 @@ export default { ...@@ -237,7 +156,7 @@ export default {
pageTitle() { pageTitle() {
const titles = { const titles = {
edit: "打样单修改", edit: "打样单修改",
info: "打样单查看", info: "生产方案详情",
apply: "打样单申请", apply: "打样单申请",
}; };
return titles[this.mode]; return titles[this.mode];
...@@ -253,9 +172,9 @@ export default { ...@@ -253,9 +172,9 @@ export default {
/** 根据 id 获取页面数据 */ /** 根据 id 获取页面数据 */
getFormInfo() { getFormInfo() {
if (this.mode != "apply") { if (this.mode != "apply") {
const id = this.$route.query.prototypeRequestId; const id = this.$route.query.productionSolutionId;
this.loading = true; this.loading = true;
getPrototypeRequest(id) getProductionSolution(id)
.then(({ data }) => { .then(({ data }) => {
Object.assign(this.form, data); Object.assign(this.form, data);
this.bomList = data.bomList; this.bomList = data.bomList;
...@@ -338,21 +257,17 @@ export default { ...@@ -338,21 +257,17 @@ export default {
/**重置表单 */ /**重置表单 */
resetForm() { resetForm() {
this.form = { this.form = {
prototypeRequestCode: "", productionSolutionId: "",
productionSolutionCode: "",
productionSolutionName: "",
itemId: "", itemId: "",
itemName: "",
routeId: "", routeId: "",
abbreviation: "", usageId: "",
enName: "",
num: "",
type: "",
modality: "",
surfaceTreatment: "",
ngReason: "",
plannedFinishDate: "",
plannedLayoutDate: "",
testStandard: "",
remark: "", remark: "",
createBy: "",
createTime: "",
updateBy: "",
updateTime: "",
}; };
this.$refs["ProogingBomRef"].resetState(); this.$refs["ProogingBomRef"].resetState();
this.$refs["ProogingProcessRef"].resetState(); this.$refs["ProogingProcessRef"].resetState();
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
> >
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="工作站" prop="workstationId"> <el-form-item label="工作站" prop="workstationName">
<el-input <el-input
v-model="form.workstationName" v-model="form.workstationName"
disabled disabled
......
...@@ -153,12 +153,12 @@ ...@@ -153,12 +153,12 @@
prop="factoryName" prop="factoryName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <!-- <el-table-column
label="仓库" label="仓库"
align="center" align="center"
prop="warehouse" prop="warehouse"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> /> -->
<el-table-column <el-table-column
label="尺码组" label="尺码组"
align="center" align="center"
......
...@@ -359,7 +359,7 @@ export default { ...@@ -359,7 +359,7 @@ export default {
.then(() => { .then(() => {
this.loading = false; this.loading = false;
this.$modal.msgSuccess("提交成功!"); this.$modal.msgSuccess("提交成功!");
getFormInfo(); this.getFormInfo();
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
......
...@@ -243,25 +243,25 @@ ...@@ -243,25 +243,25 @@
<span>{{ parseTime(scope.row.requestDate, "{y}-{m}-{d}") }}</span> <span>{{ parseTime(scope.row.requestDate, "{y}-{m}-{d}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column
label="生产状态" label="生产状态"
align="center" align="center"
prop="status" prop="status"
width="120" width="120"
/> /> -->
<el-table-column label="备注" align="center" prop="remark" width="120" />
<el-table-column <el-table-column
label="操作" label="操作"
width="150px" width="150px"
align="center" align="center"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
fixed="right"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
v-if="scope.row.status == 'NORMARL'" v-if="scope.row.status == 'PREPARE'"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['mes:pro:protask:edit']" v-hasPermi="['mes:pro:protask:edit']"
>排产</el-button >排产</el-button
...@@ -289,7 +289,7 @@ ...@@ -289,7 +289,7 @@
<el-row> <el-row>
<el-col :lg="8" :md="8" :sm="12" :xs="12"> <el-col :lg="8" :md="8" :sm="12" :xs="12">
<el-form-item label="编号" prop="taskCode"> <el-form-item label="编号" prop="taskCode">
<el-input v-model="form.taskCode" readonly="readonly" disabled/> <el-input v-model="form.taskCode" readonly="readonly" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :lg="8" :md="8" :sm="12" :xs="12"> <el-col :lg="8" :md="8" :sm="12" :xs="12">
...@@ -299,24 +299,32 @@ ...@@ -299,24 +299,32 @@
</el-col> </el-col>
<el-col :lg="8" :md="8" :sm="12" :xs="12"> <el-col :lg="8" :md="8" :sm="12" :xs="12">
<el-form-item label="产品名称" prop="itemName"> <el-form-item label="产品名称" prop="itemName">
<el-input v-model="form.itemName" readonly="readonly" disabled/> <el-input v-model="form.itemName" readonly="readonly" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :lg="8" :md="8" :sm="12" :xs="12"> <el-col :lg="8" :md="8" :sm="12" :xs="12">
<el-form-item label="工序名称" prop="processName"> <el-form-item label="工序名称" prop="processName">
<el-input v-model="form.processName" readonly="readonly" disabled /> <el-input
v-model="form.processName"
readonly="readonly"
disabled
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :lg="8" :md="8" :sm="12" :xs="12"> <el-col :lg="8" :md="8" :sm="12" :xs="12">
<el-form-item label="工作站" prop="workstationName"> <el-form-item label="工作站" prop="workstationName">
<el-input v-model="form.workstationName" readonly="readonly" disabled /> <el-input
v-model="form.workstationName"
readonly="readonly"
disabled
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :lg="8" :md="8" :sm="12" :xs="12"> <el-col :lg="8" :md="8" :sm="12" :xs="12">
<el-form-item label="工作单元" prop="workunitId" required: true> <el-form-item label="工作单元" prop="workunitId">
<el-input v-model="form.workunitName" > <el-input v-model="form.workunitName">
<el-button <el-button
slot="append" slot="append"
icon="el-icon-search" icon="el-icon-search"
...@@ -333,12 +341,17 @@ ...@@ -333,12 +341,17 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :lg="8" :md="8" :sm="12" :xs="12"> <el-col :lg="8" :md="8" :sm="12" :xs="12">
<el-form-item label="排产数量" prop="quantity" required: true> <el-form-item label="排产数量" prop="quantity">
<el-input-number :step="1" :min="0" v-model="form.quantity" placeholder="请输入排产数量" /> <el-input-number
:step="1"
:min="0"
v-model="form.quantity"
placeholder="请输入排产数量"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :lg="8" :md="8" :sm="12" :xs="12"> <el-col :lg="8" :md="8" :sm="12" :xs="12">
<el-form-item label="开始时间" prop="startTime" required: true> <el-form-item label="开始时间" prop="startTime">
<el-date-picker <el-date-picker
v-model="form.startTime" v-model="form.startTime"
type="datetime" type="datetime"
...@@ -349,8 +362,13 @@ ...@@ -349,8 +362,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :lg="8" :md="8" :sm="12" :xs="12"> <el-col :lg="8" :md="8" :sm="12" :xs="12">
<el-form-item label="生产时长" prop="duration" required: true> <el-form-item label="生产时长" prop="duration">
<el-input-number :step="1" :min="0" v-model="form.duration" placeholder="请输入生产时长" /> <el-input-number
:step="1"
:min="0"
v-model="form.duration"
placeholder="请输入生产时长"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -395,25 +413,25 @@ ...@@ -395,25 +413,25 @@
<el-button <el-button
type="primary" type="primary"
@click="cancel" @click="cancel"
v-if="optType == 'view' || form.status != 'NORMARL'" v-if="optType == 'view' || form.status != 'PREPARE'"
>返回</el-button >返回</el-button
> >
<el-button <el-button
type="primary" type="primary"
@click="submitForm" @click="submitForm"
v-if="form.status == 'NORMARL' && optType != 'view'" v-if="form.status == 'PREPARE' && optType != 'view'"
> </el-button > </el-button
> >
<el-button <!-- <el-button
type="success" type="success"
@click="handleFinish" @click="handleFinish"
v-if=" v-if="
form.status == 'NORMARL' && form.status == 'PREPARE' &&
optType != 'view' && optType != 'view' &&
form.workorderId != null form.workorderId != null
" "
>完成</el-button >完成</el-button
> > -->
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -421,13 +439,6 @@ ...@@ -421,13 +439,6 @@
</template> </template>
<script> <script>
import {
listWorkorder,
getWorkorder,
delWorkorder,
addWorkorder,
updateWorkorder,
} from "@/api/mes/pro/workorder";
import { import {
listProtask, listProtask,
listGanttTaskList, listGanttTaskList,
...@@ -441,7 +452,6 @@ import { listProductprocess } from "@/api/mes/pro/routeprocess"; ...@@ -441,7 +452,6 @@ import { listProductprocess } from "@/api/mes/pro/routeprocess";
import WorkuintSelect from "@/components/workunitSelect/single.vue"; import WorkuintSelect from "@/components/workunitSelect/single.vue";
import ProTask from "./proTask.vue"; import ProTask from "./proTask.vue";
import GanttChar from "./ganttx.vue"; import GanttChar from "./ganttx.vue";
import { listWorkunit } from "@/api/mes/md/workunit";
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";
...@@ -523,7 +533,7 @@ export default { ...@@ -523,7 +533,7 @@ export default {
colorCode: null, colorCode: null,
requestDate: null, requestDate: null,
remark: null, remark: null,
status: "NORMARL", status: "PREPARE",
workunitName: null, workunitName: null,
workunitId: null, workunitId: null,
}, },
...@@ -565,14 +575,11 @@ export default { ...@@ -565,14 +575,11 @@ export default {
}, },
// 获取工作单元 // 获取工作单元
onWorkunitSelect(row) { onWorkunitSelect(row) {
console.log(45456, row); console.log(45456, row);
if (row != undefined && row != null) { if (row != undefined && row != null) {
this.form.workunitId = row.workunitId; this.form.workunitId = row.workunitId;
this.form.workunitName = row.workunitName; this.form.workunitName = row.workunitName;
console.log(111111, this.form) console.log(111111, this.form);
} }
}, },
...@@ -753,9 +760,10 @@ export default { ...@@ -753,9 +760,10 @@ export default {
if (this.form.taskId != null) { if (this.form.taskId != null) {
updateProtask(this.form).then((response) => { updateProtask(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
//this.open = false; this.open = false;
this.$refs["bomlist"].getList(); // this.$refs["bomlist"].getList();
this.getList(); this.getList();
this.getGanttTasks();
}); });
} else { } else {
addProtask(this.form).then((response) => { addProtask(this.form).then((response) => {
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
:model="queryParams" <!-- <el-form-item label="工单编码" prop="workorderCode">
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="工单编码" prop="workorderCode">
<el-input <el-input
v-model="queryParams.workorderCode" v-model="queryParams.workorderCode"
placeholder="请输入工单编码" placeholder="请输入工单编码"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> -->
<el-form-item label="状态" prop="status">
<el-select
v-model="queryParams.status"
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>
<el-form-item label="工单名称" prop="workorderName"> <el-form-item label="工单名称" prop="workorderName">
<el-input <el-input
...@@ -33,14 +41,14 @@ ...@@ -33,14 +41,14 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="产品编号" prop="productCode"> <!-- <el-form-item label="产品编号" prop="productCode">
<el-input <el-input
v-model="queryParams.productCode" v-model="queryParams.productCode"
placeholder="请输入产品编号" placeholder="请输入产品编号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item> -->
<el-form-item label="产品名称" prop="productName"> <el-form-item label="产品名称" prop="productName">
<el-input <el-input
v-model="queryParams.productName" v-model="queryParams.productName"
...@@ -50,14 +58,14 @@ ...@@ -50,14 +58,14 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="客户编码" prop="clientCode"> <!-- <el-form-item label="客户编码" prop="clientCode">
<el-input <el-input
v-model="queryParams.clientCode" v-model="queryParams.clientCode"
placeholder="请输入客户编码" placeholder="请输入客户编码"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item> -->
<el-form-item label="客户名称" prop="clientName"> <el-form-item label="客户名称" prop="clientName">
<el-input <el-input
v-model="queryParams.clientName" v-model="queryParams.clientName"
...@@ -66,14 +74,14 @@ ...@@ -66,14 +74,14 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="工单类型" prop="workorderType"> <!-- <el-form-item label="工单类型" prop="workorderType">
<el-input <el-input
v-model="queryParams.workorderType" v-model="queryParams.workorderType"
placeholder="请选择工单类型" placeholder="请选择工单类型"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item> -->
<el-form-item label="需求日期" prop="requestDate"> <el-form-item label="需求日期" prop="requestDate">
<el-date-picker <el-date-picker
clearable clearable
...@@ -319,6 +327,7 @@ ...@@ -319,6 +327,7 @@
label="操作" label="操作"
width="150px" width="150px"
align="center" align="center"
fixed="right"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -329,9 +338,16 @@ ...@@ -329,9 +338,16 @@
v-if="scope.row.status == 'PREPARE'" v-if="scope.row.status == 'PREPARE'"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['mes:pro:workorder:edit']" v-hasPermi="['mes:pro:workorder:edit']"
>修改</el-button >修改</el-button>
>
<el-button <el-button
size="mini"
type="text"
icon="el-icon-delete"
v-if="scope.row.status == 'PREPARE'"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:pro:workorder:remove']"
>删除</el-button>
<!-- <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-plus" icon="el-icon-plus"
...@@ -351,16 +367,16 @@ ...@@ -351,16 +367,16 @@
@click="handleFinish(scope.row)" @click="handleFinish(scope.row)"
v-hasPermi="['mes:pro:workorder:update']" v-hasPermi="['mes:pro:workorder:update']"
>完成</el-button >完成</el-button
> > -->
<el-button
<!-- <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-circle-check"
v-if="scope.row.status == 'PREPARE'" v-if="scope.row.status =='PREPARE'"
@click="handleDelete(scope.row)" @click="confirmWorkorder(scope.row)"
v-hasPermi="['mes:pro:workorder:remove']" v-hasPermi="['mes:pro:workorder:update']"
>删除</el-button >确认</el-button> -->
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -738,8 +754,19 @@ export default { ...@@ -738,8 +754,19 @@ export default {
requestDate: null, requestDate: null,
parentId: null, parentId: null,
ancestors: null, ancestors: null,
status: null, status: 'PREPARE',
}, },
// 表单状态
options: [
{ value: "PREPARE", label: "待确认" },
{ value: "CONFIRMED", label: "已确认" },
{ value: "APPROVING", label: "审批中" },
{ value: "APPROVED", label: "已审批" },
{ value: "FINISHED", label: "已完成" },
{ value: "TASKGENERATED", label: "已生成任务单" },
{ value: "ISSUEGENERATED", label: "已生成领料单" },
{ value: "PRODUCIONG", label: "生产中" },
],
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
...@@ -1094,6 +1121,15 @@ export default { ...@@ -1094,6 +1121,15 @@ export default {
this.form.vendorName = obj.vendorName; this.form.vendorName = obj.vendorName;
} }
}, },
/** 完成任务单操作 */
confirmWorkorder(row) {
this.$modal.confirm('是否将工单编号"' + row.workorderCode + '"的草稿数据项改为已确认?').then(function() {
return confirmedWorkorder(row.workorderId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("已确认成功");
}).catch(() => {});
},
//自动生成编码 //自动生成编码
handleAutoGenChange(autoGenFlag) { handleAutoGenChange(autoGenFlag) {
if (autoGenFlag) { if (autoGenFlag) {
......
...@@ -597,8 +597,13 @@ export default { ...@@ -597,8 +597,13 @@ export default {
this.loading = false; this.loading = false;
this.$modal.msgSuccess("提交成功!"); this.$modal.msgSuccess("提交成功!");
this.$nextTick(() => {
// 关闭页签 // 关闭页签
tabPlugins.closeOpenPage(); tabPlugins.closeOpenPage();
this.$router.replace({
path: '/mes/pro/workorder'
})
})
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
......
<template>
<div class="process-prod">
<!-- 设置检验项弹窗 -->
<el-dialog
:visible.sync="showProcessProd"
width="800px"
:before-close="beforeClose"
append-to-body
title="设置检验项"
>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
</el-col>
</el-row>
<el-table :data="tableData">
<el-table-column label="检测项编码" align="center" prop="indexCode" />
<el-table-column label="检测项名称" align="center" prop="indexName" />
<el-table-column label="检测项类型" align="center" prop="indexType">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_index_type" :value="scope.row.indexType"/>
</template>
</el-table-column>
<el-table-column label="检测工具" align="center" prop="qcTool" />
<el-table-column label="备注" prop="remark" align="center" />
<el-table-column label="操作" align="center" width="150">
<template slot-scope="{ row, $index }">
<el-button
type="text"
icon="el-icon-edit"
size="small"
@click="updateRow(row, $index)"
>修改</el-button
>
<el-button
type="text"
icon="el-icon-delete"
size="small"
@click="deleteRow($index)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<div slot="footer">
<el-button type="primary" size="small" @click="cancleConnect"
>关闭</el-button
>
</div>
</el-dialog>
<!-- 编辑检验项关联信息 -->
<el-dialog
:visible.sync="editConnectVisible"
width="800px"
title="编辑检验项关联信息"
>
<el-form ref="form" :model="form" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item label="检测项编码" prop="indexCode" >
<el-input v-model="form.indexCode" placeholder="请选择测项编码"
readonly>
<el-button
slot="append"
icon="el-icon-search"
@click="$refs['QcindexSelectRef'].showFlag = true"
></el-button>
</el-input>
<QcindexSelect ref="QcindexSelectRef" @onSelected="onQcindexSelect" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" :rows="3"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer">
<el-button type="primary" size="small" @click="addOrEditubmit"
>确认</el-button
>
<el-button size="small" @click="editConnectVisible = false"
>取消</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import QcindexSelect from "@/components/qcindexSelect/single.vue";
export default {
props: {
process: {
type: Object,
default: () => ({}),
},
},
components: { QcindexSelect },
dicts: ['mes_index_type'],
data() {
return {
form: {
indexCode: "",
indexName: "",
indexType: "",
qcTool:"",
qcindexId:"",
remark: "",
},
currentRowIdx: undefined,
tableData: [],
selectedItemId: undefined,
selectedRows: null,
showFlag: false,
optType:null,
showProcessProd: false,
editConnectVisible: false,
};
},
computed: {
title() {
return "设置" + this.process.itemName + "检验项";
},
},
watch: {
process: {
handler(val) {
this.tableData = val.qcindexList;
},
deep: true,
},
},
methods: {
handleRowChange(row) {
if (row) {
this.selectedRows = row;
}
},
handleRowDbClick(row) {
if (row) {
this.selectedRows = row;
this.tableData.unshift(this.selectedRows);
this.showFlag = false;
}
},
/**新增按钮 */
handleAdd() {
this.resetForm();
this.optType='add';
this.editConnectVisible = true;
},
/**编辑 */
updateRow(row, idx) {
this.resetForm();
Object.assign(this.form, row);
this.currentRowIdx = idx;
this.optType='edit';
this.editConnectVisible = true;
},
/**新增 */
configmSelect() {
if (this.form.indexCode == null || this.form.indexCode == 0) {
return;
}
this.tableData.unshift({
...this.form,
processId: this.process.processId,
});
this.editConnectVisible = false;
},
/** 提交编辑关联信息 */
submitEditConnect() {
this.tableData.splice(this.currentRowIdx, 1, {
...this.form,
});
this.editConnectVisible = false;
},
addOrEditubmit(){
if(this.optType=='add'){
this.configmSelect();
}else{
this.submitEditConnect();
}
},
deleteRow(index) {
this.tableData.splice(index, 1);
},
cancleConnect() {
this.$emit("updateQcindex", this.tableData);
this.showProcessProd = false;
},
beforeClose(done) {
// 更新父组件的processItemList
this.$emit("updateQcindex", this.tableData);
done();
},
/**重置表单 */
resetForm() {
this.form = {
indexCode: "",
indexName: "",
indexType: "",
qcTool:"",
qcindexId:"",
remark: "",
};
},
onQcindexSelect(row){
if (row != undefined && row != null) {
this.form.indexCode = row.indexCode;
this.form.indexName = row.indexName;
this.form.qcTool = row.qcTool;
this.form.qcindexId = row.indexId;
}
}
},
};
</script>
<style>
.process-prod {
padding: 0 20px;
}
</style>
<template>
<div class="process-prod">
<!-- 设置工装量具弹窗 -->
<el-dialog
:visible.sync="showProcessProd"
width="800px"
:before-close="beforeClose"
append-to-body
title="设置工装量具"
>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
</el-col>
</el-row>
<el-table :data="tableData">
<el-table-column label="编号" align="center" prop="toolCode" >
</el-table-column>
<el-table-column label="名称" align="center" prop="toolName" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="品牌" align="center" prop="brand" :show-overflow-tooltip="true"/>
<el-table-column label="型号" align="center" prop="spec" :show-overflow-tooltip="true"/>
<el-table-column label="类型" align="center" prop="toolTypeName" />
<el-table-column label="要求数量" align="center" prop="quantity" />
<el-table-column label="备注" prop="remark" align="center" />
<el-table-column label="操作" align="center" width="150">
<template slot-scope="{ row, $index }">
<el-button
type="text"
icon="el-icon-edit"
size="small"
@click="updateRow(row, $index)"
>修改</el-button
>
<el-button
type="text"
icon="el-icon-delete"
size="small"
@click="deleteRow($index)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<div slot="footer">
<el-button type="primary" size="small" @click="cancleConnect"
>关闭</el-button
>
</div>
</el-dialog>
<!-- 编辑工装量具关联信息 -->
<el-dialog
:visible.sync="editConnectVisible"
width="800px"
title="编辑工装量具关联信息"
>
<el-form ref="form" :model="form" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item label="工装量具编码" prop="toolCode" >
<el-input v-model="form.toolCode" placeholder="请选择测项编码"
readonly>
<el-button
slot="append"
icon="el-icon-search"
@click="$refs['TmToolSelectRef'].showFlag = true"
></el-button>
</el-input>
<TmToolSelect ref="TmToolSelectRef" @onSelected="onTmToolSelect" />
</el-form-item>
</el-col>
<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-row>
<el-row>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" :rows="3"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer">
<el-button type="primary" size="small" @click="addOrEditubmit"
>确认</el-button
>
<el-button size="small" @click="editConnectVisible = false"
>取消</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import TmToolSelect from "@/components/TmTool/index.vue";
export default {
props: {
process: {
type: Object,
default: () => ({}),
},
},
components: { TmToolSelect },
dicts: ['mes_index_type'],
data() {
return {
form: {
toolCode: "",
toolName: "",
brand: "",
spec:"",
toolTypeName:"",
remark: "",
quantity: "",
toolId:"",
},
currentRowIdx: undefined,
tableData: [],
selectedItemId: undefined,
selectedRows: null,
showFlag: false,
optType:null,
showProcessProd: false,
editConnectVisible: false,
};
},
computed: {
title() {
return "设置" + this.process.itemName + "工装量具";
},
},
watch: {
process: {
handler(val) {
this.tableData = val.toolList;
},
deep: true,
},
},
methods: {
handleRowChange(row) {
if (row) {
this.selectedRows = row;
}
},
handleRowDbClick(row) {
if (row) {
this.selectedRows = row;
this.tableData.unshift(this.selectedRows);
this.showFlag = false;
}
},
/**新增按钮 */
handleAdd() {
this.resetForm();
this.optType='add';
this.editConnectVisible = true;
},
/**编辑 */
updateRow(row, idx) {
this.resetForm();
Object.assign(this.form, row);
this.currentRowIdx = idx;
this.optType='edit';
this.editConnectVisible = true;
},
/**新增 */
configmSelect() {
if (this.form.toolCode == null || this.form.toolCode == 0) {
return;
}
this.tableData.unshift({
...this.form,
processId: this.process.processId,
});
this.editConnectVisible = false;
},
/** 提交编辑关联信息 */
submitEditConnect() {
this.tableData.splice(this.currentRowIdx, 1, {
...this.form,
});
this.editConnectVisible = false;
},
addOrEditubmit(){
if(this.optType=='add'){
this.configmSelect();
}else{
this.submitEditConnect();
}
},
deleteRow(index) {
this.tableData.splice(index, 1);
},
cancleConnect() {
this.$emit("updateTool", this.tableData);
this.showProcessProd = false;
},
beforeClose(done) {
// 更新父组件的processItemList
this.$emit("updateTool", this.tableData);
done();
},
/**重置表单 */
resetForm() {
this.form = {
toolCode: "",
toolName: "",
brand: "",
spec:"",
toolTypeName:"",
toolId:"",
quantity: "",
remark: "",
};
},
onTmToolSelect(row){
if (row != undefined && row != null) {
this.form.toolCode = row.toolCode;
this.form.toolName = row.toolName;
this.form.brand = row.brand;
this.form.spec = row.spec;
this.form.toolTypeName = row.toolTypeName;
this.form.toolId = row.toolId;
}
}
},
};
</script>
<style>
.process-prod {
padding: 0 20px;
}
</style>
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
v-if="mode != 'info'" v-if="mode != 'info'"
label="操作" label="操作"
align="center" align="center"
width="150" width="300"
fixed="right"
> >
<template slot-scope="{ row, $index }"> <template slot-scope="{ row, $index }">
<el-button <el-button
type="text" type="text"
icon="el-icon-edit"
size="small" size="small"
@click="openSetProd(row, $index)" @click="openSetProd(row, $index)"
> >
...@@ -28,7 +28,20 @@ ...@@ -28,7 +28,20 @@
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
icon="el-icon-edit" size="small"
@click="openSetQrindex(row, $index)"
>
设置检验项
</el-button>
<el-button
type="text"
size="small"
@click="openSetTool(row, $index)"
>
设置工装量具
</el-button>
<el-button
type="text"
size="small" size="small"
@click="updateRow(row, $index)" @click="updateRow(row, $index)"
>修改</el-button >修改</el-button
...@@ -43,6 +56,15 @@ ...@@ -43,6 +56,15 @@
ref="ProcessProdRef" ref="ProcessProdRef"
@updateItem="updateItem" @updateItem="updateItem"
/> />
<ProcessQcindex
:process="currentRow"
ref="ProcessQcindexRef"
/>
<ProcessTool
:process="currentRow"
ref="ProcessToolRef"
/>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
...@@ -60,7 +82,7 @@ ...@@ -60,7 +82,7 @@
> >
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="工作站" prop="workstationId"> <el-form-item label="工作站" prop="workstationName">
<el-input <el-input
v-model="form.workstationName" v-model="form.workstationName"
disabled disabled
...@@ -99,11 +121,13 @@ ...@@ -99,11 +121,13 @@
</template> </template>
<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"; import ProcessQcindex from "./ProcessQcindex.vue";
export default { import ProcessTool from "./ProcessTool.vue";
components: { ItemBomSelect, ProcessProd, WorkstationSelect }, import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue";
export default {
components: { ItemBomSelect, ProcessProd, ProcessTool, ProcessQcindex ,WorkstationSelect },
inject: ["mode"], inject: ["mode"],
props: { props: {
bomList: { bomList: {
...@@ -133,6 +157,8 @@ export default { ...@@ -133,6 +157,8 @@ export default {
setList(rows) { setList(rows) {
this.tableData = rows.map((item) => { this.tableData = rows.map((item) => {
item.processItemList = []; item.processItemList = [];
item.qcindexList = [];
item.toolList = [];
return item; return item;
}); });
}, },
...@@ -140,11 +166,27 @@ export default { ...@@ -140,11 +166,27 @@ export default {
updateItem(items) { updateItem(items) {
this.tableData[this.currentRowIndex].processItemList = items; this.tableData[this.currentRowIndex].processItemList = items;
}, },
updateTool(items) {
this.tableData[this.currentRowIndex].toolList = items;
},
updateQcindex(items) {
this.tableData[this.currentRowIndex].qcindexList = items;
},
openSetProd(row, idx) { openSetProd(row, idx) {
this.currentRow = row; this.currentRow = row;
this.currentRowIndex = idx; this.currentRowIndex = idx;
this.$refs["ProcessProdRef"].showProcessProd = true; this.$refs["ProcessProdRef"].showProcessProd = true;
}, },
openSetQrindex(row, idx) {
this.currentRow = row;
this.currentRowIndex = idx;
this.$refs["ProcessQcindexRef"].showProcessProd = true;
},
openSetTool(row, idx) {
this.currentRow = row;
this.currentRowIndex = idx;
this.$refs["ProcessToolRef"].showProcessProd = true;
},
/**更新行 */ /**更新行 */
updateRow(row, idx) { updateRow(row, idx) {
Object.assign(this.form, row); Object.assign(this.form, row);
...@@ -191,7 +233,7 @@ export default { ...@@ -191,7 +233,7 @@ export default {
} }
}, },
}, },
}; };
</script> </script>
<style></style> <style></style>
...@@ -228,7 +228,7 @@ import { ...@@ -228,7 +228,7 @@ import {
export default { export default {
components: { ProogingBom, ProogingProcess, ItemSelect, RoutesProcessSelect }, components: { ProogingBom, ProogingProcess, ItemSelect, RoutesProcessSelect },
dicts: ['pro_proof_form','pro_distribution_profing'], dicts: ["pro_proof_form", "pro_distribution_profing"],
provide() { provide() {
return { return {
mode: this.mode, mode: this.mode,
...@@ -352,8 +352,13 @@ export default { ...@@ -352,8 +352,13 @@ export default {
this.loading = false; this.loading = false;
this.$modal.msgSuccess("提交成功!"); this.$modal.msgSuccess("提交成功!");
this.$nextTick(() => {
// 关闭页签 // 关闭页签
tabPlugins.closeOpenPage(); tabPlugins.closeOpenPage();
this.$router.replace({
path: '/mes/proofing/query'
})
})
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
...@@ -363,6 +368,7 @@ export default { ...@@ -363,6 +368,7 @@ export default {
.then(() => { .then(() => {
this.loading = false; this.loading = false;
this.$modal.msgSuccess("提交成功!"); this.$modal.msgSuccess("提交成功!");
this.getFormInfo();
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
plain plain
...@@ -59,8 +59,8 @@ ...@@ -59,8 +59,8 @@
@click="handleAdd" @click="handleAdd"
v-hasPermi="['mes:wm:issueheader:add']" v-hasPermi="['mes:wm:issueheader:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col> -->
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['mes:wm:issueheader:edit']" v-hasPermi="['mes:wm:issueheader:edit']"
>修改</el-button> >修改</el-button>
</el-col> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
...@@ -130,14 +130,14 @@ ...@@ -130,14 +130,14 @@
@click="handleExecute(scope.row)" @click="handleExecute(scope.row)"
v-hasPermi="['mes:wm:issueheader:edit']" v-hasPermi="['mes:wm:issueheader:edit']"
>执行领出</el-button> >执行领出</el-button>
<el-button <!-- <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
v-if="scope.row.status =='PREPARE'" v-if="scope.row.status =='PREPARE'"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['mes:wm:issueheader:edit']" v-hasPermi="['mes:wm:issueheader:edit']"
>修改</el-button> >修改</el-button> -->
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
......
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