This commit is contained in:
shijing 2023-10-24 14:55:11 +08:00
parent ce1e98df96
commit e5f3d24205
24 changed files with 662 additions and 664 deletions

View File

@ -2,9 +2,9 @@
NODE_ENV = production NODE_ENV = production
# 标题 # 标题
VUE_APP_TITLE = '曲阳金隅安全智能管控平台' # VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
# VUE_APP_TITLE = '托克逊能源管理平台' # VUE_APP_TITLE = '托克逊能源管理平台'
# VUE_APP_TITLE = '中建材光子科技有限公司' VUE_APP_TITLE = '中建材光子科技有限公司'
# 接口地址 # 接口地址

BIN
public/img/gz_login_img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
public/img/gz_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -32,7 +32,8 @@
<div id="app" class="aminui"> <div id="app" class="aminui">
<div class="app-loading"> <div class="app-loading">
<div class="app-loading__logo"> <div class="app-loading__logo">
<img src="img/bbmg.jpg"/> <!-- <img src="img/bbmg.jpg"/> -->
<img src="img/gz_logo.png"/>
</div> </div>
<div class="app-loading__loader"></div> <div class="app-loading__loader"></div>
<div class="app-loading__title"><%= VUE_APP_TITLE %></div> <div class="app-loading__title"><%= VUE_APP_TITLE %></div>

View File

@ -60,6 +60,14 @@ export default {
); );
} }
}, },
related: {
name: "获取已下达的所有的兄弟小任务",
req: async function(id){
return await http.get(
`${config.API_URL}/pm/mtask/${id}/related/`
);
}
},
submitSameDay:{ submitSameDay:{
name: "提交同一天的该部门下的所有兄弟小任务", name: "提交同一天的该部门下的所有兄弟小任务",
req: async function(data){ req: async function(data){
@ -69,8 +77,17 @@ export default {
); );
} }
}, },
submit:{
name: "提交任务后不可更新日志",
req: async function(data){
return await http.post(
`${config.API_URL}/pm/mtask/submit/`,
data
);
}
},
}, },
// 生产小任务 // 生产任务
utask: { utask: {
list: { list: {
name: "生产任务列表", name: "生产任务列表",

View File

@ -190,13 +190,23 @@ export default {
}, },
//车间库存 //车间库存
wmaterial: { wmaterial: {
name: "车间库存", list: {
req: async function(data){ name: "车间库存",
return await http.get( req: async function(data){
`${config.API_URL}/wpm/wmaterial/`, return await http.get(
data `${config.API_URL}/wpm/wmaterial/`,
); data
} );
}
},
batchs: {
name: "获取车间出现过的批次号",
req: async function(data){
return await http.post(
`${config.API_URL}/wpm/wmaterial/batchs/`,
data);
}
},
}, },
// //值班停机关系 // //值班停机关系
// stsflog: { // stsflog: {

View File

@ -333,10 +333,19 @@ export default {
// }, // },
rowClick(row, column, event){ rowClick(row, column, event){
if(!this.multiple){ if(!this.multiple){
if(this.listIndex!==null){
data.
this.choseData = row;
this.choseData.listIndex = this.listIndex;
this.$emit("submit", this.choseData);
this.dialoguser=false
}else{
this.choseData = row; this.choseData = row;
this.$emit("submit", this.choseData); this.$emit("submit", this.choseData);
this.dialoguser=false this.dialoguser=false
} }
}
}, },
// //
selectionChange(selection) { selectionChange(selection) {

View File

@ -143,7 +143,7 @@ export default {
order: null, order: null,
loading: false, loading: false,
tableHeight: "100%", tableHeight: "100%",
tableParams: Object.assign({}, this.params), tableParams: this.params,
userColumn: [], userColumn: [],
customColumnShow: false, customColumnShow: false,
summary: {}, summary: {},

View File

@ -794,7 +794,8 @@ const routes = [
"meta": { "meta": {
"title": "生产一部记录", "title": "生产一部记录",
"icon": "el-icon-cellphone", "icon": "el-icon-cellphone",
"perms": ["wpm"] "perms": ["wpm"],
"hidden":true
}, },
"component": "wpm/worktaskFlog" "component": "wpm/worktaskFlog"
}, },
@ -1765,7 +1766,7 @@ const routes = [
"meta": { "meta": {
"title": "菜单管理", "title": "菜单管理",
"icon": "el-icon-fold", "icon": "el-icon-fold",
"perms": ["menu"] "perms": ["menu"]
}, },
"component": "ops/menu" "component": "ops/menu"
}, },
@ -1815,7 +1816,7 @@ const routes = [
"meta": { "meta": {
"title": "配置", "title": "配置",
"icon": "el-icon-document", "icon": "el-icon-document",
"perms": ["ops"] "perms": ["sysconfig"]
}, },
"component": "ops/setting" "component": "ops/setting"
}, },
@ -1847,12 +1848,36 @@ const routes = [
}, },
"component": "bigScreen/index_enm" "component": "bigScreen/index_enm"
}, },
//光子大屏 //光子——数据看板
{ {
"path": "/bigScreenP", "path": "/bigScreenP",
"name": "bigScreenP", "name": "bigScreenP",
"meta": { "meta": {
"title": "能管大屏", "title": "数据看板",
"icon": "el-icon-position",
"perms": ["bigScreenP"],
"fullpage": true,
},
"component": "bigScreen/index_photon"
},
//车间看板
{
"path": "/bigScreenP",
"name": "bigScreenP",
"meta": {
"title": "车间看板",
"icon": "el-icon-position",
"perms": ["bigScreenP"],
"fullpage": true,
},
"component": "bigScreen/index_photon"
},
//统计分析
{
"path": "/bigScreenP",
"name": "bigScreenP",
"meta": {
"title": "统计分析",
"icon": "el-icon-position", "icon": "el-icon-position",
"perms": ["bigScreenP"], "perms": ["bigScreenP"],
"fullpage": true, "fullpage": true,

View File

@ -205,7 +205,7 @@
import setting from './components/setting.vue'; import setting from './components/setting.vue';
import iframeView from './components/iframeView.vue'; import iframeView from './components/iframeView.vue';
import autoExit from './other/autoExit.js'; import autoExit from './other/autoExit.js';
import data from './../utils/baseJson';
export default { export default {
name: 'index', name: 'index',
components: { components: {
@ -229,12 +229,15 @@
}, },
computed:{ computed:{
baseName(){ baseName(){
let baseName = this.$TOOL.data.get("BASE_INFO")!==null?this.$TOOL.data.get("BASE_INFO").base.base_name:'智能管理平台'; let baseInFo = data[data.current];
// let baseName = this.$TOOL.data.get("BASE_INFO")!==null?this.$TOOL.data.get("BASE_INFO").base.base_name:'';
let baseName = baseInFo!==null?baseInFo.base.base_name:'智能管理平台';
return baseName; return baseName;
}, },
baseLogo(){ baseLogo(){
let base_logo = this.$TOOL.data.get("BASE_INFO")!==null?this.$TOOL.data.get("BASE_INFO").base.base_logo:'img/logo.png'; 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 = baseInFo!==null?baseInFo.base.base_logo:'img/logo.png';
return base_logo return base_logo
}, },
ismobile(){ ismobile(){

View File

@ -5,7 +5,8 @@
"base_name": "托克逊能化绿色建材厂能源管理平台", "base_name": "托克逊能化绿色建材厂能源管理平台",
"base_logo": "/media/default/logo.png", "base_logo": "/media/default/logo.png",
"base_name_short": "托克逊能管", "base_name_short": "托克逊能管",
"base_logo_side": "/media/default/logo_side.jpg" "base_logo_side": "/media/default/logo_side.jpg",
"name":"enm"
}, },
"apk": { "apk": {
"apk_version": "1.01.44", "apk_version": "1.01.44",
@ -17,8 +18,10 @@
"base": { "base": {
"base_name": "中建材光子科技有限公司", "base_name": "中建材光子科技有限公司",
"base_logo": "/media/default/gz_logo.png", "base_logo": "/media/default/gz_logo.png",
"base_login_img":"/media/default/gz_login_img.png",
"base_name_short": "光子科技", "base_name_short": "光子科技",
"base_logo_side": "/media/default/logo_side.jpg" "base_logo_side": "/media/default/logo_side.jpg",
"name":"photon"
} }
} }
} }

View File

@ -259,7 +259,7 @@ export default {
const createScene = function () { const createScene = function () {
const scene = new BABYLON.Scene(engine); const scene = new BABYLON.Scene(engine);
scene.clearColor = BABYLON.Color3.Black(); //BABYLON.Color3(1, 0, 1); scene.clearColor = BABYLON.Color3.Black(); //BABYLON.Color3(1, 0, 1);
const ground = BABYLON.MeshBuilder.CreateGround("ground", { width: 50, height: 50 }); const ground = BABYLON.MeshBuilder.CreateGround("ground", { width: 30, height: 30 });
const groundMaterial = new BABYLON_GRID.GridMaterial("groundMaterial", scene); const groundMaterial = new BABYLON_GRID.GridMaterial("groundMaterial", scene);
groundMaterial.majorUnitFrequency = 5; groundMaterial.majorUnitFrequency = 5;
groundMaterial.minorUnitVisibility = 0.5; groundMaterial.minorUnitVisibility = 0.5;
@ -272,19 +272,19 @@ export default {
const largeGroundMat = new BABYLON.StandardMaterial("largeGroundMat"); const largeGroundMat = new BABYLON.StandardMaterial("largeGroundMat");
largeGroundMat.diffuseTexture = new BABYLON.Texture("url to large ground texture"); largeGroundMat.diffuseTexture = new BABYLON.Texture("url to large ground texture");
const largeGround = BABYLON.MeshBuilder.CreateGroundFromHeightMap("largeGround", "https://assets.babylonjs.com/environments/villageheightmap.png", {width:50, height:50, subdivisions: 200, minHeight:0, maxHeight: 2}); // const largeGround = BABYLON.MeshBuilder.CreateGroundFromHeightMap("largeGround", "https://assets.babylonjs.com/environments/villageheightmap.png", {width:50, height:50, subdivisions: 200, minHeight:0, maxHeight: 2});
largeGround.material = groundMaterial; // largeGround.material = groundMaterial;
largeGround.position.y = -0.1; // largeGround.position.y = -0.1;
// //
// const backgroundImage = new BABYLON.Layer('', 'img/bj.png', scene, true); // const backgroundImage = new BABYLON.Layer('', 'img/bj.png', scene, true);
const camera = new BABYLON.ArcRotateCamera("camera", that.initialAlpha, that.initialBeta, that.initialRadius, new BABYLON.Vector3(0, 0, 0)); const camera = new BABYLON.ArcRotateCamera("camera", that.initialAlpha, that.initialBeta, that.initialRadius, new BABYLON.Vector3(0,-0.2, -0.1));
that.initialTarget = camera.getTarget(); that.initialTarget = camera.getTarget();
camera.lowerBetaLimit = Math.PI / 2.6; // // camera.lowerBetaLimit = Math.PI / 2.6; //
camera.upperBetaLimit = Math.PI / 2.1; // camera.upperBetaLimit = Math.PI / 2.6; //
camera.attachControl(canvas, true); camera.attachControl(canvas, true);
camera.maxZ = 200; // camera.maxZ = 100; //
// //
camera.lowerRadiusLimit = 2; camera.lowerRadiusLimit = 2;
camera.upperRadiusLimit = 4; camera.upperRadiusLimit = 4;
@ -340,7 +340,7 @@ export default {
mesh_name.color = 'white'; mesh_name.color = 'white';
mesh_name.fontSize = '14px'; mesh_name.fontSize = '14px';
mesh_rect.addControl(mesh_name); mesh_rect.addControl(mesh_name);
var remoteGlbUrl = process.env.VUE_APP_BASEURL + "/media/model/photon.glb"; var remoteGlbUrl = process.env.VUE_APP_BASEURL + "/media/model/photon1.glb";
BABYLON.SceneLoader.Append(remoteGlbUrl, "", scene, function (scene) { BABYLON.SceneLoader.Append(remoteGlbUrl, "", scene, function (scene) {
engine.hideLoadingUI() engine.hideLoadingUI()
}, },

View File

@ -73,7 +73,7 @@
<el-link <el-link
type="primary" type="primary"
@click="table_edit(scope.row)" @click="table_edit(scope.row)"
v-auth="'equipment.update'" v-auth="'equipment'"
> >
编辑 编辑
</el-link> </el-link>
@ -81,7 +81,7 @@
<el-link <el-link
type="danger" type="danger"
@click="table_del(scope.row)" @click="table_del(scope.row)"
v-auth="'equipment.delete'" v-auth="'equipment'"
> >
删除 删除
</el-link> </el-link>

View File

@ -74,13 +74,13 @@
<el-table-column label="备注" show-overflow-tooltip> <el-table-column label="备注" show-overflow-tooltip>
<template #default="scope">{{ scope.row.description }}</template> <template #default="scope">{{ scope.row.description }}</template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="160px"> <el-table-column label="操作" fixed="right" align="center" width="170px">
<template #default="scope"> <template #default="scope">
<el-link <el-link
type="primary" type="primary"
v-if="scope.row.cycle!==null" v-if="scope.row.cycle!==null"
@click="table_record (scope.row)" @click="table_record (scope.row)"
v-auth="'equipment.update'" v-auth="'equipment'"
> >
检定记录 检定记录
</el-link> </el-link>
@ -88,7 +88,7 @@
<el-link <el-link
type="primary" type="primary"
@click="table_edit(scope.row)" @click="table_edit(scope.row)"
v-auth="'equipment.update'" v-auth="'equipment'"
> >
编辑 编辑
</el-link> </el-link>
@ -96,7 +96,7 @@
<el-link <el-link
type="danger" type="danger"
@click="table_del(scope.row)" @click="table_del(scope.row)"
v-auth="'equipment.delete'" v-auth="'equipment'"
> >
删除 删除
</el-link> </el-link>

View File

@ -7,7 +7,7 @@
<div class="companyDesc">公司秉承善用资源服务建设的核心理念践行材料创造美</div> <div class="companyDesc">公司秉承善用资源服务建设的核心理念践行材料创造美</div>
<div class="companyDesc">好世界的企业使命坚持创新绩效和谐责任的核心价</div> <div class="companyDesc">好世界的企业使命坚持创新绩效和谐责任的核心价</div>
<div class="companyDesc">值观努力成长为具有创新精神和全球视野的光子材料领先企业</div> <div class="companyDesc">值观努力成长为具有创新精神和全球视野的光子材料领先企业</div>
<img class="topCardImg" src="/img/topCard.png"> <img class="topCardImg" src="img/topCard.png">
</div> </div>
</div> </div>
<div class="retangleWrap"> <div class="retangleWrap">

View File

@ -166,33 +166,41 @@ export default {
var res1 = await that.$API.auth.info.get(); var res1 = await that.$API.auth.info.get();
that.$TOOL.data.set("USER_INFO", res1); that.$TOOL.data.set("USER_INFO", res1);
that.$TOOL.data.set("PERMISSIONS", Object.keys(res1.perms)); that.$TOOL.data.set("PERMISSIONS", Object.keys(res1.perms));
debugger; let homePath = this.$TOOL.data.get('BASE_INFO').base.name;
console.log(this.$TOOL.data.get('BASE_INFO').base.base_name) if(homePath=='enm'){
if(this.$TOOL.data.get('BASE_INFO').base.base_name_short=='托克逊能管'){//
this.$router.replace({ this.$router.replace({
path: "/dashboard_enm", path: "/dashboard_enm",
}); });
}else{// }else if(homePath=='photon'){
that.$API.am.area.list.req({page_size:999}).then(res => { this.$router.replace({
if (res.err_msg) { path: "/dashboard_photon",
} else { });
debugger;
let areaList = res.results;
that.$TOOL.data.set("qyjyAreaList", areaList);
if(res1.type==='employee'){
this.$router.replace({
path: "/",
});
}else{
this.$router.replace({
path: "/rpm/rpj",
});
}
that.$message.success("Login Success 登录成功");
that.islogin = false;
}
})
} }
// if(this.$TOOL.data.get('BASE_INFO').base.base_name_short==''){//
// this.$router.replace({
// path: "/dashboard_enm",
// });
// }else{//
// that.$API.am.area.list.req({page_size:999}).then(res => {
// if (res.err_msg) {
// } else {
// debugger;
// let areaList = res.results;
// that.$TOOL.data.set("qyjyAreaList", areaList);
// if(res1.type==='employee'){
// this.$router.replace({
// path: "/",
// });
// }else{
// this.$router.replace({
// path: "/rpm/rpj",
// });
// }
// that.$message.success("Login Success ");
// that.islogin = false;
// }
// })
// }
} catch (err) { } catch (err) {
that.islogin = false; that.islogin = false;
console.log(err);} console.log(err);}

View File

@ -17,7 +17,10 @@
</div> </div>
<div class="login-form"> <div class="login-form">
<div class="login-header"> <div class="login-header">
<div class="logo" v-if="baseConfig.base_name"> <div class="logo" v-if="baseConfig.name=='photon'">
<img id="photonImg" :alt="baseConfig.base_login_img" :src="baseConfig.base_login_img">
</div>
<div class="logo" v-else>
<img :alt="baseConfig.base_name_short" :src="baseConfig.base_logo"> <img :alt="baseConfig.base_name_short" :src="baseConfig.base_logo">
<label>{{baseConfig.base_name}}</label> <label>{{baseConfig.base_name}}</label>
</div> </div>
@ -254,4 +257,7 @@
height: 500px; height: 500px;
margin-left: 20px; margin-left: 20px;
} }
#photonImg{
width: 100%;
}
</style> </style>

View File

@ -3,11 +3,11 @@
<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" style=" display: inline-block;position: absolute;right: 20px;margin-top: 4px;z-index: 100"> <div class="right-panel" style=" display: inline-block;position: absolute;right: 20px;margin-top: 4px;z-index: 100">
<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" icon="el-icon-plus" @click="mtaskAssgin">任务下达</el-button> <el-button type="primary" @click="mtaskAssgin">任务下达</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 ref="table1" :apiObj="apiMtask" row-key="id" stripe :params="paramsMtask" :height="tableHeight" @selection-change="handleSelectionChange" hidePagination> <scTable ref="table1" :apiObj="apiUtask" row-key="id" stripe :params="paramsMtask" :height="tableHeight" @selection-change="handleSelectionChange" hidePagination>
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<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">
@ -16,10 +16,10 @@
<template #default="scope"><span>{{ mtaskStateOptions[scope.row.state] }}</span> <template #default="scope"><span>{{ mtaskStateOptions[scope.row.state] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工段" prop="mgroup_name"> <!-- <el-table-column label="工段" prop="mgroup_name">
<!-- <template #default="scope"><span>{{ mtaskStateOptions[scope.row.state] }}</span> <template #default="scope"><span>{{ mtaskStateOptions[scope.row.state] }}</span>
</template> --> </template>
</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">
@ -54,8 +54,8 @@
<el-main class="nopadding" style="position: relative;height: 50%;"> <el-main class="nopadding" style="position: relative;height: 50%;">
<div class="right-panel" v-if="activeNameSub == 'order'" <div class="right-panel" v-if="activeNameSub == 'order'"
style="display: inline-block;position: absolute;right: 20px;margin-top: 4px;"> style="display: inline-block;position: absolute;right: 20px;margin-top: 4px;">
<el-button type="primary" icon="el-icon-plus" @click="startPlan">排产</el-button> <el-button type="primary" @click="startPlan">排产</el-button>
<el-button type="primary" icon="el-icon-plus">合并任务</el-button> <!-- <el-button type="primary" icon="el-icon-plus">合并任务</el-button> -->
</div> </div>
<el-tabs v-model="activeNameSub" class="demo-tabs" @tab-click="handleClick"> <el-tabs v-model="activeNameSub" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="订单排产" name="order"> <el-tab-pane label="订单排产" name="order">
@ -121,7 +121,7 @@ export default {
dialog: { dialog: {
save: false, save: false,
}, },
apiMtask: this.$API.pm.mtask.list, apiUtask: this.$API.pm.utask.list,
apiOrderItem: this.$API.sam.orderitem.list, apiOrderItem: this.$API.sam.orderitem.list,
paramsOrderItem: { utask__isnull: true }, paramsOrderItem: { utask__isnull: true },
paramsMtask: { parent__isnull: true, mgroup__belong_dept__name: '6车间', material_out__is_hidden: true }, paramsMtask: { parent__isnull: true, mgroup__belong_dept__name: '6车间', material_out__is_hidden: true },

View File

@ -14,9 +14,9 @@
<div> <div>
<el-card style="width: 100%" header="订单明细" shadow="hover"> <el-card style="width: 100%" header="订单明细" shadow="hover">
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="table_add" v-auth="'order.update'"></el-button> <el-button type="primary" icon="el-icon-plus" @click="table_add" v-auth="'order.update'"></el-button>
</div> </div>
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" hidePagination> <scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="params" hidePagination>
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="所需产品" prop="material" show-overflow-tooltip> <el-table-column label="所需产品" prop="material" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
@ -64,11 +64,8 @@ export default {
dialog: { dialog: {
save: false, save: false,
}, },
apiObj: this.$API.sam.orderitem.list, apiObj: null,
query: { params: {},
page: 1,
page_size: 20
},
orderId: '', orderId: '',
orderObj: {}, orderObj: {},
selection: [], selection: [],
@ -82,6 +79,8 @@ export default {
}, },
mounted() { mounted() {
this.orderId = this.$route.query.order; this.orderId = this.$route.query.order;
this.params.order = this.$route.query.order;
this.apiObj = this.$API.sam.orderitem.list;
this.getOrder(); this.getOrder();
}, },
methods: { methods: {

View File

@ -16,10 +16,10 @@
style="width:100%" style="width:100%"
> >
<el-option <el-option
v-for="item in materialOptions" v-for="item in options"
:key="item.id" :key="item"
:label="item.name" :label="item"
:value="item.id" :value="item"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -28,7 +28,7 @@
<template #default="scope"> <template #default="scope">
<span v-if="!scope.row.change">{{ scope.row.processName }}</span> <span v-if="!scope.row.change">{{ scope.row.processName }}</span>
<el-select v-else v-model="scope.row.process" placeholder="请选择"> <el-select v-else v-model="scope.row.process" placeholder="请选择">
<el-option v-for="item in options" :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>
@ -70,17 +70,17 @@
</el-select> --> </el-select> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="type" label="操作" min-width="90" align="center"> <!-- <el-table-column prop="type" label="操作" min-width="90" align="center">
<template #default="scope"> <template #default="scope">
<el-link type="primary" @click="submitRecord(scope.row)" >确定 </el-link> <el-link type="primary" @click="submitRecord(scope.row)" >确定 </el-link>
</template> </template>
</el-table-column> </el-table-column> -->
</sc-form-table> </sc-form-table>
</el-form> </el-form>
<el-footer> <el-footer>
<el-button type="primary" @click="submitForm">保存</el-button> <el-button type="primary" @click="submitForm">保存</el-button>
<el-button @click="resetForm">取消</el-button> <el-button @click="resetForm">取消</el-button>
<el-button type="primary" @click="submitForm">提交</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
</template> </template>
@ -91,7 +91,6 @@ import { index } from 'd3';
emits: ["success", "closed"], emits: ["success", "closed"],
props:{ props:{
mtask: { type: String, default: '' }, mtask: { type: String, default: '' },
materialId: { type: String, default: '' },
}, },
data() { data() {
return { return {
@ -125,16 +124,19 @@ import { index } from 'd3';
}; };
}, },
mounted() { mounted() {
this.getProcess(); this.getBatchs();
this.getFormList(); this.getFormList();
}, },
methods: { methods: {
getFormList(){ getFormList(){
this.$API.mtm.route.list.req({page:0,material:this.materialId}).then((res) => { this.$API.pm.mtask.related.req(this.mtask).then(res=>{
res.forEach(item=>{ // debugger;
console.log('工序进度')
console.log(res)
res.forEach(item=>{
let obj = { let obj = {
process: item.process, process: item.mgroup,
processName: item.process_name, processName: item.mgroup_name,
count_use:1, count_use:1,
count_ok: 1, count_ok: 1,
count_no1: 0, count_no1: 0,
@ -148,10 +150,12 @@ import { index } from 'd3';
}) })
}) })
}, },
// //
getProcess(){ getBatchs(){
var res = this.$API.mtm.process.list.req({page:0}).then(res=>{ let that = this;
this.options = res; this.$API.wpm.wmaterial.batchs.req({belong_dept_name:'6车间'}).then(res=>{
that.options = res;
console.log(res)
}); });
}, },
pushRow(){ pushRow(){

View File

@ -1,269 +1,333 @@
<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;height: 50%;margin-bottom: 10px;">
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> <el-row :gutter="10">
<el-tab-pane label="混料工序" name="first"> <el-col :span="10" style="border-right: 1px solid #eeeeee;position: relative;">
<scTable <div class="right-panel" style=" display: inline-block;position: absolute;right: 20px;margin-top: 4px;z-index:100">
ref="table" <el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
:apiObj="apiObj" <el-button type="primary" icon="el-icon-plus" @click="add">任务下达</el-button>
row-key="id" <el-button type="primary" icon="el-icon-search" @click="handleQuery" >导出</el-button>
stripe </div>
:height="topHeight" <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
:params="query" <el-tab-pane label="10车间" name="first">
hidePagination <scTable
> ref="table"
<el-table-column type="index" width="50"/> :apiObj="apiObj"
<el-table-column label="任务编号" prop="number"> row-key="id"
</el-table-column> stripe
<el-table-column label="产品名称" prop="material" show-overflow-tooltip> :height="tableHeight"
</el-table-column> :params="query"
<el-table-column label="产品型号" prop="number"> >
</el-table-column> <el-table-column type="index" width="50"/>
<el-table-column label="产品规格" prop="number"> <el-table-column label="产品名称" prop="material" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column label="计划数量" prop="count"> <el-table-column label="型号" prop="number">
</el-table-column> </el-table-column>
<el-table-column label="计划日期" prop="count"> <el-table-column label="规格" prop="number">
</el-table-column> </el-table-column>
<el-table-column label="状态" prop="count"> <el-table-column label="计划量" prop="count">
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="left" width="120"> <el-table-column label="日均量" prop="count">
<template #default="scope"> </el-table-column>
<el-link <el-table-column label="开始时间" prop="start_date">
type="primary" </el-table-column>
@click="table_edit(scope.row)" <el-table-column label="结束时间" prop="end_date">
v-if="scope.row.status==10" </el-table-column>
>生产记录 <el-table-column label="完成量" prop="count">
</el-link> </el-table-column>
<el-link </scTable>
type="primary" </el-tab-pane>
@click="table_show(scope.row)" </el-tabs>
v-else </el-col>
>查看 <el-col :span="14">
</el-link> <el-form label-width="100px" style="border-bottom: 1px solid #eeeeee;padding: 4px 0;">
</template> <el-row>
</el-table-column> <el-col :md="8" :sm="12" :xs="24">
</scTable> <el-form-item class="infoForm" label="产品名称:"></el-form-item>
</el-tab-pane> </el-col>
<el-tab-pane label="成型7车间" name="second"> <el-col :md="8" :sm="12" :xs="24">
<scTable <el-form-item class="infoForm" label="产品型号:"></el-form-item>
ref="table" </el-col>
:apiObj="apiObj" <el-col :md="8" :sm="12" :xs="24">
row-key="id" <el-form-item class="infoForm" label="计划数量:">
stripe <span></span>
:height="topHeight" <el-input></el-input>
:params="query" </el-form-item>
> </el-col>
<el-table-column type="index" width="50"/> </el-row>
<el-table-column label="任务编号" prop="number"> </el-form>
</el-table-column> <div style="margin-top: 10px;">
<el-table-column label="产品名称" prop="material" show-overflow-tooltip> <el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
</el-table-column> <el-button type="primary" @click="sum">合计</el-button>
<el-table-column label="产品型号" prop="number"> </div>
</el-table-column> <scTable
<el-table-column label="产品规格" prop="number"> ref="table"
</el-table-column> :data="flogs"
<el-table-column label="计划数量" prop="count"> row-key="id"
</el-table-column> stripe
<el-table-column label="计划日期" prop="count"> :height="rightHeight"
</el-table-column> :params="query"
<el-table-column label="状态" prop="count"> >
</el-table-column> <el-table-column type="index" width="40"/>
<el-table-column label="操作" fixed="right" align="left" width="120"> <el-table-column type="selection" width="40"/>
<template #default="scope"> <el-table-column label="产品编号" prop="material">
<el-link </el-table-column>
type="primary" <el-table-column label="产品名称" prop="number">
@click="table_edit(scope.row)" </el-table-column>
v-if="scope.row.status==10" <el-table-column label="型号" prop="number">
>生产记录 </el-table-column>
</el-link> <el-table-column label="规格" prop="number">
<el-link </el-table-column>
type="primary" <el-table-column label="领料数量" prop="count">
@click="table_show(scope.row)" </el-table-column>
v-else <el-table-column label="操作" fixed="right" align="left" width="120">
>查看 <template #default="scope">
</el-link> <el-link
</template> type="primary"
</el-table-column> @click="table_edit(scope.row)"
</scTable> v-if="scope.row.status==10"
</el-tab-pane> v-auth="'equipment.update'"
<el-tab-pane label="成型10车间" name="third"> >编辑
<scTable </el-link>
ref="table" <!-- 提交后变查看 -->
:apiObj="apiObj" <el-link
row-key="id" v-else
stripe type="primary"
:height="topHeight" @click="table_edit(scope.row)"
:params="query" v-auth="'equipment.update'"
> >查看
<el-table-column type="index" width="50"/> </el-link>
<el-table-column label="任务编号" prop="number"> <el-link
</el-table-column> type="primary"
<el-table-column label="产品名称" prop="material" show-overflow-tooltip> @click="table_edit(scope.row)"
</el-table-column> >删除
<el-table-column label="产品型号" prop="number"> </el-link>
</el-table-column> </template>
<el-table-column label="产品规格" prop="number"> </el-table-column>
</el-table-column> </scTable>
<el-table-column label="计划数量" prop="count"> <scTable
</el-table-column> ref="table"
<el-table-column label="计划日期" prop="count"> :data="flogs"
</el-table-column> row-key="id"
<el-table-column label="状态" prop="count"> stripe
</el-table-column> :height="rightHeight"
<el-table-column label="操作" fixed="right" align="left" width="120"> :params="query"
<template #default="scope"> >
<el-link <el-table-column type="index" width="40"/>
type="primary" <el-table-column label="班组" prop="material">
@click="table_edit(scope.row)" </el-table-column>
v-if="scope.row.status==10" <el-table-column label="产品编号" prop="material">
>生产记录 </el-table-column>
</el-link> <el-table-column label="产品名称" prop="number">
<el-link </el-table-column>
type="primary" <el-table-column label="型号" prop="number">
@click="table_show(scope.row)" </el-table-column>
v-else <el-table-column label="规格" prop="number">
>查看 </el-table-column>
</el-link> <el-table-column label="领料数量" prop="count">
</template> </el-table-column>
</el-table-column> <el-table-column label="操作" fixed="right" align="left" width="120">
</scTable> <template #default="scope">
</el-tab-pane> <el-link
</el-tabs> type="primary"
</el-main> @click="table_edit(scope.row)"
<el-main class="nopadding" style="position: relative;"> v-if="scope.row.status==10"
<div> v-auth="'equipment.update'"
<el-row :gutter="20"> >编辑
<el-col :span="13" style="border-right: 1px solid #eeeeee;">工序进度 </el-link>
<scTable <!-- 提交后变查看 -->
ref="table" <el-link
row-key="id" v-else
stripe type="primary"
:height="bottomHeight" @click="table_edit(scope.row)"
> v-auth="'equipment.update'"
<el-table-column type="index" width="50"/> >查看
<el-table-column label="日期" prop="number"> </el-link>
</el-table-column> <el-link
<el-table-column label="工序" prop="material"> type="primary"
</el-table-column> @click="table_edit(scope.row)"
<el-table-column label="产品名称" prop="number"> >删除
</el-table-column> </el-link>
<el-table-column label="型号" prop="number"> </template>
</el-table-column> </el-table-column>
<el-table-column label="规格" prop="number"> </scTable>
</el-table-column> </el-col>
<el-table-column label="计划数量" prop="count"> </el-row>
</el-table-column> </el-main>
<el-table-column label="合格数量" prop="count">
</el-table-column>
<el-table-column label="操作人" prop="count">
</el-table-column>
</scTable>
</el-col>
<el-col :span="11">车间物料
<scTable
ref="table"
row-key="id"
stripe
:height="bottomHeight"
>
<el-table-column type="index" width="50"/>
<el-table-column label="产品编号" prop="material">
</el-table-column>
<el-table-column label="产品名称" prop="number">
</el-table-column>
<el-table-column label="型号" prop="number">
</el-table-column>
<el-table-column label="规格" prop="number">
</el-table-column>
<el-table-column label="数量" prop="count">
</el-table-column>
<el-table-column label="操作" fixed="right" align="left" width="120">
<template #default="scope">
<el-link
type="primary"
@click="table_edit(scope.row)"
v-if="scope.row.state==10"
>编辑
</el-link>
<!-- 提交后变查看 -->
<el-link
v-else
type="primary"
@click="table_show(scope.row)"
>查看
</el-link>
<el-link
type="primary"
@click="table_edit(scope.row)"
>删除
</el-link>
</template>
</el-table-column>
</scTable>
</el-col>
</el-row>
</div>
</el-main>
</el-container>
<save-dialog <save-dialog
v-if="dialog.save" v-if="dialog.save"
ref="saveDialog" ref="saveDialog"
:mtask = "mtask"
@success="handleSaveSuccess" @success="handleSaveSuccess"
@closed="dialog.save = false" @closed="dialog.save = false"
></save-dialog> ></save-dialog>
<el-dialog
title="合计"
ref="sumDialog"
v-model="sumLog"
:size="1000"
destroy-on-close
@success="handleSuccess"
@closed="sumLog = false"
>
<sc-form-table hideAdd="false" ref="sumLogtable" v-model="formList" placeholder="暂无数据">
<el-table-column prop="count1" label="生产总数" min-width="100"></el-table-column>
<el-table-column prop="count2" label="合格总数" min-width="100"></el-table-column>
<el-table-column prop="rate" label="合格率" min-width="100"></el-table-column>
<el-table-column label="不合格原因及数量" align="center">
<el-table-column prop="val" label="原因1" min-width="100">
<template #default="scope">
<el-input v-model="scope.row.count_no1" placeholder="不合格数量1"></el-input>
</template>
</el-table-column>
<el-table-column prop="val" label="原因2" min-width="100">
<template #default="scope">
<el-input v-model="scope.row.count_no2" placeholder="不合格数量2"></el-input>
</template>
</el-table-column>
<el-table-column prop="val" label="原因3" min-width="100">
<template #default="scope">
<el-input v-model="scope.row.count_no3" placeholder="不合格数量3"></el-input>
</template>
</el-table-column>
<el-table-column prop="val" label="总计" min-width="100">
<template #default="scope">
<el-input v-model="scope.row.count_noall" placeholder="不合格数量3"></el-input>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="val" label="碎料" min-width="100">
<template #default="scope">
<el-input v-model="scope.row.material" placeholder="请输入内容"></el-input>
</template>
</el-table-column>
</sc-form-table>
<el-footer>
<el-button @click="resetForm">取消</el-button>
<el-button type="primary" @click="submitForm">提交</el-button>
</el-footer>
</el-dialog>
</el-container>
</template> </template>
<script> <script>
import {generateExcel} from "@/utils/exportExcel.js";
import saveDialog from "./task2flog_form.vue";
import GanttComponent from '@/components/GanttComponent.vue';
export default { export default {
name: "worktask", name: "rparty",
components: {
GanttComponent,saveDialog
},
data() { data() {
return { return {
ganttHeight: '500px',
ganttLoading: false,
projectId: '',
tasks: {
data: [
{number:'GZ20231012',model:'GB2',cate:'100*50*2',count:300,text: "一天任务",start_date: "2023-10-12",id:'2023101800',duration: 2,progress: 1},
{number:'GZ20231013',model:'GB2',cate:'100*50*2',count:300,text: "一天任务",start_date: "2023-10-13",id:'2023101801',duration: 1,progress: 1},
{number:'GZ20231014',model:'GB2',cate:'100*50*2',count:200, text: "一天任务",start_date: "2023-10-14",id:'2023101802',duration: 1,progress: 0.8},
{number:'GZ20231015',model:'ZB2',cate:'100*50*2',count:100, text: "一天任务", start_date: "2023-10-15",id:'2023101803',duration: 1,progress: 0.6},
{number:'GZ20231016',model:'GB2',cate:'100*50*2',count:50, text: "一天任务", start_date: "2023-10-16",id:'2023101804',duration: 1,progress: 0.4},
{number:'GZ20231017',model:'GB2',cate:'100*50*2',count:0, text: "一天任务", start_date: "2023-10-17",id:'2023101805',duration: 1,progress: 0.2},
{number:'GZ20231018',model:'GB2',cate:'100*50*2',count:300,text: "一天任务",start_date: "2023-10-18",id:'2023101806',duration: 1,progress: 1},
{number:'GZ20231018',model:'GB2',cate:'100*50*2',count:200, text: "一天任务",start_date: "2023-10-19",id:'2023101807',duration: 1,progress: 0.8},
{number:'GZ20231020',model:'ZB2',cate:'100*50*2',count:100, text: "一天任务", start_date: "2023-10-20",id:'2023101808',duration: 1,progress: 0.6},
{number:'GZ20231021',model:'GB2',cate:'100*50*2',count:50, text: "一天任务", start_date: "2023-10-21",id:'2023101809',duration: 1,progress: 0.4},
{number:'GZ20231022',model:'GB2',cate:'100*50*2',count:0, text: "一天任务", start_date: "2023-10-22",id:'20231018010',duration: 1,progress: 0.2},
]
},
dialog: { dialog: {
save: false, save: false,
}, },
apiObj: this.$API.pm.mtask.daylist, sumLog:false,
apiObj: this.$API.pm.mtask.list,
query: { query: {
page:1, page:1,
page_size:20, page_size:20,
belong_dept_name:'6车间', belong_dept_name:'10车间',
date:'2023-10-20' date:'2023-10-20'
}, },
flogs:[],
flogsData: [{id: 1, name: 'John Doe', dob: new Date(1970,1,1)}],
columns : [
{ header: 'Id', key: 'id', wpx: 40 },
{ header: 'Name', key: 'name', wch: 15 },
{ header: 'D.O.B.', key: 'dob', width: 32 }
],
activeName:'first', activeName:'first',
tableData: [], activeNameSub:'order',
selection: [], selection: [],
state_: { state_: {
10: '完好', 10: '完好',
20: '限用', 20: '限用',
30: '在修', 30: '在修',
40: '禁用', 40: '禁用',
}, },
topHeight:null, mtask:'',
bottomHeight:null, rightHeight:null,
tableHeight:null,
formList:[
{
count1:0,
count2:0,
rate:0,
count_no1:0,
count_no2:0,
count_no3:0,
count_noall:0,
material:0,
}
]
}; };
}, },
created() {
//gantt
gantt.clearAll();
},
mounted(){ mounted(){
let heights = document.getElementById('topContainer').clientHeight; let heights = document.getElementById('topContainer').clientHeight;
console.log('heights',heights) console.log('heights',heights)
this.topHeight = (heights-50)+'px'; this.tableHeight = (heights-50)+'px';
this.bottomHeight = (heights-40)+'px'; let rightHeight = heights-100;
this.rightHeight = rightHeight/2+'px'
}, },
methods: { methods: {
handleClick(val){ //
debugger; getProjectTaskData() {
console.log(val.index); this.ganttLoading= true;
this.tableData = []; this.tasks.data = [];
if(val==0){ this.$http({
this.$API.wpm.mtask.list.req().then((res) => { url: this.$http.adornUrl('url'),
this.$message.success("删除成功"); method: 'get',
return res; params: this.$http.adornParams({
}).catch((err) => { projectId: this.projectId
return err; })
}); }).then(({ data }) => {
}else if(val==1){ if (data != null && data.code == 200) {
this.tasks.data = data.res;
// :gantt
gantt.parse(this.tasks);
//
gantt.refreshData();
this.ganttLoading= false;
} else {
this.$message.error(data.msg);
}
});
},
}else if(val==2){ //
addTask(taskId) {
} var $this = this;
this.$nextTick(() => {
$this.$refs.taskAdd.init(task, action, parentTask, $this.milestoneOriginalData);
});
//ganttgantt
gantt.deleteTask(taskId);
//使false
return false;
}, },
// //
add() { add() {
@ -281,12 +345,9 @@ export default {
}, },
// //
table_show(row) { table_show(row) {
this.dialog.save = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$router.push({ this.$refs.saveDialog.open("show").setData(row);
name: "worktaskFlog",
query:{mtask:row.id}
});
}); });
}, },
// //
@ -302,7 +363,10 @@ export default {
}); });
}).catch(() => {}); }).catch(() => {});
}, },
//
sum(){
this.sumLog = true;
},
// //
handleSaveSuccess(data, mode) { handleSaveSuccess(data, mode) {
if (mode == "add") { if (mode == "add") {
@ -312,7 +376,9 @@ export default {
} }
}, },
handleQuery() { handleQuery() {
this.$refs.table.queryData(this.query) // this.$refs.table.queryData(this.query)
debugger;
generateExcel(this.columns,this.flogsData,'测试')
}, },
resetQuery() { resetQuery() {
this.query = {}; this.query = {};
@ -324,4 +390,12 @@ export default {
.el-main.nopadding{ .el-main.nopadding{
padding:0 20px 0 20px padding:0 20px 0 20px
} }
.gantt-container {
height: 30%;
}
.ganntClass {
background-color: #fff;
padding: 10px;
border-radius: 4px;
}
</style> </style>

View File

@ -1,332 +1,184 @@
<template> <template>
<el-container style="flex-direction: column"> <el-container style="flex-direction: column">
<el-main id="topContainer" class="nopadding" style="position: relative;height: 50%;margin-bottom: 10px;"> <el-main id="topContainer" class="nopadding" style="position: relative;margin-bottom: 10px;">
<el-row :gutter="10"> <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-col :span="10" style="border-right: 1px solid #eeeeee;position: relative;"> <el-tab-pane label="粗加工6车间" name="first">
<div class="right-panel" style=" display: inline-block;position: absolute;right: 20px;margin-top: 4px;z-index:100"> <scTable
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button> ref="table"
<el-button type="primary" icon="el-icon-plus" @click="add">任务下达</el-button> :apiObj="apiObj"
<el-button type="primary" icon="el-icon-search" @click="handleQuery" >导出</el-button> row-key="id"
</div> stripe
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> :height="topHeight"
<el-tab-pane label="10车间" name="first"> :params="query"
<scTable hidePagination
ref="table" @row-click="rowClick"
:apiObj="apiObj" >
row-key="id" <el-table-column type="index" width="50"/>
stripe <el-table-column label="任务编号" prop="number">
:height="tableHeight" </el-table-column>
:params="query" <el-table-column label="产品名称" prop="material" show-overflow-tooltip>
> </el-table-column>
<el-table-column type="index" width="50"/> <el-table-column label="产品型号" prop="number">
<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="count">
<el-table-column label="规格" prop="number"> </el-table-column>
</el-table-column> <el-table-column label="计划日期" prop="count">
<el-table-column label="计划量" prop="count"> </el-table-column>
</el-table-column> <el-table-column label="状态" prop="count">
<el-table-column label="日均量" prop="count"> </el-table-column>
</el-table-column> <el-table-column label="操作" fixed="right" align="left" width="120">
<el-table-column label="开始时间" prop="start_date"> <template #default="scope">
</el-table-column> <el-link
<el-table-column label="结束时间" prop="end_date"> type="primary"
</el-table-column> @click="table_edit(scope.row)"
<el-table-column label="完成量" prop="count"> v-if="scope.row.status==10"
</el-table-column> >生产记录
</scTable> </el-link>
</el-tab-pane> <el-link
</el-tabs> type="primary"
</el-col> @click="table_show(scope.row)"
<el-col :span="14"> v-else
<el-form label-width="100px" style="border-bottom: 1px solid #eeeeee;padding: 4px 0;"> >查看
<el-row> </el-link>
<el-col :md="8" :sm="12" :xs="24"> </template>
<el-form-item class="infoForm" label="产品名称:"></el-form-item> </el-table-column>
</el-col> </scTable>
<el-col :md="8" :sm="12" :xs="24"> </el-tab-pane>
<el-form-item class="infoForm" label="产品型号:"></el-form-item> </el-tabs>
</el-col> </el-main>
<el-col :md="8" :sm="12" :xs="24"> <el-main class="nopadding" style="position: relative;">
<el-form-item class="infoForm" label="计划数量:"> <div>
<span></span> <el-row :gutter="20">
<el-input></el-input> <el-col :span="13" style="border-right: 1px solid #eeeeee;">
</el-form-item> <div>工序进度</div>
</el-col> <scTable
</el-row> ref="table"
</el-form> row-key="id"
<div style="margin-top: 10px;"> stripe
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button> :data="processList"
<el-button type="primary" @click="sum">合计</el-button> :height="bottomHeight"
</div> >
<scTable <el-table-column type="index" width="50"/>
ref="table" <el-table-column label="日期" prop="start_date">
:data="flogs" </el-table-column>
row-key="id" <el-table-column label="工序" prop="mgroup_name">
stripe </el-table-column>
:height="rightHeight" <el-table-column label="产品名称" prop="number">
:params="query" </el-table-column>
> <el-table-column label="型号规格" prop="specification">
<el-table-column type="index" width="40"/> </el-table-column>
<el-table-column type="selection" width="40"/> <el-table-column label="规格" prop="number">
<el-table-column label="产品编号" prop="material"> </el-table-column>
</el-table-column> <el-table-column label="计划数量" prop="count">
<el-table-column label="产品名称" prop="number"> </el-table-column>
</el-table-column> <el-table-column label="合格数量" prop="count">
<el-table-column label="型号" prop="number"> </el-table-column>
</el-table-column> <el-table-column label="操作人" prop="count">
<el-table-column label="规格" prop="number"> </el-table-column>
</el-table-column> </scTable>
<el-table-column label="领料数量" prop="count"> </el-col>
</el-table-column> <el-col :span="11">
<el-table-column label="操作" fixed="right" align="left" width="120"> <div>车间物料</div>
<template #default="scope"> <scTable
<el-link ref="table"
type="primary" row-key="id"
@click="table_edit(scope.row)" stripe
v-if="scope.row.status==10" :data="wMaterial"
v-auth="'equipment.update'" :height="bottomHeight"
>编辑 >
</el-link> <el-table-column type="index" width="50"/>
<!-- 提交后变查看 --> <el-table-column label="产品编号" prop="material_">
<el-link <template #default="scope">
v-else <span v-if="scope.row.material_">{{ scope.row.material_.number }}</span>
type="primary" </template>
@click="table_edit(scope.row)" </el-table-column>
v-auth="'equipment.update'" <el-table-column label="产品名称" prop="material_">
>查看 <template #default="scope">
</el-link> <span v-if="scope.row.material_">{{ scope.row.material_.name }}</span>
<el-link </template>
type="primary" </el-table-column>
@click="table_edit(scope.row)" <el-table-column label="型号规格" prop="specification">
>删除 </el-table-column>
</el-link> <el-table-column label="数量" prop="count">
</template> </el-table-column>
</el-table-column> </scTable>
</scTable> </el-col>
<scTable </el-row>
ref="table" </div>
:data="flogs" </el-main>
row-key="id" </el-container>
stripe
:height="rightHeight"
:params="query"
>
<el-table-column type="index" width="40"/>
<el-table-column label="班组" prop="material">
</el-table-column>
<el-table-column label="产品编号" prop="material">
</el-table-column>
<el-table-column label="产品名称" prop="number">
</el-table-column>
<el-table-column label="型号" prop="number">
</el-table-column>
<el-table-column label="规格" prop="number">
</el-table-column>
<el-table-column label="领料数量" prop="count">
</el-table-column>
<el-table-column label="操作" fixed="right" align="left" width="120">
<template #default="scope">
<el-link
type="primary"
@click="table_edit(scope.row)"
v-if="scope.row.status==10"
v-auth="'equipment.update'"
>编辑
</el-link>
<!-- 提交后变查看 -->
<el-link
v-else
type="primary"
@click="table_edit(scope.row)"
v-auth="'equipment.update'"
>查看
</el-link>
<el-link
type="primary"
@click="table_edit(scope.row)"
>删除
</el-link>
</template>
</el-table-column>
</scTable>
</el-col>
</el-row>
</el-main>
<save-dialog <save-dialog
v-if="dialog.save" v-if="dialog.save"
ref="saveDialog" ref="saveDialog"
:mtask = "mtask"
@success="handleSaveSuccess" @success="handleSaveSuccess"
@closed="dialog.save = false" @closed="dialog.save = false"
></save-dialog> ></save-dialog>
<el-dialog
title="合计"
ref="sumDialog"
v-model="sumLog"
:size="1000"
destroy-on-close
@success="handleSuccess"
@closed="sumLog = false"
>
<sc-form-table hideAdd="false" ref="sumLogtable" v-model="formList" placeholder="暂无数据">
<el-table-column prop="count1" label="生产总数" min-width="100"></el-table-column>
<el-table-column prop="count2" label="合格总数" min-width="100"></el-table-column>
<el-table-column prop="rate" label="合格率" min-width="100"></el-table-column>
<el-table-column label="不合格原因及数量" align="center">
<el-table-column prop="val" label="原因1" min-width="100">
<template #default="scope">
<el-input v-model="scope.row.count_no1" placeholder="不合格数量1"></el-input>
</template>
</el-table-column>
<el-table-column prop="val" label="原因2" min-width="100">
<template #default="scope">
<el-input v-model="scope.row.count_no2" placeholder="不合格数量2"></el-input>
</template>
</el-table-column>
<el-table-column prop="val" label="原因3" min-width="100">
<template #default="scope">
<el-input v-model="scope.row.count_no3" placeholder="不合格数量3"></el-input>
</template>
</el-table-column>
<el-table-column prop="val" label="总计" min-width="100">
<template #default="scope">
<el-input v-model="scope.row.count_noall" placeholder="不合格数量3"></el-input>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="val" label="碎料" min-width="100">
<template #default="scope">
<el-input v-model="scope.row.material" placeholder="请输入内容"></el-input>
</template>
</el-table-column>
</sc-form-table>
<el-footer>
<el-button @click="resetForm">取消</el-button>
<el-button type="primary" @click="submitForm">提交</el-button>
</el-footer>
</el-dialog>
</el-container>
</template> </template>
<script> <script>
import {generateExcel} from "@/utils/exportExcel.js";
import saveDialog from "./task2flog_form.vue";
import GanttComponent from '@/components/GanttComponent.vue';
export default { export default {
name: "rparty", name: "worktask",
components: {
GanttComponent,saveDialog
},
data() { data() {
return { return {
ganttHeight: '500px',
ganttLoading: false,
projectId: '',
tasks: {
data: [
{number:'GZ20231012',model:'GB2',cate:'100*50*2',count:300,text: "一天任务",start_date: "2023-10-12",id:'2023101800',duration: 2,progress: 1},
{number:'GZ20231013',model:'GB2',cate:'100*50*2',count:300,text: "一天任务",start_date: "2023-10-13",id:'2023101801',duration: 1,progress: 1},
{number:'GZ20231014',model:'GB2',cate:'100*50*2',count:200, text: "一天任务",start_date: "2023-10-14",id:'2023101802',duration: 1,progress: 0.8},
{number:'GZ20231015',model:'ZB2',cate:'100*50*2',count:100, text: "一天任务", start_date: "2023-10-15",id:'2023101803',duration: 1,progress: 0.6},
{number:'GZ20231016',model:'GB2',cate:'100*50*2',count:50, text: "一天任务", start_date: "2023-10-16",id:'2023101804',duration: 1,progress: 0.4},
{number:'GZ20231017',model:'GB2',cate:'100*50*2',count:0, text: "一天任务", start_date: "2023-10-17",id:'2023101805',duration: 1,progress: 0.2},
{number:'GZ20231018',model:'GB2',cate:'100*50*2',count:300,text: "一天任务",start_date: "2023-10-18",id:'2023101806',duration: 1,progress: 1},
{number:'GZ20231018',model:'GB2',cate:'100*50*2',count:200, text: "一天任务",start_date: "2023-10-19",id:'2023101807',duration: 1,progress: 0.8},
{number:'GZ20231020',model:'ZB2',cate:'100*50*2',count:100, text: "一天任务", start_date: "2023-10-20",id:'2023101808',duration: 1,progress: 0.6},
{number:'GZ20231021',model:'GB2',cate:'100*50*2',count:50, text: "一天任务", start_date: "2023-10-21",id:'2023101809',duration: 1,progress: 0.4},
{number:'GZ20231022',model:'GB2',cate:'100*50*2',count:0, text: "一天任务", start_date: "2023-10-22",id:'20231018010',duration: 1,progress: 0.2},
]
},
dialog: { dialog: {
save: false, save: false,
}, },
sumLog:false, apiObj: this.$API.pm.mtask.daylist,
apiObj: this.$API.pm.mtask.list,
query: { query: {
page:1, page:1,
page_size:20, page_size:20,
date:'' belong_dept_name:'6车间',
date:'2023-10-24'
}, },
flogs:[],
flogsData: [{id: 1, name: 'John Doe', dob: new Date(1970,1,1)}],
columns : [
{ header: 'Id', key: 'id', wpx: 40 },
{ header: 'Name', key: 'name', wch: 15 },
{ header: 'D.O.B.', key: 'dob', width: 32 }
],
activeName:'first', activeName:'first',
activeNameSub:'order', tableData: [],
selection: [], selection: [],
wMaterial:[],//
processList:[],//
state_: { state_: {
10: '完好', 10: '完好',
20: '限用', 20: '限用',
30: '在修', 30: '在修',
40: '禁用', 40: '禁用',
}, },
mtask:'', topHeight:null,
rightHeight:null, bottomHeight:null,
tableHeight:null,
formList:[
{
count1:0,
count2:0,
rate:0,
count_no1:0,
count_no2:0,
count_no3:0,
count_noall:0,
material:0,
}
]
}; };
}, },
created() {
//gantt
gantt.clearAll();
},
mounted(){ mounted(){
let heights = document.getElementById('topContainer').clientHeight; let heights = document.getElementById('topContainer').clientHeight;
console.log('heights',heights) console.log('heights',heights)
this.tableHeight = (heights-50)+'px'; this.topHeight = (heights-50)+'px';
let rightHeight = heights-100; this.bottomHeight = (heights-40)+'px';
this.rightHeight = rightHeight/2+'px' this.getWorkSpaceMaterial();
}, },
methods: { methods: {
// //
getProjectTaskData() { getWorkSpaceMaterial(){
this.ganttLoading= true; let that = this;
this.tasks.data = []; this.$API.wpm.wmaterial.list.req({belong_dept_name:'6车间'}).then(res=>{
this.$http({ that.wMaterial = res.results;
url: this.$http.adornUrl('url'), })
method: 'get',
params: this.$http.adornParams({
projectId: this.projectId
})
}).then(({ data }) => {
if (data != null && data.code == 200) {
this.tasks.data = data.res;
// :gantt
gantt.parse(this.tasks);
//
gantt.refreshData();
this.ganttLoading= false;
} else {
this.$message.error(data.msg);
}
});
}, },
handleClick(val){
if(val==0){
}else if(val==1){
// }
addTask(taskId) { },
var $this = this; //
this.$nextTick(() => { rowClick(row){
$this.$refs.taskAdd.init(task, action, parentTask, $this.milestoneOriginalData); debugger;
}); console.log(row)
//ganttgantt let that = this;
gantt.deleteTask(taskId); this.$API.pm.mtask.list.req({start_date:row.start_date,end_date:row.end_date,mgroup__belong_dept__name:'6车间',utask:row.utask}).then(res=>{
//使false // debugger;
return false; console.log('工序进度')
console.log(res)
that.processList = res.results;
})
}, },
// //
add() { add() {
@ -344,9 +196,12 @@ export default {
}, },
// //
table_show(row) { table_show(row) {
this.dialog.save = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.saveDialog.open("show").setData(row); this.$router.push({
name: "worktaskFlog",
query:{mtask:row.id}
});
}); });
}, },
// //
@ -362,10 +217,7 @@ export default {
}); });
}).catch(() => {}); }).catch(() => {});
}, },
//
sum(){
this.sumLog = true;
},
// //
handleSaveSuccess(data, mode) { handleSaveSuccess(data, mode) {
if (mode == "add") { if (mode == "add") {
@ -375,9 +227,7 @@ export default {
} }
}, },
handleQuery() { handleQuery() {
// this.$refs.table.queryData(this.query) this.$refs.table.queryData(this.query)
debugger;
generateExcel(this.columns,this.flogsData,'测试')
}, },
resetQuery() { resetQuery() {
this.query = {}; this.query = {};
@ -389,12 +239,4 @@ export default {
.el-main.nopadding{ .el-main.nopadding{
padding:0 20px 0 20px padding:0 20px 0 20px
} }
.gantt-container {
height: 30%;
}
.ganntClass {
background-color: #fff;
padding: 10px;
border-radius: 4px;
}
</style> </style>

View File

@ -4,20 +4,21 @@
<el-form label-width="100px"> <el-form label-width="100px">
<el-row> <el-row>
<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.name }}</el-form-item> <el-form-item class="infoForm" label="产品名称:">{{ orderObj.number }}</el-form-item>
</el-col> </el-col>
<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.name }}</el-form-item> <el-form-item class="infoForm" label="型号:">{{ orderObj.number }}</el-form-item>
</el-col> </el-col>
<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.number }}</el-form-item> <el-form-item class="infoForm" label="规格:">{{ orderObj.number }}</el-form-item>
</el-col> </el-col>
<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.state }}</el-form-item> <el-form-item class="infoForm" label="计划数量:">{{ orderObj.count }}</el-form-item>
</el-col> </el-col>
<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.state }}</el-form-item> <el-form-item class="infoForm" label="计划日期:">{{ orderObj.start_date }}</el-form-item>
</el-col> </el-col>
<el-button type="primary" @click="submitForm">提交</el-button>
</el-row> </el-row>
</el-form> </el-form>
</el-card> </el-card>
@ -76,8 +77,7 @@
<save-dialog <save-dialog
v-if="dialog.save" v-if="dialog.save"
ref="saveDialog" ref="saveDialog"
:mtask="mtask" :mtask="orderObj.id"
:materialId="materialId"
@success="handleSaveSuccess" @success="handleSaveSuccess"
@closed="dialog.save = false" @closed="dialog.save = false"
></save-dialog> ></save-dialog>
@ -114,9 +114,6 @@
getTask(){ getTask(){
this.$API.pm.mtask.item.req(this.mtask).then((res) => { this.$API.pm.mtask.item.req(this.mtask).then((res) => {
this.orderObj = res; this.orderObj = res;
this.$API.pm.utask.item.req(res.utask).then((res1) => {
this.materialId = res1.material;
})
}) })
}, },
// //

View File

@ -26,7 +26,7 @@ module.exports = defineConfig({
}, },
client: { client: {
overlay: { overlay: {
runtimeErrors: false, // runtimeErrors: false,
}, },
}, },
}, },