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