10.26日要修改内容以及检验页面
This commit is contained in:
parent
e246e6f33b
commit
9fb27aa062
|
|
@ -164,5 +164,13 @@ export default {
|
|||
);
|
||||
}
|
||||
},
|
||||
stop:{
|
||||
name: "停止任务",
|
||||
req: async function(id){
|
||||
return await http.post(
|
||||
`${config.API_URL}/pm/utask/${id}/stop/`
|
||||
);
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<template>
|
||||
<div class="sc-form-table" ref="scFormTable">
|
||||
<el-table :data="data" ref="table" border stripe>
|
||||
<el-table :data="data" ref="table" border >
|
||||
<el-table-column type="index" width="50" fixed="left">
|
||||
<template #header>
|
||||
<el-button v-if="!hideAdd" type="primary" icon="el-icon-plus" size="small" circle @click="rowAdd"></el-button>
|
||||
|
|
|
|||
|
|
@ -811,6 +811,69 @@ const routes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
//检验管理 qm
|
||||
{
|
||||
"name": "qm",
|
||||
"path": "/qm",
|
||||
"meta": {
|
||||
"title": "检验管理",
|
||||
"icon": "el-icon-grid",
|
||||
"type": "menu",
|
||||
"perms": ["qm"]
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "income",
|
||||
"path": "/qm/income",
|
||||
"meta": {
|
||||
"title": "入厂检验",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["qm"]
|
||||
},
|
||||
"component": "qm/income"
|
||||
},
|
||||
{
|
||||
"name": "first",
|
||||
"path": "/qm/first",
|
||||
"meta": {
|
||||
"title": "首件检验",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["qm"]
|
||||
},
|
||||
"component": "qm/first"
|
||||
},
|
||||
{
|
||||
"name": "qmProcess",
|
||||
"path": "/qm/qmProcess",
|
||||
"meta": {
|
||||
"title": "过程检验",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["qm"]
|
||||
},
|
||||
"component": "qm/process"
|
||||
},
|
||||
{
|
||||
"name": "behavior",
|
||||
"path": "/qm/behavior",
|
||||
"meta": {
|
||||
"title": "性能检验",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["qm"]
|
||||
},
|
||||
"component": "qm/behavior"
|
||||
},
|
||||
{
|
||||
"name": "product",
|
||||
"path": "/qm/product",
|
||||
"meta": {
|
||||
"title": "成品检验",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["qm"]
|
||||
},
|
||||
"component": "qm/product"
|
||||
}
|
||||
]
|
||||
},
|
||||
//库存 inm
|
||||
{
|
||||
"name": "inm",
|
||||
|
|
|
|||
|
|
@ -24,15 +24,12 @@
|
|||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
|
||||
</el-aside>
|
||||
<el-main class="nopadding">
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="table_add"
|
||||
v-auth="'route.create'"></el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="table_add" v-auth="'route.create'"></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
|
|
@ -72,10 +69,8 @@
|
|||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="30%">
|
||||
|
|
@ -85,13 +80,20 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="工序" prop="process">
|
||||
<el-select v-model="form.process" placeholder="工序" clearable style="width: 100%;" :disabled="updateDisable">
|
||||
<el-option v-for="item in processOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
<el-option
|
||||
v-for="item in processOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出材率" prop="out_rate">
|
||||
<el-input-number v-model="form.out_rate" :max="100" :precision="1" :step="0.1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="统计工序">
|
||||
<el-switch v-model="form.is_count_utask" />
|
||||
</el-form-item>
|
||||
<el-form-item label="自动排产" prop="is_autotask">
|
||||
<el-switch v-model="form.is_autotask" />
|
||||
</el-form-item>
|
||||
|
|
@ -99,23 +101,15 @@
|
|||
<el-select v-model="form.material_in" placeholder="物料" clearable style="width: 100%;">
|
||||
<el-option v-for="item in materialOptions" :key="item.id" :label="item.name" :value="item.id">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
<span style="
|
||||
float: right;
|
||||
color: '#E6A23C';
|
||||
font-size: 13px;
|
||||
" v-if="item.is_hidden">{{ item.process_name }}-隐</span>
|
||||
<span style="float: right;color: '#E6A23C';font-size: 13px;" v-if="item.is_hidden">{{ item.process_name }}-隐</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="主要输出" prop="material_out">
|
||||
<el-select v-model="form.material_out" placeholder="物料" clearable style="width: 100%;">
|
||||
<el-option v-for="item in materialOptions" :key="item.id" :label="item.name" :value="item.id"><span
|
||||
style="float: left">{{ item.name }}</span>
|
||||
<span style="
|
||||
float: right;
|
||||
color: '#E6A23C';
|
||||
font-size: 13px;
|
||||
" v-if="item.is_hidden">{{ item.process_name }}-隐</span></el-option>
|
||||
<el-option v-for="item in materialOptions" :key="item.id" :label="item.name" :value="item.id">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
<span style="float: right;color: '#E6A23C';font-size: 13px;" v-if="item.is_hidden">{{ item.process_name }}-隐</span></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
|
@ -126,13 +120,14 @@
|
|||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
const defaultForm = {
|
||||
const defaultForm = {
|
||||
process: null,
|
||||
sort: 1,
|
||||
out_rate: 100,
|
||||
is_autotask: true,
|
||||
};
|
||||
export default {
|
||||
is_count_utask:false
|
||||
};
|
||||
export default {
|
||||
name: "route",
|
||||
components: {},
|
||||
data() {
|
||||
|
|
@ -220,7 +215,6 @@ export default {
|
|||
this.dialogVisible = false
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
productClick(data) {
|
||||
let materialId = this.selectedProduct.id
|
||||
|
|
@ -233,5 +227,5 @@ export default {
|
|||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -60,8 +60,10 @@
|
|||
<el-link type="primary" @click="table_edit(scope.row)" v-if="scope.row.state==10">
|
||||
编辑
|
||||
</el-link>
|
||||
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==14"></el-divider>
|
||||
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==14">
|
||||
<el-divider direction="vertical" v-if="scope.row.state==30"></el-divider>
|
||||
<el-link type="primary" @click="table_end(scope.row)" v-if="scope.row.state==30">终止</el-link>
|
||||
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==20"></el-divider>
|
||||
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==20">
|
||||
删除
|
||||
</el-link>
|
||||
</template>
|
||||
|
|
@ -121,6 +123,8 @@
|
|||
<el-link type="primary" @click="table_edit(scope.row)" v-if="scope.row.state==10">
|
||||
编辑
|
||||
</el-link>
|
||||
<el-divider direction="vertical" v-if="scope.row.state==30"></el-divider>
|
||||
<el-link type="primary" @click="table_end(scope.row)" v-if="scope.row.state==30">终止</el-link>
|
||||
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==14"></el-divider>
|
||||
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==14">
|
||||
删除
|
||||
|
|
@ -182,6 +186,8 @@
|
|||
<el-link type="primary" @click="table_edit(scope.row)" v-if="scope.row.state==10">
|
||||
编辑
|
||||
</el-link>
|
||||
<el-divider direction="vertical" v-if="scope.row.state==30"></el-divider>
|
||||
<el-link type="primary" @click="table_end(scope.row)" v-if="scope.row.state==30">终止</el-link>
|
||||
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==14"></el-divider>
|
||||
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==14">
|
||||
删除
|
||||
|
|
@ -193,7 +199,7 @@
|
|||
</el-tabs>
|
||||
</el-main>
|
||||
<el-main class="nopadding" style="position: relative;">
|
||||
<el-header>
|
||||
<el-header style="justify-content: flex-end;">
|
||||
<div class="right-panel">
|
||||
<el-date-picker
|
||||
v-model="query.date"
|
||||
|
|
@ -337,15 +343,6 @@ export default {
|
|||
dataList:[
|
||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:250, count03:300 },
|
||||
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||
],
|
||||
columList:['10.15','10.16','10.17'],
|
||||
selection: [],
|
||||
|
|
@ -424,6 +421,20 @@ export default {
|
|||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
//终止
|
||||
table_end(row){
|
||||
this.$confirm(`确定终止该任务吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
// this.$API.pm.utask.delete.req(row.id).then((res) => {
|
||||
// this.$message.success("删除成功");
|
||||
// this.$refs.table7.refresh();
|
||||
// return res;
|
||||
// }).catch((err) => {
|
||||
// return err;
|
||||
// });
|
||||
}).catch(() => {});
|
||||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
this.$refs.table7.refresh();
|
||||
|
|
@ -508,20 +519,23 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.countBlock{
|
||||
.right-panel > * + * {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.countBlock{
|
||||
width: 80px;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
.redColor{
|
||||
}
|
||||
.redColor{
|
||||
background-color: brown;
|
||||
}
|
||||
.greenColor{
|
||||
}
|
||||
.greenColor{
|
||||
background-color: green;
|
||||
}
|
||||
.orangeColor{
|
||||
}
|
||||
.orangeColor{
|
||||
background-color: orange;
|
||||
}
|
||||
}
|
||||
.el-main.nopadding{
|
||||
padding:0 20px 0 20px
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,8 +42,10 @@
|
|||
<el-link type="primary" @click="table_edit(scope.row)" v-if="scope.row.state==10">
|
||||
编辑
|
||||
</el-link>
|
||||
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==14"></el-divider>
|
||||
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==14">
|
||||
<el-divider direction="vertical" v-if="scope.row.state==30"></el-divider>
|
||||
<el-link type="primary" @click="table_end(scope.row)" v-if="scope.row.state==30">终止</el-link>
|
||||
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==20"></el-divider>
|
||||
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==20">
|
||||
删除
|
||||
</el-link>
|
||||
</template>
|
||||
|
|
@ -290,6 +292,20 @@ export default {
|
|||
this.$message.error('未选择任何任务')
|
||||
}
|
||||
},
|
||||
//终止
|
||||
table_end(row){
|
||||
this.$confirm(`确定终止该任务吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
// this.$API.pm.utask.delete.req(row.id).then((res) => {
|
||||
// this.$message.success("删除成功");
|
||||
// this.$refs.table7.refresh();
|
||||
// return res;
|
||||
// }).catch((err) => {
|
||||
// return err;
|
||||
// });
|
||||
}).catch(() => {});
|
||||
},
|
||||
utaskAssgin(){
|
||||
let that = this;
|
||||
if(that.selectedIds.length>0){
|
||||
|
|
@ -382,11 +398,12 @@ export default {
|
|||
},
|
||||
//删除
|
||||
async table_del(row) {
|
||||
let that = this;
|
||||
this.$confirm(`确定删除吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
this.$API.pm.utask.delete.req(row.id).then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
that.$message.success("删除成功");
|
||||
that.$refs.table1.refresh();
|
||||
return res;
|
||||
}).catch((err) => {
|
||||
|
|
@ -394,14 +411,9 @@ export default {
|
|||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
if (mode == "add") {
|
||||
this.$refs.table.refresh();
|
||||
} else if (mode == "edit") {
|
||||
this.$refs.table.refresh();
|
||||
}
|
||||
handleSaveSuccess() {
|
||||
this.$refs.table1.refresh();
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
|
|
@ -433,6 +445,9 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.right-panel > * + * {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.el-main.nopadding {
|
||||
padding: 0 20px 0 20px
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,11 +20,6 @@
|
|||
<el-input v-model="form.number" placeholder="任务编号" :disabled="mode=='edit'"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="activeName!=='6车间'">
|
||||
<el-form-item label="任务数">
|
||||
<el-input-number style="width:100%" v-model="form.count" :min="1" controls-position="right" placeholder="任务数"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="activeName!=='6车间'">
|
||||
<el-form-item label="工段" prop="mgroup">
|
||||
<el-select
|
||||
|
|
@ -61,6 +56,11 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="任务数" prop="count">
|
||||
<el-input-number style="width:100%" v-model="form.count" :min="1" controls-position="right" placeholder="任务数"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开工日期" prop="start_date">
|
||||
<el-date-picker
|
||||
|
|
@ -112,6 +112,8 @@ export default {
|
|||
},
|
||||
form: {},
|
||||
rules: {
|
||||
mgroup:[{required:true, message:'请选择工段', trigger: "blur"}],
|
||||
count:[{required:true, message:'请输入任务数', trigger: "blur"}],
|
||||
start_date: [{required: true, message: "请选择开始时间", trigger: "blur"}],
|
||||
end_date: [{required: true, message: "请选择结束时间", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入任务编号", trigger: "blur"}],
|
||||
|
|
@ -151,6 +153,7 @@ export default {
|
|||
if(this.activeName=='6车间'){
|
||||
obj.type = 10;
|
||||
obj.is_hidden = false;
|
||||
obj.is_assemb = false;
|
||||
}else{
|
||||
obj.type = 20;
|
||||
obj.is_hidden = false;
|
||||
|
|
@ -181,7 +184,7 @@ export default {
|
|||
res = await this.$API.pm.utask.update.req(this.form.id,this.form);
|
||||
}
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.$emit("success");
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
} catch (err) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,119 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
||||
<el-button type="primary" icon="el-icon-bottom-left" @click="importInspect">导入</el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-date-picker
|
||||
v-model="query.date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
>查询</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:params="query"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="日期" prop="name" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="检测内容" prop="model">
|
||||
</el-table-column>
|
||||
<el-table-column label="检验员" prop="factory" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="150">
|
||||
<template #default="scope">
|
||||
<el-link type="primary" @click="table_show(scope.row)">查看</el-link>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-link type="danger" @click="table_del(scope.row)">删除</el-link>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-link type="primary" @click="table_edit(scope.row)">下载</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<el-dialog
|
||||
title="导入"
|
||||
destroy-on-close
|
||||
v-model="visible"
|
||||
@closed="closeVisible"
|
||||
>
|
||||
<el-form ref="dialogForm" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="模板文件">
|
||||
<el-link href="" target="_blank" type="primary" style="margin-right:10px">模板一</el-link>
|
||||
<el-link href="" target="_blank" type="primary">模板二</el-link>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="导入文件" prop="file">
|
||||
|
||||
<el-input><span>{{ form.fileName }}</span></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submitFile">提交</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-dialog>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "rparty",
|
||||
data() {
|
||||
return {
|
||||
// apiObj: this.$API.qm.list,
|
||||
apiObj:null,
|
||||
query: {
|
||||
page:1,
|
||||
page_size:20,
|
||||
type:10
|
||||
},
|
||||
state_: {
|
||||
10: '',
|
||||
20: '',
|
||||
},
|
||||
form:{
|
||||
file:'',
|
||||
fileName:'',
|
||||
},
|
||||
rules: {
|
||||
file:[{required:true, message:'请上传导入文件', trigger: "blur"}]
|
||||
},
|
||||
visible:true,
|
||||
isSaveing:false,
|
||||
selection: [],
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
submitFile(){
|
||||
|
||||
},
|
||||
closeVisible(){
|
||||
this.visible = false;
|
||||
},
|
||||
//查看
|
||||
table_show(row) {
|
||||
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-date-picker
|
||||
v-model="query.date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
>查询</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:params="query"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="日期" prop="name" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="检测内容" prop="model">
|
||||
</el-table-column>
|
||||
<el-table-column label="检测标准" prop="factory" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人测量值" prop="production_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" prop="production_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="专检人测量值" prop="buy_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="专检人" prop="production_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="结论" prop="production_date">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="结论">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.state===10" type="success">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.state===20" type="warning">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.state===30">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="danger">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "rparty",
|
||||
data() {
|
||||
return {
|
||||
// apiObj: this.$API.qm.list,
|
||||
apiObj:null,
|
||||
query: {
|
||||
page:1,
|
||||
page_size:20,
|
||||
type:10
|
||||
},
|
||||
selection: [],
|
||||
state_: {
|
||||
10: '',
|
||||
20: '',
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("show",10).setData(row);
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-date-picker
|
||||
v-model="query.date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
>查询</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:params="query"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="日期" prop="name" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="检测内容" prop="model">
|
||||
</el-table-column>
|
||||
<el-table-column label="检测标准" prop="factory" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人测量值" prop="production_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" prop="production_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="专检人测量值" prop="buy_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="专检人" prop="production_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="结论" prop="production_date">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="结论">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.state===10" type="success">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.state===20" type="warning">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.state===30">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="danger">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "rparty",
|
||||
data() {
|
||||
return {
|
||||
// apiObj: this.$API.qm.list,
|
||||
apiObj:null,
|
||||
query: {
|
||||
page:1,
|
||||
page_size:20,
|
||||
type:10
|
||||
},
|
||||
selection: [],
|
||||
state_: {
|
||||
10: '',
|
||||
20: '',
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("show",10).setData(row);
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-date-picker
|
||||
v-model="query.date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
>查询</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:params="query"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="日期" prop="name" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="检测内容" prop="model">
|
||||
</el-table-column>
|
||||
<el-table-column label="检测标准" prop="factory" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人测量值" prop="production_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" prop="production_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="专检人测量值" prop="buy_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="专检人" prop="production_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="结论" prop="production_date">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="结论">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.state===10" type="success">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.state===20" type="warning">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.state===30">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="danger">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "rparty",
|
||||
data() {
|
||||
return {
|
||||
// apiObj: this.$API.qm.list,
|
||||
apiObj:null,
|
||||
query: {
|
||||
page:1,
|
||||
page_size:20,
|
||||
type:10
|
||||
},
|
||||
selection: [],
|
||||
state_: {
|
||||
10: '',
|
||||
20: '',
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("show",10).setData(row);
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-date-picker
|
||||
v-model="query.date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
>查询</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:params="query"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="日期" prop="name" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="检测内容" prop="model">
|
||||
</el-table-column>
|
||||
<el-table-column label="检测标准" prop="factory" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人测量值" prop="production_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" prop="production_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="专检人测量值" prop="buy_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="专检人" prop="production_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="结论" prop="production_date">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="结论">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.state===10" type="success">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.state===20" type="warning">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.state===30">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="danger">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "rparty",
|
||||
data() {
|
||||
return {
|
||||
// apiObj: this.$API.qm.list,
|
||||
apiObj:null,
|
||||
query: {
|
||||
page:1,
|
||||
page_size:20,
|
||||
type:10
|
||||
},
|
||||
selection: [],
|
||||
state_: {
|
||||
10: '',
|
||||
20: '',
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("show",10).setData(row);
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
<template #default="scope">
|
||||
<span v-if="!scope.row.change">{{ scope.row.mgroup_name }}</span>
|
||||
<el-select v-else v-model="scope.row.batch" placeholder="请选择">
|
||||
<el-option v-for="item in processOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
<el-option v-for="item in options" :key="item" :label="item" :value="item"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -120,7 +120,6 @@
|
|||
related:[],
|
||||
userList:[],
|
||||
formList: [],
|
||||
processOptions:[],
|
||||
recordId:'',
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
|
|
@ -137,7 +136,6 @@
|
|||
this.getBatchs();
|
||||
this.getFormList();
|
||||
this.getUserList();
|
||||
this.getProcess();
|
||||
},
|
||||
methods: {
|
||||
//显示
|
||||
|
|
@ -173,12 +171,7 @@
|
|||
})
|
||||
})
|
||||
},
|
||||
//获取工序列表
|
||||
getProcess(){
|
||||
var res = this.$API.mtm.process.list.req({page:0}).then(res=>{
|
||||
this.processOptions = res;
|
||||
});
|
||||
},
|
||||
|
||||
//获取车间物料批次号
|
||||
getBatchs(){
|
||||
let that = this;
|
||||
|
|
@ -206,6 +199,12 @@
|
|||
deleteRow(){
|
||||
this.$refs.table.deleteRow(0)
|
||||
},
|
||||
|
||||
getList(){
|
||||
this.$API.mtm.material.list.req({page:0}).then(res=>{
|
||||
this.options = res;
|
||||
})
|
||||
},
|
||||
getReceptionist(data) {
|
||||
// 子组件调用父组件的方法并传参
|
||||
console.log(data);
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@
|
|||
<el-col :span="11">
|
||||
<div class="tableTitle" style="display:flex;justify-content: space-between;">
|
||||
<div>车间物料</div>
|
||||
<div class="btnsContainer" style=" ">
|
||||
<div class="btnsContainer right-panel">
|
||||
<el-button type="primary" @click="tomio">车间入库</el-button>
|
||||
<el-button type="primary" @click="tomio">车间出库</el-button>
|
||||
</div>
|
||||
|
|
@ -282,6 +282,9 @@ export default {
|
|||
margin-top: 4px;
|
||||
z-index:100
|
||||
}
|
||||
.right-panel > * + * {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.el-main.nopadding{
|
||||
padding:0 20px 0 20px
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,62 +18,84 @@
|
|||
<el-col :xl="4" :lg="6" :md="8" :sm="12" :xs="24">
|
||||
<el-form-item class="infoForm" label="计划日期:">{{ orderObj.start_date }}</el-form-item>
|
||||
</el-col>
|
||||
<el-button v-if="orderObj.state!==40" type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button v-if="orderObj.state!==40" type="primary" @click="submit">提交</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add" :disabled="orderObj.state==40">新增记录</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addRow" :disabled="orderObj.state==40">新增记录</el-button>
|
||||
</div>
|
||||
<div class="right-panel"></div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="mlogTable"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:hidePagination="true"
|
||||
:params="query"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="产品编号" prop="batch">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="领料数量" prop="count_use">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
||||
<sc-form-table ref="table" v-model="relatedList" hideAdd drag-sort placeholder="暂无数据">
|
||||
<el-table-column prop="type" label="工序" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="table_edit(scope.row)"
|
||||
v-if="orderObj.state==10||orderObj.state==20"
|
||||
v-auth="'equipment'"
|
||||
>编辑
|
||||
</el-link>
|
||||
<!-- 提交后变查看 -->
|
||||
<el-link
|
||||
v-else
|
||||
type="primary"
|
||||
@click="table_edit(scope.row)"
|
||||
v-auth="'equipment'"
|
||||
>查看
|
||||
</el-link>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-link
|
||||
type="danger"
|
||||
@click="table_del(scope.row)"
|
||||
>删除
|
||||
</el-link>
|
||||
<span v-if="!scope.row.change">{{ scope.row.mgroup_name }}</span>
|
||||
<el-select v-else v-model="scope.row.mtask" placeholder="请选择">
|
||||
<el-option v-for="item in related" :key="item.id" :label="item.mgroup_name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
<el-table-column prop="type" label="产品编号" min-width="120" align="center">
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.batch" style="width: 100%" :disabled="!scope.row.isedit">
|
||||
<el-option
|
||||
v-for="item in batchOptions"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="val" label="加工数量" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.count_use" placeholder="加工数量" :disabled="!scope.row.isedit"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="val" label="合格数量" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.count_ok" placeholder="合格数量" :disabled="!scope.row.isedit"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数量" align="center">
|
||||
<el-table-column prop="val" label="原因1" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.count_notok" placeholder="原因1" :disabled="!scope.row.isedit"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="val" label="原因2" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.count_notok" placeholder="原因2" :disabled="!scope.row.isedit"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="val" label="原因3" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.count_notok" placeholder="原因3" :disabled="!scope.row.isedit"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="type" label="操作人" min-width="120" align="center">
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.handle_user" filterable style="width: 100%" :disabled="!scope.row.isedit">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="type" label="操作" min-width="80" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" v-if="scope.row.isedit" @click="submitForm(scope.row,scope.$index)">确定</el-button>
|
||||
<el-button type="warning" v-else @click="editForm(scope.row,scope.$index)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</sc-form-table>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<save-dialog
|
||||
|
|
@ -104,7 +126,12 @@
|
|||
page:0,
|
||||
mtask:''
|
||||
},
|
||||
materialId:'',
|
||||
related:[],
|
||||
userList:[],
|
||||
formList: [],
|
||||
relatedList:[],
|
||||
batchOptions:[],
|
||||
processOptions:[],
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
|
|
@ -112,50 +139,140 @@
|
|||
this.query.mtask = this.$route.query.mtask;
|
||||
this.apiObj = this.$API.wpm.mlog.relatedFirst;
|
||||
this.getTask();//获取任务详情
|
||||
this.getUserList();
|
||||
this.getBatchs();
|
||||
this.getProcess()
|
||||
},
|
||||
methods: {
|
||||
//获取任务详情
|
||||
getTask(){
|
||||
this.$API.pm.mtask.item.req(this.mtask).then((res) => {
|
||||
this.orderObj = res;
|
||||
let that = this;
|
||||
that.$API.pm.mtask.item.req(that.mtask).then((res) => {
|
||||
that.orderObj = res;
|
||||
that.getFormList();
|
||||
})
|
||||
},
|
||||
//获取工序列表
|
||||
getProcess(){
|
||||
var res = this.$API.mtm.process.list.req({page:0}).then(res=>{
|
||||
res.forEach(item=>{
|
||||
if(item.belong_dept_name=='6车间'){
|
||||
this.processOptions.push(item)
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
//添加
|
||||
add() {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("add");
|
||||
addRow() {
|
||||
let obj = {
|
||||
mtask:'',
|
||||
batch: '',
|
||||
count_use:null,
|
||||
count_real:null,
|
||||
count_ok: null,
|
||||
count_notok: null,
|
||||
handle_date:'',
|
||||
handle_user:'',
|
||||
mgroup_name:"",
|
||||
isedit:true,
|
||||
change:true
|
||||
}
|
||||
this.formList.push(obj);
|
||||
// this.dialog.save = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.saveDialog.open("add");
|
||||
// });
|
||||
},
|
||||
getFormList(){
|
||||
let that = this;
|
||||
that.$API.pm.mtask.related.req(that.orderObj.id).then(res=>{
|
||||
that.related = res;
|
||||
let ids = [];
|
||||
res.forEach(item=>{
|
||||
ids.push(item.id)
|
||||
let obj = {
|
||||
mtask:item.id,
|
||||
batch: '',
|
||||
count_use:null,
|
||||
count_ok: null,
|
||||
count_notok: null,
|
||||
handle_date:'',
|
||||
handle_user:'',
|
||||
mgroup_name: item.mgroup_name,
|
||||
isedit:true,
|
||||
change:false
|
||||
}
|
||||
that.formList.push(obj)
|
||||
})
|
||||
this.setData(ids);
|
||||
})
|
||||
},
|
||||
getUserList(){
|
||||
let that = this;
|
||||
this.$API.system.user.list.req({belong_dept:'3423857962907983872',page:0}).then(res=>{
|
||||
that.userList = res;
|
||||
});
|
||||
},
|
||||
//编辑
|
||||
table_edit(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
//获取车间物料批次号
|
||||
getBatchs(){
|
||||
let that = this;
|
||||
this.$API.wpm.wmaterial.batchs.req({belong_dept_name:'6车间'}).then(res=>{
|
||||
that.batchOptions = res;
|
||||
});
|
||||
},
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("show").setData(row);
|
||||
});
|
||||
},
|
||||
|
||||
//删除
|
||||
table_del(row) {
|
||||
this.$confirm(`确定删除吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
editForm(row,index){
|
||||
debugger;
|
||||
this.$API.wpm.mlog.delete.req(row.id).then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
this.$refs.mlogTable.refresh();
|
||||
return res;
|
||||
}).catch((err) => {
|
||||
return err;
|
||||
});
|
||||
}).catch(() => {});
|
||||
console.log(index)
|
||||
console.log(this.relatedList[index].isedit)
|
||||
this.relatedList[index].isedit = true;
|
||||
console.log(this.relatedList)
|
||||
},
|
||||
//保存
|
||||
submitForm(row,index) {
|
||||
if(row.id){
|
||||
debugger;
|
||||
console.log(row)
|
||||
this.$API.wpm.mlog.update.req(row.id,row).then(res=>{
|
||||
this.relatedList[index].isedit = false;
|
||||
})
|
||||
}else{
|
||||
debugger;
|
||||
let obj = row;
|
||||
obj.handle_date = this.orderObj.start_date;
|
||||
obj.count_real = obj.count_use;
|
||||
this.$API.wpm.mlog.create.req(obj).then(res=>{
|
||||
this.relatedList[index].isedit = false;
|
||||
this.relatedList[index].change = false;
|
||||
})
|
||||
}
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
let obj = {};
|
||||
let ids = data.join(',')
|
||||
obj.mtask__in = ids;
|
||||
obj.handle_date = this.orderObj.start_date;
|
||||
obj.mtask__mgroup__belong_dept__name = '6车间';
|
||||
this.$API.wpm.mlog.list.req(obj).then(res=>{
|
||||
let data = res.results;
|
||||
let arrAll = [];
|
||||
for(let i=0;i<this.formList.length;i++){
|
||||
let arr = [];
|
||||
data.forEach(item=>{
|
||||
if(item.mtask==this.formList[i].mtask){
|
||||
item.isedit = false;
|
||||
// let arritem = Object.assign(this.formList[i],item);
|
||||
arr.push(item);
|
||||
arrAll.push(item);
|
||||
}
|
||||
})
|
||||
if(arr.length==0){
|
||||
arrAll.push(this.formList[i])
|
||||
}
|
||||
}
|
||||
this.relatedList = arrAll;
|
||||
console.log(arrAll)
|
||||
})
|
||||
},
|
||||
|
||||
//本地更新数据
|
||||
|
|
@ -168,10 +285,15 @@
|
|||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
submitForm(){
|
||||
this.$API.pm.mtask.submitSameDay.req(this.orderObj.id).then(re=>{
|
||||
// console.log(res)
|
||||
})
|
||||
submit(){
|
||||
let that = this;
|
||||
that.$confirm(`确定删除吗?`, "提示", {type: "warning"}).then(() => {
|
||||
that.$API.pm.mtask.submitSameDay.req(that.orderObj.id).then(re=>{
|
||||
that.$message.success("提交成功");
|
||||
}).catch((err) => {
|
||||
return err;
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue