guochengjianyan

This commit is contained in:
shilixia 2021-12-31 13:19:21 +08:00
parent d031f16be7
commit a0186dbdbb
5 changed files with 349 additions and 113 deletions

View File

@ -153,6 +153,15 @@ export function createTicket(data) {
method: 'post', method: 'post',
data data
}) })
}
//详情
export function ticketread(id) {
return request({
url: `/wf/ticket/${id}/`,
method: 'get',
})
} }
//接单 //接单
export function ticketAccpet(id,data) { export function ticketAccpet(id,data) {

View File

@ -313,6 +313,14 @@ export function getRetrial(id) {
method: 'GET', method: 'GET',
}) })
} }
//玻璃审批工单
export function getwproductticketList(query) {
return request({
url: '/wpm/wproduct_ticket/',
method: 'get',
params: query
})
}

View File

@ -1,91 +1,244 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card style="margin-top: 2px"> <el-card style="margin-top: 2px">
<el-tabs v-model="activeName" type="card" > <el-tabs v-model="activeName" type="card">
<el-tab-pane label="总览" name="1" > <el-tab-pane label="总览" name="1">
<el-table <el-table
:data="productionplan.results"
:data="productionplan.results" border
border fit
fit stripe
stripe highlight-current-row
highlight-current-row height="620"
height="620" v-el-height-adaptive-table="{ bottomOffset: 40 }"
v-el-height-adaptive-table="{bottomOffset: 40}" >
> <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.number }}</template>
<template slot-scope="scope">{{ scope.row.number }}</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_.name }}</template> scope.row.product_.name
</el-table-column> }}</template>
<el-table-column label="规格型号"> </el-table-column>
<template slot-scope="scope">{{ <el-table-column label="规格型号">
scope.row.product_.specification <template slot-scope="scope">{{
}}</template> scope.row.product_.specification
</el-table-column> }}</template>
<el-table-column label="合格率" > </el-table-column>
<el-table-column label="冷加工"> <el-table-column label="合格率">
<template slot-scope="scope" v-if="scope.row.process_json['01']">{{ scope.row.process_json['01'].rate }}%</template> <el-table-column label="冷加工">
</el-table-column> <template slot-scope="scope" v-if="scope.row.process_json['01']"
<el-table-column label="热弯"> >{{ scope.row.process_json["01"].rate }}%</template
<template slot-scope="scope" v-if="scope.row.process_json['02']">{{ scope.row.process_json['02'].rate }}%</template> >
</el-table-column> </el-table-column>
<el-table-column label="化学钢化"> <el-table-column label="热弯">
<template slot-scope="scope" v-if="scope.row.process_json['03']">{{ scope.row.process_json['03'].rate }}%</template> <template slot-scope="scope" v-if="scope.row.process_json['02']"
</el-table-column> >{{ scope.row.process_json["02"].rate }}%</template
<el-table-column label="镀膜"> >
<template slot-scope="scope" v-if="scope.row.process_json['04']">{{ scope.row.process_json['04'].rate }}%</template> </el-table-column>
</el-table-column> <el-table-column label="化学钢化">
<el-table-column label="夹层"> <template slot-scope="scope" v-if="scope.row.process_json['03']"
<template slot-scope="scope" v-if="scope.row.process_json['05']">{{ scope.row.process_json['05'].rate }}%</template> >{{ scope.row.process_json["03"].rate }}%</template
</el-table-column> >
<el-table-column label="包边"> </el-table-column>
<template slot-scope="scope" v-if="scope.row.process_json['06']">{{ scope.row.process_json['06'].rate }}%</template> <el-table-column label="镀膜">
</el-table-column> <template slot-scope="scope" v-if="scope.row.process_json['04']"
<el-table-column label="装框"> >{{ scope.row.process_json["04"].rate }}%</template
<template slot-scope="scope" v-if="scope.row.process_json['07']">{{ scope.row.process_json['07'].rate }}%</template> >
</el-table-column> </el-table-column>
</el-table-column> <el-table-column label="夹层">
<el-table-column label="创建时间"> <template slot-scope="scope" v-if="scope.row.process_json['05']"
<template slot-scope="scope">{{ scope.row.create_time }}</template> >{{ scope.row.process_json["05"].rate }}%</template
</el-table-column> >
<el-table-column label="操作"> </el-table-column>
<template slot-scope="scope"> <el-table-column label="包边">
<template slot-scope="scope" v-if="scope.row.process_json['06']"
<el-link >{{ scope.row.process_json["06"].rate }}%</template
v-if="checkPermission(['material_update'])" >
type="primary" </el-table-column>
@click="handledetail(scope)" <el-table-column label="装框">
>详情</el-link <template slot-scope="scope" v-if="scope.row.process_json['07']"
> >{{ scope.row.process_json["07"].rate }}%</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 label="操作">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['material_update'])"
type="primary"
@click="handledetail(scope)"
>详情</el-link
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="productionplan.count > 0"
:total="productionplan.count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane label="不合格玻璃" name="2">
<el-table
:data="wproductticket.results"
border
fit
stripe
highlight-current-row
height="620"
v-el-height-adaptive-table="{ bottomOffset: 40 }"
>
<el-table-column type="index" width="50" />
<el-table-column label="玻璃编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
<el-table-column label="订单编号">
<template slot-scope="scope" v-if="scope.row.order_">{{
scope.row.order_.number
}}</template>
</el-table-column>
<el-table-column label="产品名称">
<template slot-scope="scope" v-if="scope.row.product_">{{
scope.row.product_.name
}}</template>
</el-table-column>
<el-table-column label="规格型号">
<template slot-scope="scope" v-if="scope.row.product_">{{
scope.row.product_.specification
}}</template>
</el-table-column>
<el-table-column label="责任工序">
<template slot-scope="scope" v-if="scope.row.resp_process_">{{
scope.row.resp_process_.name
}}</template>
</el-table-column>
<el-table-column label="处理结果">
<template slot-scope="scope">{{
decision_[scope.row.decision]
}}</template>
</el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">{{
scope.row.create_time
}}</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['material_update'])"
type="primary"
@click="handledetailbhg(scope)"
>查看</el-link
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="wproductticket.count > 0"
:total="wproductticket.count"
:page.sync="listQuery2.page"
:limit.sync="listQuery2.page_size"
@pagination="getList2"
/>
<!--不合格半成品重审-->
<el-dialog title="不合格半成品重审" :close-on-click-modal="false" :visible.sync="limitedRetrial">
<el-form label-width="130px" label-position="right">
<el-form-item :label="item.field_name" v-for="item in customfieldList.ticket_data_" :key="item.id" v-show="!item.is_hidden">
<template v-if="item.field_type=='string'">
<el-input v-model="item.default_value" :placeholder="item.description" />
</template> </template>
</el-table-column> <template v-if="item.field_type==='int'">
</el-table> <el-input v-model="item.default_value" type="number" :placeholder="item.description" oninput="value=value.replace(/[^\d]/g,'')" />
<pagination </template>
v-show="productionplan.count > 0" <template v-if="item.field_type==='float'">
:total="productionplan.count" <el-input v-model="item.default_value" type="number" :placeholder="item.description" />
:page.sync="listQuery.page" </template>
:limit.sync="listQuery.page_size" <template v-if="item.field_type==='date'">
@pagination="getList" <el-date-picker
/> v-model="item.default_value"
</el-tab-pane> type="date"
<el-tab-pane label="不合格物料" name="2"> placeholder="选择日期"
value-format="yyyy-MM-dd"
</el-tab-pane> style="width: 100%"
</el-tabs> >
</el-date-picker>
</template>
<template v-if="item.field_type==='datetime'">
<el-date-picker
v-model="item.default_value"
type="datetime"
placeholder="选择日期"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
>
</el-date-picker>
</template>
<template v-if="item.field_type==='select'">
<el-select style="width: 100%" v-model="item.default_value" placeholder="请选择">
<el-option
v-for="item1 in item.field_choice"
:key="item1.id"
:label="item1.name"
:value="item1.id"
>
</el-option>
</el-select>
</template>
<template v-if="item.field_type==='selects'">
<el-select style="width: 100%" multiple v-model="item.default_value" placeholder="请选择">
<el-option
v-for="item1 in item.field_choice"
:key="item1.id"
:label="item1.name"
:value="item1.id"
>
</el-option>
</el-select>
</template>
<template v-if="item.field_type==='textarea'">
<el-input type="textarea" :rows="3" v-model="item.default_value" placeholder="内容" />
</template>
<template v-if="item.field_type==='file'">
<el-upload
ref="upload"
:action="upUrl"
:on-preview="handlePreview"
:on-success="handleUpSuccess"
:on-remove="handleRemove"
:headers="upHeaders"
:file-list="fileList"
:limit="1"
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
>
<el-button size="small" type="primary">上传文件</el-button>
</el-upload>
</template>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="limitedRetrial = false"> </el-button>
</div>
</el-dialog>
</el-tab-pane>
</el-tabs>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import { getProductionplanList } from "@/api/pm"; import { getProductionplanList } from "@/api/pm";
import { getwproductticketList } from "@/api/wpm";
import { ticketread } from "@/api/workflow";
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import { createTestrecord } from "@/api/inm"; import { createTestrecord } from "@/api/inm";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
@ -94,49 +247,82 @@ export default {
components: { Pagination }, components: { Pagination },
data() { data() {
return { return {
process_json_: {
process_json_:{ "01": "冷加工",
"02": "热弯",
"01":'冷加工', "03": "化学钢化",
"02":'热弯', "04": "镀膜",
"03":'化学钢化', "05": "夹层",
"04":'镀膜', "06": "包边",
"05":'夹层', "07": "装框",
"06":'包边',
"07":'装框',
}, },
productionplan:{ decision_: {
10: "返工",
20: "返修",
30: "报废",
40: "让步接受",
50: "偏离许可",
60: "降级使用",
70: "退回供方",
80: "召回",
},
productionplan: {
count: 0, count: 0,
}, },
activeName:"1", wproductticket: {
listQuery: { count: 0,
},
activeName: "1",
listQuery: {
page: 1, page: 1,
page_size: 20, page_size: 20,
}, },
listQuery2: {
page: 1,
page_size: 20,
},
limitedRetrial:false,
customfieldList: [],
}; };
}, },
computed: {}, computed: {},
watch: {}, watch: {},
created() { created() {
this.getList(); this.getList(); //总览列表
this.getList2(); //不合格玻璃审批工单列表
}, },
methods: { methods: {
checkPermission, checkPermission,
//总览列表
getList() { getList() {
getProductionplanList(this.listQuery).then((response) => { getProductionplanList(this.listQuery).then((response) => {
if (response.data) { if (response.data) {
this.productionplan = response.data; this.productionplan = response.data;
} }
}); });
}, },
handledetail(scope) handledetail(scope) {
{ this.$router.push({ name: "taskdetails", params: { id: scope.row.id } });
this.$router.push({name: "taskdetails", params: { id: scope.row.id }, }) },
}
//不合格玻璃审批工单列表
getList2() {
getwproductticketList(this.listQuery2).then((response) => {
if (response.data) {
this.wproductticket = response.data;
}
});
},
//不合格玻璃审理单查看
handledetailbhg(scope)
{
this.limitedRetrial=true;
ticketread(scope.row.ticket).then((response) => {
if (response.data) {
this.customfieldList = response.data;
}
});
}
}, },
}; };

View File

@ -27,6 +27,7 @@
</template> </template>
</el-table-column> </el-table-column>
<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>
@ -237,15 +238,19 @@
<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">
{{ ng_sign_[scope.row.ng_sign] }}
</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
type="danger" type="danger"
v-if="checkPermission(['warehouse_update'])" v-if="checkPermission(['warehouse_update'])"
@click="handleScrap(scope)" @click="handleScrap(scope)"
>报废 >报废
</el-link>!--> </el-link>
<el-link type="primary" <el-link type="primary"
v-if="!scope.row.ticket" v-if="!scope.row.ticket"
@click="handleRetrial(scope)" @click="handleRetrial(scope)"
@ -653,13 +658,15 @@
formLabelWidthL:'', formLabelWidthL:'',
actstate_: { actstate_: {
6: "待复检", 6: "待复检",
10: "生产中", 10: "操作进行中",
20: "待检验", 20: "待检验",
30: "已合格", 30: "已合格",
40: "库存中", 40: "库存中",
50: "不合格", 50: "不合格",
60: "待成品检验", 60: "待成品检验",
26:"待夹层检验", 8: "操作准备中",
26: "待夹层检验",
70: "报废",
}, },
checkTypes:{ checkTypes:{
10:"子工序检验", 10:"子工序检验",
@ -668,6 +675,17 @@
36:"夹层检验", 36:"夹层检验",
40:"成品检验", 40:"成品检验",
}, },
ng_sign_: {
10: "返工",
20: "返修",
30: "报废",
40: "让步接受",
50: "偏离许可",
60: "降级使用",
70: "退回供方",
80: "召回",
},
choice: [ choice: [
{ {
value: true, value: true,

View File

@ -180,7 +180,11 @@
actstate_[scope.row.act_state] actstate_[scope.row.act_state]
}}</template> }}</template>
</el-table-column> </el-table-column>
<el-table-column label="不合格标记">
<template slot-scope="scope">
{{ ng_sign_[scope.row.ng_sign] }}
</template>
</el-table-column>
<el-table-column label="更新时间"> <el-table-column label="更新时间">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.update_time scope.row.update_time
@ -765,6 +769,17 @@ export default {
26: "待夹层检验", 26: "待夹层检验",
70: "报废", 70: "报废",
}, },
ng_sign_: {
10: "返工",
20: "返修",
30: "报废",
40: "让步接受",
50: "偏离许可",
60: "降级使用",
70: "退回供方",
80: "召回",
},
state_: { state_: {
0: "制定中", 0: "制定中",
1: "已下达", 1: "已下达",