yemianqunaxiananniutinajia

This commit is contained in:
shijing 2022-03-02 09:53:54 +08:00
parent 7a1a1111ff
commit 7bfc78bc07
6 changed files with 817 additions and 765 deletions

View File

@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"> <el-button v-if="checkPermission(['material_create'])" type="primary" icon="el-icon-plus" @click="handleCreate">
新增物料 新增物料
</el-button> </el-button>
<el-input <el-input
@ -85,7 +85,7 @@
>检查表 >检查表
</el-link> </el-link>
<el-link <el-link
v-if="checkPermission(['material_update'])" subproduction_delete
type="primary" type="primary"
@click="handleEdit(scope)" @click="handleEdit(scope)"
>编辑 >编辑

View File

@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<div style="margin-top: 2px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"> <el-button v-if="checkPermission(['process_create'])" type="primary" icon="el-icon-plus" @click="handleCreate">
新增工序 新增工序
</el-button> </el-button>
</div> </div>
@ -46,6 +46,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['process_update'])"
type="primary" type="primary"
@click="handleAdd(scope)" @click="handleAdd(scope)"
> >

View File

@ -47,9 +47,12 @@
">工艺流程</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" <el-step
@click.native=stepclick(item.id)> v-for="(item,index) in processoptions "
:key="index"
:title="item.name"
@click.native=stepclick(item.id)
>
</el-step> </el-step>
</el-steps> </el-steps>
</el-card> </el-card>
@ -59,8 +62,8 @@
font-weight: 700; font-weight: 700;
">流程分解</span> ">流程分解</span>
</div> </div>
<el-button type="primary" icon="el-icon-plus" @click="handlesubproducationCreate" <el-button v-if="checkPermission(['subproduction_create'])" type="primary" icon="el-icon-plus" @click="handlesubproducationCreate">
>新增 新增
</el-button> </el-button>
<el-table <el-table
height="190px" height="190px"
@ -87,33 +90,29 @@
<el-table-column label="排序"> <el-table-column label="排序">
<template slot-scope="scope">{{ scope.row.sort }}</template> <template slot-scope="scope">{{ scope.row.sort }}</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(['subproduction_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(['subproduction_delete'])"
type="danger" type="danger"
@click="handlesubproducationDelete(scope)" @click="handlesubproducationDelete(scope)"
>删除
</el-link
> >
删除
</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-dialog <el-dialog
:visible.sync="dialogVisiblesp" :visible.sync="dialogVisiblesp"
:title="dialogTypesp === 'edit' ? '编辑流程分解' : '新增流程分解'" :title="dialogTypesp === 'edit' ? '编辑流程分解' : '新增流程分解'"
@ -124,7 +123,6 @@
label-width="80px" label-width="80px"
label-position="right" label-position="right"
> >
<el-form-item label="名称" prop="name"> <el-form-item label="名称" prop="name">
<el-input v-model="subproducation.name"/> <el-input v-model="subproducation.name"/>
</el-form-item> </el-form-item>
@ -137,7 +135,6 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否质检" prop="need_combtest"> <el-form-item label="是否质检" prop="need_combtest">
<el-switch v-model="subproducation.need_combtest"></el-switch> <el-switch v-model="subproducation.need_combtest"></el-switch>
@ -149,8 +146,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="dialogVisiblesp = false">取消</el-button> <el-button type="danger" @click="dialogVisiblesp = false">取消</el-button>
@ -160,8 +155,13 @@
</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
>新增 v-if="checkPermission(['subproduction_update'])"
type="primary"
icon="el-icon-plus"
@click="handleinputCreate"
>
新增
</el-button> </el-button>
<el-table <el-table
:data="inputtableData" :data="inputtableData"
@ -190,16 +190,18 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['material_update'])" v-if="checkPermission(['subproduction_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(['subproduction_update'])"
type="danger" type="danger"
@click="handleinputDelete(scope)" @click="handleinputDelete(scope)"
>删除 >
删除
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
@ -244,8 +246,13 @@
</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="handleoutputCreate" <el-button
>新增 v-if="checkPermission(['subproduction_update'])"
type="primary"
icon="el-icon-plus"
@click="handleoutputCreate"
>
新增
</el-button> </el-button>
<el-table <el-table
:data="outputtableData" :data="outputtableData"
@ -279,16 +286,18 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['material_update'])" v-if="checkPermission(['subproduction_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(['subproduction_update'])"
type="danger" type="danger"
@click="handleoutputDelete(scope)" @click="handleoutputDelete(scope)"
>删除 >
删除
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
@ -336,8 +345,13 @@
</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
>新增 v-if="checkPermission(['subproduction_update'])"
type="primary"
icon="el-icon-plus"
@click="handleotherCreate"
>
新增
</el-button> </el-button>
<el-table <el-table
:data="othertableData" :data="othertableData"
@ -362,16 +376,18 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['material_update'])" v-if="checkPermission(['subproduction_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(['subproduction_update'])"
type="danger" type="danger"
@click="handleotherDelete(scope)" @click="handleotherDelete(scope)"
>删除 >
删除
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
@ -418,8 +434,13 @@
</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
>新增 v-if="checkPermission(['subproduction_update'])"
type="primary"
icon="el-icon-plus"
@click="handleusedstepCreate"
>
新增
</el-button> </el-button>
<el-table <el-table
:data="usedsteptableData" :data="usedsteptableData"
@ -433,7 +454,6 @@
</el-table-column> </el-table-column>
<el-table-column label="工序内检验"> <el-table-column label="工序内检验">
<template slot-scope="scope"> <template slot-scope="scope">
<!--{{ scope.row.need_test }}-->
<span v-if=" scope.row.need_test">检验</span> <span v-if=" scope.row.need_test">检验</span>
<span v-else>不检验</span> <span v-else>不检验</span>
</template> </template>
@ -447,20 +467,24 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['subproduction_update'])"
type="primary" type="primary"
@click="handleEdit(scope)" @click="handleEdit(scope)"
>编辑 >
编辑
</el-link> </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(['subproduction_update'])"
type="danger" type="danger"
@click="handleusedstepDelete(scope)" @click="handleusedstepDelete(scope)"
>删除 >
删除
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
@ -503,8 +527,13 @@
</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
>新增 v-if="checkPermission(['subproduction_update'])"
type="primary"
icon="el-icon-plus"
@click="handletechdocCreate"
>
新增
</el-button> </el-button>
<el-table <el-table
:data="techdoctableData" :data="techdoctableData"
@ -535,16 +564,18 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['process_update'])" v-if="checkPermission(['subproduction_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(['subproduction_update'])"
type="danger" type="danger"
@click="handletechdocDelete(scope)" @click="handletechdocDelete(scope)"
>删除 >
删除
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
@ -831,11 +862,11 @@
}) })
.then(async () => { .then(async () => {
await deletesubproducation(scope.row.id); await deletesubproducation(scope.row.id);
this.getsubproducationList() this.getsubproducationList();
this.$message.success("成功"); this.$message.success("成功");
}) })
.catch((err) => { .catch((err) => {
console.error(err); this.$message.error(err);
}); });
}, },
@ -847,7 +878,7 @@
this.subproducation.product = this.product; this.subproducation.product = this.product;
updatesubproducation(this.subproducation.id, this.subproducation).then((res) => { updatesubproducation(this.subproducation.id, this.subproducation).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
this.getsubproducationList() this.getsubproducationList();
this.dialogVisiblesp = false; this.dialogVisiblesp = false;
this.$message.success("成功"); this.$message.success("成功");
} }
@ -856,7 +887,7 @@
this.subproducation.product = this.product; this.subproducation.product = this.product;
createsubproducation(this.subproducation).then((res) => { createsubproducation(this.subproducation).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
this.getsubproducationList() this.getsubproducationList();
this.dialogVisiblesp = false; this.dialogVisiblesp = false;
this.$message.success("成功"); this.$message.success("成功");
} }
@ -906,11 +937,11 @@
}) })
.then(async () => { .then(async () => {
await deleteInputmaterial(scope.row.id); await deleteInputmaterial(scope.row.id);
this.getInputmaterialLists() this.getInputmaterialLists();
this.$message.success("成功"); this.$message.success("成功");
}) })
.catch((err) => { .catch((err) => {
console.error(err); this.$message.error(err);
}); });
}, },
@ -922,7 +953,7 @@
this.inputmaterial.subproduction = this.subproduction; this.inputmaterial.subproduction = this.subproduction;
updateInputmaterial(this.inputmaterial.id, this.inputmaterial).then((res) => { updateInputmaterial(this.inputmaterial.id, this.inputmaterial).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
this.getInputmaterialLists() this.getInputmaterialLists();
this.dialogVisible = false; this.dialogVisible = false;
this.$message.success("成功"); this.$message.success("成功");
} }
@ -931,7 +962,7 @@
this.inputmaterial.subproduction = this.subproduction; this.inputmaterial.subproduction = this.subproduction;
createInputmaterial(this.inputmaterial).then((res) => { createInputmaterial(this.inputmaterial).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
this.getInputmaterialLists() this.getInputmaterialLists();
this.dialogVisible = false; this.dialogVisible = false;
this.$message.success("成功"); this.$message.success("成功");
} }
@ -980,11 +1011,11 @@
}) })
.then(async () => { .then(async () => {
await deleteOutputmaterial(scope.row.id); await deleteOutputmaterial(scope.row.id);
this.getOutputmaterialLists() this.getOutputmaterialLists();
this.$message.success("成功"); this.$message.success("成功");
}) })
.catch((err) => { .catch((err) => {
console.error(err); this.$message.error(err);
}); });
}, },
async outputconfirm(form) { async outputconfirm(form) {
@ -995,7 +1026,7 @@
this.outputmaterial.subproduction = this.subproduction; this.outputmaterial.subproduction = this.subproduction;
updateOutputmaterial(this.outputmaterial.id, this.outputmaterial).then((res) => { updateOutputmaterial(this.outputmaterial.id, this.outputmaterial).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
this.getOutputmaterialLists() this.getOutputmaterialLists();
this.dialogVisible1 = false; this.dialogVisible1 = false;
this.$message.success("成功"); this.$message.success("成功");
} }
@ -1004,7 +1035,7 @@
this.outputmaterial.subproduction = this.subproduction; this.outputmaterial.subproduction = this.subproduction;
createOutputmaterial(this.outputmaterial).then((res) => { createOutputmaterial(this.outputmaterial).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
this.getOutputmaterialLists() this.getOutputmaterialLists();
this.dialogVisible1 = false; this.dialogVisible1 = false;
this.$message.success("成功"); this.$message.success("成功");
} }
@ -1056,7 +1087,7 @@
this.$message.success("成功"); this.$message.success("成功");
}) })
.catch((err) => { .catch((err) => {
console.error(err); this.$message.error(err);
}); });
}, },
@ -1068,7 +1099,7 @@
this.othermaterial.subproduction = this.subproduction; this.othermaterial.subproduction = this.subproduction;
updateOthermaterial(this.othermaterial.id, this.othermaterial).then((res) => { updateOthermaterial(this.othermaterial.id, this.othermaterial).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
this.getOthermaterialLists() this.getOthermaterialLists();
this.dialogVisibleother = false; this.dialogVisibleother = false;
this.$message.success("成功"); this.$message.success("成功");
} }
@ -1077,7 +1108,7 @@
this.othermaterial.subproduction = this.subproduction; this.othermaterial.subproduction = this.subproduction;
createOthermaterial(this.othermaterial).then((res) => { createOthermaterial(this.othermaterial).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
this.getOthermaterialLists() this.getOthermaterialLists();
this.dialogVisibleother = false; this.dialogVisibleother = false;
this.$message.success("成功"); this.$message.success("成功");
} }
@ -1141,11 +1172,11 @@
}) })
.then(async () => { .then(async () => {
await deleteUsedstep(scope.row.id); await deleteUsedstep(scope.row.id);
this.getUsedstepLists() this.getUsedstepLists();
this.$message.success("成功"); this.$message.success("成功");
}) })
.catch((err) => { .catch((err) => {
console.error(err); this.$message.error(err);
}); });
}, },
@ -1208,11 +1239,11 @@
handleUpSuccess(res, file, filelist) { handleUpSuccess(res, file, filelist) {
this.techdoc.file = res.data.id; this.techdoc.file = res.data.id;
console.log(res.data); // console.log(res.data);
this.techdoc.name = res.data.name; this.techdoc.name = res.data.name;
}, },
handleRemove(file, filelist) { handleRemove() {
this.techdoc.file = null; this.techdoc.file = null;
}, },
@ -1245,7 +1276,7 @@
this.$message.success("成功"); this.$message.success("成功");
}) })
.catch((err) => { .catch((err) => {
console.error(err); this.$message.error(err);
}); });
}, },

View File

@ -3,7 +3,6 @@
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>生产任务列表</span> <span>生产任务列表</span>
<el-input <el-input
v-model="listQuery.search" v-model="listQuery.search"
placeholder="任务编号/订单编号/合同编号/产品名称" placeholder="任务编号/订单编号/合同编号/产品名称"
@ -16,18 +15,18 @@
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="handleFilter" @click="handleFilter"
>搜索</el-button
> >
搜索
</el-button>
<el-button <el-button
class="filter-item" class="filter-item"
type="primary" type="primary"
icon="el-icon-refresh-left" icon="el-icon-refresh-left"
@click="resetFilter" @click="resetFilter"
>重置</el-button
> >
重置
</el-button>
</div> </div>
<el-table <el-table
:data="productionplanList.results" :data="productionplanList.results"
border border
@ -38,60 +37,53 @@
@row-click="tableRowClick" @row-click="tableRowClick"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="任务编号" prop="number" width="110">
<el-table-column label="任务编号" width="110">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column> </el-table-column>
<el-table-column label="订单编号" width="110"> <el-table-column label="订单编号" width="110">
<template slot-scope="scope">{{ scope.row.order_.number }}</template> <template slot-scope="scope">{{ scope.row.order_.number }}</template>
</el-table-column> </el-table-column>
<el-table-column label="合同编号" width="110"> <el-table-column label="合同编号" width="110">
<template slot-scope="scope" v-if="scope.row.order_">{{ <template slot-scope="scope" v-if="scope.row.order_">
scope.row.order_.contract_.number {{scope.row.order_.contract_.number}}
}}</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="产品名称" width="250"> <el-table-column label="产品名称" width="250">
<template slot-scope="scope">{{ scope.row.product_.name }}</template> <template slot-scope="scope">{{ scope.row.product_.name }}</template>
</el-table-column> </el-table-column>
<el-table-column label="产品型号" width="110"> <el-table-column label="产品型号" width="110">
<template slot-scope="scope">{{ <template slot-scope="scope">
scope.row.product_.specification {{scope.row.product_.specification}}
}}</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="产品单位" width="110"> <el-table-column label="产品单位" width="110">
<template slot-scope="scope">{{ scope.row.product_.unit }}</template> <template slot-scope="scope">{{ scope.row.product_.unit }}</template>
</el-table-column> </el-table-column>
<el-table-column label="生产数量" width="110"> <el-table-column label="生产数量" prop="count" width="110">
<template slot-scope="scope">{{ scope.row.count }}</template>
</el-table-column> </el-table-column>
<el-table-column label="状态" width="110"> <el-table-column label="状态" width="110">
<template slot-scope="scope">{{ state_[scope.row.state] }}</template> <template slot-scope="scope">{{ state_[scope.row.state] }}</template>
</el-table-column> </el-table-column>
<el-table-column label="计划开工时间" width="110"> <el-table-column label="计划开工时间" prop="start_date" width="110">
<template slot-scope="scope">{{ scope.row.start_date }}</template>
</el-table-column> </el-table-column>
<el-table-column label="计划完工时间" width="110"> <el-table-column label="计划完工时间" prop="end_date" width="110">
<template slot-scope="scope">{{ scope.row.end_date }}</template>
</el-table-column> </el-table-column>
<el-table-column label="交付截止时间" width="110"> <el-table-column label="交付截止时间" width="110">
<template slot-scope="scope">{{ <template slot-scope="scope">
scope.row.order_.delivery_date {{scope.row.order_.delivery_date}}
}}</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="操作" label="操作"
fixed="right" fixed="right"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="scope.row.is_planed&&checkPermission(['testitem_detail'])"
type="primary" type="primary"
v-if="scope.row.is_planed"
@click="handleselectplan(scope)" @click="handleselectplan(scope)"
>详情 >
详情
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
@ -107,9 +99,9 @@
<el-card class="box-card"> <el-card class="box-card">
<div style="height: 40px;line-height: 40px;background: #F5F7FA;padding-left: 20px;">甘特图</div> <div style="height: 40px;line-height: 40px;background: #F5F7FA;padding-left: 20px;">甘特图</div>
<gantt <gantt
style="position: relative"
v-if="proList.length>0" v-if="proList.length>0"
:proList="proList" :proList="proList"
style="position: relative"
></gantt> ></gantt>
</el-card> </el-card>
</div> </div>
@ -139,7 +131,8 @@ export default {
50: "已完成", 50: "已完成",
60: "军检完成", 60: "军检完成",
70: "暂停", 70: "暂停",
80: "终止"}, 80: "终止"
},
listLoading: true, listLoading: true,
proList: [], proList: [],
@ -176,8 +169,8 @@ export default {
list.push(item) list.push(item)
} }
}); });
debugger; // debugger;
console.log(list); // console.log(list);
list.forEach(item => { list.forEach(item => {
if (!item.children || item.children.length < 1) { if (!item.children || item.children.length < 1) {
let startTime = new Date(item.start_date).getTime(); let startTime = new Date(item.start_date).getTime();
@ -238,8 +231,8 @@ export default {
arr.push(obj); arr.push(obj);
} }
that.proList = arr; that.proList = arr;
debugger; // debugger;
console.log(arr) // console.log(arr)
}); });
} else { } else {
that.$message.error(res.msg); that.$message.error(res.msg);

View File

@ -16,14 +16,16 @@
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="handleFilter" @click="handleFilter"
>搜索 >
搜索
</el-button> </el-button>
<el-button <el-button
class="filter-item" class="filter-item"
type="primary" type="primary"
icon="el-icon-refresh-left" icon="el-icon-refresh-left"
@click="resetFilter" @click="resetFilter"
>重置 >
重置
</el-button> </el-button>
<el-table <el-table
:data="productionplanList.results" :data="productionplanList.results"
@ -34,54 +36,48 @@
height="300" height="300"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="任务编号" width="110"> <el-table-column label="任务编号" prop="number" width="110">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column> </el-table-column>
<el-table-column label="订单编号" width="110"> <el-table-column label="订单编号" width="110">
<template slot-scope="scope">{{ scope.row.order_.number }}</template> <template slot-scope="scope">{{ scope.row.order_.number }}</template>
</el-table-column> </el-table-column>
<el-table-column label="合同编号" width="110"> <el-table-column label="合同编号" width="110">
<template slot-scope="scope" v-if="scope.row.contract">{{ <template slot-scope="scope" v-if="scope.row.contract">
scope.row.order_.contract_.number {{scope.row.order_.contract_.number }}
}}</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="产品名称" width="150" show-overflow-tooltip> <el-table-column label="产品名称" width="150" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.product_.name }}</template> <template slot-scope="scope">{{ scope.row.product_.name }}</template>
</el-table-column> </el-table-column>
<el-table-column label="产品型号" width="110"> <el-table-column label="产品型号" width="110">
<template slot-scope="scope">{{ <template slot-scope="scope">
scope.row.product_.specification {{scope.row.product_.specification}}
}}</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="产品单位" width="110"> <el-table-column label="产品单位" width="110">
<template slot-scope="scope">{{ scope.row.product_.unit }}</template> <template slot-scope="scope">{{ scope.row.product_.unit }}</template>
</el-table-column> </el-table-column>
<el-table-column label="生产数量" width="110"> <el-table-column label="生产数量" prop="count" width="110">
<template slot-scope="scope">{{ scope.row.count }}</template>
</el-table-column> </el-table-column>
<el-table-column label="状态" width="110"> <el-table-column label="状态" width="110">
<template slot-scope="scope">{{ state_[scope.row.state] }}</template> <template slot-scope="scope">{{ state_[scope.row.state] }}</template>
</el-table-column> </el-table-column>
<el-table-column label="计划开工时间" width="110"> <el-table-column label="计划开工时间" prop="start_date" width="110">
<template slot-scope="scope">{{ scope.row.start_date }}</template>
</el-table-column> </el-table-column>
<el-table-column label="计划完工时间" width="110"> <el-table-column label="计划完工时间" prop="end_date" width="110">
<template slot-scope="scope">{{ scope.row.end_date }}</template>
</el-table-column> </el-table-column>
<el-table-column label="交货日期" width="110"> <el-table-column label="交货日期" width="110">
<template slot-scope="scope">{{ <template slot-scope="scope">
scope.row.order_.delivery_date {{scope.row.order_.delivery_date}}
}}</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否生成子计划" width="120"> <el-table-column label="是否生成子计划" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.is_planed == false"></el-tag> <el-tag v-if="scope.row.is_planed == false"></el-tag>
<el-tag v-if="scope.row.is_planed == true"></el-tag> <el-tag v-if="scope.row.is_planed == true"></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" width="160"> <el-table-column label="创建时间" prop="create_time" width="160">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
@ -90,31 +86,40 @@
width="150px" width="150px"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="warning" <el-link
v-if="scope.row.state != 70" v-if="checkPermission(['plan_toggle'])&&scope.row.state !== 70"
type="warning"
@click="handlestatesuspended(scope)" @click="handlestatesuspended(scope)"
>暂停 >
暂停
</el-link> </el-link>
<el-link <el-link
v-if="checkPermission(['plan_toggle'])&&scope.row.state === 70"
type="primary" type="primary"
v-if="scope.row.state == 70"
@click="handlestate(scope)" @click="handlestate(scope)"
>启用 >
启用
</el-link> </el-link>
<el-link <el-link
v-if="checkPermission(['plan_stop'])&&scope.row.state === 70"
type="danger" type="danger"
v-if="scope.row.state == 70"
@click="handlestatestop(scope)" @click="handlestatestop(scope)"
>终止 >
终止
</el-link> </el-link>
<el-link <el-link
v-if="checkPermission(['plan_subcreate'])&&scope.row.is_planed"
type="primary" type="primary"
v-if="scope.row.is_planed"
@click="handleselectplan(scope)" @click="handleselectplan(scope)"
>查看子计划 >
查看子计划
</el-link> </el-link>
<el-link type="primary" v-else @click="handleWork(scope)" <el-link
>生成子计划 v-if="checkPermission(['plan_subcreate'])&&!scope.row.is_planed"
type="primary"
@click="handleWork(scope)"
>
生成子计划
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
@ -161,7 +166,8 @@
<el-table-column label="产品型号" width="110"> <el-table-column label="产品型号" width="110">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.product_.specification scope.row.product_.specification
}}</template> }}
</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>
@ -182,10 +188,12 @@
width="80px" width="80px"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" <el-link
v-if="checkPermission(['warehouse_update'])" v-if="checkPermission(['plan_create'])"
type="primary"
@click="handleclick(scope)" @click="handleclick(scope)"
>排产 >
排产
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
@ -229,10 +237,18 @@
</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 type="primary" @click="confirm('Form')">确认</el-button> 取消
</el-button>
<el-button
type="primary"
@click="confirm('Form')"
>
确认
</el-button>
</div> </div>
</el-dialog> </el-dialog>
</el-tab-pane> </el-tab-pane>

View File

@ -6,10 +6,16 @@
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>合同订单列表</span> <span>合同订单列表</span>
</div> </div>
<el-button type="primary" @click="handlecount">计算物料</el-button> <el-button
v-if="checkPermission(['resource_cal'])"
type="primary"
@click="handlecount"
>
计算物料
</el-button>
<el-table <el-table
:data="orderList.results"
ref="multipleTable" ref="multipleTable"
:data="orderList.results"
border border
fit fit
stripe stripe
@ -26,7 +32,8 @@
<el-table-column label="所需产品" show-overflow-tooltip width="150"> <el-table-column label="所需产品" show-overflow-tooltip width="150">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.product_.name scope.row.product_.name
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="产品数量"> <el-table-column label="产品数量">
@ -35,38 +42,45 @@
<el-table-column label="已派数量"> <el-table-column label="已派数量">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.planed_count scope.row.planed_count
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="产品型号"> <el-table-column label="产品型号">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.product_.specification scope.row.product_.specification
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="客户名称" show-overflow-tooltip width="150"> <el-table-column label="客户名称" show-overflow-tooltip width="150">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.customer_.name scope.row.customer_.name
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="合同编号" show-overflow-tooltip width="150"> <el-table-column label="合同编号" show-overflow-tooltip width="150">
<template slot-scope="scope" v-if=" scope.row.contract_">{{ <template slot-scope="scope" v-if=" scope.row.contract_">{{
scope.row.contract_.number scope.row.contract_.number
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="合同名称" show-overflow-tooltip width="150"> <el-table-column label="合同名称" show-overflow-tooltip width="150">
<template slot-scope="scope" v-if=" scope.row.contract_">{{ <template slot-scope="scope" v-if=" scope.row.contract_">{{
scope.row.contract_.name scope.row.contract_.name
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="交货日期" width="110"> <el-table-column label="交货日期" width="110">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.delivery_date scope.row.delivery_date
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" width="110"> <el-table-column label="创建时间" width="110">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.create_time scope.row.create_time
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="计划生产数" width="150px" fixed="right"> <el-table-column label="计划生产数" width="150px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
@ -99,12 +113,13 @@
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>物料配置</span> <span>物料配置</span>
<el-button <el-button
v-if="butshow&&checkPermission(['resource_cal'])"
type="primary"
style="float: right; " style="float: right; "
@click="handlebcpcount" @click="handlebcpcount"
type="primary"
v-if="butshow"
>半成品折合</el-button
> >
半成品折合
</el-button>
</div> </div>
<el-table <el-table
:data="materialpzTable" :data="materialpzTable"
@ -123,8 +138,8 @@
</el-table-column> </el-table-column>
<el-table-column label="物料类型"> <el-table-column label="物料类型">
<template slot-scope="scope"> <template slot-scope="scope">
{{ options_[scope.row.type] }}</template {{ options_[scope.row.type] }}
> </template>
</el-table-column> </el-table-column>
<el-table-column label="物料编号"> <el-table-column label="物料编号">
<template slot-scope="scope">{{ scope.row.number }}</template> <template slot-scope="scope">{{ scope.row.number }}</template>
@ -142,30 +157,26 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div v-else>{{ scope.row.count }}</div></template <div v-else>{{ scope.row.count }}</div>
> </template>
</el-table-column> </el-table-column>
<el-table-column label="剩余量"> <el-table-column label="剩余量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag <el-tag
v-if=" v-if="scope.row.count_safe != null &&scope.row.count_safe >scope.row.inv_count - scope.row.count"
scope.row.count_safe != null &&
scope.row.count_safe >
scope.row.inv_count - scope.row.count
"
type="danger" type="danger"
> >
{{ scope.row.inv_count - scope.row.count }}</el-tag {{ scope.row.inv_count - scope.row.count }}
> </el-tag>
<el-tag v-else> <el-tag v-else>
{{ scope.row.inv_count - scope.row.count }}</el-tag {{ scope.row.inv_count - scope.row.count }}
> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="安全库存"> <el-table-column label="安全库存">
<template slot-scope="scope">{{ <template slot-scope="scope">
scope.row.count_safe {{scope.row.count_safe }}
}}</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
@ -218,8 +229,8 @@
</el-table-column> </el-table-column>
<el-table-column label="设备编号"> <el-table-column label="设备编号">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.number }}</template {{ scope.row.number }}
> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备型号"> <el-table-column label="设备型号">
<template slot-scope="scope"> {{ scope.row.model }}</template> <template slot-scope="scope"> {{ scope.row.model }}</template>