Merge branch 'v2' of https://e.coding.net/ctcdevteam/ehs/ehs_web into v2
This commit is contained in:
commit
5b0ed75718
|
|
@ -4,15 +4,6 @@ import data from './../../../src/utils/baseJson';
|
||||||
const baseInFo = data[data.current];
|
const baseInFo = data[data.current];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
config:{
|
|
||||||
base: {
|
|
||||||
url: `${config.API_URL}/system/base_config/`,
|
|
||||||
name: "账户信息",
|
|
||||||
req: async function(){
|
|
||||||
return await http.get(this.url);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// config:{
|
// config:{
|
||||||
// base: {
|
// base: {
|
||||||
// url: `${config.API_URL}/system/base_config/`,
|
// url: `${config.API_URL}/system/base_config/`,
|
||||||
|
|
@ -413,7 +404,14 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
baseInfo: {
|
config: {
|
||||||
|
base: {
|
||||||
|
url: `${config.API_URL}/system/base_config/`,
|
||||||
|
name: "账户信息",
|
||||||
|
req: async function(){
|
||||||
|
return await http.get(this.url);
|
||||||
|
}
|
||||||
|
},
|
||||||
getInfo: {
|
getInfo: {
|
||||||
url: `${config.API_URL}/system/config/`,
|
url: `${config.API_URL}/system/config/`,
|
||||||
name: "获取系统信息",
|
name: "获取系统信息",
|
||||||
|
|
|
||||||
|
|
@ -235,9 +235,9 @@
|
||||||
return baseName;
|
return baseName;
|
||||||
},
|
},
|
||||||
baseLogo(){
|
baseLogo(){
|
||||||
let baseInFo = data[data.current];
|
// let baseInFo = data[data.current];
|
||||||
// let base_logo = this.$TOOL.data.get("BASE_INFO")!==null?this.$TOOL.data.get("BASE_INFO").base.base_logo:'img/logo.png';
|
let base_logo = this.$TOOL.data.get("BASE_INFO")!==null?this.$TOOL.data.get("BASE_INFO").base.base_logo:'img/logo.png';
|
||||||
let base_logo = baseInFo!==null?baseInFo.base.base_logo:'img/logo.png';
|
// let base_logo = baseInFo!==null?baseInFo.base.base_logo:'img/logo.png';
|
||||||
return base_logo
|
return base_logo
|
||||||
},
|
},
|
||||||
ismobile(){
|
ismobile(){
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,9 @@
|
||||||
<el-button type="default" @click="h5Show">H5访问</el-button>
|
<el-button type="default" @click="h5Show">H5访问</el-button>
|
||||||
<el-button type="primary" @click="MonitorOpen" style="background-color:orange;border-color:orange">监控视频</el-button>
|
<el-button type="primary" @click="MonitorOpen" style="background-color:orange;border-color:orange">监控视频</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="login-oauth" v-else>
|
<!-- <div class="login-oauth" v-else>
|
||||||
<el-button type="default" @click="faceLogin">刷脸登录</el-button>
|
<el-button type="default" @click="faceLogin">刷脸登录</el-button>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -35,18 +35,18 @@
|
||||||
<span v-if="!scope.row.isedit">{{
|
<span v-if="!scope.row.isedit">{{
|
||||||
scope.row.material_in_name
|
scope.row.material_in_name
|
||||||
}}</span>
|
}}</span>
|
||||||
<el-select v-else v-model="scope.row.material_in" style="width: 100%">
|
<el-select v-else v-model="scope.row.material_in" filterable style="width: 100%">
|
||||||
<el-option v-for="item in materials" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in materials" :key="item.id" :label="item.full_name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="type" label="输出物料" min-width="120" align="center">
|
<el-table-column prop="type" label="输出物料" min-width="120" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="!scope.row.isedit">{{
|
<span v-if="!scope.row.isedit ">{{
|
||||||
scope.row.material_out_name
|
scope.row.material_out_name
|
||||||
}}</span>
|
}}</span>
|
||||||
<el-select v-else v-model="scope.row.material_out" filterable style="width: 100%">
|
<el-select v-else v-model="scope.row.material_out" filterable style="width: 100%">
|
||||||
<el-option v-for="item in materials" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in materials" :key="item.id" :label="item.full_name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="输入/输出" min-width="120">
|
<el-table-column label="输入/输出" min-width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.material_in_name }} / {{ scope.row.material_out_name }}</span>
|
<span>{{ scope.row.material_in_name }} -> {{ scope.row.material_out_name }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="出材率" prop="out_rate" min-width="80"></el-table-column>
|
<el-table-column label="出材率" prop="out_rate" min-width="80"></el-table-column>
|
||||||
|
|
@ -103,8 +103,8 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="主要输入" prop="material_in">
|
<el-form-item label="主要输入" prop="material_in">
|
||||||
<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.full_name" :value="item.id">
|
||||||
<span style="float: left">{{ item.name }}</span>
|
<span style="float: left">{{ item.full_name }}</span>
|
||||||
<span style="float: right;color: '#E6A23C';font-size: 13px;" v-if="item.is_hidden">{{
|
<span style="float: right;color: '#E6A23C';font-size: 13px;" v-if="item.is_hidden">{{
|
||||||
item.process_name }}-隐</span>
|
item.process_name }}-隐</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
|
|
@ -112,8 +112,8 @@
|
||||||
</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">
|
<el-option v-for="item in materialOptions" :key="item.id" :label="item.full_name" :value="item.id">
|
||||||
<span style="float: left">{{ item.name }}</span>
|
<span style="float: left">{{ item.full_name }}</span>
|
||||||
<span style="float: right;color: '#E6A23C';font-size: 13px;" v-if="item.is_hidden">{{
|
<span style="float: right;color: '#E6A23C';font-size: 13px;" v-if="item.is_hidden">{{
|
||||||
item.process_name }}-隐</span></el-option>
|
item.process_name }}-隐</span></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -181,7 +181,7 @@ export default {
|
||||||
getProducts() {
|
getProducts() {
|
||||||
this.$API.mtm.material.list.req({ page: 0, need_route: true }).then(res => {
|
this.$API.mtm.material.list.req({ page: 0, need_route: true }).then(res => {
|
||||||
res.forEach(m => {
|
res.forEach(m => {
|
||||||
m.label = m.name+'—'+m.specification+'/'+m.model;
|
m.label = m.name+'|'+m.specification+'|'+m.model;
|
||||||
})
|
})
|
||||||
this.productOptions = res
|
this.productOptions = res
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@
|
||||||
<div class="user-info-top">
|
<div class="user-info-top">
|
||||||
<el-avatar
|
<el-avatar
|
||||||
:size="100"
|
:size="100"
|
||||||
:src="$store.state.global.baseLogo"
|
:src="form.base_logo"
|
||||||
shape="square"
|
shape="square"
|
||||||
></el-avatar>
|
></el-avatar>
|
||||||
<h3>{{ $store.state.global.baseName }}</h3>
|
<h3>{{ form.base_name }}</h3>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
|
@ -63,6 +63,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
form: {},
|
||||||
menu: [
|
menu: [
|
||||||
{
|
{
|
||||||
groupName: "系统配置",
|
groupName: "系统配置",
|
||||||
|
|
@ -106,18 +107,16 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getBaseInfo();
|
this.getSysConfig();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openPage(item) {
|
openPage(item) {
|
||||||
this.page = item.index;
|
this.page = item.index;
|
||||||
},
|
},
|
||||||
|
|
||||||
getBaseInfo() {
|
getSysConfig() {
|
||||||
this.$API.system.baseInfo.getInfo.req().then((res) => {
|
this.$API.system.config.getInfo.req().then(res=>{
|
||||||
debugger;
|
this.form = res.base
|
||||||
console.log(res)
|
|
||||||
this.$TOOL.data.set("BASE_INFO", res)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -36,25 +36,22 @@ export default {
|
||||||
apk_file:'',
|
apk_file:'',
|
||||||
apk_remark:'',
|
apk_remark:'',
|
||||||
},
|
},
|
||||||
configInfo:null,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
this.getBaseInfo()
|
this.getSysConfig();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
getBaseInfo() {
|
getSysConfig() {
|
||||||
this.configInfo = this.$TOOL.data.get("BASE_INFO");
|
this.$API.system.config.getInfo.req().then(res=>{
|
||||||
this.form = this.$TOOL.data.get("BASE_INFO").apk
|
this.form = res.apk
|
||||||
|
})
|
||||||
},
|
},
|
||||||
submitForm(){
|
submitForm(){
|
||||||
this.saveLoading = true;
|
this.saveLoading = true;
|
||||||
let obj = {}
|
let obj = {}
|
||||||
this.configInfo.apk = this.form;
|
|
||||||
obj.apk = this.form;
|
obj.apk = this.form;
|
||||||
this.$API.system.baseInfo.updateInfo.req(obj).then((res) => {
|
this.$API.system.config.updateInfo.req(obj).then((res) => {
|
||||||
this.$message.success("保存成功")
|
|
||||||
this.$TOOL.data.set("BASE_INFO", this.configInfo)
|
|
||||||
this.saveLoading = false;
|
this.saveLoading = false;
|
||||||
}).catch(res=>{
|
}).catch(res=>{
|
||||||
this.saveLoading = false;
|
this.saveLoading = false;
|
||||||
|
|
|
||||||
|
|
@ -32,28 +32,24 @@ export default {
|
||||||
xn_secret:'',
|
xn_secret:'',
|
||||||
},
|
},
|
||||||
saveLoading:false,
|
saveLoading:false,
|
||||||
configInfo:null,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getBaseInfo();
|
this.getSysConfig();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openPage(item) {
|
openPage(item) {
|
||||||
this.page = item.index;
|
this.page = item.index;
|
||||||
},
|
},
|
||||||
getBaseInfo() {
|
getSysConfig() {
|
||||||
this.configInfo = this.$TOOL.data.get("BASE_INFO");
|
this.$API.system.config.getInfo.req().then(res=>{
|
||||||
this.form = this.$TOOL.data.get("BASE_INFO").sms
|
this.form = res.sms
|
||||||
|
})
|
||||||
},
|
},
|
||||||
submitForm(){
|
submitForm(){
|
||||||
this.saveLoading = true;
|
this.saveLoading = true;
|
||||||
let obj = {}
|
this.$API.system.config.updateInfo.req(this.form).then((res) => {
|
||||||
obj.sms = this.form;
|
|
||||||
this.configInfo.sms = this.form
|
|
||||||
this.$API.system.baseInfo.updateInfo.req(obj).then((res) => {
|
|
||||||
this.$message.success("保存成功")
|
this.$message.success("保存成功")
|
||||||
this.$TOOL.data.set("BASE_INFO", this.configInfo)
|
|
||||||
this.saveLoading = false;
|
this.saveLoading = false;
|
||||||
}).catch(res=>{
|
}).catch(res=>{
|
||||||
this.saveLoading = false;
|
this.saveLoading = false;
|
||||||
|
|
|
||||||
|
|
@ -48,29 +48,27 @@ export default {
|
||||||
base_name: "托克逊能源管理平台",
|
base_name: "托克逊能源管理平台",
|
||||||
base_name_short: "托克逊能管"
|
base_name_short: "托克逊能管"
|
||||||
},
|
},
|
||||||
configInfo:null,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getBaseInfo();
|
this.getSysConfig();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openPage(item) {
|
openPage(item) {
|
||||||
this.page = item.index;
|
this.page = item.index;
|
||||||
},
|
},
|
||||||
|
|
||||||
getBaseInfo() {
|
getSysConfig() {
|
||||||
this.configInfo = this.$TOOL.data.get("BASE_INFO");
|
this.$API.system.config.getInfo.req().then(res=>{
|
||||||
this.form = this.$TOOL.data.get("BASE_INFO").base
|
this.form = res.base
|
||||||
|
})
|
||||||
},
|
},
|
||||||
submitForm(){
|
submitForm(){
|
||||||
this.saveLoading = true;
|
this.saveLoading = true;
|
||||||
let obj = {}
|
let obj = {}
|
||||||
this.configInfo.base = this.form;
|
|
||||||
obj.base = this.form;
|
obj.base = this.form;
|
||||||
this.$API.system.baseInfo.updateInfo.req(obj).then((res) => {
|
this.$API.system.config.updateInfo.req(obj).then((res) => {
|
||||||
this.$message.success("保存成功")
|
this.$message.success("保存成功")
|
||||||
this.$TOOL.data.set("BASE_INFO", this.configInfo)
|
|
||||||
this.saveLoading = false;
|
this.saveLoading = false;
|
||||||
}).catch(res=>{
|
}).catch(res=>{
|
||||||
this.saveLoading = false;
|
this.saveLoading = false;
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,13 @@
|
||||||
<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-form-item label="生产路线" prop="route" v-if="mode == 'add'">
|
<el-form-item label="生产路线" prop="route" v-if="mode == 'add'">
|
||||||
<el-select placeholder="路线" v-model="currentRoute" value-key="id" style="width:100%" @change="routeChange">
|
<el-select placeholder="路线" v-model="currentRoute" value-key="id" style="width:100%" filterable @change="routeChange">
|
||||||
<el-option v-for="item in routeOptions" :key="item.id" :label="item.label" :value="item">
|
<el-option v-for="item in routeOptions" :key="item.id" :label="item.label" :value="item">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="生产路线" prop="route" v-if="mode == 'edit'">
|
<el-form-item label="生产路线" prop="route" v-if="mode == 'edit'">
|
||||||
<span>{{ form.mgroup_name }}---<span v-if="form.material_">{{ form.material_.name }}</span></span>
|
<span>{{ form.material_in_name}}->{{ form.material_out_name }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="任务数" prop="count">
|
<el-form-item label="任务数" prop="count">
|
||||||
<el-input-number style="width:100%" v-model="form.count" :min="1" controls-position="right"
|
<el-input-number style="width:100%" v-model="form.count" :min="1" controls-position="right"
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,13 @@
|
||||||
<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-form-item label="产物" prop="material" v-if="mode == 'add'">
|
<el-form-item label="产物" prop="material" v-if="mode == 'add'">
|
||||||
<el-select placeholder="产物" v-model="form.material" style="width:100%">
|
<el-select placeholder="产物" v-model="form.material" filterable 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.full_name" :value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="产物" prop="material" v-if="mode == 'edit'">
|
<el-form-item label="产物" prop="material" v-if="mode == 'edit'">
|
||||||
<span v-if="form.material_">{{ form.material_.name }}</span>
|
<span v-if="form.material_">{{ form.material_.full_name }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="任务数" prop="count">
|
<el-form-item label="任务数" prop="count">
|
||||||
<el-input-number style="width:100%" v-model="form.count" :min="1" controls-position="right"
|
<el-input-number style="width:100%" v-model="form.count" :min="1" controls-position="right"
|
||||||
|
|
|
||||||
|
|
@ -242,6 +242,11 @@
|
||||||
scope.row.material_.model
|
scope.row.material_.model
|
||||||
}}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="已到工序" prop="material">
|
||||||
|
<template #default="scope">{{
|
||||||
|
scope.row.material_.process_name
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="批次" prop="batch"> </el-table-column>
|
<el-table-column label="批次" prop="batch"> </el-table-column>
|
||||||
<el-table-column label="数量" prop="count" width="80">
|
<el-table-column label="数量" prop="count" width="80">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -252,7 +257,9 @@
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-main>
|
</el-main>
|
||||||
<save-dialog v-if="dialogSave" ref="saveDialog" :mtask="currentMtask.id" :mgroup="mgroup"
|
<save-dialog v-if="dialogSave" ref="saveDialog" :mtask="currentMtask.id" :mgroup="mgroup"
|
||||||
:material_out="material_out" :brothersList="brothersList" :activeType="activeName" @success="handleSaveSuccess"
|
:material_out="material_out" :brothersList="brothersList"
|
||||||
|
:material_in="material_in"
|
||||||
|
:activeType="activeName" @success="handleSaveSuccess"
|
||||||
@closed="dialogSave = false"></save-dialog>
|
@closed="dialogSave = false"></save-dialog>
|
||||||
<showDrawer ref="showDrawer" v-if="visibleDrawer" :mlogId="mlogId" @closed="visibleDrawer = false">
|
<showDrawer ref="showDrawer" v-if="visibleDrawer" :mlogId="mlogId" @closed="visibleDrawer = false">
|
||||||
</showDrawer>
|
</showDrawer>
|
||||||
|
|
@ -346,6 +353,7 @@ export default {
|
||||||
if (res.length == 1) {
|
if (res.length == 1) {
|
||||||
this.currentDept = res[0]
|
this.currentDept = res[0]
|
||||||
this.paramsMtask.mgroup__belong_dept = this.currentDept.id
|
this.paramsMtask.mgroup__belong_dept = this.currentDept.id
|
||||||
|
this.paramsMtask.state__in = '20,40'
|
||||||
this.apiMtask = this.$API.pm.mtask.list
|
this.apiMtask = this.$API.pm.mtask.list
|
||||||
|
|
||||||
this.paramsHandover.recive_dept = this.currentDept.id
|
this.paramsHandover.recive_dept = this.currentDept.id
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,13 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-date-picker v-model="query.date" type="date" value-format="YYYY-MM-DD" />
|
<el-date-picker v-model="queryMtask.start_date" type="date" value-format="YYYY-MM-DD" />
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQueryMtask">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQueryMtask">查询</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main>
|
<el-main>
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" hidePagination
|
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="paramsMtask" :query="queryMtask"
|
||||||
@row-click="rowClick" hideDo>
|
@row-click="rowClick">
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="任务编号" prop="number">
|
<el-table-column label="任务编号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -161,6 +161,11 @@
|
||||||
{{ scope.row.material_.model }}
|
{{ scope.row.material_.model }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="已到工序" prop="material">
|
||||||
|
<template #default="scope">{{
|
||||||
|
scope.row.material_.process_name
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="批次" prop="batch"> </el-table-column>
|
<el-table-column label="批次" prop="batch"> </el-table-column>
|
||||||
<el-table-column label="数量" prop="count" width="80">
|
<el-table-column label="数量" prop="count" width="80">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -180,12 +185,7 @@ export default {
|
||||||
save: false,
|
save: false,
|
||||||
},
|
},
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
query: {
|
query: {},
|
||||||
page: 1,
|
|
||||||
page_size: 20,
|
|
||||||
belong_dept_name: '6车间',
|
|
||||||
date: '2023-10-24'
|
|
||||||
},
|
|
||||||
processList: [],//工序进度
|
processList: [],//工序进度
|
||||||
state_: {
|
state_: {
|
||||||
10: '创建中',
|
10: '创建中',
|
||||||
|
|
@ -205,12 +205,18 @@ export default {
|
||||||
paramsWm: {
|
paramsWm: {
|
||||||
belong_dept__name: '6车间'
|
belong_dept__name: '6车间'
|
||||||
},
|
},
|
||||||
|
paramsMtask: {
|
||||||
|
mgroup__belong_dept__name: '6车间',
|
||||||
|
is_count_utask: true,
|
||||||
|
state__in: "20,40"
|
||||||
|
},
|
||||||
|
queryMtask: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let NowDate = new Date();
|
let NowDate = new Date();
|
||||||
this.query.date = NowDate.getFullYear() + '-' + (NowDate.getMonth() + 1) + '-' + NowDate.getDate();
|
// this.queryMtask.start_date = NowDate.getFullYear() + '-' + (NowDate.getMonth() + 1) + '-' + NowDate.getDate();
|
||||||
this.apiObj = this.$API.pm.mtask.daylist;
|
this.apiObj = this.$API.pm.mtask.list;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
tomio() {
|
tomio() {
|
||||||
|
|
@ -239,13 +245,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleQueryMtask() {
|
handleQueryMtask() {
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh(this.queryMtask);
|
||||||
},
|
|
||||||
handleQuery() {
|
|
||||||
this.$refs.table.queryData(this.query)
|
|
||||||
},
|
|
||||||
resetQuery() {
|
|
||||||
this.query = {};
|
|
||||||
},
|
},
|
||||||
table_submit(row) {
|
table_submit(row) {
|
||||||
this.$API.pm.mtask.submit.req(row.id).then(res => {
|
this.$API.pm.mtask.submit.req(row.id).then(res => {
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,8 @@
|
||||||
</template>
|
</template>
|
||||||
<el-descriptions>
|
<el-descriptions>
|
||||||
<el-descriptions-item label="任务编号">{{ currentMtask.number }}</el-descriptions-item>
|
<el-descriptions-item label="任务编号">{{ currentMtask.number }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="产品名称">
|
<el-descriptions-item label="产品全称">
|
||||||
<span v-if="currentMtask.material_out_">{{ currentMtask.material_out_.name }}</span>
|
<span v-if="currentMtask.material_out_">{{ currentMtask.material_out_name }}</span>
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="规格型号">
|
|
||||||
<span v-if="currentMtask.material_out_">{{ currentMtask.material_out_.specification }}</span>
|
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="计划数量">{{ currentMtask.count }}</el-descriptions-item>
|
<el-descriptions-item label="计划数量">{{ currentMtask.count }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="计划日期">{{ currentMtask.start_date }}</el-descriptions-item>
|
<el-descriptions-item label="计划日期">{{ currentMtask.start_date }}</el-descriptions-item>
|
||||||
|
|
|
||||||
|
|
@ -241,6 +241,11 @@
|
||||||
scope.row.material_.model
|
scope.row.material_.model
|
||||||
}}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="已到工序" prop="material">
|
||||||
|
<template #default="scope">{{
|
||||||
|
scope.row.material_.process_name
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="批次" prop="batch"> </el-table-column>
|
<el-table-column label="批次" prop="batch"> </el-table-column>
|
||||||
<el-table-column label="数量" prop="count" width="80">
|
<el-table-column label="数量" prop="count" width="80">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -251,7 +256,7 @@
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-main>
|
</el-main>
|
||||||
<save-dialog v-if="dialogSave" ref="saveDialog" :mtask="currentMtask.id" :mgroup="mgroup"
|
<save-dialog v-if="dialogSave" ref="saveDialog" :mtask="currentMtask.id" :mgroup="mgroup"
|
||||||
:material_out="material_out" :activeType="activeName" @success="handleSaveSuccess"
|
:material_out="material_out" :material_in="material_in" :activeType="activeName" @success="handleSaveSuccess"
|
||||||
@closed="dialogSave = false"></save-dialog>
|
@closed="dialogSave = false"></save-dialog>
|
||||||
<showDrawer ref="showDrawer" v-if="visibleDrawer" :mlogId="mlogId" @closed="visibleDrawer = false">
|
<showDrawer ref="showDrawer" v-if="visibleDrawer" :mlogId="mlogId" @closed="visibleDrawer = false">
|
||||||
</showDrawer>
|
</showDrawer>
|
||||||
|
|
@ -352,6 +357,7 @@ export default {
|
||||||
if (res.length == 1) {
|
if (res.length == 1) {
|
||||||
this.currentDept = res[0]
|
this.currentDept = res[0]
|
||||||
this.paramsMtask.mgroup__belong_dept = this.currentDept.id
|
this.paramsMtask.mgroup__belong_dept = this.currentDept.id
|
||||||
|
this.paramsMtask.state__in = '20,40'
|
||||||
this.apiMtask = this.$API.pm.mtask.list
|
this.apiMtask = this.$API.pm.mtask.list
|
||||||
|
|
||||||
this.paramsHandover.recive_dept = this.currentDept.id
|
this.paramsHandover.recive_dept = this.currentDept.id
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
<el-button link type="primary" @click="table_edit(scope.row)" v-auth="'mlog.update'">
|
<el-button link type="primary" @click="table_edit(scope.row)" v-auth="'mlog.update'">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="success" @click="table_submit(scope.row)" v-auth="'mlog.submit'">
|
<el-button link type="success" @click="table_submit(scope.row)" v-auth="'mlog.submit'">
|
||||||
提交
|
提交
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button link type="danger" @click="table_del(scope.row)" v-auth="'mlog.delete'">
|
<el-button link type="danger" @click="table_del(scope.row)" v-auth="'mlog.delete'">
|
||||||
|
|
@ -129,6 +129,11 @@
|
||||||
scope.row.material_.model
|
scope.row.material_.model
|
||||||
}}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="已到工序" prop="material">
|
||||||
|
<template #default="scope">{{
|
||||||
|
scope.row.material_.process_name
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="批次" prop="batch"> </el-table-column>
|
<el-table-column label="批次" prop="batch"> </el-table-column>
|
||||||
<el-table-column label="数量" prop="count" width="80">
|
<el-table-column label="数量" prop="count" width="80">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -35,21 +35,26 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="生产路线" prop="material_out">
|
<el-form-item label="生产路线" v-if="mode == 'add'">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.material_out"
|
v-model="currentRoute"
|
||||||
placeholder="生产路线"
|
placeholder="生产路线"
|
||||||
clearable
|
clearable
|
||||||
|
filterable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@change="routeChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in routeOptions"
|
v-for="item in routeOptions"
|
||||||
:key="item.material_out"
|
:key="item.id"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.material_out"
|
:value="item"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="生产路线" v-if="mode == 'edit'">
|
||||||
|
<span>{{ form.material_in_name}}->{{ form.material_out_name }}</span>
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :md="12" :sm="24">
|
<!-- <el-col :md="12" :sm="24">
|
||||||
<el-form-item label="班次" prop="material">
|
<el-form-item label="班次" prop="material">
|
||||||
|
|
@ -69,11 +74,11 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="物料批次" width="100">
|
<el-form-item label="批次号" width="100">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.batch"
|
v-model="form.batch"
|
||||||
tyle="width:100%"
|
tyle="width:100%"
|
||||||
placeholder="请输入批次"
|
placeholder="批次号"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -165,21 +170,25 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="生产路线" prop="material_out">
|
<el-form-item label="生产路线" v-if="mode == 'add'">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.material_out"
|
v-model="currentRoute"
|
||||||
placeholder="生产路线"
|
placeholder="生产路线"
|
||||||
clearable
|
filterable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@change="routeChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in routeOptions"
|
v-for="item in routeOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.id"
|
:value="item"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="生产路线" v-if="mode == 'edit'">
|
||||||
|
<span>{{ form.material_in_name}}->{{ form.material_out_name }}</span>
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="合格数">
|
<el-form-item label="合格数">
|
||||||
|
|
@ -208,11 +217,13 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="物料批次" prop="material_in">
|
<el-form-item label="批次号" prop="material_in">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.batch"
|
v-model="form.batch"
|
||||||
placeholder="物料批次"
|
placeholder="批次号"
|
||||||
|
filterable
|
||||||
clearable
|
clearable
|
||||||
|
allow-create
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -457,7 +468,21 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="批次号">
|
<el-form-item label="批次号">
|
||||||
<el-input v-model="form.batch" placeholder="批次号"></el-input>
|
<el-select
|
||||||
|
v-model="form.batch"
|
||||||
|
placeholder="批次号"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
allow-create
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in wMaterialOptions"
|
||||||
|
:key="item.batch"
|
||||||
|
:label="item.batch"
|
||||||
|
:value="item.batch"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :md="12" :sm="24">
|
<!-- <el-col :md="12" :sm="24">
|
||||||
|
|
@ -481,7 +506,7 @@
|
||||||
<el-form-item label="炉号">
|
<el-form-item label="炉号">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.equipment"
|
v-model="form.equipment"
|
||||||
placeholder="锅号"
|
placeholder="炉号"
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
|
|
@ -849,10 +874,21 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="批次号">
|
<el-form-item label="批次号">
|
||||||
<el-input
|
<el-select
|
||||||
v-model="form.batch"
|
v-model="form.batch"
|
||||||
placeholder="请输入请输入批次号"
|
placeholder="批次号"
|
||||||
></el-input>
|
clearable
|
||||||
|
filterable
|
||||||
|
allow-create
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in wMaterialOptions"
|
||||||
|
:key="item.batch"
|
||||||
|
:label="item.batch"
|
||||||
|
:value="item.batch"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -860,7 +896,7 @@
|
||||||
<div v-if="brothersList.length > 0">
|
<div v-if="brothersList.length > 0">
|
||||||
<el-row v-for="item in mlogb" :key="item">
|
<el-row v-for="item in mlogb" :key="item">
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="产品名称" prop="material">
|
<el-form-item label="生产任务">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="item.material_out"
|
v-model="item.material_out"
|
||||||
placeholder="产品名称"
|
placeholder="产品名称"
|
||||||
|
|
@ -1041,6 +1077,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
currentRoute: "",
|
||||||
yseorno: ["是", "否"],
|
yseorno: ["是", "否"],
|
||||||
loading: false,
|
loading: false,
|
||||||
mode: "add",
|
mode: "add",
|
||||||
|
|
@ -1092,19 +1129,22 @@ export default {
|
||||||
console.log('brothersList')
|
console.log('brothersList')
|
||||||
console.log(this.brothersList)
|
console.log(this.brothersList)
|
||||||
this.getMaterial();
|
this.getMaterial();
|
||||||
this.getMgroupList();
|
// this.getMgroupList();
|
||||||
this.getUserList();
|
this.getUserList();
|
||||||
this.getEquipment();
|
this.getEquipment();
|
||||||
this.getShiftOptions();
|
this.getShiftOptions();
|
||||||
this.getRouteOptions();
|
this.getRouteOptions();
|
||||||
this.getWorkShopMaterial();
|
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
let year = date.getFullYear();
|
let year = date.getFullYear();
|
||||||
let month = date.getMonth() + 1;
|
let month = date.getMonth() + 1;
|
||||||
let day = date.getDate();
|
let day = date.getDate();
|
||||||
this.form.material_out = this.material_out;
|
this.form.material_out = this.material_out;
|
||||||
|
this.form.material_in = this.material_in;
|
||||||
|
this.form.mtask = this.mtask;
|
||||||
this.form.mgroup = this.mgroup;
|
this.form.mgroup = this.mgroup;
|
||||||
this.form.handle_date = year + "-" + month + "-" + day;
|
this.form.handle_date = year + "-" + month + "-" + day;
|
||||||
|
this.getWorkShopMaterial();
|
||||||
if (this.activeType == "10车间") {
|
if (this.activeType == "10车间") {
|
||||||
let mlogb = [];
|
let mlogb = [];
|
||||||
this.brothersList.forEach((item) => {
|
this.brothersList.forEach((item) => {
|
||||||
|
|
@ -1122,6 +1162,12 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
routeChange(item) {
|
||||||
|
this.form.material = item.material_out
|
||||||
|
this.form.material_in = item.material_in
|
||||||
|
this.form.mgroup = item.mgroup
|
||||||
|
this.getWorkShopMaterial();
|
||||||
|
},
|
||||||
getRouteOptions() {
|
getRouteOptions() {
|
||||||
let mgroup__name = '';
|
let mgroup__name = '';
|
||||||
if(this.activeType=='8车间'){
|
if(this.activeType=='8车间'){
|
||||||
|
|
@ -1147,13 +1193,13 @@ export default {
|
||||||
this.shiftOptions = [];
|
this.shiftOptions = [];
|
||||||
if(this.activeType == "10车间"){
|
if(this.activeType == "10车间"){
|
||||||
res.forEach(item=>{
|
res.forEach(item=>{
|
||||||
if(item.rule=='两倒'){
|
if(item.rule=='三倒'){
|
||||||
this.shiftOptions.push(item);
|
this.shiftOptions.push(item);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
res.forEach(item=>{
|
res.forEach(item=>{
|
||||||
if(item.rule=='默认'){
|
if(item.rule=='长白班'){
|
||||||
this.form.shift = item.id;
|
this.form.shift = item.id;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -1174,15 +1220,6 @@ export default {
|
||||||
that.userList = res;
|
that.userList = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取车间物料批次号
|
|
||||||
getBatchs() {
|
|
||||||
let that = this;
|
|
||||||
this.$API.wpm.wmaterial.batchs
|
|
||||||
.req({ belong_dept_name: "6车间" })
|
|
||||||
.then((res) => {
|
|
||||||
that.batchOptions = res;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//获取集合列表
|
//获取集合列表
|
||||||
getMgroupList() {
|
getMgroupList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -1237,11 +1274,14 @@ export default {
|
||||||
// },
|
// },
|
||||||
getWorkShopMaterial() {
|
getWorkShopMaterial() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$API.wpm.wmaterial.list
|
if(this.form.material_in){
|
||||||
.req({ belong_dept__name: "8车间", page: 0 })
|
this.$API.wpm.wmaterial.list
|
||||||
.then((res) => {
|
.req({ material: this.form.material_in, page: 0, count__gte: 1 })
|
||||||
that.wMaterialOptions = res;
|
.then((res) => {
|
||||||
});
|
that.wMaterialOptions = res;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
//显示
|
//显示
|
||||||
open(mode = "add") {
|
open(mode = "add") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue