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>
|
<template>
|
||||||
<div class="sc-form-table" ref="scFormTable">
|
<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">
|
<el-table-column type="index" width="50" fixed="left">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-button v-if="!hideAdd" type="primary" icon="el-icon-plus" size="small" circle @click="rowAdd"></el-button>
|
<el-button v-if="!hideAdd" type="primary" icon="el-icon-plus" size="small" circle @click="rowAdd"></el-button>
|
||||||
|
|
|
||||||
|
|
@ -767,8 +767,8 @@ const routes = [
|
||||||
// }
|
// }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
//生产执行 wpm
|
//生产执行 wpm
|
||||||
{
|
{
|
||||||
"name": "wpm",
|
"name": "wpm",
|
||||||
"path": "/wpm",
|
"path": "/wpm",
|
||||||
"meta": {
|
"meta": {
|
||||||
|
|
@ -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
|
//库存 inm
|
||||||
{
|
{
|
||||||
"name": "inm",
|
"name": "inm",
|
||||||
|
|
|
||||||
|
|
@ -24,15 +24,12 @@
|
||||||
</div>
|
</div>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
||||||
|
|
||||||
</el-aside>
|
</el-aside>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="table_add"
|
<el-button type="primary" icon="el-icon-plus" @click="table_add" v-auth="'route.create'"></el-button>
|
||||||
v-auth="'route.create'"></el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
|
@ -72,10 +69,8 @@
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="30%">
|
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="30%">
|
||||||
|
|
@ -85,13 +80,20 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工序" prop="process">
|
<el-form-item label="工序" prop="process">
|
||||||
<el-select v-model="form.process" placeholder="工序" clearable style="width: 100%;" :disabled="updateDisable">
|
<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"
|
<el-option
|
||||||
:value="item.id"></el-option>
|
v-for="item in processOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="出材率" prop="out_rate">
|
<el-form-item label="出材率" prop="out_rate">
|
||||||
<el-input-number v-model="form.out_rate" :max="100" :precision="1" :step="0.1" />
|
<el-input-number v-model="form.out_rate" :max="100" :precision="1" :step="0.1" />
|
||||||
</el-form-item>
|
</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-form-item label="自动排产" prop="is_autotask">
|
||||||
<el-switch v-model="form.is_autotask" />
|
<el-switch v-model="form.is_autotask" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -99,23 +101,15 @@
|
||||||
<el-select v-model="form.material_in" placeholder="物料" clearable style="width: 100%;">
|
<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">
|
<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: left">{{ item.name }}</span>
|
||||||
<span style="
|
<span style="float: right;color: '#E6A23C';font-size: 13px;" v-if="item.is_hidden">{{ item.process_name }}-隐</span>
|
||||||
float: right;
|
|
||||||
color: '#E6A23C';
|
|
||||||
font-size: 13px;
|
|
||||||
" v-if="item.is_hidden">{{ item.process_name }}-隐</span>
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="主要输出" prop="material_out">
|
<el-form-item label="主要输出" prop="material_out">
|
||||||
<el-select v-model="form.material_out" placeholder="物料" clearable style="width: 100%;">
|
<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
|
<el-option v-for="item in materialOptions" :key="item.id" :label="item.name" :value="item.id">
|
||||||
style="float: left">{{ item.name }}</span>
|
<span style="float: left">{{ item.name }}</span>
|
||||||
<span style="
|
<span style="float: right;color: '#E6A23C';font-size: 13px;" v-if="item.is_hidden">{{ item.process_name }}-隐</span></el-option>
|
||||||
float: right;
|
|
||||||
color: '#E6A23C';
|
|
||||||
font-size: 13px;
|
|
||||||
" v-if="item.is_hidden">{{ item.process_name }}-隐</span></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -126,112 +120,112 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
process: null,
|
process: null,
|
||||||
sort: 1,
|
sort: 1,
|
||||||
out_rate: 100,
|
out_rate: 100,
|
||||||
is_autotask: true,
|
is_autotask: true,
|
||||||
};
|
is_count_utask:false
|
||||||
export default {
|
};
|
||||||
name: "route",
|
export default {
|
||||||
components: {},
|
name: "route",
|
||||||
data() {
|
components: {},
|
||||||
return {
|
data() {
|
||||||
apiObj: null,
|
return {
|
||||||
query: {},
|
apiObj: null,
|
||||||
productOptions: [],
|
query: {},
|
||||||
dialogVisible: false,
|
productOptions: [],
|
||||||
form: {},
|
dialogVisible: false,
|
||||||
rules: {
|
form: {},
|
||||||
process: [{ required: true, trigger: "blur" }],
|
rules: {
|
||||||
sort: [{ required: true, trigger: "blur" }],
|
process: [{ required: true, trigger: "blur" }],
|
||||||
out_rate: [{ required: true, trigger: "blur" }]
|
sort: [{ required: true, trigger: "blur" }],
|
||||||
|
out_rate: [{ required: true, trigger: "blur" }]
|
||||||
|
},
|
||||||
|
processOptions: [],
|
||||||
|
materialOptions: [],
|
||||||
|
selectedProduct: { id: 0 },
|
||||||
|
dialogTitle: '新增',
|
||||||
|
updateDisable: false,
|
||||||
|
currentRoute: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getProducts()
|
||||||
|
this.getProcess()
|
||||||
|
this.getMaterial()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getRoute() {
|
||||||
|
this.$API.mtm.route.list({ material: this.selectedProduct.id, page: 0 }).then(res => {
|
||||||
|
this.currentRoute = res
|
||||||
|
})
|
||||||
},
|
},
|
||||||
processOptions: [],
|
//获取工序列表
|
||||||
materialOptions: [],
|
getProcess() {
|
||||||
selectedProduct: { id: 0 },
|
var res = this.$API.mtm.process.list.req({ page: 0 }).then(res => {
|
||||||
dialogTitle: '新增',
|
this.processOptions = res;
|
||||||
updateDisable: false,
|
});
|
||||||
currentRoute: [],
|
},
|
||||||
}
|
getMaterial() {
|
||||||
},
|
this.$API.mtm.material.list.req({ page: 0, type__in: "10,20" }).then(res => {
|
||||||
mounted() {
|
this.materialOptions = res
|
||||||
this.getProducts()
|
|
||||||
this.getProcess()
|
|
||||||
this.getMaterial()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getRoute() {
|
|
||||||
this.$API.mtm.route.list({ material: this.selectedProduct.id, page: 0 }).then(res => {
|
|
||||||
this.currentRoute = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//获取工序列表
|
|
||||||
getProcess() {
|
|
||||||
var res = this.$API.mtm.process.list.req({ page: 0 }).then(res => {
|
|
||||||
this.processOptions = res;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getMaterial() {
|
|
||||||
this.$API.mtm.material.list.req({ page: 0, type__in: "10,20" }).then(res => {
|
|
||||||
this.materialOptions = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getProducts() {
|
|
||||||
this.$API.mtm.material.list.req({ page: 0, need_route: true }).then(res => {
|
|
||||||
res.forEach(m => {
|
|
||||||
m.label = m.name
|
|
||||||
})
|
})
|
||||||
this.productOptions = res
|
},
|
||||||
})
|
getProducts() {
|
||||||
},
|
this.$API.mtm.material.list.req({ page: 0, need_route: true }).then(res => {
|
||||||
table_add() {
|
res.forEach(m => {
|
||||||
if (this.selectedProduct.id === 0) {
|
m.label = m.name
|
||||||
this.$message.error('请先选择左侧产品');
|
})
|
||||||
return
|
this.productOptions = res
|
||||||
}
|
})
|
||||||
this.dialogTitle = '新增'
|
},
|
||||||
this.updateDisable = false;
|
table_add() {
|
||||||
this.form = Object.assign({}, defaultForm);
|
if (this.selectedProduct.id === 0) {
|
||||||
this.form.material = this.selectedProduct.id
|
this.$message.error('请先选择左侧产品');
|
||||||
this.dialogVisible = true;
|
return
|
||||||
},
|
}
|
||||||
table_edit(row) {
|
this.dialogTitle = '新增'
|
||||||
this.dialogTitle = '编辑'
|
this.updateDisable = false;
|
||||||
this.updateDisable = true;
|
this.form = Object.assign({}, defaultForm);
|
||||||
this.form = Object.assign({}, row);
|
this.form.material = this.selectedProduct.id
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
table_del(row) {
|
table_edit(row) {
|
||||||
this.$API.mtm.route.delete.req(row.id).then(res => {
|
this.dialogTitle = '编辑'
|
||||||
this.productClick()
|
this.updateDisable = true;
|
||||||
})
|
this.form = Object.assign({}, row);
|
||||||
},
|
this.dialogVisible = true;
|
||||||
form_save() {
|
},
|
||||||
if (this.dialogTitle == '新增') {
|
table_del(row) {
|
||||||
this.$API.mtm.route.create.req(this.form).then(res => {
|
this.$API.mtm.route.delete.req(row.id).then(res => {
|
||||||
this.productClick()
|
this.productClick()
|
||||||
this.dialogVisible = false
|
|
||||||
this.getMaterial()
|
|
||||||
})
|
})
|
||||||
} else if (this.dialogTitle == '编辑') {
|
},
|
||||||
this.$API.mtm.route.update.req(this.form.id, this.form).then(res => {
|
form_save() {
|
||||||
this.productClick()
|
if (this.dialogTitle == '新增') {
|
||||||
this.dialogVisible = false
|
this.$API.mtm.route.create.req(this.form).then(res => {
|
||||||
|
this.productClick()
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.getMaterial()
|
||||||
|
})
|
||||||
|
} else if (this.dialogTitle == '编辑') {
|
||||||
|
this.$API.mtm.route.update.req(this.form.id, this.form).then(res => {
|
||||||
|
this.productClick()
|
||||||
|
this.dialogVisible = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
productClick(data) {
|
||||||
|
let materialId = this.selectedProduct.id
|
||||||
|
if (data) {
|
||||||
|
this.selectedProduct = data
|
||||||
|
materialId = data.id
|
||||||
|
}
|
||||||
|
this.$API.mtm.route.list.req({ page: 0, material: materialId }).then(res => {
|
||||||
|
this.currentRoute = res
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
|
||||||
productClick(data) {
|
|
||||||
let materialId = this.selectedProduct.id
|
|
||||||
if (data) {
|
|
||||||
this.selectedProduct = data
|
|
||||||
materialId = data.id
|
|
||||||
}
|
|
||||||
this.$API.mtm.route.list.req({ page: 0, material: materialId }).then(res => {
|
|
||||||
this.currentRoute = res
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -1,297 +1,32 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container style="flex-direction: column">
|
<el-container style="flex-direction: column">
|
||||||
<el-main id="topContainer" class="nopadding" style="position: relative;margin-bottom: 10px;">
|
<el-main id="topContainer" class="nopadding" style="position: relative;margin-bottom: 10px;">
|
||||||
<div class="right-panel btnsContainer">
|
<div class="right-panel btnsContainer">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add">新增任务</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="add">新增任务</el-button>
|
||||||
<el-button type="primary" @click="utaskDepuse" v-loading="isloading">任务分解</el-button>
|
<el-button type="primary" @click="utaskDepuse" v-loading="isloading">任务分解</el-button>
|
||||||
<el-button type="primary" @click="utaskAssgin" v-loading="isloading">任务下达</el-button>
|
<el-button type="primary" @click="utaskAssgin" v-loading="isloading">任务下达</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
<el-tab-pane label="混料工序" name="8车间">
|
<el-tab-pane label="混料工序" name="8车间">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table8"
|
ref="table8"
|
||||||
:apiObj="apiUtask"
|
:apiObj="apiUtask"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
:height="topHeight"
|
:height="topHeight"
|
||||||
:params="paramsUtask8"
|
:params="paramsUtask8"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="40" />
|
<el-table-column type="selection" width="40" />
|
||||||
<el-table-column type="index" width="40" />
|
<el-table-column type="index" width="40" />
|
||||||
<el-table-column label="任务编号" prop="number">
|
<el-table-column label="任务编号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="型号" prop="number">
|
<el-table-column label="型号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="任务状态" prop="state">
|
<el-table-column label="任务状态" prop="state">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-if="scope.row.state!==40" type="primary">
|
|
||||||
{{ state_[scope.row.state] }}
|
|
||||||
</el-tag>
|
|
||||||
<el-tag v-else type="success">
|
|
||||||
{{ state_[scope.row.state] }}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="任务量" prop="number">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="计划量" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="日均产量" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="计划开工时间" prop="start_date">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="计划完工时间" prop="end_date">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="完成产量" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="完成率" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="要求描述" prop="count">
|
|
||||||
</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" v-if="scope.row.state==10"></el-divider>
|
|
||||||
<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-link>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="成型7车间" name="7车间">
|
|
||||||
<scTable
|
|
||||||
ref="table7"
|
|
||||||
:apiObj="apiUtask"
|
|
||||||
row-key="id"
|
|
||||||
stripe
|
|
||||||
:height="topHeight"
|
|
||||||
:params="paramsUtask7"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="40" />
|
|
||||||
<el-table-column type="index" width="40" />
|
|
||||||
<el-table-column label="任务编号" prop="number">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="型号" prop="number">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="任务状态" prop="state">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-tag v-if="scope.row.state!==40" type="primary">
|
|
||||||
{{ state_[scope.row.state] }}
|
|
||||||
</el-tag>
|
|
||||||
<el-tag v-else type="success">
|
|
||||||
{{ state_[scope.row.state] }}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="任务量" prop="number">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="计划量" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="日均产量" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="计划开工时间" prop="start_date">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="计划完工时间" prop="end_date">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="完成产量" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="完成率" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="要求描述" prop="count">
|
|
||||||
</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" v-if="scope.row.state==10"></el-divider>
|
|
||||||
<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-link>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="成型10车间" name="10车间">
|
|
||||||
<scTable
|
|
||||||
ref="table10"
|
|
||||||
:apiObj="apiUtask"
|
|
||||||
row-key="id"
|
|
||||||
stripe
|
|
||||||
:height="topHeight"
|
|
||||||
:params="paramsUtask10"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="40" />
|
|
||||||
<el-table-column type="index" width="40" />
|
|
||||||
<el-table-column label="任务编号" prop="number">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="型号" prop="number">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="任务状态" prop="state">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-tag v-if="scope.row.state!==40" type="primary">
|
|
||||||
{{ state_[scope.row.state] }}
|
|
||||||
</el-tag>
|
|
||||||
<el-tag v-else type="success">
|
|
||||||
{{ state_[scope.row.state] }}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="任务量" prop="number">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="计划量" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="日均产量" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="计划开工时间" prop="start_date">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="计划完工时间" prop="end_date">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="完成产量" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="完成率" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="要求描述" prop="count">
|
|
||||||
</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" v-if="scope.row.state==10"></el-divider>
|
|
||||||
<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-link>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</el-main>
|
|
||||||
<el-main class="nopadding" style="position: relative;">
|
|
||||||
<el-header>
|
|
||||||
<div class="right-panel">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="query.date"
|
|
||||||
type="daterange"
|
|
||||||
range-separator="至"
|
|
||||||
start-placeholder="开始时间"
|
|
||||||
end-placeholder="结束时间"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
/>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-search"
|
|
||||||
@click="handleQuery"
|
|
||||||
>查询</el-button>
|
|
||||||
</div>
|
|
||||||
</el-header>
|
|
||||||
<scTable
|
|
||||||
ref="table2"
|
|
||||||
:data="dataList"
|
|
||||||
row-key="id"
|
|
||||||
stripe
|
|
||||||
:height="bottomHeight"
|
|
||||||
:hideDo="hideDo"
|
|
||||||
:params="query"
|
|
||||||
>
|
|
||||||
<el-table-column type="index" width="50"/>
|
|
||||||
<el-table-column label="任务编号" prop="number" width="100" fixed="left">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="产品名称" prop="name" width="100" show-overflow-tooltip fixed="left">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="型号" prop="xh" width="100" fixed="left">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="计划量" prop="count" width="100" fixed="left">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="日均产量" prop="count1" width="100" fixed="left">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="计划开工时间" prop="start_date" width="100" fixed="left">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="计划完工时间" prop="end_date" width="100" fixed="left">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column v-for="item in columList" :label="item" :key="item">
|
|
||||||
<template #default="scope">
|
|
||||||
<div :class="bindClass(scope.row)">
|
|
||||||
<div v-if="activeName=='10车间'">{{ scope.row.count01 }}</div>
|
|
||||||
<div>{{ scope.row.count02 }}</div>
|
|
||||||
<div>{{ scope.row.count03 }}</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
</el-main>
|
|
||||||
</el-container>
|
|
||||||
<save-dialog
|
|
||||||
v-if="dialog.save"
|
|
||||||
ref="saveDialog"
|
|
||||||
:activeName="activeName"
|
|
||||||
@success="handleSaveSuccess"
|
|
||||||
@closed="dialog.save = false"
|
|
||||||
></save-dialog>
|
|
||||||
<el-drawer
|
|
||||||
title="任务详情"
|
|
||||||
v-model="visibleRecord"
|
|
||||||
:size="800"
|
|
||||||
destroy-on-close
|
|
||||||
@closed="visibleRecord=false"
|
|
||||||
>
|
|
||||||
<div class="right-panel tabsHeader">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="paramsObj.start_date"
|
|
||||||
type="date"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
/>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-search"
|
|
||||||
@click="handleDetailQuery"
|
|
||||||
>查询</el-button>
|
|
||||||
</div>
|
|
||||||
<el-container v-loading="isloading">
|
|
||||||
<el-main style="padding: 0 20px 20px 20px">
|
|
||||||
<scTable
|
|
||||||
ref="drawer_table"
|
|
||||||
:apiObj="apiObj"
|
|
||||||
row-key="id"
|
|
||||||
stripe
|
|
||||||
:params="paramsObj"
|
|
||||||
>
|
|
||||||
<el-table-column type="index" width="50"/>
|
|
||||||
<el-table-column label="工段" prop="mgroup_name" show-overflow-tooltip>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="物料编号" prop="number">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="数量" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="工作日期" prop="start_date">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="状态" prop="state" show-overflow-tooltip>
|
|
||||||
<template #default="scope">
|
|
||||||
<el-tag v-if="scope.row.state!==40" type="primary">
|
<el-tag v-if="scope.row.state!==40" type="primary">
|
||||||
{{ state_[scope.row.state] }}
|
{{ state_[scope.row.state] }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
|
@ -299,11 +34,282 @@
|
||||||
{{ state_[scope.row.state] }}
|
{{ state_[scope.row.state] }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
<el-table-column label="任务量" prop="number">
|
||||||
</el-main>
|
</el-table-column>
|
||||||
</el-container>
|
<el-table-column label="计划量" prop="count">
|
||||||
</el-drawer>
|
</el-table-column>
|
||||||
|
<el-table-column label="日均产量" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划开工时间" prop="start_date">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划完工时间" prop="end_date">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成产量" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="要求描述" prop="count">
|
||||||
|
</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" v-if="scope.row.state==10"></el-divider>
|
||||||
|
<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==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>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="成型7车间" name="7车间">
|
||||||
|
<scTable
|
||||||
|
ref="table7"
|
||||||
|
:apiObj="apiUtask"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
:height="topHeight"
|
||||||
|
:params="paramsUtask7"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="40" />
|
||||||
|
<el-table-column type="index" width="40" />
|
||||||
|
<el-table-column label="任务编号" prop="number">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="型号" prop="number">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="任务状态" prop="state">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.state!==40" type="primary">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-else type="success">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="任务量" prop="number">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划量" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="日均产量" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划开工时间" prop="start_date">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划完工时间" prop="end_date">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成产量" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="要求描述" prop="count">
|
||||||
|
</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" v-if="scope.row.state==10"></el-divider>
|
||||||
|
<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">
|
||||||
|
删除
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="成型10车间" name="10车间">
|
||||||
|
<scTable
|
||||||
|
ref="table10"
|
||||||
|
:apiObj="apiUtask"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
:height="topHeight"
|
||||||
|
:params="paramsUtask10"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="40" />
|
||||||
|
<el-table-column type="index" width="40" />
|
||||||
|
<el-table-column label="任务编号" prop="number">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="型号" prop="number">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="任务状态" prop="state">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.state!==40" type="primary">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-else type="success">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="任务量" prop="number">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划量" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="日均产量" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划开工时间" prop="start_date">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划完工时间" prop="end_date">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成产量" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="要求描述" prop="count">
|
||||||
|
</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" v-if="scope.row.state==10"></el-divider>
|
||||||
|
<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">
|
||||||
|
删除
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-main>
|
||||||
|
<el-main class="nopadding" style="position: relative;">
|
||||||
|
<el-header style="justify-content: flex-end;">
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="query.date"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始时间"
|
||||||
|
end-placeholder="结束时间"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
>查询</el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<scTable
|
||||||
|
ref="table2"
|
||||||
|
:data="dataList"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
:height="bottomHeight"
|
||||||
|
:hideDo="hideDo"
|
||||||
|
:params="query"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50"/>
|
||||||
|
<el-table-column label="任务编号" prop="number" width="100" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品名称" prop="name" width="100" show-overflow-tooltip fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="型号" prop="xh" width="100" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划量" prop="count" width="100" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="日均产量" prop="count1" width="100" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划开工时间" prop="start_date" width="100" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划完工时间" prop="end_date" width="100" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-for="item in columList" :label="item" :key="item">
|
||||||
|
<template #default="scope">
|
||||||
|
<div :class="bindClass(scope.row)">
|
||||||
|
<div v-if="activeName=='10车间'">{{ scope.row.count01 }}</div>
|
||||||
|
<div>{{ scope.row.count02 }}</div>
|
||||||
|
<div>{{ scope.row.count03 }}</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
<save-dialog
|
||||||
|
v-if="dialog.save"
|
||||||
|
ref="saveDialog"
|
||||||
|
:activeName="activeName"
|
||||||
|
@success="handleSaveSuccess"
|
||||||
|
@closed="dialog.save = false"
|
||||||
|
></save-dialog>
|
||||||
|
<el-drawer
|
||||||
|
title="任务详情"
|
||||||
|
v-model="visibleRecord"
|
||||||
|
:size="800"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="visibleRecord=false"
|
||||||
|
>
|
||||||
|
<div class="right-panel tabsHeader">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="paramsObj.start_date"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleDetailQuery"
|
||||||
|
>查询</el-button>
|
||||||
|
</div>
|
||||||
|
<el-container v-loading="isloading">
|
||||||
|
<el-main style="padding: 0 20px 20px 20px">
|
||||||
|
<scTable
|
||||||
|
ref="drawer_table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
:params="paramsObj"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50"/>
|
||||||
|
<el-table-column label="工段" prop="mgroup_name" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料编号" prop="number">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数量" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="工作日期" prop="start_date">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" prop="state" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.state!==40" type="primary">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-else type="success">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./mtask_form.vue";
|
import saveDialog from "./mtask_form.vue";
|
||||||
|
|
@ -337,15 +343,6 @@ export default {
|
||||||
dataList:[
|
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: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: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'],
|
columList:['10.15','10.16','10.17'],
|
||||||
selection: [],
|
selection: [],
|
||||||
|
|
@ -424,6 +421,20 @@ export default {
|
||||||
});
|
});
|
||||||
}).catch(() => {});
|
}).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) {
|
handleSaveSuccess(data, mode) {
|
||||||
this.$refs.table7.refresh();
|
this.$refs.table7.refresh();
|
||||||
|
|
@ -508,28 +519,31 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.countBlock{
|
.right-panel > * + * {
|
||||||
width: 80px;
|
margin-left: 10px;
|
||||||
color: #ffffff;
|
}
|
||||||
text-align: center;
|
.countBlock{
|
||||||
}
|
width: 80px;
|
||||||
.redColor{
|
color: #ffffff;
|
||||||
background-color: brown;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.greenColor{
|
.redColor{
|
||||||
background-color: green;
|
background-color: brown;
|
||||||
}
|
}
|
||||||
.orangeColor{
|
.greenColor{
|
||||||
background-color: orange;
|
background-color: green;
|
||||||
}
|
}
|
||||||
.el-main.nopadding{
|
.orangeColor{
|
||||||
padding:0 20px 0 20px
|
background-color: orange;
|
||||||
}
|
}
|
||||||
.btnsContainer{
|
.el-main.nopadding{
|
||||||
display: inline-block;
|
padding:0 20px 0 20px
|
||||||
position: absolute;
|
}
|
||||||
right: 20px;
|
.btnsContainer{
|
||||||
margin-top: 4px;
|
display: inline-block;
|
||||||
z-index: 100
|
position: absolute;
|
||||||
}
|
right: 20px;
|
||||||
|
margin-top: 4px;
|
||||||
|
z-index: 100
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -42,8 +42,10 @@
|
||||||
<el-link type="primary" @click="table_edit(scope.row)" v-if="scope.row.state==10">
|
<el-link type="primary" @click="table_edit(scope.row)" v-if="scope.row.state==10">
|
||||||
编辑
|
编辑
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==14"></el-divider>
|
<el-divider direction="vertical" v-if="scope.row.state==30"></el-divider>
|
||||||
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==14">
|
<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>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -290,6 +292,20 @@ export default {
|
||||||
this.$message.error('未选择任何任务')
|
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(){
|
utaskAssgin(){
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.selectedIds.length>0){
|
if(that.selectedIds.length>0){
|
||||||
|
|
@ -382,11 +398,12 @@ export default {
|
||||||
},
|
},
|
||||||
//删除
|
//删除
|
||||||
async table_del(row) {
|
async table_del(row) {
|
||||||
|
let that = this;
|
||||||
this.$confirm(`确定删除吗?`, "提示", {
|
this.$confirm(`确定删除吗?`, "提示", {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$API.pm.utask.delete.req(row.id).then((res) => {
|
this.$API.pm.utask.delete.req(row.id).then((res) => {
|
||||||
this.$message.success("删除成功");
|
that.$message.success("删除成功");
|
||||||
that.$refs.table1.refresh();
|
that.$refs.table1.refresh();
|
||||||
return res;
|
return res;
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
|
|
@ -394,14 +411,9 @@ export default {
|
||||||
});
|
});
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
|
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
handleSaveSuccess(data, mode) {
|
handleSaveSuccess() {
|
||||||
if (mode == "add") {
|
this.$refs.table1.refresh();
|
||||||
this.$refs.table.refresh();
|
|
||||||
} else if (mode == "edit") {
|
|
||||||
this.$refs.table.refresh();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.table.queryData(this.query)
|
this.$refs.table.queryData(this.query)
|
||||||
|
|
@ -433,6 +445,9 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.right-panel > * + * {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
.el-main.nopadding {
|
.el-main.nopadding {
|
||||||
padding: 0 20px 0 20px
|
padding: 0 20px 0 20px
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,6 @@
|
||||||
<el-input v-model="form.number" placeholder="任务编号" :disabled="mode=='edit'"/>
|
<el-input v-model="form.number" placeholder="任务编号" :disabled="mode=='edit'"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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-col :md="12" :sm="24" v-if="activeName!=='6车间'">
|
||||||
<el-form-item label="工段" prop="mgroup">
|
<el-form-item label="工段" prop="mgroup">
|
||||||
<el-select
|
<el-select
|
||||||
|
|
@ -61,6 +56,11 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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-col :md="12" :sm="24">
|
||||||
<el-form-item label="开工日期" prop="start_date">
|
<el-form-item label="开工日期" prop="start_date">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
@ -112,6 +112,8 @@ export default {
|
||||||
},
|
},
|
||||||
form: {},
|
form: {},
|
||||||
rules: {
|
rules: {
|
||||||
|
mgroup:[{required:true, message:'请选择工段', trigger: "blur"}],
|
||||||
|
count:[{required:true, message:'请输入任务数', trigger: "blur"}],
|
||||||
start_date: [{required: true, message: "请选择开始时间", trigger: "blur"}],
|
start_date: [{required: true, message: "请选择开始时间", trigger: "blur"}],
|
||||||
end_date: [{required: true, message: "请选择结束时间", trigger: "blur"}],
|
end_date: [{required: true, message: "请选择结束时间", trigger: "blur"}],
|
||||||
number: [{required: true, message: "请输入任务编号", trigger: "blur"}],
|
number: [{required: true, message: "请输入任务编号", trigger: "blur"}],
|
||||||
|
|
@ -151,6 +153,7 @@ export default {
|
||||||
if(this.activeName=='6车间'){
|
if(this.activeName=='6车间'){
|
||||||
obj.type = 10;
|
obj.type = 10;
|
||||||
obj.is_hidden = false;
|
obj.is_hidden = false;
|
||||||
|
obj.is_assemb = false;
|
||||||
}else{
|
}else{
|
||||||
obj.type = 20;
|
obj.type = 20;
|
||||||
obj.is_hidden = false;
|
obj.is_hidden = false;
|
||||||
|
|
@ -181,7 +184,7 @@ export default {
|
||||||
res = await this.$API.pm.utask.update.req(this.form.id,this.form);
|
res = await this.$API.pm.utask.update.req(this.form.id,this.form);
|
||||||
}
|
}
|
||||||
this.isSaveing = false;
|
this.isSaveing = false;
|
||||||
this.$emit("success", this.form, this.mode);
|
this.$emit("success");
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$message.success("操作成功");
|
this.$message.success("操作成功");
|
||||||
} catch (err) {
|
} 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">
|
<template #default="scope">
|
||||||
<span v-if="!scope.row.change">{{ scope.row.mgroup_name }}</span>
|
<span v-if="!scope.row.change">{{ scope.row.mgroup_name }}</span>
|
||||||
<el-select v-else v-model="scope.row.batch" placeholder="请选择">
|
<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>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -120,7 +120,6 @@
|
||||||
related:[],
|
related:[],
|
||||||
userList:[],
|
userList:[],
|
||||||
formList: [],
|
formList: [],
|
||||||
processOptions:[],
|
|
||||||
recordId:'',
|
recordId:'',
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
|
|
@ -137,7 +136,6 @@
|
||||||
this.getBatchs();
|
this.getBatchs();
|
||||||
this.getFormList();
|
this.getFormList();
|
||||||
this.getUserList();
|
this.getUserList();
|
||||||
this.getProcess();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//显示
|
//显示
|
||||||
|
|
@ -173,12 +171,7 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//获取工序列表
|
|
||||||
getProcess(){
|
|
||||||
var res = this.$API.mtm.process.list.req({page:0}).then(res=>{
|
|
||||||
this.processOptions = res;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//获取车间物料批次号
|
//获取车间物料批次号
|
||||||
getBatchs(){
|
getBatchs(){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -206,6 +199,12 @@
|
||||||
deleteRow(){
|
deleteRow(){
|
||||||
this.$refs.table.deleteRow(0)
|
this.$refs.table.deleteRow(0)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getList(){
|
||||||
|
this.$API.mtm.material.list.req({page:0}).then(res=>{
|
||||||
|
this.options = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
getReceptionist(data) {
|
getReceptionist(data) {
|
||||||
// 子组件调用父组件的方法并传参
|
// 子组件调用父组件的方法并传参
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,16 @@
|
||||||
<el-main id="topContainer" class="nopadding" style="position: relative;margin-bottom: 10px;">
|
<el-main id="topContainer" class="nopadding" style="position: relative;margin-bottom: 10px;">
|
||||||
<div class="right-panel tabsHeader">
|
<div class="right-panel tabsHeader">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.date"
|
v-model="query.date"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
>查询</el-button>
|
>查询</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
<el-tab-pane label="粗加工6车间" name="first">
|
<el-tab-pane label="粗加工6车间" name="first">
|
||||||
<scTable
|
<scTable
|
||||||
|
|
@ -106,7 +106,7 @@
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<div class="tableTitle" style="display:flex;justify-content: space-between;">
|
<div class="tableTitle" style="display:flex;justify-content: space-between;">
|
||||||
<div>车间物料</div>
|
<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>
|
||||||
<el-button type="primary" @click="tomio">车间出库</el-button>
|
<el-button type="primary" @click="tomio">车间出库</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -275,21 +275,24 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.tabsHeader{
|
.tabsHeader{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 20px;
|
right: 20px;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
z-index:100
|
z-index:100
|
||||||
}
|
}
|
||||||
.el-main.nopadding{
|
.right-panel > * + * {
|
||||||
padding:0 20px 0 20px
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
.tableTitle{
|
.el-main.nopadding{
|
||||||
height: 40px;
|
padding:0 20px 0 20px
|
||||||
|
}
|
||||||
|
.tableTitle{
|
||||||
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-bottom: 1px solid #eeeeee;
|
border-bottom: 1px solid #eeeeee;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -18,62 +18,84 @@
|
||||||
<el-col :xl="4" :lg="6" :md="8" :sm="12" :xs="24">
|
<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-form-item class="infoForm" label="计划日期:">{{ orderObj.start_date }}</el-form-item>
|
||||||
</el-col>
|
</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-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<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>
|
||||||
<div class="right-panel"></div>
|
<div class="right-panel"></div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<sc-form-table ref="table" v-model="relatedList" hideAdd drag-sort placeholder="暂无数据">
|
||||||
ref="mlogTable"
|
<el-table-column prop="type" label="工序" min-width="100">
|
||||||
:apiObj="apiObj"
|
<template #default="scope">
|
||||||
row-key="id"
|
<span v-if="!scope.row.change">{{ scope.row.mgroup_name }}</span>
|
||||||
stripe
|
<el-select v-else v-model="scope.row.mtask" placeholder="请选择">
|
||||||
:hidePagination="true"
|
<el-option v-for="item in related" :key="item.id" :label="item.mgroup_name" :value="item.id"></el-option>
|
||||||
:params="query"
|
</el-select>
|
||||||
>
|
</template>
|
||||||
<el-table-column type="index" width="50"/>
|
</el-table-column>
|
||||||
<el-table-column label="产品编号" prop="batch">
|
<el-table-column prop="type" label="产品编号" min-width="120" align="center">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column label="产品名称" prop="number">
|
<el-select v-model="scope.row.batch" style="width: 100%" :disabled="!scope.row.isedit">
|
||||||
</el-table-column>
|
<el-option
|
||||||
<el-table-column label="型号" prop="number">
|
v-for="item in batchOptions"
|
||||||
</el-table-column>
|
:key="item"
|
||||||
<el-table-column label="规格" prop="number">
|
:label="item"
|
||||||
</el-table-column>
|
:value="item"
|
||||||
<el-table-column label="领料数量" prop="count_use">
|
/>
|
||||||
</el-table-column>
|
</el-select>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
</template>
|
||||||
<template #default="scope">
|
</el-table-column>
|
||||||
<el-link
|
<el-table-column prop="val" label="加工数量" min-width="100">
|
||||||
type="primary"
|
<template #default="scope">
|
||||||
@click="table_edit(scope.row)"
|
<el-input v-model="scope.row.count_use" placeholder="加工数量" :disabled="!scope.row.isedit"></el-input>
|
||||||
v-if="orderObj.state==10||orderObj.state==20"
|
</template>
|
||||||
v-auth="'equipment'"
|
</el-table-column>
|
||||||
>编辑
|
<el-table-column prop="val" label="合格数量" min-width="100">
|
||||||
</el-link>
|
<template #default="scope">
|
||||||
<!-- 提交后变查看 -->
|
<el-input v-model="scope.row.count_ok" placeholder="合格数量" :disabled="!scope.row.isedit"></el-input>
|
||||||
<el-link
|
</template>
|
||||||
v-else
|
</el-table-column>
|
||||||
type="primary"
|
<el-table-column label="不合格数量" align="center">
|
||||||
@click="table_edit(scope.row)"
|
<el-table-column prop="val" label="原因1" min-width="100">
|
||||||
v-auth="'equipment'"
|
<template #default="scope">
|
||||||
>查看
|
<el-input v-model="scope.row.count_notok" placeholder="原因1" :disabled="!scope.row.isedit"></el-input>
|
||||||
</el-link>
|
</template>
|
||||||
<el-divider direction="vertical"></el-divider>
|
</el-table-column>
|
||||||
<el-link
|
<el-table-column prop="val" label="原因2" min-width="100">
|
||||||
type="danger"
|
<template #default="scope">
|
||||||
@click="table_del(scope.row)"
|
<el-input v-model="scope.row.count_notok" placeholder="原因2" :disabled="!scope.row.isedit"></el-input>
|
||||||
>删除
|
</template>
|
||||||
</el-link>
|
</el-table-column>
|
||||||
</template>
|
<el-table-column prop="val" label="原因3" min-width="100">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
</scTable>
|
<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-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
<save-dialog
|
<save-dialog
|
||||||
|
|
@ -104,7 +126,12 @@
|
||||||
page:0,
|
page:0,
|
||||||
mtask:''
|
mtask:''
|
||||||
},
|
},
|
||||||
materialId:'',
|
related:[],
|
||||||
|
userList:[],
|
||||||
|
formList: [],
|
||||||
|
relatedList:[],
|
||||||
|
batchOptions:[],
|
||||||
|
processOptions:[],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
|
|
@ -112,52 +139,142 @@
|
||||||
this.query.mtask = this.$route.query.mtask;
|
this.query.mtask = this.$route.query.mtask;
|
||||||
this.apiObj = this.$API.wpm.mlog.relatedFirst;
|
this.apiObj = this.$API.wpm.mlog.relatedFirst;
|
||||||
this.getTask();//获取任务详情
|
this.getTask();//获取任务详情
|
||||||
|
this.getUserList();
|
||||||
|
this.getBatchs();
|
||||||
|
this.getProcess()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取任务详情
|
//获取任务详情
|
||||||
getTask(){
|
getTask(){
|
||||||
this.$API.pm.mtask.item.req(this.mtask).then((res) => {
|
let that = this;
|
||||||
this.orderObj = res;
|
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() {
|
addRow() {
|
||||||
this.dialog.save = true;
|
let obj = {
|
||||||
this.$nextTick(() => {
|
mtask:'',
|
||||||
this.$refs.saveDialog.open("add");
|
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(){
|
||||||
table_edit(row) {
|
let that = this;
|
||||||
this.dialog.save = true;
|
that.$API.pm.mtask.related.req(that.orderObj.id).then(res=>{
|
||||||
this.$nextTick(() => {
|
that.related = res;
|
||||||
this.$refs.saveDialog.open("edit").setData(row);
|
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(){
|
||||||
table_show(row) {
|
let that = this;
|
||||||
this.dialog.save = true;
|
this.$API.system.user.list.req({belong_dept:'3423857962907983872',page:0}).then(res=>{
|
||||||
this.$nextTick(() => {
|
that.userList = res;
|
||||||
this.$refs.saveDialog.open("show").setData(row);
|
});
|
||||||
});
|
},
|
||||||
|
//获取车间物料批次号
|
||||||
|
getBatchs(){
|
||||||
|
let that = this;
|
||||||
|
this.$API.wpm.wmaterial.batchs.req({belong_dept_name:'6车间'}).then(res=>{
|
||||||
|
that.batchOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
editForm(row,index){
|
||||||
|
debugger;
|
||||||
|
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)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//删除
|
|
||||||
table_del(row) {
|
|
||||||
this.$confirm(`确定删除吗?`, "提示", {
|
|
||||||
type: "warning",
|
|
||||||
}).then(() => {
|
|
||||||
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(() => {});
|
|
||||||
},
|
|
||||||
|
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
handleSaveSuccess() {
|
handleSaveSuccess() {
|
||||||
this.$refs.mlogTable.refresh();
|
this.$refs.mlogTable.refresh();
|
||||||
|
|
@ -168,10 +285,15 @@
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
},
|
},
|
||||||
submitForm(){
|
submit(){
|
||||||
this.$API.pm.mtask.submitSameDay.req(this.orderObj.id).then(re=>{
|
let that = this;
|
||||||
// console.log(res)
|
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