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',
data
})
}
//详情
export function ticketread(id) {
return request({
url: `/wf/ticket/${id}/`,
method: 'get',
})
}
//接单
export function ticketAccpet(id,data) {

View File

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

View File

@ -1,91 +1,244 @@
<template>
<div class="app-container">
<el-card style="margin-top: 2px">
<el-tabs v-model="activeName" type="card" >
<el-tab-pane label="总览" name="1" >
<el-table
:data="productionplan.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">{{ scope.row.product_.name }}</template>
</el-table-column>
<el-table-column label="规格型号">
<template slot-scope="scope">{{
scope.row.product_.specification
}}</template>
</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>
<el-table-column label="热弯">
<template slot-scope="scope" v-if="scope.row.process_json['02']">{{ scope.row.process_json['02'].rate }}%</template>
</el-table-column>
<el-table-column label="化学钢化">
<template slot-scope="scope" v-if="scope.row.process_json['03']">{{ scope.row.process_json['03'].rate }}%</template>
</el-table-column>
<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 label="夹层">
<template slot-scope="scope" v-if="scope.row.process_json['05']">{{ scope.row.process_json['05'].rate }}%</template>
</el-table-column>
<el-table-column label="包边">
<template slot-scope="scope" v-if="scope.row.process_json['06']">{{ scope.row.process_json['06'].rate }}%</template>
</el-table-column>
<el-table-column label="装框">
<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
>
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="总览" name="1">
<el-table
:data="productionplan.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">{{
scope.row.product_.name
}}</template>
</el-table-column>
<el-table-column label="规格型号">
<template slot-scope="scope">{{
scope.row.product_.specification
}}</template>
</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>
<el-table-column label="热弯">
<template slot-scope="scope" v-if="scope.row.process_json['02']"
>{{ scope.row.process_json["02"].rate }}%</template
>
</el-table-column>
<el-table-column label="化学钢化">
<template slot-scope="scope" v-if="scope.row.process_json['03']"
>{{ scope.row.process_json["03"].rate }}%</template
>
</el-table-column>
<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 label="夹层">
<template slot-scope="scope" v-if="scope.row.process_json['05']"
>{{ scope.row.process_json["05"].rate }}%</template
>
</el-table-column>
<el-table-column label="包边">
<template slot-scope="scope" v-if="scope.row.process_json['06']"
>{{ scope.row.process_json["06"].rate }}%</template
>
</el-table-column>
<el-table-column label="装框">
<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>
</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-tab-pane>
</el-tabs>
<template v-if="item.field_type==='int'">
<el-input v-model="item.default_value" type="number" :placeholder="item.description" oninput="value=value.replace(/[^\d]/g,'')" />
</template>
<template v-if="item.field_type==='float'">
<el-input v-model="item.default_value" type="number" :placeholder="item.description" />
</template>
<template v-if="item.field_type==='date'">
<el-date-picker
v-model="item.default_value"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width: 100%"
>
</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>
</div>
</template>
<script>
import { getProductionplanList } from "@/api/pm";
import { getwproductticketList } from "@/api/wpm";
import { ticketread } from "@/api/workflow";
import checkPermission from "@/utils/permission";
import { createTestrecord } from "@/api/inm";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
@ -94,50 +247,83 @@ export default {
components: { Pagination },
data() {
return {
process_json_:{
"01":'冷加工',
"02":'热弯',
"03":'化学钢化',
"04":'镀膜',
"05":'夹层',
"06":'包边',
"07":'装框',
process_json_: {
"01": "冷加工",
"02": "热弯",
"03": "化学钢化",
"04": "镀膜",
"05": "夹层",
"06": "包边",
"07": "装框",
},
productionplan:{
decision_: {
10: "返工",
20: "返修",
30: "报废",
40: "让步接受",
50: "偏离许可",
60: "降级使用",
70: "退回供方",
80: "召回",
},
productionplan: {
count: 0,
},
activeName:"1",
listQuery: {
wproductticket: {
count: 0,
},
activeName: "1",
listQuery: {
page: 1,
page_size: 20,
},
listQuery2: {
page: 1,
page_size: 20,
},
limitedRetrial:false,
customfieldList: [],
};
},
computed: {},
watch: {},
created() {
this.getList();
this.getList(); //总览列表
this.getList2(); //不合格玻璃审批工单列表
},
methods: {
checkPermission,
//总览列表
getList() {
getProductionplanList(this.listQuery).then((response) => {
if (response.data) {
this.productionplan = response.data;
}
});
},
handledetail(scope)
handledetail(scope) {
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.$router.push({name: "taskdetails", params: { id: scope.row.id }, })
this.limitedRetrial=true;
ticketread(scope.row.ticket).then((response) => {
if (response.data) {
this.customfieldList = response.data;
}
});
}
},
};
</script>

View File

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

View File

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