Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
17982d582a
|
@ -272,6 +272,13 @@ export function createUsedstep(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function updateUsedstep(id,data) {
|
||||||
|
return request({
|
||||||
|
url: `/mtm/usedstep/${id}/`,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
export function deleteUsedstep(id, data) {
|
export function deleteUsedstep(id, data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/mtm/usedstep/${id}/`,
|
url: `/mtm/usedstep/${id}/`,
|
||||||
|
|
|
@ -196,10 +196,6 @@
|
||||||
isDisabled:{
|
isDisabled:{
|
||||||
type:Boolean,
|
type:Boolean,
|
||||||
default:false
|
default:false
|
||||||
},
|
|
||||||
isMidTesting:{
|
|
||||||
type:Boolean,
|
|
||||||
default:false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -235,13 +231,11 @@
|
||||||
let listJudge = this.formData.filter(item => {
|
let listJudge = this.formData.filter(item => {
|
||||||
return item.need_judge === true;
|
return item.need_judge === true;
|
||||||
});
|
});
|
||||||
debugger;
|
|
||||||
listJudge.forEach(item => {
|
listJudge.forEach(item => {
|
||||||
let obj = new Object();
|
let obj = new Object();
|
||||||
obj = item;
|
obj = item;
|
||||||
that.judgeList.push(obj)
|
that.judgeList.push(obj)
|
||||||
});
|
});
|
||||||
debugger;
|
|
||||||
let imag= this.formData.filter(item => {
|
let imag= this.formData.filter(item => {
|
||||||
return item.field_type === 'draw';
|
return item.field_type === 'draw';
|
||||||
});
|
});
|
||||||
|
@ -727,7 +721,7 @@
|
||||||
that.testrecord.record_data = that.field;//检查项列表
|
that.testrecord.record_data = that.field;//检查项列表
|
||||||
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
||||||
that.testrecord.id = that.recordId;//记录id
|
that.testrecord.id = that.recordId;//记录id
|
||||||
if(submit&&that.isMidTesting!==true){//提交
|
if(submit){//提交
|
||||||
this.$emit('recordSubmit',that.testrecord);
|
this.$emit('recordSubmit',that.testrecord);
|
||||||
}else {//保存
|
}else {//保存
|
||||||
this.$emit('recordSave',that.testrecord);
|
this.$emit('recordSave',that.testrecord);
|
||||||
|
|
|
@ -818,7 +818,8 @@
|
||||||
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
||||||
that.testrecord.id = that.recordId;
|
that.testrecord.id = that.recordId;
|
||||||
// debugger;
|
// debugger;
|
||||||
if(submit&&that.isMidTesting!==true){//提交
|
// if(submit&&that.isMidTesting!==true){//提交
|
||||||
|
if(submit){//提交
|
||||||
this.$emit('recordSubmit',that.testrecord);
|
this.$emit('recordSubmit',that.testrecord);
|
||||||
}else {//保存
|
}else {//保存
|
||||||
this.$emit('recordSave',that.testrecord);
|
this.$emit('recordSave',that.testrecord);
|
||||||
|
|
|
@ -257,7 +257,7 @@ export default {
|
||||||
_this.mtmId.push(item.material_.id);
|
_this.mtmId.push(item.material_.id);
|
||||||
_this.materialshow.push(item);
|
_this.materialshow.push(item);
|
||||||
});
|
});
|
||||||
this.ordershow = _this.materialshow[0].number;
|
this.ordershow = _this.materialshow[0].to_order_.number;
|
||||||
this.customershow=_this.materialshow[0].order_.customer_.name;
|
this.customershow=_this.materialshow[0].order_.customer_.name;
|
||||||
this.contractshow=_this.materialshow[0].order_.contract_.name;
|
this.contractshow=_this.materialshow[0].order_.contract_.name;
|
||||||
getOrderList({ page: 0, material: _this.mtmId[0], tag:'not_done' }).then(
|
getOrderList({ page: 0, material: _this.mtmId[0], tag:'not_done' }).then(
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<el-row :gutter="2">
|
<el-row :gutter="2">
|
||||||
<el-col :span="9">
|
<el-col :span="9">
|
||||||
<el-card>
|
<el-card>
|
||||||
|
@ -35,7 +34,6 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -49,7 +47,8 @@
|
||||||
">工艺流程</span>
|
">工艺流程</span>
|
||||||
</div>
|
</div>
|
||||||
<el-steps :active="values" spac="400px" align-center="" style="padding-top: 20px;height:80px">
|
<el-steps :active="values" spac="400px" align-center="" style="padding-top: 20px;height:80px">
|
||||||
<el-step :title="item.name" v-for="(item,index) in processoptions " :key="index" @click.native=stepclick(item.id)>
|
<el-step :title="item.name" v-for="(item,index) in processoptions " :key="index"
|
||||||
|
@click.native=stepclick(item.id)>
|
||||||
|
|
||||||
</el-step>
|
</el-step>
|
||||||
</el-steps>
|
</el-steps>
|
||||||
|
@ -61,7 +60,8 @@
|
||||||
">流程分解</span>
|
">流程分解</span>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handlesubproducationCreate"
|
<el-button type="primary" icon="el-icon-plus" @click="handlesubproducationCreate"
|
||||||
>新增</el-button>
|
>新增
|
||||||
|
</el-button>
|
||||||
<el-table
|
<el-table
|
||||||
height="190px"
|
height="190px"
|
||||||
:data="subproducationData"
|
:data="subproducationData"
|
||||||
|
@ -89,7 +89,6 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
label="操作"
|
label="操作"
|
||||||
|
@ -101,13 +100,15 @@
|
||||||
v-if="checkPermission(['material_update'])"
|
v-if="checkPermission(['material_update'])"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handlesubproducationEdit(scope)"
|
@click="handlesubproducationEdit(scope)"
|
||||||
>编辑</el-link
|
>编辑
|
||||||
|
</el-link
|
||||||
>
|
>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['material_delete'])"
|
v-if="checkPermission(['material_delete'])"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handlesubproducationDelete(scope)"
|
@click="handlesubproducationDelete(scope)"
|
||||||
>删除</el-link
|
>删除
|
||||||
|
</el-link
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -150,8 +151,6 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisiblesp = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisiblesp = false">取消</el-button>
|
||||||
|
@ -159,64 +158,52 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
<el-tabs type="border-card" style="height:310px">
|
<el-tabs type="border-card" style="height:310px">
|
||||||
<el-tab-pane label="输入物料">
|
<el-tab-pane label="输入物料">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleinputCreate"
|
<el-button type="primary" icon="el-icon-plus" @click="handleinputCreate"
|
||||||
>新增</el-button>
|
>新增
|
||||||
|
</el-button>
|
||||||
<el-table
|
<el-table
|
||||||
|
|
||||||
:data="inputtableData"
|
:data="inputtableData"
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
height="220px"
|
height="220px"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"/>
|
<el-table-column type="index" width="50"/>
|
||||||
<el-table-column label="物料编号" min-width="100">
|
<el-table-column label="物料编号" min-width="100">
|
||||||
<template slot-scope="scope">{{scope.row.material_.number}}</template>
|
<template slot-scope="scope">{{scope.row.material_.number}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="物料名称" min-width="100">
|
<el-table-column label="物料名称" min-width="100">
|
||||||
<template slot-scope="scope"> {{scope.row.material_.name}}</template>
|
<template slot-scope="scope"> {{scope.row.material_.name}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="计量单位" min-width="100">
|
<el-table-column label="计量单位" min-width="100">
|
||||||
<template slot-scope="scope">{{ scope.row.material_.unit }}</template>
|
<template slot-scope="scope">{{ scope.row.material_.unit }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="单位消耗量" min-width="100">
|
<el-table-column label="单位消耗量" min-width="100">
|
||||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
label="操作"
|
label="操作"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['material_update'])"
|
v-if="checkPermission(['material_update'])"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleinputEdit(scope)"
|
@click="handleinputEdit(scope)"
|
||||||
>编辑</el-link
|
>编辑
|
||||||
>
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['material_delete'])"
|
v-if="checkPermission(['material_delete'])"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleinputDelete(scope)"
|
@click="handleinputDelete(scope)"
|
||||||
>删除</el-link
|
>删除
|
||||||
>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
:title="dialogType === 'edit' ? '编辑输入物料' : '新增输入物料'"
|
:title="dialogType === 'edit' ? '编辑输入物料' : '新增输入物料'"
|
||||||
|
@ -227,11 +214,9 @@
|
||||||
label-width="80px"
|
label-width="80px"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-form-item label="消耗量" prop="count">
|
<el-form-item label="消耗量" prop="count">
|
||||||
<el-input-number v-model="inputmaterial.count" :min="0" placeholder="输入整数或小数"/>
|
<el-input-number v-model="inputmaterial.count" :min="0" placeholder="输入整数或小数"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="输入物料" prop="unit">
|
<el-form-item label="输入物料" prop="unit">
|
||||||
<el-select filterable style="width: 50%" v-model="inputmaterial.material" placeholder="请选择">
|
<el-select filterable style="width: 50%" v-model="inputmaterial.material" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -242,7 +227,6 @@
|
||||||
<span style="float: left">{{ item.name }}</span>
|
<span style="float: left">{{ item.name }}</span>
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specification }}</span>
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specification }}</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="排序" prop="sort">
|
||||||
|
@ -252,8 +236,6 @@
|
||||||
:max="2147483647"
|
:max="2147483647"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||||
|
@ -263,9 +245,9 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="输出物料">
|
<el-tab-pane label="输出物料">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleoutputCreate"
|
<el-button type="primary" icon="el-icon-plus" @click="handleoutputCreate"
|
||||||
>新增</el-button>
|
>新增
|
||||||
|
</el-button>
|
||||||
<el-table
|
<el-table
|
||||||
|
|
||||||
:data="outputtableData"
|
:data="outputtableData"
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
|
@ -275,15 +257,12 @@
|
||||||
<el-table-column label="物料编号">
|
<el-table-column label="物料编号">
|
||||||
<template slot-scope="scope">{{scope.row.material_.number}}</template>
|
<template slot-scope="scope">{{scope.row.material_.number}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="物料名称">
|
<el-table-column label="物料名称">
|
||||||
<template slot-scope="scope"> {{scope.row.material_.name}}</template>
|
<template slot-scope="scope"> {{scope.row.material_.name}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="计量单位">
|
<el-table-column label="计量单位">
|
||||||
<template slot-scope="scope">{{ scope.row.material_.unit }}</template>
|
<template slot-scope="scope">{{ scope.row.material_.unit }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="单位产出量">
|
<el-table-column label="单位产出量">
|
||||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -293,32 +272,27 @@
|
||||||
<el-tag v-else>否</el-tag>
|
<el-tag v-else>否</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
label="操作"
|
label="操作"
|
||||||
width="220px"
|
width="220px"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['material_update'])"
|
v-if="checkPermission(['material_update'])"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleoutputEdit(scope)"
|
@click="handleoutputEdit(scope)"
|
||||||
>编辑</el-link
|
>编辑
|
||||||
>
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['material_delete'])"
|
v-if="checkPermission(['material_delete'])"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleoutputDelete(scope)"
|
@click="handleoutputDelete(scope)"
|
||||||
>删除</el-link
|
>删除
|
||||||
>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="dialogVisible1"
|
:visible.sync="dialogVisible1"
|
||||||
:title="dialogType1 === 'edit' ? '编辑输出物料' : '新增输出物料'"
|
:title="dialogType1 === 'edit' ? '编辑输出物料' : '新增输出物料'"
|
||||||
|
@ -329,11 +303,9 @@
|
||||||
label-width="120px"
|
label-width="120px"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-form-item label="产出量" prop="count">
|
<el-form-item label="产出量" prop="count">
|
||||||
<el-input-number v-model="outputmaterial.count" :min="0"/>
|
<el-input-number v-model="outputmaterial.count" :min="0"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="输出物料" prop="unit">
|
<el-form-item label="输出物料" prop="unit">
|
||||||
<el-select filterable style="width: 50%" v-model="outputmaterial.material" placeholder="请选择">
|
<el-select filterable style="width: 50%" v-model="outputmaterial.material" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -346,11 +318,9 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="是否主产出" prop="is_main">
|
<el-form-item label="是否主产出" prop="is_main">
|
||||||
<el-switch v-model="outputmaterial.is_main"></el-switch>
|
<el-switch v-model="outputmaterial.is_main"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="outputmaterial.sort"
|
v-model="outputmaterial.sort"
|
||||||
|
@ -358,7 +328,6 @@
|
||||||
:max="2147483647"
|
:max="2147483647"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisible1 = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisible1 = false">取消</el-button>
|
||||||
|
@ -366,13 +335,11 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="工具工装">
|
<el-tab-pane label="工具工装">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleotherCreate"
|
<el-button type="primary" icon="el-icon-plus" @click="handleotherCreate"
|
||||||
>新增</el-button>
|
>新增
|
||||||
|
</el-button>
|
||||||
<el-table
|
<el-table
|
||||||
|
|
||||||
:data="othertableData"
|
:data="othertableData"
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
|
@ -383,40 +350,32 @@
|
||||||
<el-table-column label="物料编号" min-width="100">
|
<el-table-column label="物料编号" min-width="100">
|
||||||
<template slot-scope="scope">{{scope.row.material_.number}}</template>
|
<template slot-scope="scope">{{scope.row.material_.number}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="物料名称" min-width="100">
|
<el-table-column label="物料名称" min-width="100">
|
||||||
<template slot-scope="scope"> {{scope.row.material_.name}}</template>
|
<template slot-scope="scope"> {{scope.row.material_.name}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="计量单位" min-width="100">
|
<el-table-column label="计量单位" min-width="100">
|
||||||
<template slot-scope="scope">{{ scope.row.material_.unit }}</template>
|
<template slot-scope="scope">{{ scope.row.material_.unit }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
label="操作"
|
label="操作"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['material_update'])"
|
v-if="checkPermission(['material_update'])"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleotherEdit(scope)"
|
@click="handleotherEdit(scope)"
|
||||||
>编辑</el-link
|
>编辑
|
||||||
>
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['material_delete'])"
|
v-if="checkPermission(['material_delete'])"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleotherDelete(scope)"
|
@click="handleotherDelete(scope)"
|
||||||
>删除</el-link
|
>删除
|
||||||
>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="dialogVisibleother"
|
:visible.sync="dialogVisibleother"
|
||||||
:title="dialogTypeother === 'edit' ? '编辑工具工装' : '新增工具工装'"
|
:title="dialogTypeother === 'edit' ? '编辑工具工装' : '新增工具工装'"
|
||||||
|
@ -451,8 +410,6 @@
|
||||||
:max="2147483647"
|
:max="2147483647"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisibleother = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisibleother = false">取消</el-button>
|
||||||
|
@ -460,62 +417,71 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="子工序列表">
|
<el-tab-pane label="子工序列表">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleusedstepCreate"
|
<el-button type="primary" icon="el-icon-plus" @click="handleusedstepCreate"
|
||||||
>新增</el-button>
|
>新增
|
||||||
|
</el-button>
|
||||||
<el-table
|
<el-table
|
||||||
|
|
||||||
:data="usedsteptableData"
|
:data="usedsteptableData"
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"/>
|
<el-table-column type="index" width="50"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-table-column label="子工序名称">
|
<el-table-column label="子工序名称">
|
||||||
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="工序内检验">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<!--{{ scope.row.need_test }}-->
|
||||||
|
<span v-if=" scope.row.need_test">检验</span>
|
||||||
|
<span v-else>不检验</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="备注">
|
<el-table-column label="备注">
|
||||||
<template slot-scope="scope">{{ scope.row.remark }}</template>
|
<template slot-scope="scope">{{ scope.row.remark }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
label="操作"
|
label="操作"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
@click="handleEdit(scope)"
|
||||||
|
>编辑
|
||||||
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handlesearch(scope)"
|
@click="handlesearch(scope)"
|
||||||
|
>查看
|
||||||
>查看</el-link
|
</el-link>
|
||||||
>
|
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['material_delete'])"
|
v-if="checkPermission(['material_delete'])"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleusedstepDelete(scope)"
|
@click="handleusedstepDelete(scope)"
|
||||||
>删除</el-link
|
>删除
|
||||||
>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="dialogVisibleusedstep"
|
:visible.sync="dialogVisibleusedstep"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:title="dialogTypes === 'edit' ? '编辑子工序' : '添加子工序'"
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form
|
||||||
ref="Formusedstep"
|
ref="Formusedstep"
|
||||||
:model="usedstep"
|
:model="usedstep"
|
||||||
label-width="80px"
|
label-width="100px"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
>
|
>
|
||||||
|
<el-form-item label="工序内检验">
|
||||||
|
<el-radio-group v-model="usedstep.need_test">
|
||||||
|
<el-radio :label="true">检验</el-radio>
|
||||||
|
<el-radio :label="false">不检验</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="子工序" prop="unit">
|
<el-form-item label="子工序" prop="unit">
|
||||||
<el-select style="width: 100%" v-model="usedstep.step" placeholder="请选择">
|
<el-select style="width: 100%" v-model="usedstep.step" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -526,11 +492,9 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="usedstep.remark" placeholder="输入备注信息"/>
|
<el-input v-model="usedstep.remark" placeholder="输入备注信息"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisibleusedstep = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisibleusedstep = false">取消</el-button>
|
||||||
|
@ -538,10 +502,10 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="技术文件">
|
<el-tab-pane label="技术文件">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handletechdocCreate"
|
<el-button type="primary" icon="el-icon-plus" @click="handletechdocCreate"
|
||||||
>新增</el-button>
|
>新增
|
||||||
|
</el-button>
|
||||||
<el-table
|
<el-table
|
||||||
:data="techdoctableData"
|
:data="techdoctableData"
|
||||||
border
|
border
|
||||||
|
@ -557,10 +521,8 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.enabled==false">否</el-tag>
|
<el-tag v-if="scope.row.enabled==false">否</el-tag>
|
||||||
<el-tag v-if="scope.row.enabled==true">是</el-tag>
|
<el-tag v-if="scope.row.enabled==true">是</el-tag>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" label="文件">
|
<el-table-column align="center" label="文件">
|
||||||
<template slot-scope="scope" v-if="scope.row.file_">
|
<template slot-scope="scope" v-if="scope.row.file_">
|
||||||
<el-link :href="scope.row.file_.file">{{scope.row.file_.name}}</el-link>
|
<el-link :href="scope.row.file_.file">{{scope.row.file_.name}}</el-link>
|
||||||
|
@ -572,20 +534,18 @@
|
||||||
width="220px"
|
width="220px"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
||||||
|
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['process_update'])"
|
v-if="checkPermission(['process_update'])"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handletechdocEdit(scope)"
|
@click="handletechdocEdit(scope)"
|
||||||
>编辑</el-link
|
>编辑
|
||||||
>
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['process_delete'])"
|
v-if="checkPermission(['process_delete'])"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handletechdocDelete(scope)"
|
@click="handletechdocDelete(scope)"
|
||||||
>删除</el-link
|
>删除
|
||||||
>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -598,16 +558,12 @@
|
||||||
:model="techdoc"
|
:model="techdoc"
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-form-item label="文件名称" prop="name">
|
<el-form-item label="文件名称" prop="name">
|
||||||
<el-input v-model="techdoc.name" placeholder="文件名称"/>
|
<el-input v-model="techdoc.name" placeholder="文件名称"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item label="内容" prop="content" style="height:350px">
|
<el-form-item label="内容" prop="content" style="height:350px">
|
||||||
<quill-editor ref="text" v-model="techdoc.content" style="height:250px" :options="editorOption"/>
|
<quill-editor ref="text" v-model="techdoc.content" style="height:250px" :options="editorOption"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否启用" prop="name">
|
<el-form-item label="是否启用" prop="name">
|
||||||
<el-switch v-model="techdoc.enabled"></el-switch>
|
<el-switch v-model="techdoc.enabled"></el-switch>
|
||||||
|
@ -627,7 +583,6 @@
|
||||||
<el-button size="small" type="primary">上传文件</el-button>
|
<el-button size="small" type="primary">上传文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisiblet = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisiblet = false">取消</el-button>
|
||||||
|
@ -638,15 +593,42 @@
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getMaterialList,getMaterial,getInputmaterialList,createInputmaterial,updateInputmaterial
|
import {
|
||||||
,deleteInputmaterial,getOutputmaterialList,createOutputmaterial,updateOutputmaterial,deleteOutputmaterial,
|
getMaterialList,
|
||||||
getUsedstepList,createUsedstep,deleteUsedstep,getStepList,gettechdocList,createtechdoc,updatetechdoc,deletetechdoc
|
getMaterial,
|
||||||
,getsubproducationList,createsubproducation,updatesubproducation,deletesubproducation,getProcessList ,
|
getInputmaterialList,
|
||||||
getOthermaterialList,createOthermaterial,deleteOthermaterial} from "@/api/mtm";
|
createInputmaterial,
|
||||||
|
updateInputmaterial
|
||||||
|
,
|
||||||
|
deleteInputmaterial,
|
||||||
|
getOutputmaterialList,
|
||||||
|
createOutputmaterial,
|
||||||
|
updateOutputmaterial,
|
||||||
|
deleteOutputmaterial,
|
||||||
|
getUsedstepList,
|
||||||
|
createUsedstep,
|
||||||
|
updateUsedstep,
|
||||||
|
deleteUsedstep,
|
||||||
|
getStepList,
|
||||||
|
gettechdocList,
|
||||||
|
createtechdoc,
|
||||||
|
updatetechdoc,
|
||||||
|
deletetechdoc
|
||||||
|
,
|
||||||
|
getsubproducationList,
|
||||||
|
createsubproducation,
|
||||||
|
updatesubproducation,
|
||||||
|
deletesubproducation,
|
||||||
|
getProcessList,
|
||||||
|
getOthermaterialList,
|
||||||
|
createOthermaterial,
|
||||||
|
deleteOthermaterial,
|
||||||
|
updateOthermaterial
|
||||||
|
} from "@/api/mtm";
|
||||||
|
import { getEquipmentAll } from "@/api/equipment";
|
||||||
import {quillEditor} from 'vue-quill-editor'
|
import {quillEditor} from 'vue-quill-editor'
|
||||||
import 'quill/dist/quill.core.css'
|
import 'quill/dist/quill.core.css'
|
||||||
import 'quill/dist/quill.snow.css'
|
import 'quill/dist/quill.snow.css'
|
||||||
|
@ -656,16 +638,10 @@ import { upUrl, upHeaders } from "@/api/file";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import {genTree} from "@/utils";
|
import {genTree} from "@/utils";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
const defaultinputmaterial = {
|
const defaultinputmaterial = {};
|
||||||
|
const defaultoutputmaterial = {};
|
||||||
};
|
|
||||||
const defaultoutputmaterial = {
|
|
||||||
|
|
||||||
};
|
|
||||||
const defaultother = {};
|
const defaultother = {};
|
||||||
const defaultusedstep = {
|
const defaultusedstep = {need_test:false};
|
||||||
|
|
||||||
};
|
|
||||||
const defaulttechdoc = {enabled: false};
|
const defaulttechdoc = {enabled: false};
|
||||||
const defaultsubproducation = {
|
const defaultsubproducation = {
|
||||||
need_combtest: false,
|
need_combtest: false,
|
||||||
|
@ -727,8 +703,10 @@ export default {
|
||||||
},
|
},
|
||||||
values: 7,
|
values: 7,
|
||||||
products: "",
|
products: "",
|
||||||
|
subProcessId: null,
|
||||||
dialogType: "new",
|
dialogType: "new",
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
dialogTypes: "edit",
|
||||||
dialogTypesp: "new",
|
dialogTypesp: "new",
|
||||||
dialogVisiblesp: false,
|
dialogVisiblesp: false,
|
||||||
dialogType1: "new",
|
dialogType1: "new",
|
||||||
|
@ -740,15 +718,12 @@ export default {
|
||||||
dialogVisibleother: false,
|
dialogVisibleother: false,
|
||||||
dialogTypeother: "new",
|
dialogTypeother: "new",
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
watch: {},
|
watch: {},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
@ -763,6 +738,7 @@ export default {
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//物料
|
//物料
|
||||||
getmaterialList() {
|
getmaterialList() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
|
@ -773,12 +749,21 @@ export default {
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//工序设备
|
||||||
|
getequipments() {
|
||||||
|
getEquipmentAll().then(response => {
|
||||||
|
this.options = genTree(response.data.results);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
//工序清单
|
//工序清单
|
||||||
getProcessList() {
|
getProcessList() {
|
||||||
getProcessList().then((res) => {
|
getProcessList().then((res) => {
|
||||||
this.processOptions = genTree(res.data.results);
|
this.processOptions = genTree(res.data.results);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取产品,工艺
|
//获取产品,工艺
|
||||||
getMaterial() {
|
getMaterial() {
|
||||||
getMaterial(this.product).then((response) => {
|
getMaterial(this.product).then((response) => {
|
||||||
|
@ -788,6 +773,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//点击对应的产品弹出信息
|
//点击对应的产品弹出信息
|
||||||
handleCurrentChange(row) {
|
handleCurrentChange(row) {
|
||||||
this.product = row.id;
|
this.product = row.id;
|
||||||
|
@ -796,13 +782,12 @@ export default {
|
||||||
this.getsubproducationList();
|
this.getsubproducationList();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//点击产品分解弹出输入、输出物料,子工序,技术文件
|
//点击产品分解弹出输入、输出物料,子工序,技术文件
|
||||||
handlespChange(row) {
|
handlespChange(row) {
|
||||||
this.subproduction = row.id;
|
this.subproduction = row.id;
|
||||||
this.processes = row.process;
|
this.processes = row.process;
|
||||||
|
|
||||||
this.getInputmaterialLists();//输入物料
|
this.getInputmaterialLists();//输入物料
|
||||||
|
|
||||||
this.getOutputmaterialLists();//输出物料
|
this.getOutputmaterialLists();//输出物料
|
||||||
this.getOthermaterialLists();//辅助工装
|
this.getOthermaterialLists();//辅助工装
|
||||||
this.getstepList();//子工序
|
this.getstepList();//子工序
|
||||||
|
@ -810,21 +795,17 @@ export default {
|
||||||
this.gettechdocLists();//技术文件
|
this.gettechdocLists();//技术文件
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//产品分解
|
//产品分解
|
||||||
getsubproducationList() {
|
getsubproducationList() {
|
||||||
|
|
||||||
this.listQuerysubproducation.product = this.product
|
this.listQuerysubproducation.product = this.product
|
||||||
getsubproducationList(this.listQuerysubproducation).then((response) => {
|
getsubproducationList(this.listQuerysubproducation).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
|
|
||||||
this.subproducationData = response.data;//产品信息
|
this.subproducationData = response.data;//产品信息
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handlesubproducationCreate()
|
|
||||||
{
|
handlesubproducationCreate() {
|
||||||
this.subproducation = Object.assign({}, defaultsubproducation);
|
this.subproducation = Object.assign({}, defaultsubproducation);
|
||||||
this.dialogTypesp = "new";
|
this.dialogTypesp = "new";
|
||||||
this.dialogVisiblesp = true;
|
this.dialogVisiblesp = true;
|
||||||
|
@ -832,6 +813,7 @@ export default {
|
||||||
this.$refs["Formsp"].clearValidate();
|
this.$refs["Formsp"].clearValidate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
handlesubproducationEdit(scope) {
|
handlesubproducationEdit(scope) {
|
||||||
this.subproducation = Object.assign({}, scope.row); // copy obj
|
this.subproducation = Object.assign({}, scope.row); // copy obj
|
||||||
this.dialogTypesp = "edit";
|
this.dialogTypesp = "edit";
|
||||||
|
@ -840,6 +822,7 @@ export default {
|
||||||
this.$refs["Formsp"].clearValidate();
|
this.$refs["Formsp"].clearValidate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
handlesubproducationDelete(scope) {
|
handlesubproducationDelete(scope) {
|
||||||
this.$confirm("确认删除?", "警告", {
|
this.$confirm("确认删除?", "警告", {
|
||||||
confirmButtonText: "确认",
|
confirmButtonText: "确认",
|
||||||
|
@ -855,6 +838,7 @@ export default {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
async subproducationfirm(form) {
|
async subproducationfirm(form) {
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
@ -885,18 +869,15 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
//输入物料列表
|
//输入物料列表
|
||||||
|
|
||||||
getInputmaterialLists() {
|
getInputmaterialLists() {
|
||||||
|
|
||||||
this.listQueryinput.subproduction = this.subproduction;
|
this.listQueryinput.subproduction = this.subproduction;
|
||||||
getInputmaterialList(this.listQueryinput).then((response) => {
|
getInputmaterialList(this.listQueryinput).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
|
|
||||||
this.inputtableData = response.data;//产品信息
|
this.inputtableData = response.data;//产品信息
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//输入物料
|
//输入物料
|
||||||
handleinputCreate() {
|
handleinputCreate() {
|
||||||
this.inputmaterial = Object.assign({}, defaultinputmaterial);
|
this.inputmaterial = Object.assign({}, defaultinputmaterial);
|
||||||
|
@ -907,6 +888,7 @@ export default {
|
||||||
});
|
});
|
||||||
this.getmaterialList();//物料列表
|
this.getmaterialList();//物料列表
|
||||||
},
|
},
|
||||||
|
|
||||||
handleinputEdit(scope) {
|
handleinputEdit(scope) {
|
||||||
this.inputmaterial = Object.assign({}, scope.row); // copy obj
|
this.inputmaterial = Object.assign({}, scope.row); // copy obj
|
||||||
this.dialogType = "edit";
|
this.dialogType = "edit";
|
||||||
|
@ -915,6 +897,7 @@ export default {
|
||||||
this.$refs["Form"].clearValidate();
|
this.$refs["Form"].clearValidate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
handleinputDelete(scope) {
|
handleinputDelete(scope) {
|
||||||
this.$confirm("确认删除?", "警告", {
|
this.$confirm("确认删除?", "警告", {
|
||||||
confirmButtonText: "确认",
|
confirmButtonText: "确认",
|
||||||
|
@ -930,6 +913,7 @@ export default {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
async inputconfirm(form) {
|
async inputconfirm(form) {
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
@ -959,25 +943,17 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//输出物料列表
|
//输出物料列表
|
||||||
|
|
||||||
getOutputmaterialLists() {
|
getOutputmaterialLists() {
|
||||||
|
|
||||||
this.listQueryoutput.subproduction = this.subproduction;
|
this.listQueryoutput.subproduction = this.subproduction;
|
||||||
// this.listQueryoutput.page=0;
|
// this.listQueryoutput.page=0;
|
||||||
getOutputmaterialList(this.listQueryoutput).then((response) => {
|
getOutputmaterialList(this.listQueryoutput).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
|
|
||||||
this.outputtableData = response.data;//产品信息
|
this.outputtableData = response.data;//产品信息
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//输出物料
|
//输出物料
|
||||||
handleoutputCreate() {
|
handleoutputCreate() {
|
||||||
this.outputmaterial = Object.assign({}, defaultoutputmaterial);
|
this.outputmaterial = Object.assign({}, defaultoutputmaterial);
|
||||||
|
@ -1026,7 +1002,6 @@ export default {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.outputmaterial.subproduction = this.subproduction;
|
this.outputmaterial.subproduction = this.subproduction;
|
||||||
console.log(this.outputmaterial);
|
|
||||||
createOutputmaterial(this.outputmaterial).then((res) => {
|
createOutputmaterial(this.outputmaterial).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.getOutputmaterialLists()
|
this.getOutputmaterialLists()
|
||||||
|
@ -1042,15 +1017,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
//输入其他物料列表
|
//输入其他物料列表
|
||||||
|
|
||||||
getOthermaterialLists() {
|
getOthermaterialLists() {
|
||||||
|
|
||||||
this.listQueryother.subproduction = this.subproduction;
|
this.listQueryother.subproduction = this.subproduction;
|
||||||
getOthermaterialList(this.listQueryother).then((response) => {
|
getOthermaterialList(this.listQueryother).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
|
|
||||||
this.othertableData = response.data;//工装列表
|
this.othertableData = response.data;//工装列表
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -1072,6 +1043,7 @@ export default {
|
||||||
this.$refs["Formother"].clearValidate();
|
this.$refs["Formother"].clearValidate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
handleotherDelete(scope) {
|
handleotherDelete(scope) {
|
||||||
this.$confirm("确认删除?", "警告", {
|
this.$confirm("确认删除?", "警告", {
|
||||||
confirmButtonText: "确认",
|
confirmButtonText: "确认",
|
||||||
|
@ -1087,6 +1059,7 @@ export default {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
async otherconfirm(form) {
|
async otherconfirm(form) {
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
@ -1116,12 +1089,8 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//子工序列表
|
//子工序列表
|
||||||
|
|
||||||
getUsedstepLists() {
|
getUsedstepLists() {
|
||||||
|
|
||||||
this.listQueryusedstep.subproduction = this.subproduction;
|
this.listQueryusedstep.subproduction = this.subproduction;
|
||||||
// this.listQueryusedstep.page=0;
|
// this.listQueryusedstep.page=0;
|
||||||
getUsedstepList(this.listQueryusedstep).then((response) => {
|
getUsedstepList(this.listQueryusedstep).then((response) => {
|
||||||
|
@ -1139,35 +1108,31 @@ export default {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.stepoptions = genTree(response.data);
|
this.stepoptions = genTree(response.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
handlesearch(scope) {
|
handlesearch(scope) {
|
||||||
|
|
||||||
this.$router.push({name: "Step", params: {id: scope.row.step_.id},})
|
this.$router.push({name: "Step", params: {id: scope.row.step_.id},})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//子工序列表
|
//新增子工序
|
||||||
handleusedstepCreate() {
|
handleusedstepCreate() {
|
||||||
this.usedstep = Object.assign({}, defaultusedstep);
|
this.usedstep = Object.assign({}, defaultusedstep);
|
||||||
this.dialogTypeusedstep = "new";
|
this.dialogTypes = "new";
|
||||||
this.dialogVisibleusedstep = true;
|
this.dialogVisibleusedstep = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs["Formusedstep"].clearValidate();
|
this.$refs["Formusedstep"].clearValidate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//编辑子工序
|
||||||
|
handleEdit(scope){
|
||||||
handleusedstepEdit(scope) {
|
this.subProcessId = scope.row.id;
|
||||||
this.outputmaterial = Object.assign({}, scope.row); // copy obj
|
this.usedstep = Object.assign({}, scope.row);
|
||||||
this.dialogType1 = "edit";
|
this.dialogTypes = "edit";
|
||||||
this.dialogVisible1 = true;
|
this.dialogVisibleusedstep = true;
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs["Forms"].clearValidate();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//删除子工序
|
||||||
handleusedstepDelete(scope) {
|
handleusedstepDelete(scope) {
|
||||||
this.$confirm("确认删除?", "警告", {
|
this.$confirm("确认删除?", "警告", {
|
||||||
confirmButtonText: "确认",
|
confirmButtonText: "确认",
|
||||||
|
@ -1183,10 +1148,24 @@ export default {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async usedstepconfirm(form) {
|
|
||||||
|
|
||||||
|
//提交子工序更改
|
||||||
|
async usedstepconfirm(form) {
|
||||||
|
let that = this;
|
||||||
this.usedstep.subproduction = this.subproduction;
|
this.usedstep.subproduction = this.subproduction;
|
||||||
console.log(this.usedstep);
|
if(that.dialogTypes === 'edit'){
|
||||||
|
let obj = new Object();
|
||||||
|
obj.remark =this.usedstep.remark;
|
||||||
|
obj.need_test =this.usedstep.need_test;
|
||||||
|
updateUsedstep(that.subProcessId,obj).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.getUsedstepLists();
|
||||||
|
this.getMaterial();
|
||||||
|
this.dialogVisibleusedstep = false;
|
||||||
|
this.$message.success("成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
createUsedstep(this.usedstep).then((res) => {
|
createUsedstep(this.usedstep).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.getUsedstepLists();
|
this.getUsedstepLists();
|
||||||
|
@ -1195,19 +1174,20 @@ export default {
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//技术文件
|
//技术文件
|
||||||
gettechdocLists() {
|
gettechdocLists() {
|
||||||
this.listQuerytechdoc.subproduction = this.subproduction;
|
this.listQuerytechdoc.subproduction = this.subproduction;
|
||||||
// this.listQuerytechdoc.page=0;
|
// this.listQuerytechdoc.page=0;
|
||||||
gettechdocList(this.listQuerytechdoc).then((response) => {
|
gettechdocList(this.listQuerytechdoc).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
|
|
||||||
this.techdoctableData = response.data;//技术文件
|
this.techdoctableData = response.data;//技术文件
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
handletechdocCreate() {
|
handletechdocCreate() {
|
||||||
this.techdoc = Object.assign({}, defaulttechdoc);
|
this.techdoc = Object.assign({}, defaulttechdoc);
|
||||||
this.dialogTypet = "new";
|
this.dialogTypet = "new";
|
||||||
|
@ -1217,6 +1197,7 @@ export default {
|
||||||
this.$refs["Formt"].clearValidate();
|
this.$refs["Formt"].clearValidate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
handlePreview(file) {
|
handlePreview(file) {
|
||||||
if ("url" in file) {
|
if ("url" in file) {
|
||||||
window.open(file.url);
|
window.open(file.url);
|
||||||
|
@ -1224,9 +1205,11 @@ export default {
|
||||||
window.open(file.response.data.path);
|
window.open(file.response.data.path);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleUpSuccess(res, file, filelist) {
|
handleUpSuccess(res, file, filelist) {
|
||||||
this.techdoc.file = res.data.id;
|
this.techdoc.file = res.data.id;
|
||||||
},
|
},
|
||||||
|
|
||||||
handleRemove(file, filelist) {
|
handleRemove(file, filelist) {
|
||||||
this.techdoc.file = null;
|
this.techdoc.file = null;
|
||||||
},
|
},
|
||||||
|
@ -1247,6 +1230,7 @@ export default {
|
||||||
this.$refs["Formt"].clearValidate();
|
this.$refs["Formt"].clearValidate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
handletechdocDelete(scope) {
|
handletechdocDelete(scope) {
|
||||||
this.$confirm("确认删除?", "警告", {
|
this.$confirm("确认删除?", "警告", {
|
||||||
confirmButtonText: "确认",
|
confirmButtonText: "确认",
|
||||||
|
@ -1267,7 +1251,6 @@ export default {
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const isEdit = this.dialogTypet === "edit";
|
const isEdit = this.dialogTypet === "edit";
|
||||||
|
|
||||||
if (isEdit) {
|
if (isEdit) {
|
||||||
updatetechdoc(this.techdoc.id, this.techdoc).then((res) => {
|
updatetechdoc(this.techdoc.id, this.techdoc).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
type="month"
|
type="month"
|
||||||
placeholder="选择年月">
|
placeholder="选择年月">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
<el-button type="primary" @click="submit">主要按钮</el-button>
|
<el-button type="primary" @click="submit">查询</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
|
|
|
@ -56,7 +56,9 @@
|
||||||
<el-tag v-else-if="scope.row.is_audited == true">已审核</el-tag>
|
<el-tag v-else-if="scope.row.is_audited == true">已审核</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间">
|
||||||
|
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作" width="220px">
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
|
|
|
@ -1011,7 +1011,9 @@
|
||||||
this.innerIndex = index;
|
this.innerIndex = index;
|
||||||
// this.outerVisible = true;
|
// this.outerVisible = true;
|
||||||
this.wproduct = scope.row.id;//半成品ID
|
this.wproduct = scope.row.id;//半成品ID
|
||||||
this.listQueryrecordform.material = scope.row.material_check!==null ? scope.row.material_check :scope.row.material_.id;//
|
debugger;
|
||||||
|
console.log(scope.row.material_check);
|
||||||
|
this.listQueryrecordform.material = scope.row.material_check!==null ? scope.row.material_check :scope.row.material;//
|
||||||
this.listQueryrecordform.type = 2;
|
this.listQueryrecordform.type = 2;
|
||||||
this.listQueryrecordform.enabled = true;
|
this.listQueryrecordform.enabled = true;
|
||||||
this.recordform = null;
|
this.recordform = null;
|
||||||
|
|
Loading…
Reference in New Issue